Skip to content

refactor(plugins): derive catalog types from the Gateway protocol - #140205

Merged
steipete merged 1 commit into
mainfrom
codex/plugin-catalog-protocol-types
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/plugin-catalog-protocol-types

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The plugin catalog maintained handwritten copies of the Gateway's catalog entry and list-result types. These copies could drift from the protocol returned by plugins.list.

Use the existing protocol types through type-only imports, preserving the catalog's exported names and every field. This independently extracted cleanup from #135599 removes 20 production lines; runtime behavior and protocol schemas are unchanged.

Validation: strict TypeScript structural equality checks match both former declarations to their canonical protocol types. The complete catalog module emits byte-identical JavaScript before and after the change. Independent Codex review found no actionable issues. Full check:changed passed, including production/test typechecks, typed lint, dead-export scans, and architecture/storage guards.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 15:18
@steipete steipete self-assigned this Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 11:24 AM ET / 15:24 UTC.

ClawSweeper review

What this changes

Replace handwritten plugin catalog types with existing Gateway protocol types while preserving exported names and runtime behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, bounded cleanup still absent from current main. The existing field contracts are preserved, and no actionable correctness or security defect was found.

Priority: P3
Reviewed head: 68badda9c6171b7a48f0b5014d6f6c7a49ec77a7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup with matching contracts, reported type and emission validation, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored change only consolidates types used by the inventory service; it introduces no runtime or authority change requiring real-flow proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored change only consolidates types used by the inventory service; it introduces no runtime or authority change requiring real-flow proof.
Evidence reviewed 8 items Introduced change preserves runtime code: The pinned merge-base-to-head diff replaces only two type declarations and adds a type-only import; executable statements and exported type names remain unchanged.
Canonical contracts match: The catalog schema preserves the same required fields, optional fields, state literals, and install-action alternatives; the list schema retains plugins, unknown-valued diagnostics, and mutationAllowed. The exported aliases derive from these schemas. This dependency is the same-repository Gateway protocol, with no Codex contract involved.
Production response boundary: plugins.list returns listManagedPlugins directly. The service already imports inspection types from the same protocol schema module, so this change follows the existing contract-sharing pattern.
Findings None None.
Security None None.

How this fits together

The plugin management service combines installed plugin metadata and the official catalog into inventory results. Gateway clients receive those results through plugins.list, whose protocol schemas define the shared data contract.

flowchart LR
  A[Installed plugin metadata] --> C[Plugin inventory service]
  B[Official plugin catalog] --> C
  D[Gateway protocol types] --> C
  C --> E[plugins.list response]
  E --> F[Gateway clients]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -20. Total -20 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 6 26 -20
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 26 -20

Review metrics

None.

Technical review

Best possible solution:

Keep the existing catalog exports as type-only aliases of the canonical protocol contracts.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR removes duplicated declarations rather than reporting an observed runtime failure.

Is this the best way to solve the issue?

Yes: reusing the existing protocol types is the narrowest maintainable solution, and the inspected schemas preserve the previous structural contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f5f1aaeb8027.

Labels

Label changes:

  • add P3: This type-only maintenance cleanup removes potential contract drift without changing user-visible behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored change only consolidates types used by the inventory service; it introduces no runtime or authority change requiring real-flow proof.

Label justifications:

  • P3: This type-only maintenance cleanup removes potential contract drift without changing user-visible behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored change only consolidates types used by the inventory service; it introduces no runtime or authority change requiring real-flow proof.

Evidence

What I checked:

  • Introduced change preserves runtime code: The pinned merge-base-to-head diff replaces only two type declarations and adds a type-only import; executable statements and exported type names remain unchanged. (src/plugins/management-catalog.ts:41, 68badda9c617)
  • Canonical contracts match: The catalog schema preserves the same required fields, optional fields, state literals, and install-action alternatives; the list schema retains plugins, unknown-valued diagnostics, and mutationAllowed. The exported aliases derive from these schemas. This dependency is the same-repository Gateway protocol, with no Codex contract involved. (packages/gateway-protocol/src/schema/plugins.ts:142, 68badda9c617)
  • Production response boundary: plugins.list returns listManagedPlugins directly. The service already imports inspection types from the same protocol schema module, so this change follows the existing contract-sharing pattern. (src/gateway/server-methods/plugins.ts:49, 68badda9c617)
  • Current-main necessity: Fetched main still contains the handwritten declarations; comparing the catalog and protocol files against the reviewed head shows only this PR's type consolidation. (src/plugins/management-catalog.ts:37, f5f1aaeb8027)
  • Latest release retains duplicate declarations: The supplied latest release, v2026.9.2, also contains the handwritten catalog entry and list-result declarations. (src/plugins/management-catalog.ts:37, 3928bad9badf)
  • Verified merge scope: Raw test-merge parent records match the pinned base followed by the exact PR head. Its comparison against that base changes only management-catalog.ts, so unrelated endpoint drift is not attributed to this PR. (src/plugins/management-catalog.ts:5, 67b445990b01)

Likely related people:

  • Peter Steinberger: Raw commit 17b0c43 adds src/plugins/management-catalog.ts:314 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 17b0c435dd5b; files: src/plugins/management-catalog.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 11f2ea2 into main Sep 6, 2026
246 checks passed
@steipete
steipete deleted the codex/plugin-catalog-protocol-types branch September 6, 2026 15:31
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant