@awebai/oats 0.67.1 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/bin/oats.mjs +112 -16
  2. package/docs/capabilities.md +54 -5
  3. package/docs/capability-manifest.schema.json +4 -0
  4. package/docs/design/2026-10-22-module-upgrade.md +192 -0
  5. package/docs/design/README.md +4 -0
  6. package/docs/desktop-cli-api.md +248 -9
  7. package/docs/desktop.md +278 -61
  8. package/docs/first-team.md +5 -3
  9. package/docs/implementation.md +42 -3
  10. package/docs/integrations.md +16 -4
  11. package/docs/knowledge.md +44 -27
  12. package/docs/layers.md +2 -2
  13. package/docs/official-catalog.md +5 -5
  14. package/docs/packages.md +14 -14
  15. package/docs/release-notes/v0.68.0.md +504 -0
  16. package/docs/servers.md +6 -1
  17. package/docs/souls-and-instances.md +38 -3
  18. package/docs/tui.md +625 -223
  19. package/docs/upgrading.md +62 -6
  20. package/docs/workspaces.md +2 -2
  21. package/lib/capability-contract.mjs +6 -5
  22. package/lib/core.mjs +222 -38
  23. package/lib/instance-events.mjs +1 -1
  24. package/lib/instance-resolution.mjs +5 -5
  25. package/lib/instance-upgrade.mjs +1445 -0
  26. package/lib/materialize.mjs +225 -78
  27. package/lib/servers.mjs +11 -7
  28. package/lib/upgrade-state.mjs +101 -0
  29. package/lib/workspace.mjs +4 -1
  30. package/lib/worktree.mjs +103 -12
  31. package/package-catalog.json +5 -4
  32. package/package.json +1 -1
  33. package/packages/client/cli-adapter.mjs +15 -1
  34. package/packages/client/cli-locator.mjs +2 -2
  35. package/packages/client/deployment-panel.mjs +6 -2
  36. package/packages/client/keymap.mjs +89 -45
  37. package/packages/client/keys-file.mjs +9 -5
  38. package/packages/client/panel-views.mjs +16 -3
  39. package/packages/client/spawn-naming.mjs +7 -6
  40. package/packages/client/spawn-preview-cli.mjs +37 -1
  41. package/packages/client/spawn-preview-contract.mjs +35 -0
  42. package/packages/client/spawn-preview.mjs +35 -2
  43. package/packages/client/team-members.mjs +4 -1
  44. package/packages/client/workspace-step.mjs +25 -0
  45. package/packages/tui/README.md +5 -5
  46. package/packages/tui/lib/actions.mjs +51 -27
  47. package/packages/tui/lib/client.mjs +3 -2
  48. package/packages/tui/lib/config.mjs +4 -4
  49. package/packages/tui/lib/main.mjs +27 -13
  50. package/packages/tui/lib/model.mjs +132 -19
  51. package/packages/tui/lib/store.mjs +343 -68
  52. package/packages/tui/lib/term/keys.mjs +5 -3
  53. package/packages/tui/lib/term/kitty.mjs +28 -10
  54. package/packages/tui/lib/term/screen.mjs +15 -6
  55. package/packages/tui/lib/term/through.mjs +33 -28
  56. package/packages/tui/lib/views/frame.mjs +88 -109
  57. package/packages/tui/lib/views/help.mjs +56 -34
  58. package/packages/tui/lib/views/instances.mjs +4 -2
  59. package/packages/tui/lib/views/workspaces.mjs +55 -0
  60. package/skills/oats-getting-started/SKILL.md +92 -43
@@ -8,7 +8,7 @@
8
8
  * a paste { paste } or { paste: "", truncated: true }
9
9
  * an answer { keyboard: flags }: the terminal's answer to the protocol's query (`CSI ? flags u`),
10
10
  * while the parser waits for one */
11
- import { confirmed, kittyId, kittyKey, legacyBytes, legacyParams } from "./kitty.mjs";
11
+ import { confirmed, kittyId, kittyKey, legacyBytes, legacyChord, legacyParams } from "./kitty.mjs";
12
12
 
13
13
  export const ESC_TIMEOUT_MS = 50;
14
14
  export const PASTE_LIMIT = 1024 * 1024;
@@ -297,8 +297,10 @@ export function createKeyParser({ now, keyboard = null, chords = NO_CHORDS, lead
297
297
  if (bytes === null) { flush(); return; }
298
298
  const events = legacyEvents(bytes);
299
299
  // A key with an id of its own whose legacy bytes read as the leader (Ctrl+Shift+X is 0x18, as
300
- // Ctrl+X) is its own key, which nothing binds: never the leader.
301
- if (id !== null && leader !== null && events.length === 1 && keyId(events[0]) === leader) { emit(named(String.fromCharCode(key.code), key.ctrl, key.alt, key.shift)); return; }
300
+ // Ctrl+X) or as a chord of the family in force (Ctrl+Alt+1 is ESC 1, as Alt+1) is its own key,
301
+ // which nothing binds: never the leader, nor that chord.
302
+ const as = id !== null && events.length === 1 ? keyId(events[0]) : null;
303
+ if (as !== null && ((leader !== null && as === leader) || (legacyChord(as) && chords.has(as)))) { emit(named(String.fromCharCode(key.code), key.ctrl, key.alt, key.shift)); return; }
302
304
  for (const event of events) emit(event);
303
305
  };
304
306
 
@@ -15,8 +15,9 @@
15
15
  * family, which keep their own key id (`ctrl+alt+k`, `ctrl+shift+k`, kittyId), and the exact Alt
16
16
  * and Esc above. A Ctrl+Shift chord is read only from this event, whose Shift bit is its own: its
17
17
  * legacy bytes are Ctrl's alone (Ctrl+Shift+D is 0x04, EOF), and no legacy byte is ever one. What it types into an agent is those legacy bytes
18
- * (`legacyBytes`), so the agent's program gets what it gets without the protocol. The Alt+Shift
19
- * arrow chords need no exception: their legacy sequence is their own (LEGACY_CHORDS). */
18
+ * (`legacyBytes`), so the agent's program gets what it gets without the protocol. The Alt family's
19
+ * chords need no exception: an Alt arrow's legacy sequence is its own, and Alt with a letter or a
20
+ * digit is ESC and the character (legacyChordText). */
20
21
 
21
22
  /** The flags pushed (`CSI > flags u`): 1, disambiguate the escape codes, and 4, report alternate
22
23
  * keys, so the shifted key a key with Shift makes on the person's layout comes with it. The
@@ -71,14 +72,31 @@ export function kittyId(key) {
71
72
  return code >= 0x31 && code <= 0x39 && !key.shift ? `ctrl+alt+${String.fromCharCode(code)}` : null;
72
73
  }
73
74
 
74
- /** The chords whose key has a sequence of its own without the protocol, and keeps it under it:
75
- * Alt+Shift with an arrow, `CSI 1 ; 4 <final>` (xterm's modifier 4, Alt and Shift), key id -> final.
76
- * They are read with the protocol or without it, in the list (term/keys.mjs reads the sequence as
77
- * the key) and in a terminal (term/through.mjs). Ctrl+Alt+Shift with an arrow (`CSI 1 ; 8 A`) is
78
- * another key, and no chord. */
79
- export const LEGACY_CHORDS = Object.freeze({ __proto__: null, "alt+shift+up": "A", "alt+shift+down": "B", "alt+shift+right": "C", "alt+shift+left": "D" });
80
- /** Whether the chord key id `id` is read without the protocol too (LEGACY_CHORDS). */
81
- export const legacyChord = (id) => typeof id === "string" && Object.hasOwn(LEGACY_CHORDS, id);
75
+ /** The arrow chords, whose key has a sequence of its own without the protocol and keeps it under
76
+ * it: Alt with an arrow, `CSI 1 ; 3 <final>` (xterm's modifier 3), and Alt+Shift with one,
77
+ * `CSI 1 ; 4 <final>`; key id -> the bytes after `CSI`. Ctrl+Alt+Shift with an arrow (`CSI 1 ; 8 A`)
78
+ * is another key, and no chord. */
79
+ export const LEGACY_CHORDS = Object.freeze({
80
+ __proto__: null,
81
+ "alt+up": "1;3A", "alt+down": "1;3B", "alt+right": "1;3C", "alt+left": "1;3D",
82
+ "alt+shift+up": "1;4A", "alt+shift+down": "1;4B", "alt+shift+right": "1;4C", "alt+shift+left": "1;4D",
83
+ });
84
+ /** Alt with an ASCII letter or digit, as the TUI spells it: `alt+k`, and `alt+E` for Alt+Shift+E,
85
+ * which a terminal sends as ESC and the capital (term/keys.mjs reads it so). */
86
+ const ALT_CHARACTER = /^alt\+([a-zA-Z0-9])$/;
87
+ /** The bytes after ESC that the chord key id `id` is without the protocol, as text, or null when it
88
+ * has none of its own: an arrow chord's `[` and its sequence (LEGACY_CHORDS), or the character of
89
+ * Alt with a letter or a digit. Every terminal sends these, with the protocol or without it (under
90
+ * it the protocol's event for Alt+K reads as its legacy bytes, ESC `k`), so they are read in the
91
+ * list (term/keys.mjs reads them as the key) and in a terminal (term/through.mjs) either way. A
92
+ * Ctrl+Alt or Ctrl+Shift chord has none: it is read from the protocol's event alone (kittyId). */
93
+ export function legacyChordText(id) {
94
+ if (typeof id !== "string") return null;
95
+ if (Object.hasOwn(LEGACY_CHORDS, id)) return `[${LEGACY_CHORDS[id]}`;
96
+ return ALT_CHARACTER.exec(id)?.[1] ?? null;
97
+ }
98
+ /** Whether the chord key id `id` is read without the protocol too (legacyChordText). */
99
+ export const legacyChord = (id) => legacyChordText(id) !== null;
82
100
 
83
101
  const ESC = 0x1b;
84
102
  /** The functional keys of the protocol's private-use range the TUI forwards: the keypad, as the key
@@ -50,6 +50,9 @@ export function glyphs(env, { ascii = false } = {}) {
50
50
  * `rows[r]` is the spans of row r, drawn in order, a later one over an earlier one:
51
51
  * `{ col, text, style?, width? }`, `text` safe text, `width` the cells the span may take (default:
52
52
  * to the right edge); or a fill, `{ col, width, style? }`, `width` blank cells in that style.
53
+ * A text span with `after: true` follows the text span drawn just before it: it is drawn that
54
+ * many cells to the left of `col` as that span left blank of its width, because its text was cut
55
+ * or a character of it drew narrower than counted (a mark right after a name: views/workspaces.mjs).
53
56
  * `cells(rows, size)` answers the same frame as cells and writes nothing: `{ text, width, style }`
54
57
  * per cell, the second cell of a two-cell grapheme with `width: 0`. */
55
58
  export function createScreen({ utf8 = true, ascii = !utf8, color = true } = {}) {
@@ -66,10 +69,14 @@ export function createScreen({ utf8 = true, ascii = !utf8, color = true } = {})
66
69
  else if (line[x].width === 2) line[x + 1] = BLANK;
67
70
  line[x] = BLANK;
68
71
  }
69
- function place(line, span) {
70
- const { col, style = PLAIN } = span;
72
+ /** Draws one span on a line and answers the cells a text span left blank of its width (0 for
73
+ * a fill and for a span with no width), which the next span pulls back over when it is drawn
74
+ * `after` it. */
75
+ function place(line, span, left = 0) {
76
+ const { style = PLAIN } = span;
71
77
  if (!isStyle(style)) throw new TypeError("a span's style is a style value: make one with style()");
72
- if (!Number.isInteger(col) || col < 0) throw new RangeError("a span's column is a cell index from 0");
78
+ if (!Number.isInteger(span.col) || span.col < 0) throw new RangeError("a span's column is a cell index from 0");
79
+ const col = span.after === true ? Math.max(0, span.col - left) : span.col;
73
80
  const limit = span.width === undefined ? line.length : Math.min(line.length, col + span.width);
74
81
  // A fill: no text, a width. Blank cells in the span's style, which is how a bar is drawn
75
82
  // (a selected row in reverse video): text.mjs rightly makes no text of a run of spaces.
@@ -78,10 +85,10 @@ export function createScreen({ utf8 = true, ascii = !utf8, color = true } = {})
78
85
  if (!Number.isInteger(span.width) || span.width < 0) throw new RangeError("a fill has a width in cells");
79
86
  const blank = cell(" ", 1, style);
80
87
  for (let x = col; x < limit; x++) { clear(line, x); line[x] = blank; }
81
- return;
88
+ return 0;
82
89
  }
83
90
  const source = textOf(span.text);
84
- if (col >= limit) return;
91
+ if (col >= limit) return 0;
85
92
  let drawn = cells(source);
86
93
  // A terminal that is not reading UTF-8 would show each byte of a character on its own.
87
94
  if (!utf8) drawn = drawn.map((g) => (PRINTABLE_ASCII.test(g.text) ? g : { text: "?", width: 1 }));
@@ -100,11 +107,13 @@ export function createScreen({ utf8 = true, ascii = !utf8, color = true } = {})
100
107
  line[x] = cell(g.text, g.width, style);
101
108
  x += g.width;
102
109
  }
110
+ return span.width === undefined ? 0 : limit - x;
103
111
  }
104
112
  function layout(rows, size) {
105
113
  return Array.from({ length: size.rows }, (_, r) => {
106
114
  const line = Array.from({ length: size.cols }, () => BLANK);
107
- for (const span of rows[r] ?? []) place(line, span);
115
+ let left = 0;
116
+ for (const span of rows[r] ?? []) left = place(line, span, left);
108
117
  return line;
109
118
  });
110
119
  }
@@ -3,8 +3,9 @@
3
3
  // agent exactly as they came, and the scanner here looks for three things only: the back key's own
4
4
  // bytes (which take the focus back to the list), a bracketed paste (which goes to the agent as a
5
5
  // paste, so a back key inside it is pasted, not taken) and the chords (docs/tui.md, "Chords"): the
6
- // Alt+Shift arrows in every state, and under the kitty keyboard protocol the Ctrl+Alt ones too (or,
7
- // when keys.json chose that family, the Ctrl+Shift ones), every other key then typed as the bytes it sends without the protocol (see createThrough). Pure:
6
+ // Alt family's (Alt with a letter, a digit or an arrow) and the Alt+Shift arrows in every state, and
7
+ // under the kitty keyboard protocol the Ctrl+Alt ones too (or, when keys.json chose that family, the
8
+ // Ctrl+Shift ones), every other key then typed as the bytes it sends without the protocol (see createThrough). Pure:
8
9
  // no IO; the clock is injected.
9
10
  //
10
11
  // The back key is tui.json's `open.detachKey`. Its grammar is THE TUI'S OWN: the keys it can take
@@ -12,9 +13,9 @@
12
13
  // (lib/session-viewer.mjs) and keeps its set and its spelling, so a tui.json written for PR 4 means
13
14
  // the same key; it is not tied to the kernel's, which never sees this key any more.
14
15
  import { ESC_TIMEOUT_MS, PASTE_LIMIT, PASTE_PAUSE_MS, createKeyParser, keyId, legacyEvents } from "./keys.mjs";
15
- import { LEGACY_CHORDS, confirmed, kittyId, kittyKey, legacyBytes, legacyChord, legacySequence } from "./kitty.mjs";
16
+ import { confirmed, kittyId, kittyKey, legacyBytes, legacyChord, legacyChordText, legacySequence } from "./kitty.mjs";
16
17
 
17
- /** How long bytes held only as a beginning of the back key (or of an Alt+Shift arrow chord, see
18
+ /** How long bytes held only as a beginning of the back key (or of a chord's own bytes, see
18
19
  * createThrough) wait for the rest of it, in milliseconds: the back key counts only as ONE
19
20
  * keypress (a terminal writes a key's bytes at once; a split read of them comes within this), so
20
21
  * Esc and then `o` typed as two keys reach the agent as they were typed, and never as M-o. Bytes that may begin a paste's start marker wait
@@ -117,10 +118,11 @@ const decoder = () => new TextDecoder("utf-8", { fatal: false });
117
118
  * A Ctrl+Shift chord is read only so, from its event's Shift bit: a Ctrl+Shift letter that is not
118
119
  * among `chords` (every one under the default family) is typed as Ctrl and the letter
119
120
  * (`CSI 100;6u` is 0x04, the agent's Ctrl+D), and a C0 byte typed is never a chord.
120
- * The legacy bytes are read as the key they are: an Alt+Shift arrow among `chords`
121
- * (term/kitty.mjs LEGACY_CHORDS) is the chord however the protocol reports the lock keys in its
122
- * modifier (legacyParams: `CSI 1 ; 68 A` with Caps Lock is `CSI 1 ; 4 A`), and so is a keypad
123
- * arrow whose legacy bytes are that sequence.
121
+ * The legacy bytes are read as the key they are: a chord among `chords` with bytes of its own
122
+ * (term/kitty.mjs legacyChordText: Alt with a letter, a digit or an arrow, an Alt+Shift arrow) is
123
+ * the chord however the protocol reports the lock keys in its modifier (legacyParams: `CSI 1 ; 68 A`
124
+ * with Caps Lock is `CSI 1 ; 4 A`), and so is a keypad arrow whose legacy bytes are that sequence;
125
+ * Alt+K, `CSI 107 ; 3 u`, is ESC `k`.
124
126
  * Without it (`keyboard` null or "asking") no `CSI u` key is read and no key is made legacy, and
125
127
  * what follows holds. While
126
128
  * "asking", the answer may arrive split across reads, and over a slow link late: a read that ends
@@ -131,26 +133,28 @@ const decoder = () => new TextDecoder("utf-8", { fatal: false });
131
133
  * key with it. giveUp() hands on what is held for the answer.
132
134
  * A Control back key's byte right after ESC in a read is Ctrl+Alt with that key (ESC 0x18 is
133
135
  * Ctrl+Alt+X), as the key parser reads it: the agent's, never the back key.
134
- * The Alt+Shift arrow chords among `chords` are taken as the back key is: their one legacy
135
- * sequence exactly (`CSI 1 ; 4 A` to `D`, nothing but Alt and Shift in the modifier), with what
136
- * came after it in the read handed on as the rest.
136
+ * The chords among `chords` with bytes of their own (legacyChordText) are taken as the back key
137
+ * is: those bytes exactly (ESC `k` for Alt+K, ESC `E` for Alt+Shift+E, `CSI 1 ; 3 A` for Alt+Up,
138
+ * `CSI 1 ; 4 A` for Alt+Shift+Up, nothing but Alt, and Shift, in the modifier), with what came after
139
+ * it in the read handed on as the rest. The back key's bytes come first: a back key M-k is the
140
+ * back key, never the chord Alt+K.
137
141
  * A read is never held back from the agent but for a beginning of the back key's own bytes or of
138
142
  * such a chord's, or of a paste's start marker from its third byte: those wait for the next read,
139
143
  * or until `timeoutAt()` (BACK_KEY_SPLIT_MS for a key's alone, the key parser's Esc timeout when
140
144
  * they may begin a paste) hands them on as input, through `expire()` or the first read that comes
141
- * later, which then never completes the key with them. An Alt+Shift arrow chord is one keypress,
142
- * as the back key is: its bytes split across reads within BACK_KEY_SPLIT_MS are the chord, and
143
- * split further apart they reach the agent as they came (Alt+Shift+Up for the agent's program),
144
- * so a key of the agent's that begins as one does (Esc, `ESC [ 1`) waits no longer than that for
145
- * its sake. A paste is held until its end marker; one that reaches PASTE_LIMIT is dropped whole, and one whose end has not come
145
+ * later, which then never completes the key with them. A chord is one keypress, as the back key
146
+ * is: its bytes split across reads within BACK_KEY_SPLIT_MS are the chord, and split further apart
147
+ * they reach the agent as they came, so Esc and then `k` typed as two keys are the agent's (its
148
+ * program reads them as M-k: the way to a key the Alt family takes), and a key of the agent's that
149
+ * begins as one does (Esc, `ESC [ 1`) waits no longer than that for its sake. A paste is held until its end marker; one that reaches PASTE_LIMIT is dropped whole, and one whose end has not come
146
150
  * when a read arrives PASTE_PAUSE_MS after the one before is given to the agent as what it held,
147
151
  * and that read is scanned anew, as the key parser abandons a stalled paste. */
148
152
  export function createThrough({ sequences, now, keyboard = null, leader = null, chords = new Map(), answerBy = null }) {
149
153
  if (typeof now !== "function") throw new TypeError("createThrough needs an injected clock: { now: () => milliseconds }");
150
154
  if (!(keyboard === null || keyboard === "asking" || confirmed(keyboard))) throw new TypeError("keyboard is null, \"asking\" or flags that hold flag 1");
151
155
  const keys = sequences.map((seq) => Uint8Array.from(seq));
152
- /** The Alt+Shift arrow chords, `[bytes, does]`: their legacy sequence, read without the protocol. */
153
- const arrows = [...chords].filter(([id]) => legacyChord(id)).map(([id, does]) => [escaped(`[1;4${LEGACY_CHORDS[id]}`), does]);
156
+ /** The chords with bytes of their own, `[bytes, does]` (legacyChordText), read without the protocol. */
157
+ const owned = [...chords].filter(([id]) => legacyChord(id)).map(([id, does]) => [escaped(legacyChordText(id)), does]);
154
158
  let kb = keyboard;
155
159
  /** The bytes held for the next read, since when, and how long they may wait: BACK_KEY_SPLIT_MS
156
160
  * when they are held only as a beginning of the back key, ESC_TIMEOUT_MS when they may begin a
@@ -240,17 +244,17 @@ export function createThrough({ sequences, now, keyboard = null, leader = null,
240
244
  out.push({ back: true, rest: data.subarray(i + key.length) });
241
245
  return;
242
246
  }
243
- const arrow = b === ESC ? arrows.find(([seq]) => at(data, i, seq)) : undefined;
244
- if (arrow) {
247
+ const chord = b === ESC ? owned.find(([seq]) => at(data, i, seq)) : undefined;
248
+ if (chord) {
245
249
  if (i > 0) out.push({ input: data.subarray(0, i) });
246
- out.push({ chord: arrow[1], rest: data.subarray(i + arrow[0].length) });
250
+ out.push({ chord: chord[1], rest: data.subarray(i + chord[0].length) });
247
251
  return;
248
252
  }
249
- // The read ends on what may be the beginning of the back key, of an Alt+Shift arrow chord, of
250
- // a paste or of the answer awaited: held, as long as the longest that it may begin allows.
253
+ // The read ends on what may be the beginning of the back key, of a chord's own bytes, of a
254
+ // paste or of the answer awaited: held, as long as the longest that it may begin allows.
251
255
  const pasting = data.length - i >= PASTE_HELD_FROM && begins(data, i, PASTE_START);
252
256
  const answering = kb === "asking" && answerBegins(data, i);
253
- const keying = keys.some((seq) => begins(data, i, seq)) || arrows.some(([seq]) => begins(data, i, seq));
257
+ const keying = keys.some((seq) => begins(data, i, seq)) || owned.some(([seq]) => begins(data, i, seq));
254
258
  if (pasting || answering || keying) {
255
259
  if (i > 0) out.push({ input: data.subarray(0, i) });
256
260
  held = Uint8Array.from(data.subarray(i));
@@ -297,12 +301,13 @@ export function createThrough({ sequences, now, keyboard = null, leader = null,
297
301
  bytes = legacyBytes(key, kb);
298
302
  } else bytes = legacySequence(params, final);
299
303
  if (bytes === null) continue; // a key that sends nothing without the protocol: nothing
300
- // What the bytes read as without the protocol: the back key, or an Alt+Shift arrow chord. A
301
- // key with an id of its own (kittyId: Ctrl+Shift or Ctrl+Alt with a letter) is never the back
302
- // key, though its legacy bytes may read as it (Ctrl+Shift+X is 0x18, as Ctrl+X): it types them.
304
+ // What the bytes read as without the protocol: the back key, or a chord with bytes of its own. A
305
+ // key with an id of its own (kittyId: Ctrl+Shift or Ctrl+Alt with a letter or a digit) is never
306
+ // either, though its legacy bytes may read as one (Ctrl+Shift+X is 0x18, as Ctrl+X; Ctrl+Alt+1
307
+ // is ESC 1, as Alt+1, which the Alt family binds): it types them.
303
308
  const events = legacyEvents(bytes), id = events.length === 1 ? keyId(events[0]) : null;
304
309
  if (id !== null && id === leader && own === null) { out.push({ back: true, rest: data.subarray(end) }); return; }
305
- if (legacyChord(id) && chords.has(id)) { out.push({ chord: chords.get(id), rest: data.subarray(end) }); return; }
310
+ if (own === null && legacyChord(id) && chords.has(id)) { out.push({ chord: chords.get(id), rest: data.subarray(end) }); return; }
306
311
  out.push({ input: bytes });
307
312
  }
308
313
  handOn(data.length);