agent-contracts 0.19.1 → 0.19.3

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 CHANGED
@@ -229,6 +229,7 @@ A **Workflow** defines a phase-level execution sequence:
229
229
  Workflow steps support additional properties:
230
230
 
231
231
  * `group` — consecutive steps with the same group are rendered as `par` (parallel) blocks in sequence diagrams
232
+ * `depends_on` — list of step task IDs that must complete before this step starts. When specified, the runtime can execute independent steps in parallel. When omitted, the step implicitly depends on all preceding steps (sequential execution)
232
233
  * `max_retries` (delegate steps) — maximum number of full task re-executions (new sessions) allowed per step. Defaults to `0` (no retries), or `1` when a `retry` block is present
233
234
  * `max_follow_ups` (delegate steps) — maximum number of lightweight same-session follow-up messages for output format corrections
234
235
  * `retry` (delegate steps) — defines a conditional retry loop with `condition`, `fix_task`, and optional `revalidate_task`. These are rendered as recovery instructions in the LLM prompt
package/cli-contract.yaml CHANGED
@@ -3,7 +3,7 @@ cliContracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: agent-contracts CLI
6
- version: 0.19.1
6
+ version: 0.19.2
7
7
  description: >-
8
8
  Declarative YAML DSL toolkit for defining, validating, and rendering
9
9
  multi-agent development workflows. Provides static validation,
@@ -102,7 +102,10 @@ commandSets:
102
102
  '0':
103
103
  description: Resolved DSL output successfully.
104
104
  stdout:
105
- format: text
105
+ format: '{options.format}'
106
+ schemaNote: >-
107
+ Output format depends on --format option. Defaults to
108
+ text (YAML representation); json produces a JSON object.
106
109
 
107
110
  '1':
108
111
  description: Resolution failed (file not found, parse error, or config error).
@@ -187,7 +190,11 @@ commandSets:
187
190
  '0':
188
191
  description: Validation passed. No errors found.
189
192
  stdout:
190
- format: text
193
+ format: '{options.format}'
194
+ schemaNote: >-
195
+ Output format depends on --format option. Text shows
196
+ human-readable diagnostics; json produces structured
197
+ validation results.
191
198
 
192
199
  '1':
193
200
  description: Validation failed or unexpected error.
@@ -271,7 +278,11 @@ commandSets:
271
278
  '0':
272
279
  description: Lint passed. No errors or warnings.
273
280
  stdout:
274
- format: text
281
+ format: '{options.format}'
282
+ schemaNote: >-
283
+ Output format depends on --format option. Text shows
284
+ human-readable diagnostics; json produces structured
285
+ lint results.
275
286
 
276
287
  '1':
277
288
  description: Lint failed or unexpected error.
@@ -344,8 +355,17 @@ commandSets:
344
355
  riskLevel: medium
345
356
  requiresConfirmation: false
346
357
  idempotent: true
358
+ idempotentNote: >-
359
+ Output is deterministic from DSL input and templates.
360
+ Repeated runs produce identical files. Confirmation is not
361
+ required because the command is idempotent and --check
362
+ provides a side-effect-free preview mode.
347
363
  sideEffects:
348
364
  - file_write
365
+ sideEffectNote: >-
366
+ Writes rendered files to configured output paths. No file
367
+ writes occur when --check is specified.
368
+ safeDryRunOption: check
349
369
  recommendedBeforeUse:
350
370
  - Ensure agent-contracts.config.yaml exists with render targets.
351
371
  - Run validate first to confirm DSL is valid.
@@ -354,10 +374,13 @@ commandSets:
354
374
  check:
355
375
  summary: Run full pipeline — resolve, validate, lint, render --check.
356
376
  description: >-
357
- Executes the complete verification pipeline in order: resolve
358
- DSL, validate schema and references, run lint rules, and check
359
- for render drift. Also verifies cross-team interface imports
360
- and team-interface.yaml drift when applicable.
377
+ Executes the complete verification pipeline in order:
378
+ (1) resolve DSL, (2) validate schema and references,
379
+ (3) run lint rules, (4) check render drift via render --check.
380
+ Steps 1–4 always run. Additionally, when the DSL declares
381
+ cross-team interfaces, (5) verifies interface import
382
+ consistency and (6) checks team-interface.yaml drift.
383
+ Steps 5–6 are skipped when no cross-team interfaces exist.
361
384
  usage:
362
385
  - agent-contracts check -c agent-contracts.config.yaml
363
386
  - agent-contracts check -c agent-contracts.config.yaml --strict
@@ -406,7 +429,11 @@ commandSets:
406
429
  '0':
407
430
  description: All checks passed.
408
431
  stdout:
409
- format: text
432
+ format: '{options.format}'
433
+ schemaNote: >-
434
+ Output format depends on --format option. Text shows
435
+ human-readable pipeline summary; json produces structured
436
+ results per pipeline stage.
410
437
 
411
438
  '1':
412
439
  description: >-
@@ -490,7 +517,11 @@ commandSets:
490
517
  '0':
491
518
  description: Score calculated (and above threshold if specified).
492
519
  stdout:
493
- format: text
520
+ format: '{options.format}'
521
+ schemaNote: >-
522
+ Output format depends on --format option. Text shows
523
+ human-readable score breakdown; json produces structured
524
+ score object with per-dimension details.
494
525
 
495
526
  '1':
496
527
  description: >-
@@ -598,12 +629,25 @@ commandSets:
598
629
  '0':
599
630
  description: No critical findings detected.
600
631
  stdout:
601
- format: text
632
+ format: '{options.format}'
633
+ schemaNote: >-
634
+ Audit findings are always emitted on stdout as the primary
635
+ output. Format depends on --format option (text, json, or
636
+ markdown).
602
637
 
603
638
  '1':
604
639
  description: Critical findings detected.
605
- stdout:
640
+ stderr:
606
641
  format: text
642
+ schemaNote: >-
643
+ Summary diagnostic on stderr. Structured findings are
644
+ emitted on stdout in the requested --format.
645
+ stdout:
646
+ format: '{options.format}'
647
+ schemaNote: >-
648
+ Full findings output. Exit 1 indicates at least one
649
+ critical-severity finding exists; the findings themselves
650
+ are valid structured data, not error messages.
607
651
 
608
652
  '2':
609
653
  description: Invalid input or configuration error.
@@ -616,10 +660,18 @@ commandSets:
616
660
  format: text
617
661
 
618
662
  x-agent:
619
- riskLevel: low
663
+ riskLevel: medium
620
664
  requiresConfirmation: false
621
665
  idempotent: true
622
- sideEffects: []
666
+ sideEffects:
667
+ - network
668
+ sideEffectNote: >-
669
+ Makes LLM API calls to the configured adapter (e.g. OpenAI,
670
+ Gemini, Cursor) unless --dry-run is specified. Incurs token
671
+ cost and sends DSL content to the LLM provider.
672
+ safeDryRunOption: dry-run
673
+ expectedDurationMs: 120000
674
+ retryableExitCodes: [3]
623
675
  recommendedBeforeUse:
624
676
  - Ensure agent-contracts.config.yaml exists with render targets.
625
677
  - Run validate first to confirm DSL is valid.
@@ -685,6 +737,10 @@ commandSets:
685
737
  valueName: path
686
738
  schema:
687
739
  type: string
740
+ file:
741
+ mode: write
742
+ mediaType: application/yaml
743
+ encoding: utf-8
688
744
 
689
745
  - name: format
690
746
  description: Output format for team interface (yaml or json). Interface type only.
@@ -723,8 +779,19 @@ commandSets:
723
779
  riskLevel: medium
724
780
  requiresConfirmation: false
725
781
  idempotent: true
782
+ idempotentNote: >-
783
+ Output is deterministic from DSL input, policies, and
784
+ bindings. Repeated runs produce identical files.
785
+ Confirmation is not required because the command is
786
+ idempotent and --dry-run provides a side-effect-free
787
+ preview mode.
726
788
  sideEffects:
727
789
  - file_write
790
+ sideEffectNote: >-
791
+ Writes guardrail binding files or team interface files to
792
+ configured output paths. No file writes occur when
793
+ --dry-run is specified.
794
+ safeDryRunOption: dry-run
728
795
  recommendedBeforeUse:
729
796
  - Ensure agent-contracts.config.yaml exists with binding definitions.
730
797
  - Run validate first to confirm DSL is valid.
package/dist/cli.js CHANGED
@@ -48983,6 +48983,7 @@ var WorkflowDelegateStepSchema = z14.object({
48983
48983
  task: z14.string(),
48984
48984
  from_agent: z14.string(),
48985
48985
  group: z14.string().optional(),
48986
+ depends_on: z14.array(z14.string()).optional(),
48986
48987
  max_retries: z14.number().int().min(0).optional(),
48987
48988
  max_follow_ups: z14.number().int().min(0).optional(),
48988
48989
  retry: RetrySchema.optional()
@@ -48991,7 +48992,8 @@ var WorkflowGateStepSchema = z14.object({
48991
48992
  type: z14.literal("gate"),
48992
48993
  description: z14.string().optional(),
48993
48994
  gate_kind: z14.string(),
48994
- group: z14.string().optional()
48995
+ group: z14.string().optional(),
48996
+ depends_on: z14.array(z14.string()).optional()
48995
48997
  }).passthrough();
48996
48998
  var WorkflowHandoffStepSchema = z14.object({
48997
48999
  type: z14.literal("handoff"),
@@ -49000,13 +49002,15 @@ var WorkflowHandoffStepSchema = z14.object({
49000
49002
  task: z14.string().optional(),
49001
49003
  from_agent: z14.string().optional(),
49002
49004
  group: z14.string().optional(),
49005
+ depends_on: z14.array(z14.string()).optional(),
49003
49006
  retry: RetrySchema.optional()
49004
49007
  }).passthrough();
49005
49008
  var WorkflowValidationStepSchema = z14.object({
49006
49009
  type: z14.literal("validation"),
49007
49010
  description: z14.string().optional(),
49008
49011
  validation: z14.string(),
49009
- group: z14.string().optional()
49012
+ group: z14.string().optional(),
49013
+ depends_on: z14.array(z14.string()).optional()
49010
49014
  }).passthrough();
49011
49015
  var WorkflowDecisionStepSchema = z14.object({
49012
49016
  type: z14.literal("decision"),
@@ -49015,7 +49019,8 @@ var WorkflowDecisionStepSchema = z14.object({
49015
49019
  on: z14.string().optional(),
49016
49020
  routing_key: z14.string().optional(),
49017
49021
  branches: z14.record(z14.string(), z14.array(z14.string())),
49018
- group: z14.string().optional()
49022
+ group: z14.string().optional(),
49023
+ depends_on: z14.array(z14.string()).optional()
49019
49024
  }).passthrough();
49020
49025
  var WorkflowTeamTaskStepSchema = z14.object({
49021
49026
  type: z14.literal("team_task"),
@@ -49024,7 +49029,8 @@ var WorkflowTeamTaskStepSchema = z14.object({
49024
49029
  workflow: z14.string(),
49025
49030
  handoff: z14.string(),
49026
49031
  expects: z14.string(),
49027
- group: z14.string().optional()
49032
+ group: z14.string().optional(),
49033
+ depends_on: z14.array(z14.string()).optional()
49028
49034
  }).passthrough();
49029
49035
  var WorkflowStepSchema = z14.discriminatedUnion("type", [
49030
49036
  WorkflowDelegateStepSchema,