@hydra-acp/cli 0.1.83 → 0.1.84

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.
Files changed (2) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -83,7 +83,7 @@ Use empty arrays/strings where a field doesn't apply.`});import*as Lr from"fs/pr
83
83
  `),a=[];r&&a.push({prefix:"\u21B3 ",prefixStyle:"dim",body:`from ${r}`,bodyStyle:"dim"});for(let d of o){let c={prefix:e,prefixStyle:s??n,body:d,bodyStyle:n};i&&(c.fillRow=!0),a.push(c)}return a}function tk(t){return t<1024?`${t} B`:t<1024*1024?`${Math.round(t/1024)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function In(t){let e=Math.floor(t/1e3);if(e<60)return`${e}s`;let n=Math.floor(e/60),s=e%60;if(n<60)return s===0?`${n}m`:`${n}m ${s}s`;let r=Math.floor(n/60),i=n%60;return i===0?`${r}h`:`${r}h ${i}m`}function Uh(t){if(t.length<=4096&&t.split(`
84
84
  `).length<=40)return{text:t,truncated:!1};let s=t.slice(0,4096),r=t.length>4096,i=s.split(`
85
85
  `);return i.length>40&&(s=i.slice(0,40).join(`
86
- `),r=!0),{text:s,truncated:r}}function ro(t,e=Date.now()){let n=t.initialTitle,s=t.latestTitle,r=n.toLowerCase(),i=s.toLowerCase(),o;if(s===n||i.includes(r)?o=s:r.includes(i)?o=n:o=`${n} \xB7 ${s}`,t.detail){let d=t.detail,c=o.toLowerCase(),l=d.toLowerCase();(l.startsWith(`${c} `)||l.startsWith(`${c} `))&&(d=d.slice(o.length).trimStart()),d.length>0&&!o.includes(d)&&(o=`${o} \xB7 ${d}`)}if(t.startedAt!==void 0){let d=t.endedAt??e;o=`${o} \xB7 ${In(d-t.startedAt)}`}let a=[{prefix:` ${ik(t.status)} `,prefixStyle:ok(t.status),body:o,bodyStyle:uk(t.status)}];return t.status==="failed"&&t.errorText&&a.push({prefix:" ",body:xe(t.errorText),bodyStyle:"tool-status-fail"}),a}function jh(t){if(t.editDiff!==void 0)return[];let e=[],n=t.detailFull??t.detail;if(n)for(let s of n.split(`
86
+ `),r=!0),{text:s,truncated:r}}function ro(t,e=Date.now()){let n=t.initialTitle,s=t.latestTitle,r=n.toLowerCase(),i=s.toLowerCase(),o;s===n||i.includes(r)?o=s:r.includes(i)?o=n:o=`${n} \xB7 ${s}`;let a=[];if(t.detail){let l=t.detail,f=o.toLowerCase(),u=l.toLowerCase();(u.startsWith(`${f} `)||u.startsWith(`${f} `))&&(l=l.slice(o.length).trimStart());let p=o.includes(l)||t.detailFull!==void 0&&o.includes(t.detailFull);if(l.length>0&&!p){let m=o.length+3;if(o=`${o} \xB7 ${l}`,l.startsWith("\u2026")){let g=t.locations?.[0]?.path??t.detailFull??"";(g.startsWith("/")||g.startsWith("~"))&&a.push({start:m,end:m+l.length,url:g})}}}if(t.startedAt!==void 0){let l=t.endedAt??e;o=`${o} \xB7 ${In(l-t.startedAt)}`}let d={prefix:` ${ik(t.status)} `,prefixStyle:ok(t.status),body:o,bodyStyle:uk(t.status)};a.length>0&&(d.links=a);let c=[d];return t.status==="failed"&&t.errorText&&c.push({prefix:" ",body:xe(t.errorText),bodyStyle:"tool-status-fail"}),c}function jh(t){if(t.editDiff!==void 0)return[];let e=[],n=t.detailFull??t.detail;if(n)for(let s of n.split(`
87
87
  `))e.push({prefix:" ",body:xe(s),bodyStyle:"dim"});if(t.status==="failed"&&t.errorText&&e.push({prefix:" ",body:xe(t.errorText),bodyStyle:"tool-status-fail"}),t.resultText){let s=t.resultText.split(`
88
88
  `),r=t.locations?.[0]?.path??t.detailFull??t.detail,i=ek(r);if(i.length>0){let o=Hh(i,s.map(a=>xe(a)));for(let a of o){let d={prefix:" ",body:a.body,bodyStyle:"code",fillRow:!0};a.ansi&&(d.ansi=!0),e.push(d)}}else for(let o of s)e.push({prefix:" ",body:xe(o),bodyStyle:"dim"});t.resultTruncated&&e.push({prefix:" ",body:"\u2026 (truncated)",bodyStyle:"dim"})}return e}function Wh(t){qh=t>=0?t:0}function il(t,e,n={}){let s=[],r=t.oldRef!==void 0||t.newRef!==void 0,i;if(r){let c=(t.oldRef?.bytes??0)+(t.newRef?.bytes??0);i=` (~${tk(c)})`}else{let c=sk(t),l=[];c.added>0&&l.push(`+${c.added}`),c.removed>0&&l.push(`-${c.removed}`),i=l.length>0?` (${l.join(" ")})`:""}let o=c=>({prefix:" ",body:`${c?"\u25BE":"\u25B8"} Edited ${xe(Ue(t.path))}${i}`,bodyStyle:"dim"});if(e==="edit")return t.path&&s.push(o(!1)),s;if(r)return t.path&&(s.push(o(!0)),s.push(n.deferredStatus==="error"?{prefix:" ",body:"\u26A0 failed to load diff",bodyStyle:"tool-status-fail"}:{prefix:" ",body:"\u22EF fetching diff\u2026",bodyStyle:"dim"}),s.unshift({body:""})),s;let a=ol(t,{maxLines:1/0});if(a.length===0)return t.path&&s.push(o(!1)),s;t.path&&s.push(o(!0));let d="```diff\n"+a+"\n```";return s.push(...gs(d)),s.length>0&&s.unshift({body:""}),s}function Jh(t){let e=Qe(t.oldText).split(`
89
89
  `),n=Qe(t.newText).split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydra-acp/cli",
3
- "version": "0.1.83",
3
+ "version": "0.1.84",
4
4
  "description": "Multi-client ACP session daemon: spawn agents, attach over WSS, multiplex sessions across editors.",
5
5
  "license": "MIT",
6
6
  "type": "module",