@sma1lboy/rove 0.9.153 → 0.9.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/{chunk-pdh5w4ht.js → chunk-0dqdymwa.js} +1 -1
- package/dist/cli/{chunk-ybv02fyn.js → chunk-0ehnq0kz.js} +10 -9
- package/dist/cli/{chunk-2kvvykg1.js → chunk-0pfrfrd1.js} +1 -1
- package/dist/cli/chunk-116dnbbd.js +2 -0
- package/dist/cli/{chunk-86bjqmg1.js → chunk-1760hrgn.js} +1 -1
- package/dist/cli/chunk-1re31mma.js +2 -0
- package/dist/cli/{chunk-9zb2wkfr.js → chunk-25hxhtdr.js} +1 -1
- package/dist/cli/chunk-2nadch8n.js +2 -0
- package/dist/cli/{chunk-5bn91n19.js → chunk-2vgmx7rh.js} +1 -1
- package/dist/cli/{chunk-73qrq7bg.js → chunk-32h9htyh.js} +1 -1
- package/dist/cli/{chunk-aeq5xmtq.js → chunk-3ntf6q51.js} +1 -1
- package/dist/cli/{chunk-s8eh3cf1.js → chunk-3wj69b0a.js} +1 -1
- package/dist/cli/{chunk-q2p5cnse.js → chunk-3xh813fz.js} +1 -1
- package/dist/cli/{chunk-7z9cqycv.js → chunk-4gjr08g0.js} +1 -1
- package/dist/cli/chunk-4pmd0mxp.js +4 -0
- package/dist/cli/chunk-4q1mkrp4.js +10 -0
- package/dist/cli/chunk-4rfdprnn.js +2 -0
- package/dist/cli/{chunk-qdp0w20h.js → chunk-53c27xa8.js} +1 -1
- package/dist/cli/{chunk-ke95ebrz.js → chunk-5f80ggc3.js} +1 -1
- package/dist/cli/{chunk-tw2t78nk.js → chunk-5hc2959x.js} +2 -2
- package/dist/cli/{chunk-rsqx358z.js → chunk-5v893waj.js} +1 -1
- package/dist/cli/{chunk-7gy0rnrs.js → chunk-5w9s18qb.js} +1 -1
- package/dist/cli/{chunk-6s6pne9d.js → chunk-5x7bqhp7.js} +1 -1
- package/dist/cli/{chunk-8gsqypg8.js → chunk-6123622n.js} +2 -2
- package/dist/cli/chunk-624j6yb8.js +2 -0
- package/dist/cli/{chunk-3gvqnsty.js → chunk-6aa78w6b.js} +3 -3
- package/dist/cli/{chunk-5snrwe65.js → chunk-6pt23vas.js} +1 -1
- package/dist/cli/{chunk-81cysjk5.js → chunk-85t004k4.js} +1 -1
- package/dist/cli/chunk-8kaqpb7t.js +2 -0
- package/dist/cli/{chunk-efdphna5.js → chunk-92yjtx23.js} +2 -2
- package/dist/cli/{chunk-gc25wht3.js → chunk-aak5ttgt.js} +1 -1
- package/dist/cli/{chunk-7s82zpcv.js → chunk-acz5t040.js} +1 -1
- package/dist/cli/{chunk-nywh3yb9.js → chunk-axfn4f28.js} +1 -1
- package/dist/cli/chunk-b0b0ej4m.js +2 -0
- package/dist/cli/{chunk-8r1pnch1.js → chunk-bwyskwer.js} +1 -1
- package/dist/cli/{chunk-51y7sjhe.js → chunk-c43g3qcb.js} +1 -1
- package/dist/cli/{chunk-xtr7ks02.js → chunk-c9zxw37m.js} +1 -1
- package/dist/cli/{chunk-56m4hk0p.js → chunk-cad0kv20.js} +1 -1
- package/dist/cli/chunk-caqpt09m.js +3 -0
- package/dist/cli/{chunk-07k2njwk.js → chunk-ch9b1d5y.js} +1 -1
- package/dist/cli/chunk-d17zkmw9.js +4 -0
- package/dist/cli/{chunk-dv7rxr77.js → chunk-dd93y7gx.js} +1 -1
- package/dist/cli/{chunk-2z90jxcn.js → chunk-de751t37.js} +1 -1
- package/dist/cli/chunk-de7wzktx.js +2 -0
- package/dist/cli/{chunk-37gnmm2m.js → chunk-ds9qf1w1.js} +1 -1
- package/dist/cli/{chunk-svpn3av1.js → chunk-e17gszac.js} +1 -1
- package/dist/cli/{chunk-nm802jgt.js → chunk-e18sn615.js} +1 -1
- package/dist/cli/chunk-ekgcpkcs.js +3 -0
- package/dist/cli/{chunk-8ad0ba2n.js → chunk-esk240e5.js} +2 -2
- package/dist/cli/{chunk-yshnare4.js → chunk-exggdhpt.js} +1 -1
- package/dist/cli/{chunk-cb2fpajx.js → chunk-g56kvet6.js} +1 -1
- package/dist/cli/{chunk-z83wxkg6.js → chunk-g90z5s39.js} +2 -2
- package/dist/cli/{chunk-9gz7jmgq.js → chunk-gkfd073t.js} +1 -1
- package/dist/cli/{chunk-z2aqaabp.js → chunk-h82956f7.js} +1 -1
- package/dist/cli/{chunk-ap5bjaq8.js → chunk-j1fvzjc1.js} +1 -1
- package/dist/cli/{chunk-grh6dvfv.js → chunk-k2ckx8zw.js} +1 -1
- package/dist/cli/chunk-k3mjej0g.js +2 -0
- package/dist/cli/{chunk-90wcrcj5.js → chunk-k9ev77fp.js} +2 -2
- package/dist/cli/{chunk-c6mthex1.js → chunk-ksbvcxc3.js} +1 -1
- package/dist/cli/{chunk-deejtpcr.js → chunk-kt1ppyje.js} +1 -1
- package/dist/cli/{chunk-v9p6gxm0.js → chunk-m8v407e1.js} +1 -1
- package/dist/cli/{chunk-vpzvcxc1.js → chunk-max057d8.js} +1 -1
- package/dist/cli/chunk-mcdv19rs.js +3 -0
- package/dist/cli/{chunk-dgsrf048.js → chunk-mh0nwzma.js} +4 -4
- package/dist/cli/chunk-mhs6yywx.js +2 -0
- package/dist/cli/{chunk-z4c6bmw0.js → chunk-mkkp4c5t.js} +2 -2
- package/dist/cli/{chunk-d809qqsk.js → chunk-mp8v5gn8.js} +1 -1
- package/dist/cli/{chunk-4wwx51m5.js → chunk-mqqnk8w7.js} +1 -1
- package/dist/cli/chunk-mr790xv9.js +2 -0
- package/dist/cli/{chunk-4tzgma89.js → chunk-msr1xtay.js} +1 -1
- package/dist/cli/chunk-mw8mjcg3.js +2 -0
- package/dist/cli/{chunk-g5nz190n.js → chunk-n7n12868.js} +1 -1
- package/dist/cli/{chunk-31crt0e4.js → chunk-nhexcv3a.js} +1 -1
- package/dist/cli/{chunk-mb5m7ex7.js → chunk-nhpfz161.js} +1 -1
- package/dist/cli/{chunk-ed1y1wtm.js → chunk-nqqtnvf7.js} +3 -3
- package/dist/cli/{chunk-e8493db0.js → chunk-nt525m04.js} +1 -1
- package/dist/cli/{chunk-kd870mfy.js → chunk-nt7zs4wd.js} +1 -1
- package/dist/cli/chunk-nx7ahbsg.js +2 -0
- package/dist/cli/{chunk-yk2ha5yj.js → chunk-nyv7a76k.js} +1 -1
- package/dist/cli/{chunk-ef11h2am.js → chunk-p7s4xwgx.js} +1 -1
- package/dist/cli/{chunk-rkt1qjec.js → chunk-ptjc5mtc.js} +1 -1
- package/dist/cli/{chunk-dwfv6dxg.js → chunk-q2tfsp59.js} +1 -1
- package/dist/cli/{chunk-y9ksfpbp.js → chunk-qed3p2s0.js} +1 -1
- package/dist/cli/{chunk-zaxdx0wd.js → chunk-qgd78nwt.js} +1 -1
- package/dist/cli/{chunk-4c220qpj.js → chunk-qv64n4v7.js} +4 -4
- package/dist/cli/chunk-r05r01nv.js +3 -0
- package/dist/cli/{chunk-x7ssay77.js → chunk-r3ev6gtj.js} +2 -2
- package/dist/cli/{chunk-3bfm4hrs.js → chunk-r3k9rbwm.js} +1 -1
- package/dist/cli/chunk-r639wna1.js +2 -0
- package/dist/cli/chunk-rc668r26.js +2 -0
- package/dist/cli/{chunk-fd7swjnq.js → chunk-s1ngmmg3.js} +1 -1
- package/dist/cli/{chunk-5wzap7r2.js → chunk-s83t3w1e.js} +1 -1
- package/dist/cli/{chunk-45j1qqdf.js → chunk-s9ts2h6w.js} +1 -1
- package/dist/cli/{chunk-ea1r26pa.js → chunk-sfv15era.js} +1 -1
- package/dist/cli/{chunk-z1e1bsv5.js → chunk-t27t2x9b.js} +1 -1
- package/dist/cli/{chunk-c1xp9qx6.js → chunk-t3z4etp5.js} +1 -1
- package/dist/cli/{chunk-mmd7zehs.js → chunk-t7xhb2jx.js} +1 -1
- package/dist/cli/{chunk-1a7ctg07.js → chunk-t9w68ha3.js} +1 -1
- package/dist/cli/{chunk-a4h476hv.js → chunk-vj2vdx3w.js} +1 -1
- package/dist/cli/chunk-wn2d39a2.js +2 -0
- package/dist/cli/{chunk-xjskp76m.js → chunk-xkg5kbgm.js} +1 -1
- package/dist/cli/{chunk-d393z1mj.js → chunk-xt3wcpsd.js} +1 -1
- package/dist/cli/{chunk-79gqh5p2.js → chunk-xxn3m0z5.js} +1 -1
- package/dist/cli/{chunk-h5jhdjv7.js → chunk-yfy6031g.js} +1 -1
- package/dist/cli/{chunk-ewdhz3dv.js → chunk-yhwb91e4.js} +1 -1
- package/dist/cli/{chunk-pxtx1gcf.js → chunk-yts6vqd3.js} +1 -1
- package/dist/cli/{chunk-5c3d1y0r.js → chunk-zd3wmj4d.js} +1 -1
- package/dist/cli/{chunk-b9h2ywc7.js → chunk-zqfbyq0a.js} +1 -1
- package/dist/cli/{chunk-2wdnqzbf.js → chunk-ztkmwsn3.js} +4 -4
- package/dist/cli/index.js +7 -7
- package/dist/cli/kobe-run.js +1 -1
- package/dist/cli/kobe.js +6 -6
- package/dist/cli/pty-host-node.mjs +6 -6
- package/dist/cli/rove-run.js +1 -1
- package/dist/cli/rove.js +6 -6
- package/package.json +1 -1
- package/dist/cli/chunk-4gaqhq8t.js +0 -2
- package/dist/cli/chunk-55s4zykj.js +0 -2
- package/dist/cli/chunk-5hjs0374.js +0 -2
- package/dist/cli/chunk-6t2zhxmq.js +0 -2
- package/dist/cli/chunk-7h7tqran.js +0 -2
- package/dist/cli/chunk-81h96pha.js +0 -2
- package/dist/cli/chunk-8ddjfc2v.js +0 -4
- package/dist/cli/chunk-9j7507ap.js +0 -2
- package/dist/cli/chunk-aq912vvw.js +0 -3
- package/dist/cli/chunk-arf294te.js +0 -2
- package/dist/cli/chunk-evmfa4v5.js +0 -2
- package/dist/cli/chunk-fna6sxe4.js +0 -5
- package/dist/cli/chunk-j1a890dg.js +0 -2
- package/dist/cli/chunk-j2j1kq3m.js +0 -2
- package/dist/cli/chunk-kpf3yaj9.js +0 -3
- package/dist/cli/chunk-m6n0mkye.js +0 -2
- package/dist/cli/chunk-makzf3q1.js +0 -9
- package/dist/cli/chunk-nzy3yafz.js +0 -2
- package/dist/cli/chunk-p8hzr9m6.js +0 -2
- package/dist/cli/chunk-r94jdy8g.js +0 -2
- package/dist/cli/chunk-sexavazm.js +0 -3
- package/dist/cli/chunk-x760j10f.js +0 -3
- package/dist/cli/chunk-xve4g8ct.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{terminalRows}from"./chunk-rxvbm4vt.js";import{defaultPtyExitsPath}from"./chunk-
|
|
2
|
+
import{terminalRows}from"./chunk-rxvbm4vt.js";import{defaultPtyExitsPath}from"./chunk-mcdv19rs.js";import{randomUUID}from"crypto";import{mkdirSync,readFileSync,renameSync,writeFileSync}from"fs";import{dirname}from"path";var MAX_RECORDS=50,TAIL_LINES=40,TAIL_LINE_CHARS=500;function plainTail(raw){let lines=terminalRows(raw,TAIL_LINE_CHARS);while(lines.length>0&&(lines[lines.length-1]??"").trim()==="")lines.pop();return lines.slice(-TAIL_LINES)}function engineExitCodeFromTail(tail){for(let i=tail.length-1;i>=0;i--){let m=ENGINE_EXIT_BANNER.exec(tail[i]??"");if(m?.[1])return Number.parseInt(m[1],10)}return null}var ENGINE_EXIT_BANNER=/Engine exited \(code (\d+)\)/;function readPtyExitStore(path=defaultPtyExitsPath()){let read=(status,records={})=>({records,status,readable:status==="ok"||status==="absent"}),raw;try{raw=readFileSync(path,"utf8")}catch(err){return read(err.code==="ENOENT"?"absent":"unreadable")}try{let parsed=JSON.parse(raw);if(parsed===null||typeof parsed!=="object"||Array.isArray(parsed))return read("unparsable");return read("ok",parsed)}catch{return read("unparsable")}}function readPtyExitRecords(path=defaultPtyExitsPath()){return readPtyExitStore(path).records}function recordPtyExit(info,path=defaultPtyExitsPath()){if(info.key.startsWith("::"))return;if(info.exit.code===0&&info.exit.signal===null)return;let tail=plainTail(info.tail);writeRecord(info.key,{key:info.key,pid:info.pid,code:info.exit.code??engineExitCodeFromTail(tail),signal:info.exit.signal,at:info.exit.at,tail,layer:"pty"},path)}function recordEngineExit(info,path=defaultPtyExitsPath()){if(info.key.startsWith("::"))return;let tail=plainTail(info.tail);writeRecord(`${info.key}#engine`,{key:info.key,pid:info.pid,code:engineExitCodeFromTail(tail),signal:null,at:info.at,tail,layer:"engine",...info.vendor?{vendor:info.vendor}:{},...info.atApproximate?{atApproximate:!0}:{},parentAlive:!0},path)}function writeRecord(storeKey,record,path){let store=readPtyExitStore(path);if(store.status==="unreadable")throw Error(`pty-exits store is unreadable (${path}) \u2014 refusing to overwrite it`);let records=store.records;records[storeKey]=record;let newest=Object.entries(records).sort(([,a],[,b])=>a.at<b.at?1:-1).slice(0,MAX_RECORDS);mkdirSync(dirname(path),{recursive:!0});let tmp=`${path}.tmp-${process.pid}-${randomUUID()}`;writeFileSync(tmp,JSON.stringify(Object.fromEntries(newest),null,2),{encoding:"utf8",mode:384}),renameSync(tmp,path)}
|
|
3
3
|
export{plainTail,engineExitCodeFromTail,ENGINE_EXIT_BANNER,readPtyExitStore,readPtyExitRecords,recordPtyExit,recordEngineExit};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{migrateRoveClientStateLayout}from"./chunk-
|
|
2
|
+
import{migrateRoveClientStateLayout}from"./chunk-4pmd0mxp.js";import{LEGACY_KOBE_PRODUCT_NAME,ROVE_PRODUCT_NAME}from"./chunk-g56kvet6.js";import{installRoveEnvCompatibility}from"./chunk-r3k9rbwm.js";var INVOKED_AS_ENV="ROVE_INVOKED_AS";function markRoveInvocation(env=process.env){env[INVOKED_AS_ENV]=ROVE_PRODUCT_NAME}function markKobeInvocation(env=process.env){env[INVOKED_AS_ENV]=LEGACY_KOBE_PRODUCT_NAME}function prepareCliEnvironment(env=process.env){installRoveEnvCompatibility(env)}function prepareCliStateLayout(env=process.env){let result=migrateRoveClientStateLayout(env);for(let warning of result.warnings)console.error(`[rove] state migration will retry: ${warning}`)}function activeCliName(env=process.env){return env[INVOKED_AS_ENV]===ROVE_PRODUCT_NAME?ROVE_PRODUCT_NAME:LEGACY_KOBE_PRODUCT_NAME}
|
|
3
3
|
export{markRoveInvocation,markKobeInvocation,prepareCliEnvironment,prepareCliStateLayout,activeCliName};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defaultEngineCommand,engineCommandKey,engineDisplayName,interactiveEngineCommand,parseEngineCommand,withEngineEffort,withEngineTerminalTitle}from"./chunk-
|
|
2
|
+
import{defaultEngineCommand,engineCommandKey,engineDisplayName,interactiveEngineCommand,parseEngineCommand,withEngineEffort,withEngineTerminalTitle}from"./chunk-de751t37.js";import{vendorFromArgv}from"./chunk-n7n12868.js";import{engineEntry}from"./chunk-4gjr08g0.js";import{isContribEngine}from"./chunk-sfv15era.js";import{getCustomEngineIds,getPersistedString}from"./chunk-kt1ppyje.js";import{BUILTIN_VENDORS,isBuiltinVendor}from"./chunk-bq3fyc0p.js";import{randomUUID}from"crypto";function hasFlag(argv,flag){return argv.some((a)=>a===flag||a.startsWith(`${flag}=`))}function controlsOwnSession(identity,argv){return(identity?.sessionControlFlags??[]).some((flag)=>hasFlag(argv,flag))}function pinSessionArgv(identity,argv,sessionId){if(!identity?.pinFlag)return argv;if(controlsOwnSession(identity,argv))return argv;return[...argv,identity.pinFlag,sessionId]}function acceptsPinnedSession(identity,argv){return!!identity?.pinFlag&&!controlsOwnSession(identity,argv)}function resumeSessionArgv(identity,base,sessionId){if(!sessionId||!identity?.resumeArgv)return null;if(controlsOwnSession(identity,base))return null;return identity.resumeArgv(base,sessionId)}function pickUnclaimedSessionId(ids,claimed){for(let i=ids.length-1;i>=0;i--){let id=ids[i];if(id&&!claimed.has(id))return id}return null}function forkSessionArgvFor(identity,base,sourceId,newId){if(!sourceId||!identity?.forkArgv)return null;if(controlsOwnSession(identity,base))return null;return identity.forkArgv(base,sourceId,newId)}function acceptsSessionFork(identity){return!!identity?.forkArgv}var GENERIC_PROTOCOL="generic",ENGINE_PROTOCOLS=BUILTIN_VENDORS;function engineProtocolKey(id){return`engineProtocol.${id}`}function getEngineProtocol(id){if(isBuiltinVendor(id)||isContribEngine(id))return id;let raw=getPersistedString(engineProtocolKey(id))?.trim();return raw&&ENGINE_PROTOCOLS.includes(raw)?raw:void 0}function isPresetId(id){return isBuiltinVendor(id)||isContribEngine(id)||getCustomEngineIds().includes(id)}function listPresetIds(){return[...BUILTIN_VENDORS,...getCustomEngineIds()]}function describePreset(id){let command=getPersistedString(engineCommandKey(id))?.trim()||defaultEngineCommand(id).join(" ");return{id,name:engineDisplayName(id),command,protocol:getEngineProtocol(id)??GENERIC_PROTOCOL,builtin:isBuiltinVendor(id)}}function listEnginePresets(){return listPresetIds().map(describePreset)}function resolveCommandProtocol(command){let trimmed=command?.trim();if(!trimmed)return GENERIC_PROTOCOL;if(isPresetId(trimmed))return getEngineProtocol(trimmed)??GENERIC_PROTOCOL;let fromArgv=vendorFromArgv(trimmed);if(fromArgv)return fromArgv;let argv0=parseEngineCommand(trimmed)[0];if(argv0)for(let id of getCustomEngineIds()){let preset=getPersistedString(engineCommandKey(id))?.trim();if(preset&&parseEngineCommand(preset)[0]===argv0)return getEngineProtocol(id)??GENERIC_PROTOCOL}return GENERIC_PROTOCOL}function engineLaunchArgv(spec){let command=spec.command?.trim();if(!command)return interactiveEngineCommand(spec.vendor,spec.effort);let vendor=(isPresetId(command)?getEngineProtocol(command):void 0)??resolveCommandProtocol(command),base=isPresetId(command)?presetBaseArgv(command):(()=>{let argv=parseEngineCommand(command);return argv.length>0?argv:null})();if(!base)return interactiveEngineCommand(spec.vendor,spec.effort);return withEngineTerminalTitle(withEngineEffort(base,vendor,spec.effort),vendor)}function presetBaseArgv(id){let override=getPersistedString(engineCommandKey(id))?.trim();if(override){let argv=parseEngineCommand(override);if(argv.length>0)return argv}return defaultEngineCommand(id)}function sessionProtocol(vendor){let id=vendor?.trim();if(!id)return"claude";return getEngineProtocol(id)??id}function protocolEntry(vendor){return engineEntry(sessionProtocol(vendor))}function withPinnedSessionId(argv,vendor,newId=randomUUID){let identity=engineEntry(sessionProtocol(vendor)).sessionIdentity;if(!acceptsPinnedSession(identity,argv))return{argv,sessionId:null};let sessionId=newId();return{argv:pinSessionArgv(identity,argv,sessionId),sessionId}}function engineResumeArgv(base,vendor,sessionId){return resumeSessionArgv(engineEntry(sessionProtocol(vendor)).sessionIdentity,base,sessionId)}function engineCanFork(vendor){return acceptsSessionFork(engineEntry(sessionProtocol(vendor)).sessionIdentity)}function engineForkArgv(base,vendor,sourceId,newId){return forkSessionArgvFor(engineEntry(sessionProtocol(vendor)).sessionIdentity,base,sourceId,newId)}
|
|
3
3
|
export{pickUnclaimedSessionId,GENERIC_PROTOCOL,ENGINE_PROTOCOLS,engineProtocolKey,getEngineProtocol,listPresetIds,describePreset,listEnginePresets,resolveCommandProtocol,engineLaunchArgv,sessionProtocol,protocolEntry,withPinnedSessionId,engineResumeArgv,engineCanFork,engineForkArgv};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{envReadyForTasks}from"./chunk-
|
|
2
|
+
import{envReadyForTasks}from"./chunk-5hc2959x.js";import{wizardKeyLines}from"./chunk-5w9s18qb.js";import"./chunk-cad0kv20.js";import"./chunk-exggdhpt.js";import"./chunk-g90z5s39.js";import"./chunk-nt7zs4wd.js";import{$Fragment,$jsx,$jsxs,bootPaneHost,currentPrefixConfiguration,pageCloseBindings,require_react_production,useBindings,useRenderer,useT,useTheme}from"./chunk-r3ev6gtj.js";import"./chunk-764bsyb0.js";import"./chunk-xqw5d5rv.js";import"./chunk-h4n8ffqy.js";import"./chunk-6xppe9bj.js";import"./chunk-dd93y7gx.js";import"./chunk-ptjc5mtc.js";import"./chunk-de751t37.js";import"./chunk-e18sn615.js";import"./chunk-qgd78nwt.js";import"./chunk-ekgcpkcs.js";import"./chunk-sdyzxayr.js";import"./chunk-zqfbyq0a.js";import"./chunk-jvxh93nz.js";import"./chunk-2vgmx7rh.js";import"./chunk-0dqdymwa.js";import"./chunk-mqqnk8w7.js";import"./chunk-xxn3m0z5.js";import"./chunk-3ztek08w.js";import"./chunk-kwe61yx7.js";import"./chunk-n7n12868.js";import"./chunk-4gjr08g0.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-25hxhtdr.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-axfn4f28.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-p7s4xwgx.js";import"./chunk-4pmd0mxp.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import{__toESM}from"./chunk-wqfp8d9w.js";import{TextAttributes}from"@opentui/core";var import_react2=__toESM(require_react_production(),1);function inlineRowsFor(env){return 15+env.engines.lines.length+envActionKeys(env).length}function envActionKeys(env){let keys=[];if(!env.engines.anyUsable)keys.push("doctor.fix.noEngineAction");if(!env.git.found)keys.push("doctor.fix.gitAction");return keys}function WizardPage(props){let{theme}=useTheme(),t=useT(),renderer=useRenderer(),steps=(props.mode??"full")==="primer"?[]:props.shell===null?["skill"]:["completions","skill"],[stepIndex,setStepIndex]=import_react2.useState(0),[yes,setYes]=import_react2.useState(!0),[answers,setAnswers]=import_react2.useState({}),[page,setPage]=import_react2.useState(steps.length===0?"env":"questions"),step=steps[stepIndex];function finish(finalAnswers){renderer?.destroy(),props.onDone({completions:finalAnswers.completions??!1,skill:finalAnswers.skill??!1})}function confirm(choice=yes){if(page==="env"){setPage("keys");return}if(page==="keys"){finish(answers);return}let next={...answers,[step]:choice};if(setAnswers(next),stepIndex+1>=steps.length){setPage("env");return}setStepIndex(stepIndex+1),setYes(!0)}useBindings(()=>({bindings:[{key:"up",cmd:()=>setYes(!0)},{key:"k",cmd:()=>setYes(!0)},{key:"down",cmd:()=>setYes(!1)},{key:"j",cmd:()=>setYes(!1)},{key:"return",cmd:()=>confirm()},...pageCloseBindings(()=>finish(answers))]}));function questionFor(s){return s==="completions"?t("onboarding.completionsQuestion",{shell:props.shell??""}):t("onboarding.skillQuestion")}let explain=step==="completions"?t("onboarding.completionsExplain"):t("onboarding.skillExplain"),ready=envReadyForTasks(props.env);return $jsxs("box",{flexDirection:"column",flexGrow:1,paddingTop:1,paddingLeft:2,paddingRight:2,children:[$jsx("text",{fg:theme.primary,attributes:TextAttributes.BOLD,wrapMode:"none",children:t("onboarding.title")}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("onboarding.subtitle")}),$jsxs("box",{flexDirection:"column",paddingTop:1,children:[steps.slice(0,page==="questions"?stepIndex:steps.length).map((answered)=>$jsxs("box",{flexDirection:"row",gap:1,children:[$jsx("text",{fg:theme.success,wrapMode:"none",children:"\u2713"}),$jsx("text",{fg:theme.textMuted,wrapMode:"none",children:questionFor(answered)}),$jsx("text",{fg:theme.text,wrapMode:"none",children:answers[answered]?t("onboarding.optionYes"):t("onboarding.optionNo")})]},answered)),page==="env"?$jsxs("box",{flexDirection:"column",onMouseUp:()=>confirm(),children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:t("onboarding.envTitle")}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("onboarding.envExplain")}),$jsxs("box",{flexDirection:"column",paddingTop:1,children:[$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:props.env.git.line}),props.env.engines.lines.map((line)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:line},line))]}),$jsxs("box",{paddingTop:1,flexDirection:"column",children:[$jsx("text",{fg:ready?theme.success:theme.error,wrapMode:"word",children:ready?t("onboarding.envReady"):t("onboarding.envNotReady")}),envActionKeys(props.env).map((key)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:`\u2192 ${t(key)}`},key))]})]}):null,page==="keys"?$jsxs("box",{flexDirection:"column",onMouseUp:()=>confirm(),children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:t("onboarding.keysTitle")}),wizardKeyLines(currentPrefixConfiguration().key).map((line)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t(`onboarding.${line.msg}`,line.params)},line.msg))]}):null,page==="questions"?$jsxs($Fragment,{children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:questionFor(step)}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:explain}),[!0,!1].map((option)=>{let active=yes===option;return $jsxs("box",{flexDirection:"row",gap:1,paddingLeft:1,onMouseUp:()=>confirm(option),children:[$jsx("text",{fg:active?theme.primary:theme.textMuted,wrapMode:"none",children:active?"\u276F":" "}),$jsx("text",{fg:active?theme.primary:theme.textMuted,attributes:active?TextAttributes.BOLD:void 0,wrapMode:"none",children:option?t("onboarding.optionYes"):t("onboarding.optionNo")})]},String(option))})]}):null]}),$jsx("box",{paddingTop:1,children:$jsx("text",{fg:theme.textMuted,attributes:TextAttributes.DIM,wrapMode:"none",children:t(page==="keys"?"onboarding.keysLegend":page==="env"?"onboarding.envLegend":"onboarding.legend")})})]})}async function runOnboardingWizard(shell,env,mode){return await new Promise((resolve)=>{bootPaneHost({inlineRows:inlineRowsFor(env),setup:()=>({root:()=>$jsx(WizardPage,{shell,env,mode,onDone:resolve})})})})}export{runOnboardingWizard,WizardPage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{buildPluginEnv}from"./chunk-
|
|
2
|
+
import{buildPluginEnv}from"./chunk-s83t3w1e.js";import{currentPluginPlatform,loadPluginRegistry,readPluginManifest,supportsPlatform}from"./chunk-xt3wcpsd.js";import{resolveLoginShell}from"./chunk-b99tf0jr.js";function shq(s){return`'${s.replace(/'/g,"'\\''")}'`}function buildPaneArgv(pluginId,pluginRoot,pane,opts){let env=buildPluginEnv({homeDir:opts.homeDir,socketPath:opts.socketPath,binPath:opts.binPath,pluginId,pluginRoot,extra:{ROVE_PLUGIN_ENTRYPOINT_ID:pane.id,...opts.taskId?{ROVE_PLUGIN_TASK_ID:opts.taskId}:{}}}),pairs=Object.entries(env).filter(([k])=>k.startsWith("ROVE_")||k.startsWith("KOBE_")),command=pane.command.map((a)=>a.replace(/\$\{?(?:ROVE|KOBE)_PLUGIN_ROOT\}?/g,pluginRoot)),script=`exec env ${pairs.map(([k,v])=>shq(`${k}=${v}`)).join(" ")} ${command.map(shq).join(" ")}`;return[resolveLoginShell(),"-ilc",script]}function listPaneLaunches(opts){let platform=currentPluginPlatform(),out=[];for(let entry of loadPluginRegistry(opts.homeDir).plugins){if(!entry.enabled)continue;try{let{manifest}=readPluginManifest(entry.root);if(!supportsPlatform({},manifest,platform))continue;for(let pane of manifest.panes){if(!supportsPlatform(pane,manifest,platform))continue;out.push({pluginId:entry.id,paneId:pane.id,title:pane.title,placement:pane.placement,argv:buildPaneArgv(entry.id,entry.root,pane,opts)})}}catch{}}return out}
|
|
3
3
|
export{buildPaneArgv,listPaneLaunches};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{CATALOGS,DEFAULT_LOCALE,LOCALES}from"./chunk-
|
|
2
|
+
import{CATALOGS,DEFAULT_LOCALE,LOCALES}from"./chunk-ekgcpkcs.js";import{createStateCell}from"./chunk-sdyzxayr.js";function lookup(catalog,key){let node=catalog;for(let part of key.split("."))if(node&&typeof node==="object"&&part in node)node=node[part];else return;return typeof node==="string"?node:void 0}function interpolate(template,params){if(!params)return template;return template.replace(/\{(\w+)\}/g,(whole,name)=>(name in params)?String(params[name]):whole)}function lookupKeys(catalog,group,key){return catalog.keys[group]?.[key]}var langState=createStateCell(DEFAULT_LOCALE);function setLocaleLang(lang){if(CATALOGS[lang])langState.set(lang)}function currentLang(){return langState.get()}function intlLocale(){return LOCALES.find((locale)=>locale.id===langState.get())?.intl??"en-US"}function localeState(){return langState}function t(key,params){let lang=langState.get(),resolved=lookup(CATALOGS[lang],key)??lookup(CATALOGS.en,key)??key;return interpolate(resolved,params)}function tKeys(group,key){let lang=langState.get();return lookupKeys(CATALOGS[lang],group,key)??lookupKeys(CATALOGS.en,group,key)??key}
|
|
3
3
|
export{setLocaleLang,currentLang,intlLocale,localeState,t,tKeys};
|