agent-contracts 0.7.0 → 0.8.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
@@ -168,6 +168,7 @@ declare const DslSchema: z.ZodObject<{
168
168
  abort_on_failure: z.ZodOptional<z.ZodBoolean>;
169
169
  uses_tool: z.ZodOptional<z.ZodString>;
170
170
  produces_artifact: z.ZodOptional<z.ZodString>;
171
+ reads_artifact: z.ZodOptional<z.ZodString>;
171
172
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
172
173
  skip_condition: z.ZodOptional<z.ZodString>;
173
174
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -214,6 +215,13 @@ declare const DslSchema: z.ZodObject<{
214
215
  output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
215
216
  invokable_by: z.ZodArray<z.ZodString>;
216
217
  side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
218
+ commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
219
+ command: z.ZodString;
220
+ category: z.ZodString;
221
+ reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
222
+ writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
223
+ purpose: z.ZodOptional<z.ZodString>;
224
+ }, z.core.$strip>>>;
217
225
  }, z.core.$loose>>>;
218
226
  validations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
219
227
  target_artifact: z.ZodString;
@@ -238,6 +246,7 @@ declare const DslSchema: z.ZodObject<{
238
246
  example: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
239
247
  }, z.core.$loose>>>;
240
248
  workflow: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
249
+ description: z.ZodOptional<z.ZodString>;
241
250
  entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
242
251
  trigger: z.ZodOptional<z.ZodString>;
243
252
  steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -246,16 +255,33 @@ declare const DslSchema: z.ZodObject<{
246
255
  handoff_kind: z.ZodString;
247
256
  task: z.ZodOptional<z.ZodString>;
248
257
  from_agent: z.ZodOptional<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>>;
249
264
  }, z.core.$loose>, z.ZodObject<{
250
265
  type: z.ZodLiteral<"validation">;
251
266
  description: z.ZodOptional<z.ZodString>;
252
267
  validation: z.ZodString;
268
+ group: z.ZodOptional<z.ZodString>;
253
269
  }, z.core.$loose>, z.ZodObject<{
254
270
  type: z.ZodLiteral<"decision">;
255
271
  description: z.ZodOptional<z.ZodString>;
256
272
  on: z.ZodString;
257
273
  branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
274
+ group: z.ZodOptional<z.ZodString>;
258
275
  }, z.core.$loose>], "type">>;
276
+ external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
277
+ id: z.ZodString;
278
+ kind: z.ZodEnum<{
279
+ actor: "actor";
280
+ participant: "participant";
281
+ }>;
282
+ label: z.ZodString;
283
+ description: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strip>>>;
259
285
  }, z.core.$loose>>>;
260
286
  policies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
261
287
  when: z.ZodObject<{
@@ -348,6 +374,7 @@ declare const ExecutionStepSchema: z.ZodObject<{
348
374
  abort_on_failure: z.ZodOptional<z.ZodBoolean>;
349
375
  uses_tool: z.ZodOptional<z.ZodString>;
350
376
  produces_artifact: z.ZodOptional<z.ZodString>;
377
+ reads_artifact: z.ZodOptional<z.ZodString>;
351
378
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
352
379
  skip_condition: z.ZodOptional<z.ZodString>;
353
380
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -372,6 +399,7 @@ declare const TaskSchema: z.ZodObject<{
372
399
  abort_on_failure: z.ZodOptional<z.ZodBoolean>;
373
400
  uses_tool: z.ZodOptional<z.ZodString>;
374
401
  produces_artifact: z.ZodOptional<z.ZodString>;
402
+ reads_artifact: z.ZodOptional<z.ZodString>;
375
403
  depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
376
404
  skip_condition: z.ZodOptional<z.ZodString>;
377
405
  wait_for_approval: z.ZodOptional<z.ZodBoolean>;
@@ -402,6 +430,14 @@ declare const TaskSchema: z.ZodObject<{
402
430
  }, z.core.$loose>;
403
431
  type Task = z.infer<typeof TaskSchema>;
404
432
 
433
+ declare const CommandSchema: z.ZodObject<{
434
+ command: z.ZodString;
435
+ category: z.ZodString;
436
+ reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
437
+ writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
438
+ purpose: z.ZodOptional<z.ZodString>;
439
+ }, z.core.$strip>;
440
+ type Command = z.infer<typeof CommandSchema>;
405
441
  declare const ToolSchema: z.ZodObject<{
406
442
  kind: z.ZodString;
407
443
  description: z.ZodOptional<z.ZodString>;
@@ -409,6 +445,13 @@ declare const ToolSchema: z.ZodObject<{
409
445
  output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
410
446
  invokable_by: z.ZodArray<z.ZodString>;
411
447
  side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
448
+ commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
449
+ command: z.ZodString;
450
+ category: z.ZodString;
451
+ reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
452
+ writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
453
+ purpose: z.ZodOptional<z.ZodString>;
454
+ }, z.core.$strip>>>;
412
455
  }, z.core.$loose>;
413
456
  type Tool = z.infer<typeof ToolSchema>;
414
457
 
@@ -430,24 +473,49 @@ declare const ValidationSchema: z.ZodObject<{
430
473
  }, z.core.$loose>;
431
474
  type Validation = z.infer<typeof ValidationSchema>;
432
475
 
476
+ declare const RetrySchema: z.ZodObject<{
477
+ condition: z.ZodString;
478
+ fix_task: z.ZodString;
479
+ revalidate_task: z.ZodOptional<z.ZodString>;
480
+ }, z.core.$strip>;
481
+ type Retry = z.infer<typeof RetrySchema>;
482
+ declare const ExternalParticipantSchema: z.ZodObject<{
483
+ id: z.ZodString;
484
+ kind: z.ZodEnum<{
485
+ actor: "actor";
486
+ participant: "participant";
487
+ }>;
488
+ label: z.ZodString;
489
+ description: z.ZodOptional<z.ZodString>;
490
+ }, z.core.$strip>;
491
+ type ExternalParticipant = z.infer<typeof ExternalParticipantSchema>;
433
492
  declare const WorkflowStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
434
493
  type: z.ZodLiteral<"handoff">;
435
494
  description: z.ZodOptional<z.ZodString>;
436
495
  handoff_kind: z.ZodString;
437
496
  task: z.ZodOptional<z.ZodString>;
438
497
  from_agent: z.ZodOptional<z.ZodString>;
498
+ group: z.ZodOptional<z.ZodString>;
499
+ retry: z.ZodOptional<z.ZodObject<{
500
+ condition: z.ZodString;
501
+ fix_task: z.ZodString;
502
+ revalidate_task: z.ZodOptional<z.ZodString>;
503
+ }, z.core.$strip>>;
439
504
  }, z.core.$loose>, z.ZodObject<{
440
505
  type: z.ZodLiteral<"validation">;
441
506
  description: z.ZodOptional<z.ZodString>;
442
507
  validation: z.ZodString;
508
+ group: z.ZodOptional<z.ZodString>;
443
509
  }, z.core.$loose>, z.ZodObject<{
444
510
  type: z.ZodLiteral<"decision">;
445
511
  description: z.ZodOptional<z.ZodString>;
446
512
  on: z.ZodString;
447
513
  branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
514
+ group: z.ZodOptional<z.ZodString>;
448
515
  }, z.core.$loose>], "type">;
449
516
  type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
450
517
  declare const WorkflowSchema: z.ZodObject<{
518
+ description: z.ZodOptional<z.ZodString>;
451
519
  entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
452
520
  trigger: z.ZodOptional<z.ZodString>;
453
521
  steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -456,16 +524,33 @@ declare const WorkflowSchema: z.ZodObject<{
456
524
  handoff_kind: z.ZodString;
457
525
  task: z.ZodOptional<z.ZodString>;
458
526
  from_agent: z.ZodOptional<z.ZodString>;
527
+ group: z.ZodOptional<z.ZodString>;
528
+ retry: z.ZodOptional<z.ZodObject<{
529
+ condition: z.ZodString;
530
+ fix_task: z.ZodString;
531
+ revalidate_task: z.ZodOptional<z.ZodString>;
532
+ }, z.core.$strip>>;
459
533
  }, z.core.$loose>, z.ZodObject<{
460
534
  type: z.ZodLiteral<"validation">;
461
535
  description: z.ZodOptional<z.ZodString>;
462
536
  validation: z.ZodString;
537
+ group: z.ZodOptional<z.ZodString>;
463
538
  }, z.core.$loose>, z.ZodObject<{
464
539
  type: z.ZodLiteral<"decision">;
465
540
  description: z.ZodOptional<z.ZodString>;
466
541
  on: z.ZodString;
467
542
  branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
543
+ group: z.ZodOptional<z.ZodString>;
468
544
  }, z.core.$loose>], "type">>;
545
+ external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
546
+ id: z.ZodString;
547
+ kind: z.ZodEnum<{
548
+ actor: "actor";
549
+ participant: "participant";
550
+ }>;
551
+ label: z.ZodString;
552
+ description: z.ZodOptional<z.ZodString>;
553
+ }, z.core.$strip>>>;
469
554
  }, z.core.$loose>;
470
555
  type Workflow = z.infer<typeof WorkflowSchema>;
471
556
 
@@ -757,4 +842,4 @@ declare class ConfigLoadError extends Error {
757
842
  declare function loadConfig(configPath?: string): Promise<ResolvedConfig | null>;
758
843
  declare function resolveDslPath(dirArg: string | undefined, dirArgDefault: string, config: ResolvedConfig | null): string;
759
844
 
760
- 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 };
845
+ 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 };