agent-contracts 0.25.0 → 0.30.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/cli-contract.yaml CHANGED
@@ -1,9 +1,9 @@
1
1
  # yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
2
- cliContracts: 0.1.0
2
+ cli_contracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: agent-contracts CLI
6
- version: 0.22.6
6
+ version: 0.30.0
7
7
  description: >-
8
8
  Declarative YAML DSL toolkit for defining, validating, and rendering
9
9
  multi-agent development workflows. Provides static validation,
@@ -15,12 +15,12 @@ info:
15
15
  name: foo-ogawa
16
16
  url: https://github.com/foo-ogawa/agent-contracts
17
17
 
18
- commandSets:
18
+ command_sets:
19
19
  agent-contracts:
20
20
  summary: Agent contracts tooling — validate, lint, render DSL files.
21
21
  executable: agent-contracts
22
22
 
23
- globalOptions:
23
+ global_options:
24
24
  - name: version
25
25
  aliases: [V]
26
26
  description: Print version and exit.
@@ -59,31 +59,31 @@ commandSets:
59
59
  file:
60
60
  mode: read
61
61
  exists: true
62
- mediaType: application/yaml
62
+ media_type: application/yaml
63
63
  encoding: utf-8
64
64
 
65
65
  options:
66
66
  - name: config
67
67
  aliases: [c]
68
68
  description: Path to agent-contracts.config.yaml.
69
- valueName: path
69
+ value_name: path
70
70
  schema:
71
71
  type: string
72
72
  file:
73
73
  mode: read
74
74
  exists: false
75
- mediaType: application/yaml
75
+ media_type: application/yaml
76
76
  encoding: utf-8
77
77
 
78
78
  - name: team
79
79
  description: Limit to one team (multi-team config only).
80
- valueName: id
80
+ value_name: id
81
81
  schema:
82
82
  type: string
83
83
 
84
84
  - name: format
85
85
  description: Output format.
86
- valueName: format
86
+ value_name: format
87
87
  schema:
88
88
  type: string
89
89
  enum: [text, json]
@@ -103,7 +103,7 @@ commandSets:
103
103
  description: Resolved DSL output successfully.
104
104
  stdout:
105
105
  format: '{options.format}'
106
- schemaNote: >-
106
+ schema_note: >-
107
107
  Output format depends on --format option. Defaults to
108
108
  text (YAML representation); json produces a JSON object.
109
109
 
@@ -138,31 +138,31 @@ commandSets:
138
138
  file:
139
139
  mode: read
140
140
  exists: true
141
- mediaType: application/yaml
141
+ media_type: application/yaml
142
142
  encoding: utf-8
143
143
 
144
144
  options:
145
145
  - name: config
146
146
  aliases: [c]
147
147
  description: Path to agent-contracts.config.yaml.
148
- valueName: path
148
+ value_name: path
149
149
  schema:
150
150
  type: string
151
151
  file:
152
152
  mode: read
153
153
  exists: false
154
- mediaType: application/yaml
154
+ media_type: application/yaml
155
155
  encoding: utf-8
156
156
 
157
157
  - name: team
158
158
  description: Limit to one team (multi-team config only).
159
- valueName: id
159
+ value_name: id
160
160
  schema:
161
161
  type: string
162
162
 
163
163
  - name: format
164
164
  description: Diagnostic output format.
165
- valueName: format
165
+ value_name: format
166
166
  schema:
167
167
  type: string
168
168
  enum: [text, json]
@@ -185,7 +185,7 @@ commandSets:
185
185
  description: Validation passed. No errors found.
186
186
  stdout:
187
187
  format: '{options.format}'
188
- schemaNote: >-
188
+ schema_note: >-
189
189
  Output format depends on --format option. Text shows
190
190
  human-readable diagnostics; json produces structured
191
191
  validation results.
@@ -220,31 +220,31 @@ commandSets:
220
220
  file:
221
221
  mode: read
222
222
  exists: true
223
- mediaType: application/yaml
223
+ media_type: application/yaml
224
224
  encoding: utf-8
225
225
 
226
226
  options:
227
227
  - name: config
228
228
  aliases: [c]
229
229
  description: Path to agent-contracts.config.yaml.
230
- valueName: path
230
+ value_name: path
231
231
  schema:
232
232
  type: string
233
233
  file:
234
234
  mode: read
235
235
  exists: false
236
- mediaType: application/yaml
236
+ media_type: application/yaml
237
237
  encoding: utf-8
238
238
 
239
239
  - name: team
240
240
  description: Limit to one team (multi-team config only).
241
- valueName: id
241
+ value_name: id
242
242
  schema:
243
243
  type: string
244
244
 
245
245
  - name: format
246
246
  description: Output format.
247
- valueName: format
247
+ value_name: format
248
248
  schema:
249
249
  type: string
250
250
  enum: [text, json]
@@ -267,7 +267,7 @@ commandSets:
267
267
  description: Lint passed. No errors or warnings.
268
268
  stdout:
269
269
  format: '{options.format}'
270
- schemaNote: >-
270
+ schema_note: >-
271
271
  Output format depends on --format option. Text shows
272
272
  human-readable diagnostics; json produces structured
273
273
  lint results.
@@ -295,13 +295,13 @@ commandSets:
295
295
  - agent-contracts render --quiet
296
296
 
297
297
  effects:
298
- riskLevel: medium
298
+ risk_level: medium
299
299
  writes:
300
300
  - target: "configured render output paths"
301
301
  description: "rendered template files from DSL input"
302
302
  overwrite: true
303
303
  idempotent: true
304
- idempotentNote: >-
304
+ idempotent_note: >-
305
305
  Output is deterministic from DSL input and templates.
306
306
  Repeated runs produce identical files.
307
307
 
@@ -309,18 +309,18 @@ commandSets:
309
309
  - name: config
310
310
  aliases: [c]
311
311
  description: Path to agent-contracts.config.yaml.
312
- valueName: path
312
+ value_name: path
313
313
  schema:
314
314
  type: string
315
315
  file:
316
316
  mode: read
317
317
  exists: false
318
- mediaType: application/yaml
318
+ media_type: application/yaml
319
319
  encoding: utf-8
320
320
 
321
321
  - name: team
322
322
  description: Limit to one team (multi-team config only).
323
- valueName: id
323
+ value_name: id
324
324
  schema:
325
325
  type: string
326
326
 
@@ -350,7 +350,7 @@ commandSets:
350
350
  format: text
351
351
 
352
352
  x-agent:
353
- recommendedBeforeUse:
353
+ recommended_before_use:
354
354
  - Ensure agent-contracts.config.yaml exists with render targets.
355
355
  - Run validate first to confirm DSL is valid.
356
356
 
@@ -374,24 +374,24 @@ commandSets:
374
374
  - name: config
375
375
  aliases: [c]
376
376
  description: Path to agent-contracts.config.yaml.
377
- valueName: path
377
+ value_name: path
378
378
  schema:
379
379
  type: string
380
380
  file:
381
381
  mode: read
382
382
  exists: false
383
- mediaType: application/yaml
383
+ media_type: application/yaml
384
384
  encoding: utf-8
385
385
 
386
386
  - name: team
387
387
  description: Limit to one team (multi-team config only).
388
- valueName: id
388
+ value_name: id
389
389
  schema:
390
390
  type: string
391
391
 
392
392
  - name: format
393
393
  description: Diagnostic output format.
394
- valueName: format
394
+ value_name: format
395
395
  schema:
396
396
  type: string
397
397
  enum: [text, json]
@@ -414,7 +414,7 @@ commandSets:
414
414
  description: All checks passed.
415
415
  stdout:
416
416
  format: '{options.format}'
417
- schemaNote: >-
417
+ schema_note: >-
418
418
  Output format depends on --format option. Text shows
419
419
  human-readable pipeline summary; json produces structured
420
420
  results per pipeline stage.
@@ -427,7 +427,7 @@ commandSets:
427
427
  format: text
428
428
 
429
429
  x-agent:
430
- recommendedBeforeUse:
430
+ recommended_before_use:
431
431
  - Ensure agent-contracts.config.yaml exists.
432
432
 
433
433
  # ── score ─────────────────────────────────────────
@@ -457,31 +457,31 @@ commandSets:
457
457
  file:
458
458
  mode: read
459
459
  exists: true
460
- mediaType: application/yaml
460
+ media_type: application/yaml
461
461
  encoding: utf-8
462
462
 
463
463
  options:
464
464
  - name: config
465
465
  aliases: [c]
466
466
  description: Path to agent-contracts.config.yaml.
467
- valueName: path
467
+ value_name: path
468
468
  schema:
469
469
  type: string
470
470
  file:
471
471
  mode: read
472
472
  exists: false
473
- mediaType: application/yaml
473
+ media_type: application/yaml
474
474
  encoding: utf-8
475
475
 
476
476
  - name: team
477
477
  description: Limit to one team (multi-team config only).
478
- valueName: id
478
+ value_name: id
479
479
  schema:
480
480
  type: string
481
481
 
482
482
  - name: format
483
483
  description: Output format.
484
- valueName: format
484
+ value_name: format
485
485
  schema:
486
486
  type: string
487
487
  enum: [text, json]
@@ -489,7 +489,7 @@ commandSets:
489
489
 
490
490
  - name: threshold
491
491
  description: Minimum score; exit 1 if below (for CI gates).
492
- valueName: number
492
+ value_name: number
493
493
  schema:
494
494
  type: integer
495
495
 
@@ -498,7 +498,7 @@ commandSets:
498
498
  description: Score calculated (and above threshold if specified).
499
499
  stdout:
500
500
  format: '{options.format}'
501
- schemaNote: >-
501
+ schema_note: >-
502
502
  Output format depends on --format option. Text shows
503
503
  human-readable score breakdown; json produces structured
504
504
  score object with per-dimension details.
@@ -534,14 +534,14 @@ commandSets:
534
534
  - agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
535
535
 
536
536
  effects:
537
- riskLevel: medium
537
+ risk_level: medium
538
538
  network:
539
539
  description: >-
540
540
  LLM API calls to configured adapter (e.g. OpenAI,
541
541
  Gemini, Cursor). Incurs token cost and sends DSL
542
542
  content to the LLM provider.
543
543
  idempotent: false
544
- idempotentNote: >-
544
+ idempotent_note: >-
545
545
  LLM inference is non-deterministic — identical inputs
546
546
  may produce different findings across runs.
547
547
 
@@ -563,24 +563,24 @@ commandSets:
563
563
  - name: config
564
564
  aliases: [c]
565
565
  description: Path to agent-contracts.config.yaml.
566
- valueName: path
566
+ value_name: path
567
567
  schema:
568
568
  type: string
569
569
  file:
570
570
  mode: read
571
571
  exists: false
572
- mediaType: application/yaml
572
+ media_type: application/yaml
573
573
  encoding: utf-8
574
574
 
575
575
  - name: team
576
576
  description: Limit to one team (multi-team config only).
577
- valueName: id
577
+ value_name: id
578
578
  schema:
579
579
  type: string
580
580
 
581
581
  - name: format
582
582
  description: Output format.
583
- valueName: format
583
+ value_name: format
584
584
  schema:
585
585
  type: string
586
586
  enum: [text, json, markdown]
@@ -590,7 +590,7 @@ commandSets:
590
590
  description: >-
591
591
  Limit audit scope to specified entities
592
592
  (e.g. agents:architect,implementer).
593
- valueName: entities
593
+ value_name: entities
594
594
  schema:
595
595
  type: string
596
596
 
@@ -604,13 +604,13 @@ commandSets:
604
604
  description: >-
605
605
  SDK adapter to use for LLM calls
606
606
  (overrides config audit.adapter).
607
- valueName: name
607
+ value_name: name
608
608
  schema:
609
609
  type: string
610
610
 
611
611
  - name: model
612
612
  description: LLM model override (overrides config audit.model).
613
- valueName: name
613
+ value_name: name
614
614
  schema:
615
615
  type: string
616
616
 
@@ -618,7 +618,7 @@ commandSets:
618
618
  description: >-
619
619
  Minimum finding severity that causes exit 10
620
620
  (info|warning|error|critical).
621
- valueName: level
621
+ value_name: level
622
622
  schema:
623
623
  type: string
624
624
  enum: [info, warning, error, critical]
@@ -627,7 +627,7 @@ commandSets:
627
627
  - name: output
628
628
  aliases: [o]
629
629
  description: Write result to a file instead of stdout.
630
- valueName: file
630
+ value_name: file
631
631
  schema:
632
632
  type: string
633
633
  file:
@@ -638,7 +638,7 @@ commandSets:
638
638
  description: >-
639
639
  Alias for --format. When both are specified, --report-format
640
640
  takes precedence.
641
- valueName: fmt
641
+ value_name: fmt
642
642
  schema:
643
643
  type: string
644
644
  enum: [text, json, markdown]
@@ -665,7 +665,7 @@ commandSets:
665
665
  $ref: './dsl_base/components.yaml#/schemas/agent-audit-result'
666
666
  stderr:
667
667
  format: text
668
- schemaNote: >-
668
+ schema_note: >-
669
669
  Summary diagnostic on stderr. Structured findings are
670
670
  emitted on stdout in the requested format.
671
671
 
@@ -681,8 +681,8 @@ commandSets:
681
681
  format: text
682
682
 
683
683
  x-agent:
684
- retryableExitCodes: [12]
685
- recommendedBeforeUse:
684
+ retryable_exit_codes: [12]
685
+ recommended_before_use:
686
686
  - Ensure agent-contracts.config.yaml exists with render targets.
687
687
  - Run validate first to confirm DSL is valid.
688
688
  - Install agent-contracts-runtime if not using --dry-run.
@@ -711,7 +711,7 @@ commandSets:
711
711
  - agent-contracts generate interface -o team-interface.yaml --dry-run
712
712
 
713
713
  effects:
714
- riskLevel: low
714
+ risk_level: low
715
715
  writes:
716
716
  - target: "configured render, guardrail, and interface output paths"
717
717
  description: >-
@@ -719,7 +719,7 @@ commandSets:
719
719
  interface files generated from DSL input
720
720
  overwrite: true
721
721
  idempotent: true
722
- idempotentNote: >-
722
+ idempotent_note: >-
723
723
  Output is deterministic from DSL input, templates,
724
724
  policies, and bindings. Repeated runs produce
725
725
  identical files.
@@ -738,18 +738,18 @@ commandSets:
738
738
  - name: config
739
739
  aliases: [c]
740
740
  description: Path to agent-contracts.config.yaml.
741
- valueName: path
741
+ value_name: path
742
742
  schema:
743
743
  type: string
744
744
  file:
745
745
  mode: read
746
746
  exists: false
747
- mediaType: application/yaml
747
+ media_type: application/yaml
748
748
  encoding: utf-8
749
749
 
750
750
  - name: team
751
751
  description: Limit to one team (multi-team config only).
752
- valueName: id
752
+ value_name: id
753
753
  schema:
754
754
  type: string
755
755
 
@@ -763,7 +763,7 @@ commandSets:
763
763
 
764
764
  - name: binding
765
765
  description: Filter to specific software binding(s). Guardrails type only.
766
- valueName: name
766
+ value_name: name
767
767
  repeatable: true
768
768
  schema:
769
769
  type: string
@@ -771,17 +771,17 @@ commandSets:
771
771
  - name: output
772
772
  aliases: [o]
773
773
  description: Output path for generated team interface. Interface type only.
774
- valueName: path
774
+ value_name: path
775
775
  schema:
776
776
  type: string
777
777
  file:
778
778
  mode: write
779
- mediaType: application/yaml
779
+ media_type: application/yaml
780
780
  encoding: utf-8
781
781
 
782
782
  - name: format
783
783
  description: Output format for team interface (yaml or json). Interface type only.
784
- valueName: format
784
+ value_name: format
785
785
  schema:
786
786
  type: string
787
787
  enum: [yaml, json]
@@ -813,6 +813,89 @@ commandSets:
813
813
  format: text
814
814
 
815
815
  x-agent:
816
- recommendedBeforeUse:
816
+ recommended_before_use:
817
817
  - Ensure agent-contracts.config.yaml exists with render targets and/or binding definitions.
818
818
  - Run validate first to confirm DSL is valid.
819
+
820
+ # ── navigation-index ──────────────────────────────
821
+ navigation-index:
822
+ summary: Build artifact-centric navigation index from resolved DSL.
823
+ description: >-
824
+ Compiles a structured navigation index that maps each artifact
825
+ to its operations (producer, validator, consumer tools), agent
826
+ permissions (owner, editor, reader), inter-artifact relations,
827
+ and recommended action routes. The index is a queryable model
828
+ for runtime planners, guardrails, and governance tools.
829
+ usage:
830
+ - agent-contracts navigation-index
831
+ - agent-contracts navigation-index --format json
832
+ - agent-contracts navigation-index --artifact api-contracts
833
+ - agent-contracts navigation-index -c agent-contracts.config.yaml
834
+
835
+ arguments:
836
+ - name: dir
837
+ index: 0
838
+ required: false
839
+ description: Path to agent-contracts.yaml.
840
+ schema:
841
+ type: string
842
+ default: agent-contracts.yaml
843
+ file:
844
+ mode: read
845
+ exists: true
846
+ media_type: application/yaml
847
+ encoding: utf-8
848
+
849
+ options:
850
+ - name: config
851
+ aliases: [c]
852
+ description: Path to agent-contracts.config.yaml.
853
+ value_name: path
854
+ schema:
855
+ type: string
856
+ file:
857
+ mode: read
858
+ exists: false
859
+ media_type: application/yaml
860
+ encoding: utf-8
861
+
862
+ - name: team
863
+ description: Limit to one team (multi-team config only).
864
+ value_name: id
865
+ schema:
866
+ type: string
867
+
868
+ - name: format
869
+ description: Output format.
870
+ value_name: format
871
+ schema:
872
+ type: string
873
+ enum: [json, yaml]
874
+ default: json
875
+
876
+ - name: artifact
877
+ description: Filter output to a single artifact by ID.
878
+ value_name: id
879
+ schema:
880
+ type: string
881
+
882
+ - name: quiet
883
+ description: Suppress informational output.
884
+ schema:
885
+ type: boolean
886
+ default: false
887
+
888
+ exits:
889
+ '0':
890
+ description: Navigation index built successfully.
891
+ stdout:
892
+ format: '{options.format}'
893
+ schema_note: >-
894
+ Output format depends on --format option. JSON produces a
895
+ ProjectNavigationIndex object; yaml produces its YAML
896
+ representation.
897
+
898
+ '1':
899
+ description: Build failed — schema validation error, config error, or resolution failure.
900
+ stderr:
901
+ format: text