perf(mcp)!: compact repeated session discovery facts (#1988)

Group repeated session tool availability and provider capability facts, preserve complete named contracts and ordered limitations, and remove duplicate catalog descriptors. Update consumers and migration guidance.

Validated by all 31 CI jobs, focused source checks, and actual Claude Code/Linux Hopper/native Windows Ghidra small-target workflows on the current integration tree.

Refs #723.

BREAKING CHANGE: binary_session no longer includes server_identity.catalog.tools; tool_availability and provider capabilities use grouped facts documented in docs/mcp-contracts.md.

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
Ysopwnable
2026-10-12 07:40:19 +08:00
committed by GitHub
co-authored by Kaoru0822
parent 1f17ac8228
commit 6395e8d300
30 changed files with 1449 additions and 289 deletions
@@ -597,10 +597,19 @@ describe("provider health and availability", () => {
expect(session.status()).toMatchObject({
capabilities: expect.arrayContaining([
expect.objectContaining({
operation: "address_name",
available: false,
reason:
"ProviderAdapterError: Provider fixture adapter failed during address_name",
provider: {
id: "fixture",
name: "Fixture analysis provider",
version: "1",
},
groups: expect.arrayContaining([
expect.objectContaining({
operations: expect.arrayContaining(["address_name"]),
available: false,
reason:
"ProviderAdapterError: Provider fixture adapter failed during address_name",
}),
]),
}),
]),
});
@@ -609,9 +618,18 @@ describe("provider health and availability", () => {
expect(session.status()).toMatchObject({
capabilities: expect.arrayContaining([
expect.objectContaining({
operation: "address_name",
available: true,
reason: null,
provider: {
id: "fixture",
name: "Fixture analysis provider",
version: "1",
},
groups: expect.arrayContaining([
expect.objectContaining({
operations: expect.arrayContaining(["address_name"]),
available: true,
reason: null,
}),
]),
}),
]),
});
@@ -657,9 +675,18 @@ describe("provider health and availability", () => {
expect(session.status()).toMatchObject({
capabilities: expect.arrayContaining([
expect.objectContaining({
operation: "address_name",
available: true,
reason: null,
provider: {
id: "fixture",
name: "Fixture analysis provider",
version: "1",
},
groups: expect.arrayContaining([
expect.objectContaining({
operations: expect.arrayContaining(["address_name"]),
available: true,
reason: null,
}),
]),
}),
]),
});