Files
reverse-engineering-anything/scripts/lib/advertised-catalog-summary.d.mts
T
morluto b4cc1c998b test(mcp): record the advertised-schema summary per tool (#11192)
summary.json held every advertised pattern's site list and every tool's
schema digests in one file. Each new path-taking tool appended to the
shared path pattern's list, so concurrent tool PRs conflicted on it, and
updating it required a local build.

Each tool's digests and patterns now live in
scripts/verify/advertised-schemas/tools/<tool>.json. The check still prints
aggregated review lines such as "N tool schemas gained pattern /.../", and
on failure also prints the expected contents of each missing or stale file
so a PR can commit them from CI output without building. --update-summary
writes those files and deletes summaries of removed tools. The existing
summary was split into per-tool files from its recorded data.

Fixes #11189
2026-11-15 22:11:06 +08:00

36 lines
1.1 KiB
TypeScript

export interface ToolSummary {
/** A 16-hex digest of each advertised schema, keyed `<kind> <profile>`. */
readonly schemas: Readonly<Record<string, string>>;
/** Patterns each schema kind advertises, sorted; empty kinds are omitted. */
readonly patterns: Readonly<
Partial<Record<"input" | "output", readonly string[]>>
>;
}
export type CatalogSummary = Readonly<Record<string, ToolSummary>>;
export interface AdvertisedCatalog {
readonly profile: { readonly input: string; readonly output: string };
readonly tools: readonly {
readonly name: string;
readonly inputSchema?: unknown;
readonly outputSchema?: unknown;
}[];
}
export declare const summarizeAdvertisedCatalogs: (
catalogs: readonly AdvertisedCatalog[],
advertisedSchemaPatterns: (
schema: unknown,
) => readonly { readonly pattern: string }[],
) => CatalogSummary;
export declare const toolSummaryFile: (name: string) => string;
export declare const serializeToolSummary: (summary: ToolSummary) => string;
export declare const describeSummaryChanges: (
recorded: CatalogSummary,
current: CatalogSummary,
) => string[];