@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/CHANGELOG.md +16 -0
- package/dist/client.cjs +77 -18
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +77 -18
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +107 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +206 -6
- package/dist/index.d.ts +206 -6
- package/dist/index.js +107 -26
- package/dist/index.js.map +1 -1
- package/dist/{models-pdHTZ3YT.d.cts → models--9189VUC.d.cts} +217 -0
- package/dist/{models-pdHTZ3YT.d.ts → models--9189VUC.d.ts} +217 -0
- package/dist/react.d.cts +55 -0
- package/dist/react.d.ts +55 -0
- package/generated/desktop-protocol.schema.json +224 -78
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.52
|
|
4
|
+
### Unreleased
|
|
5
|
+
### Protocol 1.57 — the account a coding record belongs to, and each sign-in's usage
|
|
6
|
+
|
|
7
|
+
- `accountId` (optional) on `CodingSessionRecord`, `CodingDiscoveredChat`, `CodingRecentRow` and
|
|
8
|
+
the new named `CodingSearchHit`: the account a session runs as, or whose config directory holds
|
|
9
|
+
the chat; absent = the default sign-in. Before this, the engine's `accountId` on Recent rows and
|
|
10
|
+
search hits made `coding.sessions.list` and `coding.search` fail "did not match its schema".
|
|
11
|
+
- `coding.providers`: `usage` (`CodingAccountUsage`) and `continueOn` (`CodingContinueTarget`) on a
|
|
12
|
+
provider and on each of its `accounts` (now the named `CodingProviderAccount`, with its own
|
|
13
|
+
`ready`, `lastProblem`, `problem`, `fix`).
|
|
14
|
+
- All optional, in FIELDS_SINCE, stripped by `forPeer` for a 1.56 peer (accounts' fields one level
|
|
15
|
+
below the providers). Consumer action: none for an older client; a 1.57 client can show the
|
|
16
|
+
account and "Continue on <account>" remotely.
|
|
17
|
+
- coding-sessions now parses every engine answer with these strict schemas (its wire-contract test).
|
|
18
|
+
|
|
3
19
|
## 0.21.51
|
|
4
20
|
### Unreleased
|
|
5
21
|
### Protocol 1.56 — Continue on another account, from anywhere
|
package/dist/client.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var import_zod2 = require("zod");
|
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
146
146
|
var PROTOCOL_MAJOR = 1;
|
|
147
|
-
var PROTOCOL_MINOR =
|
|
147
|
+
var PROTOCOL_MINOR = 57;
|
|
148
148
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
149
149
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
150
150
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -2481,7 +2481,12 @@ var CodingSessionRecord = import_zod28.z.strictObject({
|
|
|
2481
2481
|
lastRunStatus: CodingRunStatus.nullable(),
|
|
2482
2482
|
queued: import_zod28.z.array(import_zod28.z.string().max(1048576)).max(100),
|
|
2483
2483
|
agent: CodingSessionAgent.nullable(),
|
|
2484
|
-
agentRemovedDue: import_zod28.z.boolean()
|
|
2484
|
+
agentRemovedDue: import_zod28.z.boolean(),
|
|
2485
|
+
/**
|
|
2486
|
+
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
2487
|
+
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
2488
|
+
*/
|
|
2489
|
+
accountId: import_zod28.z.string().min(1).max(64).optional()
|
|
2485
2490
|
});
|
|
2486
2491
|
var CodingActiveElsewhere = import_zod28.z.strictObject({
|
|
2487
2492
|
reason: import_zod28.z.enum(["process", "recent-write", "open-tool-call", "open"]),
|
|
@@ -2503,7 +2508,12 @@ var CodingDiscoveredChat = import_zod28.z.strictObject({
|
|
|
2503
2508
|
unavailable: ShortText.nullable(),
|
|
2504
2509
|
updatedAt: IsoTime,
|
|
2505
2510
|
source: import_zod28.z.string().max(60).nullable(),
|
|
2506
|
-
activeElsewhere: CodingActiveElsewhere.nullable()
|
|
2511
|
+
activeElsewhere: CodingActiveElsewhere.nullable(),
|
|
2512
|
+
/**
|
|
2513
|
+
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
2514
|
+
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
2515
|
+
*/
|
|
2516
|
+
accountId: import_zod28.z.string().min(1).max(64).optional()
|
|
2507
2517
|
});
|
|
2508
2518
|
var CodingTranscriptItem = import_zod28.z.discriminatedUnion("kind", [
|
|
2509
2519
|
import_zod28.z.strictObject({ kind: import_zod28.z.literal("user"), id: import_zod28.z.string().max(200), text: import_zod28.z.string(), at: IsoTime.nullable() }),
|
|
@@ -2543,6 +2553,31 @@ var CodingProviderProblem = import_zod28.z.strictObject({
|
|
|
2543
2553
|
until: import_zod28.z.string().max(120).nullable(),
|
|
2544
2554
|
at: IsoTime
|
|
2545
2555
|
});
|
|
2556
|
+
var CodingAccountUsage = import_zod28.z.strictObject({
|
|
2557
|
+
windows: import_zod28.z.array(CodingQuotaWindow).max(20),
|
|
2558
|
+
/** The provider's own status word ("allowed", "allowed_warning", "rejected"...), when it gives one. */
|
|
2559
|
+
status: import_zod28.z.string().max(60).nullable(),
|
|
2560
|
+
/** When a rejected status lifts (ISO), when the provider says. */
|
|
2561
|
+
resetsAt: import_zod28.z.string().max(80).nullable(),
|
|
2562
|
+
at: IsoTime
|
|
2563
|
+
});
|
|
2564
|
+
var CodingContinueTarget = import_zod28.z.strictObject({
|
|
2565
|
+
accountId: import_zod28.z.string().min(1).max(64).nullable(),
|
|
2566
|
+
label: import_zod28.z.string().max(200)
|
|
2567
|
+
});
|
|
2568
|
+
var CodingProviderAccount = import_zod28.z.strictObject({
|
|
2569
|
+
id: import_zod28.z.string().min(1).max(64),
|
|
2570
|
+
label: import_zod28.z.string().max(200),
|
|
2571
|
+
/** (1.57) No known usage limit or expired sign-in on this account. Absent: not read. */
|
|
2572
|
+
ready: import_zod28.z.boolean().optional(),
|
|
2573
|
+
lastProblem: CodingProviderProblem.optional(),
|
|
2574
|
+
problem: ShortText.optional(),
|
|
2575
|
+
fix: ShortText.optional(),
|
|
2576
|
+
/** (1.57) Absent: never seen ("No usage data yet"). */
|
|
2577
|
+
usage: CodingAccountUsage.optional(),
|
|
2578
|
+
/** (1.57) This account is limited and that other one is not: "Continue on <label>". */
|
|
2579
|
+
continueOn: CodingContinueTarget.optional()
|
|
2580
|
+
});
|
|
2546
2581
|
var CodingProviderBinary = import_zod28.z.strictObject({
|
|
2547
2582
|
path: LocalPath,
|
|
2548
2583
|
version: import_zod28.z.string().max(80).nullable(),
|
|
@@ -2579,9 +2614,13 @@ var CodingProviderStatus = import_zod28.z.strictObject({
|
|
|
2579
2614
|
* can use, as the computer's engine lists them; New session offers them beside the default sign-in.
|
|
2580
2615
|
* Absent: only the default sign-in (or a computer older than 1.53).
|
|
2581
2616
|
*/
|
|
2582
|
-
accounts: import_zod28.z.array(
|
|
2617
|
+
accounts: import_zod28.z.array(CodingProviderAccount).max(100).optional(),
|
|
2583
2618
|
/** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */
|
|
2584
|
-
accountsProblem: ShortText.optional()
|
|
2619
|
+
accountsProblem: ShortText.optional(),
|
|
2620
|
+
/** (1.57) The default sign-in's usage as last seen. Absent: never seen ("No usage data yet"). */
|
|
2621
|
+
usage: CodingAccountUsage.optional(),
|
|
2622
|
+
/** (1.57) The default sign-in is limited and this other account is not: "Continue on <label>". */
|
|
2623
|
+
continueOn: CodingContinueTarget.optional()
|
|
2585
2624
|
});
|
|
2586
2625
|
var CodingChatPreference = import_zod28.z.strictObject({
|
|
2587
2626
|
title: import_zod28.z.string().max(500).nullable(),
|
|
@@ -2608,7 +2647,12 @@ var CodingRecentRow = import_zod28.z.strictObject({
|
|
|
2608
2647
|
state: import_zod28.z.enum(["running", "needs_attention", "new_output", "elsewhere", "idle"]),
|
|
2609
2648
|
stateLabel: import_zod28.z.string().max(120).nullable(),
|
|
2610
2649
|
pinned: import_zod28.z.boolean(),
|
|
2611
|
-
startedBy: CodingStartedBy.nullable()
|
|
2650
|
+
startedBy: CodingStartedBy.nullable(),
|
|
2651
|
+
/**
|
|
2652
|
+
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
2653
|
+
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
2654
|
+
*/
|
|
2655
|
+
accountId: import_zod28.z.string().min(1).max(64).optional()
|
|
2612
2656
|
});
|
|
2613
2657
|
var CodingFolderCheck = import_zod28.z.strictObject({
|
|
2614
2658
|
path: import_zod28.z.string().max(4096),
|
|
@@ -2741,19 +2785,23 @@ var CodingSearchParams = import_zod28.z.strictObject({
|
|
|
2741
2785
|
cursor: nonNegInt.optional(),
|
|
2742
2786
|
limit: import_zod28.z.int().min(1).max(100).optional()
|
|
2743
2787
|
});
|
|
2788
|
+
var CodingSearchHit = import_zod28.z.strictObject({
|
|
2789
|
+
provider: CodingProviderName,
|
|
2790
|
+
providerSessionId: SessionKey,
|
|
2791
|
+
title: import_zod28.z.string().max(500),
|
|
2792
|
+
cwd: LocalPath.nullable(),
|
|
2793
|
+
updatedAt: IsoTime,
|
|
2794
|
+
where: import_zod28.z.enum(["title", "content"]),
|
|
2795
|
+
snippet: import_zod28.z.string().max(2e3).nullable(),
|
|
2796
|
+
/**
|
|
2797
|
+
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
2798
|
+
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
2799
|
+
*/
|
|
2800
|
+
accountId: import_zod28.z.string().min(1).max(64).optional()
|
|
2801
|
+
});
|
|
2744
2802
|
var CodingSearchResult = import_zod28.z.strictObject({
|
|
2745
2803
|
query: import_zod28.z.string().max(500),
|
|
2746
|
-
hits: import_zod28.z.array(
|
|
2747
|
-
import_zod28.z.strictObject({
|
|
2748
|
-
provider: CodingProviderName,
|
|
2749
|
-
providerSessionId: SessionKey,
|
|
2750
|
-
title: import_zod28.z.string().max(500),
|
|
2751
|
-
cwd: LocalPath.nullable(),
|
|
2752
|
-
updatedAt: IsoTime,
|
|
2753
|
-
where: import_zod28.z.enum(["title", "content"]),
|
|
2754
|
-
snippet: import_zod28.z.string().max(2e3).nullable()
|
|
2755
|
-
})
|
|
2756
|
-
),
|
|
2804
|
+
hits: import_zod28.z.array(CodingSearchHit),
|
|
2757
2805
|
scanned: nonNegInt,
|
|
2758
2806
|
total: nonNegInt,
|
|
2759
2807
|
nextCursor: nonNegInt.nullable()
|
|
@@ -4716,7 +4764,18 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
4716
4764
|
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
4717
4765
|
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
4718
4766
|
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
4719
|
-
["coding.providers", [["providers", "CodingProviderStatus"]]]
|
|
4767
|
+
["coding.providers", [["providers", "CodingProviderStatus"]]],
|
|
4768
|
+
// 1.57: the account a coding record belongs to.
|
|
4769
|
+
["coding.sessions.list", [["sessions", "CodingSessionRecord"], ["recent", "CodingRecentRow"]]],
|
|
4770
|
+
["coding.recent.seen", [["recent", "CodingRecentRow"]]],
|
|
4771
|
+
["coding.discover", [["chats", "CodingDiscoveredChat"]]],
|
|
4772
|
+
["coding.search", [["hits", "CodingSearchHit"]]],
|
|
4773
|
+
["coding.start", [["session", "CodingSessionRecord"]]],
|
|
4774
|
+
["coding.send", [["session", "CodingSessionRecord"]]],
|
|
4775
|
+
["coding.takeover", [["session", "CodingSessionRecord"]]],
|
|
4776
|
+
["coding.options.set", [["session", "CodingSessionRecord"]]],
|
|
4777
|
+
["coding.agent.set", [["session", "CodingSessionRecord"]]],
|
|
4778
|
+
["coding.account.continue", [["session", "CodingSessionRecord"]]]
|
|
4720
4779
|
]);
|
|
4721
4780
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
4722
4781
|
["window.list", "windows"],
|