micro-contracts 0.17.1 → 0.17.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.
@@ -13,6 +13,7 @@ Contract-first OpenAPI toolchain for TypeScript Web/API systems. Generates contr
13
13
  - [check](#micro-contracts-check)
14
14
  - [pipeline](#micro-contracts-pipeline)
15
15
  - [deps](#micro-contracts-deps)
16
+ - [insights](#micro-contracts-insights)
16
17
  - [guardrails-init](#micro-contracts-guardrails-init)
17
18
  - [manifest](#micro-contracts-manifest)
18
19
  - [audit-openapi](#micro-contracts-audit-openapi)
@@ -417,6 +418,52 @@ x-agent:
417
418
 
418
419
  ---
419
420
 
421
+ ### insights
422
+
423
+ Emit ExternalInsight JSON for agent-contracts-analyzer.
424
+
425
+ Reads x-micro-contracts-depend-on from OpenAPI specs and outputs structured dependency edges and anchor mappings as JSON on stdout. Used by agent-contracts-analyzer CommandProvider integration.
426
+
427
+ **Usage:**
428
+
429
+ ```
430
+ micro-contracts insights --format json
431
+ ```
432
+ ```
433
+ micro-contracts insights --format json --project-root .
434
+ ```
435
+
436
+ #### Options
437
+
438
+ | Option | Aliases | Required | Default | Description |
439
+ |---|---|---|---|---|
440
+ | `--format` | | No | `"json"` | Output format (json only). |
441
+ | `--project-root` | | No | `"."` | Project root directory containing micro-contracts.config.yaml. |
442
+ | `--config` | -c | No | | Path to config file (micro-contracts.config.yaml). |
443
+
444
+ #### Exit Codes
445
+
446
+ **Exit 0:** ExternalInsight JSON written to stdout.
447
+
448
+ - **stdout:** format=`json`
449
+
450
+ **Exit 1:** Insights generation failed.
451
+
452
+ - **stderr:** format=`text`
453
+
454
+ #### Extensions
455
+
456
+ ```yaml
457
+ x-agent:
458
+ risk_level: low
459
+ requires_confirmation: false
460
+ idempotent: true
461
+ side_effects:
462
+
463
+ ```
464
+
465
+ ---
466
+
420
467
  ### guardrails-init
421
468
 
422
469
  Create a guardrails.yaml configuration file.
@@ -551,6 +598,7 @@ micro-contracts audit-openapi --show-prompt
551
598
  | `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
552
599
  | `--output` | -o | No | | Write result to a file instead of stdout. |
553
600
  | `--report-format` | | No | `"text"` | Output format for the audit report. |
601
+ | `--log-file` | -l | No | | Write agent progress log to this file path. |
554
602
 
555
603
  #### Exit Codes
556
604
 
@@ -618,6 +666,7 @@ micro-contracts review-published --adapter claude --report-format json
618
666
  | `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
619
667
  | `--output` | -o | No | | Write result to a file instead of stdout. |
620
668
  | `--report-format` | | No | `"text"` | Output format for the review report. |
669
+ | `--log-file` | -l | No | | Write agent progress log to this file path. |
621
670
 
622
671
  #### Exit Codes
623
672
 
@@ -685,6 +734,7 @@ micro-contracts propose-overlays --adapter openai --report-format json
685
734
  | `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
686
735
  | `--output` | -o | No | | Write result to a file instead of stdout. |
687
736
  | `--report-format` | | No | `"json"` | Output format for the proposal report. |
737
+ | `--log-file` | -l | No | | Write agent progress log to this file path. |
688
738
 
689
739
  #### Exit Codes
690
740
 
@@ -749,6 +799,7 @@ micro-contracts audit-guardrails --adapter mock --report-format json
749
799
  | `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
750
800
  | `--output` | -o | No | | Write result to a file instead of stdout. |
751
801
  | `--report-format` | | No | `"text"` | Output format for the audit report. |
802
+ | `--log-file` | -l | No | | Write agent progress log to this file path. |
752
803
 
753
804
  #### Exit Codes
754
805
 
package/package.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "name": "micro-contracts",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Contract-first OpenAPI toolchain that keeps TypeScript UI and microservices aligned via code generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ "./insight-provider": {
10
+ "import": "./dist/external/insight-provider.js",
11
+ "types": "./dist/external/insight-provider.d.ts"
12
+ }
13
+ },
8
14
  "bin": {
9
15
  "micro-contracts": "dist/micro-contracts.bundle.mjs"
10
16
  },
@@ -13,12 +19,16 @@
13
19
  "dist/micro-contracts.bundle.mjs.map",
14
20
  "dist/index.js",
15
21
  "dist/index.d.ts",
22
+ "dist/external/insight-provider.js",
23
+ "dist/external/insight-provider.d.ts",
16
24
  "docs",
17
25
  "cli-contract.yaml",
18
26
  "README.md",
19
- "LICENSE"
27
+ "LICENSE",
28
+ "vendor/agent-contracts-analyzer-0.1.1.tgz"
20
29
  ],
21
30
  "scripts": {
31
+ "prebuild": "node scripts/ensure-agent-contracts-analyzer.mjs",
22
32
  "build": "tsc",
23
33
  "bundle": "node esbuild.bundle.mjs",
24
34
  "bundle:min": "node esbuild.bundle.mjs --minify",
@@ -61,7 +71,8 @@
61
71
  "@types/js-yaml": "^4.0.9",
62
72
  "@types/node": "^20.11.0",
63
73
  "agent-contracts": "^0.33.1",
64
- "agent-contracts-runtime": "^0.32.10",
74
+ "agent-contracts-analyzer": "file:vendor/agent-contracts-analyzer-0.1.1.tgz",
75
+ "agent-contracts-runtime": "^0.35.7",
65
76
  "chalk": "^5.3.0",
66
77
  "cli-contracts": "^0.32.0",
67
78
  "commander": "^12.1.0",
@@ -0,0 +1,9 @@
1
+ # Vendored packages
2
+
3
+ ## agent-contracts-analyzer-0.1.1.tgz
4
+
5
+ `npm pack` output from `agent-contracts-analyzer` tag `v0.1.1` (includes `dist/`).
6
+
7
+ The private GitHub repository cannot be fetched from CI via `github:` dependencies without
8
+ cross-repo credentials, so the tarball is committed and referenced as
9
+ `file:vendor/agent-contracts-analyzer-0.1.1.tgz` in `package.json`.