@anthropic-ai/claude-agent-sdk 0.3.169 → 0.3.170
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/assistant.mjs +118 -118
- package/bridge.mjs +2 -2
- package/browser-sdk.js +1 -1
- package/manifest.json +19 -19
- package/manifest.zst.json +23 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +1 -1
- package/sdk.d.ts +66 -9
- package/sdk.mjs +2 -2
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.
|
|
3
|
+
// Version: 0.3.170
|
|
4
4
|
var yI=Object.create;var{getPrototypeOf:_I,defineProperty:Bd,getOwnPropertyNames:vI}=Object;var bI=Object.prototype.hasOwnProperty;function SI(e){return this[e]}var xI,kI,Dy=(e,t,r)=>{var o=e!=null&&typeof e==="object";if(o){var n=t?xI??=new WeakMap:kI??=new WeakMap,i=n.get(e);if(i)return i}r=e!=null?yI(_I(e)):{};let s=t||!e||!e.__esModule?Bd(r,"default",{value:e,enumerable:!0}):r;for(let a of vI(e))if(!bI.call(s,a))Bd(s,a,{get:SI.bind(e,a),enumerable:!0});if(o)n.set(e,s);return s};var M=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var wI=(e)=>e;function $I(e,t){this[e]=wI.bind(null,t)}var hr=(e,t)=>{for(var r in t)Bd(e,r,{get:t[r],enumerable:!0,configurable:!0,set:$I.bind(t,r)})};var TI=(e,t)=>()=>(e&&(t=e(e=0)),t);var Br=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),II=Symbol.dispose||Symbol.for("Symbol.dispose"),PI=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),be=(e,t,r)=>{if(t!=null){if(typeof t!=="object"&&typeof t!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var o;if(r)o=t[PI];if(o===void 0)o=t[II];if(typeof o!=="function")throw TypeError("Object not disposable");e.push([r,o,t])}else if(r)e.push([r]);return t},Se=(e,t,r)=>{var o=typeof SuppressedError==="function"?SuppressedError:function(s,a,c,u){return u=Error(c),u.name="SuppressedError",u.error=s,u.suppressed=a,u},n=(s)=>t=r?new o(s,t,"An error was suppressed during disposal"):(r=!0,s),i=(s)=>{while(s=e.pop())try{var a=s[1]&&s[1].call(s[2]);if(s[0])return Promise.resolve(a).then(i,(c)=>(n(c),i()))}catch(c){n(c)}if(r)throw t};return i()};var Wr={};hr(Wr,{sep:()=>Qd,resolve:()=>Wt,relative:()=>b_,posix:()=>T_,parse:()=>w_,normalize:()=>Jd,join:()=>qt,isAbsolute:()=>Xd,format:()=>k_,extname:()=>x_,dirname:()=>Vr,delimiter:()=>$_,default:()=>X0,basename:()=>Yd,_makeLong:()=>S_});function Lt(e){if(typeof e!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function v_(e,t){var r="",o=0,n=-1,i=0,s;for(var a=0;a<=e.length;++a){if(a<e.length)s=e.charCodeAt(a);else if(s===47)break;else s=47;if(s===47){if(n===a-1||i===1);else if(n!==a-1&&i===2){if(r.length<2||o!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){if(c===-1)r="",o=0;else r=r.slice(0,c),o=r.length-1-r.lastIndexOf("/");n=a,i=0;continue}}else if(r.length===2||r.length===1){r="",o=0,n=a,i=0;continue}}if(t){if(r.length>0)r+="/..";else r="..";o=2}}else{if(r.length>0)r+="/"+e.slice(n+1,a);else r=e.slice(n+1,a);o=a-n-1}n=a,i=0}else if(s===46&&i!==-1)++i;else i=-1}return r}function J0(e,t){var r=t.dir||t.root,o=t.base||(t.name||"")+(t.ext||"");if(!r)return o;if(r===t.root)return r+o;return r+e+o}function Wt(){var e="",t=!1,r;for(var o=arguments.length-1;o>=-1&&!t;o--){var n;if(o>=0)n=arguments[o];else{if(r===void 0)r=process.cwd();n=r}if(Lt(n),n.length===0)continue;e=n+"/"+e,t=n.charCodeAt(0)===47}if(e=v_(e,!t),t)if(e.length>0)return"/"+e;else return"/";else if(e.length>0)return e;else return"."}function Jd(e){if(Lt(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;if(e=v_(e,!t),e.length===0&&!t)e=".";if(e.length>0&&r)e+="/";if(t)return"/"+e;return e}function Xd(e){return Lt(e),e.length>0&&e.charCodeAt(0)===47}function qt(){if(arguments.length===0)return".";var e;for(var t=0;t<arguments.length;++t){var r=arguments[t];if(Lt(r),r.length>0)if(e===void 0)e=r;else e+="/"+r}if(e===void 0)return".";return Jd(e)}function b_(e,t){if(Lt(e),Lt(t),e===t)return"";if(e=Wt(e),t=Wt(t),e===t)return"";var r=1;for(;r<e.length;++r)if(e.charCodeAt(r)!==47)break;var o=e.length,n=o-r,i=1;for(;i<t.length;++i)if(t.charCodeAt(i)!==47)break;var s=t.length,a=s-i,c=n<a?n:a,u=-1,l=0;for(;l<=c;++l){if(l===c){if(a>c){if(t.charCodeAt(i+l)===47)return t.slice(i+l+1);else if(l===0)return t.slice(i+l)}else if(n>c){if(e.charCodeAt(r+l)===47)u=l;else if(l===0)u=0}break}var d=e.charCodeAt(r+l),m=t.charCodeAt(i+l);if(d!==m)break;else if(d===47)u=l}var p="";for(l=r+u+1;l<=o;++l)if(l===o||e.charCodeAt(l)===47)if(p.length===0)p+="..";else p+="/..";if(p.length>0)return p+t.slice(i+u);else{if(i+=u,t.charCodeAt(i)===47)++i;return t.slice(i)}}function S_(e){return e}function Vr(e){if(Lt(e),e.length===0)return".";var t=e.charCodeAt(0),r=t===47,o=-1,n=!0;for(var i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!n){o=i;break}}else n=!1;if(o===-1)return r?"/":".";if(r&&o===1)return"//";return e.slice(0,o)}function Yd(e,t){if(t!==void 0&&typeof t!=="string")throw TypeError('"ext" argument must be a string');Lt(e);var r=0,o=-1,n=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(c===47){if(!n){r=i+1;break}}else{if(a===-1)n=!1,a=i+1;if(s>=0)if(c===t.charCodeAt(s)){if(--s===-1)o=i}else s=-1,o=a}}if(r===o)o=a;else if(o===-1)o=e.length;return e.slice(r,o)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!n){r=i+1;break}}else if(o===-1)n=!1,o=i+1;if(o===-1)return"";return e.slice(r,o)}}function x_(e){Lt(e);var t=-1,r=0,o=-1,n=!0,i=0;for(var s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!n){r=s+1;break}continue}if(o===-1)n=!1,o=s+1;if(a===46){if(t===-1)t=s;else if(i!==1)i=1}else if(t!==-1)i=-1}if(t===-1||o===-1||i===0||i===1&&t===o-1&&t===r+1)return"";return e.slice(t,o)}function k_(e){if(e===null||typeof e!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return J0("/",e)}function w_(e){Lt(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),o=r===47,n;if(o)t.root="/",n=1;else n=0;var i=-1,s=0,a=-1,c=!0,u=e.length-1,l=0;for(;u>=n;--u){if(r=e.charCodeAt(u),r===47){if(!c){s=u+1;break}continue}if(a===-1)c=!1,a=u+1;if(r===46){if(i===-1)i=u;else if(l!==1)l=1}else if(i!==-1)l=-1}if(i===-1||a===-1||l===0||l===1&&i===a-1&&i===s+1){if(a!==-1)if(s===0&&o)t.base=t.name=e.slice(1,a);else t.base=t.name=e.slice(s,a)}else{if(s===0&&o)t.name=e.slice(1,i),t.base=e.slice(1,a);else t.name=e.slice(s,i),t.base=e.slice(s,a);t.ext=e.slice(i,a)}if(s>0)t.dir=e.slice(0,s-1);else if(o)t.dir="/";return t}var Qd="/",$_=":",T_,X0;var Tt=TI(()=>{T_=((e)=>(e.posix=e,e))({resolve:Wt,normalize:Jd,isAbsolute:Xd,join:qt,relative:b_,_makeLong:S_,dirname:Vr,basename:Yd,extname:x_,format:k_,parse:w_,sep:Qd,delimiter:$_,win32:null,posix:null}),X0=T_});var fa=M((Tx)=>{Object.defineProperty(Tx,"__esModule",{value:!0});Tx.regexpCode=Tx.getEsmExportName=Tx.getProperty=Tx.safeStringify=Tx.stringify=Tx.strConcat=Tx.addCodeArg=Tx.str=Tx._=Tx.nil=Tx._Code=Tx.Name=Tx.IDENTIFIER=Tx._CodeOrName=void 0;class ad{}Tx._CodeOrName=ad;Tx.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Po extends ad{constructor(e){super();if(!Tx.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Tx.Name=Po;class Mt extends ad{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Po)t[r.str]=(t[r.str]||0)+1;return t},{})}}Tx._Code=Mt;Tx.nil=new Mt("");function wx(e,...t){let r=[e[0]],o=0;while(o<t.length)wg(r,t[o]),r.push(e[++o]);return new Mt(r)}Tx._=wx;var kg=new Mt("+");function $x(e,...t){let r=[ma(e[0])],o=0;while(o<t.length)r.push(kg),wg(r,t[o]),r.push(kg,ma(e[++o]));return GM(r),new Mt(r)}Tx.str=$x;function wg(e,t){if(t instanceof Mt)e.push(...t._items);else if(t instanceof Po)e.push(t);else e.push(YM(t))}Tx.addCodeArg=wg;function GM(e){let t=1;while(t<e.length-1){if(e[t]===kg){let r=JM(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function JM(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Po||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Po))return`"${e}${t.slice(1)}`;return}function XM(e,t){return t.emptyStr()?e:e.emptyStr()?t:$x`${e}${t}`}Tx.strConcat=XM;function YM(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ma(Array.isArray(e)?e.join(","):e)}function QM(e){return new Mt(ma(e))}Tx.stringify=QM;function ma(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Tx.safeStringify=ma;function ez(e){return typeof e=="string"&&Tx.IDENTIFIER.test(e)?new Mt(`.${e}`):wx`[${e}]`}Tx.getProperty=ez;function tz(e){if(typeof e=="string"&&Tx.IDENTIFIER.test(e))return new Mt(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Tx.getEsmExportName=tz;function rz(e){return new Mt(e.toString())}Tx.regexpCode=rz});var Pg=M((Rx)=>{Object.defineProperty(Rx,"__esModule",{value:!0});Rx.ValueScope=Rx.ValueScopeName=Rx.Scope=Rx.varKinds=Rx.UsedValueState=void 0;var rt=fa();class Px extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var ud;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ud||(Rx.UsedValueState=ud={}));Rx.varKinds={const:new rt.Name("const"),let:new rt.Name("let"),var:new rt.Name("var")};class Tg{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof rt.Name?e:this.name(e)}name(e){return new rt.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Rx.Scope=Tg;class Ig extends rt.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=rt._`.${new rt.Name(t)}[${r}]`}}Rx.ValueScopeName=Ig;var hz=rt._`\n`;class Ex extends Tg{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?hz:rt.nil}}get(){return this._scope}name(e){return new Ig(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:n}=o,i=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[n];if(s){let u=s.get(i);if(u)return u}else s=this._values[n]=new Map;s.set(i,o);let a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,o.setValue(t,{property:n,itemIndex:c}),o}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return rt._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(o)=>{if(o.value===void 0)throw Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,r)}_reduceValues(e,t,r={},o){let n=rt.nil;for(let i in e){let s=e[i];if(!s)continue;let a=r[i]=r[i]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,ud.Started);let u=t(c);if(u){let l=this.opts.es5?Rx.varKinds.var:Rx.varKinds.const;n=rt._`${n}${l} ${c} = ${u};${this.opts._n}`}else if(u=o===null||o===void 0?void 0:o(c))n=rt._`${n}${u}${this.opts._n}`;else throw new Px(c);a.set(c,ud.Completed)})}return n}}Rx.ValueScope=Ex});var Y=M((nt)=>{Object.defineProperty(nt,"__esModule",{value:!0});nt.or=nt.and=nt.not=nt.CodeGen=nt.operators=nt.varKinds=nt.ValueScopeName=nt.ValueScope=nt.Scope=nt.Name=nt.regexpCode=nt.stringify=nt.getProperty=nt.nil=nt.strConcat=nt.str=nt._=void 0;var oe=fa(),zt=Pg(),Dr=fa();Object.defineProperty(nt,"_",{enumerable:!0,get:function(){return Dr._}});Object.defineProperty(nt,"str",{enumerable:!0,get:function(){return Dr.str}});Object.defineProperty(nt,"strConcat",{enumerable:!0,get:function(){return Dr.strConcat}});Object.defineProperty(nt,"nil",{enumerable:!0,get:function(){return Dr.nil}});Object.defineProperty(nt,"getProperty",{enumerable:!0,get:function(){return Dr.getProperty}});Object.defineProperty(nt,"stringify",{enumerable:!0,get:function(){return Dr.stringify}});Object.defineProperty(nt,"regexpCode",{enumerable:!0,get:function(){return Dr.regexpCode}});Object.defineProperty(nt,"Name",{enumerable:!0,get:function(){return Dr.Name}});var hd=Pg();Object.defineProperty(nt,"Scope",{enumerable:!0,get:function(){return hd.Scope}});Object.defineProperty(nt,"ValueScope",{enumerable:!0,get:function(){return hd.ValueScope}});Object.defineProperty(nt,"ValueScopeName",{enumerable:!0,get:function(){return hd.ValueScopeName}});Object.defineProperty(nt,"varKinds",{enumerable:!0,get:function(){return hd.varKinds}});nt.operators={GT:new oe._Code(">"),GTE:new oe._Code(">="),LT:new oe._Code("<"),LTE:new oe._Code("<="),EQ:new oe._Code("==="),NEQ:new oe._Code("!=="),NOT:new oe._Code("!"),OR:new oe._Code("||"),AND:new oe._Code("&&"),ADD:new oe._Code("+")};class jr{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Ox extends jr{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?zt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Ro(this.rhs,e,t);return this}get names(){return this.rhs instanceof oe._CodeOrName?this.rhs.names:{}}}class Cg extends jr{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof oe.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Ro(this.rhs,e,t),this}get names(){let e=this.lhs instanceof oe.Name?{}:{...this.lhs.names};return fd(e,this.rhs)}}class Ax extends Cg{constructor(e,t,r,o){super(e,r,o);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Mx extends jr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class zx extends jr{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Nx extends jr{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class Dx extends jr{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Ro(this.code,e,t),this}get names(){return this.code instanceof oe._CodeOrName?this.code.names:{}}}class gd extends jr{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,o=r.length;while(o--){let n=r[o];if(n.optimizeNames(e,t))continue;vz(e,n.names),r.splice(o,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Sn(e,t.names),{})}}class Ur extends gd{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class jx extends gd{}class ha extends Ur{}ha.kind="else";class dr extends Ur{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ha(r):r}if(t){if(e===!1)return t instanceof dr?t:t.nodes;if(this.nodes.length)return this;return new dr(Zx(e),t instanceof dr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Ro(this.condition,e,t),this}get names(){let e=super.names;if(fd(e,this.condition),this.else)Sn(e,this.else.names);return e}}dr.kind="if";class Eo extends Ur{}Eo.kind="for";class Ux extends Eo{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Ro(this.iteration,e,t),this}get names(){return Sn(super.names,this.iteration.names)}}class Fx extends Eo{constructor(e,t,r,o){super();this.varKind=e,this.name=t,this.from=r,this.to=o}render(e){let t=e.es5?zt.varKinds.var:this.varKind,{name:r,from:o,to:n}=this;return`for(${t} ${r}=${o}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){let e=fd(super.names,this.from);return fd(e,this.to)}}class Eg extends Eo{constructor(e,t,r,o){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Ro(this.iterable,e,t),this}get names(){return Sn(super.names,this.iterable.names)}}class ld extends Ur{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}ld.kind="func";class dd extends gd{render(e){return"return "+super.render(e)}}dd.kind="return";class Lx extends Ur{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,o;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(o=this.finally)===null||o===void 0||o.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Sn(e,this.catch.names);if(this.finally)Sn(e,this.finally.names);return e}}class pd extends Ur{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}pd.kind="catch";class md extends Ur{render(e){return"finally"+super.render(e)}}md.kind="finally";class qx{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
5
5
|
`:""},this._extScope=e,this._scope=new zt.Scope({parent:e}),this._nodes=[new jx]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,o){let n=this._scope.toName(t);if(r!==void 0&&o)this._constants[n.str]=r;return this._leafNode(new Ox(e,n,r)),n}const(e,t,r){return this._def(zt.varKinds.const,e,t,r)}let(e,t,r){return this._def(zt.varKinds.let,e,t,r)}var(e,t,r){return this._def(zt.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Cg(e,t,r))}add(e,t){return this._leafNode(new Ax(e,nt.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==oe.nil)this._leafNode(new Dx(e));return this}object(...e){let t=["{"];for(let[r,o]of e){if(t.length>1)t.push(",");if(t.push(r),r!==o||this.opts.es5)t.push(":"),(0,oe.addCodeArg)(t,o)}return t.push("}"),new oe._Code(t)}if(e,t,r){if(this._blockNode(new dr(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new dr(e))}else(){return this._elseNode(new ha)}endIf(){return this._endBlockNode(dr,ha)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Ux(e),t)}forRange(e,t,r,o,n=this.opts.es5?zt.varKinds.var:zt.varKinds.let){let i=this._scope.toName(e);return this._for(new Fx(n,i,t,r),()=>o(i))}forOf(e,t,r,o=zt.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let i=t instanceof oe.Name?t:this.var("_arr",t);return this.forRange("_i",0,oe._`${i}.length`,(s)=>{this.var(n,oe._`${i}[${s}]`),r(n)})}return this._for(new Eg("of",o,n,t),()=>r(n))}forIn(e,t,r,o=this.opts.es5?zt.varKinds.var:zt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,oe._`Object.keys(${t})`,r);let n=this._scope.toName(e);return this._for(new Eg("in",o,n,t),()=>r(n))}endFor(){return this._endBlockNode(Eo)}label(e){return this._leafNode(new Mx(e))}break(e){return this._leafNode(new zx(e))}return(e){let t=new dd;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(dd)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let o=new Lx;if(this._blockNode(o),this.code(e),t){let n=this.name("e");this._currNode=o.catch=new pd(n),t(n)}if(r)this._currNode=o.finally=new md,this.code(r);return this._endBlockNode(pd,md)}throw(e){return this._leafNode(new Nx(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=oe.nil,r,o){if(this._blockNode(new ld(e,t,r)),o)this.code(o).endFunc();return this}endFunc(){return this._endBlockNode(ld)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof dr))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}nt.CodeGen=qx;function Sn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function fd(e,t){return t instanceof oe._CodeOrName?Sn(e,t.names):e}function Ro(e,t,r){if(e instanceof oe.Name)return o(e);if(!n(e))return e;return new oe._Code(e._items.reduce((i,s)=>{if(s instanceof oe.Name)s=o(s);if(s instanceof oe._Code)i.push(...s._items);else i.push(s);return i},[]));function o(i){let s=r[i.str];if(s===void 0||t[i.str]!==1)return i;return delete t[i.str],s}function n(i){return i instanceof oe._Code&&i._items.some((s)=>s instanceof oe.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function vz(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Zx(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:oe._`!${Rg(e)}`}nt.not=Zx;var bz=Hx(nt.operators.AND);function Sz(...e){return e.reduce(bz)}nt.and=Sz;var xz=Hx(nt.operators.OR);function kz(...e){return e.reduce(xz)}nt.or=kz;function Hx(e){return(t,r)=>t===oe.nil?r:r===oe.nil?t:oe._`${Rg(t)} ${e} ${Rg(r)}`}function Rg(e){return e instanceof oe.Name?e:oe._`(${e})`}});var ie=M((Qx)=>{Object.defineProperty(Qx,"__esModule",{value:!0});Qx.checkStrictMode=Qx.getErrorPath=Qx.Type=Qx.useFunc=Qx.setEvaluated=Qx.evaluatedPropsToName=Qx.mergeEvaluated=Qx.eachItem=Qx.unescapeJsonPointer=Qx.escapeJsonPointer=Qx.escapeFragment=Qx.unescapeFragment=Qx.schemaRefOrVal=Qx.schemaHasRulesButRef=Qx.schemaHasRules=Qx.checkUnknownRules=Qx.alwaysValidSchema=Qx.toHash=void 0;var he=Y(),Iz=fa();function Pz(e){let t={};for(let r of e)t[r]=!0;return t}Qx.toHash=Pz;function Ez(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return Wx(e,t),!Gx(t,e.self.RULES.all)}Qx.alwaysValidSchema=Ez;function Wx(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let n=o.RULES.keywords;for(let i in t)if(!n[i])Yx(e,`unknown keyword: "${i}"`)}Qx.checkUnknownRules=Wx;function Gx(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Qx.schemaHasRules=Gx;function Rz(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Qx.schemaHasRulesButRef=Rz;function Cz({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return he._`${r}`}return he._`${e}${t}${(0,he.getProperty)(o)}`}Qx.schemaRefOrVal=Cz;function Oz(e){return Jx(decodeURIComponent(e))}Qx.unescapeFragment=Oz;function Az(e){return encodeURIComponent(Ag(e))}Qx.escapeFragment=Az;function Ag(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Qx.escapeJsonPointer=Ag;function Jx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Qx.unescapeJsonPointer=Jx;function Mz(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Qx.eachItem=Mz;function Kx({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,s,a)=>{let c=s===void 0?i:s instanceof he.Name?(i instanceof he.Name?e(n,i,s):t(n,i,s),s):i instanceof he.Name?(t(n,s,i),i):r(i,s);return a===he.Name&&!(c instanceof he.Name)?o(n,c):c}}Qx.mergeEvaluated={props:Kx({mergeNames:(e,t,r)=>e.if(he._`${r} !== true && ${t} !== undefined`,()=>{e.if(he._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,he._`${r} || {}`).code(he._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(he._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,he._`${r} || {}`),Mg(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Xx}),items:Kx({mergeNames:(e,t,r)=>e.if(he._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,he._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(he._`${r} !== true`,()=>e.assign(r,t===!0?!0:he._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Xx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",he._`{}`);if(t!==void 0)Mg(e,r,t);return r}Qx.evaluatedPropsToName=Xx;function Mg(e,t,r){Object.keys(r).forEach((o)=>e.assign(he._`${t}${(0,he.getProperty)(o)}`,!0))}Qx.setEvaluated=Mg;var Vx={};function zz(e,t){return e.scopeValue("func",{ref:t,code:Vx[t.code]||(Vx[t.code]=new Iz._Code(t.code))})}Qx.useFunc=zz;var Og;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Og||(Qx.Type=Og={}));function Nz(e,t,r){if(e instanceof he.Name){let o=t===Og.Num;return r?o?he._`"[" + ${e} + "]"`:he._`"['" + ${e} + "']"`:o?he._`"/" + ${e}`:he._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(e).toString():"/"+Ag(e)}Qx.getErrorPath=Nz;function Yx(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}Qx.checkStrictMode=Yx});var pr=M((tk)=>{Object.defineProperty(tk,"__esModule",{value:!0});var Be=Y(),eN={data:new Be.Name("data"),valCxt:new Be.Name("valCxt"),instancePath:new Be.Name("instancePath"),parentData:new Be.Name("parentData"),parentDataProperty:new Be.Name("parentDataProperty"),rootData:new Be.Name("rootData"),dynamicAnchors:new Be.Name("dynamicAnchors"),vErrors:new Be.Name("vErrors"),errors:new Be.Name("errors"),this:new Be.Name("this"),self:new Be.Name("self"),scope:new Be.Name("scope"),json:new Be.Name("json"),jsonPos:new Be.Name("jsonPos"),jsonLen:new Be.Name("jsonLen"),jsonPart:new Be.Name("jsonPart")};tk.default=eN});var ga=M((ik)=>{Object.defineProperty(ik,"__esModule",{value:!0});ik.extendErrors=ik.resetErrorsCount=ik.reportExtraError=ik.reportError=ik.keyword$DataError=ik.keywordError=void 0;var se=Y(),_d=ie(),Ge=pr();ik.keywordError={message:({keyword:e})=>se.str`must pass "${e}" keyword validation`};ik.keyword$DataError={message:({keyword:e,schemaType:t})=>t?se.str`"${e}" keyword must be ${t} ($data)`:se.str`"${e}" keyword is invalid ($data)`};function rN(e,t=ik.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,c=ok(e,t,r);if(o!==null&&o!==void 0?o:s||a)rk(i,c);else nk(n,se._`[${c}]`)}ik.reportError=rN;function nN(e,t=ik.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:s}=o,a=ok(e,t,r);if(rk(n,a),!(i||s))nk(o,Ge.default.vErrors)}ik.reportExtraError=nN;function oN(e,t){e.assign(Ge.default.errors,t),e.if(se._`${Ge.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(se._`${Ge.default.vErrors}.length`,t),()=>e.assign(Ge.default.vErrors,null)))}ik.resetErrorsCount=oN;function iN({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,Ge.default.errors,(a)=>{if(e.const(s,se._`${Ge.default.vErrors}[${a}]`),e.if(se._`${s}.instancePath === undefined`,()=>e.assign(se._`${s}.instancePath`,(0,se.strConcat)(Ge.default.instancePath,i.errorPath))),e.assign(se._`${s}.schemaPath`,se.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(se._`${s}.schema`,r),e.assign(se._`${s}.data`,o)})}ik.extendErrors=iN;function rk(e,t){let r=e.const("err",t);e.if(se._`${Ge.default.vErrors} === null`,()=>e.assign(Ge.default.vErrors,se._`[${r}]`),se._`${Ge.default.vErrors}.push(${r})`),e.code(se._`${Ge.default.errors}++`)}function nk(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;if(n.$async)r.throw(se._`new ${e.ValidationError}(${t})`);else r.assign(se._`${o}.errors`,t),r.return(!1)}var xn={keyword:new se.Name("keyword"),schemaPath:new se.Name("schemaPath"),params:new se.Name("params"),propertyName:new se.Name("propertyName"),message:new se.Name("message"),schema:new se.Name("schema"),parentSchema:new se.Name("parentSchema")};function ok(e,t,r){let{createErrors:o}=e.it;if(o===!1)return se._`{}`;return sN(e,t,r)}function sN(e,t,r={}){let{gen:o,it:n}=e,i=[aN(n,r),cN(e,r)];return uN(e,t,i),o.object(...i)}function aN({errorPath:e},{instancePath:t}){let r=t?se.str`${e}${(0,_d.getErrorPath)(t,_d.Type.Str)}`:e;return[Ge.default.instancePath,(0,se.strConcat)(Ge.default.instancePath,r)]}function cN({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:se.str`${t}/${e}`;if(r)n=se.str`${n}${(0,_d.getErrorPath)(r,_d.Type.Str)}`;return[xn.schemaPath,n]}function uN(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;if(o.push([xn.keyword,n],[xn.params,typeof t=="function"?t(e):t||se._`{}`]),c.messages)o.push([xn.message,typeof r=="function"?r(e):r]);if(c.verbose)o.push([xn.schema,s],[xn.parentSchema,se._`${l}${d}`],[Ge.default.data,i]);if(u)o.push([xn.propertyName,u])}});var lk=M((ck)=>{Object.defineProperty(ck,"__esModule",{value:!0});ck.boolOrEmptySchema=ck.topBoolOrEmptySchema=void 0;var fN=ga(),hN=Y(),gN=pr(),yN={message:"boolean schema is false"};function _N(e){let{gen:t,schema:r,validateName:o}=e;if(r===!1)ak(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(gN.default.data);else t.assign(hN._`${o}.errors`,null),t.return(!0)}ck.topBoolOrEmptySchema=_N;function vN(e,t){let{gen:r,schema:o}=e;if(o===!1)r.var(t,!1),ak(e);else r.var(t,!0)}ck.boolOrEmptySchema=vN;function ak(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,fN.reportError)(n,yN,void 0,t)}});var Ng=M((dk)=>{Object.defineProperty(dk,"__esModule",{value:!0});dk.getRules=dk.isJSONType=void 0;var SN=["string","number","integer","boolean","null","object","array"],xN=new Set(SN);function kN(e){return typeof e=="string"&&xN.has(e)}dk.isJSONType=kN;function wN(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}dk.getRules=wN});var Dg=M((hk)=>{Object.defineProperty(hk,"__esModule",{value:!0});hk.shouldUseRule=hk.shouldUseGroup=hk.schemaHasRulesForType=void 0;function TN({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&mk(e,o)}hk.schemaHasRulesForType=TN;function mk(e,t){return t.rules.some((r)=>fk(e,r))}hk.shouldUseGroup=mk;function fk(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((o)=>e[o]!==void 0))}hk.shouldUseRule=fk});var ya=M((bk)=>{Object.defineProperty(bk,"__esModule",{value:!0});bk.reportTypeError=bk.checkDataTypes=bk.checkDataType=bk.coerceAndCheckDataType=bk.getJSONTypes=bk.getSchemaTypes=bk.DataType=void 0;var EN=Ng(),RN=Dg(),CN=ga(),X=Y(),yk=ie(),Co;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Co||(bk.DataType=Co={}));function ON(e){let t=_k(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}bk.getSchemaTypes=ON;function _k(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(EN.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}bk.getJSONTypes=_k;function AN(e,t){let{gen:r,data:o,opts:n}=e,i=MN(t,n.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,RN.schemaHasRulesForType)(e,t[0]));if(s){let a=Ug(t,o,n.strictNumbers,Co.Wrong);r.if(a,()=>{if(i.length)zN(e,t,i);else Fg(e)})}return s}bk.coerceAndCheckDataType=AN;var vk=new Set(["string","number","integer","boolean","null"]);function MN(e,t){return t?e.filter((r)=>vk.has(r)||t==="array"&&r==="array"):[]}function zN(e,t,r){let{gen:o,data:n,opts:i}=e,s=o.let("dataType",X._`typeof ${n}`),a=o.let("coerced",X._`undefined`);if(i.coerceTypes==="array")o.if(X._`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,X._`${n}[0]`).assign(s,X._`typeof ${n}`).if(Ug(t,n,i.strictNumbers),()=>o.assign(a,n)));o.if(X._`${a} !== undefined`);for(let u of r)if(vk.has(u)||u==="array"&&i.coerceTypes==="array")c(u);o.else(),Fg(e),o.endIf(),o.if(X._`${a} !== undefined`,()=>{o.assign(n,a),NN(e,a)});function c(u){switch(u){case"string":o.elseIf(X._`${s} == "number" || ${s} == "boolean"`).assign(a,X._`"" + ${n}`).elseIf(X._`${n} === null`).assign(a,X._`""`);return;case"number":o.elseIf(X._`${s} == "boolean" || ${n} === null
|
|
6
6
|
|| (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,X._`+${n}`);return;case"integer":o.elseIf(X._`${s} === "boolean" || ${n} === null
|
package/manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-06-
|
|
2
|
+
"version": "2.1.170",
|
|
3
|
+
"commit": "1cda84def004ef3a8f569f8e8284a153a6b98c3a",
|
|
4
|
+
"buildDate": "2026-06-09T15:22:30Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "e903646d8b7a31882a80ecd27569a27d8ac57b3708745f349709632c84117fdf",
|
|
9
|
+
"size": 222102816
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
12
|
"binary": "claude",
|
|
13
|
-
"checksum": "
|
|
14
|
-
"size":
|
|
13
|
+
"checksum": "914f23a70bbed5d9ae567e3e04b86206ed9971b371bc9baca3f79c8885bfddb4",
|
|
14
|
+
"size": 224616976
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"binary": "claude",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "1bb9d032440a75532f7dd4cafbc687f220aaf16c63eba17e192dfbec2f04bd25",
|
|
19
|
+
"size": 247379592
|
|
20
20
|
},
|
|
21
21
|
"linux-x64": {
|
|
22
22
|
"binary": "claude",
|
|
23
|
-
"checksum": "
|
|
24
|
-
"size":
|
|
23
|
+
"checksum": "849e007277a0442ab27570d3e3d6d43787507946590e8dd1947e5a39b7081f9e",
|
|
24
|
+
"size": 247469776
|
|
25
25
|
},
|
|
26
26
|
"linux-arm64-musl": {
|
|
27
27
|
"binary": "claude",
|
|
28
|
-
"checksum": "
|
|
29
|
-
"size":
|
|
28
|
+
"checksum": "73154fd674aaf233254edea8fbfb6a53d82d5297ae7546b998e36983def4dddc",
|
|
29
|
+
"size": 240234328
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
32
|
"binary": "claude",
|
|
33
|
-
"checksum": "
|
|
34
|
-
"size":
|
|
33
|
+
"checksum": "5d19b7c91a03182ccb69da249f721684aebecfa4c52fe46b9205a81d8fc64a47",
|
|
34
|
+
"size": 241863728
|
|
35
35
|
},
|
|
36
36
|
"win32-x64": {
|
|
37
37
|
"binary": "claude.exe",
|
|
38
|
-
"checksum": "
|
|
39
|
-
"size":
|
|
38
|
+
"checksum": "193061508fe619abf534b2c9d48151f26971d1d5b8460ad75c0af4be3d3525fb",
|
|
39
|
+
"size": 242929824
|
|
40
40
|
},
|
|
41
41
|
"win32-arm64": {
|
|
42
42
|
"binary": "claude.exe",
|
|
43
|
-
"checksum": "
|
|
44
|
-
"size":
|
|
43
|
+
"checksum": "9abd330bcc191aecc877a8ee9da2b448852cfe3bda15e5e4608385ea1d9d1709",
|
|
44
|
+
"size": 238894240
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"commit": "
|
|
4
|
-
"buildDate": "2026-06-
|
|
2
|
+
"version": "2.1.170",
|
|
3
|
+
"commit": "1cda84def004ef3a8f569f8e8284a153a6b98c3a",
|
|
4
|
+
"buildDate": "2026-06-09T15:24:16Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin-arm64": {
|
|
7
7
|
"binary": "claude.zst",
|
|
8
|
-
"checksum": "
|
|
9
|
-
"size":
|
|
8
|
+
"checksum": "5b710d5fdc5f32d20ad6f0be1c774cac30a790b47ffbab8ca8dd47bba6988fcf",
|
|
9
|
+
"size": 45639007,
|
|
10
10
|
"bundle": {
|
|
11
|
-
"checksum": "
|
|
12
|
-
"size":
|
|
11
|
+
"checksum": "ab5825cf9eff1cf5de79324e4725d52b30b870513eb44dfc39440ecf3f16c1ae",
|
|
12
|
+
"size": 45646762
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "1deee31fef3b351b96f1a47a0eede87871fb8ebc543f00a1198dcfdf1d60802a",
|
|
18
|
+
"size": 47557780,
|
|
19
19
|
"bundle": {
|
|
20
|
-
"checksum": "
|
|
21
|
-
"size":
|
|
20
|
+
"checksum": "6ef22a77501c630d5d0328d65405f371ff43fe6d93717d4b75bdfd690220f0ef",
|
|
21
|
+
"size": 47568410
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"linux-arm64": {
|
|
25
25
|
"binary": "claude.zst",
|
|
26
|
-
"checksum": "
|
|
27
|
-
"size":
|
|
26
|
+
"checksum": "8ad3da80e89f00fedb80216c652775eae50daebdc5fa5c56e892fdec55f25937",
|
|
27
|
+
"size": 53311093
|
|
28
28
|
},
|
|
29
29
|
"linux-x64": {
|
|
30
30
|
"binary": "claude.zst",
|
|
31
|
-
"checksum": "
|
|
32
|
-
"size":
|
|
31
|
+
"checksum": "9da4443a307f9d5b731d8df15a3b238cc2c306e5708c274293d2bee2a5ab9aac",
|
|
32
|
+
"size": 53921266
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
35
|
"binary": "claude.zst",
|
|
36
|
-
"checksum": "
|
|
37
|
-
"size":
|
|
36
|
+
"checksum": "c10605119a27e0d0895b4c51172891b6eca8837d4d160eea0323c76754b5513d",
|
|
37
|
+
"size": 51934316
|
|
38
38
|
},
|
|
39
39
|
"linux-x64-musl": {
|
|
40
40
|
"binary": "claude.zst",
|
|
41
|
-
"checksum": "
|
|
42
|
-
"size":
|
|
41
|
+
"checksum": "8e5eb050f326496a4729f0d2bd9ff3f718bbeecbf35bc4df709bce77034bfd39",
|
|
42
|
+
"size": 52653467
|
|
43
43
|
},
|
|
44
44
|
"win32-x64": {
|
|
45
45
|
"binary": "claude.exe.zst",
|
|
46
|
-
"checksum": "
|
|
47
|
-
"size":
|
|
46
|
+
"checksum": "b5346325dd053578694e8ea4a401b863348d586cd7aeb43506c81ba1c7651049",
|
|
47
|
+
"size": 54661611
|
|
48
48
|
},
|
|
49
49
|
"win32-arm64": {
|
|
50
50
|
"binary": "claude.exe.zst",
|
|
51
|
-
"checksum": "
|
|
52
|
-
"size":
|
|
51
|
+
"checksum": "1ae429d218861943aa221fe98e18ba0227f88d899bfb60b4b54a7745b847410e",
|
|
52
|
+
"size": 52936449
|
|
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.
|
|
3
|
+
"version": "0.3.170",
|
|
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.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
67
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
68
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
69
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
70
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
71
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.170",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.170",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.170",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.170",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.170",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.170",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.170",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.170"
|
|
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.
|
|
89
|
+
"claudeCodeVersion": "2.1.170"
|
|
90
90
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -318,7 +318,7 @@ export interface AgentInput {
|
|
|
318
318
|
/**
|
|
319
319
|
* Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent.
|
|
320
320
|
*/
|
|
321
|
-
model?: "sonnet" | "opus" | "haiku";
|
|
321
|
+
model?: "sonnet" | "opus" | "haiku" | "fable";
|
|
322
322
|
/**
|
|
323
323
|
* Set to true to run this agent in the background. You will be notified when it completes.
|
|
324
324
|
*/
|
package/sdk.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare type AgentDefinition = {
|
|
|
53
53
|
*/
|
|
54
54
|
prompt: string;
|
|
55
55
|
/**
|
|
56
|
-
* Model alias (e.g. '
|
|
56
|
+
* Model alias (e.g. 'fable', 'opus', 'sonnet', 'haiku') or full model ID (e.g. 'claude-fable-5'). If omitted or 'inherit', uses the main model
|
|
57
57
|
*/
|
|
58
58
|
model?: string;
|
|
59
59
|
mcpServers?: AgentMcpServerSpec[];
|
|
@@ -413,6 +413,7 @@ declare namespace coreTypes {
|
|
|
413
413
|
SDKMessageOrigin,
|
|
414
414
|
SDKMessage,
|
|
415
415
|
SDKMirrorErrorMessage,
|
|
416
|
+
SDKModelRefusalFallbackMessage,
|
|
416
417
|
SDKNotificationMessage,
|
|
417
418
|
SDKPartialAssistantMessage,
|
|
418
419
|
SDKPermissionDenial,
|
|
@@ -537,7 +538,7 @@ export declare function deleteSession(_sessionId: string, _options?: SessionMuta
|
|
|
537
538
|
* - `'low'` — Minimal thinking, fastest responses
|
|
538
539
|
* - `'medium'` — Moderate thinking
|
|
539
540
|
* - `'high'` — Deep reasoning (default)
|
|
540
|
-
* - `'xhigh'` — Deeper than high (Opus 4.7+; falls back to `'high'` elsewhere)
|
|
541
|
+
* - `'xhigh'` — Deeper than high (Fable 5, Opus 4.7+; falls back to `'high'` elsewhere)
|
|
541
542
|
* - `'max'` — Maximum effort (select models only)
|
|
542
543
|
*/
|
|
543
544
|
export declare type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
@@ -1518,7 +1519,28 @@ export declare type Options = {
|
|
|
1518
1519
|
* park deadline.
|
|
1519
1520
|
*/
|
|
1520
1521
|
onUserDialog?: OnUserDialog;
|
|
1521
|
-
|
|
1522
|
+
/**
|
|
1523
|
+
* Dialog kinds this consumer's `onUserDialog` can actually render
|
|
1524
|
+
* (`request_user_dialog` `dialog_kind` values, e.g.
|
|
1525
|
+
* 'refusal_fallback_prompt'). Declare only kinds your UI genuinely
|
|
1526
|
+
* displays and answers. Providing `onUserDialog` alone does NOT opt the
|
|
1527
|
+
* consumer into receiving dialogs — the CLI only emits a dialog kind
|
|
1528
|
+
* declared here.
|
|
1529
|
+
*
|
|
1530
|
+
* The CLI fails closed on absence: a dialog kind not declared here is
|
|
1531
|
+
* never emitted to this session — the flow behind it degrades to its
|
|
1532
|
+
* no-dialog behavior instead (for 'refusal_fallback_prompt', the classic
|
|
1533
|
+
* refusal error message ends the turn). Omitting the option entirely
|
|
1534
|
+
* means no dialogs are emitted, even with `onUserDialog` wired.
|
|
1535
|
+
*
|
|
1536
|
+
* Requires `onUserDialog`; passing a non-empty list without the callback
|
|
1537
|
+
* throws at option intake. On multi-client (remote) sessions the first
|
|
1538
|
+
* attached client's declaration wins for the worker's lifetime, and the
|
|
1539
|
+
* winning declaration is persisted to worker metadata so it survives
|
|
1540
|
+
* worker restarts (restored as a default that the next epoch's first
|
|
1541
|
+
* explicit declaration overrides).
|
|
1542
|
+
*/
|
|
1543
|
+
supportedDialogKinds?: string[];
|
|
1522
1544
|
/**
|
|
1523
1545
|
* When false, disables session persistence to disk. Sessions will not be
|
|
1524
1546
|
* saved to ~/.claude/projects/ and cannot be resumed later. Useful for
|
|
@@ -1599,8 +1621,8 @@ export declare type Options = {
|
|
|
1599
1621
|
* - `'low'` — Minimal thinking, fastest responses
|
|
1600
1622
|
* - `'medium'` — Moderate thinking
|
|
1601
1623
|
* - `'high'` — Deep reasoning (default)
|
|
1602
|
-
* - `'xhigh'` — Deeper than high (Opus 4.7+)
|
|
1603
|
-
* - `'max'` — Maximum effort (Opus 4.6+, Sonnet 4.6)
|
|
1624
|
+
* - `'xhigh'` — Deeper than high (Fable 5, Opus 4.7+)
|
|
1625
|
+
* - `'max'` — Maximum effort (Fable 5, Opus 4.6+, Sonnet 4.6)
|
|
1604
1626
|
*
|
|
1605
1627
|
* @see https://docs.anthropic.com/en/docs/build-with-claude/effort
|
|
1606
1628
|
*/
|
|
@@ -1651,7 +1673,7 @@ export declare type Options = {
|
|
|
1651
1673
|
mcpServers?: Record<string, McpServerConfig>;
|
|
1652
1674
|
/**
|
|
1653
1675
|
* Claude model to use. Defaults to the CLI default model.
|
|
1654
|
-
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-8'
|
|
1676
|
+
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-8', 'claude-fable-5'
|
|
1655
1677
|
*/
|
|
1656
1678
|
model?: string;
|
|
1657
1679
|
/**
|
|
@@ -2675,7 +2697,10 @@ export declare type SDKAssistantMessage = {
|
|
|
2675
2697
|
uuid: UUID;
|
|
2676
2698
|
session_id: string;
|
|
2677
2699
|
request_id?: string;
|
|
2678
|
-
|
|
2700
|
+
/**
|
|
2701
|
+
* Wire uuids of previously-delivered messages that this message replaces (refusal-fallback supersede). The list can include tombstoned tool_result frames from the refused leg, not only assistant frames. Evict the named messages on arrival and treat this frame as their canonical replacement. Idempotent with the end-of-turn model_refusal_fallback notice, whose retracted_message_uuids remains the complete audit record for the turn.
|
|
2702
|
+
*/
|
|
2703
|
+
supersedes?: UUID[];
|
|
2679
2704
|
/**
|
|
2680
2705
|
* Subagent type that produced this message.
|
|
2681
2706
|
*/
|
|
@@ -3193,7 +3218,10 @@ declare type SDKControlInitializeRequest = {
|
|
|
3193
3218
|
promptSuggestions?: boolean;
|
|
3194
3219
|
agentProgressSummaries?: boolean;
|
|
3195
3220
|
forwardSubagentText?: boolean;
|
|
3196
|
-
|
|
3221
|
+
/**
|
|
3222
|
+
* Dialog kinds (request_user_dialog `dialog_kind` values) this consumer's onUserDialog can actually render. The CLI treats ABSENCE as 'cannot display' and fails closed: without the kind declared here, a dialog-gated flow degrades to its no-dialog behavior (for 'refusal_fallback_prompt', the classic refusal error) instead of parking a dialog the consumer may mishandle. First-attached-client-wins on multi-client sessions; later initializes do not change it.
|
|
3223
|
+
*/
|
|
3224
|
+
supportedDialogKinds?: string[];
|
|
3197
3225
|
};
|
|
3198
3226
|
|
|
3199
3227
|
/**
|
|
@@ -3620,7 +3648,7 @@ export declare type SDKMemoryRecallMessage = {
|
|
|
3620
3648
|
session_id: string;
|
|
3621
3649
|
};
|
|
3622
3650
|
|
|
3623
|
-
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3651
|
+
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKModelRefusalFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage;
|
|
3624
3652
|
|
|
3625
3653
|
/**
|
|
3626
3654
|
* Provenance of a user-role message (peer session, team lead, channel). Absent or `human` means keyboard input from the user.
|
|
@@ -3658,6 +3686,34 @@ export declare type SDKMirrorErrorMessage = {
|
|
|
3658
3686
|
session_id: string;
|
|
3659
3687
|
};
|
|
3660
3688
|
|
|
3689
|
+
/**
|
|
3690
|
+
* Emitted when the primary model ends the stream with stop_reason "refusal" and the turn is retried once on a fallback model with the swap made persistent for the session (direction: "retry"). "revert" and "sticky" are retained in the enum for SDK-consumer compat and are no longer emitted.
|
|
3691
|
+
*/
|
|
3692
|
+
export declare type SDKModelRefusalFallbackMessage = {
|
|
3693
|
+
type: 'system';
|
|
3694
|
+
subtype: 'model_refusal_fallback';
|
|
3695
|
+
trigger: 'refusal';
|
|
3696
|
+
direction: 'retry' | 'revert' | 'sticky';
|
|
3697
|
+
original_model: string;
|
|
3698
|
+
fallback_model: string;
|
|
3699
|
+
request_id: string | null;
|
|
3700
|
+
/**
|
|
3701
|
+
* stop_details.category from the refused API response ("cyber", "bio", …). Open string — new categories ship on the wire ahead of schema updates. null when the response carried no category (normal, not an error). Absent when emitted by an older CLI.
|
|
3702
|
+
*/
|
|
3703
|
+
api_refusal_category?: string | null;
|
|
3704
|
+
/**
|
|
3705
|
+
* stop_details.explanation from the refused API response. Unstable human prose — display only, never parse. null/absent under the same rules as api_refusal_category.
|
|
3706
|
+
*/
|
|
3707
|
+
api_refusal_explanation?: string | null;
|
|
3708
|
+
/**
|
|
3709
|
+
* Wire uuids of the messages this fallback retracted — the refused partial as the consumer received it (one uuid per normalized SDK message; multi-block messages carry per-block derived uuids) plus any tombstoned tool_results. Emitted AFTER the retraction, so this is a resolution-time eviction signal: remove these messages from transcript state on receipt. Eviction is idempotent — unknown or already-removed uuids are a no-op. Absent when emitted by an older CLI.
|
|
3710
|
+
*/
|
|
3711
|
+
retracted_message_uuids?: string[];
|
|
3712
|
+
content: string;
|
|
3713
|
+
uuid: UUID;
|
|
3714
|
+
session_id: string;
|
|
3715
|
+
};
|
|
3716
|
+
|
|
3661
3717
|
/**
|
|
3662
3718
|
* Loop-side text notification. Mirrors the interactive REPL notification queue (key/priority/timeout). JSX notifications are not emitted on this channel.
|
|
3663
3719
|
*/
|
|
@@ -3778,6 +3834,7 @@ export declare type SDKRateLimitInfo = {
|
|
|
3778
3834
|
overageResetsAt?: number;
|
|
3779
3835
|
overageDisabledReason?: 'overage_not_provisioned' | 'org_level_disabled' | 'org_level_disabled_until' | 'out_of_credits' | 'seat_tier_level_disabled' | 'member_level_disabled' | 'seat_tier_zero_credit_limit' | 'group_zero_credit_limit' | 'member_zero_credit_limit' | 'org_service_level_disabled' | 'no_limits_configured' | 'fetch_error' | 'unknown';
|
|
3780
3836
|
isUsingOverage?: boolean;
|
|
3837
|
+
overageInUse?: boolean;
|
|
3781
3838
|
surpassedThreshold?: number;
|
|
3782
3839
|
};
|
|
3783
3840
|
|