mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 19:53:50 +00:00
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
36 lines
1.1 KiB
TypeScript
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[];
|