lody 0.0.4 → 0.0.5

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.
@@ -0,0 +1,74 @@
1
+ FROM node:20-slim
2
+
3
+ ARG TZ
4
+ ENV TZ="$TZ"
5
+ ARG CLAUDE_CLI_VERSION="latest"
6
+
7
+ # Install basic development tools
8
+ RUN apt update && apt install -y \
9
+ less \
10
+ sudo \
11
+ git \
12
+ procps \
13
+ unzip \
14
+ gnupg2 \
15
+ gh \
16
+ jq \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Create non-root user with sudo access
20
+ ARG USERNAME=node
21
+ RUN echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \
22
+ && chmod 0440 /etc/sudoers.d/$USERNAME
23
+
24
+ # Persist command history
25
+ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
26
+ && mkdir /commandhistory \
27
+ && touch /commandhistory/.bash_history \
28
+ && chown -R $USERNAME:$USERNAME /commandhistory \
29
+ && echo $SNIPPET >> /home/$USERNAME/.bashrc
30
+
31
+ # Set up workspace and config directories
32
+ RUN mkdir -p /workspace /home/$USERNAME/.lody /home/$USERNAME/.claude \
33
+ && chown -R $USERNAME:$USERNAME /workspace /home/$USERNAME/.lody /home/$USERNAME/.claude
34
+
35
+ # Configure git
36
+ RUN git config --global init.defaultBranch main \
37
+ && git config --global safe.directory '*' \
38
+ && git config --global credential.helper store \
39
+ && git config --global http.postBuffer 524288000
40
+
41
+ WORKDIR /workspace
42
+
43
+ # Switch to non-root user
44
+ USER $USERNAME
45
+
46
+ # Set up shell environment
47
+ ENV SHELL=/bin/bash
48
+ ENV NPM_CONFIG_PREFIX=/home/$USERNAME/.npm-global
49
+ ENV PATH=$PATH:/home/$USERNAME/.npm-global/bin
50
+
51
+ # Install global npm packages
52
+ RUN mkdir -p /home/$USERNAME/.npm-global \
53
+ && npm config set prefix /home/$USERNAME/.npm-global \
54
+ && npm install -g typescript tsx nodemon pnpm yarn
55
+
56
+ # Install Claude CLI if version specified
57
+ RUN if [ "$CLAUDE_CLI_VERSION" != "skip" ]; then \
58
+ if [ "$CLAUDE_CLI_VERSION" = "latest" ]; then \
59
+ npm install -g @anthropic-ai/claude-code; \
60
+ else \
61
+ npm install -g @anthropic-ai/claude-code@$CLAUDE_CLI_VERSION; \
62
+ fi; \
63
+ fi
64
+ RUN npm i -g @openai/codex
65
+ # Set environment variables
66
+ ENV DEVCONTAINER=true
67
+ ENV LODY_CONTAINER=true
68
+
69
+ # Add health check
70
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
71
+ CMD echo "Health check" || exit 1
72
+
73
+ # Entry point
74
+ ENTRYPOINT ["/bin/bash"]
package/dist/index.js CHANGED
@@ -180,7 +180,7 @@ ${t.stack}`:n}function lc(t,e){return t=t>>>0,qm().subarray(t/1,t/1+e)}function
180
180
  `:`
181
181
  `)+r,i=n+1,n=t.indexOf(`
182
182
  `,i)}while(n!==-1);return s+=t.slice(i),s}var{stdout:G7,stderr:Q7}=W7,Gk=Symbol("GENERATOR"),Eh=Symbol("STYLER"),Km=Symbol("IS_EMPTY"),Y7=["ansi","ansi","ansi256","ansi16m"],Sh=Object.create(null),Vbe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=G7?G7.level:0;t.level=e.level===void 0?r:e.level};var Gbe=t=>{let e=(...r)=>r.join(" ");return Vbe(e,t),Object.setPrototypeOf(e,Jm.prototype),e};function Jm(t){return Gbe(t)}Object.setPrototypeOf(Jm.prototype,Function.prototype);for(let[t,e]of Object.entries(Do))Sh[t]={get(){let r=Lx(this,Yk(e.open,e.close,this[Eh]),this[Km]);return Object.defineProperty(this,t,{value:r}),r}};Sh.visible={get(){let t=Lx(this,this[Eh],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Qk=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?Do[r].ansi16m(...n):e==="ansi256"?Do[r].ansi256(Do.rgbToAnsi256(...n)):Do[r].ansi(Do.rgbToAnsi(...n)):t==="hex"?Qk("rgb",e,r,...Do.hexToRgb(...n)):Do[r][t](...n),Qbe=["rgb","hex","ansi256"];for(let t of Qbe){Sh[t]={get(){let{level:r}=this;return function(...n){let i=Yk(Qk(t,Y7[r],"color",...n),Do.color.close,this[Eh]);return Lx(this,i,this[Km])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Sh[e]={get(){let{level:r}=this;return function(...n){let i=Yk(Qk(t,Y7[r],"bgColor",...n),Do.bgColor.close,this[Eh]);return Lx(this,i,this[Km])}}}}var Ybe=Object.defineProperties(()=>{},{...Sh,level:{enumerable:!0,get(){return this[Gk].level},set(t){this[Gk].level=t}}}),Yk=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Lx=(t,e,r)=>{let n=(...i)=>Kbe(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Ybe),n[Gk]=t,n[Eh]=e,n[Km]=r,n},Kbe=(t,e)=>{if(t.level<=0||!e)return t[Km]?"":e;let r=t[Eh];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=z7(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
183
- `);return s!==-1&&(e=V7(e,i,n,s)),n+e+i};Object.defineProperties(Jm.prototype,Sh);var Jbe=Jm(),_mt=Jm({level:Q7?Q7.level:0});var Je=Jbe;var J7="0.0.4";var X7={name:"lody",version:J7,description:"Lody Agent CLI tool for managing remote command execution",main:"dist/index.js",bin:{lody:"dist/index.js"},scripts:{dev:"tsx src/index.ts",build:"pnpm run clean && pnpm run typecheck && pnpm run build:bundle && pnpm run copy:wasm","build:watch":"pnpm run build:bundle -- --watch","build:bundle":"esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.js --minify --legal-comments=none --external:cpu-features --external:*.node","copy:wasm":"node scripts/copy-loro-wasm.js",clean:"rimraf dist",format:"prettier --write src/**/*.ts","format:check":"prettier --check src/**/*.ts",typecheck:"tsc --noEmit",test:"jest","test:watch":"jest --watch","test:coverage":"jest --coverage",prepublishOnly:"npm run clean && npm run build && node scripts/prepare-publish.js",postpublish:"node scripts/prepare-publish.js --restore","serve:dev":"NODE_ENV=development npm run dev serve","serve:prod":"NODE_ENV=production npm run dev serve"},keywords:["cli","typescript","command-line","agent","remote-execution"],author:"Leon Zhao",license:"MIT",engines:{node:">=18.0.0"},devDependencies:{"loro-mirror":"catalog:","loro-crdt":"catalog:","@modelcontextprotocol/sdk":"^1.17.0",chalk:"^5.3.0",commander:"^12.1.0",convex:"1.25.4",dockerode:"^4.0.7",dotenv:"^16.6.1",eventemitter3:"^5.0.1",express:"^4.21.2","fs-extra":"^11.2.0",inquirer:"^10.2.2","js-yaml":"^4.1.0",ora:"^8.1.1",uuid:"^9.0.1",winston:"^3.11.0","winston-daily-rotate-file":"^5.0.0",ws:"^8.18.3","@lody/types":"workspace:*","loro-websocket":"workspace:*","@types/dockerode":"^3.3.42","@types/express":"^5.0.0","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.14","@types/js-yaml":"^4.0.9","@types/node":"catalog:","@types/uuid":"^9.0.8","@types/ws":"^8.18.1",jest:"^29.7.0",prettier:"^3.4.2",rimraf:"^6.0.1","ts-jest":"^29.2.5","ts-node":"^10.9.2",tsx:"^4.20.5",typescript:"catalog:",esbuild:"^0.24.0"},files:["dist","README.md","LICENSE"]};var tg=qe(require("node:process"),1);var nI=qe(require("node:process"),1);var Xm=qe(require("node:process"),1);var Xbe=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!Zbe(i,s)&&n||Object.defineProperty(t,r,s)},Zbe=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},e1e=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},t1e=(t,e)=>`/* Wrapped ${t}*/
183
+ `);return s!==-1&&(e=V7(e,i,n,s)),n+e+i};Object.defineProperties(Jm.prototype,Sh);var Jbe=Jm(),_mt=Jm({level:Q7?Q7.level:0});var Je=Jbe;var J7="0.0.5";var X7={name:"lody",version:J7,description:"Lody Agent CLI tool for managing remote command execution",main:"dist/index.js",bin:{lody:"dist/index.js"},scripts:{dev:"tsx src/index.ts",build:"pnpm run clean && pnpm run typecheck && pnpm run build:bundle && pnpm run copy:wasm","build:watch":"pnpm run build:bundle -- --watch","build:bundle":"esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.js --minify --legal-comments=none --external:cpu-features --external:*.node","copy:wasm":"node scripts/copy-loro-wasm.js",clean:"rimraf dist",format:"prettier --write src/**/*.ts","format:check":"prettier --check src/**/*.ts",typecheck:"tsc --noEmit",test:"jest","test:watch":"jest --watch","test:coverage":"jest --coverage",prepublishOnly:"npm run clean && npm run build && node scripts/prepare-publish.js",postpublish:"node scripts/prepare-publish.js --restore","serve:dev":"NODE_ENV=development npm run dev serve","serve:prod":"NODE_ENV=production npm run dev serve"},keywords:["cli","typescript","command-line","agent","remote-execution"],author:"Leon Zhao",license:"MIT",engines:{node:">=18.0.0"},devDependencies:{"loro-mirror":"catalog:","loro-crdt":"catalog:","@modelcontextprotocol/sdk":"^1.17.0",chalk:"^5.3.0",commander:"^12.1.0",convex:"1.25.4",dockerode:"^4.0.7",dotenv:"^16.6.1",eventemitter3:"^5.0.1",express:"^4.21.2","fs-extra":"^11.2.0",inquirer:"^10.2.2","js-yaml":"^4.1.0",ora:"^8.1.1",uuid:"^9.0.1",winston:"^3.11.0","winston-daily-rotate-file":"^5.0.0",ws:"^8.18.3","@lody/types":"workspace:*","loro-websocket":"workspace:*","@types/dockerode":"^3.3.42","@types/express":"^5.0.0","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.14","@types/js-yaml":"^4.0.9","@types/node":"catalog:","@types/uuid":"^9.0.8","@types/ws":"^8.18.1",jest:"^29.7.0",prettier:"^3.4.2",rimraf:"^6.0.1","ts-jest":"^29.2.5","ts-node":"^10.9.2",tsx:"^4.20.5",typescript:"catalog:",esbuild:"^0.24.0"},files:["dist","README.md","LICENSE"]};var tg=qe(require("node:process"),1);var nI=qe(require("node:process"),1);var Xm=qe(require("node:process"),1);var Xbe=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!Zbe(i,s)&&n||Object.defineProperty(t,r,s)},Zbe=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},e1e=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},t1e=(t,e)=>`/* Wrapped ${t}*/
184
184
  ${e}`,r1e=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),n1e=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),i1e=(t,e,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=t1e.bind(null,n,e.toString());Object.defineProperty(i,"name",n1e);let{writable:s,enumerable:o,configurable:a}=r1e;Object.defineProperty(t,"toString",{value:i,writable:s,enumerable:o,configurable:a})};function Kk(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:n}=t;for(let i of Reflect.ownKeys(e))Xbe(t,e,i,r);return e1e(t,e),i1e(t,e,n),t}var qx=new WeakMap,Z7=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,i=t.displayName||t.name||"<anonymous>",s=function(...o){if(qx.set(s,++n),n===1)r=t.apply(this,o),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Kk(s,t),qx.set(s,n),s};Z7.callCount=t=>{if(!qx.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return qx.get(t)};var e9=Z7;var xf=[];xf.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&xf.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&xf.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ux=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Jk=Symbol.for("signal-exit emitter"),Xk=globalThis,s1e=Object.defineProperty.bind(Object),Zk=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Xk[Jk])return Xk[Jk];s1e(Xk,Jk,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let n=this.listeners[e],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(e,r,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let s of this.listeners[e])i=s(r,n)===!0||i;return e==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},jx=class{},o1e=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),eI=class extends jx{onExit(){return()=>{}}load(){}unload(){}},tI=class extends jx{#n=rI.platform==="win32"?"SIGINT":"SIGHUP";#r=new Zk;#e;#s;#d;#t={};#o=!1;constructor(e){super(),this.#e=e,this.#t={};for(let r of xf)this.#t[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#r,s=e;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let o=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#n:r;o||e.kill(e.pid,a)}};this.#d=e.reallyExit,this.#s=e.emit}onExit(e,r){if(!Ux(this.#e))return()=>{};this.#o===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#r.on(n,e),()=>{this.#r.removeListener(n,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#r.count+=1;for(let e of xf)try{let r=this.#t[e];r&&this.#e.on(e,r)}catch{}this.#e.emit=(e,...r)=>this.#h(e,...r),this.#e.reallyExit=e=>this.#i(e)}}unload(){this.#o&&(this.#o=!1,xf.forEach(e=>{let r=this.#t[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r)}catch{}}),this.#e.emit=this.#s,this.#e.reallyExit=this.#d,this.#r.count-=1)}#i(e){return Ux(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#h(e,...r){let n=this.#s;if(e==="exit"&&Ux(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,e,...r)}},rI=globalThis.process,{onExit:$x,load:Dmt,unload:Cmt}=o1e(Ux(rI)?new tI(rI):new eI);var t9=Xm.default.stderr.isTTY?Xm.default.stderr:Xm.default.stdout.isTTY?Xm.default.stdout:void 0,a1e=t9?e9(()=>{$x(()=>{t9.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},r9=a1e;var Hx=!1,Ah={};Ah.show=(t=nI.default.stderr)=>{t.isTTY&&(Hx=!1,t.write("\x1B[?25h"))};Ah.hide=(t=nI.default.stderr)=>{t.isTTY&&(r9(),Hx=!0,t.write("\x1B[?25l"))};Ah.toggle=(t,e)=>{t!==void 0&&(Hx=t),Hx?Ah.show(e):Ah.hide(e)};var iI=Ah;var rg=qe(sI(),1);var Ws=qe(require("node:process"),1);function oI(){return Ws.default.platform!=="win32"?Ws.default.env.TERM!=="linux":!!Ws.default.env.CI||!!Ws.default.env.WT_SESSION||!!Ws.default.env.TERMINUS_SUBLIME||Ws.default.env.ConEmuTask==="{cmd::Cmder}"||Ws.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ws.default.env.TERM_PROGRAM==="vscode"||Ws.default.env.TERM==="xterm-256color"||Ws.default.env.TERM==="alacritty"||Ws.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var u1e={info:Je.blue("\u2139"),success:Je.green("\u2714"),warning:Je.yellow("\u26A0"),error:Je.red("\u2716")},l1e={info:Je.blue("i"),success:Je.green("\u221A"),warning:Je.yellow("\u203C"),error:Je.red("\xD7")},f1e=oI()?u1e:l1e,Zm=f1e;function aI({onlyFirst:t=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,t?void 0:"g")}var d1e=aI();function eg(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(d1e,"")}function o9(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function a9(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function c9(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101631&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129673||t>=129679&&t<=129734||t>=129742&&t<=129756||t>=129759&&t<=129769||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function h1e(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function u9(t,{ambiguousAsWide:e=!1}={}){return h1e(t),a9(t)||c9(t)||e&&o9(t)?2:1}var d9=qe(f9(),1),p1e=new Intl.Segmenter,m1e=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function cI(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=eg(t)),t.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:o}of p1e.segment(t)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!m1e.test(o)){if((0,d9.default)().test(o)){i+=2;continue}i+=u9(a,s)}}return i}function uI({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var lI=qe(require("node:process"),1);function fI(){let{env:t}=lI.default,{TERM:e,TERM_PROGRAM:r}=t;return lI.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Co=qe(require("node:process"),1),g1e=3,dI=class{#n=0;start(){this.#n++,this.#n===1&&this.#r()}stop(){if(this.#n<=0)throw new Error("`stop` called more times than `start`");this.#n--,this.#n===0&&this.#e()}#r(){Co.default.platform==="win32"||!Co.default.stdin.isTTY||(Co.default.stdin.setRawMode(!0),Co.default.stdin.on("data",this.#s),Co.default.stdin.resume())}#e(){Co.default.stdin.isTTY&&(Co.default.stdin.off("data",this.#s),Co.default.stdin.pause(),Co.default.stdin.setRawMode(!1))}#s(e){e[0]===g1e&&Co.default.emit("SIGINT")}},v1e=new dI,hI=v1e;var _1e=qe(sI(),1),pI=class{#n=0;#r=!1;#e=0;#s=-1;#d=0;#t;#o;#i;#h;#m;#u;#l;#f;#g;#a;#c;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:tg.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#i=this.#t.stream,this.#u=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:uI({stream:this.#i}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,tg.default.env.NODE_ENV==="test"&&(this._stream=this.#i,this._isEnabled=this.#u,Object.defineProperty(this,"_linesToClear",{get(){return this.#n},set(r){this.#n=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#s}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#f}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#f=e,this.#p()}get interval(){return this.#m??this.#o.interval??100}get spinner(){return this.#o}set spinner(e){if(this.#s=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=e}else if(!fI())this.#o=rg.default.line;else if(e===void 0)this.#o=rg.default.dots;else if(e!=="default"&&rg.default[e])this.#o=rg.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#p()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#p()}get suffixText(){return this.#c}set suffixText(e=""){this.#c=e,this.#p()}get isSpinning(){return this.#h!==void 0}#v(e=this.#a,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#_(e=this.#c,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#i.columns??80,r=this.#v(this.#a,"-"),n=this.#_(this.#c,"-"),i=" ".repeat(this.#f)+r+"--"+this.#g+"--"+n;this.#e=0;for(let s of eg(i).split(`
185
185
  `))this.#e+=Math.max(1,Math.ceil(cI(s,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#u&&!this.#l}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#u=e}get isSilent(){return this.#l}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=e}frame(){let e=Date.now();(this.#s===-1||e-this.#d>=this.interval)&&(this.#s=++this.#s%this.#o.frames.length,this.#d=e);let{frames:r}=this.#o,n=r[this.#s];this.color&&(n=Je[this.color](n));let i=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",s=typeof this.text=="string"?" "+this.text:"",o=typeof this.#c=="string"&&this.#c!==""?" "+this.#c:"";return i+n+s+o}clear(){if(!this.#u||!this.#i.isTTY)return this;this.#i.cursorTo(0);for(let e=0;e<this.#n;e++)e>0&&this.#i.moveCursor(0,-1),this.#i.clearLine(1);return(this.#f||this.lastIndent!==this.#f)&&this.#i.cursorTo(this.#f),this.lastIndent=this.#f,this.#n=0,this}render(){return this.#l?this:(this.clear(),this.#i.write(this.frame()),this.#n=this.#e,this)}start(e){return e&&(this.text=e),this.#l?this:this.#u?this.isSpinning?this:(this.#t.hideCursor&&iI.hide(this.#i),this.#t.discardStdin&&tg.default.stdin.isTTY&&(this.#r=!0,hI.start()),this.render(),this.#h=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#i.write(`- ${this.text}
186
186
  `),this)}stop(){return this.#u?(clearInterval(this.#h),this.#h=void 0,this.#s=0,this.clear(),this.#t.hideCursor&&iI.show(this.#i),this.#t.discardStdin&&tg.default.stdin.isTTY&&this.#r&&(hI.stop(),this.#r=!1),this):this}succeed(e){return this.stopAndPersist({symbol:Zm.success,text:e})}fail(e){return this.stopAndPersist({symbol:Zm.error,text:e})}warn(e){return this.stopAndPersist({symbol:Zm.warning,text:e})}info(e){return this.stopAndPersist({symbol:Zm.info,text:e})}stopAndPersist(e={}){if(this.#l)return this;let r=e.prefixText??this.#a,n=this.#v(r," "),i=e.symbol??" ",s=e.text??this.text,a=typeof s=="string"?(i?" ":"")+s:"",c=e.suffixText??this.#c,u=this.#_(c," "),l=n+i+a+u+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lody",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Lody Agent CLI tool for managing remote command execution",
5
5
  "main": "dist/index.js",
6
6
  "bin": {