@oh-my-pi/pi-wire 18.5.0 → 18.6.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.5.1] - 2026-10-03
6
+
7
+ ### Added
8
+
9
+ - Added support for submitting explicit prompts to live editable composers without simulating keyboard input.
10
+
5
11
  ## [18.4.11] - 2026-10-02
6
12
 
7
13
  ### Added
@@ -328,6 +328,9 @@ export interface TspEditorProps {
328
328
  /** The text is code in this language (`python`, `bash`): highlighted, in the mono face. */
329
329
  lang?: string;
330
330
  readonly?: boolean;
331
+ /** Ready to accept an atomic `send` when advertised in `hello.features`.
332
+ * Independent of text editability or keyboard focus; absent or false is not ready. */
333
+ sendable?: boolean;
331
334
  maxLines?: number;
332
335
  }
333
336
  export type TspInputProps = Omit<TspEditorProps, "maxLines">;
@@ -932,6 +935,7 @@ export type TspQuery = {
932
935
  v: readonly number[];
933
936
  app: string;
934
937
  ver?: string;
938
+ features?: readonly string[];
935
939
  } | {
936
940
  q: "blobs";
937
941
  ids: readonly string[];
@@ -1038,6 +1042,21 @@ export type TspEvent = {
1038
1042
  sf: string;
1039
1043
  id: string;
1040
1044
  }
1045
+ /**
1046
+ * Submit `text` as one prompt through the addressed composer's ordinary
1047
+ * submission path, without paste or keyboard simulation. Sent only when
1048
+ * the program's `hello.features` includes `"send"` and `sf`/`id` identify
1049
+ * a live editable composer whose `sendable` is exactly true. Writable text
1050
+ * or keyboard focus alone does not imply submission readiness. Blank text is
1051
+ * a no-op; an existing draft is retained for local recall, not appended to
1052
+ * the supplied prompt.
1053
+ */
1054
+ | {
1055
+ ev: "send";
1056
+ sf: string;
1057
+ id: string;
1058
+ text: string;
1059
+ }
1041
1060
  /**
1042
1061
  * The user clicked into node `id` (an `editor`/`input` without the focus, or
1043
1062
  * a `prefs` sheet while the focus is outside it): the program moves its
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.0",
4
+ "version": "18.6.0",
5
5
  "description": "Shared wire protocol types for omp packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": {
package/src/tsp.ts CHANGED
@@ -357,6 +357,9 @@ export interface TspEditorProps {
357
357
  /** The text is code in this language (`python`, `bash`): highlighted, in the mono face. */
358
358
  lang?: string;
359
359
  readonly?: boolean;
360
+ /** Ready to accept an atomic `send` when advertised in `hello.features`.
361
+ * Independent of text editability or keyboard focus; absent or false is not ready. */
362
+ sendable?: boolean;
360
363
  maxLines?: number;
361
364
  }
362
365
  export type TspInputProps = Omit<TspEditorProps, "maxLines">;
@@ -902,7 +905,7 @@ export interface TspPalette {
902
905
 
903
906
  /** Verb `q`. */
904
907
  export type TspQuery =
905
- | { q: "hello"; v: readonly number[]; app: string; ver?: string }
908
+ | { q: "hello"; v: readonly number[]; app: string; ver?: string; features?: readonly string[] }
906
909
  | { q: "blobs"; ids: readonly string[] };
907
910
 
908
911
  /** Verb `r`. */
@@ -954,6 +957,16 @@ export type TspEvent =
954
957
  * no-op when there is nothing to undo. Sent only when `hello` lists `"undo"`.
955
958
  */
956
959
  | { ev: "undo"; sf: string; id: string }
960
+ /**
961
+ * Submit `text` as one prompt through the addressed composer's ordinary
962
+ * submission path, without paste or keyboard simulation. Sent only when
963
+ * the program's `hello.features` includes `"send"` and `sf`/`id` identify
964
+ * a live editable composer whose `sendable` is exactly true. Writable text
965
+ * or keyboard focus alone does not imply submission readiness. Blank text is
966
+ * a no-op; an existing draft is retained for local recall, not appended to
967
+ * the supplied prompt.
968
+ */
969
+ | { ev: "send"; sf: string; id: string; text: string }
957
970
  /**
958
971
  * The user clicked into node `id` (an `editor`/`input` without the focus, or
959
972
  * a `prefs` sheet while the focus is outside it): the program moves its