// @bun
import{$ as kz,A as p,B as Qz,C as Vz,D as Wz,E as Xz,F as Yz,G as Zz,H as $z,I as Ez,J as Fz,K as Hz,L as Sz,M as Uz,N as bz,O as qz,P as _z,Q as Nz,R as Q,T as Pz,U as Rz,V as gz,W as yz,X as Lz,Y as fz,Z as wz,_ as Mz,aa as Cz,b as Dz,ba as pz,c as Gz,ca as vz,d as Iz,da as Tz,e as Jz,ea as hz,f as Kz,g as Oz,h as E,i as F,j as H,k as S,l as U,m as b,n as q,o as _,p as N,q as P,r as R,s as g,t as y,u as L,v as f,w,x as M,y as k,z as C}from"./index-wn2m4wma.js";import{dlopen as V,suffix as W}from"bun:ffi";import{join as X,dirname as Y}from"path";import{fileURLToPath as Z}from"url";var I=null;function O(){if(I)return I;try{let z=Y(Z(import.meta.url)),B=X(z,"..","native",`claude_code_native.${W}`);return I=V(B,{search_files:{args:["cstring","cstring","pointer"],returns:"pointer"},count_tokens:{args:["cstring"],returns:"u32"},calculate_diff:{args:["cstring","cstring"],returns:"pointer"},compact_content:{args:["cstring","u32","cstring"],returns:"pointer"}}).symbols,I}catch(z){return console.warn("Native module not available, using JS fallback:",z),$()}}function m(){try{return O(),I!==null}catch{return!1}}function $(){return{search_files:(z,B,D)=>{return{matches:[],total_count:0,files_searched:0}},count_tokens:(z)=>{return Math.ceil(z.length/4)},calculate_diff:(z,B)=>{let D=z.split(`
`),J=B.split(`
`),A=[];if(z!==B)A.push({old_start:1,old_lines:D.length,new_start:1,new_lines:J.length,content:`- ${D.join(`
- `)}
+ ${J.join(`
+ `)}`});return A},compact_content:(z,B,D="truncate")=>{let A=B*4;if(z.length<=A)return z;switch(D){case"truncate":return z.slice(0,A/2)+`

... [truncated] ...

`+z.slice(-A/2);case"summarize":let K=Math.floor(A/4);return`=== BEGINNING ===
`+z.slice(0,K)+`

=== END ===
`+z.slice(-K);case"extract":return z.split(`
`).filter((G)=>G.trim().startsWith("#")||G.trim().startsWith("function")||G.trim().startsWith("const")||G.trim().startsWith("class")||G.trim().startsWith("export")||G.trim().startsWith("import")).slice(0,A/50).join(`
`);default:return z.slice(0,A)}}}}var x=O();export{vz as teammateTemplates,Kz as supportsExtendedThinking,p as printSessionsList,Lz as parseSkillFile,x as native,O as loadNative,g as isSystemTool,kz as isSkillInvocation,P as isReadOnlyTool,m as isNativeAvailable,R as isFileEditTool,yz as hookExitCodes,gz as hookEventDocs,Nz as getToolByName,Cz as getSkillArgs,Tz as generateTeammateId,q as generateDescription,C as formatSessionSummary,f as formatMetrics,w as formatCostBrief,L as formatCost,M as formatCacheMetrics,hz as createTeammate,U as createMessageStream,E as calculateCost,S as calculateCacheMetrics,Jz as calculateBudgetTokens,_z as builtInTools,Mz as builtInSkills,Rz as builtInHooks,F as buildSystemPrompt,wz as buildSkillPrompt,H as buildCachedMessages,b as assessRiskLevel,y as agentLoop,Vz as WriteTool,pz as TeammateManager,$z as TaskTool,bz as TaskStopTool,Ez as TaskOutputTool,N as TOOL_CATEGORIES,Uz as SkillTool,fz as SkillManager,k as SessionStore,Qz as ReadTool,_ as PermissionManager,qz as NotebookEditTool,Oz as MODEL_PRICING,Q as MCPClientImpl,Q as MCPClient,Pz as HookManager,Zz as GrepTool,Yz as GlobTool,Sz as ExitPlanModeTool,Hz as EnterPlanModeTool,Wz as EditTool,Gz as EFFORT_TO_BUDGET,Iz as DEFAULT_THINKING_CONFIG,Dz as DEFAULT_CACHE_CONFIG,Xz as BashTool,Fz as AskUserQuestionTool};
