@sma1lboy/rove 0.9.68 → 0.9.69

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.
@@ -293,7 +293,7 @@ ${z}`,X);this.line=J,this.column=Q,this.codeblock=z}}});function HD(Z,X){let J=Z
293
293
  `,{mode:384})}function hh(Z,X){return{plugins:[...Z.plugins.filter((J)=>J.id!==X.id),X]}}function SK(Z,X){return{plugins:Z.plugins.filter((J)=>J.id!==X)}}var BR;var s9=m(()=>{a9();BR={plugins:[]}});var uh={};s1(uh,{reloadPluginEngines:()=>WR,loadPluginEngines:()=>MD});function MD(Z){let X=[];try{for(let J of B5(Z).plugins){if(!J.enabled)continue;try{let{manifest:Q}=Q6(J.root);for(let z of Q.engines){let Y={vendorId:z.id,productName:z.identity?.productName??z.name,shortName:z.identity?.shortName??z.name,assistantName:z.identity?.assistantName??z.name,inputPlaceholder:z.identity?.inputPlaceholder??`Ask ${z.identity?.shortName??z.name}\u2026`};if(eb(z.id,{displayName:z.name,defaultCommand:z.command,...z.processNames?{processNames:z.processNames}:{},screenManifest:{rules:z.rules},identity:Y}))X.push(z.id);else console.warn(`[rove] plugin ${J.id}: engine id \`${z.id}\` shadows a built-in or shipped engine \u2014 skipped`)}}catch{}}}catch{}return X}function WR(Z){Zg();let X=MD(Z);return Cg(),X}var ND=m(()=>{QX();s9();l6();zK()});function W3(Z){return{hint:"run the verb's --help for its exact flag contract, then retry",nextCommandArgs:["api",Z,"--help"]}}var e0;var Y2=m(()=>{e0=class e0 extends Error{code;data;constructor(Z,X,J){super(Z);this.code=X;this.data=J}}});import{resolve as ch}from"path";function MR(Z){if(!/^\d+$/.test(Z.trim()))return;let X=Number.parseInt(Z,10);return Number.isSafeInteger(X)&&X>0?X:void 0}function DD(Z,X=new Set){let J=new Map,Q=!1,z=!1;for(let Y=0;Y<Z.length;Y++){let G=Z[Y];if(!G.startsWith("--")&&G!=="-h")throw new e0(`unexpected positional arg: ${G}`,"BAD_FLAG");if(G==="-h"){z=!0;continue}let $=G.indexOf("=");if($!==-1){let W=G.slice(2,$),D=G.slice($+1);if(W==="pretty")Q=D!=="false"&&D!=="0";else if(W==="help")z=D!=="false"&&D!=="0";else J.set(W,D);continue}let U=G.slice(2);if(U==="pretty"){Q=!0;continue}if(U==="help"){z=!0;continue}if(X.has(U)){J.set(U,"true");continue}let K=Z[Y+1];if(K===void 0||K.startsWith("--"))throw new e0(`flag --${U} requires a value`,"BAD_FLAG");J.set(U,K),Y+=1}return{flags:J,pretty:Q,help:z}}function jD(Z,X){let J=new Set(Z.flags.map((Q)=>Q.name));for(let Q of X.keys())if(!J.has(Q))throw new e0(`unknown flag --${Q} for "${Z.name}"`,"BAD_FLAG",W3(Z.name));for(let Q of Z.flags){if(Q.required&&!X.get(Q.name))throw new e0(`--${Q.name} is required for "${Z.name}"`,"MISSING_FLAG",W3(Z.name));if(Q.type==="enum"&&Q.values){let z=X.get(Q.name);if(z!==void 0&&!Q.values.includes(z)){if(Q.name==="vendor"&&x8().includes(z))continue;throw new e0(`--${Q.name} must be one of ${Q.values.join(", ")}`,"BAD_FLAG",W3(Z.name))}}if(Q.type==="int"){let z=X.get(Q.name);if(z!==void 0&&MR(z)===void 0)throw new e0(`--${Q.name} must be a positive integer`,"BAD_FLAG")}}}class OD{verb;flags;constructor(Z,X){this.verb=Z;this.flags=X}spec(Z){let X=this.verb.flags.find((J)=>J.name===Z);if(!X)throw Error(`internal: --${Z} is not declared on verb "${this.verb.name}"`);return X}str(Z){this.spec(Z);let X=this.flags.get(Z);return X&&X.length>0?X:void 0}require(Z){let X=this.str(Z);if(X===void 0)throw new e0(`--${Z} is required`,"MISSING_FLAG");return X}enumOf(Z){let X=this.spec(Z),J=this.str(Z);if(J===void 0)return;if(X.values&&!X.values.includes(J))throw new e0(`--${Z} must be one of ${X.values.join(", ")}`,"BAD_FLAG",W3(this.verb.name));return J}requireEnum(Z){return this.require(Z),this.enumOf(Z)}vendor(){let Z=this.str("vendor");if(Z===void 0)return;let X=this.spec("vendor").values??k2;if(X.includes(Z))return Z;if(x8().includes(Z))return Z;throw new e0(`--vendor must be a built-in (${X.join(", ")}) or a registered custom engine id`,"BAD_FLAG",W3(this.verb.name))}bool(Z){this.spec(Z);let X=this.str(Z);if(X===void 0)return;if(["true","1","yes"].includes(X))return!0;if(["false","0","no"].includes(X))return!1;throw new e0(`--${Z} must be a boolean (true/false)`,"BAD_FLAG")}int(Z){this.spec(Z);let X=this.str(Z);if(X===void 0)return;let J=MR(X);if(J===void 0)throw new e0(`--${Z} must be a positive integer`,"BAD_FLAG");return J}path(Z){let X=this.str(Z);return X===void 0?void 0:ch(process.cwd(),R8(X))}requirePath(Z){return ch(process.cwd(),R8(this.require(Z)))}}function FD(Z){let X=[];for(let J of Z.split(",")){let Q=J.trim();if(!Q)continue;let z=Q.indexOf(":");if(z===-1)throw new e0(`--agents entry "${Q}" must be engine:count`,"BAD_FLAG",P$);let Y=Q.slice(0,z);if(!k2.includes(Y)&&!x8().includes(Y))throw new e0(`--agents engine "${Y}" must be a built-in (${k2.join(", ")}) or a registered engine id \u2014 see \`engine-list\``,"BAD_FLAG",P$);let G=MR(Q.slice(z+1));if(G===void 0)throw new e0(`--agents count for "${Y}" must be a positive integer`,"BAD_FLAG",P$);if(X.length+G>r9)throw new e0(`--agents requests ${X.length+G} agents, exceeds the cap of ${r9}`,"BAD_FLAG",P$);for(let $=0;$<G;$++)X.push(Y)}if(X.length===0)throw new e0('--agents specified no agents (e.g. "claude:2,codex:1")',"BAD_FLAG",P$);return X}function LD(Z,X){if(Z>r9)throw new e0(`--count ${Z} exceeds the parallel cap of ${r9} \u2014 spawn in batches`,"BAD_FLAG",P$);return Array(Z).fill(X)}var r9=10,P$,y1;var f8=m(()=>{bJ();h4();h5();Y2();P$=W3("add"),y1={repo:(Z=!0)=>({name:"repo",type:"string",required:Z,placeholder:"PATH",description:"Repo root (git toplevel). Relative paths resolve against $PWD."}),taskId:(Z=!0)=>({name:"task-id",type:"string",required:Z,placeholder:"ID",description:"Target task id (from `list` / `add`)."}),vendor:()=>({name:"vendor",type:"enum",values:k2,placeholder:"V",description:"Engine vendor for the task."}),command:()=>({name:"command",type:"string",placeholder:"CMD",description:"Engine launch command, verbatim \u2014 an engine id from `engine-list` (e.g. claude) or a full command line (e.g. 'codex --search'). Unvalidated: probe an unfamiliar engine's flags with `<cmd> --help` first. Omitted = the repo's default engine."}),title:()=>({name:"title",type:"string",placeholder:"T",description:"Human task title."}),prompt:(Z,X)=>({name:"prompt",type:"string",required:Z,placeholder:"TEXT",description:X})}});function PK(Z){return typeof Z==="string"&&mK0.includes(Z)}function b8(Z){let X=Z.state==="prompt_deferred"?"\x00deferred":"";return`${Z.taskId}\x00${Z.tabId??""}${X}`}var mK0;var NR=m(()=>{mK0=["turn_complete","permission_needed","error","rate_limited","prompt_deferred","dead"]});function lh(Z){return typeof Z==="string"&&hK0.has(Z)}function DR(Z){if(!Array.isArray(Z))return null;let X=new Set;for(let J of Z)if(lh(J))X.add(J);return X.size>0?X:null}var _D,hK0;var jR=m(()=>{JR();_D=Rh,hK0=new Set(_D)});function AD(Z){return Z.remoteVersion>=Z.localMin&&Z.localVersion>=Z.remoteMin}function ph(Z,X){if(!Z)return!1;return Z!==X}function dh(Z,X){if(!Z)return!1;let J=(Q)=>Q.replace(/[/\\]+$/,"");return J(Z)!==J(X)}function OR(Z){return Z.title||Z.branch||Z.worktreePath||Z.repo||"scratch"}function c2(Z){return{id:Z.id,title:OR(Z),repo:Z.repo,branch:Z.branch,worktreePath:Z.worktreePath,kind:Z.kind??"task",...Z.scratch?{scratch:!0}:{},...Z.routine?{routine:Z.routine}:{},status:Z.status,pinned:Z.pinned??!1,vendor:Z.vendor,command:Z.command,prStatus:Z.prStatus,position:Z.position,modelEffort:Z.modelEffort,groupId:Z.groupId,observedLanguage:Z.observedLanguage,deletion:Z.deletion,quotaResume:Z.quotaResume,linkedWorkItem:Z.linkedWorkItem,dispatcher:Z.dispatcher,prompt:Z.prompt,baseRef:Z.baseRef,createdAt:Z.createdAt,updatedAt:Z.updatedAt}}function pz(Z){return`${JSON.stringify(Z)}
294
294
  `}var u2=4,oJ=2;var G2=m(()=>{NR();jR()});var LR={};s1(LR,{RpcTimeoutError:()=>FR,KobeDaemonClient:()=>l5});import{connect as uK0}from"net";import{StringDecoder as cK0}from"string_decoder";function lK0(){let Z=process.env.KOBE_RPC_TIMEOUT_MS?.trim();if(Z){let X=Number.parseInt(Z,10);if(Number.isFinite(X))return X}return 20000}class l5{socketPath;socket=null;buffer="";nextId=1;pending=new Map;handlers=new Map;lifecycleHandlers=new Map;connecting=null;disposed=!1;constructor(Z){this.socketPath=Z}connect(){if(this.socket)return Promise.resolve();if(this.disposed)return Promise.reject(Error("daemon client disposed"));if(this.connecting)return this.connecting;let Z=this.openSocket();this.connecting=Z;let X=()=>{if(this.connecting===Z)this.connecting=null};return Z.then(X,X),Z}get isDisposed(){return this.disposed}close(){this.disposed=!0,this.socket?.end(),this.socket=null,this.failPending()}forceDisconnect(){let Z=this.socket;if(!Z)return;this.socket=null,Z.destroy(),this.failPending()}failPending(){if(this.pending.size===0)return;let Z=Error("daemon connection closed");for(let X of this.pending.values()){if(X.timer)clearTimeout(X.timer);X.reject(Z)}this.pending.clear()}on(Z,X){let J=this.handlers.get(Z);if(!J)J=new Set,this.handlers.set(Z,J);return J.add(X),()=>{if(J?.delete(X),J?.size===0)this.handlers.delete(Z)}}onChannel(Z,X){return this.on(Z,(J)=>X(J.payload))}subscribe(Z={}){let X={};if(Z.channels)X.channels=Z.channels;if(Z.role)X.role=Z.role;return this.request("subscribe",X)}onLifecycle(Z,X){let J=this.lifecycleHandlers.get(Z);if(!J)J=new Set,this.lifecycleHandlers.set(Z,J);return J.add(X),()=>{if(J?.delete(X),J?.size===0)this.lifecycleHandlers.delete(Z)}}async request(Z,X){await this.connect();let J=this.socket;if(!J)throw Error("daemon connection is not open");let Q=String(this.nextId++),z=new Promise((Y,G)=>{let $={resolve:(K)=>Y(K),reject:G},U=lK0();if(U>0&&!pK0.has(Z))$.timer=setTimeout(()=>this.onRequestTimeout(Q,Z,U),U);this.pending.set(Q,$)});return J.write(pz({type:"request",id:Q,name:Z,payload:X})),z}onRequestTimeout(Z,X,J){let Q=this.pending.get(Z);if(!Q)return;this.pending.delete(Z),Q.reject(new FR(X,J)),this.forceDisconnect(),this.emitLifecycle("close")}openSocket(){return new Promise((Z,X)=>{let J=uK0(this.socketPath);this.socket=J;let Q=()=>{J.off("error",z),J.on("error",()=>J.destroy()),Z()},z=(G)=>{if(J.off("connect",Q),this.socket===J)this.socket=null;X(G)};J.once("connect",Q),J.once("error",z);let Y=new cK0("utf8");this.buffer="",J.on("data",(G)=>this.onData(Y.write(G))),J.on("close",()=>this.onSocketClose(J))})}onSocketClose(Z){if(this.socket!==Z)return;this.socket=null,this.failPending(),this.emitLifecycle("close")}emitLifecycle(Z){for(let X of this.lifecycleHandlers.get(Z)??[])try{X()}catch(J){console.error(`[rove] lifecycle handler for "${Z}" threw:`,J)}}onData(Z){this.buffer+=Z;let X=this.buffer.indexOf(`
295
295
  `);while(X!==-1){let J=this.buffer.slice(0,X);if(this.buffer=this.buffer.slice(X+1),J.trim().length>0)this.onLine(J);X=this.buffer.indexOf(`
296
- `)}}onLine(Z){let X;try{X=JSON.parse(Z)}catch(Q){s4("client-frame",Q);return}if(X.type==="event"){this.emit(X);return}if(X.type!=="response")return;let J=this.pending.get(X.id);if(!J)return;if(this.pending.delete(X.id),J.timer)clearTimeout(J.timer);if(X.error){let Q=Error(X.error.message);if(X.error.name)Q.name=X.error.name;J.reject(Q)}else J.resolve(X.payload)}emit(Z){for(let X of this.handlers.get(Z.name)??[])try{X(Z)}catch(J){s4("client-event",J)}for(let X of this.handlers.get("*")??[])try{X(Z)}catch(J){s4("client-event",J)}}}var FR,pK0;var a6=m(()=>{G2();u9();FR=class FR extends Error{constructor(Z,X){super(`daemon rpc "${Z}" timed out after ${X}ms (daemon wedged?)`);this.name="RpcTimeoutError"}};pK0=new Set(["task.ensureWorktree","task.ensureMain","worktree.discoverAdoptable","worktree.adopt","worktree.list","worktree.remove"])});function L5(Z){if(!Z.client)throw new e0("daemon required","BAD_DAEMON");return Z.client}async function A4(Z,X,J){return L5(Z).request(X,J)}async function ih(){let[{KobeDaemonClient:Z},{defaultPtyHostSocketPath:X}]=await Promise.all([Promise.resolve().then(() => (a6(),LR)),Promise.resolve().then(() => (c5(),XE))]),J=new Z(X());try{return await J.connect(),await J.request("pty.list",{})}catch{return{sessions:[]}}finally{J.close()}}var V8=m(()=>{Y2()});function dK0(){MD();let Z=[...Lh()];for(let X of BN()){let J=N1(X);Z.push({id:X,name:J.displayName,command:J.defaultCommand.join(" "),protocol:l9,builtin:!1})}return Z}async function iK0(Z){let X=Z.args.require("command"),J=p9(X);return await A4(Z,"task.setCommand",{taskId:Z.args.require("task-id"),command:X,vendor:J}),{ok:!0,command:X,protocol:J,...J===l9?{generic:!0}:{}}}var nh,ah;var _R=m(()=>{zK();K8();ND();z5();f8();V8();nh={name:"engine-list",summary:"List every engine Rove can launch \u2014 built-ins, registered presets, and engines contributed by enabled plugins \u2014 each with its RAW launch command, exactly as it runs. Copy one into `add --command` / `send --tab new --command` verbatim, or edit its flags first. `protocol` is the adapter Rove speaks to it (history, trust, delivery); `generic` = none, which still runs fine but loses transcript reads. Returns { engines }.",flags:[],offline:!0,handler:async()=>({engines:dK0()})};ah={name:"set-command",summary:"Set a task's engine launch command (takes effect on the next session rebuild). The protocol Rove speaks to it is derived from the command \u2014 the result reports which one, `generic` when the command names no engine Rove knows.",flags:[y1.taskId(),{...y1.command(),required:!0}],handler:iK0}});var CD;var oh=m(()=>{CD={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.68",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.17","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var th={};s1(th,{repoSlug:()=>dz,releasePageUrl:()=>PR,recommendedGlobalInstallCommand:()=>RR,owningNpmPrefix:()=>sh,isNewerSemver:()=>AR,fetchReleaseSummaries:()=>xK,fetchReleaseNotesRange:()=>SR,fetchReleaseNotes:()=>TR,compareSemver:()=>M3,checkLatestVersion:()=>nz,channelOf:()=>iz,breakingVersionsCrossed:()=>IK,UPDATE_SCRIPT_URL:()=>ED,UPDATE_COMMAND:()=>t9,RELEASE_CHANNELS:()=>TD,PACKAGE_NAME:()=>ER,DEFAULT_RELEASE_CHANNEL:()=>SD,CURRENT_VERSION:()=>n1,BREAKING_VERSIONS:()=>zX});import{fileURLToPath as aK0}from"url";function dz(){let Z=CD.repository?.url;if(!Z)return null;let X=Z.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!X||!X[1]||!X[2])return null;return`${X[1]}/${X[2]}`}function sh(Z=aK0(import.meta.url)){let J=Z.indexOf("/lib/node_modules/");if(J<=0)return null;return Z.slice(0,J)}function RR(Z=sh()){let X=`${ER}@latest`;return Z===null?`npm install -g ${X}`:`npm install -g --prefix ${Z} ${X}`}function IK(Z,X,J=zX){let[Q,z]=M3(Z,X)<=0?[Z,X]:[X,Z];return J.filter((Y)=>M3(Y,Q)>0&&M3(Y,z)<=0)}function iz(Z=n1){return CR(Z)?.split(".")[0]==="nightly"?"nightly":SD}async function oK0(Z,X){let J=new AbortController,Q=setTimeout(()=>J.abort(),RD);try{let z=Z.replace("/","%2F"),Y=await fetch(`https://registry.npmjs.org/${z}/${X}`,{signal:J.signal,headers:{accept:"application/json"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.version!=="string")return null;return G.version}catch{return null}finally{clearTimeout(Q)}}function AR(Z,X){let J=M3(Z,X);if(J!==0)return J>0;return sK0(CR(Z),CR(X))>0}function CR(Z){let X=Z.indexOf("-");return X===-1?void 0:Z.slice(X+1)||void 0}function sK0(Z,X){if(Z===X)return 0;if(Z===void 0)return 1;if(X===void 0)return-1;let J=Z.split("."),Q=X.split(".");for(let z=0;z<Math.max(J.length,Q.length);z++){let Y=J[z],G=Q[z];if(Y===void 0)return-1;if(G===void 0)return 1;if(Y===G)continue;let $=/^\d+$/.test(Y)?Number.parseInt(Y,10):null,U=/^\d+$/.test(G)?Number.parseInt(G,10):null;if($!==null&&U!==null)return $>U?1:-1;if($!==null)return-1;if(U!==null)return 1;return Y>G?1:-1}return 0}function M3(Z,X){let J=(Y)=>Y.split("-")[0]??Y,Q=J(Z).split(".").map((Y)=>Number.parseInt(Y,10)),z=J(X).split(".").map((Y)=>Number.parseInt(Y,10));for(let Y=0;Y<3;Y++){let G=Q[Y]??0,$=z[Y]??0;if(Number.isNaN(G)||Number.isNaN($))return 0;if(G>$)return 1;if(G<$)return-1}return 0}async function nz(Z={}){let X=Z.channel??iz(),J=process.env.KOBE_FAKE_UPDATE;if(J)return{current:n1,latest:J,hasUpdate:AR(J,n1),channel:X};if(z$()&&!Z.force)return null;let Q=await oK0(ER,X);if(!Q)return null;return{current:n1,latest:Q,hasUpdate:AR(Q,n1),channel:X}}function rh(Z){if(typeof Z!=="string")return null;return Z.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function TR(Z){let X=dz();if(!X)return null;let J=`v${Z}`,Q=new AbortController,z=setTimeout(()=>Q.abort(),RD);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases/tags/${J}`,{signal:Q.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.body!=="string"||typeof G.html_url!=="string")return null;return{body:G.body,url:G.html_url,version:Z}}catch{return null}finally{clearTimeout(z)}}async function SR(Z){let X=dz();if(!X)return[];let J=Z.limit??100,Q=new AbortController,z=setTimeout(()=>Q.abort(),RD);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${J}`,{signal:Q.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return[];let G=await Y.json();if(!Array.isArray(G))return[];return G.map(($)=>{let U=rh($.tag_name);if(!U||typeof $.html_url!=="string"||typeof $.body!=="string")return null;if(M3(U,Z.current)<=0)return null;if(M3(U,Z.latest)>0)return null;return{version:U,url:$.html_url,body:$.body}}).filter(($)=>$!==null)}catch{return[]}finally{clearTimeout(z)}}async function xK(Z=12){let X=dz();if(!X)return[];let J=new AbortController,Q=setTimeout(()=>J.abort(),RD);try{let z=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${Z}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!z.ok)return[];let Y=await z.json();if(!Array.isArray(Y))return[];return Y.map((G)=>{let $=rh(G.tag_name);if(!$||typeof G.html_url!=="string")return null;return{version:$,url:G.html_url}}).filter((G)=>G!==null)}catch{return[]}finally{clearTimeout(Q)}}function PR(Z){let X=dz();if(!X)return null;return`https://github.com/${X}/releases/tag/v${Z}`}var n1,ER,ED="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",t9,zX,RD=3000,TD,SD="latest";var $2=m(()=>{oh();V5();n1=CD.version,ER=CD.name;t9=`curl -fsSL ${ED} | sh`;zX=[];TD=["latest","nightly"]});function eh(Z){for(let[X,J]of Object.entries(YX))if(J.includes(Z))return X;return"other"}function IR(Z){if(!Z.values)return;if(Z.name!=="vendor")return Z.values;let X=x8().filter((J)=>!Z.values.includes(J));return X.length>0?[...Z.values,...X]:Z.values}function rK0(Z){let X=IR(Z);return{name:Z.name,type:Z.type,required:Z.required??!1,...X?{values:X}:{},...Z.default!==void 0?{default:Z.default}:{},...Z.placeholder?{placeholder:Z.placeholder}:{},description:Z.description}}function yK(Z){return{name:Z.name,group:eh(Z.name),summary:Z.summary,offline:Z.offline??!1,flags:Z.flags.map(rK0)}}function ID(){let Z=E1();return{apiVersion:PD,kobeVersion:n1,hint:`Compact index. Drill into ONE verb: \`${Z} api schema --verb <name>\` (or \`${Z} api <verb> --help\`). One group: \`--group <g>\`. Whole spec: \`--all\`.`,groups:YX,verbs:GX.map((X)=>({name:X.name,group:eh(X.name),summary:X.summary})),globalFlags:Zu,aliases:I$}}function Xu(Z){let X=YX[Z];if(!X)throw new e0(`unknown group: ${Z}. Groups: ${Object.keys(YX).join(", ")}`,"BAD_FLAG");return{group:Z,verbs:X.map((J)=>{let Q=sJ(J);return{name:J,summary:Q?.summary??""}})}}function xD(){return{apiVersion:PD,kobeVersion:n1,output:{success:"one JSON object on stdout, newline-terminated, exit 0",error:'{"error":{"message","code"}} on stderr, exit != 0',pretty:"--pretty indents stdout JSON"},globalFlags:Zu,aliases:I$,groups:YX,verbs:GX.map(yK)}}function tK0(Z){return Z.flags.map((X)=>{let J=X.type==="enum"&&X.values?IR(X).join("|"):X.placeholder??(X.type==="bool"?"":"X"),Q=J?`--${X.name} ${J}`:`--${X.name}`;return X.required?Q:`[${Q}]`}).join(" ")}function xR(Z){let X=[`${E1()} api ${Z.name} ${tK0(Z)}`.trimEnd(),"",Z.summary,""],J=Object.entries(I$).find(([,Q])=>Q===Z.name)?.[0];if(J)X.push(`Alias: ${J}`,"");if(Z.flags.length>0){X.push("Flags:");for(let Q of Z.flags){let z=Q.required?" (required)":"",Y=Q.default!==void 0?` [default: ${Q.default}]`:"",G=Q.type==="enum"&&Q.values?` {${IR(Q).join("|")}}`:"";X.push(` --${Q.name}${G}${z}${Y} ${Q.description}`)}X.push("")}return X.push("Global: [--pretty] [--help]"),X.join(`
296
+ `)}}onLine(Z){let X;try{X=JSON.parse(Z)}catch(Q){s4("client-frame",Q);return}if(X.type==="event"){this.emit(X);return}if(X.type!=="response")return;let J=this.pending.get(X.id);if(!J)return;if(this.pending.delete(X.id),J.timer)clearTimeout(J.timer);if(X.error){let Q=Error(X.error.message);if(X.error.name)Q.name=X.error.name;J.reject(Q)}else J.resolve(X.payload)}emit(Z){for(let X of this.handlers.get(Z.name)??[])try{X(Z)}catch(J){s4("client-event",J)}for(let X of this.handlers.get("*")??[])try{X(Z)}catch(J){s4("client-event",J)}}}var FR,pK0;var a6=m(()=>{G2();u9();FR=class FR extends Error{constructor(Z,X){super(`daemon rpc "${Z}" timed out after ${X}ms (daemon wedged?)`);this.name="RpcTimeoutError"}};pK0=new Set(["task.ensureWorktree","task.ensureMain","worktree.discoverAdoptable","worktree.adopt","worktree.list","worktree.remove"])});function L5(Z){if(!Z.client)throw new e0("daemon required","BAD_DAEMON");return Z.client}async function A4(Z,X,J){return L5(Z).request(X,J)}async function ih(){let[{KobeDaemonClient:Z},{defaultPtyHostSocketPath:X}]=await Promise.all([Promise.resolve().then(() => (a6(),LR)),Promise.resolve().then(() => (c5(),XE))]),J=new Z(X());try{return await J.connect(),await J.request("pty.list",{})}catch{return{sessions:[]}}finally{J.close()}}var V8=m(()=>{Y2()});function dK0(){MD();let Z=[...Lh()];for(let X of BN()){let J=N1(X);Z.push({id:X,name:J.displayName,command:J.defaultCommand.join(" "),protocol:l9,builtin:!1})}return Z}async function iK0(Z){let X=Z.args.require("command"),J=p9(X);return await A4(Z,"task.setCommand",{taskId:Z.args.require("task-id"),command:X,vendor:J}),{ok:!0,command:X,protocol:J,...J===l9?{generic:!0}:{}}}var nh,ah;var _R=m(()=>{zK();K8();ND();z5();f8();V8();nh={name:"engine-list",summary:"List every engine Rove can launch \u2014 built-ins, registered presets, and engines contributed by enabled plugins \u2014 each with its RAW launch command, exactly as it runs. Copy one into `add --command` / `send --tab new --command` verbatim, or edit its flags first. `protocol` is the adapter Rove speaks to it (history, trust, delivery); `generic` = none, which still runs fine but loses transcript reads. Returns { engines }.",flags:[],offline:!0,handler:async()=>({engines:dK0()})};ah={name:"set-command",summary:"Set a task's engine launch command (takes effect on the next session rebuild). The protocol Rove speaks to it is derived from the command \u2014 the result reports which one, `generic` when the command names no engine Rove knows.",flags:[y1.taskId(),{...y1.command(),required:!0}],handler:iK0}});var CD;var oh=m(()=>{CD={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.69",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.17","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var th={};s1(th,{repoSlug:()=>dz,releasePageUrl:()=>PR,recommendedGlobalInstallCommand:()=>RR,owningNpmPrefix:()=>sh,isNewerSemver:()=>AR,fetchReleaseSummaries:()=>xK,fetchReleaseNotesRange:()=>SR,fetchReleaseNotes:()=>TR,compareSemver:()=>M3,checkLatestVersion:()=>nz,channelOf:()=>iz,breakingVersionsCrossed:()=>IK,UPDATE_SCRIPT_URL:()=>ED,UPDATE_COMMAND:()=>t9,RELEASE_CHANNELS:()=>TD,PACKAGE_NAME:()=>ER,DEFAULT_RELEASE_CHANNEL:()=>SD,CURRENT_VERSION:()=>n1,BREAKING_VERSIONS:()=>zX});import{fileURLToPath as aK0}from"url";function dz(){let Z=CD.repository?.url;if(!Z)return null;let X=Z.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!X||!X[1]||!X[2])return null;return`${X[1]}/${X[2]}`}function sh(Z=aK0(import.meta.url)){let J=Z.indexOf("/lib/node_modules/");if(J<=0)return null;return Z.slice(0,J)}function RR(Z=sh()){let X=`${ER}@latest`;return Z===null?`npm install -g ${X}`:`npm install -g --prefix ${Z} ${X}`}function IK(Z,X,J=zX){let[Q,z]=M3(Z,X)<=0?[Z,X]:[X,Z];return J.filter((Y)=>M3(Y,Q)>0&&M3(Y,z)<=0)}function iz(Z=n1){return CR(Z)?.split(".")[0]==="nightly"?"nightly":SD}async function oK0(Z,X){let J=new AbortController,Q=setTimeout(()=>J.abort(),RD);try{let z=Z.replace("/","%2F"),Y=await fetch(`https://registry.npmjs.org/${z}/${X}`,{signal:J.signal,headers:{accept:"application/json"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.version!=="string")return null;return G.version}catch{return null}finally{clearTimeout(Q)}}function AR(Z,X){let J=M3(Z,X);if(J!==0)return J>0;return sK0(CR(Z),CR(X))>0}function CR(Z){let X=Z.indexOf("-");return X===-1?void 0:Z.slice(X+1)||void 0}function sK0(Z,X){if(Z===X)return 0;if(Z===void 0)return 1;if(X===void 0)return-1;let J=Z.split("."),Q=X.split(".");for(let z=0;z<Math.max(J.length,Q.length);z++){let Y=J[z],G=Q[z];if(Y===void 0)return-1;if(G===void 0)return 1;if(Y===G)continue;let $=/^\d+$/.test(Y)?Number.parseInt(Y,10):null,U=/^\d+$/.test(G)?Number.parseInt(G,10):null;if($!==null&&U!==null)return $>U?1:-1;if($!==null)return-1;if(U!==null)return 1;return Y>G?1:-1}return 0}function M3(Z,X){let J=(Y)=>Y.split("-")[0]??Y,Q=J(Z).split(".").map((Y)=>Number.parseInt(Y,10)),z=J(X).split(".").map((Y)=>Number.parseInt(Y,10));for(let Y=0;Y<3;Y++){let G=Q[Y]??0,$=z[Y]??0;if(Number.isNaN(G)||Number.isNaN($))return 0;if(G>$)return 1;if(G<$)return-1}return 0}async function nz(Z={}){let X=Z.channel??iz(),J=process.env.KOBE_FAKE_UPDATE;if(J)return{current:n1,latest:J,hasUpdate:AR(J,n1),channel:X};if(z$()&&!Z.force)return null;let Q=await oK0(ER,X);if(!Q)return null;return{current:n1,latest:Q,hasUpdate:AR(Q,n1),channel:X}}function rh(Z){if(typeof Z!=="string")return null;return Z.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function TR(Z){let X=dz();if(!X)return null;let J=`v${Z}`,Q=new AbortController,z=setTimeout(()=>Q.abort(),RD);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases/tags/${J}`,{signal:Q.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.body!=="string"||typeof G.html_url!=="string")return null;return{body:G.body,url:G.html_url,version:Z}}catch{return null}finally{clearTimeout(z)}}async function SR(Z){let X=dz();if(!X)return[];let J=Z.limit??100,Q=new AbortController,z=setTimeout(()=>Q.abort(),RD);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${J}`,{signal:Q.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return[];let G=await Y.json();if(!Array.isArray(G))return[];return G.map(($)=>{let U=rh($.tag_name);if(!U||typeof $.html_url!=="string"||typeof $.body!=="string")return null;if(M3(U,Z.current)<=0)return null;if(M3(U,Z.latest)>0)return null;return{version:U,url:$.html_url,body:$.body}}).filter(($)=>$!==null)}catch{return[]}finally{clearTimeout(z)}}async function xK(Z=12){let X=dz();if(!X)return[];let J=new AbortController,Q=setTimeout(()=>J.abort(),RD);try{let z=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${Z}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!z.ok)return[];let Y=await z.json();if(!Array.isArray(Y))return[];return Y.map((G)=>{let $=rh(G.tag_name);if(!$||typeof G.html_url!=="string")return null;return{version:$,url:G.html_url}}).filter((G)=>G!==null)}catch{return[]}finally{clearTimeout(Q)}}function PR(Z){let X=dz();if(!X)return null;return`https://github.com/${X}/releases/tag/v${Z}`}var n1,ER,ED="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",t9,zX,RD=3000,TD,SD="latest";var $2=m(()=>{oh();V5();n1=CD.version,ER=CD.name;t9=`curl -fsSL ${ED} | sh`;zX=[];TD=["latest","nightly"]});function eh(Z){for(let[X,J]of Object.entries(YX))if(J.includes(Z))return X;return"other"}function IR(Z){if(!Z.values)return;if(Z.name!=="vendor")return Z.values;let X=x8().filter((J)=>!Z.values.includes(J));return X.length>0?[...Z.values,...X]:Z.values}function rK0(Z){let X=IR(Z);return{name:Z.name,type:Z.type,required:Z.required??!1,...X?{values:X}:{},...Z.default!==void 0?{default:Z.default}:{},...Z.placeholder?{placeholder:Z.placeholder}:{},description:Z.description}}function yK(Z){return{name:Z.name,group:eh(Z.name),summary:Z.summary,offline:Z.offline??!1,flags:Z.flags.map(rK0)}}function ID(){let Z=E1();return{apiVersion:PD,kobeVersion:n1,hint:`Compact index. Drill into ONE verb: \`${Z} api schema --verb <name>\` (or \`${Z} api <verb> --help\`). One group: \`--group <g>\`. Whole spec: \`--all\`.`,groups:YX,verbs:GX.map((X)=>({name:X.name,group:eh(X.name),summary:X.summary})),globalFlags:Zu,aliases:I$}}function Xu(Z){let X=YX[Z];if(!X)throw new e0(`unknown group: ${Z}. Groups: ${Object.keys(YX).join(", ")}`,"BAD_FLAG");return{group:Z,verbs:X.map((J)=>{let Q=sJ(J);return{name:J,summary:Q?.summary??""}})}}function xD(){return{apiVersion:PD,kobeVersion:n1,output:{success:"one JSON object on stdout, newline-terminated, exit 0",error:'{"error":{"message","code"}} on stderr, exit != 0',pretty:"--pretty indents stdout JSON"},globalFlags:Zu,aliases:I$,groups:YX,verbs:GX.map(yK)}}function tK0(Z){return Z.flags.map((X)=>{let J=X.type==="enum"&&X.values?IR(X).join("|"):X.placeholder??(X.type==="bool"?"":"X"),Q=J?`--${X.name} ${J}`:`--${X.name}`;return X.required?Q:`[${Q}]`}).join(" ")}function xR(Z){let X=[`${E1()} api ${Z.name} ${tK0(Z)}`.trimEnd(),"",Z.summary,""],J=Object.entries(I$).find(([,Q])=>Q===Z.name)?.[0];if(J)X.push(`Alias: ${J}`,"");if(Z.flags.length>0){X.push("Flags:");for(let Q of Z.flags){let z=Q.required?" (required)":"",Y=Q.default!==void 0?` [default: ${Q.default}]`:"",G=Q.type==="enum"&&Q.values?` {${IR(Q).join("|")}}`:"";X.push(` --${Q.name}${G}${z}${Y} ${Q.description}`)}X.push("")}return X.push("Global: [--pretty] [--help]"),X.join(`
297
297
  `)}function wK(){let Z=E1(),X=GX.map((J)=>` ${J.name.padEnd(18)} ${J.summary}`);return[`usage: ${Z} api <verb> [flags] [--pretty] [--help]`,"",`Explore the full surface (names, flags, types) with: ${Z} api schema`,"","verbs:",...X,"","Output is one JSON object on stdout (exit 0); errors are JSON on stderr (exit != 0)."].join(`
298
298
  `)}var PD=2,Zu;var yR=m(()=>{h4();$2();Q5();Y2();yD();Zu=[{name:"pretty",type:"bool",description:"Pretty-print stdout JSON."},{name:"help",type:"bool",description:"Show usage for the verb and exit."}]});function Gu(Z){let X=Z.args.str("precheck");if(X===void 0)return{};if(X.length===0)return{precheck:null};return{precheck:{command:X,timeoutSeconds:Z.args.int("precheck-timeout")??120}}}var Ju,Qu,zu,Yu,$u;var qu=m(()=>{f8();V8();Ju={name:"schedule",type:"string",placeholder:"CRON",description:"Five-field cron in the daemon host's local time, e.g. '0 9 * * MON-FRI'."},Qu=[{name:"precheck",type:"string",placeholder:"CMD",description:"Shell command run in the repo BEFORE the engine starts. Non-zero exit skips the run without spawning an agent \u2014 the cheap way to avoid burning a turn when nothing changed."},{name:"precheck-timeout",type:"int",placeholder:"SEC",description:"Seconds before the precheck is killed and the run skipped (default 120)."}],zu={name:"grace",type:"int",placeholder:"MIN",description:"How late a missed occurrence may still run when the daemon was down (default 60). Only the most recent missed occurrence is ever run."},Yu={name:"persistent-session",type:"bool",description:"Re-deliver into ONE standing task instead of a fresh worktree per run \u2014 for a routine that needs yesterday's context (a trend check). Its task is folded behind the sidebar's routine count row. Leave off for a routine that EDITS code: a week of runs on one branch is a branch nobody can land."};$u=[{name:"routine-list",summary:"List scheduled routines with their next run time.",flags:[],handler:(Z)=>A4(Z,"automation.list",{})},{name:"routine-create",summary:"Schedule a prompt. Each firing creates a fresh task (worktree + engine) and delivers it. An enabled routine keeps the daemon alive so it fires with no TUI attached.",flags:[y1.repo(),{name:"name",type:"string",required:!0,placeholder:"N",description:"Routine name."},y1.prompt(!0,"Text delivered as the new session's first message."),{...Ju,required:!0},y1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"Base ref each run's worktree branches from."},...Qu,zu,Yu,{name:"disabled",type:"bool",description:"Create it paused instead of active."}],handler:(Z)=>A4(Z,"automation.create",{repo:Z.args.requirePath("repo"),name:Z.args.require("name"),prompt:Z.args.require("prompt"),schedule:Z.args.require("schedule"),...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")?{baseRef:Z.args.str("base-branch")}:{},...Gu(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{},...Z.args.bool("persistent-session")?{persistentSession:!0}:{},...Z.args.bool("disabled")?{enabled:!1}:{}})},{name:"routine-update",summary:"Change a routine. A new --schedule re-anchors its next run; --precheck '' clears the precheck.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"name",type:"string",placeholder:"N",description:"New name."},y1.prompt(!1,"New prompt."),Ju,y1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"New base ref ('' to clear)."},...Qu,zu,Yu],handler:(Z)=>A4(Z,"automation.update",{id:Z.args.require("id"),...Z.args.str("name")!==void 0?{name:Z.args.str("name")}:{},...Z.args.str("prompt")!==void 0?{prompt:Z.args.str("prompt")}:{},...Z.args.str("schedule")!==void 0?{schedule:Z.args.str("schedule")}:{},...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")!==void 0?{baseRef:Z.args.str("base-branch")}:{},...Gu(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{},...Z.args.bool("persistent-session")?{persistentSession:!0}:{}})},{name:"routine-set-enabled",summary:"Pause or resume a routine. Disabling the last active one releases the daemon's keep-alive hold.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"enabled",type:"bool",required:!0,description:"true to resume, false to pause."}],handler:(Z)=>A4(Z,"automation.update",{id:Z.args.require("id"),enabled:Z.args.bool("enabled")})},{name:"routine-delete",summary:"Delete a routine and its run history. Tasks it already created are untouched.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>A4(Z,"automation.delete",{id:Z.args.require("id")})},{name:"routine-run-now",summary:"Run a routine immediately, skipping its precheck (asking for it IS the answer). Does not shift its schedule.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>A4(Z,"automation.runNow",{id:Z.args.require("id")})},{name:"routine-runs",summary:"Run history, newest first. Statuses: dispatched, revived (standing session respawned \u2014 files kept, conversation did not), deferred (composer busy; the prompt is queued in the Inbox, NOT lost), skipped_precheck (nothing to do), skipped_missed, skipped_unavailable, dispatch_failed.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>A4(Z,"automation.runs",{id:Z.args.require("id")})}]});function eK0(Z,X){let J="",Q=Z;for(let z=X-1;z>=0;z--){let Y=Q%32;J="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[Y]+J,Q=(Q-Y)/32}return J}function Uu(Z){let X=new Uint8Array(Z);crypto.getRandomValues(X);let J=Array(Z);for(let Q=0;Q<Z;Q++)J[Q]=(X[Q]??0)&31;return J}function ZV0(Z){for(let X=Z.length-1;X>=0;X--){let J=Z[X]??0;if(J<31)return Z[X]=J+1,!0;Z[X]=0}return!1}function XV0(Z){let X="";for(let J of Z)X+="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[J]??"0";return X}function vK(Z=Date.now()){let X,J;if(Z>wR)J=Z,X=Uu(16);else{J=wR;let Q=Hu.slice();if(!ZV0(Q))X=Uu(16);else X=Q}return wR=J,Hu=X,eK0(J,10)+XV0(X)}var wR=-1,Hu;var vR=m(()=>{Hu=Array(16).fill(0)});import{readFile as JV0,stat as QV0,unlink as Ku}from"fs/promises";function Vu(Z,X){return new Promise((J,Q)=>{let z=Z;z.once("error",Q),Z.listen(X,()=>{z.removeListener("error",Q),J()})})}async function $X(Z){try{let X=await JV0(Z,"utf8"),J=Number(X.trim());return Number.isFinite(J)?J:null}catch{return null}}function Bu(Z){let X=Z.watchMs??zV0,J=null,Q=!1,z=null,Y=async()=>{try{let K=await QV0(Z.socketPath);return{dev:K.dev,ino:K.ino}}catch(K){return K.code==="ENOENT"?null:"error"}},G=()=>{if(z)clearInterval(z);z=null},$=async()=>{if(J===null||Q)return;let K=await Y();if(K==="error")return;if(K===null||K.dev!==J.dev||K.ino!==J.ino)Q=!0},U=async()=>{if(J===null||Q)return;if(await $(),!Q)return;G(),Z.onLost()};return{async arm(){let K=await Y();if(K===null||K==="error")return;if(J=K,X>0)z=setInterval(()=>void U(),X),z.unref?.()},async release(K){if(G(),await $(),J!==null&&Q){K.unref();return}await new Promise((W)=>K.close(()=>W())),await Ku(Z.socketPath).catch(()=>{}),await Ku(Z.pidPath).catch(()=>{})}}}var zV0=5000;var fK=()=>{};import{unlink as Wu}from"fs/promises";function wD(Z){try{return process.kill(Z,0),!0}catch(X){return X.code==="EPERM"}}async function qX(Z,X){let J=await $X(X),Q=J!==null&&J!==process.pid?J:null,z=Q!==null&&wD(Q),Y=z?"graceful":"absent",G=new l5(Z),$=G.request("daemon.stop").catch(()=>{return}),U=new Promise((K)=>setTimeout(K,2000));if(await Promise.race([$,U]),G.close(),z&&Q!==null){let K=Date.now()+5000,W=!1;while(Date.now()<K){try{process.kill(Q,0)}catch{break}if(!W&&Date.now()-(K-5000)>2000){try{process.kill(Q,"SIGTERM")}catch{}Y="sigterm",W=!0}await new Promise((D)=>setTimeout(D,50))}try{process.kill(Q,0),process.kill(Q,"SIGKILL"),Y="sigkill",await new Promise((D)=>setTimeout(D,100))}catch{}}return await Wu(Z).catch(()=>{}),await Wu(X).catch(()=>{}),{pid:J,method:Y}}var bK=m(()=>{a6();fK()});var Au={};s1(Au,{tryAcquireSpawnLock:()=>_u,testDaemonResponds:()=>rJ,spawnDetachedDaemon:()=>vD,resolveKobeSpawn:()=>fD,probeDaemonSocket:()=>tJ,ensureDaemonReachable:()=>y$,detachOptions:()=>Fu,connectOrStartDaemon:()=>eJ,connectIfRunning:()=>HX,autospawnDaemonEnv:()=>Lu});import{spawn as YV0}from"child_process";import{closeSync as Mu,existsSync as GV0,mkdirSync as Nu,openSync as Du,statSync as $V0,unlinkSync as ju}from"fs";import{dirname as fR,resolve as x$}from"path";import{fileURLToPath as qV0}from"url";function Fu(Z=process.platform){return Z==="win32"?{windowsHide:!0}:{detached:!0}}function vD(Z,X,J,Q){let z="ignore",Y;try{Nu(fR(Q),{recursive:!0}),Y=Du(Q,"a"),z=["ignore",Y,Y]}catch{z="ignore"}if(YV0(Z,[...X],{...Fu(),stdio:z,env:J}).unref(),Y!==void 0)try{Mu(Y)}catch{}}function KV0(Z=process.env){return typeof Z.KOBE_TASK_ID==="string"&&Z.KOBE_TASK_ID!==""}function Lu(Z=process.env){let{KOBE_TASK_ID:X,KOBE_TAB_ID:J,KOBE_TUI:Q,KOBE_TERMINAL_PTY:z,ROVE_TASK_ID:Y,ROVE_TAB_ID:G,ROVE_TUI:$,ROVE_TERMINAL_PTY:U,...K}=Z;return{...K,KOBE_DAEMON_AUTOSPAWNED:"1",ROVE_DAEMON_AUTOSPAWNED:"1"}}function _u(Z,X=VV0){let J=()=>{return Nu(fR(Z),{recursive:!0}),Mu(Du(Z,"wx")),!0};try{return J()}catch{try{if(Date.now()-$V0(Z).mtimeMs<=X)return!1;return ju(Z),J()}catch{return!1}}}async function y$(){let Z=U8(),X=await tJ(Z);if(X==="alive")return Z;if(X==="wedged"&&KV0())throw Error(`rove: daemon at ${Z} is not answering hello (busy or wedged); not restarting it from inside an engine session \u2014 retry, or run \`rove daemon restart\` from a regular shell`);let J=`${K3()}.spawn-lock`;if(!_u(J)){let Q=Date.now()+BV0;while(Date.now()<Q){if(await rJ(Z))return Z;await new Promise((z)=>setTimeout(z,150))}throw Error(`rove: another process is starting the daemon but it never became reachable at ${Z}; check ${p6()} or run \`rove doctor\``)}try{if(await tJ(Z)==="alive")return Z;let Q=await $X(K3());if(Q!==null&&Q!==process.pid&&wD(Q)){let $=Date.now()+UV0;while(Date.now()<$){if(await new Promise((U)=>setTimeout(U,250)),await rJ(Z))return Z;if(!wD(Q))break}}await qX(Z,K3()).catch(()=>{});let[z,...Y]=fD(HV0);vD(z,Y,Lu(),p6());let G=Date.now()+5000;while(Date.now()<G){if(await rJ(Z))return Z;await new Promise(($)=>setTimeout($,100))}throw Error(`rove: daemon did not start (or stayed wedged) at ${Z}; check ${p6()} or run \`rove doctor\``)}finally{try{ju(J)}catch{}}}async function eJ(){let Z=await y$(),X=new l5(Z);return await X.connect(),X}async function HX(){let Z=U8();if(!await rJ(Z))return null;let X=new l5(Z);return await X.connect(),X}async function tJ(Z,X=Ou){let J=new l5(Z);try{await J.connect()}catch{return J.close(),"absent"}let Q=!1,z=J.onLifecycle("close",()=>{Q=!0}),Y=J.request("hello",{protocolVersion:u2}).then(()=>!0).catch(()=>!0),G,$=new Promise((K)=>{G=setTimeout(()=>K(!1),X)}),U=await Promise.race([Y,$]);if(G)clearTimeout(G);if(z(),J.close(),Q)return"absent";return U?"alive":"wedged"}async function rJ(Z,X=Ou){return await tJ(Z,X)==="alive"}function fD(Z,X=process.env){let J=qV0(import.meta.url);if(J.startsWith("/$bunfs")||J.startsWith("B:\\~BUN"))return[process.execPath,...Z];let Q=fR(J),z=X.ROVE_INVOKED_AS===Q2?Q2:r3,Y=[x$(Q,`../cli/${z}.ts`),x$(Q,`../../../kobe/src/cli/${z}.ts`),x$(Q,`../cli/${z}.js`),x$(Q,"../cli/index.ts"),x$(Q,"../../../kobe/src/cli/index.ts"),x$(Q,"../cli/index.js")],G=Y.find(($)=>GV0($));if(G)return[process.execPath,G,...Z];throw Error(`${z}: could not locate ${z} entry near ${Q}; checked ${Y.join(", ")}`)}var HV0,Ou=3000,UV0=15000,VV0=40000,BV0=30000;var N3=m(()=>{bK();c5();G2();fK();a6();HV0=["daemon","start"]});import{existsSync as Cu}from"fs";import{rename as WV0,rm as MV0}from"fs/promises";import{basename as NV0,delimiter as DV0,dirname as Eu,join as jV0,resolve as bR}from"path";import{fileURLToPath as OV0}from"url";function gR(Z=process.env,X=Cu,J=process.platform){let Q=(Z.PATH??Z.Path??"").split(DV0).filter((Y)=>Y.length>0),z=J==="win32"?(Z.PATHEXT??".EXE;.CMD;.BAT").split(";").filter((Y)=>Y.length>0):[""];for(let Y of Q)for(let G of z){let $=jV0(Y,`node${G}`);if(X($))return $}return null}async function CV0(Z,X,J){let{build:Q,rename:z,discard:Y}=J??{build:(U)=>Bun.build(U),rename:WV0,discard:(U)=>MV0(U,{force:!0})},G=`${X}.${process.pid}.tmp`,$=await Q({entrypoints:[Z],outdir:Eu(G),target:"node",format:"esm",naming:NV0(G),external:["node-pty"]});if(!$.success)return await Y(G).catch(()=>{}),$;return await z(G,X),$}async function EV0(Z={}){let X=Z.platform??process.platform;if(X!=="win32")return null;let J=Z.moduleDir??Eu(OV0(import.meta.url)),Q=Z.exists??Cu,z=Z.bundle??CV0,Y=gR(Z.env??process.env,Q,X);if(!Y)throw Error("Rove: the Windows PTY host runs under node, but no node was found on PATH. "+"Install Node.js (https://nodejs.org) and restart Rove \u2014 engine and terminal sessions cannot start without it.");let G=bR(J,LV0);if(Q(G))return[Y,G];let $=bR(J,AV0);if(!Q($))throw Error(`Rove: no Windows PTY host found (looked for ${G} and ${$})`);let U=bR(J,_V0),K=await z($,U);if(!K.success)throw Error(`Rove: could not build the Windows PTY host \u2014 ${K.logs.map(String).join("; ")}`);return[Y,U]}async function bD(){let Z=w8();if(await rJ(Z))return Z;await qX(Z,tZ()).catch(()=>{});let[X,...J]=await EV0()??fD(FV0);vD(X??"",J,process.env,eZ());let Q=Date.now()+5000;while(Date.now()<Q){if(await rJ(Z))return Z;await new Promise((z)=>setTimeout(z,100))}throw Error(`rove: pty host did not start (or stayed wedged) at ${Z}`)}async function Ru(Z,X){let J=w8(X),Q=new l5(J);try{await Q.connect(),await Q.request("pty.sweep",{liveTaskIds:Z})}catch{}finally{Q.close()}}async function Tu(Z){let X=new l5(w8(Z));try{return await X.connect(),(await X.request("pty.list")).sessions?.some((Q)=>Q.alive===!0)??!1}catch{return!1}finally{X.close()}}var FV0,LV0="pty-host-node.mjs",_V0="../../.cache/pty-host-node.mjs",AV0="../daemon/pty-host-node-entry.ts";var gK=m(()=>{bK();c5();N3();a6();FV0=["pty-host"]});function Su(){return t3(gD,!0)}var gD="delivery.composerGate";var kR=m(()=>{I8()});function Iu(Z){return typeof Z==="string"&&RV0.test(Z)?Z.toLowerCase():null}function D3(Z){if(typeof Z!=="object"||Z===null||Array.isArray(Z))return null;let X=Z,J=Iu(X.foreground),Q=Iu(X.background);return J&&Q?{foreground:J,background:Q}:null}function TV0(Z){let X=Z.slice(1);return[X.slice(0,2),X.slice(2,4),X.slice(4,6)].map((J)=>J.repeat(2)).join("/")}function kD(Z,X){let J=Z===10?X.foreground:X.background;return`\x1B]${Z};rgb:${TV0(J)}\x1B\\`}function SV0(Z){let X=Pu[0].length+1,J=Math.max(0,Z.length-X);for(let Q=J;Q<Z.length;Q++){let z=Z.slice(Q);if(Pu.some((Y)=>Y.startsWith(z)||z===`${Y}\x1B`))return z}return""}function xu(Z,X){let J=Z+X,Q=[],z=0;mR.lastIndex=0;for(let Y=mR.exec(J);Y;Y=mR.exec(J))Q.push(Y[1]==="10"?10:11),z=Y.index+Y[0].length;return{slots:Q,carry:SV0(J.slice(z))}}var UX,RV0,mR,Pu;var KX=m(()=>{UX={foreground:"#eae7df",background:"#141413"},RV0=/^#[0-9a-f]{6}$/i,mR=/\x1b\](10|11);\?(?:\x07|\x1b\\)/g,Pu=["\x1B]10;?","\x1B]11;?"]});import{RGBA as PV0}from"@opentui/core";function hR(Z){let X=Z/255;return X<=0.04045?X/12.92:((X+0.055)/1.055)**2.4}function uR([Z,X,J]){return 0.2126*hR(Z)+0.7152*hR(X)+0.0722*hR(J)}function yu(Z,X){let J=uR(Z),Q=uR(X),z=Math.max(J,Q),Y=Math.min(J,Q);return(z+0.05)/(Y+0.05)}function xV0([Z,X,J]){let Q=Z/255,z=X/255,Y=J/255,G=Math.max(Q,z,Y),$=Math.min(Q,z,Y),U=(G+$)/2;if(G===$)return[0,0,U];let K=G-$,W=U>0.5?K/(2-G-$):K/(G+$),D;if(G===Q)D=((z-Y)/K+(z<Y?6:0))*60;else if(G===z)D=((Y-Q)/K+2)*60;else D=((Q-z)/K+4)*60;return[D,W,U]}function wu(Z,X,J){if(X===0){let G=Math.round(J*255);return[G,G,G]}let Q=J<0.5?J*(1+X):J+X-J*X,z=2*J-Q,Y=(G)=>{let $=G;if($<0)$+=1;if($>1)$-=1;let U=$<0.16666666666666666?z+(Q-z)*6*$:$<0.5?Q:$<0.6666666666666666?z+(Q-z)*(0.6666666666666666-$)*6:z;return Math.round(U*255)};return[Y(Z/360+0.3333333333333333),Y(Z/360),Y(Z/360-0.3333333333333333)]}function cR(Z,X,J=IV0){let Q=Z.toInts(),z=X.toInts(),Y=[Q[0],Q[1],Q[2]],G=[z[0],z[1],z[2]];if(yu(Y,G)>=J)return Z;let[$,U,K]=xV0(Y),W=uR(G)<=yV0,D=(w)=>yu(wu($,U,w),G),N=W?K:0,j=W?1:K;for(let w=0;w<32;w++){let R=(N+j)/2;if(D(R)>=J)if(W)j=R;else N=R;else if(W)N=R;else j=R}let[C,_,F]=wu($,U,W?j:N);return PV0.fromInts(C,_,F,Q[3])}var IV0=4.5,yV0=0.5;var vu=()=>{};var mD;var lR=m(()=>{mD={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#141413",darkBgRaised:"#1A1917",darkBgInset:"#2B2A27",darkBgMenu:"#33312E",darkBorderSubtle:"#2B2A27",darkBorder:"#3A3835",darkBorderActive:"#5C5853",darkText:"#EAE7DF",darkTextMuted:"#A9A39A",darkTextSubtle:"#6B665F",darkPrimary:"#CC785C",darkSecondary:"#D4967E",darkAccent:"#CC785C",darkAccentHover:"#E0AB96",darkRed:"#D47563",darkOrange:"#D97757",darkYellow:"#E8C96B",darkGreen:"#9ACA86",darkBlue:"#61AAF2",darkViolet:"#9B87F5",darkTerracotta:"#BF4D43",lightBg:"#FAF9F5",lightBgRaised:"#F0EEE6",lightBgInset:"#EAE7DF",lightBgMenu:"#E2DED4",lightBorderSubtle:"#EAE7DF",lightBorder:"#D9D5CC",lightBorderActive:"#A9A39A",lightText:"#1A1917",lightTextMuted:"#6B665F",lightTextSubtle:"#8D877D",lightPrimary:"#C96442",lightSecondary:"#B85F3D",lightAccent:"#CC785C",lightAccentHover:"#B85F3D",lightRed:"#A84B3A",lightOrange:"#C96442",lightYellow:"#8A6220",lightGreen:"#2E7C4C",lightBlue:"#207FDE",lightViolet:"#7B5BB6",lightTerracotta:"#BF4D43"},theme:{primary:{dark:"darkPrimary",light:"lightPrimary"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkBlue",light:"lightBlue"},text:{dark:"darkText",light:"lightText"},textMuted:{dark:"darkTextMuted",light:"lightTextMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgRaised",light:"lightBgRaised"},backgroundElement:{dark:"darkBgInset",light:"lightBgInset"},backgroundMenu:{dark:"darkBgMenu",light:"lightBgMenu"},backgroundDialog:{dark:"darkBgRaised",light:"lightBgRaised"},border:{dark:"darkBorder",light:"lightBorder"},borderActive:{dark:"darkBorderActive",light:"lightBorderActive"},borderSubtle:{dark:"darkBorderSubtle",light:"lightBorderSubtle"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHunkHeader:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHighlightAdded:{dark:"#B5E0A0",light:"#1F6638"},diffHighlightRemoved:{dark:"#E89180",light:"#8A3A2C"},diffAddedBg:{dark:"#1F2A1F",light:"#E5EEDF"},diffRemovedBg:{dark:"#2A1F1C",light:"#F5DAD3"},diffContextBg:{dark:"darkBgRaised",light:"lightBgRaised"},diffLineNumber:{dark:"darkTextSubtle",light:"lightTextSubtle"},diffAddedLineNumberBg:{dark:"#1A2419",light:"#D5E2CC"},diffRemovedLineNumberBg:{dark:"#241915",light:"#EBC8BE"},markdownText:{dark:"darkText",light:"lightText"},markdownHeading:{dark:"darkPrimary",light:"lightPrimary"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownLinkText:{dark:"darkBlue",light:"lightBlue"},markdownCode:{dark:"darkSecondary",light:"lightSecondary"},markdownBlockQuote:{dark:"darkTextMuted",light:"lightTextMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkPrimary",light:"lightPrimary"},markdownHorizontalRule:{dark:"darkTextMuted",light:"lightTextMuted"},markdownListItem:{dark:"darkAccent",light:"lightAccent"},markdownListEnumeration:{dark:"darkBlue",light:"lightBlue"},markdownImage:{dark:"darkAccent",light:"lightAccent"},markdownImageText:{dark:"darkBlue",light:"lightBlue"},markdownCodeBlock:{dark:"darkText",light:"lightText"},markdownQuote:{dark:"darkTextMuted",light:"lightTextMuted"},syntaxComment:{dark:"darkTextSubtle",light:"lightTextSubtle"},syntaxKeyword:{dark:"darkPrimary",light:"lightPrimary"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkText",light:"lightText"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkViolet",light:"lightViolet"},syntaxOperator:{dark:"darkSecondary",light:"lightSecondary"},syntaxPunctuation:{dark:"darkText",light:"lightText"},selectedListItemText:{dark:"darkBg",light:"lightBg"}}}});var hD;var pR=m(()=>{hD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#0a0a0a",darkStep2:"#111111",darkStep3:"#181818",darkStep4:"#1f1f1f",darkStep5:"#2a2a2a",darkStep6:"#363636",darkStep7:"#444444",darkStep8:"#5a5a5a",darkStep9:"#7a7a7a",darkStep10:"#9a9a9a",darkStep11:"#909090",darkStep12:"#e8e8e8",darkAccent:"#7da5c8",darkAccentBright:"#9bc3e3",darkRed:"#e06c75",darkOrange:"#d6a668",darkGreen:"#7fd88f",darkCyan:"#7da5c8",darkYellow:"#d6a668",lightStep1:"#fafafa",lightStep2:"#f3f3f3",lightStep3:"#ececec",lightStep4:"#e2e2e2",lightStep5:"#d4d4d4",lightStep6:"#bdbdbd",lightStep7:"#9c9c9c",lightStep8:"#7c7c7c",lightStep9:"#5b5b5b",lightStep10:"#404040",lightStep11:"#6c6c6c",lightStep12:"#1a1a1a",lightAccent:"#3d6f9f",lightAccentBright:"#1a4f87",lightRed:"#c9343a",lightOrange:"#a06b1a",lightGreen:"#3d9a57",lightCyan:"#3d6f9f",lightYellow:"#a06b1a"},theme:{primary:{dark:"darkStep12",light:"lightStep12"},secondary:{dark:"darkAccentBright",light:"lightAccentBright"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},backgroundMenu:{dark:"darkStep4",light:"lightStep4"},border:{dark:"darkStep6",light:"lightStep6"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep4",light:"lightStep4"},diffAdded:{dark:"#7fd88f",light:"#3d9a57"},diffRemoved:{dark:"#e06c75",light:"#c9343a"},diffContext:{dark:"darkStep10",light:"lightStep10"},diffHunkHeader:{dark:"darkStep10",light:"lightStep10"},diffHighlightAdded:{dark:"#9be5ad",light:"#2d7a3f"},diffHighlightRemoved:{dark:"#f08490",light:"#a82530"},diffAddedBg:{dark:"#15241a",light:"#d8efdc"},diffRemovedBg:{dark:"#2a1518",light:"#f5dadc"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep9",light:"lightStep9"},diffAddedLineNumberBg:{dark:"#0f1c14",light:"#c5deca"},diffRemovedLineNumberBg:{dark:"#221012",light:"#e5c5c8"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkStep12",light:"lightStep12"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownCode:{dark:"darkAccentBright",light:"lightAccentBright"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},markdownQuote:{dark:"darkStep11",light:"lightStep11"},selectedListItemText:{dark:"darkStep1",light:"lightStep1"}}}});var uD;var dR=m(()=>{uD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#1a1b26",darkStep2:"#1e2030",darkStep3:"#222436",darkStep4:"#292e42",darkStep5:"#3b4261",darkStep6:"#545c7e",darkStep7:"#737aa2",darkStep8:"#9099b2",darkStep9:"#82aaff",darkStep10:"#89b4fa",darkStep11:"#828bb8",darkStep12:"#c8d3f5",darkRed:"#ff757f",darkOrange:"#ff966c",darkYellow:"#ffc777",darkGreen:"#c3e88d",darkCyan:"#86e1fc",darkPurple:"#c099ff",lightStep1:"#e1e2e7",lightStep2:"#d5d6db",lightStep3:"#c8c9ce",lightStep4:"#b9bac1",lightStep5:"#a8aecb",lightStep6:"#9699a8",lightStep7:"#737a8c",lightStep8:"#5a607d",lightStep9:"#2e7de9",lightStep10:"#1a6ce7",lightStep11:"#8990a3",lightStep12:"#3760bf",lightRed:"#f52a65",lightOrange:"#b15c00",lightYellow:"#8c6c3e",lightGreen:"#587539",lightCyan:"#007197",lightPurple:"#9854f1"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkOrange",light:"lightOrange"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkStep9",light:"lightStep9"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"#8f909a",light:"#59595b"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkPurple",light:"lightPurple"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}}});var cD;var iR=m(()=>{lR();pR();dR();cD={claude:mD,conductor:hD,tokyonight:uD}});import{RGBA as ZQ}from"@opentui/core";function fu(Z){return Boolean(kK[Z])}function mK(Z,X="dark"){let J=Z.defs??{};function Q(U,K=[]){if(typeof U==="string"){if(U==="transparent"||U==="none")return ZQ.fromInts(0,0,0,0);if(U.startsWith("#"))return ZQ.fromHex(U);if(K.includes(U))return ZQ.fromInts(0,0,0);let W=J[U]??Z.theme[U];if(W===void 0)return ZQ.fromInts(0,0,0);return Q(W,[...K,U])}return Q(U[X],K)}let z={};for(let[U,K]of Object.entries(Z.theme))z[U]=Q(K);let Y=z.text??ZQ.fromHex("#ffffff"),G=z.background??ZQ.fromHex("#000000");return{...{primary:z.primary??Y,secondary:z.secondary??Y,accent:z.accent??z.primary??Y,error:z.error??Y,warning:z.warning??Y,success:z.success??Y,info:z.info??Y,text:Y,textMuted:z.textMuted??Y,background:G,backgroundPanel:z.backgroundPanel??G,backgroundElement:z.backgroundElement??G,backgroundMenu:z.backgroundMenu??z.backgroundElement??G,backgroundDialog:z.backgroundDialog??z.backgroundPanel??G,border:z.border??Y,borderActive:z.borderActive??z.border??Y,borderSubtle:z.borderSubtle??z.border??Y,diffAdded:z.diffAdded??z.success??Y,diffRemoved:z.diffRemoved??z.error??Y,diffContext:z.diffContext??z.textMuted??Y,diffHunkHeader:z.diffHunkHeader??z.textMuted??Y,diffAddedBg:z.diffAddedBg??G,diffRemovedBg:z.diffRemovedBg??G,selectedListItemText:z.selectedListItemText??G},...z}}function bu(Z,X,J,Q){let z={...Z,focusAccent:Z[X]??Z.primary};if(!J)return z;let[Y,G,$]=Z.background.toInts(),[U,K,W]=Z.backgroundPanel.toInts(),D={...z,background:ZQ.fromInts(Y,G,$,0),backgroundPanel:ZQ.fromInts(U,K,W,0)};if(!Q)return D;return{...D,text:cR(D.text,Q),textMuted:cR(D.textMuted,Q)}}var kK,VX="claude",XQ;var hK=m(()=>{vu();iR();kK=cD;XQ=["primary","success","info"]});function nR(Z){let X=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(Z);if(!X)return null;let J=X[1];if(J.length===3){let[Q,z,Y]=J;return`#${Q}${Q}${z}${z}${Y}${Y}`.toLowerCase()}return`#${J.slice(0,6)}`.toLowerCase()}function aR(Z,X,J="dark"){let Q=Z.defs??{};function z(G,$){if(typeof G==="string"){if(G==="transparent"||G==="none")return null;if(G.startsWith("#"))return nR(G);if($.includes(G))return null;let K=Q[G]??Z.theme[G];if(K===void 0)return null;return z(K,[...$,G])}if(!G||typeof G!=="object")return null;let U=G[J];return typeof U==="string"?z(U,$):null}let Y=Z.theme[X];if(Y===void 0)return null;return z(Y,[X])}function lD(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function pD(Z){if(!lD(Z))return{ok:!1,reason:"theme must be a JSON object at the top level"};let X=Z;if(!("theme"in X))return{ok:!1,reason:"missing required key `theme`"};let J=X.theme;if(!lD(J))return{ok:!1,reason:"`theme` must be an object map"};if("defs"in X&&X.defs!==void 0){if(!lD(X.defs))return{ok:!1,reason:"`defs` must be an object map"};for(let[Q,z]of Object.entries(X.defs))if(typeof z!=="string")return{ok:!1,reason:`defs.${Q} must be a string (hex like "#abc" or a ref name)`}}for(let[Q,z]of Object.entries(J)){if(typeof z==="string")continue;if(!lD(z))return{ok:!1,reason:`theme.${Q} must be a string or a { dark, light } object (got ${z===null?"null":Array.isArray(z)?"array":typeof z})`};let Y=z;if(typeof Y.dark!=="string")return{ok:!1,reason:`theme.${Q}.dark must be a string`};if(typeof Y.light!=="string")return{ok:!1,reason:`theme.${Q}.light must be a string`}}if("$schema"in X&&X.$schema!==void 0&&typeof X.$schema!=="string")return{ok:!1,reason:"`$schema` must be a string when present"};return{ok:!0,theme:X}}var oR=()=>{};import{readFileSync as bV0,readdirSync as gV0}from"fs";import{join as gu}from"path";function w$(){return gu(y5(),"themes")}function uK(){let Z=w$(),X;try{X=gV0(Z)}catch{return[]}let J=[];for(let Q of X){if(!Q.endsWith(".json"))continue;let z=gu(Z,Q),Y;try{let U=bV0(z,"utf8");Y=JSON.parse(U)}catch(U){let K=s0(U);console.warn(`[rove] skipping user theme ${z}: invalid JSON \u2014 ${K}`);continue}let G=pD(Y);if(!G.ok){console.warn(`[rove] skipping user theme ${z}: ${G.reason}`);continue}let $=Q.slice(0,-5);J.push({name:$,theme:G.theme})}return J}var dD=m(()=>{V5();oR()});var ku,mu;var hu=m(()=>{ku={title:"ROUTINES",holdingDaemon:"keeping the daemon awake",notHolding:"none active",daemonUnreachable:"daemon unreachable",paused:"paused",newTitle:"New routine",fieldName:"name",fieldRepo:"repo",fieldPrompt:"prompt",fieldSchedule:"schedule (five-field cron)",namePlaceholder:"weekday dependency audit",promptPlaceholder:"Audit dependencies and summarize risky changes.",needRepo:"Open a project first \u2014 a routine runs in one.",cronInvalid:"not a five-field cron",cronField:{minute:"min",hour:"hour",dayOfMonth:"day",month:"month",dayOfWeek:"weekday"},cronNever:"valid, but never fires",missing:{name:"Give it a name.",repo:"Pick a project.",prompt:"Say what it should do.",schedule:"That schedule will not run."},empty:"No routines scheduled.",emptyHint:"Press n to create one.",precheck:"precheck: {command}",recentRuns:"RECENT RUNS",noRuns:"Not run yet.",noSelection:"A routine runs its prompt in a project on a schedule.",running:"Running {name}\u2026",ranWith:"{name}: {status}",runNow:"[ run now ]",runNowHint:"try it without waiting for the schedule",deleteTitle:"Delete routine?",deleteBody:"{name} and its run history will be removed. Tasks it already created are untouched.",deleteButton:"Delete",failed:"{error}"},mu={title:"\u4F8B\u884C\u4EFB\u52A1",holdingDaemon:"\u6B63\u5728\u4FDD\u6301\u5B88\u62A4\u8FDB\u7A0B\u5E38\u9A7B",notHolding:"\u65E0\u542F\u7528\u9879",daemonUnreachable:"\u5B88\u62A4\u8FDB\u7A0B\u65E0\u54CD\u5E94",paused:"\u5DF2\u6682\u505C",newTitle:"\u65B0\u5EFA\u4F8B\u884C\u4EFB\u52A1",fieldName:"\u540D\u79F0",fieldRepo:"\u4ED3\u5E93",fieldPrompt:"\u63D0\u793A\u8BCD",fieldSchedule:"\u8C03\u5EA6\uFF08\u4E94\u6BB5 cron\uFF09",namePlaceholder:"\u5DE5\u4F5C\u65E5\u4F9D\u8D56\u5BA1\u8BA1",promptPlaceholder:"\u5BA1\u8BA1\u4F9D\u8D56\u5E76\u603B\u7ED3\u6709\u98CE\u9669\u7684\u53D8\u66F4\u3002",needRepo:"\u5148\u6253\u5F00\u4E00\u4E2A\u9879\u76EE\u2014\u2014\u4F8B\u884C\u4EFB\u52A1\u8981\u8DD1\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u3002",cronInvalid:"\u4E0D\u662F\u5408\u6CD5\u7684\u4E94\u6BB5 cron",cronField:{minute:"\u5206",hour:"\u65F6",dayOfMonth:"\u65E5",month:"\u6708",dayOfWeek:"\u661F\u671F"},cronNever:"\u8BED\u6CD5\u5408\u6CD5\uFF0C\u4F46\u6C38\u8FDC\u4E0D\u4F1A\u89E6\u53D1",missing:{name:"\u8D77\u4E2A\u540D\u5B57\u3002",repo:"\u9009\u4E00\u4E2A\u9879\u76EE\u3002",prompt:"\u8BF4\u660E\u5B83\u8981\u505A\u4EC0\u4E48\u3002",schedule:"\u8FD9\u4E2A\u8C03\u5EA6\u4E0D\u4F1A\u89E6\u53D1\u3002"},empty:"\u8FD8\u6CA1\u6709\u4F8B\u884C\u4EFB\u52A1\u3002",emptyHint:"\u6309 n \u65B0\u5EFA\u4E00\u6761\u3002",precheck:"\u9884\u68C0\uFF1A{command}",recentRuns:"\u6700\u8FD1\u6267\u884C",noRuns:"\u5C1A\u672A\u6267\u884C\u3002",noSelection:"\u4F8B\u884C\u4EFB\u52A1\u4F1A\u6309\u8C03\u5EA6\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u8DD1\u5B83\u7684\u63D0\u793A\u8BCD\u3002",running:"\u6B63\u5728\u8FD0\u884C {name}\u2026",ranWith:"{name}\uFF1A{status}",runNow:"[ \u7ACB\u5373\u8FD0\u884C ]",runNowHint:"\u4E0D\u7B49\u8C03\u5EA6\uFF0C\u76F4\u63A5\u8BD5\u4E00\u6B21",deleteTitle:"\u5220\u9664\u8FD9\u6761\u4F8B\u884C\u4EFB\u52A1\uFF1F",deleteBody:"\u5C06\u5220\u9664 {name} \u53CA\u5176\u6267\u884C\u8BB0\u5F55\u3002\u5B83\u5DF2\u7ECF\u521B\u5EFA\u7684\u4EFB\u52A1\u4E0D\u53D7\u5F71\u54CD\u3002",deleteButton:"\u5220\u9664",failed:"{error}"}});var uu,cu;var lu=m(()=>{uu={cancel:"Cancel",next:"next",create:"create",confirm:"Confirm",paneCrash:{title:"This pane crashed",hint:"Reload it from the Tasks pane (the error was logged to client.log)."},rename:{defaultTitle:"Rename task",defaultFieldLabel:"title",footerHint:"enter {submitLabel} \xB7 esc cancel",defaultSubmitLabel:"rename"},prompt:{fieldLabel:"input",submitLabel:"submit"}},cu={cancel:"\u53D6\u6D88",next:"\u4E0B\u4E00\u6B65",create:"\u521B\u5EFA",confirm:"\u786E\u8BA4",paneCrash:{title:"\u6B64\u9762\u677F\u5DF2\u5D29\u6E83",hint:"\u8BF7\u4ECE\u4EFB\u52A1\u9762\u677F\u91CD\u65B0\u52A0\u8F7D\uFF08\u9519\u8BEF\u5DF2\u8BB0\u5F55\u5230 client.log\uFF09\u3002"},rename:{defaultTitle:"\u91CD\u547D\u540D\u4EFB\u52A1",defaultFieldLabel:"\u540D\u79F0",footerHint:"enter {submitLabel} \xB7 esc \u53D6\u6D88",defaultSubmitLabel:"\u91CD\u547D\u540D"},prompt:{fieldLabel:"\u8F93\u5165",submitLabel:"\u63D0\u4EA4"}}});var pu,du;var iu=m(()=>{pu={fix:{hint:"{count} finding(s) above have a known fix \u2014 run `{command}` to review them one by one",none:"fix: nothing to fix \u2014 no known remediation applies to this report",header:"fixes \u2014 each one asks before running:",willRun:"will run: {command}",confirmPrompt:"apply this fix? [y/N] ",done:"\u2713 done",failed:"\u2717 exited with code {code}",skipped:"\xB7 skipped",nonInteractive:"no interactive terminal \u2014 nothing was executed; run the commands above yourself",manualHeader:"manual steps \u2014 doctor prints these but never runs them:",daemonRestartWhy:"safe to run: engine sessions live in the separate PTY host and survive a daemon restart",daemonStale:"restart the daemon \u2014 it is running an older build than this CLI",daemonDown:"start the daemon \u2014 it is not running",hooksDown:"restart the daemon to re-establish the engine hook channel",inspectStale:"restart the daemon \u2014 it predates the hook-channel check",skillInstallWhy:"safe to run: installs skill files only; re-running is idempotent",skillMissing:"install the Rove agent skill",skillStale:"update the Rove agent skill to the version this build expects",resetWhy:"stops the daemon, the PTY host, and every live session \u2014 not undoable, so doctor only prints it",resetDaemonWedged:"the daemon process is alive but unreachable (wedged)",resetPty:"the PTY host is unreachable or not running",resetLegacy:"pre-v0.8 tmux sessions are still holding processes and memory",engineTabs:"engine tabs may hold a stale daemon socket path",engineTabsAction:"close and reopen the affected engine tabs in the TUI",engineTabsWhy:"kills that tab's live engine session \u2014 your call, not doctor's",humanOnlyWhy:"doctor does not install software or log in to accounts for you",git:"git is not on PATH",gitAction:"install git with your OS package manager",noEngine:"no usable engine \u2014 no engine CLI is both installed and logged in",noEngineAction:"install an engine CLI (claude, codex, copilot, or kimi) and log in",windowsNode:"Node.js is missing \u2014 the Windows PTY host cannot start",windowsNodeAction:"install Node.js from https://nodejs.org"}},du={fix:{hint:"\u4E0A\u9762\u6709 {count} \u9879\u53D1\u73B0\u5B58\u5728\u5DF2\u77E5\u4FEE\u6CD5 \u2014 \u8FD0\u884C `{command}` \u9010\u6761\u67E5\u770B",none:"fix: \u65E0\u53EF\u4FEE\u9879 \u2014 \u672C\u6B21\u62A5\u544A\u6CA1\u6709\u5339\u914D\u5230\u5DF2\u77E5\u4FEE\u6CD5",header:"\u4FEE\u590D\u9879 \u2014 \u6BCF\u4E00\u6761\u90FD\u4F1A\u5148\u8BE2\u95EE\u518D\u6267\u884C:",willRun:"\u5C06\u6267\u884C: {command}",confirmPrompt:"\u6267\u884C\u8FD9\u6761\u4FEE\u590D\u5417? [y/N] ",done:"\u2713 \u5B8C\u6210",failed:"\u2717 \u9000\u51FA\u7801 {code}",skipped:"\xB7 \u5DF2\u8DF3\u8FC7",nonInteractive:"\u6CA1\u6709\u4EA4\u4E92\u7EC8\u7AEF \u2014 \u672A\u6267\u884C\u4EFB\u4F55\u547D\u4EE4; \u8BF7\u81EA\u884C\u8FD0\u884C\u4E0A\u9762\u7684\u547D\u4EE4",manualHeader:"\u4EBA\u5DE5\u6B65\u9AA4 \u2014 doctor \u53EA\u6253\u5370, \u6C38\u8FDC\u4E0D\u4F1A\u66FF\u4F60\u6267\u884C:",daemonRestartWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u5F15\u64CE\u4F1A\u8BDD\u5728\u72EC\u7ACB\u7684 PTY host \u91CC, daemon \u91CD\u542F\u540E\u4ECD\u7136\u5B58\u6D3B",daemonStale:"\u91CD\u542F daemon \u2014 \u5B83\u8FD0\u884C\u7684\u6784\u5EFA\u6BD4\u5F53\u524D CLI \u65E7",daemonDown:"\u542F\u52A8 daemon \u2014 \u5B83\u5F53\u524D\u6CA1\u6709\u5728\u8FD0\u884C",hooksDown:"\u91CD\u542F daemon \u4EE5\u91CD\u5EFA\u5F15\u64CE hook \u901A\u9053",inspectStale:"\u91CD\u542F daemon \u2014 \u5B83\u7684\u7248\u672C\u65E9\u4E8E hook \u901A\u9053\u68C0\u67E5",skillInstallWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u53EA\u5199\u5165 skill \u6587\u4EF6; \u91CD\u590D\u8FD0\u884C\u662F\u5E42\u7B49\u7684",skillMissing:"\u5B89\u88C5 Rove agent skill",skillStale:"\u628A Rove agent skill \u66F4\u65B0\u5230\u5F53\u524D\u6784\u5EFA\u671F\u671B\u7684\u7248\u672C",resetWhy:"\u4F1A\u505C\u6389 daemon\u3001PTY host \u548C\u6240\u6709\u6D3B\u52A8\u4F1A\u8BDD \u2014 \u4E0D\u53EF\u64A4\u9500, \u6240\u4EE5 doctor \u53EA\u6253\u5370",resetDaemonWedged:"daemon \u8FDB\u7A0B\u5B58\u6D3B\u4F46\u65E0\u6CD5\u8FDE\u63A5 (\u5361\u6B7B)",resetPty:"PTY host \u65E0\u6CD5\u8FDE\u63A5\u6216\u6CA1\u6709\u5728\u8FD0\u884C",resetLegacy:"v0.8 \u4E4B\u524D\u7684 tmux \u4F1A\u8BDD\u4ECD\u5360\u7528\u8FDB\u7A0B\u548C\u5185\u5B58",engineTabs:"\u5F15\u64CE tab \u53EF\u80FD\u6301\u6709\u8FC7\u671F\u7684 daemon socket \u8DEF\u5F84",engineTabsAction:"\u5728 TUI \u91CC\u5173\u95ED\u5E76\u91CD\u5F00\u53D7\u5F71\u54CD\u7684\u5F15\u64CE tab",engineTabsWhy:"\u4F1A\u6740\u6389\u8BE5 tab \u7684\u6D3B\u52A8\u5F15\u64CE\u4F1A\u8BDD \u2014 \u7531\u4F60\u51B3\u5B9A, doctor \u4E0D\u4EE3\u52B3",humanOnlyWhy:"doctor \u4E0D\u4F1A\u66FF\u4F60\u5B89\u88C5\u8F6F\u4EF6\u6216\u767B\u5F55\u8D26\u53F7",git:"PATH \u4E0A\u627E\u4E0D\u5230 git",gitAction:"\u7528\u4F60\u7684\u7CFB\u7EDF\u5305\u7BA1\u7406\u5668\u5B89\u88C5 git",noEngine:"\u6CA1\u6709\u53EF\u7528\u5F15\u64CE \u2014 \u6CA1\u6709\u4EFB\u4F55\u5F15\u64CE CLI \u540C\u65F6\u6EE1\u8DB3\u5DF2\u5B89\u88C5\u4E14\u5DF2\u767B\u5F55",noEngineAction:"\u5B89\u88C5\u4EFB\u4E00\u5F15\u64CE CLI\uFF08claude\u3001codex\u3001copilot \u6216 kimi\uFF09\u5E76\u767B\u5F55",windowsNode:"\u7F3A\u5C11 Node.js \u2014 Windows PTY host \u65E0\u6CD5\u542F\u52A8",windowsNodeAction:"\u4ECE https://nodejs.org \u5B89\u88C5 Node.js"}}});var nu,au;var ou=m(()=>{nu={tabs:{all:"All",changes:"Changes"},actions:{zen:"Zen",createPR:"Ask agent to create PR"},legend:{changes:"M modified \xB7 A added \xB7 D deleted \xB7 ? untracked"},scope:{working:"scope: working tree",branch:"scope: vs {base}",toggleHint:"b to toggle"},empty:{noTask:"(no task \u2014 press n to create)",noFiles:"(empty worktree)",noChanges:"(no changes \u2014 clean worktree)"},error:{retryHint:"press r to retry",notGitRepo:"not a git repository",pathMissing:"worktree path is missing",permissionDenied:"permission denied",gitNotInstalled:"git is not installed",gitFailed:"git command failed"},toast:{prOnTargetBranch:"Already on the target branch ({branch}) \u2014 ask the agent to create the PR from a task branch"}},au={tabs:{all:"\u5168\u90E8",changes:"\u6539\u52A8"},actions:{zen:"\u4E13\u6CE8\u6A21\u5F0F",createPR:"\u8BA9 agent \u521B\u5EFA PR"},legend:{changes:"M \u5DF2\u4FEE\u6539 \xB7 A \u5DF2\u6DFB\u52A0 \xB7 D \u5DF2\u5220\u9664 \xB7 ? \u672A\u8DDF\u8E2A"},scope:{working:"\u8303\u56F4\uFF1A\u5DE5\u4F5C\u533A\u6539\u52A8",branch:"\u8303\u56F4\uFF1A\u5BF9\u6BD4 {base}",toggleHint:"\u6309 b \u5207\u6362"},empty:{noTask:"\uFF08\u6682\u65E0\u4EFB\u52A1 \u2014 \u6309 n \u521B\u5EFA\uFF09",noFiles:"\uFF08worktree \u4E3A\u7A7A\uFF09",noChanges:"\uFF08\u65E0\u6539\u52A8 \u2014 worktree \u5E72\u51C0\uFF09"},error:{retryHint:"\u6309 r \u91CD\u8BD5",notGitRepo:"\u4E0D\u662F git \u4ED3\u5E93",pathMissing:"worktree \u8DEF\u5F84\u4E0D\u5B58\u5728",permissionDenied:"\u6743\u9650\u4E0D\u8DB3",gitNotInstalled:"\u672A\u5B89\u88C5 git",gitFailed:"git \u547D\u4EE4\u5931\u8D25"},toast:{prOnTargetBranch:"\u5F53\u524D\u5C31\u5728\u76EE\u6807\u5206\u652F\uFF08{branch}\uFF09\u2014 \u8BF7\u5728\u4EFB\u52A1\u5206\u652F\u4E0A\u8BA9 agent \u521B\u5EFA PR"}}});var su,ru;var tu=m(()=>{su={title:"Rove \u2014 keybindings",esc:"esc",commandLayer:"{prefix} \u2014 more Rove commands",escCancel:"esc cancel",focused:"Focused: {surface}",allBindings:"All keybinding contexts",grammar:"Use keys here \xB7 one-press Rove shortcuts \xB7 {prefix} for more commands",disabled:"prefix disabled",here:"HERE \u2014 only in {surface}",direct:"ONE PRESS \u2014 Rove shortcuts",afterPrefix:"AFTER PREFIX \u2014 more Rove commands",otherPane:"OTHER PANE \u2014 {surface}"},ru={title:"Rove \u2014 \u5FEB\u6377\u952E",esc:"esc",commandLayer:"{prefix} \u2014 \u66F4\u591A Rove \u547D\u4EE4",escCancel:"esc \u53D6\u6D88",focused:"\u5F53\u524D\u7126\u70B9\uFF1A{surface}",allBindings:"\u6240\u6709\u5FEB\u6377\u952E\u4E0A\u4E0B\u6587",grammar:"\u5F53\u524D\u533A\u57DF\u76F4\u63A5\u6309 \xB7 Rove \u5355\u6B21\u5FEB\u6377\u952E \xB7 {prefix} \u6253\u5F00\u66F4\u591A\u547D\u4EE4",disabled:"Prefix \u5DF2\u7981\u7528",here:"\u5F53\u524D\u533A\u57DF \u2014 \u4EC5\u5728{surface}",direct:"\u4E00\u6B21\u6309\u4E0B \u2014 Rove \u5FEB\u6377\u952E",afterPrefix:"\u6309\u4E0B Prefix \u540E \u2014 \u66F4\u591A Rove \u547D\u4EE4",otherPane:"\u5176\u4ED6\u533A\u57DF \u2014 {surface}"}});var eu,Zc;var Xc=m(()=>{eu={status:{commands:"{key} commands",help:"{key} help",sidebar:"{key} sidebar",settings:"settings"},pane:{move:"move",open:"open",collapse:"collapse",diff:"diff"}},Zc={status:{commands:"{key} \u547D\u4EE4",help:"{key} \u5E2E\u52A9",sidebar:"{key} \u4FA7\u680F",settings:"\u8BBE\u7F6E"},pane:{move:"\u79FB\u52A8",open:"\u6253\u5F00",collapse:"\u6298\u53E0",diff:"\u5DEE\u5F02"}}});var Jc,Qc;var zc=m(()=>{Jc={empty:"No engine history for this task.",loading:"loading\u2026",earlier:"\u2026 {count} earlier messages",sessionLabel:"Session",liveTag:"\u25CF LIVE",hint:"[ ] session \xB7 j/k scroll \xB7 \u23CE expand",hintExpanded:"[ ] session \xB7 j/k scroll \xB7 \u23CE collapse",role:{user:"USER",assistant:"ASSISTANT",system:"SYSTEM"},thinking:"thinking"},Qc={empty:"\u6B64\u4EFB\u52A1\u6CA1\u6709\u5F15\u64CE\u5386\u53F2\u8BB0\u5F55\u3002",loading:"\u52A0\u8F7D\u4E2D\u2026",earlier:"\u2026 \u4E4B\u524D\u8FD8\u6709 {count} \u6761\u6D88\u606F",sessionLabel:"\u4F1A\u8BDD",liveTag:"\u25CF \u5B9E\u65F6",hint:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u5C55\u5F00",hintExpanded:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u6536\u8D77",role:{user:"\u7528\u6237",assistant:"\u52A9\u624B",system:"\u7CFB\u7EDF"},thinking:"\u601D\u8003"}});var Yc,Gc;var $c=m(()=>{Yc={title:"Kanban",hint:"tab project \xB7 \u2190\u2193\u2191\u2192 card \xB7 enter detail \xB7 n new \xB7 d delete \xB7 r refresh \xB7 esc close",loading:"Loading issues\u2026",noRepos:"No projects yet \u2014 create a task first.",empty:"No issues \u2014 agents file them via `rove api issue-create`.",columnEmpty:"No cards",column:{backlog:"Backlog",inProgress:"In progress",parked:"Parked",done:"Done"},more:"+{count} more",attention:"{count} need you",turnComplete:"turn done",detail:{status:{open:"open",doing:"doing",hold:"hold",done:"done"},created:"created {date}",linked:"linked to a session",titleLabel:"TITLE",description:"DESCRIPTION",noDescription:"No description.",attachHint:"paste a path / ctrl+v screenshot \u2192 inserts an image placeholder",engine:"ENGINE",workspace:"WORKSPACE",placement:{worktree:"New worktree task \u2014 its own workspace",projectWorktree:"New worktree \u2014 as a chattab in the project workspace",project:"Project checkout \u2014 a new chattab, no worktree"},jumpLabel:"AFTER START",jump:{stay:"Stay on the board",follow:"Jump to the session"},startLegend:"enter/ctrl+enter start \xB7 tab fields \xB7 \u2190\u2192 engine \xB7 \u2191\u2193 workspace \xB7 esc save & close",sessionLabel:"SESSION",openAction:"Open the linked session \u21B5",openLegend:"enter/ctrl+enter open the linked session \xB7 tab fields \xB7 esc save & close",eventsLabel:"EVENTS",eventsLoading:"Loading events\u2026",eventsNone:"No engine events recorded yet.",doneNote:"Done stories have nothing left to start \xB7 esc save & close",startedBackground:"Started in background: {title}",newStory:"NEW STORY",createLegend:"ctrl+s save \xB7 enter/ctrl+enter save & start \xB7 tab fields \xB7 esc cancel"},confirmDelete:{title:"Delete story #{id}?",body:"\u201C{title}\u201D will be removed from the tracker. A linked task, branch, or worktree is left untouched."},deleteFailed:"Couldn't delete story #{id}: {error}",createFailed:"Couldn't create the story: {error}",updateFailed:"Couldn't save story #{id}: {error}",statusFailed:"Story #{id} stays in its old column: {error}",linkFailed:"Story #{id} isn't linked to its task: {error}"},Gc={title:"\u770B\u677F",hint:"tab \u5207\u9879\u76EE \xB7 \u2190\u2193\u2191\u2192 \u9009\u5361\u7247 \xB7 enter \u8BE6\u60C5 \xB7 n \u65B0\u5EFA \xB7 d \u5220\u9664 \xB7 r \u5237\u65B0 \xB7 esc \u5173\u95ED",loading:"\u6B63\u5728\u52A0\u8F7D issues\u2026",noRepos:"\u8FD8\u6CA1\u6709\u9879\u76EE\u2014\u2014\u5148\u521B\u5EFA\u4E00\u4E2A\u4EFB\u52A1\u3002",empty:"\u6682\u65E0 issue\u2014\u2014agent \u53EF\u901A\u8FC7 `rove api issue-create` \u521B\u5EFA\u3002",columnEmpty:"\u6682\u65E0\u5361\u7247",column:{backlog:"\u5F85\u529E",inProgress:"\u8FDB\u884C\u4E2D",parked:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},more:"\u8FD8\u6709 {count} \u6761",attention:"{count} \u5F20\u7B49\u4F60\u5904\u7406",turnComplete:"\u56DE\u5408\u5B8C\u6210",detail:{status:{open:"\u5F85\u529E",doing:"\u8FDB\u884C\u4E2D",hold:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},created:"\u521B\u5EFA\u4E8E {date}",linked:"\u5DF2\u5173\u8054\u4F1A\u8BDD",titleLabel:"\u6807\u9898",description:"\u63CF\u8FF0",noDescription:"\u6682\u65E0\u63CF\u8FF0\u3002",attachHint:"\u7C98\u8D34\u8DEF\u5F84 / ctrl+v \u8D34\u622A\u56FE \u2192 \u63D2\u5165\u56FE\u7247\u5360\u4F4D\u884C",engine:"\u5F15\u64CE",workspace:"\u5DE5\u4F5C\u533A",placement:{worktree:"\u65B0\u5EFA worktree \u4EFB\u52A1\u2014\u2014\u72EC\u7ACB\u5DE5\u4F5C\u533A",projectWorktree:"\u65B0\u5EFA worktree\u2014\u2014\u4F5C\u4E3A\u9879\u76EE\u5DE5\u4F5C\u533A\u91CC\u7684 chattab",project:"\u9879\u76EE\u4E3B\u76EE\u5F55\u2014\u2014\u65B0\u5F00 chattab,\u4E0D\u5EFA worktree"},jumpLabel:"\u542F\u52A8\u540E",jump:{stay:"\u7559\u5728\u770B\u677F",follow:"\u8DF3\u8F6C\u5230\u4F1A\u8BDD"},startLegend:"enter/ctrl+enter \u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 \u2190\u2192 \u5F15\u64CE \xB7 \u2191\u2193 \u5DE5\u4F5C\u533A \xB7 esc \u4FDD\u5B58\u5173\u95ED",sessionLabel:"\u4F1A\u8BDD",openAction:"\u6253\u5F00\u5173\u8054\u4F1A\u8BDD \u21B5",openLegend:"enter/ctrl+enter \u6253\u5F00\u5DF2\u5173\u8054\u4F1A\u8BDD \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u4FDD\u5B58\u5173\u95ED",eventsLabel:"\u4E8B\u4EF6",eventsLoading:"\u6B63\u5728\u52A0\u8F7D\u4E8B\u4EF6\u2026",eventsNone:"\u6682\u65E0\u5F15\u64CE\u4E8B\u4EF6\u8BB0\u5F55\u3002",doneNote:"\u5DF2\u5B8C\u6210\u7684 story \u65E0\u9700\u542F\u52A8 \xB7 esc \u4FDD\u5B58\u5173\u95ED",startedBackground:"\u5DF2\u5728\u540E\u53F0\u542F\u52A8:{title}",newStory:"\u65B0\u5EFA STORY",createLegend:"ctrl+s \u4EC5\u4FDD\u5B58 \xB7 enter/ctrl+enter \u4FDD\u5B58\u5E76\u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u53D6\u6D88"},confirmDelete:{title:"\u5220\u9664 story #{id}?",body:"\u300C{title}\u300D\u5C06\u4ECE tracker \u4E2D\u79FB\u9664\u3002\u5DF2\u5173\u8054\u7684\u4EFB\u52A1\u3001\u5206\u652F\u3001worktree \u4E0D\u53D7\u5F71\u54CD\u3002"},deleteFailed:"\u5220\u9664 story #{id} \u5931\u8D25\uFF1A{error}",createFailed:"\u521B\u5EFA story \u5931\u8D25\uFF1A{error}",updateFailed:"\u4FDD\u5B58 story #{id} \u5931\u8D25\uFF1A{error}",statusFailed:"Story #{id} \u4ECD\u7559\u5728\u539F\u6765\u7684\u5217\uFF1A{error}",linkFailed:"Story #{id} \u672A\u80FD\u5173\u8054\u5230\u5B83\u7684\u4EFB\u52A1\uFF1A{error}"}});var qc,Hc;var Uc=m(()=>{qc={category:{Global:"Global",Sidebar:"Sidebar",Workspace:"Workspace",Navigation:"Navigation","Tasks pane":"Tasks pane",Files:"Files",Terminal:"Terminal",Dialog:"Dialog",Views:"Views",Tasks:"Tasks",Sessions:"Sessions",Attention:"Attention",Tools:"Tools"},desc:{"help.open":"Show keybindings help","task.new":"New task","task.openEditor":"Open active Task directory in editor","task.moveMode":"Reorder sidebar rows (then j/k \u2014 tab, task, or project)","settings.open":"Open settings","settings.open.sidebar":"Open settings","inbox.show":"Open attention Inbox","worktrees.open.sidebar":"Open worktrees","kanban.open":"Open kanban (issues board)","automations.open":"Open routines (scheduled tasks)","workItems.open":"Open GitHub issues (external tracker)","app.quit":"Quit (with confirm)","focus.sidebar":"Back to sidebar (tasks)","focus.previous":"Focus previous pane (files \u2192 workspace \u2192 sidebar)","focus.next":"Focus next pane (sidebar \u2192 workspace \u2192 files)","workspace.zenToggle":"Toggle zen mode","attention.next":"Jump to the next attention item","chat.interrupt":"Interrupt current turn (esc while streaming)","sidebar.nav":"Move cursor up/down","sidebar.select":"Open the selected task","sidebar.tree.open":"Open the row under the cursor","sidebar.goto":"Top / bottom of list (gg or shift-G)","sidebar.rename":"Rename task","sidebar.localMerge":"Reorder row (Shift+M, then j/k \u2014 tab, task, or project)","sidebar.pin":"Pin / unpin task at top (Shift+P)","sidebar.sort":"Switch task sort (default \u2194 recent)","sidebar.delete":"Delete task (with confirm)","sidebar.search.enter":"Search tasks (fuzzy filter)","sidebar.search.nav":"Move highlight in search results","sidebar.search.submit":"Select search match and exit search","sidebar.search.cancel":"Cancel search (restore prior selection)","tasks.openWorktree":"Open selected Task directory in your editor","tasks.renameBranch":"Rename the selected task's git branch","tasks.cycleEngine":"Cycle engine vendor \u2014 applies on reopen","tasks.update":"Open the update page (when a new version is available)","tasks.focusEngine":"Focus the engine pane of the current window","tasks.jump":"Jump to the task showing that digit","chat.send":"Send message (composer)","chat.newline":"Newline in composer","chat.cycle-mode":"Cycle permission mode (composer)","chat.steer":"Steer (interrupt + send) \u2014 mid-stream only","chat.tab.new":"New chat tab","chat.tab.chooseEngine":"New conversation \u2014 engine/shell picker with destination + context toggles","chat.tab.fork":"Fork this chat into a new tab (same Task directory, keeps the conversation)","chat.fork.new":"Quick-fork: create child task seeded with current repo/branch/model","chat.tab.close":"Close chat tab","chat.tab.rename":"Rename active chat tab","chat.tab.cycle-next":"Next chat tab","chat.tab.cycle-prev":"Previous chat tab","workspace.split.right":"Split right","workspace.split.down":"Split down","workspace.split.focus-next":"Focus next split","workspace.split.close":"Close active split (tab when unsplit)","workspace.split.rename":"Rename active split (tab when unsplit)","files.nav":"Move cursor up/down","files.hierarchy":"Collapse / expand tree level","files.open":"Open file in configured editor (diff when supported)","files.tab":"Switch tab (cycle All / Changes)","files.refresh":"Refresh","files.scope":"Toggle Changes scope (working \u2194 branch vs base)","files.diff":"Open a read-only diff in a workspace tab","files.openExternal":"Open file in system default app (audio / video / pdf preview)","files.mention":"Inject @<path> mention into the engine pane","files.createPR":"Ask the agent to create a PR from the current task","diff.review.cursor":"Move the line cursor over the diff","diff.review.range":"Toggle range anchor at the cursor","diff.review.note":"Add a review note at the cursor","diff.review.send":"Send all unsent review notes to the engine","inbox.nav":"Move through attention items","inbox.open":"Open the selected attention item","inbox.delete":"Clear the selected attention item","terminal.scroll-up":"Scroll scrollback up","terminal.scroll-down":"Scroll scrollback down","terminal.reset":"Reset terminal \u2014 kill the current shell and respawn","dialog.cancel":"Close the top dialog (esc)","dialog.newtask.tab.cycle":"Switch New Task tab (Existing / New Repo)"}},Hc={category:{Global:"\u5168\u5C40",Sidebar:"\u4FA7\u8FB9\u680F",Workspace:"\u5DE5\u4F5C\u533A",Navigation:"\u5BFC\u822A","Tasks pane":"\u4EFB\u52A1\u9762\u677F",Files:"\u6587\u4EF6",Terminal:"\u7EC8\u7AEF",Dialog:"\u5BF9\u8BDD\u6846",Views:"\u89C6\u56FE",Tasks:"\u4EFB\u52A1",Sessions:"\u4F1A\u8BDD",Attention:"\u63D0\u9192",Tools:"\u5DE5\u5177"},desc:{"help.open":"\u663E\u793A\u5FEB\u6377\u952E\u5E2E\u52A9","task.new":"\u65B0\u5EFA\u4EFB\u52A1","task.openEditor":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u5F53\u524D Task \u7684\u76EE\u5F55","task.moveMode":"\u8C03\u6574\u4FA7\u8FB9\u680F\u884C\u987A\u5E8F\uFF08\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","settings.open":"\u6253\u5F00\u8BBE\u7F6E","settings.open.sidebar":"\u6253\u5F00\u8BBE\u7F6E","inbox.show":"\u6253\u5F00\u63D0\u9192\u6536\u4EF6\u7BB1","worktrees.open.sidebar":"\u6253\u5F00 worktrees","kanban.open":"\u6253\u5F00\u770B\u677F\uFF08issues\uFF09","automations.open":"\u6253\u5F00\u4F8B\u884C\u4EFB\u52A1\uFF08\u5B9A\u65F6\u4EFB\u52A1\uFF09","workItems.open":"\u6253\u5F00 GitHub issues\uFF08\u5916\u90E8\u8DDF\u8E2A\u5668\uFF09","app.quit":"\u9000\u51FA\uFF08\u9700\u786E\u8BA4\uFF09","focus.sidebar":"\u8FD4\u56DE\u4FA7\u8FB9\u680F\uFF08\u4EFB\u52A1\u5217\u8868\uFF09","focus.previous":"\u805A\u7126\u4E0A\u4E00\u4E2A\u9762\u677F\uFF08\u6587\u4EF6 \u2192 \u5DE5\u4F5C\u533A \u2192 \u4FA7\u8FB9\u680F\uFF09","focus.next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u9762\u677F\uFF08\u4FA7\u8FB9\u680F \u2192 \u5DE5\u4F5C\u533A \u2192 \u6587\u4EF6\uFF09","workspace.zenToggle":"\u5207\u6362\u7985\u6A21\u5F0F","attention.next":"\u8DF3\u5230\u4E0B\u4E00\u4E2A\u9700\u8981\u6CE8\u610F\u7684\u9879\u76EE","chat.interrupt":"\u4E2D\u65AD\u5F53\u524D\u8F6E\u6B21\uFF08\u6D41\u5F0F\u8F93\u51FA\u4E2D\u6309 esc\uFF09","sidebar.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","sidebar.select":"\u6253\u5F00\u9009\u4E2D\u7684\u4EFB\u52A1","sidebar.tree.open":"\u6253\u5F00\u5149\u6807\u6240\u5728\u884C","sidebar.goto":"\u8DF3\u5230\u5217\u8868\u9876\u90E8 / \u5E95\u90E8\uFF08gg \u6216 shift-G\uFF09","sidebar.rename":"\u91CD\u547D\u540D\u4EFB\u52A1","sidebar.localMerge":"\u8C03\u6574\u5F53\u524D\u884C\u987A\u5E8F\uFF08Shift+M\uFF0C\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","sidebar.pin":"\u7F6E\u9876 / \u53D6\u6D88\u7F6E\u9876\u4EFB\u52A1\uFF08Shift+P\uFF09","sidebar.sort":"\u5207\u6362\u4EFB\u52A1\u6392\u5E8F\u65B9\u5F0F\uFF08\u9ED8\u8BA4 \u2194 \u6700\u8FD1\uFF09","sidebar.delete":"\u5220\u9664\u4EFB\u52A1\uFF08\u9700\u786E\u8BA4\uFF09","sidebar.search.enter":"\u641C\u7D22\u4EFB\u52A1\uFF08\u6A21\u7CCA\u8FC7\u6EE4\uFF09","sidebar.search.nav":"\u5728\u641C\u7D22\u7ED3\u679C\u4E2D\u79FB\u52A8\u9AD8\u4EAE","sidebar.search.submit":"\u9009\u4E2D\u641C\u7D22\u5339\u914D\u9879\u5E76\u9000\u51FA\u641C\u7D22","sidebar.search.cancel":"\u53D6\u6D88\u641C\u7D22\uFF08\u6062\u590D\u4E4B\u524D\u7684\u9009\u4E2D\u9879\uFF09","tasks.openWorktree":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u9009\u4E2D Task \u7684\u76EE\u5F55","tasks.renameBranch":"\u91CD\u547D\u540D\u9009\u4E2D\u4EFB\u52A1\u7684 git \u5206\u652F","tasks.cycleEngine":"\u5FAA\u73AF\u5207\u6362\u5F15\u64CE\u5382\u5546\u2014\u2014\u91CD\u65B0\u6253\u5F00\u540E\u751F\u6548","tasks.update":"\u6253\u5F00\u66F4\u65B0\u9875\u9762\uFF08\u6709\u65B0\u7248\u672C\u65F6\uFF09","tasks.focusEngine":"\u805A\u7126\u5F53\u524D\u7A97\u53E3\u7684\u5F15\u64CE\u9762\u677F","tasks.jump":"\u8DF3\u5230\u663E\u793A\u5BF9\u5E94\u6570\u5B57\u7684\u4EFB\u52A1","chat.send":"\u53D1\u9001\u6D88\u606F\uFF08\u8F93\u5165\u6846\uFF09","chat.newline":"\u5728\u8F93\u5165\u6846\u4E2D\u6362\u884C","chat.cycle-mode":"\u5FAA\u73AF\u5207\u6362\u6743\u9650\u6A21\u5F0F\uFF08\u8F93\u5165\u6846\uFF09","chat.steer":"\u5F15\u5BFC\uFF08\u4E2D\u65AD\u5E76\u53D1\u9001\uFF09\u2014\u2014\u4EC5\u9650\u6D41\u5F0F\u8F93\u51FA\u4E2D","chat.tab.new":"\u65B0\u5EFA\u804A\u5929\u6807\u7B7E\u9875","chat.tab.chooseEngine":"\u65B0\u5EFA\u5BF9\u8BDD \u2014\u2014 \u9009\u62E9\u5F15\u64CE\u6216 shell\uFF0C\u53EF\u5207\u6362\u843D\u70B9\u4E0E\u4E0A\u4E0B\u6587","chat.tab.fork":"\u6D3E\u751F\u5F53\u524D\u5BF9\u8BDD\u5230\u65B0\u6807\u7B7E\u9875\uFF08\u540C\u4E00 Task \u76EE\u5F55\uFF0C\u5E26\u4E0A\u5DF2\u6709\u5BF9\u8BDD\uFF09","chat.fork.new":"\u5FEB\u901F\u6D3E\u751F\uFF1A\u4EE5\u5F53\u524D\u4ED3\u5E93/\u5206\u652F/\u6A21\u578B\u521B\u5EFA\u5B50\u4EFB\u52A1","chat.tab.close":"\u5173\u95ED\u804A\u5929\u6807\u7B7E\u9875","chat.tab.rename":"\u91CD\u547D\u540D\u5F53\u524D\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-next":"\u4E0B\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-prev":"\u4E0A\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","workspace.split.right":"\u5411\u53F3\u5206\u5C4F","workspace.split.down":"\u5411\u4E0B\u5206\u5C4F","workspace.split.focus-next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u5206\u5C4F","workspace.split.close":"\u5173\u95ED\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u5173\u95ED\u6807\u7B7E\u9875\uFF09","workspace.split.rename":"\u91CD\u547D\u540D\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u91CD\u547D\u540D\u6807\u7B7E\u9875\uFF09","files.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","files.hierarchy":"\u6298\u53E0 / \u5C55\u5F00\u6811\u5C42\u7EA7","files.open":"\u5728\u5DF2\u914D\u7F6E\u7684\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u652F\u6301\u65F6\u663E\u793A diff\uFF09","files.tab":"\u5207\u6362\u6807\u7B7E\u9875\uFF08\u5FAA\u73AF \u5168\u90E8 / \u53D8\u66F4\uFF09","files.refresh":"\u5237\u65B0","files.scope":"\u5207\u6362\u53D8\u66F4\u8303\u56F4\uFF08\u5DE5\u4F5C\u533A \u2194 \u5206\u652F\u5BF9\u6BD4 base\uFF09","files.diff":"\u5728\u5DE5\u4F5C\u533A\u6807\u7B7E\u9875\u4E2D\u6253\u5F00\u53EA\u8BFB diff","files.openExternal":"\u5728\u7CFB\u7EDF\u9ED8\u8BA4\u5E94\u7528\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u97F3\u9891 / \u89C6\u9891 / pdf \u9884\u89C8\uFF09","files.mention":"\u5C06 @<path> \u63D0\u53CA\u6CE8\u5165\u5F15\u64CE\u9762\u677F","files.createPR":"\u8BA9 agent \u4ECE\u5F53\u524D\u4EFB\u52A1\u521B\u5EFA PR","diff.review.cursor":"\u5728 diff \u4E2D\u79FB\u52A8\u884C\u5149\u6807","diff.review.range":"\u5728\u5149\u6807\u5904\u5207\u6362\u8303\u56F4\u951A\u70B9","diff.review.note":"\u5728\u5149\u6807\u5904\u6DFB\u52A0\u5BA1\u9605\u5907\u6CE8","diff.review.send":"\u5C06\u6240\u6709\u672A\u53D1\u9001\u7684\u5BA1\u9605\u5907\u6CE8\u53D1\u7ED9\u5F15\u64CE","inbox.nav":"\u5728\u63D0\u9192\u9879\u76EE\u4E4B\u95F4\u79FB\u52A8","inbox.open":"\u6253\u5F00\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","inbox.delete":"\u6E05\u9664\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","terminal.scroll-up":"\u5411\u4E0A\u6EDA\u52A8\u56DE\u6EDA","terminal.scroll-down":"\u5411\u4E0B\u6EDA\u52A8\u56DE\u6EDA","terminal.reset":"\u91CD\u7F6E\u7EC8\u7AEF\u2014\u2014\u5173\u95ED\u5F53\u524D shell \u5E76\u91CD\u65B0\u542F\u52A8","dialog.cancel":"\u5173\u95ED\u9876\u5C42\u5BF9\u8BDD\u6846\uFF08esc\uFF09","dialog.newtask.tab.cycle":"\u5207\u6362\u65B0\u5EFA\u4EFB\u52A1\u6807\u7B7E\u9875\uFF08\u73B0\u6709\u4ED3\u5E93 / \u65B0\u4ED3\u5E93\uFF09"}}});var Kc,Vc;var Bc=m(()=>{Kc={title:"New task",tabs:{existing:"For Existing",clone:"For New Repo",adopt:"Adopt Worktree"},field:{engine:"engine",repo:"repo",fromBranch:"from branch",gitUrl:"git url",parentDir:"parent dir",folderName:"folder name",baseBranch:"base branch",adoptFilter:"filter (path glob)",opens:"opens"},intent:{task:"a new task worktree",project:"the project itself"},placeholder:{folderName:"auto from url",adoptFilter:"* \u2014 type e.g. feature-* to narrow"},hint:{engineCycle:"ctrl+e",remembered:"(remembered \u2014 next clone defaults to this dir)",currentDir:"(current dir)",noBranchesFound:"(no local branches found \u2014 typed text will be used as ref)",noMatchBranch:"(no match \u2014 typed text will be used as ref)",scanningWorktrees:"scanning worktrees\u2026"},picker:{moreAbove:"\u2191 {count} more",moreBelow:"\u2193 {count} more"},open:{failed:"Couldn't open the project: {error}"},adopt:{repoLine:"repo: {path}",repoNone:"(none)",noUnlinked:"no unlinked worktrees \u2014 every git worktree here is already a task",noMatch:"no worktrees match the filter",hintSelected:"{count} selected \xB7 enter toggles \xB7 ctrl+a all \xB7 Create imports",hintDefault:"enter toggles \xB7 ctrl+a all \xB7 Create imports the highlighted row",summaryAll:"Adopted {count} worktree(s)",summaryPartial:"Adopted {done}/{total} worktrees \u2014 the rest failed (see log)",summaryNone:"Couldn't adopt any worktree: {error}"},clone:{progressFallback:"Cloning\u2026",progressInto:"Cloning into {target}\u2026"},button:{create:"[ Create ]",createFocused:"\u25B8 [ Create ]",cloning:"[ Cloning\u2026 ]"},error:{gitUrlRequired:"git URL is required",gitUrlInvalid:"does not look like a git URL: {url}",folderRequired:"folder name is required",folderHasSeparator:"folder name cannot contain path separators",parentRequired:"parent directory is required",parentNotFound:"parent directory does not exist: {path}",parentNotDir:"not a directory: {path}",targetExists:"target already exists: {path}",cloneFailed:"git clone failed: {error}",noAdoptable:"no adoptable worktrees to import"}},Vc={title:"\u65B0\u5EFA\u4EFB\u52A1",tabs:{existing:"\u5DF2\u6709\u4ED3\u5E93",clone:"\u514B\u9686\u65B0\u4ED3\u5E93",adopt:"\u63A5\u7BA1 Worktree"},field:{engine:"\u5F15\u64CE",repo:"\u4ED3\u5E93",fromBranch:"\u57FA\u51C6\u5206\u652F",gitUrl:"git \u5730\u5740",parentDir:"\u7236\u76EE\u5F55",folderName:"\u6587\u4EF6\u5939\u540D",baseBranch:"\u57FA\u51C6\u5206\u652F",adoptFilter:"\u8FC7\u6EE4\uFF08\u8DEF\u5F84 glob\uFF09",opens:"\u6253\u5F00"},intent:{task:"\u65B0\u5EFA\u4EFB\u52A1 worktree",project:"\u9879\u76EE\u672C\u8EAB"},placeholder:{folderName:"\u81EA\u52A8\u4ECE\u5730\u5740\u63A8\u5BFC",adoptFilter:"* \u2014 \u8F93\u5165\u5982 feature-* \u6765\u7F29\u5C0F\u8303\u56F4"},hint:{engineCycle:"ctrl+e",remembered:"\uFF08\u5DF2\u8BB0\u4F4F \u2014 \u4E0B\u6B21\u514B\u9686\u9ED8\u8BA4\u4F7F\u7528\u6B64\u76EE\u5F55\uFF09",currentDir:"\uFF08\u5F53\u524D\u76EE\u5F55\uFF09",noBranchesFound:"\uFF08\u672A\u627E\u5230\u672C\u5730\u5206\u652F \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",noMatchBranch:"\uFF08\u65E0\u5339\u914D \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",scanningWorktrees:"\u6B63\u5728\u626B\u63CF worktree\u2026"},picker:{moreAbove:"\u2191 \u8FD8\u6709 {count} \u9879",moreBelow:"\u2193 \u8FD8\u6709 {count} \u9879"},open:{failed:"\u65E0\u6CD5\u6253\u5F00\u9879\u76EE\uFF1A{error}"},adopt:{repoLine:"\u4ED3\u5E93\uFF1A{path}",repoNone:"\uFF08\u65E0\uFF09",noUnlinked:"\u6CA1\u6709\u672A\u5173\u8054\u7684 worktree \u2014 \u6B64\u4ED3\u5E93\u6240\u6709 git worktree \u5747\u5DF2\u662F\u4EFB\u52A1",noMatch:"\u6CA1\u6709 worktree \u5339\u914D\u6B64\u8FC7\u6EE4\u6761\u4EF6",hintSelected:"\u5DF2\u9009 {count} \u9879 \xB7 enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5BFC\u5165",hintDefault:"enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5C06\u5BFC\u5165\u9AD8\u4EAE\u884C",summaryAll:"\u5DF2\u63A5\u7BA1 {count} \u4E2A worktree",summaryPartial:"\u5DF2\u63A5\u7BA1 {done}/{total} \u4E2A worktree \u2014 \u5176\u4F59\u5931\u8D25\uFF08\u8BE6\u89C1\u65E5\u5FD7\uFF09",summaryNone:"\u6CA1\u6709 worktree \u63A5\u7BA1\u6210\u529F\uFF1A{error}"},clone:{progressFallback:"\u514B\u9686\u4E2D\u2026",progressInto:"\u6B63\u5728\u514B\u9686\u5230 {target}\u2026"},button:{create:"[ \u521B\u5EFA ]",createFocused:"\u25B8 [ \u521B\u5EFA ]",cloning:"[ \u514B\u9686\u4E2D\u2026 ]"},error:{gitUrlRequired:"git \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",gitUrlInvalid:"\u4E0D\u50CF\u662F\u6709\u6548\u7684 git \u5730\u5740\uFF1A{url}",folderRequired:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u4E3A\u7A7A",folderHasSeparator:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u5305\u542B\u8DEF\u5F84\u5206\u9694\u7B26",parentRequired:"\u7236\u76EE\u5F55\u4E0D\u80FD\u4E3A\u7A7A",parentNotFound:"\u7236\u76EE\u5F55\u4E0D\u5B58\u5728\uFF1A{path}",parentNotDir:"\u4E0D\u662F\u76EE\u5F55\uFF1A{path}",targetExists:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728\uFF1A{path}",cloneFailed:"git clone \u5931\u8D25\uFF1A{error}",noAdoptable:"\u6CA1\u6709\u53EF\u63A5\u7BA1\u7684 worktree"}}});var Wc,Mc;var Nc=m(()=>{Wc={title:"Welcome to Rove",subtitle:"Two quick questions and a quick environment check before your first launch.",completionsQuestion:"Install shell completions for {shell}?",completionsExplain:"Tab-completes rove subcommands. One line is added to your shell config.",skillQuestion:"Install the Rove agent skill?",skillExplain:"Teaches coding agents to drive Rove from the shell via `rove api`.",optionYes:"Yes (recommended)",optionNo:"No",legend:"\u2191\u2193 select \xB7 enter confirm \xB7 q skip setup",keysTitle:"Keyboard basics",keysBare:"Bare keys act in the focused pane \u2014 {nav} moves, {open} opens.",keysOnePress:"A few one-press chords are Rove's own \u2014 {newTab} new tab, {focusNext} next pane.",keysPrefix:"{prefix} opens the command map \u2014 hold it a beat and a guide appears.",keysHelp:"{help} shows the full live reference anytime.",keysLegend:"enter finish",envTitle:"Environment check",envExplain:"Read-only \u2014 what Rove found on this machine:",envReady:"\u2713 You're set \u2014 at least one engine is ready.",envNotReady:"\u2717 No usable engine yet \u2014 Rove needs one to run tasks.",envLegend:"enter continue \xB7 q skip setup",notReadyHeader:"Not ready yet:",appliedCompletions:"\u2713 completions hooked into {path} (takes effect in new shells)",skippedCompletions:"\xB7 completions skipped \u2014 run `{command}` anytime",installingSkill:"installing the Rove agent skill ({command})\u2026",skillFailed:"! skill install failed \u2014 retry with `{command}`",skillNeedsNode:"! agent skill needs `npx` (part of Node.js) \u2014 install Node from https://nodejs.org, then run `{command}`",skippedSkill:"\xB7 agent skill skipped \u2014 run `{command}` anytime",ready:"You're ready to go!",readyHint:"Run `{command}` to launch the TUI."},Mc={title:"\u6B22\u8FCE\u4F7F\u7528 Rove",subtitle:"\u9996\u6B21\u542F\u52A8\u524D\uFF0C\u5148\u56DE\u7B54\u4E24\u4E2A\u5C0F\u95EE\u9898\uFF0C\u518D\u505A\u4E00\u6B21\u73AF\u5883\u68C0\u67E5\u3002",completionsQuestion:"\u4E3A {shell} \u5B89\u88C5 shell \u8865\u5168\u5417\uFF1F",completionsExplain:"\u8BA9 rove \u5B50\u547D\u4EE4\u652F\u6301 Tab \u8865\u5168\uFF0C\u4F1A\u5728\u4F60\u7684 shell \u914D\u7F6E\u91CC\u52A0\u4E00\u884C\u3002",skillQuestion:"\u5B89\u88C5 Rove agent skill \u5417\uFF1F",skillExplain:"\u6559\u4F1A\u7F16\u7801 agent \u901A\u8FC7 `rove api` \u5728\u547D\u4EE4\u884C\u9A71\u52A8 Rove\u3002",optionYes:"\u5B89\u88C5\uFF08\u63A8\u8350\uFF09",optionNo:"\u8DF3\u8FC7",legend:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u786E\u8BA4 \xB7 q \u8DF3\u8FC7\u8BBE\u7F6E",keysTitle:"\u952E\u76D8\u57FA\u7840",keysBare:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F \u2014 {nav} \u79FB\u52A8\uFF0C{open} \u6253\u5F00\u3002",keysOnePress:"\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u5C5E\u4E8E Rove \u81EA\u5DF1 \u2014 {newTab} \u65B0\u6807\u7B7E\u9875\uFF0C{focusNext} \u5207\u6362\u9762\u677F\u3002",keysPrefix:"{prefix} \u6253\u5F00\u547D\u4EE4\u5C42 \u2014 \u6309\u4F4F\u7A0D\u7B49\u4F1A\u51FA\u73B0\u547D\u4EE4\u6307\u5357\u3002",keysHelp:"\u968F\u65F6\u6309 {help} \u67E5\u770B\u5B8C\u6574\u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",keysLegend:"enter \u5B8C\u6210",envTitle:"\u73AF\u5883\u68C0\u67E5",envExplain:"\u53EA\u8BFB\u68C0\u67E5 \u2014 Rove \u5728\u8FD9\u53F0\u673A\u5668\u4E0A\u53D1\u73B0\u4E86\u4EC0\u4E48\uFF1A",envReady:"\u2713 \u4E00\u5207\u5C31\u7EEA \u2014 \u81F3\u5C11\u4E00\u4E2A\u5F15\u64CE\u53EF\u7528\u3002",envNotReady:"\u2717 \u8FD8\u6CA1\u6709\u53EF\u7528\u5F15\u64CE \u2014 Rove \u9700\u8981\u4E00\u4E2A\u5F15\u64CE\u624D\u80FD\u8FD0\u884C\u4EFB\u52A1\u3002",envLegend:"enter \u7EE7\u7EED \xB7 q \u8DF3\u8FC7\u8BBE\u7F6E",notReadyHeader:"\u8FD8\u6CA1\u51C6\u5907\u597D\uFF1A",appliedCompletions:"\u2713 \u8865\u5168\u5DF2\u5199\u5165 {path}\uFF08\u65B0\u5F00\u7684 shell \u751F\u6548\uFF09",skippedCompletions:"\xB7 \u5DF2\u8DF3\u8FC7\u8865\u5168 \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",installingSkill:"\u6B63\u5728\u5B89\u88C5 Rove agent skill\uFF08{command}\uFF09\u2026",skillFailed:"! skill \u5B89\u88C5\u5931\u8D25 \u2014 \u53EF\u7528 `{command}` \u91CD\u8BD5",skillNeedsNode:"! agent skill \u9700\u8981 `npx`\uFF08Node.js \u7684\u4E00\u90E8\u5206\uFF09\u2014 \u8BF7\u4ECE https://nodejs.org \u5B89\u88C5 Node\uFF0C\u7136\u540E\u8FD0\u884C `{command}`",skippedSkill:"\xB7 \u5DF2\u8DF3\u8FC7 agent skill \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",ready:"\u4E00\u5207\u5C31\u7EEA\uFF01",readyHint:"\u8FD0\u884C `{command}` \u542F\u52A8 TUI\u3002"}});var Dc,jc;var Oc=m(()=>{Dc={preview:{diffVsHead:"diff vs HEAD",diffVsBase:"diff vs {base}",file:"file",image:"image",binary:"binary file",closeHint:"\xB7 q to close",loading:"loading\u2026",noTextPreview:"no text preview",openHint:"o open in system viewer",review:{noteDialogTitle:"Review note \u2014 {location}",noteFieldLabel:"note",noteSubmitLabel:"add note",notePlaceholder:"what should the agent change here?",count:"{total} notes \xB7 {unsent} unsent",keysHint:"j/k line \xB7 v range \xB7 c note \xB7 s send"}}},jc={preview:{diffVsHead:"\u4E0E HEAD \u5BF9\u6BD4",diffVsBase:"\u4E0E {base} \u5BF9\u6BD4",file:"\u6587\u4EF6",image:"\u56FE\u7247",binary:"\u4E8C\u8FDB\u5236\u6587\u4EF6",closeHint:"\xB7 q \u5173\u95ED",loading:"\u52A0\u8F7D\u4E2D\u2026",noTextPreview:"\u65E0\u6587\u672C\u9884\u89C8",openHint:"o \u7528\u7CFB\u7EDF\u67E5\u770B\u5668\u6253\u5F00",review:{noteDialogTitle:"\u8BC4\u5BA1\u5907\u6CE8 \u2014 {location}",noteFieldLabel:"\u5907\u6CE8",noteSubmitLabel:"\u6DFB\u52A0\u5907\u6CE8",notePlaceholder:"\u5E0C\u671B agent \u5728\u8FD9\u91CC\u6539\u4EC0\u4E48\uFF1F",count:"{total} \u6761\u5907\u6CE8 \xB7 {unsent} \u6761\u672A\u53D1\u9001",keysHint:"j/k \u884C \xB7 v \u8303\u56F4 \xB7 c \u5907\u6CE8 \xB7 s \u53D1\u9001"}}}});var Fc,Lc;var _c=m(()=>{Fc={title:"Quick task \xB7 {repoLabel}",esc:"esc",promptLabel:"prompt",promptPlaceholder:"what should this task do?",engineLabel:"engine",branchLabel:"branch"},Lc={title:"\u5FEB\u901F\u4EFB\u52A1 \xB7 {repoLabel}",esc:"esc",promptLabel:"\u63D0\u793A\u8BCD",promptPlaceholder:"\u8FD9\u4E2A\u4EFB\u52A1\u8981\u505A\u4EC0\u4E48\uFF1F",engineLabel:"\u5F15\u64CE",branchLabel:"\u5206\u652F"}});var Ac,Cc;var Ec=m(()=>{Ac={title:"Settings",esc:"esc",nav:{default:"j/k pick \xB7 h/l switch level \xB7 enter activate \xB7 esc close",feedback:"tab next field \xB7 enter sends on Send \xB7 esc close"},sections:{general:"General",engines:"Engines",plugins:"Plugins",keys:"Keybindings",feedback:"Feedback",dev:"Dev"},general:{usage:"USAGE",theme:"Theme",themeHint:"l to enter list \xB7 j/k to highlight \xB7 enter to apply",language:"Language",languageHint:"Display language for Rove's UI. l to enter list \xB7 j/k to highlight \xB7 enter to apply.",transparent:"Transparent background",transparentHint:"Drops the renderer's bg fill so the host terminal shows through. `t` toggles.",on:"[x] on",off:"[ ] off",focusAccent:"Focus accent",focusAccentHint:"Color of focused pane title, \u258C marker, and split borders.",accentPrimary:"Primary (brand accent)",accentSuccess:"Success (legacy green)",accentInfo:"Info (cool blue)",appearance:"Appearance",appearanceHint:"How split panes draw.",splitBox:"Box frames",splitLine:"Divider line",notifications:"Notifications",notificationsHint:"When a background tab finishes or pauses on an approval.",toast:"Toast",toastHint:"bottom-right popup",sound:"Sound",soundHint:"bell + chime + an OSC 9 desktop notification (rides SSH)",crossTask:"Cross-task",crossTaskHint:"also for a task you switched away from",keyHints:"Keyboard hints",keyHintsHint:"The status-bar reminder and the first-use hints in the sidebar and files panes.",keyHintsShow:"Show keyboard hints",keyHintsShowHint:"re-enabling relights hints dismissed by use",zen:"Zen mode",zenHint:"The `zen` chip and `prefix`+z hide Files, keeping the Tasks rail and workspace.",zenDefaultOn:"Start in zen mode",zenKeepTasks:"Keep Tasks pane",zenKeepTasksHint:"legacy \u2014 no layout effect today",editor:"Editor",editorHint:"What enter opens a file with in the file tree \u2014 diff mode when the editor supports it, the read-only preview when it isn't installed.",editorRow:"editor: < {kind} >",editorRowHint:"auto follows $VISUAL / $EDITOR, else nvim / vim / emacs / nano",editorCustom:"custom: {cmd}",editorCustomUnset:"(unset \u2014 enter to edit)",worktree:"Worktree location",worktreeHint:"Where new task worktrees are created. New tasks only.",worktreeBase:"location: < {kind} >",worktreeBaseHint:"custom takes `~`, a relative path, or a leading `$project_dir`",worktreeKindDefault:"default ~/.rove/worktrees",worktreeKindNext:"next to project",worktreeKindCustom:"custom",worktreeCustom:"custom: {path}",worktreeCustomUnset:"(unset \u2014 enter to edit)",worktreeBaseTitle:"Custom worktree location (blank = default; $project_dir = project root)",worktreeBaseField:"path",terminal:"Terminal",terminalHint:"Applies to terminals opened after the change.",scrollbackRow:"scrollback: {rows} rows",scrollbackRowHint:"100\u2013100000 \xB7 larger costs proportionally more CPU per redraw",scrollbackTitle:"Terminal scrollback rows (100\u2013100000)",scrollbackField:"rows",scrollbackInvalidTitle:"Not a number",scrollbackInvalidBody:"Scrollback must be a number of rows (e.g. 1000). Keeping the previous setting.",tabStripRow:"tab strip: {mode}",tabStripMode:{never:"off \u2014 the sidebar tree lists tabs",multipleOnly:"only with 2+ tabs",always:"always"}},engines:{title:"Engines",hint:"Every engine Rove can launch, with what detection found under each one: where its binary is, and for the engines with an account detector whether you are logged in. [x] = offered when picking an engine for a task; (\u25CF) = the global default (per-project picks, e.g. Ctrl+Shift+T, override it) \u2014 click either, or use the keys below. Override a launch command when the binary isn't on PATH or to pass default flags. space on/off \xB7 enter edit command \xB7 r rename \xB7 x reset/remove \xB7 d set default.",customTag:" (custom)",addEngine:"+ Add engine"},accounts:{checking:"Checking\u2026",notLoggedIn:"\u25CB Not logged in",loggedIn:"\u25CF Logged in: {email}",apiKeyConfigured:"\u25CF API key configured",chatgptLogin:"\u25CF ChatGPT login: {email}",tokenConfigured:"\u25CF Token configured ({source})",detected:"\u25CF Login detected"},plugins:{title:"Plugins",hint:"Plugins registered in ~/.kobe/plugins.json. enter (or click) toggles one on or off \u2014 the daemon watches the file, so the change applies live. Rows indented under a plugin are the settings it declares; enter edits one, and the value reaches the plugin on its next run. Install and remove them from the shell: `rove plugin install <owner/repo>`, `rove plugin link <dir>`.",empty:"No plugins registered. Install one with `rove plugin install <owner/repo>` \u2014 browse the `rove-plugin` topic on GitHub.",sourceLink:"linked {path}",sourceGithub:"{spec}",updateAvailable:"update available \u2014 rove plugin update",declares:"{actions} actions \xB7 {events} events \xB7 {panes} panes",declaresWithEngines:"{actions} actions \xB7 {events} events \xB7 {panes} panes \xB7 {engines} engines",manifestUnreadable:"manifest unreadable",unsupportedPlatform:"\xB7 not supported on this platform",noHooks:"\xB7 no hooks declared",lastRun:"\xB7 last run {label} {status} {ago} ago",neverRun:"\xB7 never run",runOk:"ok",runFailed:"failed to start",runExit:"exit {code}",settingUnset:"(unset \u2014 enter to edit)",settingInvalidTitle:"Not a number",settingInvalidBody:"{label} only accepts a number. Keeping the previous value."},keybindings:{title:"Keybindings",hint:"Rebind direct and prefix chords in your own YAML file; changes reload live. Press F1 anywhere for the live keymap with every binding id.",configFile:"Config file",notCreated:" (not created yet)",prefixTitle:"Command layer ({prefix})",prefixHint:"Bare keys act in the focused pane; a small one-press set covers frequent Rove actions; {prefix} opens the command layer ({timeout}ms second-stroke window). Prefix bindings keep their pane scope and modal rules.",tapPresentation:"Prefix tap",tapPresentationHint:"Choose whether the complete guide also marks controls already on screen.",tapPresentationLocal:"On-screen entries + complete guide (default)",tapPresentationGuide:"Complete guide only",prefixDisabled:"disabled",fixed:"Fixed (not rebindable): {ids}.",createHint:"No overrides file yet. Rove can write one for you, fully commented \u2014 nothing is rebound until you uncomment a line.",createFile:"[enter] Create keybindings.yaml",overridesApplied:"Overrides applied",none:"none",unbound:"(unbound)",defaultKeys:"default: {keys}",warnings:"Warnings"},feedback:{title:"Feedback",hint:"Sends a GitHub Discussion to the Rove repo through `gh`. Requires `gh auth login`; category defaults to Feedback.",titleLabel:"title",titlePlaceholder:"Short summary",descriptionLabel:"description",descriptionPlaceholder:"What happened? (enter for a new line \xB7 tab to Send)",send:"[enter] Send to GitHub Discussions"},dev:{reset:"Reset UI state",resetHint:"Clears ~/.config/rove/state.json and ~/.rove/tasks.json, then quits Rove \u2014 relaunch to start fresh. Working session list, pane sizes, theme, model picks all reset. Worktrees on disk and engine session history are not touched.",resetButton:"[enter] Reset",restart:"Restart backend",restartHint:"Stops the Rove daemon and quits this Rove window so the next launch spawns a fresh daemon \u2014 picks up daemon / orchestrator / engine edits without a process kill. Other attached Rove windows will lose their connection too.",restartButton:"[enter] Restart",doctorHint:"Daemon wedged or unresponsive? From a shell, run `rove daemon restart`, then relaunch Rove. Hosted engine sessions stay alive across a daemon restart.",experimental:"Experimental",remoteHint:"Remote projects (SSH): register a project whose git worktrees live on another host, driven from this local Rove. Unfinished \u2014 Hosted PTY engine launch over SSH is not implemented, and file/diff panes still degrade. Enables `rove add --remote`.",remote:"Remote projects",autoStatusHint:"Auto status flow: a backlog task moves to in_progress when its engine starts a turn, and new sessions get a system-prompt note telling the agent to set in_review itself when the work is done. Never touches done/canceled.",autoStatus:"Auto status flow",dispatcherHint:"Field-notes dispatcher: task sessions file one-line gotchas (`rove api note`), the daemon forwards each to the repo's main session, and that session relays them to the in-flight tasks that benefit (`rove api dispatch`). Web-hosted sessions receive the relays today.",dispatcher:"Field-notes dispatcher",composerGateHint:"Before pasting a peer/API prompt into a running engine, Rove reads that session's screen and holds the message if the composer already has text in it. The check knows each engine's CURRENT layout, so a vendor redesign can make it wrong \u2014 turn it off if messages are being held over composers you can see are empty. The separate recent-keystroke guard stays on either way, so a composer you are typing into now is still protected.",composerGate:"Check the composer before delivering"}},Cc={title:"\u8BBE\u7F6E",esc:"esc",nav:{default:"j/k \u9009\u62E9 \xB7 h/l \u5207\u6362\u5C42\u7EA7 \xB7 enter \u786E\u8BA4 \xB7 esc \u5173\u95ED",feedback:"tab \u4E0B\u4E00\u9879 \xB7 enter \u5728\u53D1\u9001\u9879\u53D1\u9001 \xB7 esc \u5173\u95ED"},sections:{general:"\u901A\u7528",engines:"\u5F15\u64CE",plugins:"\u63D2\u4EF6",keys:"\u5FEB\u6377\u952E",feedback:"\u53CD\u9988",dev:"\u5F00\u53D1"},general:{usage:"\u7528\u91CF",theme:"\u4E3B\u9898",themeHint:"l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528",language:"\u8BED\u8A00",languageHint:"Rove \u754C\u9762\u7684\u663E\u793A\u8BED\u8A00\u3002l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528\u3002",transparent:"\u900F\u660E\u80CC\u666F",transparentHint:"\u53BB\u6389\u6E32\u67D3\u5668\u7684\u80CC\u666F\u586B\u5145\uFF0C\u8BA9\u5BBF\u4E3B\u7EC8\u7AEF\u900F\u51FA\u6765\u3002\u6309 `t` \u5207\u6362\u3002",on:"[x] \u5F00",off:"[ ] \u5173",focusAccent:"\u805A\u7126\u5F3A\u8C03\u8272",focusAccentHint:"\u805A\u7126\u9762\u677F\u6807\u9898\u3001\u258C \u6807\u8BB0\u548C\u5206\u9694\u8FB9\u6846\u7684\u989C\u8272\u3002",accentPrimary:"\u4E3B\u8272\uFF08\u54C1\u724C\u5F3A\u8C03\u8272\uFF09",accentSuccess:"\u6210\u529F\u8272\uFF08\u4F20\u7EDF\u7EFF\uFF09",accentInfo:"\u4FE1\u606F\u8272\uFF08\u51B7\u84DD\uFF09",appearance:"\u5916\u89C2",appearanceHint:"\u5206\u5C4F\u9762\u677F\u600E\u4E48\u753B\u8FB9\u3002",splitBox:"\u65B9\u6846\u8FB9\u6846",splitLine:"\u5355\u7EBF\u5206\u9694",notifications:"\u901A\u77E5",notificationsHint:"\u540E\u53F0\u6807\u7B7E\u5B8C\u6210\u6216\u5728\u5BA1\u6279\u5904\u6682\u505C\u65F6\u89E6\u53D1\u3002",toast:"Toast \u5F39\u7A97",toastHint:"\u53F3\u4E0B\u89D2\u5F39\u7A97",sound:"\u58F0\u97F3",soundHint:"\u54CD\u94C3 + \u63D0\u793A\u97F3 + OSC 9 \u684C\u9762\u901A\u77E5\uFF08\u7ECF SSH \u76F4\u8FBE\u672C\u5730\uFF09",crossTask:"\u8DE8\u4EFB\u52A1",crossTaskHint:"\u4F60\u5DF2\u5207\u8D70\u7684\u4EFB\u52A1\u4E5F\u901A\u77E5",keyHints:"\u952E\u76D8\u63D0\u793A",keyHintsHint:"\u72B6\u6001\u680F\u63D0\u9192\uFF0C\u4EE5\u53CA\u4FA7\u680F\u548C\u6587\u4EF6\u9762\u677F\u7684\u9996\u7528\u63D0\u793A\u3002",keyHintsShow:"\u663E\u793A\u952E\u76D8\u63D0\u793A",keyHintsShowHint:"\u91CD\u65B0\u5F00\u542F\u4F1A\u70B9\u4EAE\u5DF2\u56E0\u4F7F\u7528\u800C\u7184\u706D\u7684\u63D0\u793A",zen:"\u7985\u6A21\u5F0F",zenHint:"`zen` \u6807\u8BB0\u548C `prefix`+z \u9690\u85CF Files\uFF0C\u4FDD\u7559 Tasks \u4FA7\u680F\u4E0E workspace\u3002",zenDefaultOn:"\u542F\u52A8\u5373\u8FDB\u5165\u7985\u6A21\u5F0F",zenKeepTasks:"\u4FDD\u7559 Tasks \u9762\u677F",zenKeepTasksHint:"\u65E7\u8BBE\u7F6E \u2014 \u5F53\u524D\u4E0D\u6539\u53D8\u5E03\u5C40",editor:"\u7F16\u8F91\u5668",editorHint:"\u6587\u4EF6\u6811\u91CC\u6309 enter \u7528\u4EC0\u4E48\u6253\u5F00\u6587\u4EF6\u2014\u2014\u652F\u6301\u65F6\u8D70\u7F16\u8F91\u5668 diff \u6A21\u5F0F\uFF0C\u672A\u5B89\u88C5\u65F6\u56DE\u9000\u5230\u53EA\u8BFB\u9884\u89C8\u3002",editorRow:"\u7F16\u8F91\u5668: < {kind} >",editorRowHint:"auto \u8DDF\u968F $VISUAL / $EDITOR\uFF0C\u5426\u5219 nvim / vim / emacs / nano",editorCustom:"\u81EA\u5B9A\u4E49: {cmd}",editorCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktree:"\u5DE5\u4F5C\u6811\u4F4D\u7F6E",worktreeHint:"\u65B0\u4EFB\u52A1\u5DE5\u4F5C\u6811\u7684\u521B\u5EFA\u4F4D\u7F6E\u3002\u4EC5\u5BF9\u65B0\u4EFB\u52A1\u751F\u6548\u3002",worktreeBase:"\u4F4D\u7F6E: < {kind} >",worktreeBaseHint:"\u81EA\u5B9A\u4E49\u53EF\u586B `~`\u3001\u76F8\u5BF9\u8DEF\u5F84\u6216\u4EE5 `$project_dir` \u5F00\u5934",worktreeKindDefault:"\u9ED8\u8BA4 ~/.rove/worktrees",worktreeKindNext:"\u9879\u76EE\u65C1\u8FB9",worktreeKindCustom:"\u81EA\u5B9A\u4E49",worktreeCustom:"\u81EA\u5B9A\u4E49: {path}",worktreeCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktreeBaseTitle:"\u81EA\u5B9A\u4E49\u5DE5\u4F5C\u6811\u4F4D\u7F6E\uFF08\u7559\u7A7A = \u9ED8\u8BA4\uFF1B$project_dir = \u9879\u76EE\u6839\u76EE\u5F55\uFF09",worktreeBaseField:"\u8DEF\u5F84",terminal:"\u7EC8\u7AEF",terminalHint:"\u5BF9\u4FEE\u6539\u540E\u65B0\u6253\u5F00\u7684\u7EC8\u7AEF\u751F\u6548\u3002",scrollbackRow:"\u56DE\u6EDA\u884C\u6570: {rows} \u884C",scrollbackRowHint:"100\u2013100000 \xB7 \u8C03\u5927\u4F1A\u6309\u6BD4\u4F8B\u589E\u52A0\u6BCF\u6B21\u91CD\u7ED8\u7684 CPU",scrollbackTitle:"\u7EC8\u7AEF\u56DE\u6EDA\u884C\u6570\uFF08100\u2013100000\uFF09",scrollbackField:"\u884C\u6570",scrollbackInvalidTitle:"\u4E0D\u662F\u6570\u5B57",scrollbackInvalidBody:"\u56DE\u6EDA\u884C\u6570\u5FC5\u987B\u662F\u6570\u5B57\uFF08\u5982 1000\uFF09\u3002\u4FDD\u7559\u539F\u8BBE\u7F6E\u3002",tabStripRow:"\u6807\u7B7E\u680F: {mode}",tabStripMode:{never:"\u5173\u95ED \u2014 \u6807\u7B7E\u5728\u5DE6\u4FA7\u6811\u91CC",multipleOnly:"\u4EC5 2 \u4E2A\u4EE5\u4E0A\u6807\u7B7E\u65F6\u663E\u793A",always:"\u59CB\u7EC8\u663E\u793A"}},engines:{title:"\u5F15\u64CE",hint:"Rove \u80FD\u542F\u52A8\u7684\u6240\u6709\u5F15\u64CE\uFF0C\u6BCF\u4E2A\u4E0B\u9762\u8DDF\u7740\u672C\u5730\u63A2\u6D4B\u5230\u7684\u60C5\u51B5\uFF1A\u4E8C\u8FDB\u5236\u5728\u54EA\uFF0C\u4EE5\u53CA\u5BF9\u6709\u8D26\u6237\u63A2\u6D4B\u5668\u7684\u5F15\u64CE\u662F\u5426\u5DF2\u767B\u5F55\u3002[x] = \u4E3A\u4EFB\u52A1\u9009\u5F15\u64CE\u65F6\u4F1A\u5217\u51FA\u5B83\uFF1B(\u25CF) = \u5168\u5C40\u9ED8\u8BA4\u5F15\u64CE\uFF08\u5404\u9879\u76EE\u81EA\u5DF1\u7684\u9009\u62E9\u4F1A\u8986\u76D6\u5B83\uFF0C\u5982 Ctrl+Shift+T\uFF09\u2014\u2014\u4E24\u8005\u90FD\u53EF\u76F4\u63A5\u70B9\uFF0C\u4E5F\u53EF\u7528\u4E0B\u9762\u7684\u6309\u952E\u3002\u4E8C\u8FDB\u5236\u4E0D\u5728 PATH \u4E0A\u3001\u6216\u8981\u4F20\u9ED8\u8BA4\u53C2\u6570\u65F6\uFF0C\u8986\u76D6\u5B83\u7684\u542F\u52A8\u547D\u4EE4\u3002space \u5F00/\u5173 \xB7 enter \u7F16\u8F91\u547D\u4EE4 \xB7 r \u91CD\u547D\u540D \xB7 x \u91CD\u7F6E/\u79FB\u9664 \xB7 d \u8BBE\u4E3A\u9ED8\u8BA4\u3002",customTag:" (\u81EA\u5B9A\u4E49)",addEngine:"+ \u6DFB\u52A0\u5F15\u64CE"},accounts:{checking:"\u68C0\u67E5\u4E2D\u2026",notLoggedIn:"\u25CB \u672A\u767B\u5F55",loggedIn:"\u25CF \u5DF2\u767B\u5F55: {email}",apiKeyConfigured:"\u25CF \u5DF2\u914D\u7F6E API key",chatgptLogin:"\u25CF ChatGPT \u767B\u5F55: {email}",tokenConfigured:"\u25CF \u5DF2\u914D\u7F6E Token ({source})",detected:"\u25CF \u68C0\u6D4B\u5230\u767B\u5F55"},plugins:{title:"\u63D2\u4EF6",hint:"\u5728 ~/.kobe/plugins.json \u91CC\u6CE8\u518C\u7684\u63D2\u4EF6\u3002enter\uFF08\u6216\u70B9\u51FB\uFF09\u5207\u6362\u542F\u7528/\u7981\u7528\u2014\u2014daemon \u76D1\u542C\u8BE5\u6587\u4EF6\uFF0C\u6539\u52A8\u5B9E\u65F6\u751F\u6548\u3002\u63D2\u4EF6\u4E0B\u65B9\u7F29\u8FDB\u7684\u884C\u662F\u5B83\u58F0\u660E\u7684\u8BBE\u7F6E\u9879\uFF0Center \u7F16\u8F91\uFF0C\u65B0\u503C\u5728\u63D2\u4EF6\u4E0B\u6B21\u8FD0\u884C\u65F6\u751F\u6548\u3002\u5B89\u88C5\u4E0E\u79FB\u9664\u5728 shell \u91CC\u505A\uFF1A`rove plugin install <owner/repo>`\u3001`rove plugin link <dir>`\u3002",empty:"\u5C1A\u672A\u6CE8\u518C\u4EFB\u4F55\u63D2\u4EF6\u3002\u7528 `rove plugin install <owner/repo>` \u5B89\u88C5\u4E00\u4E2A\u2014\u2014\u53EF\u5728 GitHub \u7684 `rove-plugin` \u8BDD\u9898\u4E0B\u6D4F\u89C8\u3002",sourceLink:"\u672C\u5730\u94FE\u63A5 {path}",sourceGithub:"{spec}",updateAvailable:"\u6709\u65B0\u7248\u672C \u2014 rove plugin update",declares:"{actions} \u4E2A\u52A8\u4F5C \xB7 {events} \u4E2A\u4E8B\u4EF6 \xB7 {panes} \u4E2A\u9762\u677F",declaresWithEngines:"{actions} \u4E2A\u52A8\u4F5C \xB7 {events} \u4E2A\u4E8B\u4EF6 \xB7 {panes} \u4E2A\u9762\u677F \xB7 {engines} \u4E2A\u5F15\u64CE",manifestUnreadable:"manifest \u65E0\u6CD5\u89E3\u6790",unsupportedPlatform:"\xB7 \u4E0D\u652F\u6301\u5F53\u524D\u5E73\u53F0",noHooks:"\xB7 \u672A\u58F0\u660E\u94A9\u5B50",lastRun:"\xB7 \u4E0A\u6B21\u8FD0\u884C {label} {status} {ago}\u524D",neverRun:"\xB7 \u5C1A\u672A\u8FD0\u884C\u8FC7",runOk:"\u6210\u529F",runFailed:"\u542F\u52A8\u5931\u8D25",runExit:"\u9000\u51FA\u7801 {code}",settingUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",settingInvalidTitle:"\u4E0D\u662F\u6570\u5B57",settingInvalidBody:"{label} \u53EA\u63A5\u53D7\u6570\u5B57\uFF0C\u4FDD\u7559\u539F\u503C\u3002"},keybindings:{title:"\u5FEB\u6377\u952E",hint:"\u5728\u4F60\u81EA\u5DF1\u7684 YAML \u6587\u4EF6\u91CC\u91CD\u7ED1\u5B9A\u76F4\u63A5\u6309\u952E\u548C prefix \u7EC4\u5408\uFF1B\u4FEE\u6539\u4F1A\u5B9E\u65F6\u52A0\u8F7D\u3002\u4EFB\u610F\u4F4D\u7F6E\u6309 F1 \u67E5\u770B\u5E26\u6BCF\u4E2A\u7ED1\u5B9A id \u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",configFile:"\u914D\u7F6E\u6587\u4EF6",notCreated:" (\u5C1A\u672A\u521B\u5EFA)",prefixTitle:"\u547D\u4EE4\u5C42\uFF08{prefix}\uFF09",prefixHint:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F\uFF1B\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u8986\u76D6\u9AD8\u9891 Rove \u64CD\u4F5C\uFF1B{prefix} \u6253\u5F00\u547D\u4EE4\u5C42\uFF08\u7B2C\u4E8C\u51FB\u7A97\u53E3 {timeout}ms\uFF09\u3002Prefix \u7ED1\u5B9A\u4FDD\u6301\u539F\u6709\u7684\u9762\u677F\u4F5C\u7528\u57DF\u548C modal \u89C4\u5219\u3002",tapPresentation:"\u70B9\u6309 Prefix",tapPresentationHint:"\u9009\u62E9\u5B8C\u6574\u6307\u5357\u662F\u5426\u540C\u65F6\u6807\u8BB0\u5F53\u524D\u5C4F\u5E55\u4E0A\u7684\u5165\u53E3\u3002",tapPresentationLocal:"\u5C4F\u5E55\u5165\u53E3 + \u5B8C\u6574\u6307\u5357\uFF08\u9ED8\u8BA4\uFF09",tapPresentationGuide:"\u4EC5\u5B8C\u6574\u6307\u5357",prefixDisabled:"\u5DF2\u7981\u7528",fixed:"\u56FA\u5B9A\uFF08\u4E0D\u53EF\u91CD\u7ED1\u5B9A\uFF09\uFF1A{ids}\u3002",createHint:"\u8FD8\u6CA1\u6709\u8986\u76D6\u6587\u4EF6\u3002Rove \u53EF\u4EE5\u5E2E\u4F60\u5199\u4E00\u4EFD\u5E26\u5B8C\u6574\u6CE8\u91CA\u7684\u2014\u2014\u5728\u4F60\u53D6\u6D88\u6CE8\u91CA\u4E4B\u524D\u4E0D\u4F1A\u6539\u52A8\u4EFB\u4F55\u6309\u952E\u3002",createFile:"[enter] \u521B\u5EFA keybindings.yaml",overridesApplied:"\u5DF2\u5E94\u7528\u7684\u8986\u76D6",none:"\u65E0",unbound:"(\u5DF2\u89E3\u7ED1)",defaultKeys:"\u9ED8\u8BA4: {keys}",warnings:"\u8B66\u544A"},feedback:{title:"\u53CD\u9988",hint:"\u901A\u8FC7 `gh` \u5411 Rove \u4ED3\u5E93\u53D1\u4E00\u6761 GitHub Discussion\u3002\u9700\u8981 `gh auth login`\uFF1B\u5206\u7C7B\u9ED8\u8BA4\u4E3A Feedback\u3002",titleLabel:"\u6807\u9898",titlePlaceholder:"\u7B80\u77ED\u6982\u62EC",descriptionLabel:"\u63CF\u8FF0",descriptionPlaceholder:"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF1F(enter \u6362\u884C \xB7 tab \u8DF3\u5230\u53D1\u9001)",send:"[enter] \u53D1\u9001\u5230 GitHub Discussions"},dev:{reset:"\u91CD\u7F6E UI \u72B6\u6001",resetHint:"\u6E05\u7A7A ~/.config/rove/state.json \u548C ~/.rove/tasks.json\uFF0C\u7136\u540E\u9000\u51FA Rove\u2014\u2014\u91CD\u65B0\u542F\u52A8\u5373\u53EF\u4ECE\u5934\u5F00\u59CB\u3002\u5DE5\u4F5C\u4F1A\u8BDD\u5217\u8868\u3001\u9762\u677F\u5C3A\u5BF8\u3001\u4E3B\u9898\u3001\u6A21\u578B\u9009\u62E9\u90FD\u4F1A\u91CD\u7F6E\u3002\u78C1\u76D8\u4E0A\u7684 worktree \u548C\u5F15\u64CE\u4F1A\u8BDD\u5386\u53F2\u4E0D\u53D7\u5F71\u54CD\u3002",resetButton:"[enter] \u91CD\u7F6E",restart:"\u91CD\u542F\u540E\u7AEF",restartHint:"\u505C\u6B62 Rove daemon \u5E76\u9000\u51FA\u5F53\u524D Rove \u7A97\u53E3\uFF0C\u4E0B\u6B21\u542F\u52A8\u4F1A\u62C9\u8D77\u4E00\u4E2A\u5168\u65B0\u7684 daemon\u2014\u2014\u65E0\u9700\u6740\u8FDB\u7A0B\u5373\u53EF\u5E94\u7528 daemon / orchestrator / engine \u7684\u6539\u52A8\u3002\u5176\u4ED6\u5DF2\u8FDE\u63A5\u7684 Rove \u7A97\u53E3\u4E5F\u4F1A\u65AD\u5F00\u8FDE\u63A5\u3002",restartButton:"[enter] \u91CD\u542F",doctorHint:"daemon \u5361\u4F4F\u6216\u65E0\u54CD\u5E94\uFF1F\u5728 shell \u91CC\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove\u3002Hosted PTY \u5F15\u64CE\u4F1A\u8BDD\u4E0D\u4F1A\u56E0 daemon \u91CD\u542F\u800C\u9000\u51FA\u3002",experimental:"\u5B9E\u9A8C\u6027",remoteHint:"\u8FDC\u7A0B\u9879\u76EE\uFF08SSH\uFF09\uFF1A\u6CE8\u518C\u4E00\u4E2A git worktree + \u5F15\u64CE\u90FD\u901A\u8FC7 SSH \u8DD1\u5728\u53E6\u4E00\u53F0\u4E3B\u673A\u4E0A\u3001\u7531\u672C\u5730 Rove \u9A71\u52A8\u7684\u9879\u76EE\u3002\u5C1A\u672A\u5B8C\u6210\u2014\u2014\u6587\u4EF6/diff \u9762\u677F\u5BF9\u8FDC\u7A0B\u4ECD\u4F1A\u964D\u7EA7\u3002\u542F\u7528 `rove add --remote`\u3002",remote:"\u8FDC\u7A0B\u9879\u76EE",autoStatusHint:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C\uFF1Abacklog \u4EFB\u52A1\u5728\u5176\u5F15\u64CE\u5F00\u59CB\u4E00\u8F6E\u65F6\u79FB\u5230 in_progress\uFF0C\u65B0\u4F1A\u8BDD\u4F1A\u62FF\u5230\u4E00\u6761\u7CFB\u7EDF\u63D0\u793A\uFF0C\u544A\u8BC9 agent \u5B8C\u6210\u540E\u81EA\u884C\u8BBE\u4E3A in_review\u3002\u7EDD\u4E0D\u89E6\u78B0 done/canceled\u3002",autoStatus:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C",dispatcherHint:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668\uFF1A\u4EFB\u52A1\u4F1A\u8BDD\u63D0\u4EA4\u4E00\u884C\u7ECF\u9A8C\uFF08`rove api note`\uFF09\uFF0Cdaemon \u5C06\u6BCF\u6761\u8F6C\u53D1\u7ED9\u4ED3\u5E93\u7684\u4E3B\u4F1A\u8BDD\uFF0C\u4E3B\u4F1A\u8BDD\u518D\u628A\u5B83\u4EEC\u8F6C\u8FBE\u7ED9\u80FD\u53D7\u76CA\u7684\u8FDB\u884C\u4E2D\u4EFB\u52A1\uFF08`rove api dispatch`\uFF09\u3002\u76EE\u524D\u7531 Web \u6258\u7BA1\u7684\u4F1A\u8BDD\u4F1A\u6536\u5230\u8F6C\u8FBE\u3002",dispatcher:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668",composerGateHint:"\u628A peer/API \u7684\u6D88\u606F\u7C98\u8FDB\u8FD0\u884C\u4E2D\u7684\u5F15\u64CE\u4E4B\u524D,Rove \u4F1A\u8BFB\u4E00\u904D\u90A3\u4E2A\u4F1A\u8BDD\u7684\u5C4F\u5E55,\u53D1\u73B0\u8F93\u5165\u6846\u91CC\u5DF2\u7ECF\u6709\u5B57\u5C31\u5148\u6263\u4F4F\u4E0D\u53D1\u3002\u8FD9\u4E2A\u5224\u65AD\u4F9D\u8D56\u5F15\u64CE\u5F53\u524D\u7684\u754C\u9762\u5E03\u5C40,\u6240\u4EE5\u5382\u5546\u6539\u7248\u53EF\u80FD\u8BA9\u5B83\u5931\u51C6\u2014\u2014\u5982\u679C\u4F60\u770B\u7740\u8F93\u5165\u6846\u660E\u660E\u662F\u7A7A\u7684\u3001\u6D88\u606F\u5374\u4E00\u76F4\u88AB\u6263\u4F4F,\u5C31\u5173\u6389\u5B83\u3002\u53E6\u4E00\u9053\u300C\u521A\u521A\u6709\u4EBA\u5728\u6253\u5B57\u300D\u7684\u4FDD\u62A4\u59CB\u7EC8\u751F\u6548,\u6B63\u5728\u8F93\u5165\u7684\u8F93\u5165\u6846\u4ECD\u7136\u53D7\u4FDD\u62A4\u3002",composerGate:"\u6295\u9012\u524D\u68C0\u67E5\u8F93\u5165\u6846"}}});var Rc,Tc;var Sc=m(()=>{Rc={nav:{workspace:"Workspace",kanban:"Kanban",automations:"Routines",issues:"Issues"},header:{projects:"PROJECTS",tasks:"TASKS",scratch:"SCRATCH"},search:{placeholder:"fuzzy filter"},menu:{open:"Open",openTab:"Open tab",closeTab:"Close tab",newChat:"New conversation",newShell:"New shell",newTask:"New task",forgetProject:"Remove project",rename:"Rename",pin:"Pin",unpin:"Unpin",reorder:"Reorder row",delete:"Delete"},moveChip:" move",recentJump:"Recent: {title}",routinesRow:"{count} routine sessions",empty:{noMatchSearch:"No matching tasks \u2014 esc to clear.",noActiveProject:"No active tasks for this project.",noActive:"No active tasks \u2014 create one above."},activity:{rateLimited:"rate limited",permissionNeeded:"needs permission",error:"error",dead:"engine exited"},subtitle:{noTracking:"no activity tracking",materializing:"materializing",deleting:"deleting",deleteFailed:"delete failed"},hints:{headerFolded:"\u2500\u2500 keys ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 keys ?\u25BE \u2500\u2500",fullHelp:"full help",newTask:"new task",settings:"settings",open:"open",focusEngine:"focus engine",openWorktree:"open wt",delete:"delete",views:"views",project:"project",reorder:"reorder",done:"done"},reBranch:{title:"Set branch",fieldLabel:"branch",hintNoBranches:"(no local branches \u2014 type a new name)",hintNoMatch:"(no match \u2014 enter renames to this branch)",footer:"\u2191\u2193 pick \xB7 enter set \xB7 esc cancel"},toast:{noDaemonWorktree:"No daemon running \u2014 can't create the worktree",noEditor:"No editor found \u2014 set ROVE_OPEN_EDITOR (e.g. 'code', 'cursor', 'nvim')",openWorktreeFailed:"Couldn't open worktree with {label}",worktreeErrorDeleting:"This task is being deleted \u2014 it can't be opened",worktreeErrorNotGit:"This project isn't a git repo yet \u2014 a task needs a git branch. Run `git init` (+ a first commit) in the project, then open the task. Non-git support is coming.",worktreeErrorGeneric:"Couldn't create the worktree: {message}",scratchAdopted:"Adopted into {repo} \u2014 save it as a project from New Task if you want it in the picker",scratchOpenFailed:"Couldn't open a scratch shell: {message}",scratchCloseFailed:"Couldn't close the scratch task: {message}",worktreeGoneTitle:'Worktree for "{title}" is gone',worktreeGoneBody:"Closed {count} tab(s). The branch {branch} is still there \u2014 reopen the task to re-create its worktree."}},Tc={nav:{workspace:"\u5DE5\u4F5C\u533A",kanban:"\u770B\u677F",automations:"\u4F8B\u884C\u4EFB\u52A1",issues:"\u8BAE\u9898"},header:{projects:"\u9879\u76EE",tasks:"\u4EFB\u52A1",scratch:"\u4E34\u65F6"},search:{placeholder:"\u6A21\u7CCA\u641C\u7D22"},menu:{open:"\u6253\u5F00",openTab:"\u6253\u5F00\u8BE5\u6807\u7B7E\u9875",closeTab:"\u5173\u95ED\u8BE5\u6807\u7B7E\u9875",newChat:"\u65B0\u5EFA\u4F1A\u8BDD",newShell:"\u65B0\u5EFA\u7EC8\u7AEF",newTask:"\u65B0\u5EFA\u4EFB\u52A1",forgetProject:"\u79FB\u9664\u9879\u76EE",rename:"\u91CD\u547D\u540D",pin:"\u7F6E\u9876",unpin:"\u53D6\u6D88\u7F6E\u9876",reorder:"\u91CD\u65B0\u6392\u5E8F",delete:"\u5220\u9664"},moveChip:" \u79FB\u52A8",recentJump:"\u6700\u8FD1:{title}",routinesRow:"{count} \u4E2A routine \u4F1A\u8BDD",empty:{noMatchSearch:"\u65E0\u5339\u914D\u4EFB\u52A1\u2014\u2014\u6309 esc \u6E05\u9664\u3002",noActiveProject:"\u8BE5\u9879\u76EE\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u3002",noActive:"\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u2014\u2014\u5728\u4E0A\u65B9\u65B0\u5EFA\u3002"},activity:{rateLimited:"\u8BF7\u6C42\u53D7\u9650",permissionNeeded:"\u7B49\u5F85\u6388\u6743",error:"\u9519\u8BEF",dead:"\u5F15\u64CE\u5DF2\u9000\u51FA"},subtitle:{noTracking:"\u4E0D\u8DDF\u8E2A\u6D3B\u52A8",materializing:"\u6B63\u5728\u521B\u5EFA worktree",deleting:"\u6B63\u5728\u5220\u9664",deleteFailed:"\u5220\u9664\u5931\u8D25"},hints:{headerFolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25BE \u2500\u2500",fullHelp:"\u5B8C\u6574\u5E2E\u52A9",newTask:"\u65B0\u5EFA\u4EFB\u52A1",settings:"\u8BBE\u7F6E",open:"\u6253\u5F00",focusEngine:"\u805A\u7126\u5F15\u64CE",openWorktree:"\u6253\u5F00 worktree",delete:"\u5220\u9664",views:"\u89C6\u56FE",project:"\u9879\u76EE",reorder:"\u91CD\u65B0\u6392\u5E8F",done:"\u5B8C\u6210"},reBranch:{title:"\u8BBE\u7F6E\u5206\u652F",fieldLabel:"\u5206\u652F",hintNoBranches:"\uFF08\u6CA1\u6709\u672C\u5730\u5206\u652F\u2014\u2014\u8F93\u5165\u65B0\u540D\u79F0\uFF09",hintNoMatch:"\uFF08\u65E0\u5339\u914D\u2014\u2014\u56DE\u8F66\u5C06\u5206\u652F\u91CD\u547D\u540D\u4E3A\u6B64\u540D\uFF09",footer:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u8BBE\u7F6E \xB7 esc \u53D6\u6D88"},toast:{noDaemonWorktree:"\u5B88\u62A4\u8FDB\u7A0B\u672A\u8FD0\u884C\u2014\u2014\u65E0\u6CD5\u521B\u5EFA worktree",noEditor:"\u672A\u627E\u5230\u7F16\u8F91\u5668\u2014\u2014\u8BF7\u8BBE\u7F6E ROVE_OPEN_EDITOR\uFF08\u5982 'code'\u3001'cursor'\u3001'nvim'\uFF09",openWorktreeFailed:"\u65E0\u6CD5\u7528 {label} \u6253\u5F00 worktree",worktreeErrorDeleting:"\u8BE5\u4EFB\u52A1\u6B63\u5728\u5220\u9664\u4E2D\u2014\u2014\u65E0\u6CD5\u6253\u5F00",worktreeErrorNotGit:"\u8BE5\u9879\u76EE\u5C1A\u975E git \u4ED3\u5E93\u2014\u2014\u4EFB\u52A1\u9700\u8981 git \u5206\u652F\u3002\u8BF7\u5728\u9879\u76EE\u4E2D\u6267\u884C `git init`\uFF08+ \u9996\u6B21\u63D0\u4EA4\uFF09\u540E\u518D\u6253\u5F00\u4EFB\u52A1\u3002\u975E git \u9879\u76EE\u7684\u652F\u6301\u5373\u5C06\u63A8\u51FA\u3002",worktreeErrorGeneric:"\u65E0\u6CD5\u521B\u5EFA worktree\uFF1A{message}",scratchAdopted:"\u5DF2\u5F52\u5165 {repo}\u2014\u2014\u82E5\u8981\u51FA\u73B0\u5728\u9879\u76EE\u9009\u62E9\u5668\u91CC,\u53EF\u5728\u65B0\u5EFA\u4EFB\u52A1\u4E2D\u4FDD\u5B58\u4E3A\u9879\u76EE",scratchOpenFailed:"\u65E0\u6CD5\u6253\u5F00\u4E34\u65F6 Shell:{message}",scratchCloseFailed:"\u65E0\u6CD5\u5173\u95ED\u4E34\u65F6\u4EFB\u52A1:{message}",worktreeGoneTitle:'"{title}" \u7684 worktree \u5DF2\u6D88\u5931',worktreeGoneBody:"\u5DF2\u5173\u95ED {count} \u4E2A\u6807\u7B7E\u9875\u3002\u5206\u652F {branch} \u4ECD\u5728\u2014\u2014\u91CD\u65B0\u6253\u5F00\u8BE5\u4EFB\u52A1\u4F1A\u91CD\u5EFA worktree\u3002"}}});var Pc,Ic;var xc=m(()=>{Pc={noTask:"(no task \u2014 press n to create)",exited:"process exited \u2014 F5 restarts it",restoring:"restoring session\u2026",tab:{groupTitle:"group {n}",renameTitle:"Rename tab",renameField:"tab title",renameSubmit:"rename",chooseEngineHint:"\u2190/\u2192 or h/l choose, enter confirm, esc cancel",newChat:{title:"New conversation",destLabel:"tab \u2014 destination: ",destTab:"new tab in this worktree",destFork:"fork a child task (new worktree)",ctxLabel:"ctrl+f \u2014 context: ",ctxFresh:"fresh conversation",ctxContinue:"continue this conversation",scratchChoice:"scratch shell"},cannotCloseLast:"Cannot close the only tab",tabGone:"That tab is no longer there",nothingToFork:"No conversation in this tab to fork yet",noTranscriptToHandOff:"{engine} keeps no readable transcript to hand over"},split:{renameTitle:"Rename split",renameField:"split name"},scrolledBack:"\u2191 scrolled {lines}L (ctrl+pgdn to follow)",unavailable:{shellMissing:"terminal unavailable \u2014 configured shell is not available",spawnFailed:"terminal unavailable \u2014 shell could not start",retry:"F5 tries again"},reset:{title:"Reset terminal?",body:"The running shell will be killed and a fresh one will spawn at the worktree. Any in-flight processes (vim, htop, paused jobs) end immediately."}},Ic={noTask:"\uFF08\u65E0\u4EFB\u52A1 \u2014\u2014 \u6309 n \u521B\u5EFA\uFF09",exited:"\u8FDB\u7A0B\u5DF2\u9000\u51FA \u2014\u2014 \u6309 F5 \u91CD\u542F",restoring:"\u6B63\u5728\u6062\u590D\u4F1A\u8BDD\u2026",tab:{groupTitle:"group {n}",renameTitle:"\u91CD\u547D\u540D\u6807\u7B7E\u9875",renameField:"\u6807\u7B7E\u9875\u540D\u79F0",renameSubmit:"\u91CD\u547D\u540D",chooseEngineHint:"\u2190/\u2192 \u6216 h/l \u9009\u62E9\uFF0Center \u786E\u8BA4\uFF0Cesc \u53D6\u6D88",newChat:{title:"\u65B0\u5EFA\u5BF9\u8BDD",destLabel:"tab \u2014\u2014 \u843D\u70B9\uFF1A",destTab:"\u672C worktree \u65B0\u6807\u7B7E\u9875",destFork:"fork \u5B50\u4EFB\u52A1\uFF08\u65B0 worktree\uFF09",ctxLabel:"ctrl+f \u2014\u2014 \u4E0A\u4E0B\u6587\uFF1A",ctxFresh:"\u5168\u65B0\u5BF9\u8BDD",ctxContinue:"\u63A5\u7740\u5F53\u524D\u5BF9\u8BDD",scratchChoice:"\u4E34\u65F6 shell"},cannotCloseLast:"\u65E0\u6CD5\u5173\u95ED\u552F\u4E00\u7684\u6807\u7B7E\u9875",tabGone:"\u8FD9\u4E2A\u6807\u7B7E\u9875\u5DF2\u7ECF\u4E0D\u5728\u4E86",nothingToFork:"\u8FD9\u4E2A\u6807\u7B7E\u9875\u8FD8\u6CA1\u6709\u53EF\u6D3E\u751F\u7684\u5BF9\u8BDD",noTranscriptToHandOff:"{engine} \u6CA1\u6709\u53EF\u8BFB\u7684\u5BF9\u8BDD\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u4EA4\u63A5"},split:{renameTitle:"\u91CD\u547D\u540D\u5206\u5C4F",renameField:"\u5206\u5C4F\u540D\u79F0"},scrolledBack:"\u2191 \u5DF2\u56DE\u6EDA {lines} \u884C\uFF08ctrl+pgdn \u56DE\u5230\u5E95\u90E8\uFF09",unavailable:{shellMissing:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 \u914D\u7F6E\u7684 shell \u4E0D\u5B58\u5728",spawnFailed:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 shell \u542F\u52A8\u5931\u8D25",retry:"\u6309 F5 \u91CD\u8BD5"},reset:{title:"\u91CD\u7F6E\u7EC8\u7AEF\uFF1F",body:"\u6B63\u5728\u8FD0\u884C\u7684 shell \u4F1A\u88AB\u6740\u6389\u5E76\u5728 worktree \u91CD\u65B0\u542F\u52A8\uFF0C\u8FDB\u884C\u4E2D\u7684\u8FDB\u7A0B\uFF08vim\u3001htop\u3001\u6682\u505C\u7684\u4EFB\u52A1\uFF09\u4F1A\u7ACB\u5373\u7ED3\u675F\u3002"}}});var yc,wc;var vc=m(()=>{yc={pageTitle:"ROVE UPDATE",chip:"\u2191 {version}",current:"current",latest:"latest",latestUnknown:"unknown \u2014 could not reach the registry",releaseUrlUnavailable:"release URL unavailable",statusReleaseOpened:"Opened release page in your browser.",statusReleaseError:"Could not open release URL.",statusRunningUpdater:"Closing the TUI and running the updater in this terminal...",loadingNotes:"Loading release notes...",notesUnavailable:"Release notes are unavailable. Use Open release to view the GitHub release page.",changesSectionHeader:"\u2500\u2500 changes from v{from} to v{to} \u2500\u2500",updateComplete:"Rove update complete. Relaunch Rove to use the new version.",updateFailed:"Rove update failed with exit code {code}.",pressAnyKey:"Press any key to close this update window.",actions:{updateNow:"Update now",openRelease:"Open release",close:"Close",closeDetail:"return to the workspace"},skew:{title:"\u26A0 DAEMON OUT OF DATE",olderBuild:"an older build",hint:"daemon is {daemon} \u2014 you launched v{clientVersion}. Run `rove daemon restart`, then relaunch Rove"},versions:{pageTitle:"ROVE VERSIONS",loading:"Loading releases...",unavailable:"Could not fetch releases (offline or rate-limited).",tagCurrent:"current",tagLatest:"latest",tagBreaking:"breaking",breakingWarning:"\u26A0 installing this crosses breaking version(s) {versions} \u2014 run `rove reset` after the update.",footerHint:"j/k select \xB7 enter install \xB7 q close"}},wc={pageTitle:"ROVE \u66F4\u65B0",chip:"\u2191 {version}",current:"\u5F53\u524D",latest:"\u6700\u65B0",latestUnknown:"\u672A\u77E5 \u2014\u2014 \u65E0\u6CD5\u8FDE\u63A5\u5230 registry",releaseUrlUnavailable:"\u53D1\u5E03\u94FE\u63A5\u4E0D\u53EF\u7528",statusReleaseOpened:"\u5DF2\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u53D1\u5E03\u8BF4\u660E\u9875\u9762\u3002",statusReleaseError:"\u65E0\u6CD5\u6253\u5F00\u53D1\u5E03\u94FE\u63A5\u3002",statusRunningUpdater:"\u6B63\u5728\u5173\u95ED TUI\uFF0C\u5E76\u5728\u5F53\u524D\u7EC8\u7AEF\u4E2D\u8FD0\u884C\u66F4\u65B0\u7A0B\u5E8F\u2026\u2026",loadingNotes:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u8BF4\u660E\u2026\u2026",notesUnavailable:"\u53D1\u5E03\u8BF4\u660E\u4E0D\u53EF\u7528\u3002\u8BF7\u4F7F\u7528\u300C\u6253\u5F00\u53D1\u5E03\u9875\u300D\u67E5\u770B GitHub \u53D1\u5E03\u9875\u9762\u3002",changesSectionHeader:"\u2500\u2500 v{from} \u81F3 v{to} \u7684\u53D8\u66F4 \u2500\u2500",updateComplete:"Rove \u66F4\u65B0\u5B8C\u6210\u3002\u8BF7\u91CD\u65B0\u542F\u52A8 Rove \u4EE5\u4F7F\u7528\u65B0\u7248\u672C\u3002",updateFailed:"Rove \u66F4\u65B0\u5931\u8D25\uFF0C\u9000\u51FA\u7801\u4E3A {code}\u3002",pressAnyKey:"\u6309\u4EFB\u610F\u952E\u5173\u95ED\u6B64\u66F4\u65B0\u7A97\u53E3\u3002",actions:{updateNow:"\u7ACB\u5373\u66F4\u65B0",openRelease:"\u6253\u5F00\u53D1\u5E03\u9875",close:"\u5173\u95ED",closeDetail:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"},skew:{title:"\u26A0 DAEMON \u7248\u672C\u4E0D\u4E00\u81F4",olderBuild:"\u65E7\u7248\u672C\u6784\u5EFA",hint:"daemon \u8FD0\u884C\u7684\u662F {daemon}\uFF0C\u800C\u4F60\u542F\u52A8\u7684\u662F v{clientVersion}\u3002\u8BF7\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove"},versions:{pageTitle:"ROVE \u7248\u672C\u5217\u8868",loading:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u5217\u8868\u2026\u2026",unavailable:"\u65E0\u6CD5\u83B7\u53D6\u53D1\u5E03\u5217\u8868\uFF08\u79BB\u7EBF\u6216\u89E6\u53D1\u9650\u6D41\uFF09\u3002",tagCurrent:"\u5F53\u524D",tagLatest:"\u6700\u65B0",tagBreaking:"breaking",breakingWarning:"\u26A0 \u5B89\u88C5\u8BE5\u7248\u672C\u4F1A\u8DE8\u8FC7 breaking \u7248\u672C {versions}\u2014\u2014\u66F4\u65B0\u540E\u9700\u8FD0\u884C `rove reset`\u3002",footerHint:"j/k \u9009\u62E9 \xB7 enter \u5B89\u88C5 \xB7 q \u5173\u95ED"}}});var fc,bc;var gc=m(()=>{fc={title:"ISSUES",noRepo:"no project",empty:"No open issues.",assignedFilter:"assigned to me",starting:"Starting work on #{number}\u2026",startedNoEngine:"Created {title}, but its engine did not start.",startFailed:"Couldn't start work on #{number}: {error}",errorHint:{noRemote:"Add a GitHub remote (`git remote add origin <url>`) and try again, or press q / esc to close.",ghMissing:"Install the `gh` CLI and authenticate, or press q / esc to close.",auth:"Run `gh auth login`, or press q / esc to close.",fallback:"{message} \xB7 press q / esc to close"}},bc={title:"\u8BAE\u9898",noRepo:"\u65E0\u9879\u76EE",empty:"\u6CA1\u6709\u5F00\u653E\u7684\u8BAE\u9898\u3002",assignedFilter:"\u5206\u914D\u7ED9\u6211\u7684",starting:"\u6B63\u5728\u5F00\u59CB\u5904\u7406 #{number}\u2026",startedNoEngine:"\u5DF2\u521B\u5EFA {title}\uFF0C\u4F46\u5F15\u64CE\u6CA1\u6709\u542F\u52A8\u3002",startFailed:"\u5F00\u59CB\u5904\u7406 #{number} \u5931\u8D25\uFF1A{error}",errorHint:{noRemote:"\u6DFB\u52A0 GitHub remote\uFF08`git remote add origin <url>`\uFF09\u540E\u91CD\u8BD5\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",ghMissing:"\u5B89\u88C5 `gh` CLI \u5E76\u767B\u5F55\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",auth:"\u6267\u884C `gh auth login`\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",fallback:"{message} \xB7 \u6309 q / esc \u5173\u95ED"}}});var kc,mc;var hc=m(()=>{kc={quit:{confirmTitle:"Quit Rove?",confirmBody:"The daemon and task sessions keep running. This closes only the native workspace.",confirmLabel:"Quit"},empty:{selectTask:"Select a task with a worktree",noSessions:"No sessions here \u2014 press \u23CE or ctrl+e to start one"},welcome:{title:"Welcome to Rove",tagline:"Run several AI coding sessions side by side \u2014 each task gets its own git worktree and branch.",worktreeExplain:"Each task creates its own git worktree directory and branch, so multiple AI sessions can edit the same codebase in parallel without colliding.",stepNew:"creates your first task \u2014 pick a repo, a base branch, an engine",stepHelp:"shows every shortcut reachable from the current focus",stepPrefix:"opens the command menu",enginesFound:"\u2713 engines: {list}",enginesMissing:"\u2717 no engine CLI found \u2014 install claude, codex, copilot, or kimi, then restart Rove",gitMissing:"\u2717 git not found on PATH \u2014 Rove needs git to create worktrees",doctorHint:"run `rove doctor` in a shell for the full diagnosis",docsHint:"docs: https://docs.rove.run"},attention:{none:"No available Inbox items"},inbox:{title:"INBOX",empty:"No pending attention",openHint:"enter open",clearHint:"d clear",more:"+{count} more",section:{attention:"ATTENTION",recent:"RECENT"},state:{done:"done",needsInput:"needs input",error:"error",rateLimited:"rate limited",running:"running",dead:"engine exited",promptDeferred:"message queued"},resumesAt:"resumes {time}",deferredToast:"Message queued \u2014 composer busy",deferredStillQueued:"Still typing? The queued message stays in the Inbox \u2014 open it again to send.",deferredUnavailable:"That tab isn't running \u2014 the queued message stays in the Inbox.",deferredInsertFailed:"Couldn't insert the queued message \u2014 it's still in the Inbox."},daemonDown:{title:"DAEMON DISCONNECTED",hint:"Everything on screen is the last state the daemon reported. Reconnecting\u2026"},terminalComing:"Embedded terminal is starting..."},mc={quit:{confirmTitle:"\u9000\u51FA Rove\uFF1F",confirmBody:"\u5B88\u62A4\u8FDB\u7A0B\u548C\u4EFB\u52A1\u4F1A\u8BDD\u4F1A\u7EE7\u7EED\u8FD0\u884C\uFF0C\u8FD9\u91CC\u53EA\u5173\u95ED\u539F\u751F\u5DE5\u4F5C\u533A\u3002",confirmLabel:"\u9000\u51FA"},empty:{selectTask:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u5E26 worktree \u7684\u4EFB\u52A1",noSessions:"\u8FD9\u91CC\u6CA1\u6709\u4F1A\u8BDD\u2014\u2014\u6309 \u23CE \u6216 ctrl+e \u5F00\u4E00\u4E2A"},welcome:{title:"\u6B22\u8FCE\u4F7F\u7528 Rove",tagline:"\u5E76\u884C\u8FD0\u884C\u591A\u4E2A AI \u7F16\u7801\u4F1A\u8BDD\u2014\u2014\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6709\u81EA\u5DF1\u7684 git worktree \u548C\u5206\u652F\u3002",worktreeExplain:"\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u4F1A\u521B\u5EFA\u72EC\u7ACB\u7684 git worktree \u76EE\u5F55\u548C\u5206\u652F\uFF0C\u591A\u4E2A AI \u4F1A\u8BDD\u53EF\u4EE5\u5E76\u884C\u4FEE\u6539\u540C\u4E00\u4EFD\u4EE3\u7801\u5E93\uFF0C\u4E92\u4E0D\u5E72\u6270\u3002",stepNew:"\u521B\u5EFA\u4F60\u7684\u7B2C\u4E00\u4E2A\u4EFB\u52A1\u2014\u2014\u9009\u4ED3\u5E93\u3001\u57FA\u7840\u5206\u652F\u548C\u5F15\u64CE",stepHelp:"\u67E5\u770B\u5F53\u524D\u7126\u70B9\u4E0B\u7684\u5168\u90E8\u5FEB\u6377\u952E",stepPrefix:"\u6253\u5F00\u547D\u4EE4\u83DC\u5355",enginesFound:"\u2713 \u5DF2\u68C0\u6D4B\u5230\u5F15\u64CE:{list}",enginesMissing:"\u2717 \u672A\u627E\u5230\u5F15\u64CE CLI\u2014\u2014\u8BF7\u5B89\u88C5 claude\u3001codex\u3001copilot \u6216 kimi \u540E\u91CD\u542F Rove",gitMissing:"\u2717 PATH \u4E0A\u6CA1\u6709 git\u2014\u2014Rove \u9700\u8981 git \u6765\u521B\u5EFA worktree",doctorHint:"\u5728 shell \u91CC\u8FD0\u884C `rove doctor` \u67E5\u770B\u5B8C\u6574\u8BCA\u65AD",docsHint:"\u6587\u6863:https://docs.rove.run"},attention:{none:"\u6536\u4EF6\u7BB1\u4E2D\u6CA1\u6709\u53EF\u6253\u5F00\u7684\u9879\u76EE"},inbox:{title:"\u6536\u4EF6\u7BB1",empty:"\u6682\u65E0\u5F85\u5904\u7406",openHint:"enter \u6253\u5F00",clearHint:"d \u6E05\u9664",more:"\u8FD8\u6709 {count} \u6761",section:{attention:"\u5F85\u5904\u7406",recent:"\u6700\u8FD1\u4F7F\u7528"},state:{done:"\u5B8C\u6210",needsInput:"\u9700\u8981\u8F93\u5165",error:"\u51FA\u9519",rateLimited:"\u9650\u6D41",running:"\u8FDB\u884C\u4E2D",dead:"\u5F15\u64CE\u5DF2\u9000\u51FA",promptDeferred:"\u6D88\u606F\u5DF2\u6392\u961F"},resumesAt:"{time} \u6062\u590D",deferredToast:"\u6D88\u606F\u5DF2\u6392\u961F\u2014\u2014composer \u6B63\u5FD9",deferredStillQueued:"\u8FD8\u5728\u6253\u5B57\uFF1F\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u2014\u2014\u518D\u6253\u5F00\u4E00\u6B21\u5373\u53EF\u53D1\u9001\u3002",deferredUnavailable:"\u8BE5\u6807\u7B7E\u9875\u672A\u8FD0\u884C\u2014\u2014\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u3002",deferredInsertFailed:"\u65E0\u6CD5\u63D2\u5165\u6392\u961F\u7684\u6D88\u606F\u2014\u2014\u5B83\u4ECD\u5728\u6536\u4EF6\u7BB1\u4E2D\u3002"},daemonDown:{title:"\u5B88\u62A4\u8FDB\u7A0B\u5DF2\u65AD\u5F00",hint:"\u5C4F\u5E55\u4E0A\u7684\u5185\u5BB9\u662F\u5B88\u62A4\u8FDB\u7A0B\u6700\u540E\u4E00\u6B21\u4E0A\u62A5\u7684\u72B6\u6001\u3002\u6B63\u5728\u91CD\u8FDE\u2026"},terminalComing:"\u5D4C\u5165\u7EC8\u7AEF\u6B63\u5728\u542F\u52A8\u2026\u2026"}});var uc,cc;var lc=m(()=>{uc={title:"Worktrees",loading:"Loading worktrees\u2026",noProjects:"No local projects known to Rove yet.",noWorktrees:"No worktrees.",badge:{kobeManaged:"rove",dirty:"dirty",remoteOn:"on remote",remoteOff:"not pushed",remoteUnknown:"remote unknown"},verdict:{prOpen:"PR open",prMerged:"merged (PR)",inMain:"in main",prClosed:"PR closed",idle:"stale"},row:{detached:"(detached)",created:"created {age} ago",linkedTask:"task: {title}"},delete:{button:"Delete",confirmTitle:"Delete worktree?",confirmBody:'Delete the worktree for "{branch}"? This removes the working directory; the branch itself is kept.',forceTitle:"Force delete worktree?",forceBody:'"{branch}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?',failed:"Failed to delete worktree: {error}",residue:"Git deregistered the worktree, but couldn't delete {path} ({reason}). Rove is done with it \u2014 retrying won't help; delete the directory by hand if you want the space."},land:{button:"Land",confirmTitle:"Land branch?",confirmBody:`Merge "{branch}" into the base repo's current branch, then remove this worktree? The branch is kept. A dirty base checkout is refused; conflicts abort with a file list.`,noTask:"This worktree isn't tracked as a Rove task \u2014 nothing to land.",conflict:"Land hit conflicts (merge aborted). Resolve by hand: {files}",dirtyBase:"The base checkout has uncommitted changes \u2014 commit them, then land. Never `git stash` here: the stash stack lives in the repo's common dir and is shared by every linked worktree, so a stash can entangle other tasks' work.",failed:"Land failed: {error}",done:'Landed "{branch}" onto {landedOn} ({commit}).',worktreeKept:"Landed, but the worktree was kept: {reason}",worktreePathStale:"Landed and removed the worktree, but the task still points at it: {reason}",worktreeResidue:"Landed. Git deregistered the worktree, but couldn't delete {path} ({reason}) \u2014 delete the directory by hand if you want the space."},hint:{}},cc={title:"\u5DE5\u4F5C\u6811",loading:"\u6B63\u5728\u52A0\u8F7D worktree\u2026",noProjects:"Rove \u8FD8\u6CA1\u6709\u5DF2\u77E5\u7684\u672C\u5730\u9879\u76EE\u3002",noWorktrees:"\u6CA1\u6709 worktree\u3002",badge:{kobeManaged:"rove",dirty:"\u6709\u6539\u52A8",remoteOn:"\u5DF2\u63A8\u9001",remoteOff:"\u672A\u63A8\u9001",remoteUnknown:"\u8FDC\u7AEF\u672A\u77E5"},verdict:{prOpen:"PR \u8BC4\u5BA1\u4E2D",prMerged:"\u5DF2\u5408\u5165 (PR)",inMain:"\u5DF2\u5728\u4E3B\u5206\u652F",prClosed:"PR \u5DF2\u5173\u95ED",idle:"\u9648\u65E7"},row:{detached:"(\u6E38\u79BB\u72B6\u6001)",created:"{age}\u524D\u521B\u5EFA",linkedTask:"\u4EFB\u52A1\uFF1A{title}"},delete:{button:"\u5220\u9664",confirmTitle:"\u5220\u9664 worktree\uFF1F",confirmBody:'\u786E\u5B9A\u5220\u9664 "{branch}" \u5BF9\u5E94\u7684 worktree\uFF1F\u5DE5\u4F5C\u76EE\u5F55\u4F1A\u88AB\u79FB\u9664\uFF0C\u5206\u652F\u672C\u8EAB\u4F1A\u4FDD\u7559\u3002',forceTitle:"\u5F3A\u5236\u5220\u9664 worktree\uFF1F",forceBody:'"{branch}" \u5B58\u5728\u672A\u63D0\u4EA4\u6216\u672A\u8DDF\u8E2A\u7684\u6539\u52A8\uFF0C\u5F3A\u5236\u5220\u9664\u540E\u5C06\u6C38\u4E45\u4E22\u5931\u3002\u4ECD\u8981\u5F3A\u5236\u5220\u9664\u5417\uFF1F',failed:"\u5220\u9664 worktree \u5931\u8D25\uFF1A{error}",residue:"Git \u5DF2\u6CE8\u9500\u8BE5 worktree\uFF0C\u4F46\u6CA1\u80FD\u5220\u6389 {path}\uFF08{reason}\uFF09\u3002Rove \u8FD9\u8FB9\u5DF2\u7ECF\u5904\u7406\u5B8C\u4E86\u2014\u2014\u91CD\u8BD5\u6CA1\u6709\u7528\uFF1B\u60F3\u8981\u56DE\u78C1\u76D8\u7A7A\u95F4\u8BF7\u624B\u52A8\u5220\u9664\u8BE5\u76EE\u5F55\u3002"},land:{button:"\u5408\u5165",confirmTitle:"\u5408\u5165\u5206\u652F\uFF1F",confirmBody:'\u628A "{branch}" \u5408\u5165\u57FA\u4ED3\u5E93\u5F53\u524D\u5206\u652F\uFF0C\u7136\u540E\u79FB\u9664\u8FD9\u4E2A worktree\uFF1F\u5206\u652F\u4F1A\u4FDD\u7559\u3002\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u4F1A\u88AB\u62D2\u7EDD\uFF1B\u51B2\u7A81\u4F1A\u4E2D\u6B62\u5E76\u7ED9\u51FA\u6587\u4EF6\u6E05\u5355\u3002',noTask:"\u8BE5 worktree \u672A\u4F5C\u4E3A Rove \u4EFB\u52A1\u88AB\u8DDF\u8E2A\u2014\u2014\u6CA1\u6709\u53EF\u5408\u5165\u7684\u5BF9\u8C61\u3002",conflict:"\u5408\u5165\u9047\u5230\u51B2\u7A81\uFF08\u5DF2\u4E2D\u6B62\uFF09\u3002\u8BF7\u624B\u52A8\u89E3\u51B3\uFF1A{files}",dirtyBase:"\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u2014\u2014\u8BF7\u5148\u63D0\u4EA4\u518D\u5408\u5165\u3002\u7EDD\u4E0D\u8981\u5728\u8FD9\u91CC `git stash`\uFF1Astash \u6808\u5B58\u653E\u5728\u4ED3\u5E93\u7684 common dir \u4E2D\uFF0C\u8BE5\u4ED3\u5E93\u6240\u6709 linked worktree \u5171\u4EAB\uFF0C\u4E00\u6B21 stash \u53EF\u80FD\u7EA0\u7F20\u5176\u4ED6\u4EFB\u52A1\u7684\u5DE5\u4F5C\u3002",failed:"\u5408\u5165\u5931\u8D25\uFF1A{error}",done:'\u5DF2\u628A "{branch}" \u5408\u5165 {landedOn}\uFF08{commit}\uFF09\u3002',worktreeKept:"\u5DF2\u5408\u5165\uFF0C\u4F46 worktree \u4FDD\u7559\u4E86\uFF1A{reason}",worktreePathStale:"\u5DF2\u5408\u5165\u5E76\u79FB\u9664 worktree\uFF0C\u4F46\u4EFB\u52A1\u4ECD\u6307\u5411\u5B83\uFF1A{reason}",worktreeResidue:"\u5DF2\u5408\u5165\u3002Git \u5DF2\u6CE8\u9500\u8BE5 worktree\uFF0C\u4F46\u6CA1\u80FD\u5220\u6389 {path}\uFF08{reason}\uFF09\u2014\u2014\u60F3\u8981\u56DE\u78C1\u76D8\u7A7A\u95F4\u8BF7\u624B\u52A8\u5220\u9664\u8BE5\u76EE\u5F55\u3002"},hint:{}}});function f$(Z){return typeof Z==="string"&&az.some((X)=>X.id===Z)}var kV0,mV0,az,v$,oz="en";var sz=m(()=>{hu();lu();iu();ou();tu();Xc();zc();$c();Uc();Bc();Nc();Oc();_c();Ec();Sc();xc();vc();gc();hc();lc();kV0={settings:Ac,tasks:Rc,terminal:Pc,files:nu,newTask:Kc,onboarding:Wc,ops:Dc,update:yc,quickTask:Fc,help:su,hints:eu,history:Jc,common:uu,keys:qc,workspace:kc,worktrees:uc,kanban:Yc,automations:ku,workItems:fc,doctor:pu},mV0={settings:Cc,tasks:Tc,terminal:Ic,files:au,newTask:Vc,onboarding:Mc,ops:jc,update:wc,quickTask:Lc,help:ru,hints:Zc,history:Qc,common:cu,keys:Hc,workspace:mc,worktrees:cc,kanban:Gc,automations:mu,workItems:bc,doctor:du},az=[{id:"en",label:"English"},{id:"zh",label:"\u4E2D\u6587"}],v$={en:kV0,zh:mV0}});import{readFileSync as hV0}from"fs";function nD(Z,X=fu){try{let J=JSON.parse(hV0($3(),"utf8")),Q=typeof J.activeTheme==="string"&&X(J.activeTheme)?J.activeTheme:Z,z=J.transparentBackground!==!1,Y=typeof J.focusAccent==="string"&&XQ.includes(J.focusAccent)?J.focusAccent:null,G=f$(J[iD])?J[iD]:oz;return{theme:Q,transparent:z,focusAccent:Y,locale:G}}catch{return{theme:Z,transparent:!0,focusAccent:null,locale:oz}}}var iD="locale";var aD=m(()=>{V5();hK();sz()});function uV0(Z){return D3({foreground:aR(Z,"text","dark"),background:aR(Z,"background","dark")})??UX}function oD(){let Z={...kK};for(let{name:Q,theme:z}of uK())Z[Q]=z;let X=nD(VX,(Q)=>Boolean(Z[Q])),J=Z[X.theme]??Z[VX];return J?uV0(J):UX}var sR=m(()=>{KX();hK();dD();aD()});function lV0(Z,X){let J=0,Q=X.length-1,z;if(Z<X[0][0]||Z>X[Q][1])return!1;for(;Q>=J;)if(z=J+Q>>1,Z>X[z][1])J=z+1;else if(Z<X[z][0])Q=z-1;else return!0;return!1}function tR(Z){nV0(Z)||iV0.onUnexpectedError(Z)}function nV0(Z){return Z instanceof aV0?!0:Z instanceof Error&&Z.name===XT&&Z.message===XT}function oV0(Z,X){let J=this,Q=!1,z;return function(){if(Q)return z;if(Q=!0,X)try{z=Z.apply(J,arguments)}finally{X()}else z=Z.apply(J,arguments);return z}}function sV0(Z,X,J=0,Q=Z.length){let z=J,Y=Q;for(;z<Y;){let G=Math.floor((z+Y)/2);X(Z[G])?z=G+1:Y=G}return z-1}function tV0(Z,X){return(J,Q)=>X(Z(J),Z(Q))}function ZB0(Z,X){let J=Object.create(null);for(let Q of Z){let z=X(Q),Y=J[z];Y||(Y=J[z]=[]),Y.push(Q)}return J}function zB0(Z){b$=Z}function YT(Z){return b$?.trackDisposable(Z),Z}function GT(Z){b$?.markAsDisposed(Z)}function JT(Z,X){b$?.setParent(Z,X)}function YB0(Z,X){if(b$)for(let J of Z)b$.setParent(J,X)}function Zl(Z){if(ec.is(Z)){let X=[];for(let J of Z)if(J)try{J.dispose()}catch(Q){X.push(Q)}if(X.length===1)throw X[0];if(X.length>1)throw AggregateError(X,"Encountered errors while disposing of store");return Array.isArray(Z)?[]:Z}else if(Z)return Z.dispose(),Z}function GB0(...Z){let X=Xl(()=>Zl(Z));return YB0(Z,X),X}function Xl(Z){let X=YT({dispose:oV0(()=>{GT(X),Z()})});return X}function rc(Z,X){let J=0,Q=X.length-1,z;if(Z<X[0][0]||Z>X[Q][1])return!1;for(;Q>=J;)if(z=J+Q>>1,Z>X[z][1])J=z+1;else if(Z<X[z][0])Q=z-1;else return!0;return!1}var rR,cV0,g7,pV0=class{constructor(){if(this.version="6",!g7){g7=new Uint8Array(65536),g7.fill(1),g7[0]=0,g7.fill(0,1,32),g7.fill(0,127,160),g7.fill(2,4352,4448),g7[9001]=2,g7[9002]=2,g7.fill(2,11904,42192),g7[12351]=1,g7.fill(2,44032,55204),g7.fill(2,63744,64256),g7.fill(2,65040,65050),g7.fill(2,65072,65136),g7.fill(2,65280,65377),g7.fill(2,65504,65511);for(let Z=0;Z<rR.length;++Z)g7.fill(0,rR[Z][0],rR[Z][1]+1)}}wcwidth(Z){return Z<32?0:Z<127?1:Z<65536?g7[Z]:lV0(Z,cV0)?0:Z>=131072&&Z<=196605||Z>=196608&&Z<=262141?2:1}charProperties(Z,X){let J=this.wcwidth(Z),Q=J===0&&X!==0;if(Q){let z=tD.extractWidth(X);z===0?Q=!1:z>J&&(J=z)}return tD.createPropertyValue(0,J,Q)}},dV0=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(Z){setTimeout(()=>{throw Z.stack?pc.isErrorNoTelemetry(Z)?new pc(Z.message+`
299
299
 
@@ -367,7 +367,7 @@ ${i.join(`
367
367
  ${J}`}var _T,Uj=null;var Vj=m(()=>{v8();Q5();Y2()});async function hl(Z,X){let J=Z.args.str("command");if(J)return{command:J,vendor:p9(J)};let Q=await Z.runtime.defaultVendor(X);return Q?{command:Q,vendor:Q}:{}}function ul(Z){return{...Z.command?{command:Z.command}:{},...Z.vendor?{vendor:Z.vendor}:{}}}async function cl(Z){let{args:X,runtime:J}=Z,Q=await J.resolveRepoRoot(X.requirePath("repo")),z=X.int("count"),Y=X.str("agents");if(z!==void 0||Y)return RW0(Z,Q,z,Y);return EW0(Z,Q)}async function EW0(Z,X){let J=L5(Z),{args:Q}=Z,z=await hl(Z,X),Y={repo:X,...await AT(),...ul(z)},G=Q.str("title");if(G)Y.title=G;let $=Q.str("branch");if($)Y.branch=$;let U=Q.str("base-branch");if(U)Y.baseRef=U;let K=await J.request("task.create",Y),W=K.taskId;if(Q.bool("activate"))await J.request("task.setActive",{taskId:W});let D=Q.enumOf("status");if(D)await J.request("task.status",{taskId:W,status:D});let N=Q.bool("pin");if(N!==void 0)await J.request("task.pin",{taskId:W,pinned:N});let j=K.task;if(D||N!==void 0)j=(await J.request("task.get",{taskId:W})).task;let C=Q.str("prompt");if(!C)return{taskId:W,task:j,started:!1};let _=await Kj(J,W,C),F=await Z.runtime.deliverPrompt(J,{id:W,worktreePath:j.worktreePath,kind:j.kind,vendor:j.vendor,command:j.command,modelEffort:j.modelEffort,repo:j.repo,newTask:!0},_);if(!F.delivered&&!F.deferred)throw new e0(`task ${W} created but the prompt was not delivered (paste did not land)`,"NOT_DELIVERED",{taskId:W});return await J.request("task.setPrompt",{taskId:W,prompt:C}).catch(()=>{return}),j=(await J.request("task.get",{taskId:W})).task,{taskId:W,task:j,started:F.started,engineReady:F.engineReady,session:F.session,delivered:F.delivered,...F.bytes===void 0?{}:{bytes:F.bytes},...F.promptEcho?{promptEcho:F.promptEcho}:{},...F.deferred?{deferred:F.deferred}:{}}}async function RW0(Z,X,J,Q){let z=L5(Z),{args:Y}=Z,G=Y.str("prompt");if(!G)throw new e0("--count/--agents spawn parallel attempts of ONE prompt \u2014 pass --prompt","MISSING_FLAG",W3("add"));if(Y.str("branch"))throw new e0("--branch names ONE branch and cannot be shared by parallel siblings \u2014 drop it (each sibling gets its own auto branch) or spawn them one at a time","BAD_FLAG",W3("add"));if(Q){let E=J!==void 0?"--count":Y.str("command")?"--command":null;if(E)throw new e0(`${E} conflicts with --agents, which already names each sibling's engine and how many \u2014 pass one or the other`,"BAD_FLAG",W3("add"))}let $=Y.str("title"),U=Y.str("base-branch"),K=await hl(Z,X),W=Q?FD(Q):LD(J??1,K.vendor??"claude");if(W.length>r9)throw new e0(`a parallel round of ${W.length} exceeds the cap of ${r9} \u2014 spawn in batches`,"BAD_FLAG");let D=vK(),N=[],j=null,C=await AT();for(let[E,S]of W.entries()){let P=Q?{command:S,vendor:S}:{...K,vendor:S},b={repo:X,groupId:D,...C,...ul(P)};if($)b.title=W.length>1?`${$} #${E+1}/${W.length}`:$;if(U)b.baseRef=U;try{let u=await z.request("task.create",b);N.push({taskId:u.taskId,vendor:S,task:u.task})}catch(u){let n=u instanceof e0?u.code:"CREATE_FAILED",k=u instanceof Error?u.message:String(u);j={vendor:S,error:{message:k,code:n}};break}}let _=await Promise.allSettled(N.map(({taskId:E,vendor:S,task:P})=>Z.runtime.deliverPrompt(z,{id:E,worktreePath:P.worktreePath,kind:P.kind,vendor:S,command:P.command,modelEffort:P.modelEffort,repo:P.repo,newTask:!0},G))),F=[],w=[],R=[];if(_.forEach((E,S)=>{let{taskId:P,vendor:b}=N[S];if(E.status==="fulfilled"&&(E.value.delivered||E.value.deferred)){F.push({ok:!0,taskId:P,vendor:b,started:E.value.started,engineReady:E.value.engineReady,session:E.value.session,...E.value.deferred?{deferred:E.value.deferred}:{}}),R.push(z.request("task.setPrompt",{taskId:P,prompt:G}).catch(()=>{return}));return}let u=E.status==="rejected"?E.reason:new e0(`prompt was not confirmed in ${P}'s engine`,"NOT_DELIVERED"),n=u instanceof e0?u.code:"DELIVER_FAILED",k=u instanceof Error?u.message:String(u);w.push({ok:!1,taskId:P,vendor:b,error:{message:k,code:n}})}),j)w.push({ok:!1,vendor:j.vendor,error:j.error});await Promise.all(R);let T={count:N.length,requested:W.length,groupId:D,tasks:F,failures:w};if(w.length>0)throw new e0(`add delivered ${F.length}/${W.length}`,"PARTIAL_FANOUT",T);return T}var ll=m(()=>{K8();vR();Vj();f8();V8();Y2()});var Bj;var CT=m(()=>{Bj=["backlog","in_progress","in_review","done","canceled","error"]});var pl;var dl=m(()=>{f8();ll();CT();pl=[{name:"add",summary:`Create a task (shows in the sidebar immediately). With --prompt it also starts the engine and delivers it. PARALLEL ATTEMPTS: --count N spawns N sibling tasks of the SAME prompt, each in its own worktree/branch (--agents claude:2,codex:1 for a mixed fleet); capped at ${r9}, prefer 3-4. Does NOT steal focus \u2014 pass --activate to make it the active task. Alias: spawn-task.`,flags:[y1.repo(),y1.title(),{name:"branch",type:"string",placeholder:"B",description:"Explicit branch name (else derived from the title in the repo's own style). Single task only."},{name:"base-branch",type:"string",placeholder:"B",description:"Base ref the worktree branches from."},y1.command(),{name:"count",type:"int",placeholder:"N",description:`Spawn N sibling tasks of one prompt (parallel attempts, cap ${r9}). Requires --prompt.`},{name:"agents",type:"string",placeholder:"claude:2,codex:1",description:"Per-ENGINE counts for a mixed parallel round (alternative to --count). Engine ids only \u2014 see `engine-list`."},{name:"status",type:"enum",values:Bj,default:"backlog",description:"Initial lifecycle status."},{name:"pin",type:"bool",description:"Pin the task to the top of the sidebar."},{name:"activate",type:"bool",default:"false",description:"Make this the active task (pulls every mounted TUI's Tasks-pane focus). Off by default."},y1.prompt(!1,"Optional first message \u2014 when set, materializes the worktree, starts the engine, and pastes it. Required with --count/--agents.")],handler:cl}]});function d$(Z,X){try{N1(S8(Z)).trustWorktree?.(X)}catch{}}var Wj=m(()=>{h5();z5()});var il={};s1(il,{withDaemonSession:()=>TW0,resolveActiveTaskId:()=>MX,openDaemonSession:()=>Mj});async function Mj(Z={}){let X=Z.mode==="require-running"?await HX():await eJ();if(!X)return null;return{client:X,close:()=>X.close()}}async function TW0(Z,X={}){let J=await Mj(X);try{return await Z(J?.client??null)}finally{J?.close()}}async function MX(Z){let X=null,J=Z.onChannel("active-task",(Q)=>{X=Q.taskId});try{await Z.subscribe()}finally{J()}return X}var Nj=m(()=>{N3()});function p5(Z){return`terminalTabs.${Z}`}function nl(Z,X){let J=p5(X);if(Z.store[J]===void 0)return;Z.set(J,void 0)}function al(Z,X){let J=new Set(X),Q=0;for(let z of Object.keys(Z.store)){if(!z.startsWith("terminalTabs."))continue;let Y=z.slice(13);if(J.has(Y))continue;Z.set(z,void 0),Q++}return Q}function q4(Z){let X=Z,J=new Set,Q=()=>X;return Q.get=Q,Q.set=(z)=>{if(Object.is(z,X))return;X=z;for(let Y of[...J])Y()},Q.update=(z)=>Q.set(z(X)),Q.subscribe=(z)=>{return J.add(z),()=>{J.delete(z)}},Q}function ol(Z,X){let J=()=>X(Z.get()),Q=J;return Q.get=J,Q.subscribe=Z.subscribe,Q}var Dj;var Y6=m(()=>{Dj=q4});function ET(Z,X){let J=Z;for(let Q of X.split("."))if(J&&typeof J==="object"&&Q in J)J=J[Q];else return;return typeof J==="string"?J:void 0}function sl(Z,X){if(!X)return Z;return Z.replace(/\{(\w+)\}/g,(J,Q)=>(Q in X)?String(X[Q]):J)}function RT(Z,X,J){return Z.keys[X]?.[J]}function i$(Z){if(v$[Z])iK.set(Z)}function jj(){return iK.get()}function rl(){return iK}function z1(Z,X){let J=iK.get(),Q=ET(v$[J],Z)??ET(v$.en,Z)??Z;return sl(Q,X)}function NX(Z,X){let J=iK.get();return RT(v$[J],Z,X)??RT(v$.en,Z,X)??X}var iK;var O3=m(()=>{Y6();sz();sz();iK=q4(oz)});import*as tl from"fs";import*as Oj from"os";function Fj(Z){return Z.slice(Z.lastIndexOf("/")+1)}function ZZ(Z){if(Z==="~")return Oj.homedir();if(Z.startsWith("~/"))return Oj.homedir()+Z.slice(1);return Z}function el(Z){if(!Z)return{base:"",filter:""};let J=ZZ(Z==="~"?"~/":Z);if(J.endsWith("/"))return{base:J,filter:""};let Q=J.lastIndexOf("/");if(Q===-1)return{base:"",filter:J};return{base:J.slice(0,Q+1),filter:J.slice(Q+1)}}function Zp(Z){if(!Z)return[];try{let X=tl.readdirSync(Z,{withFileTypes:!0}),J=[];for(let Q of X)if(Q.isDirectory())J.push(Q.name);return J.sort((Q,z)=>Q.localeCompare(z))}catch{return[]}}function Xp(Z,X){let J=X.toLowerCase(),z=J.startsWith(".")?Z:Z.filter((Y)=>!Y.startsWith("."));if(!J)return z;return z.filter((Y)=>Y.toLowerCase().startsWith(J))}function n$(Z,X,J){let Q=X+J;if(Z.startsWith("~")){let z=Oj.homedir();if(Q===z)return"~";if(Q.startsWith(`${z}/`))return`~${Q.slice(z.length)}`}return Q}var XY=()=>{};function Jp(Z){return Z.kind==="leaf"?0:1+Math.max(...Z.children.map(Jp))}function SW0(Z,X,J){let Q=(z)=>{if(z.kind==="leaf")return null;if(z.orientation===J&&z.children.some((Y)=>Y.kind==="leaf"&&Y.id===X))return z.children.length;for(let Y of z.children){let G=Q(Y);if(G!==null)return G}return null};return Q(Z)??1}function PW0(Z,X,J){let Q=X==="row"?J.cols:J.rows,z=X==="row"?20:6,Y=SW0(Z.root,Z.activeLeafId,X);return Math.floor(Q*Y/(Y+1))-1>=z}function Lj(Z){return{root:{kind:"leaf",id:"leaf-1",content:Z},activeLeafId:"leaf-1",nextOrdinal:2}}function p7(Z){return Z.kind==="leaf"?[Z]:Z.children.flatMap(p7)}function nK(Z,X,J,Q){if(Q&&!PW0(Z,X,Q))return Z;let z={kind:"leaf",id:`leaf-${Z.nextOrdinal}`,content:J},Y=($)=>{if($.kind==="leaf"){if($.id!==Z.activeLeafId)return $;return{kind:"group",orientation:X,children:[$,z]}}if($.orientation===X){let U=$.children.findIndex((K)=>K.kind==="leaf"&&K.id===Z.activeLeafId);if(U>=0){let K=[...$.children.slice(0,U+1),z,...$.children.slice(U+1)];return{...$,children:K}}}return{...$,children:$.children.map(Y)}},G=Y(Z.root);if(!Q&&Jp(G)>4)return Z;return{root:G,activeLeafId:z.id,nextOrdinal:Z.nextOrdinal+1}}function _j(Z,X){let J=p7(Z.root);if(J.length<=1)return null;let Q=(K)=>{if(K.kind==="leaf")return K.id===X?null:K;let W=K.children.map(Q).filter((D)=>D!==null);if(W.length===0)return null;if(W.length===1)return W[0];return{...K,children:W}},z=Q(Z.root);if(z===null)return null;if(p7(z).length===J.length)return Z;let Y=J.map((K)=>K.id),G=Y.indexOf(X),$=Y[G>0?G-1:G+1],U=Z.activeLeafId===X?$:Z.activeLeafId;return{...Z,root:z,activeLeafId:U}}function Aj(Z,X,J){let Q=J.trim(),z=Q.length>0?Q:null,Y=(G)=>G.kind==="leaf"?G.id===X?{...G,title:z}:G:{...G,children:G.children.map(Y)};if(!p7(Z.root).some((G)=>G.id===X))return Z;return{...Z,root:Y(Z.root)}}function Qp(Z,X){let J=p7(Z.root).map((Y)=>Y.id);if(J.length<=1)return Z;let Q=J.indexOf(Z.activeLeafId),z=J[(Q+X+J.length)%J.length];return{...Z,activeLeafId:z}}function TT(Z){return!Z||p7(Z.root).some((X)=>X.id==="leaf-1")}function oK(Z){return Z?p7(Z.root).length>1:!1}function a$(Z){let X=p7(Z.root);return X.length===1&&X[0]?.id==="leaf-1"?null:Z}function F3(Z,X){return X==="leaf-1"?Z:`${Z}::${X}`}function ST(Z,X,J,Q){let z=($)=>{let U=($??X)[0]??"",K=Fj(U);return K.length>0?K:"?"},Y=new Map,G=new Map;for(let $ of Z){if($.title){G.set($.id,$.title);continue}let U=$.content===null?J||Q?.get($.id)||z($.content):Q?.get($.id)||aK,K=(Y.get(U)??0)+1;Y.set(U,K),G.set($.id,K===1?U:`${U} ${K}`)}return G}function IW0(Z){let X=(Z??"").trim();if(X.length<3)return null;if(/^[\d\s\p{P}\p{S}]+$/u.test(X))return null;return X}function xW0(Z,X){let J=Z?.trim();if(!J)return null;let Q=lJ(J,X);if(Q===J&&yW0(J,X))return null;if(QD(Q,X))return null;return Q||null}function yW0(Z,X){let J=new Set(sE(X));return[...Z].every((Q)=>Q.trim().length===0||J.has(Q))}function YQ(Z,X,J,Q){if(J===null&&Z.kind==="engine")return o6({...Z,kind:"command",lastTitle:null},X);let z=J??Z.liveVendor??(Z.kind==="engine"?Z.vendor??X:void 0)??void 0,Y=Q?.trim()||Z.lastTitle,G=z?xW0(Y,z):Y??null;if(!z||N1(z).terminalTitle?.ownsStatus!==!0)return o6({...Z,lastTitle:G},X);return o6({...Z,kind:"engine",vendor:z,lastTitle:G},X)}function wW0(Z,X){return Z.liveVendor??(Z.kind==="engine"?Z.vendor:void 0)??X}function o6(Z,X,J){if(Z.title)return Z.title;let Q=Z.splitTree?p7(Z.splitTree.root):[];if(Q.length>1)return z1("terminal.tab.groupTitle",{n:Z.ordinal});let z=Q.length===1?Q[0]:void 0;if(z&&z.id!=="leaf-1")return z.title??`${J??aK} ${Z.ordinal}`;let Y=wW0(Z,X);if(J&&!QD(J,Y))return`${J} ${Z.ordinal}`;if(Z.lastTitle&&!QD(Z.lastTitle,Y))return`${Z.lastTitle} ${Z.ordinal}`;let G=IW0(Z.autoTitle);if(G)return G;return`${Z.kind==="engine"?N1(Z.vendor??X).defaultCommand[0]??aK:aK} ${Z.ordinal}`}function PT(Z,X,J,Q){if(!J||!Q)return!1;if(N1(J).terminalTitle?.ownsStatus!==!0)return!1;return o6(Z,X,Q)===`${Q} ${Z.ordinal}`}var aK="shell";var IT=m(()=>{z5();O3();XY()});function zp(Z,X,J,Q){if(Z.forkFrom&&!Z.spawned&&!J){let Y=Z.vendor?Ch(X,Z.vendor,Z.forkFrom,Z.sessionId??null):null;if(Y)return Y}if(!Z.sessionId)return X;let z=Z.vendor??Q;if(Z.spawned&&!J)return _h(X,z,Z.sessionId)??X;return d9(X,z,()=>Z.sessionId).argv}function o$(Z,X,J,Q){let{live:z,shell:Y,prompt:G}=Q,$=Z.tabs.find((_)=>_.kind==="engine"),U=!X.spawned&&!z,K=U?X.initialPrompt?.trim():void 0,W=!!G&&X.id===$?.id&&U,D=X.id===$?.id&&U,N=K?{kind:"explicit",prompt:K}:W?{kind:"new-task",prompt:G}:D?{kind:"repo-init"}:{kind:"none"},j=X.ptyTask;d$(X.vendor??Q.task.vendor,j?.worktree??Q.worktreePath);let C=k$({task:j?{...Q.task,id:j.id,kind:"task"}:Q.task,worktreePath:j?.worktree??Q.worktreePath,shell:Y,argv:zp(X,J,z,Q.task.vendor),promptIntent:N,protocolGates:Q.protocolGates,tabId:j?"tab-1":X.id});return{command:C.command,...C.firstMessage?{firstMessage:C.firstMessage,engineBin:J[0]}:{}}}function xT(Z,X,J){if(Z.kind==="engine"&&X&&!!Z.sessionId&&Z.spawned&&!J)return"resume";return"close"}var Yp=m(()=>{lK();Wj();K8()});function yT(Z){return Z.map((X)=>vW0.test(X)?X:`'${X.replaceAll("'","'\\''")}'`).join(" ")}function wT(Z,X){let J=yT([Z]),Q=yT([X]);return` export ROVE_TASK_ID=${J} KOBE_TASK_ID=${J} ROVE_TAB_ID=${Q} KOBE_TAB_ID=${Q} && clear\r`}var vW0;var vT=m(()=>{vW0=/^[A-Za-z0-9@%+=:,./_-]+$/});function s6(){return{tabs:[{kind:"engine",id:"tab-1",title:null,ordinal:1}],activeId:"tab-1",nextOrdinal:2}}function fW0(Z){if(Z?.kind==="command")return{kind:"command"};if(Z?.kind==="engine"&&Z.vendor)return{kind:"engine",vendor:Z.vendor};return{kind:"engine"}}function Gp(Z,X){let J=Z.nextOrdinal,Q=`tab-${J}`,z=Z.nextOrdinal+1;if(Z.reopenAs?.kind==="command")return{tabs:[{kind:"command",id:Q,title:null,ordinal:J,command:[X]}],activeId:Q,nextOrdinal:z};let Y=Z.reopenAs?.kind==="engine"?Z.reopenAs.vendor:void 0;return{tabs:[{kind:"engine",id:Q,title:null,ordinal:J,...Y?{vendor:Y}:{}}],activeId:Q,nextOrdinal:z}}function $p(Z){return{tabs:[{kind:"command",id:"tab-1",title:null,ordinal:1,command:[Z]}],activeId:"tab-1",nextOrdinal:2}}function Cj(Z,X){let J=Z.tabs.findIndex((z)=>z.id===Z.activeId);return{tabs:[...Z.tabs.slice(0,J+1),X,...Z.tabs.slice(J+1)],activeId:X.id,nextOrdinal:Z.nextOrdinal+1}}function JY(Z,X){let J=Z.nextOrdinal;return Cj(Z,{kind:"engine",id:`tab-${J}`,title:null,ordinal:J,vendor:X})}function GQ(Z,X,J){let Q=Z.nextOrdinal;return Cj(Z,{kind:"command",id:`tab-${Q}`,title:J,ordinal:Q,command:X})}function fT(Z){return Z.tabs.find((X)=>X.kind==="command"&&X.purpose==="editor")}function qp(Z,X,J){let Q=fT(Z);if(!Q){let Y=Z.nextOrdinal;return Cj(Z,{kind:"command",id:`tab-${Y}`,title:J,ordinal:Y,command:X,purpose:"editor"})}let z=Z.tabs.map((Y)=>Y.id===Q.id?{...Q,title:J,command:X,splitTree:null}:Y);return{...Z,tabs:z,activeId:Q.id}}function bW0(Z){return Z.tabs.find((X)=>X.kind==="content")}function Hp(Z,X,J,Q){let z=bW0(Z);if(!z){let G=Z.nextOrdinal;return Cj(Z,{kind:"content",id:`tab-${G}`,title:J,ordinal:G,relPath:X,base:Q})}let Y=Z.tabs.map((G)=>G.id===z.id?{...z,title:J,relPath:X,base:Q}:G);return{...Z,tabs:Y,activeId:z.id}}function QY(Z,X,J={}){if(Z.tabs.length<=1&&!J.allowEmpty)return{state:Z,closedId:null};let Q=Z.tabs.findIndex((G)=>G.id===X);if(Q<0)return{state:Z,closedId:null};let z=Z.tabs.filter((G)=>G.id!==X);if(Z.activeId!==X)return{state:{...Z,tabs:z},closedId:X};if(z.length===0)return{state:{...Z,tabs:z,activeId:X,reopenAs:fW0(Z.tabs[Q])},closedId:X};let Y=z[Math.max(0,Q-1)];return{state:{...Z,tabs:z,activeId:(Y??z[0]).id},closedId:X}}function Up(Z){return QY(Z,Z.activeId)}function Kp(Z,X){let J=X.trim(),Q=Z.tabs.map((z)=>z.id===Z.activeId?{...z,title:J.length>0?J:null}:z);return{...Z,tabs:Q}}function sK(Z,X,J){let Q=Z.tabs.map((z)=>z.id===X&&z.kind==="engine"?{...z,sessionId:J}:z);return{...Z,tabs:Q}}function Vp(Z,X,J){let Q=Z.tabs.map((z)=>z.id===X&&z.kind==="engine"?{...z,forkFrom:J}:z);return{...Z,tabs:Q}}function Bp(Z,X,J){let Q=Z.tabs.map((z)=>z.id===X&&z.kind==="engine"?{...z,initialPrompt:J}:z);return{...Z,tabs:Q}}function Wp(Z,X,J){if(J.length===0)return Z;let Q=Z.tabs.find((Y)=>Y.id===X);if(!Q||Q.lastTitle===J)return Z;let z=Z.tabs.map((Y)=>Y.id===X?{...Y,lastTitle:J}:Y);return{...Z,tabs:z}}function Mp(Z,X,J){let Q=Z.tabs.find((Y)=>Y.id===X);if(!Q||(Q.liveVendor??null)===J)return Z;let z=Z.tabs.map((Y)=>Y.id===X?{...Y,liveVendor:J}:Y);return{...Z,tabs:z}}function Np(Z,X,J){let Q=Z.tabs.map((z)=>z.id===X?{...z,autoTitle:J}:z);return{...Z,tabs:Q}}function zY(Z,X,J){let Q=Z.tabs.map((z)=>z.id===X&&z.kind==="engine"&&!z.spawned!==!J?{...z,spawned:J}:z);return{...Z,tabs:Q}}function Ej(Z,X,J={}){let Q=Z.tabs.map((G)=>G.kind==="command"?{...G,command:X,purpose:void 0}:G);if(Q.length===0)return J.allowEmpty?Z:s6();let z=Q.some((G)=>G.id===Z.activeId)?Z.activeId:Q[0].id,Y=Q.reduce((G,$)=>Math.max(G,$.ordinal),0);return{tabs:Q,activeId:z,nextOrdinal:Math.max(Z.nextOrdinal,Y+1)}}function Dp(Z){let X=s6(),J=[{...X.tabs[0],title:Z.title,autoTitle:Z.autoTitle}];return{...X,tabs:J}}function bT(Z,X){let J=Z.tabs.length;if(J<=1)return Z;let Q=Z.tabs.findIndex((Y)=>Y.id===Z.activeId),z=Z.tabs[(Q+X+J)%J];return{...Z,activeId:z.id}}function Rj(Z,X,J){let Q=Z.tabs.findIndex(($)=>$.id===X),z=Q+J;if(Q<0||z<0||z>=Z.tabs.length)return Z;let Y=[...Z.tabs],G=Y[Q];return Y[Q]=Y[z],Y[z]=G,{...Z,tabs:Y}}function Tj(Z,X){if(Z.activeId===X||!Z.tabs.some((J)=>J.id===X))return Z;return{...Z,activeId:X}}function rK(Z,X,J){if(!Z.tabs.some((z)=>z.id===X))return Z;let Q=Z.tabs.map((z)=>z.id===X?{...z,splitTree:J}:z);return{...Z,tabs:Q}}function W7(Z,X){return`${Z}::${X}`}function q2(Z,X){if(X.kind==="engine"&&X.ptyTask)return W7(X.ptyTask.id,"tab-1");return W7(Z,X.id)}function jp(Z,X){if(Z.kind==="engine"&&Z.ptyTask)return Z.ptyTask.worktree;return X}var d5=m(()=>{IT();Yp();vT()});function Op(Z){try{let X=v4()[p5(Z)];return X&&Array.isArray(X.tabs)?X:void 0}catch{return}}function Sj(Z,X,J){let Q=new Set((Z?.tabs??[]).map((G)=>G.id)),z=`${X}::`,Y=[];for(let G of J){if(!G.alive||!G.key.startsWith(z))continue;let $=G.key.slice(z.length);if($.includes("::"))continue;if(!Q.has($)&&!Y.includes($))Y.push($)}return Y}function Lp(Z,X,J,Q={},z){let Y=Fp(J),G=new Map(J.map((K)=>[K.key,K.exit])),$=(K)=>{let W=gW0(G.get(K)??Q[K]);if(!W)return null;let D=Q[K],N=D?.at===W.at?D.tail:void 0;return{code:W.code,signal:W.signal,at:W.at,...N&&N.length>0?{tail:N}:{}}},U=(Z?.tabs??[]).map((K)=>{let W=`${X}::${K.id}`,D=Y.has(W),N=D&&z?.has(W)===!0?z.get(W)??null:void 0;return{id:K.id,kind:K.kind,title:K.title??null,vendor:K.vendor??null,liveVendor:N!==void 0?N:K.liveVendor??null,lastTitle:K.lastTitle??null,autoTitle:K.autoTitle??null,alive:D,exit:D?null:$(W)}});for(let K of Sj(Z,X,J))U.push({id:K,kind:"engine",title:null,vendor:null,liveVendor:null,lastTitle:null,autoTitle:null,alive:!0,exit:null,unregistered:!0});return U}function _p(Z,X,J){let Q=Fp(J);if(Q.has(`${X}::tab-1`))return!0;return(Z?.tabs??[]).some((z)=>z.kind==="engine"&&Q.has(`${X}::${z.id}`))}function gT(Z,X){if(!Z)return;try{let J=p5(Z);if(v4()[J]!==void 0)return;let Q=s6();P8({[J]:X?{...Q,tabs:Q.tabs.map((z)=>z.kind==="engine"?{...z,sessionId:X,spawned:!0}:z)}:Q})}catch{}}function Ap(Z,X,J){try{let Q=p5(Z),z=v4()[Q];if(!z||!Array.isArray(z.tabs))return;P8({[Q]:{...z,tabs:z.tabs.map((Y)=>Y.id===X&&Y.kind==="engine"?{...Y,sessionId:J,spawned:!0}:Y)}})}catch{}}function Cp(Z,X,J){let Q="tab-1";try{let z=p5(Z),Y=v4()[z],G=Y&&Array.isArray(Y.tabs)&&Y.tabs.length>0?Y:s6(),$=typeof G.nextOrdinal==="number"&&G.nextOrdinal>1?G.nextOrdinal:2;Q=`tab-${$}`,P8({[z]:{...G,tabs:[...G.tabs,{kind:"engine",id:Q,title:null,ordinal:$,...X?{vendor:X}:{},...J?{engineCommand:J}:{}}],activeId:Q,nextOrdinal:$+1}})}catch{Q=`tab-cli-${Date.now().toString(36)}`}return Q}var Fp=(Z)=>new Set(Z.filter((X)=>X.alive).map((X)=>X.key)),gW0=(Z)=>Z&&(Z.code!==0||Z.signal!==null)?Z:null;var kT=m(()=>{I8();d5()});var cT={};s1(cT,{recordPtyExit:()=>hT,recordEngineExit:()=>uT,readPtyExitRecords:()=>tK,plainTail:()=>mT,engineExitCodeFromTail:()=>Ep});import{mkdirSync as kW0,readFileSync as mW0,writeFileSync as hW0}from"fs";import{dirname as uW0}from"path";function mT(Z){let J=Z.replace(dW0,"").replace(/\r\n/g,`
368
368
  `).split(`
369
369
  `).map((Q)=>(Q.split("\r").pop()??"").slice(0,pW0));while(J.length>0&&(J[J.length-1]??"").trim()==="")J.pop();return J.slice(-lW0)}function Ep(Z){for(let X=Z.length-1;X>=0;X--){let J=/Engine exited \(code (\d+)\)/.exec(Z[X]??"");if(J?.[1])return Number.parseInt(J[1],10)}return null}function tK(Z=ZX()){try{let X=JSON.parse(mW0(Z,"utf8"));if(X===null||typeof X!=="object"||Array.isArray(X))return{};return X}catch{return{}}}function hT(Z,X=ZX()){if(Z.key.startsWith("::"))return;if(Z.exit.code===0&&Z.exit.signal===null)return;Rp(Z.key,{key:Z.key,pid:Z.pid,code:Z.exit.code,signal:Z.exit.signal,at:Z.exit.at,tail:mT(Z.tail),layer:"pty"},X)}function uT(Z,X=ZX()){if(Z.key.startsWith("::"))return;let J=mT(Z.tail);Rp(`${Z.key}#engine`,{key:Z.key,pid:Z.pid,code:Ep(J),signal:null,at:Z.at,tail:J,layer:"engine",vendor:Z.vendor,parentAlive:!0},X)}function Rp(Z,X,J){let Q=tK(J);Q[Z]=X;let z=Object.entries(Q).sort(([,Y],[,G])=>Y.at<G.at?1:-1).slice(0,cW0);kW0(uW0(J),{recursive:!0}),hW0(J,JSON.stringify(Object.fromEntries(z),null,2),{encoding:"utf8",mode:384})}var cW0=50,lW0=40,pW0=500,dW0;var s$=m(()=>{c5();dW0=/\x1b\[[0-9;?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)?|\x1b[@-_]/g});var Pp={};s1(Pp,{setRepoLastActiveVendor:()=>DX,setGlobalDefaultVendor:()=>pT,resolvePreferredVendor:()=>r6,getRepoLastActiveVendor:()=>Sp,getGlobalDefaultVendor:()=>Pj});function lT(Z,X){let J=Z?.trim();if(!J)return;if(B7(J)||X.includes(J))return J;return}function Sp(Z){return lT(u5(Tp+Z),x8())}function DX(Z,X){U3(Tp+Z,X)}function Pj(){let Z=x8();return lT(u5("defaultVendor"),Z)??lT(u5("lastSelectedVendor"),Z)}function pT(Z){U3("defaultVendor",Z)}function r6(Z){return(Z?Sp(Z):void 0)??Pj()??f4}var Tp="lastActiveVendor.";var XZ=m(()=>{b7();h5();h4()});function H2(Z=process.env){return{...Z,...$Q}}var $Q;var G6=m(()=>{$Q={GIT_OPTIONAL_LOCKS:"0"}});function Ip(Z){return Z>="0"&&Z<="7"}function yp(Z,X){let J=[],Q="",z=()=>{if(Q.length>0){for(let G of iW0.encode(Q))J.push(G);Q=""}},Y=X+1;while(Y<Z.length){let G=Z[Y];if(G==='"'){Y++;break}if(G==="\\"){let $=Z[Y+1];if($===void 0){Q+="\\",Y++;continue}switch($){case"a":z(),J.push(7),Y+=2;break;case"b":z(),J.push(8),Y+=2;break;case"t":z(),J.push(9),Y+=2;break;case"n":z(),J.push(10),Y+=2;break;case"v":z(),J.push(11),Y+=2;break;case"f":z(),J.push(12),Y+=2;break;case"r":z(),J.push(13),Y+=2;break;case'"':Q+='"',Y+=2;break;case"\\":Q+="\\",Y+=2;break;default:if(Ip($)){let U="",K=Y+1;while(K<Z.length&&U.length<3&&Ip(Z[K]))U+=Z[K],K++;z(),J.push(Number.parseInt(U,8)&255),Y=K}else Q+=$,Y+=2;break}}else Q+=G,Y++}return z(),{value:nW0.decode(new Uint8Array(J)),end:Y}}function L3(Z){if(Z.length===0||Z[0]!=='"')return Z;return yp(Z,0).value}function aW0(Z,X){if(Z[0]==='"'){let Q=yp(Z,0);if(Z.startsWith(X,Q.end))return{orig:Q.value,neu:L3(Z.slice(Q.end+X.length))};return null}let J=Z.indexOf(X);if(J<0)return null;return{orig:Z.slice(0,J),neu:L3(Z.slice(J+X.length))}}function Ij(Z){let X=[];for(let J of Z.split(`
370
- `)){let Q=J.replace(/\r$/,"");if(Q.length<4)continue;if(Q.startsWith("##"))continue;let z=Q[0],Y=Q[1];if(Q[2]!==" ")continue;let G=Q.slice(3);if(z==="R"||z==="C"||Y==="R"||Y==="C"){let $=aW0(G," -> ");if($){X.push({x:z,y:Y,path:$.neu,origPath:$.orig});continue}}X.push({x:z,y:Y,path:L3(G)})}return X}function xp(Z){if(Z==="-")return null;let X=Number.parseInt(Z,10);return Number.isNaN(X)?null:X}function wp(Z){let X=[],J=Z.split("\x00");if(J.length>0&&J[J.length-1]==="")J.pop();let Q=0;while(Q<J.length){let z=J[Q],Y=z.indexOf("\t");if(Y<0){Q++;continue}let G=z.indexOf("\t",Y+1);if(G<0){Q++;continue}let $=xp(z.slice(0,Y)),U=xp(z.slice(Y+1,G)),K=z.slice(G+1);if(K.length>0)X.push({path:L3(K),added:$,deleted:U}),Q++;else{if(Q+2>=J.length)break;X.push({path:L3(J[Q+2]),origPath:L3(J[Q+1]),added:$,deleted:U}),Q+=3}}return X}var iW0,nW0;var xj=m(()=>{iW0=new TextEncoder,nW0=new TextDecoder});var vp={};s1(vp,{sameWorktreeChanges:()=>eK,readWorktreeChanges:()=>sW0,pickPushedChanges:()=>dT,parsePorcelain:()=>r$});import{spawnSync as oW0}from"child_process";function eK(Z,X){return Z.added===X.added&&Z.deleted===X.deleted}function dT(Z,X){if(!Z)return null;return Z.get(X)??yj}function sW0(Z){if(!Z)return yj;try{let X=oW0("git",["status","--porcelain=v1"],{cwd:Z,encoding:"utf8",stdio:["ignore","pipe","pipe"],env:H2()});if(X.status!==0||!X.stdout)return yj;return r$(X.stdout)}catch{return yj}}function r$(Z){let X=0,J=0;for(let{x:Q,y:z}of Ij(Z))if(Q==="D"||z==="D")J+=1;else X+=1;return{added:X,deleted:J}}var yj;var t$=m(()=>{G6();xj();yj={added:0,deleted:0}});var kp={};s1(kp,{resolveBaseRef:()=>bp,readBranchSignals:()=>eW0,parseShortstat:()=>gp});import{spawnSync as rW0}from"child_process";function ZV(Z,X){try{let J=rW0("git",[...X],{cwd:Z,encoding:"utf8",stdio:["ignore","pipe","pipe"],env:H2()});return J.status===0?J.stdout.trim():null}catch{return null}}function bp(Z){let X=ZV(Z,["symbolic-ref","--short","refs/remotes/origin/HEAD"]);if(X)return X;for(let J of["origin/main","origin/master","main","master"])if(ZV(Z,["rev-parse","--verify","--quiet",J])!==null)return J;return null}function tW0(Z,X){if(X&&ZV(Z,["rev-parse","--verify","--quiet",X])!==null)return X;return bp(Z)}function gp(Z){let X=(J)=>{let Q=Z.match(J);return Q?Number.parseInt(Q[1]??"0",10):0};return{files:X(/(\d+) files? changed/),insertions:X(/(\d+) insertions?\(\+\)/),deletions:X(/(\d+) deletions?\(-\)/)}}function eW0(Z,X){if(!Z)return fp;let J=tW0(Z,X);if(!J)return fp;let Q=ZV(Z,["rev-list","--count",`${J}..HEAD`]),z=Q===null?null:Number.parseInt(Q,10),Y=ZV(Z,["diff","--shortstat",`${J}...HEAD`]),G=Y===null?null:gp(Y);return{baseRef:J,ahead:z!==null&&Number.isNaN(z)?null:z,diff:G}}var fp;var mp=m(()=>{G6();fp={baseRef:null,ahead:null,diff:null}});async function ZM0(Z,X,J,Q){let z;try{z=await DT()}catch(Y){throw new e0(`failed to start PTY host for ${Z.id}: ${Y instanceof Error?Y.message:String(Y)}`,"SESSION_FAILED")}try{if(Z.tab&&Z.tab!=="new"){let N=l7({command:Z.command,vendor:Z.vendor,effort:Z.modelEffort})[0];return await FT(z.rpc,Z.id,Z.tab,X,J,{engineBin:N,vendor:Z.vendor,defer:Q})}let Y=Z.tab==="new"?Cp(Z.id,Z.tabVendor,Z.tabCommand):void 0,G=Z.tabVendor??Z.vendor,$=Z.tabCommand??(Z.tabVendor?void 0:Z.command),{argv:U,sessionId:K}=d9(l7({command:$,vendor:G,effort:Z.modelEffort}),G);d$(G,X);let W=k$({task:{id:Z.id,kind:Z.kind,vendor:G,repo:Z.repo},worktreePath:X,shell:process.env.SHELL?.trim()||"/bin/zsh",argv:U,promptIntent:Z.newTask?{kind:"new-task",prompt:J}:{kind:"explicit",prompt:J},tabId:Y}),D=await OT(z.rpc,{id:Z.id,engineBin:U[0]},X,J,W,{forceNew:Y!==void 0,vendor:G,defer:Q});if(D.started&&!D.delivered&&!D.deferred)throw new e0(`failed to start hosted engine session for ${Z.id}`,"SESSION_FAILED");if(D.started&&K)if(Y)Ap(Z.id,Y,K);else gT(Z.id,K);else if(!Y)gT(Z.id);return D}catch(Y){if(Y instanceof e0)throw Y;throw new e0(`hosted engine session failed for ${Z.id}: ${Y instanceof Error?Y.message:String(Y)}`,"SESSION_FAILED")}finally{z.close()}}async function iT(Z,X,J,Q=XM0){let z=X.worktreePath;if(!z)z=(await Z.request("task.ensureWorktree",{taskId:X.id})).worktreePath;if(!z)throw new e0(`task ${X.id} has no worktree`,"NO_WORKTREE");if(X.newTask)await Z.request("task.observeLanguage",{taskId:X.id,text:J}).catch(()=>{});let Y={defer:($)=>Z.request("deferredPrompt.file",{taskId:$.taskId,tabId:$.tabId,prompt:$.prompt,layer:$.layer}).then((U)=>U.id)},G=await Q.deliverHosted(X,z,J,Y);if(!G)throw new e0(`failed to start hosted engine session for ${X.id}`,"SESSION_FAILED");return G}var XM0,XV;var JV=m(()=>{K8();lK();Wj();Nj();Hj();kT();Y2();XM0={deliverHosted:(Z,X,J,Q)=>ZM0(Z,X,J,Q)};XV={isTaskRunning:async(Z)=>(await XV.taskTabs(Z)).running,taskTabs:async(Z)=>{let X=[],J=await c$();if(J)try{X=await l$(J.rpc)}finally{J.close()}let Q;try{let{foregroundEngineIn:G,parsePsSnapshot:$,psSnapshot:U}=await Promise.resolve().then(() => (c9(),YD)),K=X.filter((W)=>W.alive&&typeof W.pid==="number"&&W.pid>0);if(K.length>0){let W=$(await U());Q=new Map(K.map((D)=>[D.key,G(W,D.pid)?.vendor??null]))}}catch{}let z={};try{z=(await Promise.resolve().then(() => (s$(),cT))).readPtyExitRecords()}catch{}let Y=Op(Z);return{tabs:Lp(Y,Z,X,z,Q),running:_p(Y,Z,X)}},deliverPrompt:(Z,X,J)=>iT(Z,X,J),resolveRepoRoot:async(Z)=>(await Promise.resolve().then(() => (h4(),gz))).resolveMainRepoRoot(Z),defaultVendor:async(Z)=>{let{getGlobalDefaultVendor:X,getRepoLastActiveVendor:J}=await Promise.resolve().then(() => (XZ(),Pp));return(Z?J(Z):void 0)??X()},readWorktreeChanges:async(Z)=>(await Promise.resolve().then(() => (t$(),vp))).readWorktreeChanges(Z),readBranchSignals:async(Z,X)=>(await Promise.resolve().then(() => (mp(),kp))).readBranchSignals(Z,X),tearDownSession:async(Z)=>{let X=await c$();if(X)try{await LT(X.rpc,NT(await l$(X.rpc),Z))}catch{}finally{X.close()}}}});var hp,up;var cp=m(()=>{WX();f8();V8();JV();Y2();hp={name:"pane-open",summary:"Open a terminal pane in a task's workspace: split the focused tab (default, or --tab's tab) or open a separate command tab, optionally running a command. Broadcast over the daemon's tab.open channel \u2014 an attached TUI showing the task performs the split. Task defaults to $ROVE_TASK_ID, then the active task. Returns the resolved `title` (the label `pane-close --title` must match \u2014 derived from the command's first word when --title is omitted) plus `clients` (attached connections; 0 = nobody performed the split).",flags:[y1.taskId(!1),{name:"tab",type:"string",placeholder:"TAB",description:"Host tab for the split (e.g. tab-3) instead of the focused tab (split placement only)."},{name:"command",type:"string",placeholder:"CMD",description:"Shell command the pane runs (via the login shell's `-ilc`, so pipes/args and your shell rc's PATH/exports work); the pane closes when it exits. Omit for an interactive shell."},{name:"direction",type:"enum",values:["right","down"],default:"right",description:"Split orientation relative to the active pane (split placement only)."},{name:"placement",type:"enum",values:["split","tab"],default:"split",description:"`split` joins the focused tab's split group; `tab` opens a separate command tab."},{name:"title",type:"string",placeholder:"TEXT",description:`Pane label (default: the command's first word, else "shell").`}],handler:async(Z)=>{let X=L5(Z),J=Z.args.str("task-id")??process.env.KOBE_TASK_ID??await MX(X);if(!J)throw new e0("no target task: pass --task-id (no $ROVE_TASK_ID, no active task)","TASK_NOT_FOUND");let Q=Z.args.str("command"),z=g8({fallback:"/bin/sh"}),Y=Q?[z,"-ilc",Q]:[z,"-il"],G=Z.args.str("title")??(Q?Q.trim().split(/\s+/)[0]??"shell":"shell"),$=Z.args.str("tab");return{...await A4(Z,"tab.open",{taskId:J,argv:Y,title:G,...$!==void 0?{tabId:$}:{},placement:Z.args.str("placement")??"split",direction:Z.args.str("direction")??"right"}),title:G}}},up={name:"pane-close",summary:"Close panes opened by pane-open: every split pane / command tab in the task whose label matches --title. Broadcast over the daemon's tab.close channel \u2014 an attached TUI showing the task performs the close (headless no-op). Task defaults to $ROVE_TASK_ID, then the active task. Returns `clients` (attached connections; 0 = nobody performed the close).",flags:[y1.taskId(!1),{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Pane label to close \u2014 the --title the pane was opened with (engine panes are never closed)."},{name:"tab",type:"string",placeholder:"TAB",description:"Scope the title match to one tab (e.g. tab-3) instead of every tab of the task."}],handler:async(Z)=>{let X=L5(Z),J=Z.args.str("task-id")??process.env.KOBE_TASK_ID??await MX(X);if(!J)throw new e0("no target task: pass --task-id (no $ROVE_TASK_ID, no active task)","TASK_NOT_FOUND");let Q=Z.args.str("tab");return A4(Z,"tab.close",{taskId:J,title:Z.args.str("title"),...Q!==void 0?{tabId:Q}:{}})}}});var nT,QV,aT,oT="DIRTY_WORKTREE",sT,rT,tT="TASK_DELETING",qQ,JM0="MAIN_CHECKOUT_DIRTY",eT,QM0="EMPTY_BRANCH",ZS,wj="EMPTY_BRANCH_DIRTY_WORKTREE",XS,zM0="LAND_CONFLICT",vj;var jX=m(()=>{nT=class nT extends Error{from;to;taskId;constructor(Z,X,J){super(`illegal transition for task ${J}: ${Z} -> ${X}`);this.from=Z;this.to=X;this.taskId=J;this.name="IllegalTransitionError"}};QV=class QV extends Error{constructor(Z){super(`task not found: ${Z}`);this.name="TaskNotFoundError"}};aT=class aT extends Error{constructor(){super("cannot delete a main task; remove the repo from saved repos instead");this.name="CannotDeleteMainTaskError"}};sT=class sT extends Error{taskId;constructor(Z){super(`${oT}: task ${Z} worktree has uncommitted or untracked changes`);this.taskId=Z;this.name="DirtyWorktreeError"}};rT=class rT extends Error{taskId;cause;constructor(Z,X){super(`failed to remove worktree for task ${Z}: ${s0(X)}`);this.taskId=Z;this.cause=X;this.name="WorktreeRemoveFailedError"}};qQ=class qQ extends Error{taskId;constructor(Z){super(`${tT}: task ${Z} is being deleted`);this.taskId=Z;this.name="TaskDeletingError"}};eT=class eT extends Error{repo;dir;constructor(Z,X){super(`${JM0}: base checkout at ${X} has uncommitted changes; commit them before landing (never git stash \u2014 the stash stack is shared by every worktree of this repo)`);this.repo=Z;this.dir=X;this.name="MainCheckoutDirtyError"}};ZS=class ZS extends Error{branch;landedOn;constructor(Z,X){super(`${QM0}: '${Z}' has no commits ahead of '${X}' \u2014 landing it would be a no-op (the worker may not have delivered anything)`);this.branch=Z;this.landedOn=X;this.name="EmptyBranchError"}};XS=class XS extends Error{branch;landedOn;worktreePath;files;constructor(Z,X,J,Q){let z=Q.length>0?Q.join(", "):"(none reported)";super(`${wj}: '${Z}' has no commits ahead of '${X}' but its worktree ${J} has uncommitted changes (${z}) \u2014 commit them in the worktree first, then land again`);this.branch=Z;this.landedOn=X;this.worktreePath=J;this.files=Q;this.name="EmptyBranchDirtyWorktreeError"}};vj=class vj extends Error{taskId;branch;files;constructor(Z,X,J){let Q=J.length>0?J.join(", "):"(none reported)";super(`${zM0}: merging '${X}' hit conflicts, merge aborted \u2014 conflicted files: ${Q}`);this.taskId=Z;this.branch=X;this.files=J;this.name="LandConflictError"}}});async function lp(Z){let X=Z.args.str("title"),J=Z.args.str("body"),Q=Z.args.str("task");if(X===void 0&&J===void 0&&Q===void 0)throw new e0("issue-update requires --title, --body, and/or --task","MISSING_FLAG");let z=Z.args.requirePath("repo"),Y=Z.args.int("id"),G;if(X!==void 0||J!==void 0)G=await A4(Z,"issue.mutate",{repoRoot:z,op:{type:"update",id:Y,title:X,body:J}});if(Q!==void 0)G=await A4(Z,"issue.mutate",{repoRoot:z,op:Q==="none"?{type:"unlink",id:Y}:{type:"link",id:Y,taskId:Q}});return G}async function $M0(Z,X,J){if(X.args.bool("allow-empty"))return;if(!/^\s*succeeded\s*[:\uff1a]/i.test(J))return;let Q=await p$();if(!Q)return;let z;try{z=(await Z.request("task.get",{taskId:Q.taskId})).task}catch{return}if(z.kind==="main"||z.kind==="dir")return;if(!z.worktreePath)return;let Y;try{Y=(await X.runtime.readBranchSignals(z.worktreePath)).ahead}catch{return}if(Y!==0)return;let G=z.branch||"your branch";throw new e0(`refusing to report success: ${G} has 0 commits \u2014 "succeeded" means COMMITTED, and this report would reach the coordinator as a clean success with nothing to land`,"EMPTY_SUCCESS_REPORT",{taskId:Q.taskId,branch:G,hint:"commit your work with a real message and send again \u2014 or, if this task genuinely produced no commits (an investigation or a review), re-send with --allow-empty to say so explicitly",nextCommandArgs:["api","send","--allow-empty","--prompt",J]})}async function pp(Z){let X=L5(Z),J=Z.args.require("prompt"),Q=Z.args.str("tab");if(Q&&Q!=="new"&&!/^tab-[A-Za-z0-9-]+$/.test(Q))throw new e0(`--tab must be "new" or a tab id like tab-2 (got ${JSON.stringify(Q)})`,"BAD_TAB");let z=Z.args.str("command");if(z&&Q!=="new")throw new e0(`--command only applies to a new tab; pass --tab new (got --tab ${Q??"<canonical>"})`,"BAD_FLAG",W3("send"));let Y=z?p9(z):void 0,G=Z.args.str("task-id");if(!G){let W=await kl(X);if(W){if(G=W.taskId,Q===void 0)Q=await ml(Z.runtime,W)}else{let D=await MX(X);if(!D)throw new e0("no --task-id given and no active task \u2014 open a task first or pass --task-id","MISSING_TARGET");G=D}}let $=await X.request("task.get",{taskId:G});await $M0(X,Z,J);let U=Z.args.bool("plain")?J:await Kj(X,G,J),K=await Z.runtime.deliverPrompt(X,{id:G,worktreePath:$.task.worktreePath,kind:$.task.kind,vendor:$.task.vendor,command:$.task.command,modelEffort:z?void 0:$.task.modelEffort,repo:$.task.repo,tab:Q,tabVendor:Y,tabCommand:z},U);if(!K.delivered&&!K.deferred)throw new e0(`prompt was not confirmed in ${G}'s engine (paste did not land)`,"NOT_DELIVERED");return{ok:!0,taskId:G,session:K.session,started:K.started,engineReady:K.engineReady,...K.deferred?{deferred:K.deferred,delivered:!1}:{}}}async function qM0(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.require("prompt"),z=Z.args.str("tab"),Y=await X.request("session.deliver",{taskId:J,text:Q,...z!==void 0?{tabId:z}:{},source:"dispatcher"});return{ok:!0,taskId:J,...z!==void 0?{tabId:z}:{},routed:"session.deliver",...Y?.clients!==void 0?{clients:Y.clients}:{}}}async function ip(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.require("text");return await X.request("note.file",{taskId:J,text:Q})}async function np(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=await X.request("task.get",{taskId:J}),{tabs:z,running:Y}=await Z.runtime.taskTabs(J);return{task:Q.task,running:Y,tabs:z}}async function ap(Z){return L5(Z).request("task.list")}async function op(Z){let X=L5(Z),Q=Z.args.bool("none")?null:Z.args.require("task-id");return await X.request("task.setActive",{taskId:Q}),{ok:!0,activeTaskId:Q}}async function sp(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.bool("force")??!1,z=Z.args.bool("delete-branch")??!1,Y=await p$(),G=await X.request("task.delete",{taskId:J,force:Q,deleteBranch:z,...Y?{requestedByTaskId:Y.taskId,requestedByTabId:Y.tabId}:{}});if(await Z.runtime.tearDownSession(J),!G.queued)return{...G,status:"not_found"};if(!Z.args.bool("wait"))return{...G,status:"queued"};return{...G,...await HM0(X,J)}}async function HM0(Z,X){let J=Date.now()+YM0;for(;;){let{tasks:Q}=await Z.request("task.list"),z=Q.find((G)=>G.id===X);if(!z)return{status:"removed"};let Y=z.deletion;if(Y?.phase==="error")return{status:"failed",error:Y.error??"worktree removal failed"};if(Date.now()>=J)return{status:"pending"};await new Promise((G)=>setTimeout(G,GM0))}}async function rp(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.str("strategy")==="squash"?"squash":"merge",z;try{z=await X.request("task.land",{taskId:J,strategy:Q,deleteBranch:Z.args.bool("delete-branch")??!1,removeWorktree:Z.args.bool("remove-worktree"),callerCwd:process.cwd()})}catch(Y){throw UM0(Y,J)}return{ok:!0,taskId:J,...z.result}}function UM0(Z,X){let J=s0(Z);if(!J.includes(wj))return Z;let Q=/EMPTY_BRANCH_DIRTY_WORKTREE: '([^']+)'/.exec(J)?.[1]??"your task branch";return new e0(J,wj,{hint:"the worker wrote files but never committed them \u2014 send it back to commit its own work, then land again",nextCommandArgs:["api","send","--task-id",X,"--prompt",`your work is uncommitted on ${Q} \u2014 commit it yourself with a proper message, then report back`]})}async function tp(Z){let X=L5(Z),{args:J}=Z,Q={repo:J.requirePath("repo"),worktreePath:J.requirePath("worktree")},z=J.str("branch");if(z)Q.branch=z;let Y=J.str("command");if(Y)Q.command=Y,Q.vendor=p9(Y);let G=J.str("title");if(G)Q.title=G;return X.request("worktree.adopt",Q)}var YM0=60000,GM0=250,dp;var e$=m(()=>{K8();jX();Vj();f8();V8();JV();Y2();dp={name:"dispatch",summary:"Route text into a task's live session via the daemon's session.deliver channel. The dispatcher's messenger (docs/design/dispatcher.md); unlike `send`, it requires an already-hosted session.",flags:[y1.taskId(!0),y1.prompt(!0,"Text delivered into the task's engine session."),{name:"tab",type:"string",required:!1,placeholder:"TAB",description:"Deliver into exactly this tab (e.g. tab-3) instead of the canonical engine tab."}],handler:qM0}});var ep;var Zd=m(()=>{f8();V8();cp();e$();ep=[{name:"send",summary:"Paste a follow-up prompt into a task's running engine (one full turn). Without --task-id, a task spawned from another Rove session replies to its dispatcher's tab (then that task's live canonical engine; nothing alive = DISPATCHER_UNREACHABLE, never a silent spawn); otherwise the active task. Sent from inside another Rove task ($ROVE_TASK_ID), the prompt is prefixed with [ROVE PEER] provenance \u2014 who sent it and how to reply (tab-precise) \u2014 so agent-to-agent messaging needs no coordinator. When the target composer is busy (you'd paste into a half-typed message), the prompt is accepted-but-deferred: the daemon stores it and queues a `prompt_deferred` Inbox episode for a human to release \u2014 that outcome is a SUCCESS (exit 0, `deferred` in the JSON). Do NOT retry a deferred send: the daemon already owns the message, and resending stacks a duplicate in the queue. A `succeeded:` report sent from a managed task whose branch has 0 commits is REFUSED (EMPTY_SUCCESS_REPORT) \u2014 commit first, or pass --allow-empty when the task genuinely produced no commits.",flags:[y1.taskId(!1),y1.prompt(!0,"Text pasted + submitted into the engine pane."),{name:"tab",type:"string",required:!1,placeholder:"TAB",description:'Tab addressing: "new" spawns the prompt in a fresh engine tab; "tab-N" delivers to that exact alive tab (error when dead/absent). Omitted = the canonical engine tab.'},{...y1.command(),description:"Engine launch command for a `--tab new` tab \u2014 the API twin of the TUI's ctrl+e pick. Lets one worktree run two agents on the same files (e.g. hand the stuck work to codex without leaving the branch). An engine id from `engine-list` or a full command line; pinned to that tab, so it survives restarts and a later set-command on the task. Only valid with --tab new."},{name:"plain",type:"bool",required:!1,description:"Deliver the prompt verbatim \u2014 skip the [ROVE PEER] provenance prefix."},{name:"allow-empty",type:"bool",required:!1,description:"Report success from a task with zero commits (EMPTY_SUCCESS_REPORT is refused otherwise). For work that legitimately produces no commits \u2014 an investigation, a review, a question answered."}],handler:pp},dp,{name:"note",summary:"File a one-line field note \u2014 a resolved, repo-level gotcha worth sharing. Appended to the repo's durable note store (every future session on this repo starts with it) and forwarded to the dispatcher session for live relay (docs/design/dispatcher.md).",flags:[y1.taskId(!0),{name:"text",type:"string",required:!0,placeholder:"TEXT",description:"One line: the verified conclusion another session could act on."}],handler:ip},{name:"note-list",summary:"Read a repo's accumulated field notes, newest first. Returns { notes }.",flags:[y1.repo(!0)],handler:(Z)=>A4(Z,"note.list",{repo:Z.args.requirePath("repo")})},hp,up,{name:"notify",summary:"Show a toast in every attached Rove UI \u2014 broadcast over the daemon's notice.event channel. Agents/scripts use it to surface 'done / needs input / error' moments without touching the task's session. Returns `clients` (attached connections; 0 = no UI showed the toast).",flags:[{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Toast text (one line)."},{name:"kind",type:"string",default:"done",placeholder:"KIND",description:`Free-form kind tag. "done", "needs_input" and "error" get the TUI's severity styling/unread mark; any other value renders neutrally.`},y1.taskId(!1),{name:"source",type:"string",placeholder:"TAG",description:"Free-form origin tag (e.g. an agent name) recorded on the event."}],handler:async(Z)=>{return A4(Z,"notice.send",{title:Z.args.str("title"),kind:Z.args.str("kind")??"done",taskId:Z.args.str("task-id"),source:Z.args.str("source")})}},{name:"prompt",summary:"Ask the human for a line of text through the attached TUI's input dialog (plugins' host-provided prompt). Blocks until answered, cancelled, or timed out; returns { value } or { cancelled, reason }.",flags:[{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Dialog title (shown verbatim)."},{name:"placeholder",type:"string",placeholder:"TEXT",description:"Input placeholder."},{name:"initial",type:"string",placeholder:"TEXT",description:"Pre-filled input value."},{name:"timeout",type:"string",placeholder:"MS",description:"Give up after this many milliseconds (default 120000, max 600000)."}],handler:async(Z)=>{let X=Z.args.str("timeout"),J=X?Number.parseInt(X,10):void 0;return A4(Z,"ui.prompt",{title:Z.args.str("title"),placeholder:Z.args.str("placeholder"),initial:Z.args.str("initial"),...J&&Number.isFinite(J)?{timeoutMs:J}:{}})}},{name:"engine-report",summary:"Report a normalized engine-activity verb for a task \u2014 the public face of the same engine.reportEvent RPC the built-in hook adapters use. Lets a plugin-contributed engine (or any wrapper script) drive the sidebar badge, attention inbox, and plugin event stream without a built-in hook adapter. Kinds: session-start|turn-start|turn-complete|turn-failed|turn-interrupted|awaiting-input|session-end (state kinds) plus tool-pre|tool-post|tool-failed|pre-compact|post-compact|subagent-start|subagent-stop (plugin-only).",flags:[y1.taskId(!1),{name:"kind",type:"string",required:!0,placeholder:"KIND",description:"Normalized activity verb (see summary). Unknown kinds are rejected."},{name:"engine",type:"string",placeholder:"ID",description:"Engine id producing the report (a plugin engine id, or a built-in vendor)."},{name:"tab",type:"string",placeholder:"TAB",description:"Terminal tab id the session runs in (defaults to $ROVE_TAB_ID / $KOBE_TAB_ID)."},{name:"detail",type:"string",placeholder:"JSON",description:`Optional detail JSON, e.g. '{"failure":"rate_limit"}' or '{"waiting":"input"}'.`}],handler:async(Z)=>{let X=Z.args.str("task-id")??process.env.ROVE_TASK_ID??process.env.KOBE_TASK_ID,J=Z.args.str("tab")??process.env.ROVE_TAB_ID??process.env.KOBE_TAB_ID,Q=Z.args.str("detail"),z;if(Q!==void 0)try{z=JSON.parse(Q)}catch{throw Error("--detail must be valid JSON")}return A4(Z,"engine.reportEvent",{kind:Z.args.str("kind"),...X?{taskId:X}:{cwd:process.cwd()},...Z.args.str("engine")?{engine:Z.args.str("engine")}:{},...J?{tabId:J}:{},...z!==void 0?{detail:z}:{}})}},{name:"set-active",summary:"Set the shared active task (the focus every Tasks pane highlights). Pass --none to clear.",flags:[y1.taskId(!1),{name:"none",type:"bool",description:"Clear the active task instead of setting one."}],handler:op}]});var Xd;var Jd=m(()=>{f8();V8();_R();CT();Xd=[{name:"rename",summary:"Set a task's title.",flags:[y1.taskId(),{name:"title",type:"string",required:!0,placeholder:"T",description:"New title."}],handler:(Z)=>A4(Z,"task.rename",{taskId:Z.args.require("task-id"),title:Z.args.require("title")})},{name:"set-branch",summary:"Rename a task's branch (git branch -m if materialized, else recorded).",flags:[y1.taskId(),{name:"branch",type:"string",required:!0,placeholder:"B",description:"New branch name."}],handler:(Z)=>A4(Z,"task.setBranch",{taskId:Z.args.require("task-id"),branch:Z.args.require("branch")})},ah,{name:"set-status",summary:"Set a task's lifecycle status.",flags:[y1.taskId(),{name:"status",type:"enum",required:!0,values:Bj,description:"New status."}],handler:(Z)=>A4(Z,"task.status",{taskId:Z.args.require("task-id"),status:Z.args.requireEnum("status")})}]});import{spawnSync as KM0}from"child_process";function WM0(Z){let[X,J]=Z.split("/");if(!X||!J)throw Error(`invalid GitHub repository slug: ${Z}`);return{owner:X,name:J}}function Qd(Z,X){let J=Z.trim();if(!J)throw Error(`${X} is required`);return J}function zd(Z,X){let J=X?.map((Q)=>typeof Q.message==="string"?Q.message:null).filter((Q)=>!!Q);if(J&&J.length>0)return J.join("; ");return Z.trim()||"GitHub CLI returned an empty response"}function Yd(Z,X,J){let Q=["api","graphql","-f",`query=${Z}`];for(let[U,K]of Object.entries(X))Q.push("-f",`${U}=${K}`);let z=J.spawn("gh",Q,{encoding:"utf8"});if(z.error)throw Error(`failed to run gh: ${z.error.message}`);let Y=typeof z.stdout==="string"?z.stdout:String(z.stdout??""),G=typeof z.stderr==="string"?z.stderr:String(z.stderr??""),$;try{$=JSON.parse(Y)}catch{throw Error(`failed to parse gh response: ${zd(G,void 0)}`)}if((z.status??0)!==0||$.errors?.length)throw Error(zd(G,$.errors));if(!$.data)throw Error("GitHub CLI response did not include data");return $.data}function MM0(Z){return`${Z}
370
+ `)){let Q=J.replace(/\r$/,"");if(Q.length<4)continue;if(Q.startsWith("##"))continue;let z=Q[0],Y=Q[1];if(Q[2]!==" ")continue;let G=Q.slice(3);if(z==="R"||z==="C"||Y==="R"||Y==="C"){let $=aW0(G," -> ");if($){X.push({x:z,y:Y,path:$.neu,origPath:$.orig});continue}}X.push({x:z,y:Y,path:L3(G)})}return X}function xp(Z){if(Z==="-")return null;let X=Number.parseInt(Z,10);return Number.isNaN(X)?null:X}function wp(Z){let X=[],J=Z.split("\x00");if(J.length>0&&J[J.length-1]==="")J.pop();let Q=0;while(Q<J.length){let z=J[Q],Y=z.indexOf("\t");if(Y<0){Q++;continue}let G=z.indexOf("\t",Y+1);if(G<0){Q++;continue}let $=xp(z.slice(0,Y)),U=xp(z.slice(Y+1,G)),K=z.slice(G+1);if(K.length>0)X.push({path:L3(K),added:$,deleted:U}),Q++;else{if(Q+2>=J.length)break;X.push({path:L3(J[Q+2]),origPath:L3(J[Q+1]),added:$,deleted:U}),Q+=3}}return X}var iW0,nW0;var xj=m(()=>{iW0=new TextEncoder,nW0=new TextDecoder});var vp={};s1(vp,{sameWorktreeChanges:()=>eK,readWorktreeChanges:()=>sW0,pickPushedChanges:()=>dT,parsePorcelain:()=>r$});import{spawnSync as oW0}from"child_process";function eK(Z,X){return Z.added===X.added&&Z.deleted===X.deleted}function dT(Z,X){if(!Z)return null;return Z.get(X)??yj}function sW0(Z){if(!Z)return yj;try{let X=oW0("git",["status","--porcelain=v1"],{cwd:Z,encoding:"utf8",stdio:["ignore","pipe","pipe"],env:H2()});if(X.status!==0||!X.stdout)return yj;return r$(X.stdout)}catch{return yj}}function r$(Z){let X=0,J=0;for(let{x:Q,y:z}of Ij(Z))if(Q==="D"||z==="D")J+=1;else X+=1;return{added:X,deleted:J}}var yj;var t$=m(()=>{G6();xj();yj={added:0,deleted:0}});var kp={};s1(kp,{resolveBaseRef:()=>bp,readBranchSignals:()=>eW0,parseShortstat:()=>gp});import{spawnSync as rW0}from"child_process";function ZV(Z,X){try{let J=rW0("git",[...X],{cwd:Z,encoding:"utf8",stdio:["ignore","pipe","pipe"],env:H2()});return J.status===0?J.stdout.trim():null}catch{return null}}function bp(Z){let X=ZV(Z,["symbolic-ref","--short","refs/remotes/origin/HEAD"]);if(X)return X;for(let J of["origin/main","origin/master","main","master"])if(ZV(Z,["rev-parse","--verify","--quiet",J])!==null)return J;return null}function tW0(Z,X){if(X&&ZV(Z,["rev-parse","--verify","--quiet",X])!==null)return X;return bp(Z)}function gp(Z){let X=(J)=>{let Q=Z.match(J);return Q?Number.parseInt(Q[1]??"0",10):0};return{files:X(/(\d+) files? changed/),insertions:X(/(\d+) insertions?\(\+\)/),deletions:X(/(\d+) deletions?\(-\)/)}}function eW0(Z,X){if(!Z)return fp;let J=tW0(Z,X);if(!J)return fp;let Q=ZV(Z,["rev-list","--count",`${J}..HEAD`]),z=Q===null?null:Number.parseInt(Q,10),Y=ZV(Z,["diff","--shortstat",`${J}...HEAD`]),G=Y===null?null:gp(Y);return{baseRef:J,ahead:z!==null&&Number.isNaN(z)?null:z,diff:G}}var fp;var mp=m(()=>{G6();fp={baseRef:null,ahead:null,diff:null}});async function ZM0(Z,X,J,Q){let z;try{z=await DT()}catch(Y){throw new e0(`failed to start PTY host for ${Z.id}: ${Y instanceof Error?Y.message:String(Y)}`,"SESSION_FAILED")}try{if(Z.tab&&Z.tab!=="new"){let N=l7({command:Z.command,vendor:Z.vendor,effort:Z.modelEffort})[0];return await FT(z.rpc,Z.id,Z.tab,X,J,{engineBin:N,vendor:Z.vendor,defer:Q})}let Y=Z.tab==="new"?Cp(Z.id,Z.tabVendor,Z.tabCommand):void 0,G=Z.tabVendor??Z.vendor,$=Z.tabCommand??(Z.tabVendor?void 0:Z.command),{argv:U,sessionId:K}=d9(l7({command:$,vendor:G,effort:Z.modelEffort}),G);d$(G,X);let W=k$({task:{id:Z.id,kind:Z.kind,vendor:G,repo:Z.repo},worktreePath:X,shell:process.env.SHELL?.trim()||"/bin/zsh",argv:U,promptIntent:Z.newTask?{kind:"new-task",prompt:J}:{kind:"explicit",prompt:J},tabId:Y}),D=await OT(z.rpc,{id:Z.id,engineBin:U[0]},X,J,W,{forceNew:Y!==void 0,vendor:G,defer:Q});if(D.started&&!D.delivered&&!D.deferred)throw new e0(`failed to start hosted engine session for ${Z.id}`,"SESSION_FAILED");if(D.started&&K)if(Y)Ap(Z.id,Y,K);else gT(Z.id,K);else if(!Y)gT(Z.id);return D}catch(Y){if(Y instanceof e0)throw Y;throw new e0(`hosted engine session failed for ${Z.id}: ${Y instanceof Error?Y.message:String(Y)}`,"SESSION_FAILED")}finally{z.close()}}async function iT(Z,X,J,Q=XM0){let z=X.worktreePath;if(!z)z=(await Z.request("task.ensureWorktree",{taskId:X.id})).worktreePath;if(!z)throw new e0(`task ${X.id} has no worktree`,"NO_WORKTREE");if(X.newTask)await Z.request("task.observeLanguage",{taskId:X.id,text:J}).catch(()=>{});let Y={defer:($)=>Z.request("deferredPrompt.file",{taskId:$.taskId,tabId:$.tabId,prompt:$.prompt,layer:$.layer}).then((U)=>U.id)},G=await Q.deliverHosted(X,z,J,Y);if(!G)throw new e0(`failed to start hosted engine session for ${X.id}`,"SESSION_FAILED");return G}var XM0,XV;var JV=m(()=>{K8();lK();Wj();Nj();Hj();kT();Y2();XM0={deliverHosted:(Z,X,J,Q)=>ZM0(Z,X,J,Q)};XV={isTaskRunning:async(Z)=>(await XV.taskTabs(Z)).running,taskTabs:async(Z)=>{let X=[],J=await c$();if(J)try{X=await l$(J.rpc)}finally{J.close()}let Q;try{let{foregroundEngineIn:G,parsePsSnapshot:$,psSnapshot:U}=await Promise.resolve().then(() => (c9(),YD)),K=X.filter((W)=>W.alive&&typeof W.pid==="number"&&W.pid>0);if(K.length>0){let W=$(await U());Q=new Map(K.map((D)=>[D.key,G(W,D.pid)?.vendor??null]))}}catch{}let z={};try{z=(await Promise.resolve().then(() => (s$(),cT))).readPtyExitRecords()}catch{}let Y=Op(Z);return{tabs:Lp(Y,Z,X,z,Q),running:_p(Y,Z,X)}},deliverPrompt:(Z,X,J)=>iT(Z,X,J),resolveRepoRoot:async(Z)=>(await Promise.resolve().then(() => (h4(),gz))).resolveMainRepoRoot(Z),defaultVendor:async(Z)=>{let{getGlobalDefaultVendor:X,getRepoLastActiveVendor:J}=await Promise.resolve().then(() => (XZ(),Pp));return(Z?J(Z):void 0)??X()},readWorktreeChanges:async(Z)=>(await Promise.resolve().then(() => (t$(),vp))).readWorktreeChanges(Z),readBranchSignals:async(Z,X)=>(await Promise.resolve().then(() => (mp(),kp))).readBranchSignals(Z,X),tearDownSession:async(Z)=>{let X=await c$();if(X)try{await LT(X.rpc,NT(await l$(X.rpc),Z))}catch{}finally{X.close()}}}});var hp,up;var cp=m(()=>{WX();f8();V8();JV();Y2();hp={name:"pane-open",summary:"Open a terminal pane in a task's workspace: split the focused tab (default, or --tab's tab) or open a separate command tab, optionally running a command. Broadcast over the daemon's tab.open channel \u2014 an attached TUI showing the task performs the split. Task defaults to $ROVE_TASK_ID, then the active task. Returns the resolved `title` (the label `pane-close --title` must match \u2014 derived from the command's first word when --title is omitted) plus `clients` (attached connections; 0 = nobody performed the split).",flags:[y1.taskId(!1),{name:"tab",type:"string",placeholder:"TAB",description:"Host tab for the split (e.g. tab-3) instead of the focused tab (split placement only)."},{name:"command",type:"string",placeholder:"CMD",description:"Shell command the pane runs (via the login shell's `-ilc`, so pipes/args and your shell rc's PATH/exports work); the pane closes when it exits. Omit for an interactive shell."},{name:"direction",type:"enum",values:["right","down"],default:"right",description:"Split orientation relative to the active pane (split placement only)."},{name:"placement",type:"enum",values:["split","tab"],default:"split",description:"`split` joins the focused tab's split group; `tab` opens a separate command tab."},{name:"title",type:"string",placeholder:"TEXT",description:`Pane label (default: the command's first word, else "shell").`}],handler:async(Z)=>{let X=L5(Z),J=Z.args.str("task-id")??process.env.KOBE_TASK_ID??await MX(X);if(!J)throw new e0("no target task: pass --task-id (no $ROVE_TASK_ID, no active task)","TASK_NOT_FOUND");let Q=Z.args.str("command"),z=g8({fallback:"/bin/sh"}),Y=Q?[z,"-ilc",Q]:[z,"-il"],G=Z.args.str("title")??(Q?Q.trim().split(/\s+/)[0]??"shell":"shell"),$=Z.args.str("tab");return{...await A4(Z,"tab.open",{taskId:J,argv:Y,title:G,...$!==void 0?{tabId:$}:{},placement:Z.args.str("placement")??"split",direction:Z.args.str("direction")??"right"}),title:G}}},up={name:"pane-close",summary:"Close panes opened by pane-open: every split pane / command tab in the task whose label matches --title. Broadcast over the daemon's tab.close channel \u2014 an attached TUI showing the task performs the close (headless no-op). Task defaults to $ROVE_TASK_ID, then the active task. Returns `clients` (attached connections; 0 = nobody performed the close).",flags:[y1.taskId(!1),{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Pane label to close \u2014 the --title the pane was opened with (engine panes are never closed)."},{name:"tab",type:"string",placeholder:"TAB",description:"Scope the title match to one tab (e.g. tab-3) instead of every tab of the task."}],handler:async(Z)=>{let X=L5(Z),J=Z.args.str("task-id")??process.env.KOBE_TASK_ID??await MX(X);if(!J)throw new e0("no target task: pass --task-id (no $ROVE_TASK_ID, no active task)","TASK_NOT_FOUND");let Q=Z.args.str("tab");return A4(Z,"tab.close",{taskId:J,title:Z.args.str("title"),...Q!==void 0?{tabId:Q}:{}})}}});var nT,QV,aT,oT="DIRTY_WORKTREE",sT,rT,tT="TASK_DELETING",qQ,JM0="MAIN_CHECKOUT_DIRTY",eT,QM0="EMPTY_BRANCH",ZS,wj="EMPTY_BRANCH_DIRTY_WORKTREE",XS,zM0="LAND_CONFLICT",vj;var jX=m(()=>{nT=class nT extends Error{from;to;taskId;constructor(Z,X,J){super(`illegal transition for task ${J}: ${Z} -> ${X}`);this.from=Z;this.to=X;this.taskId=J;this.name="IllegalTransitionError"}};QV=class QV extends Error{constructor(Z){super(`task not found: ${Z}`);this.name="TaskNotFoundError"}};aT=class aT extends Error{constructor(){super("cannot delete a main task; remove the repo from saved repos instead");this.name="CannotDeleteMainTaskError"}};sT=class sT extends Error{taskId;constructor(Z){super(`${oT}: task ${Z} worktree has uncommitted or untracked changes`);this.taskId=Z;this.name="DirtyWorktreeError"}};rT=class rT extends Error{taskId;cause;constructor(Z,X){super(`failed to remove worktree for task ${Z}: ${s0(X)}`);this.taskId=Z;this.cause=X;this.name="WorktreeRemoveFailedError"}};qQ=class qQ extends Error{taskId;constructor(Z){super(`${tT}: task ${Z} is being deleted`);this.taskId=Z;this.name="TaskDeletingError"}};eT=class eT extends Error{repo;dir;constructor(Z,X){super(`${JM0}: base checkout at ${X} has uncommitted changes; commit them before landing (never git stash \u2014 the stash stack is shared by every worktree of this repo)`);this.repo=Z;this.dir=X;this.name="MainCheckoutDirtyError"}};ZS=class ZS extends Error{branch;landedOn;constructor(Z,X){super(`${QM0}: '${Z}' has no commits ahead of '${X}' \u2014 landing it would be a no-op (the worker may not have delivered anything)`);this.branch=Z;this.landedOn=X;this.name="EmptyBranchError"}};XS=class XS extends Error{branch;landedOn;worktreePath;files;constructor(Z,X,J,Q){let z=Q.length>0?Q.join(", "):"(none reported)";super(`${wj}: '${Z}' has no commits ahead of '${X}' but its worktree ${J} has uncommitted changes (${z}) \u2014 commit them in the worktree first, then land again`);this.branch=Z;this.landedOn=X;this.worktreePath=J;this.files=Q;this.name="EmptyBranchDirtyWorktreeError"}};vj=class vj extends Error{taskId;branch;files;constructor(Z,X,J){let Q=J.length>0?J.join(", "):"(none reported)";super(`${zM0}: merging '${X}' hit conflicts, merge aborted \u2014 conflicted files: ${Q}`);this.taskId=Z;this.branch=X;this.files=J;this.name="LandConflictError"}}});async function lp(Z){let X=Z.args.str("title"),J=Z.args.str("body"),Q=Z.args.str("task");if(X===void 0&&J===void 0&&Q===void 0)throw new e0("issue-update requires --title, --body, and/or --task","MISSING_FLAG");let z=Z.args.requirePath("repo"),Y=Z.args.int("id"),G;if(X!==void 0||J!==void 0)G=await A4(Z,"issue.mutate",{repoRoot:z,op:{type:"update",id:Y,title:X,body:J}});if(Q!==void 0)G=await A4(Z,"issue.mutate",{repoRoot:z,op:Q==="none"?{type:"unlink",id:Y}:{type:"link",id:Y,taskId:Q}});return G}async function $M0(Z,X,J){if(X.args.bool("allow-empty"))return;if(!/^\s*succeeded\s*[:\uff1a]/i.test(J))return;let Q=await p$();if(!Q)return;let z;try{z=(await Z.request("task.get",{taskId:Q.taskId})).task}catch{return}if(z.kind==="main"||z.kind==="dir")return;if(!z.worktreePath)return;let Y;try{Y=(await X.runtime.readBranchSignals(z.worktreePath)).ahead}catch{return}if(Y!==0)return;let G=z.branch||"your branch";throw new e0(`refusing to report success: ${G} has 0 commits \u2014 "succeeded" means COMMITTED, and this report would reach the coordinator as a clean success with nothing to land`,"EMPTY_SUCCESS_REPORT",{taskId:Q.taskId,branch:G,hint:"commit your work with a real message and send again \u2014 or, if this task genuinely produced no commits (an investigation or a review), re-send with --allow-empty to say so explicitly",nextCommandArgs:["api","send","--allow-empty","--prompt",J]})}async function pp(Z){let X=L5(Z),J=Z.args.require("prompt"),Q=Z.args.str("tab");if(Q&&Q!=="new"&&!/^tab-[A-Za-z0-9-]+$/.test(Q))throw new e0(`--tab must be "new" or a tab id like tab-2 (got ${JSON.stringify(Q)})`,"BAD_TAB");let z=Z.args.str("command");if(z&&Q!=="new")throw new e0(`--command only applies to a new tab; pass --tab new (got --tab ${Q??"<canonical>"})`,"BAD_FLAG",W3("send"));let Y=z?p9(z):void 0,G=Z.args.str("task-id");if(!G){let W=await kl(X);if(W){if(G=W.taskId,Q===void 0)Q=await ml(Z.runtime,W)}else{let D=await MX(X);if(!D)throw new e0("no --task-id given and no active task \u2014 open a task first or pass --task-id","MISSING_TARGET");G=D}}let $=await X.request("task.get",{taskId:G});await $M0(X,Z,J);let U=Z.args.bool("plain")?J:await Kj(X,G,J),K=await Z.runtime.deliverPrompt(X,{id:G,worktreePath:$.task.worktreePath,kind:$.task.kind,vendor:$.task.vendor,command:$.task.command,modelEffort:z?void 0:$.task.modelEffort,repo:$.task.repo,tab:Q,tabVendor:Y,tabCommand:z},U);if(!K.delivered&&!K.deferred)throw new e0(`prompt was not confirmed in ${G}'s engine (paste did not land)`,"NOT_DELIVERED");return{ok:!0,taskId:G,session:K.session,started:K.started,engineReady:K.engineReady,...K.deferred?{deferred:K.deferred,delivered:!1}:{}}}async function qM0(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.require("prompt"),z=Z.args.str("tab"),Y=await X.request("session.deliver",{taskId:J,text:Q,...z!==void 0?{tabId:z}:{},source:"dispatcher"});return{ok:!0,taskId:J,...z!==void 0?{tabId:z}:{},routed:"session.deliver",...Y?.clients!==void 0?{clients:Y.clients}:{}}}async function ip(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.require("text");return await X.request("note.file",{taskId:J,text:Q})}async function np(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=await X.request("task.get",{taskId:J}),{tabs:z,running:Y}=await Z.runtime.taskTabs(J);return{task:Q.task,running:Y,tabs:z}}async function ap(Z){return L5(Z).request("task.list")}async function op(Z){let X=L5(Z),Q=Z.args.bool("none")?null:Z.args.require("task-id");return await X.request("task.setActive",{taskId:Q}),{ok:!0,activeTaskId:Q}}async function sp(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.bool("force")??!1,z=Z.args.bool("delete-branch")??!1,Y=await p$(),G=await X.request("task.delete",{taskId:J,force:Q,deleteBranch:z,...Y?{requestedByTaskId:Y.taskId,requestedByTabId:Y.tabId}:{}});if(await Z.runtime.tearDownSession(J),!G.queued)return{...G,status:"not_found"};if(!Z.args.bool("wait"))return{...G,status:"queued"};return{...G,...await HM0(X,J)}}async function HM0(Z,X){let J=Date.now()+YM0;for(;;){let{tasks:Q}=await Z.request("task.list"),z=Q.find((G)=>G.id===X);if(!z)return{status:"removed"};let Y=z.deletion;if(Y?.phase==="error")return{status:"failed",error:Y.error??"worktree removal failed"};if(Date.now()>=J)return{status:"pending"};await new Promise((G)=>setTimeout(G,GM0))}}async function rp(Z){let X=L5(Z),J=Z.args.require("task-id"),Q=Z.args.str("strategy")==="squash"?"squash":"merge",z;try{z=await X.request("task.land",{taskId:J,strategy:Q,deleteBranch:Z.args.bool("delete-branch")??!1,removeWorktree:Z.args.bool("remove-worktree"),callerCwd:process.cwd()})}catch(Y){throw UM0(Y,J)}return{ok:!0,taskId:J,...z.result}}function UM0(Z,X){let J=s0(Z);if(!J.includes(wj))return Z;let Q=/EMPTY_BRANCH_DIRTY_WORKTREE: '([^']+)'/.exec(J)?.[1]??"your task branch";return new e0(J,wj,{hint:"the worker wrote files but never committed them \u2014 send it back to commit its own work, then land again",nextCommandArgs:["api","send","--task-id",X,"--prompt",`your work is uncommitted on ${Q} \u2014 commit it yourself with a proper message, then report back`]})}async function tp(Z){let X=L5(Z),{args:J}=Z,Q={repo:J.requirePath("repo"),worktreePath:J.requirePath("worktree")},z=J.str("branch");if(z)Q.branch=z;let Y=J.str("command");if(Y)Q.command=Y,Q.vendor=p9(Y);let G=J.str("title");if(G)Q.title=G;return X.request("worktree.adopt",Q)}var YM0=60000,GM0=250,dp;var e$=m(()=>{K8();jX();Vj();f8();V8();JV();Y2();dp={name:"dispatch",summary:"Route text into a task's live session via the daemon's session.deliver channel. The dispatcher's messenger (docs/design/dispatcher.md); unlike `send`, it requires an already-hosted session.",flags:[y1.taskId(!0),y1.prompt(!0,"Text delivered into the task's engine session."),{name:"tab",type:"string",required:!1,placeholder:"TAB",description:"Deliver into exactly this tab (e.g. tab-3) instead of the canonical engine tab."}],handler:qM0}});var ep;var Zd=m(()=>{f8();V8();cp();e$();ep=[{name:"send",summary:"Paste a follow-up prompt into a task's running engine (one full turn). Without --task-id, a task spawned from another Rove session replies to its dispatcher's tab (then that task's live canonical engine; nothing alive = DISPATCHER_UNREACHABLE, never a silent spawn); otherwise the active task. Sent from inside another Rove task ($ROVE_TASK_ID), the prompt is prefixed with [ROVE PEER] provenance \u2014 who sent it and how to reply (tab-precise) \u2014 so agent-to-agent messaging needs no coordinator. When the target composer is busy (you'd paste into a half-typed message), the prompt is accepted-but-deferred: the daemon stores it and queues a `prompt_deferred` Inbox episode for a human to release \u2014 that outcome is a SUCCESS (exit 0, `deferred` in the JSON). Do NOT retry a deferred send: the daemon already owns the message, and resending stacks a duplicate in the queue. A `succeeded:` report sent from a managed task whose branch has 0 commits is REFUSED (EMPTY_SUCCESS_REPORT) \u2014 commit first, or pass --allow-empty when the task genuinely produced no commits.",flags:[y1.taskId(!1),y1.prompt(!0,"Text pasted + submitted into the engine pane."),{name:"tab",type:"string",required:!1,placeholder:"TAB",description:'Tab addressing: "new" spawns the prompt in a fresh engine tab; "tab-N" delivers to that exact alive tab (error when dead/absent). Omitted = the canonical engine tab.'},{...y1.command(),description:"Engine launch command for a `--tab new` tab \u2014 the API twin of the TUI's ctrl+e pick. Lets one worktree run two agents on the same files (e.g. hand the stuck work to codex without leaving the branch). An engine id from `engine-list` or a full command line; pinned to that tab, so it survives restarts and a later set-command on the task. Only valid with --tab new."},{name:"plain",type:"bool",required:!1,description:"Deliver the prompt verbatim \u2014 skip the [ROVE PEER] provenance prefix."},{name:"allow-empty",type:"bool",required:!1,description:"Report success from a task with zero commits (EMPTY_SUCCESS_REPORT is refused otherwise). For work that legitimately produces no commits \u2014 an investigation, a review, a question answered."}],handler:pp},dp,{name:"note",summary:"File a one-line field note \u2014 a resolved, repo-level gotcha worth sharing. Appended to the repo's durable note store (every future session on this repo starts with it) and forwarded to the dispatcher session for live relay (docs/design/dispatcher.md).",flags:[y1.taskId(!0),{name:"text",type:"string",required:!0,placeholder:"TEXT",description:"One line: the verified conclusion another session could act on."}],handler:ip},{name:"note-list",summary:"Read a repo's accumulated field notes, newest first. Returns { notes }.",flags:[y1.repo(!0)],handler:(Z)=>A4(Z,"note.list",{repo:Z.args.requirePath("repo")})},hp,up,{name:"notify",summary:"Show a toast in every attached Rove UI \u2014 broadcast over the daemon's notice.event channel. Agents/scripts use it to surface 'done / needs input / error' moments without touching the task's session. Returns `clients` (attached connections; 0 = no UI showed the toast).",flags:[{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Toast text (one line)."},{name:"kind",type:"string",default:"done",placeholder:"KIND",description:`Free-form kind tag. "done", "needs_input" and "error" get the TUI's severity styling/unread mark; any other value renders neutrally.`},y1.taskId(!1),{name:"source",type:"string",placeholder:"TAG",description:"Free-form origin tag (e.g. an agent name) recorded on the event."}],handler:async(Z)=>{return A4(Z,"notice.send",{title:Z.args.str("title"),kind:Z.args.str("kind")??"done",taskId:Z.args.str("task-id"),source:Z.args.str("source")})}},{name:"prompt",summary:"Ask the human for a line of text through the attached TUI's input dialog (plugins' host-provided prompt). Blocks until answered, cancelled, or timed out; returns { value } or { cancelled, reason }.",flags:[{name:"title",type:"string",required:!0,placeholder:"TEXT",description:"Dialog title (shown verbatim)."},{name:"placeholder",type:"string",placeholder:"TEXT",description:"Input placeholder."},{name:"initial",type:"string",placeholder:"TEXT",description:"Pre-filled input value."},{name:"timeout",type:"string",placeholder:"MS",description:"Give up after this many milliseconds (default 120000, max 600000)."}],handler:async(Z)=>{let X=Z.args.str("timeout"),J=X?Number.parseInt(X,10):void 0;return A4(Z,"ui.prompt",{title:Z.args.str("title"),placeholder:Z.args.str("placeholder"),initial:Z.args.str("initial"),...J&&Number.isFinite(J)?{timeoutMs:J}:{}})}},{name:"engine-report",summary:"Report a normalized engine-activity verb for a task \u2014 the public face of the same engine.reportEvent RPC the built-in hook adapters use. Lets a plugin-contributed engine (or any wrapper script) drive the sidebar badge, attention inbox, and plugin event stream without a built-in hook adapter. Kinds: session-start|turn-start|turn-complete|turn-failed|turn-interrupted|awaiting-input|session-end (state kinds) plus tool-pre|tool-post|tool-failed|pre-compact|post-compact|subagent-start|subagent-stop (plugin-only).",flags:[y1.taskId(!1),{name:"kind",type:"string",required:!0,placeholder:"KIND",description:"Normalized activity verb (see summary). Unknown kinds are rejected."},{name:"engine",type:"string",placeholder:"ID",description:"Engine id producing the report (a plugin engine id, or a built-in vendor)."},{name:"tab",type:"string",placeholder:"TAB",description:"Terminal tab id the session runs in (defaults to $ROVE_TAB_ID / $KOBE_TAB_ID)."},{name:"detail",type:"string",placeholder:"JSON",description:`Optional detail JSON, e.g. '{"failure":"rate_limit"}' or '{"waiting":"input"}'.`}],handler:async(Z)=>{let X=Z.args.str("task-id")??process.env.ROVE_TASK_ID??process.env.KOBE_TASK_ID,J=Z.args.str("tab")??process.env.ROVE_TAB_ID??process.env.KOBE_TAB_ID,Q=Z.args.str("detail"),z;if(Q!==void 0)try{z=JSON.parse(Q)}catch{throw Error("--detail must be valid JSON")}return A4(Z,"engine.reportEvent",{kind:Z.args.str("kind"),...X?{taskId:X}:{cwd:process.cwd()},...Z.args.str("engine")?{engine:Z.args.str("engine")}:{},...J?{tabId:J}:{},...z!==void 0?{detail:z}:{}})}},{name:"set-active",summary:"Set the shared active task (the focus every Tasks pane highlights). Pass --none to clear.",flags:[y1.taskId(!1),{name:"none",type:"bool",description:"Clear the active task instead of setting one."}],handler:op}]});var Xd;var Jd=m(()=>{f8();V8();_R();CT();Xd=[{name:"rename",summary:"Set a task's title.",flags:[y1.taskId(),{name:"title",type:"string",required:!0,placeholder:"T",description:"New title."}],handler:(Z)=>A4(Z,"task.rename",{taskId:Z.args.require("task-id"),title:Z.args.require("title")})},{name:"set-branch",summary:"Rename a task's branch (git branch -m if materialized, else recorded).",flags:[y1.taskId(),{name:"branch",type:"string",required:!0,placeholder:"B",description:"New branch name."}],handler:(Z)=>A4(Z,"task.setBranch",{taskId:Z.args.require("task-id"),branch:Z.args.require("branch")})},ah,{name:"set-status",summary:"Set a task's lifecycle LABEL. Cosmetic \u2014 the task row, its worktree, its branch and its engine session all stay exactly as they are, so `--status canceled` does NOT close, stop, or clean up anything. To end a task use `delete` (which keeps the git branch).",flags:[y1.taskId(),{name:"status",type:"enum",required:!0,values:Bj,description:"New status."}],handler:(Z)=>A4(Z,"task.status",{taskId:Z.args.require("task-id"),status:Z.args.requireEnum("status")})}]});import{spawnSync as KM0}from"child_process";function WM0(Z){let[X,J]=Z.split("/");if(!X||!J)throw Error(`invalid GitHub repository slug: ${Z}`);return{owner:X,name:J}}function Qd(Z,X){let J=Z.trim();if(!J)throw Error(`${X} is required`);return J}function zd(Z,X){let J=X?.map((Q)=>typeof Q.message==="string"?Q.message:null).filter((Q)=>!!Q);if(J&&J.length>0)return J.join("; ");return Z.trim()||"GitHub CLI returned an empty response"}function Yd(Z,X,J){let Q=["api","graphql","-f",`query=${Z}`];for(let[U,K]of Object.entries(X))Q.push("-f",`${U}=${K}`);let z=J.spawn("gh",Q,{encoding:"utf8"});if(z.error)throw Error(`failed to run gh: ${z.error.message}`);let Y=typeof z.stdout==="string"?z.stdout:String(z.stdout??""),G=typeof z.stderr==="string"?z.stderr:String(z.stderr??""),$;try{$=JSON.parse(Y)}catch{throw Error(`failed to parse gh response: ${zd(G,void 0)}`)}if((z.status??0)!==0||$.errors?.length)throw Error(zd(G,$.errors));if(!$.data)throw Error("GitHub CLI response did not include data");return $.data}function MM0(Z){return`${Z}
371
371
 
372
372
  ---
373
373
  Submitted from Rove ${n1}.`}function Zq(Z,X={}){let J=Qd(Z.title,"feedback title"),Q=MM0(Qd(Z.body,"feedback body")),z=(X.repoSlug??dz)();if(!z)throw Error("package repository is not a GitHub repository");let{owner:Y,name:G}=WM0(z),$=Z.categorySlug?.trim()||JS,U={spawn:X.spawn??KM0},W=Yd(VM0,{owner:Y,name:G},U).repository,D=W?.id;if(!D)throw Error(`GitHub repository not found: ${z}`);let N=W.discussionCategories?.nodes?.find((_)=>_.slug===$);if(!N)throw Error(`GitHub Discussion category not found: ${$}`);let C=Yd(BM0,{repositoryId:D,categoryId:N.id,title:J,body:Q},U).createDiscussion?.discussion;if(!C?.url||typeof C.number!=="number")throw Error("GitHub did not return the created Discussion");return{number:C.number,url:C.url}}var JS="feedback",VM0=`