artifact-contracts 0.33.0 → 0.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli-contract.yaml CHANGED
@@ -289,10 +289,18 @@ command_sets:
289
289
  Structured audit result conforming to the AgentAuditResult
290
290
  schema. Format varies by --report-format (json, yaml, text).
291
291
  x-agent:
292
- dsl_task: audit-artifact-definitions
293
- expected_duration_ms: 120000
294
- retryable_exit_codes: [1]
295
- recommended_before_use:
292
+ dslTask: audit-artifact-definitions
293
+ riskLevel: low
294
+ requiresConfirmation: false
295
+ idempotent: true
296
+ sideEffects: [network]
297
+ sideEffectNote: >-
298
+ Makes network calls to the configured LLM provider when adapter is
299
+ not mock. Filesystem write only when --output is specified.
300
+ safeDryRunOption: show-prompt
301
+ expectedDurationMs: 120000
302
+ retryableExitCodes: [1, 12]
303
+ recommendedBeforeUse:
296
304
  - "Run with --show-prompt first to preview the prompt"
297
305
  exits:
298
306
  "0":
@@ -1989,7 +1989,7 @@ components:
1989
1989
  `),process.exit(jW)),c===CW&&(process.stderr.write(`Adapter error: ${u.message}
1990
1990
  `),process.exit(CW)),u}let s=t.reportFormat??"text",o=g7e(a,s);t.output?(f7e(t.output,o,"utf-8"),process.stderr.write(`Report written to ${t.output}
1991
1991
  `)):console.log(o);let l=v7e(a,t.failOn??"error");l!==0&&process.exit(l)}function m7e(t){let e=["# Artifact Definitions Audit","",`## System: ${t.system.id}`,t.system.name?`Name: ${t.system.name}`:"","",`## Artifacts (${Object.keys(t.artifacts).length} total)`,""];for(let[r,i]of Object.entries(t.artifacts))e.push(`### ${r}`),e.push(`- type: ${i.type}`),e.push(`- authority: ${i.authority}`),e.push(`- manual_edit: ${i.manual_edit}`),e.push(`- change_control: ${i.change_control}`),e.push(`- path_patterns: ${i.path_patterns.join(", ")}`),i.exclude_patterns?.length&&e.push(`- exclude_patterns: ${i.exclude_patterns.join(", ")}`),i.description&&e.push(`- description: ${i.description}`),e.push("");return e.push("## Instructions"),e.push(""),e.push("Analyze these artifact definitions for:"),e.push("1. Naming consistency (kebab-case, descriptive IDs)"),e.push("2. Authority appropriateness for each artifact type"),e.push("3. Missing common file types that should be tracked"),e.push("4. Potential path_patterns overlaps or gaps"),e.push("5. Appropriate manual_edit / change_control settings"),e.push(""),e.filter(r=>r!==void 0).join(`
1992
- `)}function g7e(t,e){if(t.status==="error"){let r=t.errorMessage??"Unknown error";return e==="json"?JSON.stringify({error:r},null,2):e==="yaml"?(0,vk.stringify)({error:r}):`Error: ${r}`}return e==="json"?JSON.stringify(t.data??t.raw,null,2):e==="yaml"?(0,vk.stringify)(t.data??t.raw):t.raw||JSON.stringify(t.data,null,2)}function v7e(t,e){if(t.status!=="success")return 1;let r=t.data;if(!r?.findings)return 0;let i=["info","warning","error","critical"],n=i.indexOf(e);return n<0?0:r.findings.some(s=>i.indexOf(s.severity)>=n)?h7e:0}var pje=Ot.object({system_id:Ot.string(),artifact_count:Ot.number().int(),definitions_context:Ot.string()}),fje=Ot.object({summary:Ot.string(),risk_level:Ot.enum(["none","low","medium","high","critical"]),findings:Ot.array(Ot.object({id:Ot.string(),severity:Ot.enum(["critical","error","warning","info"]),category:Ot.string(),title:Ot.string(),description:Ot.string(),target:Ot.string().optional(),recommendation:Ot.string().optional(),evidence:Ot.array(Ot.object({kind:Ot.enum(["schema","code","config","runtime","doc"]),target:Ot.string().optional(),location:Ot.string().optional(),excerpt:Ot.string().optional(),reasoning:Ot.string().optional()})).optional()})),recommended_actions:Ot.array(Ot.object({action:Ot.string(),priority:Ot.enum(["high","medium","low"]),description:Ot.string().optional()})),metadata:Ot.object({total_artifacts:Ot.number().int().optional(),analyzed_artifacts:Ot.number().int().optional(),analysis_scope:Ot.string().optional()}).optional()});O9();var y7e={version:"0.33.0"},_7e={validate:async t=>{await iC(t)},resolve:async t=>{await sC(t)},list:async t=>{await lC(t)},explain:async(t,e)=>{t||(console.error("Error: <path> argument is required"),process.exit(1)),await cC(t,e)},audit:async t=>{await TW(t)},agents:async t=>{let e=await Promise.resolve().then(()=>En(Ei(),1)),r=t.format??"yaml";try{console.log(r==="json"?JSON.stringify(jc,null,2):e.stringify(jc,{lineWidth:120}))}catch(i){console.error(`Failed to output DSL: ${i.message}`),process.exit(1)}}};WO(_7e,y7e.version).parse();
1992
+ `)}function g7e(t,e){if(t.status==="error"){let r=t.errorMessage??"Unknown error";return e==="json"?JSON.stringify({error:r},null,2):e==="yaml"?(0,vk.stringify)({error:r}):`Error: ${r}`}return e==="json"?JSON.stringify(t.data??t.raw,null,2):e==="yaml"?(0,vk.stringify)(t.data??t.raw):t.raw||JSON.stringify(t.data,null,2)}function v7e(t,e){if(t.status!=="success")return 1;let r=t.data;if(!r?.findings)return 0;let i=["info","warning","error","critical"],n=i.indexOf(e);return n<0?0:r.findings.some(s=>i.indexOf(s.severity)>=n)?h7e:0}var pje=Ot.object({system_id:Ot.string(),artifact_count:Ot.number().int(),definitions_context:Ot.string()}),fje=Ot.object({summary:Ot.string(),risk_level:Ot.enum(["none","low","medium","high","critical"]),findings:Ot.array(Ot.object({id:Ot.string(),severity:Ot.enum(["critical","error","warning","info"]),category:Ot.string(),title:Ot.string(),description:Ot.string(),target:Ot.string().optional(),recommendation:Ot.string().optional(),evidence:Ot.array(Ot.object({kind:Ot.enum(["schema","code","config","runtime","doc"]),target:Ot.string().optional(),location:Ot.string().optional(),excerpt:Ot.string().optional(),reasoning:Ot.string().optional()})).optional()})),recommended_actions:Ot.array(Ot.object({action:Ot.string(),priority:Ot.enum(["high","medium","low"]),description:Ot.string().optional()})),metadata:Ot.object({total_artifacts:Ot.number().int().optional(),analyzed_artifacts:Ot.number().int().optional(),analysis_scope:Ot.string().optional()}).optional()});O9();var y7e={version:"0.33.1"},_7e={validate:async t=>{await iC(t)},resolve:async t=>{await sC(t)},list:async t=>{await lC(t)},explain:async(t,e)=>{t||(console.error("Error: <path> argument is required"),process.exit(1)),await cC(t,e)},audit:async t=>{await TW(t)},agents:async t=>{let e=await Promise.resolve().then(()=>En(Ei(),1)),r=t.format??"yaml";try{console.log(r==="json"?JSON.stringify(jc,null,2):e.stringify(jc,{lineWidth:120}))}catch(i){console.error(`Failed to output DSL: ${i.message}`),process.exit(1)}}};WO(_7e,y7e.version).parse();
1993
1993
  /*! Bundled license information:
1994
1994
 
1995
1995
  agent-contracts/dist/index.js: