mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 13:26:10 +00:00
Bind typed service creation, observed availability and retryable cleanup in one composition owner. Reuse selected CLI/MCP factories and canonical contract groups without copying provider operation inventories. Closes #8429. Refs #740. Validated paired real application workflows, actual local Codex CLI Terra/high use, complete Evidence and Unknown checkpoint parity, compiler-backed import boundaries, SDK schemas and final real mixed routing. Automated review findings were fixed at their producing owners. Existing exact-base CodeQL alerts are documented on the PR under the owner-authorized unrelated-check exception; no global alerts or security rules were changed. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
interface ProviderBinding {
|
|
readonly identity: {
|
|
readonly id: string;
|
|
readonly name: string;
|
|
readonly version: string | null;
|
|
};
|
|
readonly operations: readonly string[] | { readonly group: string };
|
|
}
|
|
|
|
interface ProviderCatalogSources {
|
|
readonly toolContracts: {
|
|
readonly TOOL_CONTRACTS: readonly { readonly name: string }[];
|
|
};
|
|
readonly toolFamilies: {
|
|
readonly TOOL_CONTRACT_GROUPS: Readonly<
|
|
Record<string, readonly { readonly name: string }[]>
|
|
>;
|
|
};
|
|
readonly capabilityDeclarations: {
|
|
readonly CAPABILITY_DECLARATIONS: Readonly<
|
|
Record<string, { readonly providers: readonly ProviderBinding[] }>
|
|
>;
|
|
};
|
|
}
|
|
|
|
export function providerCatalog(sources: ProviderCatalogSources): {
|
|
readonly id: string;
|
|
readonly name: string;
|
|
readonly version: string | null;
|
|
readonly capabilities: readonly string[];
|
|
}[];
|
|
|
|
export function toolFamilyCatalog(sources: {
|
|
readonly toolFamilies: {
|
|
readonly TOOL_FAMILY_DEFINITIONS: readonly {
|
|
readonly id: string;
|
|
readonly surface: string;
|
|
readonly contracts: readonly { readonly name: string }[];
|
|
}[];
|
|
};
|
|
readonly toolContracts: {
|
|
readonly TOOL_CONTRACTS: readonly unknown[];
|
|
};
|
|
readonly catalogIdentity: {
|
|
readonly FULL_CATALOG_IDENTITY: {
|
|
readonly counts: { readonly mcp_tools: number };
|
|
};
|
|
};
|
|
}): {
|
|
readonly total: number;
|
|
readonly families: readonly {
|
|
readonly id: string;
|
|
readonly surface: string;
|
|
readonly count: number;
|
|
readonly tools: readonly string[];
|
|
}[];
|
|
};
|