refactor: return complete tool results inline
This commit is contained in:
@@ -38,56 +38,6 @@ const promptCatalog = PROMPT_CONTRACTS.map((contract) => ({
|
||||
steps: contract.steps,
|
||||
})).sort((left, right) => left.name.localeCompare(right.name));
|
||||
|
||||
/** Canonical fixed resources exposed by every target-free MCP session. */
|
||||
export const MCP_RESOURCE_CATALOG = [
|
||||
{ name: "server-identity", uri: "rea://server/identity" },
|
||||
{ name: "analysis-snapshot", uri: "rea://snapshot/current" },
|
||||
] as const;
|
||||
/** Canonical resource templates exposed by every target-free MCP session. */
|
||||
export const MCP_RESOURCE_TEMPLATE_CATALOG = [
|
||||
{ name: "session-evidence", uri_template: "rea://evidence/{evidenceId}" },
|
||||
{
|
||||
name: "evidence-section",
|
||||
uri_template: "rea://evidence/{evidenceId}/section/{section}",
|
||||
},
|
||||
{ name: "residual-unknown", uri_template: "rea://unknown/{unknownId}" },
|
||||
{
|
||||
name: "evidence-bundle",
|
||||
uri_template: "rea://evidence-bundle/{bundleDigest}",
|
||||
},
|
||||
{
|
||||
name: "artifact-page",
|
||||
uri_template: "rea://artifact/{manifestId}/{collection}",
|
||||
},
|
||||
{
|
||||
name: "function-dossier",
|
||||
uri_template: "rea://function/{targetSha256}/{address}",
|
||||
},
|
||||
{
|
||||
name: "investigation-workspace-revision",
|
||||
uri_template: "rea://workspace/{workspaceId}/revision/{revision}",
|
||||
},
|
||||
{
|
||||
name: "reconstruction-coverage-revision",
|
||||
uri_template:
|
||||
"rea://reconstruction-coverage/{workspaceId}/revision/{revision}",
|
||||
},
|
||||
{
|
||||
name: "reconstruction-obligation-ledger-page",
|
||||
uri_template:
|
||||
"rea://evidence/{evidenceId}/reconstruction-obligation-ledger",
|
||||
},
|
||||
{
|
||||
name: "reconstruction-readiness-report",
|
||||
uri_template: "rea://evidence/{evidenceId}/reconstruction-readiness-report",
|
||||
},
|
||||
{
|
||||
name: "javascript-application-graph-page",
|
||||
uri_template:
|
||||
"rea://evidence/{evidenceId}/application-graph/{collection}/offset/{offset}/limit/{limit}",
|
||||
},
|
||||
] as const;
|
||||
|
||||
const digest = (value: unknown): string => {
|
||||
const encoded = canonicalize(value);
|
||||
if (encoded === undefined)
|
||||
@@ -101,22 +51,14 @@ export const CATALOG_IDENTITY = {
|
||||
cli_commands: CLI_COMMAND_NAMES.length,
|
||||
mcp_tools: toolCatalog.length,
|
||||
mcp_prompts: promptCatalog.length,
|
||||
mcp_resources: MCP_RESOURCE_CATALOG.length,
|
||||
mcp_resource_templates: MCP_RESOURCE_TEMPLATE_CATALOG.length,
|
||||
},
|
||||
digests: {
|
||||
tools_sha256: digest(toolCatalog),
|
||||
prompts_sha256: digest(promptCatalog),
|
||||
resources_sha256: digest({
|
||||
resourceCatalog: MCP_RESOURCE_CATALOG,
|
||||
resourceTemplateCatalog: MCP_RESOURCE_TEMPLATE_CATALOG,
|
||||
}),
|
||||
combined_sha256: digest({
|
||||
cli: CLI_COMMAND_NAMES,
|
||||
tools: toolCatalog,
|
||||
prompts: promptCatalog,
|
||||
resources: MCP_RESOURCE_CATALOG,
|
||||
resource_templates: MCP_RESOURCE_TEMPLATE_CATALOG,
|
||||
}),
|
||||
},
|
||||
tools: toolCatalog.map(({ name, surface, effects, annotations }) => ({
|
||||
|
||||
Reference in New Issue
Block a user