blade-code 0.11.1 → 0.11.2

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 (131) hide show
  1. package/dist/blade.js +2 -2
  2. package/dist/{chunk-2ftyzk83.js → chunk-04qhtx2w.js} +1 -1
  3. package/dist/{chunk-4cdk4mds.js → chunk-0eajnhrj.js} +1 -1
  4. package/dist/{chunk-a74ynw4t.js → chunk-0kxya4ye.js} +1 -1
  5. package/dist/{chunk-5034apfz.js → chunk-0wxnrjes.js} +2 -2
  6. package/dist/{chunk-vbjgcn49.js → chunk-1cy4ab77.js} +1 -1
  7. package/dist/chunk-21qsfewd.js +1 -0
  8. package/dist/{chunk-pm5ssr7m.js → chunk-290p3r7a.js} +1 -1
  9. package/dist/{chunk-xcj23spc.js → chunk-2fdghgmf.js} +2 -2
  10. package/dist/chunk-3d4wgfkr.js +1 -0
  11. package/dist/{chunk-25s0c8km.js → chunk-3ee357pw.js} +3 -3
  12. package/dist/{chunk-9ydrwcpy.js → chunk-4e4qtpca.js} +2 -2
  13. package/dist/{chunk-0wcnkxe8.js → chunk-5s2x98rx.js} +2 -2
  14. package/dist/chunk-634ymwg5.js +1 -0
  15. package/dist/chunk-65v1vjvg.js +1 -0
  16. package/dist/{chunk-8sth12hd.js → chunk-6v23hdt8.js} +1 -1
  17. package/dist/{chunk-xseh3f4m.js → chunk-6x5f6she.js} +1 -1
  18. package/dist/{chunk-06hkf59s.js → chunk-7ajvrtb3.js} +1 -1
  19. package/dist/chunk-7p8r4q6f.js +1 -0
  20. package/dist/{chunk-hmw99nm1.js → chunk-7rz5dt79.js} +27 -27
  21. package/dist/{chunk-8n3jythp.js → chunk-8q6zsznc.js} +2 -2
  22. package/dist/{chunk-s1cch8tt.js → chunk-a3dz41pd.js} +1 -1
  23. package/dist/{chunk-gzbb747a.js → chunk-a95jmx2j.js} +1 -1
  24. package/dist/{chunk-n8qg68y2.js → chunk-amabfzc8.js} +1 -1
  25. package/dist/{chunk-m30qwpe9.js → chunk-b22ab7yw.js} +1 -1
  26. package/dist/{chunk-0b83mt1c.js → chunk-crv3sghv.js} +2 -2
  27. package/dist/chunk-d4xsrx3z.js +357 -0
  28. package/dist/{chunk-7eset766.js → chunk-ebvzp8tn.js} +6 -6
  29. package/dist/chunk-eg0s155w.js +1 -0
  30. package/dist/chunk-enmn892r.js +10 -0
  31. package/dist/{chunk-9yn01a90.js → chunk-er6zghgg.js} +1 -1
  32. package/dist/{chunk-30p7aff1.js → chunk-f9qrjd2f.js} +1 -1
  33. package/dist/{chunk-2vrsfb8p.js → chunk-fb2x1026.js} +55 -55
  34. package/dist/{chunk-xcy45yxx.js → chunk-g0xtk1yy.js} +2 -2
  35. package/dist/{chunk-h8w3ahnk.js → chunk-g2295k8s.js} +2 -2
  36. package/dist/{chunk-m8te4s8f.js → chunk-g7pjgspy.js} +2 -2
  37. package/dist/chunk-gff7a5q0.js +1 -0
  38. package/dist/chunk-gymecxcc.js +1 -0
  39. package/dist/{chunk-yrr9mdjn.js → chunk-h4b4fn3t.js} +2 -2
  40. package/dist/{chunk-ta99scbr.js → chunk-jbpasjg9.js} +1 -1
  41. package/dist/{chunk-xzva8y4e.js → chunk-k2rgg45h.js} +3 -3
  42. package/dist/chunk-kaj8jaj5.js +6 -0
  43. package/dist/{chunk-3kszepm6.js → chunk-kehgewqh.js} +1 -1
  44. package/dist/{chunk-wcps5gjm.js → chunk-kkzznz4w.js} +1 -1
  45. package/dist/chunk-m2x6pb4f.js +2 -0
  46. package/dist/{chunk-tqt5c2f5.js → chunk-n30najxq.js} +2 -2
  47. package/dist/{chunk-80946c9a.js → chunk-p36k2e96.js} +1 -1
  48. package/dist/chunk-p665f6pn.js +1 -0
  49. package/dist/chunk-pjeks4cz.js +1 -0
  50. package/dist/{chunk-zfxcef0z.js → chunk-pm163dfm.js} +1 -1
  51. package/dist/{chunk-zjezws85.js → chunk-px45q235.js} +2 -2
  52. package/dist/{chunk-5bc4hwt9.js → chunk-q6sr4979.js} +2 -2
  53. package/dist/{chunk-447ps2te.js → chunk-qa86anwd.js} +2 -2
  54. package/dist/{chunk-sa9fxss4.js → chunk-qhcd0ww0.js} +1 -1
  55. package/dist/chunk-qyfbeg5h.js +1 -0
  56. package/dist/{chunk-v1k6nvth.js → chunk-re8p2y22.js} +1 -1
  57. package/dist/{chunk-xz7dddaj.js → chunk-s7x4x6xw.js} +1 -1
  58. package/dist/{chunk-f552hzcx.js → chunk-sdapqhj0.js} +1 -1
  59. package/dist/{chunk-a731hdwa.js → chunk-skktstg8.js} +1 -1
  60. package/dist/chunk-sqsfztrv.js +1 -0
  61. package/dist/chunk-t3pkk95s.js +1 -0
  62. package/dist/{chunk-ts5xzefm.js → chunk-tx9tb485.js} +2 -2
  63. package/dist/{chunk-m70cnaeg.js → chunk-v0eanse2.js} +1 -1
  64. package/dist/{chunk-ms0wve9g.js → chunk-vemyfx92.js} +2 -2
  65. package/dist/{chunk-dxq7462e.js → chunk-wan9q99y.js} +2 -2
  66. package/dist/{chunk-f6hc7t65.js → chunk-wnzr9h84.js} +1 -1
  67. package/dist/{chunk-5yyp6njq.js → chunk-x6k5ye1z.js} +1 -1
  68. package/dist/{chunk-1beqtjsw.js → chunk-xnys4bgs.js} +1 -1
  69. package/dist/{chunk-27bjk35b.js → chunk-xrgeakpy.js} +1 -1
  70. package/dist/{chunk-fqxzzsgr.js → chunk-yeandcre.js} +1 -1
  71. package/dist/{chunk-a1tt14a2.js → chunk-yjcp8jk1.js} +2 -2
  72. package/dist/{chunk-3y2x6fb6.js → chunk-ys8gysg8.js} +1 -1
  73. package/dist/{chunk-rt3f4xjz.js → chunk-zf72e5w8.js} +14 -6
  74. package/dist/{chunk-g0hhqxpg.js → chunk-zwe1a7xe.js} +2 -2
  75. package/dist/web/assets/{ChatView-BA3kB_z1.js → ChatView-DysPZPwF.js} +5 -5
  76. package/dist/web/assets/{CodeBlockHighlighter-B5kcdVCA.js → CodeBlockHighlighter-OvLyFs9U.js} +1 -1
  77. package/dist/web/assets/{FilePreview-BQid6G2-.js → FilePreview-CkSPwPdW.js} +3 -3
  78. package/dist/web/assets/{KanbanBoard-CTR7bMLa.js → KanbanBoard-DH1wApt6.js} +1 -1
  79. package/dist/web/assets/{MarkdownRenderer-d7DdyYdx.js → MarkdownRenderer-BTxnqChi.js} +3 -3
  80. package/dist/web/assets/{ScrollArea-D1tPWHKZ.js → ScrollArea-BdOqyQ3g.js} +1 -1
  81. package/dist/web/assets/{SessionHistorySurface-Cv_jRoJr.js → SessionHistorySurface-DaKE2oKU.js} +1 -1
  82. package/dist/web/assets/{SettingsModal-CFa2uCzI.js → SettingsModal-CWlSSO_E.js} +1 -1
  83. package/dist/web/assets/{Sidebar-DrRNJOgU.js → Sidebar-Dirk-XAQ.js} +1 -1
  84. package/dist/web/assets/{TaskSwitcher-C9AKJrl-.js → TaskSwitcher-DKelLFZm.js} +1 -1
  85. package/dist/web/assets/{TerminalPanel-BxBGcuB9.js → TerminalPanel-D5Rieq62.js} +1 -1
  86. package/dist/web/assets/{archive-DNa9b1YE.js → archive-CsFSEMp9.js} +1 -1
  87. package/dist/web/assets/{arrow-left-BQh8jlfT.js → arrow-left-gaino9Tb.js} +1 -1
  88. package/dist/web/assets/{calendar-clock-CC7FeYTg.js → calendar-clock-DfHUrEw9.js} +1 -1
  89. package/dist/web/assets/chevron-right-Bvu2j6hB.js +1 -0
  90. package/dist/web/assets/{clock-3-P2q6i6vm.js → clock-3-dWIDc9IF.js} +1 -1
  91. package/dist/web/assets/{copy-C-KvzjCC.js → copy-BPfhyh47.js} +1 -1
  92. package/dist/web/assets/{dist-DiQNoDMg.js → dist-RGayDvc-.js} +1 -1
  93. package/dist/web/assets/{download-CJHn20x1.js → download-BR2L5Wme.js} +1 -1
  94. package/dist/web/assets/{folder-DmyFehXD.js → folder-8dmZJ2a6.js} +1 -1
  95. package/dist/web/assets/{index-BVEiHNFk.css → index-B7RyuO2x.css} +1 -1
  96. package/dist/web/assets/{index-D-oma3Je.js → index-DSa8Dzp7.js} +4 -4
  97. package/dist/web/assets/{message-square-plus-CKu9bFq3.js → message-square-plus-BgC981WF.js} +1 -1
  98. package/dist/web/assets/{pause-D2FxNG-w.js → pause-DLZIDFMB.js} +1 -1
  99. package/dist/web/assets/{pencil-D6HI7KC8.js → pencil-DkC0bPYD.js} +1 -1
  100. package/dist/web/assets/{play-4jKCDYR-.js → play-BVeNn6fv.js} +1 -1
  101. package/dist/web/assets/plus-kzdwas-3.js +1 -0
  102. package/dist/web/assets/{preload-helper-BC9Zf9qO.js → preload-helper-DvgLbiBV.js} +1 -1
  103. package/dist/web/assets/{session-events-CvFfHkFA.js → session-events-BuMTbIwu.js} +6 -6
  104. package/dist/web/assets/{settings-fWlqCZ-U.js → settings-msYyNDKx.js} +1 -1
  105. package/dist/web/assets/{team-qGS2kixH.js → team-D3XOVbxL.js} +1 -1
  106. package/dist/web/assets/{teamService-DfIvlI2_.js → teamService-Bus5RDi1.js} +1 -1
  107. package/dist/web/assets/{terminal-DZkEoiSb.js → terminal-Cp5WYo8w.js} +1 -1
  108. package/dist/web/assets/{triangle-alert-Detl9fRQ.js → triangle-alert-cGqHxFsZ.js} +1 -1
  109. package/dist/web/assets/{vendor-radix-CHeA_3Pt.js → vendor-radix-L0yJCKJX.js} +1 -1
  110. package/dist/web/assets/{vendor-react-hNfZDUf2.js → vendor-react-CHEIQMI-.js} +1 -1
  111. package/dist/web/index.html +5 -5
  112. package/package.json +1 -1
  113. package/dist/chunk-1kxpnt9q.js +0 -1
  114. package/dist/chunk-2g3v9qpz.js +0 -1
  115. package/dist/chunk-43gg1wdc.js +0 -1
  116. package/dist/chunk-72wn385d.js +0 -1
  117. package/dist/chunk-7vzz3rsx.js +0 -332
  118. package/dist/chunk-8emp6ysb.js +0 -1
  119. package/dist/chunk-8evyh5t0.js +0 -1
  120. package/dist/chunk-8hdtssvs.js +0 -1
  121. package/dist/chunk-b36egepz.js +0 -1
  122. package/dist/chunk-hrtf7dba.js +0 -2
  123. package/dist/chunk-j7dx054r.js +0 -1
  124. package/dist/chunk-j9ppeg6v.js +0 -1
  125. package/dist/chunk-jemb0vwa.js +0 -1
  126. package/dist/chunk-r9m3b170.js +0 -1
  127. package/dist/chunk-tf1qz4q6.js +0 -1
  128. package/dist/chunk-v17q4bsd.js +0 -6
  129. package/dist/chunk-y0wc0hef.js +0 -10
  130. package/dist/web/assets/chevron-right-6ZTOJE0p.js +0 -1
  131. package/dist/web/assets/plus-C4p8E1Nk.js +0 -1
@@ -1,4 +1,4 @@
1
- import{bh as FO,ch as $b,dh as JO}from"./chunk-3kszepm6.js";import{jh as wb}from"./chunk-wcps5gjm.js";import{sh as Z0,th as $O}from"./chunk-vbjgcn49.js";import{wh as BO}from"./chunk-06hkf59s.js";import{xh as Ab,zh as bb}from"./chunk-xzva8y4e.js";import{Oi as Zb,Pi as G0,Ti as Wb}from"./chunk-yrr9mdjn.js";import{Yi as B}from"./chunk-m30qwpe9.js";import{Dj as k,Ej as A,Fj as m,Hj as U,Kj as pO}from"./chunk-9ydrwcpy.js";import{Xj as Eb}from"./chunk-a1tt14a2.js";import{dk as _}from"./chunk-zjezws85.js";import{yk as O0}from"./chunk-gzbb747a.js";import xb from"node:path";import I0 from"node:path";import Db from"node:fs";import WO from"node:os";import E from"node:path";import k0 from"yaml";var GO=`# Goal Completion Verifier
1
+ import{ch as FO,dh as $b,eh as JO}from"./chunk-kehgewqh.js";import{kh as wb}from"./chunk-kkzznz4w.js";import{th as Z0,uh as $O}from"./chunk-1cy4ab77.js";import{xh as BO}from"./chunk-7ajvrtb3.js";import{Ah as bb,yh as Ab}from"./chunk-k2rgg45h.js";import{Pi as Zb,Qi as G0,Ui as Wb}from"./chunk-h4b4fn3t.js";import{Zi as B}from"./chunk-b22ab7yw.js";import{Ej as k,Fj as A,Gj as m,Ij as U,Lj as pO}from"./chunk-4e4qtpca.js";import{Yj as Eb}from"./chunk-yjcp8jk1.js";import{ek as _}from"./chunk-px45q235.js";import{zk as O0}from"./chunk-a95jmx2j.js";import xb from"node:path";import I0 from"node:path";import Db from"node:fs";import WO from"node:os";import E from"node:path";import k0 from"yaml";var GO=`# Goal Completion Verifier
2
2
 
3
3
  You are a fresh, independent, adversarial verifier. The parent Agent has claimed
4
4
  that a persisted goal is complete. Your job is to refute that claim unless the
@@ -730,4 +730,4 @@ ${L.join(`
730
730
  `)}
731
731
  </${S}>`:"";return{content:I,files:[...b],references:b.map(a1),triggerPaths:[...O],contentBytes:Buffer.byteLength(I,"utf8"),provenanceSha256:bO(b.map(($)=>`${$.id}:${$.contentSha256}`).join(`
732
732
  `))}}function X0(b,O){let S=O,L=[];for(let G=b.length-1;G>=0;G-=1){let I=b[G];if(!I)continue;let $=Buffer.byteLength(I.content,"utf8");if($>S)continue;L.push(I),S-=$}return L.reverse()}class y{projectRoot;definitions;byId;constructor(b,O=[]){this.projectRoot=b;this.projectRoot=ab(b),this.definitions=Object.freeze([...O].sort(rb).map((S)=>Object.freeze({...S}))),this.byId=new Map(this.definitions.map((S)=>[S.id,S]))}static empty(b){return new y(b)}list(){return this.definitions.map((b)=>({id:b.id,relativePath:b.relativePath,source:b.source,kind:b.kind,conditional:b.conditional,contentSha256:b.contentSha256}))}snapshot(){return new y(this.projectRoot,this.definitions.map((b)=>({...b,patterns:b.patterns?[...b.patterns]:void 0})))}staticRules(b,O=p1){if(this.definitions.length===0)return Ob([],[],"project-instructions");let S=this.relativeSourcePath(b),L=this.definitions.filter((G)=>!G.conditional&&eb(G.scopeDirectory,S));return Ob(X0(L,O),[],"project-instructions")}contextualRules(b,O,S,L=c1){if(this.definitions.length===0)return Ob([],[],"contextual-project-instructions");let G=this.relativeSourcePath(b),I=[...new Set(O.map((q)=>OO(W.relative(this.projectRoot,ab(q)))).filter(SO))].sort(),$=new Map;for(let q of I)for(let K of this.definitions){if(S.has(K.id))continue;if(!eb(K.scopeDirectory,q))continue;if(K.conditional){let Q=W.posix.relative(K.scopeDirectory||".",q);if(!K.patterns?.some((Z)=>V0(Z,{dot:!0})(Q)))continue}else if(eb(K.scopeDirectory,G))continue;$.set(K.id,K)}let T=X0([...$.values()].sort(rb),L);return Ob(T,I,"contextual-project-instructions")}hydrate(b){let O=b.map((S)=>{let L=this.byId.get(S.id);if(!L||L.contentSha256!==S.contentSha256||L.relativePath!==S.relativePath||L.source!==S.source)throw Error(`Project rule provenance mismatch: ${S.relativePath}`);return L});return Ob([...new Map(O.map((S)=>[S.id,S])).values()].sort(rb),[],"contextual-project-instructions")}relativeSourcePath(b){let O=OO(W.relative(this.projectRoot,ab(b)));if(O&&!SO(O))throw Error("Project instruction source is outside the catalog root");return O}}async function e1(b,O){let S=await R.lstat(O);if(!S.isFile()||S.isSymbolicLink())throw Error("Project rule must be a regular file");if(S.size>W0)throw Error(`Project rule exceeds ${W0} bytes`);let L=await R.realpath(O),G=OO(W.relative(b,L));if(!SO(G))throw Error("Project rule escapes its repository root");let I=await R.readFile(L,"utf8");if(M0(I))throw Error("Project rule contains hidden control characters");let $=d1(I),T=$.content.trim();if(!T)throw Error("Project rule content must not be empty");let q=i1($.data.paths),K=t1(G),Q=bO(JSON.stringify({relativePath:G,patterns:q??[],content:T}));return{id:`${K.source}:${bO(G).slice(0,20)}`,relativePath:G,source:K.source,kind:K.kind,scopeDirectory:K.scopeDirectory,priority:K.priority,conditional:Boolean(q),...q?{patterns:q}:{},content:T,contentSha256:Q}}async function x0(b,O){let S=o1(b);if(!O.projectTrusted)return y.empty(S);let L=await R.realpath(S),G=P1.stream([...s1],{cwd:L,absolute:!0,dot:!0,deep:u1,onlyFiles:!0,followSymbolicLinks:!1,unique:!0,ignore:[...n1]}),I=[];for await(let K of G)if(I.push(K.toString()),I.length>Y0)throw Error(`Project rule catalog exceeds ${Y0} files`);I.sort();let $=new Set(I.filter((K)=>W.basename(K)==="AGENTS.override.md").map((K)=>W.dirname(K))),T=[],q=0;for(let K of I){if(W.basename(K)==="AGENTS.md"&&$.has(W.dirname(K)))continue;try{let Q=await e1(L,K);if(q+=Buffer.byteLength(Q.content,"utf8"),q>A0)throw Error(`Project rule catalog exceeds ${A0} bytes`);T.push(Q)}catch(Q){l1.warn(`[ProjectRules] Ignoring rule: ${Q instanceof Error?Q.message:String(Q)}`)}}return new y(L,T)}var z0=32,Mb=64;class w0 extends Error{capacity=Mb;constructor(){super(`Workspace agent resource capacity is full (${Mb})`);this.name="WorkspaceAgentResourceCapacityError"}}var V=new Map,LO=0,_0=[];async function r1(b){let O=await _.getInstance().getStatus(b.workspaceRoot);b.communicationStyles=await tb(b.workspaceRoot,{projectTrusted:O.state==="trusted",plugins:b.plugins.getActive()})}function bS(b){let O={...b};for(let S of Object.values(Ab))O[S]=(b[S]??[]).map((L)=>({...L,matcher:L.matcher?{...L.matcher}:void 0,hooks:L.hooks.map((G)=>({...G}))}));return O}function b4(b){_0=[...new Set(b.map((O)=>xb.resolve(O)))]}function D0(b,O){q0(b,O.plugins),x.releaseInstance(b,O.subagents),v.releaseInstance({cwd:b},O.skills),X.releaseInstance(b,O.commands),w.releaseInstance(b,O.plugins)}function N0(b){D0(b.workspaceRoot,b)}function Sb(){while(V.size>z0){let b=!1;for(let[O,S]of V){if(!S.resources||S.users>0)continue;if(V.get(O)!==S)continue;V.delete(O),N0(S.resources),b=!0;break}if(!b)return}}function OS(b){setImmediate(()=>{b.users=Math.max(0,b.users-1),Sb()}).unref?.()}async function SS(b,O){let S=await _.getInstance().getStatus(b),L=Ib(b),G=s({cwd:b}),I=X.getInstance(b),$=e(b);try{if(L.getAllNames().length===0)L.loadFromStandardLocations(S.state==="trusted");await Promise.all([G.initialize(),I.isInitialized()?void 0:I.initialize(b),$.isInitialized()?void 0:$.initialize(b,[...O.cliPluginDirs??_0])]),Fb(b),await ob(b);let T=await tb(b,{projectTrusted:S.state==="trusted",plugins:$.getActive()}),q=await x0(b,{projectTrusted:S.state==="trusted"});return{workspaceRoot:b,subagents:L,skills:G,commands:I,plugins:$,communicationStyles:T,projectRules:q}}catch(T){throw D0(b,{subagents:L,skills:G,commands:I,plugins:$}),T}}function LS(b,O){let S={generation:LO,users:0};return S.promise=SS(b,O).then((L)=>{if(S.generation!==LO||V.get(b)!==S)return N0(L),L;return S.resources=L,Sb(),L},(L)=>{if(V.get(b)===S)V.delete(b);throw L}),V.set(b,S),S}async function C0(b,O){let S=xb.resolve(b),L=V.get(S);if(!L){if(Sb(),V.size>=Mb)throw new w0;L=LS(S,O)}else V.delete(S),V.set(S,L);L.users++;let G;try{G=await L.promise}catch(I){throw L.users=Math.max(0,L.users-1),Sb(),I}return{entry:L,resources:G}}async function h0(b,O){if(!O)return;Fb(b.workspaceRoot),await ob(b.workspaceRoot),await r1(b)}async function O4(b,O={}){let S=await C0(b,O);try{return await h0(S.resources,O.reconcilePlugins),S.resources}finally{OS(S.entry)}}async function S4(b,O,S={}){let L=await C0(b,S);try{return await h0(L.resources,S.reconcilePlugins),await O(L.resources)}finally{L.entry.users=Math.max(0,L.entry.users-1),Sb()}}function L4(){let b=0,O=0;for(let S of V.values()){if(S.resources)b++;O+=S.users}return{capacity:z0,activeCapacity:Mb,entries:V.size,initialized:b,inFlight:V.size-b,activeUsers:O}}function $4(b){let O="projectRoot"in b?b.projectRoot:b.workspaceRoot;return{projectRoot:xb.resolve(O),subagents:b.subagents.snapshot(),skills:b.skills.snapshot(),commands:b.commands.snapshot(),communicationStyles:b.communicationStyles?.snapshot()??$O.snapshot(),projectRules:b.projectRules?.snapshot()??y.empty(O),hooks:bS("hooks"in b&&b.hooks?b.hooks:bb.getInstance().getConfig(O))}}function G4(b){let O=xb.resolve(b);return{projectRoot:O,subagents:new x,skills:new v,commands:X.empty(O),hooks:{enabled:!1},communicationStyles:$O.snapshot(),projectRules:y.empty(O)}}function I4(){LO++;for(let[b,O]of V)if(O.resources)Fb(b);V.clear(),x.resetInstances(),v.resetInstance(),X.resetInstance(),w.resetInstance()}
733
- export{qS as Cg,TS as Dg,KS as Eg,ZO as Fg,FS as Gg,BS as Hg,Ib as Ig,s as Jg,X as Kg,ub as Lg,Yb as Mg,w as Ng,e as Og,ob as Pg,Fb as Qg,y as Rg,z0 as Sg,Mb as Tg,w0 as Ug,r1 as Vg,b4 as Wg,O4 as Xg,S4 as Yg,L4 as Zg,$4 as _g,G4 as $g,I4 as ah};
733
+ export{qS as Dg,TS as Eg,KS as Fg,ZO as Gg,FS as Hg,BS as Ig,Ib as Jg,s as Kg,X as Lg,ub as Mg,Yb as Ng,w as Og,e as Pg,ob as Qg,Fb as Rg,y as Sg,z0 as Tg,Mb as Ug,w0 as Vg,r1 as Wg,b4 as Xg,O4 as Yg,S4 as Zg,L4 as _g,$4 as $g,G4 as ah,I4 as bh};
@@ -1,4 +1,4 @@
1
- import{Va as H}from"./chunk-pm5ssr7m.js";import"./chunk-9qxch6sy.js";import"./chunk-a731hdwa.js";import{bg as $,dg as T}from"./chunk-7eset766.js";import"./chunk-5yyp6njq.js";import"./chunk-v508x7cg.js";import"./chunk-xzva8y4e.js";import"./chunk-3y2x6fb6.js";import"./chunk-yrr9mdjn.js";import{Yi as k}from"./chunk-m30qwpe9.js";import"./chunk-n8qg68y2.js";import"./chunk-hrtf7dba.js";import"./chunk-9ydrwcpy.js";import"./chunk-0wcnkxe8.js";import"./chunk-4cdk4mds.js";import"./chunk-a1tt14a2.js";import"./chunk-zjezws85.js";import"./chunk-gzbb747a.js";import"./chunk-f552hzcx.js";import U from"os";import J from"path";function X(z){return typeof z==="string"?z:void 0}function N(z){if(!Array.isArray(z))return;let q=[];for(let K of z)if(typeof K==="string")q.push(K);else if(K!=null)q.push(String(K));return q}function b(){console.log(`
1
+ import{Va as H}from"./chunk-290p3r7a.js";import"./chunk-9qxch6sy.js";import"./chunk-skktstg8.js";import{cg as $,eg as T}from"./chunk-ebvzp8tn.js";import"./chunk-x6k5ye1z.js";import"./chunk-v508x7cg.js";import"./chunk-k2rgg45h.js";import"./chunk-ys8gysg8.js";import"./chunk-h4b4fn3t.js";import{Zi as k}from"./chunk-b22ab7yw.js";import"./chunk-amabfzc8.js";import"./chunk-m2x6pb4f.js";import"./chunk-4e4qtpca.js";import"./chunk-5s2x98rx.js";import"./chunk-0eajnhrj.js";import"./chunk-yjcp8jk1.js";import"./chunk-px45q235.js";import"./chunk-a95jmx2j.js";import"./chunk-sdapqhj0.js";import U from"os";import J from"path";function X(z){return typeof z==="string"?z:void 0}function N(z){if(!Array.isArray(z))return;let q=[];for(let K of z)if(typeof K==="string")q.push(K);else if(K!=null)q.push(String(K));return q}function b(){console.log(`
2
2
  blade mcp
3
3
  `),console.log(`管理 MCP 服务器
4
4
  `),console.log("Commands:"),console.log(" blade mcp add <name> <commandOrUrl> [args...] 添加 MCP 服务器"),console.log(" blade mcp remove <name> 删除 MCP 服务器 [aliases: rm]"),console.log(" blade mcp list 列出所有 MCP 服务器并检查健康状态 [aliases: ls]"),console.log(" blade mcp get <name> 获取服务器详情"),console.log(" blade mcp login <name> 登录远程 MCP OAuth"),console.log(" blade mcp logout <name> 清除远程 MCP OAuth 凭证"),console.log(` blade mcp add-json <name> <json> 从 JSON 字符串添加服务器
@@ -1,2 +1,2 @@
1
1
  import*as z from"node:os";import*as x from"node:path";function F(){return process.env.BLADE_STORAGE_ROOT||x.join(z.homedir(),".blade")}import{AsyncLocalStorage as Lq}from"node:async_hooks";import{createHash as Vq}from"node:crypto";import{lstat as L,mkdir as Cq,readdir as bq,realpath as N}from"node:fs/promises";import Z from"node:path";import{createHash as Gq}from"node:crypto";var E=new WeakSet,j=new WeakSet,Jq={"not-absolute":"ACP remote file path must be absolute","style-mismatch":"ACP remote file path does not match the expected style","drive-relative":"ACP remote file path cannot be drive-relative","root-relative":"ACP remote file path cannot be root-relative","unc-not-supported":"ACP remote file path must be absolute; UNC paths are not supported","device-namespace-not-supported":"ACP remote file path device namespaces are not supported","trailing-dot-or-space":"ACP remote file path components cannot end with a dot or space","alternate-data-stream":"ACP remote file path alternate data streams are not supported","reserved-device-name":"ACP remote file path reserved device names are not supported","short-name-alias":"ACP remote file path short-name aliases are not supported","invalid-character":"ACP remote file path contains characters that are not supported"},Oq=new Set(["CON","PRN","AUX","NUL","CONIN$","CONOUT$","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9","COM¹","COM²","COM³","LPT¹","LPT²","LPT³"]);class _ extends Error{reason;style;name="AcpRemotePathError";code="acp_remote_path_invalid";constructor(q,G){super(Jq[q]);this.reason=q;this.style=G;Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,reason:this.reason,style:this.style,message:this.message}}}class V extends Error{name="AcpRemotePathIdentityError";code="acp_remote_path_identity_invalid";constructor(){super("ACP remote path identity is invalid");Object.setPrototypeOf(this,new.target.prototype)}}function Qq(q){if(!E.has(q))throw new V}function Uq(q){if(!j.has(q))throw new V;if(Qq(q.workspace),q.style!==q.workspace.style)throw new V}function gq(q){Uq(q);let G=Object.freeze({style:q.style,workspace:q.workspace});return j.add(G),G}function Rq(q){let G=C(q),J=Object.freeze({style:G.style,workspace:G});return j.add(J),J}function C(q,G){let J=W(q,G);if(J.kind==="error")throw new _(J.reason,J.style);let O=J.style==="win32"?Yq(q):Xq(q);return k(J.style,O)}function Sq(q,G){let J=C(q),O=J.style==="win32"?Fq(J.wirePath,G):_q(J.wirePath,G);return k(J.style,O)}function W(q,G){if(R(q))return{kind:"error",reason:"device-namespace-not-supported",style:"win32"};if(g(q))return{kind:"error",reason:"unc-not-supported",style:G==="posix"?"posix":"win32"};if(S(q))return{kind:"error",reason:"unc-not-supported",style:"win32"};if(P(q)){if(G==="posix")return{kind:"error",reason:"style-mismatch",style:"posix"};return{kind:"absolute",style:"win32"}}if(Mq(q))return{kind:"error",reason:"drive-relative",style:"win32"};if(q.startsWith("\\"))return{kind:"error",reason:"root-relative",style:"win32"};if(q.startsWith("/")){if(G==="win32")return{kind:"error",reason:"style-mismatch",style:"win32"};return{kind:"absolute",style:"posix"}}return{kind:"error",reason:"not-absolute",style:"unknown"}}function k(q,G){let J=q==="win32"?G.toUpperCase():G,O=Object.freeze({style:q,wirePath:G,exactIdentity:I("acp-remote-exact-path",q,G),collisionIdentity:I("acp-remote-collision-path",q,J)});return E.add(O),O}function I(q,G,J){return`${q}:${Gq("sha256").update(`${G}\x00${J}`).digest("hex")}`}function Xq(q){let G=q.split("/"),J=[];for(let O of G.slice(1)){if(O.length===0||O===".")continue;if(O===".."){if(J.length>0)J.pop();continue}A(O),J.push(O)}return J.length===0?"/":`/${J.join("/")}`}function Yq(q){let G=q[0].toUpperCase(),J=Bq(q),O=[],Q="";for(let U of q.slice(2)){if(m(U)){if(Q.length>0)v(O,Q),Q="";continue}Q+=U}if(Q.length>0)v(O,Q);if(J&&O.length>0)throw new _("trailing-dot-or-space","win32");if(O.length===0)return`${G}:\\`;return`${G}:\\${O.join("\\")}`}function Zq(q,G){let J=q==="/"?[]:q.slice(1).split("/"),O=[...J];for(let Q of G.split("/")){if(Q.length===0||Q===".")continue;if(Q===".."){if(O.length===J.length)throw new _("not-absolute","posix");O.pop();continue}A(Q),O.push(Q)}return O.length===0?"/":`/${O.join("/")}`}function _q(q,G){if(R(G))throw new _("device-namespace-not-supported","win32");if(g(G))throw new _("unc-not-supported","posix");if(S(G))throw new _("unc-not-supported","win32");if(P(G)||G.startsWith("/"))throw new _("style-mismatch","posix");return Zq(q,G)}function $q(q,G){let J=q.indexOf("\\"),O=J===q.length-1?[]:q.slice(J+1).split("\\"),Q=[...O],U="";for(let K of G){if(m(K)){if(U.length>0)y(O.length,Q,U),U="";continue}U+=K}if(U.length>0)y(O.length,Q,U);let $=q.slice(0,J+1);if(Q.length===0)return $;return`${$}${Q.join("\\")}`}function Fq(q,G){let J=W(G,"win32");if(J.kind==="absolute")throw new _("style-mismatch","win32");if(J.reason!=="not-absolute")throw new _(J.reason,J.style);return $q(q,G)}function y(q,G,J){if(J===".")return;if(J===".."){if(G.length===q)throw new _("not-absolute","win32");G.pop();return}f(J),G.push(J)}function v(q,G){if(G===".")return;if(G===".."){if(q.length>0)q.pop();return}f(G),q.push(G)}function A(q){if(q.includes("\x00"))throw new _("invalid-character","posix")}function f(q){let G=Hq(q),J=Kq(G);if(J!==void 0&&Oq.has(J.toUpperCase()))throw new _("reserved-device-name","win32");if(G!==q)throw new _("trailing-dot-or-space","win32");if(q.includes(":"))throw new _("alternate-data-stream","win32");if(/~\d/u.test(q))throw new _("short-name-alias","win32");for(let O of q){let Q=O.codePointAt(0);if(Q===void 0||Q===0||Q>=1&&Q<=31||'<>"|?*'.includes(O))throw new _("invalid-character","win32")}}function Hq(q){let G=q.length;while(G>0){let J=q[G-1];if(J!=="."&&J!==" ")break;G-=1}return q.slice(0,G)}function Kq(q){if(q.length===0)return;let G=q.indexOf(".");return G===-1?q:q.slice(0,G)}function g(q){return q.startsWith("//")||q.startsWith("/\\")}function R(q){return/^([\\/]){2}[?.][\\/]/u.test(q)}function S(q){return/^[\\/]{2}/u.test(q)}function P(q){return/^[A-Za-z]:[\\/]/u.test(q)}function Mq(q){return/^[A-Za-z]:(?![\\/])/u.test(q)}function m(q){return q==="\\"||q==="/"}function Bq(q){if(q.length<=3)return!1;let G=q[q.length-1];return G==="\\"||G==="/"}var H="acp-remote-workspaces",d=/^[a-f0-9]{64}$/,b=new Map,h=new Lq,Nq;class X extends Error{name="AcpRemoteWorkspaceStateError";code="acp_remote_workspace_state_invalid";constructor(q){super(`ACP remote workspace durable state is invalid (${q})`);Object.setPrototypeOf(this,new.target.prototype)}}function iq(q){return{version:1,kind:"acp-remote",style:q.style,wirePath:q.workspace.wirePath,exactIdentity:q.workspace.exactIdentity,collisionIdentity:q.workspace.collisionIdentity}}function Tq(q){if(!q||typeof q!=="object"||Array.isArray(q))throw new X("descriptor-shape");let G=q;if(G.version!==1)throw new X("descriptor-version");if(G.kind!=="acp-remote")throw new X("descriptor-kind");if(G.style!=="posix"&&G.style!=="win32")throw new X("descriptor-style");if(typeof G.wirePath!=="string"||typeof G.exactIdentity!=="string"||typeof G.collisionIdentity!=="string")throw new X("descriptor-shape");let J;try{J=C(G.wirePath,G.style)}catch{throw new X("descriptor-wire-path")}if(J.exactIdentity!==G.exactIdentity||J.collisionIdentity!==G.collisionIdentity)throw new X("descriptor-identity");return{version:1,kind:"acp-remote",style:G.style,wirePath:J.wirePath,exactIdentity:J.exactIdentity,collisionIdentity:J.collisionIdentity}}function cq(q,G=F()){if(typeof q!=="string"||!/^acp-remote-collision-path:[a-f0-9]{64}$/.test(q))throw new X("descriptor-collision-identity");let J=Z.resolve(G),O=Vq("sha256").update(`acp-remote-host-state\x00${q}`).digest("hex");return Z.join(J,H,O)}async function sq(q){let G=Z.resolve(F());await jq(q,G)}async function rq(q,G){let J=Z.resolve(F());return s(q,J,G)}async function oq(q,G){let J=String(q);if(Z.dirname(G)!==J)throw new X("state-file-path");let O=await L(G);if(O.isSymbolicLink()||!O.isFile())throw new X("state-file-type");if(typeof process.getuid==="function"&&O.uid!==process.getuid())throw new X("state-file-owner");let Q=typeof O.mode==="bigint"?Number(O.mode&BigInt(511)):O.mode&511;if(process.platform!=="win32"&&Q!==384)throw new X("state-file-mode");await M(G,J,Z.basename(G))}async function aq(q,G,J){let O=String(q);if(Z.dirname(G)!==O)throw new X("state-file-path");let[Q,U]=await Promise.all([J.stat({bigint:!0}),L(G,{bigint:!0})]);if(U.isSymbolicLink()||!U.isFile()||!Q.isFile()||U.dev!==Q.dev||U.ino!==Q.ino)throw new X("state-file-replaced");if(typeof process.getuid==="function"&&(Number(U.uid)!==process.getuid()||Number(Q.uid)!==process.getuid()))throw new X("state-file-owner");let $=Number(U.mode&BigInt(511)),K=Number(Q.mode&BigInt(511));if(process.platform!=="win32"&&($!==384||K!==384))throw new X("state-file-mode");await M(G,O,Z.basename(G))}function tq(q,G,J,O){let Q=q[0];if(Q?.type!=="session_created"||Q.sessionId!==G||Q.data.sessionId!==G||Q.cwd!==J||Q.projectPath!==J)throw new X("remote-session-identity");if(O){let U=Tq(Q.data.remoteWorkspace);if(U.version!==O.version||U.kind!==O.kind||U.style!==O.style||U.wirePath!==O.wirePath||U.exactIdentity!==O.exactIdentity||U.collisionIdentity!==O.collisionIdentity)throw new X("remote-session-workspace")}for(let U of q)if(U.sessionId!==G||U.cwd!==J||U.projectPath!==J)throw new X("remote-session-event-identity");return Q}function n(q){return d.test(q)}async function p(q=F()){let G=Z.resolve(q);return u(`${G}\x00${H}`,async()=>{let J=Z.join(G,H),O;try{O=await c(G,(U)=>bq(U,{withFileTypes:!0}))}catch(U){if(U.code==="ENOENT")return[];throw U}await Nq?.();let Q=[];for(let U of O){if(!n(U.name))continue;let $=Z.join(J,U.name);try{let K=await s($,G,async(qq)=>qq);Q.push(K)}catch(K){if(K.code==="ENOENT")throw new X("protected-root-missing");throw K}}return Q.sort((U,$)=>U.localeCompare($))})}function i(q,G){if(typeof q!=="string"||!Z.isAbsolute(q))throw new X("protected-root-shape");let J=Z.resolve(q);if(J!==q)throw new X("protected-root-shape");let O=Z.relative(G,J),Q=`${H}${Z.sep}`;if(O===""||O===H||!O.startsWith(Q)||O.includes(`${Z.sep}..`)||O.startsWith(`..${Z.sep}`)||Z.isAbsolute(O))throw new X("protected-root-shape");let U=O.split(Z.sep);if(U.length!==2||U[0]!==H)throw new X("protected-root-shape");if(!d.test(U[1]??""))throw new X("protected-root-digest");return{storageRoot:G,digest:U[1]}}async function c(q,G){await r(q,q);let J=Z.join(q,H);try{await D(J,q),await M(J,q,H)}catch(O){if(O.code==="ENOENT")throw O;throw O}return G(J)}async function jq(q,G){await u(q,async()=>{let J=i(q,G);if(J.storageRoot!==G)throw new X("storage-root-mismatch");await r(J.storageRoot,G);let O=Z.join(J.storageRoot,H);await l(O,J.storageRoot),await M(O,G,H);let Q=Z.join(O,J.digest);await l(Q,O),await M(Q,O,J.digest)})}async function s(q,G,J){return u(q,async()=>{let O=i(q,G);if(O.storageRoot!==G)throw new X("storage-root-mismatch");let Q=Z.join(O.storageRoot,H);await c(G,async($)=>{if($!==Q)throw new X("protected-root-shape")});let U=Z.join(Q,O.digest);return await D(U,Q),await M(U,Q,O.digest),J(U)})}async function l(q,G){try{let J=await L(q);o(J,q)}catch(J){if(J.code!=="ENOENT")throw J;await Cq(q,{recursive:!1,mode:448})}await D(q,G)}async function D(q,G){let J=await L(q);o(J,q),await M(q,G,Z.basename(q))}async function r(q,G){let J=await L(q);Dq(J,q),await uq(q,G)}function Dq(q,G){a(q,G);let J=t(q);if(process.platform!=="win32"&&((J&448)!==448||(J&18)!==0))throw new X("protected-root-mode")}function o(q,G){a(q,G);let J=t(q);if(process.platform!=="win32"&&J!==448)throw new X("protected-root-mode")}function a(q,G){if(q.isSymbolicLink()||!q.isDirectory())throw new X("protected-root-symlink");if(typeof process.getuid==="function"&&q.uid!==process.getuid())throw new X("protected-root-owner");if(G.includes(`..${Z.sep}`))throw new X("protected-root-shape")}function t(q){return typeof q.mode==="bigint"?Number(q.mode&BigInt(511)):q.mode&511}async function M(q,G,J){let O=await N(q),Q=await N(G),U=Z.join(Q,J);if(O!==U)throw new X("protected-root-realpath")}async function uq(q,G){let J=await N(q),O=await N(G);if(J!==O)throw new X("protected-root-realpath")}async function u(q,G){let J=h.getStore();if(J?.has(q))throw new X("state-root-reentry");let O=b.get(q)??Promise.resolve(),Q=new Set(J??[]);Q.add(q);let U=O.catch(()=>{return}).then(()=>h.run(Q,G)),$=U.then(()=>{return},()=>{return});b.set(q,$);try{return await U}finally{if(b.get(q)===$)b.delete(q)}}import{execSync as wq}from"node:child_process";import{createHash as zq}from"node:crypto";import{realpathSync as xq}from"node:fs";import{readdir as Iq}from"node:fs/promises";import*as Y from"node:path";function yq(q){return Y.resolve(q).replace(/[/\\]/g,"-").replace(/:/g,"_")}function vq(q){let G=q.replace(/_/g,":");if(G.startsWith("-"))G="/"+G.slice(1);return G.replace(/-/g,"/")}function Eq(q){let G=yq(q);return Y.join(F(),"projects",G)}function e(q){let G=Y.resolve(q),J=[];while(!0)try{return Y.resolve(xq.native(G),...J.reverse())}catch(O){let Q=O.code;if(Q!=="ENOENT"&&Q!=="ENOTDIR")throw O;let U=Y.dirname(G);if(U===G)return Y.resolve(q);J.push(Y.basename(G)),G=U}}function XG(q,G="projectPath"){if(!Y.isAbsolute(q))throw Error(`${G} must be absolute`);let J=Y.resolve(q),O=e(J),Q=Y.join(e(F()),"acp-remote-workspaces"),U=Y.relative(Q,O),$=U.split(Y.sep)[0];if(U===""||U!==".."&&!Y.isAbsolute(U)&&!U.startsWith(`..${Y.sep}`)&&$!==void 0&&/^[a-f0-9]{64}$/i.test($))throw Error(`${G} must reference a local workspace`);return J}function w(q){return Eq(q)}function T(q){return String(q)}function Wq(q){return typeof q==="string"&&q!=="."&&q!==".."&&/^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$/.test(q)}function B(q){if(!Wq(q))throw Error(`Invalid session ID: ${q}`)}function YG(q,G){return B(G),Y.join(w(q),`${G}.jsonl`)}function ZG(q,G){return B(G),Y.join(T(q),`${G}.jsonl`)}function _G(q,G){return B(G),Y.join(w(q),`${G}.inbox.json`)}function $G(q,G){return B(G),Y.join(T(q),`${G}.inbox.json`)}function FG(q,G){return B(G),Y.join(w(q),`${G}.goal.json`)}function HG(q,G){return B(G),Y.join(T(q),`${G}.goal.json`)}function KG(q,G){B(G);let J=zq("sha256").update(G).digest("hex");return Y.join(T(q),`.session-lease-${J}.lock`)}function MG(q){try{return wq("git rev-parse --abbrev-ref HEAD",{cwd:q,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()||void 0}catch{return}}async function kq(){try{let q=Y.join(F(),"projects");return(await Iq(q,{withFileTypes:!0})).filter((J)=>J.isDirectory()).map((J)=>J.name)}catch{return[]}}async function BG(){let q=Y.resolve(F()),G=await kq().then((O)=>O.map((Q)=>({storagePath:Y.join(q,"projects",Q),projectPath:vq(Q),kind:"local"}))).catch(()=>[]),J=await p().then((O)=>O.map((Q)=>({storagePath:String(Q),projectPath:String(Q),kind:"acp-remote"})));return[...G,...J]}
2
- export{F as ek,_ as fk,Qq as gk,Uq as hk,gq as ik,Rq as jk,C as kk,Sq as lk,X as mk,iq as nk,Tq as ok,cq as pk,sq as qk,rq as rk,oq as sk,aq as tk,tq as uk,p as vk,vq as wk,Eq as xk,XG as yk,Wq as zk,B as Ak,YG as Bk,ZG as Ck,_G as Dk,$G as Ek,FG as Fk,HG as Gk,KG as Hk,MG as Ik,BG as Jk};
2
+ export{F as fk,_ as gk,Qq as hk,Uq as ik,gq as jk,Rq as kk,C as lk,Sq as mk,X as nk,iq as ok,Tq as pk,cq as qk,sq as rk,rq as sk,oq as tk,aq as uk,tq as vk,p as wk,vq as xk,Eq as yk,XG as zk,Wq as Ak,B as Bk,YG as Ck,ZG as Dk,_G as Ek,$G as Fk,FG as Gk,HG as Hk,KG as Ik,MG as Jk,BG as Kk};
@@ -1,2 +1,2 @@
1
1
  var I=600000,r=30000,t=3600000,o=12,O=15000,P=60000;function R(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=30000&&_<=3600000}var C=1e4,M=1000,p=300000;function E(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=1000&&_<=300000}var T=1,s=16,n=Number.MAX_SAFE_INTEGER,D=180000,m=1000,x=600000,S=134217728,U=65536,V=134217728;function A(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=1&&_<=16}function w(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=1&&_<=n}function z(_){return _===0||typeof _==="number"&&Number.isSafeInteger(_)&&_>=1000&&_<=600000}function F(_){return typeof _==="number"&&Number.isSafeInteger(_)&&_>=65536&&_<=134217728}
2
- export{I as Zi,r as _i,t as $i,o as aj,O as bj,P as cj,R as dj,C as ej,M as fj,p as gj,E as hj,T as ij,s as jj,n as kj,D as lj,m as mj,x as nj,S as oj,U as pj,V as qj,A as rj,w as sj,z as tj,F as uj};
2
+ export{I as _i,r as $i,t as aj,o as bj,O as cj,P as dj,R as ej,C as fj,M as gj,p as hj,E as ij,T as jj,s as kj,n as lj,D as mj,m as nj,x as oj,S as pj,U as qj,V as rj,A as sj,w as tj,z as uj,F as vj};
@@ -1,2 +1,2 @@
1
1
  import{realpathSync as z}from"fs";import{cwd as F}from"process";var u=null;function G(){let m="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof z==="function"){let x=F();try{m=z(x).normalize("NFC")}catch{m=x.normalize("NFC")}}return{cwd:m,originalCwd:m,projectRoot:m}}function q(){if(!u)u=G();return u}function B(){return q().cwd}function N(m){q().cwd=m.normalize("NFC")}function D(){return q().originalCwd}function P(m){q().projectRoot=m.normalize("NFC")}import{AsyncLocalStorage as H}from"async_hooks";var I=new H;function J(){return I.getStore()??B()}function V(){try{return J()}catch{return D()}}
2
- export{N as Vi,D as Wi,P as Xi,V as Yi};
2
+ export{N as Wi,D as Xi,P as Yi,V as Zi};
@@ -1,4 +1,4 @@
1
- import{Vi as L,Yi as _}from"./chunk-m30qwpe9.js";import{execSync as F}from"child_process";import{existsSync as Q,readFileSync as O,realpathSync as b}from"fs";import*as V from"os";import*as H from"path";import{basename as J,isAbsolute as j,resolve as R}from"path";function G(z=_()){let q=z,M=f(q);return{workingDirectory:q,projectRoot:M,platform:`${V.platform()} (${V.arch()})`,nodeVersion:process.version,currentDate:new Date().toISOString().split("T")[0],homeDirectory:V.homedir()}}function Y(z,q){try{return F(q,{cwd:z,encoding:"utf8",stdio:["pipe","pipe","ignore"]}).trim()}catch{return null}}function v(z={}){let{includeGitSnapshot:q=!0,includeDirectoryListing:M=!0,workingDirectory:W}=z,B=G(W),$=Q(H.join(B.projectRoot,".git")),T=J(process.env.SHELL||"unknown"),A=["package.json","tsconfig.json","BLADE.md",".env.example"].filter((K)=>Q(H.join(B.projectRoot,K))).map((K)=>`- \`${H.join(B.projectRoot,K)}\``),N=`# Environment
1
+ import{Wi as L,Zi as _}from"./chunk-b22ab7yw.js";import{execSync as F}from"child_process";import{existsSync as Q,readFileSync as O,realpathSync as b}from"fs";import*as V from"os";import*as H from"path";import{basename as J,isAbsolute as j,resolve as R}from"path";function G(z=_()){let q=z,M=f(q);return{workingDirectory:q,projectRoot:M,platform:`${V.platform()} (${V.arch()})`,nodeVersion:process.version,currentDate:new Date().toISOString().split("T")[0],homeDirectory:V.homedir()}}function Y(z,q){try{return F(q,{cwd:z,encoding:"utf8",stdio:["pipe","pipe","ignore"]}).trim()}catch{return null}}function v(z={}){let{includeGitSnapshot:q=!0,includeDirectoryListing:M=!0,workingDirectory:W}=z,B=G(W),$=Q(H.join(B.projectRoot,".git")),T=J(process.env.SHELL||"unknown"),A=["package.json","tsconfig.json","BLADE.md",".env.example"].filter((K)=>Q(H.join(B.projectRoot,K))).map((K)=>`- \`${H.join(B.projectRoot,K)}\``),N=`# Environment
2
2
  You have been invoked in the following environment:
3
3
  - Primary working directory: ${B.workingDirectory}
4
4
  - Is a git repository: ${$?"true":"false"}
@@ -25,4 +25,4 @@ ${I.join(`
25
25
 
26
26
  Project root directory listing:
27
27
  ${K}`}return N}function f(z){let q=z,M=null;while(q!==H.dirname(q)){if(Q(H.join(q,".git")))return q;if(Q(H.join(q,".blade")))return q;if(Q(H.join(q,".claude")))return q;if(!M&&Q(H.join(q,"package.json")))M=q;q=H.dirname(q)}return M??z}function x(z,q){let M=j(z)?z:R(q||process.cwd(),z),W;try{W=b(M)}catch{W=M}L(W)}
28
- export{v as Gf,f as Hf,x as If};
28
+ export{v as Hf,f as If,x as Jf};