@ai-matrx/desktop-protocol 0.21.49 → 0.21.51
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 +20 -0
- package/dist/client.cjs +69 -1
- 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 +69 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +93 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +317 -10
- package/dist/index.d.ts +317 -10
- package/dist/index.js +93 -3
- package/dist/index.js.map +1 -1
- package/dist/{models-B_TX5A-H.d.cts → models-pdHTZ3YT.d.cts} +530 -9
- package/dist/{models-B_TX5A-H.d.ts → models-pdHTZ3YT.d.ts} +530 -9
- package/dist/react.d.cts +258 -2
- package/dist/react.d.ts +258 -2
- package/generated/desktop-protocol.schema.json +625 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
|
|
4
4
|
var PROTOCOL_MAJOR = 1;
|
|
5
|
-
var PROTOCOL_MINOR =
|
|
5
|
+
var PROTOCOL_MINOR = 56;
|
|
6
6
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
7
7
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
8
8
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1818,6 +1818,50 @@ var AppsWindowsUpdateAndReopenResult = z14.strictObject({
|
|
|
1818
1818
|
/** The version installed, null when the install did not happen (or dry_run). */
|
|
1819
1819
|
installed_version: z14.string().max(64).nullable()
|
|
1820
1820
|
});
|
|
1821
|
+
var AppsChatsCopyToAccountParams = z14.strictObject({
|
|
1822
|
+
app_key: AppKey,
|
|
1823
|
+
origin: ChatPlace,
|
|
1824
|
+
target: ChatPlace,
|
|
1825
|
+
chat_ids: z14.array(ChatId).min(1).max(500),
|
|
1826
|
+
mode: z14.enum(["copy", "move"]).default("copy"),
|
|
1827
|
+
restart: z14.enum(["queued", "restart_verify"]).default("queued"),
|
|
1828
|
+
/** Put each chat in the target group named as its origin group (default true). */
|
|
1829
|
+
mirror_groups: z14.boolean().default(true),
|
|
1830
|
+
/** Pin in the target the chats pinned in the origin (default true). */
|
|
1831
|
+
pins_follow: z14.boolean().default(true),
|
|
1832
|
+
/** A copy: group them in the origin under this name ("Copied to <target>"). */
|
|
1833
|
+
source_group: z14.string().trim().min(1).max(200).optional()
|
|
1834
|
+
});
|
|
1835
|
+
var CopiedChat = z14.strictObject({
|
|
1836
|
+
chat_id: ChatId,
|
|
1837
|
+
title: z14.string().max(500),
|
|
1838
|
+
outcome: z14.enum(["copied", "moved", "already", "skipped"]),
|
|
1839
|
+
/** The target group it was put in (its origin group's name), or null. */
|
|
1840
|
+
group: z14.string().max(200).nullable(),
|
|
1841
|
+
group_state: z14.enum(["now", "next_close", "failed"]).nullable(),
|
|
1842
|
+
pinned: z14.boolean(),
|
|
1843
|
+
pin_state: z14.enum(["now", "next_close", "failed"]).nullable(),
|
|
1844
|
+
/** The read-back: verified, waiting for a window to close (queued), or failed. */
|
|
1845
|
+
state: z14.enum(["verified", "queued", "failed"]),
|
|
1846
|
+
reason: z14.string().max(400).nullable()
|
|
1847
|
+
});
|
|
1848
|
+
var AppsChatsCopyToAccountResult = z14.strictObject({
|
|
1849
|
+
message: z14.string().max(400),
|
|
1850
|
+
origin: ChatPlace,
|
|
1851
|
+
target: ChatPlace,
|
|
1852
|
+
mode: z14.enum(["copy", "move"]),
|
|
1853
|
+
/** The marker the chats are filed under ("From <origin>"), for Bring back. */
|
|
1854
|
+
project: z14.strictObject({ id: ChatProjectId, name: z14.string().max(200) }),
|
|
1855
|
+
/** The target groups used, by name: made or reused, now or at the next close. */
|
|
1856
|
+
groups: z14.array(z14.strictObject({ name: z14.string().max(200), chats: z14.number().int().nonnegative(), ok: z14.boolean(), when: z14.enum(["now", "next_close"]).nullable(), reason: z14.string().max(400).nullable() })).max(500),
|
|
1857
|
+
source_group: z14.strictObject({ name: z14.string().max(200), ok: z14.boolean(), when: z14.enum(["now", "next_close"]).nullable(), reason: z14.string().max(400).nullable() }).nullable(),
|
|
1858
|
+
chats: z14.array(CopiedChat).max(500),
|
|
1859
|
+
verified: z14.number().int().nonnegative(),
|
|
1860
|
+
queued: z14.number().int().nonnegative(),
|
|
1861
|
+
failed: z14.number().int().nonnegative(),
|
|
1862
|
+
/** What the restart choice did: "restart_verify" closed and reopened `windows`; a fall back to "queued" says why. */
|
|
1863
|
+
restart: z14.strictObject({ asked: z14.enum(["queued", "restart_verify"]), done: z14.enum(["queued", "restart_verify"]), windows: z14.array(ChatPlace).max(2), reason: z14.string().max(400).nullable() })
|
|
1864
|
+
});
|
|
1821
1865
|
|
|
1822
1866
|
// src/schema/apps-instances.ts
|
|
1823
1867
|
import { z as z15 } from "zod";
|
|
@@ -1904,6 +1948,12 @@ var AppsAccountsListResult = z15.strictObject({
|
|
|
1904
1948
|
as_of_ms: epochMs.optional(),
|
|
1905
1949
|
refreshing: z15.boolean().optional()
|
|
1906
1950
|
});
|
|
1951
|
+
var AppsWindowsSetAccountParams = z15.strictObject({ app_key: AppKey, window: ChatPlace, email: z15.string().min(3).max(320) });
|
|
1952
|
+
var AppsWindowsForgetParams = z15.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
1953
|
+
var ProbeFact = z15.strictObject({ key: z15.string().max(200), value: z15.string().max(2e3) });
|
|
1954
|
+
var ProbeSource = z15.strictObject({ source: z15.string().max(120), instance: z15.string().max(64).nullable(), facts: z15.array(ProbeFact).max(500) });
|
|
1955
|
+
var AppsChatsProbeParams = z15.strictObject({ app_key: AppKey, chat_id: z15.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
1956
|
+
var AppsChatsProbeResult = z15.strictObject({ app_key: AppKey, chat_id: z15.string().max(128), sources: z15.array(ProbeSource).max(200) });
|
|
1907
1957
|
|
|
1908
1958
|
// src/schema/service.ts
|
|
1909
1959
|
import { z as z16 } from "zod";
|
|
@@ -3503,6 +3553,16 @@ var CodingOptionsSetParams = z34.strictObject({
|
|
|
3503
3553
|
effort: z34.string().max(40).optional()
|
|
3504
3554
|
});
|
|
3505
3555
|
var CodingOptionsSetResult = z34.strictObject({ session: CodingSessionRecord });
|
|
3556
|
+
var CodingAccountContinueParams = z34.strictObject({
|
|
3557
|
+
session_id: SessionKey,
|
|
3558
|
+
account_profile_id: z34.string().min(1).max(64).optional(),
|
|
3559
|
+
client_request_id: CodingClientRequestId
|
|
3560
|
+
});
|
|
3561
|
+
var CodingAccountContinueResult = z34.strictObject({
|
|
3562
|
+
session: CodingSessionRecord,
|
|
3563
|
+
run: CodingRunRecord.nullable(),
|
|
3564
|
+
how: z34.enum(["moved", "fresh"])
|
|
3565
|
+
});
|
|
3506
3566
|
var CodingAgentSetParams = z34.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
3507
3567
|
var CodingAgentSetResult = z34.strictObject({ session: CodingSessionRecord });
|
|
3508
3568
|
var CodingAgentsAccessParams = z34.strictObject({});
|
|
@@ -4440,9 +4500,15 @@ var OPS = {
|
|
|
4440
4500
|
// 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
|
|
4441
4501
|
"apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4442
4502
|
"apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4503
|
+
// 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
|
|
4504
|
+
"apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4505
|
+
"apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4506
|
+
"apps.chats.probe": { params: AppsChatsProbeParams, result: AppsChatsProbeResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4443
4507
|
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4444
4508
|
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4445
4509
|
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4510
|
+
// 1.55: copy (or move) chats to another account with their groups and pins, in one engine pass, read back.
|
|
4511
|
+
"apps.chats.copy_to_account": { params: AppsChatsCopyToAccountParams, result: AppsChatsCopyToAccountResult, kind: "unary", since: "1.55", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4446
4512
|
"apps.projects.to_window": { params: AppsProjectsToWindowParams, result: AppsProjectsToWindowResult, kind: "unary", since: "1.19", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4447
4513
|
// 1.11: Going cold, Spend, sync health, windows upkeep.
|
|
4448
4514
|
"apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -4528,6 +4594,8 @@ var OPS = {
|
|
|
4528
4594
|
"coding.stop": { params: CodingStopParams, result: CodingStopResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
4529
4595
|
"coding.stop_elsewhere": { params: CodingStopElsewhereParams, result: CodingStopElsewhereResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
4530
4596
|
"coding.options.set": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
4597
|
+
// 1.56: "Continue on <account>" — the session moves to another account and its stopped turn is sent again, exactly once.
|
|
4598
|
+
"coding.account.continue": { params: CodingAccountContinueParams, result: CodingAccountContinueResult, kind: "unary", since: "1.56", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4531
4599
|
"coding.agent.set": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4532
4600
|
"coding.agents.access": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
4533
4601
|
"coding.titles.status": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
@@ -4701,6 +4769,12 @@ var SERVICES = {
|
|
|
4701
4769
|
}
|
|
4702
4770
|
};
|
|
4703
4771
|
var NAMED_SCHEMAS = {
|
|
4772
|
+
AppsWindowsSetAccountParams,
|
|
4773
|
+
AppsWindowsForgetParams,
|
|
4774
|
+
ProbeFact,
|
|
4775
|
+
ProbeSource,
|
|
4776
|
+
AppsChatsProbeParams,
|
|
4777
|
+
AppsChatsProbeResult,
|
|
4704
4778
|
InstanceStatus,
|
|
4705
4779
|
AppInstall,
|
|
4706
4780
|
AppInstance,
|
|
@@ -4920,6 +4994,8 @@ var NAMED_SCHEMAS = {
|
|
|
4920
4994
|
CodingStopElsewhereResult,
|
|
4921
4995
|
CodingOptionsSetParams,
|
|
4922
4996
|
CodingOptionsSetResult,
|
|
4997
|
+
CodingAccountContinueParams,
|
|
4998
|
+
CodingAccountContinueResult,
|
|
4923
4999
|
CodingAgentSetParams,
|
|
4924
5000
|
CodingAgentSetResult,
|
|
4925
5001
|
CodingAgentsAccessParams,
|
|
@@ -5157,6 +5233,9 @@ var NAMED_SCHEMAS = {
|
|
|
5157
5233
|
WindowRemoteControl,
|
|
5158
5234
|
AppsWindowsSetRemoteControlParams,
|
|
5159
5235
|
AppsWindowsSetRemoteControlResult,
|
|
5236
|
+
AppsChatsCopyToAccountParams,
|
|
5237
|
+
CopiedChat,
|
|
5238
|
+
AppsChatsCopyToAccountResult,
|
|
5160
5239
|
AccountUsage,
|
|
5161
5240
|
AccountReset,
|
|
5162
5241
|
AppsWindowsListParams,
|
|
@@ -5725,7 +5804,7 @@ function forPeer(op, part, value, version) {
|
|
|
5725
5804
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
5726
5805
|
|
|
5727
5806
|
// src/contract.ts
|
|
5728
|
-
var CONTRACT_SHA256 = "
|
|
5807
|
+
var CONTRACT_SHA256 = "14b79673133fb1625ab0320921b60ad595de3228bfae1337a73be3ed2d3e5a45";
|
|
5729
5808
|
|
|
5730
5809
|
// src/close-policy.ts
|
|
5731
5810
|
var CLOSE_RULES = {
|
|
@@ -5805,7 +5884,7 @@ var TOOL_CATALOG = [
|
|
|
5805
5884
|
// 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning
|
|
5806
5885
|
// either off in Agents › Tools refuses its ops on every relay connection (the existing switch).
|
|
5807
5886
|
{ name: "coding_sessions_read", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.providers", "coding.sessions.list", "coding.discover", "coding.runs.list", "coding.history", "coding.transcript.read", "coding.item.full", "coding.activity", "coding.folders.recent", "coding.folders.check", "coding.agents.access", "coding.titles.status", "coding.prefs.list", "coding.recent.seen", "coding.search", "coding.transcript.raw", "coding.watch", "coding.session.watch"], platforms: ALL, summary: "Claude Code and Codex sessions: list, read live, search, download" },
|
|
5808
|
-
{ name: "coding_sessions_drive", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.start", "coding.takeover", "coding.send", "coding.stop", "coding.stop_elsewhere", "coding.options.set", "coding.agent.set", "coding.folders.create", "coding.prefs.set", "coding.reconcile"], platforms: ALL, summary: "Claude Code and Codex sessions: start, send, stop, take over, rename" },
|
|
5887
|
+
{ name: "coding_sessions_drive", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.start", "coding.takeover", "coding.send", "coding.stop", "coding.stop_elsewhere", "coding.options.set", "coding.account.continue", "coding.agent.set", "coding.folders.create", "coding.prefs.set", "coding.reconcile"], platforms: ALL, summary: "Claude Code and Codex sessions: start, send, stop, take over, rename" },
|
|
5809
5888
|
// ── 4. Documents, notes and entities (1.37: the core's `documents` and `notes` owners; desktop_web is the `tools` service) ──
|
|
5810
5889
|
{ name: "desktop_documents", group: "tools_service", state: "built", path: "device_op", ops: ["documents.pdf_text", "documents.ocr", "documents.image_resize", "documents.office_generate"], platforms: ALL, summary: "PDF text, OCR, images, Word and Excel files" },
|
|
5811
5890
|
{ name: "desktop_web", group: "tools_service", state: "built", path: "device_op", ops: ["web.fetch", "web.scrape", "web.search", "web.fetch_with_browser"], platforms: ALL, summary: "Fetch, scrape and search the web from this computer's own connection" },
|
|
@@ -6167,11 +6246,15 @@ export {
|
|
|
6167
6246
|
AppsChatsChangedEvent,
|
|
6168
6247
|
AppsChatsColdParams,
|
|
6169
6248
|
AppsChatsColdResult,
|
|
6249
|
+
AppsChatsCopyToAccountParams,
|
|
6250
|
+
AppsChatsCopyToAccountResult,
|
|
6170
6251
|
AppsChatsListParams,
|
|
6171
6252
|
AppsChatsListResult,
|
|
6172
6253
|
AppsChatsOpenParams,
|
|
6173
6254
|
AppsChatsPlaceParams,
|
|
6174
6255
|
AppsChatsPlaceResult,
|
|
6256
|
+
AppsChatsProbeParams,
|
|
6257
|
+
AppsChatsProbeResult,
|
|
6175
6258
|
AppsChatsStarParams,
|
|
6176
6259
|
AppsChatsStarResult,
|
|
6177
6260
|
AppsChatsTitlesCheckParams,
|
|
@@ -6218,6 +6301,7 @@ export {
|
|
|
6218
6301
|
AppsSyncStatusResult,
|
|
6219
6302
|
AppsWindowActionResult,
|
|
6220
6303
|
AppsWindowsAddParams,
|
|
6304
|
+
AppsWindowsForgetParams,
|
|
6221
6305
|
AppsWindowsGroupsParams,
|
|
6222
6306
|
AppsWindowsGroupsResult,
|
|
6223
6307
|
AppsWindowsListParams,
|
|
@@ -6231,6 +6315,7 @@ export {
|
|
|
6231
6315
|
AppsWindowsReopenResult,
|
|
6232
6316
|
AppsWindowsRestartParams,
|
|
6233
6317
|
AppsWindowsSaveNamesParams,
|
|
6318
|
+
AppsWindowsSetAccountParams,
|
|
6234
6319
|
AppsWindowsSetRemoteControlParams,
|
|
6235
6320
|
AppsWindowsSetRemoteControlResult,
|
|
6236
6321
|
AppsWindowsShownParams,
|
|
@@ -6319,6 +6404,8 @@ export {
|
|
|
6319
6404
|
ClipboardWriteResult,
|
|
6320
6405
|
CloseCode,
|
|
6321
6406
|
CloseCodeValue,
|
|
6407
|
+
CodingAccountContinueParams,
|
|
6408
|
+
CodingAccountContinueResult,
|
|
6322
6409
|
CodingActiveElsewhere,
|
|
6323
6410
|
CodingActivityParams,
|
|
6324
6411
|
CodingActivityResult,
|
|
@@ -6422,6 +6509,7 @@ export {
|
|
|
6422
6509
|
ContactsSearchParams,
|
|
6423
6510
|
ContactsSearchResult,
|
|
6424
6511
|
ContractHash,
|
|
6512
|
+
CopiedChat,
|
|
6425
6513
|
CoreToClientMsg,
|
|
6426
6514
|
CoreToServiceMsg,
|
|
6427
6515
|
CreditMsg,
|
|
@@ -6706,6 +6794,8 @@ export {
|
|
|
6706
6794
|
PowerPreventSleepResult,
|
|
6707
6795
|
PowerStatusParams,
|
|
6708
6796
|
PowerStatusResult,
|
|
6797
|
+
ProbeFact,
|
|
6798
|
+
ProbeSource,
|
|
6709
6799
|
ProcInfo,
|
|
6710
6800
|
ProcKillParams,
|
|
6711
6801
|
ProcKillResult,
|