@pickled-dev/cli 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -163,7 +163,7 @@ ${$.comment}`:$.comment}this.doc.range[2]=$.offset;break}default:this.errors.pus
|
|
|
163
163
|
`)+1;while($!==0)this.onNewLine(this.offset+$),$=this.source.indexOf(`
|
|
164
164
|
`,$)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,$.value){let X="end"in $.value?$.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else{if(this.atIndentedComment($.start,q.indent)){let Z=q.items[q.items.length-2]?.value?.end;if(Array.isArray(Z)){Array.prototype.push.apply(Z,$.start),Z.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let X=!this.onKeyLine&&this.indent===q.indent,Z=X&&($.sep||$.explicitKey)&&this.type!=="seq-item-ind",H=[];if(Z&&$.sep&&!$.value){let z=[];for(let U=0;U<$.sep.length;++U){let Q=$.sep[U];switch(Q.type){case"newline":z.push(U);break;case"space":break;case"comment":if(Q.indent>q.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)H=$.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(Z||$.value)H.push(this.sourceToken),q.items.push({start:H}),this.onKeyLine=!0;else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"explicit-key-ind":if(!$.sep&&!$.explicitKey)$.start.push(this.sourceToken),$.explicitKey=!0;else if(Z||$.value)H.push(this.sourceToken),q.items.push({start:H,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if($.explicitKey)if(!$.sep)if(Z0($.start,"newline"))Object.assign($,{key:null,sep:[this.sourceToken]});else{let z=F0($.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if($.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:H,key:null,sep:[this.sourceToken]}]});else if(_4($.key)&&!Z0($.sep,"newline")){let z=F0($.start),U=$.key,Q=$.sep;Q.push(this.sourceToken),delete $.key,delete $.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:U,sep:Q}]})}else if(H.length>0)$.sep=$.sep.concat(H,this.sourceToken);else $.sep.push(this.sourceToken);else if(!$.sep)Object.assign($,{key:null,sep:[this.sourceToken]});else if($.value||Z)q.items.push({start:H,key:null,sep:[this.sourceToken]});else if(Z0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else $.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let z=this.flowScalar(this.type);if(Z||$.value)q.items.push({start:H,key:z,sep:[]}),this.onKeyLine=!0;else if($.sep)this.stack.push(z);else Object.assign($,{key:z,sep:[]}),this.onKeyLine=!0;return}default:{let z=this.startBlockValue(q);if(z){if(z.type==="block-seq"){if(!$.explicitKey&&$.sep&&!Z0($.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(X)q.items.push({start:H});this.stack.push(z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if($.value){let X="end"in $.value?$.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment($.start,q.indent)){let Z=q.items[q.items.length-2]?.value?.end;if(Array.isArray(Z)){Array.prototype.push.apply(Z,$.start),Z.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return;case"anchor":case"tag":if($.value||this.indent<=q.indent)break;$.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if($.value||Z0($.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return}if(this.indent>q.indent){let X=this.startBlockValue(q);if(X){this.stack.push(X);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let $=q.items[q.items.length-1];if(this.type==="flow-error-end"){let X;do yield*this.pop(),X=this.peek(1);while(X?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!$||$.sep)q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return;case"map-value-ind":if(!$||$.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else Object.assign($,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!$||$.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Z=this.flowScalar(this.type);if(!$||$.value)q.items.push({start:[],key:Z,sep:[]});else if($.sep)this.stack.push(Z);else Object.assign($,{key:Z,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let X=this.startBlockValue(q);if(X)this.stack.push(X);else yield*this.pop(),yield*this.step()}else{let X=this.peek(2);if(X.type==="block-map"&&(this.type==="map-value-ind"&&X.indent===q.indent||this.type==="newline"&&!X.items[X.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&X.type!=="flow-collection"){let Z=cq(X),H=F0(Z);B4(q);let z=q.end.splice(1,q.end.length);z.push(this.sourceToken);let U={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:H,key:q,sep:z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=U}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let $=this.source.indexOf(`
|
|
165
165
|
`)+1;while($!==0)this.onNewLine(this.offset+$),$=this.source.indexOf(`
|
|
166
|
-
`,$)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let $=cq(q),X=F0($);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let $=cq(q),X=F0($);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,$){if(this.type!=="comment")return!1;if(this.indent<=$)return!1;return q.every((X)=>X.type==="newline"||X.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}p3.Parser=W4});var P4=I((t3)=>{var V4=D1(),c3=s0(),qq=r0(),i3=j$(),a3=A(),s3=j1(),I4=N1();function D4(q){let $=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||$&&new s3.LineCounter||null,prettyErrors:$}}function r3(q,$={}){let{lineCounter:X,prettyErrors:Z}=D4($),H=new I4.Parser(X?.addNewLine),z=new V4.Composer($),U=Array.from(z.compose(H.parse(q)));if(Z&&X)for(let Q of U)Q.errors.forEach(qq.prettifyError(q,X)),Q.warnings.forEach(qq.prettifyError(q,X));if(U.length>0)return U;return Object.assign([],{empty:!0},z.streamInfo())}function R4(q,$={}){let{lineCounter:X,prettyErrors:Z}=D4($),H=new I4.Parser(X?.addNewLine),z=new V4.Composer($),U=null;for(let Q of z.compose(H.parse(q),!0,q.length))if(!U)U=Q;else if(U.options.logLevel!=="silent"){U.errors.push(new qq.YAMLParseError(Q.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(Z&&X)U.errors.forEach(qq.prettifyError(q,X)),U.warnings.forEach(qq.prettifyError(q,X));return U}function n3(q,$,X){let Z=void 0;if(typeof $==="function")Z=$;else if(X===void 0&&$&&typeof $==="object")X=$;let H=R4(q,X);if(!H)return null;if(H.warnings.forEach((z)=>i3.warn(H.options.logLevel,z)),H.errors.length>0)if(H.options.logLevel!=="silent")throw H.errors[0];else H.errors=[];return H.toJS(Object.assign({reviver:Z},X))}function o3(q,$,X){let Z=null;if(typeof $==="function"||Array.isArray($))Z=$;else if(X===void 0&&$)X=$;if(typeof X==="string")X=X.length;if(typeof X==="number"){let H=Math.round(X);X=H<1?void 0:H>8?{indent:8}:{indent:H}}if(q===void 0){let{keepUndefined:H}=X??$??{};if(!H)return}if(a3.isDocument(q)&&!Z)return q.toString(X);return new c3.Document(q,Z,X).toString(X)}t3.parse=n3;t3.parseAllDocuments=r3;t3.parseDocument=R4;t3.stringify=o3});var K4=I((WQ)=>{var ZQ=D1(),HQ=s0(),zQ=X1(),E1=r0(),UQ=y0(),H0=A(),QQ=e(),GQ=b(),JQ=$0(),TQ=X0(),YQ=pq(),LQ=S1(),BQ=j1(),_Q=N1(),iq=P4(),M4=b0();WQ.Composer=ZQ.Composer;WQ.Document=HQ.Document;WQ.Schema=zQ.Schema;WQ.YAMLError=E1.YAMLError;WQ.YAMLParseError=E1.YAMLParseError;WQ.YAMLWarning=E1.YAMLWarning;WQ.Alias=UQ.Alias;WQ.isAlias=H0.isAlias;WQ.isCollection=H0.isCollection;WQ.isDocument=H0.isDocument;WQ.isMap=H0.isMap;WQ.isNode=H0.isNode;WQ.isPair=H0.isPair;WQ.isScalar=H0.isScalar;WQ.isSeq=H0.isSeq;WQ.Pair=QQ.Pair;WQ.Scalar=GQ.Scalar;WQ.YAMLMap=JQ.YAMLMap;WQ.YAMLSeq=TQ.YAMLSeq;WQ.CST=YQ;WQ.Lexer=LQ.Lexer;WQ.LineCounter=BQ.LineCounter;WQ.Parser=_Q.Parser;WQ.parse=iq.parse;WQ.parseAllDocuments=iq.parseAllDocuments;WQ.parseDocument=iq.parseDocument;WQ.stringify=iq.stringify;WQ.visit=M4.visit;WQ.visitAsync=M4.visitAsync});var L2=r1(Y2(),1),{program:B0,createCommand:RG,createArgument:PG,createOption:MG,CommanderError:KG,InvalidArgumentError:wG,InvalidOptionArgumentError:FG,Command:OG,Argument:AG,Option:I$,Help:SG}=L2.default;var B2={name:"@pickled-dev/cli",version:"0.8.
|
|
166
|
+
`,$)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let $=cq(q),X=F0($);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let $=cq(q),X=F0($);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,$){if(this.type!=="comment")return!1;if(this.indent<=$)return!1;return q.every((X)=>X.type==="newline"||X.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}p3.Parser=W4});var P4=I((t3)=>{var V4=D1(),c3=s0(),qq=r0(),i3=j$(),a3=A(),s3=j1(),I4=N1();function D4(q){let $=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||$&&new s3.LineCounter||null,prettyErrors:$}}function r3(q,$={}){let{lineCounter:X,prettyErrors:Z}=D4($),H=new I4.Parser(X?.addNewLine),z=new V4.Composer($),U=Array.from(z.compose(H.parse(q)));if(Z&&X)for(let Q of U)Q.errors.forEach(qq.prettifyError(q,X)),Q.warnings.forEach(qq.prettifyError(q,X));if(U.length>0)return U;return Object.assign([],{empty:!0},z.streamInfo())}function R4(q,$={}){let{lineCounter:X,prettyErrors:Z}=D4($),H=new I4.Parser(X?.addNewLine),z=new V4.Composer($),U=null;for(let Q of z.compose(H.parse(q),!0,q.length))if(!U)U=Q;else if(U.options.logLevel!=="silent"){U.errors.push(new qq.YAMLParseError(Q.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(Z&&X)U.errors.forEach(qq.prettifyError(q,X)),U.warnings.forEach(qq.prettifyError(q,X));return U}function n3(q,$,X){let Z=void 0;if(typeof $==="function")Z=$;else if(X===void 0&&$&&typeof $==="object")X=$;let H=R4(q,X);if(!H)return null;if(H.warnings.forEach((z)=>i3.warn(H.options.logLevel,z)),H.errors.length>0)if(H.options.logLevel!=="silent")throw H.errors[0];else H.errors=[];return H.toJS(Object.assign({reviver:Z},X))}function o3(q,$,X){let Z=null;if(typeof $==="function"||Array.isArray($))Z=$;else if(X===void 0&&$)X=$;if(typeof X==="string")X=X.length;if(typeof X==="number"){let H=Math.round(X);X=H<1?void 0:H>8?{indent:8}:{indent:H}}if(q===void 0){let{keepUndefined:H}=X??$??{};if(!H)return}if(a3.isDocument(q)&&!Z)return q.toString(X);return new c3.Document(q,Z,X).toString(X)}t3.parse=n3;t3.parseAllDocuments=r3;t3.parseDocument=R4;t3.stringify=o3});var K4=I((WQ)=>{var ZQ=D1(),HQ=s0(),zQ=X1(),E1=r0(),UQ=y0(),H0=A(),QQ=e(),GQ=b(),JQ=$0(),TQ=X0(),YQ=pq(),LQ=S1(),BQ=j1(),_Q=N1(),iq=P4(),M4=b0();WQ.Composer=ZQ.Composer;WQ.Document=HQ.Document;WQ.Schema=zQ.Schema;WQ.YAMLError=E1.YAMLError;WQ.YAMLParseError=E1.YAMLParseError;WQ.YAMLWarning=E1.YAMLWarning;WQ.Alias=UQ.Alias;WQ.isAlias=H0.isAlias;WQ.isCollection=H0.isCollection;WQ.isDocument=H0.isDocument;WQ.isMap=H0.isMap;WQ.isNode=H0.isNode;WQ.isPair=H0.isPair;WQ.isScalar=H0.isScalar;WQ.isSeq=H0.isSeq;WQ.Pair=QQ.Pair;WQ.Scalar=GQ.Scalar;WQ.YAMLMap=JQ.YAMLMap;WQ.YAMLSeq=TQ.YAMLSeq;WQ.CST=YQ;WQ.Lexer=LQ.Lexer;WQ.LineCounter=BQ.LineCounter;WQ.Parser=_Q.Parser;WQ.parse=iq.parse;WQ.parseAllDocuments=iq.parseAllDocuments;WQ.parseDocument=iq.parseDocument;WQ.stringify=iq.stringify;WQ.visit=M4.visit;WQ.visitAsync=M4.visitAsync});var L2=r1(Y2(),1),{program:B0,createCommand:RG,createArgument:PG,createOption:MG,CommanderError:KG,InvalidArgumentError:wG,InvalidOptionArgumentError:FG,Command:OG,Argument:AG,Option:I$,Help:SG}=L2.default;var B2={name:"@pickled-dev/cli",version:"0.8.1",description:"Test what agents actually understand about your product",module:"dist/index.js",type:"module",bin:{pickled:"./dist/index.js"},files:["dist"],scripts:{dev:"bun run ./src/index.ts",build:"bun build ./src/index.ts --outdir ./dist --target bun --minify --external @anthropic-ai/claude-agent-sdk",release:"semantic-release"},dependencies:{commander:"^14.0.2",chalk:"^5.6.2","@anthropic-ai/claude-agent-sdk":"^0.3.0"},devDependencies:{"@pickled-dev/config":"workspace:*","@pickled-dev/core":"workspace:*","semantic-release":"^25.0.2","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.2","semantic-release-ai-notes":"^0.3.0"}};import HG from"path";var d={category:"cli",provider:"claude-code",model:"sonnet"},D$=["Read","Glob","Grep","Bash"],R$=["Edit","MultiEdit","Write","NotebookEdit"];var w4=r1(K4(),1);async function aq(q){let $=`${q}/pickled.yml`,X=Bun.file($);if(!await X.exists())throw Error(`pickled.yml not found in ${q}`);let Z;try{let H=await X.text();Z=w4.default.parse(H)}catch(H){throw Error(`Failed to parse pickled.yml: ${H}`)}return cQ(Z),Z}function cQ(q){if(!q.tool?.name)throw Error("pickled.yml: 'tool.name' is required");if(!Array.isArray(q.scenarios)||q.scenarios.length===0)throw Error("pickled.yml: 'scenarios' must be a non-empty array");if(q.docs?.sources){for(let[X,Z]of Object.entries(q.docs.sources))if(typeof Z!=="string"||Z.length===0)throw Error(`pickled.yml: docs.sources["${X}"] must be a non-empty string (file path or URL)`)}if(q.targets)for(let[X,Z]of Object.entries(q.targets)){if(Z.systemPrompt!==void 0)throw Error(`pickled.yml: target "${X}" sets 'systemPrompt', which bypasses the citation contract. Remove it; custom prompts are not supported in citation mode.`);if(Z.provider==="codex-cli"){if(!Z.model)throw Error(`pickled.yml: target "${X}" (codex-cli) requires an explicit 'model' field. Codex's default model can change without notice; pin it for reproducible evals.`);if(Z.maxTurns!==void 0)throw Error(`pickled.yml: target "${X}" (codex-cli) sets 'maxTurns', but the codex CLI does not support a turn cap. Remove the field.`)}}let $=new Set(Object.keys(q.docs?.sources??{}));for(let X of q.scenarios){if(!X.name||!X.prompt)throw Error("pickled.yml: every scenario needs 'name' and 'prompt'");if(!Array.isArray(X.requiredSources))throw Error(`pickled.yml: scenario "${X.name}" is missing 'requiredSources' (use [] to allow any citation)`);for(let Z of X.requiredSources)if(!$.has(Z))throw Error(`pickled.yml: scenario "${X.name}" references unknown source "${Z}". Declared sources: ${[...$].join(", ")||"(none)"}`);sQ(X.name,X.traps)}}var iQ=new Set(["g","y"]),aQ=new Set(["i","m","s","u","v"]);function sQ(q,$){if($===void 0)return;if(!Array.isArray($))throw Error(`pickled.yml: scenario "${q}" has non-array 'traps'`);let X=new Set;for(let Z of $){if(!Z.id||typeof Z.id!=="string")throw Error(`pickled.yml: scenario "${q}" has a trap missing 'id'`);if(X.has(Z.id))throw Error(`pickled.yml: scenario "${q}" has duplicate trap id "${Z.id}"`);if(X.add(Z.id),!Z.reason||typeof Z.reason!=="string")throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" requires non-empty 'reason'`);let H=typeof Z.match==="string",z=typeof Z.pattern==="string";if(H===z)throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" must set exactly one of 'match' or 'pattern'`);if(H){if(Z.match==="")throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" has empty 'match'`);if(Z.flags!==void 0)throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" sets 'flags' without 'pattern'`)}else{let U=Z.pattern;if(typeof U!=="string")throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" must set 'pattern'`);if(U==="")throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" has empty 'pattern'`);if(Z.flags!==void 0){if(typeof Z.flags!=="string")throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" has non-string 'flags'`);for(let Q of Z.flags){if(iQ.has(Q))throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" uses forbidden regex flag "${Q}" (g and y are not allowed)`);if(!aQ.has(Q))throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" uses unsupported regex flag "${Q}"`)}}try{new RegExp(U,Z.flags??"")}catch(Q){throw Error(`pickled.yml: scenario "${q}" trap "${Z.id}" has invalid regex pattern: ${Q instanceof Error?Q.message:Q}`)}}}}function b1(q,$){let X=new Set([...Object.keys(q.targets??{}),"default"]);if(!X.has($)){let Z=[...X].sort().join(", ");throw Error(`Unknown target: "${$}". Available targets: ${Z}`)}return{...q,matrix:{...q.matrix,target:[$]},scenarios:q.scenarios.filter((Z)=>!Z.target||Z.target===$)}}function sq(q){let{config:$,files:X,pairs:Z,findings:H}=q,z=[],U=H.filter((T)=>T.severity==="error").length,Q=H.filter((T)=>T.severity==="warning").length;if(z.push(`# Agent-context audit
|
|
167
167
|
`),z.push(`Target: \`${$.targetRepo}\``),z.push(`Budgets: root \u2264 ${$.budgets.rootLines} lines, nested warn at ${$.budgets.nestedWarnLines} lines.`),z.push(`Found ${X.length} agent-doc files. ${U} error(s), ${Q} warning(s).
|
|
168
168
|
`),z.push(`## Inventory
|
|
169
169
|
`),X.length===0)z.push(`No agent-doc files found.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pickled-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Test what agents actually understand about your product",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"commander": "^14.0.2",
|
|
20
20
|
"chalk": "^5.6.2",
|
|
21
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
21
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@pickled-dev/config": "workspace:*",
|