@ai-matrx/desktop-protocol 0.21.73 → 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/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-ClCrYsEt.cjs';
5
- export { i as isDesktopProtocolError } from './models-ClCrYsEt.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-BRm_O6a-.cjs';
5
+ export { i as isDesktopProtocolError } from './models-BRm_O6a-.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-ClCrYsEt.js';
5
- export { i as isDesktopProtocolError } from './models-ClCrYsEt.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-BRm_O6a-.js';
5
+ export { i as isDesktopProtocolError } from './models-BRm_O6a-.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-MK77KDKS.js";
15
+ } from "./chunk-server-3L5JNEHY.js";
16
16
  import {
17
17
  DesktopProtocolError,
18
18
  FRAME_VERSION,
package/dist/index.cjs CHANGED
@@ -43,6 +43,8 @@ __export(src_exports, {
43
43
  AccountAgentsVersionsParams: () => AccountAgentsVersionsParams,
44
44
  AccountAgentsVersionsResult: () => AccountAgentsVersionsResult,
45
45
  AccountGap: () => AccountGap,
46
+ AccountProfile: () => AccountProfile,
47
+ AccountReadSource: () => AccountReadSource,
46
48
  AccountReadState: () => AccountReadState,
47
49
  AccountReset: () => AccountReset,
48
50
  AccountResetSource: () => AccountResetSource,
@@ -61,6 +63,7 @@ __export(src_exports, {
61
63
  AppProfile: () => AppProfile,
62
64
  AppProfileId: () => AppProfileId,
63
65
  AppProfileLocator: () => AppProfileLocator,
66
+ AppSetup: () => AppSetup,
64
67
  AppSupport: () => AppSupport,
65
68
  AppUsageReading: () => AppUsageReading,
66
69
  AppWindowInfo: () => AppWindowInfo,
@@ -127,6 +130,8 @@ __export(src_exports, {
127
130
  AppsProjectsUnfileResult: () => AppsProjectsUnfileResult,
128
131
  AppsProjectsUpdateParams: () => AppsProjectsUpdateParams,
129
132
  AppsProjectsUpdateResult: () => AppsProjectsUpdateResult,
133
+ AppsSetupListParams: () => AppsSetupListParams,
134
+ AppsSetupListResult: () => AppsSetupListResult,
130
135
  AppsSpendParams: () => AppsSpendParams,
131
136
  AppsSpendResult: () => AppsSpendResult,
132
137
  AppsSyncRunParams: () => AppsSyncRunParams,
@@ -531,6 +536,8 @@ __export(src_exports, {
531
536
  MailMessage: () => MailMessage,
532
537
  MailSendParams: () => MailSendParams,
533
538
  MailSendResult: () => MailSendResult,
539
+ McpServerRow: () => McpServerRow,
540
+ McpTransport: () => McpTransport,
534
541
  MessagesChat: () => MessagesChat,
535
542
  MessagesChatsParams: () => MessagesChatsParams,
536
543
  MessagesChatsResult: () => MessagesChatsResult,
@@ -741,6 +748,9 @@ __export(src_exports, {
741
748
  SessionListResult: () => SessionListResult,
742
749
  SessionReleaseParams: () => SessionReleaseParams,
743
750
  SessionReleaseResult: () => SessionReleaseResult,
751
+ SetupFact: () => SetupFact,
752
+ SetupItem: () => SetupItem,
753
+ SetupItemKind: () => SetupItemKind,
744
754
  Sha256Hex: () => Sha256Hex,
745
755
  ShownSection: () => ShownSection,
746
756
  Signal: () => Signal,
@@ -925,7 +935,7 @@ module.exports = __toCommonJS(src_exports);
925
935
  var import_zod = require("zod");
926
936
  var import_uuid = require("@ai-matrx/kit/uuid");
927
937
  var PROTOCOL_MAJOR = 1;
928
- var PROTOCOL_MINOR = 72;
938
+ var PROTOCOL_MINOR = 73;
929
939
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
930
940
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
931
941
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2522,7 +2532,9 @@ var AccountUsage = import_zod14.z.strictObject({
2522
2532
  * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
2523
2533
  * window is running (no use in the last reading, or the reading is over 5 hours old).
2524
2534
  */
2525
- five_hour_resets_by_ms: epochMs.optional()
2535
+ five_hour_resets_by_ms: epochMs.optional(),
2536
+ /** 1.73: where the reading came from (absent = the app itself). */
2537
+ read_source: import_zod14.z.enum(["app", "claude_code"]).optional()
2526
2538
  });
2527
2539
  var AccountReset = import_zod14.z.strictObject({
2528
2540
  window: ChatPlace,
@@ -2980,6 +2992,25 @@ var ElsewhereInstance = import_zod15.z.strictObject({
2980
2992
  });
2981
2993
  var AccountResetSource = import_zod15.z.enum(["app", "usage_history", "your_list"]);
2982
2994
  var AccountGap = import_zod15.z.enum(["email", "plan", "usage"]);
2995
+ var AccountReadSource = import_zod15.z.enum(["app", "claude_code"]);
2996
+ var AccountProfile = import_zod15.z.strictObject({
2997
+ /** The person's name on the account. */
2998
+ name: import_zod15.z.string().max(200).nullable(),
2999
+ /** The organization the sign-in is in, and the person's role there. */
3000
+ org_name: import_zod15.z.string().max(200).nullable(),
3001
+ org_role: import_zod15.z.string().max(80).nullable(),
3002
+ /** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
3003
+ seat_tier: import_zod15.z.string().max(80).nullable(),
3004
+ rate_limit_tier: import_zod15.z.string().max(120).nullable(),
3005
+ billing: import_zod15.z.string().max(80).nullable(),
3006
+ trial_ends_ms: epochMs.nullable(),
3007
+ /** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
3008
+ subscription: import_zod15.z.string().max(80).nullable(),
3009
+ /** Where these facts were read (a short label: "Claude Code's sign-in"). */
3010
+ source: import_zod15.z.string().max(200),
3011
+ /** When the app last fetched them, when it says. */
3012
+ as_of_ms: epochMs.nullable()
3013
+ });
2983
3014
  var AppAccount = import_zod15.z.strictObject({
2984
3015
  app_key: AppKey,
2985
3016
  /** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
@@ -3009,7 +3040,13 @@ var AppAccount = import_zod15.z.strictObject({
3009
3040
  instances: import_zod15.z.array(ChatPlace).max(200),
3010
3041
  first_seen_ms: epochMs.nullable(),
3011
3042
  last_seen_ms: epochMs.nullable(),
3012
- missing: import_zod15.z.array(AccountGap).max(3)
3043
+ missing: import_zod15.z.array(AccountGap).max(3),
3044
+ /** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
3045
+ profile: AccountProfile.optional(),
3046
+ /** 1.73: where the newest reading came from (absent = the app itself). */
3047
+ read_source: AccountReadSource.optional(),
3048
+ /** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
3049
+ session_cost_usd: import_zod15.z.number().nonnegative().optional()
3013
3050
  });
3014
3051
  var AppsInstancesListParams = import_zod15.z.strictObject({ app_key: AppKey, fresh: import_zod15.z.boolean().optional() });
3015
3052
  var AppsInstancesListResult = import_zod15.z.strictObject({
@@ -3043,6 +3080,47 @@ var ProbeFact = import_zod15.z.strictObject({ key: import_zod15.z.string().max(2
3043
3080
  var ProbeSource = import_zod15.z.strictObject({ source: import_zod15.z.string().max(120), instance: import_zod15.z.string().max(64).nullable(), facts: import_zod15.z.array(ProbeFact).max(500) });
3044
3081
  var AppsChatsProbeParams = import_zod15.z.strictObject({ app_key: AppKey, chat_id: import_zod15.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
3045
3082
  var AppsChatsProbeResult = import_zod15.z.strictObject({ app_key: AppKey, chat_id: import_zod15.z.string().max(128), sources: import_zod15.z.array(ProbeSource).max(200) });
3083
+ var McpTransport = import_zod15.z.enum(["stdio", "http", "sse", "unknown"]);
3084
+ var McpServerRow = import_zod15.z.strictObject({
3085
+ app_key: AppKey,
3086
+ /** The app's instance whose settings hold it ("main", a home's name). */
3087
+ instance: import_zod15.z.string().max(120),
3088
+ name: import_zod15.z.string().max(200),
3089
+ transport: McpTransport,
3090
+ /** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
3091
+ target: import_zod15.z.string().max(400).nullable(),
3092
+ /** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
3093
+ scope: import_zod15.z.string().max(400),
3094
+ /** Turned on or off in the app, when it records it. */
3095
+ enabled: import_zod15.z.boolean().nullable(),
3096
+ /** The settings file it was read from. */
3097
+ where: import_zod15.z.string().max(400)
3098
+ });
3099
+ var SetupFact = import_zod15.z.strictObject({ name: import_zod15.z.string().max(80), value: import_zod15.z.string().max(300) });
3100
+ var SetupItemKind = import_zod15.z.enum(["extension", "plugin", "marketplace", "model"]);
3101
+ var SetupItem = import_zod15.z.strictObject({
3102
+ kind: SetupItemKind,
3103
+ name: import_zod15.z.string().max(200),
3104
+ version: import_zod15.z.string().max(80).nullable(),
3105
+ /** Turned on or off, when the app records it. */
3106
+ enabled: import_zod15.z.boolean().nullable()
3107
+ });
3108
+ var AppSetup = import_zod15.z.strictObject({
3109
+ app_key: AppKey,
3110
+ instance: import_zod15.z.string().max(120),
3111
+ /** The folder its settings were read from. */
3112
+ where: import_zod15.z.string().max(400),
3113
+ facts: import_zod15.z.array(SetupFact).max(60),
3114
+ items: import_zod15.z.array(SetupItem).max(2e3),
3115
+ /** What could not be read there (shown, never hidden). */
3116
+ problems: import_zod15.z.array(import_zod15.z.string().max(300)).max(20)
3117
+ });
3118
+ var AppsSetupListParams = import_zod15.z.strictObject({ app_key: AppKey.optional() });
3119
+ var AppsSetupListResult = import_zod15.z.strictObject({
3120
+ setups: import_zod15.z.array(AppSetup).max(200),
3121
+ mcp: import_zod15.z.array(McpServerRow).max(2e3),
3122
+ problem: import_zod15.z.string().max(400).optional()
3123
+ });
3046
3124
 
3047
3125
  // src/schema/service.ts
3048
3126
  var import_zod16 = require("zod");
@@ -5719,6 +5797,7 @@ var OPS = {
5719
5797
  // 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
5720
5798
  "apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5721
5799
  "apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5800
+ "apps.setup.list": { params: AppsSetupListParams, result: AppsSetupListResult, kind: "unary", since: "1.73", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5722
5801
  // 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
5723
5802
  "apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5724
5803
  "apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -6015,6 +6094,16 @@ var NAMED_SCHEMAS = {
6015
6094
  AppsInstancesListResult,
6016
6095
  AppsAccountsListParams,
6017
6096
  AppsAccountsListResult,
6097
+ AccountReadSource,
6098
+ AccountProfile,
6099
+ McpTransport,
6100
+ McpServerRow,
6101
+ SetupFact,
6102
+ SetupItemKind,
6103
+ SetupItem,
6104
+ AppSetup,
6105
+ AppsSetupListParams,
6106
+ AppsSetupListResult,
6018
6107
  ProtocolVersion,
6019
6108
  RequestId,
6020
6109
  ResourceId,
@@ -6845,7 +6934,8 @@ var FIELDS_SINCE = {
6845
6934
  AppsAccountsUsageResult: { problem: "1.12" },
6846
6935
  AppsAccountsResetsResult: { problem: "1.12" },
6847
6936
  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" },
6848
- AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
6937
+ AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25", read_source: "1.73" },
6938
+ AppAccount: { profile: "1.73", read_source: "1.73", session_cost_usd: "1.73" },
6849
6939
  ResourcesDisk: { name: "1.17" },
6850
6940
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
6851
6941
  AudioDevice: { kind: "1.24" },
@@ -7136,7 +7226,7 @@ function forPeer(op, part, value, version) {
7136
7226
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
7137
7227
 
7138
7228
  // src/contract.ts
7139
- var CONTRACT_SHA256 = "1d36d53c7f7370a8baa0577961ea9f59d46fa08e5786180c17f378bf7c4fb5f6";
7229
+ var CONTRACT_SHA256 = "04ac1530a836288982a2d3bf35d5b7c6b0413cdf51fa1fb5bfd4de7cbe32adf8";
7140
7230
 
7141
7231
  // src/close-policy.ts
7142
7232
  var CLOSE_RULES = {