@ai-matrx/desktop-protocol 0.21.61 → 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/CHANGELOG.md CHANGED
@@ -2,15 +2,45 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ - **Protocol 1.65 — "Continued from <account>" is a transcript item (2026-10-21).** `CodingTranscriptItem` gains `continued` (`id`, `from`, `text`, `at`): the line across a coding chat where it moved from another account (@ai-matrx/coding-sessions emits it where it used to emit an info `notice`). `forPeer` sends a 1.64 peer's `coding.history` / `coding.transcript.read` each as that `notice`, so its strict union never refuses the whole transcript. Consumer action: draw it as a divider at its place (the coding-sessions screen does).
6
+ - **Protocol 1.64 — agent versions in Matrx 2 (2026-10-21).** New ops `account.agents.versions` (an agent's saved versions: number, age, note; the current version), `account.agents.version_diff` (one version and the current one as agent-definition records for `@ai-matrx/agents/versions/react` AgentDiffViewer) and `account.agents.restore_version` (`agx_promote_version`). New ops only; an older peer never sees them. Consumer action: none.
7
+ - **Protocol 1.63 — a chat's instance, and what an instance record lacks (2026-10-21).** `ChatRow.home` (`ChatPlace`): the instance whose folder holds the chat, read only (Claude: the side window holding its newest record copy, else main; Codex: the home whose database holds it). `AppInstance.missing` (`InstanceGap[]`: account / email / version): what the record still lacks after Matrx filled what it remembered (Matrx 2 ledger D10). Optional; stripped for a 1.62 peer by `forPeer`. Consumer action: none.
5
8
  - **Protocol 1.62 — moves as records (2026-10-20).** `ChatRow.moved` (`ChatMove[]`, newest first: `kind` move / copy, `from`, `to`, `at_ms`, `back_at_ms`): every Move and Copy of a chat between instances as Matrx recorded it, so a screen reads where a chat went and whether it came back from the record, never from a project named "From X". Optional; stripped for a 1.61 peer by `forPeer`. Consumer action: none.
6
9
  - **Protocol 1.61 — where a chat's title shows (2026-10-20).** `ChatRow.title_sync` (`ChatTitleSync`: `state` synced / not_synced / unsupported, and a `note`): the title facet's sync state for the chat's app, so a screen can say honestly whether the app shows the person's name. Optional; stripped for a 1.60 peer by `forPeer`. Consumer action: none.
7
10
  - **Shared code ships once per side (2026-10-18).** Built `splitting: false`, the root, `/frame` and `/client` each carried their own copy of 44 shared modules. ESM now builds them in one split pass (`chunk-server-*.js`, no banner); `/react` builds alone, stamped. CJS unsplit; declarations per group. ESM JS 610,843 -> 398,722 bytes; root + `/client` together 597 KB -> 390 KB; `/frame` stays zod-free (6 KB); every entry's export names identical (ESM and CJS). Guard: `../scripts/check-ships-once.mjs`, run in `build`. Consumer action: none.
8
11
 
9
- ## 0.21.61
12
+ ## 0.21.64
10
13
 
11
14
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
12
15
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/desktop-protocol/src`.
13
16
 
17
+ ## 0.21.62
18
+
19
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
20
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
21
+ Diff: `git diff e86170a22e 920791a7ff -- apps/shared/desktop-protocol/src`
22
+
23
+ Changed shipped source files (6):
24
+ - `apps/shared/desktop-protocol/src/contract.ts`
25
+ - `apps/shared/desktop-protocol/src/schema/apps-chats.ts`
26
+ - `apps/shared/desktop-protocol/src/schema/apps-instances.ts`
27
+ - `apps/shared/desktop-protocol/src/schema/primitives.ts`
28
+ - `apps/shared/desktop-protocol/src/schema/registry.ts`
29
+ - `apps/shared/desktop-protocol/src/versioning.ts`
30
+
31
+ ## 0.21.61
32
+
33
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
34
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
35
+ Diff: `git diff 97978bd752 e86170a22e -- apps/shared/desktop-protocol/src`
36
+
37
+ Changed shipped source files (5):
38
+ - `apps/shared/desktop-protocol/src/contract.ts`
39
+ - `apps/shared/desktop-protocol/src/schema/apps-chats.ts`
40
+ - `apps/shared/desktop-protocol/src/schema/primitives.ts`
41
+ - `apps/shared/desktop-protocol/src/schema/registry.ts`
42
+ - `apps/shared/desktop-protocol/src/versioning.ts`
43
+
14
44
  ## 0.21.60
15
45
 
16
46
  SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
@@ -6,7 +6,7 @@ import {
6
6
  import { z } from "zod";
7
7
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
8
8
  var PROTOCOL_MAJOR = 1;
9
- var PROTOCOL_MINOR = 62;
9
+ var PROTOCOL_MINOR = 65;
10
10
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
11
11
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
12
12
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1002,6 +1002,36 @@ var AccountAgentsRunsResult = z11.strictObject({
1002
1002
  });
1003
1003
  var AccountAgentsFavoriteParams = z11.strictObject({ agent_id: AccountRowId, favorite: z11.boolean() });
1004
1004
  var AccountAgentsFavoriteResult = z11.strictObject({ favorite: z11.boolean() });
1005
+ var AccountAgentVersion = z11.strictObject({
1006
+ version_id: AccountRowId,
1007
+ version_number: z11.int().min(1),
1008
+ changed_at_ms: epochMs,
1009
+ /** The change note the person wrote when saving, when they wrote one. */
1010
+ note: z11.string().max(1e3).nullable()
1011
+ });
1012
+ var AccountAgentsVersionsParams = z11.strictObject({
1013
+ agent_id: AccountRowId,
1014
+ offset: z11.int().min(0).max(1e5).optional(),
1015
+ limit: z11.int().min(1).max(200).optional()
1016
+ });
1017
+ var AccountAgentsVersionsResult = z11.strictObject({
1018
+ state: AccountReadState,
1019
+ problem: z11.string().max(300).nullable(),
1020
+ /** The version the agent is at now (null: no saved version yet). */
1021
+ current_version: z11.int().min(1).nullable(),
1022
+ rows: z11.array(AccountAgentVersion).max(200)
1023
+ });
1024
+ var AccountAgentsVersionDiffParams = z11.strictObject({ agent_id: AccountRowId, version_number: z11.int().min(1) });
1025
+ var AccountAgentsVersionDiffResult = z11.strictObject({
1026
+ state: AccountReadState,
1027
+ problem: z11.string().max(300).nullable(),
1028
+ version_number: z11.int().min(1),
1029
+ current_version: z11.int().min(1).nullable(),
1030
+ old: z11.record(z11.string().max(200), z11.unknown()).nullable(),
1031
+ current: z11.record(z11.string().max(200), z11.unknown()).nullable()
1032
+ });
1033
+ var AccountAgentsRestoreVersionParams = z11.strictObject({ agent_id: AccountRowId, version_number: z11.int().min(1) });
1034
+ var AccountAgentsRestoreVersionResult = z11.strictObject({ restored_version: z11.int().min(1) });
1005
1035
  var VaultItemKind = z11.enum(["login", "passkey", "key", "other"]);
1006
1036
  var VaultFieldSummary = z11.strictObject({
1007
1037
  key: z11.string().min(1).max(120),
@@ -1251,7 +1281,13 @@ var ChatRow = z13.strictObject({
1251
1281
  /** 1.61: where the title shows (the title facet's sync state for this chat's app). */
1252
1282
  title_sync: ChatTitleSync.optional(),
1253
1283
  /** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */
1254
- moved: z13.array(ChatMove).max(50).optional()
1284
+ moved: z13.array(ChatMove).max(50).optional(),
1285
+ /**
1286
+ * 1.63: the instance the chat belongs to: the one whose folder holds it (read only; nothing is
1287
+ * moved). Claude: the side window holding its newest record copy (main mirrors every window), else
1288
+ * main; Codex: the home whose database holds it. Absent = only Matrx's holder keeps it.
1289
+ */
1290
+ home: ChatPlace.optional()
1255
1291
  });
1256
1292
  var ChatFamily = z13.strictObject({
1257
1293
  id: ChatId,
@@ -1791,6 +1827,7 @@ var AppInstall = z15.strictObject({
1791
1827
  location: z15.string().max(1024),
1792
1828
  version: z15.string().max(80).nullable()
1793
1829
  });
1830
+ var InstanceGap = z15.enum(["account", "email", "version"]);
1794
1831
  var AppInstance = z15.strictObject({
1795
1832
  app_key: AppKey,
1796
1833
  /** "main", or the instance's name: the same key every window action takes. */
@@ -1816,7 +1853,9 @@ var AppInstance = z15.strictObject({
1816
1853
  open_chats: nonNegInt,
1817
1854
  launched_ms: epochMs.nullable(),
1818
1855
  quit_ms: epochMs.nullable(),
1819
- first_launch_ms: epochMs.nullable()
1856
+ first_launch_ms: epochMs.nullable(),
1857
+ /** 1.63: what this record still lacks after Matrx filled what it remembered (absent = nothing). */
1858
+ missing: z15.array(InstanceGap).max(3).optional()
1820
1859
  });
1821
1860
  var AccountResetSource = z15.enum(["app", "usage_history", "your_list"]);
1822
1861
  var AccountGap = z15.enum(["email", "plan", "usage"]);
@@ -3302,6 +3341,8 @@ var CodingTranscriptItem = z34.discriminatedUnion("kind", [
3302
3341
  }),
3303
3342
  z34.strictObject({ kind: z34.literal("usage"), usage: CodingRunUsage, costUsd: z34.number().nullable() }),
3304
3343
  z34.strictObject({ kind: z34.literal("notice"), id: z34.string().max(200), level: z34.enum(["info", "warning"]), text: z34.string() }),
3344
+ /** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
3345
+ z34.strictObject({ kind: z34.literal("continued"), id: z34.string().max(200), from: z34.string().max(300), text: z34.string(), at: IsoTime.nullable() }),
3305
3346
  z34.strictObject({ kind: z34.literal("error"), id: z34.string().max(200), text: z34.string() })
3306
3347
  ]);
3307
3348
  var CodingHistoryRecord = z34.strictObject({
@@ -4611,6 +4652,9 @@ var OPS = {
4611
4652
  "account.agents.get": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
4612
4653
  "account.agents.runs": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
4613
4654
  "account.agents.favorite": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: "unary", since: "1.39", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
4655
+ "account.agents.versions": { params: AccountAgentsVersionsParams, result: AccountAgentsVersionsResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
4656
+ "account.agents.version_diff": { params: AccountAgentsVersionDiffParams, result: AccountAgentsVersionDiffResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
4657
+ "account.agents.restore_version": { params: AccountAgentsRestoreVersionParams, result: AccountAgentsRestoreVersionResult, kind: "unary", since: "1.64", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
4614
4658
  // 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
4615
4659
  "apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4616
4660
  "apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -4749,6 +4793,7 @@ var NAMED_SCHEMAS = {
4749
4793
  AppsChatsProbeParams,
4750
4794
  AppsChatsProbeResult,
4751
4795
  InstanceStatus,
4796
+ InstanceGap,
4752
4797
  AppInstall,
4753
4798
  AppInstance,
4754
4799
  AccountResetSource,
@@ -5369,6 +5414,13 @@ var NAMED_SCHEMAS = {
5369
5414
  AccountAgentsRunsResult,
5370
5415
  AccountAgentsFavoriteParams,
5371
5416
  AccountAgentsFavoriteResult,
5417
+ AccountAgentVersion,
5418
+ AccountAgentsVersionsParams,
5419
+ AccountAgentsVersionsResult,
5420
+ AccountAgentsVersionDiffParams,
5421
+ AccountAgentsVersionDiffResult,
5422
+ AccountAgentsRestoreVersionParams,
5423
+ AccountAgentsRestoreVersionResult,
5372
5424
  AppsWindowsUpdateStateParams,
5373
5425
  AppsWindowsUpdateStateResult,
5374
5426
  AppsWindowsReopenParams,
@@ -5560,6 +5612,7 @@ var FIELDS_SINCE = {
5560
5612
  CodingDiscoveredChat: { accountId: "1.57" },
5561
5613
  CodingRecentRow: { accountId: "1.57" },
5562
5614
  CodingSearchHit: { accountId: "1.57" },
5615
+ AppInstance: { missing: "1.63" },
5563
5616
  AppsInstancesListParams: { fresh: "1.51" },
5564
5617
  AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51" },
5565
5618
  AppsAccountsListParams: { fresh: "1.51" },
@@ -5567,7 +5620,7 @@ var FIELDS_SINCE = {
5567
5620
  AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
5568
5621
  AppsAccountsUsageResult: { problem: "1.12" },
5569
5622
  AppsAccountsResetsResult: { problem: "1.12" },
5570
- ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59", title_sync: "1.61", moved: "1.62" },
5623
+ ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59", title_sync: "1.61", moved: "1.62", home: "1.63" },
5571
5624
  AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
5572
5625
  ResourcesDisk: { name: "1.17" },
5573
5626
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
@@ -5693,6 +5746,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
5693
5746
  // 1.60: each closed window's reopen outcome in a restart_verify copy.
5694
5747
  ["apps.chats.copy_to_account", [["restart", "CopyRestart"]]],
5695
5748
  ["apps.windows.list", [["windows", "AppWindowInfo"]]],
5749
+ // 1.63: what an instance record still lacks.
5750
+ ["apps.instances.list", [["instances", "AppInstance"]]],
5696
5751
  ["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
5697
5752
  ["coding.providers", [["providers", "CodingProviderStatus"]]],
5698
5753
  // 1.57: the account a coding record belongs to.
@@ -5762,6 +5817,18 @@ function providersForPeer(value, version) {
5762
5817
  });
5763
5818
  return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
5764
5819
  }
5820
+ function transcriptItemsForPeer(value, version) {
5821
+ if (knows(version, "1.65") || value === null || typeof value !== "object") return value;
5822
+ const body = value;
5823
+ if (!Array.isArray(body.items)) return value;
5824
+ const items = body.items;
5825
+ const next = items.map((item) => {
5826
+ const it = item;
5827
+ if (it?.kind !== "continued") return item;
5828
+ return { kind: "notice", id: it.id, level: "info", text: it.text };
5829
+ });
5830
+ return next.some((it, i) => it !== items[i]) ? { ...body, items: next } : value;
5831
+ }
5765
5832
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
5766
5833
  ["window.list", "windows"],
5767
5834
  ["window.focus", "window"],
@@ -5790,6 +5857,7 @@ function forPeer(op, part, value, version) {
5790
5857
  const nested = op ? NESTED_RESULTS.get(op) : void 0;
5791
5858
  const stripped = nested ? stripNested(top, nested, version) : top;
5792
5859
  if (op === "coding.providers") return providersForPeer(stripped, version);
5860
+ if (op === "coding.history" || op === "coding.transcript.read") return transcriptItemsForPeer(stripped, version);
5793
5861
  return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
5794
5862
  }
5795
5863
  if (value === null || typeof value !== "object") return value;
@@ -6020,6 +6088,13 @@ export {
6020
6088
  AccountAgentsRunsResult,
6021
6089
  AccountAgentsFavoriteParams,
6022
6090
  AccountAgentsFavoriteResult,
6091
+ AccountAgentVersion,
6092
+ AccountAgentsVersionsParams,
6093
+ AccountAgentsVersionsResult,
6094
+ AccountAgentsVersionDiffParams,
6095
+ AccountAgentsVersionDiffResult,
6096
+ AccountAgentsRestoreVersionParams,
6097
+ AccountAgentsRestoreVersionResult,
6023
6098
  VaultItemKind,
6024
6099
  VaultFieldSummary,
6025
6100
  VaultItemSummary,
@@ -6161,6 +6236,7 @@ export {
6161
6236
  AppsChatsCopyToAccountResult,
6162
6237
  InstanceStatus,
6163
6238
  AppInstall,
6239
+ InstanceGap,
6164
6240
  AppInstance,
6165
6241
  AccountResetSource,
6166
6242
  AccountGap,
@@ -6682,4 +6758,4 @@ export {
6682
6758
  closeRule,
6683
6759
  isTerminalClose
6684
6760
  };
6685
- //# sourceMappingURL=chunk-server-OQM4XFUL.js.map
6761
+ //# sourceMappingURL=chunk-server-B5W6NL7W.js.map