agent-contracts 0.7.1 → 0.9.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 +22 -4
- package/dist/cli.js +561 -46
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +131 -1
- package/dist/index.js +562 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ declare const DslSchema: z.ZodObject<{
|
|
|
196
196
|
wait_for_approval: "wait_for_approval";
|
|
197
197
|
}>;
|
|
198
198
|
}, z.core.$loose>>>;
|
|
199
|
+
validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
199
200
|
}, z.core.$loose>>>;
|
|
200
201
|
artifacts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
201
202
|
type: z.ZodString;
|
|
@@ -215,6 +216,13 @@ declare const DslSchema: z.ZodObject<{
|
|
|
215
216
|
output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
216
217
|
invokable_by: z.ZodArray<z.ZodString>;
|
|
217
218
|
side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
219
|
+
commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
220
|
+
command: z.ZodString;
|
|
221
|
+
category: z.ZodString;
|
|
222
|
+
reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
223
|
+
writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
224
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
218
226
|
}, z.core.$loose>>>;
|
|
219
227
|
validations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
220
228
|
target_artifact: z.ZodString;
|
|
@@ -243,21 +251,54 @@ declare const DslSchema: z.ZodObject<{
|
|
|
243
251
|
entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
244
252
|
trigger: z.ZodOptional<z.ZodString>;
|
|
245
253
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"delegate">;
|
|
255
|
+
description: z.ZodOptional<z.ZodString>;
|
|
256
|
+
task: z.ZodString;
|
|
257
|
+
from_agent: z.ZodString;
|
|
258
|
+
group: z.ZodOptional<z.ZodString>;
|
|
259
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
condition: z.ZodString;
|
|
261
|
+
fix_task: z.ZodString;
|
|
262
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, z.core.$strip>>;
|
|
264
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
265
|
+
type: z.ZodLiteral<"gate">;
|
|
266
|
+
description: z.ZodOptional<z.ZodString>;
|
|
267
|
+
gate_kind: z.ZodString;
|
|
268
|
+
group: z.ZodOptional<z.ZodString>;
|
|
269
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
246
270
|
type: z.ZodLiteral<"handoff">;
|
|
247
271
|
description: z.ZodOptional<z.ZodString>;
|
|
248
272
|
handoff_kind: z.ZodString;
|
|
249
273
|
task: z.ZodOptional<z.ZodString>;
|
|
250
274
|
from_agent: z.ZodOptional<z.ZodString>;
|
|
275
|
+
group: z.ZodOptional<z.ZodString>;
|
|
276
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
condition: z.ZodString;
|
|
278
|
+
fix_task: z.ZodString;
|
|
279
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
251
281
|
}, z.core.$loose>, z.ZodObject<{
|
|
252
282
|
type: z.ZodLiteral<"validation">;
|
|
253
283
|
description: z.ZodOptional<z.ZodString>;
|
|
254
284
|
validation: z.ZodString;
|
|
285
|
+
group: z.ZodOptional<z.ZodString>;
|
|
255
286
|
}, z.core.$loose>, z.ZodObject<{
|
|
256
287
|
type: z.ZodLiteral<"decision">;
|
|
257
288
|
description: z.ZodOptional<z.ZodString>;
|
|
258
289
|
on: z.ZodString;
|
|
259
290
|
branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
291
|
+
group: z.ZodOptional<z.ZodString>;
|
|
260
292
|
}, z.core.$loose>], "type">>;
|
|
293
|
+
external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
kind: z.ZodEnum<{
|
|
296
|
+
actor: "actor";
|
|
297
|
+
participant: "participant";
|
|
298
|
+
}>;
|
|
299
|
+
label: z.ZodString;
|
|
300
|
+
description: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strip>>>;
|
|
261
302
|
}, z.core.$loose>>>;
|
|
262
303
|
policies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
263
304
|
when: z.ZodObject<{
|
|
@@ -403,9 +444,18 @@ declare const TaskSchema: z.ZodObject<{
|
|
|
403
444
|
wait_for_approval: "wait_for_approval";
|
|
404
445
|
}>;
|
|
405
446
|
}, z.core.$loose>>>;
|
|
447
|
+
validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
406
448
|
}, z.core.$loose>;
|
|
407
449
|
type Task = z.infer<typeof TaskSchema>;
|
|
408
450
|
|
|
451
|
+
declare const CommandSchema: z.ZodObject<{
|
|
452
|
+
command: z.ZodString;
|
|
453
|
+
category: z.ZodString;
|
|
454
|
+
reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
455
|
+
writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
456
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
type Command = z.infer<typeof CommandSchema>;
|
|
409
459
|
declare const ToolSchema: z.ZodObject<{
|
|
410
460
|
kind: z.ZodString;
|
|
411
461
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -413,6 +463,13 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
413
463
|
output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
414
464
|
invokable_by: z.ZodArray<z.ZodString>;
|
|
415
465
|
side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
466
|
+
commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
467
|
+
command: z.ZodString;
|
|
468
|
+
category: z.ZodString;
|
|
469
|
+
reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
470
|
+
writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
471
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>>>;
|
|
416
473
|
}, z.core.$loose>;
|
|
417
474
|
type Tool = z.infer<typeof ToolSchema>;
|
|
418
475
|
|
|
@@ -434,21 +491,61 @@ declare const ValidationSchema: z.ZodObject<{
|
|
|
434
491
|
}, z.core.$loose>;
|
|
435
492
|
type Validation = z.infer<typeof ValidationSchema>;
|
|
436
493
|
|
|
494
|
+
declare const RetrySchema: z.ZodObject<{
|
|
495
|
+
condition: z.ZodString;
|
|
496
|
+
fix_task: z.ZodString;
|
|
497
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
type Retry = z.infer<typeof RetrySchema>;
|
|
500
|
+
declare const ExternalParticipantSchema: z.ZodObject<{
|
|
501
|
+
id: z.ZodString;
|
|
502
|
+
kind: z.ZodEnum<{
|
|
503
|
+
actor: "actor";
|
|
504
|
+
participant: "participant";
|
|
505
|
+
}>;
|
|
506
|
+
label: z.ZodString;
|
|
507
|
+
description: z.ZodOptional<z.ZodString>;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
type ExternalParticipant = z.infer<typeof ExternalParticipantSchema>;
|
|
437
510
|
declare const WorkflowStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
511
|
+
type: z.ZodLiteral<"delegate">;
|
|
512
|
+
description: z.ZodOptional<z.ZodString>;
|
|
513
|
+
task: z.ZodString;
|
|
514
|
+
from_agent: z.ZodString;
|
|
515
|
+
group: z.ZodOptional<z.ZodString>;
|
|
516
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
condition: z.ZodString;
|
|
518
|
+
fix_task: z.ZodString;
|
|
519
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
520
|
+
}, z.core.$strip>>;
|
|
521
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
522
|
+
type: z.ZodLiteral<"gate">;
|
|
523
|
+
description: z.ZodOptional<z.ZodString>;
|
|
524
|
+
gate_kind: z.ZodString;
|
|
525
|
+
group: z.ZodOptional<z.ZodString>;
|
|
526
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
438
527
|
type: z.ZodLiteral<"handoff">;
|
|
439
528
|
description: z.ZodOptional<z.ZodString>;
|
|
440
529
|
handoff_kind: z.ZodString;
|
|
441
530
|
task: z.ZodOptional<z.ZodString>;
|
|
442
531
|
from_agent: z.ZodOptional<z.ZodString>;
|
|
532
|
+
group: z.ZodOptional<z.ZodString>;
|
|
533
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
534
|
+
condition: z.ZodString;
|
|
535
|
+
fix_task: z.ZodString;
|
|
536
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
537
|
+
}, z.core.$strip>>;
|
|
443
538
|
}, z.core.$loose>, z.ZodObject<{
|
|
444
539
|
type: z.ZodLiteral<"validation">;
|
|
445
540
|
description: z.ZodOptional<z.ZodString>;
|
|
446
541
|
validation: z.ZodString;
|
|
542
|
+
group: z.ZodOptional<z.ZodString>;
|
|
447
543
|
}, z.core.$loose>, z.ZodObject<{
|
|
448
544
|
type: z.ZodLiteral<"decision">;
|
|
449
545
|
description: z.ZodOptional<z.ZodString>;
|
|
450
546
|
on: z.ZodString;
|
|
451
547
|
branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
548
|
+
group: z.ZodOptional<z.ZodString>;
|
|
452
549
|
}, z.core.$loose>], "type">;
|
|
453
550
|
type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
|
|
454
551
|
declare const WorkflowSchema: z.ZodObject<{
|
|
@@ -456,21 +553,54 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
456
553
|
entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
457
554
|
trigger: z.ZodOptional<z.ZodString>;
|
|
458
555
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
556
|
+
type: z.ZodLiteral<"delegate">;
|
|
557
|
+
description: z.ZodOptional<z.ZodString>;
|
|
558
|
+
task: z.ZodString;
|
|
559
|
+
from_agent: z.ZodString;
|
|
560
|
+
group: z.ZodOptional<z.ZodString>;
|
|
561
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
562
|
+
condition: z.ZodString;
|
|
563
|
+
fix_task: z.ZodString;
|
|
564
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
565
|
+
}, z.core.$strip>>;
|
|
566
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
567
|
+
type: z.ZodLiteral<"gate">;
|
|
568
|
+
description: z.ZodOptional<z.ZodString>;
|
|
569
|
+
gate_kind: z.ZodString;
|
|
570
|
+
group: z.ZodOptional<z.ZodString>;
|
|
571
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
459
572
|
type: z.ZodLiteral<"handoff">;
|
|
460
573
|
description: z.ZodOptional<z.ZodString>;
|
|
461
574
|
handoff_kind: z.ZodString;
|
|
462
575
|
task: z.ZodOptional<z.ZodString>;
|
|
463
576
|
from_agent: z.ZodOptional<z.ZodString>;
|
|
577
|
+
group: z.ZodOptional<z.ZodString>;
|
|
578
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
condition: z.ZodString;
|
|
580
|
+
fix_task: z.ZodString;
|
|
581
|
+
revalidate_task: z.ZodOptional<z.ZodString>;
|
|
582
|
+
}, z.core.$strip>>;
|
|
464
583
|
}, z.core.$loose>, z.ZodObject<{
|
|
465
584
|
type: z.ZodLiteral<"validation">;
|
|
466
585
|
description: z.ZodOptional<z.ZodString>;
|
|
467
586
|
validation: z.ZodString;
|
|
587
|
+
group: z.ZodOptional<z.ZodString>;
|
|
468
588
|
}, z.core.$loose>, z.ZodObject<{
|
|
469
589
|
type: z.ZodLiteral<"decision">;
|
|
470
590
|
description: z.ZodOptional<z.ZodString>;
|
|
471
591
|
on: z.ZodString;
|
|
472
592
|
branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
593
|
+
group: z.ZodOptional<z.ZodString>;
|
|
473
594
|
}, z.core.$loose>], "type">>;
|
|
595
|
+
external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
596
|
+
id: z.ZodString;
|
|
597
|
+
kind: z.ZodEnum<{
|
|
598
|
+
actor: "actor";
|
|
599
|
+
participant: "participant";
|
|
600
|
+
}>;
|
|
601
|
+
label: z.ZodString;
|
|
602
|
+
description: z.ZodOptional<z.ZodString>;
|
|
603
|
+
}, z.core.$strip>>>;
|
|
474
604
|
}, z.core.$loose>;
|
|
475
605
|
type Workflow = z.infer<typeof WorkflowSchema>;
|
|
476
606
|
|
|
@@ -762,4 +892,4 @@ declare class ConfigLoadError extends Error {
|
|
|
762
892
|
declare function loadConfig(configPath?: string): Promise<ResolvedConfig | null>;
|
|
763
893
|
declare function resolveDslPath(dirArg: string | undefined, dirArgDefault: string, config: ResolvedConfig | null): string;
|
|
764
894
|
|
|
765
|
-
export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, CONTEXT_TYPES, ConfigLoadError, type ContextType, ContextTypeSchema, type DelegatableTaskView, type DiagnosticMessage, type Dsl, DslLoadError, DslSchema, type EscalationCriterion, EscalationCriterionSchema, type ExecutionStep, ExecutionStepSchema, type Extends, ExtendsSchema, type GlobalContext, type HandoffType, HandoffTypeSchema, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, MergeError, type MergeableRecord, type MergedBehavioralSpec, type PerAgentContext, type PerArtifactContext, 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 ResolveResult, type ResolvedConfig, type ResolvedRenderTarget, type Rule, RuleSchema, type SchemaValidationResult, type Severity, type System, type SystemContext, SystemSchema, type Task, TaskSchema, type Tool, ToolSchema, type Validation, ValidationSchema, type VersionLiteral, VersionLiteralSchema, type Workflow, WorkflowSchema, type WorkflowStep, WorkflowStepSchema, buildArtifactContext, buildGlobalContext, buildHandoffTypeContext, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, lint, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveBase, resolveDslPath, spectralLint, validateSchema };
|
|
895
|
+
export { type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, ArtifactSchema, BaseResolveError, CONTEXT_TYPES, type Command, CommandSchema, ConfigLoadError, type ContextType, ContextTypeSchema, type DelegatableTaskView, type DiagnosticMessage, type Dsl, DslLoadError, DslSchema, type EscalationCriterion, EscalationCriterionSchema, type ExecutionStep, ExecutionStepSchema, type Extends, ExtendsSchema, type ExternalParticipant, type GlobalContext, type HandoffType, HandoffTypeSchema, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, MergeError, type MergeableRecord, type MergedBehavioralSpec, type PerAgentContext, type PerArtifactContext, 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 ResolveResult, type ResolvedConfig, type ResolvedRenderTarget, type Retry, type Rule, RuleSchema, type SchemaValidationResult, type Severity, type System, type SystemContext, SystemSchema, type Task, TaskSchema, type Tool, ToolSchema, type Validation, ValidationSchema, type VersionLiteral, VersionLiteralSchema, type Workflow, WorkflowSchema, type WorkflowStep, WorkflowStepSchema, buildArtifactContext, buildGlobalContext, buildHandoffTypeContext, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, lint, loadConfig, loadDsl, mergeDsl, renderFromConfig, resolve, resolveBase, resolveDslPath, spectralLint, validateSchema };
|