agent-contracts 0.30.4 → 0.32.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
@@ -401,6 +401,7 @@ declare const DslSchema: z.ZodObject<{
401
401
  }>>;
402
402
  }, z.core.$loose>>>;
403
403
  context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
404
+ states: z.ZodDefault<z.ZodArray<z.ZodString>>;
404
405
  }, z.core.$loose>;
405
406
  agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
406
407
  role_name: z.ZodString;
@@ -736,16 +737,29 @@ declare const DslSchema: z.ZodObject<{
736
737
  guardrail: z.ZodString;
737
738
  severity: z.ZodEnum<{
738
739
  mandatory: "mandatory";
740
+ info: "info";
739
741
  critical: "critical";
740
742
  warning: "warning";
741
- info: "info";
742
743
  }>;
743
- action: z.ZodEnum<{
744
- info: "info";
744
+ action: z.ZodUnion<readonly [z.ZodEnum<{
745
745
  block: "block";
746
746
  warn: "warn";
747
747
  shadow: "shadow";
748
- }>;
748
+ info: "info";
749
+ }>, z.ZodObject<{
750
+ default: z.ZodEnum<{
751
+ block: "block";
752
+ warn: "warn";
753
+ shadow: "shadow";
754
+ info: "info";
755
+ }>;
756
+ when: z.ZodRecord<z.ZodString, z.ZodEnum<{
757
+ block: "block";
758
+ warn: "warn";
759
+ shadow: "shadow";
760
+ info: "info";
761
+ }>>;
762
+ }, z.core.$strip>]>;
749
763
  allow_override: z.ZodDefault<z.ZodBoolean>;
750
764
  override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
751
765
  escalation: z.ZodOptional<z.ZodObject<{
@@ -830,20 +844,75 @@ declare const GuardrailPolicyRuleEscalationSchema: z.ZodObject<{
830
844
  condition: z.ZodOptional<z.ZodString>;
831
845
  }, z.core.$loose>;
832
846
  type GuardrailPolicyRuleEscalation = z.infer<typeof GuardrailPolicyRuleEscalationSchema>;
847
+ declare const ActionEnum: z.ZodEnum<{
848
+ block: "block";
849
+ warn: "warn";
850
+ shadow: "shadow";
851
+ info: "info";
852
+ }>;
853
+ type ActionValue = z.infer<typeof ActionEnum>;
854
+ declare const ConditionalActionSchema: z.ZodObject<{
855
+ default: z.ZodEnum<{
856
+ block: "block";
857
+ warn: "warn";
858
+ shadow: "shadow";
859
+ info: "info";
860
+ }>;
861
+ when: z.ZodRecord<z.ZodString, z.ZodEnum<{
862
+ block: "block";
863
+ warn: "warn";
864
+ shadow: "shadow";
865
+ info: "info";
866
+ }>>;
867
+ }, z.core.$strip>;
868
+ type ConditionalAction = z.infer<typeof ConditionalActionSchema>;
869
+ declare const ActionSchema: z.ZodUnion<readonly [z.ZodEnum<{
870
+ block: "block";
871
+ warn: "warn";
872
+ shadow: "shadow";
873
+ info: "info";
874
+ }>, z.ZodObject<{
875
+ default: z.ZodEnum<{
876
+ block: "block";
877
+ warn: "warn";
878
+ shadow: "shadow";
879
+ info: "info";
880
+ }>;
881
+ when: z.ZodRecord<z.ZodString, z.ZodEnum<{
882
+ block: "block";
883
+ warn: "warn";
884
+ shadow: "shadow";
885
+ info: "info";
886
+ }>>;
887
+ }, z.core.$strip>]>;
888
+ type Action = z.infer<typeof ActionSchema>;
833
889
  declare const GuardrailPolicyRuleSchema: z.ZodObject<{
834
890
  guardrail: z.ZodString;
835
891
  severity: z.ZodEnum<{
836
892
  mandatory: "mandatory";
893
+ info: "info";
837
894
  critical: "critical";
838
895
  warning: "warning";
839
- info: "info";
840
896
  }>;
841
- action: z.ZodEnum<{
842
- info: "info";
897
+ action: z.ZodUnion<readonly [z.ZodEnum<{
843
898
  block: "block";
844
899
  warn: "warn";
845
900
  shadow: "shadow";
846
- }>;
901
+ info: "info";
902
+ }>, z.ZodObject<{
903
+ default: z.ZodEnum<{
904
+ block: "block";
905
+ warn: "warn";
906
+ shadow: "shadow";
907
+ info: "info";
908
+ }>;
909
+ when: z.ZodRecord<z.ZodString, z.ZodEnum<{
910
+ block: "block";
911
+ warn: "warn";
912
+ shadow: "shadow";
913
+ info: "info";
914
+ }>>;
915
+ }, z.core.$strip>]>;
847
916
  allow_override: z.ZodDefault<z.ZodBoolean>;
848
917
  override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
849
918
  escalation: z.ZodOptional<z.ZodObject<{
@@ -858,16 +927,29 @@ declare const GuardrailPolicySchema: z.ZodObject<{
858
927
  guardrail: z.ZodString;
859
928
  severity: z.ZodEnum<{
860
929
  mandatory: "mandatory";
930
+ info: "info";
861
931
  critical: "critical";
862
932
  warning: "warning";
863
- info: "info";
864
933
  }>;
865
- action: z.ZodEnum<{
866
- info: "info";
934
+ action: z.ZodUnion<readonly [z.ZodEnum<{
867
935
  block: "block";
868
936
  warn: "warn";
869
937
  shadow: "shadow";
870
- }>;
938
+ info: "info";
939
+ }>, z.ZodObject<{
940
+ default: z.ZodEnum<{
941
+ block: "block";
942
+ warn: "warn";
943
+ shadow: "shadow";
944
+ info: "info";
945
+ }>;
946
+ when: z.ZodRecord<z.ZodString, z.ZodEnum<{
947
+ block: "block";
948
+ warn: "warn";
949
+ shadow: "shadow";
950
+ info: "info";
951
+ }>>;
952
+ }, z.core.$strip>]>;
871
953
  allow_override: z.ZodDefault<z.ZodBoolean>;
872
954
  override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
873
955
  escalation: z.ZodOptional<z.ZodObject<{
@@ -967,6 +1049,7 @@ declare const SystemSchema: z.ZodObject<{
967
1049
  }>>;
968
1050
  }, z.core.$loose>>>;
969
1051
  context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1052
+ states: z.ZodDefault<z.ZodArray<z.ZodString>>;
970
1053
  }, z.core.$loose>;
971
1054
  type System = z.infer<typeof SystemSchema>;
972
1055
 
@@ -1536,7 +1619,7 @@ interface GuardrailEnforcementEntry {
1536
1619
  guardrail_id: string;
1537
1620
  description: string;
1538
1621
  severity: string;
1539
- action: string;
1622
+ action: Action;
1540
1623
  scoped_agents: string[];
1541
1624
  scoped_tasks: string[];
1542
1625
  scoped_workflows: string[];
@@ -1564,7 +1647,7 @@ interface EntityGuardrailEntry {
1564
1647
  tags: string[];
1565
1648
  source: "entity" | "scope" | "both";
1566
1649
  severity?: string;
1567
- action?: string;
1650
+ action?: Action;
1568
1651
  }
1569
1652
  interface EntityValidationEntry {
1570
1653
  validation_id: string;
@@ -1868,9 +1951,9 @@ declare const DslAuditResultSchema: z.ZodObject<{
1868
1951
  dsl_gap: "dsl_gap";
1869
1952
  }>>;
1870
1953
  severity: z.ZodOptional<z.ZodEnum<{
1954
+ info: "info";
1871
1955
  critical: "critical";
1872
1956
  warning: "warning";
1873
- info: "info";
1874
1957
  }>>;
1875
1958
  }, z.core.$strip>>>;
1876
1959
  recommendations: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2029,4 +2112,4 @@ declare function matchFileToArtifacts(filePath: string, artifacts: Record<string
2029
2112
  declare function buildCoverageReport(files: string[], artifacts: Record<string, ArtifactFileInfo>): ArtifactCoverageReport;
2030
2113
  declare function formatCoverageText(report: ArtifactCoverageReport): string;
2031
2114
 
2032
- export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, type ArtifactCoverageReport, type ArtifactCoverageSummary, type ArtifactFileInfo, 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 OverlappingFile, type PathResolveResult, type PerAgentContext, type PerArtifactContext, type PerArtifactEntry, 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, buildCoverageReport, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildNavigationIndex, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, computeExitCode, enumerateProjectFiles, expandDefaults, formatAuditResult, formatAuditResults, formatCoverageText, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, matchFileToArtifacts, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };
2115
+ export { type Action, ActionEnum, ActionSchema, type ActionValue, type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, type ArtifactCoverageReport, type ArtifactCoverageSummary, type ArtifactFileInfo, 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, type ConditionalAction, ConditionalActionSchema, 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 OverlappingFile, type PathResolveResult, type PerAgentContext, type PerArtifactContext, type PerArtifactEntry, 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, buildCoverageReport, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildNavigationIndex, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, computeExitCode, enumerateProjectFiles, expandDefaults, formatAuditResult, formatAuditResults, formatCoverageText, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, matchFileToArtifacts, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };