blade-code 0.10.0 → 0.10.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 (36) hide show
  1. package/dist/blade.js +2 -2
  2. package/dist/chunk-0h9m2fqd.js +160 -0
  3. package/dist/chunk-1wyfb6s7.js +1 -0
  4. package/dist/{chunk-ty2kc6kg.js → chunk-2km4w0ky.js} +1 -1
  5. package/dist/{chunk-2fdjn926.js → chunk-3vyjshqp.js} +1 -1
  6. package/dist/{chunk-61087jc8.js → chunk-5tfzehcg.js} +1 -1
  7. package/dist/{chunk-mvwp3c11.js → chunk-6sc78810.js} +1 -1
  8. package/dist/{chunk-bx50res5.js → chunk-8mepk4tc.js} +1 -1
  9. package/dist/{chunk-hzvp3bc1.js → chunk-bpzv054r.js} +1 -1
  10. package/dist/{chunk-7dcm1aqd.js → chunk-bqk3wqts.js} +1 -1
  11. package/dist/{chunk-949btxxx.js → chunk-cjdnfyy0.js} +3 -3
  12. package/dist/{chunk-vyq9r31h.js → chunk-ct32ngah.js} +1 -1
  13. package/dist/{chunk-bqdc3m0p.js → chunk-d8zj7c0t.js} +1 -1
  14. package/dist/{chunk-zcw7kyf4.js → chunk-e2ccyhgz.js} +1 -1
  15. package/dist/{chunk-w4qsayn6.js → chunk-gr5mzxdf.js} +1 -1
  16. package/dist/{chunk-0aj7gp37.js → chunk-k89phc5j.js} +1 -1
  17. package/dist/{chunk-z5ae4qvf.js → chunk-k9a1vb8a.js} +1 -1
  18. package/dist/{chunk-hh3xw391.js → chunk-m5tjrr5c.js} +1 -1
  19. package/dist/{chunk-vb0t2hhd.js → chunk-m9zpxzg2.js} +1 -1
  20. package/dist/{chunk-v4mr98vm.js → chunk-nqq4sbmv.js} +1 -1
  21. package/dist/{chunk-9jy87d0y.js → chunk-p7ppnewt.js} +1 -1
  22. package/dist/{chunk-93ptxa5p.js → chunk-qhf0knnx.js} +1 -1
  23. package/dist/{chunk-6qe5k7dw.js → chunk-rkzds6k8.js} +2 -2
  24. package/dist/{chunk-cznge1n7.js → chunk-tckfyfsx.js} +1 -1
  25. package/dist/{chunk-e3tk2jna.js → chunk-tm2ckreq.js} +1 -1
  26. package/dist/{chunk-mxhg6jt9.js → chunk-ws3gc024.js} +1 -1
  27. package/dist/{chunk-f8db8ftd.js → chunk-xhpezpjq.js} +1 -1
  28. package/dist/{chunk-yvah5h4x.js → chunk-y0hwzmdn.js} +1 -1
  29. package/dist/{chunk-8rg05w47.js → chunk-y5vq7gek.js} +1 -1
  30. package/dist/{chunk-7eptyk20.js → chunk-ydqeg4p8.js} +1 -1
  31. package/dist/{chunk-mwrn7mcr.js → chunk-yknrffcs.js} +1 -1
  32. package/dist/{chunk-9kd14cwq.js → chunk-ymmtbq2b.js} +1 -1
  33. package/dist/{chunk-3c5gvxr6.js → chunk-z2yzyr9h.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-fjp5tvh8.js +0 -1
  36. package/dist/chunk-wsqz3x2e.js +0 -161
@@ -1,4 +1,4 @@
1
- import{Pa as I2}from"./chunk-88vy9hh0.js";import{Qa as kJ,Ra as Z2,gb as H0}from"./chunk-bx50res5.js";import{mc as N2}from"./chunk-0h81hxkw.js";import{nc as E2,oc as zJ,pc as O2,rc as Q2}from"./chunk-af49jmns.js";import{_c as YJ}from"./chunk-mvwp3c11.js";import{dd as l}from"./chunk-jxv6r0c7.js";import{_d as P2}from"./chunk-4vaywb2r.js";import{he as d}from"./chunk-vjpd3nee.js";import{Ce as t0,Ee as l0}from"./chunk-8nm1hqr1.js";function _J(J){return J.role==="system"&&Array.isArray(J.content)}function IJ(J){if(J.role!=="system"||!J.metadata||Array.isArray(J.metadata))return!1;return typeof J.metadata==="object"&&J.metadata.contextualProjectRules===!0}class AJ{systemMessages;_contextualSystemMessages;_history;_pending=[];context;constructor(J,Q){this.context=J;let Z=J.messages.find(_J);if(this._contextualSystemMessages=J.messages.filter(IJ),Z)this.systemMessages=[Z,...this._contextualSystemMessages];else if(Q)this.systemMessages=[{role:"system",content:[{type:"text",text:Q,providerOptions:{anthropic:{cacheControl:{type:"ephemeral"}}}}]},...this._contextualSystemMessages];else this.systemMessages=[...this._contextualSystemMessages];this._history=J.messages.filter(($)=>!_J($)&&!IJ($))}get historyLength(){return this._history.length}get history(){return this._history}get pending(){return this._pending}toLLMMessages(){return[...this.systemMessages,...this._history,...this._pending]}getMessagesForLLM(){return this.toLLMMessages()}getHistory(){return this._history}appendPending(J){this._pending.push(J)}appendUser(J){this._pending.push(J)}appendAssistant(J){this._pending.push(J)}appendToolResult(J){this._pending.push(J)}appendContextualProjectInstructions(J){if(!IJ(J))throw Error("Contextual project instructions require safe metadata");this._contextualSystemMessages.push(J),this.systemMessages.push(J)}syncContextualSystemMessages(){let J=this.systemMessages.filter(_J);this.systemMessages.splice(0,this.systemMessages.length,...J,...this._contextualSystemMessages)}appendControl(J,Q){if(J==="system")throw Error("Cannot append system control message via appendControl. Use constructor for root system prompt.");this._pending.push(Q)}appendToHistory(J){this._history.push(J)}commitPending(){if(this._pending.length>0)this._history.push(...this._pending),this._pending=[]}replaceHistory(J){this._history=J.filter((Q)=>!_J(Q)&&!IJ(Q))}removeMessages(J){this._history=this._history.filter((Q)=>!J(Q)),this._pending=this._pending.filter((Q)=>!J(Q)),this._contextualSystemMessages=this._contextualSystemMessages.filter((Q)=>!J(Q)),this.syncContextualSystemMessages()}writeback(){this.commitPending(),this.context.messages=[...this._contextualSystemMessages,...this._history]}get hasSystemPrompt(){return this.systemMessages.length>0}}function h0(J){if(J.isSubagent)return"continue";if(!J.budget||J.budget<=0)return"continue";if(J.consecutiveContinuations>=3&&J.lastOutputDelta<500)return"stop";if(J.usage/J.budget>=0.9)return"stop";return"continue"}function T0(J){return{budget:J.budget,usage:0,consecutiveContinuations:0,lastOutputDelta:0,isSubagent:J.isSubagent??!1}}function R0(J,Q,Z){return{...J,usage:J.usage+Q,lastOutputDelta:Q,consecutiveContinuations:Z?J.consecutiveContinuations+1:0}}var $0=l("Agent"),p2=3;function W0(J,Q,Z){if(J!=="length")return{action:"none"};if(Q>=p2)return{action:"truncated"};if(h0(Z)==="stop")return $0.info("[Loop] Token budget: diminishing returns detected, skipping recovery"),{action:"budget_stop"};return{action:"recover"}}var d2=[/:\s*$/,/:\s*$/,/\.\.\.\s*$/,/让我(先|来|开始|查看|检查|修复)/,/Let me (first|start|check|look|fix)/i,/I('ll| will) (now |)(create|write|edit|update|modify|fix|add|implement)/i,/我(现在就|来|要)(创建|写入|编辑|修改|修复|添加|实现)/,/\d+\.\s+(First|Next|Then|Finally)/i],m2=/```[\s\S]{50,}```/,x0="请执行你提到的操作,不要只是描述。使用 Edit/Write/ApplyPatch/Bash 工具来实际修改文件。",g2=2;function G0(J,Q,Z=!0){if(!J||Q>=g2)return{action:"none"};if(!Z&&m2.test(J))return{action:"retry",prompt:x0};let $=J.slice(-200),z=$.match(/```/g);if(z&&z.length%2!==0)return{action:"none"};if(d2.some((G)=>G.test($)))return{action:"retry",prompt:x0};return{action:"none"}}var c2=[/\b(?:run|execute|rerun|re-run)\b[\s\S]{0,60}\b(?:tests?|test suite|lint|type-?check|build)\b/i,/\b(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|type-?check)\b/i,/(?:运行|执行|跑|重新运行).{0,30}(?:测试|单测|集成测试|检查|构建)/],u2=/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|type-?check)\b|(?:^|\s)(?:node|bun)\s+--test\b|(?:^|\s)(?:vitest|jest|pytest|go\s+test|cargo\s+test|tsc)\b/i,C0={test:/\b(?:tests?|test suite)\b|(?:测试|单测|集成测试)/i,lint:/\blint(?:ing)?\b/i,"type-check":/\btype[\s-]?check(?:ing)?\b|\btsc\b|类型检查/i,build:/\bbuild\b|构建/i},i2={test:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?test\b|(?:^|\s)(?:node|bun)\s+--test\b|(?:^|\s)(?:vitest|jest|pytest|go\s+test|cargo\s+test)\b/i,lint:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?lint\b/i,"type-check":/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?type-?check\b|(?:^|\s)tsc\b/i,build:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?build\b/i},l2="The user explicitly required verification, but it has not run successfully. Do not finish or explain. Your next action must be a Bash tool call that runs the requested test, lint, type-check, or build command. Inspect the command result and fix any failure before finishing.",r2="Required verification did not run successfully before the retry limit.",n2=3;function z0(J){return u2.test(J)}function d0(J,Q,Z){if(!Z.success)return;if(["Edit","Write","ApplyPatch","NotebookEdit"].includes(Q)){J.clear();return}if(Q==="Bash"&&typeof Z.metadata?.command==="string"&&Z.metadata.exit_code===0&&z0(Z.metadata.command)){J.add(Z.metadata.command);return}if(!["Task","TaskOutput"].includes(Q))return;let $=Z.metadata?.verificationCommands;if(!Array.isArray($))return;for(let z of $)if(typeof z==="string"&&z0(z))J.add(z)}function X0(J,Q,Z){if(!J||!c2.some((V)=>V.test(J)))return{action:"none"};let $=Object.keys(C0).filter((V)=>C0[V].test(J)),z=[...Q],W=$.filter((V)=>!z.some((F)=>i2[V].test(F)));if($.length>0?W.length===0:z.some(z0))return{action:"none"};if(Z>=n2)return{action:"fail",message:r2};let X=$.length>1&&W.length>0?` Missing successful verification categories: ${W.join(", ")}.`:"";return{action:"retry",prompt:`${l2}${X}`}}var a2=[/\bdelegate\b[\s\S]{0,120}\b(?:Task tool|subagent|agent)\b/i,/\b(?:call|use|invoke)\b[\s\S]{0,80}\bTask tool\b/i,/(?:委派|交给|调用|使用).{0,60}(?:Task|子代理|子智能体)/],o2=[/\b(?:do not|don't|never)\s+(?:delegate|call|use|invoke)\b/i,/(?:不要|禁止|无需)(?:委派|调用|使用).{0,20}(?:Task|子代理|子智能体)?/],s2=[/\b(?:call|use|invoke)\b[\s\S]{0,30}\bTask(?: tool)?\b[\s\S]{0,30}\bexactly once\b/i,/\bexactly once\b[\s\S]{0,30}\b(?:call|use|invoke)\b[\s\S]{0,30}\bTask(?: tool)?\b/i,/\bexactly one\b[\s\S]{0,30}\bTask(?: tool)? calls?\b/i,/(?:Task|子代理).{0,20}(?:恰好|仅|只)(?:调用|使用)?一次/,/(?:恰好|仅|只)(?:调用|使用)?一次.{0,20}(?:Task|子代理)/],t2=[/\b(?:do not|don't|never)\s+(?:call|use|invoke)\s+(?:the\s+)?Task\b[\s\S]{0,30}\bexactly once\b/i,/\bTask\b[\s\S]{0,30}\b(?:does not|doesn't|need not)\b[\s\S]{0,30}\bexactly once\b/i,/\bmultiple\s+Task(?: tool)?\s+calls?\s+(?:are\s+)?allowed\b/i,/(?:不要|禁止).{0,12}(?:Task|子代理).{0,12}(?:恰好|仅|只)(?:调用|使用)?一次/];function e2(J){if(typeof J!=="string")return;if(t2.some((Q)=>Q.test(J)))return"multiple-allowed";return s2.some((Q)=>Q.test(J))?"required":void 0}function yJ(J){for(let Q of J){let Z=e2(Q);if(Z!==void 0)return Z==="required"}return!1}var JQ="The user explicitly required delegation, but no Task tool call completed successfully. Do not solve the task directly or explain. Your next action must be a Task tool call using the requested subagent.",QQ="Required delegation did not complete before the retry limit.",ZQ=3;function m0(J,Q,Z){let $=(typeof J==="string"?[J]:J??[]).map((G)=>G.trim()).filter(Boolean),z=yJ($),W=!1;if(!z)for(let G of $){if(o2.some((X)=>X.test(G)))break;if(a2.some((X)=>X.test(G))){W=!0;break}}if($.length===0||!z&&!W||Q.has("Task"))return{action:"none"};if(Z>=ZQ)return{action:"fail",message:QQ};return{action:"retry",prompt:JQ}}var $Q=[/\b(?:use|create|enter|start|work\s+(?:in|inside))\b.{0,60}\bworktree\b/i,/(?:使用|创建|进入).{0,30}(?:worktree|工作树)/i],zQ=[/\b(?:exit|leave)\b.{0,40}\bworktree\b/i,/\bworktree\b.{0,60}\b(?:action\s+)?(?:keep|remove)\b/i,/(?:退出|离开).{0,30}(?:worktree|工作树)/i],WQ=[/\b(?:do not|don't|never|must not|should not)\b[^.!?;\n]{0,80}\b(?:git\s+)?worktree\b/gi,/\bwithout\b[^.!?;\n]{0,60}\b(?:git\s+)?worktree\b/gi,/(?:不要|禁止|不得|无需)[^。!?;\n]{0,50}(?:worktree|工作树)/gi];function g0(J){return WQ.reduce((Q,Z)=>Q.replace(Z," "),J)}function vJ(J){if(typeof J!=="string")return!1;let Q=g0(J);return $Q.some((Z)=>Z.test(Q))}var GQ="The user explicitly required git worktree isolation, but EnterWorktree has not completed successfully. Do not continue in the original workspace. Your next action must be an EnterWorktree tool call. Wait for its result before using file or Bash tools.",XQ="The user explicitly required leaving the managed worktree, but ExitWorktree has not completed successfully. Do not finish or explain. Your next action must be an ExitWorktree tool call using the action requested by the user.",VQ="Required worktree lifecycle did not complete before the retry limit.",YQ=3;function c0(J,Q,Z){if(!J)return{action:"none"};let $=g0(J);if(!vJ($))return{action:"none"};let z=zQ.some((G)=>G.test($));if(Q.has("TaskWorktree"))return{action:"none"};let W=!Q.has("EnterWorktree")?"EnterWorktree":z&&!Q.has("ExitWorktree")?"ExitWorktree":void 0;if(!W)return{action:"none"};if(Z>=YQ)return{action:"fail",message:VQ};return{action:"retry",tool:W,prompt:W==="EnterWorktree"?GQ:XQ}}var p0=30000;async function V0(J){try{let Z=YJ.getInstance().executeStopHooks({projectDir:J.workspaceRoot??d(),sessionId:J.sessionId,permissionMode:J.permissionMode,reason:J.reason,abortSignal:J.abortSignal}),$,z=new Promise((W)=>{$=setTimeout(()=>W("timeout"),p0)});try{let W=await Promise.race([Z,z]);if(W==="timeout")return $0.warn(`[Loop] Stop hook 超时 (${p0}ms),按 shouldStop: true 处理`),{action:"stop"};let G=W;if(!G.shouldStop)return{action:"continue",reason:G.continueReason};return{action:"stop"}}finally{clearTimeout($)}}catch(Q){return $0.warn("[Loop] Stop hook execution failed:",Q),{action:"stop"}}}async function HQ(J,Q){let Z;while(!(Z=await J.next()).done)if(Q)await Q(Z.value);return Z.value}var KQ=[/<system-reminder>[\s\S]*?<\/system-reminder>/gi,/<file[^>]*>[\s\S]*?<\/file>/gi,/<hooks_context>[\s\S]*?<\/hooks_context>/gi,/<[^>]+>/g];function DQ(J){if(typeof J==="string")return J;if(Array.isArray(J))return J.map((Q)=>{if(typeof Q==="string")return Q;if(Q&&typeof Q==="object"&&"text"in Q){let Z=Q.text;return typeof Z==="string"?Z:""}return""}).join(" ");return""}function BQ(J){let Q=J;for(let V of KQ)Q=Q.replace(V," ");Q=Q.replace(/^\s*\/[a-zA-Z][\w-]*\s+/,"");let Z=Q.replace(/\s+/g," ").trim();if(!Z)return"";let $=Z.match(/^(.+?)(?:[.!?]\s|[。!?](?=\S|$)|$)/),z=$&&$[1].length>=6?$[1]:Z;if(z=z.trim().replace(/[\s.。!!??,,;;::-]+$/,""),z.length<=60)return z;let W=z.slice(0,60),G=W.lastIndexOf(" ");return`${(G>36?W.slice(0,G):W).trimEnd()}…`}function u0(J){return BQ(DQ(J))}import{EventEmitter as jQ}from"events";import i0 from"node:path";function Y0(J){if(l0(J.sessionId),!i0.isAbsolute(J.projectPath))throw Error("projectPath must be absolute");return{sessionId:J.sessionId,projectPath:i0.resolve(J.projectPath)}}function bZ(J){let Q=Y0(J);return JSON.stringify([Q.projectPath,Q.sessionId])}class HJ extends jQ{static instance;constructor(){super();this.setMaxListeners(100)}static getInstance(){if(!HJ.instance)HJ.instance=new HJ;return HJ.instance}publish(J,Q,Z,$){let z=Y0(J);this.emit("event",{sessionId:z.sessionId,projectPath:z.projectPath,type:Q,...$!==void 0?{seq:$}:{},properties:Z})}subscribe(J){return this.on("event",J),()=>this.off("event",J)}}var r0=HJ.getInstance();var o=l("Agent"),UJ=new Set;async function LQ(J,Q){let Z=J.sessionId;if(!Z||J.subagentInfo)return;if(UJ.has(Z))return;if(UJ.size>=5000)UJ.clear();UJ.add(Z);try{let $=J.workspaceRoot,z=await H0.findSessionMetadata(Z,$);if(!z)return;if(z.title&&z.title.trim())return;let W=u0(Q);if(!W)return;await H0.updateSessionMetadata(Z,z.projectPath,{title:W}),r0.publish({sessionId:Z,projectPath:z.projectPath},"session.updated",{title:W})}catch($){o.debug?.("[Loop] 自动生成会话标题失败:",$)}}var K0=`<turn_aborted>
1
+ import{Pa as I2}from"./chunk-88vy9hh0.js";import{Qa as kJ,Ra as Z2,gb as H0}from"./chunk-8mepk4tc.js";import{mc as N2}from"./chunk-0h81hxkw.js";import{nc as E2,oc as zJ,pc as O2,rc as Q2}from"./chunk-af49jmns.js";import{_c as YJ}from"./chunk-6sc78810.js";import{dd as l}from"./chunk-jxv6r0c7.js";import{_d as P2}from"./chunk-4vaywb2r.js";import{he as d}from"./chunk-vjpd3nee.js";import{Ce as t0,Ee as l0}from"./chunk-8nm1hqr1.js";function _J(J){return J.role==="system"&&Array.isArray(J.content)}function IJ(J){if(J.role!=="system"||!J.metadata||Array.isArray(J.metadata))return!1;return typeof J.metadata==="object"&&J.metadata.contextualProjectRules===!0}class AJ{systemMessages;_contextualSystemMessages;_history;_pending=[];context;constructor(J,Q){this.context=J;let Z=J.messages.find(_J);if(this._contextualSystemMessages=J.messages.filter(IJ),Z)this.systemMessages=[Z,...this._contextualSystemMessages];else if(Q)this.systemMessages=[{role:"system",content:[{type:"text",text:Q,providerOptions:{anthropic:{cacheControl:{type:"ephemeral"}}}}]},...this._contextualSystemMessages];else this.systemMessages=[...this._contextualSystemMessages];this._history=J.messages.filter(($)=>!_J($)&&!IJ($))}get historyLength(){return this._history.length}get history(){return this._history}get pending(){return this._pending}toLLMMessages(){return[...this.systemMessages,...this._history,...this._pending]}getMessagesForLLM(){return this.toLLMMessages()}getHistory(){return this._history}appendPending(J){this._pending.push(J)}appendUser(J){this._pending.push(J)}appendAssistant(J){this._pending.push(J)}appendToolResult(J){this._pending.push(J)}appendContextualProjectInstructions(J){if(!IJ(J))throw Error("Contextual project instructions require safe metadata");this._contextualSystemMessages.push(J),this.systemMessages.push(J)}syncContextualSystemMessages(){let J=this.systemMessages.filter(_J);this.systemMessages.splice(0,this.systemMessages.length,...J,...this._contextualSystemMessages)}appendControl(J,Q){if(J==="system")throw Error("Cannot append system control message via appendControl. Use constructor for root system prompt.");this._pending.push(Q)}appendToHistory(J){this._history.push(J)}commitPending(){if(this._pending.length>0)this._history.push(...this._pending),this._pending=[]}replaceHistory(J){this._history=J.filter((Q)=>!_J(Q)&&!IJ(Q))}removeMessages(J){this._history=this._history.filter((Q)=>!J(Q)),this._pending=this._pending.filter((Q)=>!J(Q)),this._contextualSystemMessages=this._contextualSystemMessages.filter((Q)=>!J(Q)),this.syncContextualSystemMessages()}writeback(){this.commitPending(),this.context.messages=[...this._contextualSystemMessages,...this._history]}get hasSystemPrompt(){return this.systemMessages.length>0}}function h0(J){if(J.isSubagent)return"continue";if(!J.budget||J.budget<=0)return"continue";if(J.consecutiveContinuations>=3&&J.lastOutputDelta<500)return"stop";if(J.usage/J.budget>=0.9)return"stop";return"continue"}function T0(J){return{budget:J.budget,usage:0,consecutiveContinuations:0,lastOutputDelta:0,isSubagent:J.isSubagent??!1}}function R0(J,Q,Z){return{...J,usage:J.usage+Q,lastOutputDelta:Q,consecutiveContinuations:Z?J.consecutiveContinuations+1:0}}var $0=l("Agent"),p2=3;function W0(J,Q,Z){if(J!=="length")return{action:"none"};if(Q>=p2)return{action:"truncated"};if(h0(Z)==="stop")return $0.info("[Loop] Token budget: diminishing returns detected, skipping recovery"),{action:"budget_stop"};return{action:"recover"}}var d2=[/:\s*$/,/:\s*$/,/\.\.\.\s*$/,/让我(先|来|开始|查看|检查|修复)/,/Let me (first|start|check|look|fix)/i,/I('ll| will) (now |)(create|write|edit|update|modify|fix|add|implement)/i,/我(现在就|来|要)(创建|写入|编辑|修改|修复|添加|实现)/,/\d+\.\s+(First|Next|Then|Finally)/i],m2=/```[\s\S]{50,}```/,x0="请执行你提到的操作,不要只是描述。使用 Edit/Write/ApplyPatch/Bash 工具来实际修改文件。",g2=2;function G0(J,Q,Z=!0){if(!J||Q>=g2)return{action:"none"};if(!Z&&m2.test(J))return{action:"retry",prompt:x0};let $=J.slice(-200),z=$.match(/```/g);if(z&&z.length%2!==0)return{action:"none"};if(d2.some((G)=>G.test($)))return{action:"retry",prompt:x0};return{action:"none"}}var c2=[/\b(?:run|execute|rerun|re-run)\b[\s\S]{0,60}\b(?:tests?|test suite|lint|type-?check|build)\b/i,/\b(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|type-?check)\b/i,/(?:运行|执行|跑|重新运行).{0,30}(?:测试|单测|集成测试|检查|构建)/],u2=/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|type-?check)\b|(?:^|\s)(?:node|bun)\s+--test\b|(?:^|\s)(?:vitest|jest|pytest|go\s+test|cargo\s+test|tsc)\b/i,C0={test:/\b(?:tests?|test suite)\b|(?:测试|单测|集成测试)/i,lint:/\blint(?:ing)?\b/i,"type-check":/\btype[\s-]?check(?:ing)?\b|\btsc\b|类型检查/i,build:/\bbuild\b|构建/i},i2={test:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?test\b|(?:^|\s)(?:node|bun)\s+--test\b|(?:^|\s)(?:vitest|jest|pytest|go\s+test|cargo\s+test)\b/i,lint:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?lint\b/i,"type-check":/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?type-?check\b|(?:^|\s)tsc\b/i,build:/(?:^|\s)(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?build\b/i},l2="The user explicitly required verification, but it has not run successfully. Do not finish or explain. Your next action must be a Bash tool call that runs the requested test, lint, type-check, or build command. Inspect the command result and fix any failure before finishing.",r2="Required verification did not run successfully before the retry limit.",n2=3;function z0(J){return u2.test(J)}function d0(J,Q,Z){if(!Z.success)return;if(["Edit","Write","ApplyPatch","NotebookEdit"].includes(Q)){J.clear();return}if(Q==="Bash"&&typeof Z.metadata?.command==="string"&&Z.metadata.exit_code===0&&z0(Z.metadata.command)){J.add(Z.metadata.command);return}if(!["Task","TaskOutput"].includes(Q))return;let $=Z.metadata?.verificationCommands;if(!Array.isArray($))return;for(let z of $)if(typeof z==="string"&&z0(z))J.add(z)}function X0(J,Q,Z){if(!J||!c2.some((V)=>V.test(J)))return{action:"none"};let $=Object.keys(C0).filter((V)=>C0[V].test(J)),z=[...Q],W=$.filter((V)=>!z.some((F)=>i2[V].test(F)));if($.length>0?W.length===0:z.some(z0))return{action:"none"};if(Z>=n2)return{action:"fail",message:r2};let X=$.length>1&&W.length>0?` Missing successful verification categories: ${W.join(", ")}.`:"";return{action:"retry",prompt:`${l2}${X}`}}var a2=[/\bdelegate\b[\s\S]{0,120}\b(?:Task tool|subagent|agent)\b/i,/\b(?:call|use|invoke)\b[\s\S]{0,80}\bTask tool\b/i,/(?:委派|交给|调用|使用).{0,60}(?:Task|子代理|子智能体)/],o2=[/\b(?:do not|don't|never)\s+(?:delegate|call|use|invoke)\b/i,/(?:不要|禁止|无需)(?:委派|调用|使用).{0,20}(?:Task|子代理|子智能体)?/],s2=[/\b(?:call|use|invoke)\b[\s\S]{0,30}\bTask(?: tool)?\b[\s\S]{0,30}\bexactly once\b/i,/\bexactly once\b[\s\S]{0,30}\b(?:call|use|invoke)\b[\s\S]{0,30}\bTask(?: tool)?\b/i,/\bexactly one\b[\s\S]{0,30}\bTask(?: tool)? calls?\b/i,/(?:Task|子代理).{0,20}(?:恰好|仅|只)(?:调用|使用)?一次/,/(?:恰好|仅|只)(?:调用|使用)?一次.{0,20}(?:Task|子代理)/],t2=[/\b(?:do not|don't|never)\s+(?:call|use|invoke)\s+(?:the\s+)?Task\b[\s\S]{0,30}\bexactly once\b/i,/\bTask\b[\s\S]{0,30}\b(?:does not|doesn't|need not)\b[\s\S]{0,30}\bexactly once\b/i,/\bmultiple\s+Task(?: tool)?\s+calls?\s+(?:are\s+)?allowed\b/i,/(?:不要|禁止).{0,12}(?:Task|子代理).{0,12}(?:恰好|仅|只)(?:调用|使用)?一次/];function e2(J){if(typeof J!=="string")return;if(t2.some((Q)=>Q.test(J)))return"multiple-allowed";return s2.some((Q)=>Q.test(J))?"required":void 0}function yJ(J){for(let Q of J){let Z=e2(Q);if(Z!==void 0)return Z==="required"}return!1}var JQ="The user explicitly required delegation, but no Task tool call completed successfully. Do not solve the task directly or explain. Your next action must be a Task tool call using the requested subagent.",QQ="Required delegation did not complete before the retry limit.",ZQ=3;function m0(J,Q,Z){let $=(typeof J==="string"?[J]:J??[]).map((G)=>G.trim()).filter(Boolean),z=yJ($),W=!1;if(!z)for(let G of $){if(o2.some((X)=>X.test(G)))break;if(a2.some((X)=>X.test(G))){W=!0;break}}if($.length===0||!z&&!W||Q.has("Task"))return{action:"none"};if(Z>=ZQ)return{action:"fail",message:QQ};return{action:"retry",prompt:JQ}}var $Q=[/\b(?:use|create|enter|start|work\s+(?:in|inside))\b.{0,60}\bworktree\b/i,/(?:使用|创建|进入).{0,30}(?:worktree|工作树)/i],zQ=[/\b(?:exit|leave)\b.{0,40}\bworktree\b/i,/\bworktree\b.{0,60}\b(?:action\s+)?(?:keep|remove)\b/i,/(?:退出|离开).{0,30}(?:worktree|工作树)/i],WQ=[/\b(?:do not|don't|never|must not|should not)\b[^.!?;\n]{0,80}\b(?:git\s+)?worktree\b/gi,/\bwithout\b[^.!?;\n]{0,60}\b(?:git\s+)?worktree\b/gi,/(?:不要|禁止|不得|无需)[^。!?;\n]{0,50}(?:worktree|工作树)/gi];function g0(J){return WQ.reduce((Q,Z)=>Q.replace(Z," "),J)}function vJ(J){if(typeof J!=="string")return!1;let Q=g0(J);return $Q.some((Z)=>Z.test(Q))}var GQ="The user explicitly required git worktree isolation, but EnterWorktree has not completed successfully. Do not continue in the original workspace. Your next action must be an EnterWorktree tool call. Wait for its result before using file or Bash tools.",XQ="The user explicitly required leaving the managed worktree, but ExitWorktree has not completed successfully. Do not finish or explain. Your next action must be an ExitWorktree tool call using the action requested by the user.",VQ="Required worktree lifecycle did not complete before the retry limit.",YQ=3;function c0(J,Q,Z){if(!J)return{action:"none"};let $=g0(J);if(!vJ($))return{action:"none"};let z=zQ.some((G)=>G.test($));if(Q.has("TaskWorktree"))return{action:"none"};let W=!Q.has("EnterWorktree")?"EnterWorktree":z&&!Q.has("ExitWorktree")?"ExitWorktree":void 0;if(!W)return{action:"none"};if(Z>=YQ)return{action:"fail",message:VQ};return{action:"retry",tool:W,prompt:W==="EnterWorktree"?GQ:XQ}}var p0=30000;async function V0(J){try{let Z=YJ.getInstance().executeStopHooks({projectDir:J.workspaceRoot??d(),sessionId:J.sessionId,permissionMode:J.permissionMode,reason:J.reason,abortSignal:J.abortSignal}),$,z=new Promise((W)=>{$=setTimeout(()=>W("timeout"),p0)});try{let W=await Promise.race([Z,z]);if(W==="timeout")return $0.warn(`[Loop] Stop hook 超时 (${p0}ms),按 shouldStop: true 处理`),{action:"stop"};let G=W;if(!G.shouldStop)return{action:"continue",reason:G.continueReason};return{action:"stop"}}finally{clearTimeout($)}}catch(Q){return $0.warn("[Loop] Stop hook execution failed:",Q),{action:"stop"}}}async function HQ(J,Q){let Z;while(!(Z=await J.next()).done)if(Q)await Q(Z.value);return Z.value}var KQ=[/<system-reminder>[\s\S]*?<\/system-reminder>/gi,/<file[^>]*>[\s\S]*?<\/file>/gi,/<hooks_context>[\s\S]*?<\/hooks_context>/gi,/<[^>]+>/g];function DQ(J){if(typeof J==="string")return J;if(Array.isArray(J))return J.map((Q)=>{if(typeof Q==="string")return Q;if(Q&&typeof Q==="object"&&"text"in Q){let Z=Q.text;return typeof Z==="string"?Z:""}return""}).join(" ");return""}function BQ(J){let Q=J;for(let V of KQ)Q=Q.replace(V," ");Q=Q.replace(/^\s*\/[a-zA-Z][\w-]*\s+/,"");let Z=Q.replace(/\s+/g," ").trim();if(!Z)return"";let $=Z.match(/^(.+?)(?:[.!?]\s|[。!?](?=\S|$)|$)/),z=$&&$[1].length>=6?$[1]:Z;if(z=z.trim().replace(/[\s.。!!??,,;;::-]+$/,""),z.length<=60)return z;let W=z.slice(0,60),G=W.lastIndexOf(" ");return`${(G>36?W.slice(0,G):W).trimEnd()}…`}function u0(J){return BQ(DQ(J))}import{EventEmitter as jQ}from"events";import i0 from"node:path";function Y0(J){if(l0(J.sessionId),!i0.isAbsolute(J.projectPath))throw Error("projectPath must be absolute");return{sessionId:J.sessionId,projectPath:i0.resolve(J.projectPath)}}function bZ(J){let Q=Y0(J);return JSON.stringify([Q.projectPath,Q.sessionId])}class HJ extends jQ{static instance;constructor(){super();this.setMaxListeners(100)}static getInstance(){if(!HJ.instance)HJ.instance=new HJ;return HJ.instance}publish(J,Q,Z,$){let z=Y0(J);this.emit("event",{sessionId:z.sessionId,projectPath:z.projectPath,type:Q,...$!==void 0?{seq:$}:{},properties:Z})}subscribe(J){return this.on("event",J),()=>this.off("event",J)}}var r0=HJ.getInstance();var o=l("Agent"),UJ=new Set;async function LQ(J,Q){let Z=J.sessionId;if(!Z||J.subagentInfo)return;if(UJ.has(Z))return;if(UJ.size>=5000)UJ.clear();UJ.add(Z);try{let $=J.workspaceRoot,z=await H0.findSessionMetadata(Z,$);if(!z)return;if(z.title&&z.title.trim())return;let W=u0(Q);if(!W)return;await H0.updateSessionMetadata(Z,z.projectPath,{title:W}),r0.publish({sessionId:Z,projectPath:z.projectPath},"session.updated",{title:W})}catch($){o.debug?.("[Loop] 自动生成会话标题失败:",$)}}var K0=`<turn_aborted>
2
2
  The previous turn was interrupted. Commands or tool calls may have partially completed; inspect the workspace and running processes before retrying.
3
3
  </turn_aborted>`;function ZJ(J){return J.executionEngine?.getContextManager()}async function r(J,Q,Z,$=null,z){try{let W=ZJ(J),G=typeof Z==="string"?Z.trim()!=="":Z.some((X)=>X.type==="text"?X.text.trim()!=="":!0);if(W&&Q.sessionId&&G){let X=await W.saveMessage(Q.sessionId,"user",Z,$,z,Q.subagentInfo);return LQ(Q,Z),X}}catch(W){o.warn("[Loop] 保存用户消息失败:",W)}return null}async function T(J,Q,Z,$,z){try{let W=ZJ(J);if(W&&Q.sessionId&&(Z.trim()||z?.trim()))return await W.saveMessage(Q.sessionId,"assistant",Z,$,void 0,Q.subagentInfo,z)}catch(W){o.warn("[Loop] 保存助手消息失败:",W)}return null}async function n0(J,Q,Z){try{let $=ZJ(J);if($&&Q.sessionId)return await $.saveMessage(Q.sessionId,"system",K0,Z,void 0,Q.subagentInfo)}catch($){o.warn("[Loop] 保存中断边界失败:",$)}return null}async function a0(J,Q,Z,$,z){try{let W=ZJ(J);if(!W||!Q.sessionId||Z.length===0)return null;return await W.saveMessage(Q.sessionId,"system",`<contextual-project-instructions-ref count="${Z.length}" />`,z,{contextualProjectRules:!0,ruleReferences:JSON.parse(JSON.stringify(Z.map((G)=>({...G})))),triggerPaths:[...$]},Q.subagentInfo)}catch(W){o.warn("[Loop] 保存 contextual project rules provenance 失败:",W)}return null}async function D0(J,Q,Z,$,z){try{let W=ZJ(J);if(W&&Q.sessionId)return await W.saveToolUse(Q.sessionId,Z,$,z,Q.subagentInfo)}catch(W){o.warn("[Loop] 保存工具调用失败:",W)}return null}async function fJ(J,Q,Z,$,z,W,G,X,V){try{let F=ZJ(J);if(F&&Q.sessionId)return await F.saveToolResult(Q.sessionId,Z,$,z,W,G,Q.subagentInfo,X,V)}catch(F){o.warn("[Loop] 保存工具结果失败:",F)}return null}async function MJ(J,Q,Z,$){try{let z=ZJ(J);if(z&&Q.sessionId)return await z.saveCompaction(Q.sessionId,Z,$,null)}catch(z){o.warn("[Loop] 保存压缩数据失败:",z)}return null}import{promises as IQ}from"node:fs";import AQ from"node:path";import{nanoid as s}from"nanoid";import*as k from"node:fs/promises";import*as $J from"node:path";var o0={enabled:!0,maxIndexLines:200};var FQ="memory",s0="MEMORY.md";class B0{memoryDir;config;initialized=!1;constructor(J,Q,Z){if(Z)this.memoryDir=Z;else{let $=t0(J);this.memoryDir=$J.join($,FQ)}this.config={...o0,...Q}}async initialize(){if(this.initialized)return;await k.mkdir(this.memoryDir,{recursive:!0}),this.initialized=!0}async loadIndex(){if(!this.config.enabled)return null;await this.initialize();let J=$J.join(this.memoryDir,s0);try{let Q=await k.readFile(J,"utf-8");if(!Q.trim())return null;let Z=Q.split(`
4
4
  `),z=Z.slice(0,this.config.maxIndexLines).join(`
@@ -1 +1 @@
1
- import{a as y,b as A,c as C,d as D}from"./chunk-9jy87d0y.js";import"./chunk-wvj9h7mb.js";import"./chunk-t8q9ks7e.js";import"./chunk-zcw7kyf4.js";import"./chunk-949btxxx.js";import"./chunk-mxhg6jt9.js";import"./chunk-8rg05w47.js";import"./chunk-88vy9hh0.js";import"./chunk-bx50res5.js";import"./chunk-44wkjs2j.js";import"./chunk-kq5my0yy.js";import{ac as q}from"./chunk-vb0t2hhd.js";import"./chunk-gafbzeyk.js";import"./chunk-0h81hxkw.js";import"./chunk-af49jmns.js";import"./chunk-px5ck9pf.js";import"./chunk-fjw32ex5.js";import"./chunk-z5ae4qvf.js";import"./chunk-e3tk2jna.js";import"./chunk-d9ddpapp.js";import"./chunk-sndbq5xt.js";import"./chunk-mvwp3c11.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-hzvp3bc1.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-0aj7gp37.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";import H from"chalk";var R={command:"serve",describe:"Start a headless Blade server (no browser)",builder:y,handler:async(E)=>{let f=A(E);if(await q(),!process.env.BLADE_SERVER_PASSWORD)console.log(H.yellow("Warning: BLADE_SERVER_PASSWORD is not set; server is unsecured."));let b=await D.listenAsync(f);if(console.log(`Blade server listening on http://${b.hostname}:${b.port}`),f.hostname==="0.0.0.0"){let F=C();for(let G of F)console.log(` Network: http://${G}:${b.port}`)}await new Promise(()=>{}),await b.stop()}};export{R as serveCommand};
1
+ import{a as y,b as A,c as C,d as D}from"./chunk-p7ppnewt.js";import"./chunk-wvj9h7mb.js";import"./chunk-t8q9ks7e.js";import"./chunk-e2ccyhgz.js";import"./chunk-cjdnfyy0.js";import"./chunk-ws3gc024.js";import"./chunk-y5vq7gek.js";import"./chunk-88vy9hh0.js";import"./chunk-8mepk4tc.js";import"./chunk-44wkjs2j.js";import"./chunk-kq5my0yy.js";import{ac as q}from"./chunk-m9zpxzg2.js";import"./chunk-gafbzeyk.js";import"./chunk-0h81hxkw.js";import"./chunk-af49jmns.js";import"./chunk-px5ck9pf.js";import"./chunk-fjw32ex5.js";import"./chunk-k9a1vb8a.js";import"./chunk-tm2ckreq.js";import"./chunk-d9ddpapp.js";import"./chunk-sndbq5xt.js";import"./chunk-6sc78810.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-bpzv054r.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-k89phc5j.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";import H from"chalk";var R={command:"serve",describe:"Start a headless Blade server (no browser)",builder:y,handler:async(E)=>{let f=A(E);if(await q(),!process.env.BLADE_SERVER_PASSWORD)console.log(H.yellow("Warning: BLADE_SERVER_PASSWORD is not set; server is unsecured."));let b=await D.listenAsync(f);if(console.log(`Blade server listening on http://${b.hostname}:${b.port}`),f.hostname==="0.0.0.0"){let F=C();for(let G of F)console.log(` Network: http://${G}:${b.port}`)}await new Promise(()=>{}),await b.stop()}};export{R as serveCommand};
@@ -1 +1 @@
1
- import{Nc as a,Oc as b,Pc as c,Qc as d,Rc as e}from"./chunk-e3tk2jna.js";import"./chunk-d9ddpapp.js";import"./chunk-sndbq5xt.js";import"./chunk-mvwp3c11.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-hzvp3bc1.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-0aj7gp37.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{d as snapshotWorkspaceAgentResources,c as resolveWorkspaceAgentResources,e as resetWorkspaceAgentResources,a as refreshWorkspaceCommunicationStyles,b as configureInvocationPluginDirs};
1
+ import{Nc as a,Oc as b,Pc as c,Qc as d,Rc as e}from"./chunk-tm2ckreq.js";import"./chunk-d9ddpapp.js";import"./chunk-sndbq5xt.js";import"./chunk-6sc78810.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-bpzv054r.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-k89phc5j.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{d as snapshotWorkspaceAgentResources,c as resolveWorkspaceAgentResources,e as resetWorkspaceAgentResources,a as refreshWorkspaceCommunicationStyles,b as configureInvocationPluginDirs};
@@ -1 +1 @@
1
- import{xc as a,yc as b,zc as c}from"./chunk-z5ae4qvf.js";import"./chunk-hzvp3bc1.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-0aj7gp37.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{c as snapshotWorkspaceModelResources,b as resolveWorkspaceModelResources,a as cloneWorkspaceModelConfig};
1
+ import{xc as a,yc as b,zc as c}from"./chunk-k9a1vb8a.js";import"./chunk-bpzv054r.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-k89phc5j.js";import"./chunk-6hj2dk75.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{c as snapshotWorkspaceModelResources,b as resolveWorkspaceModelResources,a as cloneWorkspaceModelConfig};
@@ -1 +1 @@
1
- import{Ba as l,Ca as m,Da as n,Ea as o,Fa as p,Ga as q,Ha as r,ka as a,la as b,na as c,oa as d,pa as e,qa as f,ua as g,va as h,wa as i,xa as j,ya as k}from"./chunk-8rg05w47.js";import"./chunk-88vy9hh0.js";import"./chunk-bx50res5.js";import"./chunk-44wkjs2j.js";import"./chunk-0h81hxkw.js";import"./chunk-af49jmns.js";import"./chunk-fjw32ex5.js";import"./chunk-d9ddpapp.js";import"./chunk-mvwp3c11.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-0aj7gp37.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{g as saveUserMessage,i as saveToolUse,j as saveToolResult,k as saveCompaction,h as saveAssistantMessage,d as isRootSystemPrompt,m as handleTaskListUpdate,n as handleSkillActivation,o as extractModelSwitch,r as executeLoopGenerator,f as drainLoop,c as checkStopHook,a as checkOutputRecovery,b as checkIncompleteIntent,q as checkAndCompactInLoop,p as applyToolDomainEffects,l as StreamingToolExecutor,e as ConversationState};
1
+ import{Ba as l,Ca as m,Da as n,Ea as o,Fa as p,Ga as q,Ha as r,ka as a,la as b,na as c,oa as d,pa as e,qa as f,ua as g,va as h,wa as i,xa as j,ya as k}from"./chunk-y5vq7gek.js";import"./chunk-88vy9hh0.js";import"./chunk-8mepk4tc.js";import"./chunk-44wkjs2j.js";import"./chunk-0h81hxkw.js";import"./chunk-af49jmns.js";import"./chunk-fjw32ex5.js";import"./chunk-d9ddpapp.js";import"./chunk-6sc78810.js";import"./chunk-beqaxytd.js";import"./chunk-jxv6r0c7.js";import"./chunk-4vaywb2r.js";import"./chunk-qev36qrb.js";import"./chunk-vjpd3nee.js";import"./chunk-a7nbn5kf.js";import"./chunk-2beq0syt.js";import"./chunk-k89phc5j.js";import"./chunk-6n5xdf2r.js";import"./chunk-8nm1hqr1.js";import"./chunk-mjp61rqd.js";export{g as saveUserMessage,i as saveToolUse,j as saveToolResult,k as saveCompaction,h as saveAssistantMessage,d as isRootSystemPrompt,m as handleTaskListUpdate,n as handleSkillActivation,o as extractModelSwitch,r as executeLoopGenerator,f as drainLoop,c as checkStopHook,a as checkOutputRecovery,b as checkIncompleteIntent,q as checkAndCompactInLoop,p as applyToolDomainEffects,l as StreamingToolExecutor,e as ConversationState};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blade-code",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "private": false,
5
5
  "description": "🗡️ Blade Code - 智能代码助手命令行工具",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- import{Ab as b,zb as a}from"./chunk-ty2kc6kg.js";import"./chunk-0aj7gp37.js";import"./chunk-mjp61rqd.js";export{a as globalOptions,b as cliConfig};