@ai-matrx/desktop-protocol 0.3.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.
package/dist/react.d.ts CHANGED
@@ -394,6 +394,19 @@ declare const OPS: {
394
394
  applied: z.ZodInt;
395
395
  size: z.ZodInt;
396
396
  mtime_ms: z.ZodInt;
397
+ edits_applied: z.ZodArray<z.ZodObject<{
398
+ edit_index: z.ZodInt;
399
+ mode: z.ZodEnum<{
400
+ replace_all: "replace_all";
401
+ create: "create";
402
+ replace: "replace";
403
+ }>;
404
+ matches_replaced: z.ZodOptional<z.ZodInt>;
405
+ }, z.core.$strict>>;
406
+ edits_failed: z.ZodArray<z.ZodObject<{
407
+ edit_index: z.ZodInt;
408
+ reason: z.ZodString;
409
+ }, z.core.$strict>>;
397
410
  }, z.core.$strict>;
398
411
  readonly kind: "unary";
399
412
  readonly since: "1.0";
@@ -212,6 +212,10 @@ declare const ErrorMsg: z.ZodObject<{
212
212
  settings_url: z.ZodOptional<z.ZodString>;
213
213
  retry_after_ms: z.ZodOptional<z.ZodInt>;
214
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>>>;
215
219
  upgrade: z.ZodOptional<z.ZodObject<{
216
220
  min_version: z.ZodString;
217
221
  max_version: z.ZodString;
@@ -386,6 +390,10 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
386
390
  settings_url: z.ZodOptional<z.ZodString>;
387
391
  retry_after_ms: z.ZodOptional<z.ZodInt>;
388
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>>>;
389
397
  upgrade: z.ZodOptional<z.ZodObject<{
390
398
  min_version: z.ZodString;
391
399
  max_version: z.ZodString;
@@ -526,6 +534,10 @@ declare const ProtocolErrorBody: z.ZodObject<{
526
534
  settings_url: z.ZodOptional<z.ZodString>;
527
535
  retry_after_ms: z.ZodOptional<z.ZodInt>;
528
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>>>;
529
541
  upgrade: z.ZodOptional<z.ZodObject<{
530
542
  min_version: z.ZodString;
531
543
  max_version: z.ZodString;
@@ -534,6 +546,16 @@ declare const ProtocolErrorBody: z.ZodObject<{
534
546
  }, z.core.$strict>>;
535
547
  }, z.core.$strict>;
536
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>;
537
559
 
538
560
  /** @ai-matrx/desktop-protocol — the op and event registries (Router, client and Python are generated from these). */
539
561
 
@@ -811,6 +833,19 @@ declare const OPS: {
811
833
  applied: z.ZodInt;
812
834
  size: z.ZodInt;
813
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>>;
814
849
  }, z.core.$strict>;
815
850
  readonly kind: "unary";
816
851
  readonly since: "1.0";
@@ -1272,6 +1307,10 @@ declare const NAMED_SCHEMAS: {
1272
1307
  control_taken: "control_taken";
1273
1308
  window_exhausted: "window_exhausted";
1274
1309
  }>;
1310
+ readonly FsPatchEditFailure: z.ZodObject<{
1311
+ edit_index: z.ZodInt;
1312
+ reason: z.ZodString;
1313
+ }, z.core.$strict>;
1275
1314
  readonly ProtocolErrorBody: z.ZodObject<{
1276
1315
  code: z.ZodEnum<{
1277
1316
  AUTH_REQUIRED: "AUTH_REQUIRED";
@@ -1320,6 +1359,10 @@ declare const NAMED_SCHEMAS: {
1320
1359
  settings_url: z.ZodOptional<z.ZodString>;
1321
1360
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1322
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>>>;
1323
1366
  upgrade: z.ZodOptional<z.ZodObject<{
1324
1367
  min_version: z.ZodString;
1325
1368
  max_version: z.ZodString;
@@ -1456,6 +1499,10 @@ declare const NAMED_SCHEMAS: {
1456
1499
  settings_url: z.ZodOptional<z.ZodString>;
1457
1500
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1458
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>>>;
1459
1506
  upgrade: z.ZodOptional<z.ZodObject<{
1460
1507
  min_version: z.ZodString;
1461
1508
  max_version: z.ZodString;
@@ -1618,6 +1665,10 @@ declare const NAMED_SCHEMAS: {
1618
1665
  settings_url: z.ZodOptional<z.ZodString>;
1619
1666
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1620
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>>>;
1621
1672
  upgrade: z.ZodOptional<z.ZodObject<{
1622
1673
  min_version: z.ZodString;
1623
1674
  max_version: z.ZodString;
@@ -1890,6 +1941,15 @@ declare const NAMED_SCHEMAS: {
1890
1941
  resource_id: z.ZodString;
1891
1942
  path: z.ZodString;
1892
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>;
1893
1953
  readonly FsPatchParams: z.ZodObject<{
1894
1954
  path: z.ZodString;
1895
1955
  edits: z.ZodArray<z.ZodObject<{
@@ -1904,6 +1964,19 @@ declare const NAMED_SCHEMAS: {
1904
1964
  applied: z.ZodInt;
1905
1965
  size: z.ZodInt;
1906
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>>;
1907
1980
  }, z.core.$strict>;
1908
1981
  readonly FsSearchPathsParams: z.ZodObject<{
1909
1982
  pattern: z.ZodString;
@@ -2324,6 +2397,10 @@ declare const NAMED_SCHEMAS: {
2324
2397
  settings_url: z.ZodOptional<z.ZodString>;
2325
2398
  retry_after_ms: z.ZodOptional<z.ZodInt>;
2326
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>>>;
2327
2404
  upgrade: z.ZodOptional<z.ZodObject<{
2328
2405
  min_version: z.ZodString;
2329
2406
  max_version: z.ZodString;
@@ -2366,4 +2443,4 @@ declare const NAMED_SCHEMAS: {
2366
2443
  };
2367
2444
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2368
2445
 
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 };
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 };
@@ -212,6 +212,10 @@ declare const ErrorMsg: z.ZodObject<{
212
212
  settings_url: z.ZodOptional<z.ZodString>;
213
213
  retry_after_ms: z.ZodOptional<z.ZodInt>;
214
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>>>;
215
219
  upgrade: z.ZodOptional<z.ZodObject<{
216
220
  min_version: z.ZodString;
217
221
  max_version: z.ZodString;
@@ -386,6 +390,10 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
386
390
  settings_url: z.ZodOptional<z.ZodString>;
387
391
  retry_after_ms: z.ZodOptional<z.ZodInt>;
388
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>>>;
389
397
  upgrade: z.ZodOptional<z.ZodObject<{
390
398
  min_version: z.ZodString;
391
399
  max_version: z.ZodString;
@@ -526,6 +534,10 @@ declare const ProtocolErrorBody: z.ZodObject<{
526
534
  settings_url: z.ZodOptional<z.ZodString>;
527
535
  retry_after_ms: z.ZodOptional<z.ZodInt>;
528
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>>>;
529
541
  upgrade: z.ZodOptional<z.ZodObject<{
530
542
  min_version: z.ZodString;
531
543
  max_version: z.ZodString;
@@ -534,6 +546,16 @@ declare const ProtocolErrorBody: z.ZodObject<{
534
546
  }, z.core.$strict>>;
535
547
  }, z.core.$strict>;
536
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>;
537
559
 
538
560
  /** @ai-matrx/desktop-protocol — the op and event registries (Router, client and Python are generated from these). */
539
561
 
@@ -811,6 +833,19 @@ declare const OPS: {
811
833
  applied: z.ZodInt;
812
834
  size: z.ZodInt;
813
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>>;
814
849
  }, z.core.$strict>;
815
850
  readonly kind: "unary";
816
851
  readonly since: "1.0";
@@ -1272,6 +1307,10 @@ declare const NAMED_SCHEMAS: {
1272
1307
  control_taken: "control_taken";
1273
1308
  window_exhausted: "window_exhausted";
1274
1309
  }>;
1310
+ readonly FsPatchEditFailure: z.ZodObject<{
1311
+ edit_index: z.ZodInt;
1312
+ reason: z.ZodString;
1313
+ }, z.core.$strict>;
1275
1314
  readonly ProtocolErrorBody: z.ZodObject<{
1276
1315
  code: z.ZodEnum<{
1277
1316
  AUTH_REQUIRED: "AUTH_REQUIRED";
@@ -1320,6 +1359,10 @@ declare const NAMED_SCHEMAS: {
1320
1359
  settings_url: z.ZodOptional<z.ZodString>;
1321
1360
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1322
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>>>;
1323
1366
  upgrade: z.ZodOptional<z.ZodObject<{
1324
1367
  min_version: z.ZodString;
1325
1368
  max_version: z.ZodString;
@@ -1456,6 +1499,10 @@ declare const NAMED_SCHEMAS: {
1456
1499
  settings_url: z.ZodOptional<z.ZodString>;
1457
1500
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1458
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>>>;
1459
1506
  upgrade: z.ZodOptional<z.ZodObject<{
1460
1507
  min_version: z.ZodString;
1461
1508
  max_version: z.ZodString;
@@ -1618,6 +1665,10 @@ declare const NAMED_SCHEMAS: {
1618
1665
  settings_url: z.ZodOptional<z.ZodString>;
1619
1666
  retry_after_ms: z.ZodOptional<z.ZodInt>;
1620
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>>>;
1621
1672
  upgrade: z.ZodOptional<z.ZodObject<{
1622
1673
  min_version: z.ZodString;
1623
1674
  max_version: z.ZodString;
@@ -1890,6 +1941,15 @@ declare const NAMED_SCHEMAS: {
1890
1941
  resource_id: z.ZodString;
1891
1942
  path: z.ZodString;
1892
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>;
1893
1953
  readonly FsPatchParams: z.ZodObject<{
1894
1954
  path: z.ZodString;
1895
1955
  edits: z.ZodArray<z.ZodObject<{
@@ -1904,6 +1964,19 @@ declare const NAMED_SCHEMAS: {
1904
1964
  applied: z.ZodInt;
1905
1965
  size: z.ZodInt;
1906
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>>;
1907
1980
  }, z.core.$strict>;
1908
1981
  readonly FsSearchPathsParams: z.ZodObject<{
1909
1982
  pattern: z.ZodString;
@@ -2324,6 +2397,10 @@ declare const NAMED_SCHEMAS: {
2324
2397
  settings_url: z.ZodOptional<z.ZodString>;
2325
2398
  retry_after_ms: z.ZodOptional<z.ZodInt>;
2326
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>>>;
2327
2404
  upgrade: z.ZodOptional<z.ZodObject<{
2328
2405
  min_version: z.ZodString;
2329
2406
  max_version: z.ZodString;
@@ -2366,4 +2443,4 @@ declare const NAMED_SCHEMAS: {
2366
2443
  };
2367
2444
  type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
2368
2445
 
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 };
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.3.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",