@oh-my-pi/pi-wire 18.5.1 → 18.6.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.
@@ -11,9 +11,11 @@
11
11
  * `q` query, `o` open, `f` frame, `b` blob, `t` palette, `x` close. Terminal →
12
12
  * program: `r` reply, `e` event (on the pty's input side).
13
13
  *
14
- * The normative spec is `crates/tern/SURFACE_PROTOCOL.md` in the Stencil
15
- * repository; these types mirror it. Unknown fields and verbs are ignored in
16
- * both directions, so every addition here is optional.
14
+ * The normative spec is the Tern SDK's Surface Protocol and Elements reference
15
+ * (`docs/sdk/src/protocol` and `docs/sdk/src/elements` in the Stencil
16
+ * repository, https://docs.stencil.so/tern/protocol/); these types mirror it.
17
+ * Unknown fields and verbs are ignored in both directions, so every addition
18
+ * here is optional.
17
19
  */
18
20
  /** Protocol version this build speaks. */
19
21
  export declare const TSP_VERSION = 1;
@@ -328,6 +330,9 @@ export interface TspEditorProps {
328
330
  /** The text is code in this language (`python`, `bash`): highlighted, in the mono face. */
329
331
  lang?: string;
330
332
  readonly?: boolean;
333
+ /** Ready to accept an atomic `send` when advertised in `hello.features`.
334
+ * Independent of text editability or keyboard focus; absent or false is not ready. */
335
+ sendable?: boolean;
331
336
  maxLines?: number;
332
337
  }
333
338
  export type TspInputProps = Omit<TspEditorProps, "maxLines">;
@@ -415,7 +420,7 @@ export interface TspPickerItem {
415
420
  export interface TspPickerColumn {
416
421
  id: string;
417
422
  head?: string;
418
- /** `elapsed`: the value is an age in ms at send; Tern clocks it (spec §9). */
423
+ /** `elapsed`: the value is an age in ms at send; Tern clocks it. */
419
424
  format?: "text" | "num" | "price" | "bar" | "time" | "elapsed" | "dim";
420
425
  /** Lower priorities hide first when narrow. */
421
426
  priority?: number;
@@ -1043,8 +1048,10 @@ export type TspEvent = {
1043
1048
  * Submit `text` as one prompt through the addressed composer's ordinary
1044
1049
  * submission path, without paste or keyboard simulation. Sent only when
1045
1050
  * the program's `hello.features` includes `"send"` and `sf`/`id` identify
1046
- * a live editable composer. Blank text is a no-op; an existing draft is
1047
- * retained for local recall, not appended to the supplied prompt.
1051
+ * a live editable composer whose `sendable` is exactly true. Writable text
1052
+ * or keyboard focus alone does not imply submission readiness. Blank text is
1053
+ * a no-op; an existing draft is retained for local recall, not appended to
1054
+ * the supplied prompt.
1048
1055
  */
1049
1056
  | {
1050
1057
  ev: "send";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-wire",
4
- "version": "18.5.1",
4
+ "version": "18.6.1",
5
5
  "description": "Shared wire protocol types for omp packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": {
package/src/tsp.ts CHANGED
@@ -11,9 +11,11 @@
11
11
  * `q` query, `o` open, `f` frame, `b` blob, `t` palette, `x` close. Terminal →
12
12
  * program: `r` reply, `e` event (on the pty's input side).
13
13
  *
14
- * The normative spec is `crates/tern/SURFACE_PROTOCOL.md` in the Stencil
15
- * repository; these types mirror it. Unknown fields and verbs are ignored in
16
- * both directions, so every addition here is optional.
14
+ * The normative spec is the Tern SDK's Surface Protocol and Elements reference
15
+ * (`docs/sdk/src/protocol` and `docs/sdk/src/elements` in the Stencil
16
+ * repository, https://docs.stencil.so/tern/protocol/); these types mirror it.
17
+ * Unknown fields and verbs are ignored in both directions, so every addition
18
+ * here is optional.
17
19
  */
18
20
 
19
21
  /** Protocol version this build speaks. */
@@ -357,6 +359,9 @@ export interface TspEditorProps {
357
359
  /** The text is code in this language (`python`, `bash`): highlighted, in the mono face. */
358
360
  lang?: string;
359
361
  readonly?: boolean;
362
+ /** Ready to accept an atomic `send` when advertised in `hello.features`.
363
+ * Independent of text editability or keyboard focus; absent or false is not ready. */
364
+ sendable?: boolean;
360
365
  maxLines?: number;
361
366
  }
362
367
  export type TspInputProps = Omit<TspEditorProps, "maxLines">;
@@ -433,7 +438,7 @@ export interface TspPickerItem {
433
438
  export interface TspPickerColumn {
434
439
  id: string;
435
440
  head?: string;
436
- /** `elapsed`: the value is an age in ms at send; Tern clocks it (spec §9). */
441
+ /** `elapsed`: the value is an age in ms at send; Tern clocks it. */
437
442
  format?: "text" | "num" | "price" | "bar" | "time" | "elapsed" | "dim";
438
443
  /** Lower priorities hide first when narrow. */
439
444
  priority?: number;
@@ -958,8 +963,10 @@ export type TspEvent =
958
963
  * Submit `text` as one prompt through the addressed composer's ordinary
959
964
  * submission path, without paste or keyboard simulation. Sent only when
960
965
  * the program's `hello.features` includes `"send"` and `sf`/`id` identify
961
- * a live editable composer. Blank text is a no-op; an existing draft is
962
- * retained for local recall, not appended to the supplied prompt.
966
+ * a live editable composer whose `sendable` is exactly true. Writable text
967
+ * or keyboard focus alone does not imply submission readiness. Blank text is
968
+ * a no-op; an existing draft is retained for local recall, not appended to
969
+ * the supplied prompt.
963
970
  */
964
971
  | { ev: "send"; sf: string; id: string; text: string }
965
972
  /**