dispach 0.2.2 → 0.2.4
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 +34 -27
- package/dist/APEv2Parser-x13n424p.js +5 -0
- package/dist/{FlacParser-7t7da7qy.js.map → APEv2Parser-x13n424p.js.map} +1 -1
- package/dist/{AiffParser-y21k3fak.js → AiffParser-ns1y9f0g.js} +3 -3
- package/dist/{AiffParser-y21k3fak.js.map → AiffParser-ns1y9f0g.js.map} +1 -1
- package/dist/App-wkpkwgjt.js +11 -0
- package/dist/{App-4w3qkcs4.js.map → App-wkpkwgjt.js.map} +3 -3
- package/dist/AsfParser-bae2a1yf.js +5 -0
- package/dist/{AsfParser-wd98k2h4.js.map → AsfParser-bae2a1yf.js.map} +1 -1
- package/dist/ConfigEditor-hy9jtas3.js +6 -0
- package/dist/{ConfigEditor-vk7vxaa6.js.map → ConfigEditor-hy9jtas3.js.map} +1 -1
- package/dist/DsdiffParser-s0zvxnfa.js +5 -0
- package/dist/{DsdiffParser-cbfaj500.js.map → DsdiffParser-s0zvxnfa.js.map} +1 -1
- package/dist/{DsfParser-tybrja4x.js → DsfParser-90mvzt4v.js} +3 -3
- package/dist/{DsfParser-tybrja4x.js.map → DsfParser-90mvzt4v.js.map} +1 -1
- package/dist/FlacParser-8xprykrh.js +5 -0
- package/dist/{APEv2Parser-etzjd528.js.map → FlacParser-8xprykrh.js.map} +1 -1
- package/dist/{KeyProbe-5anphmb7.js → KeyProbe-fk5krzks.js} +3 -3
- package/dist/{KeyProbe-5anphmb7.js.map → KeyProbe-fk5krzks.js.map} +1 -1
- package/dist/MP4Parser-nmvbkq21.js +5 -0
- package/dist/{MP4Parser-gc94h1n9.js.map → MP4Parser-nmvbkq21.js.map} +2 -2
- package/dist/{MatroskaParser-cy2k4fac.js → MatroskaParser-tsmz2qfq.js} +3 -3
- package/dist/{MatroskaParser-cy2k4fac.js.map → MatroskaParser-tsmz2qfq.js.map} +1 -1
- package/dist/{MpegParser-c460fwf0.js → MpegParser-y5fjpaz9.js} +3 -3
- package/dist/{MpegParser-c460fwf0.js.map → MpegParser-y5fjpaz9.js.map} +1 -1
- package/dist/MusepackParser-544q0byg.js +5 -0
- package/dist/{MusepackParser-8mq2eabg.js.map → MusepackParser-544q0byg.js.map} +2 -2
- package/dist/OggParser-v77rbjnt.js +5 -0
- package/dist/{OggParser-7dnc6apg.js.map → OggParser-v77rbjnt.js.map} +1 -1
- package/dist/Picker-32m79nmp.js +5 -0
- package/dist/{Picker-j7txnm7w.js.map → Picker-32m79nmp.js.map} +1 -1
- package/dist/SessionPicker-9p06npt5.js +5 -0
- package/dist/{SessionPicker-hpv2ncsb.js.map → SessionPicker-9p06npt5.js.map} +1 -1
- package/dist/SkillBrowser-ezdx3xsh.js +5 -0
- package/dist/{SkillBrowser-qc542n71.js.map → SkillBrowser-ezdx3xsh.js.map} +1 -1
- package/dist/WavPackParser-k623m0hk.js +5 -0
- package/dist/{WavPackParser-kt7cds9c.js.map → WavPackParser-k623m0hk.js.map} +1 -1
- package/dist/WaveParser-nj4p1vx8.js +5 -0
- package/dist/{WaveParser-g47ja0vy.js.map → WaveParser-nj4p1vx8.js.map} +1 -1
- package/dist/WizardApp-p350qspw.js +5 -0
- package/dist/{WizardApp-q4p979d1.js.map → WizardApp-p350qspw.js.map} +1 -1
- package/dist/channels-a9zx9yba.js +31 -0
- package/dist/{channels-4t89qpdt.js.map → channels-a9zx9yba.js.map} +1 -1
- package/dist/client.d.ts +43 -0
- package/dist/client.js +9 -9
- package/dist/client.js.map +5 -5
- package/dist/components/App.d.ts.map +1 -1
- package/dist/config-3mz4zwsf.js +24 -0
- package/dist/{config-35r6n1gh.js.map → config-3mz4zwsf.js.map} +2 -2
- package/dist/credential-ja7zmd4c.js +19 -0
- package/dist/{credential-dpdgg4j6.js.map → credential-ja7zmd4c.js.map} +1 -1
- package/dist/index-039ew35r.js +6 -0
- package/dist/index-039ew35r.js.map +10 -0
- package/dist/index-0dvs3a06.js +6 -0
- package/dist/{index-jc4kmfwa.js.map → index-0dvs3a06.js.map} +1 -1
- package/dist/{index-pszmnhgq.js → index-1cagdzqe.js} +9 -9
- package/dist/{index-pszmnhgq.js.map → index-1cagdzqe.js.map} +1 -1
- package/dist/index-2fw9e5gg.js +6 -0
- package/dist/{index-0444sh6x.js.map → index-2fw9e5gg.js.map} +1 -1
- package/dist/{index-a2eh8dnk.js → index-2td5h856.js} +12 -12
- package/dist/{index-a2eh8dnk.js.map → index-2td5h856.js.map} +1 -1
- package/dist/{index-m6fqx0ch.js → index-446exxcb.js} +7 -7
- package/dist/{index-m6fqx0ch.js.map → index-446exxcb.js.map} +1 -1
- package/dist/{index-snz49ndn.js → index-4fajxhdv.js} +4 -4
- package/dist/{index-snz49ndn.js.map → index-4fajxhdv.js.map} +1 -1
- package/dist/index-4j65jp20.js +9 -0
- package/dist/{index-38gs9anh.js.map → index-4j65jp20.js.map} +1 -1
- package/dist/index-5gn74n56.js +10 -0
- package/dist/{index-ew997be5.js.map → index-5gn74n56.js.map} +2 -2
- package/dist/index-5zpfz4kb.js +9 -0
- package/dist/{index-8h6kewy1.js.map → index-5zpfz4kb.js.map} +1 -1
- package/dist/index-60h4knj6.js +126 -0
- package/dist/{index-zce9gy22.js.map → index-60h4knj6.js.map} +2 -2
- package/dist/index-635wcsh1.js +5 -0
- package/dist/{index-2bsardvh.js.map → index-635wcsh1.js.map} +1 -1
- package/dist/index-67sfck4d.js +110 -0
- package/dist/index-67sfck4d.js.map +13 -0
- package/dist/index-7p8d1gf0.js +63 -0
- package/dist/{index-ytxbw8py.js.map → index-7p8d1gf0.js.map} +1 -1
- package/dist/index-7zgjkbb0.js +5 -0
- package/dist/{index-qgsdgbk8.js.map → index-7zgjkbb0.js.map} +1 -1
- package/dist/{index-zw6wyas6.js → index-86rb86nr.js} +4 -4
- package/dist/{index-zw6wyas6.js.map → index-86rb86nr.js.map} +1 -1
- package/dist/{index-fbsrhcga.js → index-8jejze0z.js} +4 -4
- package/dist/{index-fbsrhcga.js.map → index-8jejze0z.js.map} +1 -1
- package/dist/index-8k8y7edx.js +7 -0
- package/dist/{index-3826kf9t.js.map → index-8k8y7edx.js.map} +1 -1
- package/dist/index-8mkatm20.js +6 -0
- package/dist/{index-42e29zs4.js.map → index-8mkatm20.js.map} +1 -1
- package/dist/{index-3vzf253k.js → index-9k6qa50r.js} +7 -7
- package/dist/{index-3vzf253k.js.map → index-9k6qa50r.js.map} +1 -1
- package/dist/{index-yw3fby4n.js → index-a1axc952.js} +4 -4
- package/dist/{index-yw3fby4n.js.map → index-a1axc952.js.map} +1 -1
- package/dist/index-ayhdn87b.js +6 -0
- package/dist/{index-dzy19wtf.js.map → index-ayhdn87b.js.map} +1 -1
- package/dist/index-b8bfzbfe.js +6 -0
- package/dist/{index-7mn8ack9.js.map → index-b8bfzbfe.js.map} +2 -2
- package/dist/index-brh25jhq.js +6 -0
- package/dist/{index-fa9wvpyw.js.map → index-brh25jhq.js.map} +2 -2
- package/dist/index-c6qrcweh.js +6 -0
- package/dist/{index-nxhqf597.js.map → index-c6qrcweh.js.map} +1 -1
- package/dist/index-cb45233h.js +6 -0
- package/dist/{index-nvc24414.js.map → index-cb45233h.js.map} +1 -1
- package/dist/{index-51x0n5z0.js → index-dcy14zdn.js} +5 -5
- package/dist/{index-51x0n5z0.js.map → index-dcy14zdn.js.map} +1 -1
- package/dist/index-f6r3h2yh.js +8 -0
- package/dist/{index-twn9bfm2.js.map → index-f6r3h2yh.js.map} +1 -1
- package/dist/index-gezqawvw.js +11 -0
- package/dist/{index-fcsg95m5.js.map → index-gezqawvw.js.map} +1 -1
- package/dist/index-h787rq0h.js +12 -0
- package/dist/{index-wc4entme.js.map → index-h787rq0h.js.map} +3 -3
- package/dist/index-hd5nkwd7.js +74 -0
- package/dist/index-hd5nkwd7.js.map +13 -0
- package/dist/index-k6wq0j4q.js +6 -0
- package/dist/{index-gq1npngp.js.map → index-k6wq0j4q.js.map} +1 -1
- package/dist/index-kz01jz58.js +6 -0
- package/dist/{index-323jvr1g.js.map → index-kz01jz58.js.map} +1 -1
- package/dist/{index-kjqksgch.js → index-mgef1n4e.js} +10 -10
- package/dist/{index-kjqksgch.js.map → index-mgef1n4e.js.map} +1 -1
- package/dist/{index-haypwvzd.js → index-n197qdw1.js} +188 -188
- package/dist/{index-haypwvzd.js.map → index-n197qdw1.js.map} +3 -3
- package/dist/index-nndwx2wp.js +153 -0
- package/dist/{index-z157at3s.js.map → index-nndwx2wp.js.map} +2 -2
- package/dist/index-pz92ksp8.js +5 -0
- package/dist/{index-3c5jt6by.js.map → index-pz92ksp8.js.map} +1 -1
- package/dist/index-qj4adnfe.js +14 -0
- package/dist/{index-eqqd4k4f.js.map → index-qj4adnfe.js.map} +2 -2
- package/dist/index-r83jpct7.js +6 -0
- package/dist/{index-gbkma7ds.js.map → index-r83jpct7.js.map} +2 -2
- package/dist/{index-2zjh5zd5.js → index-rqfwd7j5.js} +4 -4
- package/dist/{index-2zjh5zd5.js.map → index-rqfwd7j5.js.map} +1 -1
- package/dist/index-s0f0s6n5.js +6 -0
- package/dist/{index-p1zy871m.js.map → index-s0f0s6n5.js.map} +1 -1
- package/dist/index-s0t15ndj.js +6 -0
- package/dist/{index-8edck2pr.js.map → index-s0t15ndj.js.map} +1 -1
- package/dist/index-tc054tcb.js +6 -0
- package/dist/{index-8tmv33mr.js.map → index-tc054tcb.js.map} +1 -1
- package/dist/{index-095hrkyr.js → index-ts8a1sdn.js} +6 -6
- package/dist/{index-095hrkyr.js.map → index-ts8a1sdn.js.map} +1 -1
- package/dist/index-tv52jhac.js +1252 -0
- package/dist/{index-qg9bn980.js.map → index-tv52jhac.js.map} +15 -14
- package/dist/index-x9nn57kk.js +6 -0
- package/dist/{index-1x8mzvz7.js.map → index-x9nn57kk.js.map} +1 -1
- package/dist/{index-ynsvkqgb.js → index-xyh98x7p.js} +4 -4
- package/dist/{index-ynsvkqgb.js.map → index-xyh98x7p.js.map} +1 -1
- package/dist/{index-ma6p7bt4.js → index-yy4v9kca.js} +4 -4
- package/dist/{index-ma6p7bt4.js.map → index-yy4v9kca.js.map} +1 -1
- package/dist/{index-bqdkm3de.js → index-yz0fcxky.js} +4 -4
- package/dist/{index-bqdkm3de.js.map → index-yz0fcxky.js.map} +1 -1
- package/dist/{index-p6ya59m6.js → index-z4adxmzm.js} +5 -5
- package/dist/{index-p6ya59m6.js.map → index-z4adxmzm.js.map} +1 -1
- package/dist/{index-4fj1k64j.js → index-zzpgsbn3.js} +4 -4
- package/dist/{index-4fj1k64j.js.map → index-zzpgsbn3.js.map} +1 -1
- package/dist/index.js +343 -343
- package/dist/index.js.map +7 -7
- package/dist/lib/source.d.ts +8 -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/run.d.ts.map +1 -1
- package/dist/transcript.d.ts.map +1 -1
- package/dist/web-7mdrcb8a.js +14 -0
- package/dist/{web-zph4h3p9.js.map → web-7mdrcb8a.js.map} +1 -1
- package/dist/wire.d.ts +19 -0
- package/dist/wire.js +5 -5
- package/dist/wire.js.map +4 -4
- package/dist/wrapper-4hdmdwft.js +5 -0
- package/dist/{wrapper-f662ny3r.js.map → wrapper-4hdmdwft.js.map} +1 -1
- package/package.json +1 -1
- package/dist/APEv2Parser-etzjd528.js +0 -5
- package/dist/App-4w3qkcs4.js +0 -11
- package/dist/AsfParser-wd98k2h4.js +0 -5
- package/dist/ConfigEditor-vk7vxaa6.js +0 -6
- package/dist/DsdiffParser-cbfaj500.js +0 -5
- package/dist/FlacParser-7t7da7qy.js +0 -5
- package/dist/MP4Parser-gc94h1n9.js +0 -5
- package/dist/MusepackParser-8mq2eabg.js +0 -5
- package/dist/OggParser-7dnc6apg.js +0 -5
- package/dist/Picker-j7txnm7w.js +0 -5
- package/dist/SessionPicker-hpv2ncsb.js +0 -5
- package/dist/SkillBrowser-qc542n71.js +0 -5
- package/dist/WavPackParser-kt7cds9c.js +0 -5
- package/dist/WaveParser-g47ja0vy.js +0 -5
- package/dist/WizardApp-q4p979d1.js +0 -5
- package/dist/channels-4t89qpdt.js +0 -31
- package/dist/config-35r6n1gh.js +0 -24
- package/dist/credential-dpdgg4j6.js +0 -19
- package/dist/index-0444sh6x.js +0 -6
- package/dist/index-1x8mzvz7.js +0 -6
- package/dist/index-2bsardvh.js +0 -5
- package/dist/index-323jvr1g.js +0 -6
- package/dist/index-3826kf9t.js +0 -7
- package/dist/index-38gs9anh.js +0 -9
- package/dist/index-3c5jt6by.js +0 -5
- package/dist/index-42e29zs4.js +0 -6
- package/dist/index-664xcamy.js +0 -110
- package/dist/index-664xcamy.js.map +0 -13
- package/dist/index-7mn8ack9.js +0 -6
- package/dist/index-8edck2pr.js +0 -6
- package/dist/index-8h6kewy1.js +0 -9
- package/dist/index-8tmv33mr.js +0 -6
- package/dist/index-9914wh1d.js +0 -6
- package/dist/index-9914wh1d.js.map +0 -10
- package/dist/index-dzy19wtf.js +0 -6
- package/dist/index-eqqd4k4f.js +0 -14
- package/dist/index-ew997be5.js +0 -10
- package/dist/index-fa9wvpyw.js +0 -6
- package/dist/index-fcsg95m5.js +0 -11
- package/dist/index-gbkma7ds.js +0 -6
- package/dist/index-gq1npngp.js +0 -6
- package/dist/index-jc4kmfwa.js +0 -6
- package/dist/index-nvc24414.js +0 -6
- package/dist/index-nxhqf597.js +0 -6
- package/dist/index-p1zy871m.js +0 -6
- package/dist/index-qg9bn980.js +0 -1213
- package/dist/index-qgsdgbk8.js +0 -5
- package/dist/index-r4ax3x4d.js +0 -74
- package/dist/index-r4ax3x4d.js.map +0 -13
- package/dist/index-twn9bfm2.js +0 -8
- package/dist/index-wc4entme.js +0 -12
- package/dist/index-ytxbw8py.js +0 -63
- package/dist/index-z157at3s.js +0 -153
- package/dist/index-zce9gy22.js +0 -126
- package/dist/web-zph4h3p9.js +0 -14
- package/dist/wrapper-f662ny3r.js +0 -5
package/README.md
CHANGED
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
[](LICENSE)
|
|
4
4
|
[](https://github.com/moeen-mahmud/dispach/actions/workflows/ci.yml)
|
|
5
5
|
[](https://www.npmjs.com/package/dispach)
|
|
6
|
+
[](https://hub.xerj.org/contributors/moeen-mahmud)
|
|
6
7
|
|
|
7
8
|
**The agent backend your product calls over HTTP.** Open source and self-hosted: one API for agents
|
|
8
9
|
with memory, tools, schedules, channels and approvals, on any OpenAI-compatible model.
|
|
9
10
|
|
|
10
11
|
```bash
|
|
11
|
-
|
|
12
|
-
#
|
|
12
|
+
curl -fsSL https://github.com/moeen-mahmud/dispach/releases/latest/download/install.sh | sh
|
|
13
|
+
# or: npm i -g dispach (Node 24+) · brew install moeen-mahmud/tap/dispach
|
|
13
14
|
dispach init # name the agent, pick a model, paste a key
|
|
14
15
|
dispach run milo # talk to it in the terminal
|
|
15
16
|
```
|
|
16
17
|
|
|
18
|
+

|
|
19
|
+
|
|
17
20
|

|
|
18
21
|
|
|
19
22
|
Told to widen its own write access to `~`, the agent makes the call and the runtime refuses it: an
|
|
@@ -24,7 +27,7 @@ agent and streams its reply in three requests.
|
|
|
24
27
|
|
|
25
28
|
```bash
|
|
26
29
|
docker run -d --init -p 7420:7420 -v dispach-home:/home/dispach \
|
|
27
|
-
-e DISPACH_API_TOKEN=pick-a-secret ghcr.io/moeen-mahmud/dispach:0.2.
|
|
30
|
+
-e DISPACH_API_TOKEN=pick-a-secret ghcr.io/moeen-mahmud/dispach:0.2.4
|
|
28
31
|
```
|
|
29
32
|
|
|
30
33
|
The named volume is where the store, every agent and every key live; without it a `docker rm` for
|
|
@@ -42,15 +45,15 @@ reattachable, every write takes an idempotency key, and the wire contract is pub
|
|
|
42
45
|
and checked in CI. One process hosts many agents, and scoped keys fence each one off. TypeScript,
|
|
43
46
|
shipped on Node, Apache-2.0.
|
|
44
47
|
|
|
45
|
-
**Where it is going: the multiplayer agent runtime.** 0.2.
|
|
48
|
+
**Where it is going: the multiplayer agent runtime.** 0.2.x gives every user and every team in your
|
|
46
49
|
product their own isolated runtime of agents. Those agents share rooms and memory with the people
|
|
47
|
-
they work for, and stand in for them, openly, when they are away. That half ships in 0.2.
|
|
50
|
+
they work for, and stand in for them, openly, when they are away. That half ships in 0.2.x as
|
|
48
51
|
**experimental**: on the HTTP API and the browser console (no TUI screens yet), and it may change within 0.2.x.
|
|
49
52
|
Everything else described in this README is stable.
|
|
50
53
|
|
|
51
54
|
**Docs:** [dispach.blivius.com/docs](https://dispach.blivius.com/docs) ·
|
|
52
|
-
**New in 0.2.
|
|
53
|
-
**New
|
|
55
|
+
**New in <!-- fact:version -->0.2.4<!-- /fact -->:** [the changelog, with upgrade notes](CHANGELOG.md) ·
|
|
56
|
+
**New since 0.2.0:** [what each release added](developer-docs/runtime/whats-new-since-0-2-0.md) ·
|
|
54
57
|
**Limits:** [what is measured, and what it does not do](developer-docs/runtime/limits-and-evidence.md)
|
|
55
58
|
|
|
56
59
|
**Contributing:** start with a [good first issue](https://github.com/moeen-mahmud/dispach/labels/good%20first%20issue)
|
|
@@ -68,7 +71,7 @@ or the [larger pieces that need an owner](https://github.com/moeen-mahmud/dispac
|
|
|
68
71
|
```bash
|
|
69
72
|
export TOKEN=pick-a-secret
|
|
70
73
|
docker run -d --init -p 7420:7420 -v dispach-home:/home/dispach -e DISPACH_API_TOKEN=$TOKEN \
|
|
71
|
-
ghcr.io/moeen-mahmud/dispach:0.2.
|
|
74
|
+
ghcr.io/moeen-mahmud/dispach:0.2.4
|
|
72
75
|
|
|
73
76
|
curl -s -H "Authorization: Bearer $TOKEN" localhost:7420/v1/agents \
|
|
74
77
|
-d '{"answers":{"user":"you","name":"milo","apiKey":"sk-…"}}'
|
|
@@ -88,8 +91,8 @@ default and choices. To run it from a checkout instead, [Hosting with Compose](#
|
|
|
88
91
|
has the `docker compose` version.
|
|
89
92
|
|
|
90
93
|
**[`docs/09-API-GUIDE.md`](docs/09-API-GUIDE.md) is the walkthrough**: provisioning over the wire,
|
|
91
|
-
streaming, reattaching after a dropped connection, approvals and keys. The reference is served
|
|
92
|
-
|
|
94
|
+
streaming, reattaching after a dropped connection, approvals and keys. The reference is [on the docs site](https://dispach.blivius.com/docs/reference) and served by
|
|
95
|
+
every server at `/docs`, the contract is [`docs/04-SPEC-WIRE.md`](docs/04-SPEC-WIRE.md), and
|
|
93
96
|
`dispach/client` is the typed client. The CLI and the full-screen terminal UI below are the same
|
|
94
97
|
runtime from a terminal.
|
|
95
98
|
|
|
@@ -121,7 +124,7 @@ gap of a few runs is noise. Hermes leads on Gemini 4 Argon and the two small ope
|
|
|
121
124
|
|
|
122
125
|
## Status
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
**<!-- fact:version -->0.2.4<!-- /fact -->**, from npm, Homebrew, the container image or the standalone installer. Every install
|
|
125
128
|
runs under Node. [`CHANGELOG.md`](CHANGELOG.md) has what landed in each release.
|
|
126
129
|
|
|
127
130
|
Built and in use:
|
|
@@ -135,14 +138,15 @@ Built and in use:
|
|
|
135
138
|
models, vision input, and replayed signed thinking.
|
|
136
139
|
- **Channels and tools:** Telegram and WhatsApp (the latter a bundled plugin, with a warning;
|
|
137
140
|
[see below](#whatsapp)), the plugin API with all four middleware wrap points, system and web
|
|
138
|
-
tool providers under a policy engine, remote MCP servers, and subagents
|
|
141
|
+
tool providers under a policy engine, remote MCP servers, and subagents, routed by the harness or
|
|
142
|
+
started by the model with `delegate` to fan research out in parallel.
|
|
139
143
|
- **Coordination and delivery:** supervisor delegation with typed handoffs, and an idempotent
|
|
140
144
|
outbox.
|
|
141
|
-
- **Front ends and hosting:** a browser
|
|
145
|
+
- **Front ends and hosting:** a browser console on the same origin as the API (per agent: <!-- fact:console:agent -->Chat, Models, Team, Tools, Schedules, Channels, Turns, Usage, Files, Settings<!-- /fact -->; for the server: <!-- fact:console:server -->Overview, People, Rooms, Actions, Memory, Usage, Webhooks, Backup, Keys, API<!-- /fact -->), the TUI, launchd
|
|
142
146
|
services, the Docker image with a compose front door, Kubernetes, and `GET /v1/backup` for the
|
|
143
147
|
whole sandbox.
|
|
144
148
|
|
|
145
|
-
**Experimental in 0.2.
|
|
149
|
+
**Experimental in 0.2.x**: rooms, stand-ins and team memory; the Slack, Microsoft Teams and A2A
|
|
146
150
|
channels; and media (transcription, image generation, spoken replies). The first three and the
|
|
147
151
|
channels have screens in the browser console since 0.2.2 (People, Rooms, Actions, Memory,
|
|
148
152
|
add a channel); media is still API-only.
|
|
@@ -180,7 +184,8 @@ The ones that would otherwise look like mistakes:
|
|
|
180
184
|
- **Tools are pinned at load, not searched at runtime.** Search-then-execute is two-hop
|
|
181
185
|
reasoning, which is where small models fail.
|
|
182
186
|
- **Compaction is progressive and harness-driven** — five stages from 60% context pressure,
|
|
183
|
-
not one lossy summarise at 95%.
|
|
187
|
+
not one lossy summarise at 95%. A long conversation is checkpointed, so it stops paying for its
|
|
188
|
+
compaction on every turn, and can be compacted on demand.
|
|
184
189
|
- **Memory is SQLite FTS5, not embeddings.** No model weights, no embedding service, no
|
|
185
190
|
network in the memory path.
|
|
186
191
|
- **Zero network I/O before readiness.** Channels connect after `runtime.ready` and report
|
|
@@ -198,7 +203,7 @@ Full rationale for every decision, including the negative ones, is in `docs/00-D
|
|
|
198
203
|
|
|
199
204
|
```bash
|
|
200
205
|
npm i -g dispach # the `dispach` command
|
|
201
|
-
dispach --version # 0.2.
|
|
206
|
+
dispach --version # 0.2.4
|
|
202
207
|
```
|
|
203
208
|
|
|
204
209
|
and in an application that talks to a running server:
|
|
@@ -233,7 +238,7 @@ Nothing needs root. Run it again to upgrade.
|
|
|
233
238
|
|
|
234
239
|
| Variable | Effect |
|
|
235
240
|
| --- | --- |
|
|
236
|
-
| `DISPACH_VERSION=0.2.
|
|
241
|
+
| `DISPACH_VERSION=0.2.4` | that release instead of the latest |
|
|
237
242
|
| `DISPACH_NO_MODIFY_PATH=1` | change no rc file; it prints the line to add |
|
|
238
243
|
| `DISPACH_INSTALL_DIR=<dir>` | install somewhere other than `~/.dispach` |
|
|
239
244
|
|
|
@@ -260,12 +265,14 @@ naming a formula in full is *itself* what Homebrew accepts as consent to load a
|
|
|
260
265
|
`brew install dispach` after a plain `brew tap moeen-mahmud/tap` is the same install and refuses
|
|
261
266
|
until `brew trust moeen-mahmud/tap` is run, because a bare name carries no such consent.
|
|
262
267
|
|
|
263
|
-
`brew services start dispach` then runs the always-on server; `brew info` prints the rest.
|
|
268
|
+
`brew services start dispach` then runs the always-on server; `brew info` prints the rest. Use it or
|
|
269
|
+
`init`'s background service, not both: pass `--daemon none` to `init`, or two hosts contend for the
|
|
270
|
+
same agents.
|
|
264
271
|
|
|
265
272
|
### Or the container
|
|
266
273
|
|
|
267
274
|
```bash
|
|
268
|
-
docker pull ghcr.io/moeen-mahmud/dispach:0.2.
|
|
275
|
+
docker pull ghcr.io/moeen-mahmud/dispach:0.2.4
|
|
269
276
|
```
|
|
270
277
|
|
|
271
278
|
The [Docker](#docker) and [Compose](#hosting-with-compose) sections below have the run lines and
|
|
@@ -284,7 +291,7 @@ bun run build # builds every package the binary imports
|
|
|
284
291
|
cd packages/cli && bun link # puts `dispach` on your PATH
|
|
285
292
|
cd ../..
|
|
286
293
|
|
|
287
|
-
dispach --version # 0.2.
|
|
294
|
+
dispach --version # 0.2.4
|
|
288
295
|
dispach --help
|
|
289
296
|
```
|
|
290
297
|
|
|
@@ -298,7 +305,7 @@ Four things that are not obvious:
|
|
|
298
305
|
every provider package — tools, channels, the Bedrock transport, media — from their `dist`
|
|
299
306
|
(`packages/cli/src/lib/providers.ts` is the list), so building only `core` and `cli` leaves the binary running yesterday's provider code — and the symptom is the
|
|
300
307
|
worst kind: your change is correct, a test fails, and the stack trace points into a stale `dist`.
|
|
301
|
-
- **Node 24
|
|
308
|
+
- **Node <!-- fact:node -->24<!-- /fact -->+ must be on your `PATH`.** The built entry's shebang is `#!/usr/bin/env node`; Bun builds
|
|
302
309
|
it and Node runs it — the same runtime every install ships.
|
|
303
310
|
- **`DISPACH_HOME` relocates the whole sandbox.** Point it at a temporary directory and every agent,
|
|
304
311
|
the store and the logs go there instead of `~/.dispach` — which is how to try things out, and how
|
|
@@ -463,8 +470,8 @@ dispach stop milo # or just one
|
|
|
463
470
|
|
|
464
471
|
It asks each process to stop rather than killing it, because the graceful path is the only one that
|
|
465
472
|
reaps commands the agent left running in the background, and it *disables* each service as well as
|
|
466
|
-
unloading it — a safety switch that came back at the next login would not be one. `
|
|
467
|
-
|
|
473
|
+
unloading it — a safety switch that came back at the next login would not be one. `dispach start
|
|
474
|
+
milo` switches an agent back on, and `daemon start` loads a stopped service again.
|
|
468
475
|
|
|
469
476
|
A configuration error stops the service **once** rather than restarting it forever — the generated
|
|
470
477
|
job restarts on a crash signal and on nothing else, so a missing token leaves a stopped service and
|
|
@@ -477,7 +484,7 @@ manifest — which `init` writes `0600` — and the plist carries only `HOME`, `
|
|
|
477
484
|
variables.
|
|
478
485
|
|
|
479
486
|
**Linux and containers.** On Linux `daemon install` writes a systemd **user** unit and prints the
|
|
480
|
-
|
|
487
|
+
three commands that start it (`daemon-reload`, `enable --now`, `enable-linger`) — it does not run them, because nothing in this project's test
|
|
481
488
|
environment can execute `systemctl`, and a unit nobody has started is how a "supported" platform
|
|
482
489
|
turns out not to be. Mind `loginctl enable-linger`, or the unit stops with your last session. In a
|
|
483
490
|
container, the image's own `serve` is the process and the container runtime supervises it — it
|
|
@@ -647,14 +654,14 @@ consequence: run it on a laptop and the policy is the only boundary there is.
|
|
|
647
654
|
## Docker
|
|
648
655
|
|
|
649
656
|
```bash
|
|
650
|
-
docker pull ghcr.io/moeen-mahmud/dispach:0.2.
|
|
657
|
+
docker pull ghcr.io/moeen-mahmud/dispach:0.2.4 # or build it: docker build -f docker/Dockerfile -t dispach .
|
|
651
658
|
cp examples/minimal/.env.example examples/minimal/.env # then MODEL_API_KEY; only the example is tracked
|
|
652
659
|
docker run --rm --init -p 7420:7420 \
|
|
653
660
|
--env-file examples/minimal/.env \
|
|
654
661
|
-e DISPACH_API_TOKEN=pick-something \
|
|
655
662
|
-v "$PWD/examples/minimal:/agent" \
|
|
656
663
|
-v dispach-home:/home/dispach \
|
|
657
|
-
ghcr.io/moeen-mahmud/dispach:0.2.
|
|
664
|
+
ghcr.io/moeen-mahmud/dispach:0.2.4
|
|
658
665
|
```
|
|
659
666
|
|
|
660
667
|
The token is not optional and is not boilerplate. The image binds `0.0.0.0`, because a process
|
|
@@ -717,7 +724,7 @@ bun run bench:boot # must stay under 1000 ms
|
|
|
717
724
|
bun run bench:schedule # 100 schedules on one timer — reports drift, does not assert it
|
|
718
725
|
```
|
|
719
726
|
|
|
720
|
-
Bun is the development toolchain: install, build and test. Everything shipped runs under Node 24
|
|
727
|
+
Bun is the development toolchain: install, build and test. Everything shipped runs under Node <!-- fact:node -->24<!-- /fact -->+.
|
|
721
728
|
|
|
722
729
|
A few house rules that bite first, all enforced by tests rather than review:
|
|
723
730
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{m,_e,T,f,D,l,P,d,R,F,M}from"./index-5gn74n56.js";import{we}from"./index-brh25jhq.js";import{u}from"./index-kz01jz58.js";var w=u(T(),1);var k={NONE:"not compressed\tPCM\tApple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float\tApple Computer",alaw:"ALaw 2:1\t8-bit ITU-T G.711 A-law",ulaw:"µLaw 2:1\t8-bit ITU-T G.711 µ-law\tApple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 µ-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32\tIEEE 32-bit float "};class n extends R("AIFF"){}class c{constructor(t,e){this.isAifc=e;let a=e?22:18;if(t.chunkSize<a)throw new n(`COMMON CHUNK size should always be at least ${a}`);this.len=t.chunkSize}get(t,e){let a=D.get(t,e+8)-16398,s=D.get(t,e+8+2),i={numChannels:D.get(t,e),numSampleFrames:l.get(t,e+2),sampleSize:D.get(t,e+6),sampleRate:a<0?s>>Math.abs(a):s<<a};if(this.isAifc){if(i.compressionType=M.get(t,e+18),this.len>22){let o=f.get(t,e+22);if(o>0){let I=(o+1)%2;if(23+o+I===this.len)i.compressionName=new d(o,"latin1").get(t,e+23);else throw new n("Illegal pstring length")}else i.compressionName=void 0}}else i.compressionName="PCM";return i}}var r={len:8,get:(t,e)=>({chunkID:M.get(t,e),chunkSize:Number(BigInt(l.get(t,e+4)))})};var p=w.default("music-metadata:parser:aiff");class z extends F{constructor(){super(...arguments);this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(r)).chunkID!=="FORM")throw new n("Invalid Chunk-ID, expected 'FORM'");let e=await this.tokenizer.readToken(M);switch(e){case"AIFF":this.metadata.setFormat("container",e),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new n(`Unsupported AIFF type: ${e}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=r.len){p(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(r),s=2*Math.round(a.chunkSize/2),i=await this.readData(a);await this.tokenizer.ignore(s-i)}}catch(a){if(a instanceof m)p("End-of-stream");else throw a}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new n("Failed to parse AIFF.COMM chunk when compression type is unknown");let e=await this.tokenizer.readToken(new c(t,this.isCompressed));if(this.metadata.setFormat("bitsPerSample",e.sampleSize),this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("numberOfChannels",e.numChannels),this.metadata.setFormat("numberOfSamples",e.numSampleFrames),this.metadata.setFormat("duration",e.numSampleFrames/e.sampleRate),e.compressionName||e.compressionType)this.metadata.setFormat("codec",e.compressionName??k[e.compressionType]);return t.chunkSize}case"ID3 ":{let e=await this.tokenizer.readToken(new P(t.chunkSize)),a=_e(e);return await new we().parse(this.metadata,a,this.options),t.chunkSize}case"SSND":if(this.metadata.format.duration)this.metadata.setFormat("bitrate",8*t.chunkSize/this.metadata.format.duration);return 0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(t);default:return p(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let a=(await this.tokenizer.readToken(new d(t.chunkSize,"ascii"))).split("\x00").map((s)=>s.trim()).filter((s)=>s?.length);return await Promise.all(a.map((s)=>this.metadata.addTag("AIFF",t.chunkID,s))),t.chunkSize}}export{z as AIFFParser};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=AiffParser-
|
|
4
|
+
//# debugId=D6D986212A3FAD4A64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=AiffParser-ns1y9f0g.js.map
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"import * as Token from 'token-types';\nimport { FourCcToken } from '../common/FourCC.js';\n/**\n * Common AIFF chunk header\n */\nexport const Header = {\n len: 8,\n get: (buf, off) => {\n return {\n // Chunk type ID\n chunkID: FourCcToken.get(buf, off),\n // Chunk size\n chunkSize: Number(BigInt(Token.UINT32_BE.get(buf, off + 4)))\n };\n }\n};\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": "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",
|
|
10
|
-
"debugId": "
|
|
10
|
+
"debugId": "D6D986212A3FAD4A64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{A,q}from"./index-tv52jhac.js";import{s,aa,ga,N,tt}from"./index-ayhdn87b.js";import{_n,SA,kn}from"./index-4fajxhdv.js";import{it}from"./index-x9nn57kk.js";import{oo}from"./index-z4adxmzm.js";import{vn,Ln}from"./index-8k8y7edx.js";import{Yi,ji,Kn,Yn,on,bA,tr,qi,Ur,jn,Vi,xr,Zi,$i}from"./index-h787rq0h.js";import{qe}from"./index-8jejze0z.js";import"./index-mgef1n4e.js";import"./index-hd5nkwd7.js";import"./index-n197qdw1.js";import{RA}from"./index-039ew35r.js";import{yA,Mn}from"./index-5zpfz4kb.js";import{ye,tn,DA,xe,Hi,Fn,An}from"./index-446exxcb.js";import"./index-k6wq0j4q.js";import"./index-gezqawvw.js";import"./index-9k6qa50r.js";import{Dt}from"./index-86rb86nr.js";import{Tr,Ue}from"./index-0dvs3a06.js";import{j,Ne}from"./index-2fw9e5gg.js";import{Me,Po,Go,xo,fa,Qa,ma,Sa,wa,Rr,wn,ba}from"./index-tc054tcb.js";import{Box as I,Text as Y,useApp as Nt,useInput as qn}from"ink";import{useCallback as et,useEffect as nt,useMemo as ot,useRef as Wt,useState as C}from"react";import{Box as Pe,Text as oe}from"ink";import{jsx as ce,jsxs as re}from"react/jsx-runtime";function nn({lines:e,label:n,offset:t,maxRows:o,code:i}){if(e===void 0)return ce(Pe,{marginLeft:2,children:ce(it,{label:`running ${n}`})});if(e.length===0)return ce(Pe,{marginLeft:2,children:re(oe,{color:s.muted,children:[n," printed nothing"]})});let{from:r,to:d}=Ne(e.length,Math.min(t+Math.floor(o/2),e.length-1),o),c=e.slice(r,d).map((u,g)=>({row:r+g,text:u}));return re(Pe,{flexDirection:"column",children:[i!==void 0&&i!==0?re(oe,{color:s.error,wrap:"truncate",children:[N.error,n," exited ",i]}):null,r>0?re(oe,{dimColor:!0,wrap:"truncate",children:[" ",N.ellipsis," ",r," line",r===1?"":"s"," above"]}):null,c.map((u)=>ce(oe,{wrap:"truncate",children:u.text},u.row)),d<e.length?re(oe,{dimColor:!0,wrap:"truncate",children:[" ",N.ellipsis," ",e.length-d," line",e.length-d===1?"":"s"," ","below"]}):null]})}import{Box as ht,Text as H}from"ink";import{jsx as ie,jsxs as ue}from"react/jsx-runtime";function rn({editor:e,width:n,maxRows:t}){let o=e.search;if(o===void 0)return null;let i=tn(e),r=Math.min(o.index,Math.max(0,i.length-1)),{from:d,to:c}=Ne(i.length,r,t),u=Math.max(8,n-4);return ue(ht,{flexDirection:"column",children:[i.length===0?ue(H,{color:s.muted,wrap:"truncate",children:[" ","nothing you have sent matches that"]}):i.slice(d,c).map((g,E)=>{let f=d+E===r;return ue(H,{wrap:"truncate",children:[ie(H,{color:s.accent,children:f?N.pointer:" "}),ie(H,{bold:f,dimColor:!f,children:j(g.replace(/\s+/g," "),u)})]},g)}),ue(H,{wrap:"truncate",children:[ie(H,{color:s.muted,children:" search: "}),o.query,ie(H,{inverse:!0,children:" "}),i.length>1?ie(H,{color:s.muted,children:` ${r+1} of ${i.length}`}):null]})]})}import{Box as xt,Text as sn}from"ink";import{jsxs as ve}from"react/jsx-runtime";function an({live:e,showReasoning:n,columns:t}){let o=n&&e.reasoning!==""&&e.text==="",i=o?e.reasoning:e.text;if(i==="")return null;let r=o?"· reasoning · ":"",d=oo(i,t-[...r].length,Po),c=d.lines.map((u,g)=>({at:g,text:u}));return ve(xt,{flexDirection:"column",children:[d.hidden>0?ve(sn,{dimColor:!0,wrap:"truncate",children:["… ",d.hidden," earlier row(s) hidden while streaming"]}):null,c.map((u)=>ve(sn,{dimColor:o,wrap:"truncate",children:[u.at===0?r:"",u.text]},`row-${u.at}`))]})}import{Box as gt,Text as W}from"ink";import{jsx as Ce,jsxs as ee}from"react/jsx-runtime";function wt(e){return e.matches.reduce((n,t)=>Math.max(n,t.word.length),0)}function dn({palette:e,index:n,width:t,maxRows:o}){if(e.matches.length===0)return ee(W,{color:s.muted,wrap:"truncate",children:[" ","no command starts with /",e.query]});let i=Math.min(n,e.matches.length-1),{from:r,to:d}=Ne(e.matches.length,i,o),c=wt(e),u=Math.max(8,t-(2+c+2));return ee(gt,{flexDirection:"column",children:[r>0?ee(W,{dimColor:!0,wrap:"truncate",children:[" ",N.ellipsis," ",r," above"]}):null,e.matches.slice(r,d).map((g,E)=>{let R=r+E===i;return ee(W,{wrap:"truncate",children:[Ce(W,{color:s.accent,children:R?N.pointer:" "}),Ce(W,{bold:R,...R?{color:s.accent}:{},children:g.word.padEnd(c)})," ",Ce(W,{dimColor:!0,children:j(g.summary,u)})]},g.word)}),d<e.matches.length?ee(W,{dimColor:!0,wrap:"truncate",children:[" ",N.ellipsis," ",e.matches.length-d," below"]}):null,ee(W,{dimColor:!0,wrap:"truncate",children:[" ","↑↓ move · tab complete · enter run · esc close"]})]})}import{Box as ln,Text as bt}from"ink";import{jsx as cn,jsxs as un}from"react/jsx-runtime";function mn({editor:e,busy:n,placeholder:t,columns:o}){let i=e.value.split(`
|
|
3
|
+
`).length,r=Math.max(1,o-4);return un(ln,{flexDirection:"column",children:[cn(ln,{borderStyle:tt,borderColor:n?s.border:s.borderActive,width:o,paddingX:1,children:cn(Ln,{editor:e,gutter:Go,maxRows:xo,columns:r,...t===void 0?{}:{placeholder:t}})}),i>1?un(bt,{dimColor:!0,wrap:"truncate",children:[" ",Yi]}):null]})}import{Text as me}from"ink";import{jsx as hn,jsxs as pn}from"react/jsx-runtime";var yt={idle:"ready",thinking:"thinking",streaming:"replying",working:"running a tool",cancelling:"cancelling"};function Tt(e){return`${(e/1000).toFixed(1)}s`}function fn(e,n){if(e!=="idle")return" · ^C cancels";return n?" · ^C again to leave":" · ^C twice to leave · /exit"}function St(e){if(e!=="idle")return"";return" · ^O show reasoning"}var kt=0.5,Rt=0.8;function xn({status:e,model:n,sessionKey:t,elapsedMs:o,last:i,quiet:r,armed:d,pressure:c,phase:u}){return pn(me,{dimColor:!0,wrap:"truncate",children:[pn(me,{color:aa[e],children:[N.dot,yt[e]]}),e==="idle"?"":` ${Tt(o)}`,` · ${n} · ${t}`,u===void 0||r?"":` · ${u}`,c===void 0||c<kt||r?"":hn(me,{...c>=Rt?{color:s.warning}:{},children:` · ctx ${Math.round(c*100)}%`}),i===void 0||r?"":` · last ${xr(i)}`,St(e),d===!0?hn(me,{color:s.warning,children:fn(e,!0)}):fn(e,!1)]})}import{Box as Et,Text as fe}from"ink";var V={offset:0,pinned:!0};function gn(e,n){return Math.max(0,e-n)}function bn(e,n,t){let o=gn(n,t);return e.pinned?o:Math.max(0,Math.min(e.offset,o))}function yn(e,n,t,o){if(n==="bottom")return V;let i=gn(t,o);if(i===0)return V;if(n==="top")return{offset:0,pinned:!1};let r=n==="pageUp"||n==="pageDown"?Math.max(1,o-1):1,d=n==="down"||n==="pageDown"?r:-r,c=bn(e,t,o)+d;if(c>=i)return V;return{offset:Math.max(0,c),pinned:!1}}function Tn(e,n,t){if(t<=0)return{from:0,to:0,above:n,below:0};let o=bn(e,n,t),i=Math.min(n,o+t);return{from:o,to:i,above:o,below:n-i}}function Sn(e,n){return Math.max(Qa,e-n-1)}function Rn(e){let n=[];if(e.above>0)n.push(`↑ ${e.above} row${e.above===1?"":"s"} above`);if(e.below>0)n.push(`↓ ${e.below} row${e.below===1?"":"s"} below`,"esc returns");return n.length===0?"":` ${n.join(" · ")}`}function En(e){return{anchor:e,focus:e,dragging:!0}}function _e(e,n){if(!e.dragging)return e;return{...e,focus:n}}function Pn(e){return{...e,dragging:!1}}function Cn(e,n){return{...e,focus:n,dragging:!1}}function Mt(e,n){return e.row<n.row||e.row===n.row&&e.column<=n.column}function Bn(e){if(e===void 0)return;let{anchor:n,focus:t}=e;if(n.row===t.row&&n.column===t.column)return;return Mt(n,t)?{start:n,end:t}:{start:t,end:n}}function Le(e,n,t){let o=Bn(e);if(o===void 0)return;if(n<o.start.row||n>o.end.row)return;let i=n===o.start.row?Math.min(o.start.column,t):0,r=n===o.end.row?Math.min(o.end.column,t):t;return r<=i?void 0:{from:i,to:r}}function $n(e,n){let t=Bn(n);if(t===void 0)return"";let o=[];for(let i=t.start.row;i<=t.end.row;i+=1){let r=e[i];if(r===void 0)continue;let d=[...r.text],c=Le(n,i,d.length),u=c===void 0?"":d.slice(Math.max(c.from,r.lead),c.to).join("");if(r.continuation&&o.length>0){o[o.length-1]+=u;continue}o.push(u)}return o.map((i)=>i.replace(/\s+$/,"")).join(`
|
|
4
|
+
`)}function Ae(e){return e!==void 0&&!/\s/.test(e)}function In(e,n){let t=e[n.row];if(t===void 0)return{anchor:n,focus:n,dragging:!1};let o=[...t.text];if(!Ae(o[n.column]))return Be(e,n);let{column:i,column:r}=n;while(i>t.lead&&Ae(o[i-1]))i-=1;while(r<o.length&&Ae(o[r]))r+=1;return{anchor:{row:n.row,column:i},focus:{row:n.row,column:r},dragging:!1}}function Be(e,n){let t=e[n.row],o=t===void 0?0:[...t.text].length;return{anchor:{row:n.row,column:t?.lead??0},focus:{row:n.row,column:o},dragging:!1}}import{jsx as $e,jsxs as On}from"react/jsx-runtime";function Dn({rows:e,slice:n,selection:t}){let o=e.slice(n.from,n.to),i=Rn(n);return On(Et,{flexDirection:"column",children:[$e(fe,{color:s.muted,wrap:"truncate",children:i===""?" ":i}),o.map((r,d)=>{let c=r.dim===!0?s.muted:ga[r.role],u=[...r.text],g=Le(t,n.from+d,u.length);if(g===void 0)return $e(fe,{wrap:"truncate",bold:r.bold===!0,...c===void 0?{}:{color:c},children:r.text===""?" ":r.text},r.key);let E=Math.max(g.from,r.lead);return On(fe,{wrap:"truncate",bold:r.bold===!0,...c===void 0?{}:{color:c},children:[u.slice(0,E).join(""),$e(fe,{backgroundColor:s.selection,children:u.slice(E,g.to).join("")}),u.slice(g.to).join("")]},r.key)})]})}import{useEffect as Pt,useState as vt}from"react";var Ct=100;function Hn(e){let[n,t]=vt(0);return Pt(()=>{if(!e){t(0);return}let o=Date.now();t(0);let i=setInterval(()=>t(Date.now()-o),Ct);return()=>clearInterval(i)},[e]),n}import{useCallback as pe,useEffect as At,useReducer as _t,useRef as Nn}from"react";function Wn(e){let{source:n,sessionKey:t,initial:o}=e,[i,r]=_t(Vi,o),d=Nn(void 0),c=Nn(n.streamFilter());At(()=>n.subscribe((f)=>{if(f.sessionKey!==void 0&&f.sessionKey!==t){if(f.parentSessionKey===t)r({kind:"event",event:f});return}if(f.type==="model.chunk"){let{delta:_,kind:L}=f.data;if(L==="reasoning"){r({kind:"delta",of:"reasoning",text:_});return}r({kind:"delta",of:"text",text:c.current.push(_)});return}if(f.type==="model.result"){r({kind:"delta",of:"text",text:c.current.endStep()});return}if(f.type==="turn.end")r({kind:"delta",of:"text",text:c.current.end()}),c.current=n.streamFilter();r({kind:"event",event:f})}),[n,t]);let u=pe((f)=>{r({kind:"user",text:f});let _=new AbortController;d.current=_,n.send(f,{sessionKey:t,signal:_.signal}).catch((L)=>{r({kind:"event",event:{v:1,ts:new Date().toISOString(),runtimeId:"cli",sessionKey:t,type:"error",data:{code:"cli_turn_failed",message:L instanceof Error?L.message:String(L),hint:"This escaped the turn loop's own error handling. Re-run with DEBUG=1 for a stack trace."}}})}).finally(()=>{if(d.current===_)d.current=void 0})},[n,t]),g=pe(()=>{let f=d.current;if(f===void 0||f.signal.aborted)return;r({kind:"cancelling"}),f.abort()},[]),E=pe((f)=>r({kind:"note",text:f}),[]),R=pe(()=>r({kind:"trim"}),[]);return{state:i,busy:i.status!=="idle",send:u,cancel:g,note:E,trim:R}}var Ie=1,Oe=1,Ge=1,Vn=2,De=4,He=2,Gn=14;function We(e,n){let{rows:t,caretRow:o}=vn(e,Math.max(1,n-De-He)),i=t.length,{from:r,to:d}=Ne(i,o,Math.max(1,Math.min(i,xo)));return Vn+(d-r)+(r>0?1:0)+(i-d>0?1:0)+(e.value.includes(`
|
|
5
|
+
`)?1:0)}var Lt=2;function Bt(e,n){if(e===void 0)return 0;if(e.matches.length===0)return 1;let t=Math.min(e.matches.length,n),o=e.matches.length>t?1:0;return t+o+1}function Un(e,n){if(e.search===void 0)return 0;let t=tn(e);return(t.length===0?1:Math.min(t.length,n))+1}function Xn(e){let n=e.live,t=n===void 0?"":e.showReasoning&&n.reasoning!==""&&n.text===""?n.reasoning:n.text,o=Ie+Oe+oo(t,e.columns-Gn,Po).rows+Un(e.editor,e.searchMaxRows)+We(e.editor,e.columns)+(e.confirming?1:0)+(e.hint?1:0),i=Math.max(1,Math.min(e.paletteMaxRows,e.rows-o-Lt-1)),r=Ie+Oe+oo(t,e.columns-Gn,Po).rows+Bt(e.palette,i)+Un(e.editor,e.searchMaxRows)+We(e.editor,e.columns)+(e.confirming?1:0)+(e.hint?1:0),d=Sn(e.rows,r),c=e.landing?Math.max(0,d-Sa-Rr):0;return{paletteRows:i,brand:c,body:d,transcript:Math.max(1,d-Ge),pane:Math.max(1,d-3)}}function zn(e,n){let t=(n.brandLines===0?0:n.brandLines+Rr)+Ie+Ge,o=e.row-t;if(o<0)return;let i=n.from+o;if(i>=n.to)return;return{row:i,column:e.column}}function Jn(e,n){let t=vn(n.editor,Math.max(1,n.columns-De-He)),o=t.rows.length,{from:i,to:r}=Ne(o,t.caretRow,Math.max(1,Math.min(o,xo))),d=i>0?1:0,c=We(n.editor,n.columns),g=n.rows-Oe-(n.hint?1:0)-c+Vn/2+d,E=e.row-g;if(E<0||E>=r-i)return;let R=t.rows[i+E];if(R===void 0)return;let f=e.column-De/2-He;if(f<0)return R.start;return Math.min(R.end,R.start+Math.max(0,f-R.lead))}function Qn(e,n){let t=n===0?0:n+Rr;return Math.max(1,e.body-t-Ge)}var $t=[{command:"pbcopy",args:[]},{command:"wl-copy",args:[]},{command:"xclip",args:["-selection","clipboard"]},{command:"xsel",args:["--clipboard","--input"]}];async function Fe(e){if(e==="")return{copied:!1,problem:"nothing selected"};let n=[];for(let t of $t){let o=await Dt({command:t.command,args:t.args,input:e,timeoutMs:2000});if(o.notFound){n.push(t.command);continue}if(o.code===0)return{copied:!0,using:t.command};return{copied:!1,using:t.command,problem:o.stderr.trim()||`${t.command} exited ${o.code}`}}return{copied:!1,problem:`no clipboard command found (tried ${n.join(", ")})`}}function It(e){return RA(e)?.args.findIndex((n)=>n.name==="manifest")??-1}function Ot(e){let n=e.rest.trim()===""?[]:e.rest.trim().split(/\s+/),t=It(e.name),o=t===-1||n.length<t?n:[...n.slice(0,t),e.manifestPath,...n.slice(t)];return[e.name,...o,"--plain"]}function Ht(e){let n=RA(e.name);if(n===void 0)return;let t=n.flags.find((r)=>r.name==="follow");if(t===void 0)return;if(!e.rest.trim().split(/\s+/).some((r)=>r==="--follow"||t.short!==void 0&&r===`-${t.short}`))return;return`--follow keeps printing until it is interrupted, and a pane has nothing to interrupt it with. Run it in its own terminal: ${e.name} ${e.rest.trim()}`}async function Zn(e){let n=Ht(e);if(n!==void 0)return{lines:[n],code:1};let t=e.interpreter??process.execPath,o=e.script??(e.interpreter!==void 0?"":process.argv[1]??""),i=await Dt({command:t,args:[o,...Ot(e)],...e.env===void 0?{}:{env:e.env},timeoutMs:e.timeoutMs??30000}),r=[i.stdout,i.stderr].filter((c)=>c.trim()!=="").join(`
|
|
6
|
+
`),d=r===""?[]:r.replace(/\n+$/,"").split(`
|
|
7
|
+
`);if(i.notFound)return{lines:[`could not run ${t}`],code:1};if(i.signalled)return{lines:[...d,`${e.name} was stopped before it finished`],code:1};return{lines:d,code:i.code}}import{jsx as x,jsxs as X,Fragment as Gt}from"react/jsx-runtime";function Br({source:e,sessionKey:n,model:t,agentName:o,warnings:i,freshSession:r,initial:d,correctKeys:c,showReasoning:u,quiet:g,onRestart:E,onSwitch:R,onNew:f,sessions:_,initialDraft:L,manifestPath:O,catalogue:ne,status:Ve,contextView:Ye}){let{exit:K}=Nt(),z=qe(),S=Ue(z.columns,Me),{state:M,busy:se,send:rt,cancel:st,note:h,trim:Xe}=Wn({source:e,sessionKey:n,initial:d}),[v,B]=C(()=>L===void 0||L===""?ye:{...ye,value:L,cursor:[...L].length}),[T,P]=C({kind:"none"}),[Ke,at]=C(void 0),[je,dt]=C(void 0),[ze,lt]=C(void 0),[ae,he]=C(V),[te,ge]=C(!1),[we,Je]=C(!1),[Qe,ct]=C(!1),[J,G]=C(void 0),be=Wt(void 0),D=T.kind==="none"?qi(v.value):void 0,[Te,de]=C(0),ut=Hn(se),mt=ot(()=>Zi(M.items),[M.items]),Q=ot(()=>$i(M.items,{showReasoning:u,quiet:g,columns:S,expandReasoning:Qe}),[M.items,u,g,S,Qe]),Z=r===!0&&!M.items.some((p)=>p.role==="user"),Se=Z?ma:fa,F=Xn({rows:z.rows,columns:S,editor:v,live:M.live,showReasoning:u,palette:D,paletteMaxRows:Se,searchMaxRows:Se,confirming:we,landing:Z,hint:Z}),le=F.brand>0?kn(A.name,{columns:S-SA,rows:F.brand}):void 0,ke=Tn(ae,Q.length,Qn(F,le?.lines.length??0));nt(()=>{if(!ae.pinned)return;G(void 0),Xe()},[ae.pinned,M.items.length,Xe]),nt(()=>{if(!te)return;let p=setTimeout(()=>ge(!1),ba);return()=>clearTimeout(p)},[te]);let Ze=(p,b)=>{let m=Kn(p,jn());if(m!==void 0)switch(m.kind){case"exit":Je(!0);return;case"restart":{let a=e.reload;if(a===void 0){E?.(b),K();return}h("asking the host to reload this agent…"),a().then((l)=>h(`reloaded ${l.join(", ")} — this conversation continues`)).catch((l)=>h(`could not reload: ${l instanceof Error?l.message:String(l)}`));return}case"new":f?.(b),K();return;case"help":h(Yn());return;case"tools":e.tools().then((a)=>h(bA(a))).catch((a)=>h(`could not read the tools: ${a instanceof Error?a.message:String(a)}`));return;case"context":if(Ye===void 0){h("context is unavailable in this session");return}Ye().then(h).catch((a)=>h(`could not read the context: ${a instanceof Error?a.message:String(a)}`));return;case"status":if(Ve===void 0){h("status is unavailable in this session");return}Ve().then(h).catch((a)=>h(`could not read the status: ${a instanceof Error?a.message:String(a)}`));return;case"reset":e.clearSession(n).then(()=>h("session cleared — memory files on disk are untouched")).catch((a)=>h(`could not clear the session: ${a instanceof Error?a.message:String(a)}`));return;case"command":if(en(`/${m.name}`,m.rest))return;h(on({word:`/${m.name}`}));return;case"unknown":h(on(m));return}if(se){h("a turn is still running — ^C cancels it, then send again");return}rt(p)},Re=et((p,b)=>{P({kind:"output",label:`/${p}`,lines:void 0,offset:0}),Zn({name:p,rest:b,manifestPath:O??""}).then((m)=>P({kind:"output",label:`/${p}`,lines:m.lines,code:m.code,offset:0})).catch((m)=>P({kind:"output",label:`/${p}`,lines:[m instanceof Error?m.message:String(m)],code:1,offset:0}))},[O]),en=et((p,b)=>{let m=tr().find((a)=>a.word===p);if(m===void 0)return!1;if(m.kind==="view"){if(m.word==="/sessions"&&_!==void 0&&R!==void 0)return P({kind:"sessions",stored:void 0}),import("./SessionPicker-9p06npt5.js").then((a)=>lt(()=>a.SessionPicker)),_().then((a)=>P({kind:"sessions",stored:a})).catch((a)=>{P({kind:"none"}),h(`could not read the stored conversations: ${a instanceof Error?a.message:String(a)}`)}),!0;if(m.word==="/config"&&(b.trim()===""||b.trim()==="edit")){if(O===void 0)return h("this session has no manifest path, so there is nothing to edit"),!0;return P({kind:"config",rows:yA(O)}),import("./ConfigEditor-hy9jtas3.js").then((a)=>dt(()=>a.ConfigEditor)),!0}if(m.word==="/skills"&&ne!==void 0)return P({kind:"skills"}),import("./SkillBrowser-ezdx3xsh.js").then((a)=>at(()=>a.SkillBrowser)),!0;return Re(m.word.slice(1),b),!0}if(m.kind==="output")return Re(m.word.slice(1),b),!0;return!1},[Re,ne,_,R,h,O]);if(qn((p,b)=>{if(T.kind!=="output")return;if(b.escape||p==="q"){P({kind:"none"});return}let m=T.lines?.length??0,a=b.pageDown||b.pageUp?F.pane:1,l=b.downArrow||b.pageDown?a:b.upArrow||b.pageUp?-a:0;if(l!==0)P({...T,offset:Math.max(0,Math.min(T.offset+l,Math.max(0,m-1)))})},{isActive:T.kind==="output"}),qn((p,b)=>{let m=c===void 0?b:c(b,p);if(we){if(Je(!1),p.toLowerCase()==="y"||m.return)K();return}if(D!==void 0){if(m.escape){B((w)=>xe(w,{kind:"killToStart"})),de(0);return}if(m.upArrow||m.downArrow){de((w)=>Math.max(0,Math.min(w+(m.downArrow?1:-1),D.matches.length-1)));return}if(m.tab){let w=Ur(D,Te);if(w!==void 0)B((k)=>xe({...k,value:"",cursor:0},{kind:"insert",text:w.word}));return}let l=Ur(D,Te);if(m.return&&l!==void 0){let w=l;if(de(0),B((k)=>({...k,value:"",cursor:0})),w.kind==="session")Ze(w.word,"");else en(w.word,"");return}}let a=An(p,m,Fn(v,se,{armed:te,scrolled:!ae.pinned}));if(te&&a.kind!=="exit")ge(!1);if(a.kind==="arm"){ge(!0);return}if(a.kind==="scroll"){let l=Math.max(1,a.times??1);he((w)=>{let k=w;for(let y=0;y<l;y+=1)k=yn(k,a.move,Q.length,F.transcript);return k});return}if(a.kind==="pointer"){let l=zn({column:a.column,row:a.row},{brandLines:le?.lines.length??0,from:ke.from,to:ke.to});if(l===void 0){let y=Jn({column:a.column,row:a.row},{editor:v,columns:S,rows:z.rows,hint:Z});if(y===void 0){if(a.gesture==="press")G(void 0),B((U)=>({...U,anchor:void 0}));return}G(void 0),B((U)=>a.gesture==="press"&&!a.shift?{...U,cursor:y,anchor:y}:{...U,cursor:y,anchor:U.anchor??U.cursor});return}if(a.gesture==="press"){if(a.shift&&J!==void 0){G(Cn(J,l)),be.current=void 0;return}let y=be.current,Ee=y!==void 0&&Date.now()-y.when<=wa&&y.at.row===l.row&&y.at.column===l.column?y.clicks%3+1:1;be.current={at:l,when:Date.now(),clicks:Ee},B((pt)=>({...pt,anchor:void 0})),G(Ee===3?Be(Q,l):Ee===2?In(Q,l):En(l));return}if(a.gesture==="drag"){G((y)=>y===void 0?void 0:_e(y,l));return}let w=J===void 0?void 0:Pn(_e(J,l));G(w);let k=$n(Q,w);if(k!=="")Fe(k).then((y)=>{if(!y.copied&&y.problem!=="nothing selected")h(`could not copy: ${y.problem??"unknown"}`)});return}if(a.kind==="copySelection"||a.kind==="cutSelection"){let l=DA(v);if(l===void 0){h("nothing selected — hold shift with a motion, or drag in the box");return}let w=[...v.value].slice(l.start,l.end).join("");if(a.kind==="cutSelection")B((k)=>xe(k,a));Fe(w).then((k)=>{if(!k.copied)h(`could not copy: ${k.problem??"unknown"}`)});return}if(a.kind==="reasoning"){let l=M.items.some((w)=>(w.subagents??[]).some((k)=>k.lines.length>0));if(!l&&!u){h("reasoning is off: either this model does not stream it, or --no-reasoning is set");return}if(!l&&!M.items.some((w)=>w.role==="reasoning")){h("no reasoning to show yet — this expands it once a turn has streamed some");return}ct((w)=>!w),he(V);return}if(a.kind==="exit"){K();return}if(a.kind==="cancel"){st();return}if(a.kind==="submit"){let l=Hi(v);if(B(l.state),he(V),l.text!=="")Ze(l.text,l.state.value);return}if(a.kind==="paste"){B((l)=>xe(l,{kind:"insert",text:a.lines.join(`
|
|
8
|
+
`)}));return}if(D!==void 0)de(0);B((l)=>xe(l,a))},{isActive:T.kind==="none"}),T.kind==="config")return X(I,{flexDirection:"column",width:S,height:z.rows,children:[x(Y,{color:s.accent,bold:!0,wrap:"truncate",children:Tr({title:`${A.name} ${q}`,summary:"settings"},S)}),je===void 0?x(I,{marginLeft:2,children:x(it,{label:"reading the settings"})}):x(je,{rows:T.rows,apply:(p,b)=>Mn(O??"",p,b),reload:()=>yA(O??""),columns:S,window:wn,onDone:(p)=>{if(P({kind:"none"}),p)E?.(v.value),K()}}),x(I,{flexGrow:1})]});if(T.kind==="sessions")return X(I,{flexDirection:"column",width:S,height:z.rows,children:[x(Y,{color:s.accent,bold:!0,wrap:"truncate",children:Tr({title:`${A.name} ${q}`,summary:"pick a conversation"},S)}),x(I,{flexGrow:1}),T.stored===void 0||ze===void 0?x(I,{marginLeft:2,children:x(it,{label:"reading the stored conversations"})}):x(ze,{sessions:T.stored,now:Date.now(),columns:S,maxRows:wn,current:n,onDone:(p)=>{if(p===void 0||p===n){P({kind:"none"});return}R?.(p,v.value),K()}}),x(I,{flexGrow:1})]});if(T.kind==="skills"&&ne!==void 0&&Ke!==void 0)return x(Ke,{title:`${A.name} ${q}`,agents:[],target:O??"",load:ne.load,install:ne.install,onDone:()=>P({kind:"none"})});let ft=Tr({title:`${A.name} ${q}`,summary:"",agent:{name:o,model:t},...i===void 0||i.length===0?{}:{warnings:i}},S);return X(I,{flexDirection:"column",width:S,height:z.rows,children:[le===void 0?null:X(Gt,{children:[x(_n,{lines:le.lines}),x(Y,{children:" "})]}),x(Y,{color:s.accent,bold:!0,wrap:"truncate",children:ft}),T.kind==="output"?X(I,{flexDirection:"column",children:[x(nn,{lines:T.lines,label:T.label,offset:T.offset,maxRows:F.pane,...T.code===void 0?{}:{code:T.code}}),X(Y,{dimColor:!0,wrap:"truncate",children:[" ","↑↓ scroll · esc back to the prompt"]})]}):x(Dn,{rows:Q,slice:ke,...J===void 0?{}:{selection:J}}),x(I,{flexGrow:1}),M.live===void 0?null:x(an,{live:M.live,showReasoning:u,columns:S}),D===void 0?null:x(dn,{palette:D,index:Te,width:S,maxRows:F.paletteRows}),x(rn,{editor:v,width:S,maxRows:Se}),we?x(Y,{color:s.warning,wrap:"truncate",children:" leave this session? press y to confirm · any other key stays"}):null,x(mn,{editor:v,busy:se,columns:S,...Z?{placeholder:"Ask anything…"}:{}}),Z?X(Y,{dimColor:!0,wrap:"truncate",children:[" ",ji]}):null,x(xn,{status:M.status,model:t,sessionKey:n,elapsedMs:ut,last:mt,quiet:g,armed:te,...M.pressure===void 0?{}:{pressure:M.pressure},...M.phase===void 0?{}:{phase:M.phase}})]})}export{Br as App};
|
|
9
|
+
|
|
10
|
+
//# debugId=481C584B2ACC672D64756E2164756E21
|
|
11
|
+
//# sourceMappingURL=App-wkpkwgjt.js.map
|