blade-code 0.10.71 → 0.10.73
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.
- package/README.md +1 -1
- package/dist/blade.js +2 -2
- package/dist/{chunk-wfy851et.js → chunk-0hrj06t7.js} +1 -1
- package/dist/chunk-0qqzd0hq.js +1 -0
- package/dist/{chunk-jzntxp7f.js → chunk-1ava19kd.js} +2 -2
- package/dist/chunk-1cyy8wqj.js +10 -0
- package/dist/{chunk-97aywyzn.js → chunk-2wdxpdz3.js} +2 -2
- package/dist/chunk-3fzy7q6x.js +1 -0
- package/dist/chunk-3hv57n95.js +1635 -0
- package/dist/{chunk-bjqjdw34.js → chunk-3r0x2p7z.js} +2 -2
- package/dist/chunk-4cpgcm7q.js +44 -0
- package/dist/{chunk-m57w4p91.js → chunk-4ehgjdm0.js} +1 -1
- package/dist/{chunk-hat9v5c5.js → chunk-4khtsmrf.js} +1 -1
- package/dist/{chunk-axtzde5k.js → chunk-5d1gbm41.js} +2 -2
- package/dist/chunk-64jq6jcr.js +2 -0
- package/dist/{chunk-4ke8k0xw.js → chunk-67ddp3ns.js} +3 -3
- package/dist/{chunk-trn6r1g3.js → chunk-77hn7hf6.js} +1 -1
- package/dist/{chunk-ahg9vjb6.js → chunk-8fm3xamc.js} +1 -1
- package/dist/chunk-8h35w91f.js +1 -0
- package/dist/{chunk-2px6hzdc.js → chunk-948efzyp.js} +2 -2
- package/dist/{chunk-qgrq04hb.js → chunk-9cgsheg0.js} +2 -2
- package/dist/chunk-9e6dcbqq.js +160 -0
- package/dist/{chunk-gtcxybv5.js → chunk-a0ns74mh.js} +1 -1
- package/dist/{chunk-5te2jqt3.js → chunk-a37mn58w.js} +1 -1
- package/dist/{chunk-3hy06st1.js → chunk-a5e4sy4q.js} +2 -2
- package/dist/{chunk-k0pa8874.js → chunk-ah12xhh6.js} +1 -1
- package/dist/{chunk-j9q1wyxg.js → chunk-ax610gqh.js} +1 -1
- package/dist/chunk-b28zsp1t.js +166 -0
- package/dist/{chunk-rm9hbew3.js → chunk-b3413dtc.js} +1 -1
- package/dist/{chunk-1je1xw6v.js → chunk-bhhdvqe7.js} +18 -18
- package/dist/{chunk-0j22w4wh.js → chunk-c9e0fbyh.js} +1 -1
- package/dist/{chunk-fcv8b6ny.js → chunk-cvvtrvk6.js} +2 -2
- package/dist/chunk-fdmcef2p.js +2 -0
- package/dist/{chunk-x9tvjkjv.js → chunk-fgh6mjdp.js} +1 -1
- package/dist/chunk-hswyrd88.js +1 -0
- package/dist/chunk-jeazjp08.js +8 -0
- package/dist/{chunk-zvz2cnt4.js → chunk-jkh9s1ht.js} +1 -1
- package/dist/{chunk-yn51162x.js → chunk-js4vqnds.js} +1 -1
- package/dist/chunk-jsg7vmxp.js +1 -0
- package/dist/{chunk-v0rsz1rt.js → chunk-k82ff14t.js} +1 -1
- package/dist/chunk-kka51s0k.js +2 -0
- package/dist/{chunk-cff9gphh.js → chunk-meee1cbq.js} +1 -1
- package/dist/{chunk-r9d4mjxj.js → chunk-mefb27ch.js} +1 -1
- package/dist/{chunk-0vrgrw71.js → chunk-n1w40gq2.js} +2 -2
- package/dist/{chunk-t8xmh4w2.js → chunk-ne7vres8.js} +1 -1
- package/dist/chunk-p0qjjyex.js +22 -0
- package/dist/{chunk-h0ft81a3.js → chunk-p7y79y6c.js} +1 -1
- package/dist/{chunk-0tm20v38.js → chunk-q6ak67n8.js} +2 -2
- package/dist/{chunk-byqxaa9v.js → chunk-r5bpvfym.js} +1 -1
- package/dist/{chunk-th4jjfgm.js → chunk-r8wbvxn7.js} +1 -1
- package/dist/{chunk-0wxkymqv.js → chunk-skw3b17a.js} +1 -1
- package/dist/{chunk-dwb2nmms.js → chunk-sxjs66h6.js} +1 -1
- package/dist/{chunk-s77sbxr7.js → chunk-tmvg7taj.js} +1 -1
- package/dist/{chunk-1pjkgfez.js → chunk-traa01dd.js} +1 -1
- package/dist/{chunk-9hchc346.js → chunk-tvv3syt3.js} +1 -1
- package/dist/{chunk-t2wgf9tq.js → chunk-tzytnhbp.js} +2 -2
- package/dist/chunk-vhadycw2.js +2 -0
- package/dist/{chunk-s7jsadnc.js → chunk-vw0gg08s.js} +2 -2
- package/dist/chunk-vxd30mnx.js +1 -0
- package/dist/chunk-wbzvy99s.js +1 -0
- package/dist/chunk-wg3z2epq.js +1 -0
- package/dist/{chunk-mtphps19.js → chunk-wp0794r2.js} +2 -2
- package/dist/{chunk-azw0jckv.js → chunk-xjc0bthz.js} +2 -2
- package/dist/chunk-xkc6v9nb.js +1 -0
- package/dist/{chunk-be30r8an.js → chunk-xv92c582.js} +1 -1
- package/dist/chunk-y36rdy4v.js +5 -0
- package/dist/chunk-yg6c4xrs.js +1 -0
- package/dist/{chunk-cdy9efgm.js → chunk-yvnm25nb.js} +1 -1
- package/dist/chunk-yx82ang3.js +6 -0
- package/dist/chunk-z8a5ebep.js +1 -0
- package/dist/chunk-z95pw8nb.js +1 -0
- package/dist/chunk-zh2x0tcm.js +1 -0
- package/dist/chunk-zr1mg5kq.js +1 -0
- package/dist/{chunk-9q852bsc.js → chunk-zxn7f308.js} +2 -2
- package/dist/web/assets/ChatView-Dm-DMbOV.js +18 -0
- package/dist/web/assets/{CodeBlockHighlighter-Dy7QpAmC.js → CodeBlockHighlighter-XaY8h0vd.js} +1 -1
- package/dist/web/assets/{FilePreview-BI3nkxz1.js → FilePreview-CVHV6oga.js} +1 -1
- package/dist/web/assets/{KanbanBoard-D5dYOyPH.js → KanbanBoard-D1_61uZi.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-Da1vB81L.js → MarkdownRenderer-DUPwAzs4.js} +3 -3
- package/dist/web/assets/{SettingsModal-jcCFqLqS.js → SettingsModal-DHnU7uMN.js} +2 -2
- package/dist/web/assets/{TaskSwitcher-CQ--jOLB.js → TaskSwitcher-CpXhLtO5.js} +1 -1
- package/dist/web/assets/{TerminalPanel-CWzjEXOb.js → TerminalPanel-eYsA-A62.js} +1 -1
- package/dist/web/assets/index-8G4ejlcH.css +1 -0
- package/dist/web/assets/index-gjBOFzd1.js +11 -0
- package/dist/web/assets/{session-events-BvtUOaNG.js → session-events-Bgir_Gl_.js} +6 -6
- package/dist/web/assets/team-QZ9byb3E.js +1 -0
- package/dist/web/assets/teamService-Bb2kW8Hh.js +1 -0
- package/dist/web/assets/{vendor-icons-B63aW_OM.js → vendor-icons-DovdPN7M.js} +51 -41
- package/dist/web/index.html +4 -4
- package/package.json +1 -1
- package/dist/chunk-1w83z8j0.js +0 -1
- package/dist/chunk-2428hhvj.js +0 -6
- package/dist/chunk-3as0bkqy.js +0 -1
- package/dist/chunk-4pexpa3h.js +0 -160
- package/dist/chunk-6pyktfa4.js +0 -2
- package/dist/chunk-82htkvz8.js +0 -44
- package/dist/chunk-8j568nm6.js +0 -1
- package/dist/chunk-92x15fzx.js +0 -2
- package/dist/chunk-93tvxmqg.js +0 -8
- package/dist/chunk-ckqpt15b.js +0 -1
- package/dist/chunk-d3ttqmyt.js +0 -1620
- package/dist/chunk-fcmgwzrj.js +0 -10
- package/dist/chunk-gvbx0t4j.js +0 -1
- package/dist/chunk-j0p54tqt.js +0 -1
- package/dist/chunk-n827nys9.js +0 -1
- package/dist/chunk-nwzpnx7m.js +0 -22
- package/dist/chunk-nx31fkkf.js +0 -166
- package/dist/chunk-qnsvae10.js +0 -1
- package/dist/chunk-sp3bn8qh.js +0 -1
- package/dist/chunk-v7p533ff.js +0 -1
- package/dist/chunk-vthgpdbd.js +0 -1
- package/dist/chunk-wneeq8cr.js +0 -1
- package/dist/chunk-wrfay5r3.js +0 -2
- package/dist/chunk-xdz5zrjt.js +0 -1
- package/dist/chunk-xz6y0w4n.js +0 -2
- package/dist/chunk-xzz69esf.js +0 -1
- package/dist/chunk-zdnk7qtn.js +0 -5
- package/dist/web/assets/ChatView-BVrhnE2j.js +0 -18
- package/dist/web/assets/index-BOgOL4hG.js +0 -11
- package/dist/web/assets/index-DbWgTuT3.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ma as F,oa as L}from"./chunk-3hv57n95.js";import{Lc as $,Nc as B,Vc as Q}from"./chunk-2wdxpdz3.js";import{Re as y}from"./chunk-5d1gbm41.js";import{Eg as V}from"./chunk-ah12xhh6.js";async function j(){await y(V())}async function I(b){let q=b.message||b._?.[0];if(typeof q==="string"&&q.trim())return q;let z=b.stdin??process.stdin;if(!z.isTTY){let G=[];for await(let K of z)G.push(K);return Buffer.concat(G).toString("utf-8").trim()}if(b.defaultMessage!==void 0)return b.defaultMessage;throw Error("No input provided")}async function M(b){let q=b.message||b._?.[0];if(typeof q==="string"&&q.trim())return q;let z=b.stdin??process.stdin;if(z.isTTY)return;let G=[];for await(let Z of z)G.push(Buffer.isBuffer(Z)?Z:Buffer.from(Z));return Buffer.concat(G).toString("utf-8").trim()||void 0}async function R(b){if(!F(b))return{mode:"agent",content:b};let q=await L(b,{cwd:V(),surface:"headless",workspaceRoot:V()});if(!q.success)return{mode:"output",content:`Error: ${q.error||"未知错误"}`,exitCode:1};let z=q.data;if(z?.action==="invoke_skill"){let{skillName:G,skillArgs:K}=z;return{mode:"agent",content:K?`Please use the "${G}" skill to help me with: ${K}`:`Please use the "${G}" skill.`}}if(z?.action==="invoke_custom_command"||z?.action==="invoke_plugin_command"){let G=z.processedContent;return{mode:"agent",content:`# Custom Command: /${z.commandName}
|
|
2
2
|
|
|
3
3
|
${G}`}}return{mode:"output",content:q.content||q.message||"",exitCode:0}}import{readFile as D,stat as H}from"node:fs/promises";import J from"node:path";function x(b,q){let z;try{z=JSON.parse(b)}catch(G){throw Error(`Invalid JSON output schema from ${q}`,{cause:G})}return B(z).schema}async function _(b){if(b.jsonSchema!==void 0&&b.outputSchema!==void 0)throw Error("--json-schema cannot be combined with --output-schema");if(b.jsonSchema!==void 0)return x(b.jsonSchema,"--json-schema");if(b.outputSchema===void 0)return;let q=J.resolve(b.outputSchema),z=await H(q);if(!z.isFile())throw Error(`Output schema path is not a regular file: ${q}`);if(z.size>$)throw Error(`Output schema exceeds ${$} bytes: ${q}`);return x(await D(q,"utf8"),q)}function N(b){if(!(b instanceof Error))return!1;return b.message.includes("未找到会话")||b.message.includes("ENOENT")||b.message.includes("no such file")}async function W(b){try{return await Q.loadSessionModelContext(b,V())}catch(q){if(N(q))return null;throw q}}async function C(b){if(b.resume===!0||b.resume==="true")throw Error("--resume without a session ID is only supported in interactive UI mode");if(typeof b.resume==="string"&&b.resume.length>0){if(b.forkSession){let G=V(),K=await Q.forkSession(b.resume,{newSessionId:b.sessionId,sourceProjectPath:G,targetProjectPath:G});return{...K,messages:await Q.loadSessionModelContext(K.sessionId,G)}}let[q,z]=await Promise.all([Q.loadSessionModelContext(b.resume),Q.findSessionMetadata(b.resume)]);return{sessionId:b.resume,messages:q,metadata:z}}if(b.continue){let q=b.forkSession?await Q.listSessions({cwd:V()}):await Q.listSessions();if(q.length>0){let z=q[0].sessionId;if(b.forkSession){let G=V(),K=await Q.forkSession(z,{newSessionId:b.sessionId,sourceProjectPath:G,targetProjectPath:G});return{...K,messages:await Q.loadSessionModelContext(K.sessionId,G)}}return{sessionId:z,messages:await Q.loadSessionModelContext(z),metadata:q[0]}}if(b.forkSession)throw Error("Cannot fork: no sessions are available to continue")}if(b.sessionId){let q=await W(b.sessionId);return{sessionId:b.sessionId,messages:q??[],...q?{metadata:await Q.findSessionMetadata(b.sessionId,V())}:{}}}return{sessionId:`${b.fallbackSessionPrefix}-${Date.now()}`,messages:[]}}
|
|
4
4
|
export{j as m,I as n,M as o,R as p,_ as q,C as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ca as V,Ea as W,Fa as O,Xa as J}from"./chunk-fdmcef2p.js";import"./chunk-k82ff14t.js";import"./chunk-64jq6jcr.js";import{Eg as Q}from"./chunk-ah12xhh6.js";import"./chunk-tzytnhbp.js";import"./chunk-zxn7f308.js";import"./chunk-0hrj06t7.js";import F from"chalk";var K=(f)=>typeof f==="string"&&f.length>0?f:void 0;function X(f){let z=K(f.cron),G=K(f.every),H=K(f.at);if([z,G,H].filter(Boolean).length!==1)throw Error("Provide exactly one of --cron, --every, or --at");if(z)return{kind:"cron",cron:z};if(G){let P=V(G);if(!P)throw Error(`Invalid --every value "${G}" (use e.g. 30m, 2h, 1d)`);return{kind:"interval",intervalMs:P}}let N=new Date(H);if(Number.isNaN(N.getTime()))throw Error(`Invalid --at value "${H}" (use an ISO timestamp)`);return{kind:"once",runAt:N.toISOString()}}var Y={command:"create <prompt>",describe:"创建定时任务",builder:(f)=>f.positional("prompt",{type:"string",describe:"定时任务运行时发送给 Agent 的提示词",demandOption:!0}).option("cron",{type:"string",describe:"5 段 cron 表达式(本地时区)"}).option("every",{type:"string",describe:"间隔(如 30m、2h、1d)"}).option("at",{type:"string",describe:"一次性运行的 ISO 时间点"}).option("project-path",{alias:["projectPath","project"],type:"string",describe:"目标项目路径(默认当前目录)"}).option("title",{type:"string",describe:"定时任务标题"}).option("model",{alias:"m",type:"string",describe:"模型 ID"}).option("permission-mode",{type:"string",choices:["default","autoEdit","yolo","plan"],default:"default",describe:"权限模式"}).option("isolation",{type:"string",choices:["local","worktree"],default:"worktree",describe:"执行隔离方式"}).example([['$0 schedule create "跑测试并汇报失败" --every 1h',"每小时运行一次"],['$0 schedule create "生成每日站会摘要" --cron "0 9 * * 1-5"',"工作日 9 点运行"]]),handler:async(f)=>{try{let z=X(f),G=W(z);if(G)throw Error(G);let H={prompt:f.prompt,projectPath:K(f.projectPath)??Q(),title:K(f.title),trigger:z,modelId:K(f.model),isolation:K(f.isolation)??"worktree",permissionMode:K(f.permissionMode)??"default",enabled:!0},B=await J.create(H);console.log(F.green(`✓ 已创建定时任务 ${B.id}`)),console.log(` ${O(B.trigger)}`),console.log(` 项目: ${B.projectPath}`),console.log(` 下次运行: ${B.nextRunAt?new Date(B.nextRunAt).toLocaleString():"(无)"}`),process.exit(0)}catch(z){console.error(F.red(`创建定时任务失败: ${z instanceof Error?z.message:z}`)),process.exit(1)}}},Z={command:"list",aliases:["ls"],describe:"列出所有定时任务",handler:async()=>{let f=await J.list();if(f.length===0)console.log(F.dim("尚无定时任务。使用 `blade schedule create` 创建。")),process.exit(0);for(let z of f){let G=z.enabled?F.green("启用"):F.dim("停用"),H=z.nextRunAt?new Date(z.nextRunAt).toLocaleString():"—",B=z.lastRunAt?`${new Date(z.lastRunAt).toLocaleString()} (${z.lastStatus??"?"})`:"从未";console.log(`${F.cyan(z.id)} [${G}] ${z.title??z.prompt.slice(0,40)}`),console.log(` ${O(z.trigger)} · 下次: ${H} · 上次: ${B} · 运行 ${z.runCount} 次`),console.log(F.dim(` 项目: ${z.projectPath}`))}process.exit(0)}},_={command:"show <id>",describe:"查看定时任务详情",builder:(f)=>f.positional("id",{type:"string",describe:"定时任务 ID",demandOption:!0}),handler:async(f)=>{let z=await J.get(f.id);if(!z)console.error(F.red(`未找到定时任务 ${f.id}`)),process.exit(1);console.log(JSON.stringify(z,null,2)),process.exit(0)}},$={command:"remove <id>",aliases:["rm"],describe:"删除定时任务",builder:(f)=>f.positional("id",{type:"string",describe:"定时任务 ID",demandOption:!0}),handler:async(f)=>{if(!await J.remove(f.id))console.error(F.red(`未找到定时任务 ${f.id}`)),process.exit(1);console.log(F.green(`✓ 已删除定时任务 ${f.id}`)),process.exit(0)}},q={command:"enable <id>",describe:"启用定时任务",builder:(f)=>f.positional("id",{type:"string",describe:"定时任务 ID",demandOption:!0}),handler:async(f)=>{if(!await J.setEnabled(f.id,!0))console.error(F.red(`未找到定时任务 ${f.id}`)),process.exit(1);console.log(F.green(`✓ 已启用定时任务 ${f.id}`)),process.exit(0)}},x={command:"disable <id>",describe:"停用定时任务",builder:(f)=>f.positional("id",{type:"string",describe:"定时任务 ID",demandOption:!0}),handler:async(f)=>{if(!await J.setEnabled(f.id,!1))console.error(F.red(`未找到定时任务 ${f.id}`)),process.exit(1);console.log(F.green(`✓ 已停用定时任务 ${f.id}`)),process.exit(0)}},D={command:"run <id>",describe:"立即运行定时任务(需要 blade serve)",builder:(f)=>f.positional("id",{type:"string",describe:"定时任务 ID",demandOption:!0}).option("server",{type:"string",default:process.env.BLADE_SERVER_URL??"http://127.0.0.1:4097",describe:"Blade server 地址"}),handler:async(f)=>{let z=f.id,G=(K(f.server)??"http://127.0.0.1:4097").replace(/\/$/,""),H={};if(process.env.BLADE_SERVER_PASSWORD){let B=process.env.BLADE_SERVER_USERNAME??"blade";H.Authorization=`Basic ${Buffer.from(`${B}:${process.env.BLADE_SERVER_PASSWORD}`).toString("base64")}`}try{let B=await fetch(`${G}/schedules/${encodeURIComponent(z)}/run`,{method:"POST",headers:H});if(!B.ok){let N=await B.json().catch(()=>{return});throw Error(N?.error?.message??`Schedule run failed (${B.status})`)}console.log(F.green(`✓ 已触发定时任务 ${z}`)),process.exit(0)}catch(B){console.error(F.red(`运行定时任务失败: ${B instanceof Error?B.message:B}`)),process.exit(1)}}},R={command:"schedule",describe:"管理定时任务",builder:(f)=>f.command(Y).command(Z).command(_).command($).command(q).command(x).command(D).demandCommand(1,"请提供子命令:create | list | show | remove | enable | disable | run"),handler:()=>{}};export{R as scheduleCommands};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{q as
|
|
1
|
+
import{sh as d,uh as h}from"./chunk-xjc0bthz.js";var q={debug:{alias:"d",type:"string",describe:'Enable debug mode with optional category filtering (e.g., "agent,ui" or "!chat,!loop")',group:"Debug Options:"},model:{type:"string",describe:"Override the current run model using a model config ID (TUI / print / headless)",group:"AI Options:"},print:{alias:"p",type:"boolean",describe:"Print response and exit (useful for pipes)",group:"Output Options:"},headless:{type:"boolean",describe:"Run full agent loop without Ink UI and print all events to the terminal",group:"Output Options:"},"output-format":{alias:["outputFormat"],type:"string",choices:["text","json","stream-json","jsonl"],default:"text",describe:"Output format: --print supports text|json|stream-json; --headless supports text|jsonl",group:"Output Options:"},"json-schema":{alias:["jsonSchema"],type:"string",describe:"Inline JSON Schema for the turn-scoped structured final response",group:"Output Options:"},"output-schema":{alias:["outputSchema"],type:"string",describe:"Path to a JSON Schema file for the structured final response",group:"Output Options:"},"include-partial-messages":{alias:["includePartialMessages"],type:"boolean",describe:"Include partial message chunks as they arrive",group:"Output Options:"},"input-format":{alias:["inputFormat"],type:"string",choices:["text","stream-json"],default:"text",describe:"Input format",group:"Input Options:"},"replay-user-messages":{alias:["replayUserMessages"],type:"boolean",describe:"Re-emit user messages from stdin",group:"Input Options:"},"allowed-tools":{alias:["allowedTools"],type:"array",string:!0,describe:"Comma or space-separated list of tool names to allow",group:"Security Options:"},"disallowed-tools":{alias:["disallowedTools"],type:"array",string:!0,describe:"Comma or space-separated list of tool names to deny",group:"Security Options:"},"mcp-config":{alias:["mcpConfig"],type:"array",string:!0,describe:"Load MCP servers from JSON files or strings",group:"MCP Options:"},"system-prompt":{alias:["systemPrompt"],type:"string",describe:"System prompt to use for the session (replaces default)",group:"AI Options:"},"append-system-prompt":{alias:["appendSystemPrompt"],type:"string",describe:"Append a system prompt to the default system prompt",group:"AI Options:"},"max-turns":{alias:["maxTurns"],type:"number",describe:"Maximum conversation turns (-1: unlimited, 0: disable chat, N>0: limit to N turns)",group:"AI Options:",default:void 0},"max-concurrent-tasks":{alias:["maxConcurrentTasks"],type:"number",describe:"Maximum top-level tasks running concurrently in this process",group:"AI Options:",default:void 0},"max-queued-tasks":{alias:["maxQueuedTasks"],type:"number",describe:"Maximum top-level tasks waiting for an admission slot",group:"AI Options:",default:void 0},"max-queued-task-bytes":{alias:["maxQueuedTaskBytes"],type:"number",describe:"Maximum retained bytes across queued top-level tasks",group:"AI Options:",default:void 0},"max-resident-session-runtimes":{alias:["maxResidentSessionRuntimes"],type:"number",describe:"Maximum initialized Session runtimes resident in this process",group:"AI Options:",default:void 0},"session-runtime-idle-ms":{alias:["sessionRuntimeIdleMs"],type:"number",describe:"Idle time before an evictable Web Session runtime is disposed",group:"AI Options:",default:void 0},"permission-mode":{alias:["permissionMode"],type:"string",choices:["default","autoEdit","yolo","plan"],describe:"Permission mode (default: ask for non-read tools, autoEdit: auto-approve edits, yolo: auto-approve all, plan: reserved)",group:"Security Options:"},yolo:{type:"boolean",describe:"Auto-approve all tools (shortcut for --permission-mode=yolo)",group:"Security Options:"},"trust-workspace":{alias:["trustWorkspace"],type:"boolean",describe:"Trust the current workspace before loading project models, MCP, LSP, permissions, or plugins",group:"Security Options:"},continue:{alias:"c",type:"boolean",describe:"Continue the most recent conversation",group:"Session Options:"},resume:{alias:"r",describe:"Resume a conversation - provide a session ID or interactively select a conversation to resume",group:"Session Options:",coerce:(b)=>{if(b===void 0||b===!0||b==="")return"true";return String(b)}},"fork-session":{alias:["forkSession"],type:"boolean",describe:"Create a new session ID when resuming",group:"Session Options:"},settings:{type:"string",describe:"Path to a settings JSON file or JSON string",group:"Configuration:"},"add-dir":{alias:["addDir"],type:"array",string:!0,describe:"Additional directories to allow tool access to",group:"Security Options:"},ide:{type:"boolean",describe:"Automatically connect to IDE on startup",group:"Integration:"},acp:{type:"boolean",describe:"Run in ACP (Agent Client Protocol) mode for IDE integration",group:"Integration:"},"strict-mcp-config":{alias:["strictMcpConfig"],type:"boolean",describe:"Only use MCP servers from --mcp-config",group:"MCP Options:"},"session-id":{alias:["sessionId"],type:"string",describe:"Use a specific session ID for the conversation",group:"Session Options:"},agents:{type:"string",describe:"JSON object defining custom agents",group:"AI Options:"},"setting-sources":{alias:["settingSources"],type:"string",describe:"Comma-separated list of setting sources to load",group:"Configuration:"},"plugin-dir":{alias:["pluginDir"],type:"array",string:!0,describe:"Load plugins from specified directories",group:"Plugin Options:"}},w={scriptName:"blade",usage:"$0 [command] [options]",description:h(),version:d(),locale:"en",showHelpOnFail:!0,demandCommand:!1,recommendCommands:!0,strict:!1};
|
|
2
|
+
export{q as rd,w as sd};
|
|
@@ -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
|
|
2
|
+
export{N as Bg,D as Cg,P as Dg,V as Eg};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-0hrj06t7.js";var d={command:"install [target]",describe:"Install Blade native build. Use [target] to specify version (stable, latest, or specific version)",builder:(b)=>{return b.positional("target",{describe:"Version to install",type:"string",default:"stable",choices:["stable","latest"]}).option("force",{type:"boolean",describe:"Force reinstall",default:!1}).example([["$0 install","Install stable version"],["$0 install latest","Install latest version"],["$0 install --force","Force reinstall stable version"]])},handler:async(b)=>{console.log(`Installing Blade ${b.target}...`);try{if(b.force)console.log("Force reinstall enabled");console.log("Downloading..."),console.log("Installing..."),console.log("Installation completed successfully")}catch(c){console.error(`Error: Installation failed: ${c instanceof Error?c.message:"未知错误"}`),process.exit(1)}}};export{d as installCommands};
|