dsh-hello 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +529 -3
- package/cordis.patch.yml +3 -0
- package/lib/catalogs.d.ts +100 -0
- package/lib/catalogs.d.ts.map +1 -0
- package/lib/catalogs.js +205 -0
- package/lib/catalogs.js.map +1 -0
- package/lib/client.js +605 -0
- package/lib/config.d.ts +111 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +115 -0
- package/lib/config.js.map +1 -0
- package/lib/devices.d.ts +71 -0
- package/lib/devices.d.ts.map +1 -0
- package/lib/devices.js +219 -0
- package/lib/devices.js.map +1 -0
- package/lib/files.d.ts +43 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +187 -0
- package/lib/files.js.map +1 -0
- package/lib/host.d.ts +350 -0
- package/lib/host.d.ts.map +1 -0
- package/lib/host.js +10 -0
- package/lib/host.js.map +1 -0
- package/lib/http.d.ts +85 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +369 -0
- package/lib/http.js.map +1 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +8364 -0
- package/lib/index.js.map +7 -0
- package/lib/interactions.d.ts +123 -0
- package/lib/interactions.d.ts.map +1 -0
- package/lib/interactions.js +621 -0
- package/lib/interactions.js.map +1 -0
- package/lib/pairing.d.ts +65 -0
- package/lib/pairing.d.ts.map +1 -0
- package/lib/pairing.js +150 -0
- package/lib/pairing.js.map +1 -0
- package/lib/protocol.d.ts +338 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +7 -0
- package/lib/protocol.js.map +1 -0
- package/lib/push.d.ts +47 -0
- package/lib/push.d.ts.map +1 -0
- package/lib/push.js +339 -0
- package/lib/push.js.map +1 -0
- package/lib/read-state.d.ts +32 -0
- package/lib/read-state.d.ts.map +1 -0
- package/lib/read-state.js +39 -0
- package/lib/read-state.js.map +1 -0
- package/lib/routes.d.ts +38 -0
- package/lib/routes.d.ts.map +1 -0
- package/lib/routes.js +1337 -0
- package/lib/routes.js.map +1 -0
- package/lib/schedules.d.ts +31 -0
- package/lib/schedules.d.ts.map +1 -0
- package/lib/schedules.js +122 -0
- package/lib/schedules.js.map +1 -0
- package/lib/sessions.d.ts +60 -0
- package/lib/sessions.d.ts.map +1 -0
- package/lib/sessions.js +296 -0
- package/lib/sessions.js.map +1 -0
- package/lib/speech.d.ts +20 -0
- package/lib/speech.d.ts.map +1 -0
- package/lib/speech.js +47 -0
- package/lib/speech.js.map +1 -0
- package/lib/streams.d.ts +30 -0
- package/lib/streams.d.ts.map +1 -0
- package/lib/streams.js +106 -0
- package/lib/streams.js.map +1 -0
- package/lib/terminal.d.ts +55 -0
- package/lib/terminal.d.ts.map +1 -0
- package/lib/terminal.js +231 -0
- package/lib/terminal.js.map +1 -0
- package/lib/util.d.ts +18 -0
- package/lib/util.d.ts.map +1 -0
- package/lib/util.js +52 -0
- package/lib/util.js.map +1 -0
- package/lib/version.d.ts +15 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +98 -0
- package/lib/version.js.map +1 -0
- package/package.json +82 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xdnote
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,529 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# DSH Hello
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-hello)
|
|
4
|
+
[](https://github.com/ada87/dsh-hello/blob/main/LICENSE)
|
|
5
|
+
[](https://github.com/ada87/dsh-hello/blob/main/docs/COMPATIBILITY.md)
|
|
6
|
+
|
|
7
|
+
Non-official mobile BFF for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`).
|
|
8
|
+
It is a normal dsh plugin: it runs inside the Host process, calls the Host's own
|
|
9
|
+
Cordis services, and speaks a small JSON + SSE protocol to the React Native app.
|
|
10
|
+
|
|
11
|
+
It does **not** use Typert Remote, does **not** fork dsh, and does **not** put a
|
|
12
|
+
relay server between the user's phone and the user's Host.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **The session list, everywhere.** Open the drawer to read every session with tags, unread weight and live status.
|
|
17
|
+
- **Reply without opening a laptop.** Send a prompt, queue it behind the current turn, or steer mid-turn.
|
|
18
|
+
- **Approve tool calls from the phone.** Allow, always-allow or deny; answer the agent's structured questions.
|
|
19
|
+
- **Terminal and files.** Open a real PTY for the session, leave it running in the background, and browse the workspace.
|
|
20
|
+
- **Push when you leave.** Optional FCM/APNs notifications for turn end, approvals and questions.
|
|
21
|
+
- **One token per device.** Pair once; revoke any device from Settings at any time.
|
|
22
|
+
|
|
23
|
+
| Phone | Tablet |
|
|
24
|
+
|---|---|
|
|
25
|
+
|  |  |
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile web add dsh-hello
|
|
31
|
+
```
|
|
32
|
+
From a checkout or a packed tarball:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
dsh plugin --profile web add /path/to/dsh-hello
|
|
36
|
+
# or
|
|
37
|
+
pnpm pack
|
|
38
|
+
dsh plugin --profile web add ./dsh-hello-<version>.tgz
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Restart `dsh web`. The terminal prints:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
[dsh-hello] dsh 0.2.2-rc.3 satisfies >=0.2.1-rc.4 <0.3.0
|
|
45
|
+
[dsh-hello] routes mounted at /dsh-hello (protocol 1, push none)
|
|
46
|
+
[dsh-hello] pairing code 1234 — open the app, enter the server URL, then this code.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The code has a five-minute TTL by default. After a successful pairing it rotates;
|
|
50
|
+
the terminal prints the next one.
|
|
51
|
+
|
|
52
|
+
### Pairing and compatibility
|
|
53
|
+
|
|
54
|
+
The generated pairing code is **four digits** (`1234`). It is one-time, expires
|
|
55
|
+
after `pairingTtlMs`, and each client address gets `pairingMaxAttempts` (8)
|
|
56
|
+
tries per TTL. Four digits are convenient but low entropy: keep dsh on a trusted
|
|
57
|
+
LAN/Tailscale, or raise `pairingCodeLength` / lower `pairingMaxAttempts` before
|
|
58
|
+
exposing it to the internet.
|
|
59
|
+
|
|
60
|
+
The Host's compatibility gate enforces the `engines.dsh` range at install and
|
|
61
|
+
profile startup. If a linked or exempted install runs outside the tested range,
|
|
62
|
+
the plugin logs a warning and reports `dshCompatible: false` in `/health`
|
|
63
|
+
instead of failing to load.
|
|
64
|
+
|
|
65
|
+
Supported window: the latest three **minor** lines, starting with 0.2.2.
|
|
66
|
+
Prerelease suffixes (`alpha`, `rc`) do not create a new line; `0.2.2-rc.1` and
|
|
67
|
+
`0.2.2-rc.3` are one line. The current matrix and test record live in
|
|
68
|
+
[`docs/COMPATIBILITY.md`](docs/COMPATIBILITY.md) and `compat/versions.json`.
|
|
69
|
+
|
|
70
|
+
`engines.dsh` still reads `>=0.2.1-rc.4 <0.3.0` during the transition. 0.2.1 is
|
|
71
|
+
outside the support window and marked `@deprecated 0.2.2`: it lacks
|
|
72
|
+
`sessionController.state()` and the page cursor, so the facade synthesizes state
|
|
73
|
+
from projections + list and always supplies the projection watermark as the cut,
|
|
74
|
+
then fills the missing cursor with that cut. See `tests/compat.test.ts`. The
|
|
75
|
+
floor will move to `>=0.2.2-0` when the 0.2.1 shims are removed.
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
- Open `dsh web` → **Settings → DSH Hello** to read the pairing code and manage paired devices.
|
|
80
|
+
- In the app, enter the Host URL and the four-digit code; the device stores its own bearer token.
|
|
81
|
+
- The drawer lists sessions: open one to read, reply, approve tool calls, or open its terminal and files.
|
|
82
|
+
- Push is optional; register an FCM/APNs token under Settings when a relay is configured.
|
|
83
|
+
|
|
84
|
+
## Why a plugin
|
|
85
|
+
|
|
86
|
+
The official browser client uses generated Typert codecs and `/api/remote.mux`.
|
|
87
|
+
Those artifacts are browser bundles, and dsh's `/api` route sits behind a
|
|
88
|
+
Host/Origin fence and browser cookies. A native app cannot consume either
|
|
89
|
+
cleanly. This plugin registers its own routes on the same `webServer`, authenticates
|
|
90
|
+
devices with its own bearer token, and uses the Host's own
|
|
91
|
+
`sessionController` / `approval` / `userQuestions` services.
|
|
92
|
+
|
|
93
|
+
## Upgrade
|
|
94
|
+
|
|
95
|
+
Install from the npm registry (the default `dsh plugin add dsh-hello`) so dsh can
|
|
96
|
+
track releases. The **dsh-hello** page under **Plugins** then shows **Update
|
|
97
|
+
available** and a **Versions** section; **Update** removes the old version,
|
|
98
|
+
installs the selected one, keeps the bundle enabled, and recomposes with HMR or
|
|
99
|
+
asks for a restart. A failed update restores the previous version when possible.
|
|
100
|
+
|
|
101
|
+
The **Update / Versions** section is a dsh 0.2.2 feature. On 0.2.1 (outside the
|
|
102
|
+
supported window) the page has no update action, so update from the CLI instead:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
dsh plugin --profile web remove dsh-hello
|
|
106
|
+
dsh plugin --profile web add dsh-hello@latest
|
|
107
|
+
# restart dsh
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The Web UI is preferred on 0.2.2+ because it checks `engines.dsh` before
|
|
111
|
+
touching the profile and rolls back a failed install. From the CLI:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
dsh plugin --profile web add dsh-hello@latest
|
|
115
|
+
# restart dsh if the result asks for it
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If you installed from a tarball or a `link:` path, that entry is not updatable;
|
|
119
|
+
switch it once:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
dsh plugin --profile web remove dsh-hello
|
|
123
|
+
dsh plugin --profile web add dsh-hello@latest
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### dsh upgrades
|
|
127
|
+
|
|
128
|
+
The plugin is a profile dependency, so upgrading dsh keeps it installed. dsh
|
|
129
|
+
0.2.x releases stay inside the supported range. A dsh 0.3.x Host refuses this
|
|
130
|
+
version at startup and marks it incompatible: update dsh-hello to a release with
|
|
131
|
+
a matching range instead of reinstalling. Pairings and device tokens live in the
|
|
132
|
+
credential store under `dsh-hello/*` and survive plugin updates.
|
|
133
|
+
|
|
134
|
+
### Coming from `@xdnote/dsh-mobile`
|
|
135
|
+
|
|
136
|
+
Remove the old package once; it owns the old `/dsh-mobile` routes and the old
|
|
137
|
+
credential keys:
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
dsh plugin --profile web remove @xdnote/dsh-mobile
|
|
141
|
+
dsh plugin --profile web add dsh-hello
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Device records now live under `dsh-hello/*`, so pairings are not migrated: pair
|
|
145
|
+
the phone again. The app's storage keys are also `@dsh-hello/*` now, so install
|
|
146
|
+
the new app build rather than upgrading the old one in place.
|
|
147
|
+
|
|
148
|
+
## Pairing code in the browser
|
|
149
|
+
|
|
150
|
+
Open dsh Web UI and go to **Settings → dsh-hello**, the section placed directly
|
|
151
|
+
after **General** (slot `settings.section`, order `5`). It uses dsh's React
|
|
152
|
+
runtime and locale dictionaries, so it follows the Web UI theme and language.
|
|
153
|
+
|
|
154
|
+
The page shows:
|
|
155
|
+
|
|
156
|
+
- a **lock** switch: while locked, `POST /pair` answers `403 pair-locked` and no
|
|
157
|
+
new device can join, while devices that are already paired keep working;
|
|
158
|
+
- the current numeric code and expiry;
|
|
159
|
+
- a QR payload (`{"v":1,"url":…,"code":…}`);
|
|
160
|
+
- the paired-device table;
|
|
161
|
+
- buttons to generate a new one-time code, set a **fixed code**, or restore
|
|
162
|
+
one-time rotation.
|
|
163
|
+
|
|
164
|
+
The lock is persisted next to the fixed code in the credential store, so it
|
|
165
|
+
survives a Host restart. There is no standalone HTML page. The panel is
|
|
166
|
+
contributed by `client/client.js` through the `settings.section` and
|
|
167
|
+
`settings.section.icon` slots and reads three cookie-authenticated endpoints:
|
|
168
|
+
|
|
169
|
+
- `GET /admin/data` – current code, QR payload, lock state and device list;
|
|
170
|
+
- `POST /admin/pair-code` – rotate, set or clear a fixed code;
|
|
171
|
+
- `POST /admin/lock` – `{ "locked": true | false }`.
|
|
172
|
+
|
|
173
|
+
Both are protected by the dsh browser session: the plugin calls
|
|
174
|
+
`ctx.connection.admit()` on the request headers, with loopback accepted as a
|
|
175
|
+
local fallback. Without a valid dsh login the endpoints return 401.
|
|
176
|
+
|
|
177
|
+
The browser half is part of the page's boot manifest, so after installing or
|
|
178
|
+
updating the plugin, restart `dsh web` and reload the Web UI (a hard refresh,
|
|
179
|
+
not just the settings tab). An already-open tab keeps the old module graph and
|
|
180
|
+
will not show the section.
|
|
181
|
+
|
|
182
|
+
### Local development without publishing
|
|
183
|
+
|
|
184
|
+
Install the checkout once as a link; every rebuild is served from the same path:
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
dsh plugin --profile web add link:/absolute/path/to/dsh-hello
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Then:
|
|
191
|
+
|
|
192
|
+
- **Host + client half**: `pnpm dev:host` (TypeScript types, esbuild bundle, and
|
|
193
|
+
the `client/client.js` copy); restart `dsh web`.
|
|
194
|
+
- **Before publishing**: `pnpm build` (types + bundle) and `pnpm test`.
|
|
195
|
+
|
|
196
|
+
Use a separate home if you do not want to touch your real profile:
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
DSH_HOME=$HOME/.dsh-dev dsh plugin --profile web add link:/absolute/path/to/dsh-hello
|
|
200
|
+
DSH_HOME=$HOME/.dsh-dev dsh web --port 4001
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
On Windows PowerShell:
|
|
204
|
+
|
|
205
|
+
```powershell
|
|
206
|
+
$env:DSH_HOME="$HOME\.dsh-dev"
|
|
207
|
+
dsh plugin --profile web add link:D:/all-in-dsh/apps/dsh-hello
|
|
208
|
+
dsh web --port 4001
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Fixed codes are normalized (letters/digits, 4–32 chars, dashes ignored) and
|
|
212
|
+
persisted in the dsh credential store under `dsh-hello/pairing`. They remain
|
|
213
|
+
valid until changed; use them only on a trusted network. One-time codes rotate
|
|
214
|
+
after a successful pairing and expire after `pairingTtlMs`.
|
|
215
|
+
|
|
216
|
+
## Pairing
|
|
217
|
+
|
|
218
|
+
- The plugin generates a one-time code, prints it, and optionally prints a QR
|
|
219
|
+
payload (`{"v":1,"url":"http://host:port/dsh-hello","code":"..."}`). The
|
|
220
|
+
Settings-page QR uses the browser's base URL; the terminal QR uses the bind
|
|
221
|
+
origin.
|
|
222
|
+
- The app sends the code plus a stable public-key fingerprint
|
|
223
|
+
(`devicePublicKey`). The server stores a hash of the bearer token and pins the
|
|
224
|
+
fingerprint as the device id.
|
|
225
|
+
- Tokens are not bound to `host:port`, so changing IP, port, or tunnel does not
|
|
226
|
+
require re-pairing.
|
|
227
|
+
- Device records live in the dsh credential store under the owner-scoped key
|
|
228
|
+
`dsh-hello/devices` (grant payload). No token is stored in `cordis.yml`.
|
|
229
|
+
- `GET /dsh-hello/pair/code` is loopback-only and only exists to make local
|
|
230
|
+
setup/curl tests convenient. Remote users read the code from the terminal.
|
|
231
|
+
|
|
232
|
+
## Configuration
|
|
233
|
+
|
|
234
|
+
`basePath` defaults to `/dsh-hello`. The app's v1 discovery probes that exact
|
|
235
|
+
path, so a deployment that changes it also needs an app-side setting (planned).
|
|
236
|
+
|
|
237
|
+
The wire prefix and the persisted credential keys use the same `dsh-hello` name:
|
|
238
|
+
the app probes `/dsh-hello/health`, and pairings live under `dsh-hello/*`.
|
|
239
|
+
|
|
240
|
+
```yaml
|
|
241
|
+
- id: dsh-hello
|
|
242
|
+
name: 'dsh-hello'
|
|
243
|
+
config:
|
|
244
|
+
basePath: /dsh-hello
|
|
245
|
+
allowedHosts: ['dsh.example.com'] # extra Host-header authorities
|
|
246
|
+
requireSecure: false # true when the Host itself serves TLS
|
|
247
|
+
strictHostCheck: false # true binds requests to a known authority
|
|
248
|
+
pairingTtlMs: 300000
|
|
249
|
+
pairingCodeLength: 4
|
|
250
|
+
pairingMaxAttempts: 8
|
|
251
|
+
interactionTarget: browser-first # phone-first | browser-first | browser-only
|
|
252
|
+
approvalWaitTimeoutMs: 120000
|
|
253
|
+
questionWaitTimeoutMs: 120000
|
|
254
|
+
allowSessionWideGrants: true
|
|
255
|
+
enableDebugRoutes: false # true exposes authenticated /debug/* test routes
|
|
256
|
+
maxBodyBytes: 65536
|
|
257
|
+
rateLimitWindowMs: 60000
|
|
258
|
+
rateLimitMax: 240
|
|
259
|
+
dshVersionRange: '>=0.2.1-rc.4 <0.3.0'
|
|
260
|
+
push:
|
|
261
|
+
provider: none # none | fcm | apns | relay
|
|
262
|
+
# provider: relay
|
|
263
|
+
# relayUrl: https://push.example.com
|
|
264
|
+
# relayHostToken: dshr_...
|
|
265
|
+
notifyTurnEnd: true
|
|
266
|
+
notifyApproval: true
|
|
267
|
+
notifyQuestion: true
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
`relay` mode sends only the notification payload and host token to your relay;
|
|
271
|
+
the relay holds the FCM/APNs credentials. Device tokens are registered with the
|
|
272
|
+
relay automatically when the app calls `POST /push/register`.
|
|
273
|
+
|
|
274
|
+
The `notify*` config values are host-wide defaults. Each device can then set its own `approval`, `question` and `turnEnd` subscriptions with `PUT /push/subscriptions`; both direct sending and relay mode filter unsubscribed devices. Turn-end pushes are sent only when no app has a live global SSE connection. A connected app handles the event locally instead.
|
|
275
|
+
|
|
276
|
+
Push credentials are BYO. Put secrets in the dsh credential store under the
|
|
277
|
+
owner-scoped record `dsh-hello/push` when possible; the plugin reads that record
|
|
278
|
+
first and falls back to configuration:
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"provider": "fcm",
|
|
283
|
+
"fcmServiceAccountJson": "{\"type\":\"service_account\",...}",
|
|
284
|
+
"fcmProjectId": "my-project"
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The equivalent configuration fallback (useful for tests) is:
|
|
289
|
+
|
|
290
|
+
```yaml
|
|
291
|
+
push:
|
|
292
|
+
provider: fcm
|
|
293
|
+
fcmServiceAccountJson: '{"type":"service_account",...}'
|
|
294
|
+
fcmProjectId: my-project
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
or APNs:
|
|
298
|
+
|
|
299
|
+
```yaml
|
|
300
|
+
push:
|
|
301
|
+
provider: apns
|
|
302
|
+
apnsKey: |
|
|
303
|
+
-----BEGIN PRIVATE KEY-----
|
|
304
|
+
...
|
|
305
|
+
apnsKeyId: ABC123DEFG
|
|
306
|
+
apnsTeamId: TEAM123456
|
|
307
|
+
apnsTopic: com.example.dshapp
|
|
308
|
+
apnsEnvironment: production
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
The plugin talks directly to Google/Apple; there is no author-operated relay.
|
|
312
|
+
|
|
313
|
+
## HTTP API
|
|
314
|
+
|
|
315
|
+
All routes are under `basePath` (default `/dsh-hello`). Except for `/health`
|
|
316
|
+
and `/pair`, every route requires `Authorization: Bearer <device token>`.
|
|
317
|
+
|
|
318
|
+
| Method | Path | Purpose |
|
|
319
|
+
|---|---|---|
|
|
320
|
+
| GET | `/health` | Public capability and version facts |
|
|
321
|
+
| GET | `/pair` | Public pairing availability (no code) |
|
|
322
|
+
| GET/POST | `/pair/code` | Loopback-only current/rotated code + QR |
|
|
323
|
+
| POST | `/pair` | One-time code → device token |
|
|
324
|
+
| GET | `/devices` | Paired devices |
|
|
325
|
+
| DELETE | `/devices/:id` | Revoke a device |
|
|
326
|
+
| POST | `/push/register` | Register an FCM/APNs token |
|
|
327
|
+
| PUT | `/push/subscriptions` | Set this device's `approval` / `question` / `turnEnd` subscriptions |
|
|
328
|
+
| DELETE | `/push` | Remove this device's push token |
|
|
329
|
+
| POST | `/presence` | Tell the plugin this device is foreground (`{ foreground: boolean }`) |
|
|
330
|
+
| GET | `/speech` | Host speech Provider readiness; requires the experimental speech API bundle |
|
|
331
|
+
| POST | `/speech/transcribe` | Transcribe one canonical base64 WAV without submitting a Session prompt |
|
|
332
|
+
| GET | `/schedules` | Automation catalog; `available: false` when the profile has no schedule service |
|
|
333
|
+
| GET | `/schedule-marks` | Active scheduled-task counts per Session, for the drawer clock mark |
|
|
334
|
+
| GET | `/schedules/:id` | One task with target, last delivery and execution flags |
|
|
335
|
+
| GET | `/schedules/:id/history?limit=20&before=` | Delivery history, newest first |
|
|
336
|
+
| POST | `/schedules/:id/run` | Deliver one occurrence now without moving the schedule |
|
|
337
|
+
| PUT | `/schedules/:id` | Pause/resume (`{ "active": boolean, "expectedUpdatedAt"?: string }`) |
|
|
338
|
+
| DELETE | `/schedules/:id` | Delete the task and its saved deliveries |
|
|
339
|
+
| GET | `/sessions` | Session list with title projections and optional `vitals` (context %, tokens, turns, todos, goal, plan, model) |
|
|
340
|
+
| POST | `/sessions` | Create/reuse a blank Session |
|
|
341
|
+
| GET | `/sessions/:id/transcript` | Message-aligned history page |
|
|
342
|
+
| GET | `/sessions/:id/files?path=` | Read-only directory listing, confined to the Session cwd (300 entries max) |
|
|
343
|
+
| GET | `/sessions/:id/file?path=` | UTF-8 text preview, confined to the Session cwd (256 KiB max) |
|
|
344
|
+
| GET | `/sessions/:id/state` | Running/queue state + projections |
|
|
345
|
+
| GET | `/sessions/:id/terminals` | List retained phone terminals |
|
|
346
|
+
| POST | `/sessions/:id/terminals` | Open a PTY in the Session working directory |
|
|
347
|
+
| GET | `/sessions/:id/terminals/:tid/events` | SSE replay + live terminal output |
|
|
348
|
+
| POST | `/sessions/:id/terminals/:tid/input` | Write terminal input |
|
|
349
|
+
| POST | `/sessions/:id/terminals/:tid/resize` | Resize the PTY |
|
|
350
|
+
| DELETE | `/sessions/:id/terminals/:tid` | Terminate the terminal |
|
|
351
|
+
| GET | `/sessions/:id/events` | SSE follow stream (snapshot + events) |
|
|
352
|
+
| POST | `/sessions/:id/prompt` | Send text (`queue` or `steer`) |
|
|
353
|
+
| POST | `/sessions/:id/rename` | Rename |
|
|
354
|
+
| POST | `/sessions/:id/fork` | Create a child Session at an optional inclusive `atSeq` prefix |
|
|
355
|
+
| GET | `/workspaces` | Workspace registry (id, path, title) |
|
|
356
|
+
| POST | `/workspaces` | Adopt an existing directory (`{ "path", "title"? }`) |
|
|
357
|
+
| PUT | `/workspaces/:id` | Rename a workspace (`{ "title": string }`); duplicate titles are allowed, like dsh Web |
|
|
358
|
+
| POST | `/sessions/:id/cancel` | Stop the current turn |
|
|
359
|
+
| GET | `/web-url` | This Host's Web UI, with the process launch token already attached |
|
|
360
|
+
| GET | `/read-state` | Shared read watermarks; proxied to dsh-tag |
|
|
361
|
+
| POST | `/read-state` | Merge this device's watermarks (`{ "sessions": { id: { readAt, unread, at } } }`) and return the merged map |
|
|
362
|
+
| GET | `/events` | Global SSE: approvals, questions, sessions, turn end |
|
|
363
|
+
| GET | `/approvals` | Pending approvals (optional `preview`: command/diff/URL/path) |
|
|
364
|
+
| POST | `/approvals/:id` | `allow` / `always` / `deny` |
|
|
365
|
+
| GET | `/questions` | Pending questions |
|
|
366
|
+
| POST | `/questions/:id/answer` | Structured answer batch |
|
|
367
|
+
| POST | `/sessions/:id/questions/:callId/answer` | Answer a continued question |
|
|
368
|
+
| POST | `/debug/approval` | Debug-only synthetic approval (enableDebugRoutes) |
|
|
369
|
+
| POST | `/debug/question` | Debug-only synthetic question (enableDebugRoutes) |
|
|
370
|
+
|
|
371
|
+
A schedule delivery receipt acknowledges that the target Session persisted the
|
|
372
|
+
message, not that the Agent finished or succeeded. Open the target Session for
|
|
373
|
+
the actual result. `GET /health` advertises `schedules`, `scheduleActions` and
|
|
374
|
+
`scheduleHistory` so older plugins can stay read-only; `workspaceRename` gates
|
|
375
|
+
the phone's workspace rename entry, and `readState` tells the app that read
|
|
376
|
+
watermarks are shared across paired devices.
|
|
377
|
+
|
|
378
|
+
### Approval policy
|
|
379
|
+
|
|
380
|
+
dsh hands an approval or a question to **one** answerer: the first listener that
|
|
381
|
+
does not call `next()`. `interactionTarget` decides who that is.
|
|
382
|
+
|
|
383
|
+
| Value | Who answers |
|
|
384
|
+
|---|---|
|
|
385
|
+
| `browser-first` (default) | A live browser always answers. With no browser connected the app holds the request, even in the background. |
|
|
386
|
+
| `phone-first` | A foreground app answers, even when a browser is connected; otherwise dsh's own listeners do. |
|
|
387
|
+
| `browser-only` | Nobody here: the plugin registers no listener, so dsh behaves exactly as if it were not installed. The app shows a read-only prompt and hands the decision to the Web UI. |
|
|
388
|
+
|
|
389
|
+
The plugin registers unscoped (`global`) waterfall listeners ahead of the
|
|
390
|
+
browser's answerer, so the policy rather than listener order decides. dsh 0.2.2
|
|
391
|
+
dispatches both waterfalls with `scopeTarget(agent, agent)`; a listener bound to
|
|
392
|
+
the plugin's own scope never sees them.
|
|
393
|
+
|
|
394
|
+
With a request claimed, the app is asked over SSE (and push) and its answer
|
|
395
|
+
becomes the tool's outcome:
|
|
396
|
+
|
|
397
|
+
1. A claim expires after 45 seconds without a `POST /presence` heartbeat, and
|
|
398
|
+
backgrounding the app releases it immediately, so a browser can take over.
|
|
399
|
+
2. Timeout, abort, "no", or the app leaving falls back to `next()`, so dsh's own
|
|
400
|
+
fail-closed `unavailable` path still applies.
|
|
401
|
+
|
|
402
|
+
`always` is a process-local session grant for one `session + tool` pair. dsh only
|
|
403
|
+
defines one-shot `allowed-once`; the plugin does not invent durable grants.
|
|
404
|
+
|
|
405
|
+
Approval events try to include a presentation-only `preview` by reading the
|
|
406
|
+
matching `tool/call` event (`bash` command, `edit` diff, `web_fetch` URL, etc.).
|
|
407
|
+
The lookup is best-effort and bounded so it never blocks the approval. Push data
|
|
408
|
+
also carries `hostId` (when the Host origin is known) and the approval's
|
|
409
|
+
`sessionId`, so a multi-host app can switch to the right Host before opening the
|
|
410
|
+
session.
|
|
411
|
+
|
|
412
|
+
### Questions
|
|
413
|
+
|
|
414
|
+
Questions use the same policy: a foreground app with a live SSE connection claims
|
|
415
|
+
the question before a connected browser. If the app leaves the foreground, the
|
|
416
|
+
claim is released and dsh shows the question in the browser. If the foreground
|
|
417
|
+
wait is already gone, the app can still answer the projection's `continued`
|
|
418
|
+
questions through the `callId` route, which calls
|
|
419
|
+
`ctx.userQuestions.answer(agent, callId, ...)`.
|
|
420
|
+
|
|
421
|
+
### SSE frames
|
|
422
|
+
|
|
423
|
+
`GET /sessions/:id/events`:
|
|
424
|
+
|
|
425
|
+
```text
|
|
426
|
+
event: ready
|
|
427
|
+
data: {"sessionId":"..."}
|
|
428
|
+
|
|
429
|
+
event: frame
|
|
430
|
+
data: {"type":"snapshot","header":{...},"records":[...],"projections":{...}}
|
|
431
|
+
|
|
432
|
+
event: frame
|
|
433
|
+
data: {"type":"event","event":{"type":"assistant/message",...}}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
`GET /events`:
|
|
437
|
+
|
|
438
|
+
```text
|
|
439
|
+
event: hello
|
|
440
|
+
data: {"server":{...},"features":{...},"pendingApprovals":[],"pendingQuestions":[]}
|
|
441
|
+
|
|
442
|
+
event: approval
|
|
443
|
+
data: {"id":"...","sessionId":"...","toolName":"bash","displayReason":{"en":"..."}}
|
|
444
|
+
|
|
445
|
+
event: session
|
|
446
|
+
data: {"action":"status","sessionId":"...","running":true}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Debug interaction routes
|
|
450
|
+
|
|
451
|
+
`enableDebugRoutes: true` adds authenticated `POST /debug/approval` and
|
|
452
|
+
`POST /debug/question` routes. They create the same pending items the real
|
|
453
|
+
interaction seams create, so a phone can exercise the approval/question UI
|
|
454
|
+
without a model key or a tool call. They are off by default and are not a
|
|
455
|
+
replacement for the real waterfall; turn them off after testing.
|
|
456
|
+
|
|
457
|
+
## Security model
|
|
458
|
+
|
|
459
|
+
- Route registration is outside dsh's `/api` cookie fence, so the plugin owns
|
|
460
|
+
its own fence:
|
|
461
|
+
- A `Host` header is required. Unauthenticated routes accept loopback, the
|
|
462
|
+
listener's bind address, a configured `allowedHosts` entry, or an authority
|
|
463
|
+
recorded at pairing.
|
|
464
|
+
- An authenticated device request is accepted across address/tunnel changes:
|
|
465
|
+
the bearer token is the boundary, so changing IP, port, or tunnel does not
|
|
466
|
+
require re-pairing. Set `strictHostCheck: true` to bind requests to the
|
|
467
|
+
authority allowlist instead.
|
|
468
|
+
- An attached web `Origin` must match the request authority; cross-site web
|
|
469
|
+
requests are refused (`403`).
|
|
470
|
+
- Installed browser-extension origins (`chrome-extension://`,
|
|
471
|
+
`moz-extension://`, `safari-web-extension://`) are accepted as paired
|
|
472
|
+
clients and receive scoped CORS headers plus `OPTIONS` preflight. The
|
|
473
|
+
device token or pairing code remains the authentication boundary. Web pages
|
|
474
|
+
still receive no CORS headers.
|
|
475
|
+
- Native clients do not need CORS; their requests are unchanged.
|
|
476
|
+
- The pairing admin page uses dsh's own browser authentication
|
|
477
|
+
(`ctx.connection.admit`) and only falls back to loopback; it is not an
|
|
478
|
+
unauthenticated code-dump route.
|
|
479
|
+
- Bearer tokens are compared in constant time after hashing.
|
|
480
|
+
- The phone terminal runs the Host's default shell through
|
|
481
|
+
`ctx.subprocess.spawnTerminal`, so it runs as the dsh OS user outside the
|
|
482
|
+
agent sandbox — the same permission model as dsh's Web sidebar terminal. It
|
|
483
|
+
is reachable only with a device token, input is capped at 64 KiB per request,
|
|
484
|
+
at most four terminals are kept per Session, and unattached terminals are
|
|
485
|
+
reclaimed after 30 idle minutes. Output is bounded to 200k characters.
|
|
486
|
+
- Revoking a device deletes its token and immediately ends every SSE stream
|
|
487
|
+
opened with it (global events and per-Session follows), so a lost phone stops
|
|
488
|
+
receiving events at revoke time rather than on its next reconnect.
|
|
489
|
+
- JSON bodies are bounded (`maxBodyBytes`) and rate-limited per client address.
|
|
490
|
+
- Pairing has a TTL, a one-time code, and a per-address failure cap.
|
|
491
|
+
- Plain HTTP on a public address is the user's choice and is surfaced by the
|
|
492
|
+
app as a strong warning; the app refuses to pair publicly over HTTP until the
|
|
493
|
+
user explicitly confirms. Prefer Tailscale, a private address, or TLS.
|
|
494
|
+
|
|
495
|
+
## Verification
|
|
496
|
+
|
|
497
|
+
The plugin ships an integration suite that mounts the real router on a local
|
|
498
|
+
HTTP server with a fake Host context:
|
|
499
|
+
|
|
500
|
+
```sh
|
|
501
|
+
node --import tsx --test tests/*.test.ts
|
|
502
|
+
# or, when deps are installed:
|
|
503
|
+
pnpm test
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
It covers health, pairing and one-time-code consumption, token auth, session
|
|
507
|
+
projection, Host/Origin fences, approval claim/answer, browser-first delegation,
|
|
508
|
+
session-wide grants, question answers, terminal create/input/resize/close,
|
|
509
|
+
revoke stream teardown, body limits, and JSON-safe device persistence.
|
|
510
|
+
|
|
511
|
+
The app repository also contains a recorded M1 curl walkthrough in
|
|
512
|
+
`docs/M1-ACCEPTANCE.md` (https://cnb.cool/ada87/app-dsh-hello).
|
|
513
|
+
|
|
514
|
+
## Known limitations
|
|
515
|
+
|
|
516
|
+
- dsh is developer preview; the plugin is pinned to `0.2.x`.
|
|
517
|
+
- Session title/list reads call the projection service per row (fine for a
|
|
518
|
+
personal Host; not optimized for thousands of sessions).
|
|
519
|
+
- `always` is process-local and disappears on restart.
|
|
520
|
+
- Push is implemented for FCM v1 and APNs token auth, but this repository cannot
|
|
521
|
+
exercise Apple/Google credentials.
|
|
522
|
+
- The app reads committed `assistant/message` events; assistant token deltas
|
|
523
|
+
(`assistant-stream` frames) are not rendered yet.
|
|
524
|
+
- The browser escape hatch opens the Web root; dsh does not expose the launch
|
|
525
|
+
token to plugins, so an already-authenticated browser session is required.
|
|
526
|
+
|
|
527
|
+
## License
|
|
528
|
+
|
|
529
|
+
MIT
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { HostContext } from './host.js';
|
|
2
|
+
/**
|
|
3
|
+
* Read-only catalogs for the phone's new-session and model pickers. Every
|
|
4
|
+
* service is optional: a Host profile without workspaces, agent presets, or
|
|
5
|
+
* an LLM runtime simply reports the catalog as unavailable and the phone
|
|
6
|
+
* hides the corresponding selector.
|
|
7
|
+
*/
|
|
8
|
+
export interface WorkspaceItem {
|
|
9
|
+
id: string;
|
|
10
|
+
path: string;
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
export interface WorkspaceCreateValue {
|
|
14
|
+
workspace: WorkspaceItem;
|
|
15
|
+
}
|
|
16
|
+
export interface AgentPresetItem {
|
|
17
|
+
id: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
broken?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AgentPresetList {
|
|
23
|
+
defaultId: string | null;
|
|
24
|
+
items: AgentPresetItem[];
|
|
25
|
+
}
|
|
26
|
+
export interface ModelSelection {
|
|
27
|
+
provider: string;
|
|
28
|
+
model: string;
|
|
29
|
+
reasoningEffort?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ModelCatalogModel {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
reasoningEfforts: string[];
|
|
35
|
+
defaultEffort?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ModelCatalogProvider {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
models: ModelCatalogModel[];
|
|
41
|
+
}
|
|
42
|
+
export interface ModelCatalog {
|
|
43
|
+
default: ModelSelection | null;
|
|
44
|
+
providers: ModelCatalogProvider[];
|
|
45
|
+
}
|
|
46
|
+
interface ModelCarrier {
|
|
47
|
+
current(): ModelSelection | undefined;
|
|
48
|
+
select(selection: ModelSelection): void;
|
|
49
|
+
}
|
|
50
|
+
interface AgentWithModel {
|
|
51
|
+
model?: ModelCarrier;
|
|
52
|
+
}
|
|
53
|
+
export declare function workspacesAvailable(ctx: HostContext): boolean;
|
|
54
|
+
export declare function agentPresetsAvailable(ctx: HostContext): boolean;
|
|
55
|
+
export declare function modelsAvailable(ctx: HostContext): boolean;
|
|
56
|
+
export declare function listWorkspaces(ctx: HostContext): WorkspaceItem[];
|
|
57
|
+
/** Adopt an existing Host directory as a workspace (the dsh Web folder-plus action). */
|
|
58
|
+
export declare function createWorkspace(ctx: HostContext, path: string, title?: string): Promise<WorkspaceItem>;
|
|
59
|
+
export declare function workspaceRenameAvailable(ctx: HostContext): boolean;
|
|
60
|
+
/** Rename a workspace without touching its directory or sessions. */
|
|
61
|
+
export declare function renameWorkspace(ctx: HostContext, id: string, title: string): Promise<{
|
|
62
|
+
workspace: WorkspaceItem;
|
|
63
|
+
} | {
|
|
64
|
+
code: 'workspace-not-found';
|
|
65
|
+
}>;
|
|
66
|
+
/** Pin/unpin a Session on every dsh Web grouping surface. */
|
|
67
|
+
export declare function setSessionPinned(ctx: HostContext, sessionId: string, pinned: boolean): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Archive/unarchive a Session. Archiving a running Session fails unless
|
|
70
|
+
* `stopActivity` is explicitly true; the phone asks the user to stop first
|
|
71
|
+
* rather than silently cancelling work.
|
|
72
|
+
*/
|
|
73
|
+
export declare function setSessionArchived(ctx: HostContext, sessionId: string, archived: boolean, stopActivity?: boolean): Promise<void>;
|
|
74
|
+
export declare function listAgentPresets(ctx: HostContext): Promise<AgentPresetList>;
|
|
75
|
+
export interface UploadReceipt {
|
|
76
|
+
receiptId: string;
|
|
77
|
+
kind: 'file' | 'image';
|
|
78
|
+
name?: string;
|
|
79
|
+
bytes?: number;
|
|
80
|
+
mediaType?: string;
|
|
81
|
+
width?: number;
|
|
82
|
+
height?: number;
|
|
83
|
+
}
|
|
84
|
+
export declare function uploadsAvailable(ctx: HostContext): boolean;
|
|
85
|
+
export declare function uploadAttachment(ctx: HostContext, sessionId: string, input: {
|
|
86
|
+
kind: 'file' | 'image';
|
|
87
|
+
name?: string;
|
|
88
|
+
mediaType?: string;
|
|
89
|
+
bytes: Buffer;
|
|
90
|
+
}): Promise<UploadReceipt>;
|
|
91
|
+
export declare function modelCatalog(ctx: HostContext): Promise<ModelCatalog>;
|
|
92
|
+
export declare function invalidateModelCatalog(): void;
|
|
93
|
+
export declare function currentSessionModel(agent: AgentWithModel | undefined, fallback: ModelSelection | null): ModelSelection | null;
|
|
94
|
+
/**
|
|
95
|
+
* Switch the session's model. Mirrors the Host's own validation order: the
|
|
96
|
+
* route must resolve before the durable model/selection event is appended.
|
|
97
|
+
*/
|
|
98
|
+
export declare function selectSessionModel(ctx: HostContext, agent: AgentWithModel | undefined, selection: ModelSelection): Promise<void>;
|
|
99
|
+
export {};
|
|
100
|
+
//# sourceMappingURL=catalogs.d.ts.map
|
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