agent-contracts 0.12.4 → 0.13.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/README.md +49 -11
- package/dist/cli.js +688 -42
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +73 -5
- package/dist/index.js +673 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -222,6 +222,28 @@ declare const ComponentsSchema: z.ZodObject<{
|
|
|
222
222
|
schemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
223
223
|
}, z.core.$loose>;
|
|
224
224
|
type Components = z.infer<typeof ComponentsSchema>;
|
|
225
|
+
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"];
|
|
226
|
+
type ScopeNodeType = (typeof SCOPE_NODE_TYPES)[number];
|
|
227
|
+
declare const ScopeNodeTypeSchema: z.ZodEnum<{
|
|
228
|
+
guardrail: "guardrail";
|
|
229
|
+
workflow: "workflow";
|
|
230
|
+
tool: "tool";
|
|
231
|
+
agent: "agent";
|
|
232
|
+
task: "task";
|
|
233
|
+
validation: "validation";
|
|
234
|
+
root: "root";
|
|
235
|
+
system: "system";
|
|
236
|
+
execution_step: "execution_step";
|
|
237
|
+
artifact: "artifact";
|
|
238
|
+
tool_command: "tool_command";
|
|
239
|
+
handoff_type: "handoff_type";
|
|
240
|
+
workflow_step: "workflow_step";
|
|
241
|
+
policy: "policy";
|
|
242
|
+
guardrail_policy: "guardrail_policy";
|
|
243
|
+
rule: "rule";
|
|
244
|
+
escalation_criterion: "escalation_criterion";
|
|
245
|
+
prerequisite: "prerequisite";
|
|
246
|
+
}>;
|
|
225
247
|
/**
|
|
226
248
|
* Declaration of project-specific `x-*` extension fields.
|
|
227
249
|
* Each key must start with `x-` and describes the expected type/shape
|
|
@@ -231,6 +253,28 @@ declare const XExtensionDeclSchema: z.ZodObject<{
|
|
|
231
253
|
type: z.ZodString;
|
|
232
254
|
items: z.ZodOptional<z.ZodString>;
|
|
233
255
|
description: z.ZodOptional<z.ZodString>;
|
|
256
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
257
|
+
guardrail: "guardrail";
|
|
258
|
+
workflow: "workflow";
|
|
259
|
+
tool: "tool";
|
|
260
|
+
agent: "agent";
|
|
261
|
+
task: "task";
|
|
262
|
+
validation: "validation";
|
|
263
|
+
root: "root";
|
|
264
|
+
system: "system";
|
|
265
|
+
execution_step: "execution_step";
|
|
266
|
+
artifact: "artifact";
|
|
267
|
+
tool_command: "tool_command";
|
|
268
|
+
handoff_type: "handoff_type";
|
|
269
|
+
workflow_step: "workflow_step";
|
|
270
|
+
policy: "policy";
|
|
271
|
+
guardrail_policy: "guardrail_policy";
|
|
272
|
+
rule: "rule";
|
|
273
|
+
escalation_criterion: "escalation_criterion";
|
|
274
|
+
prerequisite: "prerequisite";
|
|
275
|
+
}>>>;
|
|
276
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
277
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
234
278
|
}, z.core.$strip>;
|
|
235
279
|
type XExtensionDecl = z.infer<typeof XExtensionDeclSchema>;
|
|
236
280
|
declare const DslSchema: z.ZodObject<{
|
|
@@ -495,11 +539,34 @@ declare const DslSchema: z.ZodObject<{
|
|
|
495
539
|
components: z.ZodDefault<z.ZodObject<{
|
|
496
540
|
schemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
497
541
|
}, z.core.$loose>>;
|
|
498
|
-
|
|
542
|
+
extensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
499
543
|
type: z.ZodString;
|
|
500
544
|
items: z.ZodOptional<z.ZodString>;
|
|
501
545
|
description: z.ZodOptional<z.ZodString>;
|
|
546
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
547
|
+
guardrail: "guardrail";
|
|
548
|
+
workflow: "workflow";
|
|
549
|
+
tool: "tool";
|
|
550
|
+
agent: "agent";
|
|
551
|
+
task: "task";
|
|
552
|
+
validation: "validation";
|
|
553
|
+
root: "root";
|
|
554
|
+
system: "system";
|
|
555
|
+
execution_step: "execution_step";
|
|
556
|
+
artifact: "artifact";
|
|
557
|
+
tool_command: "tool_command";
|
|
558
|
+
handoff_type: "handoff_type";
|
|
559
|
+
workflow_step: "workflow_step";
|
|
560
|
+
policy: "policy";
|
|
561
|
+
guardrail_policy: "guardrail_policy";
|
|
562
|
+
rule: "rule";
|
|
563
|
+
escalation_criterion: "escalation_criterion";
|
|
564
|
+
prerequisite: "prerequisite";
|
|
565
|
+
}>>>;
|
|
566
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
567
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
502
568
|
}, z.core.$strip>>>;
|
|
569
|
+
extensions_strict: z.ZodDefault<z.ZodBoolean>;
|
|
503
570
|
}, z.core.$loose>;
|
|
504
571
|
type Dsl = z.infer<typeof DslSchema>;
|
|
505
572
|
|
|
@@ -934,6 +1001,7 @@ interface DiagnosticMessage {
|
|
|
934
1001
|
path: string;
|
|
935
1002
|
message: string;
|
|
936
1003
|
code: string;
|
|
1004
|
+
severity?: "error" | "warning";
|
|
937
1005
|
}
|
|
938
1006
|
interface SchemaValidationResult {
|
|
939
1007
|
success: boolean;
|
|
@@ -991,9 +1059,9 @@ declare const ContextTypeSchema: z.ZodEnum<{
|
|
|
991
1059
|
task: "task";
|
|
992
1060
|
validation: "validation";
|
|
993
1061
|
system: "system";
|
|
994
|
-
policy: "policy";
|
|
995
1062
|
artifact: "artifact";
|
|
996
1063
|
handoff_type: "handoff_type";
|
|
1064
|
+
policy: "policy";
|
|
997
1065
|
guardrail_policy: "guardrail_policy";
|
|
998
1066
|
}>;
|
|
999
1067
|
type ContextType = z.infer<typeof ContextTypeSchema>;
|
|
@@ -1007,9 +1075,9 @@ declare const RenderTargetSchema: z.ZodObject<{
|
|
|
1007
1075
|
task: "task";
|
|
1008
1076
|
validation: "validation";
|
|
1009
1077
|
system: "system";
|
|
1010
|
-
policy: "policy";
|
|
1011
1078
|
artifact: "artifact";
|
|
1012
1079
|
handoff_type: "handoff_type";
|
|
1080
|
+
policy: "policy";
|
|
1013
1081
|
guardrail_policy: "guardrail_policy";
|
|
1014
1082
|
}>;
|
|
1015
1083
|
output: z.ZodString;
|
|
@@ -1031,9 +1099,9 @@ declare const AgentContractsConfigSchema: z.ZodObject<{
|
|
|
1031
1099
|
task: "task";
|
|
1032
1100
|
validation: "validation";
|
|
1033
1101
|
system: "system";
|
|
1034
|
-
policy: "policy";
|
|
1035
1102
|
artifact: "artifact";
|
|
1036
1103
|
handoff_type: "handoff_type";
|
|
1104
|
+
policy: "policy";
|
|
1037
1105
|
guardrail_policy: "guardrail_policy";
|
|
1038
1106
|
}>;
|
|
1039
1107
|
output: z.ZodString;
|
|
@@ -1369,4 +1437,4 @@ interface PathResolveResult {
|
|
|
1369
1437
|
}
|
|
1370
1438
|
declare function resolveBindingTargetPath(target: string, paths: Record<string, string>, bindingSoftware: string): PathResolveResult;
|
|
1371
1439
|
|
|
1372
|
-
export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, type BindingOutput, BindingOutputSchema, 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, 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, type SchemaValidationResult, type ScoreResult, type Severity, type SoftwareBinding, SoftwareBindingSchema, type System, type SystemContext, SystemSchema, type Task, TaskSchema, 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 };
|
|
1440
|
+
export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, type BindingOutput, BindingOutputSchema, 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, 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 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 };
|