@ai-matrx/desktop-protocol 0.21.51 → 0.21.52

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-pdHTZ3YT.cjs';
5
- export { i as isDesktopProtocolError } from './models-pdHTZ3YT.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--9189VUC.cjs';
5
+ export { i as isDesktopProtocolError } from './models--9189VUC.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-pdHTZ3YT.js';
5
- export { i as isDesktopProtocolError } from './models-pdHTZ3YT.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--9189VUC.js';
5
+ export { i as isDesktopProtocolError } from './models--9189VUC.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
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
112
112
  import { z } from "zod";
113
113
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
114
114
  var PROTOCOL_MAJOR = 1;
115
- var PROTOCOL_MINOR = 56;
115
+ var PROTOCOL_MINOR = 57;
116
116
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
117
117
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
118
118
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2449,7 +2449,12 @@ var CodingSessionRecord = z28.strictObject({
2449
2449
  lastRunStatus: CodingRunStatus.nullable(),
2450
2450
  queued: z28.array(z28.string().max(1048576)).max(100),
2451
2451
  agent: CodingSessionAgent.nullable(),
2452
- agentRemovedDue: z28.boolean()
2452
+ agentRemovedDue: z28.boolean(),
2453
+ /**
2454
+ * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
2455
+ * runs as, or whose config directory holds the chat. Absent: the default sign-in.
2456
+ */
2457
+ accountId: z28.string().min(1).max(64).optional()
2453
2458
  });
2454
2459
  var CodingActiveElsewhere = z28.strictObject({
2455
2460
  reason: z28.enum(["process", "recent-write", "open-tool-call", "open"]),
@@ -2471,7 +2476,12 @@ var CodingDiscoveredChat = z28.strictObject({
2471
2476
  unavailable: ShortText.nullable(),
2472
2477
  updatedAt: IsoTime,
2473
2478
  source: z28.string().max(60).nullable(),
2474
- activeElsewhere: CodingActiveElsewhere.nullable()
2479
+ activeElsewhere: CodingActiveElsewhere.nullable(),
2480
+ /**
2481
+ * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
2482
+ * runs as, or whose config directory holds the chat. Absent: the default sign-in.
2483
+ */
2484
+ accountId: z28.string().min(1).max(64).optional()
2475
2485
  });
2476
2486
  var CodingTranscriptItem = z28.discriminatedUnion("kind", [
2477
2487
  z28.strictObject({ kind: z28.literal("user"), id: z28.string().max(200), text: z28.string(), at: IsoTime.nullable() }),
@@ -2511,6 +2521,31 @@ var CodingProviderProblem = z28.strictObject({
2511
2521
  until: z28.string().max(120).nullable(),
2512
2522
  at: IsoTime
2513
2523
  });
2524
+ var CodingAccountUsage = z28.strictObject({
2525
+ windows: z28.array(CodingQuotaWindow).max(20),
2526
+ /** The provider's own status word ("allowed", "allowed_warning", "rejected"...), when it gives one. */
2527
+ status: z28.string().max(60).nullable(),
2528
+ /** When a rejected status lifts (ISO), when the provider says. */
2529
+ resetsAt: z28.string().max(80).nullable(),
2530
+ at: IsoTime
2531
+ });
2532
+ var CodingContinueTarget = z28.strictObject({
2533
+ accountId: z28.string().min(1).max(64).nullable(),
2534
+ label: z28.string().max(200)
2535
+ });
2536
+ var CodingProviderAccount = z28.strictObject({
2537
+ id: z28.string().min(1).max(64),
2538
+ label: z28.string().max(200),
2539
+ /** (1.57) No known usage limit or expired sign-in on this account. Absent: not read. */
2540
+ ready: z28.boolean().optional(),
2541
+ lastProblem: CodingProviderProblem.optional(),
2542
+ problem: ShortText.optional(),
2543
+ fix: ShortText.optional(),
2544
+ /** (1.57) Absent: never seen ("No usage data yet"). */
2545
+ usage: CodingAccountUsage.optional(),
2546
+ /** (1.57) This account is limited and that other one is not: "Continue on <label>". */
2547
+ continueOn: CodingContinueTarget.optional()
2548
+ });
2514
2549
  var CodingProviderBinary = z28.strictObject({
2515
2550
  path: LocalPath,
2516
2551
  version: z28.string().max(80).nullable(),
@@ -2547,9 +2582,13 @@ var CodingProviderStatus = z28.strictObject({
2547
2582
  * can use, as the computer's engine lists them; New session offers them beside the default sign-in.
2548
2583
  * Absent: only the default sign-in (or a computer older than 1.53).
2549
2584
  */
2550
- accounts: z28.array(z28.strictObject({ id: z28.string().min(1).max(64), label: z28.string().max(200) })).max(100).optional(),
2585
+ accounts: z28.array(CodingProviderAccount).max(100).optional(),
2551
2586
  /** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */
2552
- accountsProblem: ShortText.optional()
2587
+ accountsProblem: ShortText.optional(),
2588
+ /** (1.57) The default sign-in's usage as last seen. Absent: never seen ("No usage data yet"). */
2589
+ usage: CodingAccountUsage.optional(),
2590
+ /** (1.57) The default sign-in is limited and this other account is not: "Continue on <label>". */
2591
+ continueOn: CodingContinueTarget.optional()
2553
2592
  });
2554
2593
  var CodingChatPreference = z28.strictObject({
2555
2594
  title: z28.string().max(500).nullable(),
@@ -2576,7 +2615,12 @@ var CodingRecentRow = z28.strictObject({
2576
2615
  state: z28.enum(["running", "needs_attention", "new_output", "elsewhere", "idle"]),
2577
2616
  stateLabel: z28.string().max(120).nullable(),
2578
2617
  pinned: z28.boolean(),
2579
- startedBy: CodingStartedBy.nullable()
2618
+ startedBy: CodingStartedBy.nullable(),
2619
+ /**
2620
+ * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
2621
+ * runs as, or whose config directory holds the chat. Absent: the default sign-in.
2622
+ */
2623
+ accountId: z28.string().min(1).max(64).optional()
2580
2624
  });
2581
2625
  var CodingFolderCheck = z28.strictObject({
2582
2626
  path: z28.string().max(4096),
@@ -2709,19 +2753,23 @@ var CodingSearchParams = z28.strictObject({
2709
2753
  cursor: nonNegInt.optional(),
2710
2754
  limit: z28.int().min(1).max(100).optional()
2711
2755
  });
2756
+ var CodingSearchHit = z28.strictObject({
2757
+ provider: CodingProviderName,
2758
+ providerSessionId: SessionKey,
2759
+ title: z28.string().max(500),
2760
+ cwd: LocalPath.nullable(),
2761
+ updatedAt: IsoTime,
2762
+ where: z28.enum(["title", "content"]),
2763
+ snippet: z28.string().max(2e3).nullable(),
2764
+ /**
2765
+ * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
2766
+ * runs as, or whose config directory holds the chat. Absent: the default sign-in.
2767
+ */
2768
+ accountId: z28.string().min(1).max(64).optional()
2769
+ });
2712
2770
  var CodingSearchResult = z28.strictObject({
2713
2771
  query: z28.string().max(500),
2714
- hits: z28.array(
2715
- z28.strictObject({
2716
- provider: CodingProviderName,
2717
- providerSessionId: SessionKey,
2718
- title: z28.string().max(500),
2719
- cwd: LocalPath.nullable(),
2720
- updatedAt: IsoTime,
2721
- where: z28.enum(["title", "content"]),
2722
- snippet: z28.string().max(2e3).nullable()
2723
- })
2724
- ),
2772
+ hits: z28.array(CodingSearchHit),
2725
2773
  scanned: nonNegInt,
2726
2774
  total: nonNegInt,
2727
2775
  nextCursor: nonNegInt.nullable()
@@ -4684,7 +4732,18 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
4684
4732
  ["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
4685
4733
  ["apps.windows.list", [["windows", "AppWindowInfo"]]],
4686
4734
  ["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
4687
- ["coding.providers", [["providers", "CodingProviderStatus"]]]
4735
+ ["coding.providers", [["providers", "CodingProviderStatus"]]],
4736
+ // 1.57: the account a coding record belongs to.
4737
+ ["coding.sessions.list", [["sessions", "CodingSessionRecord"], ["recent", "CodingRecentRow"]]],
4738
+ ["coding.recent.seen", [["recent", "CodingRecentRow"]]],
4739
+ ["coding.discover", [["chats", "CodingDiscoveredChat"]]],
4740
+ ["coding.search", [["hits", "CodingSearchHit"]]],
4741
+ ["coding.start", [["session", "CodingSessionRecord"]]],
4742
+ ["coding.send", [["session", "CodingSessionRecord"]]],
4743
+ ["coding.takeover", [["session", "CodingSessionRecord"]]],
4744
+ ["coding.options.set", [["session", "CodingSessionRecord"]]],
4745
+ ["coding.agent.set", [["session", "CodingSessionRecord"]]],
4746
+ ["coding.account.continue", [["session", "CodingSessionRecord"]]]
4688
4747
  ]);
4689
4748
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
4690
4749
  ["window.list", "windows"],