Repository navigation
fix: setup helper cannot install ClawHub Templates - #199064
Conversation
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: a9b6be77-aefd-4eec-acb3-4ea7610a099b
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets the setup helper review and install published ClawHub Templates through the existing Gateway installer and approval policy. Example: Ask the helper to review and install @fixture/[email protected].
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds a useful helper capability missing from current main, and both prior findings are resolved with no remaining actionable code finding. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherRegular agents delegate setup requests to the system agent; its host retains requester authority, obtains Template plans, resolves exact-operation approval, and invokes the shared installer. flowchart TD
A[User or requesting agent] --> B[System agent model turn]
B --> C[Host Template handoff]
C --> D[Shared Template planner]
D --> E[Existing approval owner]
E --> F[Shared Template installer]
F --> G[Result and next model input]
Technical reviewBest possible solution: Keep Template installation behind the shared planner, installer, and exact-operation approval owners, with host results available to subsequent helper turns. Do we have a high-confidence way to reproduce the issue? Current-main tool registration and operation dispatch establish the missing helper capability; no live reproduction was performed during this read-only review. Is this the best way to solve the issue? Sharing the existing request owners is an appropriate complete extension: it avoids a second installer and preserves exact-plan consent, delegated approval, ordinary-agent admission, and truthful result projection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3f7d2a1c77f5. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +421, Tests +487, Docs +23, Other +5. Total +936 across 26 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 1:50 PM ET / 18:50 UTC (Revision 2). |
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: a9d4e045-f84d-4aac-b584-4e0f4b972986
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 57e512f5ac49427c295b79f81c5c88df2c603c9b
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
main extracted the templates.add handlers into shared request functions for the setup helper (#199064) while this branch added chat-based Add to the same handler. Keep main's extracted functions and carry the chat branch, progress publication and reserved-manifest conflict disclosure into them. - gateway-add-result.ts holds both the shared result type (with main's workspace and outcomes fields) and main's outcome projection. - The apply params union names its reviewed-plan variant so the setup helper is typed against, and limited to, reviewed installs. - Catalog detail agentId moves with main's catalog types module. - The Template detail page keeps main's metadata rail without the removed review step.
* fix: setup helper cannot install ClawHub Templates Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: a9b6be77-aefd-4eec-acb3-4ea7610a099b * Publish openclaw/vivid-prawn-3 Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: a9d4e045-f84d-4aac-b584-4e0f4b972986 * fix(templates): preserve effect-free preview errors in helper adapter --------- Co-authored-by: jjjhenriksen <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
Fixes: agents cannot install a published ClawHub Template through the OpenClaw setup helper, even though the Gateway already supports reviewing and adding it.
User Impact
Agents can request
template_reviewandtemplate_installwithout gaining shell access. Installation retains exact-plan and dependency consent, the original administrator/request lifetime, cancellation and revocation checks, and the existing delegated-change approval policy. Missing authority, consent, or Templates enablement returns an actionable blocker. Trust warnings require exact human approval even under Full Access.Results disclose the actual agent and workspace, complete/partial state, readiness requirements, dependency installation/reuse receipts, and automation outcomes. A failed automation is not reported as enabled. No live Gateway configuration was changed during this work.
Why This Change Was Made
The helper now hands Template operations back to its host. UI RPCs and the helper share the same typed Template request owners and installer, rather than introducing another installation path. The host presents the full reviewed plan in its exact-operation approval and retains the requesting administrator through deferred decisions, including native/MCP-backed helper turns. No new configuration or persistent state is introduced.
Evidence
Revision after ClawSweeper
14bed9de9374c2c1a1cc8859c9dc7fc03754a779. The latest host Template output now travels through the existing model turn-input owner for embedded and resumed native helper turns. Actual installation outcomes replace the review reference; the reference never grants approval or authority.Template result never reached the model input. It now derives the installation arguments from the actual next model input, rather than the caller copying plan JSON. Direct conversational approval and delegated approval paths are covered, along with post-install result continuity.config/test-lines-allocations/199064-template-helper-continuation.txtcovers the remaining 87 lines so the twelve distinct authority/consent/cancellation/retry scenarios and native/receipt contracts remain covered. The global 400-line allowance is unchanged; the exact ratchet passes.GOMAXPROCS=2 pnpm buildpassed (110.4s build phases). An initial overlapping build/review attempt did not produce valid proof after snapshot verification failed; stopped build ownership was reconciled, and the final build and review ran sequentially against quiescent source. Earlier Control UI budget warnings are not represented as a clean budget check.f8761b0c13ec3c4c27786a907c271b98a2dee760: scoped-clean, no findings. Reviewed patch snapshot SHA-256:8c2c83451c7de168a2b78929e164c6cc2c2cf4b19e3074207d604e34141776fc.packages/agent-core/src/harness/compaction/compaction-floor.retention.test-support.ts. This is not claimed as a current full-tree pass. Existing unchanged installer/account-ownership and recovery evidence from the prior qualification is retained, not represented as freshly rerun.Current-main integration proof (2026-11-15)
The reviewed integration candidate is
19f846bc791b3606eed8c6fae590e98cccaa8597(treec555a19ed6d06be019fcdb728fb049d0d51138b1), incorporating main95a877918f181f3ebc91aa91283cbdbb29bb4b4b.details.mutationAccepted: false. A failed preview therefore remains an explicit no-effect result for owner-routed callers.0f1b2110d1e47261730e673183a6db8c40fbec46. Relevant helper/installer/result inputs are unchanged by the integration; the added behavior is the preview error detail above. These earlier runs are not represented as a fresh candidate full build or hosted CI pass. Hosted checks for the published integration remain subject to the native landing workflow.Live installation proof (2026-11-15, exact head
0f1b2110d1e47261730e673183a6db8c40fbec46)[email protected]release, returned its proposed agent/workspace and exact plan, requested approval, and installed afteryes. The actual host result wasstatus: complete,readiness.ready: true, with no remaining requirements. A later model turn accurately reported the actual result.AGENTS.md,BOOTSTRAP.md,IDENTITY.md,SOUL.md, assets, avatar, references, skill and templates were present;SOUL.mdcontained the published Template instructions. Public registry and inference were live, not mocked. This release declares no plugin/MCP/automation dependencies; those branches retain existing integration coverage.GOMAXPROCS=2 pnpm buildpassed in the exact-head proof checkout. UI budget warnings remain warnings and are not claimed as a clean budget check.Inherited CI qualification
Run 43628130143, attempt 1 remains failed: six updater cases hit
SQLite read-only worker Unable to deserialize cloned data due to invalid or unsupported version.The updater owner, readonly transport, fixtures, runner, and dependency inputs are identical between its actual main parent and tested merge. A separate pinned Bun-to-Node serialization experiment reproduced that exact error; same-runtime controls passed.Main already repairs builtin mock dispatch in 84579cbdcc63. All six exact cases pass the newest completed main run 43763625500: candidate/fresh-doctor cases, Windows cases. A local baseline attempt had different pending-recovery/timeouts and is not claimed as an identical CI reproduction. Landing uses the repository's native inherited-failure qualification; neither failed PR CI nor full main CI is described as green.
Reported by Jacqueline Henriksen.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
Published candidate CI qualification
Exact published candidate
19f846bc791b3606eed8c6fae590e98cccaa8597has completed CI 43773319621, attempt 1: 100 terminal jobs, 69 successful, 27 normal skips, three failed leaves and the failed aggregate. Failed CI remains failed. The actual tested merge isef4a1d0b6184124414705d59cd6293179ee55bd8, with ordered parents3900bb2366e8b7aa785b8eafd7b25131b0fbeb2e(main) and the candidate above.d1307e6167456cd6e742dfd052708b93a7040df5deliberately changed recovery guidance and updated its adjacent formatter test.retryable:falsefield introduced by upstream6f8b9fa083f6a6ef12df662d085817aa44eb4a61; its equivalent handler assertion was updated there.The exact candidate's 114 focused integration tests, affected types and scoped static checks passed as recorded above. Historical original full-build/live-model/public-registry proof is reused only for its unchanged inputs. Native inherited-failure admission must verify the actual merge, evidence, enforced reviews, security and current execution authority; no check is relabeled green.