@robota-sdk/agent-cli 3.0.0-beta.85 → 3.0.0-beta.86
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/CHANGELOG.md +6 -0
- package/dist/node/bin.js +1 -1
- package/dist/node/{cli-core-DjVnz1-_.js → cli-core-DOdGt9XE.js} +326 -326
- package/dist/node/headless.js +1 -1
- package/dist/node/index.js +340 -340
- package/dist/node/index.js.map +1 -1
- package/dist/node/{node-CpH9vRQt.js → node-BfqR16CD.js} +1 -1
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @robota-sdk/agent-cli
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.86
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 44bd221: Allow the desktop CLI to start and reconnect to its workspace daemon on Windows using private storage and a native local control pipe that verifies process ownership.
|
|
8
|
+
|
|
3
9
|
## 3.0.0-beta.85
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/node/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
;(function(){var v=parseInt(process.versions.node.split('.')[0],10);if(v<22){process.stderr.write('\n✗ Node.js 22+ is required (current: '+process.version+')\n\nUpgrade:\n nvm: nvm install 22 && nvm use 22\n Volta: volta install node@22\n Download: https://nodejs.org/en/download\n\n');process.exit(1);}})();
|
|
3
|
-
import{B as e,Et as t,F as n,Q as r,dt as i,nt as a,x as o,yt as s}from"./node-DlLm_kxn.js";import{A as c,C as l,D as u,E as d,F as f,O as p,P as m,S as h,T as g,_,b as ee,d as te,f as v,g as y,h as b,j as ne,k as re,l as ie,m as ae,o as oe,p as se,s as x,t as ce,u as S,v as le,w as ue,x as C,y as de}from"./cli-core-
|
|
3
|
+
import{B as e,Et as t,F as n,Q as r,dt as i,nt as a,x as o,yt as s}from"./node-DlLm_kxn.js";import{A as c,C as l,D as u,E as d,F as f,O as p,P as m,S as h,T as g,_,b as ee,d as te,f as v,g as y,h as b,j as ne,k as re,l as ie,m as ae,o as oe,p as se,s as x,t as ce,u as S,v as le,w as ue,x as C,y as de}from"./cli-core-DOdGt9XE.js";import{watch as fe}from"node:fs";import{basename as pe,dirname as w,join as me}from"node:path";import{mkdir as he,readFile as ge,writeFile as _e}from"node:fs/promises";import T,{Chalk as ve,backgroundColorNames as E,foregroundColorNames as ye}from"chalk";import{Box as D,Static as be,Text as xe,render as O,useApp as Se,useBoxMetrics as Ce,useCursor as k,useInput as we,usePaste as Te,useStdout as Ee,useWindowSize as A}from"ink";import j,{createContext as M,useCallback as N,useContext as P,useEffect as F,useLayoutEffect as De,useMemo as I,useRef as L,useState as R}from"react";import{Fragment as z,jsx as B,jsxs as V}from"react/jsx-runtime";import Oe from"string-width";import{marked as ke}from"marked";import Ae from"marked-terminal";import{Readable as je}from"node:stream";const Me=e=>typeof e==`string`,Ne=e=>t=>t===void 0||e(t),Pe={user:!0,"agent-wakeup":!0,peer:!0,external:!0},H={driverId:Ne(Me)};({...H}),{...H},{...H},{...H},{...H},{...H},{...H},{...H},{...H},Object.keys(Pe);const Fe=new Set([`get-messages`,`get-history`,`get-context`,`get-status`,`get-commands`,`list-models`,`get-executing`,`get-pending`,`get-execution-workspace`,`read-execution-detail`,`get-agent-definitions`,`get-usage-report`,`list-sessions`,`get-background-tasks`,`get-background-task`,`get-background-job-groups`,`get-background-job-group`,`wait-background-job-group`,`read-background-task-log`,`get-settings`,`project-status`,`project-diff`,`project-memory`]);function Ie(e){return Fe.has(e)}const U=new Set([` `,`
|
|
4
4
|
`]),Le=/\r\n/g,Re=/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)?|\x9d[^\x07\x1b\x9c]*(?:\x07|\x9c|\x1b\\)?|\x1b[P^_X][\s\S]*?(?:\x1b\\|\x07)|\x1b[P^_X][\s\S]*$|[\x90\x98\x9e\x9f][\s\S]*?(?:\x9c|\x1b\\|\x07)|[\x90\x98\x9e\x9f][\s\S]*$|\x1b\[[0-?]*[ -/]*[@-~]|\x9b[0-?]*[ -/]*[@-~]|\x1b[@-Z\\-_]|[\x00-\x1f\x7f]|[\x80-\x9f]/g;function W(e){return e.replace(Le,`
|
|
5
5
|
`).replace(Re,e=>U.has(e)?e:``)}function ze(e){return typeof e==`string`?W(e):typeof e==`number`||typeof e==`boolean`||e==null?e:Array.isArray(e)?e.map(e=>ze(e)):e}function G(e){let{children:t,...n}=e;return B(xe,{...n,children:ze(t)})}function Be(e){return B(xe,{...e})}const Ve={id:`dark`,name:`Dark`,appearance:`dark`,source:`built-in`,colors:{text:{accent:`cyan`,emphasis:`white`,success:`green`,warning:`yellow`,error:`red`,session:`magenta`,muted:`gray`,onAccent:`black`},border:{attention:`yellow`,focused:`cyan`,active:`green`,muted:`gray`,error:`red`},status:{running:`yellow`,success:`green`,error:`red`,denied:`yellowBright`,waiting:`yellow`,cancelled:`yellow`,idle:`gray`}},markdown:{heading:`green`,firstHeading:`magenta`,code:`yellow`,codespan:`yellow`,link:`blue`,href:`blue`,blockquote:`gray`,del:`gray`,html:`gray`,diffAdded:`ansi256(120)`,diffRemoved:`ansi256(210)`,diffAddedBackground:`ansi256(22)`,diffRemovedBackground:`ansi256(52)`,diffHunk:`cyan`},syntax:{keyword:`blue`,built_in:`cyan`,type:`cyan`,literal:`blue`,number:`green`,regexp:`red`,string:`red`,class:`blue`,function:`yellow`,comment:`green`,doctag:`green`,meta:`gray`,tag:`gray`,name:`blue`,attr:`cyan`,addition:`green`,deletion:`red`},motion:{wave:[`#555555`,`#777777`,`#999999`,`#bbbbbb`]}},He=[Ve,{id:`light`,name:`Light`,appearance:`light`,source:`built-in`,colors:{text:{accent:`ansi256(24)`,emphasis:`black`,success:`ansi256(28)`,warning:`ansi256(130)`,error:`ansi256(124)`,session:`ansi256(90)`,muted:`ansi256(243)`,onAccent:`white`},border:{attention:`ansi256(130)`,focused:`ansi256(24)`,active:`ansi256(28)`,muted:`ansi256(249)`,error:`ansi256(124)`},status:{running:`ansi256(130)`,success:`ansi256(28)`,error:`ansi256(124)`,denied:`ansi256(166)`,waiting:`ansi256(130)`,cancelled:`ansi256(130)`,idle:`ansi256(243)`}},markdown:{heading:`ansi256(28)`,firstHeading:`ansi256(90)`,code:`ansi256(94)`,codespan:`ansi256(94)`,link:`ansi256(26)`,href:`ansi256(26)`,blockquote:`ansi256(243)`,del:`ansi256(243)`,html:`ansi256(243)`,diffAdded:`ansi256(22)`,diffRemoved:`ansi256(52)`,diffAddedBackground:`ansi256(194)`,diffRemovedBackground:`ansi256(224)`,diffHunk:`ansi256(24)`},syntax:{keyword:`ansi256(26)`,built_in:`ansi256(24)`,type:`ansi256(24)`,literal:`ansi256(26)`,number:`ansi256(28)`,regexp:`ansi256(124)`,string:`ansi256(124)`,class:`ansi256(26)`,function:`ansi256(94)`,comment:`ansi256(28)`,doctag:`ansi256(28)`,meta:`ansi256(243)`,tag:`ansi256(243)`,name:`ansi256(26)`,attr:`ansi256(24)`,addition:`ansi256(22)`,deletion:`ansi256(52)`},motion:{wave:[`#bbbbbb`,`#999999`,`#777777`,`#555555`]}},{id:`dark-daltonized`,name:`Dark (daltonized)`,appearance:`dark`,source:`built-in`,colors:{text:{accent:`#56b4e9`,emphasis:`#ffffff`,success:`#56b4e9`,warning:`#e69f00`,error:`#d55e00`,session:`#cc79a7`,muted:`#999999`,onAccent:`#000000`},border:{attention:`#e69f00`,focused:`#56b4e9`,active:`#56b4e9`,muted:`#999999`,error:`#d55e00`},status:{running:`#e69f00`,success:`#56b4e9`,error:`#d55e00`,denied:`#f0e442`,waiting:`#e69f00`,cancelled:`#cc79a7`,idle:`#999999`}},markdown:{heading:`#56b4e9`,firstHeading:`#cc79a7`,code:`#e69f00`,codespan:`#e69f00`,link:`#56b4e9`,href:`#56b4e9`,blockquote:`#999999`,del:`#999999`,html:`#999999`,diffAdded:`#8ecdf5`,diffRemoved:`#ffb066`,diffAddedBackground:`#00335c`,diffRemovedBackground:`#5c3000`,diffHunk:`#56b4e9`},syntax:{keyword:`#56b4e9`,built_in:`#8ecdf5`,type:`#8ecdf5`,literal:`#56b4e9`,number:`#e69f00`,regexp:`#d55e00`,string:`#d55e00`,class:`#56b4e9`,function:`#f0e442`,comment:`#999999`,doctag:`#999999`,meta:`#999999`,tag:`#999999`,name:`#56b4e9`,attr:`#8ecdf5`,addition:`#8ecdf5`,deletion:`#ffb066`},motion:{wave:[`#3d3d3d`,`#5c5c5c`,`#7a7a7a`,`#999999`]}},{id:`light-daltonized`,name:`Light (daltonized)`,appearance:`light`,source:`built-in`,colors:{text:{accent:`#0072b2`,emphasis:`#000000`,success:`#0072b2`,warning:`#b35900`,error:`#8c3d00`,session:`#a8477f`,muted:`#5c5c5c`,onAccent:`#ffffff`},border:{attention:`#b35900`,focused:`#0072b2`,active:`#0072b2`,muted:`#a3a3a3`,error:`#8c3d00`},status:{running:`#b35900`,success:`#0072b2`,error:`#8c3d00`,denied:`#8a7500`,waiting:`#b35900`,cancelled:`#a8477f`,idle:`#5c5c5c`}},markdown:{heading:`#0072b2`,firstHeading:`#a8477f`,code:`#8a5a00`,codespan:`#8a5a00`,link:`#0072b2`,href:`#0072b2`,blockquote:`#5c5c5c`,del:`#5c5c5c`,html:`#5c5c5c`,diffAdded:`#004c77`,diffRemoved:`#7a3300`,diffAddedBackground:`#d6ecf9`,diffRemovedBackground:`#fbe5cd`,diffHunk:`#0072b2`},syntax:{keyword:`#0072b2`,built_in:`#004c77`,type:`#004c77`,literal:`#0072b2`,number:`#b35900`,regexp:`#8c3d00`,string:`#8c3d00`,class:`#0072b2`,function:`#8a7500`,comment:`#5c5c5c`,doctag:`#5c5c5c`,meta:`#5c5c5c`,tag:`#5c5c5c`,name:`#0072b2`,attr:`#004c77`,addition:`#004c77`,deletion:`#7a3300`},motion:{wave:[`#c7c7c7`,`#a3a3a3`,`#7a7a7a`,`#5c5c5c`]}}],Ue=Ve.id;function We(){return He}function Ge(e){return e??Ve}const Ke=M(!1);function qe({enabled:e,children:t}){return B(Ke.Provider,{value:e,children:t})}function K(){return P(Ke)}function Je(){if(`NO_COLOR`in process.env)return!1;let e=process.env.FORCE_COLOR;return e===`0`?!1:e!==void 0&&e!==``||!!process.stdout.isTTY}function Ye(e={}){return e.override===!0?!0:e.override===!1||process.env.TERM_PROGRAM===`Apple_Terminal`?!1:!!process.stdout.isTTY}function Xe(e={}){return e.override===!0?!0:e.override===!1||process.env.TERM_PROGRAM===`WezTerm`?!1:!!process.stdout.isTTY}function Ze(e={}){return e.override===!0||e.override!==!1&&!!process.stdin.isTTY&&!!process.stdout.isTTY}const Qe=M(Ve),$e=M(!1),et=M(!0);function tt({theme:e,reducedMotion:t=!1,syntaxHighlighting:n=!0,children:r}){return B(Qe.Provider,{value:Ge(e),children:B($e.Provider,{value:t,children:B(et.Provider,{value:n,children:r})})})}function nt(){return P(Qe)}function q(){return nt().colors}function rt(){return nt().motion}function it(){let e=K(),t=P($e);return Je()&&!e&&!t}function at(){return P(et)}const ot=[`keyword`,`built_in`,`type`,`literal`,`number`,`regexp`,`string`,`class`,`function`,`comment`,`doctag`,`meta`,`tag`,`name`,`attr`,`addition`,`deletion`],st=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/iu,ct=/^ansi256\((\d{1,3})\)$/iu,lt=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/iu,ut=`<chalk name> | #rgb | #rrggbb | ansi256(n) | rgb(r,g,b)`,dt=new Map([...ye,...E].map(e=>[e,T[e]])),ft=new Set(ye);function pt(e){return ft.has(e)}function mt(e){if(st.test(e))return!0;let t=ct.exec(e);if(t)return Number(t[1])<=255;let n=lt.exec(e);return n?n.slice(1).every(e=>Number(e)<=255):pt(e)}function ht(e){throw Error(`Theme colour ${JSON.stringify(e)} is not in Ink's colour grammar (${ut}).`)}function J(e,t=T){if(st.test(e))return t.hex(e);let n=ct.exec(e);if(n)return t.ansi256(Number(n[1]));let r=lt.exec(e);if(r)return t.rgb(Number(r[1]),Number(r[2]),Number(r[3]));let i=pt(e)?dt.get(e):void 0;return i===void 0&&ht(e),Reflect.get(t,e)??i}function gt(e,t=T){if(st.test(e))return t.bgHex(e);let n=ct.exec(e);if(n)return t.bgAnsi256(Number(n[1]));let r=lt.exec(e);if(r)return t.bgRgb(Number(r[1]),Number(r[2]),Number(r[3]));let i=`bg${e.charAt(0).toUpperCase()}${e.slice(1)}`;return Reflect.get(t,i)??ht(e)}const _t=new ve({level:3});function vt(){return T.level===0?_t:T}function yt(e){return{heading:J(e.heading).bold,firstHeading:J(e.firstHeading).underline.bold,code:J(e.code),codespan:J(e.codespan),link:J(e.link),href:J(e.href).underline,blockquote:J(e.blockquote).italic,del:J(e.del,T.dim).strikethrough,html:J(e.html)}}function bt(e){let t={};for(let n of ot)t[n]=n===`type`?J(e[n]).dim:J(e[n]);return t}function xt(e){let{markdown:t}=e,n=vt(),r=gt(t.diffAddedBackground,n),i=J(t.diffAdded,n),a=gt(t.diffRemovedBackground,n),o=J(t.diffRemoved,n);return{added:e=>r(i(e)),removed:e=>a(o(e)),hunk:J(t.diffHunk,n),meta:e=>n.dim(e)}}function St(e){return e.split(/\s+/u).map(Number)}St(`0 95 135 175 215 255`),St(`0.1121 0.8853 -0.0005`),St(`0.1127 0.8897 -0.0001`),St(`0.0045 0.0 1.0019`),St(`0.292 0.7054 -0.0003`),St(`0.2934 0.7089 0.0`),St(`-0.0209 0.4614 0.5677`),St(`0.4124 0.3576 0.1805`),St(`0.2126 0.7152 0.0722`),St(`0.0193 0.1192 0.9505`),St(`0.95047 1 1.08883`);function Ct(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const wt=new Set([`name`,`base`,`overrides`]),Tt=/[\u0000-\u001F\u007F-\u009F]/u,Et=new RegExp(Tt.source,`gu`);function Dt(e){return JSON.stringify(e).replace(Et,e=>`\\u${(e.codePointAt(0)??0).toString(16).padStart(4,`0`)}`)}function Ot(e){return Dt(e).slice(1,-1)}function kt(e){return W(e).replaceAll(`
|
|
6
6
|
`,` `).replaceAll(` `,` `).trim()}function At(e){return Tt.test(e)?Dt(e):e}function jt(e){return{ok:!1,error:e}}function Mt(e,t){return typeof e==`string`?mt(e)?{ok:!0,value:e}:{ok:!1,error:`${t}: ${Dt(e)} is not a colour in Ink's grammar (${ut})`}:{ok:!1,error:`${t}: expected a colour string`}}function Nt(e,t,n){if(!Array.isArray(t)||t.length!==e.length)return{ok:!1,error:`${n}: expected exactly ${e.length} colours`};let r=[];for(let[i,a]of e.entries()){let e=Ft(a,t[i]??null,`${n}[${i}]`);if(!e.ok)return e;r.push(e.value)}return{ok:!0,value:r}}function Pt(e,t,n){if(!Ct(t))return{ok:!1,error:`${n}: expected an object of tokens`};let r={...e};for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i))return{ok:!1,error:`${n}.${At(i)} is not a theme token`};let a=Ft(e[i]??null,t[i]??null,`${n}.${At(i)}`);if(!a.ok)return a;r[i]=a.value}return{ok:!0,value:r}}function Ft(e,t,n){return typeof e==`string`?Mt(t,n):Array.isArray(e)?Nt(e,t,n):Ct(e)?Pt(e,t,n):{ok:!1,error:`${n} is not a theme token`}}function It(e){return JSON.parse(JSON.stringify(e))}function Lt(e){return JSON.parse(JSON.stringify({colors:e.colors,markdown:e.markdown,syntax:e.syntax,motion:e.motion}))}function Rt(e){let t;try{t=JSON.parse(e)}catch(e){return{ok:!1,error:`$: ${e instanceof Error?kt(e.message):`invalid JSON`}`}}if(!Ct(t))return{ok:!1,error:`$: expected an object`};for(let e of Object.keys(t))if(!wt.has(e))return{ok:!1,error:`$.${At(e)} is not a theme token`};return{ok:!0,value:t}}function zt(e,t){let n=e.name;return n===void 0?Tt.test(t)?{ok:!1,error:`$.name: the minted id must not contain control characters`}:t.length>60?{ok:!1,error:`$.name: the minted id must be at most 60 characters`}:{ok:!0,value:t}:typeof n!=`string`||n.trim().length===0?{ok:!1,error:`$.name: expected a non-empty string`}:Tt.test(n)?{ok:!1,error:`$.name: must not contain control characters`}:n.length>60?{ok:!1,error:`$.name: must be at most 60 characters`}:{ok:!0,value:n}}function Bt(e){let t=e.base===void 0?Ue:e.base;if(typeof t!=`string`)return{ok:!1,error:`$.base: expected a built-in theme id`};let n=He.find(e=>e.id===t);return n?{ok:!0,theme:n}:{ok:!1,error:`$.base: ${Dt(t)} is not a built-in theme`}}function Vt(e){let t=Rt(e.text);if(!t.ok)return jt(t.error);let n=t.value,r=Bt(n);if(!r.ok)return jt(r.error);let i=zt(n,e.id);if(!i.ok)return jt(i.error);let a=n.overrides===void 0?{}:n.overrides,o=Ft(Lt(r.theme),a,`$.overrides`);if(!o.ok)return jt(o.error);let{colors:s,markdown:c,syntax:l,motion:u}=It(o.value);return{ok:!0,theme:{id:e.id,name:i.value,appearance:r.theme.appearance,source:e.source,colors:s,markdown:c,syntax:l,motion:u}}}function Ht({version:e}){return V(D,{flexDirection:`column`,paddingX:1,marginBottom:1,children:[B(G,{color:q().text.accent,bold:!0,children:`
|