@ai-matrx/desktop-protocol 0.2.0 → 0.4.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;
@@ -206,6 +212,10 @@ declare const ErrorMsg: z.ZodObject<{
206
212
  settings_url: z.ZodOptional<z.ZodString>;
207
213
  retry_after_ms: z.ZodOptional<z.ZodInt>;
208
214
  limit_bytes: z.ZodOptional<z.ZodInt>;
215
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
216
+ edit_index: z.ZodInt;
217
+ reason: z.ZodString;
218
+ }, z.core.$strict>>>;
209
219
  upgrade: z.ZodOptional<z.ZodObject<{
210
220
  min_version: z.ZodString;
211
221
  max_version: z.ZodString;
@@ -380,6 +390,10 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
380
390
  settings_url: z.ZodOptional<z.ZodString>;
381
391
  retry_after_ms: z.ZodOptional<z.ZodInt>;
382
392
  limit_bytes: z.ZodOptional<z.ZodInt>;
393
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
394
+ edit_index: z.ZodInt;
395
+ reason: z.ZodString;
396
+ }, z.core.$strict>>>;
383
397
  upgrade: z.ZodOptional<z.ZodObject<{
384
398
  min_version: z.ZodString;
385
399
  max_version: z.ZodString;
@@ -520,6 +534,10 @@ declare const ProtocolErrorBody: z.ZodObject<{
520
534
  settings_url: z.ZodOptional<z.ZodString>;
521
535
  retry_after_ms: z.ZodOptional<z.ZodInt>;
522
536
  limit_bytes: z.ZodOptional<z.ZodInt>;
537
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
538
+ edit_index: z.ZodInt;
539
+ reason: z.ZodString;
540
+ }, z.core.$strict>>>;
523
541
  upgrade: z.ZodOptional<z.ZodObject<{
524
542
  min_version: z.ZodString;
525
543
  max_version: z.ZodString;
@@ -528,6 +546,16 @@ declare const ProtocolErrorBody: z.ZodObject<{
528
546
  }, z.core.$strict>>;
529
547
  }, z.core.$strict>;
530
548
  type ProtocolErrorBody = z.output<typeof ProtocolErrorBody>;
549
+ /**
550
+ * One edit fs.patch could not apply — the daemon's `edits_failed[]` entry, verbatim: the edit's
551
+ * index and the daemon's own reason text ("old_text not found", or "old_text matches N locations —
552
+ * add context or set replace_all=True").
553
+ */
554
+ declare const FsPatchEditFailure: z.ZodObject<{
555
+ edit_index: z.ZodInt;
556
+ reason: z.ZodString;
557
+ }, z.core.$strict>;
558
+ type FsPatchEditFailure = z.output<typeof FsPatchEditFailure>;
531
559
 
532
560
  /** @ai-matrx/desktop-protocol — the op and event registries (Router, client and Python are generated from these). */
533
561
 
@@ -636,10 +664,8 @@ declare const OPS: {
636
664
  }>;
637
665
  size: z.ZodInt;
638
666
  mtime: z.ZodNumber;
639
- mtime_ms: z.ZodInt;
640
667
  mode: z.ZodInt;
641
668
  target: z.ZodNullable<z.ZodString>;
642
- hidden: z.ZodBoolean;
643
669
  }, z.core.$strict>>;
644
670
  truncated: z.ZodBoolean;
645
671
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -663,10 +689,8 @@ declare const OPS: {
663
689
  }>;
664
690
  size: z.ZodInt;
665
691
  mtime: z.ZodNumber;
666
- mtime_ms: z.ZodInt;
667
692
  mode: z.ZodInt;
668
693
  target: z.ZodNullable<z.ZodString>;
669
- hidden: z.ZodBoolean;
670
694
  }, z.core.$strict>;
671
695
  readonly kind: "unary";
672
696
  readonly since: "1.0";
@@ -809,6 +833,19 @@ declare const OPS: {
809
833
  applied: z.ZodInt;
810
834
  size: z.ZodInt;
811
835
  mtime_ms: z.ZodInt;
836
+ edits_applied: z.ZodArray<z.ZodObject<{
837
+ edit_index: z.ZodInt;
838
+ mode: z.ZodEnum<{
839
+ replace_all: "replace_all";
840
+ create: "create";
841
+ replace: "replace";
842
+ }>;
843
+ matches_replaced: z.ZodOptional<z.ZodInt>;
844
+ }, z.core.$strict>>;
845
+ edits_failed: z.ZodArray<z.ZodObject<{
846
+ edit_index: z.ZodInt;
847
+ reason: z.ZodString;
848
+ }, z.core.$strict>>;
812
849
  }, z.core.$strict>;
813
850
  readonly kind: "unary";
814
851
  readonly since: "1.0";
@@ -823,7 +860,6 @@ declare const OPS: {
823
860
  }, z.core.$strict>;
824
861
  readonly result: z.ZodObject<{
825
862
  paths: z.ZodArray<z.ZodString>;
826
- truncated: z.ZodBoolean;
827
863
  }, z.core.$strict>;
828
864
  readonly kind: "unary";
829
865
  readonly since: "1.0";
@@ -845,12 +881,13 @@ declare const OPS: {
845
881
  lines: z.ZodString;
846
882
  line_number: z.ZodInt;
847
883
  submatches: z.ZodArray<z.ZodObject<{
848
- match: z.ZodString;
884
+ match: z.ZodObject<{
885
+ text: z.ZodString;
886
+ }, z.core.$strict>;
849
887
  start: z.ZodInt;
850
888
  end: z.ZodInt;
851
889
  }, z.core.$strict>>;
852
890
  }, z.core.$strict>>;
853
- truncated: z.ZodBoolean;
854
891
  }, z.core.$strict>;
855
892
  readonly kind: "unary";
856
893
  readonly since: "1.0";
@@ -1270,6 +1307,10 @@ declare const NAMED_SCHEMAS: {
1270
1307
  control_taken: "control_taken";
1271
1308
  window_exhausted: "window_exhausted";
1272
1309
  }>;
1310
+ readonly FsPatchEditFailure: z.ZodObject<{
1311
+ edit_index: z.ZodInt;
1312
+ reason: z.ZodString;
1313
+ }, z.core.$strict>;
1273
1314
  readonly ProtocolErrorBody: z.ZodObject<{
1274
1315
  code: z.ZodEnum<{
1275
1316
  AUTH_REQUIRED: "AUTH_REQUIRED";
@@ -1318,6 +1359,10 @@ declare const NAMED_SCHEMAS: {
1318
1359
  settings_url: z.ZodOptional<z.ZodString>;
1319
1360
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1320
1361
  limit_bytes: z.ZodOptional<z.ZodInt>;
1362
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1363
+ edit_index: z.ZodInt;
1364
+ reason: z.ZodString;
1365
+ }, z.core.$strict>>>;
1321
1366
  upgrade: z.ZodOptional<z.ZodObject<{
1322
1367
  min_version: z.ZodString;
1323
1368
  max_version: z.ZodString;
@@ -1454,6 +1499,10 @@ declare const NAMED_SCHEMAS: {
1454
1499
  settings_url: z.ZodOptional<z.ZodString>;
1455
1500
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1456
1501
  limit_bytes: z.ZodOptional<z.ZodInt>;
1502
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1503
+ edit_index: z.ZodInt;
1504
+ reason: z.ZodString;
1505
+ }, z.core.$strict>>>;
1457
1506
  upgrade: z.ZodOptional<z.ZodObject<{
1458
1507
  min_version: z.ZodString;
1459
1508
  max_version: z.ZodString;
@@ -1616,6 +1665,10 @@ declare const NAMED_SCHEMAS: {
1616
1665
  settings_url: z.ZodOptional<z.ZodString>;
1617
1666
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1618
1667
  limit_bytes: z.ZodOptional<z.ZodInt>;
1668
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1669
+ edit_index: z.ZodInt;
1670
+ reason: z.ZodString;
1671
+ }, z.core.$strict>>>;
1619
1672
  upgrade: z.ZodOptional<z.ZodObject<{
1620
1673
  min_version: z.ZodString;
1621
1674
  max_version: z.ZodString;
@@ -1758,10 +1811,8 @@ declare const NAMED_SCHEMAS: {
1758
1811
  }>;
1759
1812
  size: z.ZodInt;
1760
1813
  mtime: z.ZodNumber;
1761
- mtime_ms: z.ZodInt;
1762
1814
  mode: z.ZodInt;
1763
1815
  target: z.ZodNullable<z.ZodString>;
1764
- hidden: z.ZodBoolean;
1765
1816
  }, z.core.$strict>;
1766
1817
  readonly FsListParams: z.ZodObject<{
1767
1818
  path: z.ZodString;
@@ -1789,10 +1840,8 @@ declare const NAMED_SCHEMAS: {
1789
1840
  }>;
1790
1841
  size: z.ZodInt;
1791
1842
  mtime: z.ZodNumber;
1792
- mtime_ms: z.ZodInt;
1793
1843
  mode: z.ZodInt;
1794
1844
  target: z.ZodNullable<z.ZodString>;
1795
- hidden: z.ZodBoolean;
1796
1845
  }, z.core.$strict>>;
1797
1846
  truncated: z.ZodBoolean;
1798
1847
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -1892,6 +1941,15 @@ declare const NAMED_SCHEMAS: {
1892
1941
  resource_id: z.ZodString;
1893
1942
  path: z.ZodString;
1894
1943
  }, z.core.$strict>;
1944
+ readonly FsPatchEditApplied: z.ZodObject<{
1945
+ edit_index: z.ZodInt;
1946
+ mode: z.ZodEnum<{
1947
+ replace_all: "replace_all";
1948
+ create: "create";
1949
+ replace: "replace";
1950
+ }>;
1951
+ matches_replaced: z.ZodOptional<z.ZodInt>;
1952
+ }, z.core.$strict>;
1895
1953
  readonly FsPatchParams: z.ZodObject<{
1896
1954
  path: z.ZodString;
1897
1955
  edits: z.ZodArray<z.ZodObject<{
@@ -1906,6 +1964,19 @@ declare const NAMED_SCHEMAS: {
1906
1964
  applied: z.ZodInt;
1907
1965
  size: z.ZodInt;
1908
1966
  mtime_ms: z.ZodInt;
1967
+ edits_applied: z.ZodArray<z.ZodObject<{
1968
+ edit_index: z.ZodInt;
1969
+ mode: z.ZodEnum<{
1970
+ replace_all: "replace_all";
1971
+ create: "create";
1972
+ replace: "replace";
1973
+ }>;
1974
+ matches_replaced: z.ZodOptional<z.ZodInt>;
1975
+ }, z.core.$strict>>;
1976
+ edits_failed: z.ZodArray<z.ZodObject<{
1977
+ edit_index: z.ZodInt;
1978
+ reason: z.ZodString;
1979
+ }, z.core.$strict>>;
1909
1980
  }, z.core.$strict>;
1910
1981
  readonly FsSearchPathsParams: z.ZodObject<{
1911
1982
  pattern: z.ZodString;
@@ -1915,7 +1986,6 @@ declare const NAMED_SCHEMAS: {
1915
1986
  }, z.core.$strict>;
1916
1987
  readonly FsSearchPathsResult: z.ZodObject<{
1917
1988
  paths: z.ZodArray<z.ZodString>;
1918
- truncated: z.ZodBoolean;
1919
1989
  }, z.core.$strict>;
1920
1990
  readonly FsSearchContentParams: z.ZodObject<{
1921
1991
  query: z.ZodString;
@@ -1932,12 +2002,13 @@ declare const NAMED_SCHEMAS: {
1932
2002
  lines: z.ZodString;
1933
2003
  line_number: z.ZodInt;
1934
2004
  submatches: z.ZodArray<z.ZodObject<{
1935
- match: z.ZodString;
2005
+ match: z.ZodObject<{
2006
+ text: z.ZodString;
2007
+ }, z.core.$strict>;
1936
2008
  start: z.ZodInt;
1937
2009
  end: z.ZodInt;
1938
2010
  }, z.core.$strict>>;
1939
2011
  }, z.core.$strict>>;
1940
- truncated: z.ZodBoolean;
1941
2012
  }, z.core.$strict>;
1942
2013
  readonly FsChange: z.ZodObject<{
1943
2014
  type: z.ZodEnum<{
@@ -2326,6 +2397,10 @@ declare const NAMED_SCHEMAS: {
2326
2397
  settings_url: z.ZodOptional<z.ZodString>;
2327
2398
  retry_after_ms: z.ZodOptional<z.ZodInt>;
2328
2399
  limit_bytes: z.ZodOptional<z.ZodInt>;
2400
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
2401
+ edit_index: z.ZodInt;
2402
+ reason: z.ZodString;
2403
+ }, z.core.$strict>>>;
2329
2404
  upgrade: z.ZodOptional<z.ZodObject<{
2330
2405
  min_version: z.ZodString;
2331
2406
  max_version: z.ZodString;
@@ -2368,4 +2443,4 @@ declare const NAMED_SCHEMAS: {
2368
2443
  };
2369
2444
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2370
2445
 
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 };
2446
+ export { ResponseMsg as A, BEARER_PREFIX as B, ClientType as C, DesktopProtocolError as D, EndReason as E, FsPatchEditFailure as F, SUBPROTOCOL as G, HelloMsg as H, StreamMsg as I, 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;
@@ -206,6 +212,10 @@ declare const ErrorMsg: z.ZodObject<{
206
212
  settings_url: z.ZodOptional<z.ZodString>;
207
213
  retry_after_ms: z.ZodOptional<z.ZodInt>;
208
214
  limit_bytes: z.ZodOptional<z.ZodInt>;
215
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
216
+ edit_index: z.ZodInt;
217
+ reason: z.ZodString;
218
+ }, z.core.$strict>>>;
209
219
  upgrade: z.ZodOptional<z.ZodObject<{
210
220
  min_version: z.ZodString;
211
221
  max_version: z.ZodString;
@@ -380,6 +390,10 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
380
390
  settings_url: z.ZodOptional<z.ZodString>;
381
391
  retry_after_ms: z.ZodOptional<z.ZodInt>;
382
392
  limit_bytes: z.ZodOptional<z.ZodInt>;
393
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
394
+ edit_index: z.ZodInt;
395
+ reason: z.ZodString;
396
+ }, z.core.$strict>>>;
383
397
  upgrade: z.ZodOptional<z.ZodObject<{
384
398
  min_version: z.ZodString;
385
399
  max_version: z.ZodString;
@@ -520,6 +534,10 @@ declare const ProtocolErrorBody: z.ZodObject<{
520
534
  settings_url: z.ZodOptional<z.ZodString>;
521
535
  retry_after_ms: z.ZodOptional<z.ZodInt>;
522
536
  limit_bytes: z.ZodOptional<z.ZodInt>;
537
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
538
+ edit_index: z.ZodInt;
539
+ reason: z.ZodString;
540
+ }, z.core.$strict>>>;
523
541
  upgrade: z.ZodOptional<z.ZodObject<{
524
542
  min_version: z.ZodString;
525
543
  max_version: z.ZodString;
@@ -528,6 +546,16 @@ declare const ProtocolErrorBody: z.ZodObject<{
528
546
  }, z.core.$strict>>;
529
547
  }, z.core.$strict>;
530
548
  type ProtocolErrorBody = z.output<typeof ProtocolErrorBody>;
549
+ /**
550
+ * One edit fs.patch could not apply — the daemon's `edits_failed[]` entry, verbatim: the edit's
551
+ * index and the daemon's own reason text ("old_text not found", or "old_text matches N locations —
552
+ * add context or set replace_all=True").
553
+ */
554
+ declare const FsPatchEditFailure: z.ZodObject<{
555
+ edit_index: z.ZodInt;
556
+ reason: z.ZodString;
557
+ }, z.core.$strict>;
558
+ type FsPatchEditFailure = z.output<typeof FsPatchEditFailure>;
531
559
 
532
560
  /** @ai-matrx/desktop-protocol — the op and event registries (Router, client and Python are generated from these). */
533
561
 
@@ -636,10 +664,8 @@ declare const OPS: {
636
664
  }>;
637
665
  size: z.ZodInt;
638
666
  mtime: z.ZodNumber;
639
- mtime_ms: z.ZodInt;
640
667
  mode: z.ZodInt;
641
668
  target: z.ZodNullable<z.ZodString>;
642
- hidden: z.ZodBoolean;
643
669
  }, z.core.$strict>>;
644
670
  truncated: z.ZodBoolean;
645
671
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -663,10 +689,8 @@ declare const OPS: {
663
689
  }>;
664
690
  size: z.ZodInt;
665
691
  mtime: z.ZodNumber;
666
- mtime_ms: z.ZodInt;
667
692
  mode: z.ZodInt;
668
693
  target: z.ZodNullable<z.ZodString>;
669
- hidden: z.ZodBoolean;
670
694
  }, z.core.$strict>;
671
695
  readonly kind: "unary";
672
696
  readonly since: "1.0";
@@ -809,6 +833,19 @@ declare const OPS: {
809
833
  applied: z.ZodInt;
810
834
  size: z.ZodInt;
811
835
  mtime_ms: z.ZodInt;
836
+ edits_applied: z.ZodArray<z.ZodObject<{
837
+ edit_index: z.ZodInt;
838
+ mode: z.ZodEnum<{
839
+ replace_all: "replace_all";
840
+ create: "create";
841
+ replace: "replace";
842
+ }>;
843
+ matches_replaced: z.ZodOptional<z.ZodInt>;
844
+ }, z.core.$strict>>;
845
+ edits_failed: z.ZodArray<z.ZodObject<{
846
+ edit_index: z.ZodInt;
847
+ reason: z.ZodString;
848
+ }, z.core.$strict>>;
812
849
  }, z.core.$strict>;
813
850
  readonly kind: "unary";
814
851
  readonly since: "1.0";
@@ -823,7 +860,6 @@ declare const OPS: {
823
860
  }, z.core.$strict>;
824
861
  readonly result: z.ZodObject<{
825
862
  paths: z.ZodArray<z.ZodString>;
826
- truncated: z.ZodBoolean;
827
863
  }, z.core.$strict>;
828
864
  readonly kind: "unary";
829
865
  readonly since: "1.0";
@@ -845,12 +881,13 @@ declare const OPS: {
845
881
  lines: z.ZodString;
846
882
  line_number: z.ZodInt;
847
883
  submatches: z.ZodArray<z.ZodObject<{
848
- match: z.ZodString;
884
+ match: z.ZodObject<{
885
+ text: z.ZodString;
886
+ }, z.core.$strict>;
849
887
  start: z.ZodInt;
850
888
  end: z.ZodInt;
851
889
  }, z.core.$strict>>;
852
890
  }, z.core.$strict>>;
853
- truncated: z.ZodBoolean;
854
891
  }, z.core.$strict>;
855
892
  readonly kind: "unary";
856
893
  readonly since: "1.0";
@@ -1270,6 +1307,10 @@ declare const NAMED_SCHEMAS: {
1270
1307
  control_taken: "control_taken";
1271
1308
  window_exhausted: "window_exhausted";
1272
1309
  }>;
1310
+ readonly FsPatchEditFailure: z.ZodObject<{
1311
+ edit_index: z.ZodInt;
1312
+ reason: z.ZodString;
1313
+ }, z.core.$strict>;
1273
1314
  readonly ProtocolErrorBody: z.ZodObject<{
1274
1315
  code: z.ZodEnum<{
1275
1316
  AUTH_REQUIRED: "AUTH_REQUIRED";
@@ -1318,6 +1359,10 @@ declare const NAMED_SCHEMAS: {
1318
1359
  settings_url: z.ZodOptional<z.ZodString>;
1319
1360
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1320
1361
  limit_bytes: z.ZodOptional<z.ZodInt>;
1362
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1363
+ edit_index: z.ZodInt;
1364
+ reason: z.ZodString;
1365
+ }, z.core.$strict>>>;
1321
1366
  upgrade: z.ZodOptional<z.ZodObject<{
1322
1367
  min_version: z.ZodString;
1323
1368
  max_version: z.ZodString;
@@ -1454,6 +1499,10 @@ declare const NAMED_SCHEMAS: {
1454
1499
  settings_url: z.ZodOptional<z.ZodString>;
1455
1500
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1456
1501
  limit_bytes: z.ZodOptional<z.ZodInt>;
1502
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1503
+ edit_index: z.ZodInt;
1504
+ reason: z.ZodString;
1505
+ }, z.core.$strict>>>;
1457
1506
  upgrade: z.ZodOptional<z.ZodObject<{
1458
1507
  min_version: z.ZodString;
1459
1508
  max_version: z.ZodString;
@@ -1616,6 +1665,10 @@ declare const NAMED_SCHEMAS: {
1616
1665
  settings_url: z.ZodOptional<z.ZodString>;
1617
1666
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1618
1667
  limit_bytes: z.ZodOptional<z.ZodInt>;
1668
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1669
+ edit_index: z.ZodInt;
1670
+ reason: z.ZodString;
1671
+ }, z.core.$strict>>>;
1619
1672
  upgrade: z.ZodOptional<z.ZodObject<{
1620
1673
  min_version: z.ZodString;
1621
1674
  max_version: z.ZodString;
@@ -1758,10 +1811,8 @@ declare const NAMED_SCHEMAS: {
1758
1811
  }>;
1759
1812
  size: z.ZodInt;
1760
1813
  mtime: z.ZodNumber;
1761
- mtime_ms: z.ZodInt;
1762
1814
  mode: z.ZodInt;
1763
1815
  target: z.ZodNullable<z.ZodString>;
1764
- hidden: z.ZodBoolean;
1765
1816
  }, z.core.$strict>;
1766
1817
  readonly FsListParams: z.ZodObject<{
1767
1818
  path: z.ZodString;
@@ -1789,10 +1840,8 @@ declare const NAMED_SCHEMAS: {
1789
1840
  }>;
1790
1841
  size: z.ZodInt;
1791
1842
  mtime: z.ZodNumber;
1792
- mtime_ms: z.ZodInt;
1793
1843
  mode: z.ZodInt;
1794
1844
  target: z.ZodNullable<z.ZodString>;
1795
- hidden: z.ZodBoolean;
1796
1845
  }, z.core.$strict>>;
1797
1846
  truncated: z.ZodBoolean;
1798
1847
  next_page_token: z.ZodNullable<z.ZodString>;
@@ -1892,6 +1941,15 @@ declare const NAMED_SCHEMAS: {
1892
1941
  resource_id: z.ZodString;
1893
1942
  path: z.ZodString;
1894
1943
  }, z.core.$strict>;
1944
+ readonly FsPatchEditApplied: z.ZodObject<{
1945
+ edit_index: z.ZodInt;
1946
+ mode: z.ZodEnum<{
1947
+ replace_all: "replace_all";
1948
+ create: "create";
1949
+ replace: "replace";
1950
+ }>;
1951
+ matches_replaced: z.ZodOptional<z.ZodInt>;
1952
+ }, z.core.$strict>;
1895
1953
  readonly FsPatchParams: z.ZodObject<{
1896
1954
  path: z.ZodString;
1897
1955
  edits: z.ZodArray<z.ZodObject<{
@@ -1906,6 +1964,19 @@ declare const NAMED_SCHEMAS: {
1906
1964
  applied: z.ZodInt;
1907
1965
  size: z.ZodInt;
1908
1966
  mtime_ms: z.ZodInt;
1967
+ edits_applied: z.ZodArray<z.ZodObject<{
1968
+ edit_index: z.ZodInt;
1969
+ mode: z.ZodEnum<{
1970
+ replace_all: "replace_all";
1971
+ create: "create";
1972
+ replace: "replace";
1973
+ }>;
1974
+ matches_replaced: z.ZodOptional<z.ZodInt>;
1975
+ }, z.core.$strict>>;
1976
+ edits_failed: z.ZodArray<z.ZodObject<{
1977
+ edit_index: z.ZodInt;
1978
+ reason: z.ZodString;
1979
+ }, z.core.$strict>>;
1909
1980
  }, z.core.$strict>;
1910
1981
  readonly FsSearchPathsParams: z.ZodObject<{
1911
1982
  pattern: z.ZodString;
@@ -1915,7 +1986,6 @@ declare const NAMED_SCHEMAS: {
1915
1986
  }, z.core.$strict>;
1916
1987
  readonly FsSearchPathsResult: z.ZodObject<{
1917
1988
  paths: z.ZodArray<z.ZodString>;
1918
- truncated: z.ZodBoolean;
1919
1989
  }, z.core.$strict>;
1920
1990
  readonly FsSearchContentParams: z.ZodObject<{
1921
1991
  query: z.ZodString;
@@ -1932,12 +2002,13 @@ declare const NAMED_SCHEMAS: {
1932
2002
  lines: z.ZodString;
1933
2003
  line_number: z.ZodInt;
1934
2004
  submatches: z.ZodArray<z.ZodObject<{
1935
- match: z.ZodString;
2005
+ match: z.ZodObject<{
2006
+ text: z.ZodString;
2007
+ }, z.core.$strict>;
1936
2008
  start: z.ZodInt;
1937
2009
  end: z.ZodInt;
1938
2010
  }, z.core.$strict>>;
1939
2011
  }, z.core.$strict>>;
1940
- truncated: z.ZodBoolean;
1941
2012
  }, z.core.$strict>;
1942
2013
  readonly FsChange: z.ZodObject<{
1943
2014
  type: z.ZodEnum<{
@@ -2326,6 +2397,10 @@ declare const NAMED_SCHEMAS: {
2326
2397
  settings_url: z.ZodOptional<z.ZodString>;
2327
2398
  retry_after_ms: z.ZodOptional<z.ZodInt>;
2328
2399
  limit_bytes: z.ZodOptional<z.ZodInt>;
2400
+ edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
2401
+ edit_index: z.ZodInt;
2402
+ reason: z.ZodString;
2403
+ }, z.core.$strict>>>;
2329
2404
  upgrade: z.ZodOptional<z.ZodObject<{
2330
2405
  min_version: z.ZodString;
2331
2406
  max_version: z.ZodString;
@@ -2368,4 +2443,4 @@ declare const NAMED_SCHEMAS: {
2368
2443
  };
2369
2444
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2370
2445
 
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 };
2446
+ export { ResponseMsg as A, BEARER_PREFIX as B, ClientType as C, DesktopProtocolError as D, EndReason as E, FsPatchEditFailure as F, SUBPROTOCOL as G, HelloMsg as H, StreamMsg as I, 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.4.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",