micro-contracts 0.15.0 → 0.15.2

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.
Files changed (92) hide show
  1. package/README.md +62 -0
  2. package/cli-contract.yaml +622 -2
  3. package/dist/agents/context-builder.d.ts +5 -0
  4. package/dist/agents/context-builder.d.ts.map +1 -0
  5. package/dist/agents/context-builder.js +239 -0
  6. package/dist/agents/context-builder.js.map +1 -0
  7. package/dist/agents/formatter.d.ts +9 -0
  8. package/dist/agents/formatter.d.ts.map +1 -0
  9. package/dist/agents/formatter.js +124 -0
  10. package/dist/agents/formatter.js.map +1 -0
  11. package/dist/agents/index.d.ts +5 -0
  12. package/dist/agents/index.d.ts.map +1 -0
  13. package/dist/agents/index.js +3 -0
  14. package/dist/agents/index.js.map +1 -0
  15. package/dist/agents/orchestrator.d.ts +5 -0
  16. package/dist/agents/orchestrator.d.ts.map +1 -0
  17. package/dist/agents/orchestrator.js +105 -0
  18. package/dist/agents/orchestrator.js.map +1 -0
  19. package/dist/agents/types.d.ts +21 -0
  20. package/dist/agents/types.d.ts.map +1 -0
  21. package/dist/agents/types.js +2 -0
  22. package/dist/agents/types.js.map +1 -0
  23. package/dist/cli.d.ts +0 -6
  24. package/dist/cli.d.ts.map +1 -1
  25. package/dist/cli.js +814 -1161
  26. package/dist/cli.js.map +1 -1
  27. package/dist/commands/audit-guardrails.d.ts +13 -0
  28. package/dist/commands/audit-guardrails.d.ts.map +1 -0
  29. package/dist/commands/audit-guardrails.js +32 -0
  30. package/dist/commands/audit-guardrails.js.map +1 -0
  31. package/dist/commands/audit-openapi.d.ts +13 -0
  32. package/dist/commands/audit-openapi.d.ts.map +1 -0
  33. package/dist/commands/audit-openapi.js +32 -0
  34. package/dist/commands/audit-openapi.js.map +1 -0
  35. package/dist/commands/propose-overlays.d.ts +13 -0
  36. package/dist/commands/propose-overlays.d.ts.map +1 -0
  37. package/dist/commands/propose-overlays.js +32 -0
  38. package/dist/commands/propose-overlays.js.map +1 -0
  39. package/dist/commands/review-published.d.ts +13 -0
  40. package/dist/commands/review-published.d.ts.map +1 -0
  41. package/dist/commands/review-published.js +32 -0
  42. package/dist/commands/review-published.js.map +1 -0
  43. package/dist/generated/commands.d.ts +2 -0
  44. package/dist/generated/commands.d.ts.map +1 -0
  45. package/dist/generated/commands.js +2 -0
  46. package/dist/generated/commands.js.map +1 -0
  47. package/dist/generated/dsl/agents.d.ts +34 -0
  48. package/dist/generated/dsl/agents.d.ts.map +1 -0
  49. package/dist/generated/dsl/agents.js +98 -0
  50. package/dist/generated/dsl/agents.js.map +1 -0
  51. package/dist/generated/dsl/handoffs.d.ts +1209 -0
  52. package/dist/generated/dsl/handoffs.d.ts.map +1 -0
  53. package/dist/generated/dsl/handoffs.js +205 -0
  54. package/dist/generated/dsl/handoffs.js.map +1 -0
  55. package/dist/generated/dsl/index.d.ts +13 -0
  56. package/dist/generated/dsl/index.d.ts.map +1 -0
  57. package/dist/generated/dsl/index.js +10 -0
  58. package/dist/generated/dsl/index.js.map +1 -0
  59. package/dist/generated/dsl/tasks.d.ts +26 -0
  60. package/dist/generated/dsl/tasks.d.ts.map +1 -0
  61. package/dist/generated/dsl/tasks.js +133 -0
  62. package/dist/generated/dsl/tasks.js.map +1 -0
  63. package/dist/generated/dsl/workflows.d.ts +34 -0
  64. package/dist/generated/dsl/workflows.d.ts.map +1 -0
  65. package/dist/generated/dsl/workflows.js +84 -0
  66. package/dist/generated/dsl/workflows.js.map +1 -0
  67. package/dist/generated/index.d.ts +7 -0
  68. package/dist/generated/index.d.ts.map +1 -0
  69. package/dist/generated/index.js +7 -0
  70. package/dist/generated/index.js.map +1 -0
  71. package/dist/generated/policy-runtime.d.ts +114 -0
  72. package/dist/generated/policy-runtime.d.ts.map +1 -0
  73. package/dist/generated/policy-runtime.js +195 -0
  74. package/dist/generated/policy-runtime.js.map +1 -0
  75. package/dist/generated/policy.d.ts +619 -0
  76. package/dist/generated/policy.d.ts.map +1 -0
  77. package/dist/generated/policy.js +802 -0
  78. package/dist/generated/policy.js.map +1 -0
  79. package/dist/generated/program.d.ts +112 -0
  80. package/dist/generated/program.d.ts.map +1 -0
  81. package/dist/generated/program.js +266 -0
  82. package/dist/generated/program.js.map +1 -0
  83. package/dist/generated/schemas.d.ts +778 -0
  84. package/dist/generated/schemas.d.ts.map +1 -0
  85. package/dist/generated/schemas.js +1005 -0
  86. package/dist/generated/schemas.js.map +1 -0
  87. package/dist/generated/types.d.ts +395 -0
  88. package/dist/generated/types.d.ts.map +1 -0
  89. package/dist/generated/types.js +3 -0
  90. package/dist/generated/types.js.map +1 -0
  91. package/docs/cli-reference.md +300 -0
  92. package/package.json +24 -6
package/README.md CHANGED
@@ -451,6 +451,68 @@ Generate or verify manifest for generated artifacts.
451
451
  | `--verify` | Verify existing manifest |
452
452
  | `-o, --output <path>` | Output manifest path |
453
453
 
454
+ ### audit-openapi
455
+
456
+ Run LLM-based OpenAPI design quality audit. Evaluates path design, module boundary alignment, schema bloat, and cross-cutting concern coverage. Requires `agent-contracts-runtime`.
457
+
458
+ | Option | Description |
459
+ |--------|-------------|
460
+ | `-c, --config <path>` | Path to config file |
461
+ | `-m, --module <name>` | Module name to audit (default: all) |
462
+ | `-a, --adapter <name>` | SDK adapter (`cursor`, `claude`, `openai`, `gemini`, `mock`) |
463
+ | `--model <name>` | LLM model override |
464
+ | `--show-prompt` | Output the constructed prompt without calling LLM |
465
+ | `--fail-on <level>` | Minimum severity for non-zero exit (`warning`, `error`, `critical`) |
466
+ | `-o, --output <file>` | Write result to a file |
467
+ | `--report-format <fmt>` | Output format (`json`, `text`, `yaml`; default: `text`) |
468
+
469
+ ### review-published
470
+
471
+ Review published API surface for internal type leakage and backward compatibility risks.
472
+
473
+ | Option | Description |
474
+ |--------|-------------|
475
+ | `-c, --config <path>` | Path to config file |
476
+ | `-m, --module <name>` | Module name to review (default: all) |
477
+ | `-a, --adapter <name>` | SDK adapter (`cursor`, `claude`, `openai`, `gemini`, `mock`) |
478
+ | `--model <name>` | LLM model override |
479
+ | `--show-prompt` | Output the constructed prompt without calling LLM |
480
+ | `--fail-on <level>` | Minimum severity for non-zero exit |
481
+ | `-o, --output <file>` | Write result to a file |
482
+ | `--report-format <fmt>` | Output format (default: `text`) |
483
+
484
+ ### propose-overlays
485
+
486
+ Propose cross-cutting overlay candidates for authentication, tenancy, rate limiting, and audit logging.
487
+
488
+ | Option | Description |
489
+ |--------|-------------|
490
+ | `-c, --config <path>` | Path to config file |
491
+ | `-m, --module <name>` | Module name to analyze (default: all) |
492
+ | `-a, --adapter <name>` | SDK adapter (`cursor`, `claude`, `openai`, `gemini`, `mock`) |
493
+ | `--model <name>` | LLM model override |
494
+ | `--show-prompt` | Output the constructed prompt without calling LLM |
495
+ | `--fail-on <level>` | Minimum severity for non-zero exit |
496
+ | `-o, --output <file>` | Write result to a file |
497
+ | `--report-format <fmt>` | Output format (default: `json`) |
498
+
499
+ ### audit-guardrails
500
+
501
+ Audit guardrails configuration for drift detection and lint rule coverage. File permission and editing checks have been moved to `artifact-contracts`.
502
+
503
+ | Option | Description |
504
+ |--------|-------------|
505
+ | `-c, --config <path>` | Path to config file |
506
+ | `-g, --guardrails <path>` | Path to guardrails.yaml |
507
+ | `-a, --adapter <name>` | SDK adapter (`cursor`, `claude`, `openai`, `gemini`, `mock`) |
508
+ | `--model <name>` | LLM model override |
509
+ | `--show-prompt` | Output the constructed prompt without calling LLM |
510
+ | `--fail-on <level>` | Minimum severity for non-zero exit |
511
+ | `-o, --output <file>` | Write result to a file |
512
+ | `--report-format <fmt>` | Output format (default: `text`) |
513
+
514
+ > LLM commands require [`agent-contracts-runtime`](https://www.npmjs.com/package/agent-contracts-runtime) as a peer dependency. Install it to use these commands, or use `--show-prompt` to inspect the prompt without calling the LLM.
515
+
454
516
  ---
455
517
 
456
518
  ## Generated Code
package/cli-contract.yaml CHANGED
@@ -11,8 +11,8 @@ info:
11
11
  license:
12
12
  name: MIT
13
13
  contact:
14
- name: foo-ogawa
15
- url: https://github.com/foo-ogawa/micro-contracts
14
+ name: foo-log-inc
15
+ url: https://github.com/foo-log-inc/micro-contracts
16
16
 
17
17
  artifact_slots:
18
18
  openapi-specs:
@@ -751,3 +751,623 @@ command_sets:
751
751
  idempotent: true
752
752
  side_effects:
753
753
  - file_write
754
+
755
+ # ── audit-openapi ──────────────────────────────
756
+ audit-openapi:
757
+ path: [audit-openapi]
758
+ summary: Run LLM-based OpenAPI design quality audit.
759
+ description: >-
760
+ Performs a semantic review of OpenAPI specification design quality
761
+ using an LLM agent. Evaluates path design, module boundary alignment,
762
+ schema bloat, CRUD vs use-case orientation, and cross-cutting
763
+ concern coverage. Requires agent-contracts-runtime.
764
+ usage:
765
+ - micro-contracts audit-openapi
766
+ - micro-contracts audit-openapi -m core
767
+ - micro-contracts audit-openapi --adapter cursor --report-format text
768
+ - micro-contracts audit-openapi --show-prompt
769
+
770
+ options:
771
+ - name: config
772
+ aliases: [c]
773
+ description: Path to config file (micro-contracts.config.yaml).
774
+ value_name: path
775
+ schema:
776
+ type: string
777
+ file:
778
+ mode: read
779
+ exists: false
780
+ media_type: application/yaml
781
+ encoding: utf-8
782
+
783
+ - name: module
784
+ aliases: [m]
785
+ description: Module name to audit (default is all modules).
786
+ value_name: name
787
+ schema:
788
+ type: string
789
+
790
+ - name: adapter
791
+ aliases: [a]
792
+ description: SDK adapter to use for LLM execution.
793
+ value_name: name
794
+ schema:
795
+ type: string
796
+ enum: [cursor, claude, openai, gemini, mock]
797
+
798
+ - name: model
799
+ description: LLM model override.
800
+ value_name: name
801
+ schema:
802
+ type: string
803
+
804
+ - name: fail-on
805
+ description: Minimum severity that causes a non-zero exit.
806
+ value_name: level
807
+ schema:
808
+ type: string
809
+ enum: [warning, error, critical]
810
+ default: error
811
+
812
+ - name: output
813
+ aliases: [o]
814
+ description: Write result to a file instead of stdout.
815
+ value_name: file
816
+ schema:
817
+ type: string
818
+ file:
819
+ mode: write
820
+ media_type: application/json
821
+ encoding: utf-8
822
+
823
+ - name: report-format
824
+ description: Output format for the audit report.
825
+ value_name: fmt
826
+ schema:
827
+ type: string
828
+ enum: [json, text, yaml]
829
+ default: text
830
+
831
+ exits:
832
+ '0':
833
+ description: Audit completed, no blocking findings.
834
+ stdout:
835
+ format: '{options.report-format}'
836
+ schema:
837
+ $ref: '#/components/schemas/OpenApiAuditResult'
838
+
839
+ '1':
840
+ description: Unexpected error.
841
+ stderr:
842
+ format: text
843
+
844
+ '3':
845
+ description: Input validation failed (config not found, spec invalid).
846
+ stderr:
847
+ format: text
848
+
849
+ '10':
850
+ description: Completed with blocking findings.
851
+ stdout:
852
+ format: '{options.report-format}'
853
+ schema:
854
+ $ref: '#/components/schemas/OpenApiAuditResult'
855
+
856
+ '11':
857
+ description: Runtime dependency missing (agent-contracts-runtime).
858
+ stderr:
859
+ format: text
860
+
861
+ '12':
862
+ description: LLM provider or adapter error.
863
+ stderr:
864
+ format: text
865
+
866
+ effects:
867
+ reads: [openapi-specs, config]
868
+ writes: []
869
+ network:
870
+ description: LLM API calls when adapter is not mock
871
+ requires_secrets: []
872
+ idempotent: true
873
+
874
+ x-agent:
875
+ risk_level: low
876
+ requires_confirmation: false
877
+ idempotent: true
878
+ side_effects: [network]
879
+ sideEffectNote: >-
880
+ Network calls to LLM provider when adapter is not mock.
881
+ Filesystem write only when --output is specified.
882
+ safe_dry_run_option: show-prompt
883
+ expectedDurationMs: 120000
884
+ retryableExitCodes: [12]
885
+
886
+ # ── review-published ───────────────────────────
887
+ review-published:
888
+ path: [review-published]
889
+ summary: Review published API surface for internal leakage.
890
+ description: >-
891
+ Analyzes the published (public-facing) API specification for
892
+ internal type leakage, backward compatibility risks, and
893
+ x-micro-contracts-non-exportable violations.
894
+ Requires agent-contracts-runtime.
895
+ usage:
896
+ - micro-contracts review-published
897
+ - micro-contracts review-published -m billing
898
+ - micro-contracts review-published --adapter claude --report-format json
899
+
900
+ options:
901
+ - name: config
902
+ aliases: [c]
903
+ description: Path to config file (micro-contracts.config.yaml).
904
+ value_name: path
905
+ schema:
906
+ type: string
907
+ file:
908
+ mode: read
909
+ exists: false
910
+ media_type: application/yaml
911
+ encoding: utf-8
912
+
913
+ - name: module
914
+ aliases: [m]
915
+ description: Module name to review (default is all modules).
916
+ value_name: name
917
+ schema:
918
+ type: string
919
+
920
+ - name: adapter
921
+ aliases: [a]
922
+ description: SDK adapter to use for LLM execution.
923
+ value_name: name
924
+ schema:
925
+ type: string
926
+ enum: [cursor, claude, openai, gemini, mock]
927
+
928
+ - name: model
929
+ description: LLM model override.
930
+ value_name: name
931
+ schema:
932
+ type: string
933
+
934
+ - name: fail-on
935
+ description: Minimum severity that causes a non-zero exit.
936
+ value_name: level
937
+ schema:
938
+ type: string
939
+ enum: [warning, error, critical]
940
+ default: error
941
+
942
+ - name: output
943
+ aliases: [o]
944
+ description: Write result to a file instead of stdout.
945
+ value_name: file
946
+ schema:
947
+ type: string
948
+ file:
949
+ mode: write
950
+ media_type: application/json
951
+ encoding: utf-8
952
+
953
+ - name: report-format
954
+ description: Output format for the review report.
955
+ value_name: fmt
956
+ schema:
957
+ type: string
958
+ enum: [json, text, yaml]
959
+ default: text
960
+
961
+ exits:
962
+ '0':
963
+ description: Review completed, no blocking findings.
964
+ stdout:
965
+ format: '{options.report-format}'
966
+ schema:
967
+ $ref: '#/components/schemas/PublishedReviewResult'
968
+
969
+ '1':
970
+ description: Unexpected error.
971
+ stderr:
972
+ format: text
973
+
974
+ '3':
975
+ description: Input validation failed.
976
+ stderr:
977
+ format: text
978
+
979
+ '10':
980
+ description: Completed with blocking findings.
981
+ stdout:
982
+ format: '{options.report-format}'
983
+ schema:
984
+ $ref: '#/components/schemas/PublishedReviewResult'
985
+
986
+ '11':
987
+ description: Runtime dependency missing (agent-contracts-runtime).
988
+ stderr:
989
+ format: text
990
+
991
+ '12':
992
+ description: LLM provider or adapter error.
993
+ stderr:
994
+ format: text
995
+
996
+ effects:
997
+ reads: [openapi-specs, config, generated-packages]
998
+ writes: []
999
+ network:
1000
+ description: LLM API calls when adapter is not mock
1001
+ requires_secrets: []
1002
+ idempotent: true
1003
+
1004
+ x-agent:
1005
+ risk_level: low
1006
+ requires_confirmation: false
1007
+ idempotent: true
1008
+ side_effects: [network]
1009
+ sideEffectNote: >-
1010
+ Network calls to LLM provider when adapter is not mock.
1011
+ Filesystem write only when --output is specified.
1012
+ safe_dry_run_option: show-prompt
1013
+ expectedDurationMs: 120000
1014
+ retryableExitCodes: [12]
1015
+
1016
+ # ── propose-overlays ───────────────────────────
1017
+ propose-overlays:
1018
+ path: [propose-overlays]
1019
+ summary: Propose cross-cutting overlay candidates.
1020
+ description: >-
1021
+ Analyzes the OpenAPI specification and proposes cross-cutting
1022
+ overlay candidates for authentication, tenancy, rate limiting,
1023
+ audit logging, and other patterns. Verifies proposals do not
1024
+ conflict with existing overlay definitions.
1025
+ Requires agent-contracts-runtime.
1026
+ usage:
1027
+ - micro-contracts propose-overlays
1028
+ - micro-contracts propose-overlays -m core
1029
+ - micro-contracts propose-overlays --adapter openai --report-format json
1030
+
1031
+ options:
1032
+ - name: config
1033
+ aliases: [c]
1034
+ description: Path to config file (micro-contracts.config.yaml).
1035
+ value_name: path
1036
+ schema:
1037
+ type: string
1038
+ file:
1039
+ mode: read
1040
+ exists: false
1041
+ media_type: application/yaml
1042
+ encoding: utf-8
1043
+
1044
+ - name: module
1045
+ aliases: [m]
1046
+ description: Module name to analyze (default is all modules).
1047
+ value_name: name
1048
+ schema:
1049
+ type: string
1050
+
1051
+ - name: adapter
1052
+ aliases: [a]
1053
+ description: SDK adapter to use for LLM execution.
1054
+ value_name: name
1055
+ schema:
1056
+ type: string
1057
+ enum: [cursor, claude, openai, gemini, mock]
1058
+
1059
+ - name: model
1060
+ description: LLM model override.
1061
+ value_name: name
1062
+ schema:
1063
+ type: string
1064
+
1065
+ - name: fail-on
1066
+ description: Minimum severity that causes a non-zero exit.
1067
+ value_name: level
1068
+ schema:
1069
+ type: string
1070
+ enum: [warning, error, critical]
1071
+ default: error
1072
+
1073
+ - name: output
1074
+ aliases: [o]
1075
+ description: Write result to a file instead of stdout.
1076
+ value_name: file
1077
+ schema:
1078
+ type: string
1079
+ file:
1080
+ mode: write
1081
+ media_type: application/json
1082
+ encoding: utf-8
1083
+
1084
+ - name: report-format
1085
+ description: Output format for the proposal report.
1086
+ value_name: fmt
1087
+ schema:
1088
+ type: string
1089
+ enum: [json, text, yaml]
1090
+ default: json
1091
+
1092
+ exits:
1093
+ '0':
1094
+ description: Proposal generated successfully.
1095
+ stdout:
1096
+ format: '{options.report-format}'
1097
+ schema:
1098
+ $ref: '#/components/schemas/OverlayProposalResult'
1099
+
1100
+ '1':
1101
+ description: Unexpected error.
1102
+ stderr:
1103
+ format: text
1104
+
1105
+ '3':
1106
+ description: Input validation failed.
1107
+ stderr:
1108
+ format: text
1109
+
1110
+ '10':
1111
+ description: Completed with blocking findings.
1112
+ stdout:
1113
+ format: '{options.report-format}'
1114
+ schema:
1115
+ $ref: '#/components/schemas/OverlayProposalResult'
1116
+
1117
+ '11':
1118
+ description: Runtime dependency missing (agent-contracts-runtime).
1119
+ stderr:
1120
+ format: text
1121
+
1122
+ '12':
1123
+ description: LLM provider or adapter error.
1124
+ stderr:
1125
+ format: text
1126
+
1127
+ effects:
1128
+ reads: [openapi-specs, config]
1129
+ writes: []
1130
+ network:
1131
+ description: LLM API calls when adapter is not mock
1132
+ requires_secrets: []
1133
+ idempotent: true
1134
+
1135
+ x-agent:
1136
+ risk_level: low
1137
+ requires_confirmation: false
1138
+ idempotent: true
1139
+ side_effects: [network]
1140
+ sideEffectNote: >-
1141
+ Network calls to LLM provider when adapter is not mock.
1142
+ Filesystem write only when --output is specified.
1143
+ safe_dry_run_option: show-prompt
1144
+ expectedDurationMs: 120000
1145
+ retryableExitCodes: [12]
1146
+
1147
+ # ── audit-guardrails ───────────────────────────
1148
+ audit-guardrails:
1149
+ path: [audit-guardrails]
1150
+ summary: Audit guardrails configuration for drift and lint coverage.
1151
+ description: >-
1152
+ Checks that guardrails.yaml configuration covers all generated
1153
+ output directories for drift detection and that OpenAPI lint
1154
+ rules are properly configured. Note: file permission and
1155
+ editing checks have been moved to artifact-contracts.
1156
+ Requires agent-contracts-runtime.
1157
+ usage:
1158
+ - micro-contracts audit-guardrails
1159
+ - micro-contracts audit-guardrails --adapter mock --report-format json
1160
+
1161
+ options:
1162
+ - name: config
1163
+ aliases: [c]
1164
+ description: Path to config file (micro-contracts.config.yaml).
1165
+ value_name: path
1166
+ schema:
1167
+ type: string
1168
+ file:
1169
+ mode: read
1170
+ exists: false
1171
+ media_type: application/yaml
1172
+ encoding: utf-8
1173
+
1174
+ - name: guardrails
1175
+ aliases: [g]
1176
+ description: Path to guardrails.yaml.
1177
+ value_name: path
1178
+ schema:
1179
+ type: string
1180
+ file:
1181
+ mode: read
1182
+ exists: false
1183
+ media_type: application/yaml
1184
+ encoding: utf-8
1185
+
1186
+ - name: adapter
1187
+ aliases: [a]
1188
+ description: SDK adapter to use for LLM execution.
1189
+ value_name: name
1190
+ schema:
1191
+ type: string
1192
+ enum: [cursor, claude, openai, gemini, mock]
1193
+
1194
+ - name: model
1195
+ description: LLM model override.
1196
+ value_name: name
1197
+ schema:
1198
+ type: string
1199
+
1200
+ - name: fail-on
1201
+ description: Minimum severity that causes a non-zero exit.
1202
+ value_name: level
1203
+ schema:
1204
+ type: string
1205
+ enum: [warning, error, critical]
1206
+ default: error
1207
+
1208
+ - name: output
1209
+ aliases: [o]
1210
+ description: Write result to a file instead of stdout.
1211
+ value_name: file
1212
+ schema:
1213
+ type: string
1214
+ file:
1215
+ mode: write
1216
+ media_type: application/json
1217
+ encoding: utf-8
1218
+
1219
+ - name: report-format
1220
+ description: Output format for the audit report.
1221
+ value_name: fmt
1222
+ schema:
1223
+ type: string
1224
+ enum: [json, text, yaml]
1225
+ default: text
1226
+
1227
+ exits:
1228
+ '0':
1229
+ description: Audit completed, no blocking findings.
1230
+ stdout:
1231
+ format: '{options.report-format}'
1232
+ schema:
1233
+ $ref: '#/components/schemas/GuardrailsAuditResult'
1234
+
1235
+ '1':
1236
+ description: Unexpected error.
1237
+ stderr:
1238
+ format: text
1239
+
1240
+ '3':
1241
+ description: Input validation failed (guardrails.yaml not found).
1242
+ stderr:
1243
+ format: text
1244
+
1245
+ '10':
1246
+ description: Completed with blocking findings.
1247
+ stdout:
1248
+ format: '{options.report-format}'
1249
+ schema:
1250
+ $ref: '#/components/schemas/GuardrailsAuditResult'
1251
+
1252
+ '11':
1253
+ description: Runtime dependency missing (agent-contracts-runtime).
1254
+ stderr:
1255
+ format: text
1256
+
1257
+ '12':
1258
+ description: LLM provider or adapter error.
1259
+ stderr:
1260
+ format: text
1261
+
1262
+ effects:
1263
+ reads: [guardrails-config, config]
1264
+ writes: []
1265
+ network:
1266
+ description: LLM API calls when adapter is not mock
1267
+ requires_secrets: []
1268
+ idempotent: true
1269
+
1270
+ x-agent:
1271
+ risk_level: low
1272
+ requires_confirmation: false
1273
+ idempotent: true
1274
+ side_effects: [network]
1275
+ sideEffectNote: >-
1276
+ Network calls to LLM provider when adapter is not mock.
1277
+ Filesystem write only when --output is specified.
1278
+ safe_dry_run_option: show-prompt
1279
+ expectedDurationMs: 120000
1280
+ retryableExitCodes: [12]
1281
+
1282
+ components:
1283
+ schemas:
1284
+ # ── AI Agent Interoperability Schemas ──────────────────
1285
+ AgentEvidence:
1286
+ $ref: 'components.yaml#/schemas/agent-evidence'
1287
+ AgentFinding:
1288
+ $ref: 'components.yaml#/schemas/agent-finding'
1289
+ AgentRecommendedAction:
1290
+ $ref: 'components.yaml#/schemas/agent-recommended-action'
1291
+ OpenApiAuditResult:
1292
+ $ref: 'components.yaml#/schemas/agent-audit-result'
1293
+
1294
+ PublishedReviewResult:
1295
+ type: object
1296
+ description: >-
1297
+ Result from review-published command. Contains published endpoint
1298
+ enumeration and internal type leakage analysis.
1299
+ allOf:
1300
+ - $ref: 'components.yaml#/schemas/agent-audit-result'
1301
+ - type: object
1302
+ required: [publishedEndpoints, leakedInternalTypes]
1303
+ properties:
1304
+ publishedEndpoints:
1305
+ type: array
1306
+ items:
1307
+ type: object
1308
+ required: [operationId, path, method]
1309
+ properties:
1310
+ operationId:
1311
+ type: string
1312
+ path:
1313
+ type: string
1314
+ method:
1315
+ type: string
1316
+ leakedInternalTypes:
1317
+ type: array
1318
+ items:
1319
+ type: object
1320
+ required: [schemaName, referencedBy, reason]
1321
+ properties:
1322
+ schemaName:
1323
+ type: string
1324
+ referencedBy:
1325
+ type: string
1326
+ reason:
1327
+ type: string
1328
+
1329
+ OverlayProposalResult:
1330
+ type: object
1331
+ description: >-
1332
+ Result from propose-overlays command. Contains overlay candidate
1333
+ proposals with endpoint, type, rationale, and suggested config.
1334
+ allOf:
1335
+ - $ref: 'components.yaml#/schemas/agent-audit-result'
1336
+ - type: object
1337
+ required: [overlayCandidates]
1338
+ properties:
1339
+ overlayCandidates:
1340
+ type: array
1341
+ items:
1342
+ type: object
1343
+ required: [endpoint, overlayType, rationale]
1344
+ properties:
1345
+ endpoint:
1346
+ type: string
1347
+ overlayType:
1348
+ type: string
1349
+ enum: [auth, tenancy, rateLimit, auditLog, custom]
1350
+ rationale:
1351
+ type: string
1352
+ suggestedConfig:
1353
+ type: object
1354
+ additionalProperties: true
1355
+
1356
+ GuardrailsAuditResult:
1357
+ type: object
1358
+ description: >-
1359
+ Result from audit-guardrails command. Contains drift detection
1360
+ and lint rule coverage analysis.
1361
+ allOf:
1362
+ - $ref: 'components.yaml#/schemas/agent-audit-result'
1363
+ - type: object
1364
+ required: [coveredPaths, uncoveredPaths]
1365
+ properties:
1366
+ coveredPaths:
1367
+ type: array
1368
+ items:
1369
+ type: string
1370
+ uncoveredPaths:
1371
+ type: array
1372
+ items:
1373
+ type: string
@@ -0,0 +1,5 @@
1
+ export declare function buildAuditOpenapiContext(configPath: string | undefined, moduleName: string | undefined): Promise<string>;
2
+ export declare function buildReviewPublishedContext(configPath: string | undefined, moduleName: string | undefined): Promise<string>;
3
+ export declare function buildProposeOverlaysContext(configPath: string | undefined, moduleName: string | undefined): Promise<string>;
4
+ export declare function buildAuditGuardrailsContext(configPath: string | undefined, guardrailsPath: string | undefined): Promise<string>;
5
+ //# sourceMappingURL=context-builder.d.ts.map