@ai-matrx/desktop-protocol 0.21.50 → 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 +25 -1
- package/dist/client.cjs +99 -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 +99 -18
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +146 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +375 -6
- package/dist/index.d.ts +375 -6
- package/dist/index.js +146 -27
- package/dist/index.js.map +1 -1
- package/dist/{models-CqgbnWpk.d.cts → models--9189VUC.d.cts} +522 -1
- package/dist/{models-CqgbnWpk.d.ts → models--9189VUC.d.ts} +522 -1
- package/dist/react.d.cts +214 -0
- package/dist/react.d.ts +214 -0
- package/generated/desktop-protocol.schema.json +456 -78
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.21.
|
|
3
|
+
## 0.21.52
|
|
4
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
|
+
|
|
19
|
+
## 0.21.51
|
|
20
|
+
### Unreleased
|
|
21
|
+
### Protocol 1.56 — Continue on another account, from anywhere
|
|
22
|
+
|
|
23
|
+
- New op `coding.account.continue` ({session_id, account_profile_id?, client_request_id}) →
|
|
24
|
+
{session, run, how: "moved" | "fresh"}: the session moves to another of the person's accounts for
|
|
25
|
+
its app (absent `account_profile_id`: the default sign-in) and the turn a limit or the person
|
|
26
|
+
stopped is sent again there, exactly once per request id. In `coding_sessions_drive`.
|
|
27
|
+
Consumer action: a 1.55 core answers UNKNOWN_OPERATION; say that computer needs an update.
|
|
28
|
+
|
|
5
29
|
### Protocol 1.55 — copy chats to another account with their organisation
|
|
6
30
|
|
|
7
31
|
- New op `apps.chats.copy_to_account` ({origin, target, chat_ids, mode, restart, mirror_groups,
|
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),
|
|
@@ -2703,6 +2747,16 @@ var CodingOptionsSetParams = import_zod28.z.strictObject({
|
|
|
2703
2747
|
effort: import_zod28.z.string().max(40).optional()
|
|
2704
2748
|
});
|
|
2705
2749
|
var CodingOptionsSetResult = import_zod28.z.strictObject({ session: CodingSessionRecord });
|
|
2750
|
+
var CodingAccountContinueParams = import_zod28.z.strictObject({
|
|
2751
|
+
session_id: SessionKey,
|
|
2752
|
+
account_profile_id: import_zod28.z.string().min(1).max(64).optional(),
|
|
2753
|
+
client_request_id: CodingClientRequestId
|
|
2754
|
+
});
|
|
2755
|
+
var CodingAccountContinueResult = import_zod28.z.strictObject({
|
|
2756
|
+
session: CodingSessionRecord,
|
|
2757
|
+
run: CodingRunRecord.nullable(),
|
|
2758
|
+
how: import_zod28.z.enum(["moved", "fresh"])
|
|
2759
|
+
});
|
|
2706
2760
|
var CodingAgentSetParams = import_zod28.z.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
2707
2761
|
var CodingAgentSetResult = import_zod28.z.strictObject({ session: CodingSessionRecord });
|
|
2708
2762
|
var CodingAgentsAccessParams = import_zod28.z.strictObject({});
|
|
@@ -2731,19 +2785,23 @@ var CodingSearchParams = import_zod28.z.strictObject({
|
|
|
2731
2785
|
cursor: nonNegInt.optional(),
|
|
2732
2786
|
limit: import_zod28.z.int().min(1).max(100).optional()
|
|
2733
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
|
+
});
|
|
2734
2802
|
var CodingSearchResult = import_zod28.z.strictObject({
|
|
2735
2803
|
query: import_zod28.z.string().max(500),
|
|
2736
|
-
hits: import_zod28.z.array(
|
|
2737
|
-
import_zod28.z.strictObject({
|
|
2738
|
-
provider: CodingProviderName,
|
|
2739
|
-
providerSessionId: SessionKey,
|
|
2740
|
-
title: import_zod28.z.string().max(500),
|
|
2741
|
-
cwd: LocalPath.nullable(),
|
|
2742
|
-
updatedAt: IsoTime,
|
|
2743
|
-
where: import_zod28.z.enum(["title", "content"]),
|
|
2744
|
-
snippet: import_zod28.z.string().max(2e3).nullable()
|
|
2745
|
-
})
|
|
2746
|
-
),
|
|
2804
|
+
hits: import_zod28.z.array(CodingSearchHit),
|
|
2747
2805
|
scanned: nonNegInt,
|
|
2748
2806
|
total: nonNegInt,
|
|
2749
2807
|
nextCursor: nonNegInt.nullable()
|
|
@@ -3583,6 +3641,12 @@ var AppsAccountsListResult = import_zod32.z.strictObject({
|
|
|
3583
3641
|
as_of_ms: epochMs.optional(),
|
|
3584
3642
|
refreshing: import_zod32.z.boolean().optional()
|
|
3585
3643
|
});
|
|
3644
|
+
var AppsWindowsSetAccountParams = import_zod32.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod32.z.string().min(3).max(320) });
|
|
3645
|
+
var AppsWindowsForgetParams = import_zod32.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
3646
|
+
var ProbeFact = import_zod32.z.strictObject({ key: import_zod32.z.string().max(200), value: import_zod32.z.string().max(2e3) });
|
|
3647
|
+
var ProbeSource = import_zod32.z.strictObject({ source: import_zod32.z.string().max(120), instance: import_zod32.z.string().max(64).nullable(), facts: import_zod32.z.array(ProbeFact).max(500) });
|
|
3648
|
+
var AppsChatsProbeParams = import_zod32.z.strictObject({ app_key: AppKey, chat_id: import_zod32.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
3649
|
+
var AppsChatsProbeResult = import_zod32.z.strictObject({ app_key: AppKey, chat_id: import_zod32.z.string().max(128), sources: import_zod32.z.array(ProbeSource).max(200) });
|
|
3586
3650
|
|
|
3587
3651
|
// src/schema/browser.ts
|
|
3588
3652
|
var import_zod33 = require("zod");
|
|
@@ -4429,6 +4493,10 @@ var OPS = {
|
|
|
4429
4493
|
// 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
|
|
4430
4494
|
"apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4431
4495
|
"apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4496
|
+
// 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
|
|
4497
|
+
"apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4498
|
+
"apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4499
|
+
"apps.chats.probe": { params: AppsChatsProbeParams, result: AppsChatsProbeResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4432
4500
|
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4433
4501
|
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4434
4502
|
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -4519,6 +4587,8 @@ var OPS = {
|
|
|
4519
4587
|
"coding.stop": { params: CodingStopParams, result: CodingStopResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
4520
4588
|
"coding.stop_elsewhere": { params: CodingStopElsewhereParams, result: CodingStopElsewhereResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
4521
4589
|
"coding.options.set": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
4590
|
+
// 1.56: "Continue on <account>" — the session moves to another account and its stopped turn is sent again, exactly once.
|
|
4591
|
+
"coding.account.continue": { params: CodingAccountContinueParams, result: CodingAccountContinueResult, kind: "unary", since: "1.56", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4522
4592
|
"coding.agent.set": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4523
4593
|
"coding.agents.access": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
4524
4594
|
"coding.titles.status": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
@@ -4694,7 +4764,18 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
4694
4764
|
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
4695
4765
|
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
4696
4766
|
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
4697
|
-
["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"]]]
|
|
4698
4779
|
]);
|
|
4699
4780
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
4700
4781
|
["window.list", "windows"],
|