@ai-matrx/desktop-protocol 0.21.73 → 0.21.75

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,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.75
4
+ ### Protocol 1.74 — the models on this computer, and Remove
5
+
6
+ - New op `models.local.list` (service op `ml.local_list`): every model the ml service holds — language
7
+ models (the person's own adopted models included) and speech models — as `LocalModelRow`: `kind`
8
+ (`text` | `speech`), `model`, `path`, `size_bytes`, `freed_bytes` (what Remove gives back),
9
+ `in_place`, `source` (the folder the person's files stay in) and `running`.
10
+ - New op `models.local.remove` (service op `ml.local_remove`, `kind` + `model`): deletes only the files
11
+ Matrx 2 holds; a link to the person's own file is unlinked, never the file. The running model is
12
+ stopped first. Answers `freed_bytes`, `stopped` and `kept`.
13
+ - New ops since 1.74. Consumer action: none for an older client.
14
+
15
+ ## 0.21.74
16
+
17
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
18
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
19
+ Diff: `git diff aa4f979a76 3165453310 -- apps/shared/desktop-protocol/src`
20
+
21
+ Changed shipped source files (6):
22
+ - `apps/shared/desktop-protocol/src/contract.ts`
23
+ - `apps/shared/desktop-protocol/src/schema/apps-accounts.ts`
24
+ - `apps/shared/desktop-protocol/src/schema/apps-instances.ts`
25
+ - `apps/shared/desktop-protocol/src/schema/primitives.ts`
26
+ - `apps/shared/desktop-protocol/src/schema/registry.ts`
27
+ - `apps/shared/desktop-protocol/src/versioning.ts`
28
+
3
29
  ## 0.21.73
4
30
  ### Protocol 1.72 — ours pushed into the apps
5
31
 
@@ -224,6 +250,17 @@ Changed shipped source files (2):
224
250
 
225
251
  ## 0.21.52
226
252
  ### Unreleased
253
+ ### Protocol 1.73 — what each coding app keeps besides chats
254
+
255
+ - `AppAccount`: optional `profile` (`AccountProfile`: name, organization and role, seat and
256
+ rate-limit tiers, billing, trial end, Cursor's subscription status, where read and when), optional
257
+ `read_source` (`AccountReadSource`: `app` or `claude_code`, Claude Code's live-usage file read with
258
+ no network) and `session_cost_usd`. `AccountUsage`: optional `read_source`.
259
+ - New op `apps.setup.list` (`app_key?`): each app instance's settings (`SetupFact`), models,
260
+ plugins, marketplaces and extensions (`SetupItem`), and every MCP server (`McpServerRow`: name,
261
+ transport, URL or command, scope, on/off, file) — allow-listed fields only, never env or headers.
262
+ - Optional fields in FIELDS_SINCE, a new op since 1.73. Consumer action: none for an older client.
263
+
227
264
  ### Protocol 1.57 — the account a coding record belongs to, and each sign-in's usage
228
265
 
229
266
  - `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 = 72;
9
+ var PROTOCOL_MINOR = 74;
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_-]+$/);
@@ -894,6 +894,36 @@ var ModelsDownloadsListParams = z10.strictObject({});
894
894
  var ModelsDownloadsListResult = z10.strictObject({ downloads: z10.array(DownloadRow).max(64) });
895
895
  var ModelsDownloadsCancelParams = z10.strictObject({ key: z10.string().max(64) });
896
896
  var ModelsDownloadsCancelResult = z10.strictObject({ cancelled: z10.boolean() });
897
+ var LocalModelKind = z10.enum(["text", "speech"]);
898
+ var LocalModelRow = z10.strictObject({
899
+ kind: LocalModelKind,
900
+ model: ModelKey,
901
+ /** Its folder in the service's store. */
902
+ path: z10.string().max(1024),
903
+ /** Every file of the model, as installed. */
904
+ size_bytes: nonNegInt,
905
+ /** What Remove frees: the files only Matrx 2 holds. A file linked from the person's own folder frees nothing. */
906
+ freed_bytes: nonNegInt,
907
+ /** True when any file is a link to a file elsewhere (used in place): Remove then never deletes that file. */
908
+ in_place: z10.boolean(),
909
+ /** The folder the person's files stay in (in place), when the service can tell; null otherwise. */
910
+ source: z10.string().max(1024).nullable(),
911
+ /** The language model the server runs now (Remove stops it first). */
912
+ running: z10.boolean()
913
+ });
914
+ var ModelsLocalListParams = z10.strictObject({});
915
+ var ModelsLocalListResult = z10.strictObject({ models: z10.array(LocalModelRow).max(1024) });
916
+ var ModelsLocalRemoveParams = z10.strictObject({ kind: LocalModelKind, model: ModelKey });
917
+ var ModelsLocalRemoveResult = z10.strictObject({
918
+ kind: LocalModelKind,
919
+ model: ModelKey,
920
+ /** Bytes of disk the removal gave back (0 for a model used in place). */
921
+ freed_bytes: nonNegInt,
922
+ /** True when it was the running model and the server was stopped first. */
923
+ stopped: z10.boolean(),
924
+ /** Where the person's files stay (a model used in place); null when nothing was kept. */
925
+ kept: z10.string().max(1024).nullable()
926
+ });
897
927
  var MlServiceState = z10.enum(["starting", "ready", "restarting", "failed", "stopped"]);
898
928
  var MlServiceStatus = z10.strictObject({
899
929
  state: MlServiceState,
@@ -1476,7 +1506,9 @@ var AccountUsage = z14.strictObject({
1476
1506
  * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
1477
1507
  * window is running (no use in the last reading, or the reading is over 5 hours old).
1478
1508
  */
1479
- five_hour_resets_by_ms: epochMs.optional()
1509
+ five_hour_resets_by_ms: epochMs.optional(),
1510
+ /** 1.73: where the reading came from (absent = the app itself). */
1511
+ read_source: z14.enum(["app", "claude_code"]).optional()
1480
1512
  });
1481
1513
  var AccountReset = z14.strictObject({
1482
1514
  window: ChatPlace,
@@ -1934,6 +1966,25 @@ var ElsewhereInstance = z15.strictObject({
1934
1966
  });
1935
1967
  var AccountResetSource = z15.enum(["app", "usage_history", "your_list"]);
1936
1968
  var AccountGap = z15.enum(["email", "plan", "usage"]);
1969
+ var AccountReadSource = z15.enum(["app", "claude_code"]);
1970
+ var AccountProfile = z15.strictObject({
1971
+ /** The person's name on the account. */
1972
+ name: z15.string().max(200).nullable(),
1973
+ /** The organization the sign-in is in, and the person's role there. */
1974
+ org_name: z15.string().max(200).nullable(),
1975
+ org_role: z15.string().max(80).nullable(),
1976
+ /** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
1977
+ seat_tier: z15.string().max(80).nullable(),
1978
+ rate_limit_tier: z15.string().max(120).nullable(),
1979
+ billing: z15.string().max(80).nullable(),
1980
+ trial_ends_ms: epochMs.nullable(),
1981
+ /** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
1982
+ subscription: z15.string().max(80).nullable(),
1983
+ /** Where these facts were read (a short label: "Claude Code's sign-in"). */
1984
+ source: z15.string().max(200),
1985
+ /** When the app last fetched them, when it says. */
1986
+ as_of_ms: epochMs.nullable()
1987
+ });
1937
1988
  var AppAccount = z15.strictObject({
1938
1989
  app_key: AppKey,
1939
1990
  /** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
@@ -1963,7 +2014,13 @@ var AppAccount = z15.strictObject({
1963
2014
  instances: z15.array(ChatPlace).max(200),
1964
2015
  first_seen_ms: epochMs.nullable(),
1965
2016
  last_seen_ms: epochMs.nullable(),
1966
- missing: z15.array(AccountGap).max(3)
2017
+ missing: z15.array(AccountGap).max(3),
2018
+ /** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
2019
+ profile: AccountProfile.optional(),
2020
+ /** 1.73: where the newest reading came from (absent = the app itself). */
2021
+ read_source: AccountReadSource.optional(),
2022
+ /** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
2023
+ session_cost_usd: z15.number().nonnegative().optional()
1967
2024
  });
1968
2025
  var AppsInstancesListParams = z15.strictObject({ app_key: AppKey, fresh: z15.boolean().optional() });
1969
2026
  var AppsInstancesListResult = z15.strictObject({
@@ -1997,6 +2054,47 @@ var ProbeFact = z15.strictObject({ key: z15.string().max(200), value: z15.string
1997
2054
  var ProbeSource = z15.strictObject({ source: z15.string().max(120), instance: z15.string().max(64).nullable(), facts: z15.array(ProbeFact).max(500) });
1998
2055
  var AppsChatsProbeParams = z15.strictObject({ app_key: AppKey, chat_id: z15.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
1999
2056
  var AppsChatsProbeResult = z15.strictObject({ app_key: AppKey, chat_id: z15.string().max(128), sources: z15.array(ProbeSource).max(200) });
2057
+ var McpTransport = z15.enum(["stdio", "http", "sse", "unknown"]);
2058
+ var McpServerRow = z15.strictObject({
2059
+ app_key: AppKey,
2060
+ /** The app's instance whose settings hold it ("main", a home's name). */
2061
+ instance: z15.string().max(120),
2062
+ name: z15.string().max(200),
2063
+ transport: McpTransport,
2064
+ /** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
2065
+ target: z15.string().max(400).nullable(),
2066
+ /** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
2067
+ scope: z15.string().max(400),
2068
+ /** Turned on or off in the app, when it records it. */
2069
+ enabled: z15.boolean().nullable(),
2070
+ /** The settings file it was read from. */
2071
+ where: z15.string().max(400)
2072
+ });
2073
+ var SetupFact = z15.strictObject({ name: z15.string().max(80), value: z15.string().max(300) });
2074
+ var SetupItemKind = z15.enum(["extension", "plugin", "marketplace", "model"]);
2075
+ var SetupItem = z15.strictObject({
2076
+ kind: SetupItemKind,
2077
+ name: z15.string().max(200),
2078
+ version: z15.string().max(80).nullable(),
2079
+ /** Turned on or off, when the app records it. */
2080
+ enabled: z15.boolean().nullable()
2081
+ });
2082
+ var AppSetup = z15.strictObject({
2083
+ app_key: AppKey,
2084
+ instance: z15.string().max(120),
2085
+ /** The folder its settings were read from. */
2086
+ where: z15.string().max(400),
2087
+ facts: z15.array(SetupFact).max(60),
2088
+ items: z15.array(SetupItem).max(2e3),
2089
+ /** What could not be read there (shown, never hidden). */
2090
+ problems: z15.array(z15.string().max(300)).max(20)
2091
+ });
2092
+ var AppsSetupListParams = z15.strictObject({ app_key: AppKey.optional() });
2093
+ var AppsSetupListResult = z15.strictObject({
2094
+ setups: z15.array(AppSetup).max(200),
2095
+ mcp: z15.array(McpServerRow).max(2e3),
2096
+ problem: z15.string().max(400).optional()
2097
+ });
2000
2098
 
2001
2099
  // src/schema/service.ts
2002
2100
  import { z as z16 } from "zod";
@@ -4644,6 +4742,8 @@ var OPS = {
4644
4742
  "models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
4645
4743
  "models.downloads.list": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult, kind: "unary", since: "1.45", errors: ["INTERNAL"] },
4646
4744
  "models.downloads.cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult, kind: "unary", since: "1.45", errors: ["NOT_FOUND", "INTERNAL"] },
4745
+ "models.local.list": { params: ModelsLocalListParams, result: ModelsLocalListResult, kind: "unary", since: "1.74", errors: ["INTERNAL"] },
4746
+ "models.local.remove": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult, kind: "unary", since: "1.74", errors: ["NOT_FOUND", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"] },
4647
4747
  // Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.
4648
4748
  "apps.list": { params: AppsListParams, result: AppsListResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
4649
4749
  "apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },
@@ -4673,6 +4773,7 @@ var OPS = {
4673
4773
  // 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
4674
4774
  "apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4675
4775
  "apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4776
+ "apps.setup.list": { params: AppsSetupListParams, result: AppsSetupListResult, kind: "unary", since: "1.73", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4676
4777
  // 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
4677
4778
  "apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4678
4779
  "apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -4923,6 +5024,8 @@ var SERVICES = {
4923
5024
  "ml.llm_stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult },
4924
5025
  "ml.downloads": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult },
4925
5026
  "ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult },
5027
+ "ml.local_list": { params: ModelsLocalListParams, result: ModelsLocalListResult },
5028
+ "ml.local_remove": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult },
4926
5029
  "ml.catalog_set": { params: MlCatalogSetParams, result: MlCatalogSetResult }
4927
5030
  }
4928
5031
  },
@@ -4969,6 +5072,16 @@ var NAMED_SCHEMAS = {
4969
5072
  AppsInstancesListResult,
4970
5073
  AppsAccountsListParams,
4971
5074
  AppsAccountsListResult,
5075
+ AccountReadSource,
5076
+ AccountProfile,
5077
+ McpTransport,
5078
+ McpServerRow,
5079
+ SetupFact,
5080
+ SetupItemKind,
5081
+ SetupItem,
5082
+ AppSetup,
5083
+ AppsSetupListParams,
5084
+ AppsSetupListResult,
4972
5085
  ProtocolVersion,
4973
5086
  RequestId,
4974
5087
  ResourceId,
@@ -5111,6 +5224,12 @@ var NAMED_SCHEMAS = {
5111
5224
  ModelsDownloadsListResult,
5112
5225
  ModelsDownloadsCancelParams,
5113
5226
  ModelsDownloadsCancelResult,
5227
+ LocalModelKind,
5228
+ LocalModelRow,
5229
+ ModelsLocalListParams,
5230
+ ModelsLocalListResult,
5231
+ ModelsLocalRemoveParams,
5232
+ ModelsLocalRemoveResult,
5114
5233
  CodingServiceCredentials,
5115
5234
  CodingHistoryBlocked,
5116
5235
  CodingHistoryFailure,
@@ -5799,7 +5918,8 @@ var FIELDS_SINCE = {
5799
5918
  AppsAccountsUsageResult: { problem: "1.12" },
5800
5919
  AppsAccountsResetsResult: { problem: "1.12" },
5801
5920
  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" },
5802
- AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
5921
+ AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25", read_source: "1.73" },
5922
+ AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73" },
5803
5923
  ResourcesDisk: { name: "1.17" },
5804
5924
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
5805
5925
  AudioDevice: { kind: "1.24" },
@@ -6283,6 +6403,12 @@ export {
6283
6403
  ModelsDownloadsListResult,
6284
6404
  ModelsDownloadsCancelParams,
6285
6405
  ModelsDownloadsCancelResult,
6406
+ LocalModelKind,
6407
+ LocalModelRow,
6408
+ ModelsLocalListParams,
6409
+ ModelsLocalListResult,
6410
+ ModelsLocalRemoveParams,
6411
+ ModelsLocalRemoveResult,
6286
6412
  MlServiceState,
6287
6413
  MlServiceStatus,
6288
6414
  ModelsStatusParams,
@@ -6465,6 +6591,8 @@ export {
6465
6591
  ElsewhereInstance,
6466
6592
  AccountResetSource,
6467
6593
  AccountGap,
6594
+ AccountReadSource,
6595
+ AccountProfile,
6468
6596
  AppAccount,
6469
6597
  AppsInstancesListParams,
6470
6598
  AppsInstancesListResult,
@@ -6476,6 +6604,14 @@ export {
6476
6604
  ProbeSource,
6477
6605
  AppsChatsProbeParams,
6478
6606
  AppsChatsProbeResult,
6607
+ McpTransport,
6608
+ McpServerRow,
6609
+ SetupFact,
6610
+ SetupItemKind,
6611
+ SetupItem,
6612
+ AppSetup,
6613
+ AppsSetupListParams,
6614
+ AppsSetupListResult,
6479
6615
  SERVICE_MAX_FRAME_BYTES,
6480
6616
  ServiceName,
6481
6617
  ContractHash,
@@ -6984,4 +7120,4 @@ export {
6984
7120
  closeRule,
6985
7121
  isTerminalClose
6986
7122
  };
6987
- //# sourceMappingURL=chunk-server-MK77KDKS.js.map
7123
+ //# sourceMappingURL=chunk-server-FBLTGJJA.js.map