agent-contracts 0.24.1 → 0.30.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
@@ -46,6 +46,7 @@ type Prerequisite = z.infer<typeof PrerequisiteSchema>;
46
46
  declare const AgentSchema: z.ZodObject<{
47
47
  role_name: z.ZodString;
48
48
  purpose: z.ZodString;
49
+ own_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
49
50
  can_read_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
50
51
  can_write_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
51
52
  can_execute_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -213,6 +214,7 @@ declare const BindingRenderTargetSchema: z.ZodObject<{
213
214
  guardrail: "guardrail";
214
215
  guardrail_policy: "guardrail_policy";
215
216
  system: "system";
217
+ navigation_index: "navigation_index";
216
218
  }>;
217
219
  output: z.ZodString;
218
220
  include: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -282,6 +284,7 @@ declare const SoftwareBindingSchema: z.ZodObject<{
282
284
  guardrail: "guardrail";
283
285
  guardrail_policy: "guardrail_policy";
284
286
  system: "system";
287
+ navigation_index: "navigation_index";
285
288
  }>;
286
289
  output: z.ZodString;
287
290
  include: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -297,7 +300,7 @@ declare const SoftwareBindingSchema: z.ZodObject<{
297
300
  }, z.core.$loose>;
298
301
  type SoftwareBinding = z.infer<typeof SoftwareBindingSchema>;
299
302
 
300
- declare const CONTEXT_TYPES: readonly ["agent", "task", "artifact", "tool", "validation", "handoff_type", "workflow", "policy", "guardrail", "guardrail_policy", "system"];
303
+ declare const CONTEXT_TYPES: readonly ["agent", "task", "artifact", "tool", "validation", "handoff_type", "workflow", "policy", "guardrail", "guardrail_policy", "system", "navigation_index"];
301
304
  declare const ContextTypeSchema: z.ZodEnum<{
302
305
  workflow: "workflow";
303
306
  agent: "agent";
@@ -310,6 +313,7 @@ declare const ContextTypeSchema: z.ZodEnum<{
310
313
  guardrail: "guardrail";
311
314
  guardrail_policy: "guardrail_policy";
312
315
  system: "system";
316
+ navigation_index: "navigation_index";
313
317
  }>;
314
318
  type ContextType = z.infer<typeof ContextTypeSchema>;
315
319
  declare const ITERABLE_CONTEXT_TYPES: ("workflow" | "agent" | "task" | "artifact" | "tool" | "validation" | "handoff_type" | "policy" | "guardrail" | "guardrail_policy")[];
@@ -401,6 +405,7 @@ declare const DslSchema: z.ZodObject<{
401
405
  agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
402
406
  role_name: z.ZodString;
403
407
  purpose: z.ZodString;
408
+ own_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
404
409
  can_read_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
405
410
  can_write_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
406
411
  can_execute_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -476,6 +481,16 @@ declare const DslSchema: z.ZodObject<{
476
481
  uses_tool: z.ZodOptional<z.ZodString>;
477
482
  produces_artifact: z.ZodOptional<z.ZodString>;
478
483
  reads_artifact: z.ZodOptional<z.ZodString>;
484
+ validates_artifact: z.ZodOptional<z.ZodString>;
485
+ validation_kind: z.ZodOptional<z.ZodEnum<{
486
+ schema: "schema";
487
+ mechanical: "mechanical";
488
+ semantic: "semantic";
489
+ approval: "approval";
490
+ provenance: "provenance";
491
+ traceability: "traceability";
492
+ fidelity: "fidelity";
493
+ }>>;
479
494
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
480
495
  skip_condition: z.ZodOptional<z.ZodString>;
481
496
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -548,11 +563,15 @@ declare const DslSchema: z.ZodObject<{
548
563
  }>>;
549
564
  }, z.core.$loose>>>;
550
565
  tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
551
- kind: z.ZodString;
566
+ kind: z.ZodOptional<z.ZodString>;
567
+ extends: z.ZodOptional<z.ZodString>;
568
+ command: z.ZodOptional<z.ZodString>;
552
569
  description: z.ZodOptional<z.ZodString>;
553
570
  input_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
554
571
  output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
555
572
  invokable_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
573
+ cli_contract: z.ZodOptional<z.ZodString>;
574
+ artifact_bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
556
575
  side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
557
576
  commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
558
577
  command: z.ZodString;
@@ -574,11 +593,11 @@ declare const DslSchema: z.ZodObject<{
574
593
  traceability: "traceability";
575
594
  fidelity: "fidelity";
576
595
  }>;
577
- executor_type: z.ZodEnum<{
596
+ executor_type: z.ZodOptional<z.ZodEnum<{
578
597
  agent: "agent";
579
598
  tool: "tool";
580
- }>;
581
- executor: z.ZodString;
599
+ }>>;
600
+ executor: z.ZodOptional<z.ZodString>;
582
601
  blocking: z.ZodBoolean;
583
602
  produces_evidence: z.ZodOptional<z.ZodString>;
584
603
  description: z.ZodOptional<z.ZodString>;
@@ -991,6 +1010,16 @@ declare const ExecutionStepSchema: z.ZodObject<{
991
1010
  uses_tool: z.ZodOptional<z.ZodString>;
992
1011
  produces_artifact: z.ZodOptional<z.ZodString>;
993
1012
  reads_artifact: z.ZodOptional<z.ZodString>;
1013
+ validates_artifact: z.ZodOptional<z.ZodString>;
1014
+ validation_kind: z.ZodOptional<z.ZodEnum<{
1015
+ schema: "schema";
1016
+ mechanical: "mechanical";
1017
+ semantic: "semantic";
1018
+ approval: "approval";
1019
+ provenance: "provenance";
1020
+ traceability: "traceability";
1021
+ fidelity: "fidelity";
1022
+ }>>;
994
1023
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
995
1024
  skip_condition: z.ZodOptional<z.ZodString>;
996
1025
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -1016,6 +1045,16 @@ declare const TaskSchema: z.ZodObject<{
1016
1045
  uses_tool: z.ZodOptional<z.ZodString>;
1017
1046
  produces_artifact: z.ZodOptional<z.ZodString>;
1018
1047
  reads_artifact: z.ZodOptional<z.ZodString>;
1048
+ validates_artifact: z.ZodOptional<z.ZodString>;
1049
+ validation_kind: z.ZodOptional<z.ZodEnum<{
1050
+ schema: "schema";
1051
+ mechanical: "mechanical";
1052
+ semantic: "semantic";
1053
+ approval: "approval";
1054
+ provenance: "provenance";
1055
+ traceability: "traceability";
1056
+ fidelity: "fidelity";
1057
+ }>>;
1019
1058
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
1020
1059
  skip_condition: z.ZodOptional<z.ZodString>;
1021
1060
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -1067,11 +1106,15 @@ declare const CommandSchema: z.ZodObject<{
1067
1106
  }, z.core.$strip>;
1068
1107
  type Command = z.infer<typeof CommandSchema>;
1069
1108
  declare const ToolSchema: z.ZodObject<{
1070
- kind: z.ZodString;
1109
+ kind: z.ZodOptional<z.ZodString>;
1110
+ extends: z.ZodOptional<z.ZodString>;
1111
+ command: z.ZodOptional<z.ZodString>;
1071
1112
  description: z.ZodOptional<z.ZodString>;
1072
1113
  input_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1073
1114
  output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1074
1115
  invokable_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
1116
+ cli_contract: z.ZodOptional<z.ZodString>;
1117
+ artifact_bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1075
1118
  side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
1076
1119
  commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
1077
1120
  command: z.ZodString;
@@ -1095,11 +1138,11 @@ declare const ValidationSchema: z.ZodObject<{
1095
1138
  traceability: "traceability";
1096
1139
  fidelity: "fidelity";
1097
1140
  }>;
1098
- executor_type: z.ZodEnum<{
1141
+ executor_type: z.ZodOptional<z.ZodEnum<{
1099
1142
  agent: "agent";
1100
1143
  tool: "tool";
1101
- }>;
1102
- executor: z.ZodString;
1144
+ }>>;
1145
+ executor: z.ZodOptional<z.ZodString>;
1103
1146
  blocking: z.ZodBoolean;
1104
1147
  produces_evidence: z.ZodOptional<z.ZodString>;
1105
1148
  description: z.ZodOptional<z.ZodString>;
@@ -1367,6 +1410,7 @@ declare const RenderTargetSchema: z.ZodObject<{
1367
1410
  guardrail: "guardrail";
1368
1411
  guardrail_policy: "guardrail_policy";
1369
1412
  system: "system";
1413
+ navigation_index: "navigation_index";
1370
1414
  }>;
1371
1415
  output: z.ZodString;
1372
1416
  include: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1398,6 +1442,7 @@ declare const AgentContractsConfigSchema: z.ZodObject<{
1398
1442
  guardrail: "guardrail";
1399
1443
  guardrail_policy: "guardrail_policy";
1400
1444
  system: "system";
1445
+ navigation_index: "navigation_index";
1401
1446
  }>;
1402
1447
  output: z.ZodString;
1403
1448
  include: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1519,7 +1564,7 @@ interface EntityValidationEntry {
1519
1564
  validation_id: string;
1520
1565
  kind: string;
1521
1566
  target_artifact: string;
1522
- executor_type: string;
1567
+ executor_type?: string;
1523
1568
  blocking: boolean;
1524
1569
  produces_evidence?: string;
1525
1570
  }
@@ -1701,6 +1746,74 @@ interface ScoreResult {
1701
1746
 
1702
1747
  declare function score(dsl: Dsl): ScoreResult;
1703
1748
 
1749
+ type ProjectNavigationIndex = {
1750
+ version: string;
1751
+ generated_at: string;
1752
+ system: {
1753
+ id: string;
1754
+ name: string;
1755
+ };
1756
+ artifacts: Record<string, CompiledArtifactNode>;
1757
+ };
1758
+ type CompiledArtifactNode = {
1759
+ id: string;
1760
+ files: {
1761
+ path_patterns: string[];
1762
+ exclude_patterns: string[];
1763
+ };
1764
+ properties: {
1765
+ type: string;
1766
+ authority: "canonical" | "derived" | "generated" | "control";
1767
+ manual_edit: "allowed" | "discouraged" | "forbidden";
1768
+ change_control: "none" | "approval-required" | "regeneration-required";
1769
+ };
1770
+ relations: {
1771
+ source_artifacts: string[];
1772
+ derived_artifacts: string[];
1773
+ };
1774
+ operations: {
1775
+ producers: ArtifactOperation[];
1776
+ validators: ArtifactOperation[];
1777
+ consumers: ArtifactOperation[];
1778
+ };
1779
+ agents: {
1780
+ owners: string[];
1781
+ editors: string[];
1782
+ readers: string[];
1783
+ };
1784
+ routes: {
1785
+ update?: ArtifactRoute[];
1786
+ regenerate?: ArtifactRoute[];
1787
+ validate?: ArtifactRoute[];
1788
+ };
1789
+ };
1790
+ type ArtifactOperation = {
1791
+ tool: string;
1792
+ cli_contract: string;
1793
+ command: string;
1794
+ slot: string;
1795
+ invokable_by: string[];
1796
+ };
1797
+ type ArtifactRoute = {
1798
+ purpose: "update" | "regenerate" | "validate";
1799
+ steps: ArtifactRouteStep[];
1800
+ };
1801
+ type ArtifactRouteStep = {
1802
+ type: "edit_artifact";
1803
+ artifact: string;
1804
+ candidate_agents: string[];
1805
+ } | {
1806
+ type: "run_operation";
1807
+ operation: string;
1808
+ candidate_agents: string[];
1809
+ } | {
1810
+ type: "request_review";
1811
+ artifact: string;
1812
+ candidate_agents: string[];
1813
+ };
1814
+
1815
+ declare function buildNavigationIndex(dsl: Dsl): ProjectNavigationIndex;
1816
+
1704
1817
  type AuditType = "render" | "dsl" | "prompt" | "extensions";
1705
1818
  type OutputFormat = "text" | "json" | "markdown";
1706
1819
  interface AuditOptions {
@@ -1877,4 +1990,4 @@ interface PathResolveResult {
1877
1990
  }
1878
1991
  declare function resolveBindingTargetPath(target: string, paths: Record<string, string>, bindingSoftware: string): PathResolveResult;
1879
1992
 
1880
- export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, type AuditOptions, type OutputFormat as AuditOutputFormat, type AuditConfig as AuditRunConfig, type AuditRunResult, type AuditType, 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, buildAuditContext, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, computeExitCode, expandDefaults, formatAuditResult, formatAuditResults, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };
1993
+ export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, type ArtifactOperation, type ArtifactRoute, type ArtifactRouteStep, ArtifactSchema, type AuditOptions, type OutputFormat as AuditOutputFormat, type AuditConfig as AuditRunConfig, type AuditRunResult, type AuditType, BaseResolveError, type BindingGenerationContext, type BindingOutput, BindingOutputSchema, type BindingRenderTarget, BindingRenderTargetSchema, CONTEXT_TYPES, type Check, CheckSchema, type Command, CommandSchema, type CompiledArtifactNode, 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 ProjectNavigationIndex, 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, buildAuditContext, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildNavigationIndex, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, computeExitCode, expandDefaults, formatAuditResult, formatAuditResults, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };