artifact-contracts 0.32.2 → 0.33.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/README.md +9 -0
- package/cli-contract.yaml +6 -0
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +43 -37
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/artifact-contracts.bundle.mjs +234 -213
- package/dist/artifact-contracts.bundle.mjs.map +4 -4
- package/dist/cli/audit.d.ts +1 -0
- package/dist/cli/audit.d.ts.map +1 -1
- package/dist/cli/audit.js +1 -0
- package/dist/cli/audit.js.map +1 -1
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +2 -2
- package/dist/generated/contract.js.map +1 -1
- package/dist/generated/dsl/handoffs.d.ts +16 -16
- package/dist/generated/policy.d.ts +5 -0
- package/dist/generated/policy.d.ts.map +1 -1
- package/dist/generated/policy.js +6 -0
- package/dist/generated/policy.js.map +1 -1
- package/dist/generated/program.d.ts +1 -0
- package/dist/generated/program.d.ts.map +1 -1
- package/dist/generated/program.js +1 -0
- package/dist/generated/program.js.map +1 -1
- package/dist/generated/types.d.ts +1 -0
- package/dist/generated/types.d.ts.map +1 -1
- package/docs/cli-reference.md +3 -1
- package/package.json +2 -2
package/dist/cli/audit.d.ts
CHANGED
package/dist/cli/audit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/cli/audit.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/cli/audit.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDtE"}
|
package/dist/cli/audit.js
CHANGED
package/dist/cli/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/cli/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,kBAAkB,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/cli/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;A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AC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,eAAe,CACtB,MAAyC,EACzC,MAAc;IAEd,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IAE1C,MAAM,IAAI,GAAG,MAAM,CAAC,IAEZ,CAAC;IACT,IAAI,CAAC,IAAI,EAAE,QAAQ;QAAE,OAAO,CAAC,CAAC;IAE9B,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,SAAS,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAE5B,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAC5C,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,SAAS,CAC/C,CAAC;IAEF,OAAO,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,EAAE,MAA+3kB,CAAC;AAE55kB,eAAO,MAAM,iBAAiB,EAAE,MAAm22B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Auto-generated by cli-contracts. Do not edit.
|
|
2
2
|
// Embedded contract for the extract subcommand.
|
|
3
|
-
export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: artifact-contracts CLI\n version: 0.1.1\n description: >-\n Declarative artifact registry — define file properties, resolve\n paths to artifact IDs, and detect definition overlaps.\n stdout is reserved for primary output (JSON/YAML/text result);\n all diagnostics and progress messages go to stderr.\n license:\n name: MIT\n contact:\n name: foo-log-inc\n url: https://github.com/foo-log-inc/artifact-contracts\n\nartifact_slots:\n artifact-definitions:\n description: artifact-contracts.yaml definitions and config files\n direction: read\n repository-files:\n description: Repository files scanned for path pattern matching and overlap detection\n direction: read\n audit-report:\n description: LLM audit result output files\n direction: write\n\ncommand_sets:\n artifact-contracts:\n summary: >-\n Artifact registry CLI — validate definitions, resolve artifacts,\n list registered entries, and explain file properties.\n executable: artifact-contracts\n\n global_options:\n - name: version\n aliases: [V]\n description: Output the version number\n schema:\n type: boolean\n - name: help\n aliases: [h]\n description: Display help for command\n schema:\n type: boolean\n\n commands:\n validate:\n summary: Validate artifact-contracts definitions\n description: >-\n Validates artifact-contracts.yaml against the schema, checks\n artifact ID naming conventions, ensures path_patterns are\n non-empty, and optionally detects overlapping definitions\n against real repository files.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: check-files\n description: >-\n Scan repository files to detect path_patterns overlaps\n that static glob analysis cannot fully determine.\n When enabled, reads all files from git ls-files or glob.\n schema:\n type: boolean\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n - repository-files\n execution_mode: normal\n x-agent:\n expected_duration_ms: 5000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ValidationResult\"\n description: >-\n Validation diagnostics. On exit 0 stdout is empty (diagnostics\n go to stderr). On exit 1/2 with --format json, structured\n diagnostics are written to stdout.\n exits:\n \"0\":\n description: Validation passed with no errors\n \"1\":\n description: Schema or naming convention errors detected\n \"2\":\n description: Overlap detected — same path matches multiple artifacts\n \"3\":\n description: Config or input file not found / parse error\n\n resolve:\n summary: Output fully-resolved artifact definitions\n description: >-\n Expands config variables, applies authority-based defaults\n for manual_edit and change_control, and outputs the complete\n resolved DSL. Default format is yaml.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: format\n description: \"Output format (default: yaml)\"\n schema:\n type: string\n enum: [yaml, json]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ResolvedDefinitions\"\n description: >-\n Fully resolved artifact definitions with authority-based\n defaults applied. Format varies by --format (yaml default, json).\n exits:\n \"0\":\n description: Successfully output resolved definitions\n \"1\":\n description: Error resolving definitions\n \"3\":\n description: Config or input file not found / parse error\n\n list:\n summary: List registered artifacts\n description: >-\n Displays all registered artifacts with optional filtering\n by authority. Use --path for simple ID lookup; use explain\n for full governance metadata. Default format is text.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: authority\n description: Filter by authority type\n schema:\n type: string\n enum: [canonical, derived, generated, control]\n - name: path\n description: >-\n Reverse-lookup — show artifact IDs matching this file\n path. For full governance details, use the explain command.\n value_name: file\n - name: format\n description: \"Output format (default: text)\"\n schema:\n type: string\n enum: [text, json, yaml]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ArtifactList\"\n description: >-\n List of matching artifacts. Schema applies to --format json\n and --format yaml. Text format is human-readable only.\n exits:\n \"0\":\n description: Successfully listed artifacts\n \"1\":\n description: Error reading definitions\n \"3\":\n description: Config or input file not found / parse error\n\n explain:\n summary: Explain artifact properties for a file path\n description: >-\n Given a file path, resolves the matching artifact and displays\n its full governance properties — artifact ID, authority,\n manual_edit policy, change_control, and other metadata.\n Useful for humans and LLM agents to understand file\n governance. Default format is text.\n arguments:\n - name: path\n description: File path to explain\n required: true\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: format\n description: \"Output format (default: text)\"\n schema:\n type: string\n enum: [text, json, yaml]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ArtifactExplanation\"\n description: >-\n Artifact governance metadata for the resolved path.\n Schema applies to --format json and --format yaml.\n Text format is human-readable only.\n exits:\n \"0\":\n description: Path resolved to an artifact\n \"2\":\n description: Overlap — path matches multiple artifacts\n \"3\":\n description: Config or input file not found / parse error\n \"4\":\n description: Path does not match any registered artifact\n\n audit:\n summary: LLM-based semantic audit of artifact definitions\n description: >-\n Performs semantic analysis of artifact definitions using LLM\n to identify quality issues that static validation cannot\n detect — naming inconsistencies, missing coverage for common\n file types, authority mismatches, and structural improvements.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: adapter\n description: LLM adapter to use\n schema:\n type: string\n enum: [mock, cursor, openai, claude, gemini]\n - name: model\n description: Model name to pass to the adapter\n - name: show-prompt\n description: Output the constructed prompt without calling the LLM API\n schema:\n type: boolean\n - name: dry-run\n aliases: [n]\n description: Alias for --show-prompt (output prompt without LLM call)\n schema:\n type: boolean\n - name: fail-on\n description: >-\n Minimum severity that causes exit 10. Ordering:\n critical > error > warning > info. For example,\n --fail-on warning exits 10 on warning, error, or critical.\n schema:\n type: string\n enum: [info, warning, error, critical]\n - name: output\n aliases: [o]\n description: Write result to a file instead of stdout\n value_name: file\n - name: report-format\n description: >-\n Output format for the report (default: text).\n LLM commands use --report-format; deterministic\n commands use --format.\n schema:\n type: string\n enum: [text, json, yaml]\n effects:\n risk_level: medium\n reads:\n - artifact-definitions\n writes:\n - audit-report\n network:\n description: LLM API calls to configured provider\n idempotent: false\n execution_mode: normal\n stdout:\n schema:\n $ref: \"#/components/schemas/AgentAuditResult\"\n description: >-\n Structured audit result conforming to the AgentAuditResult\n schema. Format varies by --report-format (json, yaml, text).\n x-agent:\n expected_duration_ms: 120000\n retryable_exit_codes: [1]\n recommended_before_use:\n - \"Run with --show-prompt first to preview the prompt\"\n exits:\n \"0\":\n description: Audit completed — no findings above threshold\n \"1\":\n description: General / transient error\n \"3\":\n description: Config or input file not found / parse error\n \"10\":\n description: Findings detected above --fail-on threshold\n \"11\":\n description: agent-contracts-runtime is not installed\n \"12\":\n description: Adapter initialization error (missing API key, etc.)\n\n # ── agents ──────────────────────────────────────────\n agents:\n summary: Output the full resolved agent DSL as structured data.\n description: >-\n Outputs the complete resolved agent-contracts DSL (agents, tasks,\n workflows, handoff_types) embedded in this CLI binary.\n Useful for debugging, external tooling integration, and DSL\n inspection.\n options:\n - name: format\n aliases: [F]\n description: Output format.\n schema:\n type: string\n enum: [yaml, json]\n default: yaml\n\n exits:\n '0':\n description: DSL output successfully.\n stdout:\n format: text\n '1':\n description: Failed to load embedded DSL.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: []\n\n env:\n OPENAI_API_KEY:\n description: >-\n OpenAI API key. Required when --adapter openai is selected.\n required: false\n ANTHROPIC_API_KEY:\n description: >-\n Anthropic API key. Required when --adapter claude is selected.\n required: false\n GEMINI_API_KEY:\n description: >-\n Google Gemini API key. Required when --adapter gemini is selected.\n required: false\n CURSOR_API_KEY:\n description: >-\n Cursor API key. Required when --adapter cursor is selected.\n required: false\n\ncomponents:\n schemas:\n AgentFinding:\n type: object\n properties:\n id:\n type: string\n severity:\n type: string\n enum: [critical, error, warning, info]\n category:\n type: string\n title:\n type: string\n description:\n type: string\n location:\n type: string\n target:\n type: string\n recommendation:\n type: string\n evidence:\n type: array\n items:\n $ref: \"#/components/schemas/AgentEvidence\"\n required: [id, severity, category, title, description]\n\n AgentAuditResult:\n type: object\n properties:\n summary:\n type: string\n risk_level:\n type: string\n enum: [none, low, medium, high, critical]\n findings:\n type: array\n items:\n $ref: \"#/components/schemas/AgentFinding\"\n recommended_actions:\n type: array\n items:\n $ref: \"#/components/schemas/AgentRecommendedAction\"\n metadata:\n type: object\n properties:\n total_artifacts:\n type: integer\n analyzed_artifacts:\n type: integer\n analysis_scope:\n type: string\n required: [summary, risk_level, findings, recommended_actions]\n\n AgentEvidence:\n type: object\n properties:\n kind:\n type: string\n enum: [schema, code, config, runtime, doc]\n target:\n type: string\n location:\n type: string\n excerpt:\n type: string\n reasoning:\n type: string\n required: [kind]\n\n AgentRecommendedAction:\n type: object\n properties:\n action:\n type: string\n priority:\n type: string\n enum: [high, medium, low]\n description:\n type: string\n required: [action, priority]\n\n ResolvedDefinitions:\n type: object\n description: Output of the resolve command\n properties:\n artifact_contracts:\n type: string\n system:\n type: object\n properties:\n id:\n type: string\n name:\n type: string\n required: [id]\n artifacts:\n type: object\n description: Map of artifact ID to resolved artifact definition\n additionalProperties:\n $ref: \"#/components/schemas/ArtifactDefinition\"\n required: [artifact_contracts, system, artifacts]\n\n ArtifactExplanation:\n type: object\n description: Output of the explain command (json/yaml format)\n properties:\n id:\n type: string\n type:\n type: string\n authority:\n type: string\n manual_edit:\n type: string\n change_control:\n type: string\n visibility:\n type: string\n description:\n type: string\n path_patterns:\n type: array\n items:\n type: string\n exclude_patterns:\n type: array\n items:\n type: string\n required: [id, type, authority, manual_edit, change_control]\n\n ArtifactDefinition:\n type: object\n description: A single resolved artifact definition\n properties:\n type:\n type: string\n authority:\n type: string\n enum: [canonical, derived, generated, control]\n manual_edit:\n type: string\n enum: [allowed, discouraged, forbidden]\n change_control:\n type: string\n enum: [none, approval-required, regeneration-required]\n visibility:\n type: string\n enum: [public, internal, private]\n description:\n type: string\n path_patterns:\n type: array\n items:\n type: string\n exclude_patterns:\n type: array\n items:\n type: string\n states:\n type: array\n items:\n type: string\n required: [type, authority, manual_edit, change_control, visibility, path_patterns]\n\n ArtifactList:\n type: object\n description: Output of the list command (json/yaml format)\n properties:\n artifacts:\n type: object\n description: Map of artifact ID to resolved artifact definition\n additionalProperties:\n $ref: \"#/components/schemas/ArtifactDefinition\"\n\n ValidationResult:\n type: object\n description: Output of the validate command (json format, on error)\n properties:\n valid:\n type: boolean\n diagnostics:\n type: array\n items:\n type: object\n properties:\n path:\n type: string\n message:\n type: string\n severity:\n type: string\n enum: [error, warning]\n required: [message, severity]\n overlaps:\n type: array\n items:\n type: object\n properties:\n path:\n type: string\n matching_artifacts:\n type: array\n items:\n type: string\n required: [path, matching_artifacts]\n required: [valid, diagnostics, overlaps]\n";
|
|
4
|
-
export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"artifact-contracts CLI\",\n \"version\": \"0.1.1\",\n \"description\": \"Declarative artifact registry — define file properties, resolve paths to artifact IDs, and detect definition overlaps. stdout is reserved for primary output (JSON/YAML/text result); all diagnostics and progress messages go to stderr.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-log-inc\",\n \"url\": \"https://github.com/foo-log-inc/artifact-contracts\"\n }\n },\n \"artifact_slots\": {\n \"artifact-definitions\": {\n \"description\": \"artifact-contracts.yaml definitions and config files\",\n \"direction\": \"read\"\n },\n \"repository-files\": {\n \"description\": \"Repository files scanned for path pattern matching and overlap detection\",\n \"direction\": \"read\"\n },\n \"audit-report\": {\n \"description\": \"LLM audit result output files\",\n \"direction\": \"write\"\n }\n },\n \"command_sets\": {\n \"artifact-contracts\": {\n \"summary\": \"Artifact registry CLI — validate definitions, resolve artifacts, list registered entries, and explain file properties.\",\n \"executable\": \"artifact-contracts\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Output the version number\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Display help for command\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"validate\": {\n \"summary\": \"Validate artifact-contracts definitions\",\n \"description\": \"Validates artifact-contracts.yaml against the schema, checks artifact ID naming conventions, ensures path_patterns are non-empty, and optionally detects overlapping definitions against real repository files.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"check-files\",\n \"description\": \"Scan repository files to detect path_patterns overlaps that static glob analysis cannot fully determine. When enabled, reads all files from git ls-files or glob.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\",\n \"repository-files\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 5000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ValidationResult\"\n },\n \"description\": \"Validation diagnostics. On exit 0 stdout is empty (diagnostics go to stderr). On exit 1/2 with --format json, structured diagnostics are written to stdout.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Validation passed with no errors\"\n },\n \"1\": {\n \"description\": \"Schema or naming convention errors detected\"\n },\n \"2\": {\n \"description\": \"Overlap detected — same path matches multiple artifacts\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"resolve\": {\n \"summary\": \"Output fully-resolved artifact definitions\",\n \"description\": \"Expands config variables, applies authority-based defaults for manual_edit and change_control, and outputs the complete resolved DSL. Default format is yaml.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: yaml)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ResolvedDefinitions\"\n },\n \"description\": \"Fully resolved artifact definitions with authority-based defaults applied. Format varies by --format (yaml default, json).\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Successfully output resolved definitions\"\n },\n \"1\": {\n \"description\": \"Error resolving definitions\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"list\": {\n \"summary\": \"List registered artifacts\",\n \"description\": \"Displays all registered artifacts with optional filtering by authority. Use --path for simple ID lookup; use explain for full governance metadata. Default format is text.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"authority\",\n \"description\": \"Filter by authority type\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"canonical\",\n \"derived\",\n \"generated\",\n \"control\"\n ]\n }\n },\n {\n \"name\": \"path\",\n \"description\": \"Reverse-lookup — show artifact IDs matching this file path. For full governance details, use the explain command.\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: text)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ArtifactList\"\n },\n \"description\": \"List of matching artifacts. Schema applies to --format json and --format yaml. Text format is human-readable only.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Successfully listed artifacts\"\n },\n \"1\": {\n \"description\": \"Error reading definitions\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"explain\": {\n \"summary\": \"Explain artifact properties for a file path\",\n \"description\": \"Given a file path, resolves the matching artifact and displays its full governance properties — artifact ID, authority, manual_edit policy, change_control, and other metadata. Useful for humans and LLM agents to understand file governance. Default format is text.\",\n \"arguments\": [\n {\n \"name\": \"path\",\n \"description\": \"File path to explain\",\n \"required\": true\n }\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: text)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ArtifactExplanation\"\n },\n \"description\": \"Artifact governance metadata for the resolved path. Schema applies to --format json and --format yaml. Text format is human-readable only.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Path resolved to an artifact\"\n },\n \"2\": {\n \"description\": \"Overlap — path matches multiple artifacts\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n },\n \"4\": {\n \"description\": \"Path does not match any registered artifact\"\n }\n }\n },\n \"audit\": {\n \"summary\": \"LLM-based semantic audit of artifact definitions\",\n \"description\": \"Performs semantic analysis of artifact definitions using LLM to identify quality issues that static validation cannot detect — naming inconsistencies, missing coverage for common file types, authority mismatches, and structural improvements.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"adapter\",\n \"description\": \"LLM adapter to use\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"mock\",\n \"cursor\",\n \"openai\",\n \"claude\",\n \"gemini\"\n ]\n }\n },\n {\n \"name\": \"model\",\n \"description\": \"Model name to pass to the adapter\"\n },\n {\n \"name\": \"show-prompt\",\n \"description\": \"Output the constructed prompt without calling the LLM API\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"n\"\n ],\n \"description\": \"Alias for --show-prompt (output prompt without LLM call)\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"fail-on\",\n \"description\": \"Minimum severity that causes exit 10. Ordering: critical > error > warning > info. For example, --fail-on warning exits 10 on warning, error, or critical.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"info\",\n \"warning\",\n \"error\",\n \"critical\"\n ]\n }\n },\n {\n \"name\": \"output\",\n \"aliases\": [\n \"o\"\n ],\n \"description\": \"Write result to a file instead of stdout\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"report-format\",\n \"description\": \"Output format for the report (default: text). LLM commands use --report-format; deterministic commands use --format.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"medium\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"writes\": [\n \"audit-report\"\n ],\n \"network\": {\n \"description\": \"LLM API calls to configured provider\",\n \"idempotent\": false\n },\n \"execution_mode\": \"normal\"\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AgentAuditResult\"\n },\n \"description\": \"Structured audit result conforming to the AgentAuditResult schema. Format varies by --report-format (json, yaml, text).\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 120000,\n \"retryable_exit_codes\": [\n 1\n ],\n \"recommended_before_use\": [\n \"Run with --show-prompt first to preview the prompt\"\n ]\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Audit completed — no findings above threshold\"\n },\n \"1\": {\n \"description\": \"General / transient error\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n },\n \"10\": {\n \"description\": \"Findings detected above --fail-on threshold\"\n },\n \"11\": {\n \"description\": \"agent-contracts-runtime is not installed\"\n },\n \"12\": {\n \"description\": \"Adapter initialization error (missing API key, etc.)\"\n }\n }\n },\n \"agents\": {\n \"summary\": \"Output the full resolved agent DSL as structured data.\",\n \"description\": \"Outputs the complete resolved agent-contracts DSL (agents, tasks, workflows, handoff_types) embedded in this CLI binary. Useful for debugging, external tooling integration, and DSL inspection.\",\n \"options\": [\n {\n \"name\": \"format\",\n \"aliases\": [\n \"F\"\n ],\n \"description\": \"Output format.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\n ],\n \"default\": \"yaml\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"DSL output successfully.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Failed to load embedded DSL.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": []\n }\n }\n },\n \"env\": {\n \"OPENAI_API_KEY\": {\n \"description\": \"OpenAI API key. Required when --adapter openai is selected.\",\n \"required\": false\n },\n \"ANTHROPIC_API_KEY\": {\n \"description\": \"Anthropic API key. Required when --adapter claude is selected.\",\n \"required\": false\n },\n \"GEMINI_API_KEY\": {\n \"description\": \"Google Gemini API key. Required when --adapter gemini is selected.\",\n \"required\": false\n },\n \"CURSOR_API_KEY\": {\n \"description\": \"Cursor API key. Required when --adapter cursor is selected.\",\n \"required\": false\n }\n }\n }\n },\n \"components\": {\n \"schemas\": {\n \"AgentFinding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"string\",\n \"enum\": [\n \"critical\",\n \"error\",\n \"warning\",\n \"info\"\n ]\n },\n \"category\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"location\": {\n \"type\": \"string\"\n },\n \"target\": {\n \"type\": \"string\"\n },\n \"recommendation\": {\n \"type\": \"string\"\n },\n \"evidence\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentEvidence\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"severity\",\n \"category\",\n \"title\",\n \"description\"\n ]\n },\n \"AgentAuditResult\": {\n \"type\": \"object\",\n \"properties\": {\n \"summary\": {\n \"type\": \"string\"\n },\n \"risk_level\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"low\",\n \"medium\",\n \"high\",\n \"critical\"\n ]\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentFinding\"\n }\n },\n \"recommended_actions\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentRecommendedAction\"\n }\n },\n \"metadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"total_artifacts\": {\n \"type\": \"integer\"\n },\n \"analyzed_artifacts\": {\n \"type\": \"integer\"\n },\n \"analysis_scope\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"required\": [\n \"summary\",\n \"risk_level\",\n \"findings\",\n \"recommended_actions\"\n ]\n },\n \"AgentEvidence\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"schema\",\n \"code\",\n \"config\",\n \"runtime\",\n \"doc\"\n ]\n },\n \"target\": {\n \"type\": \"string\"\n },\n \"location\": {\n \"type\": \"string\"\n },\n \"excerpt\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"kind\"\n ]\n },\n \"AgentRecommendedAction\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n },\n \"priority\": {\n \"type\": \"string\",\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\"\n ]\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"action\",\n \"priority\"\n ]\n },\n \"ResolvedDefinitions\": {\n \"type\": \"object\",\n \"description\": \"Output of the resolve command\",\n \"properties\": {\n \"artifact_contracts\": {\n \"type\": \"string\"\n },\n \"system\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ]\n },\n \"artifacts\": {\n \"type\": \"object\",\n \"description\": \"Map of artifact ID to resolved artifact definition\",\n \"additionalProperties\": {\n \"$ref\": \"#/components/schemas/ArtifactDefinition\"\n }\n }\n },\n \"required\": [\n \"artifact_contracts\",\n \"system\",\n \"artifacts\"\n ]\n },\n \"ArtifactExplanation\": {\n \"type\": \"object\",\n \"description\": \"Output of the explain command (json/yaml format)\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"authority\": {\n \"type\": \"string\"\n },\n \"manual_edit\": {\n \"type\": \"string\"\n },\n \"change_control\": {\n \"type\": \"string\"\n },\n \"visibility\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"path_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"exclude_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"authority\",\n \"manual_edit\",\n \"change_control\"\n ]\n },\n \"ArtifactDefinition\": {\n \"type\": \"object\",\n \"description\": \"A single resolved artifact definition\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"authority\": {\n \"type\": \"string\",\n \"enum\": [\n \"canonical\",\n \"derived\",\n \"generated\",\n \"control\"\n ]\n },\n \"manual_edit\": {\n \"type\": \"string\",\n \"enum\": [\n \"allowed\",\n \"discouraged\",\n \"forbidden\"\n ]\n },\n \"change_control\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"approval-required\",\n \"regeneration-required\"\n ]\n },\n \"visibility\": {\n \"type\": \"string\",\n \"enum\": [\n \"public\",\n \"internal\",\n \"private\"\n ]\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"path_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"exclude_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"states\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"type\",\n \"authority\",\n \"manual_edit\",\n \"change_control\",\n \"visibility\",\n \"path_patterns\"\n ]\n },\n \"ArtifactList\": {\n \"type\": \"object\",\n \"description\": \"Output of the list command (json/yaml format)\",\n \"properties\": {\n \"artifacts\": {\n \"type\": \"object\",\n \"description\": \"Map of artifact ID to resolved artifact definition\",\n \"additionalProperties\": {\n \"$ref\": \"#/components/schemas/ArtifactDefinition\"\n }\n }\n }\n },\n \"ValidationResult\": {\n \"type\": \"object\",\n \"description\": \"Output of the validate command (json format, on error)\",\n \"properties\": {\n \"valid\": {\n \"type\": \"boolean\"\n },\n \"diagnostics\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"message\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"string\",\n \"enum\": [\n \"error\",\n \"warning\"\n ]\n }\n },\n \"required\": [\n \"message\",\n \"severity\"\n ]\n }\n },\n \"overlaps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"matching_artifacts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"path\",\n \"matching_artifacts\"\n ]\n }\n }\n },\n \"required\": [\n \"valid\",\n \"diagnostics\",\n \"overlaps\"\n ]\n }\n }\n }\n}";
|
|
3
|
+
export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: artifact-contracts CLI\n version: 0.1.1\n description: >-\n Declarative artifact registry — define file properties, resolve\n paths to artifact IDs, and detect definition overlaps.\n stdout is reserved for primary output (JSON/YAML/text result);\n all diagnostics and progress messages go to stderr.\n license:\n name: MIT\n contact:\n name: foo-log-inc\n url: https://github.com/foo-log-inc/artifact-contracts\n\nartifact_slots:\n artifact-definitions:\n description: artifact-contracts.yaml definitions and config files\n direction: read\n repository-files:\n description: Repository files scanned for path pattern matching and overlap detection\n direction: read\n audit-report:\n description: LLM audit result output files\n direction: write\n\ncommand_sets:\n artifact-contracts:\n summary: >-\n Artifact registry CLI — validate definitions, resolve artifacts,\n list registered entries, and explain file properties.\n executable: artifact-contracts\n\n global_options:\n - name: version\n aliases: [V]\n description: Output the version number\n schema:\n type: boolean\n - name: help\n aliases: [h]\n description: Display help for command\n schema:\n type: boolean\n\n commands:\n validate:\n summary: Validate artifact-contracts definitions\n description: >-\n Validates artifact-contracts.yaml against the schema, checks\n artifact ID naming conventions, ensures path_patterns are\n non-empty, and optionally detects overlapping definitions\n against real repository files.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: check-files\n description: >-\n Scan repository files to detect path_patterns overlaps\n that static glob analysis cannot fully determine.\n When enabled, reads all files from git ls-files or glob.\n schema:\n type: boolean\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n - repository-files\n execution_mode: normal\n x-agent:\n expected_duration_ms: 5000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ValidationResult\"\n description: >-\n Validation diagnostics. On exit 0 stdout is empty (diagnostics\n go to stderr). On exit 1/2 with --format json, structured\n diagnostics are written to stdout.\n exits:\n \"0\":\n description: Validation passed with no errors\n \"1\":\n description: Schema or naming convention errors detected\n \"2\":\n description: Overlap detected — same path matches multiple artifacts\n \"3\":\n description: Config or input file not found / parse error\n\n resolve:\n summary: Output fully-resolved artifact definitions\n description: >-\n Expands config variables, applies authority-based defaults\n for manual_edit and change_control, and outputs the complete\n resolved DSL. Default format is yaml.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: format\n description: \"Output format (default: yaml)\"\n schema:\n type: string\n enum: [yaml, json]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ResolvedDefinitions\"\n description: >-\n Fully resolved artifact definitions with authority-based\n defaults applied. Format varies by --format (yaml default, json).\n exits:\n \"0\":\n description: Successfully output resolved definitions\n \"1\":\n description: Error resolving definitions\n \"3\":\n description: Config or input file not found / parse error\n\n list:\n summary: List registered artifacts\n description: >-\n Displays all registered artifacts with optional filtering\n by authority. Use --path for simple ID lookup; use explain\n for full governance metadata. Default format is text.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: authority\n description: Filter by authority type\n schema:\n type: string\n enum: [canonical, derived, generated, control]\n - name: path\n description: >-\n Reverse-lookup — show artifact IDs matching this file\n path. For full governance details, use the explain command.\n value_name: file\n - name: format\n description: \"Output format (default: text)\"\n schema:\n type: string\n enum: [text, json, yaml]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ArtifactList\"\n description: >-\n List of matching artifacts. Schema applies to --format json\n and --format yaml. Text format is human-readable only.\n exits:\n \"0\":\n description: Successfully listed artifacts\n \"1\":\n description: Error reading definitions\n \"3\":\n description: Config or input file not found / parse error\n\n explain:\n summary: Explain artifact properties for a file path\n description: >-\n Given a file path, resolves the matching artifact and displays\n its full governance properties — artifact ID, authority,\n manual_edit policy, change_control, and other metadata.\n Useful for humans and LLM agents to understand file\n governance. Default format is text.\n arguments:\n - name: path\n description: File path to explain\n required: true\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: format\n description: \"Output format (default: text)\"\n schema:\n type: string\n enum: [text, json, yaml]\n effects:\n risk_level: low\n reads:\n - artifact-definitions\n execution_mode: normal\n x-agent:\n expected_duration_ms: 2000\n retryable_exit_codes: []\n stdout:\n schema:\n $ref: \"#/components/schemas/ArtifactExplanation\"\n description: >-\n Artifact governance metadata for the resolved path.\n Schema applies to --format json and --format yaml.\n Text format is human-readable only.\n exits:\n \"0\":\n description: Path resolved to an artifact\n \"2\":\n description: Overlap — path matches multiple artifacts\n \"3\":\n description: Config or input file not found / parse error\n \"4\":\n description: Path does not match any registered artifact\n\n audit:\n summary: LLM-based semantic audit of artifact definitions\n description: >-\n Performs semantic analysis of artifact definitions using LLM\n to identify quality issues that static validation cannot\n detect — naming inconsistencies, missing coverage for common\n file types, authority mismatches, and structural improvements.\n options:\n - name: config\n description: Path to artifact-contracts.config.yaml\n value_name: path\n - name: adapter\n description: LLM adapter to use\n schema:\n type: string\n enum: [mock, cursor, openai, claude, gemini]\n - name: model\n description: Model name to pass to the adapter\n - name: show-prompt\n description: Output the constructed prompt without calling the LLM API\n schema:\n type: boolean\n - name: dry-run\n aliases: [n]\n description: Alias for --show-prompt (output prompt without LLM call)\n schema:\n type: boolean\n - name: fail-on\n description: >-\n Minimum severity that causes exit 10. Ordering:\n critical > error > warning > info. For example,\n --fail-on warning exits 10 on warning, error, or critical.\n schema:\n type: string\n enum: [info, warning, error, critical]\n - name: output\n aliases: [o]\n description: Write result to a file instead of stdout\n value_name: file\n - name: report-format\n description: >-\n Output format for the report (default: text).\n LLM commands use --report-format; deterministic\n commands use --format.\n schema:\n type: string\n enum: [text, json, yaml]\n - name: log-file\n aliases: [l]\n description: Write agent progress log to this file path.\n schema:\n type: string\n effects:\n risk_level: medium\n reads:\n - artifact-definitions\n writes:\n - audit-report\n network:\n description: LLM API calls to configured provider\n idempotent: false\n execution_mode: normal\n stdout:\n schema:\n $ref: \"#/components/schemas/AgentAuditResult\"\n description: >-\n Structured audit result conforming to the AgentAuditResult\n schema. Format varies by --report-format (json, yaml, text).\n x-agent:\n dsl_task: audit-artifact-definitions\n expected_duration_ms: 120000\n retryable_exit_codes: [1]\n recommended_before_use:\n - \"Run with --show-prompt first to preview the prompt\"\n exits:\n \"0\":\n description: Audit completed — no findings above threshold\n \"1\":\n description: General / transient error\n \"3\":\n description: Config or input file not found / parse error\n \"10\":\n description: Findings detected above --fail-on threshold\n \"11\":\n description: agent-contracts-runtime is not installed\n \"12\":\n description: Adapter initialization error (missing API key, etc.)\n\n # ── agents ──────────────────────────────────────────\n agents:\n summary: Output the full resolved agent DSL as structured data.\n description: >-\n Outputs the complete resolved agent-contracts DSL (agents, tasks,\n workflows, handoff_types) embedded in this CLI binary.\n Useful for debugging, external tooling integration, and DSL\n inspection.\n options:\n - name: format\n aliases: [F]\n description: Output format.\n schema:\n type: string\n enum: [yaml, json]\n default: yaml\n\n exits:\n '0':\n description: DSL output successfully.\n stdout:\n format: text\n '1':\n description: Failed to load embedded DSL.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: []\n\n env:\n OPENAI_API_KEY:\n description: >-\n OpenAI API key. Required when --adapter openai is selected.\n required: false\n ANTHROPIC_API_KEY:\n description: >-\n Anthropic API key. Required when --adapter claude is selected.\n required: false\n GEMINI_API_KEY:\n description: >-\n Google Gemini API key. Required when --adapter gemini is selected.\n required: false\n CURSOR_API_KEY:\n description: >-\n Cursor API key. Required when --adapter cursor is selected.\n required: false\n\ncomponents:\n schemas:\n AgentFinding:\n type: object\n properties:\n id:\n type: string\n severity:\n type: string\n enum: [critical, error, warning, info]\n category:\n type: string\n title:\n type: string\n description:\n type: string\n location:\n type: string\n target:\n type: string\n recommendation:\n type: string\n evidence:\n type: array\n items:\n $ref: \"#/components/schemas/AgentEvidence\"\n required: [id, severity, category, title, description]\n\n AgentAuditResult:\n type: object\n properties:\n summary:\n type: string\n risk_level:\n type: string\n enum: [none, low, medium, high, critical]\n findings:\n type: array\n items:\n $ref: \"#/components/schemas/AgentFinding\"\n recommended_actions:\n type: array\n items:\n $ref: \"#/components/schemas/AgentRecommendedAction\"\n metadata:\n type: object\n properties:\n total_artifacts:\n type: integer\n analyzed_artifacts:\n type: integer\n analysis_scope:\n type: string\n required: [summary, risk_level, findings, recommended_actions]\n\n AgentEvidence:\n type: object\n properties:\n kind:\n type: string\n enum: [schema, code, config, runtime, doc]\n target:\n type: string\n location:\n type: string\n excerpt:\n type: string\n reasoning:\n type: string\n required: [kind]\n\n AgentRecommendedAction:\n type: object\n properties:\n action:\n type: string\n priority:\n type: string\n enum: [high, medium, low]\n description:\n type: string\n required: [action, priority]\n\n ResolvedDefinitions:\n type: object\n description: Output of the resolve command\n properties:\n artifact_contracts:\n type: string\n system:\n type: object\n properties:\n id:\n type: string\n name:\n type: string\n required: [id]\n artifacts:\n type: object\n description: Map of artifact ID to resolved artifact definition\n additionalProperties:\n $ref: \"#/components/schemas/ArtifactDefinition\"\n required: [artifact_contracts, system, artifacts]\n\n ArtifactExplanation:\n type: object\n description: Output of the explain command (json/yaml format)\n properties:\n id:\n type: string\n type:\n type: string\n authority:\n type: string\n manual_edit:\n type: string\n change_control:\n type: string\n visibility:\n type: string\n description:\n type: string\n path_patterns:\n type: array\n items:\n type: string\n exclude_patterns:\n type: array\n items:\n type: string\n required: [id, type, authority, manual_edit, change_control]\n\n ArtifactDefinition:\n type: object\n description: A single resolved artifact definition\n properties:\n type:\n type: string\n authority:\n type: string\n enum: [canonical, derived, generated, control]\n manual_edit:\n type: string\n enum: [allowed, discouraged, forbidden]\n change_control:\n type: string\n enum: [none, approval-required, regeneration-required]\n visibility:\n type: string\n enum: [public, internal, private]\n description:\n type: string\n path_patterns:\n type: array\n items:\n type: string\n exclude_patterns:\n type: array\n items:\n type: string\n states:\n type: array\n items:\n type: string\n required: [type, authority, manual_edit, change_control, visibility, path_patterns]\n\n ArtifactList:\n type: object\n description: Output of the list command (json/yaml format)\n properties:\n artifacts:\n type: object\n description: Map of artifact ID to resolved artifact definition\n additionalProperties:\n $ref: \"#/components/schemas/ArtifactDefinition\"\n\n ValidationResult:\n type: object\n description: Output of the validate command (json format, on error)\n properties:\n valid:\n type: boolean\n diagnostics:\n type: array\n items:\n type: object\n properties:\n path:\n type: string\n message:\n type: string\n severity:\n type: string\n enum: [error, warning]\n required: [message, severity]\n overlaps:\n type: array\n items:\n type: object\n properties:\n path:\n type: string\n matching_artifacts:\n type: array\n items:\n type: string\n required: [path, matching_artifacts]\n required: [valid, diagnostics, overlaps]\n";
|
|
4
|
+
export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"artifact-contracts CLI\",\n \"version\": \"0.1.1\",\n \"description\": \"Declarative artifact registry — define file properties, resolve paths to artifact IDs, and detect definition overlaps. stdout is reserved for primary output (JSON/YAML/text result); all diagnostics and progress messages go to stderr.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-log-inc\",\n \"url\": \"https://github.com/foo-log-inc/artifact-contracts\"\n }\n },\n \"artifact_slots\": {\n \"artifact-definitions\": {\n \"description\": \"artifact-contracts.yaml definitions and config files\",\n \"direction\": \"read\"\n },\n \"repository-files\": {\n \"description\": \"Repository files scanned for path pattern matching and overlap detection\",\n \"direction\": \"read\"\n },\n \"audit-report\": {\n \"description\": \"LLM audit result output files\",\n \"direction\": \"write\"\n }\n },\n \"command_sets\": {\n \"artifact-contracts\": {\n \"summary\": \"Artifact registry CLI — validate definitions, resolve artifacts, list registered entries, and explain file properties.\",\n \"executable\": \"artifact-contracts\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Output the version number\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Display help for command\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"validate\": {\n \"summary\": \"Validate artifact-contracts definitions\",\n \"description\": \"Validates artifact-contracts.yaml against the schema, checks artifact ID naming conventions, ensures path_patterns are non-empty, and optionally detects overlapping definitions against real repository files.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"check-files\",\n \"description\": \"Scan repository files to detect path_patterns overlaps that static glob analysis cannot fully determine. When enabled, reads all files from git ls-files or glob.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\",\n \"repository-files\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 5000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ValidationResult\"\n },\n \"description\": \"Validation diagnostics. On exit 0 stdout is empty (diagnostics go to stderr). On exit 1/2 with --format json, structured diagnostics are written to stdout.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Validation passed with no errors\"\n },\n \"1\": {\n \"description\": \"Schema or naming convention errors detected\"\n },\n \"2\": {\n \"description\": \"Overlap detected — same path matches multiple artifacts\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"resolve\": {\n \"summary\": \"Output fully-resolved artifact definitions\",\n \"description\": \"Expands config variables, applies authority-based defaults for manual_edit and change_control, and outputs the complete resolved DSL. Default format is yaml.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: yaml)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ResolvedDefinitions\"\n },\n \"description\": \"Fully resolved artifact definitions with authority-based defaults applied. Format varies by --format (yaml default, json).\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Successfully output resolved definitions\"\n },\n \"1\": {\n \"description\": \"Error resolving definitions\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"list\": {\n \"summary\": \"List registered artifacts\",\n \"description\": \"Displays all registered artifacts with optional filtering by authority. Use --path for simple ID lookup; use explain for full governance metadata. Default format is text.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"authority\",\n \"description\": \"Filter by authority type\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"canonical\",\n \"derived\",\n \"generated\",\n \"control\"\n ]\n }\n },\n {\n \"name\": \"path\",\n \"description\": \"Reverse-lookup — show artifact IDs matching this file path. For full governance details, use the explain command.\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: text)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ArtifactList\"\n },\n \"description\": \"List of matching artifacts. Schema applies to --format json and --format yaml. Text format is human-readable only.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Successfully listed artifacts\"\n },\n \"1\": {\n \"description\": \"Error reading definitions\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n }\n }\n },\n \"explain\": {\n \"summary\": \"Explain artifact properties for a file path\",\n \"description\": \"Given a file path, resolves the matching artifact and displays its full governance properties — artifact ID, authority, manual_edit policy, change_control, and other metadata. Useful for humans and LLM agents to understand file governance. Default format is text.\",\n \"arguments\": [\n {\n \"name\": \"path\",\n \"description\": \"File path to explain\",\n \"required\": true\n }\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"format\",\n \"description\": \"Output format (default: text)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"low\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"execution_mode\": \"normal\"\n },\n \"x-agent\": {\n \"expected_duration_ms\": 2000,\n \"retryable_exit_codes\": []\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ArtifactExplanation\"\n },\n \"description\": \"Artifact governance metadata for the resolved path. Schema applies to --format json and --format yaml. Text format is human-readable only.\"\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Path resolved to an artifact\"\n },\n \"2\": {\n \"description\": \"Overlap — path matches multiple artifacts\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n },\n \"4\": {\n \"description\": \"Path does not match any registered artifact\"\n }\n }\n },\n \"audit\": {\n \"summary\": \"LLM-based semantic audit of artifact definitions\",\n \"description\": \"Performs semantic analysis of artifact definitions using LLM to identify quality issues that static validation cannot detect — naming inconsistencies, missing coverage for common file types, authority mismatches, and structural improvements.\",\n \"options\": [\n {\n \"name\": \"config\",\n \"description\": \"Path to artifact-contracts.config.yaml\",\n \"value_name\": \"path\"\n },\n {\n \"name\": \"adapter\",\n \"description\": \"LLM adapter to use\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"mock\",\n \"cursor\",\n \"openai\",\n \"claude\",\n \"gemini\"\n ]\n }\n },\n {\n \"name\": \"model\",\n \"description\": \"Model name to pass to the adapter\"\n },\n {\n \"name\": \"show-prompt\",\n \"description\": \"Output the constructed prompt without calling the LLM API\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"n\"\n ],\n \"description\": \"Alias for --show-prompt (output prompt without LLM call)\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"fail-on\",\n \"description\": \"Minimum severity that causes exit 10. Ordering: critical > error > warning > info. For example, --fail-on warning exits 10 on warning, error, or critical.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"info\",\n \"warning\",\n \"error\",\n \"critical\"\n ]\n }\n },\n {\n \"name\": \"output\",\n \"aliases\": [\n \"o\"\n ],\n \"description\": \"Write result to a file instead of stdout\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"report-format\",\n \"description\": \"Output format for the report (default: text). LLM commands use --report-format; deterministic commands use --format.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\",\n \"json\",\n \"yaml\"\n ]\n }\n },\n {\n \"name\": \"log-file\",\n \"aliases\": [\n \"l\"\n ],\n \"description\": \"Write agent progress log to this file path.\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"effects\": {\n \"risk_level\": \"medium\",\n \"reads\": [\n \"artifact-definitions\"\n ],\n \"writes\": [\n \"audit-report\"\n ],\n \"network\": {\n \"description\": \"LLM API calls to configured provider\",\n \"idempotent\": false\n },\n \"execution_mode\": \"normal\"\n },\n \"stdout\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AgentAuditResult\"\n },\n \"description\": \"Structured audit result conforming to the AgentAuditResult schema. Format varies by --report-format (json, yaml, text).\"\n },\n \"x-agent\": {\n \"dsl_task\": \"audit-artifact-definitions\",\n \"expected_duration_ms\": 120000,\n \"retryable_exit_codes\": [\n 1\n ],\n \"recommended_before_use\": [\n \"Run with --show-prompt first to preview the prompt\"\n ]\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Audit completed — no findings above threshold\"\n },\n \"1\": {\n \"description\": \"General / transient error\"\n },\n \"3\": {\n \"description\": \"Config or input file not found / parse error\"\n },\n \"10\": {\n \"description\": \"Findings detected above --fail-on threshold\"\n },\n \"11\": {\n \"description\": \"agent-contracts-runtime is not installed\"\n },\n \"12\": {\n \"description\": \"Adapter initialization error (missing API key, etc.)\"\n }\n }\n },\n \"agents\": {\n \"summary\": \"Output the full resolved agent DSL as structured data.\",\n \"description\": \"Outputs the complete resolved agent-contracts DSL (agents, tasks, workflows, handoff_types) embedded in this CLI binary. Useful for debugging, external tooling integration, and DSL inspection.\",\n \"options\": [\n {\n \"name\": \"format\",\n \"aliases\": [\n \"F\"\n ],\n \"description\": \"Output format.\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\n ],\n \"default\": \"yaml\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"DSL output successfully.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Failed to load embedded DSL.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": []\n }\n }\n },\n \"env\": {\n \"OPENAI_API_KEY\": {\n \"description\": \"OpenAI API key. Required when --adapter openai is selected.\",\n \"required\": false\n },\n \"ANTHROPIC_API_KEY\": {\n \"description\": \"Anthropic API key. Required when --adapter claude is selected.\",\n \"required\": false\n },\n \"GEMINI_API_KEY\": {\n \"description\": \"Google Gemini API key. Required when --adapter gemini is selected.\",\n \"required\": false\n },\n \"CURSOR_API_KEY\": {\n \"description\": \"Cursor API key. Required when --adapter cursor is selected.\",\n \"required\": false\n }\n }\n }\n },\n \"components\": {\n \"schemas\": {\n \"AgentFinding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"string\",\n \"enum\": [\n \"critical\",\n \"error\",\n \"warning\",\n \"info\"\n ]\n },\n \"category\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"location\": {\n \"type\": \"string\"\n },\n \"target\": {\n \"type\": \"string\"\n },\n \"recommendation\": {\n \"type\": \"string\"\n },\n \"evidence\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentEvidence\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"severity\",\n \"category\",\n \"title\",\n \"description\"\n ]\n },\n \"AgentAuditResult\": {\n \"type\": \"object\",\n \"properties\": {\n \"summary\": {\n \"type\": \"string\"\n },\n \"risk_level\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"low\",\n \"medium\",\n \"high\",\n \"critical\"\n ]\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentFinding\"\n }\n },\n \"recommended_actions\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AgentRecommendedAction\"\n }\n },\n \"metadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"total_artifacts\": {\n \"type\": \"integer\"\n },\n \"analyzed_artifacts\": {\n \"type\": \"integer\"\n },\n \"analysis_scope\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"required\": [\n \"summary\",\n \"risk_level\",\n \"findings\",\n \"recommended_actions\"\n ]\n },\n \"AgentEvidence\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"schema\",\n \"code\",\n \"config\",\n \"runtime\",\n \"doc\"\n ]\n },\n \"target\": {\n \"type\": \"string\"\n },\n \"location\": {\n \"type\": \"string\"\n },\n \"excerpt\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"kind\"\n ]\n },\n \"AgentRecommendedAction\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n },\n \"priority\": {\n \"type\": \"string\",\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\"\n ]\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"action\",\n \"priority\"\n ]\n },\n \"ResolvedDefinitions\": {\n \"type\": \"object\",\n \"description\": \"Output of the resolve command\",\n \"properties\": {\n \"artifact_contracts\": {\n \"type\": \"string\"\n },\n \"system\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ]\n },\n \"artifacts\": {\n \"type\": \"object\",\n \"description\": \"Map of artifact ID to resolved artifact definition\",\n \"additionalProperties\": {\n \"$ref\": \"#/components/schemas/ArtifactDefinition\"\n }\n }\n },\n \"required\": [\n \"artifact_contracts\",\n \"system\",\n \"artifacts\"\n ]\n },\n \"ArtifactExplanation\": {\n \"type\": \"object\",\n \"description\": \"Output of the explain command (json/yaml format)\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"authority\": {\n \"type\": \"string\"\n },\n \"manual_edit\": {\n \"type\": \"string\"\n },\n \"change_control\": {\n \"type\": \"string\"\n },\n \"visibility\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"path_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"exclude_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"authority\",\n \"manual_edit\",\n \"change_control\"\n ]\n },\n \"ArtifactDefinition\": {\n \"type\": \"object\",\n \"description\": \"A single resolved artifact definition\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"authority\": {\n \"type\": \"string\",\n \"enum\": [\n \"canonical\",\n \"derived\",\n \"generated\",\n \"control\"\n ]\n },\n \"manual_edit\": {\n \"type\": \"string\",\n \"enum\": [\n \"allowed\",\n \"discouraged\",\n \"forbidden\"\n ]\n },\n \"change_control\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"approval-required\",\n \"regeneration-required\"\n ]\n },\n \"visibility\": {\n \"type\": \"string\",\n \"enum\": [\n \"public\",\n \"internal\",\n \"private\"\n ]\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"path_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"exclude_patterns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"states\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"type\",\n \"authority\",\n \"manual_edit\",\n \"change_control\",\n \"visibility\",\n \"path_patterns\"\n ]\n },\n \"ArtifactList\": {\n \"type\": \"object\",\n \"description\": \"Output of the list command (json/yaml format)\",\n \"properties\": {\n \"artifacts\": {\n \"type\": \"object\",\n \"description\": \"Map of artifact ID to resolved artifact definition\",\n \"additionalProperties\": {\n \"$ref\": \"#/components/schemas/ArtifactDefinition\"\n }\n }\n }\n },\n \"ValidationResult\": {\n \"type\": \"object\",\n \"description\": \"Output of the validate command (json format, on error)\",\n \"properties\": {\n \"valid\": {\n \"type\": \"boolean\"\n },\n \"diagnostics\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"message\": {\n \"type\": \"string\"\n },\n \"severity\": {\n \"type\": \"string\",\n \"enum\": [\n \"error\",\n \"warning\"\n ]\n }\n },\n \"required\": [\n \"message\",\n \"severity\"\n ]\n }\n },\n \"overlaps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"matching_artifacts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"path\",\n \"matching_artifacts\"\n ]\n }\n }\n },\n \"required\": [\n \"valid\",\n \"diagnostics\",\n \"overlaps\"\n ]\n }\n }\n }\n}";
|
|
5
5
|
//# sourceMappingURL=contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAW,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAW,s3kBAAs3kB,CAAC;AAE55kB,MAAM,CAAC,MAAM,iBAAiB,GAAW,012BAA012B,CAAC"}
|
|
@@ -36,13 +36,13 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
36
36
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
37
37
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
kind: "code" | "
|
|
39
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
40
40
|
target?: string | undefined;
|
|
41
41
|
location?: string | undefined;
|
|
42
42
|
excerpt?: string | undefined;
|
|
43
43
|
reasoning?: string | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
kind: "code" | "
|
|
45
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
46
46
|
target?: string | undefined;
|
|
47
47
|
location?: string | undefined;
|
|
48
48
|
excerpt?: string | undefined;
|
|
@@ -57,7 +57,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
57
57
|
target?: string | undefined;
|
|
58
58
|
recommendation?: string | undefined;
|
|
59
59
|
evidence?: {
|
|
60
|
-
kind: "code" | "
|
|
60
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
61
61
|
target?: string | undefined;
|
|
62
62
|
location?: string | undefined;
|
|
63
63
|
excerpt?: string | undefined;
|
|
@@ -72,7 +72,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
72
72
|
target?: string | undefined;
|
|
73
73
|
recommendation?: string | undefined;
|
|
74
74
|
evidence?: {
|
|
75
|
-
kind: "code" | "
|
|
75
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
76
76
|
target?: string | undefined;
|
|
77
77
|
location?: string | undefined;
|
|
78
78
|
excerpt?: string | undefined;
|
|
@@ -107,7 +107,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
107
107
|
}>>;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
109
|
summary: string;
|
|
110
|
-
risk_level: "none" | "
|
|
110
|
+
risk_level: "none" | "critical" | "low" | "medium" | "high";
|
|
111
111
|
findings: {
|
|
112
112
|
description: string;
|
|
113
113
|
id: string;
|
|
@@ -117,7 +117,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
117
117
|
target?: string | undefined;
|
|
118
118
|
recommendation?: string | undefined;
|
|
119
119
|
evidence?: {
|
|
120
|
-
kind: "code" | "
|
|
120
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
121
121
|
target?: string | undefined;
|
|
122
122
|
location?: string | undefined;
|
|
123
123
|
excerpt?: string | undefined;
|
|
@@ -136,7 +136,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
136
136
|
} | undefined;
|
|
137
137
|
}, {
|
|
138
138
|
summary: string;
|
|
139
|
-
risk_level: "none" | "
|
|
139
|
+
risk_level: "none" | "critical" | "low" | "medium" | "high";
|
|
140
140
|
findings: {
|
|
141
141
|
description: string;
|
|
142
142
|
id: string;
|
|
@@ -146,7 +146,7 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
|
|
|
146
146
|
target?: string | undefined;
|
|
147
147
|
recommendation?: string | undefined;
|
|
148
148
|
evidence?: {
|
|
149
|
-
kind: "code" | "
|
|
149
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
150
150
|
target?: string | undefined;
|
|
151
151
|
location?: string | undefined;
|
|
152
152
|
excerpt?: string | undefined;
|
|
@@ -197,13 +197,13 @@ export declare const handoffSchemas: {
|
|
|
197
197
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
198
198
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
199
199
|
}, "strip", z.ZodTypeAny, {
|
|
200
|
-
kind: "code" | "
|
|
200
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
201
201
|
target?: string | undefined;
|
|
202
202
|
location?: string | undefined;
|
|
203
203
|
excerpt?: string | undefined;
|
|
204
204
|
reasoning?: string | undefined;
|
|
205
205
|
}, {
|
|
206
|
-
kind: "code" | "
|
|
206
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
207
207
|
target?: string | undefined;
|
|
208
208
|
location?: string | undefined;
|
|
209
209
|
excerpt?: string | undefined;
|
|
@@ -218,7 +218,7 @@ export declare const handoffSchemas: {
|
|
|
218
218
|
target?: string | undefined;
|
|
219
219
|
recommendation?: string | undefined;
|
|
220
220
|
evidence?: {
|
|
221
|
-
kind: "code" | "
|
|
221
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
222
222
|
target?: string | undefined;
|
|
223
223
|
location?: string | undefined;
|
|
224
224
|
excerpt?: string | undefined;
|
|
@@ -233,7 +233,7 @@ export declare const handoffSchemas: {
|
|
|
233
233
|
target?: string | undefined;
|
|
234
234
|
recommendation?: string | undefined;
|
|
235
235
|
evidence?: {
|
|
236
|
-
kind: "code" | "
|
|
236
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
237
237
|
target?: string | undefined;
|
|
238
238
|
location?: string | undefined;
|
|
239
239
|
excerpt?: string | undefined;
|
|
@@ -268,7 +268,7 @@ export declare const handoffSchemas: {
|
|
|
268
268
|
}>>;
|
|
269
269
|
}, "strip", z.ZodTypeAny, {
|
|
270
270
|
summary: string;
|
|
271
|
-
risk_level: "none" | "
|
|
271
|
+
risk_level: "none" | "critical" | "low" | "medium" | "high";
|
|
272
272
|
findings: {
|
|
273
273
|
description: string;
|
|
274
274
|
id: string;
|
|
@@ -278,7 +278,7 @@ export declare const handoffSchemas: {
|
|
|
278
278
|
target?: string | undefined;
|
|
279
279
|
recommendation?: string | undefined;
|
|
280
280
|
evidence?: {
|
|
281
|
-
kind: "code" | "
|
|
281
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
282
282
|
target?: string | undefined;
|
|
283
283
|
location?: string | undefined;
|
|
284
284
|
excerpt?: string | undefined;
|
|
@@ -297,7 +297,7 @@ export declare const handoffSchemas: {
|
|
|
297
297
|
} | undefined;
|
|
298
298
|
}, {
|
|
299
299
|
summary: string;
|
|
300
|
-
risk_level: "none" | "
|
|
300
|
+
risk_level: "none" | "critical" | "low" | "medium" | "high";
|
|
301
301
|
findings: {
|
|
302
302
|
description: string;
|
|
303
303
|
id: string;
|
|
@@ -307,7 +307,7 @@ export declare const handoffSchemas: {
|
|
|
307
307
|
target?: string | undefined;
|
|
308
308
|
recommendation?: string | undefined;
|
|
309
309
|
evidence?: {
|
|
310
|
-
kind: "code" | "
|
|
310
|
+
kind: "code" | "config" | "schema" | "runtime" | "doc";
|
|
311
311
|
target?: string | undefined;
|
|
312
312
|
location?: string | undefined;
|
|
313
313
|
excerpt?: string | undefined;
|
|
@@ -117,6 +117,11 @@ export declare const commandDefinitions: {
|
|
|
117
117
|
readonly type: "string";
|
|
118
118
|
readonly enum: readonly ["text", "json", "yaml"];
|
|
119
119
|
};
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "log-file";
|
|
122
|
+
readonly schema: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
};
|
|
120
125
|
}];
|
|
121
126
|
};
|
|
122
127
|
readonly agents: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/generated/policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC;AAEnD,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/generated/policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC;AAEnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+MrB,CAAC;AAEX,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,mBAAmB,CA0BrB"}
|
package/dist/generated/policy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/generated/policy.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKnE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,UAAU,EAAE;QACV,SAAS,EAAE;YACT,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE;gBACP,sBAAsB;gBACtB,kBAAkB;aACnB;YACD,gBAAgB,EAAE,QAAQ;SAC3B;QACD,SAAS,EAAE;YACT;gBACE,MAAM,EAAE,QAAQ;aACjB;YACD;gBACE,MAAM,EAAE,aAAa;gBACrB,QAAQ,EAAE;oBACR,MAAM,EAAE,SAAS;iBAClB;aACF;SACF;KACF;IACD,SAAS,EAAE;QACT,SAAS,EAAE;Y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CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/I,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzI,KAAK,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IAC1P,MAAM,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9F;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,OAAO,CAsMT"}
|
|
@@ -79,6 +79,7 @@ export function createProgram(handlers, version) {
|
|
|
79
79
|
.option("--fail-on <value>", "Minimum severity that causes exit 10. Ordering: critical > error > warning > info. For example, --fail-on warning exits 10 on warning, error, or critical.")
|
|
80
80
|
.option("-o, --output <file>", "Write result to a file instead of stdout")
|
|
81
81
|
.option("--report-format <value>", "Output format for the report (default: text). LLM commands use --report-format; deterministic commands use --format.")
|
|
82
|
+
.option("-l, --log-file <value>", "Write agent progress log to this file path.")
|
|
82
83
|
.action(async (opts, cmd) => {
|
|
83
84
|
const globalOpts = cmd.optsWithGlobals();
|
|
84
85
|
if (globalOpts.introspect) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/generated/program.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAsB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAWjE,MAAM,UAAU,aAAa,CAC3B,QAAyB,EACzB,OAAe;IAEf,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAAI,CAAC,oBAAoB,CAAC;SAC1B,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC;SACjC,WAAW,CAAC,wHAAwH,CAAC,CAAC;IAEzI,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,6DAA6D,CAAC,CAAC;IAE9F,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,yCAAyC,CAAC;SACtD,MAAM,CAAC,iBAAiB,EAAE,wCAAwC,CAAC;SACnE,MAAM,CAAC,eAAe,EAAE,mKAAmK,CAAC;SAC5L,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC1B,MAAM,UAAU,GAAG,GAAG,CAAC,eAAe,EAAE,CAAC;QACzC,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC1B,MAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,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,CAAC;AACjB,CAAC"}
|
|
@@ -64,6 +64,7 @@ export interface AuditOptions {
|
|
|
64
64
|
failOn?: "info" | "warning" | "error" | "critical";
|
|
65
65
|
output?: unknown;
|
|
66
66
|
reportFormat?: "text" | "json" | "yaml";
|
|
67
|
+
logFile?: string;
|
|
67
68
|
}
|
|
68
69
|
export type AuditExitCode = 0 | 1 | 3 | 10 | 11 | 12;
|
|
69
70
|
export type AuditExitResult = {
|