@ai-matrx/desktop-protocol 0.21.18 → 0.21.20

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, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-xHAz1vPQ.cjs';
5
- export { i as isDesktopProtocolError } from './models-xHAz1vPQ.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Cx6q_tRu.cjs';
5
+ export { i as isDesktopProtocolError } from './models-Cx6q_tRu.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, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-xHAz1vPQ.js';
5
- export { i as isDesktopProtocolError } from './models-xHAz1vPQ.js';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Cx6q_tRu.js';
5
+ export { i as isDesktopProtocolError } from './models-Cx6q_tRu.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
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
112
112
  import { z } from "zod";
113
113
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
114
114
  var PROTOCOL_MAJOR = 1;
115
- var PROTOCOL_MINOR = 24;
115
+ var PROTOCOL_MINOR = 26;
116
116
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
117
117
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
118
118
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2212,7 +2212,13 @@ var AccountUsage = z30.strictObject({
2212
2212
  /** 1.13: the account's plan as the app names it (Codex: "pro", "prolite"), when recorded. */
2213
2213
  plan: z30.string().max(80).optional(),
2214
2214
  /** 1.13: the account's credit balance as the app records it (Codex), when recorded. */
2215
- credits: z30.string().max(40).optional()
2215
+ credits: z30.string().max(40).optional(),
2216
+ /**
2217
+ * 1.25: the latest the account's 5-hour window can reset: 5 hours after the first reading of this
2218
+ * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
2219
+ * window is running (no use in the last reading, or the reading is over 5 hours old).
2220
+ */
2221
+ five_hour_resets_by_ms: epochMs.optional()
2216
2222
  });
2217
2223
  var AccountReset = z30.strictObject({
2218
2224
  window: ChatPlace,
@@ -2411,6 +2417,29 @@ var AppsWindowsProcessesParams = z30.strictObject({ app_key: AppKey });
2411
2417
  var AppsWindowsProcessesResult = z30.strictObject({ processes: z30.array(z30.string().max(2e3)).max(2e3) });
2412
2418
  var AppsWindowsAddParams = z30.strictObject({ app_key: AppKey, window: ChatPlace, email: z30.string().min(3).max(320) });
2413
2419
  var AppsWindowsSaveNamesParams = z30.strictObject({ app_key: AppKey });
2420
+ var AppsWindowsUpdateStateParams = z30.strictObject({ app_key: AppKey });
2421
+ var AppsWindowsUpdateStateResult = z30.strictObject({
2422
+ app_key: AppKey,
2423
+ pending: z30.boolean(),
2424
+ /** The downloaded release's name (Claude: "Claude 2.31226.1"), when the app's log names it. */
2425
+ version: z30.string().max(120).nullable(),
2426
+ /** When the update became pending (the download's time), when known. */
2427
+ since_ms: epochMs.nullable(),
2428
+ /** Windows open when the update became pending (or last seen open) that are closed now. */
2429
+ closed: z30.array(ChatPlace).max(200)
2430
+ });
2431
+ var AppsWindowsReopenParams = z30.strictObject({ app_key: AppKey, windows: z30.array(ChatPlace).min(1).max(200) });
2432
+ var AppsWindowsReopenResult = z30.strictObject({ message: z30.string().max(400), opened: z30.array(ChatPlace).max(200) });
2433
+ var AppsWindowsUpdateAndReopenParams = z30.strictObject({ app_key: AppKey, force: z30.boolean().default(false), dry_run: z30.boolean().default(false) });
2434
+ var AppsWindowsUpdateAndReopenResult = z30.strictObject({
2435
+ message: z30.string().max(400),
2436
+ /** Windows quit (with dry_run: to be quit). */
2437
+ quit: z30.array(ChatPlace).max(200),
2438
+ /** Windows reopened (with dry_run: to be reopened), main first. */
2439
+ reopened: z30.array(ChatPlace).max(200),
2440
+ /** The version installed, null when the install did not happen (or dry_run). */
2441
+ installed_version: z30.string().max(64).nullable()
2442
+ });
2414
2443
 
2415
2444
  // src/schema/registry.ts
2416
2445
  var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
@@ -2553,7 +2582,11 @@ var OPS = {
2553
2582
  // 1.23: the signed-in person's own agents and Vault, read as them (the desktop's Agents library and Vault).
2554
2583
  "account.agents.list": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
2555
2584
  "account.vault.list": { params: AccountVaultListParams, result: AccountVaultListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
2556
- "account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] }
2585
+ "account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
2586
+ // 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
2587
+ "apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2588
+ "apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2589
+ "apps.windows.update_and_reopen": { params: AppsWindowsUpdateAndReopenParams, result: AppsWindowsUpdateAndReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] }
2557
2590
  };
2558
2591
  var EVENTS = {
2559
2592
  "fs.changed": FsChangedEvent,