@ai-matrx/desktop-protocol 0.21.72 → 0.21.74

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
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.74
4
+
5
+ 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.
6
+ Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/desktop-protocol/src`.
7
+
8
+ ## 0.21.73
9
+ ### Protocol 1.72 — ours pushed into the apps
10
+
11
+ - `ChatRow`: optional `pin_sync` (a `ChatTitleSync`): whether our star is the app's pin for this chat;
12
+ `synced` only where a test proved the app takes and keeps the pin Matrx writes.
13
+ - New op `apps.chats.bring_back` (`app_key`, `chat_id`, `dry_run?`): one chat home from its move
14
+ records, never a project; answers the to-window result with `project_id` null.
15
+ - New op `apps.chats.tidy_up` (`dry_run`, `restart_windows?`): pushes ours (titles, pins) into every
16
+ app whose facet can take it; answers per app and facet (`TidyUpFacet`), the Claude windows that
17
+ would keep an old name until reopened (`restart`, `TidyUpRestart`) and those it reopened.
18
+ - Optional field in FIELDS_SINCE, new ops since 1.72. Consumer action: none for an older client.
19
+
3
20
  ## 0.21.72
4
21
  ### Protocol 1.71 — coding-app accounts and instances in the database
5
22
 
@@ -19,6 +36,15 @@
19
36
  hidden state the call changed.
20
37
  - Optional field in FIELDS_SINCE, new op since 1.70. Consumer action: none for an older client.
21
38
 
39
+ ## 0.21.71
40
+ ### Protocol 1.70 — our Hide for chats
41
+
42
+ - `ChatRow`: optional `hidden` — the person hid the chat from Matrx's lists. Kept by Matrx, never
43
+ written into the app; the app's own hidden facts stay `hidden_in`, `archived`, `hidden_from_main`.
44
+ - New op `apps.chats.hide` (`app_key`, `chat_ids` 1–500, `hidden`) answers `changed`: the chats whose
45
+ hidden state the call changed.
46
+ - Optional field in FIELDS_SINCE, new op since 1.70. Consumer action: none for an older client.
47
+
22
48
  ## 0.21.70
23
49
  ### Protocol 1.69 — every local language model is listed, with why one cannot run
24
50
 
@@ -203,6 +229,17 @@ Changed shipped source files (2):
203
229
 
204
230
  ## 0.21.52
205
231
  ### Unreleased
232
+ ### Protocol 1.73 — what each coding app keeps besides chats
233
+
234
+ - `AppAccount`: optional `profile` (`AccountProfile`: name, organization and role, seat and
235
+ rate-limit tiers, billing, trial end, Cursor's subscription status, where read and when), optional
236
+ `read_source` (`AccountReadSource`: `app` or `claude_code`, Claude Code's live-usage file read with
237
+ no network) and `session_cost_usd`. `AccountUsage`: optional `read_source`.
238
+ - New op `apps.setup.list` (`app_key?`): each app instance's settings (`SetupFact`), models,
239
+ plugins, marketplaces and extensions (`SetupItem`), and every MCP server (`McpServerRow`: name,
240
+ transport, URL or command, scope, on/off, file) — allow-listed fields only, never env or headers.
241
+ - Optional fields in FIELDS_SINCE, a new op since 1.73. Consumer action: none for an older client.
242
+
206
243
  ### Protocol 1.57 — the account a coding record belongs to, and each sign-in's usage
207
244
 
208
245
  - `accountId` (optional) on `CodingSessionRecord`, `CodingDiscoveredChat`, `CodingRecentRow` and
@@ -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 = 71;
9
+ var PROTOCOL_MINOR = 73;
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_-]+$/);
@@ -1305,6 +1305,11 @@ var ChatRow = z13.strictObject({
1305
1305
  prior_sessions: z13.array(ChatId).max(50).optional(),
1306
1306
  /** 1.61: where the title shows (the title facet's sync state for this chat's app). */
1307
1307
  title_sync: ChatTitleSync.optional(),
1308
+ /**
1309
+ * 1.72: whether our star is the app's pin for this chat (the pin facet's sync state: `synced` only
1310
+ * where a test proved the app takes and keeps the pin Matrx writes; `not_synced` says why).
1311
+ */
1312
+ pin_sync: ChatTitleSync.optional(),
1308
1313
  /** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */
1309
1314
  moved: z13.array(ChatMove).max(50).optional(),
1310
1315
  /**
@@ -1471,7 +1476,9 @@ var AccountUsage = z14.strictObject({
1471
1476
  * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
1472
1477
  * window is running (no use in the last reading, or the reading is over 5 hours old).
1473
1478
  */
1474
- five_hour_resets_by_ms: epochMs.optional()
1479
+ five_hour_resets_by_ms: epochMs.optional(),
1480
+ /** 1.73: where the reading came from (absent = the app itself). */
1481
+ read_source: z14.enum(["app", "claude_code"]).optional()
1475
1482
  });
1476
1483
  var AccountReset = z14.strictObject({
1477
1484
  window: ChatPlace,
@@ -1621,6 +1628,30 @@ var AppsProjectsToWindowResult = z14.strictObject({
1621
1628
  chats: z14.array(ProjectMoveOutcome).max(5e3).optional(),
1622
1629
  message: z14.string().max(400)
1623
1630
  });
1631
+ var AppsChatsBringBackParams = z14.strictObject({ app_key: AppKey, chat_id: ChatId, dry_run: z14.boolean().optional() });
1632
+ var AppsChatsBringBackResult = AppsProjectsToWindowResult.extend({ project_id: ChatProjectId.nullable() });
1633
+ var TidyUpFacet = z14.strictObject({
1634
+ app_key: AppKey,
1635
+ facet: z14.enum(["title", "pin"]),
1636
+ state: z14.enum(["synced", "not_synced", "unsupported"]),
1637
+ note: z14.string().max(400),
1638
+ to_push: nonNegInt,
1639
+ pushed: nonNegInt,
1640
+ already: nonNegInt,
1641
+ waiting: nonNegInt,
1642
+ failed: nonNegInt
1643
+ });
1644
+ var TidyUpRestart = z14.strictObject({ window: ChatPlace, why: z14.string().max(400) });
1645
+ var AppsChatsTidyUpParams = z14.strictObject({ dry_run: z14.boolean(), restart_windows: z14.array(ChatPlace).max(64).optional() });
1646
+ var AppsChatsTidyUpResult = z14.strictObject({
1647
+ dry_run: z14.boolean(),
1648
+ facets: z14.array(TidyUpFacet).max(32),
1649
+ /** Claude windows that would keep an old name until they reopen (the plan lists them; nothing is quit unasked). */
1650
+ restart: z14.array(TidyUpRestart).max(64),
1651
+ /** The windows this run quit and reopened. */
1652
+ restarted: z14.array(ChatPlace).max(64),
1653
+ message: z14.string().max(600)
1654
+ });
1624
1655
  var ColdChat = z14.strictObject({
1625
1656
  id: ChatId,
1626
1657
  title: z14.string().max(1e3),
@@ -1905,6 +1936,25 @@ var ElsewhereInstance = z15.strictObject({
1905
1936
  });
1906
1937
  var AccountResetSource = z15.enum(["app", "usage_history", "your_list"]);
1907
1938
  var AccountGap = z15.enum(["email", "plan", "usage"]);
1939
+ var AccountReadSource = z15.enum(["app", "claude_code"]);
1940
+ var AccountProfile = z15.strictObject({
1941
+ /** The person's name on the account. */
1942
+ name: z15.string().max(200).nullable(),
1943
+ /** The organization the sign-in is in, and the person's role there. */
1944
+ org_name: z15.string().max(200).nullable(),
1945
+ org_role: z15.string().max(80).nullable(),
1946
+ /** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
1947
+ seat_tier: z15.string().max(80).nullable(),
1948
+ rate_limit_tier: z15.string().max(120).nullable(),
1949
+ billing: z15.string().max(80).nullable(),
1950
+ trial_ends_ms: epochMs.nullable(),
1951
+ /** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
1952
+ subscription: z15.string().max(80).nullable(),
1953
+ /** Where these facts were read (a short label: "Claude Code's sign-in"). */
1954
+ source: z15.string().max(200),
1955
+ /** When the app last fetched them, when it says. */
1956
+ as_of_ms: epochMs.nullable()
1957
+ });
1908
1958
  var AppAccount = z15.strictObject({
1909
1959
  app_key: AppKey,
1910
1960
  /** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
@@ -1934,7 +1984,13 @@ var AppAccount = z15.strictObject({
1934
1984
  instances: z15.array(ChatPlace).max(200),
1935
1985
  first_seen_ms: epochMs.nullable(),
1936
1986
  last_seen_ms: epochMs.nullable(),
1937
- missing: z15.array(AccountGap).max(3)
1987
+ missing: z15.array(AccountGap).max(3),
1988
+ /** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
1989
+ profile: AccountProfile.optional(),
1990
+ /** 1.73: where the newest reading came from (absent = the app itself). */
1991
+ read_source: AccountReadSource.optional(),
1992
+ /** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
1993
+ session_cost_usd: z15.number().nonnegative().optional()
1938
1994
  });
1939
1995
  var AppsInstancesListParams = z15.strictObject({ app_key: AppKey, fresh: z15.boolean().optional() });
1940
1996
  var AppsInstancesListResult = z15.strictObject({
@@ -1968,6 +2024,47 @@ var ProbeFact = z15.strictObject({ key: z15.string().max(200), value: z15.string
1968
2024
  var ProbeSource = z15.strictObject({ source: z15.string().max(120), instance: z15.string().max(64).nullable(), facts: z15.array(ProbeFact).max(500) });
1969
2025
  var AppsChatsProbeParams = z15.strictObject({ app_key: AppKey, chat_id: z15.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
1970
2026
  var AppsChatsProbeResult = z15.strictObject({ app_key: AppKey, chat_id: z15.string().max(128), sources: z15.array(ProbeSource).max(200) });
2027
+ var McpTransport = z15.enum(["stdio", "http", "sse", "unknown"]);
2028
+ var McpServerRow = z15.strictObject({
2029
+ app_key: AppKey,
2030
+ /** The app's instance whose settings hold it ("main", a home's name). */
2031
+ instance: z15.string().max(120),
2032
+ name: z15.string().max(200),
2033
+ transport: McpTransport,
2034
+ /** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
2035
+ target: z15.string().max(400).nullable(),
2036
+ /** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
2037
+ scope: z15.string().max(400),
2038
+ /** Turned on or off in the app, when it records it. */
2039
+ enabled: z15.boolean().nullable(),
2040
+ /** The settings file it was read from. */
2041
+ where: z15.string().max(400)
2042
+ });
2043
+ var SetupFact = z15.strictObject({ name: z15.string().max(80), value: z15.string().max(300) });
2044
+ var SetupItemKind = z15.enum(["extension", "plugin", "marketplace", "model"]);
2045
+ var SetupItem = z15.strictObject({
2046
+ kind: SetupItemKind,
2047
+ name: z15.string().max(200),
2048
+ version: z15.string().max(80).nullable(),
2049
+ /** Turned on or off, when the app records it. */
2050
+ enabled: z15.boolean().nullable()
2051
+ });
2052
+ var AppSetup = z15.strictObject({
2053
+ app_key: AppKey,
2054
+ instance: z15.string().max(120),
2055
+ /** The folder its settings were read from. */
2056
+ where: z15.string().max(400),
2057
+ facts: z15.array(SetupFact).max(60),
2058
+ items: z15.array(SetupItem).max(2e3),
2059
+ /** What could not be read there (shown, never hidden). */
2060
+ problems: z15.array(z15.string().max(300)).max(20)
2061
+ });
2062
+ var AppsSetupListParams = z15.strictObject({ app_key: AppKey.optional() });
2063
+ var AppsSetupListResult = z15.strictObject({
2064
+ setups: z15.array(AppSetup).max(200),
2065
+ mcp: z15.array(McpServerRow).max(2e3),
2066
+ problem: z15.string().max(400).optional()
2067
+ });
1971
2068
 
1972
2069
  // src/schema/service.ts
1973
2070
  import { z as z16 } from "zod";
@@ -4644,6 +4741,7 @@ var OPS = {
4644
4741
  // 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
4645
4742
  "apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4646
4743
  "apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4744
+ "apps.setup.list": { params: AppsSetupListParams, result: AppsSetupListResult, kind: "unary", since: "1.73", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4647
4745
  // 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
4648
4746
  "apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4649
4747
  "apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -4659,6 +4757,8 @@ var OPS = {
4659
4757
  "apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4660
4758
  "apps.chats.titles_check": { params: AppsChatsTitlesCheckParams, result: AppsChatsTitlesCheckResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4661
4759
  "apps.chats.titles_push": { params: AppsChatsTitlesPushParams, result: AppsChatsTitlesPushResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4760
+ "apps.chats.bring_back": { params: AppsChatsBringBackParams, result: AppsChatsBringBackResult, kind: "unary", since: "1.72", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4761
+ "apps.chats.tidy_up": { params: AppsChatsTidyUpParams, result: AppsChatsTidyUpResult, kind: "unary", since: "1.72", errors: ["INVALID_PARAMS", "NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4662
4762
  "apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4663
4763
  "apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4664
4764
  "apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -4938,6 +5038,16 @@ var NAMED_SCHEMAS = {
4938
5038
  AppsInstancesListResult,
4939
5039
  AppsAccountsListParams,
4940
5040
  AppsAccountsListResult,
5041
+ AccountReadSource,
5042
+ AccountProfile,
5043
+ McpTransport,
5044
+ McpServerRow,
5045
+ SetupFact,
5046
+ SetupItemKind,
5047
+ SetupItem,
5048
+ AppSetup,
5049
+ AppsSetupListParams,
5050
+ AppsSetupListResult,
4941
5051
  ProtocolVersion,
4942
5052
  RequestId,
4943
5053
  ResourceId,
@@ -5442,6 +5552,12 @@ var NAMED_SCHEMAS = {
5442
5552
  AppsChatsTitlesCheckResult,
5443
5553
  AppsChatsTitlesPushParams,
5444
5554
  AppsChatsTitlesPushResult,
5555
+ AppsChatsBringBackParams,
5556
+ AppsChatsBringBackResult,
5557
+ AppsChatsTidyUpParams,
5558
+ AppsChatsTidyUpResult,
5559
+ TidyUpFacet,
5560
+ TidyUpRestart,
5445
5561
  SpendSplit,
5446
5562
  SpendScopes,
5447
5563
  SpendAccount,
@@ -5761,8 +5877,9 @@ var FIELDS_SINCE = {
5761
5877
  AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
5762
5878
  AppsAccountsUsageResult: { problem: "1.12" },
5763
5879
  AppsAccountsResetsResult: { problem: "1.12" },
5764
- 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", hidden: "1.70" },
5765
- AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
5880
+ 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", hidden: "1.70", pin_sync: "1.72" },
5881
+ AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25", read_source: "1.73" },
5882
+ AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73" },
5766
5883
  ResourcesDisk: { name: "1.17" },
5767
5884
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
5768
5885
  AudioDevice: { kind: "1.24" },
@@ -6373,6 +6490,12 @@ export {
6373
6490
  ProjectMovePin,
6374
6491
  AppsProjectsToWindowParams,
6375
6492
  AppsProjectsToWindowResult,
6493
+ AppsChatsBringBackParams,
6494
+ AppsChatsBringBackResult,
6495
+ TidyUpFacet,
6496
+ TidyUpRestart,
6497
+ AppsChatsTidyUpParams,
6498
+ AppsChatsTidyUpResult,
6376
6499
  ColdChat,
6377
6500
  AppsChatsColdParams,
6378
6501
  AppsChatsColdResult,
@@ -6422,6 +6545,8 @@ export {
6422
6545
  ElsewhereInstance,
6423
6546
  AccountResetSource,
6424
6547
  AccountGap,
6548
+ AccountReadSource,
6549
+ AccountProfile,
6425
6550
  AppAccount,
6426
6551
  AppsInstancesListParams,
6427
6552
  AppsInstancesListResult,
@@ -6433,6 +6558,14 @@ export {
6433
6558
  ProbeSource,
6434
6559
  AppsChatsProbeParams,
6435
6560
  AppsChatsProbeResult,
6561
+ McpTransport,
6562
+ McpServerRow,
6563
+ SetupFact,
6564
+ SetupItemKind,
6565
+ SetupItem,
6566
+ AppSetup,
6567
+ AppsSetupListParams,
6568
+ AppsSetupListResult,
6436
6569
  SERVICE_MAX_FRAME_BYTES,
6437
6570
  ServiceName,
6438
6571
  ContractHash,
@@ -6941,4 +7074,4 @@ export {
6941
7074
  closeRule,
6942
7075
  isTerminalClose
6943
7076
  };
6944
- //# sourceMappingURL=chunk-server-FFLYSQUY.js.map
7077
+ //# sourceMappingURL=chunk-server-3L5JNEHY.js.map