-
Notifications
You must be signed in to change notification settings - Fork 8
Feat/report generation skills 51 #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arjun-zosma
merged 16 commits into
zosmaai:main
from
Shanvit7:feat/report-generation-skills-51
Apr 3, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
855208c
feat(skill-reports): add deps, jsx config, template types, monthly-re…
Shanvit7 61d7fce
feat(skill-reports): implement chart, csv, pdf, pptx, xlsx renderers
Shanvit7 e64e32c
feat(skill-reports): implement tool definitions and package index
Shanvit7 cba6253
feat(agents): wire report tools from skill-reports into createDefault…
Shanvit7 bbd31fa
Merge branch 'cleave/1-renderers' into feat/report-generation-skills-51
Shanvit7 4baa0e2
fix(skill-reports): resolve schema conflicts, unify MonthlyReportData…
Shanvit7 654a3f4
Merge branch 'cleave/3-agents-wiring' into feat/report-generation-ski…
Shanvit7 9104da3
feat(dockerfile): add native canvas libs, Python report deps, /worksp…
Shanvit7 5362920
fix(agents): wire report tools as customTools, split ToolDefinition f…
Shanvit7 2ef1000
chore: package changes
Shanvit7 a4cf7ca
feat(dockerfile): globally install chart.js, chartjs-node-canvas, d3,…
Shanvit7 29e5831
chore: implemented report generation skills and hydartion error fix o…
Shanvit7 fc7cf0b
Merge branch 'main' of https://github.com/Shanvit7/openzosma into fea…
Shanvit7 f7b4606
chore: broken test fixed
Shanvit7 46d2ca9
chore: file delete for unwanted dev
Shanvit7 c5324e0
chore: docker file changes
Shanvit7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,10 +17,28 @@ | |
| # ============================================================================= | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Stage 1: Build sandbox-server and produce a deployable bundle | ||
| # Stage 1: Build sandbox-server and produce a deployable bundle. | ||
| # Also pre-builds all native npm globals here so the runtime stage does not | ||
| # need a C/C++ toolchain. | ||
| # --------------------------------------------------------------------------- | ||
| FROM node:22-slim AS builder | ||
|
|
||
| # Build-time system dependencies: | ||
| # - build-essential / g++ / make / pkg-config: required by node-gyp for native modules | ||
| # - *-dev packages: header files needed to compile canvas (cairo, gif, jpeg, pango, rsvg) | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| g++ \ | ||
| libcairo2-dev \ | ||
| libgif-dev \ | ||
| libjpeg-dev \ | ||
| libpango1.0-dev \ | ||
| librsvg2-dev \ | ||
| make \ | ||
| pkg-config \ | ||
| python3 \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN corepack enable && corepack prepare [email protected] --activate | ||
|
|
||
| WORKDIR /build | ||
|
|
@@ -53,35 +71,66 @@ RUN pnpm --filter @openzosma/sandbox-server deploy /deploy --prod --legacy | |
| # Copy built dist into the deploy directory | ||
| RUN cp -r packages/sandbox-server/dist /deploy/dist | ||
|
|
||
| # Pre-build all global npm packages that contain native modules or are large. | ||
| # Installing here (with the toolchain present) means the runtime stage only | ||
| # needs to COPY the pre-compiled /usr/local/lib/node_modules directory — | ||
| # no compiler required at runtime. | ||
| RUN npm install -g \ | ||
| @mariozechner/pi-coding-agent \ | ||
| agent-slack \ | ||
| chart.js \ | ||
| chartjs-node-canvas \ | ||
| d3 \ | ||
| exceljs | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Stage 2: Runtime | ||
| # --------------------------------------------------------------------------- | ||
| FROM node:22-slim | ||
|
|
||
| # Install runtime dependencies and developer tools. | ||
| # iproute2 is required by the OpenShell sandbox supervisor for network namespace creation. | ||
| # python3-venv provides virtualenv support for isolated Python environments. | ||
| # tree, jq, wget, less, unzip, zip are general-purpose CLI tools the agent can use. | ||
| # make + g++ are required for native npm modules that use node-gyp. | ||
| # Node.js and npm are already present from the node:22-slim base image. | ||
| # Runtime system dependencies only — no compiler toolchain, no *-dev headers. | ||
| # | ||
| # Shared libraries required by pre-compiled native modules (e.g. canvas): | ||
| # libcairo2, libgif7, libjpeg62-turbo, libpango-1.0-0, libpangocairo-1.0-0, | ||
| # librsvg2-2 — these are the runtime counterparts of the *-dev packages used | ||
| # in the builder stage. | ||
| # | ||
| # iproute2: required by the OpenShell sandbox supervisor for network namespace creation. | ||
| # python3 / python3-pip / python3-venv: agent-generated Python code + report generation. | ||
| # tini: PID 1 / signal handling. | ||
| # git, curl, wget, jq, less, tree, unzip, zip: general-purpose CLI tools for the agent. | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| curl \ | ||
| git \ | ||
| iproute2 \ | ||
| jq \ | ||
| less \ | ||
| libcairo2 \ | ||
| libgif7 \ | ||
| libjpeg62-turbo \ | ||
| libpango-1.0-0 \ | ||
| libpangocairo-1.0-0 \ | ||
| librsvg2-2 \ | ||
| python3 \ | ||
| python3-pip \ | ||
| python3-venv \ | ||
| tini \ | ||
| curl \ | ||
| iproute2 \ | ||
| tree \ | ||
| jq \ | ||
| wget \ | ||
| less \ | ||
| unzip \ | ||
| wget \ | ||
| zip \ | ||
| make \ | ||
| g++ \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install Python reporting libraries | ||
| RUN pip3 install --break-system-packages \ | ||
| matplotlib \ | ||
| numpy \ | ||
| openpyxl \ | ||
| pandas \ | ||
| python-pptx \ | ||
| reportlab \ | ||
| seaborn | ||
|
|
||
| # Create sandbox user (OpenShell convention: non-root execution) | ||
| # --home is required so homedir() returns a real path; bootstrapPiExtensions() | ||
| # writes config files to ~/.pi/ and will crash if home is /nonexistent. | ||
|
|
@@ -95,11 +144,12 @@ WORKDIR /app | |
| # Copy the self-contained deploy bundle (node_modules + dist, no symlinks) | ||
| COPY --from=builder /deploy ./ | ||
|
|
||
| RUN npm install -g @mariozechner/pi-coding-agent | ||
|
|
||
| # Install agent-slack CLI so the agent can query Slack from inside the sandbox. | ||
| # The CLI reads SLACK_TOKEN from the environment (injected via .env by the orchestrator). | ||
| RUN npm install -g agent-slack | ||
| # Copy pre-compiled global npm packages from the builder stage. | ||
| # All native modules (e.g. canvas inside chartjs-node-canvas) were compiled | ||
| # there with the full toolchain. The runtime stage needs only the shared libs | ||
| # (installed above), not the compiler. | ||
| COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| COPY --from=builder /usr/local/bin /usr/local/bin | ||
|
|
||
| # Copy extension manifest and install script before switching to sandbox user | ||
| COPY packages/agents/extensions.json /tmp/extensions.json | ||
|
|
@@ -123,7 +173,7 @@ RUN chown root:root -R ./skills/ && chmod 444 -R ./skills/ | |
| # In per-user persistent sandboxes, this directory persists across sessions. | ||
| # /sandbox is the OpenShell writable root where .env is uploaded. | ||
| # .knowledge-base is pre-created so the agent prompt doesn't error on ls. | ||
| RUN mkdir -p /workspace/.knowledge-base /tmp/agent /sandbox && \ | ||
| RUN mkdir -p /workspace/.knowledge-base /workspace/output /tmp/agent /sandbox && \ | ||
| chown -R sandbox:sandbox /workspace /tmp/agent /sandbox | ||
|
|
||
| # Copy entrypoint into /app/ which is already in the policy read_only allowlist. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes the docker image heavy?
We might be losing benefits we get from using
Would it help to move to another image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will review and do the change if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Trex-Hub changes made, please review once if legit