@byokit/herdr 0.1.2 → 0.1.6
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/CHANGELOG.md +20 -0
- package/dist/notices.js +2 -2
- package/dist/testing/fake-herdr/bin.js +7 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.6 (2026-09-30)
|
|
6
|
+
|
|
7
|
+
- Depends on @byokit/relay 0.3.0.
|
|
8
|
+
|
|
9
|
+
## 0.1.5 (2026-09-30)
|
|
10
|
+
|
|
11
|
+
- Depends on @byokit/relay 0.2.2.
|
|
12
|
+
- Depends on @byokit/link 0.4.0.
|
|
13
|
+
|
|
14
|
+
- The test fake's `fake.stream` ends with one `fake.stream.done` line on the same ordered byte stream, so the
|
|
15
|
+
paused-terminal backpressure test asserts delivery causally instead of on a wall-clock wait.
|
|
16
|
+
|
|
17
|
+
## 0.1.4 (2026-09-30)
|
|
18
|
+
|
|
19
|
+
- Preserve seed-based notice opening with @byokit/seal 0.2.0.
|
|
20
|
+
|
|
21
|
+
## 0.1.3
|
|
22
|
+
|
|
23
|
+
- Depends on @byokit/reach 0.3.0.
|
|
24
|
+
|
|
5
25
|
## 0.1.2 (2026-09-29)
|
|
6
26
|
|
|
7
27
|
- FIX: `prompt` now reaches an agent that was already running when the app connected. Herdr marks only
|
package/dist/notices.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Sealed blocked-approval notices: the relay reads only a generic title, the phone opens the sealed body with its
|
|
2
2
|
// own key (docs/runtime-kits.md 7.3). Portable: no Node import anywhere in it — `./device` re-exports `openNotice`.
|
|
3
|
-
import { boxKeyPairFromSeed,
|
|
3
|
+
import { boxKeyPairFromSeed, openBoxFromSeed, sealBox } from '@byokit/seal';
|
|
4
4
|
const ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
|
|
5
5
|
/** Base64url without padding, hand-rolled so this file stays portable (no Buffer, no atob). */
|
|
6
6
|
export function encodeB64Url(bytes) {
|
|
@@ -68,7 +68,7 @@ export function openNotice(data, seed) {
|
|
|
68
68
|
const bundle = decodeB64Url(data.sealed);
|
|
69
69
|
if (bundle === null)
|
|
70
70
|
return null;
|
|
71
|
-
const bytes =
|
|
71
|
+
const bytes = openBoxFromSeed(bundle, seed);
|
|
72
72
|
if (bytes === null)
|
|
73
73
|
return null;
|
|
74
74
|
let parsed;
|
|
@@ -88,19 +88,24 @@ async function runServer() {
|
|
|
88
88
|
// resizes the session and answers one empty frame stamped with the new size; `terminal.release`
|
|
89
89
|
// exits; `{"type":"fake.stream","count":n,"size":b,"progress":file}` streams n frames with full
|
|
90
90
|
// `<i>:` plus b bytes as fast as the pipe takes them, recording the frames-written count in
|
|
91
|
-
// `progress` after each write so a test can see how far a paused reader let the stream run
|
|
91
|
+
// `progress` after each write so a test can see how far a paused reader let the stream run, then
|
|
92
|
+
// one `{"type":"fake.stream.done","count":n}` line on the same ordered byte stream: when a test sees
|
|
93
|
+
// the marker, every stream frame is already past every frame handler, so the delivery verdict is
|
|
94
|
+
// causal instead of a wall-clock wait (a stall then means a genuinely wedged child, not a slow one).
|
|
92
95
|
function frame(paneId, full, extra = {}) {
|
|
93
96
|
return `${JSON.stringify({ type: 'terminal.frame', pane_id: paneId, data: full, full, bytes: Buffer.byteLength(full), ...extra })}\n`;
|
|
94
97
|
}
|
|
95
98
|
async function stream(paneId, o) {
|
|
99
|
+
const count = o.count ?? 0;
|
|
96
100
|
const pad = 'x'.repeat(o.size ?? 1024);
|
|
97
|
-
for (let i = 0; i <
|
|
101
|
+
for (let i = 0; i < count; i += 1) {
|
|
98
102
|
const ok = process.stdout.write(frame(paneId, `${i}:${pad}`));
|
|
99
103
|
if (o.progress)
|
|
100
104
|
writeFileSync(o.progress, String(i + 1));
|
|
101
105
|
if (!ok)
|
|
102
106
|
await new Promise((resolve) => process.stdout.once('drain', resolve));
|
|
103
107
|
}
|
|
108
|
+
process.stdout.write(`${JSON.stringify({ type: 'fake.stream.done', pane_id: paneId, count })}\n`);
|
|
104
109
|
}
|
|
105
110
|
function runTerminal(args) {
|
|
106
111
|
// `herdr terminal session <control|observe> <pane> [--takeover] --cols <n> --rows <n>`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byokit/herdr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Drive the Herdr on this computer — workspaces, tabs, panes, agents and blocked-approval answers — from an app, or hand it to a phone over @byokit/link.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"prepack": "tsc -b && node ../../scripts/fix-words-dts.cjs"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@byokit/link": "0.
|
|
56
|
-
"@byokit/relay": "0.
|
|
57
|
-
"@byokit/reach": "0.
|
|
58
|
-
"@byokit/seal": "0.
|
|
55
|
+
"@byokit/link": "0.4.0",
|
|
56
|
+
"@byokit/relay": "0.3.0",
|
|
57
|
+
"@byokit/reach": "0.3.0",
|
|
58
|
+
"@byokit/seal": "0.2.0",
|
|
59
59
|
"ws": "8.21.3"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|