dispach 0.2.1 → 0.2.3
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/README.md +94 -36
- package/dist/APEv2Parser-ysjr6adv.js +5 -0
- package/dist/{FlacParser-bf8y3e0w.js.map → APEv2Parser-ysjr6adv.js.map} +1 -1
- package/dist/{AiffParser-tbx3xkmk.js → AiffParser-9hj6fpmy.js} +3 -3
- package/dist/{AiffParser-tbx3xkmk.js.map → AiffParser-9hj6fpmy.js.map} +1 -1
- package/dist/App-2f72vhjv.js +11 -0
- package/dist/{App-hjn867nc.js.map → App-2f72vhjv.js.map} +3 -3
- package/dist/{AsfParser-d784ak3y.js → AsfParser-7emspn04.js} +3 -3
- package/dist/{AsfParser-d784ak3y.js.map → AsfParser-7emspn04.js.map} +1 -1
- package/dist/{ConfigEditor-g7eb2wsm.js → ConfigEditor-vk7vxaa6.js} +3 -3
- package/dist/{ConfigEditor-g7eb2wsm.js.map → ConfigEditor-vk7vxaa6.js.map} +1 -1
- package/dist/{DsdiffParser-vxnfx80c.js → DsdiffParser-dz88pnnr.js} +3 -3
- package/dist/{DsdiffParser-vxnfx80c.js.map → DsdiffParser-dz88pnnr.js.map} +1 -1
- package/dist/{DsfParser-0xsh0zzk.js → DsfParser-qgh63tbs.js} +3 -3
- package/dist/{DsfParser-0xsh0zzk.js.map → DsfParser-qgh63tbs.js.map} +1 -1
- package/dist/FlacParser-drm5wq0p.js +5 -0
- package/dist/{APEv2Parser-9wqew3zv.js.map → FlacParser-drm5wq0p.js.map} +1 -1
- package/dist/{KeyProbe-w8c37s9q.js → KeyProbe-5anphmb7.js} +3 -3
- package/dist/{KeyProbe-w8c37s9q.js.map → KeyProbe-5anphmb7.js.map} +1 -1
- package/dist/{MP4Parser-tq7r7wd4.js → MP4Parser-yr7p3z12.js} +3 -3
- package/dist/{MP4Parser-tq7r7wd4.js.map → MP4Parser-yr7p3z12.js.map} +1 -1
- package/dist/{MatroskaParser-a79gsmzb.js → MatroskaParser-jkbsbsk3.js} +3 -3
- package/dist/{MatroskaParser-a79gsmzb.js.map → MatroskaParser-jkbsbsk3.js.map} +1 -1
- package/dist/{MpegParser-zs61b3wq.js → MpegParser-t93vwnew.js} +3 -3
- package/dist/{MpegParser-zs61b3wq.js.map → MpegParser-t93vwnew.js.map} +1 -1
- package/dist/{MusepackParser-bp8dm6nz.js → MusepackParser-6e8kbh2d.js} +3 -3
- package/dist/{MusepackParser-bp8dm6nz.js.map → MusepackParser-6e8kbh2d.js.map} +1 -1
- package/dist/OggParser-ggcypmag.js +5 -0
- package/dist/{OggParser-7pxr1sn9.js.map → OggParser-ggcypmag.js.map} +1 -1
- package/dist/Picker-j7txnm7w.js +5 -0
- package/dist/{Picker-b09hr4tk.js.map → Picker-j7txnm7w.js.map} +1 -1
- package/dist/SessionPicker-hpv2ncsb.js +5 -0
- package/dist/{SessionPicker-wtfxwdxg.js.map → SessionPicker-hpv2ncsb.js.map} +3 -3
- package/dist/SkillBrowser-qc542n71.js +5 -0
- package/dist/{SkillBrowser-p9ht63c7.js.map → SkillBrowser-qc542n71.js.map} +1 -1
- package/dist/{WavPackParser-gpf3r92t.js → WavPackParser-jw9stzqp.js} +3 -3
- package/dist/{WavPackParser-gpf3r92t.js.map → WavPackParser-jw9stzqp.js.map} +1 -1
- package/dist/{WaveParser-3kcak550.js → WaveParser-epmncs9w.js} +3 -3
- package/dist/{WaveParser-3kcak550.js.map → WaveParser-epmncs9w.js.map} +1 -1
- package/dist/WizardApp-pgzcz9zq.js +5 -0
- package/dist/{WizardApp-494018sk.js.map → WizardApp-pgzcz9zq.js.map} +3 -3
- package/dist/{channels-yhdvxxrb.js → channels-m8nambmm.js} +14 -14
- package/dist/{channels-yhdvxxrb.js.map → channels-m8nambmm.js.map} +1 -1
- package/dist/client.d.ts +285 -1
- package/dist/client.js +11 -11
- package/dist/client.js.map +5 -5
- package/dist/components/App.d.ts.map +1 -1
- package/dist/{config-g0ybmm4t.js → config-hmgrqgf2.js} +17 -17
- package/dist/{config-g0ybmm4t.js.map → config-hmgrqgf2.js.map} +1 -1
- package/dist/{credential-pkme1sfe.js → credential-nkb2ya59.js} +5 -5
- package/dist/{credential-pkme1sfe.js.map → credential-nkb2ya59.js.map} +1 -1
- package/dist/{index-q8b1fc3k.js → index-0444sh6x.js} +4 -4
- package/dist/{index-q8b1fc3k.js.map → index-0444sh6x.js.map} +1 -1
- package/dist/{index-ec101x93.js → index-095hrkyr.js} +6 -6
- package/dist/{index-ec101x93.js.map → index-095hrkyr.js.map} +1 -1
- package/dist/index-1mbdz3f7.js +12 -0
- package/dist/{index-3fgq1acj.js.map → index-1mbdz3f7.js.map} +3 -3
- package/dist/index-1x8mzvz7.js +6 -0
- package/dist/{index-f056wkb4.js.map → index-1x8mzvz7.js.map} +1 -1
- package/dist/{index-633eqxry.js → index-22fzzn7z.js} +7 -7
- package/dist/{index-633eqxry.js.map → index-22fzzn7z.js.map} +1 -1
- package/dist/index-2bsardvh.js +5 -0
- package/dist/{index-9dmgk6d3.js.map → index-2bsardvh.js.map} +2 -2
- package/dist/{index-thmq816c.js → index-2zjh5zd5.js} +4 -4
- package/dist/{index-thmq816c.js.map → index-2zjh5zd5.js.map} +1 -1
- package/dist/{index-ad5c9t83.js → index-308y9xt0.js} +4 -4
- package/dist/{index-ad5c9t83.js.map → index-308y9xt0.js.map} +1 -1
- package/dist/{index-t6xnecdx.js → index-323jvr1g.js} +4 -4
- package/dist/{index-t6xnecdx.js.map → index-323jvr1g.js.map} +1 -1
- package/dist/{index-mn34kj95.js → index-3826kf9t.js} +5 -5
- package/dist/{index-mn34kj95.js.map → index-3826kf9t.js.map} +1 -1
- package/dist/index-38gs9anh.js +9 -0
- package/dist/{index-akv6e7ge.js.map → index-38gs9anh.js.map} +1 -1
- package/dist/index-3c5jt6by.js +5 -0
- package/dist/{index-3b3h8kyh.js.map → index-3c5jt6by.js.map} +2 -2
- package/dist/{index-a6mtqkth.js → index-3vzf253k.js} +7 -7
- package/dist/{index-a6mtqkth.js.map → index-3vzf253k.js.map} +1 -1
- package/dist/{index-5m9wydxb.js → index-42e29zs4.js} +4 -4
- package/dist/{index-5m9wydxb.js.map → index-42e29zs4.js.map} +1 -1
- package/dist/{index-v7mz396x.js → index-4fj1k64j.js} +4 -4
- package/dist/{index-v7mz396x.js.map → index-4fj1k64j.js.map} +1 -1
- package/dist/{index-s2tzq27a.js → index-51x0n5z0.js} +5 -5
- package/dist/{index-s2tzq27a.js.map → index-51x0n5z0.js.map} +1 -1
- package/dist/index-836hc2h1.js +6 -0
- package/dist/{index-xa9crtzq.js.map → index-836hc2h1.js.map} +2 -2
- package/dist/index-8edck2pr.js +6 -0
- package/dist/{index-7gsbzvnc.js.map → index-8edck2pr.js.map} +1 -1
- package/dist/index-8tmv33mr.js +6 -0
- package/dist/{index-vw2hf4d8.js.map → index-8tmv33mr.js.map} +1 -1
- package/dist/index-9t4dz145.js +8 -0
- package/dist/{index-0mz7wpbw.js.map → index-9t4dz145.js.map} +2 -2
- package/dist/{index-81vj1bxe.js → index-bqdkm3de.js} +4 -4
- package/dist/{index-81vj1bxe.js.map → index-bqdkm3de.js.map} +1 -1
- package/dist/index-djeqvfms.js +74 -0
- package/dist/index-djeqvfms.js.map +13 -0
- package/dist/{index-307qmvb0.js → index-dpcm1j62.js} +28 -28
- package/dist/{index-307qmvb0.js.map → index-dpcm1j62.js.map} +1 -1
- package/dist/index-dv9pdjy4.js +429 -0
- package/dist/index-dv9pdjy4.js.map +12 -0
- package/dist/{index-j20k6k0m.js → index-dzy19wtf.js} +4 -4
- package/dist/{index-j20k6k0m.js.map → index-dzy19wtf.js.map} +1 -1
- package/dist/{index-9qv87rq7.js → index-eztfverw.js} +7 -7
- package/dist/{index-9qv87rq7.js.map → index-eztfverw.js.map} +1 -1
- package/dist/{index-myg5enf5.js → index-fbsrhcga.js} +4 -4
- package/dist/{index-myg5enf5.js.map → index-fbsrhcga.js.map} +1 -1
- package/dist/{index-6r9h7ftn.js → index-fxpmx6cr.js} +117 -117
- package/dist/index-fxpmx6cr.js.map +21 -0
- package/dist/{index-ye2yb3xf.js → index-hgm2gchq.js} +6 -6
- package/dist/{index-ye2yb3xf.js.map → index-hgm2gchq.js.map} +1 -1
- package/dist/index-hpvfqq6r.js +1252 -0
- package/dist/{index-26ejkp8q.js.map → index-hpvfqq6r.js.map} +30 -26
- package/dist/{index-y34s71qe.js → index-hrwakb11.js} +3 -3
- package/dist/{index-y34s71qe.js.map → index-hrwakb11.js.map} +1 -1
- package/dist/{index-qh82wtpa.js → index-jc4kmfwa.js} +4 -4
- package/dist/{index-qh82wtpa.js.map → index-jc4kmfwa.js.map} +1 -1
- package/dist/{index-twcgf73h.js → index-jff5q27j.js} +4 -4
- package/dist/{index-twcgf73h.js.map → index-jff5q27j.js.map} +1 -1
- package/dist/index-k8e9f466.js +110 -0
- package/dist/index-k8e9f466.js.map +13 -0
- package/dist/{index-trx9xb59.js → index-m6fqx0ch.js} +7 -7
- package/dist/{index-trx9xb59.js.map → index-m6fqx0ch.js.map} +1 -1
- package/dist/{index-ac2wzspd.js → index-mjfv7k5w.js} +4 -4
- package/dist/{index-ac2wzspd.js.map → index-mjfv7k5w.js.map} +1 -1
- package/dist/index-nvc24414.js +6 -0
- package/dist/{index-1f1erzfx.js.map → index-nvc24414.js.map} +1 -1
- package/dist/index-nxhqf597.js +6 -0
- package/dist/{index-w97gprre.js.map → index-nxhqf597.js.map} +1 -1
- package/dist/{index-jh2az41t.js → index-p6ya59m6.js} +5 -5
- package/dist/{index-jh2az41t.js.map → index-p6ya59m6.js.map} +1 -1
- package/dist/{index-psk6q25h.js → index-pqw1n1pv.js} +4 -4
- package/dist/{index-psk6q25h.js.map → index-pqw1n1pv.js.map} +1 -1
- package/dist/{index-6c4p19m1.js → index-pszmnhgq.js} +2 -2
- package/dist/index-qgsdgbk8.js +5 -0
- package/dist/{index-wk6andxq.js.map → index-qgsdgbk8.js.map} +2 -2
- package/dist/index-qv6ktepc.js +6 -0
- package/dist/index-qv6ktepc.js.map +10 -0
- package/dist/{index-pdsey1ab.js → index-ry6a4bqh.js} +62 -62
- package/dist/{index-pdsey1ab.js.map → index-ry6a4bqh.js.map} +1 -1
- package/dist/{index-x9z2xnct.js → index-sh44ymqz.js} +5 -5
- package/dist/{index-x9z2xnct.js.map → index-sh44ymqz.js.map} +1 -1
- package/dist/{index-zg89tq04.js → index-snz49ndn.js} +4 -4
- package/dist/{index-zg89tq04.js.map → index-snz49ndn.js.map} +1 -1
- package/dist/{index-zjphh8ch.js → index-xg7s813b.js} +4 -4
- package/dist/{index-zjphh8ch.js.map → index-xg7s813b.js.map} +1 -1
- package/dist/{index-gqaa06yh.js → index-y7dxq4a4.js} +9 -9
- package/dist/{index-gqaa06yh.js.map → index-y7dxq4a4.js.map} +1 -1
- package/dist/index-ytxbw8py.js +63 -0
- package/dist/{index-0pddq849.js.map → index-ytxbw8py.js.map} +2 -2
- package/dist/index-yw3fby4n.js +6 -0
- package/dist/{index-4emtktc0.js.map → index-yw3fby4n.js.map} +2 -2
- package/dist/{index-skkddg44.js → index-zw6wyas6.js} +4 -4
- package/dist/{index-skkddg44.js.map → index-zw6wyas6.js.map} +1 -1
- package/dist/index.js +304 -288
- package/dist/index.js.map +15 -12
- package/dist/init.d.ts.map +1 -1
- package/dist/lib/agent-template.d.ts +5 -0
- package/dist/lib/agent-template.d.ts.map +1 -1
- package/dist/lib/commands.d.ts.map +1 -1
- package/dist/lib/init-flow.d.ts +7 -30
- package/dist/lib/init-flow.d.ts.map +1 -1
- package/dist/lib/owner.d.ts +49 -0
- package/dist/lib/owner.d.ts.map +1 -0
- package/dist/lib/presets.d.ts +44 -0
- package/dist/lib/presets.d.ts.map +1 -0
- package/dist/lib/provision.d.ts +8 -1
- package/dist/lib/provision.d.ts.map +1 -1
- package/dist/lib/relay-client.d.ts +17 -0
- package/dist/lib/relay-client.d.ts.map +1 -0
- package/dist/lib/schema.d.ts +2 -0
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/sessions-view.d.ts +2 -0
- package/dist/lib/sessions-view.d.ts.map +1 -1
- package/dist/lib/source.d.ts +25 -0
- package/dist/lib/source.d.ts.map +1 -1
- package/dist/lib/types.d.ts +8 -2
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/wizard.d.ts.map +1 -1
- package/dist/owner.d.ts +16 -0
- package/dist/owner.d.ts.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/serve.d.ts.map +1 -1
- package/dist/transcript.d.ts.map +1 -1
- package/dist/{web-f6869dy2.js → web-gfv0mzgs.js} +7 -7
- package/dist/{web-f6869dy2.js.map → web-gfv0mzgs.js.map} +1 -1
- package/dist/wire.d.ts +50 -0
- package/dist/wire.js +5 -5
- package/dist/wire.js.map +4 -4
- package/dist/wrapper-f662ny3r.js +5 -0
- package/dist/{wrapper-52c0vacs.js.map → wrapper-f662ny3r.js.map} +1 -1
- package/package.json +4 -1
- package/dist/APEv2Parser-9wqew3zv.js +0 -5
- package/dist/App-hjn867nc.js +0 -11
- package/dist/FlacParser-bf8y3e0w.js +0 -5
- package/dist/OggParser-7pxr1sn9.js +0 -5
- package/dist/Picker-b09hr4tk.js +0 -5
- package/dist/SessionPicker-wtfxwdxg.js +0 -5
- package/dist/SkillBrowser-p9ht63c7.js +0 -5
- package/dist/WizardApp-494018sk.js +0 -5
- package/dist/index-0mz7wpbw.js +0 -8
- package/dist/index-0pddq849.js +0 -63
- package/dist/index-1f1erzfx.js +0 -6
- package/dist/index-26ejkp8q.js +0 -1194
- package/dist/index-3b3h8kyh.js +0 -5
- package/dist/index-3fgq1acj.js +0 -12
- package/dist/index-4emtktc0.js +0 -6
- package/dist/index-4t3p7vm9.js +0 -6
- package/dist/index-4t3p7vm9.js.map +0 -10
- package/dist/index-6r9h7ftn.js.map +0 -21
- package/dist/index-7gsbzvnc.js +0 -6
- package/dist/index-94k4mh6s.js +0 -96
- package/dist/index-94k4mh6s.js.map +0 -13
- package/dist/index-9dmgk6d3.js +0 -5
- package/dist/index-akv6e7ge.js +0 -9
- package/dist/index-f056wkb4.js +0 -6
- package/dist/index-s57ztjhq.js +0 -74
- package/dist/index-s57ztjhq.js.map +0 -13
- package/dist/index-vw2hf4d8.js +0 -6
- package/dist/index-w97gprre.js +0 -6
- package/dist/index-wk6andxq.js +0 -5
- package/dist/index-xa9crtzq.js +0 -6
- package/dist/index-z0dgxd7d.js +0 -429
- package/dist/index-z0dgxd7d.js.map +0 -11
- package/dist/wrapper-52c0vacs.js +0 -5
- /package/dist/{index-6c4p19m1.js.map → index-pszmnhgq.js.map} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{i,D,ze}from"./index-j20k6k0m.js";import{_n,QA,kn}from"./index-1f1erzfx.js";import{Ke}from"./index-myg5enf5.js";import{et,Re}from"./index-5m9wydxb.js";import{tt}from"./index-f056wkb4.js";import{jA,Oo}from"./index-thmq816c.js";import{en,mt}from"./index-trx9xb59.js";import{Hs,Ks,Ys}from"./index-qh82wtpa.js";import{vo,Po,uA,dA,EA}from"./index-vw2hf4d8.js";import{Box as g,Text as u,useInput as U}from"ink";import{useCallback as X,useEffect as Y,useState as B}from"react";import{Box as C,Text as E}from"ink";import{jsx as b,jsxs as N}from"react/jsx-runtime";var z={ok:i.success,warn:i.warning,off:i.muted},R={title:{color:i.accent,bold:!0},summary:{dim:!0},state:{},warning:{color:i.warning}};function W(e){return Math.max(vo,Math.min(Po,e))}function k({header:e,footer:l,children:s}){let S=Ke(),w=W(S.columns),f=w-4,L=Hs(e,f),T=e.state??[];return N(C,{flexDirection:"column",width:w,children:[b(C,{flexDirection:"column",borderStyle:ze,borderColor:i.borderActive,paddingX:1,children:L.map((d)=>d.kind==="state"?b(E,{wrap:"truncate",children:T.map((n,c)=>N(E,{color:z[n.tone],children:[c===0?"":" · ",n.label]},n.label))},d.text):b(E,{wrap:"truncate",bold:R[d.kind].bold===!0,dimColor:R[d.kind].dim===!0,...R[d.kind].color===void 0?{}:{color:R[d.kind].color},children:d.text},d.text))}),b(C,{flexDirection:"column",marginTop:1,children:s}),l===void 0||l.length===0?null:b(C,{marginTop:1,children:N(E,{dimColor:!0,wrap:"truncate",children:[" ",Ks(l,f)]})})]})}import{jsx as t,jsxs as y}from"react/jsx-runtime";function ke({load:e,install:l,agents:s,target:S,focused:w=!0,onDone:f,title:L}){let T=Ke(),d=Math.max(uA,Math.min(dA,T.rows-EA)),[n,c]=B({kind:"fetching",status:"reading the catalogue"}),[x,P]=B([]),[h,v]=B({cursor:{index:0,count:0},chosen:[]}),[H,O]=B({index:0,count:s.length});Y(()=>{let o=!0;return e((r)=>{if(o)c((a)=>a.kind==="fetching"?{...a,status:r}:a)}).then((r)=>{if(!o)return;P(r);let a=jA(r);v({cursor:{index:kn(a),count:r.length},chosen:[]}),c(r.length===0?{kind:"empty"}:{kind:"picking"})}).catch((r)=>{if(!o)return;c({kind:"failed",message:r instanceof Error?r.message:String(r)})}),()=>{o=!1}},[e]);let _=jA(x),M=X((o)=>{let r=Oo(x,h.chosen);c({kind:"installing",count:r.length}),l(r,o).then((a)=>c({kind:"done",report:a})).catch((a)=>c({kind:"failed",message:a instanceof Error?a.message:String(a)}))},[x,h.chosen,l]);U((o,r)=>{if(n.kind==="done"){f(n.report);return}if(n.kind==="failed"||n.kind==="empty"){f(void 0);return}if(n.kind==="fetching"||n.kind==="installing"){if(en(o,r).kind==="cancel")f(void 0);return}if(n.kind==="picking"){let m=en(o,r);switch(m.kind){case"move":case"toggle":case"all":v((I)=>QA(I,m.kind==="move"?{kind:"move",move:m.move}:{kind:m.kind},_));return;case"none-selected":v((I)=>QA(I,{kind:"none"},_));return;case"confirm":if(h.chosen.length===0)return;if(S!==void 0)return M(S);if(s.length===1)return M(s[0]?.manifestPath??"");c({kind:"agent"});return;case"cancel":f(void 0);return;case"none":return}}let a=mt(o,r);switch(a.kind){case"move":O((m)=>Re(m,a.move));return;case"choose":{let m=s[H.index];if(m!==void 0)M(m.manifestPath);return}case"back":c({kind:"picking"});return;case"exit":f(void 0);return;case"none":return}},{isActive:w});let A=h.chosen.length,p={title:L,summary:K(n,x.length,A)};if(n.kind==="fetching")return y(k,{header:p,footer:[{key:"esc",does:"stop waiting"}],children:[t(g,{marginLeft:2,children:t(tt,{label:n.status})}),t(g,{marginLeft:2,marginTop:1,children:t(u,{dimColor:!0,children:"once per machine, shared by every agent on it"})})]});if(n.kind==="failed")return t(k,{header:p,footer:[{key:"any key",does:"back"}],children:t(g,{marginLeft:2,children:y(u,{color:i.error,children:[D.error,n.message]})})});if(n.kind==="empty")return t(k,{header:p,footer:[{key:"any key",does:"back"}],children:y(g,{marginLeft:2,flexDirection:"column",children:[t(u,{color:i.muted,children:"no catalogue could be read"}),t(u,{dimColor:!0,children:"`sources update` reports why"})]})});if(n.kind==="installing")return t(k,{header:p,children:t(g,{marginLeft:2,children:t(tt,{label:`installing ${n.count} skill${n.count===1?"":"s"}`})})});if(n.kind==="done")return t(k,{header:p,footer:[{key:"any key",does:"back"}],children:t(F,{report:n.report})});if(n.kind==="agent")return t(k,{header:p,footer:[{key:"↑↓",does:"move"},{key:"enter",does:"install"},{key:"esc",does:"back"}],children:t(et,{items:s.map((o)=>({label:o.name??o.ref,hint:o.problem===void 0?`${o.modelId??"?"} ${D.bullet}${o.ref}`:`⚠ ${o.problem}`})),index:H.index,numbered:!0})});return t(k,{header:p,footer:[{key:"↑↓",does:"move"},{key:"space",does:"tick"},{key:"a/n",does:"all/none"},{key:"enter",does:S===void 0?"continue":"install"},Ys],children:t(_n,{rows:x,index:h.cursor.index,chosen:h.chosen,window:d,width:T.columns})})}function K(e,l,s){switch(e.kind){case"fetching":return"fetching the catalogue";case"failed":return"could not be read";case"empty":return"nothing to show";case"installing":return"installing";case"done":return`installed ${e.report.installed.length} of ${e.report.total}`;case"agent":return`${s} to install · pick an agent`;case"picking":return s===0?`${l} rows · nothing ticked yet`:`${s} ticked of ${l} rows`}}function F({report:e}){return y(g,{flexDirection:"column",marginLeft:2,children:[y(u,{color:e.failed.length===0?i.success:i.warning,children:[D.check,`installed ${e.installed.length} of ${e.total} skill${e.total===1?"":"s"}`]}),e.installed.length>0?t(u,{dimColor:!0,wrap:"truncate",children:e.installed.join(", ")}):null,e.failed.map((l)=>y(u,{color:i.error,wrap:"truncate",children:[D.error,l.name," — ",l.reason]},l.name)),e.runnable>0?t(g,{marginTop:1,children:t(u,{dimColor:!0,wrap:"truncate",children:`${e.runnable} runnable file${e.runnable===1?"":"s"} across ${e.withCode} skill${e.withCode===1?"":"s"} — \`skills show <agent> <skill>\` names them`})}):null,t(g,{marginTop:1,children:t(u,{dimColor:!0,children:"restart the agent: the catalogue is scanned once at boot"})})]})}export{ke as SkillBrowser};
|
|
3
|
-
|
|
4
|
-
//# debugId=E9C504DC9ED3293C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=SkillBrowser-p9ht63c7.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t}from"./index-26ejkp8q.js";import{jA,Oo}from"./index-thmq816c.js";import{i,D,ze}from"./index-j20k6k0m.js";import"./index-s57ztjhq.js";import"./index-6r9h7ftn.js";import{_A}from"./index-pdsey1ab.js";import{BA}from"./index-w97gprre.js";import{Nn,yA,Mn}from"./index-zg89tq04.js";import{_n,QA,kn}from"./index-1f1erzfx.js";import{et,Re}from"./index-5m9wydxb.js";import{tt}from"./index-f056wkb4.js";import"./index-jh2az41t.js";import"./index-mn34kj95.js";import{On}from"./index-7gsbzvnc.js";import{Ke}from"./index-myg5enf5.js";import{Ct,LA,vA,un,iA,Vt}from"./index-z0dgxd7d.js";import{he,Le,en,vn}from"./index-trx9xb59.js";import"./index-ad5c9t83.js";import"./index-akv6e7ge.js";import"./index-a6mtqkth.js";import"./index-0mz7wpbw.js";import{ke,js}from"./index-qh82wtpa.js";import{be,_o,Fo}from"./index-vw2hf4d8.js";import{Box as p,Text as g,useApp as re,useInput as te}from"ink";import{useCallback as oe,useEffect as E,useReducer as ie,useState as ae}from"react";import{Box as j,Text as K}from"ink";import{jsx as N,jsxs as J}from"react/jsx-runtime";function _({rows:e}){let r=e.reduce((n,c)=>Math.max(n,c.label.length),0);return N(j,{flexDirection:"column",borderStyle:ze,borderColor:i.border,paddingX:1,paddingY:1,children:e.map((n)=>J(K,{children:[N(K,{dimColor:!0,children:n.label.padEnd(r+2)}),n.value]},n.label))})}import{Box as Q,Text as T}from"ink";import{jsx as C,jsxs as R}from"react/jsx-runtime";function Y({step:e,total:r,answered:n,hint:c,children:l}){let u=Math.max(18,...n.map((o)=>o.label.length+2));return R(Q,{flexDirection:"column",children:[n.map((o)=>R(T,{children:[C(T,{color:i.success,children:D.check}),C(T,{dimColor:!0,children:o.label.padEnd(u)}),o.value]},o.label)),C(Q,{flexDirection:"column",borderStyle:ze,borderColor:i.border,paddingX:1,paddingY:1,marginTop:n.length>0?1:0,children:l}),R(T,{dimColor:!0,children:["step ",e," of ",r," ",D.bullet,c]})]})}function H(e,r){let n={given:e,log:[],phase:"asking",editor:he,select:{index:0,count:Ct.length},error:void 0,defaults:r};return m(n)===void 0?A(n):n}function y(e){return{...Object.fromEntries(e.log.map((n)=>[n.step,n.value])),...e.given}}function m(e){return iA(y(e),e.defaults)}function v(e){return e.phase==="asking"&&m(e)?.options!==void 0}function q(e){return m(e)?.options??[]}function U(e){let r=m(e)?.step;return e.phase==="asking"&&r!==void 0&&un.has(r)}function X(e){let r={...y(e)},n=0;for(;;){let l=iA(r,e.defaults);if(l===void 0)break;n+=1,r[l.step]=l.fallback===""?"(x)":l.fallback}let c=e.log.length+Object.keys(e.given).length;return{asked:c+(e.phase==="asking"?1:0),total:c+n}}var ee=2;function A(e){return{...e,phase:"confirm",editor:he,select:{index:0,count:ee},error:void 0}}function W(e){let r=iA(y(e),e.defaults),n=r?.options;return{editor:he,select:{index:ne(r),count:n===void 0?Ct.length:n.length},error:void 0}}function ne(e){let r=e?.options;if(r===void 0)return 0;let n=Number(e?.fallback)-1;return Number.isInteger(n)&&n>=0&&n<r.length?n:0}function w(e,r){if(e.phase==="done"||e.phase==="aborted")return e;switch(r.kind){case"abort":return{...e,phase:"aborted"};case"edit":if(e.phase!=="asking")return e;return{...e,editor:Le(e.editor,r.intent),error:void 0};case"list":{let n=r.intent;if(n.kind==="move")return{...e,select:Re(e.select,n.move),error:void 0};if(n.kind==="choose")return w(e,{kind:"commit"});if(n.kind==="back")return w(e,{kind:"back"});if(n.kind==="exit")return{...e,phase:"aborted"};return e}case"back":{if(e.phase==="confirm"){if(e.log.length===0)return{...e,phase:"asking",...W(e)};let l=e.log.slice(0,-1),u={...e,phase:"asking",log:l};return{...u,...W(u)}}if(e.log.length===0)return e;let n=e.log.slice(0,-1),c={...e,log:n};return{...c,...W(c)}}case"commit":{if(e.phase==="confirm")return e.select.index===0?{...e,phase:"done"}:w(e,{kind:"back"});let n=m(e);if(n===void 0)return A(e);let c=n.options!==void 0?n.options[e.select.index]?.value??"":e.editor.value.trim()===""?n.fallback:e.editor.value,l=Vt(n.step,c);if(!l.ok)return{...e,error:l.reason};let u={...e,log:[...e.log,{step:n.step,value:l.value}]},o={...u,...W(u)};return m(o)===void 0?A(o):o}}}function G(e){if(e==="")return"";if(e.length<=8)return"•".repeat(e.length);return`${e.slice(0,3)}${"•".repeat(6)}${e.slice(-2)}`}function V(e){let r=y(e),n=r.preset===void 0?void 0:LA(r.preset),c=`${r.model??""} at ${r.baseUrl??""}`,l=r.apiKeyEnv??n?.apiKeyEnv,u=l===void 0?" (no key)":` (${l}=${r.apiKey===void 0||r.apiKey===""?"not set yet":G(r.apiKey)})`;return[{label:"agent",value:r.name??""},{label:"for",value:`${r.user??""} — ${r.purpose??""}`},{label:"endpoint",value:`${c}${u}`},{label:"directory",value:r.dir??vA(r.dirChoice,r.name,e.defaults)??""}]}function Z(e){let r={user:"Your name",name:"Agent name",purpose:"Purpose",preset:"Endpoint",model:"Model",baseUrl:"Base URL",apiKeyEnv:"Key env var",apiKey:"API key",web:"Internet",webBackend:"Search backend",webKey:"Search key",system:"System access",composio:"Other apps",telegram:"Telegram",telegramAllow:"Telegram handle",telegramToken:"Bot token",whatsapp:"WhatsApp",whatsappNumber:"WhatsApp number",schedules:"none",server:"HTTP API",skills:"Skills",skillsSearch:"Skill search",skillsPick:"Skills picked",daemon:"Background service",serverToken:"API token",composioKey:"Composio key",dirChoice:"Location",dir:"Directory"};return e.log.map((n)=>({label:r[n.step],value:un.has(n.step)?G(n.value):n.value}))}import{jsx as s,jsxs as k}from"react/jsx-runtime";var de=16,se=5;function Ge({title:e,given:r,defaults:n,onDone:c}){let{exit:l}=re(),u=Ke(),[o,f]=ae({kind:"idle"}),[d,b]=ie((a,h)=>w(a,h),void 0,()=>H(r,n)),z=oe((a)=>{c(a),l()},[c,l]),P=d.log.some((a)=>a.step==="skills"&&a.value==="find");if(E(()=>{if(!P||o.kind!=="idle")return;f({kind:"fetching",status:"reading the catalogue"}),(async()=>{try{let a=await _A({onStatus:(x)=>f({kind:"fetching",status:x})});if(a.length===0){f({kind:"failed",message:"no catalogue could be read — carrying on without skills"});return}let h=jA(a);f({kind:"picking",rows:a,picked:{cursor:{index:kn(h),count:a.length},chosen:[]}})}catch(a){f({kind:"failed",message:a instanceof Error?a.message:String(a)})}})()},[P,o.kind]),E(()=>{if(o.kind!=="failed")return;let a=setTimeout(()=>f({kind:"done",refs:[]}),1400);return()=>clearTimeout(a)},[o]),E(()=>{if(d.phase==="done"){let a=o.kind==="done"?o.refs:[];z({...y(d),...a.length===0?{}:{skillsPick:a.join(",")}})}if(d.phase==="aborted")z(void 0)},[d,z,o]),te((a,h)=>{if(o.kind==="picking"){let O=o.rows,M=jA(O),S=en(a,h);switch(S.kind){case"move":case"toggle":case"all":f({...o,picked:QA(o.picked,S.kind==="move"?{kind:"move",move:S.move}:{kind:S.kind},M)});return;case"none-selected":f({...o,picked:QA(o.picked,{kind:"none"},M)});return;case"confirm":case"cancel":f({kind:"done",refs:S.kind==="cancel"?[]:Oo(O,o.picked.chosen).map((F)=>`${F.source}/${F.skill}`)});return;default:return}}if(o.kind==="fetching"||o.kind==="failed")return;let x=vn(a,h,{select:v(d)||d.phase==="confirm",empty:d.editor.value===""});switch(x.kind){case"abort":b({kind:"abort"});return;case"back":b({kind:"back"});return;case"commit":b({kind:"commit"});return;case"list":b({kind:"list",intent:x.intent});return;case"edit":b({kind:"edit",intent:x.intent});return}}),d.phase==="done"||d.phase==="aborted")return null;if(o.kind==="fetching")return k(p,{flexDirection:"column",children:[s(BA,{title:"Skills",lines:["choosing what this agent knows how to do"]}),s(p,{marginTop:1,paddingLeft:2,children:s(tt,{label:o.status})})]});if(o.kind==="failed")return k(p,{flexDirection:"column",children:[s(BA,{title:"Skills",lines:["carrying on without them"]}),s(p,{marginTop:1,paddingLeft:2,children:s(g,{color:i.warning,children:o.message})})]});if(o.kind==="picking"){let a=o.picked.chosen.length;return k(p,{flexDirection:"column",children:[s(BA,{title:"Skills",lines:["space ticks · a all · n none · enter continues · esc skips"]}),s(p,{marginTop:1,children:s(_n,{rows:o.rows,index:o.picked.cursor.index,chosen:o.picked.chosen,window:js(void 0,_o),width:ke(void 0,be)})}),s(p,{marginTop:1,paddingLeft:2,children:s(g,{color:a===0?i.muted:i.success,children:a===0?"nothing ticked — enter carries on without any":`${a} ticked`})})]})}let I=X(d),B=Mn(t.name,{columns:ke(u.columns,be)-yA,rows:Math.min(se,Math.max(0,u.rows-de))}),L=d.phase==="confirm"?"enter confirm · esc back · ^C quit — nothing written":"enter accepts · esc back · ^C quit — nothing written";return k(p,{flexDirection:"column",children:[B.lines.length>0?s(Nn,{lines:B.lines}):null,s(p,{marginTop:B.lines.length>0?1:0,children:k(g,{dimColor:!0,wrap:"truncate",children:[e," · a few questions — nothing is written until you confirm"]})}),d.phase==="confirm"?k(p,{flexDirection:"column",marginTop:1,children:[s(_,{rows:V(d)}),k(p,{marginTop:1,flexDirection:"column",children:[s(g,{children:"Write the files?"}),s(et,{items:[{label:"yes"},{label:"no, go back"}],index:d.select.index})]}),s(g,{dimColor:!0,children:L})]}):s(p,{marginTop:1,children:s(Y,{step:I.asked,total:I.total,answered:Z(d),hint:L,children:v(d)?k(p,{flexDirection:"column",children:[s(g,{children:m(d)?.prompt??""}),s(et,{items:q(d).map((a)=>({label:a.label,...a.hint===void 0?{}:{hint:a.hint}})),index:d.select.index,numbered:!0})]}):s(On,{label:m(d)?.prompt??"",editor:d.editor,columns:ke(u.columns,be)-yA,maxRows:Fo,placeholder:m(d)?.fallback??"",...d.error===void 0?{}:{error:d.error},...U(d)?{secret:!0}:{}})})}),d.error!==void 0&&(v(d)||d.phase==="confirm")?k(g,{color:i.error,children:[D.error,d.error]}):null]})}export{Ge as WizardApp};
|
|
3
|
-
|
|
4
|
-
//# debugId=C561CDE1D2ACAB2564756E2164756E21
|
|
5
|
-
//# sourceMappingURL=WizardApp-494018sk.js.map
|
package/dist/index-0mz7wpbw.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t,j,A,G,hn}from"./index-26ejkp8q.js";import{existsSync as l,mkdirSync as R,readdirSync as y,readFileSync as w,statSync as p,writeFileSync as S}from"node:fs";import{homedir as P}from"node:os";import{isAbsolute as k,join as i,resolve as m,sep as x}from"node:path";function f(n){return n!==void 0&&n!==""}function Wt(n=process.env){return{noColor:f(n.NO_COLOR),dumbTerminal:n.TERM==="dumb",ci:f(n.CI)&&n.CI!=="false",debug:f(n.DEBUG),sandboxHome:f(n[`${t.envPrefix}HOME`])?n[`${t.envPrefix}HOME`]:void 0,noEnhancedKeys:f(n[`${t.envPrefix}NO_CSI_U`])}}function we(n=process.env){return Wt(n).sandboxHome??i(P(),t.stateDir)}function ie(n){return i(we(n),"agents")}function mr(n){return i(we(n),"templates")}function F(n){return i(we(n),"store.db")}function se(n){return i(we(n),"plugins")}function Sr(n,e){return i(se(e),n)}function uo(n){let e=i(we(n),"logs","server");return{out:i(e,"out.log"),err:i(e,"err.log")}}function dn(n,e){let o=i(we(e),"logs");return{out:i(o,`${n}.out.log`),err:i(o,`${n}.err.log`)}}function b(n){return i(n,".api-token")}function En(n){try{let e=w(b(n),"utf8").trim();return e===""?void 0:e}catch{return}}function $r(n,e){R(n,{recursive:!0}),S(b(n),`${e}
|
|
3
|
-
`,{encoding:"utf8",mode:384})}function ks(n,e){let o=En(n);if(o!==void 0)return o;let s=[];try{s=y(n).sort()}catch{}let g=s.map((r)=>hn(i(n,r))[`${t.envPrefix}API_TOKEN`]).find((r)=>r!==void 0&&r!=="")??e();return $r(n,g),g}function FA(n,e){let o=m(ie(e)),s=m(n);return s===o||s.startsWith(o+x)}function Ls(n,e){if(FA(n,e))return;return`note: ${m(n)} is outside the sandbox (${ie(e)}) — this agent has no bare name, so every later command needs its path. Omit --dir to put it in the sandbox.`}function te(n){let e=ie(n),o;try{o=y(e)}catch{return[]}let s=[];for(let r of o.sort()){let c=i(e,r),a=i(c,"agent.yaml");try{if(!p(c).isDirectory())continue}catch{continue}if(!l(a))continue;let h=0;try{h=p(a).mtimeMs}catch{}try{let u=G(a);s.push({ref:r,dir:c,manifestPath:a,mtimeMs:h,...u.id===void 0?{}:{id:u.id},...u.name===void 0?{}:{name:u.name},...u.modelId===void 0?{}:{modelId:u.modelId}})}catch(u){s.push({ref:r,dir:c,manifestPath:a,mtimeMs:h,problem:u instanceof Error?u.message:String(u)})}}let d=new Map;for(let r of s){if(r.id===void 0)continue;d.set(r.id,[...d.get(r.id)??[],r])}let g=s.map((r)=>{if(r.id===void 0||(d.get(r.id)?.length??0)<2)return r;return{...r,problem:`manifest id "${r.id}" is shared with another sandbox agent — their sessions share one history`}});return[...g.filter((r)=>r.problem===void 0),...g.filter((r)=>r.problem!==void 0)]}function Fe(n,e,o=process.cwd()){let s=n.includes(x)||n.includes("/")||n.endsWith(".yaml")||n.endsWith(".yml"),d=k(n)?n:m(o,n);if(!s&&l(d)&&l(i(ie(e),n)))process.stderr.write(`note: using ./${n} from the current directory; a sandbox agent "${n}" also exists — run it from elsewhere, or as ${i(ie(e),n)}
|
|
4
|
-
`);if(s||l(d)){if(l(d)){if(p(d).isDirectory()){let a=i(d,"agent.yaml");if(l(a))return a;throw new A({code:"cli_agent_dir_without_manifest",message:`${n} is a directory with no agent.yaml inside.`,hint:"Point at the manifest itself, or at a directory that holds one. Sandbox agents are run by bare name, with no path separators."})}return d}throw new A({code:"cli_agent_path_missing",message:`${n} looks like a path, and nothing is there.`,hint:`Paths resolve against the current directory. For an agent in the sandbox, use its bare name — \`${t.slug} run <name>\` — which resolves under ${ie(e)}.`})}let g=i(ie(e),n,"agent.yaml");if(l(g))return g;let r=te(e).map((a)=>a.ref),c=j(n,r);throw new A({code:"cli_agent_unknown",message:`No agent named "${n}" in the sandbox${r.length===0?", which is empty":""}.`,hint:r.length===0?`Create one with \`${t.slug} init\`, or pass a path to an agent.yaml.`:`Known agents: ${r.join(", ")}.${c===void 0?"":` Did you mean ${c}?`} A path (./dir or file.yaml) is also accepted.`})}
|
|
5
|
-
export{Wt,we,ie,mr,F,se,Sr,uo,dn,En,$r,ks,FA,Ls,te,Fe};
|
|
6
|
-
|
|
7
|
-
//# debugId=E4534B796AA6A8D964756E2164756E21
|
|
8
|
-
//# sourceMappingURL=index-0mz7wpbw.js.map
|