Repository navigation
feat(templates): open Control UI chat and create the agent without a plan - #198070
Conversation
The card payload reader required official: true, so a Gateway-authored card for a community plugin was dropped before it reached the chat. Plugin cards now carry the registry's official flag; skill cards stay official-only. The loading placeholder shows the official badge only for official cards. The loaded card already rechecks the Gateway's catalog answer, shows no badge for a community plugin, and offers View details instead of Install.
clawhub now takes either query (search, unchanged) or plugin, the exact ClawHub package name. The exact form looks up that one package, never falls back to search, and shows its existing card. A name ClawHub does not know, or that is not a plugin, returns an explanation and shows no card. Search still returns official plugins and skills only. An exactly named community plugin is shown with the registry's own official flag.
|
🦞👀 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 opens pending Template chat immediately and creates its agent without a reviewed plan, reporting dependency failures in the conversation. Example: Add @jjjhenriksen/[email protected] with Expedia installed but disabled.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it delivers useful, owner-directed Template creation behavior, and no new actionable correctness defect was found; two failed UI CI lanes still need attribution before landing. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI sends a pinned Template coordinate to the Gateway, which uses existing agent, session, workspace, and dependency installers to create an ordinary agent and start its opening conversation. flowchart TD
A[Template catalog Add] --> B[Pending chat and composer]
A --> C[Gateway chat mode]
C --> D[Existing agent and session owners]
D --> E[Verified workspace installer]
E --> F[Dependency installers]
F --> G[Opening conversation with outcomes]
Technical reviewBest possible solution: Land the focused creation layer after CI qualification, retaining shared admission and installer owners alongside the CLI’s reviewed-plan contract. Do we have a high-confidence way to reproduce the issue? The inspected before image and base implementation establish the disabled-plugin failure and plan-dependent UI path; no independent runtime reproduction was performed during this read-only review. Is this the best way to solve the issue? The implementation is a coherent creation stage: it reuses ordinary admission, checkpoints, workspace writes, and dependency installers, removes the replaced UI review path, and preserves the distinct CLI contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d0e09e419d7e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +556, Tests +738, Docs +43, Other +10. Total +1347 across 47 files. Added test files: 2. 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. Review metrics
LabelsLabel 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 (4 earlier review cycles)
Reviewed November 15, 2026, 9:26 PM ET / November 16, 2026, 02:26 UTC (Revision 5). |
02cb9b4 to
d7996ae
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Resolve docs/cli/templates.md by keeping the CLI/Control UI Add split and applying main's disabled-routine wording, and regenerate the gateway protocol predicates for the combined schema.
Keep the CLI/Control UI Add split in docs/cli/templates.md and carry main's offline Add note into the CLI paragraph.
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.
Keep both the chat-mode routing test and main's authored MCP declaration test in templates-add.test.ts.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Upgrade and final-flow evidence for the build that contains this layerThis answers the two proof requests in the review of Latest-stable upgrade keeps existing dataAn isolated Gateway ran official
Limits of this run: the stable Gateway had no usable provider credential, so the session has no transcript messages to compare, and nothing here shows how an older runtime treats the new optional setup fields written by this stack. A separate four-process real-SQLite check of those setup fields (write, cold read, clear, cold read) is described in #198637 (comment). Final flow with Expedia installed but disabledReal Control UI Add of
The screenshots and the recording of this run are retained locally and have been inspected; they are not attached here because the attachment route had no authenticated browser session. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
The squash commit's tree equals the merge of its parent with the creation head this branch already contains, so this branch's tree is unchanged.
…plan (openclaw#198070) * feat(clawhub): let chat plugin cards represent community plugins The card payload reader required official: true, so a Gateway-authored card for a community plugin was dropped before it reached the chat. Plugin cards now carry the registry's official flag; skill cards stay official-only. The loading placeholder shows the official badge only for official cards. The loaded card already rechecks the Gateway's catalog answer, shows no badge for a community plugin, and offers View details instead of Install. * feat(message): show one exact ClawHub plugin card by package name clawhub now takes either query (search, unchanged) or plugin, the exact ClawHub package name. The exact form looks up that one package, never falls back to search, and shows its existing card. A name ClawHub does not know, or that is not a plugin, returns an explanation and shows no card. Search still returns official plugins and skills only. An exactly named community plugin is shown with the registry's own official flag. * docs(control-ui): document exact ClawHub plugin cards * fix(chat): render source reply cards before run adoption * test(chat): classify producer display regression as Node integration * fix(message): send ClawHub cards without generated captions * perf(chat): consolidate source reply admission and card decoding * test(chat): document independent card delivery proof boundaries * refactor(chat): use native named-export lazy card loading * refactor(outbound): keep attachment normalization in payload owner * test(chat): attach profile isolation reason to the mock * feat(templates): name the Template's agent in catalog detail The release detail already validates the Template's agent id from the ClawHub manifest summary. Return it so a client can name the agent it wants before Add, without a plan. * feat(templates): add a plan-free chat mode to templates.add.apply A request with mode "chat" names the agent id it wants and carries no plan digest. The Gateway admits the agent and chat under an unused id, fetches the Template, writes its workspace, then installs declared skills, bundled plugins and MCP servers one at a time. A dependency that cannot be set up is collected instead of stopping creation, and plugins referenced on ClawHub and automations are left to the agent's conversation. Failing to fetch the Template or write its workspace removes the agent and chat this request created. The agent's first turn starts after creation and receives a setup report through buildTemplateOpeningMessage, which still returns the existing opening. The plan-based request used by the CLI is unchanged. * feat(templates): copy CLAW.md and allow setup tools in chat-based Add Chat-based Add copies the Template's CLAW.md unchanged to the workspace root as an ordinary file, bound into the same retry checkpoint as the other workspace files. A Template whose own workspace files claim that path keeps its file and the setup report says so. The saved tool allowlist gains automations, plugins and message when the Template's allowlist omits them. A Template without an allowlist inherits the operator's policy, and a tool the Template denies stays denied. * test(templates): cover chat-based Add at the Gateway request seam Drive templates.add.apply in chat mode against a Template fixture shaped like Travel Copilot, with real admission, workspace, bundled skill and plugin, MCP and rollback owners. A declared plugin that is installed but disabled does not block, a missing skill keeps the agent and is reported, an unfetchable Template or failed workspace write leaves no agent, chat or workspace, and a taken id yields the next unused one. * feat(ui): add Templates from the Control UI without a plan Add no longer requests templates.add.plan. It sends one chat-mode templates.add.apply with the release's package name, exact version and an agent id derived from the Template's own id, then opens the pending chat as before. The review step for plugin capability grants and skill warnings is gone from the Add path; ClawHub's audit of a flagged release still asks first. A card Add reads the release detail once, because only the detail names the Template's agent. When the Gateway answers a first Add with an error it kept nothing, so the user returns to the catalog with the error on that card. * docs(templates): describe plan-free Add from the Control UI * fix(templates): retain effective setup tool grants in chat Add * fix(ui): open Template chat before resolving release details * fix(templates): reserve original manifest in chat Add * fix(templates): extract Gateway Add result leaf contract * perf(templates): keep trust decoder outside shared UI boot * fix(templates): report incomplete chat Add setup truthfully * test(templates): preserve reviewed checkpoint across chat retry refusal * fix(pr): include the ClawHub trust reader in wrapper extraction * perf(templates): decode trust errors without connection adapter * fix(templates): explain reserved manifest recovery after rollback * test(templates): reconcile creation regression allocation
What Problem This Solves
Control UI Template Add waits for a plan, then can leave an empty agent when a declared plugin is disabled.
User Impact
Add opens pending chat immediately and creates the agent with its original manifest, files, skills, bundled plugins and MCP servers without a plan/review step. Failed dependencies are reported instead of rolling back; source or workspace failure removes the new agent and chat. CLI plan/consent behavior is unchanged.
Why This Change Was Made
Selects the chat path explicitly, reuses ordinary agent admission, preserves effective setup tools within explicit denies and operator ceilings, and leaves referenced plugins and automations for the following setup layer. The original workspace-root CLAW.md is reserved; a conflicting workspace declaration fails before Template writes. Its error now explains that nothing was kept and the publisher must move the conflicting file and publish a corrected release.
Warned skills or bundled plugins remain uninstalled and are reported. This does not bypass dependency trust checks.
Evidence
Current allocation-only repair
Published head
9ed5a58794db142be41f5e142e68a5cd92d72bd0differs fromb7235cc095dff0eebd90cd268b2695ca96f98a08only in this layer’s existing test-line allocation record: 211→338 for the actual 738 net test lines above foundation. The unchanged global allowance is 400. The actual ratchet fails with the old 211 allocation and passes with 338; no tests, assertions, product source, scanners or global budgets changed. The paired tests and performance inputs below are unchanged, so those results remain applicable rather than being represented as new executions. Exact-head hosted CI and completed review remain required.Retained source qualification
Head
b7235cc095dff0eebd90cd268b2695ca96f98a08is restacked once above foundationc1c471f63b56ad6e5908058d4bebf4e87e080454. Generated validator conflicts were resolved by canonical regeneration, not hand-editing output. The CLI retains main's canonical scoped-package resolution and the leaf result contract. Git omitted the lazy-permission fixture repair because it is already upstream; unrelated source and all original worktrees are preserved.c1c471f63b56ad6e5908058d4bebf4e87e080454:node --import ./scripts/tsx.mjs scripts/check-control-ui-performance-base.mts c1c471f63b56ad6e5908058d4bebf4e87e080454. Document 14,016 B <=14,026 B. Chat JS 1,314,978→1,315,005 B (+27) and New Session 817,974→818,000 B (+26) meet the unchanged 64-byte differential allowance; startup JS stays 90,860 B. Requests remain chat21/new17/startup3; boot CSS is unchanged, total CSS −14 B. No budgets raised or new lazy boundary. The unnecessary connection-error adapter import is deleted; the existing trust decoder reads the already-typed protocol error directly, preserving synchronous click-to-chat.clawhub-trust-error-details.ts. Existing source-closure and extracted-dependency-context tests pass 2/2 (19.29s), including the actual materialized import graph.Retained earlier proof
These results predate the current restack, not new exact-head executions:
Real Control UI comparison
Same original
@jjjhenriksen/[email protected], Expedia installed but disabled. Baseline4ab02e3c0879opened chat at19.9s, failed on the disabled plugin at35.6s and left an empty workspace without goplaces/model output. Earlier integrated candidatec23e44d2811(creation plus following setup layer) opened pending chat in104ms and produced visible output at52.2s.The created workspace contains goplaces. Original CLAW.md matches source byte-for-byte, SHA-256
5f8be1c9add44e177fb9f783d09919c377f1f223cbdc994b1f6e322557ef9f99. Expedia remains disabled; Travel Themes remains uninstalled. No automation was created (the original declares none); stored session is done and initialization/setup continuation cleared.That historical recording persisted the setup card but omitted it live until reload. Foundation now contains the owning repair with all three producer→renderer paths passing, but these older screenshots do not prove the final combined head. Clean final video/full setup acceptance remains open, not claimed by the images.
Stack dependency: #198065. The following layer owns tools-enabled setup. No production Gateway changed.