@ai-matrx/desktop-protocol 0.21.61 → 0.21.63
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 +31 -1
- package/dist/{chunk-server-OQM4XFUL.js → chunk-server-B5W6NL7W.js} +81 -5
- package/dist/chunk-server-B5W6NL7W.js.map +1 -0
- package/dist/client.cjs +49 -3
- 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 +1 -1
- package/dist/index.cjs +81 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -6
- package/dist/index.d.ts +136 -6
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-DbcCVlya.d.cts → models-B13QkIMu.d.cts} +191 -1
- package/dist/{models-DbcCVlya.d.ts → models-B13QkIMu.d.ts} +191 -1
- package/dist/react.d.cts +88 -0
- package/dist/react.d.ts +88 -0
- package/generated/desktop-protocol.schema.json +325 -2
- package/package.json +2 -2
- package/dist/chunk-server-OQM4XFUL.js.map +0 -1
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-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
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-B13QkIMu.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-B13QkIMu.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-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
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-B13QkIMu.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-B13QkIMu.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
package/dist/index.cjs
CHANGED
|
@@ -27,14 +27,21 @@ __export(src_exports, {
|
|
|
27
27
|
AccountAgentRunSort: () => AccountAgentRunSort,
|
|
28
28
|
AccountAgentRunStatus: () => AccountAgentRunStatus,
|
|
29
29
|
AccountAgentVariable: () => AccountAgentVariable,
|
|
30
|
+
AccountAgentVersion: () => AccountAgentVersion,
|
|
30
31
|
AccountAgentsFavoriteParams: () => AccountAgentsFavoriteParams,
|
|
31
32
|
AccountAgentsFavoriteResult: () => AccountAgentsFavoriteResult,
|
|
32
33
|
AccountAgentsGetParams: () => AccountAgentsGetParams,
|
|
33
34
|
AccountAgentsGetResult: () => AccountAgentsGetResult,
|
|
34
35
|
AccountAgentsListParams: () => AccountAgentsListParams,
|
|
35
36
|
AccountAgentsListResult: () => AccountAgentsListResult,
|
|
37
|
+
AccountAgentsRestoreVersionParams: () => AccountAgentsRestoreVersionParams,
|
|
38
|
+
AccountAgentsRestoreVersionResult: () => AccountAgentsRestoreVersionResult,
|
|
36
39
|
AccountAgentsRunsParams: () => AccountAgentsRunsParams,
|
|
37
40
|
AccountAgentsRunsResult: () => AccountAgentsRunsResult,
|
|
41
|
+
AccountAgentsVersionDiffParams: () => AccountAgentsVersionDiffParams,
|
|
42
|
+
AccountAgentsVersionDiffResult: () => AccountAgentsVersionDiffResult,
|
|
43
|
+
AccountAgentsVersionsParams: () => AccountAgentsVersionsParams,
|
|
44
|
+
AccountAgentsVersionsResult: () => AccountAgentsVersionsResult,
|
|
38
45
|
AccountGap: () => AccountGap,
|
|
39
46
|
AccountReadState: () => AccountReadState,
|
|
40
47
|
AccountReset: () => AccountReset,
|
|
@@ -498,6 +505,7 @@ __export(src_exports, {
|
|
|
498
505
|
InputSetKeyboardSettingsParams: () => InputSetKeyboardSettingsParams,
|
|
499
506
|
InputTypeTextParams: () => InputTypeTextParams,
|
|
500
507
|
InputTypeTextResult: () => InputTypeTextResult,
|
|
508
|
+
InstanceGap: () => InstanceGap,
|
|
501
509
|
InstanceStatus: () => InstanceStatus,
|
|
502
510
|
LEGACY_ACTIONS: () => LEGACY_ACTIONS,
|
|
503
511
|
LEGACY_DISPATCHERS: () => LEGACY_DISPATCHERS,
|
|
@@ -906,7 +914,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
906
914
|
var import_zod = require("zod");
|
|
907
915
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
908
916
|
var PROTOCOL_MAJOR = 1;
|
|
909
|
-
var PROTOCOL_MINOR =
|
|
917
|
+
var PROTOCOL_MINOR = 65;
|
|
910
918
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
911
919
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
912
920
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -2029,6 +2037,36 @@ var AccountAgentsRunsResult = import_zod11.z.strictObject({
|
|
|
2029
2037
|
});
|
|
2030
2038
|
var AccountAgentsFavoriteParams = import_zod11.z.strictObject({ agent_id: AccountRowId, favorite: import_zod11.z.boolean() });
|
|
2031
2039
|
var AccountAgentsFavoriteResult = import_zod11.z.strictObject({ favorite: import_zod11.z.boolean() });
|
|
2040
|
+
var AccountAgentVersion = import_zod11.z.strictObject({
|
|
2041
|
+
version_id: AccountRowId,
|
|
2042
|
+
version_number: import_zod11.z.int().min(1),
|
|
2043
|
+
changed_at_ms: epochMs,
|
|
2044
|
+
/** The change note the person wrote when saving, when they wrote one. */
|
|
2045
|
+
note: import_zod11.z.string().max(1e3).nullable()
|
|
2046
|
+
});
|
|
2047
|
+
var AccountAgentsVersionsParams = import_zod11.z.strictObject({
|
|
2048
|
+
agent_id: AccountRowId,
|
|
2049
|
+
offset: import_zod11.z.int().min(0).max(1e5).optional(),
|
|
2050
|
+
limit: import_zod11.z.int().min(1).max(200).optional()
|
|
2051
|
+
});
|
|
2052
|
+
var AccountAgentsVersionsResult = import_zod11.z.strictObject({
|
|
2053
|
+
state: AccountReadState,
|
|
2054
|
+
problem: import_zod11.z.string().max(300).nullable(),
|
|
2055
|
+
/** The version the agent is at now (null: no saved version yet). */
|
|
2056
|
+
current_version: import_zod11.z.int().min(1).nullable(),
|
|
2057
|
+
rows: import_zod11.z.array(AccountAgentVersion).max(200)
|
|
2058
|
+
});
|
|
2059
|
+
var AccountAgentsVersionDiffParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
|
|
2060
|
+
var AccountAgentsVersionDiffResult = import_zod11.z.strictObject({
|
|
2061
|
+
state: AccountReadState,
|
|
2062
|
+
problem: import_zod11.z.string().max(300).nullable(),
|
|
2063
|
+
version_number: import_zod11.z.int().min(1),
|
|
2064
|
+
current_version: import_zod11.z.int().min(1).nullable(),
|
|
2065
|
+
old: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable(),
|
|
2066
|
+
current: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable()
|
|
2067
|
+
});
|
|
2068
|
+
var AccountAgentsRestoreVersionParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
|
|
2069
|
+
var AccountAgentsRestoreVersionResult = import_zod11.z.strictObject({ restored_version: import_zod11.z.int().min(1) });
|
|
2032
2070
|
var VaultItemKind = import_zod11.z.enum(["login", "passkey", "key", "other"]);
|
|
2033
2071
|
var VaultFieldSummary = import_zod11.z.strictObject({
|
|
2034
2072
|
key: import_zod11.z.string().min(1).max(120),
|
|
@@ -2278,7 +2316,13 @@ var ChatRow = import_zod13.z.strictObject({
|
|
|
2278
2316
|
/** 1.61: where the title shows (the title facet's sync state for this chat's app). */
|
|
2279
2317
|
title_sync: ChatTitleSync.optional(),
|
|
2280
2318
|
/** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */
|
|
2281
|
-
moved: import_zod13.z.array(ChatMove).max(50).optional()
|
|
2319
|
+
moved: import_zod13.z.array(ChatMove).max(50).optional(),
|
|
2320
|
+
/**
|
|
2321
|
+
* 1.63: the instance the chat belongs to: the one whose folder holds it (read only; nothing is
|
|
2322
|
+
* moved). Claude: the side window holding its newest record copy (main mirrors every window), else
|
|
2323
|
+
* main; Codex: the home whose database holds it. Absent = only Matrx's holder keeps it.
|
|
2324
|
+
*/
|
|
2325
|
+
home: ChatPlace.optional()
|
|
2282
2326
|
});
|
|
2283
2327
|
var ChatFamily = import_zod13.z.strictObject({
|
|
2284
2328
|
id: ChatId,
|
|
@@ -2818,6 +2862,7 @@ var AppInstall = import_zod15.z.strictObject({
|
|
|
2818
2862
|
location: import_zod15.z.string().max(1024),
|
|
2819
2863
|
version: import_zod15.z.string().max(80).nullable()
|
|
2820
2864
|
});
|
|
2865
|
+
var InstanceGap = import_zod15.z.enum(["account", "email", "version"]);
|
|
2821
2866
|
var AppInstance = import_zod15.z.strictObject({
|
|
2822
2867
|
app_key: AppKey,
|
|
2823
2868
|
/** "main", or the instance's name: the same key every window action takes. */
|
|
@@ -2843,7 +2888,9 @@ var AppInstance = import_zod15.z.strictObject({
|
|
|
2843
2888
|
open_chats: nonNegInt,
|
|
2844
2889
|
launched_ms: epochMs.nullable(),
|
|
2845
2890
|
quit_ms: epochMs.nullable(),
|
|
2846
|
-
first_launch_ms: epochMs.nullable()
|
|
2891
|
+
first_launch_ms: epochMs.nullable(),
|
|
2892
|
+
/** 1.63: what this record still lacks after Matrx filled what it remembered (absent = nothing). */
|
|
2893
|
+
missing: import_zod15.z.array(InstanceGap).max(3).optional()
|
|
2847
2894
|
});
|
|
2848
2895
|
var AccountResetSource = import_zod15.z.enum(["app", "usage_history", "your_list"]);
|
|
2849
2896
|
var AccountGap = import_zod15.z.enum(["email", "plan", "usage"]);
|
|
@@ -4329,6 +4376,8 @@ var CodingTranscriptItem = import_zod34.z.discriminatedUnion("kind", [
|
|
|
4329
4376
|
}),
|
|
4330
4377
|
import_zod34.z.strictObject({ kind: import_zod34.z.literal("usage"), usage: CodingRunUsage, costUsd: import_zod34.z.number().nullable() }),
|
|
4331
4378
|
import_zod34.z.strictObject({ kind: import_zod34.z.literal("notice"), id: import_zod34.z.string().max(200), level: import_zod34.z.enum(["info", "warning"]), text: import_zod34.z.string() }),
|
|
4379
|
+
/** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
|
|
4380
|
+
import_zod34.z.strictObject({ kind: import_zod34.z.literal("continued"), id: import_zod34.z.string().max(200), from: import_zod34.z.string().max(300), text: import_zod34.z.string(), at: IsoTime.nullable() }),
|
|
4332
4381
|
import_zod34.z.strictObject({ kind: import_zod34.z.literal("error"), id: import_zod34.z.string().max(200), text: import_zod34.z.string() })
|
|
4333
4382
|
]);
|
|
4334
4383
|
var CodingHistoryRecord = import_zod34.z.strictObject({
|
|
@@ -5638,6 +5687,9 @@ var OPS = {
|
|
|
5638
5687
|
"account.agents.get": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5639
5688
|
"account.agents.runs": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5640
5689
|
"account.agents.favorite": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: "unary", since: "1.39", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
5690
|
+
"account.agents.versions": { params: AccountAgentsVersionsParams, result: AccountAgentsVersionsResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5691
|
+
"account.agents.version_diff": { params: AccountAgentsVersionDiffParams, result: AccountAgentsVersionDiffResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5692
|
+
"account.agents.restore_version": { params: AccountAgentsRestoreVersionParams, result: AccountAgentsRestoreVersionResult, kind: "unary", since: "1.64", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
5641
5693
|
// 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
|
|
5642
5694
|
"apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
5643
5695
|
"apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -5776,6 +5828,7 @@ var NAMED_SCHEMAS = {
|
|
|
5776
5828
|
AppsChatsProbeParams,
|
|
5777
5829
|
AppsChatsProbeResult,
|
|
5778
5830
|
InstanceStatus,
|
|
5831
|
+
InstanceGap,
|
|
5779
5832
|
AppInstall,
|
|
5780
5833
|
AppInstance,
|
|
5781
5834
|
AccountResetSource,
|
|
@@ -6396,6 +6449,13 @@ var NAMED_SCHEMAS = {
|
|
|
6396
6449
|
AccountAgentsRunsResult,
|
|
6397
6450
|
AccountAgentsFavoriteParams,
|
|
6398
6451
|
AccountAgentsFavoriteResult,
|
|
6452
|
+
AccountAgentVersion,
|
|
6453
|
+
AccountAgentsVersionsParams,
|
|
6454
|
+
AccountAgentsVersionsResult,
|
|
6455
|
+
AccountAgentsVersionDiffParams,
|
|
6456
|
+
AccountAgentsVersionDiffResult,
|
|
6457
|
+
AccountAgentsRestoreVersionParams,
|
|
6458
|
+
AccountAgentsRestoreVersionResult,
|
|
6399
6459
|
AppsWindowsUpdateStateParams,
|
|
6400
6460
|
AppsWindowsUpdateStateResult,
|
|
6401
6461
|
AppsWindowsReopenParams,
|
|
@@ -6587,6 +6647,7 @@ var FIELDS_SINCE = {
|
|
|
6587
6647
|
CodingDiscoveredChat: { accountId: "1.57" },
|
|
6588
6648
|
CodingRecentRow: { accountId: "1.57" },
|
|
6589
6649
|
CodingSearchHit: { accountId: "1.57" },
|
|
6650
|
+
AppInstance: { missing: "1.63" },
|
|
6590
6651
|
AppsInstancesListParams: { fresh: "1.51" },
|
|
6591
6652
|
AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51" },
|
|
6592
6653
|
AppsAccountsListParams: { fresh: "1.51" },
|
|
@@ -6594,7 +6655,7 @@ var FIELDS_SINCE = {
|
|
|
6594
6655
|
AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
|
|
6595
6656
|
AppsAccountsUsageResult: { problem: "1.12" },
|
|
6596
6657
|
AppsAccountsResetsResult: { problem: "1.12" },
|
|
6597
|
-
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" },
|
|
6658
|
+
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" },
|
|
6598
6659
|
AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
|
|
6599
6660
|
ResourcesDisk: { name: "1.17" },
|
|
6600
6661
|
StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
|
|
@@ -6720,6 +6781,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
6720
6781
|
// 1.60: each closed window's reopen outcome in a restart_verify copy.
|
|
6721
6782
|
["apps.chats.copy_to_account", [["restart", "CopyRestart"]]],
|
|
6722
6783
|
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
6784
|
+
// 1.63: what an instance record still lacks.
|
|
6785
|
+
["apps.instances.list", [["instances", "AppInstance"]]],
|
|
6723
6786
|
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
6724
6787
|
["coding.providers", [["providers", "CodingProviderStatus"]]],
|
|
6725
6788
|
// 1.57: the account a coding record belongs to.
|
|
@@ -6789,6 +6852,18 @@ function providersForPeer(value, version) {
|
|
|
6789
6852
|
});
|
|
6790
6853
|
return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
|
|
6791
6854
|
}
|
|
6855
|
+
function transcriptItemsForPeer(value, version) {
|
|
6856
|
+
if (knows(version, "1.65") || value === null || typeof value !== "object") return value;
|
|
6857
|
+
const body = value;
|
|
6858
|
+
if (!Array.isArray(body.items)) return value;
|
|
6859
|
+
const items = body.items;
|
|
6860
|
+
const next = items.map((item) => {
|
|
6861
|
+
const it = item;
|
|
6862
|
+
if (it?.kind !== "continued") return item;
|
|
6863
|
+
return { kind: "notice", id: it.id, level: "info", text: it.text };
|
|
6864
|
+
});
|
|
6865
|
+
return next.some((it, i) => it !== items[i]) ? { ...body, items: next } : value;
|
|
6866
|
+
}
|
|
6792
6867
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
6793
6868
|
["window.list", "windows"],
|
|
6794
6869
|
["window.focus", "window"],
|
|
@@ -6817,6 +6892,7 @@ function forPeer(op, part, value, version) {
|
|
|
6817
6892
|
const nested = op ? NESTED_RESULTS.get(op) : void 0;
|
|
6818
6893
|
const stripped = nested ? stripNested(top, nested, version) : top;
|
|
6819
6894
|
if (op === "coding.providers") return providersForPeer(stripped, version);
|
|
6895
|
+
if (op === "coding.history" || op === "coding.transcript.read") return transcriptItemsForPeer(stripped, version);
|
|
6820
6896
|
return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
|
|
6821
6897
|
}
|
|
6822
6898
|
if (value === null || typeof value !== "object") return value;
|
|
@@ -6834,7 +6910,7 @@ function forPeer(op, part, value, version) {
|
|
|
6834
6910
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6835
6911
|
|
|
6836
6912
|
// src/contract.ts
|
|
6837
|
-
var CONTRACT_SHA256 = "
|
|
6913
|
+
var CONTRACT_SHA256 = "5f948a2ff8eb9390240f311461546c850c170e3b633195a2aa80daf1084f4009";
|
|
6838
6914
|
|
|
6839
6915
|
// src/close-policy.ts
|
|
6840
6916
|
var CLOSE_RULES = {
|