Repository navigation
feat: browse and search ClawHub plugins and skills through Gateway - #163459
Conversation
|
🦞👀 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. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. Reviewed October 5, 2026, 10:53 AM ET / 14:53 UTC (Revision 10). ClawSweeper reviewWhat this changesAdds Gateway browsing and keyword search for ClawHub plugins and skills, with official filtering, pagination, source-qualified identities, and existing installation facts. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main lacks the unified catalog methods, and the merged details work covers a different capability. No actionable introduced defect remains; the earlier official-status finding is fixed, and the prior migration-proof concern does not apply. Priority: P2 Review scores
Verification
How this fits togetherNative clients send discovery requests to the Gateway, which reads ClawHub listings and joins existing plugin or selected-agent skill installation state. Clients receive catalog pages and installation references for the existing detail and installation flows. flowchart TD
A[Native client requests] --> B[Gateway authorization and validation]
B --> C[Shared catalog discovery]
D[ClawHub listings] --> C
E[Existing installation state] --> C
C --> F[Official filtering and pagination]
F --> G[Catalog pages and installation references]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +593, Tests +685, Docs +112, Other 0. Total +1390 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one shared Gateway discovery owner with explicit upstream search bounds, canonical identities, and unchanged detail and installation owners. Do we have a high-confidence way to reproduce the issue? Not applicable to the feature request; the recorded real Gateway RPC traces demonstrate the added discovery behavior after the fix. Is this the best way to solve the issue? Yes. Extending the existing shared discovery owner avoids client-specific registry integrations and preserves current installation and approval contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3117493fe6ab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Preserve the existing Gateway method order and append the catalog browse and keyword-search methods. Retain both branches and the original contributor history. Co-authored-by: jacobtomlinson <[email protected]>
Co-authored-by: jacobtomlinson <[email protected]>
The incorporated main has 73 schema owners; adding the catalog owner yields 74. Preserve the existing registry identity and uniqueness guards. Co-authored-by: jacobtomlinson <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…penclaw#163459) * feat: browse and search ClawHub plugins and skills through Gateway * fix: verify trending skill identity before using official metadata * fix: register catalog protocol owner in inventory guard * test: align inherited channel and inspection expectations * test: pin Gateway storage in composed worker fixtures * test: document catalog inventory isolation Co-authored-by: jacobtomlinson <[email protected]> * fix: account for catalog protocol owner after main integration The incorporated main has 73 schema owners; adding the catalog owner yields 74. Preserve the existing registry identity and uniqueness guards. Co-authored-by: jacobtomlinson <[email protected]> --------- Co-authored-by: jacobtomlinson <[email protected]>
Keep one path for channel configuration forwarding, Google thinking preparation, status projections and rendering, and voice digest settlement. Remove speculative catalog, transport, and lifecycle coordination while preserving security-effect authority and ordinary durable settlement. Best-effort tradeoffs accepted: - Replacing the process-default AI host mid-session leaves old runtime-local caches for global cleanup or bounded expiry. #158901 tested replacement synthetically; explicit runtime owners and stream authority remain. - A throwing synchronous custom-API registrar fails setup instead of requeuing a partial drain. #111669 supports initialization ordering, not recovery from an arbitrary throwing registrar; restart after repairing it. - Reentrant toJSON cleanup can replace a continuation claim during serialization. #128848's synthetic callback is unlike provider JSON; the next turn can replay full history. Credential isolation and cache limits remain. - A concurrent channel rebind may miss its activity touch. #154672's forced incarnation swaps no longer trigger a retry protocol; routing still rereads. - An admitted CLI registry load may finish during shutdown. The work scope joins and disposes it; new command admission remains closed (#142388/#142838). - Unsupported writers during offline NOCOW copying are no longer detected by a second inventory/fuser/fingerprint scan. #160877/#161501 used synthetic interleavings; initial exclusivity, integrity, atomic exchange, and retained originals still protect normal maintenance and recovery. - Remote keyword listings changing between pages may repeat or skip entries, rather than reject the cursor (#163459). Request binding and limits remain. - A missing subscription acknowledgment can leave stale observation until a fresh subscription or reconnect, without compensating requests. #126760 and #159564 forced ACK loss; server authorization and acknowledged leases remain. - A retained thinking callback may reject during plugin reload until the catalog refreshes or the caller retries. #162470 used forced retirement; the plugin instance continues to reject revoked execution. Use the existing compiled CLI fixture for native-resource lifetime proof so cold source transformation occurs before its unchanged runtime deadline. No schema, dependency, protocol shape, or permission change.
* refactor(ui): consolidate page state and refresh bookkeeping * refactor: simplify transient plugin and client bookkeeping Keep one path for channel configuration forwarding, Google thinking preparation, status projections and rendering, and voice digest settlement. Remove speculative catalog, transport, and lifecycle coordination while preserving security-effect authority and ordinary durable settlement. Best-effort tradeoffs accepted: - Replacing the process-default AI host mid-session leaves old runtime-local caches for global cleanup or bounded expiry. #158901 tested replacement synthetically; explicit runtime owners and stream authority remain. - A throwing synchronous custom-API registrar fails setup instead of requeuing a partial drain. #111669 supports initialization ordering, not recovery from an arbitrary throwing registrar; restart after repairing it. - Reentrant toJSON cleanup can replace a continuation claim during serialization. #128848's synthetic callback is unlike provider JSON; the next turn can replay full history. Credential isolation and cache limits remain. - A concurrent channel rebind may miss its activity touch. #154672's forced incarnation swaps no longer trigger a retry protocol; routing still rereads. - An admitted CLI registry load may finish during shutdown. The work scope joins and disposes it; new command admission remains closed (#142388/#142838). - Unsupported writers during offline NOCOW copying are no longer detected by a second inventory/fuser/fingerprint scan. #160877/#161501 used synthetic interleavings; initial exclusivity, integrity, atomic exchange, and retained originals still protect normal maintenance and recovery. - Remote keyword listings changing between pages may repeat or skip entries, rather than reject the cursor (#163459). Request binding and limits remain. - A missing subscription acknowledgment can leave stale observation until a fresh subscription or reconnect, without compensating requests. #126760 and #159564 forced ACK loss; server authorization and acknowledged leases remain. - A retained thinking callback may reject during plugin reload until the catalog refreshes or the caller retries. #162470 used forced retirement; the plugin instance continues to reject revoked execution. Use the existing compiled CLI fixture for native-resource lifetime proof so cold source transformation occurs before its unchanged runtime deadline. No schema, dependency, protocol shape, or permission change. * fix: preserve runtime cleanup error cause Keep the existing aggregate errors and message while attaching the caught error as the standard cause. No signature or import graph changes. * refactor(ui): finish subscription compensation cutover * test: retire obsolete subscription recovery expectations * fix(ui): guard legacy group import at the write boundary
…169375) * refactor(ui): consolidate page state and refresh bookkeeping * refactor: simplify transient plugin and client bookkeeping Keep one path for channel configuration forwarding, Google thinking preparation, status projections and rendering, and voice digest settlement. Remove speculative catalog, transport, and lifecycle coordination while preserving security-effect authority and ordinary durable settlement. Best-effort tradeoffs accepted: - Replacing the process-default AI host mid-session leaves old runtime-local caches for global cleanup or bounded expiry. openclaw#158901 tested replacement synthetically; explicit runtime owners and stream authority remain. - A throwing synchronous custom-API registrar fails setup instead of requeuing a partial drain. openclaw#111669 supports initialization ordering, not recovery from an arbitrary throwing registrar; restart after repairing it. - Reentrant toJSON cleanup can replace a continuation claim during serialization. openclaw#128848's synthetic callback is unlike provider JSON; the next turn can replay full history. Credential isolation and cache limits remain. - A concurrent channel rebind may miss its activity touch. openclaw#154672's forced incarnation swaps no longer trigger a retry protocol; routing still rereads. - An admitted CLI registry load may finish during shutdown. The work scope joins and disposes it; new command admission remains closed (openclaw#142388/openclaw#142838). - Unsupported writers during offline NOCOW copying are no longer detected by a second inventory/fuser/fingerprint scan. openclaw#160877/openclaw#161501 used synthetic interleavings; initial exclusivity, integrity, atomic exchange, and retained originals still protect normal maintenance and recovery. - Remote keyword listings changing between pages may repeat or skip entries, rather than reject the cursor (openclaw#163459). Request binding and limits remain. - A missing subscription acknowledgment can leave stale observation until a fresh subscription or reconnect, without compensating requests. openclaw#126760 and openclaw#159564 forced ACK loss; server authorization and acknowledged leases remain. - A retained thinking callback may reject during plugin reload until the catalog refreshes or the caller retries. openclaw#162470 used forced retirement; the plugin instance continues to reject revoked execution. Use the existing compiled CLI fixture for native-resource lifetime proof so cold source transformation occurs before its unchanged runtime deadline. No schema, dependency, protocol shape, or permission change. * fix: preserve runtime cleanup error cause Keep the existing aggregate errors and message while attaching the caught error as the standard cause. No signature or import graph changes. * refactor(ui): finish subscription compensation cutover * test: retire obsolete subscription recovery expectations * fix(ui): guard legacy group import at the write boundary
Closes #163401
What Problem This Solves
Native clients need one Gateway contract to browse and search ClawHub plugins and standalone skills, including official suggestions from client-supplied keywords.
User Impact
Clients can use
catalog.browseandcatalog.searchKeywordsto retrieve listings, source-qualified installation references, and existing installation facts for the selected agent. Existing plugin/skill RPCs and installers remain available.These are additive RPC schemas, not persisted data schemas. No database, stored config, storage format, retention, or migration changed. Skill search declarations remain re-exported at their existing public path, with optional official status; existing protocol and legacy RPC tests passed.
Search is bounded by ClawHub's upstream limits: up to 100 candidates per keyword and kind. Bulk pagination preserves the entire fetched union; it cannot make upstream search exhaustive. Native skill catalog pages are complete and cursor-based. External sources appear in trending but lack a separate listing-level official flag, so they cannot qualify for official-only results. Bulk continuation repeats the searches and asks clients to restart if the matching identities change.
Why This Change Was Made
The existing catalog owner now shares filtering, result projection, and bulk union pagination across both kinds. Each keyword remains a separate query, and official-only results require the listing flag rather than publisher badges or bundled provenance. Skill installation joins reuse the selected workspace's status reader and tracked registry/publisher/source identity.
The new methods have request/result schemas, read scopes, method discovery, and documented failure, feed, cursor, and identity contracts. Trending enrichment checks the returned family, slug, and publisher before using its official flag, because the upstream package-detail route can resolve a same-named plugin first. Mismatches leave official status unknown. Listing detail enrichment remains the sibling workstream.
Evidence
git diff --checkpassed. The correction also passed the full affected check plan, including all core test type graphs, native schema-version and database-first guards.pnpm buildpassed for the initial implementation, including native protocol generation, runtime/declaration builds, SDK checks, and UI assets; the supported CLI wrapper rebuilt the corrected runtime in 39.2s before live Gateway proof.steipete/weatherlisting from official-only search despite its publisher being official.pnpm openclaw gateway callcommands exercised the actual WebSocket RPCs against an isolated loopback Gateway and real ClawHub transport, using a syntheticcatalog-proofagent/workspace. Native skill catalog, official plugin catalog, skill trending, and the["browser", "search"]keyword union all returned successful pages without registry errors. Skill and bulk continuation both returned two further distinct identities. The task-owned Gateway shut down cleanly; operator state was untouched.pnpm test src/gateway/server-methods/catalog.test.ts --maxWorkers=1— 16 passed, runner wall 9.72s (registered lazy dispatch and worker preparation included);pnpm test src/infra/clawhub-skills.test.ts --maxWorkers=1— 32 passed, runner wall 1.94s. CI test timings are unavailable because draft CI skipped the test jobs.The initial verification hit compiler snapshot guards when source/package outputs changed during compilation. Holding inputs stable and completing the build before final tests resolved those tooling collisions; no guard was relaxed.
Sanitized after-fix Gateway observations (October 2, 2026)
Landing integration
Resolved conflicts with main
259033fe973in method registration, registration tests, and the shared catalog discovery owner. Retained the ClawHub details API and existing MCP method order, then appended the catalog methods. Candidate7cdd1ed6951passes 7 focused files / 180 tests covering discovery joins, registered catalog and plugin handlers, existing skill search/detail, adapters, and method registration (shards: 20.36s, 25.96s, 6.82s). Previous full build and live Gateway proof remain valid for unchanged behavior.Fresh independent review raised one installed-skill identity concern. Rejected with source evidence:
src/skills/lifecycle/clawhub-store.tsonly acceptsrequestedReferencefor source-qualified external skills; native references do not populate it, and origin normalization rejects it for native skills.clawhub-status.tsrequires matching origin/lock provenance before reporting a valid link. No actionable finding remains.The committed candidate incorporated main
918153ea3355to resolve an actual test-type-check failure already fixed by main's asynchronous SessionManager update. All 27 core test type graphs pass. Earlier manual checks accidentally ran after a native checkout moved to main; those are not cited as PR proof. The unaffected catalog build and live proof above remain prior-head evidence.CI exposed two inherited stale expectations. The channel CLI test now checks the production connection-error wording, while preserving config-only and authentication behavior. The plugin validator fixture now accepts omitted review tokens only for an uninstalled remote listing with partial surface discovery; empty tokens and missing contracts remain rejected. Both assertions failed before correction and all 35 cases pass afterward. Fresh independent review found no actionable issue. Single-file runner costs: channel command flow 2.60s (10 cases), protocol plugin validators 2.09s (25 cases).
CI run 37024270209 also failed eight worker cancellation cases before inference began: repeated initial transcript-commit reconnects, one lifecycle start, and zero provider calls. Bounded local reproduction passed the eight cases on main and the original four-file predecessor composition on both main and candidate
080cbe5caf5(40 cases each; candidate runner 57.95s with CI concurrency). These passes do not establish a fix or prove the failure unrelated. No safe owning repair was established; the failure and reproduction gap remain recorded, and normal CI gates remain enforced.Main
1f14ba2cbe2repaired the inherited environment-name guard: it removed the non-environment constant from the count and applied the owner-approved 477 budget. After resolving the actual validator-test conflict with main6c8c06fec37, this candidate inherits that fix and passes the 477/477 guard; this PR introduces no environment names or guard exceptions. The validator conflict retains main's stronger tokenless-catalog coverage unchanged.The additional security-sensitive guard is informational for this maintainer PR. Inspected the exact permission-table delta: only
catalog.browseandcatalog.searchKeywordsare appended with existingoperator.readauthority. Both use standard authenticated pre-dispatch authorization, strict parameter validation, and the existing selected-agent workspace resolver. Existing authentication, permission, pairing, and revocation rules are unchanged. Exact-head ClawSweeper reports no security findings.CI found the catalog schema owner missing from the protocol inventory guard. Fixed the declared inventory count from 72 to 73 at
778867cb352, following previous owner-list additions; no guard was removed.pnpm protocol:checknow passes registry identity/uniqueness/order checks, schema generation, Swift and Kotlin contract/determinism checks, and method-vintage checks. Fresh independent delta review is scoped-clean with no findings.Final published head
9e594b2e3b87cc90ca0fcdb31abadc281f400b14: the complete changed-check plan against incorporated main6c8c06fec37passes (core/scripts and all 27 test type graphs, changed lint/format, dead export scan, and required guards). Four focused test files pass 83 cases in 36.71s. Fresh ClawSweeper reports no actionable code or security findings; the separate Security Review run 37028362720 passed this exact head.Pre-fix CI run 37028366914, job 110909166689 repeats the eight worker startup failures. This is now reproducible locally with the CI runtime environment, including a single case without predecessor files. The failure was reproduced under the CI runtime environment and traced to the fixture simulating Gateway and worker in one process. Worker startup changes process.env.OPENCLAW_STATE_DIR; Gateway transcript commit then binds to the worker namespace, and the existing shared-state identity guard correctly rejects it. The fixture now captures Gateway storage once per harness instance and binds commit targets to that environment, preserving it across service restarts. Production storage owners and integrity guards remain unchanged. The original case failed before repair and passes afterward; all 37 cancellation/recovery/restart/cleanup and preceding CLI cases pass under CI settings (34.75s runner). Single-file cost: pnpm test src/worker/worker.chat-abort.test.ts --maxWorkers=1 with CI settings, 8 passed, runner24.99s, Vitest19.77s. No new test cases were added. Fresh independent fixture review is scoped-clean; targeted test type graph, lint, formatting, line-cap and environment ratchets pass. Final fix head00877457491 is published for fresh required CI/review; earlier failed runs remain failed evidence, not current passing CI.
Prior-head CI failure — October 2, 2026
Head
00877457491063feae29b7436ff4f2749103c468completed CI run 37030718700 with one failing native macOS test:GatewayInstallerViewTests.offline errors offer an actionable recovery, beta-version parameter. Its self-applicationAXWindowsrequest returnedattributeUnsupported(-25205) atAppKitTestSupport.swift:68, before button traversal or recovery actions. The other 2,471 native tests passed; the required CI gate remains failed. Catalog checks, ClawSweeper, and the additional Security Review passed. That auto-merge request was disabled on October 5 before repairing the branch; no failed check was waived.This is an observed test-fixture setup failure; no owning repair or independent same-failure main reproduction has been established. Current hourly main run 37027847475 passed
macos-swift (tests); its separate packages failure is a different fixture. Further diagnosis requires a disposable macOS runner or VM. No macOS check is claimed as passing for this PR, and no retry or guard waiver was applied.The confirmed worker/channel main repair landed as
d20ba7392c1de16a0eb9dab79336ade5ebf996a3after clean focused proof, ClawSweeper review, and CI. The separately reproduced CLI invalid-config diagnostic repair is in PR #163650. Neither establishes a repair for the macOS setup failure.Landing integration — October 5, 2026
Published candidate
5deaf45321b0adcd9c8bfd06e2cde6b484bcd0b1incorporates main023776762431a39e7aa19d7e1a8d066ee10dd532without rewriting contributor history. The two conflicting files now retain all existing Gateway method indices and append the catalog methods; mirrored method-inventory assertions follow the same order. Earlier worker, channel, and protocol-inventory repairs already present on main drop out of the effective feature diff. The follow-up changes document why the registered-handler tests isolate real inventory and reconcile the protocol inventory: main has 73 owners, and the catalog owner makes 74. The 73-owner assertion failed before this correction; uniqueness, identity, ordering, and export guards remain enforced.node scripts/run-vitest.mjs src/gateway/server-methods/catalog.test.ts src/infra/clawhub-skills.test.ts src/gateway/server-methods-list.test.ts src/plugins/catalog-discovery.test.ts: 4 files, 111 tests passed on integration930475edaec0b8f892ba2f4d5164e97441371345; 55.21s runner time, including cold worker compilation. Subsequent changes are two test comments and the protocol-check inventory literal, not runtime behavior.023776762431a39e7aa19d7e1a8d066ee10dd532reproduces every finding exactly; those modules are unchanged by this PR.pnpm buildpassed oncee5bf3ca890e2e347a1d8fa82d36091f296f599in 7m 19.9s, including runtime/declaration output, all 151 public SDK subpaths, and UI assets. Changed-file lint passed with 0 warnings/errors; import cycles, native state-schema, database-first, media/sidecar, webhook, and pairing guards passed. After the inventory correction,pnpm protocol:checkpassed schema generation, Swift/Kotlin contract and determinism checks, and method vintage checks. The final guard-literal-only commit does not change runtime or declaration source.The prior macOS failure is independently corroborated by CI run
37194099442, job111412437513, native log artifact11300179343: the same beta-version fixture fails at the sameAXWindowsquery with-25205. In this PR, run37030718700actually tested merge3b7ecaa4db25de2d432f8181412ee689db346d3fagainst main3c5010ebfacd96e6b4836c9080e58ab42c1ac7ab; artifact11237726531contains the full failure. The helper and installer fixture match the baseline, and the query fails before button traversal, callbacks, Gateway RPCs, or catalog execution. No precise AppKit lifecycle repair is claimed, and no macOS passing result is inferred from Linux proof.