@ai-matrx/desktop-protocol 0.21.80 → 0.21.82

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-C2VdtixP.cjs';
5
- export { i as isDesktopProtocolError } from './models-C2VdtixP.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-D5O1othS.cjs';
5
+ export { i as isDesktopProtocolError } from './models-D5O1othS.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-C2VdtixP.js';
5
- export { i as isDesktopProtocolError } from './models-C2VdtixP.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-D5O1othS.js';
5
+ export { i as isDesktopProtocolError } from './models-D5O1othS.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-XQQUJENM.js";
15
+ } from "./chunk-server-3QKXTKK4.js";
16
16
  import {
17
17
  DesktopProtocolError,
18
18
  FRAME_VERSION,
package/dist/index.cjs CHANGED
@@ -46,6 +46,7 @@ __export(src_exports, {
46
46
  AccountProfile: () => AccountProfile,
47
47
  AccountReadSource: () => AccountReadSource,
48
48
  AccountReadState: () => AccountReadState,
49
+ AccountReadingsKept: () => AccountReadingsKept,
49
50
  AccountReset: () => AccountReset,
50
51
  AccountResetSource: () => AccountResetSource,
51
52
  AccountRowId: () => AccountRowId,
@@ -943,7 +944,7 @@ module.exports = __toCommonJS(src_exports);
943
944
  var import_zod = require("zod");
944
945
  var import_uuid = require("@ai-matrx/kit/uuid");
945
946
  var PROTOCOL_MAJOR = 1;
946
- var PROTOCOL_MINOR = 77;
947
+ var PROTOCOL_MINOR = 79;
947
948
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
948
949
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
949
950
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2782,7 +2783,9 @@ var ColdChat = import_zod14.z.strictObject({
2782
2783
  /** It can be shown in its window (started in the desktop app). */
2783
2784
  openable: import_zod14.z.boolean(),
2784
2785
  /** How its window was decided, or why it can't be opened. */
2785
- how: import_zod14.z.string().max(200).nullable()
2786
+ how: import_zod14.z.string().max(200).nullable(),
2787
+ /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
2788
+ hidden: import_zod14.z.boolean().optional()
2786
2789
  });
2787
2790
  var AppsChatsColdParams = import_zod14.z.strictObject({ app_key: AppKey });
2788
2791
  var AppsChatsColdResult = import_zod14.z.strictObject({
@@ -2865,12 +2868,30 @@ var SpendChat = import_zod14.z.strictObject({
2865
2868
  repo: import_zod14.z.string().max(200).nullable(),
2866
2869
  window: import_zod14.z.string().max(64).nullable(),
2867
2870
  spend: SpendScopes,
2868
- helpers: nonNegInt
2871
+ helpers: nonNegInt,
2872
+ /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
2873
+ hidden: import_zod14.z.boolean().optional()
2869
2874
  });
2870
2875
  var SpendHelper = import_zod14.z.strictObject({ model: import_zod14.z.string().max(120), steps: nonNegInt, over_steps: import_zod14.z.boolean(), description: import_zod14.z.string().max(400) });
2871
- var SpendLive = import_zod14.z.strictObject({ id: ChatId, title: import_zod14.z.string().max(1e3), window: import_zod14.z.string().max(64).nullable(), helpers: import_zod14.z.array(SpendHelper).max(200) });
2876
+ var SpendLive = import_zod14.z.strictObject({
2877
+ id: ChatId,
2878
+ title: import_zod14.z.string().max(1e3),
2879
+ window: import_zod14.z.string().max(64).nullable(),
2880
+ helpers: import_zod14.z.array(SpendHelper).max(200),
2881
+ /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
2882
+ hidden: import_zod14.z.boolean().optional()
2883
+ });
2872
2884
  var SpendIdleScope = import_zod14.z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: import_zod14.z.number(), avoidable: import_zod14.z.number() });
2873
- var SpendIdle = import_zod14.z.strictObject({ id: ChatId, chat: import_zod14.z.string().max(1e3), who: import_zod14.z.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });
2885
+ var SpendIdle = import_zod14.z.strictObject({
2886
+ id: ChatId,
2887
+ chat: import_zod14.z.string().max(1e3),
2888
+ who: import_zod14.z.string().max(400),
2889
+ today: SpendIdleScope,
2890
+ week: SpendIdleScope,
2891
+ last_ms: epochMs,
2892
+ /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
2893
+ hidden: import_zod14.z.boolean().optional()
2894
+ });
2874
2895
  var SpendStart = import_zod14.z.strictObject({ repo: import_zod14.z.string().max(200), count: nonNegInt, median: nonNegInt, latest: import_zod14.z.array(nonNegInt).max(20), alarm: import_zod14.z.string().max(400).nullable() });
2875
2896
  var SpendDay = import_zod14.z.strictObject({ date: import_zod14.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), main: import_zod14.z.number(), helpers: import_zod14.z.number() });
2876
2897
  var AppsSpendParams = import_zod14.z.strictObject({ app_key: AppKey });
@@ -3065,6 +3086,11 @@ var AccountProfile = import_zod15.z.strictObject({
3065
3086
  /** When the app last fetched them, when it says. */
3066
3087
  as_of_ms: epochMs.nullable()
3067
3088
  });
3089
+ var AccountReadingsKept = import_zod15.z.strictObject({
3090
+ kept: import_zod15.z.number().int().nonnegative(),
3091
+ since_ms: epochMs.nullable(),
3092
+ days: import_zod15.z.array(import_zod15.z.strictObject({ day_ms: epochMs, weekly: import_zod15.z.number().nullable() })).max(31)
3093
+ });
3068
3094
  var AppAccount = import_zod15.z.strictObject({
3069
3095
  app_key: AppKey,
3070
3096
  /** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
@@ -3100,7 +3126,9 @@ var AppAccount = import_zod15.z.strictObject({
3100
3126
  /** 1.73: where the newest reading came from (absent = the app itself). */
3101
3127
  read_source: AccountReadSource.optional(),
3102
3128
  /** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
3103
- session_cost_usd: import_zod15.z.number().nonnegative().optional()
3129
+ session_cost_usd: import_zod15.z.number().nonnegative().optional(),
3130
+ /** 1.79: the readings Matrx kept of this account on this computer (its reading history). */
3131
+ readings: AccountReadingsKept.optional()
3104
3132
  });
3105
3133
  var AppsInstancesListParams = import_zod15.z.strictObject({ app_key: AppKey, fresh: import_zod15.z.boolean().optional() });
3106
3134
  var AppsInstancesListResult = import_zod15.z.strictObject({
@@ -6161,6 +6189,7 @@ var NAMED_SCHEMAS = {
6161
6189
  AppsAccountsListResult,
6162
6190
  AccountReadSource,
6163
6191
  AccountProfile,
6192
+ AccountReadingsKept,
6164
6193
  McpTransport,
6165
6194
  McpServerRow,
6166
6195
  SetupFact,
@@ -7006,9 +7035,13 @@ var FIELDS_SINCE = {
7006
7035
  AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
7007
7036
  AppsAccountsUsageResult: { problem: "1.12" },
7008
7037
  AppsAccountsResetsResult: { problem: "1.12" },
7038
+ ColdChat: { hidden: "1.78" },
7039
+ SpendChat: { hidden: "1.78" },
7040
+ SpendLive: { hidden: "1.78" },
7041
+ SpendIdle: { hidden: "1.78" },
7009
7042
  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" },
7010
7043
  AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25", read_source: "1.73" },
7011
- AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73" },
7044
+ AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73", readings: "1.79" },
7012
7045
  ResourcesDisk: { name: "1.17" },
7013
7046
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
7014
7047
  AudioDevice: { kind: "1.24" },
@@ -7152,8 +7185,13 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
7152
7185
  ["apps.projects.unfile", [["chat", "ChatRow"]]],
7153
7186
  ["apps.projects.move", [["chat", "ChatRow"]]],
7154
7187
  ["apps.chats.star", [["chat", "ChatRow"]]],
7188
+ // 1.78: our Hide on the cold and spend rows.
7189
+ ["apps.chats.cold", [["waiting", "ColdChat"], ["recently_cold", "ColdChat"]]],
7190
+ ["apps.spend", [["chats", "SpendChat"], ["live", "SpendLive"], ["idle", "SpendIdle"]]],
7155
7191
  ["apps.chats.place", [["chat", "ChatRow"]]],
7156
7192
  ["apps.accounts.usage", [["accounts", "AccountUsage"]]],
7193
+ // 1.73/1.79: the account rows' newer fields (profile, read_source, session_cost_usd, readings).
7194
+ ["apps.accounts.list", [["accounts", "AppAccount"]]],
7157
7195
  ["resources.snapshot", [["disks", "ResourcesDisk"]]],
7158
7196
  ["stack.state", [["servers", "StackServer"]]],
7159
7197
  ["account.agents.list", [["agents", "AccountAgent"]]],
@@ -7301,7 +7339,7 @@ function forPeer(op, part, value, version) {
7301
7339
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
7302
7340
 
7303
7341
  // src/contract.ts
7304
- var CONTRACT_SHA256 = "e6936784e216200e73b062cab45f24fa88014108baecd0f8b7a0b19ea5797fc5";
7342
+ var CONTRACT_SHA256 = "5e0c564e79ee14278fa1d52120c735fd331517e2b2d48d03d30eb7cc13f2c4fb";
7305
7343
 
7306
7344
  // src/close-policy.ts
7307
7345
  var CLOSE_RULES = {