@ai-matrx/desktop-protocol 0.21.62 → 0.21.64

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/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/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-yHB4kGxD.cjs';
5
- export { i as isDesktopProtocolError } from './models-yHB4kGxD.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-B13QkIMu.cjs';
5
+ export { i as isDesktopProtocolError } from './models-B13QkIMu.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/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/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-yHB4kGxD.js';
5
- export { i as isDesktopProtocolError } from './models-yHB4kGxD.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-B13QkIMu.js';
5
+ export { i as isDesktopProtocolError } from './models-B13QkIMu.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
@@ -12,7 +12,7 @@ import {
12
12
  Welcome,
13
13
  closeRule,
14
14
  knows
15
- } from "./chunk-server-EQCCXWD7.js";
15
+ } from "./chunk-server-B5W6NL7W.js";
16
16
  import {
17
17
  DesktopProtocolError,
18
18
  FRAME_VERSION,
package/dist/index.cjs CHANGED
@@ -27,14 +27,21 @@ __export(src_exports, {
27
27
  AccountAgentRunSort: () => AccountAgentRunSort,
28
28
  AccountAgentRunStatus: () => AccountAgentRunStatus,
29
29
  AccountAgentVariable: () => AccountAgentVariable,
30
+ AccountAgentVersion: () => AccountAgentVersion,
30
31
  AccountAgentsFavoriteParams: () => AccountAgentsFavoriteParams,
31
32
  AccountAgentsFavoriteResult: () => AccountAgentsFavoriteResult,
32
33
  AccountAgentsGetParams: () => AccountAgentsGetParams,
33
34
  AccountAgentsGetResult: () => AccountAgentsGetResult,
34
35
  AccountAgentsListParams: () => AccountAgentsListParams,
35
36
  AccountAgentsListResult: () => AccountAgentsListResult,
37
+ AccountAgentsRestoreVersionParams: () => AccountAgentsRestoreVersionParams,
38
+ AccountAgentsRestoreVersionResult: () => AccountAgentsRestoreVersionResult,
36
39
  AccountAgentsRunsParams: () => AccountAgentsRunsParams,
37
40
  AccountAgentsRunsResult: () => AccountAgentsRunsResult,
41
+ AccountAgentsVersionDiffParams: () => AccountAgentsVersionDiffParams,
42
+ AccountAgentsVersionDiffResult: () => AccountAgentsVersionDiffResult,
43
+ AccountAgentsVersionsParams: () => AccountAgentsVersionsParams,
44
+ AccountAgentsVersionsResult: () => AccountAgentsVersionsResult,
38
45
  AccountGap: () => AccountGap,
39
46
  AccountReadState: () => AccountReadState,
40
47
  AccountReset: () => AccountReset,
@@ -907,7 +914,7 @@ module.exports = __toCommonJS(src_exports);
907
914
  var import_zod = require("zod");
908
915
  var import_uuid = require("@ai-matrx/kit/uuid");
909
916
  var PROTOCOL_MAJOR = 1;
910
- var PROTOCOL_MINOR = 63;
917
+ var PROTOCOL_MINOR = 65;
911
918
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
912
919
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
913
920
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2030,6 +2037,36 @@ var AccountAgentsRunsResult = import_zod11.z.strictObject({
2030
2037
  });
2031
2038
  var AccountAgentsFavoriteParams = import_zod11.z.strictObject({ agent_id: AccountRowId, favorite: import_zod11.z.boolean() });
2032
2039
  var AccountAgentsFavoriteResult = import_zod11.z.strictObject({ favorite: import_zod11.z.boolean() });
2040
+ var AccountAgentVersion = import_zod11.z.strictObject({
2041
+ version_id: AccountRowId,
2042
+ version_number: import_zod11.z.int().min(1),
2043
+ changed_at_ms: epochMs,
2044
+ /** The change note the person wrote when saving, when they wrote one. */
2045
+ note: import_zod11.z.string().max(1e3).nullable()
2046
+ });
2047
+ var AccountAgentsVersionsParams = import_zod11.z.strictObject({
2048
+ agent_id: AccountRowId,
2049
+ offset: import_zod11.z.int().min(0).max(1e5).optional(),
2050
+ limit: import_zod11.z.int().min(1).max(200).optional()
2051
+ });
2052
+ var AccountAgentsVersionsResult = import_zod11.z.strictObject({
2053
+ state: AccountReadState,
2054
+ problem: import_zod11.z.string().max(300).nullable(),
2055
+ /** The version the agent is at now (null: no saved version yet). */
2056
+ current_version: import_zod11.z.int().min(1).nullable(),
2057
+ rows: import_zod11.z.array(AccountAgentVersion).max(200)
2058
+ });
2059
+ var AccountAgentsVersionDiffParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
2060
+ var AccountAgentsVersionDiffResult = import_zod11.z.strictObject({
2061
+ state: AccountReadState,
2062
+ problem: import_zod11.z.string().max(300).nullable(),
2063
+ version_number: import_zod11.z.int().min(1),
2064
+ current_version: import_zod11.z.int().min(1).nullable(),
2065
+ old: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable(),
2066
+ current: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable()
2067
+ });
2068
+ var AccountAgentsRestoreVersionParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
2069
+ var AccountAgentsRestoreVersionResult = import_zod11.z.strictObject({ restored_version: import_zod11.z.int().min(1) });
2033
2070
  var VaultItemKind = import_zod11.z.enum(["login", "passkey", "key", "other"]);
2034
2071
  var VaultFieldSummary = import_zod11.z.strictObject({
2035
2072
  key: import_zod11.z.string().min(1).max(120),
@@ -4339,6 +4376,8 @@ var CodingTranscriptItem = import_zod34.z.discriminatedUnion("kind", [
4339
4376
  }),
4340
4377
  import_zod34.z.strictObject({ kind: import_zod34.z.literal("usage"), usage: CodingRunUsage, costUsd: import_zod34.z.number().nullable() }),
4341
4378
  import_zod34.z.strictObject({ kind: import_zod34.z.literal("notice"), id: import_zod34.z.string().max(200), level: import_zod34.z.enum(["info", "warning"]), text: import_zod34.z.string() }),
4379
+ /** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
4380
+ import_zod34.z.strictObject({ kind: import_zod34.z.literal("continued"), id: import_zod34.z.string().max(200), from: import_zod34.z.string().max(300), text: import_zod34.z.string(), at: IsoTime.nullable() }),
4342
4381
  import_zod34.z.strictObject({ kind: import_zod34.z.literal("error"), id: import_zod34.z.string().max(200), text: import_zod34.z.string() })
4343
4382
  ]);
4344
4383
  var CodingHistoryRecord = import_zod34.z.strictObject({
@@ -5648,6 +5687,9 @@ var OPS = {
5648
5687
  "account.agents.get": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
5649
5688
  "account.agents.runs": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
5650
5689
  "account.agents.favorite": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: "unary", since: "1.39", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
5690
+ "account.agents.versions": { params: AccountAgentsVersionsParams, result: AccountAgentsVersionsResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
5691
+ "account.agents.version_diff": { params: AccountAgentsVersionDiffParams, result: AccountAgentsVersionDiffResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
5692
+ "account.agents.restore_version": { params: AccountAgentsRestoreVersionParams, result: AccountAgentsRestoreVersionResult, kind: "unary", since: "1.64", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
5651
5693
  // 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
5652
5694
  "apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5653
5695
  "apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -6407,6 +6449,13 @@ var NAMED_SCHEMAS = {
6407
6449
  AccountAgentsRunsResult,
6408
6450
  AccountAgentsFavoriteParams,
6409
6451
  AccountAgentsFavoriteResult,
6452
+ AccountAgentVersion,
6453
+ AccountAgentsVersionsParams,
6454
+ AccountAgentsVersionsResult,
6455
+ AccountAgentsVersionDiffParams,
6456
+ AccountAgentsVersionDiffResult,
6457
+ AccountAgentsRestoreVersionParams,
6458
+ AccountAgentsRestoreVersionResult,
6410
6459
  AppsWindowsUpdateStateParams,
6411
6460
  AppsWindowsUpdateStateResult,
6412
6461
  AppsWindowsReopenParams,
@@ -6803,6 +6852,18 @@ function providersForPeer(value, version) {
6803
6852
  });
6804
6853
  return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
6805
6854
  }
6855
+ function transcriptItemsForPeer(value, version) {
6856
+ if (knows(version, "1.65") || value === null || typeof value !== "object") return value;
6857
+ const body = value;
6858
+ if (!Array.isArray(body.items)) return value;
6859
+ const items = body.items;
6860
+ const next = items.map((item) => {
6861
+ const it = item;
6862
+ if (it?.kind !== "continued") return item;
6863
+ return { kind: "notice", id: it.id, level: "info", text: it.text };
6864
+ });
6865
+ return next.some((it, i) => it !== items[i]) ? { ...body, items: next } : value;
6866
+ }
6806
6867
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
6807
6868
  ["window.list", "windows"],
6808
6869
  ["window.focus", "window"],
@@ -6831,6 +6892,7 @@ function forPeer(op, part, value, version) {
6831
6892
  const nested = op ? NESTED_RESULTS.get(op) : void 0;
6832
6893
  const stripped = nested ? stripNested(top, nested, version) : top;
6833
6894
  if (op === "coding.providers") return providersForPeer(stripped, version);
6895
+ if (op === "coding.history" || op === "coding.transcript.read") return transcriptItemsForPeer(stripped, version);
6834
6896
  return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
6835
6897
  }
6836
6898
  if (value === null || typeof value !== "object") return value;
@@ -6848,7 +6910,7 @@ function forPeer(op, part, value, version) {
6848
6910
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6849
6911
 
6850
6912
  // src/contract.ts
6851
- var CONTRACT_SHA256 = "c161897b36fd5da0d5892a08466479f4fa495fc79a9efc2956f32e0cd6e461b6";
6913
+ var CONTRACT_SHA256 = "5f948a2ff8eb9390240f311461546c850c170e3b633195a2aa80daf1084f4009";
6852
6914
 
6853
6915
  // src/close-policy.ts
6854
6916
  var CLOSE_RULES = {