@anthropic-ai/claude-agent-sdk 0.3.323 → 0.3.325

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.
@@ -0,0 +1,16 @@
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
+
3
+ // Version: 0.3.325
4
+
5
+ //! symbol-dispose-prelude: defines Symbol.dispose and Symbol.asyncDispose if missing, for this bundle's `using`.
6
+ if (typeof Symbol.dispose !== 'symbol') {
7
+ try {
8
+ Symbol.dispose = Symbol.for('Symbol.dispose')
9
+ } catch {}
10
+ }
11
+ if (typeof Symbol.asyncDispose !== 'symbol') {
12
+ try {
13
+ Symbol.asyncDispose = Symbol.for('Symbol.asyncDispose')
14
+ } catch {}
15
+ }
16
+ import{n}from"./core-msnqqcc2.mjs";import{Le,ae}from"./core-ds2jqcef.mjs";import{AsyncLocalStorage as y}from"async_hooks";import{constants as b}from"fs";import{appendFile as w,copyFile as P,lstat as S,mkdir as h,open as d,readdir as l,readFile as c,stat as B,unlink as v,writeFile as a}from"fs/promises";class p{read(r){return c(r,"utf8")}readBytes(r){return c(r)}write(r,e,t){return a(r,e,{encoding:"utf8",mode:t})}async mkdir(r,e){try{await h(r,{recursive:!0,mode:e})}catch(t){if(n(t)!=="EEXIST")throw t}}atomicWrite(r,e,t){return Le(r,e,t)}delete(r){return v(r)}list(r){return l(r)}append(r,e,t){return w(r,e,{encoding:"utf8",mode:t})}writeExclusive(r,e,t){return a(r,e,{encoding:"utf8",flag:"wx",mode:t})}writeBytesExclusive(r,e,t){return a(r,e,{flag:"wx",mode:t})}copy(r,e){return P(r,e)}async stat(r){return{mtimeMs:(await B(r)).mtimeMs}}async lstat(r){try{let e=await S(r);return{isSymbolicLink:e.isSymbolicLink(),isFile:e.isFile(),isDirectory:e.isDirectory(),mtimeMs:e.mtimeMs,nlink:e.nlink}}catch(e){if(n(e)==="ENOENT")return;throw e}}async listEntries(r){return(await l(r,{withFileTypes:!0})).map((t)=>({name:t.name,isDirectory:t.isDirectory(),isFile:t.isFile()}))}async readRange(r,e,t){m("readRange","offset",e),m("readRange","length",t);let s=await d(r,"r");try{return await f(s,e,t)}finally{await s.close()}}async readTail(r,e,t){m("readTail","maxBytes",e);let s=t?.noFollow?b.O_RDONLY|ae:"r",i=await d(r,s);try{let o=await i.stat();if(t?.noFollow&&!o.isFile())throw Object.assign(Error("ENXIO: not a regular file"),{code:"ENXIO",path:r});let{size:g}=o,u=Math.min(e,g);return await f(i,g-u,u)}finally{await i.close()}}}function m(r,e,t){if(!Number.isInteger(t)||t<0)throw RangeError(`${r}: ${e} must be a non-negative integer, got ${t}`)}async function f(r,e,t){if(t===0)return Buffer.alloc(0);let s=Buffer.alloc(t),i=0;while(i<t){let{bytesRead:o}=await r.read(s,i,t-i,e+i);if(o===0)break;i+=o}return i===t?s:Buffer.from(s.subarray(0,i))}var F=new y;function T(){return F.getStore()??new p}export{T as getStorageBackend};