Repository navigation
refactor(plugins): derive catalog types from the Gateway protocol - #140205
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. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 11:24 AM ET / 15:24 UTC. ClawSweeper reviewWhat this changesReplace 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -20. Total -20 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
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:changedpassed, including production/test typechecks, typed lint, dead-export scans, and architecture/storage guards.