agent-contracts 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,24 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ declare const SectionSchema: z.ZodObject<{
4
+ title: z.ZodString;
5
+ content: z.ZodOptional<z.ZodString>;
6
+ list: z.ZodOptional<z.ZodEnum<{
7
+ agents: "agents";
8
+ workflow: "workflow";
9
+ validations: "validations";
10
+ guardrails: "guardrails";
11
+ }>>;
12
+ }, z.core.$loose>;
13
+ type Section = z.infer<typeof SectionSchema>;
3
14
  declare const RuleSchema: z.ZodObject<{
4
15
  id: z.ZodString;
5
16
  name: z.ZodOptional<z.ZodString>;
6
17
  description: z.ZodString;
7
18
  severity: z.ZodEnum<{
19
+ optional: "optional";
8
20
  mandatory: "mandatory";
9
21
  recommended: "recommended";
10
- optional: "optional";
11
22
  }>;
12
23
  detection_method: z.ZodOptional<z.ZodString>;
13
24
  escalation: z.ZodOptional<z.ZodString>;
@@ -53,9 +64,9 @@ declare const AgentSchema: z.ZodObject<{
53
64
  name: z.ZodOptional<z.ZodString>;
54
65
  description: z.ZodString;
55
66
  severity: z.ZodEnum<{
67
+ optional: "optional";
56
68
  mandatory: "mandatory";
57
69
  recommended: "recommended";
58
- optional: "optional";
59
70
  }>;
60
71
  detection_method: z.ZodOptional<z.ZodString>;
61
72
  escalation: z.ZodOptional<z.ZodString>;
@@ -72,8 +83,14 @@ declare const AgentSchema: z.ZodObject<{
72
83
  }, z.core.$loose>>>;
73
84
  sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
85
  title: z.ZodString;
75
- content: z.ZodString;
76
- }, z.core.$strip>>>;
86
+ content: z.ZodOptional<z.ZodString>;
87
+ list: z.ZodOptional<z.ZodEnum<{
88
+ agents: "agents";
89
+ workflow: "workflow";
90
+ validations: "validations";
91
+ guardrails: "guardrails";
92
+ }>>;
93
+ }, z.core.$loose>>>;
77
94
  prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
95
  action: z.ZodEnum<{
79
96
  read: "read";
@@ -166,13 +183,13 @@ declare const BindingRenderTargetSchema: z.ZodObject<{
166
183
  template: z.ZodOptional<z.ZodString>;
167
184
  inline_template: z.ZodOptional<z.ZodString>;
168
185
  context: z.ZodEnum<{
186
+ workflow: "workflow";
169
187
  agent: "agent";
170
188
  task: "task";
171
189
  artifact: "artifact";
172
190
  tool: "tool";
173
191
  validation: "validation";
174
192
  handoff_type: "handoff_type";
175
- workflow: "workflow";
176
193
  policy: "policy";
177
194
  guardrail: "guardrail";
178
195
  guardrail_policy: "guardrail_policy";
@@ -235,13 +252,13 @@ declare const SoftwareBindingSchema: z.ZodObject<{
235
252
  template: z.ZodOptional<z.ZodString>;
236
253
  inline_template: z.ZodOptional<z.ZodString>;
237
254
  context: z.ZodEnum<{
255
+ workflow: "workflow";
238
256
  agent: "agent";
239
257
  task: "task";
240
258
  artifact: "artifact";
241
259
  tool: "tool";
242
260
  validation: "validation";
243
261
  handoff_type: "handoff_type";
244
- workflow: "workflow";
245
262
  policy: "policy";
246
263
  guardrail: "guardrail";
247
264
  guardrail_policy: "guardrail_policy";
@@ -263,20 +280,20 @@ type SoftwareBinding = z.infer<typeof SoftwareBindingSchema>;
263
280
 
264
281
  declare const CONTEXT_TYPES: readonly ["agent", "task", "artifact", "tool", "validation", "handoff_type", "workflow", "policy", "guardrail", "guardrail_policy", "system"];
265
282
  declare const ContextTypeSchema: z.ZodEnum<{
283
+ workflow: "workflow";
266
284
  agent: "agent";
267
285
  task: "task";
268
286
  artifact: "artifact";
269
287
  tool: "tool";
270
288
  validation: "validation";
271
289
  handoff_type: "handoff_type";
272
- workflow: "workflow";
273
290
  policy: "policy";
274
291
  guardrail: "guardrail";
275
292
  guardrail_policy: "guardrail_policy";
276
293
  system: "system";
277
294
  }>;
278
295
  type ContextType = z.infer<typeof ContextTypeSchema>;
279
- declare const ITERABLE_CONTEXT_TYPES: ("agent" | "task" | "artifact" | "tool" | "validation" | "handoff_type" | "workflow" | "policy" | "guardrail" | "guardrail_policy")[];
296
+ declare const ITERABLE_CONTEXT_TYPES: ("workflow" | "agent" | "task" | "artifact" | "tool" | "validation" | "handoff_type" | "policy" | "guardrail" | "guardrail_policy")[];
280
297
 
281
298
  /**
282
299
  * Reusable schema components, following the OpenAPI `components` pattern.
@@ -291,13 +308,13 @@ type Components = z.infer<typeof ComponentsSchema>;
291
308
  declare const SCOPE_NODE_TYPES: readonly ["root", "system", "agent", "task", "execution_step", "artifact", "tool", "tool_command", "validation", "handoff_type", "workflow", "workflow_step", "policy", "guardrail", "guardrail_policy", "rule", "escalation_criterion", "prerequisite"];
292
309
  type ScopeNodeType = (typeof SCOPE_NODE_TYPES)[number];
293
310
  declare const ScopeNodeTypeSchema: z.ZodEnum<{
311
+ workflow: "workflow";
294
312
  agent: "agent";
295
313
  task: "task";
296
314
  artifact: "artifact";
297
315
  tool: "tool";
298
316
  validation: "validation";
299
317
  handoff_type: "handoff_type";
300
- workflow: "workflow";
301
318
  policy: "policy";
302
319
  guardrail: "guardrail";
303
320
  guardrail_policy: "guardrail_policy";
@@ -320,13 +337,13 @@ declare const XExtensionDeclSchema: z.ZodObject<{
320
337
  items: z.ZodOptional<z.ZodString>;
321
338
  description: z.ZodOptional<z.ZodString>;
322
339
  scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
340
+ workflow: "workflow";
323
341
  agent: "agent";
324
342
  task: "task";
325
343
  artifact: "artifact";
326
344
  tool: "tool";
327
345
  validation: "validation";
328
346
  handoff_type: "handoff_type";
329
- workflow: "workflow";
330
347
  policy: "policy";
331
348
  guardrail: "guardrail";
332
349
  guardrail_policy: "guardrail_policy";
@@ -350,6 +367,17 @@ declare const DslSchema: z.ZodObject<{
350
367
  id: z.ZodString;
351
368
  name: z.ZodString;
352
369
  default_workflow_order: z.ZodArray<z.ZodString>;
370
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
371
+ title: z.ZodString;
372
+ content: z.ZodOptional<z.ZodString>;
373
+ list: z.ZodOptional<z.ZodEnum<{
374
+ agents: "agents";
375
+ workflow: "workflow";
376
+ validations: "validations";
377
+ guardrails: "guardrails";
378
+ }>>;
379
+ }, z.core.$loose>>>;
380
+ context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
353
381
  }, z.core.$loose>;
354
382
  agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
355
383
  role_name: z.ZodString;
@@ -372,9 +400,9 @@ declare const DslSchema: z.ZodObject<{
372
400
  name: z.ZodOptional<z.ZodString>;
373
401
  description: z.ZodString;
374
402
  severity: z.ZodEnum<{
403
+ optional: "optional";
375
404
  mandatory: "mandatory";
376
405
  recommended: "recommended";
377
- optional: "optional";
378
406
  }>;
379
407
  detection_method: z.ZodOptional<z.ZodString>;
380
408
  escalation: z.ZodOptional<z.ZodString>;
@@ -391,8 +419,14 @@ declare const DslSchema: z.ZodObject<{
391
419
  }, z.core.$loose>>>;
392
420
  sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
393
421
  title: z.ZodString;
394
- content: z.ZodString;
395
- }, z.core.$strip>>>;
422
+ content: z.ZodOptional<z.ZodString>;
423
+ list: z.ZodOptional<z.ZodEnum<{
424
+ agents: "agents";
425
+ workflow: "workflow";
426
+ validations: "validations";
427
+ guardrails: "guardrails";
428
+ }>>;
429
+ }, z.core.$loose>>>;
396
430
  prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
397
431
  action: z.ZodEnum<{
398
432
  read: "read";
@@ -433,9 +467,9 @@ declare const DslSchema: z.ZodObject<{
433
467
  name: z.ZodOptional<z.ZodString>;
434
468
  description: z.ZodString;
435
469
  severity: z.ZodEnum<{
470
+ optional: "optional";
436
471
  mandatory: "mandatory";
437
472
  recommended: "recommended";
438
- optional: "optional";
439
473
  }>;
440
474
  detection_method: z.ZodOptional<z.ZodString>;
441
475
  escalation: z.ZodOptional<z.ZodString>;
@@ -450,6 +484,16 @@ declare const DslSchema: z.ZodObject<{
450
484
  wait_for_approval: "wait_for_approval";
451
485
  }>;
452
486
  }, z.core.$loose>>>;
487
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
488
+ title: z.ZodString;
489
+ content: z.ZodOptional<z.ZodString>;
490
+ list: z.ZodOptional<z.ZodEnum<{
491
+ agents: "agents";
492
+ workflow: "workflow";
493
+ validations: "validations";
494
+ guardrails: "guardrails";
495
+ }>>;
496
+ }, z.core.$loose>>>;
453
497
  validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
454
498
  guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
455
499
  }, z.core.$loose>>>;
@@ -581,6 +625,16 @@ declare const DslSchema: z.ZodObject<{
581
625
  expects: z.ZodString;
582
626
  group: z.ZodOptional<z.ZodString>;
583
627
  }, z.core.$loose>], "type">>;
628
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
629
+ title: z.ZodString;
630
+ content: z.ZodOptional<z.ZodString>;
631
+ list: z.ZodOptional<z.ZodEnum<{
632
+ agents: "agents";
633
+ workflow: "workflow";
634
+ validations: "validations";
635
+ guardrails: "guardrails";
636
+ }>>;
637
+ }, z.core.$loose>>>;
584
638
  external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
585
639
  id: z.ZodString;
586
640
  kind: z.ZodEnum<{
@@ -644,13 +698,13 @@ declare const DslSchema: z.ZodObject<{
644
698
  items: z.ZodOptional<z.ZodString>;
645
699
  description: z.ZodOptional<z.ZodString>;
646
700
  scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
701
+ workflow: "workflow";
647
702
  agent: "agent";
648
703
  task: "task";
649
704
  artifact: "artifact";
650
705
  tool: "tool";
651
706
  validation: "validation";
652
707
  handoff_type: "handoff_type";
653
- workflow: "workflow";
654
708
  policy: "policy";
655
709
  guardrail: "guardrail";
656
710
  guardrail_policy: "guardrail_policy";
@@ -825,10 +879,23 @@ declare const VersionLiteralSchema: z.ZodLiteral<1>;
825
879
  type VersionLiteral = z.infer<typeof VersionLiteralSchema>;
826
880
  declare const ExtendsSchema: z.ZodOptional<z.ZodString>;
827
881
  type Extends = z.infer<typeof ExtendsSchema>;
882
+ declare const ContextLoadingSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
883
+ type ContextLoading = z.infer<typeof ContextLoadingSchema>;
828
884
  declare const SystemSchema: z.ZodObject<{
829
885
  id: z.ZodString;
830
886
  name: z.ZodString;
831
887
  default_workflow_order: z.ZodArray<z.ZodString>;
888
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
889
+ title: z.ZodString;
890
+ content: z.ZodOptional<z.ZodString>;
891
+ list: z.ZodOptional<z.ZodEnum<{
892
+ agents: "agents";
893
+ workflow: "workflow";
894
+ validations: "validations";
895
+ guardrails: "guardrails";
896
+ }>>;
897
+ }, z.core.$loose>>>;
898
+ context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
832
899
  }, z.core.$loose>;
833
900
  type System = z.infer<typeof SystemSchema>;
834
901
 
@@ -907,9 +974,9 @@ declare const TaskSchema: z.ZodObject<{
907
974
  name: z.ZodOptional<z.ZodString>;
908
975
  description: z.ZodString;
909
976
  severity: z.ZodEnum<{
977
+ optional: "optional";
910
978
  mandatory: "mandatory";
911
979
  recommended: "recommended";
912
- optional: "optional";
913
980
  }>;
914
981
  detection_method: z.ZodOptional<z.ZodString>;
915
982
  escalation: z.ZodOptional<z.ZodString>;
@@ -924,6 +991,16 @@ declare const TaskSchema: z.ZodObject<{
924
991
  wait_for_approval: "wait_for_approval";
925
992
  }>;
926
993
  }, z.core.$loose>>>;
994
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
995
+ title: z.ZodString;
996
+ content: z.ZodOptional<z.ZodString>;
997
+ list: z.ZodOptional<z.ZodEnum<{
998
+ agents: "agents";
999
+ workflow: "workflow";
1000
+ validations: "validations";
1001
+ guardrails: "guardrails";
1002
+ }>>;
1003
+ }, z.core.$loose>>>;
927
1004
  validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
928
1005
  guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
929
1006
  }, z.core.$loose>;
@@ -1099,6 +1176,16 @@ declare const WorkflowSchema: z.ZodObject<{
1099
1176
  expects: z.ZodString;
1100
1177
  group: z.ZodOptional<z.ZodString>;
1101
1178
  }, z.core.$loose>], "type">>;
1179
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
1180
+ title: z.ZodString;
1181
+ content: z.ZodOptional<z.ZodString>;
1182
+ list: z.ZodOptional<z.ZodEnum<{
1183
+ agents: "agents";
1184
+ workflow: "workflow";
1185
+ validations: "validations";
1186
+ guardrails: "guardrails";
1187
+ }>>;
1188
+ }, z.core.$loose>>>;
1102
1189
  external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1103
1190
  id: z.ZodString;
1104
1191
  kind: z.ZodEnum<{
@@ -1204,13 +1291,13 @@ declare const yamlReservedKeySafetyRule: LintRule;
1204
1291
  declare const RenderTargetSchema: z.ZodObject<{
1205
1292
  template: z.ZodString;
1206
1293
  context: z.ZodEnum<{
1294
+ workflow: "workflow";
1207
1295
  agent: "agent";
1208
1296
  task: "task";
1209
1297
  artifact: "artifact";
1210
1298
  tool: "tool";
1211
1299
  validation: "validation";
1212
1300
  handoff_type: "handoff_type";
1213
- workflow: "workflow";
1214
1301
  policy: "policy";
1215
1302
  guardrail: "guardrail";
1216
1303
  guardrail_policy: "guardrail_policy";
@@ -1228,13 +1315,13 @@ declare const AgentContractsConfigSchema: z.ZodObject<{
1228
1315
  renders: z.ZodDefault<z.ZodArray<z.ZodObject<{
1229
1316
  template: z.ZodString;
1230
1317
  context: z.ZodEnum<{
1318
+ workflow: "workflow";
1231
1319
  agent: "agent";
1232
1320
  task: "task";
1233
1321
  artifact: "artifact";
1234
1322
  tool: "tool";
1235
1323
  validation: "validation";
1236
1324
  handoff_type: "handoff_type";
1237
- workflow: "workflow";
1238
1325
  policy: "policy";
1239
1326
  guardrail: "guardrail";
1240
1327
  guardrail_policy: "guardrail_policy";
@@ -1597,4 +1684,4 @@ interface PathResolveResult {
1597
1684
  }
1598
1685
  declare function resolveBindingTargetPath(target: string, paths: Record<string, string>, bindingSoftware: string): PathResolveResult;
1599
1686
 
1600
- export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, type BindingGenerationContext, type BindingOutput, BindingOutputSchema, type BindingRenderTarget, BindingRenderTargetSchema, CONTEXT_TYPES, type Check, CheckSchema, type Command, CommandSchema, type Components, ComponentsSchema, ConfigLoadError, type ContextType, ContextTypeSchema, type DelegatableTaskView, type DiagnosticMessage, type DimensionResult, type Dsl, DslLoadError, DslSchema, type EntityGuardrailEntry, type EntityValidationEntry, type EscalationCriterion, EscalationCriterionSchema, type ExecutionStep, ExecutionStepSchema, type Extends, ExtendsSchema, type ExternalParticipant, type GenerateDiagnostic, type GenerateGuardrailsOptions, type GenerateResult, type GlobalContext, type Guardrail, type GuardrailGenerationContext, type GuardrailPolicy, type GuardrailPolicyRule, type GuardrailPolicyRuleEscalation, GuardrailPolicyRuleEscalationSchema, GuardrailPolicyRuleSchema, GuardrailPolicySchema, GuardrailSchema, type GuardrailScope, GuardrailScopeSchema, type HandoffType, HandoffTypeSchema, ITERABLE_CONTEXT_TYPES, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, type LoadedBinding, type Matcher, MatcherSchema, MergeError, type MergeableRecord, type MergedBehavioralSpec, type PathResolveResult, type PerAgentContext, type PerArtifactContext, type PerGuardrailContext, type PerGuardrailPolicyContext, type PerHandoffTypeContext, type PerPolicyContext, type PerTaskContext, type PerToolContext, type PerValidationContext, type PerWorkflowContext, type Policy, PolicySchema, type PolicyWhen, PolicyWhenSchema, type PrependOperator, PrependOperatorSchema, type Prerequisite, PrerequisiteSchema, type ReferenceDiagnostic, type RemoveOperator, RemoveOperatorSchema, type RenderTarget, RenderTargetSchema, type ReplaceOperator, ReplaceOperatorSchema, type Reporting, ReportingSchema, type ResolveChecksResult, type ResolveResult, type ResolvedCheck, type ResolvedConfig, type ResolvedRenderTarget, type Retry, type Rule, RuleSchema, SCOPE_NODE_TYPES, type SchemaValidationResult, type ScopeNodeType, ScopeNodeTypeSchema, type ScoreResult, type Severity, type SoftwareBinding, SoftwareBindingSchema, type System, type SystemContext, SystemSchema, type Task, TaskSchema, type TeamImport, TeamImportSchema, type TeamInterface, type TeamInterfaceAcceptWorkflow, TeamInterfaceAcceptWorkflowSchema, TeamInterfaceSchema, type Tool, ToolSchema, type Validation, ValidationSchema, type VersionLiteral, VersionLiteralSchema, type Workflow, WorkflowSchema, type WorkflowStep, WorkflowStepSchema, type XExtensionDecl, XExtensionDeclSchema, buildArtifactContext, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, expandDefaults, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };
1687
+ export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, type BindingGenerationContext, type BindingOutput, BindingOutputSchema, type BindingRenderTarget, BindingRenderTargetSchema, CONTEXT_TYPES, type Check, CheckSchema, type Command, CommandSchema, type Components, ComponentsSchema, ConfigLoadError, type ContextLoading, ContextLoadingSchema, type ContextType, ContextTypeSchema, type DelegatableTaskView, type DiagnosticMessage, type DimensionResult, type Dsl, DslLoadError, DslSchema, type EntityGuardrailEntry, type EntityValidationEntry, type EscalationCriterion, EscalationCriterionSchema, type ExecutionStep, ExecutionStepSchema, type Extends, ExtendsSchema, type ExternalParticipant, type GenerateDiagnostic, type GenerateGuardrailsOptions, type GenerateResult, type GlobalContext, type Guardrail, type GuardrailGenerationContext, type GuardrailPolicy, type GuardrailPolicyRule, type GuardrailPolicyRuleEscalation, GuardrailPolicyRuleEscalationSchema, GuardrailPolicyRuleSchema, GuardrailPolicySchema, GuardrailSchema, type GuardrailScope, GuardrailScopeSchema, type HandoffType, HandoffTypeSchema, ITERABLE_CONTEXT_TYPES, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, type LoadedBinding, type Matcher, MatcherSchema, MergeError, type MergeableRecord, type MergedBehavioralSpec, type PathResolveResult, type PerAgentContext, type PerArtifactContext, type PerGuardrailContext, type PerGuardrailPolicyContext, type PerHandoffTypeContext, type PerPolicyContext, type PerTaskContext, type PerToolContext, type PerValidationContext, type PerWorkflowContext, type Policy, PolicySchema, type PolicyWhen, PolicyWhenSchema, type PrependOperator, PrependOperatorSchema, type Prerequisite, PrerequisiteSchema, type ReferenceDiagnostic, type RemoveOperator, RemoveOperatorSchema, type RenderTarget, RenderTargetSchema, type ReplaceOperator, ReplaceOperatorSchema, type Reporting, ReportingSchema, type ResolveChecksResult, type ResolveResult, type ResolvedCheck, type ResolvedConfig, type ResolvedRenderTarget, type Retry, type Rule, RuleSchema, SCOPE_NODE_TYPES, type SchemaValidationResult, type ScopeNodeType, ScopeNodeTypeSchema, type ScoreResult, type Section, SectionSchema, type Severity, type SoftwareBinding, SoftwareBindingSchema, type System, type SystemContext, SystemSchema, type Task, TaskSchema, type TeamImport, TeamImportSchema, type TeamInterface, type TeamInterfaceAcceptWorkflow, TeamInterfaceAcceptWorkflowSchema, TeamInterfaceSchema, type Tool, ToolSchema, type Validation, ValidationSchema, type VersionLiteral, VersionLiteralSchema, type Workflow, WorkflowSchema, type WorkflowStep, WorkflowStepSchema, type XExtensionDecl, XExtensionDeclSchema, buildArtifactContext, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, expandDefaults, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };
package/dist/index.js CHANGED
@@ -44924,6 +44924,11 @@ var require_dist13 = __commonJS({
44924
44924
 
44925
44925
  // src/schema/agent.ts
44926
44926
  import { z } from "zod";
44927
+ var SectionSchema = z.object({
44928
+ title: z.string(),
44929
+ content: z.string().optional(),
44930
+ list: z.enum(["agents", "workflow", "validations", "guardrails"]).optional()
44931
+ }).passthrough();
44927
44932
  var RuleSchema = z.object({
44928
44933
  id: z.string(),
44929
44934
  name: z.string().optional(),
@@ -44962,12 +44967,7 @@ var AgentSchema = z.object({
44962
44967
  rules: z.array(RuleSchema).optional(),
44963
44968
  anti_patterns: z.array(z.string()).optional(),
44964
44969
  escalation_criteria: z.array(EscalationCriterionSchema).optional(),
44965
- sections: z.array(
44966
- z.object({
44967
- title: z.string(),
44968
- content: z.string()
44969
- })
44970
- ).optional(),
44970
+ sections: z.array(SectionSchema).optional(),
44971
44971
  prerequisites: z.array(PrerequisiteSchema).optional(),
44972
44972
  guardrails: z.array(z.string()).optional()
44973
44973
  }).passthrough();
@@ -45161,10 +45161,13 @@ var PolicySchema = z7.object({
45161
45161
  import { z as z8 } from "zod";
45162
45162
  var VersionLiteralSchema = z8.literal(1);
45163
45163
  var ExtendsSchema = z8.string().optional();
45164
+ var ContextLoadingSchema = z8.record(z8.string(), z8.array(z8.string())).optional();
45164
45165
  var SystemSchema = z8.object({
45165
45166
  id: z8.string(),
45166
45167
  name: z8.string(),
45167
- default_workflow_order: z8.array(z8.string())
45168
+ default_workflow_order: z8.array(z8.string()),
45169
+ sections: z8.array(SectionSchema).optional(),
45170
+ context_loading: ContextLoadingSchema
45168
45171
  }).passthrough();
45169
45172
 
45170
45173
  // src/schema/task.ts
@@ -45198,6 +45201,7 @@ var TaskSchema = z9.object({
45198
45201
  rules: z9.array(RuleSchema).optional(),
45199
45202
  anti_patterns: z9.array(z9.string()).optional(),
45200
45203
  escalation_criteria: z9.array(EscalationCriterionSchema).optional(),
45204
+ sections: z9.array(SectionSchema).optional(),
45201
45205
  validations: z9.array(z9.string()).default([]),
45202
45206
  guardrails: z9.array(z9.string()).optional()
45203
45207
  }).passthrough();
@@ -45335,6 +45339,7 @@ var WorkflowSchema = z14.object({
45335
45339
  entry_conditions: z14.array(z14.string()).default([]),
45336
45340
  trigger: z14.string().optional(),
45337
45341
  steps: z14.array(WorkflowStepSchema),
45342
+ sections: z14.array(SectionSchema).optional(),
45338
45343
  external_participants: z14.array(ExternalParticipantSchema).default([])
45339
45344
  }).passthrough();
45340
45345
 
@@ -49753,6 +49758,10 @@ Handlebars.registerHelper("or", (...args) => {
49753
49758
  const _options = args.pop();
49754
49759
  return args.some((a3) => !!a3);
49755
49760
  });
49761
+ Handlebars.registerHelper("coalesce", (...args) => {
49762
+ const _options = args.pop();
49763
+ return args.find((a3) => a3 != null && a3 !== false && a3 !== "");
49764
+ });
49756
49765
  Handlebars.registerHelper("and", (...args) => {
49757
49766
  const _options = args.pop();
49758
49767
  return args.every((a3) => !!a3);
@@ -51091,6 +51100,7 @@ export {
51091
51100
  CommandSchema,
51092
51101
  ComponentsSchema,
51093
51102
  ConfigLoadError,
51103
+ ContextLoadingSchema,
51094
51104
  ContextTypeSchema,
51095
51105
  DslLoadError,
51096
51106
  DslSchema,
@@ -51118,6 +51128,7 @@ export {
51118
51128
  RuleSchema,
51119
51129
  SCOPE_NODE_TYPES,
51120
51130
  ScopeNodeTypeSchema,
51131
+ SectionSchema,
51121
51132
  SoftwareBindingSchema,
51122
51133
  SystemSchema,
51123
51134
  TaskSchema,