Repository navigation
perf(mcp)!: compact repeated session discovery facts - #1988
Conversation
Keep catalog identity as exact counts and full-schema digests. Preserve all static tool facts and dynamic availability inline, and complete definitions through tools/list. Validate the result through the native Claude client. Use canonical contracts in published-package verification and require the complete tool set. Deduplicate shared missing navigation operations. Refs #723 BREAKING CHANGE: server_identity.catalog.tools is removed from binary_session and CLI capabilities/providers. MCP consumers should use tool_availability for names, surfaces, effects and annotations, and tools/list for full schemas. Co-authored-by: Kaoru0822 <[email protected]>
Group equal tool availability facts with explicit inherited client requirements. Group provider capability facts by exact provider identity and preserve ordered limitations as a shared prefix followed by each group's suffix. Keep canonical tools/list schemas and complete Evidence inline, and migrate shared verifiers and authored skill documentation to the new public representation. Refs: #723 BREAKING CHANGE: binary_session tool_availability is an inventory object with groups and explicit client_requirements; provider capabilities use provider sets with groups and shared_limitations across session and CLI projections. Co-authored-by: Kaoru0822 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff8f76b417
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| providers.set(key, { | ||
| identity: descriptor.provider, | ||
| descriptors: [descriptor], |
There was a problem hiding this comment.
Use the resolved provider identity in capability groups
When Ghidra or Hopper is selected, its capability descriptors still contain the static identity whose version is null, while profile resolution supplies a concrete version in analysis_provider_binding (and the selected candidate's outer provider). Grouping directly on descriptor.provider therefore emits top-level and selected-candidate capability sets under a stale identity, so consumers expanding the new representation lose known provider provenance or observe contradictory identities. Rebind selected-provider descriptors to the resolved profile identity before grouping them.
AGENTS.md reference: AGENTS.md:L17-L17
Useful? React with 👍 / 👎.
Match grouped capabilities within their exact provider identity when checking health failures, target-switch resets, and observer isolation. Preserve the operation-level reasons, availability, and dispatch counts. Co-authored-by: Kaoru0822 <[email protected]>
Resolved src/catalogIdentity.ts by keeping upstream's code-point name ordering (compareUnicodeCodePoints) inside this branch's exported createCatalogDigests, which still digests returns_target_content per tool. Upstream removed CATALOG_IDENTITY.tools (morluto#1988), so this branch's returns_target_content addition to that list is dropped together with the test assertion that read it; the digest coverage test remains. Resolved docs/mcp-contracts.md by taking upstream's reorganized guide and re-inserting the "Untrusted target content" section at the end of "Tool results". Nothing was superseded; upstream has no untrusted content marker or server instruction.
Session status repeats complete catalog descriptors and many identical tool/provider facts. Group those facts once while preserving every availability decision, effect, annotation, client requirement, provider identity, and ordered limitation. The complete Claude Code result drops from 179,054 to 41,074 UTF-8 bytes (77.06%) and stays inline.
Keep catalog counts and full-schema digests in session identity. Update named-contract consumers, verifiers, and migration guidance; complete tools/list schemas, Evidence, and text/structured parity remain validated.
BREAKING CHANGE: server_identity.catalog.tools is removed; tool_availability becomes {client_requirements, groups}; provider capabilities become {provider, shared_limitations, groups} sets. Migration examples are in docs/mcp-contracts.md.
Validation:
Refs #723. Broader discovery/schema and Evidence repetition work remains open.