@robota-sdk/agent-cli 3.0.0-beta.79 → 3.0.0-beta.81

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.
Files changed (56) hide show
  1. package/README.md +740 -55
  2. package/dist/node/bin.js +3 -406
  3. package/dist/node/bounded-output-DpjpS98g-DFgAppgl.js +2 -0
  4. package/dist/node/bounded-output-DpjpS98g-DFgAppgl.js.map +1 -0
  5. package/dist/node/bounded-output-DpjpS98g-DoRuRGhV.js +2 -0
  6. package/dist/node/bounded-output-DpjpS98g-yPybHprY.cjs +1 -0
  7. package/dist/node/cli-core-Bah38oug.js +2795 -0
  8. package/dist/node/command-executor-DV-H2oD6-BfKoGoFw.js +2 -0
  9. package/dist/node/command-executor-DV-H2oD6-OKy8pwYH.js +2 -0
  10. package/dist/node/command-executor-DV-H2oD6-OKy8pwYH.js.map +1 -0
  11. package/dist/node/command-executor-DV-H2oD6-iQAXtTLY.cjs +1 -0
  12. package/dist/node/headless.js +4 -0
  13. package/dist/node/http-executor-cWzI2svn-C7F17ZGz.cjs +1 -0
  14. package/dist/node/http-executor-cWzI2svn-TG_TMYKh.js +2 -0
  15. package/dist/node/http-executor-cWzI2svn-TG_TMYKh.js.map +1 -0
  16. package/dist/node/http-executor-cWzI2svn-Ype0naht.js +2 -0
  17. package/dist/node/index.cjs +2641 -251
  18. package/dist/node/index.d.cts +3421 -0
  19. package/dist/node/index.d.cts.map +1 -0
  20. package/dist/node/index.d.ts +3412 -5
  21. package/dist/node/index.d.ts.map +1 -1
  22. package/dist/node/index.js +2641 -251
  23. package/dist/node/index.js.map +1 -1
  24. package/dist/node/node-2-nrieFn.js +2 -0
  25. package/dist/node/node-2-nrieFn.js.map +1 -0
  26. package/dist/node/node-C-hnFnOP.js +67 -0
  27. package/dist/node/node-CFTax5Wl.cjs +1 -0
  28. package/dist/node/node-CJnrbkAS.js +14 -0
  29. package/dist/node/node-CJnrbkAS.js.map +1 -0
  30. package/dist/node/node-ChG9Tg1I.js +2 -0
  31. package/dist/node/node-DDl02brx.cjs +66 -0
  32. package/dist/node/node-DIRGC_1P.js +67 -0
  33. package/dist/node/node-DIRGC_1P.js.map +1 -0
  34. package/dist/node/node-OBnZskvR.cjs +1 -0
  35. package/dist/node/node-bJ0lEuNF.js +2 -0
  36. package/dist/node/node-bJ0lEuNF.js.map +1 -0
  37. package/dist/node/node-tf433Aey.cjs +13 -0
  38. package/dist/node/node-uwhEt6sT.js +14 -0
  39. package/dist/node/rolldown-runtime-C9xYM0wc.js +1 -0
  40. package/dist/node/rolldown-runtime-DK3Fl9T5-BIInC43l.cjs +1 -0
  41. package/dist/node/rolldown-runtime-DK3Fl9T5-BeX3Bzvn.js +2 -0
  42. package/dist/node/rolldown-runtime-DK3Fl9T5-DK3Fl9T5.js +2 -0
  43. package/dist/node/rolldown-runtime-DK3Fl9T5-DK3Fl9T5.js.map +1 -0
  44. package/dist/node/rolldown-runtime-rs7quPpn.js +2 -0
  45. package/dist/node/verdict-decoder-Dk_w2NG9-BKWMtxp8.js +2 -0
  46. package/dist/node/verdict-decoder-Dk_w2NG9-Bka7Cldj.js +2 -0
  47. package/dist/node/verdict-decoder-Dk_w2NG9-Bka7Cldj.js.map +1 -0
  48. package/dist/node/verdict-decoder-Dk_w2NG9-DNTeVdQ8.cjs +1 -0
  49. package/dist/web/assets/index-8_Slbxe7.css +1 -0
  50. package/dist/web/assets/index-Cgu5C1kn.js +77 -0
  51. package/dist/web/index.html +3 -3
  52. package/package.json +106 -39
  53. package/dist/node/bin.d.ts +0 -2
  54. package/dist/node/bin.js.map +0 -1
  55. package/dist/web/assets/index-DiahfakU.css +0 -2
  56. package/dist/web/assets/index-LMW0IDmj.js +0 -37
@@ -0,0 +1,2 @@
1
+ var e=class extends Error{context;constructor(e,t){super(e),this.context=t,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}},t=class extends e{code=`CONFIGURATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t){super(`Configuration Error: ${e}`,t)}},n=class extends e{field;code=`VALIDATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Validation Error: ${e}`,n),this.field=t}},r=class extends e{issues;attempts;code=`STRUCTURED_OUTPUT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Structured Output Error: ${e}`,r),this.issues=t,this.attempts=n}},i=class extends e{provider;originalError;code=`PROVIDER_ERROR`;category=`provider`;recoverable=!0;status;type;constructor(e,t,n,r,i){super(`Provider Error (${t}): ${e}`,r),this.provider=t,this.originalError=n,i?.status!==void 0&&(this.status=i.status),i?.type!==void 0&&(this.type=i.type)}},a=class extends e{provider;code=`AUTHENTICATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Authentication Error: ${e}`,n),this.provider=t}},o=class extends e{retryAfter;provider;code=`RATE_LIMIT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Rate Limit Error: ${e}`,r),this.retryAfter=t,this.provider=n}},s=class extends e{originalError;code=`NETWORK_ERROR`;category=`system`;recoverable=!0;constructor(e,t,n){super(`Network Error: ${e}`,n),this.originalError=t}},c=class extends e{toolName;originalError;code=`TOOL_EXECUTION_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n,r){super(`Tool Execution Error (${t}): ${e}`,r),this.toolName=t,this.originalError=n}},l=class extends e{toolName;callCount;maxSameToolInputs;code=`SAME_TOOL_INPUT_LOOP`;category=`system`;recoverable=!0;constructor(e,t,n,r){super(`Tool "${e}" was called with identical input ${t} times, past the maxSameToolInputs limit of ${n} — stopping the turn to break the loop`,r),this.toolName=e,this.callCount=t,this.maxSameToolInputs=n}},u=class extends e{availableModels;code=`MODEL_NOT_AVAILABLE`;category=`user`;recoverable=!1;constructor(e,t,n,r){super(`Model "${e}" is not available for provider "${t}"`,r),this.availableModels=n}},d=class extends e{pluginName;code=`PLUGIN_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n){super(`Plugin Error (${t}): ${e}`,n),this.pluginName=t}},f=class extends e{code=`CACHE_INTEGRITY_ERROR`;category=`system`;recoverable=!1;constructor(e,t){super(`Cache Integrity Error: ${e}`,t)}},p=class extends e{executable;code=`UNSUPPORTED_SHELL`;category=`user`;recoverable=!1;constructor(e){super(`Unsupported shell executable: ${e}`,{executable:e}),this.executable=e}};function m(e){return e===`darwin`?'Host OS: macOS (POSIX, BSD userland). Use BSD-flavored utilities: `sed -i ""` needs an empty backup arg, `date`/`grep`/`stat` flags differ from GNU. Prefer portable POSIX flags; avoid Linux/GNU-only options.':e===`linux`?"Host OS: Linux (POSIX, usually GNU coreutils, but distro/user setup varies). Prefer portable POSIX flags; do not assume a specific distro, and probe with `command -v` before relying on a non-standard tool.":`Host OS: ${e}; active shell family: POSIX sh/bash. Write portable POSIX syntax and avoid host-specific flags.`}function h(e,t){let n=v(e)===`bash`?`bash`:`sh`;return{command:e,kind:n,platform:t,commandArgs:e=>[`-c`,e],interactiveArgs:[],label:`${n} on ${t}`,syntaxHint:m(t)}}function g(e,t){return{command:e,kind:`powershell`,platform:t,commandArgs:e=>[`-NoProfile`,`-Command`,e],interactiveArgs:[`-NoProfile`],label:`PowerShell on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: PowerShell. Write PowerShell syntax (not bash): e.g. \`Get-ChildItem\` not \`ls -la\`, \`\$env:VAR\` not \`\$VAR\`.`}}function _(e,t){return{command:e,kind:`cmd`,platform:t,commandArgs:e=>[`/d`,`/s`,`/c`,e],interactiveArgs:[],label:`cmd.exe on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: Windows cmd.exe. Write cmd.exe syntax.`}}function v(e){return(e.split(/[\\/]/).at(-1)?.toLowerCase()??``).replace(/\.exe$/i,``)}function y(e,t){switch(v(e)){case`sh`:case`bash`:return h(e,t);case`powershell`:case`pwsh`:return g(e,t);case`cmd`:return _(e,t);default:throw new p(e)}}function b(e){let t=e?.trim();return t===void 0||t.length===0?void 0:t}function x(e={}){let t=e.env??process.env,n=e.platform??process.platform,r=b(e.executable);return r===void 0?n===`win32`?g(`powershell.exe`,n):h(b(t.SHELL)??`/bin/sh`,n):y(r,n)}const S=/^(?!0{32}$)[0-9a-f]{32}$/,C=/^(?!0{16}$)[0-9a-f]{16}$/;function w(e){return e.replaceAll(`-`,``).slice(0,16)}const T=w;function E(e){return C.test(e)}function D(e,t){if(!(!S.test(e)||!C.test(t)))return`00-${e}-${t}-01`}function O(e,t){if(e.allowedOrigins.length===0)return;let n=D(e.traceId,w(t));if(n!==void 0)return{traceparent:n,allowedOrigins:[...e.allowedOrigins]}}function k(e,t){return O(e,t)}function A(e,t,n){if(t?.subprocessClasses?.includes(e)!==!0)return;let r=D(t.traceId,n);return r===void 0?void 0:{TRACEPARENT:r}}function j(e,t,n={}){if(t===void 0||n.TRACEPARENT!==void 0)return{...e,...n};let{TRACESTATE:r,...i}=e;return{...i,...t,...n}}function M(e,t){if(e===void 0||t===void 0)return{};let n;try{n=new URL(e).origin}catch{return{}}return n===`null`||!t.allowedOrigins.includes(n)?{}:{traceparent:t.traceparent}}const N=e=>`\n…[output truncated: ${e} byte(s) dropped]`;function P(e){let t=e.retain??`head`,n=e.truncationMarker??N,r=Math.max(0,Math.floor(e.maxBytes)),i=new TextEncoder,a=[],o=0,s=0,c=e=>{let t=r-o;if(t<=0)return;let n=e.byteLength<=t?e:e.subarray(0,t);a.push(n),o+=n.byteLength},l=e=>{let t=e.byteLength<=r?e:e.subarray(e.byteLength-r);for(a.push(t),o+=t.byteLength;o>r&&a.length>0;){let e=a[0],t=o-r;e.byteLength<=t?(a.shift(),o-=e.byteLength):(a[0]=e.subarray(t),o-=t)}};return{append(e){let n=typeof e==`string`?i.encode(e):e;s+=n.byteLength,t===`head`?c(n):l(n)},get retainedBytes(){return o},get totalBytes(){return s},get droppedBytes(){return s-o},get truncated(){return s>o},toString(){let e=new Uint8Array(o),r=0;for(let t of a)e.set(t,r),r+=t.byteLength;a=a.length>1?[e]:a;let i=new TextDecoder().decode(e);if(s<=o)return i;let c=n(s-o);return t===`head`?`${i}${c}`:`${c.replace(/^\n/,``)}\n${i}`}}}export{u as C,t as S,f as _,P as a,r as b,E as c,c as d,e as f,l as g,k as h,w as i,M as l,i as m,x as n,A as o,d as p,T as r,j as s,O as t,a as u,n as v,s as x,o as y};
2
+ //# sourceMappingURL=bounded-output-DpjpS98g-DFgAppgl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bounded-output-DpjpS98g-DFgAppgl.js","names":[],"sources":["../../../agent-core/dist/node/bounded-output-DpjpS98g.js"],"sourcesContent":["var e=class extends Error{context;constructor(e,t){super(e),this.context=t,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}},t=class extends e{code=`CONFIGURATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t){super(`Configuration Error: ${e}`,t)}},n=class extends e{field;code=`VALIDATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Validation Error: ${e}`,n),this.field=t}},r=class extends e{issues;attempts;code=`STRUCTURED_OUTPUT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Structured Output Error: ${e}`,r),this.issues=t,this.attempts=n}},i=class extends e{provider;originalError;code=`PROVIDER_ERROR`;category=`provider`;recoverable=!0;status;type;constructor(e,t,n,r,i){super(`Provider Error (${t}): ${e}`,r),this.provider=t,this.originalError=n,i?.status!==void 0&&(this.status=i.status),i?.type!==void 0&&(this.type=i.type)}},a=class extends e{provider;code=`AUTHENTICATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Authentication Error: ${e}`,n),this.provider=t}},o=class extends e{retryAfter;provider;code=`RATE_LIMIT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Rate Limit Error: ${e}`,r),this.retryAfter=t,this.provider=n}},s=class extends e{originalError;code=`NETWORK_ERROR`;category=`system`;recoverable=!0;constructor(e,t,n){super(`Network Error: ${e}`,n),this.originalError=t}},c=class extends e{toolName;originalError;code=`TOOL_EXECUTION_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n,r){super(`Tool Execution Error (${t}): ${e}`,r),this.toolName=t,this.originalError=n}},l=class extends e{toolName;callCount;maxSameToolInputs;code=`SAME_TOOL_INPUT_LOOP`;category=`system`;recoverable=!0;constructor(e,t,n,r){super(`Tool \"${e}\" was called with identical input ${t} times, past the maxSameToolInputs limit of ${n} — stopping the turn to break the loop`,r),this.toolName=e,this.callCount=t,this.maxSameToolInputs=n}},u=class extends e{availableModels;code=`MODEL_NOT_AVAILABLE`;category=`user`;recoverable=!1;constructor(e,t,n,r){super(`Model \"${e}\" is not available for provider \"${t}\"`,r),this.availableModels=n}},d=class extends e{code=`CIRCUIT_BREAKER_OPEN`;category=`system`;recoverable=!0;constructor(e=`Circuit breaker is open`,t){super(e,t)}},f=class extends e{pluginName;code=`PLUGIN_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n){super(`Plugin Error (${t}): ${e}`,n),this.pluginName=t}},p=class extends e{code=`STORAGE_ERROR`;category=`system`;recoverable=!0;constructor(e,t){super(`Storage Error: ${e}`,t)}},m=class extends e{code=`CACHE_INTEGRITY_ERROR`;category=`system`;recoverable=!1;constructor(e,t){super(`Cache Integrity Error: ${e}`,t)}},h=class extends e{executable;code=`UNSUPPORTED_SHELL`;category=`user`;recoverable=!1;constructor(e){super(`Unsupported shell executable: ${e}`,{executable:e}),this.executable=e}};function g(e){return e===`darwin`?'Host OS: macOS (POSIX, BSD userland). Use BSD-flavored utilities: `sed -i \"\"` needs an empty backup arg, `date`/`grep`/`stat` flags differ from GNU. Prefer portable POSIX flags; avoid Linux/GNU-only options.':e===`linux`?\"Host OS: Linux (POSIX, usually GNU coreutils, but distro/user setup varies). Prefer portable POSIX flags; do not assume a specific distro, and probe with `command -v` before relying on a non-standard tool.\":`Host OS: ${e}; active shell family: POSIX sh/bash. Write portable POSIX syntax and avoid host-specific flags.`}function _(e,t){let n=b(e)===`bash`?`bash`:`sh`;return{command:e,kind:n,platform:t,commandArgs:e=>[`-c`,e],interactiveArgs:[],label:`${n} on ${t}`,syntaxHint:g(t)}}function v(e,t){return{command:e,kind:`powershell`,platform:t,commandArgs:e=>[`-NoProfile`,`-Command`,e],interactiveArgs:[`-NoProfile`],label:`PowerShell on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: PowerShell. Write PowerShell syntax (not bash): e.g. \\`Get-ChildItem\\` not \\`ls -la\\`, \\`\\$env:VAR\\` not \\`\\$VAR\\`.`}}function y(e,t){return{command:e,kind:`cmd`,platform:t,commandArgs:e=>[`/d`,`/s`,`/c`,e],interactiveArgs:[],label:`cmd.exe on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: Windows cmd.exe. Write cmd.exe syntax.`}}function b(e){return(e.split(/[\\\\/]/).at(-1)?.toLowerCase()??``).replace(/\\.exe$/i,``)}function x(e,t){switch(b(e)){case`sh`:case`bash`:return _(e,t);case`powershell`:case`pwsh`:return v(e,t);case`cmd`:return y(e,t);default:throw new h(e)}}function S(e){let t=e?.trim();return t===void 0||t.length===0?void 0:t}function C(e={}){let t=e.env??process.env,n=e.platform??process.platform,r=S(e.executable);return r===void 0?n===`win32`?v(`powershell.exe`,n):_(S(t.SHELL)??`/bin/sh`,n):x(r,n)}const w=/^(?!0{32}$)[0-9a-f]{32}$/,T=/^(?!0{16}$)[0-9a-f]{16}$/;function E(e){return e.replaceAll(`-`,``).slice(0,16)}const D=E;function O(e){return T.test(e)}function k(e,t){if(!(!w.test(e)||!T.test(t)))return`00-${e}-${t}-01`}function A(e,t){if(e.allowedOrigins.length===0)return;let n=k(e.traceId,E(t));if(n!==void 0)return{traceparent:n,allowedOrigins:[...e.allowedOrigins]}}function j(e,t){return A(e,t)}function M(e,t,n){if(t?.subprocessClasses?.includes(e)!==!0)return;let r=k(t.traceId,n);return r===void 0?void 0:{TRACEPARENT:r}}function N(e,t,n={}){if(t===void 0||n.TRACEPARENT!==void 0)return{...e,...n};let{TRACESTATE:r,...i}=e;return{...i,...t,...n}}function P(e,t){if(e===void 0||t===void 0)return{};let n;try{n=new URL(e).origin}catch{return{}}return n===`null`||!t.allowedOrigins.includes(n)?{}:{traceparent:t.traceparent}}const F=e=>`\\n…[output truncated: ${e} byte(s) dropped]`;function I(e){let t=e.retain??`head`,n=e.truncationMarker??F,r=Math.max(0,Math.floor(e.maxBytes)),i=new TextEncoder,a=[],o=0,s=0,c=e=>{let t=r-o;if(t<=0)return;let n=e.byteLength<=t?e:e.subarray(0,t);a.push(n),o+=n.byteLength},l=e=>{let t=e.byteLength<=r?e:e.subarray(e.byteLength-r);for(a.push(t),o+=t.byteLength;o>r&&a.length>0;){let e=a[0],t=o-r;e.byteLength<=t?(a.shift(),o-=e.byteLength):(a[0]=e.subarray(t),o-=t)}};return{append(e){let n=typeof e==`string`?i.encode(e):e;s+=n.byteLength,t===`head`?c(n):l(n)},get retainedBytes(){return o},get totalBytes(){return s},get droppedBytes(){return s-o},get truncated(){return s>o},toString(){let e=new Uint8Array(o),r=0;for(let t of a)e.set(t,r),r+=t.byteLength;a=a.length>1?[e]:a;let i=new TextDecoder().decode(e);if(s<=o)return i;let c=n(s-o);return t===`head`?`${i}${c}`:`${c.replace(/^\\n/,``)}\\n${i}`}}}export{l as C,n as D,c as E,e as S,r as T,u as _,D as a,i as b,j as c,h as d,C as f,t as g,d as h,A as i,M as l,m,k as n,E as o,a as p,O as r,N as s,I as t,P as u,s as v,p as w,o as x,f as y};\n//# sourceMappingURL=bounded-output-DpjpS98g.js.map"],"mappings":"AAAA,IAAI,EAAE,cAAc,KAAK,CAAC,QAAQ,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,KAAK,YAAY,KAAK,OAAO,eAAe,KAAK,IAAI,OAAO,SAAS,CAAC,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC,KAAK,sBAAsB,SAAS,OAAO,YAAY,CAAC,EAAE,YAAY,EAAE,EAAE,CAAC,MAAM,wBAAwB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC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AO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,IAAI,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,WAAW,CAAC,EAAE,EAAE,EAAE,IAAI,IAAI,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,IAAI,OAAO,GAAG,IAAI,IAAI,GAAG,EAAE,QAAQ,MAAM,EAAE,EAAE,IAAI,GAAG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ ;(function(){var v=parseInt(process.versions.node.split('.')[0],10);if(v<22){process.stderr.write('\n✗ Node.js 22+ is required (current: '+process.version+')\n\nUpgrade:\n nvm: nvm install 22 && nvm use 22\n Volta: volta install node@22\n Download: https://nodejs.org/en/download\n\n');process.exit(1);}})();
2
+ var e=class extends Error{context;constructor(e,t){super(e),this.context=t,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}},t=class extends e{code=`CONFIGURATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t){super(`Configuration Error: ${e}`,t)}},n=class extends e{field;code=`VALIDATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Validation Error: ${e}`,n),this.field=t}},r=class extends e{issues;attempts;code=`STRUCTURED_OUTPUT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Structured Output Error: ${e}`,r),this.issues=t,this.attempts=n}},i=class extends e{provider;originalError;code=`PROVIDER_ERROR`;category=`provider`;recoverable=!0;status;type;constructor(e,t,n,r,i){super(`Provider Error (${t}): ${e}`,r),this.provider=t,this.originalError=n,i?.status!==void 0&&(this.status=i.status),i?.type!==void 0&&(this.type=i.type)}},a=class extends e{provider;code=`AUTHENTICATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Authentication Error: ${e}`,n),this.provider=t}},o=class extends e{retryAfter;provider;code=`RATE_LIMIT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Rate Limit Error: ${e}`,r),this.retryAfter=t,this.provider=n}},s=class extends e{originalError;code=`NETWORK_ERROR`;category=`system`;recoverable=!0;constructor(e,t,n){super(`Network Error: ${e}`,n),this.originalError=t}},c=class extends e{toolName;originalError;code=`TOOL_EXECUTION_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n,r){super(`Tool Execution Error (${t}): ${e}`,r),this.toolName=t,this.originalError=n}},l=class extends e{toolName;callCount;maxSameToolInputs;code=`SAME_TOOL_INPUT_LOOP`;category=`system`;recoverable=!0;constructor(e,t,n,r){super(`Tool "${e}" was called with identical input ${t} times, past the maxSameToolInputs limit of ${n} — stopping the turn to break the loop`,r),this.toolName=e,this.callCount=t,this.maxSameToolInputs=n}},u=class extends e{availableModels;code=`MODEL_NOT_AVAILABLE`;category=`user`;recoverable=!1;constructor(e,t,n,r){super(`Model "${e}" is not available for provider "${t}"`,r),this.availableModels=n}},d=class extends e{pluginName;code=`PLUGIN_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n){super(`Plugin Error (${t}): ${e}`,n),this.pluginName=t}},f=class extends e{code=`CACHE_INTEGRITY_ERROR`;category=`system`;recoverable=!1;constructor(e,t){super(`Cache Integrity Error: ${e}`,t)}},p=class extends e{executable;code=`UNSUPPORTED_SHELL`;category=`user`;recoverable=!1;constructor(e){super(`Unsupported shell executable: ${e}`,{executable:e}),this.executable=e}};function m(e){return e===`darwin`?'Host OS: macOS (POSIX, BSD userland). Use BSD-flavored utilities: `sed -i ""` needs an empty backup arg, `date`/`grep`/`stat` flags differ from GNU. Prefer portable POSIX flags; avoid Linux/GNU-only options.':e===`linux`?"Host OS: Linux (POSIX, usually GNU coreutils, but distro/user setup varies). Prefer portable POSIX flags; do not assume a specific distro, and probe with `command -v` before relying on a non-standard tool.":`Host OS: ${e}; active shell family: POSIX sh/bash. Write portable POSIX syntax and avoid host-specific flags.`}function h(e,t){let n=v(e)===`bash`?`bash`:`sh`;return{command:e,kind:n,platform:t,commandArgs:e=>[`-c`,e],interactiveArgs:[],label:`${n} on ${t}`,syntaxHint:m(t)}}function g(e,t){return{command:e,kind:`powershell`,platform:t,commandArgs:e=>[`-NoProfile`,`-Command`,e],interactiveArgs:[`-NoProfile`],label:`PowerShell on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: PowerShell. Write PowerShell syntax (not bash): e.g. \`Get-ChildItem\` not \`ls -la\`, \`\$env:VAR\` not \`\$VAR\`.`}}function _(e,t){return{command:e,kind:`cmd`,platform:t,commandArgs:e=>[`/d`,`/s`,`/c`,e],interactiveArgs:[],label:`cmd.exe on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: Windows cmd.exe. Write cmd.exe syntax.`}}function v(e){return(e.split(/[\\/]/).at(-1)?.toLowerCase()??``).replace(/\.exe$/i,``)}function y(e,t){switch(v(e)){case`sh`:case`bash`:return h(e,t);case`powershell`:case`pwsh`:return g(e,t);case`cmd`:return _(e,t);default:throw new p(e)}}function b(e){let t=e?.trim();return t===void 0||t.length===0?void 0:t}function x(e={}){let t=e.env??process.env,n=e.platform??process.platform,r=b(e.executable);return r===void 0?n===`win32`?g(`powershell.exe`,n):h(b(t.SHELL)??`/bin/sh`,n):y(r,n)}const S=/^(?!0{32}$)[0-9a-f]{32}$/,C=/^(?!0{16}$)[0-9a-f]{16}$/;function w(e){return e.replaceAll(`-`,``).slice(0,16)}const T=w;function E(e){return C.test(e)}function D(e,t){if(!(!S.test(e)||!C.test(t)))return`00-${e}-${t}-01`}function O(e,t){if(e.allowedOrigins.length===0)return;let n=D(e.traceId,w(t));if(n!==void 0)return{traceparent:n,allowedOrigins:[...e.allowedOrigins]}}function k(e,t){return O(e,t)}function A(e,t,n){if(t?.subprocessClasses?.includes(e)!==!0)return;let r=D(t.traceId,n);return r===void 0?void 0:{TRACEPARENT:r}}function j(e,t,n={}){if(t===void 0||n.TRACEPARENT!==void 0)return{...e,...n};let{TRACESTATE:r,...i}=e;return{...i,...t,...n}}function M(e,t){if(e===void 0||t===void 0)return{};let n;try{n=new URL(e).origin}catch{return{}}return n===`null`||!t.allowedOrigins.includes(n)?{}:{traceparent:t.traceparent}}const N=e=>`\n…[output truncated: ${e} byte(s) dropped]`;function P(e){let t=e.retain??`head`,n=e.truncationMarker??N,r=Math.max(0,Math.floor(e.maxBytes)),i=new TextEncoder,a=[],o=0,s=0,c=e=>{let t=r-o;if(t<=0)return;let n=e.byteLength<=t?e:e.subarray(0,t);a.push(n),o+=n.byteLength},l=e=>{let t=e.byteLength<=r?e:e.subarray(e.byteLength-r);for(a.push(t),o+=t.byteLength;o>r&&a.length>0;){let e=a[0],t=o-r;e.byteLength<=t?(a.shift(),o-=e.byteLength):(a[0]=e.subarray(t),o-=t)}};return{append(e){let n=typeof e==`string`?i.encode(e):e;s+=n.byteLength,t===`head`?c(n):l(n)},get retainedBytes(){return o},get totalBytes(){return s},get droppedBytes(){return s-o},get truncated(){return s>o},toString(){let e=new Uint8Array(o),r=0;for(let t of a)e.set(t,r),r+=t.byteLength;a=a.length>1?[e]:a;let i=new TextDecoder().decode(e);if(s<=o)return i;let c=n(s-o);return t===`head`?`${i}${c}`:`${c.replace(/^\n/,``)}\n${i}`}}}export{u as C,t as S,f as _,P as a,r as b,E as c,c as d,e as f,l as g,k as h,w as i,M as l,i as m,x as n,A as o,d as p,T as r,j as s,O as t,a as u,n as v,s as x,o as y};
@@ -0,0 +1 @@
1
+ var e=class extends Error{context;constructor(e,t){super(e),this.context=t,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}},t=class extends e{code=`CONFIGURATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t){super(`Configuration Error: ${e}`,t)}},n=class extends e{field;code=`VALIDATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Validation Error: ${e}`,n),this.field=t}},r=class extends e{issues;attempts;code=`STRUCTURED_OUTPUT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Structured Output Error: ${e}`,r),this.issues=t,this.attempts=n}},i=class extends e{provider;originalError;code=`PROVIDER_ERROR`;category=`provider`;recoverable=!0;status;type;constructor(e,t,n,r,i){super(`Provider Error (${t}): ${e}`,r),this.provider=t,this.originalError=n,i?.status!==void 0&&(this.status=i.status),i?.type!==void 0&&(this.type=i.type)}},a=class extends e{provider;code=`AUTHENTICATION_ERROR`;category=`user`;recoverable=!1;constructor(e,t,n){super(`Authentication Error: ${e}`,n),this.provider=t}},o=class extends e{retryAfter;provider;code=`RATE_LIMIT_ERROR`;category=`provider`;recoverable=!0;constructor(e,t,n,r){super(`Rate Limit Error: ${e}`,r),this.retryAfter=t,this.provider=n}},s=class extends e{originalError;code=`NETWORK_ERROR`;category=`system`;recoverable=!0;constructor(e,t,n){super(`Network Error: ${e}`,n),this.originalError=t}},c=class extends e{toolName;originalError;code=`TOOL_EXECUTION_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n,r){super(`Tool Execution Error (${t}): ${e}`,r),this.toolName=t,this.originalError=n}},l=class extends e{toolName;callCount;maxSameToolInputs;code=`SAME_TOOL_INPUT_LOOP`;category=`system`;recoverable=!0;constructor(e,t,n,r){super(`Tool "${e}" was called with identical input ${t} times, past the maxSameToolInputs limit of ${n} — stopping the turn to break the loop`,r),this.toolName=e,this.callCount=t,this.maxSameToolInputs=n}},u=class extends e{availableModels;code=`MODEL_NOT_AVAILABLE`;category=`user`;recoverable=!1;constructor(e,t,n,r){super(`Model "${e}" is not available for provider "${t}"`,r),this.availableModels=n}},d=class extends e{pluginName;code=`PLUGIN_ERROR`;category=`system`;recoverable=!1;constructor(e,t,n){super(`Plugin Error (${t}): ${e}`,n),this.pluginName=t}},f=class extends e{code=`CACHE_INTEGRITY_ERROR`;category=`system`;recoverable=!1;constructor(e,t){super(`Cache Integrity Error: ${e}`,t)}},p=class extends e{executable;code=`UNSUPPORTED_SHELL`;category=`user`;recoverable=!1;constructor(e){super(`Unsupported shell executable: ${e}`,{executable:e}),this.executable=e}};function m(e){return e===`darwin`?'Host OS: macOS (POSIX, BSD userland). Use BSD-flavored utilities: `sed -i ""` needs an empty backup arg, `date`/`grep`/`stat` flags differ from GNU. Prefer portable POSIX flags; avoid Linux/GNU-only options.':e===`linux`?"Host OS: Linux (POSIX, usually GNU coreutils, but distro/user setup varies). Prefer portable POSIX flags; do not assume a specific distro, and probe with `command -v` before relying on a non-standard tool.":`Host OS: ${e}; active shell family: POSIX sh/bash. Write portable POSIX syntax and avoid host-specific flags.`}function h(e,t){let n=v(e)===`bash`?`bash`:`sh`;return{command:e,kind:n,platform:t,commandArgs:e=>[`-c`,e],interactiveArgs:[],label:`${n} on ${t}`,syntaxHint:m(t)}}function g(e,t){return{command:e,kind:`powershell`,platform:t,commandArgs:e=>[`-NoProfile`,`-Command`,e],interactiveArgs:[`-NoProfile`],label:`PowerShell on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: PowerShell. Write PowerShell syntax (not bash): e.g. \`Get-ChildItem\` not \`ls -la\`, \`\$env:VAR\` not \`\$VAR\`.`}}function _(e,t){return{command:e,kind:`cmd`,platform:t,commandArgs:e=>[`/d`,`/s`,`/c`,e],interactiveArgs:[],label:`cmd.exe on ${t}`,syntaxHint:`Host OS: ${t}; active shell family: Windows cmd.exe. Write cmd.exe syntax.`}}function v(e){return(e.split(/[\\/]/).at(-1)?.toLowerCase()??``).replace(/\.exe$/i,``)}function y(e,t){switch(v(e)){case`sh`:case`bash`:return h(e,t);case`powershell`:case`pwsh`:return g(e,t);case`cmd`:return _(e,t);default:throw new p(e)}}function b(e){let t=e?.trim();return t===void 0||t.length===0?void 0:t}function x(e={}){let t=e.env??process.env,n=e.platform??process.platform,r=b(e.executable);return r===void 0?n===`win32`?g(`powershell.exe`,n):h(b(t.SHELL)??`/bin/sh`,n):y(r,n)}const S=/^(?!0{32}$)[0-9a-f]{32}$/,C=/^(?!0{16}$)[0-9a-f]{16}$/;function w(e){return e.replaceAll(`-`,``).slice(0,16)}const T=w;function E(e){return C.test(e)}function D(e,t){if(!(!S.test(e)||!C.test(t)))return`00-${e}-${t}-01`}function O(e,t){if(e.allowedOrigins.length===0)return;let n=D(e.traceId,w(t));if(n!==void 0)return{traceparent:n,allowedOrigins:[...e.allowedOrigins]}}function k(e,t){return O(e,t)}function A(e,t,n){if(t?.subprocessClasses?.includes(e)!==!0)return;let r=D(t.traceId,n);return r===void 0?void 0:{TRACEPARENT:r}}function j(e,t,n={}){if(t===void 0||n.TRACEPARENT!==void 0)return{...e,...n};let{TRACESTATE:r,...i}=e;return{...i,...t,...n}}function M(e,t){if(e===void 0||t===void 0)return{};let n;try{n=new URL(e).origin}catch{return{}}return n===`null`||!t.allowedOrigins.includes(n)?{}:{traceparent:t.traceparent}}const N=e=>`\n…[output truncated: ${e} byte(s) dropped]`;function P(e){let t=e.retain??`head`,n=e.truncationMarker??N,r=Math.max(0,Math.floor(e.maxBytes)),i=new TextEncoder,a=[],o=0,s=0,c=e=>{let t=r-o;if(t<=0)return;let n=e.byteLength<=t?e:e.subarray(0,t);a.push(n),o+=n.byteLength},l=e=>{let t=e.byteLength<=r?e:e.subarray(e.byteLength-r);for(a.push(t),o+=t.byteLength;o>r&&a.length>0;){let e=a[0],t=o-r;e.byteLength<=t?(a.shift(),o-=e.byteLength):(a[0]=e.subarray(t),o-=t)}};return{append(e){let n=typeof e==`string`?i.encode(e):e;s+=n.byteLength,t===`head`?c(n):l(n)},get retainedBytes(){return o},get totalBytes(){return s},get droppedBytes(){return s-o},get truncated(){return s>o},toString(){let e=new Uint8Array(o),r=0;for(let t of a)e.set(t,r),r+=t.byteLength;a=a.length>1?[e]:a;let i=new TextDecoder().decode(e);if(s<=o)return i;let c=n(s-o);return t===`head`?`${i}${c}`:`${c.replace(/^\n/,``)}\n${i}`}}}Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return o}});