feat(adr-013): Phase 0b — submodule bump + dev preset bundles#294
Open
feat(adr-013): Phase 0b — submodule bump + dev preset bundles#294
Conversation
Wires up the gateway-side and preset-side of ADR-013 so dev agents can produce DOCX/XLSX/PPTX/PDF deliverables and attach them to chat via commonly_attach_file (the new extension tool in Team-Commonly/openclaw#2). Two coordinated changes (workflow build-arg flip is a sibling PR — see end of this description for why it's separate): 1. **Submodule bump** — _external/clawdbot moves to the feat/commonly-attach-file branch which adds: - commonly_attach_file extension tool (uploads via runtime endpoint, posts [[upload:...]] directive) - uploadFile() client method (multipart POST to /api/agents/runtime/pods/:podId/uploads) - toRelativeWorkspacePath exported from plugin-sdk for path-traversal protection - OPENCLAW_INSTALL_DOC_TOOLCHAIN build arg in the Dockerfile (~170MB opt-in toolchain: pinned OfficeCLI binary + pandoc + texlive + markitdown + pypdf, with build-time self-test) 2. **defaultSkills bundles** for the four production dev presets (dev-pm/Theo, backend-engineer/Nova, frontend-engineer/Pixel, devops-engineer/Ops). Each gets: - github (PR/repo operations) — already in image via gh CLI - officecli (DOCX/XLSX/PPTX) — new in image when toolchain enabled - pandic-office (md → PDF via pandoc) — new in image - markdown-converter (markitdown — read attached binary docs) — new - pdf (extract/merge/split) — already-catalog skill Plus tmux for the three engineers (long-running coding sessions). These four presets previously shipped with `defaultSkills: []` despite the install pipeline being fully wired — a quiet correctness bug that ADR-013 (#287) flagged. After reprovision-all on dev, each agent will have these skills synced to /workspace/<accountId>/skills/. **Depends on Team-Commonly/openclaw#2** — the submodule pointer here references the feature branch SHA. After #2 merges, this pointer should be force-updated to the merged main SHA before this commonly PR lands. **Workflow change separate.** The companion change to .github/workflows/deploy-dev.yml (adding `--build-arg OPENCLAW_INSTALL_DOC_TOOLCHAIN=1`) is a separate one-line PR because the current OAuth auth lacks `workflow` scope. The diff is trivial and included here for reference; will be applied via a separate auth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…cally Closes the gap surfaced in PR #294 review: defaultSkills was metadata-only (consumed by the install-UI readiness display), but provision/reprovision never imported the actual skills into PodAssets. So the four dev presets declared bundles that no agent ever saw. This commit makes defaultSkills load-bearing by reusing the existing skill-import pipeline — no new install plumbing. Two coordinated changes: 1. **backend/services/presetSkillsAutoImport.ts** — new helper that resolves each defaultSkills entry to SKILL.md content and upserts it as a PodAsset. Resolution order: a. Local bundle: commonly-bundled-skills/<id>/SKILL.md b. Catalog index: docs/skills/awesome-agent-skills-index.json sourceUrl → fetched via existing fetchSkillContentFromSource c. Skip with warning if neither resolves. Calls PodAssetService.upsertImportedSkillAsset (reused from the manual /api/skills/import route). Idempotent across reprovisions — same skillKey upserts the asset. 2. **provision.ts + reprovision.ts** — invoke applyPresetDefaultSkills AFTER provisionAgentRuntime returns and BEFORE syncOpenClawSkills runs. Sequence: provision config → upsert PodAssets from preset.defaultSkills → syncOpenClawSkills queries those PodAssets → writes SKILL.md to PVC. Pure reuse: no new sync plumbing, no new schema, no new routes. Plus the local bundle for officecli (Apache-2.0, 20KB SKILL.md + LICENSE) at commonly-bundled-skills/officecli/. Bundled because the upstream awesome-agent-skills catalog was last synced 2026-02-05 and OfficeCLI was created 2026-03-15. README.md documents the bundling convention so future skills follow the same pattern. After merge + Deploy Dev + reprovision-all: - Theo/Nova/Pixel/Ops each get github + officecli + pandic-office + markdown-converter + pdf synced to /workspace/<accountId>/skills/ - The DOCX/XLSX/PPTX capability ships TODAY (officecli locally bundled) - No follow-up Phase 2 needed for officecli — it's already here Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
openclaw#2 (commonly_attach_file extension tool + path-policy plugin-sdk export + Dockerfile doc-toolchain build-arg) merged. Bumps the submodule pointer from 11878b43c (pre-merge feature-branch base) to 4bf74dfc5 (the merge commit on rebase-2026.3.29) so commonly-side picks up the merged state instead of the unmerged feature branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…teway Pairs with openclaw#2 (now merged on rebase-2026.3.29 via 4bf74dfc5). Without this flag the gateway image still builds but skips OfficeCLI/ pandoc/texlive/markitdown/pypdf — agents would have commonly_attach_file (the kernel verb) but no binaries to produce DOCX/XLSX/PPTX/PDF with. Adds ~170 MB to the gateway image. Build-time self-test runs \`officecli --version\` + \`pandoc --version\` + \`python3 -c "import markitdown, pypdf"\` so a regression (lost binary, broken pip) fails the build rather than surfacing as 'command not found' at agent runtime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01
added a commit
that referenced
this pull request
May 4, 2026
…294) Closes Phase 0b of ADR-013 by wiring up the kernel verb, toolchain, dev preset bundles, auto-import, and a locally-bundled OfficeCLI skill so the four production dev agents (Theo/Nova/Pixel/Ops) can produce real deliverables and attach them to chat after a single reprovision-all. What ships in one merge: 1. **Submodule bump** _external/clawdbot → 4bf74dfc5 on rebase-2026.3.29 (openclaw#2 merge commit). Adds the `commonly_attach_file` extension tool, the `uploadFile()` client method, the `toRelativeWorkspacePath` plugin-sdk export for path-traversal protection, and the `OPENCLAW_INSTALL_DOC_TOOLCHAIN` Dockerfile build-arg gating the ~170MB document toolchain (pinned OfficeCLI 1.0.70 + pandoc + texlive-xetex + markitdown + pypdf, with build-time self-test). 2. **deploy-dev.yml** passes `--build-arg OPENCLAW_INSTALL_DOC_TOOLCHAIN=1` to the clawdbot-gateway docker build so dev gateways get the toolchain. 3. **defaultSkills** for the four production dev presets (dev-pm/Theo, backend-engineer/Nova, frontend-engineer/Pixel, devops-engineer/Ops): github + officecli + pandic-office + markdown-converter + pdf, plus tmux for the three engineers. These four presets previously shipped with `defaultSkills: []` despite the install pipeline being fully wired — a quiet correctness bug ADR-013 (#287) flagged. 4. **backend/services/presetSkillsAutoImport.ts** (~210 lines, new) — resolves each defaultSkills entry to SKILL.md content (local bundle first, then catalog index → fetched via the existing fetchSkillContentFromSource), then upserts each as a PodAsset via the existing PodAssetService.upsertImportedSkillAsset. Idempotent across reprovisions. Pure reuse of the same pipeline the manual POST /api/skills/import route uses — no new install plumbing. 5. **provision.ts + reprovision.ts** invoke applyPresetDefaultSkills after provisionAgentRuntime returns and BEFORE syncOpenClawSkills runs. The new PodAssets land just in time for the existing gateway sync to pick them up and write their SKILL.md files to /workspace/<accountId>/skills/<id>/ on the gateway PVC. 6. **commonly-bundled-skills/officecli/** — local bundle of the upstream Apache-2.0 SKILL.md + LICENSE. Bundled because the upstream awesome-agent-skills catalog was last synced 2026-02-05 and OfficeCLI was created 2026-03-15. README.md documents the bundling convention so future skills follow the same pattern; when upstream gains the skill, the local bundle can be deleted. After Deploy Dev + reprovision-all on dev: - Theo/Nova/Pixel/Ops each have their bundle synced to PVC - Agent runs `pandoc input.md -o report.pdf` (or officecli for slides) - Agent calls commonly_attach_file({podId, filePath, message: '...'}) - Pill renders with preview in chat Companion: ADR-013 (#287) merged. Phase 0a findings (#291) still open. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ADR-013 Phase 0b + Phase 1 — wires the gateway-side and preset-side so dev agents can produce DOCX/XLSX/PPTX/PDF deliverables and attach them to chat today, with no follow-up PR needed for
officecli.Depends on Team-Commonly/openclaw#2 — submodule pointer references the feature-branch SHA.
What ships
1. Submodule bump →
_external/clawdbotMoves to
feat/commonly-attach-filewhich adds:commonly_attach_fileextension tool — kernel verb, uploads + posts[[upload:...]]directiveuploadFile()client method — multipart POST to/api/agents/runtime/pods/:podId/uploadstoRelativeWorkspacePathexported from plugin-sdk — path-traversal protectionOPENCLAW_INSTALL_DOC_TOOLCHAINbuild arg — opt-in ~170MB toolchain (pinned OfficeCLI + pandoc + texlive + markitdown + pypdf)2.
defaultSkillsbundles for the four production dev presetsdev-pm(Theo)github,officecli,pandic-office,markdown-converter,pdfbackend-engineer(Nova)github,tmux,officecli,pandic-office,markdown-converter,pdffrontend-engineer(Pixel)github,tmux,officecli,pandic-office,markdown-converter,pdfdevops-engineer(Ops)github,tmux,officecli,pandic-office,markdown-converter,pdf3. Auto-import — making defaultSkills actually do something
The fix to a real gap. Before this commit,
defaultSkillswas metadata-only — consumed bypresets-router.tsto display readiness in the install UI, but never read by provision/reprovision. So those bundle declarations would have been inert.This commit adds
backend/services/presetSkillsAutoImport.ts(new helper, ~210 lines) and wires it intoprovision.ts+reprovision.ts. The flow:provisionAgentRuntimereturnsapplyPresetDefaultSkillsresolves eachdefaultSkills[i].idto SKILL.md content (local bundle first, then catalog) and upserts each as aPodAssetvia the existingPodAssetService.upsertImportedSkillAssetsyncOpenClawSkillsqueries thosePodAssetrows and writes their SKILL.md files to/workspace/<accountId>/skills/<id>/on the gateway PVCPure reuse, zero new plumbing: same path the manual
POST /api/skills/importroute uses. SameskillKeyupsert pattern means re-running provision is idempotent. Same gateway sync runs unchanged. The only new thing is the lookup-and-call helper.4. Local skill bundles →
commonly-bundled-skills/New top-level directory for skills shipped with this repo that aren't in the upstream catalog yet. The auto-importer checks here before falling back to the catalog index.
Today's bundle:
officecli(Apache-2.0, 20KB SKILL.md + LICENSE) — bundled because the upstreamawesome-agent-skillscatalog was last synced 2026-02-05 and OfficeCLI was created 2026-03-15.commonly-bundled-skills/README.mddocuments the convention so future skills follow the same pattern. When upstream gains the skill, the local bundle can be deleted.Why this matters
Before this PR, even with the docs and infrastructure shipped, agents would still have no DOCX/XLSX/PPTX capability —
officecliwouldn't be in any catalog and the preset declarations would be inert. After this PR (+ openclaw#2 + the workflow build-arg flip), the full loop works end-to-end:commonly_attach_file({podId, filePath: 'deck.pptx', message: 'Stakeholder deck.'})Workflow change — separate sibling PR
Companion one-liner change to
.github/workflows/deploy-dev.ymladds--build-arg OPENCLAW_INSTALL_DOC_TOOLCHAIN=1. Needs separate auth (workflow scope). Trivial to apply:docker build _external/clawdbot \ --build-arg OPENCLAW_EXTENSIONS=acpx \ --build-arg OPENCLAW_INSTALL_GH_CLI=1 \ + --build-arg OPENCLAW_INSTALL_DOC_TOOLCHAIN=1 \ -t "$REPO:$TAG"Without that flag the toolchain isn't installed and
officecli/pandocwon't be on the gateway image. The submodule bump + presets + auto-import are all still useful —commonly_attach_file(the kernel verb) works regardless. Agents just won't have the binaries to produce files until the workflow flag flips.Verification path
After merge + Deploy Dev + reprovision-all on dev:
kubectl exec -n commonly-dev deployment/clawdbot-gateway -- officecli --version→1.0.70kubectl exec -n commonly-dev deployment/clawdbot-gateway -- ls /workspace/theo/skills/→ showsofficecli pandic-office pdf markdown-converter githubcommonly_attach_file, file appears in chat with preview pillCompanion
🤖 Generated with Claude Code