@anthropic-ai/claude-agent-sdk 0.3.145 → 0.3.146

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/browser-sdk.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
2
2
 
3
- // Version: 0.3.145
3
+ // Version: 0.3.146
4
4
  var eD=Object.create;var{getPrototypeOf:$q,defineProperty:hQ,getOwnPropertyNames:Xq}=Object;var Jq=Object.prototype.hasOwnProperty;function zq($){return this[$]}var Qq,Yq,ZU=($,X,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var z=X?Qq??=new WeakMap:Yq??=new WeakMap,Y=z.get($);if(Y)return Y}J=$!=null?eD($q($)):{};let W=X||!$||!$.__esModule?hQ(J,"default",{value:$,enumerable:!0}):J;for(let G of Xq($))if(!Jq.call(W,G))hQ(W,G,{get:zq.bind($,G),enumerable:!0});if(Q)z.set($,W);return W};var x=($,X)=>()=>(X||$((X={exports:{}}).exports,X),X.exports);var Wq=($)=>$;function Gq($,X){this[$]=Wq.bind(null,X)}var B6=($,X)=>{for(var J in X)hQ($,J,{get:X[J],enumerable:!0,configurable:!0,set:Gq.bind(X,J)})};var Uq=($,X)=>()=>($&&(X=$($=0)),X);var n6=(($)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy($,{get:(X,J)=>(typeof require<"u"?require:X)[J]}):$)(function($){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+$+'" is not supported')}),wq=Symbol.dispose||Symbol.for("Symbol.dispose"),Kq=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),F$=($,X,J)=>{if(X!=null){if(typeof X!=="object"&&typeof X!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var Q;if(J)Q=X[Kq];if(Q===void 0)Q=X[wq];if(typeof Q!=="function")throw TypeError("Object not disposable");$.push([J,Q,X])}else if(J)$.push([J]);return X},M$=($,X,J)=>{var Q=typeof SuppressedError==="function"?SuppressedError:function(W,G,U,w){return w=Error(U),w.name="SuppressedError",w.error=W,w.suppressed=G,w},z=(W)=>X=J?new Q(W,X,"An error was suppressed during disposal"):(J=!0,W),Y=(W)=>{while(W=$.pop())try{var G=W[1]&&W[1].call(W[2]);if(W[0])return Promise.resolve(G).then(Y,(U)=>(z(U),Y()))}catch(U){z(U)}if(J)throw X};return Y()};var o6={};B6(o6,{sep:()=>dQ,resolve:()=>k1,relative:()=>Uw,posix:()=>Ow,parse:()=>Vw,normalize:()=>iQ,join:()=>u4,isAbsolute:()=>nQ,format:()=>Nw,extname:()=>Kw,dirname:()=>r6,delimiter:()=>Hw,default:()=>_L,basename:()=>pQ,_makeLong:()=>ww});function h4($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}function Gw($,X){var J="",Q=0,z=-1,Y=0,W;for(var G=0;G<=$.length;++G){if(G<$.length)W=$.charCodeAt(G);else if(W===47)break;else W=47;if(W===47){if(z===G-1||Y===1);else if(z!==G-1&&Y===2){if(J.length<2||Q!==2||J.charCodeAt(J.length-1)!==46||J.charCodeAt(J.length-2)!==46){if(J.length>2){var U=J.lastIndexOf("/");if(U!==J.length-1){if(U===-1)J="",Q=0;else J=J.slice(0,U),Q=J.length-1-J.lastIndexOf("/");z=G,Y=0;continue}}else if(J.length===2||J.length===1){J="",Q=0,z=G,Y=0;continue}}if(X){if(J.length>0)J+="/..";else J="..";Q=2}}else{if(J.length>0)J+="/"+$.slice(z+1,G);else J=$.slice(z+1,G);Q=G-z-1}z=G,Y=0}else if(W===46&&Y!==-1)++Y;else Y=-1}return J}function kL($,X){var J=X.dir||X.root,Q=X.base||(X.name||"")+(X.ext||"");if(!J)return Q;if(J===X.root)return J+Q;return J+$+Q}function k1(){var $="",X=!1,J;for(var Q=arguments.length-1;Q>=-1&&!X;Q--){var z;if(Q>=0)z=arguments[Q];else{if(J===void 0)J=process.cwd();z=J}if(h4(z),z.length===0)continue;$=z+"/"+$,X=z.charCodeAt(0)===47}if($=Gw($,!X),X)if($.length>0)return"/"+$;else return"/";else if($.length>0)return $;else return"."}function iQ($){if(h4($),$.length===0)return".";var X=$.charCodeAt(0)===47,J=$.charCodeAt($.length-1)===47;if($=Gw($,!X),$.length===0&&!X)$=".";if($.length>0&&J)$+="/";if(X)return"/"+$;return $}function nQ($){return h4($),$.length>0&&$.charCodeAt(0)===47}function u4(){if(arguments.length===0)return".";var $;for(var X=0;X<arguments.length;++X){var J=arguments[X];if(h4(J),J.length>0)if($===void 0)$=J;else $+="/"+J}if($===void 0)return".";return iQ($)}function Uw($,X){if(h4($),h4(X),$===X)return"";if($=k1($),X=k1(X),$===X)return"";var J=1;for(;J<$.length;++J)if($.charCodeAt(J)!==47)break;var Q=$.length,z=Q-J,Y=1;for(;Y<X.length;++Y)if(X.charCodeAt(Y)!==47)break;var W=X.length,G=W-Y,U=z<G?z:G,w=-1,K=0;for(;K<=U;++K){if(K===U){if(G>U){if(X.charCodeAt(Y+K)===47)return X.slice(Y+K+1);else if(K===0)return X.slice(Y+K)}else if(z>U){if($.charCodeAt(J+K)===47)w=K;else if(K===0)w=0}break}var N=$.charCodeAt(J+K),H=X.charCodeAt(Y+K);if(N!==H)break;else if(N===47)w=K}var V="";for(K=J+w+1;K<=Q;++K)if(K===Q||$.charCodeAt(K)===47)if(V.length===0)V+="..";else V+="/..";if(V.length>0)return V+X.slice(Y+w);else{if(Y+=w,X.charCodeAt(Y)===47)++Y;return X.slice(Y)}}function ww($){return $}function r6($){if(h4($),$.length===0)return".";var X=$.charCodeAt(0),J=X===47,Q=-1,z=!0;for(var Y=$.length-1;Y>=1;--Y)if(X=$.charCodeAt(Y),X===47){if(!z){Q=Y;break}}else z=!1;if(Q===-1)return J?"/":".";if(J&&Q===1)return"//";return $.slice(0,Q)}function pQ($,X){if(X!==void 0&&typeof X!=="string")throw TypeError('"ext" argument must be a string');h4($);var J=0,Q=-1,z=!0,Y;if(X!==void 0&&X.length>0&&X.length<=$.length){if(X.length===$.length&&X===$)return"";var W=X.length-1,G=-1;for(Y=$.length-1;Y>=0;--Y){var U=$.charCodeAt(Y);if(U===47){if(!z){J=Y+1;break}}else{if(G===-1)z=!1,G=Y+1;if(W>=0)if(U===X.charCodeAt(W)){if(--W===-1)Q=Y}else W=-1,Q=G}}if(J===Q)Q=G;else if(Q===-1)Q=$.length;return $.slice(J,Q)}else{for(Y=$.length-1;Y>=0;--Y)if($.charCodeAt(Y)===47){if(!z){J=Y+1;break}}else if(Q===-1)z=!1,Q=Y+1;if(Q===-1)return"";return $.slice(J,Q)}}function Kw($){h4($);var X=-1,J=0,Q=-1,z=!0,Y=0;for(var W=$.length-1;W>=0;--W){var G=$.charCodeAt(W);if(G===47){if(!z){J=W+1;break}continue}if(Q===-1)z=!1,Q=W+1;if(G===46){if(X===-1)X=W;else if(Y!==1)Y=1}else if(X!==-1)Y=-1}if(X===-1||Q===-1||Y===0||Y===1&&X===Q-1&&X===J+1)return"";return $.slice(X,Q)}function Nw($){if($===null||typeof $!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return kL("/",$)}function Vw($){h4($);var X={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return X;var J=$.charCodeAt(0),Q=J===47,z;if(Q)X.root="/",z=1;else z=0;var Y=-1,W=0,G=-1,U=!0,w=$.length-1,K=0;for(;w>=z;--w){if(J=$.charCodeAt(w),J===47){if(!U){W=w+1;break}continue}if(G===-1)U=!1,G=w+1;if(J===46){if(Y===-1)Y=w;else if(K!==1)K=1}else if(Y!==-1)K=-1}if(Y===-1||G===-1||K===0||K===1&&Y===G-1&&Y===W+1){if(G!==-1)if(W===0&&Q)X.base=X.name=$.slice(1,G);else X.base=X.name=$.slice(W,G)}else{if(W===0&&Q)X.name=$.slice(1,Y),X.base=$.slice(1,G);else X.name=$.slice(W,Y),X.base=$.slice(W,G);X.ext=$.slice(Y,G)}if(W>0)X.dir=$.slice(0,W-1);else if(Q)X.dir="/";return X}var dQ="/",Hw=":",Ow,_L;var P4=Uq(()=>{Ow=(($)=>($.posix=$,$))({resolve:k1,normalize:iQ,isAbsolute:nQ,join:u4,relative:Uw,_makeLong:ww,dirname:r6,basename:pQ,extname:Kw,format:Nw,parse:Vw,sep:dQ,delimiter:Hw,win32:null,posix:null}),_L=Ow});var w8=x((GH)=>{Object.defineProperty(GH,"__esModule",{value:!0});GH.regexpCode=GH.getEsmExportName=GH.getProperty=GH.safeStringify=GH.stringify=GH.strConcat=GH.addCodeArg=GH.str=GH._=GH.nil=GH._Code=GH.Name=GH.IDENTIFIER=GH._CodeOrName=void 0;class XQ{}GH._CodeOrName=XQ;GH.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class P0 extends XQ{constructor($){super();if(!GH.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}GH.Name=P0;class _4 extends XQ{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((X,J)=>`${X}${J}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((X,J)=>{if(J instanceof P0)X[J.str]=(X[J.str]||0)+1;return X},{})}}GH._Code=_4;GH.nil=new _4("");function YH($,...X){let J=[$[0]],Q=0;while(Q<X.length)BG(J,X[Q]),J.push($[++Q]);return new _4(J)}GH._=YH;var OG=new _4("+");function WH($,...X){let J=[U8($[0])],Q=0;while(Q<X.length)J.push(OG),BG(J,X[Q]),J.push(OG,U8($[++Q]));return IP(J),new _4(J)}GH.str=WH;function BG($,X){if(X instanceof _4)$.push(...X._items);else if(X instanceof P0)$.push(X);else $.push(PP(X))}GH.addCodeArg=BG;function IP($){let X=1;while(X<$.length-1){if($[X]===OG){let J=AP($[X-1],$[X+1]);if(J!==void 0){$.splice(X-1,3,J);continue}$[X++]="+"}X++}}function AP($,X){if(X==='""')return $;if($==='""')return X;if(typeof $=="string"){if(X instanceof P0||$[$.length-1]!=='"')return;if(typeof X!="string")return`${$.slice(0,-1)}${X}"`;if(X[0]==='"')return $.slice(0,-1)+X.slice(1);return}if(typeof X=="string"&&X[0]==='"'&&!($ instanceof P0))return`"${$}${X.slice(1)}`;return}function bP($,X){return X.emptyStr()?$:$.emptyStr()?X:WH`${$}${X}`}GH.strConcat=bP;function PP($){return typeof $=="number"||typeof $=="boolean"||$===null?$:U8(Array.isArray($)?$.join(","):$)}function ZP($){return new _4(U8($))}GH.stringify=ZP;function U8($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}GH.safeStringify=U8;function SP($){return typeof $=="string"&&GH.IDENTIFIER.test($)?new _4(`.${$}`):YH`[${$}]`}GH.getProperty=SP;function RP($){if(typeof $=="string"&&GH.IDENTIFIER.test($))return new _4(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}GH.getEsmExportName=RP;function EP($){return new _4($.toString())}GH.regexpCode=EP});var LG=x((NH)=>{Object.defineProperty(NH,"__esModule",{value:!0});NH.ValueScope=NH.ValueScopeName=NH.Scope=NH.varKinds=NH.UsedValueState=void 0;var X4=w8();class wH extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var zQ;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(zQ||(NH.UsedValueState=zQ={}));NH.varKinds={const:new X4.Name("const"),let:new X4.Name("let"),var:new X4.Name("var")};class DG{constructor({prefixes:$,parent:X}={}){this._names={},this._prefixes=$,this._parent=X}toName($){return $ instanceof X4.Name?$:this.name($)}name($){return new X4.Name(this._newName($))}_newName($){let X=this._names[$]||this._nameGroup($);return`${$}${X.index++}`}_nameGroup($){var X,J;if(((J=(X=this._parent)===null||X===void 0?void 0:X._prefixes)===null||J===void 0?void 0:J.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}NH.Scope=DG;class qG extends X4.Name{constructor($,X){super(X);this.prefix=$}setValue($,{property:X,itemIndex:J}){this.value=$,this.scopePath=X4._`.${new X4.Name(X)}[${J}]`}}NH.ValueScopeName=qG;var mP=X4._`\n`;class KH extends DG{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?mP:X4.nil}}get(){return this._scope}name($){return new qG($,this._newName($))}value($,X){var J;if(X.ref===void 0)throw Error("CodeGen: ref must be passed in value");let Q=this.toName($),{prefix:z}=Q,Y=(J=X.key)!==null&&J!==void 0?J:X.ref,W=this._values[z];if(W){let w=W.get(Y);if(w)return w}else W=this._values[z]=new Map;W.set(Y,Q);let G=this._scope[z]||(this._scope[z]=[]),U=G.length;return G[U]=X.ref,Q.setValue(X,{property:z,itemIndex:U}),Q}getValue($,X){let J=this._values[$];if(!J)return;return J.get(X)}scopeRefs($,X=this._values){return this._reduceValues(X,(J)=>{if(J.scopePath===void 0)throw Error(`CodeGen: name "${J}" has no value`);return X4._`${$}${J.scopePath}`})}scopeCode($=this._values,X,J){return this._reduceValues($,(Q)=>{if(Q.value===void 0)throw Error(`CodeGen: name "${Q}" has no value`);return Q.value.code},X,J)}_reduceValues($,X,J={},Q){let z=X4.nil;for(let Y in $){let W=$[Y];if(!W)continue;let G=J[Y]=J[Y]||new Map;W.forEach((U)=>{if(G.has(U))return;G.set(U,zQ.Started);let w=X(U);if(w){let K=this.opts.es5?NH.varKinds.var:NH.varKinds.const;z=X4._`${z}${K} ${U} = ${w};${this.opts._n}`}else if(w=Q===null||Q===void 0?void 0:Q(U))z=X4._`${z}${w}${this.opts._n}`;else throw new wH(U);G.set(U,zQ.Completed)})}return z}}NH.ValueScope=KH});var s=x((J4)=>{Object.defineProperty(J4,"__esModule",{value:!0});J4.or=J4.and=J4.not=J4.CodeGen=J4.operators=J4.varKinds=J4.ValueScopeName=J4.ValueScope=J4.Scope=J4.Name=J4.regexpCode=J4.stringify=J4.getProperty=J4.nil=J4.strConcat=J4.str=J4._=void 0;var Q$=w8(),x4=LG(),g6=w8();Object.defineProperty(J4,"_",{enumerable:!0,get:function(){return g6._}});Object.defineProperty(J4,"str",{enumerable:!0,get:function(){return g6.str}});Object.defineProperty(J4,"strConcat",{enumerable:!0,get:function(){return g6.strConcat}});Object.defineProperty(J4,"nil",{enumerable:!0,get:function(){return g6.nil}});Object.defineProperty(J4,"getProperty",{enumerable:!0,get:function(){return g6.getProperty}});Object.defineProperty(J4,"stringify",{enumerable:!0,get:function(){return g6.stringify}});Object.defineProperty(J4,"regexpCode",{enumerable:!0,get:function(){return g6.regexpCode}});Object.defineProperty(J4,"Name",{enumerable:!0,get:function(){return g6.Name}});var wQ=LG();Object.defineProperty(J4,"Scope",{enumerable:!0,get:function(){return wQ.Scope}});Object.defineProperty(J4,"ValueScope",{enumerable:!0,get:function(){return wQ.ValueScope}});Object.defineProperty(J4,"ValueScopeName",{enumerable:!0,get:function(){return wQ.ValueScopeName}});Object.defineProperty(J4,"varKinds",{enumerable:!0,get:function(){return wQ.varKinds}});J4.operators={GT:new Q$._Code(">"),GTE:new Q$._Code(">="),LT:new Q$._Code("<"),LTE:new Q$._Code("<="),EQ:new Q$._Code("==="),NEQ:new Q$._Code("!=="),NOT:new Q$._Code("!"),OR:new Q$._Code("||"),AND:new Q$._Code("&&"),ADD:new Q$._Code("+")};class y6{optimizeNodes(){return this}optimizeNames($,X){return this}}class HH extends y6{constructor($,X,J){super();this.varKind=$,this.name=X,this.rhs=J}render({es5:$,_n:X}){let J=$?x4.varKinds.var:this.varKind,Q=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${Q};`+X}optimizeNames($,X){if(!$[this.name.str])return;if(this.rhs)this.rhs=S0(this.rhs,$,X);return this}get names(){return this.rhs instanceof Q$._CodeOrName?this.rhs.names:{}}}class IG extends y6{constructor($,X,J){super();this.lhs=$,this.rhs=X,this.sideEffects=J}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,X){if(this.lhs instanceof Q$.Name&&!$[this.lhs.str]&&!this.sideEffects)return;return this.rhs=S0(this.rhs,$,X),this}get names(){let $=this.lhs instanceof Q$.Name?{}:{...this.lhs.names};return UQ($,this.rhs)}}class OH extends IG{constructor($,X,J,Q){super($,J,Q);this.op=X}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class BH extends y6{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class jH extends y6{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class DH extends y6{constructor($){super();this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class qH extends y6{constructor($){super();this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,X){return this.code=S0(this.code,$,X),this}get names(){return this.code instanceof Q$._CodeOrName?this.code.names:{}}}class KQ extends y6{constructor($=[]){super();this.nodes=$}render($){return this.nodes.reduce((X,J)=>X+J.render($),"")}optimizeNodes(){let{nodes:$}=this,X=$.length;while(X--){let J=$[X].optimizeNodes();if(Array.isArray(J))$.splice(X,1,...J);else if(J)$[X]=J;else $.splice(X,1)}return $.length>0?this:void 0}optimizeNames($,X){let{nodes:J}=this,Q=J.length;while(Q--){let z=J[Q];if(z.optimizeNames($,X))continue;pP($,z.names),J.splice(Q,1)}return J.length>0?this:void 0}get names(){return this.nodes.reduce(($,X)=>F1($,X.names),{})}}class h6 extends KQ{render($){return"{"+$._n+super.render($)+"}"+$._n}}class LH extends KQ{}class K8 extends h6{}K8.kind="else";class K6 extends h6{constructor($,X){super(X);this.condition=$}render($){let X=`if(${this.condition})`+super.render($);if(this.else)X+="else "+this.else.render($);return X}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let X=this.else;if(X){let J=X.optimizeNodes();X=this.else=Array.isArray(J)?new K8(J):J}if(X){if($===!1)return X instanceof K6?X:X.nodes;if(this.nodes.length)return this;return new K6(bH($),X instanceof K6?[X]:X.nodes)}if($===!1||!this.nodes.length)return;return this}optimizeNames($,X){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames($,X),!(super.optimizeNames($,X)||this.else))return;return this.condition=S0(this.condition,$,X),this}get names(){let $=super.names;if(UQ($,this.condition),this.else)F1($,this.else.names);return $}}K6.kind="if";class Z0 extends h6{}Z0.kind="for";class FH extends Z0{constructor($){super();this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,X){if(!super.optimizeNames($,X))return;return this.iteration=S0(this.iteration,$,X),this}get names(){return F1(super.names,this.iteration.names)}}class MH extends Z0{constructor($,X,J,Q){super();this.varKind=$,this.name=X,this.from=J,this.to=Q}render($){let X=$.es5?x4.varKinds.var:this.varKind,{name:J,from:Q,to:z}=this;return`for(${X} ${J}=${Q}; ${J}<${z}; ${J}++)`+super.render($)}get names(){let $=UQ(super.names,this.from);return UQ($,this.to)}}class FG extends Z0{constructor($,X,J,Q){super();this.loop=$,this.varKind=X,this.name=J,this.iterable=Q}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,X){if(!super.optimizeNames($,X))return;return this.iterable=S0(this.iterable,$,X),this}get names(){return F1(super.names,this.iterable.names)}}class QQ extends h6{constructor($,X,J){super();this.name=$,this.args=X,this.async=J}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}QQ.kind="func";class YQ extends KQ{render($){return"return "+super.render($)}}YQ.kind="return";class IH extends h6{render($){let X="try"+super.render($);if(this.catch)X+=this.catch.render($);if(this.finally)X+=this.finally.render($);return X}optimizeNodes(){var $,X;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(X=this.finally)===null||X===void 0||X.optimizeNodes(),this}optimizeNames($,X){var J,Q;return super.optimizeNames($,X),(J=this.catch)===null||J===void 0||J.optimizeNames($,X),(Q=this.finally)===null||Q===void 0||Q.optimizeNames($,X),this}get names(){let $=super.names;if(this.catch)F1($,this.catch.names);if(this.finally)F1($,this.finally.names);return $}}class WQ extends h6{constructor($){super();this.error=$}render($){return`catch(${this.error})`+super.render($)}}WQ.kind="catch";class GQ extends h6{render($){return"finally"+super.render($)}}GQ.kind="finally";class AH{constructor($,X={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...X,_n:X.lines?`
5
5
  `:""},this._extScope=$,this._scope=new x4.Scope({parent:$}),this._nodes=[new LH]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,X){let J=this._extScope.value($,X);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue($,X){return this._extScope.getValue($,X)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,X,J,Q){let z=this._scope.toName(X);if(J!==void 0&&Q)this._constants[z.str]=J;return this._leafNode(new HH($,z,J)),z}const($,X,J){return this._def(x4.varKinds.const,$,X,J)}let($,X,J){return this._def(x4.varKinds.let,$,X,J)}var($,X,J){return this._def(x4.varKinds.var,$,X,J)}assign($,X,J){return this._leafNode(new IG($,X,J))}add($,X){return this._leafNode(new OH($,J4.operators.ADD,X))}code($){if(typeof $=="function")$();else if($!==Q$.nil)this._leafNode(new qH($));return this}object(...$){let X=["{"];for(let[J,Q]of $){if(X.length>1)X.push(",");if(X.push(J),J!==Q||this.opts.es5)X.push(":"),(0,Q$.addCodeArg)(X,Q)}return X.push("}"),new Q$._Code(X)}if($,X,J){if(this._blockNode(new K6($)),X&&J)this.code(X).else().code(J).endIf();else if(X)this.code(X).endIf();else if(J)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new K6($))}else(){return this._elseNode(new K8)}endIf(){return this._endBlockNode(K6,K8)}_for($,X){if(this._blockNode($),X)this.code(X).endFor();return this}for($,X){return this._for(new FH($),X)}forRange($,X,J,Q,z=this.opts.es5?x4.varKinds.var:x4.varKinds.let){let Y=this._scope.toName($);return this._for(new MH(z,Y,X,J),()=>Q(Y))}forOf($,X,J,Q=x4.varKinds.const){let z=this._scope.toName($);if(this.opts.es5){let Y=X instanceof Q$.Name?X:this.var("_arr",X);return this.forRange("_i",0,Q$._`${Y}.length`,(W)=>{this.var(z,Q$._`${Y}[${W}]`),J(z)})}return this._for(new FG("of",Q,z,X),()=>J(z))}forIn($,X,J,Q=this.opts.es5?x4.varKinds.var:x4.varKinds.const){if(this.opts.ownProperties)return this.forOf($,Q$._`Object.keys(${X})`,J);let z=this._scope.toName($);return this._for(new FG("in",Q,z,X),()=>J(z))}endFor(){return this._endBlockNode(Z0)}label($){return this._leafNode(new BH($))}break($){return this._leafNode(new jH($))}return($){let X=new YQ;if(this._blockNode(X),this.code($),X.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(YQ)}try($,X,J){if(!X&&!J)throw Error('CodeGen: "try" without "catch" and "finally"');let Q=new IH;if(this._blockNode(Q),this.code($),X){let z=this.name("e");this._currNode=Q.catch=new WQ(z),X(z)}if(J)this._currNode=Q.finally=new GQ,this.code(J);return this._endBlockNode(WQ,GQ)}throw($){return this._leafNode(new DH($))}block($,X){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(X);return this}endBlock($){let X=this._blockStarts.pop();if(X===void 0)throw Error("CodeGen: not in self-balancing block");let J=this._nodes.length-X;if(J<0||$!==void 0&&J!==$)throw Error(`CodeGen: wrong number of nodes: ${J} vs ${$} expected`);return this._nodes.length=X,this}func($,X=Q$.nil,J,Q){if(this._blockNode(new QQ($,X,J)),Q)this.code(Q).endFunc();return this}endFunc(){return this._endBlockNode(QQ)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,X){let J=this._currNode;if(J instanceof $||X&&J instanceof X)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${X?`${$.kind}/${X.kind}`:$.kind}"`)}_elseNode($){let X=this._currNode;if(!(X instanceof K6))throw Error('CodeGen: "else" without "if"');return this._currNode=X.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let X=this._nodes;X[X.length-1]=$}}J4.CodeGen=AH;function F1($,X){for(let J in X)$[J]=($[J]||0)+(X[J]||0);return $}function UQ($,X){return X instanceof Q$._CodeOrName?F1($,X.names):$}function S0($,X,J){if($ instanceof Q$.Name)return Q($);if(!z($))return $;return new Q$._Code($._items.reduce((Y,W)=>{if(W instanceof Q$.Name)W=Q(W);if(W instanceof Q$._Code)Y.push(...W._items);else Y.push(W);return Y},[]));function Q(Y){let W=J[Y.str];if(W===void 0||X[Y.str]!==1)return Y;return delete X[Y.str],W}function z(Y){return Y instanceof Q$._Code&&Y._items.some((W)=>W instanceof Q$.Name&&X[W.str]===1&&J[W.str]!==void 0)}}function pP($,X){for(let J in X)$[J]=($[J]||0)-(X[J]||0)}function bH($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:Q$._`!${MG($)}`}J4.not=bH;var dP=PH(J4.operators.AND);function rP(...$){return $.reduce(dP)}J4.and=rP;var oP=PH(J4.operators.OR);function tP(...$){return $.reduce(oP)}J4.or=tP;function PH($){return(X,J)=>X===Q$.nil?J:J===Q$.nil?X:Q$._`${MG(X)} ${$} ${MG(J)}`}function MG($){return $ instanceof Q$.Name?$:Q$._`(${$})`}});var Y$=x((xH)=>{Object.defineProperty(xH,"__esModule",{value:!0});xH.checkStrictMode=xH.getErrorPath=xH.Type=xH.useFunc=xH.setEvaluated=xH.evaluatedPropsToName=xH.mergeEvaluated=xH.eachItem=xH.unescapeJsonPointer=xH.escapeJsonPointer=xH.escapeFragment=xH.unescapeFragment=xH.schemaRefOrVal=xH.schemaHasRulesButRef=xH.schemaHasRules=xH.checkUnknownRules=xH.alwaysValidSchema=xH.toHash=void 0;var B$=s(),$Z=w8();function XZ($){let X={};for(let J of $)X[J]=!0;return X}xH.toHash=XZ;function JZ($,X){if(typeof X=="boolean")return X;if(Object.keys(X).length===0)return!0;return EH($,X),!vH(X,$.self.RULES.all)}xH.alwaysValidSchema=JZ;function EH($,X=$.schema){let{opts:J,self:Q}=$;if(!J.strictSchema)return;if(typeof X==="boolean")return;let z=Q.RULES.keywords;for(let Y in X)if(!z[Y])_H($,`unknown keyword: "${Y}"`)}xH.checkUnknownRules=EH;function vH($,X){if(typeof $=="boolean")return!$;for(let J in $)if(X[J])return!0;return!1}xH.schemaHasRules=vH;function zZ($,X){if(typeof $=="boolean")return!$;for(let J in $)if(J!=="$ref"&&X.all[J])return!0;return!1}xH.schemaHasRulesButRef=zZ;function QZ({topSchemaRef:$,schemaPath:X},J,Q,z){if(!z){if(typeof J=="number"||typeof J=="boolean")return J;if(typeof J=="string")return B$._`${J}`}return B$._`${$}${X}${(0,B$.getProperty)(Q)}`}xH.schemaRefOrVal=QZ;function YZ($){return CH(decodeURIComponent($))}xH.unescapeFragment=YZ;function WZ($){return encodeURIComponent(bG($))}xH.escapeFragment=WZ;function bG($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}xH.escapeJsonPointer=bG;function CH($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}xH.unescapeJsonPointer=CH;function GZ($,X){if(Array.isArray($))for(let J of $)X(J);else X($)}xH.eachItem=GZ;function SH({mergeNames:$,mergeToName:X,mergeValues:J,resultToName:Q}){return(z,Y,W,G)=>{let U=W===void 0?Y:W instanceof B$.Name?(Y instanceof B$.Name?$(z,Y,W):X(z,Y,W),W):Y instanceof B$.Name?(X(z,W,Y),Y):J(Y,W);return G===B$.Name&&!(U instanceof B$.Name)?Q(z,U):U}}xH.mergeEvaluated={props:SH({mergeNames:($,X,J)=>$.if(B$._`${J} !== true && ${X} !== undefined`,()=>{$.if(B$._`${X} === true`,()=>$.assign(J,!0),()=>$.assign(J,B$._`${J} || {}`).code(B$._`Object.assign(${J}, ${X})`))}),mergeToName:($,X,J)=>$.if(B$._`${J} !== true`,()=>{if(X===!0)$.assign(J,!0);else $.assign(J,B$._`${J} || {}`),PG($,J,X)}),mergeValues:($,X)=>$===!0?!0:{...$,...X},resultToName:kH}),items:SH({mergeNames:($,X,J)=>$.if(B$._`${J} !== true && ${X} !== undefined`,()=>$.assign(J,B$._`${X} === true ? true : ${J} > ${X} ? ${J} : ${X}`)),mergeToName:($,X,J)=>$.if(B$._`${J} !== true`,()=>$.assign(J,X===!0?!0:B$._`${J} > ${X} ? ${J} : ${X}`)),mergeValues:($,X)=>$===!0?!0:Math.max($,X),resultToName:($,X)=>$.var("items",X)})};function kH($,X){if(X===!0)return $.var("props",!0);let J=$.var("props",B$._`{}`);if(X!==void 0)PG($,J,X);return J}xH.evaluatedPropsToName=kH;function PG($,X,J){Object.keys(J).forEach((Q)=>$.assign(B$._`${X}${(0,B$.getProperty)(Q)}`,!0))}xH.setEvaluated=PG;var RH={};function UZ($,X){return $.scopeValue("func",{ref:X,code:RH[X.code]||(RH[X.code]=new $Z._Code(X.code))})}xH.useFunc=UZ;var AG;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(AG||(xH.Type=AG={}));function wZ($,X,J){if($ instanceof B$.Name){let Q=X===AG.Num;return J?Q?B$._`"[" + ${$} + "]"`:B$._`"['" + ${$} + "']"`:Q?B$._`"/" + ${$}`:B$._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return J?(0,B$.getProperty)($).toString():"/"+bG($)}xH.getErrorPath=wZ;function _H($,X,J=$.opts.strictSchema){if(!J)return;if(X=`strict mode: ${X}`,J===!0)throw Error(X);$.self.logger.warn(X)}xH.checkStrictMode=_H});var N6=x((fH)=>{Object.defineProperty(fH,"__esModule",{value:!0});var i$=s(),SZ={data:new i$.Name("data"),valCxt:new i$.Name("valCxt"),instancePath:new i$.Name("instancePath"),parentData:new i$.Name("parentData"),parentDataProperty:new i$.Name("parentDataProperty"),rootData:new i$.Name("rootData"),dynamicAnchors:new i$.Name("dynamicAnchors"),vErrors:new i$.Name("vErrors"),errors:new i$.Name("errors"),this:new i$.Name("this"),self:new i$.Name("self"),scope:new i$.Name("scope"),json:new i$.Name("json"),jsonPos:new i$.Name("jsonPos"),jsonLen:new i$.Name("jsonLen"),jsonPart:new i$.Name("jsonPart")};fH.default=SZ});var N8=x((uH)=>{Object.defineProperty(uH,"__esModule",{value:!0});uH.extendErrors=uH.resetErrorsCount=uH.reportExtraError=uH.reportError=uH.keyword$DataError=uH.keywordError=void 0;var W$=s(),VQ=Y$(),r$=N6();uH.keywordError={message:({keyword:$})=>W$.str`must pass "${$}" keyword validation`};uH.keyword$DataError={message:({keyword:$,schemaType:X})=>X?W$.str`"${$}" keyword must be ${X} ($data)`:W$.str`"${$}" keyword is invalid ($data)`};function EZ($,X=uH.keywordError,J,Q){let{it:z}=$,{gen:Y,compositeRule:W,allErrors:G}=z,U=hH($,X,J);if(Q!==null&&Q!==void 0?Q:W||G)gH(Y,U);else yH(z,W$._`[${U}]`)}uH.reportError=EZ;function vZ($,X=uH.keywordError,J){let{it:Q}=$,{gen:z,compositeRule:Y,allErrors:W}=Q,G=hH($,X,J);if(gH(z,G),!(Y||W))yH(Q,r$.default.vErrors)}uH.reportExtraError=vZ;function CZ($,X){$.assign(r$.default.errors,X),$.if(W$._`${r$.default.vErrors} !== null`,()=>$.if(X,()=>$.assign(W$._`${r$.default.vErrors}.length`,X),()=>$.assign(r$.default.vErrors,null)))}uH.resetErrorsCount=CZ;function kZ({gen:$,keyword:X,schemaValue:J,data:Q,errsCount:z,it:Y}){if(z===void 0)throw Error("ajv implementation error");let W=$.name("err");$.forRange("i",z,r$.default.errors,(G)=>{if($.const(W,W$._`${r$.default.vErrors}[${G}]`),$.if(W$._`${W}.instancePath === undefined`,()=>$.assign(W$._`${W}.instancePath`,(0,W$.strConcat)(r$.default.instancePath,Y.errorPath))),$.assign(W$._`${W}.schemaPath`,W$.str`${Y.errSchemaPath}/${X}`),Y.opts.verbose)$.assign(W$._`${W}.schema`,J),$.assign(W$._`${W}.data`,Q)})}uH.extendErrors=kZ;function gH($,X){let J=$.const("err",X);$.if(W$._`${r$.default.vErrors} === null`,()=>$.assign(r$.default.vErrors,W$._`[${J}]`),W$._`${r$.default.vErrors}.push(${J})`),$.code(W$._`${r$.default.errors}++`)}function yH($,X){let{gen:J,validateName:Q,schemaEnv:z}=$;if(z.$async)J.throw(W$._`new ${$.ValidationError}(${X})`);else J.assign(W$._`${Q}.errors`,X),J.return(!1)}var M1={keyword:new W$.Name("keyword"),schemaPath:new W$.Name("schemaPath"),params:new W$.Name("params"),propertyName:new W$.Name("propertyName"),message:new W$.Name("message"),schema:new W$.Name("schema"),parentSchema:new W$.Name("parentSchema")};function hH($,X,J){let{createErrors:Q}=$.it;if(Q===!1)return W$._`{}`;return _Z($,X,J)}function _Z($,X,J={}){let{gen:Q,it:z}=$,Y=[xZ(z,J),TZ($,J)];return fZ($,X,Y),Q.object(...Y)}function xZ({errorPath:$},{instancePath:X}){let J=X?W$.str`${$}${(0,VQ.getErrorPath)(X,VQ.Type.Str)}`:$;return[r$.default.instancePath,(0,W$.strConcat)(r$.default.instancePath,J)]}function TZ({keyword:$,it:{errSchemaPath:X}},{schemaPath:J,parentSchema:Q}){let z=Q?X:W$.str`${X}/${$}`;if(J)z=W$.str`${z}${(0,VQ.getErrorPath)(J,VQ.Type.Str)}`;return[M1.schemaPath,z]}function fZ($,{params:X,message:J},Q){let{keyword:z,data:Y,schemaValue:W,it:G}=$,{opts:U,propertyName:w,topSchemaRef:K,schemaPath:N}=G;if(Q.push([M1.keyword,z],[M1.params,typeof X=="function"?X($):X||W$._`{}`]),U.messages)Q.push([M1.message,typeof J=="function"?J($):J]);if(U.verbose)Q.push([M1.schema,W],[M1.parentSchema,W$._`${K}${N}`],[r$.default.data,Y]);if(w)Q.push([M1.propertyName,w])}});var nH=x((cH)=>{Object.defineProperty(cH,"__esModule",{value:!0});cH.boolOrEmptySchema=cH.topBoolOrEmptySchema=void 0;var lZ=N8(),mZ=s(),cZ=N6(),iZ={message:"boolean schema is false"};function nZ($){let{gen:X,schema:J,validateName:Q}=$;if(J===!1)mH($,!1);else if(typeof J=="object"&&J.$async===!0)X.return(cZ.default.data);else X.assign(mZ._`${Q}.errors`,null),X.return(!0)}cH.topBoolOrEmptySchema=nZ;function pZ($,X){let{gen:J,schema:Q}=$;if(Q===!1)J.var(X,!1),mH($);else J.var(X,!0)}cH.boolOrEmptySchema=pZ;function mH($,X){let{gen:J,data:Q}=$,z={gen:J,keyword:"false schema",data:Q,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,lZ.reportError)(z,iZ,void 0,X)}});var SG=x((pH)=>{Object.defineProperty(pH,"__esModule",{value:!0});pH.getRules=pH.isJSONType=void 0;var rZ=["string","number","integer","boolean","null","object","array"],oZ=new Set(rZ);function tZ($){return typeof $=="string"&&oZ.has($)}pH.isJSONType=tZ;function aZ(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}pH.getRules=aZ});var RG=x((tH)=>{Object.defineProperty(tH,"__esModule",{value:!0});tH.shouldUseRule=tH.shouldUseGroup=tH.schemaHasRulesForType=void 0;function eZ({schema:$,self:X},J){let Q=X.RULES.types[J];return Q&&Q!==!0&&rH($,Q)}tH.schemaHasRulesForType=eZ;function rH($,X){return X.rules.some((J)=>oH($,J))}tH.shouldUseGroup=rH;function oH($,X){var J;return $[X.keyword]!==void 0||((J=X.definition.implements)===null||J===void 0?void 0:J.some((Q)=>$[Q]!==void 0))}tH.shouldUseRule=oH});var V8=x((XO)=>{Object.defineProperty(XO,"__esModule",{value:!0});XO.reportTypeError=XO.checkDataTypes=XO.checkDataType=XO.coerceAndCheckDataType=XO.getJSONTypes=XO.getSchemaTypes=XO.DataType=void 0;var JS=SG(),zS=RG(),QS=N8(),a=s(),sH=Y$(),R0;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(R0||(XO.DataType=R0={}));function YS($){let X=eH($.type);if(X.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!X.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)X.push("null")}return X}XO.getSchemaTypes=YS;function eH($){let X=Array.isArray($)?$:$?[$]:[];if(X.every(JS.isJSONType))return X;throw Error("type must be JSONType or JSONType[]: "+X.join(","))}XO.getJSONTypes=eH;function WS($,X){let{gen:J,data:Q,opts:z}=$,Y=GS(X,z.coerceTypes),W=X.length>0&&!(Y.length===0&&X.length===1&&(0,zS.schemaHasRulesForType)($,X[0]));if(W){let G=vG(X,Q,z.strictNumbers,R0.Wrong);J.if(G,()=>{if(Y.length)US($,X,Y);else CG($)})}return W}XO.coerceAndCheckDataType=WS;var $O=new Set(["string","number","integer","boolean","null"]);function GS($,X){return X?$.filter((J)=>$O.has(J)||X==="array"&&J==="array"):[]}function US($,X,J){let{gen:Q,data:z,opts:Y}=$,W=Q.let("dataType",a._`typeof ${z}`),G=Q.let("coerced",a._`undefined`);if(Y.coerceTypes==="array")Q.if(a._`${W} == 'object' && Array.isArray(${z}) && ${z}.length == 1`,()=>Q.assign(z,a._`${z}[0]`).assign(W,a._`typeof ${z}`).if(vG(X,z,Y.strictNumbers),()=>Q.assign(G,z)));Q.if(a._`${G} !== undefined`);for(let w of J)if($O.has(w)||w==="array"&&Y.coerceTypes==="array")U(w);Q.else(),CG($),Q.endIf(),Q.if(a._`${G} !== undefined`,()=>{Q.assign(z,G),wS($,G)});function U(w){switch(w){case"string":Q.elseIf(a._`${W} == "number" || ${W} == "boolean"`).assign(G,a._`"" + ${z}`).elseIf(a._`${z} === null`).assign(G,a._`""`);return;case"number":Q.elseIf(a._`${W} == "boolean" || ${z} === null
6
6
  || (${W} == "string" && ${z} && ${z} == +${z})`).assign(G,a._`+${z}`);return;case"integer":Q.elseIf(a._`${W} === "boolean" || ${z} === null
package/manifest.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
- "version": "2.1.145",
3
- "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
- "buildDate": "2026-05-19T01:56:17Z",
2
+ "version": "2.1.146",
3
+ "commit": "c900a8c71aa966a1a8bf14c49139d87fac9ae881",
4
+ "buildDate": "2026-05-20T01:57:57Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "368dcd9709c85534f673071e7cc8eb5422bcff367fb9bdf5ce25d9619aab7ef5",
9
- "size": 208546464
8
+ "checksum": "b16f466a2213a04cecf1ad958201655148a49f42952134e6ae182257ccfc08f3",
9
+ "size": 211056288
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "c23dc566214279d0708f4212261f023d8e63d5af5aef91638ebfdc090b3e33de",
14
- "size": 211044112
13
+ "checksum": "6bc14f45e28ea6c8c34220c88327bb72a38c5f978b9aa44d0cb34375cbf78837",
14
+ "size": 213570448
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "75ad61d690d79440c82b5841444e1b42caae55736af37c97dd0e068ef20ce390",
19
- "size": 233944712
18
+ "checksum": "af25334c7a2632a531b34e3f4c0d69763b997149d31d5f0d748e44813758806f",
19
+ "size": 236435080
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "b3ffbc12689bfe81389d6577787fcea4cab81bd3b6bba9b719e73770b62d720e",
24
- "size": 234022608
23
+ "checksum": "825d5301380f1f5f466c5268de25a062927be658938fc1d630cfa02c521b8185",
24
+ "size": 236512976
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "3a73f058b2225a4210931362bc9c98e486e3362ca28b339281755737fb375c7c",
29
- "size": 226799448
28
+ "checksum": "256703637576ef323b8f87695b81e65a7bdc66327f1512dacc9257b7896e7a0f",
29
+ "size": 229289816
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "cfc95961a41329204405c4b0e257cb467821133eb7bdb1ca0866dfe789d5d442",
34
- "size": 228416560
33
+ "checksum": "e8ab94b1ffb9d9213134d4addfe5d3fe6fd10c524aa2927667e543ac165a7242",
34
+ "size": 230906928
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "1da511cee5d3a4968634174498e9148635a5908d7f6ea5ec91b04d531c20c3bc",
39
- "size": 229910176
38
+ "checksum": "b585bbaf085554757b627e5ed87aa5c153abb90ef408fb43b0311453b72e8bc2",
39
+ "size": 232326816
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "b6b920c757e08ff3e4f0dc211360ad7815db539d4915bb691e57ee4d34db31e5",
44
- "size": 225875616
43
+ "checksum": "159488363d937bbac11c55364246513f677e94e681d7431e1622336250091c00",
44
+ "size": 228292256
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.145",
3
- "commit": "daa4c3755d45ab0cf97bb41db8c03bd2dfd2ff5f",
4
- "buildDate": "2026-05-19T02:03:37Z",
2
+ "version": "2.1.146",
3
+ "commit": "c900a8c71aa966a1a8bf14c49139d87fac9ae881",
4
+ "buildDate": "2026-05-20T02:05:27Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "7bedcf3a0a6e2f79b3b0008e7a056984a47a30747cc4ef988dd6d7095cff5c2c",
9
- "size": 43195831,
8
+ "checksum": "36a21463866a850a146ea03a506123424d9ea6a5b8f105b83993466e6c626d98",
9
+ "size": 43693790,
10
10
  "bundle": {
11
- "checksum": "815e4f3505e2b005a9510a9427846b5fe55cf0702aa838eb293315133ea3376f",
12
- "size": 43200202
11
+ "checksum": "d388a11849a8f2576733c572ce55bd4fea25d465b36af4efd85f3e510121d87c",
12
+ "size": 43694485
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "3ba937418f3f2e2155b45e330d2f5d75f09bceb6e3cefc3a6b314e6c806f05e6",
18
- "size": 45109754,
17
+ "checksum": "d50073947f829a3d1cb7a21efff4f035bd6938852ac7b8c30c4aeacac8830329",
18
+ "size": 45615774,
19
19
  "bundle": {
20
- "checksum": "c936efab1b00100fb114c2a82c79ac23b9948610adc26b99579ef65606a717ef",
21
- "size": 45119954
20
+ "checksum": "29c340be5c3255da0cf0f1af126c461a51251d0d6defce7e764ecc5fdb0d884d",
21
+ "size": 45619469
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "7bffc295920723dd531ff9937f6dd6e953ac52051d643df69d5aa29cd7d87584",
27
- "size": 50982967
26
+ "checksum": "84bd9dd9e85cacaec55dcfd28ec49e05131c3cc0244d906804559cb73cb731e6",
27
+ "size": 51446658
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "5ba6f8e411bd4aa8a967818a5deece65e74ea2c99bb08adf20554070ebdff6db",
32
- "size": 51607210
31
+ "checksum": "8c6c61ca6fc7fafb4936de6a40815bf5d440ddedb477800510f2a2cf7a1595dc",
32
+ "size": 52071854
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "1e6e9ddba6e57144b3700a318f944308bfe0887db7c50445e2dc4c912a7b1c20",
37
- "size": 49605775
36
+ "checksum": "ecd65f1abe5a6b889f81f9e28a572d3e7186dac90ce9fb1deaf8cc97bb33e5a4",
37
+ "size": 50095507
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "a14758fa127cc8d02df3f63146e8e6b819252ee3f8618095ab26e6b703b3042e",
42
- "size": 50320268
41
+ "checksum": "23a02176f38c45ce93440ee4aea6009d614fb7020ce98bb95fe034c1c0d27701",
42
+ "size": 50779496
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "2e359b72a4e8a74e6c2059bd469fb9a7ecc73427f3666ad3b748fd86e01e58a4",
47
- "size": 52313300
46
+ "checksum": "5d0cf87f8a331f98397f8a5608e77d5e453ae02c8ee4f6774d91a0755f9e7570",
47
+ "size": 52800733
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "86c1464594dafb9126204a9d853610ba67d85cecdcdbee222e76ec6e8f01c070",
52
- "size": 50612912
51
+ "checksum": "efebea1875409013c62dfe783d6c24590ca7944e69ff33f08ad9a3e169bdddcd",
52
+ "size": 51081079
53
53
  }
54
54
  }
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.145",
3
+ "version": "0.3.146",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -61,14 +61,14 @@
61
61
  "zod": "^4.0.0"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.145",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.145",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.145",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.145",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.145",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.145",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.145",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.145"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.146",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.146",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.146",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.146",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.146",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.146",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.146",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.146"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -86,5 +86,5 @@
86
86
  "manifest.json",
87
87
  "manifest.zst.json"
88
88
  ],
89
- "claudeCodeVersion": "2.1.145"
89
+ "claudeCodeVersion": "2.1.146"
90
90
  }
package/sdk-tools.d.ts CHANGED
@@ -314,7 +314,7 @@ export interface AgentInput {
314
314
  /**
315
315
  * Permission mode for spawned teammate (e.g., "plan" to require plan approval).
316
316
  */
317
- mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
317
+ mode?: "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan" | "bubble";
318
318
  /**
319
319
  * Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
320
320
  */
package/sdk.d.ts CHANGED
@@ -1871,6 +1871,9 @@ export declare type Options = {
1871
1871
  * spawnClaudeCodeProcess: (options) => {
1872
1872
  * // Custom spawn logic for VM execution
1873
1873
  * // options contains: command, args, cwd, env, signal
1874
+ * // `signal` is forwarded — it aborts only AFTER the SDK's
1875
+ * // stdin-EOF + ~2 s grace window, so passing it to spawn()/your
1876
+ * // VM API is safe (force-kill fires after the graceful chance).
1874
1877
  * return myVMProcess; // Must satisfy SpawnedProcess interface
1875
1878
  * }
1876
1879
  * ```
@@ -5498,7 +5501,28 @@ export declare interface SpawnOptions {
5498
5501
  env: {
5499
5502
  [envVar: string]: string | undefined;
5500
5503
  };
5501
- /** Abort signal for cancellation */
5504
+ /**
5505
+ * Abort signal for cancellation.
5506
+ *
5507
+ * This is a **forwarded** signal owned by `ProcessTransport`, not the
5508
+ * caller's `Options.abortController.signal` directly. It aborts only
5509
+ * after the SDK's graceful-close path has run: stdin EOF →
5510
+ * `GRACEFUL_EXIT_TIMEOUT_MS` (~2 s) grace window. Anything you hang on
5511
+ * it (Node `spawn({signal})` → `child.kill()`, VM/container teardown,
5512
+ * fetch cancellation) fires **after** the child has had a chance to
5513
+ * shut down cleanly via stdin close.
5514
+ *
5515
+ * Why: passing the caller's raw signal to Node `spawn()` registers
5516
+ * Node's own abort listener that calls `child.kill()` — on Windows
5517
+ * that's `TerminateProcess` (instant, uncatchable), and AbortSignal
5518
+ * listeners fire synchronously in registration order, so it would race
5519
+ * ahead of the SDK's stdin-EOF + grace path and the CLI's
5520
+ * `gracefulShutdown` would never run.
5521
+ *
5522
+ * If you need the caller's *immediate* signal (no grace), it's the
5523
+ * `AbortController` you passed to `Options.abortController` — capture
5524
+ * it in closure.
5525
+ */
5502
5526
  signal: AbortSignal;
5503
5527
  }
5504
5528