@@ -15,6 +15,7 @@ import {
1515 MANAGED_RUNTIME_CORRELATION_EXAMPLE ,
1616} from "./managedWorkflowExamples.js" ;
1717import { toolContractMetadata } from "./toolEffects.js" ;
18+ import { requireOutputSchema } from "./toolOutputSchemaPrimitives.js" ;
1819
1920const evidenceIdSchema = z . string ( ) . regex ( / ^ e v _ [ a - f 0 - 9 ] { 64 } $ / u) ;
2021const managedEvidenceIdSchema = evidenceIdSchema . describe (
@@ -137,36 +138,26 @@ export const managedApplicationGraphReferenceInputSchema = z
137138 } ) ;
138139 } ) ;
139140
140- const comparisonOutputSchema =
141- managedWorkflowOutputSchemas . compare_managed_members ;
142- if ( comparisonOutputSchema === undefined )
143- throw new Error (
144- "Missing managed workflow output schema for compare_managed_members" ,
145- ) ;
146- const runtimeOutputSchema =
147- managedWorkflowOutputSchemas . plan_managed_runtime_correlation ;
148- if ( runtimeOutputSchema === undefined )
149- throw new Error (
150- "Missing managed workflow output schema for plan_managed_runtime_correlation" ,
151- ) ;
152- const reconstructionOutputSchema =
153- managedWorkflowOutputSchemas . import_managed_reconstruction ;
154- if ( reconstructionOutputSchema === undefined )
155- throw new Error (
156- "Missing managed workflow output schema for import_managed_reconstruction" ,
157- ) ;
158- const nativeVerificationOutputSchema =
159- managedWorkflowOutputSchemas . verify_managed_native_boundaries ;
160- if ( nativeVerificationOutputSchema === undefined )
161- throw new Error (
162- "Missing managed workflow output schema for verify_managed_native_boundaries" ,
163- ) ;
164- const managedApplicationGraphOutputSchema =
165- managedWorkflowOutputSchemas . project_managed_application_graph ;
166- if ( managedApplicationGraphOutputSchema === undefined )
167- throw new Error (
168- "Missing managed workflow output schema for project_managed_application_graph" ,
169- ) ;
141+ const comparisonOutputSchema = requireOutputSchema (
142+ managedWorkflowOutputSchemas ,
143+ "compare_managed_members" ,
144+ ) ;
145+ const runtimeOutputSchema = requireOutputSchema (
146+ managedWorkflowOutputSchemas ,
147+ "plan_managed_runtime_correlation" ,
148+ ) ;
149+ const reconstructionOutputSchema = requireOutputSchema (
150+ managedWorkflowOutputSchemas ,
151+ "import_managed_reconstruction" ,
152+ ) ;
153+ const nativeVerificationOutputSchema = requireOutputSchema (
154+ managedWorkflowOutputSchemas ,
155+ "verify_managed_native_boundaries" ,
156+ ) ;
157+ const managedApplicationGraphOutputSchema = requireOutputSchema (
158+ managedWorkflowOutputSchemas ,
159+ "project_managed_application_graph" ,
160+ ) ;
170161
171162/** Provider-neutral managed-code workflow contracts. */
172163export const MANAGED_WORKFLOW_TOOL_CONTRACTS = [
0 commit comments