Skip to content

fix: setup helper cannot install ClawHub Templates - #199064

Merged
Patrick-Erichsen merged 4 commits into
mainfrom
openclaw/vivid-prawn-3
Nov 15, 2026
Merged

Patrick-Erichsen merged 4 commits into
mainfrom
openclaw/vivid-prawn-3

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

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_review and template_install without 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

  • Repaired the conversational handoff identified on prior head 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.
  • The two-turn regression first failed against the prior implementation with 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.
  • Six affected test files passed, 125 tests across four shards (110.25s wrapper), including twelve real tool/engine/approval/installer scenarios and the existing native/MCP and prompt-prefix contracts. External model/registry I/O remains fixed in those tests, not live proof.
  • Production and Gateway-method test types, targeted type-aware lint, formatting, and diff checks passed.
  • Consolidated duplicate entry-point coverage and fixture file-writing scaffolding. Net test growth is now 487, down from 499 while adding the missing continuation/direct-chat coverage. The existing-policy allocation config/test-lines-allocations/199064-template-helper-continuation.txt covers 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.
  • Final GOMAXPROCS=2 pnpm build passed (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.
  • Fresh independent Auto Review, P0–P2, full local candidate over base f8761b0c13ec3c4c27786a907c271b98a2dee760: scoped-clean, no findings. Reviewed patch snapshot SHA-256: 8c2c83451c7de168a2b78929e164c6cc2c2cf4b19e3074207d604e34141776fc.
  • Retained unused-file qualification from before this repair: the production scan passed with zero entries; the full-tree scan reported the unmodified 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 (tree c555a19ed6d06be019fcdb728fb049d0d51138b1), incorporating main 95a877918f181f3ebc91aa91283cbdbb29bb4b4b.

  • Preserved the shared typed planning/application request owners while retaining landed #198521 preview errors with details.mutationAccepted: false. A failed preview therefore remains an explicit no-effect result for owner-routed callers.
  • Fresh focused validation passed 114 tests across seven files and four canonical shards: preview/application handlers, the complete setup-helper approval/denial/cancellation/revocation/trust/changed-plan scenarios, original requester and native inference ownership, actual partial dependency/automation receipts, plugin activation policy, and native/MCP tool handoff. Both forbidden and unavailable preview-error regressions passed.
  • Core production types, the affected Gateway-methods/agent-tools/Templates test-type checks, all changed-file lint/format checks, and whitespace checks passed. Fresh independent coordinator review found no actionable findings; the tracked worktree remained clean.
  • The real-model/live-registry proof and full package build below remain evidence for original head 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)

  • Before: the helper could not review/install a published ClawHub Template. The committed two-turn regression failed before this change because the review never reached the next model input.
  • After: an isolated Gateway with a real configured model reviewed the live published [email protected] release, returned its proposed agent/workspace and exact plan, requested approval, and installed after yes. The actual host result was status: complete, readiness.ready: true, with no remaining requirements. A later model turn accurately reported the actual result.
  • Independently read the saved ordinary agent entry and workspace. AGENTS.md, BOOTSTRAP.md, IDENTITY.md, SOUL.md, assets, avatar, references, skill and templates were present; SOUL.md contained 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.
  • A retired manifest release was correctly refused. An earlier scratch setup using a symlinked state path exposed the separate issue fixed by #198520; its partial result was reported honestly. The successful proof used a fresh canonical-path environment. No personal/work Gateway or channel state was used.
  • Fresh full GOMAXPROCS=2 pnpm build passed 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 19f846bc791b3606eed8c6fae590e98cccaa8597 has 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 is ef4a1d0b6184124414705d59cd6293179ee55bd8, with ordered parents 3900bb2366e8b7aa785b8eafd7b25131b0fbeb2e (main) and the candidate above.

  • The item-conflict Control UI assertion retains the old message after upstream d1307e6167456cd6e742dfd052708b93a7040df5 deliberately changed recovery guidance and updated its adjacent formatter test.
  • The archived-agent RPC assertion omits the intentional retryable:false field introduced by upstream 6f8b9fa083f6a6ef12df662d085817aa44eb4a61; its equivalent handler assertion was updated there.
  • Twelve receipt tests fail in unchanged session admission/storage owners. All 152 determining fixture, admission, sharing, storage, dependency and runner objects are identical between the actual main parent and tested merge; the changed Template/setup-helper owners are not invoked. A separate actual-main source export reproduced both hosted failure families in five of the full 43 cases (38 passed), with only three error-path console traces and original deadlines. The 13 isolated receipt cases passed. This is timing-sensitive baseline evidence, not a repair or a claim of reproducing all 12 cases. The precise publication/storage mechanism remains unresolved.

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.

Worked on by:
- @jjjhenriksen

Co-authored-by: jjjhenriksen <[email protected]>
OpenClaw-Publication: a9b6be77-aefd-4eec-acb3-4ea7610a099b
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: XL labels Nov 14, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 14, 2026 17:49
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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].

  • Before: The helper has no Template review or installation action.
  • After: The helper receives the reviewed plan in its next model turn, requests installation under existing approval policy, and returns the actual agent, workspace, readiness, and dependency outcomes.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The code review is clear and both earlier blockers are resolved; overall readiness follows the required behavior-proof tier.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An agent asked to install a published Template cannot complete that task through the restricted setup helper despite the Gateway supporting the operation.
Reason: The maintainer-authored direction fills a concrete capability gap through existing installation and approval owners without adding configuration or shell access.

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
Reviewed head: 0f1b2110d1e47261730e673183a6db8c40fbec46

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Show a real model reviewing and then installing a published ClawHub Template through the shipped helper, including approval and the resulting agent/workspace, using redacted logs, terminal output, or a recording.
Agent review details

How this fits together

Regular 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]
Loading

Technical review

Best 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

  • Template request planning, installation, and ordinary-agent lifecycle keeps the original intent (feat: add Claws as ordinary agents and resources #171623: Add creates ordinary resources through a one-way operation; subsequent durable-chat work retains the same agent and conversation across interrupted setup.)
  • System-agent routing and turn-input ownership keeps the original intent (1d90eed: Keep routing with the chat engine and prompt/history projection with the dialogue owner while preserving approval and settlement behavior.)
  • Delegated change approval keeps the original intent (fix: require approval for delegated changes without effective authority #196984: Automatic changes require established effective authority or a standing grant; otherwise an exact human decision is required.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit caa978c adds src/templates/gateway-add-apply.ts:100 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: caa978caae7a; files: src/templates/gateway-add-apply.ts)

PR surface

Source +421, Tests +487, Docs +23, Other +5. Total +936 across 26 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 20 773 352 +421
Tests 4 492 5 +487
Docs 1 23 0 +23
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 0 +5
Total 26 1293 357 +936

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This adds useful conversational installation support with limited scope; users already have an in-product Template installation path.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-14T18:11:57.165Z sha 14bed9d :: needs changes before merge. :: [P2] [P2] Return review facts to the helper's model context | [P2] [P2] Satisfy the test-line budget that rejects this patch

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
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit b58c23c into main Nov 15, 2026
161 of 166 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/vivid-prawn-3 branch November 15, 2026 23:53
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

Patrick-Erichsen added a commit that referenced this pull request Nov 16, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants