@ai-matrx/desktop-protocol 0.4.0 → 0.5.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/client.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, C as ClientType } from './registry-CI-NpQ6L.cjs';
5
- export { i as isDesktopProtocolError } from './registry-CI-NpQ6L.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, C as ClientType } from './registry-BeY9D7h0.cjs';
5
+ export { i as isDesktopProtocolError } from './registry-BeY9D7h0.cjs';
6
6
  import { FrameHeader } from './frame.cjs';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, C as ClientType } from './registry-CI-NpQ6L.js';
5
- export { i as isDesktopProtocolError } from './registry-CI-NpQ6L.js';
4
+ import { W as Welcome, D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, C as ClientType } from './registry-BeY9D7h0.js';
5
+ export { i as isDesktopProtocolError } from './registry-BeY9D7h0.js';
6
6
  import { FrameHeader } from './frame.js';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.js CHANGED
@@ -94,7 +94,7 @@ import { z as z2 } from "zod";
94
94
  // src/schema/primitives.ts
95
95
  import { z } from "zod";
96
96
  var PROTOCOL_MAJOR = 1;
97
- var PROTOCOL_MINOR = 0;
97
+ var PROTOCOL_MINOR = 1;
98
98
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
99
99
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
100
100
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -473,8 +473,10 @@ var FsPatchResult = z6.strictObject({
473
473
  applied: nonNegInt,
474
474
  size: nonNegInt,
475
475
  mtime_ms: epochMs,
476
- edits_applied: z6.array(FsPatchEditApplied).max(256),
477
- edits_failed: z6.array(FsPatchEditFailure).max(256)
476
+ /** Since 1.1 (FIELDS_SINCE): a 1.0 app sends only `applied`. Always sent to a ≥1.1 peer. */
477
+ edits_applied: z6.array(FsPatchEditApplied).max(256).optional(),
478
+ /** Since 1.1 (FIELDS_SINCE). */
479
+ edits_failed: z6.array(FsPatchEditFailure).max(256).optional()
478
480
  });
479
481
  var FsSearchPathsParams = z6.strictObject({
480
482
  pattern: z6.string().min(1).max(512),
@@ -626,8 +628,18 @@ var RelayCallRequest = z9.strictObject({
626
628
  timeout_ms: z9.int().min(100).max(37e5).default(7e4)
627
629
  });
628
630
  var RelayCallResponse = z9.discriminatedUnion("ok", [
629
- z9.strictObject({ ok: z9.literal(true), result: z9.unknown() }),
630
- z9.strictObject({ ok: z9.literal(false), error: ProtocolErrorBody })
631
+ z9.strictObject({
632
+ ok: z9.literal(true),
633
+ result: z9.unknown(),
634
+ /** Since 1.1: the version the device negotiated for this call (its welcome). */
635
+ protocol_version: ProtocolVersion.optional()
636
+ }),
637
+ z9.strictObject({
638
+ ok: z9.literal(false),
639
+ error: ProtocolErrorBody,
640
+ /** Since 1.1, as above (absent when the device never answered hello). */
641
+ protocol_version: ProtocolVersion.optional()
642
+ })
631
643
  ]);
632
644
  var RELAY_CALL_HELLO_ID = "hello";
633
645
  var RELAY_CALL_REQUEST_ID = "call";