@ai-matrx/desktop-protocol 0.2.0 → 0.3.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.
@@ -56,6 +56,12 @@ declare function isDesktopProtocolError(value: unknown): value is DesktopProtoco
56
56
  */
57
57
  declare const PING_TEXT: "{\"type\":\"ping\"}";
58
58
  declare const PONG_TEXT: "{\"type\":\"pong\"}";
59
+ /**
60
+ * Every WebSocket (device, phone, browser, localhost) offers this subprotocol; the access token
61
+ * rides beside it as `${BEARER_PREFIX}<token>`, never in the URL. The server echoes only SUBPROTOCOL.
62
+ */
63
+ declare const SUBPROTOCOL: "matrx.v1";
64
+ declare const BEARER_PREFIX: "bearer.";
59
65
  declare const CloseCode: {
60
66
  readonly NORMAL: 1000;
61
67
  readonly GOING_AWAY: 1001;
@@ -636,10 +642,8 @@ declare const OPS: {
636
642
  }>;
637
643
  size: z.ZodInt;
638
644
  mtime: z.ZodNumber;
639
- mtime_ms: z.ZodInt;
640
645
  mode: z.ZodInt;
641
646
  target: z.ZodNullable<z.ZodString>;
642
- hidden: z.ZodBoolean;
643
647
  }, z.core.$strict>>;
644
648
  truncated: z.ZodBoolean;
645
649
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -663,10 +667,8 @@ declare const OPS: {
663
667
  }>;
664
668
  size: z.ZodInt;
665
669
  mtime: z.ZodNumber;
666
- mtime_ms: z.ZodInt;
667
670
  mode: z.ZodInt;
668
671
  target: z.ZodNullable<z.ZodString>;
669
- hidden: z.ZodBoolean;
670
672
  }, z.core.$strict>;
671
673
  readonly kind: "unary";
672
674
  readonly since: "1.0";
@@ -823,7 +825,6 @@ declare const OPS: {
823
825
  }, z.core.$strict>;
824
826
  readonly result: z.ZodObject<{
825
827
  paths: z.ZodArray<z.ZodString>;
826
- truncated: z.ZodBoolean;
827
828
  }, z.core.$strict>;
828
829
  readonly kind: "unary";
829
830
  readonly since: "1.0";
@@ -845,12 +846,13 @@ declare const OPS: {
845
846
  lines: z.ZodString;
846
847
  line_number: z.ZodInt;
847
848
  submatches: z.ZodArray<z.ZodObject<{
848
- match: z.ZodString;
849
+ match: z.ZodObject<{
850
+ text: z.ZodString;
851
+ }, z.core.$strict>;
849
852
  start: z.ZodInt;
850
853
  end: z.ZodInt;
851
854
  }, z.core.$strict>>;
852
855
  }, z.core.$strict>>;
853
- truncated: z.ZodBoolean;
854
856
  }, z.core.$strict>;
855
857
  readonly kind: "unary";
856
858
  readonly since: "1.0";
@@ -1758,10 +1760,8 @@ declare const NAMED_SCHEMAS: {
1758
1760
  }>;
1759
1761
  size: z.ZodInt;
1760
1762
  mtime: z.ZodNumber;
1761
- mtime_ms: z.ZodInt;
1762
1763
  mode: z.ZodInt;
1763
1764
  target: z.ZodNullable<z.ZodString>;
1764
- hidden: z.ZodBoolean;
1765
1765
  }, z.core.$strict>;
1766
1766
  readonly FsListParams: z.ZodObject<{
1767
1767
  path: z.ZodString;
@@ -1789,10 +1789,8 @@ declare const NAMED_SCHEMAS: {
1789
1789
  }>;
1790
1790
  size: z.ZodInt;
1791
1791
  mtime: z.ZodNumber;
1792
- mtime_ms: z.ZodInt;
1793
1792
  mode: z.ZodInt;
1794
1793
  target: z.ZodNullable<z.ZodString>;
1795
- hidden: z.ZodBoolean;
1796
1794
  }, z.core.$strict>>;
1797
1795
  truncated: z.ZodBoolean;
1798
1796
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -1915,7 +1913,6 @@ declare const NAMED_SCHEMAS: {
1915
1913
  }, z.core.$strict>;
1916
1914
  readonly FsSearchPathsResult: z.ZodObject<{
1917
1915
  paths: z.ZodArray<z.ZodString>;
1918
- truncated: z.ZodBoolean;
1919
1916
  }, z.core.$strict>;
1920
1917
  readonly FsSearchContentParams: z.ZodObject<{
1921
1918
  query: z.ZodString;
@@ -1932,12 +1929,13 @@ declare const NAMED_SCHEMAS: {
1932
1929
  lines: z.ZodString;
1933
1930
  line_number: z.ZodInt;
1934
1931
  submatches: z.ZodArray<z.ZodObject<{
1935
- match: z.ZodString;
1932
+ match: z.ZodObject<{
1933
+ text: z.ZodString;
1934
+ }, z.core.$strict>;
1936
1935
  start: z.ZodInt;
1937
1936
  end: z.ZodInt;
1938
1937
  }, z.core.$strict>>;
1939
1938
  }, z.core.$strict>>;
1940
- truncated: z.ZodBoolean;
1941
1939
  }, z.core.$strict>;
1942
1940
  readonly FsChange: z.ZodObject<{
1943
1941
  type: z.ZodEnum<{
@@ -2368,4 +2366,4 @@ declare const NAMED_SCHEMAS: {
2368
2366
  };
2369
2367
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2370
2368
 
2371
- export { ResponseMsg as A, StreamMsg as B, ClientType as C, DesktopProtocolError as D, EndReason as E, HelloMsg as H, Limits as L, NAMED_SCHEMAS as N, type OpName as O, PING_TEXT as P, RelayMsg as R, StreamMeta as S, Welcome as W, type OpParams as a, type OpResult as b, OPS as c, EVENTS as d, CancelMsg as e, ClientToCoreMsg as f, CloseCode as g, CloseCodeValue as h, isDesktopProtocolError as i, CoreToClientMsg as j, CreditMsg as k, EndMsg as l, ErrorCode as m, type ErrorCodeName as n, type ErrorData as o, ErrorMsg as p, ErrorReason as q, type ErrorReasonName as r, EventMsg as s, type EventName as t, type NamedSchemaId as u, OpDescriptor as v, type OpSpec as w, PONG_TEXT as x, ProtocolErrorBody as y, RequestMsg as z };
2369
+ export { ResponseMsg as A, BEARER_PREFIX as B, ClientType as C, DesktopProtocolError as D, EndReason as E, SUBPROTOCOL as F, StreamMsg as G, HelloMsg as H, Limits as L, NAMED_SCHEMAS as N, type OpName as O, PING_TEXT as P, RelayMsg as R, StreamMeta as S, Welcome as W, type OpParams as a, type OpResult as b, OPS as c, EVENTS as d, CancelMsg as e, ClientToCoreMsg as f, CloseCode as g, CloseCodeValue as h, isDesktopProtocolError as i, CoreToClientMsg as j, CreditMsg as k, EndMsg as l, ErrorCode as m, type ErrorCodeName as n, type ErrorData as o, ErrorMsg as p, ErrorReason as q, type ErrorReasonName as r, EventMsg as s, type EventName as t, type NamedSchemaId as u, OpDescriptor as v, type OpSpec as w, PONG_TEXT as x, ProtocolErrorBody as y, RequestMsg as z };
@@ -56,6 +56,12 @@ declare function isDesktopProtocolError(value: unknown): value is DesktopProtoco
56
56
  */
57
57
  declare const PING_TEXT: "{\"type\":\"ping\"}";
58
58
  declare const PONG_TEXT: "{\"type\":\"pong\"}";
59
+ /**
60
+ * Every WebSocket (device, phone, browser, localhost) offers this subprotocol; the access token
61
+ * rides beside it as `${BEARER_PREFIX}<token>`, never in the URL. The server echoes only SUBPROTOCOL.
62
+ */
63
+ declare const SUBPROTOCOL: "matrx.v1";
64
+ declare const BEARER_PREFIX: "bearer.";
59
65
  declare const CloseCode: {
60
66
  readonly NORMAL: 1000;
61
67
  readonly GOING_AWAY: 1001;
@@ -636,10 +642,8 @@ declare const OPS: {
636
642
  }>;
637
643
  size: z.ZodInt;
638
644
  mtime: z.ZodNumber;
639
- mtime_ms: z.ZodInt;
640
645
  mode: z.ZodInt;
641
646
  target: z.ZodNullable<z.ZodString>;
642
- hidden: z.ZodBoolean;
643
647
  }, z.core.$strict>>;
644
648
  truncated: z.ZodBoolean;
645
649
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -663,10 +667,8 @@ declare const OPS: {
663
667
  }>;
664
668
  size: z.ZodInt;
665
669
  mtime: z.ZodNumber;
666
- mtime_ms: z.ZodInt;
667
670
  mode: z.ZodInt;
668
671
  target: z.ZodNullable<z.ZodString>;
669
- hidden: z.ZodBoolean;
670
672
  }, z.core.$strict>;
671
673
  readonly kind: "unary";
672
674
  readonly since: "1.0";
@@ -823,7 +825,6 @@ declare const OPS: {
823
825
  }, z.core.$strict>;
824
826
  readonly result: z.ZodObject<{
825
827
  paths: z.ZodArray<z.ZodString>;
826
- truncated: z.ZodBoolean;
827
828
  }, z.core.$strict>;
828
829
  readonly kind: "unary";
829
830
  readonly since: "1.0";
@@ -845,12 +846,13 @@ declare const OPS: {
845
846
  lines: z.ZodString;
846
847
  line_number: z.ZodInt;
847
848
  submatches: z.ZodArray<z.ZodObject<{
848
- match: z.ZodString;
849
+ match: z.ZodObject<{
850
+ text: z.ZodString;
851
+ }, z.core.$strict>;
849
852
  start: z.ZodInt;
850
853
  end: z.ZodInt;
851
854
  }, z.core.$strict>>;
852
855
  }, z.core.$strict>>;
853
- truncated: z.ZodBoolean;
854
856
  }, z.core.$strict>;
855
857
  readonly kind: "unary";
856
858
  readonly since: "1.0";
@@ -1758,10 +1760,8 @@ declare const NAMED_SCHEMAS: {
1758
1760
  }>;
1759
1761
  size: z.ZodInt;
1760
1762
  mtime: z.ZodNumber;
1761
- mtime_ms: z.ZodInt;
1762
1763
  mode: z.ZodInt;
1763
1764
  target: z.ZodNullable<z.ZodString>;
1764
- hidden: z.ZodBoolean;
1765
1765
  }, z.core.$strict>;
1766
1766
  readonly FsListParams: z.ZodObject<{
1767
1767
  path: z.ZodString;
@@ -1789,10 +1789,8 @@ declare const NAMED_SCHEMAS: {
1789
1789
  }>;
1790
1790
  size: z.ZodInt;
1791
1791
  mtime: z.ZodNumber;
1792
- mtime_ms: z.ZodInt;
1793
1792
  mode: z.ZodInt;
1794
1793
  target: z.ZodNullable<z.ZodString>;
1795
- hidden: z.ZodBoolean;
1796
1794
  }, z.core.$strict>>;
1797
1795
  truncated: z.ZodBoolean;
1798
1796
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -1915,7 +1913,6 @@ declare const NAMED_SCHEMAS: {
1915
1913
  }, z.core.$strict>;
1916
1914
  readonly FsSearchPathsResult: z.ZodObject<{
1917
1915
  paths: z.ZodArray<z.ZodString>;
1918
- truncated: z.ZodBoolean;
1919
1916
  }, z.core.$strict>;
1920
1917
  readonly FsSearchContentParams: z.ZodObject<{
1921
1918
  query: z.ZodString;
@@ -1932,12 +1929,13 @@ declare const NAMED_SCHEMAS: {
1932
1929
  lines: z.ZodString;
1933
1930
  line_number: z.ZodInt;
1934
1931
  submatches: z.ZodArray<z.ZodObject<{
1935
- match: z.ZodString;
1932
+ match: z.ZodObject<{
1933
+ text: z.ZodString;
1934
+ }, z.core.$strict>;
1936
1935
  start: z.ZodInt;
1937
1936
  end: z.ZodInt;
1938
1937
  }, z.core.$strict>>;
1939
1938
  }, z.core.$strict>>;
1940
- truncated: z.ZodBoolean;
1941
1939
  }, z.core.$strict>;
1942
1940
  readonly FsChange: z.ZodObject<{
1943
1941
  type: z.ZodEnum<{
@@ -2368,4 +2366,4 @@ declare const NAMED_SCHEMAS: {
2368
2366
  };
2369
2367
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2370
2368
 
2371
- export { ResponseMsg as A, StreamMsg as B, ClientType as C, DesktopProtocolError as D, EndReason as E, HelloMsg as H, Limits as L, NAMED_SCHEMAS as N, type OpName as O, PING_TEXT as P, RelayMsg as R, StreamMeta as S, Welcome as W, type OpParams as a, type OpResult as b, OPS as c, EVENTS as d, CancelMsg as e, ClientToCoreMsg as f, CloseCode as g, CloseCodeValue as h, isDesktopProtocolError as i, CoreToClientMsg as j, CreditMsg as k, EndMsg as l, ErrorCode as m, type ErrorCodeName as n, type ErrorData as o, ErrorMsg as p, ErrorReason as q, type ErrorReasonName as r, EventMsg as s, type EventName as t, type NamedSchemaId as u, OpDescriptor as v, type OpSpec as w, PONG_TEXT as x, ProtocolErrorBody as y, RequestMsg as z };
2369
+ export { ResponseMsg as A, BEARER_PREFIX as B, ClientType as C, DesktopProtocolError as D, EndReason as E, SUBPROTOCOL as F, StreamMsg as G, HelloMsg as H, Limits as L, NAMED_SCHEMAS as N, type OpName as O, PING_TEXT as P, RelayMsg as R, StreamMeta as S, Welcome as W, type OpParams as a, type OpResult as b, OPS as c, EVENTS as d, CancelMsg as e, ClientToCoreMsg as f, CloseCode as g, CloseCodeValue as h, isDesktopProtocolError as i, CoreToClientMsg as j, CreditMsg as k, EndMsg as l, ErrorCode as m, type ErrorCodeName as n, type ErrorData as o, ErrorMsg as p, ErrorReason as q, type ErrorReasonName as r, EventMsg as s, type EventName as t, type NamedSchemaId as u, OpDescriptor as v, type OpSpec as w, PONG_TEXT as x, ProtocolErrorBody as y, RequestMsg as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/desktop-protocol",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The one wire contract between Matrx 2 (the desktop app) and every client that drives it — phone, web app, extension, server: zod schemas for the envelope and every cap.op, the 16-byte binary frame codec, a reconnecting request/stream/credit/reattach client, React hooks, and a generated JSON Schema + Pydantic twin that CI keeps byte-identical.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",