artifact-contracts 0.34.5 → 0.34.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAwB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,EAAE,OAAO,CAAC,CACzC,CAAC;AAEzB,MAAM,QAAQ,GAAoB;IAChC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACvB,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,EAAE,KAAK,EAAE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,CAAC,KAAK,EAAE,CAAC"}
@@ -2,9 +2,9 @@ import { z } from "zod";
2
2
  export declare const ARTIFACT_ID_PATTERN: RegExp;
3
3
  export declare const AuthoritySchema: z.ZodEnum<{
4
4
  canonical: "canonical";
5
+ control: "control";
5
6
  derived: "derived";
6
7
  generated: "generated";
7
- control: "control";
8
8
  }>;
9
9
  export declare const ManualEditSchema: z.ZodEnum<{
10
10
  allowed: "allowed";
@@ -12,23 +12,23 @@ export declare const ManualEditSchema: z.ZodEnum<{
12
12
  forbidden: "forbidden";
13
13
  }>;
14
14
  export declare const ChangeControlSchema: z.ZodEnum<{
15
- none: "none";
16
15
  "approval-required": "approval-required";
16
+ none: "none";
17
17
  "regeneration-required": "regeneration-required";
18
18
  }>;
19
19
  export declare const VisibilitySchema: z.ZodEnum<{
20
- public: "public";
21
20
  internal: "internal";
22
21
  private: "private";
22
+ public: "public";
23
23
  }>;
24
24
  export declare const ArtifactDefinitionSchema: z.ZodObject<{
25
25
  type: z.ZodString;
26
26
  description: z.ZodOptional<z.ZodString>;
27
27
  authority: z.ZodEnum<{
28
28
  canonical: "canonical";
29
+ control: "control";
29
30
  derived: "derived";
30
31
  generated: "generated";
31
- control: "control";
32
32
  }>;
33
33
  path_patterns: z.ZodArray<z.ZodString>;
34
34
  exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -38,14 +38,14 @@ export declare const ArtifactDefinitionSchema: z.ZodObject<{
38
38
  forbidden: "forbidden";
39
39
  }>>;
40
40
  change_control: z.ZodOptional<z.ZodEnum<{
41
- none: "none";
42
41
  "approval-required": "approval-required";
42
+ none: "none";
43
43
  "regeneration-required": "regeneration-required";
44
44
  }>>;
45
45
  visibility: z.ZodOptional<z.ZodEnum<{
46
- public: "public";
47
46
  internal: "internal";
48
47
  private: "private";
48
+ public: "public";
49
49
  }>>;
50
50
  states: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
51
  }, z.core.$loose>;
@@ -54,20 +54,20 @@ export declare const SystemSchema: z.ZodObject<{
54
54
  name: z.ZodOptional<z.ZodString>;
55
55
  }, z.core.$strip>;
56
56
  export declare const TraceLinkResolverSchema: z.ZodEnum<{
57
- operationId: "operationId";
58
57
  ast: "ast";
59
- naming: "naming";
60
58
  codegen: "codegen";
59
+ naming: "naming";
60
+ operationId: "operationId";
61
61
  }>;
62
62
  export declare const TraceLinkSchema: z.ZodObject<{
63
63
  id: z.ZodString;
64
64
  from: z.ZodString;
65
65
  to: z.ZodString;
66
66
  resolver: z.ZodEnum<{
67
- operationId: "operationId";
68
67
  ast: "ast";
69
- naming: "naming";
70
68
  codegen: "codegen";
69
+ naming: "naming";
70
+ operationId: "operationId";
71
71
  }>;
72
72
  description: z.ZodOptional<z.ZodString>;
73
73
  }, z.core.$loose>;
@@ -77,10 +77,10 @@ export declare const TraceSchema: z.ZodObject<{
77
77
  from: z.ZodString;
78
78
  to: z.ZodString;
79
79
  resolver: z.ZodEnum<{
80
- operationId: "operationId";
81
80
  ast: "ast";
82
- naming: "naming";
83
81
  codegen: "codegen";
82
+ naming: "naming";
83
+ operationId: "operationId";
84
84
  }>;
85
85
  description: z.ZodOptional<z.ZodString>;
86
86
  }, z.core.$loose>>;
@@ -96,9 +96,9 @@ export declare const ArtifactContractsDocumentSchema: z.ZodObject<{
96
96
  description: z.ZodOptional<z.ZodString>;
97
97
  authority: z.ZodEnum<{
98
98
  canonical: "canonical";
99
+ control: "control";
99
100
  derived: "derived";
100
101
  generated: "generated";
101
- control: "control";
102
102
  }>;
103
103
  path_patterns: z.ZodArray<z.ZodString>;
104
104
  exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -108,14 +108,14 @@ export declare const ArtifactContractsDocumentSchema: z.ZodObject<{
108
108
  forbidden: "forbidden";
109
109
  }>>;
110
110
  change_control: z.ZodOptional<z.ZodEnum<{
111
- none: "none";
112
111
  "approval-required": "approval-required";
112
+ none: "none";
113
113
  "regeneration-required": "regeneration-required";
114
114
  }>>;
115
115
  visibility: z.ZodOptional<z.ZodEnum<{
116
- public: "public";
117
116
  internal: "internal";
118
117
  private: "private";
118
+ public: "public";
119
119
  }>>;
120
120
  states: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
121
  }, z.core.$loose>>;
@@ -125,10 +125,10 @@ export declare const ArtifactContractsDocumentSchema: z.ZodObject<{
125
125
  from: z.ZodString;
126
126
  to: z.ZodString;
127
127
  resolver: z.ZodEnum<{
128
- operationId: "operationId";
129
128
  ast: "ast";
130
- naming: "naming";
131
129
  codegen: "codegen";
130
+ naming: "naming";
131
+ operationId: "operationId";
132
132
  }>;
133
133
  description: z.ZodOptional<z.ZodString>;
134
134
  }, z.core.$loose>>;
@@ -1 +1 @@
1
- {"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/core/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,+BAA+B,GAEhC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAmB,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AAcjE,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,UAAsB,EACtB,UAAoC,EAAE;IAEtC,MAAM,WAAW,GAAiB,EAAE,CAAC;IACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;IAEhC,MAAM,YAAY,GAAG,+BAA+B,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACzE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC1B,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YAC9C,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,OAAO;a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;YACtC,QAAQ,EAAE,OAAO;YACjB,GAAG,EAAE,UAAU,CAAC,SAAS;SAC1B,CAAC,CAAC;QACH,SAAS,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YACH,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;YAC1C,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE;gBAC3B,GAAG,EAAE,UAAU,CAAC,SAAS;gBACzB,GAAG,EAAE,IAAI;gBACT,KAAK,EAAE,IAAI;aACZ,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,OAAO,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD,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.34.4\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, 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 dslTask: audit-artifact-definitions\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: [network]\n sideEffectNote: >-\n Makes network calls to the configured LLM provider when adapter is\n not mock. Filesystem write only when --output is specified.\n safeDryRunOption: show-prompt\n expectedDurationMs: 120000\n retryableExitCodes: [1, 12]\n recommendedBeforeUse:\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 discover:\n summary: LLM-based artifact discovery from project file structure\n description: >-\n Analyzes the project file structure using LLM to generate or update\n artifact-contracts.yaml definitions. In init mode (no existing file),\n creates a new registry from scratch. In update mode (existing file),\n proposes additional artifact definitions and trace link rules for\n uncovered files.\n options:\n - name: adapter\n description: LLM adapter to use\n schema:\n type: string\n enum: [mock, 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: write\n aliases: [w]\n description: Write the generated YAML directly to artifact-contracts.yaml\n schema:\n type: boolean\n - name: output\n aliases: [o]\n description: Write result to a specific file path instead of stdout\n value_name: file\n - name: report-format\n description: \"Output format (default: yaml)\"\n schema:\n type: string\n enum: [yaml, json]\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 - repository-files\n writes:\n - artifact-definitions\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/DiscoverResult\"\n description: >-\n Generated artifact-contracts.yaml content or structured discovery result.\n x-agent:\n dslTask: discover-artifact-definitions\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: [network]\n sideEffectNote: >-\n Makes network calls to the configured LLM provider when adapter is\n not mock. Filesystem write only when --write or --output is specified.\n safeDryRunOption: show-prompt\n expectedDurationMs: 120000\n retryableExitCodes: [1, 12]\n recommendedBeforeUse:\n - \"Run with --show-prompt first to preview the prompt\"\n exits:\n \"0\":\n description: Discovery completed successfully\n \"1\":\n description: General / transient error\n \"3\":\n description: File system read error\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\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 DiscoverResult:\n type: object\n description: Output of the discover command\n properties:\n mode:\n type: string\n enum: [init, update]\n artifact_contracts_yaml:\n type: string\n description: Generated YAML content\n decisions:\n type: array\n items:\n type: object\n properties:\n artifact_id:\n type: string\n reasoning:\n type: string\n required: [artifact_id, reasoning]\n trace_decisions:\n type: array\n items:\n type: object\n properties:\n link_id:\n type: string\n reasoning:\n type: string\n required: [link_id, reasoning]\n uncategorized_files:\n type: array\n items:\n type: string\n suggestions:\n type: array\n items:\n type: string\n required: [mode, artifact_contracts_yaml]\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.34.4\",\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 \"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 \"dslTask\": \"audit-artifact-definitions\",\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"network\"\n ],\n \"sideEffectNote\": \"Makes network calls to the configured LLM provider when adapter is not mock. Filesystem write only when --output is specified.\",\n \"safeDryRunOption\": \"show-prompt\",\n \"expectedDurationMs\": 120000,\n \"retryableExitCodes\": [\n 1,\n 12\n ],\n \"recommendedBeforeUse\": [\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 \"discover\": {\n \"summary\": \"LLM-based artifact discovery from project file structure\",\n \"description\": \"Analyzes the project file structure using LLM to generate or update artifact-contracts.yaml definitions. In init mode (no existing file), creates a new registry from scratch. In update mode (existing file), proposes additional artifact definitions and trace link rules for uncovered files.\",\n \"options\": [\n {\n \"name\": \"adapter\",\n \"description\": \"LLM adapter to use\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"mock\",\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\": \"write\",\n \"aliases\": [\n \"w\"\n ],\n \"description\": \"Write the generated YAML directly to artifact-contracts.yaml\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"output\",\n \"aliases\": [\n \"o\"\n ],\n \"description\": \"Write result to a specific file path instead of stdout\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"report-format\",\n \"description\": \"Output format (default: yaml)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\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 \"repository-files\"\n ],\n \"writes\": [\n \"artifact-definitions\"\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/DiscoverResult\"\n },\n \"description\": \"Generated artifact-contracts.yaml content or structured discovery result.\"\n },\n \"x-agent\": {\n \"dslTask\": \"discover-artifact-definitions\",\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"network\"\n ],\n \"sideEffectNote\": \"Makes network calls to the configured LLM provider when adapter is not mock. Filesystem write only when --write or --output is specified.\",\n \"safeDryRunOption\": \"show-prompt\",\n \"expectedDurationMs\": 120000,\n \"retryableExitCodes\": [\n 1,\n 12\n ],\n \"recommendedBeforeUse\": [\n \"Run with --show-prompt first to preview the prompt\"\n ]\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Discovery completed successfully\"\n },\n \"1\": {\n \"description\": \"General / transient error\"\n },\n \"3\": {\n \"description\": \"File system read error\"\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 }\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 \"DiscoverResult\": {\n \"type\": \"object\",\n \"description\": \"Output of the discover command\",\n \"properties\": {\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"init\",\n \"update\"\n ]\n },\n \"artifact_contracts_yaml\": {\n \"type\": \"string\",\n \"description\": \"Generated YAML content\"\n },\n \"decisions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"artifact_id\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"artifact_id\",\n \"reasoning\"\n ]\n }\n },\n \"trace_decisions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"link_id\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"link_id\",\n \"reasoning\"\n ]\n }\n },\n \"uncategorized_files\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"suggestions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"mode\",\n \"artifact_contracts_yaml\"\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.34.7\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, 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 dslTask: audit-artifact-definitions\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: [network]\n sideEffectNote: >-\n Makes network calls to the configured LLM provider when adapter is\n not mock. Filesystem write only when --output is specified.\n safeDryRunOption: show-prompt\n expectedDurationMs: 120000\n retryableExitCodes: [1, 12]\n recommendedBeforeUse:\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 discover:\n summary: LLM-based artifact discovery from project file structure\n description: >-\n Analyzes the project file structure using LLM to generate or update\n artifact-contracts.yaml definitions. In init mode (no existing file),\n creates a new registry from scratch. In update mode (existing file),\n proposes additional artifact definitions and trace link rules for\n uncovered files.\n options:\n - name: adapter\n description: LLM adapter to use\n schema:\n type: string\n enum: [mock, 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: write\n aliases: [w]\n description: Write the generated YAML directly to artifact-contracts.yaml\n schema:\n type: boolean\n - name: output\n aliases: [o]\n description: Write result to a specific file path instead of stdout\n value_name: file\n - name: report-format\n description: \"Output format (default: yaml)\"\n schema:\n type: string\n enum: [yaml, json]\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 - repository-files\n writes:\n - artifact-definitions\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/DiscoverResult\"\n description: >-\n Generated artifact-contracts.yaml content or structured discovery result.\n x-agent:\n dslTask: discover-artifact-definitions\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: [network]\n sideEffectNote: >-\n Makes network calls to the configured LLM provider when adapter is\n not mock. Filesystem write only when --write or --output is specified.\n safeDryRunOption: show-prompt\n expectedDurationMs: 120000\n retryableExitCodes: [1, 12]\n recommendedBeforeUse:\n - \"Run with --show-prompt first to preview the prompt\"\n exits:\n \"0\":\n description: Discovery completed successfully\n \"1\":\n description: General / transient error\n \"3\":\n description: File system read error\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\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 DiscoverResult:\n type: object\n description: Output of the discover command\n properties:\n mode:\n type: string\n enum: [init, update]\n artifact_contracts_yaml:\n type: string\n description: Generated YAML content\n decisions:\n type: array\n items:\n type: object\n properties:\n artifact_id:\n type: string\n reasoning:\n type: string\n required: [artifact_id, reasoning]\n trace_decisions:\n type: array\n items:\n type: object\n properties:\n link_id:\n type: string\n reasoning:\n type: string\n required: [link_id, reasoning]\n uncategorized_files:\n type: array\n items:\n type: string\n suggestions:\n type: array\n items:\n type: string\n required: [mode, artifact_contracts_yaml]\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.34.7\",\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 \"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 \"dslTask\": \"audit-artifact-definitions\",\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"network\"\n ],\n \"sideEffectNote\": \"Makes network calls to the configured LLM provider when adapter is not mock. Filesystem write only when --output is specified.\",\n \"safeDryRunOption\": \"show-prompt\",\n \"expectedDurationMs\": 120000,\n \"retryableExitCodes\": [\n 1,\n 12\n ],\n \"recommendedBeforeUse\": [\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 \"discover\": {\n \"summary\": \"LLM-based artifact discovery from project file structure\",\n \"description\": \"Analyzes the project file structure using LLM to generate or update artifact-contracts.yaml definitions. In init mode (no existing file), creates a new registry from scratch. In update mode (existing file), proposes additional artifact definitions and trace link rules for uncovered files.\",\n \"options\": [\n {\n \"name\": \"adapter\",\n \"description\": \"LLM adapter to use\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"mock\",\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\": \"write\",\n \"aliases\": [\n \"w\"\n ],\n \"description\": \"Write the generated YAML directly to artifact-contracts.yaml\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"output\",\n \"aliases\": [\n \"o\"\n ],\n \"description\": \"Write result to a specific file path instead of stdout\",\n \"value_name\": \"file\"\n },\n {\n \"name\": \"report-format\",\n \"description\": \"Output format (default: yaml)\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"yaml\",\n \"json\"\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 \"repository-files\"\n ],\n \"writes\": [\n \"artifact-definitions\"\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/DiscoverResult\"\n },\n \"description\": \"Generated artifact-contracts.yaml content or structured discovery result.\"\n },\n \"x-agent\": {\n \"dslTask\": \"discover-artifact-definitions\",\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"network\"\n ],\n \"sideEffectNote\": \"Makes network calls to the configured LLM provider when adapter is not mock. Filesystem write only when --write or --output is specified.\",\n \"safeDryRunOption\": \"show-prompt\",\n \"expectedDurationMs\": 120000,\n \"retryableExitCodes\": [\n 1,\n 12\n ],\n \"recommendedBeforeUse\": [\n \"Run with --show-prompt first to preview the prompt\"\n ]\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Discovery completed successfully\"\n },\n \"1\": {\n \"description\": \"General / transient error\"\n },\n \"3\": {\n \"description\": \"File system read error\"\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 }\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 \"DiscoverResult\": {\n \"type\": \"object\",\n \"description\": \"Output of the discover command\",\n \"properties\": {\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"init\",\n \"update\"\n ]\n },\n \"artifact_contracts_yaml\": {\n \"type\": \"string\",\n \"description\": \"Generated YAML content\"\n },\n \"decisions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"artifact_id\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"artifact_id\",\n \"reasoning\"\n ]\n }\n },\n \"trace_decisions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"link_id\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"link_id\",\n \"reasoning\"\n ]\n }\n },\n \"uncategorized_files\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"suggestions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"mode\",\n \"artifact_contracts_yaml\"\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
@@ -37,19 +37,19 @@ export type ArtifactAuditRequest = z.infer<typeof ArtifactAuditRequestSchema>;
37
37
  export declare const ArtifactAuditResultSchema: z.ZodObject<{
38
38
  summary: z.ZodString;
39
39
  risk_level: z.ZodEnum<{
40
- none: "none";
41
40
  critical: "critical";
41
+ high: "high";
42
42
  low: "low";
43
43
  medium: "medium";
44
- high: "high";
44
+ none: "none";
45
45
  }>;
46
46
  findings: z.ZodArray<z.ZodObject<{
47
47
  id: z.ZodString;
48
48
  severity: z.ZodEnum<{
49
- error: "error";
50
- warning: "warning";
51
49
  critical: "critical";
50
+ error: "error";
52
51
  info: "info";
52
+ warning: "warning";
53
53
  }>;
54
54
  category: z.ZodString;
55
55
  title: z.ZodString;
@@ -58,11 +58,11 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
58
58
  recommendation: z.ZodOptional<z.ZodString>;
59
59
  evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
60
60
  kind: z.ZodEnum<{
61
- config: "config";
62
- schema: "schema";
63
61
  code: "code";
64
- runtime: "runtime";
62
+ config: "config";
65
63
  doc: "doc";
64
+ runtime: "runtime";
65
+ schema: "schema";
66
66
  }>;
67
67
  target: z.ZodOptional<z.ZodString>;
68
68
  location: z.ZodOptional<z.ZodString>;
@@ -73,9 +73,9 @@ export declare const ArtifactAuditResultSchema: z.ZodObject<{
73
73
  recommended_actions: z.ZodArray<z.ZodObject<{
74
74
  action: z.ZodString;
75
75
  priority: z.ZodEnum<{
76
+ high: "high";
76
77
  low: "low";
77
78
  medium: "medium";
78
- high: "high";
79
79
  }>;
80
80
  description: z.ZodOptional<z.ZodString>;
81
81
  }, z.core.$strip>>;
@@ -117,19 +117,19 @@ export declare const handoffSchemas: {
117
117
  readonly "artifact-audit-result": z.ZodObject<{
118
118
  summary: z.ZodString;
119
119
  risk_level: z.ZodEnum<{
120
- none: "none";
121
120
  critical: "critical";
121
+ high: "high";
122
122
  low: "low";
123
123
  medium: "medium";
124
- high: "high";
124
+ none: "none";
125
125
  }>;
126
126
  findings: z.ZodArray<z.ZodObject<{
127
127
  id: z.ZodString;
128
128
  severity: z.ZodEnum<{
129
- error: "error";
130
- warning: "warning";
131
129
  critical: "critical";
130
+ error: "error";
132
131
  info: "info";
132
+ warning: "warning";
133
133
  }>;
134
134
  category: z.ZodString;
135
135
  title: z.ZodString;
@@ -138,11 +138,11 @@ export declare const handoffSchemas: {
138
138
  recommendation: z.ZodOptional<z.ZodString>;
139
139
  evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
140
140
  kind: z.ZodEnum<{
141
- config: "config";
142
- schema: "schema";
143
141
  code: "code";
144
- runtime: "runtime";
142
+ config: "config";
145
143
  doc: "doc";
144
+ runtime: "runtime";
145
+ schema: "schema";
146
146
  }>;
147
147
  target: z.ZodOptional<z.ZodString>;
148
148
  location: z.ZodOptional<z.ZodString>;
@@ -153,9 +153,9 @@ export declare const handoffSchemas: {
153
153
  recommended_actions: z.ZodArray<z.ZodObject<{
154
154
  action: z.ZodString;
155
155
  priority: z.ZodEnum<{
156
+ high: "high";
156
157
  low: "low";
157
158
  medium: "medium";
158
- high: "high";
159
159
  }>;
160
160
  description: z.ZodOptional<z.ZodString>;
161
161
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- {"version":3,"file":"handoffs.d.ts","sourceRoot":"","sources":["../../../src/generated/dsl/handoffs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,8BAA8B;;;;;;;;iBAKzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAMtF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;iBAYxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,cAAc,CA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