feat(operations): add audited runtime catalog

This commit is contained in:
chick
2026-07-17 09:07:50 +08:00
parent 243565a75e
commit 8018b36adf
15 changed files with 1617 additions and 21 deletions
+28 -1
View File
@@ -1,3 +1,5 @@
import { listOperations as listRuntimeOperations } from './runtime-registry.ts';
export {
OperationRegistry,
RuntimeRegistryError,
@@ -6,4 +8,29 @@ export {
requireExecutableOperation,
requireOperation,
} from './runtime-registry.ts';
export type { RuntimeOperationDescriptor, RuntimeRegistryErrorCode } from './runtime-registry.ts';
export type { RuntimeRegistryErrorCode } from './runtime-registry.ts';
export { operationMetadata58e2204 } from './catalog-metadata-58e2204.ts';
export type { OperationCatalogMetadata } from './catalog-metadata-58e2204.ts';
/** Small public catalog row shape avoids exporting the 117-member internal descriptor union. */
export interface PublicOperationCatalogRow {
readonly operationId: string;
readonly title: string;
readonly riskLevel: 'R0' | 'R1' | 'R2' | 'R3';
readonly capability: string;
readonly batchable: boolean;
readonly parameterSchemaId: string;
}
export const listPublicOperationCatalog = (): readonly PublicOperationCatalogRow[] =>
listRuntimeOperations().map(
({ operationId, title, riskLevel, capability, batchable, parameterSchemaId }) =>
Object.freeze<PublicOperationCatalogRow>({
operationId,
title,
riskLevel,
capability,
batchable,
parameterSchemaId,
}),
);