Skip to content

refactor(bindings): prune unused well-known bindings - #4997

Merged
pedrofrxncx merged 1 commit into
mainfrom
refactor/prune-unused-well-known-bindings-w4
Jul 22, 2026
Merged

pedrofrxncx merged 1 commit into
mainfrom
refactor/prune-unused-well-known-bindings-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Follows #4468 (WI-4, called out in the issue's own scoping comment as "the safest standalone first PR"): prunes dead code from packages/bindings/src/well-known/.

Payoff: removes ~166 lines of unreferenced binding machinery so the package only exposes what MCPs actually implement, and closes the gap between the issue's own evidence and the current state of the code (it flagged prompt.ts/registry.ts as unused, which needed re-verifying since some of that evidence had drifted).

What changed and why it's behavior-preserving:

  • Deleted packages/bindings/src/well-known/registry.ts outright (REGISTRY_APP_BINDING, MCPRegistryServerSchema, RegistryAppCollectionEntity) — confirmed via repo-wide rg that nothing outside this file and its index.ts re-export references any of these symbols, and the file isn't even exposed via a package.json subpath export (no "./registry" entry), so it was unreachable from outside the package already. Removed the corresponding re-export block from index.ts.
  • Trimmed packages/bindings/src/well-known/prompt.ts: removed PROMPTS_BINDING/PROMPTS_COLLECTION_BINDING (zero references anywhere, and not re-exported from index.ts), plus the now-unused Binder type import and createCollectionBindings import. Kept PromptSchema and its sub-schemas (PromptArgumentSchema, PromptIconSchema, PromptMessageSchema, PromptMessageContentSchema) — these ARE used, by apps/mesh/src/web/components/details/prompt/index.tsx via the @decocms/bindings/prompt subpath import, so deleting the whole file (as the issue's evidence table implied) would have broken that consumer.

Command a reviewer runs to confirm:

rg -n "PROMPTS_BINDING|PROMPTS_COLLECTION_BINDING|REGISTRY_APP_BINDING|MCPRegistryServerSchema|RegistryAppCollectionEntity" .

should return nothing.

Verification run locally:

  • bun run fmt — clean, no changes needed.
  • cd packages/bindings && bunx tsc --noEmit — passes.
  • cd apps/mesh && bunx tsc --noEmit — passes (this is the one consumer of the touched package's public surface).

Full CI (bun run check, bun run lint, bun test) validates the rest.


Summary by cubic

Pruned unused well-known bindings to reduce dead code (~166 lines) and align the package with what MCPs actually implement. Keeps PromptSchema for the @decocms/bindings/prompt consumer; no behavior changes. Addresses WI-4.

  • Refactors
    • Deleted well-known/registry.ts and removed its re-exports from index.ts (unused and not publicly exported).
    • Removed PROMPTS_BINDING and PROMPTS_COLLECTION_BINDING from well-known/prompt.ts; retained PromptSchema and related schemas used by @decocms/bindings/prompt.

Written for commit 805081c. Summary will update on new commits.

Review in cubic

Follows #4468 (WI-4): REGISTRY_APP_BINDING/MCPRegistryServerSchema
(well-known/registry.ts) and PROMPTS_BINDING/PROMPTS_COLLECTION_BINDING
(well-known/prompt.ts) have zero consumers outside the bindings package
itself - confirmed via repo-wide grep. The real registry catalog feature
uses apps/mesh/src/registry-catalog/, not this binding.

registry.ts is deleted outright (no external references at all, and it
wasn't even exposed via a package.json subpath export). prompt.ts keeps
PromptSchema and its sub-schemas, which are genuinely used by
apps/mesh/src/web/components/details/prompt/index.tsx via the
@decocms/bindings/prompt subpath - only the dead Binder/collection-CRUD
wrapper around it is removed.
@pedrofrxncx
pedrofrxncx merged commit b9a0509 into main Jul 22, 2026
15 checks passed
@pedrofrxncx
pedrofrxncx deleted the refactor/prune-unused-well-known-bindings-w4 branch July 22, 2026 11:16
decocms Bot pushed a commit that referenced this pull request Jul 22, 2026
PR: #4997 refactor(bindings): prune unused well-known bindings
Bump type: patch

- @decocms/bindings (packages/bindings/package.json): 1.4.11 -> 1.4.12

Deploy-Scope: both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant