@ai-matrx/desktop-protocol 0.21.62 → 0.21.65
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 +29 -3
- package/dist/{chunk-server-EQCCXWD7.js → chunk-server-K7IQDLLV.js} +99 -7
- package/dist/chunk-server-K7IQDLLV.js.map +1 -0
- package/dist/client.cjs +63 -6
- 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 +99 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -6
- package/dist/index.d.ts +151 -6
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-yHB4kGxD.d.cts → models-Bz990hcd.d.cts} +193 -1
- package/dist/{models-yHB4kGxD.d.ts → models-Bz990hcd.d.ts} +193 -1
- package/dist/react.d.cts +92 -0
- package/dist/react.d.ts +92 -0
- package/generated/desktop-protocol.schema.json +366 -1
- package/package.json +2 -2
- package/dist/chunk-server-EQCCXWD7.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-Bz990hcd.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Bz990hcd.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-Bz990hcd.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Bz990hcd.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,
|
|
@@ -858,6 +865,7 @@ __export(src_exports, {
|
|
|
858
865
|
WindowMoveParams: () => WindowMoveParams,
|
|
859
866
|
WindowMoveResult: () => WindowMoveResult,
|
|
860
867
|
WindowRemoteControl: () => WindowRemoteControl,
|
|
868
|
+
WindowState: () => WindowState,
|
|
861
869
|
WindowsEvent: () => WindowsEvent,
|
|
862
870
|
WindowsEventLogParams: () => WindowsEventLogParams,
|
|
863
871
|
WindowsEventLogResult: () => WindowsEventLogResult,
|
|
@@ -907,7 +915,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
907
915
|
var import_zod = require("zod");
|
|
908
916
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
909
917
|
var PROTOCOL_MAJOR = 1;
|
|
910
|
-
var PROTOCOL_MINOR =
|
|
918
|
+
var PROTOCOL_MINOR = 66;
|
|
911
919
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
912
920
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
913
921
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -2030,6 +2038,36 @@ var AccountAgentsRunsResult = import_zod11.z.strictObject({
|
|
|
2030
2038
|
});
|
|
2031
2039
|
var AccountAgentsFavoriteParams = import_zod11.z.strictObject({ agent_id: AccountRowId, favorite: import_zod11.z.boolean() });
|
|
2032
2040
|
var AccountAgentsFavoriteResult = import_zod11.z.strictObject({ favorite: import_zod11.z.boolean() });
|
|
2041
|
+
var AccountAgentVersion = import_zod11.z.strictObject({
|
|
2042
|
+
version_id: AccountRowId,
|
|
2043
|
+
version_number: import_zod11.z.int().min(1),
|
|
2044
|
+
changed_at_ms: epochMs,
|
|
2045
|
+
/** The change note the person wrote when saving, when they wrote one. */
|
|
2046
|
+
note: import_zod11.z.string().max(1e3).nullable()
|
|
2047
|
+
});
|
|
2048
|
+
var AccountAgentsVersionsParams = import_zod11.z.strictObject({
|
|
2049
|
+
agent_id: AccountRowId,
|
|
2050
|
+
offset: import_zod11.z.int().min(0).max(1e5).optional(),
|
|
2051
|
+
limit: import_zod11.z.int().min(1).max(200).optional()
|
|
2052
|
+
});
|
|
2053
|
+
var AccountAgentsVersionsResult = import_zod11.z.strictObject({
|
|
2054
|
+
state: AccountReadState,
|
|
2055
|
+
problem: import_zod11.z.string().max(300).nullable(),
|
|
2056
|
+
/** The version the agent is at now (null: no saved version yet). */
|
|
2057
|
+
current_version: import_zod11.z.int().min(1).nullable(),
|
|
2058
|
+
rows: import_zod11.z.array(AccountAgentVersion).max(200)
|
|
2059
|
+
});
|
|
2060
|
+
var AccountAgentsVersionDiffParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
|
|
2061
|
+
var AccountAgentsVersionDiffResult = import_zod11.z.strictObject({
|
|
2062
|
+
state: AccountReadState,
|
|
2063
|
+
problem: import_zod11.z.string().max(300).nullable(),
|
|
2064
|
+
version_number: import_zod11.z.int().min(1),
|
|
2065
|
+
current_version: import_zod11.z.int().min(1).nullable(),
|
|
2066
|
+
old: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable(),
|
|
2067
|
+
current: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()).nullable()
|
|
2068
|
+
});
|
|
2069
|
+
var AccountAgentsRestoreVersionParams = import_zod11.z.strictObject({ agent_id: AccountRowId, version_number: import_zod11.z.int().min(1) });
|
|
2070
|
+
var AccountAgentsRestoreVersionResult = import_zod11.z.strictObject({ restored_version: import_zod11.z.int().min(1) });
|
|
2033
2071
|
var VaultItemKind = import_zod11.z.enum(["login", "passkey", "key", "other"]);
|
|
2034
2072
|
var VaultFieldSummary = import_zod11.z.strictObject({
|
|
2035
2073
|
key: import_zod11.z.string().min(1).max(120),
|
|
@@ -3510,6 +3548,8 @@ var WindowInfo = import_zod24.z.strictObject({
|
|
|
3510
3548
|
var WindowListParams = import_zod24.z.strictObject({
|
|
3511
3549
|
/** Case-insensitive substring of the window title. */
|
|
3512
3550
|
title: import_zod24.z.string().min(1).max(256).optional(),
|
|
3551
|
+
/** (1.66) Case-insensitive substring of the owning application's name (matrx-local's app_filter). */
|
|
3552
|
+
app: import_zod24.z.string().min(1).max(256).optional(),
|
|
3513
3553
|
limit: import_zod24.z.int().min(1).max(500).default(100)
|
|
3514
3554
|
});
|
|
3515
3555
|
var WindowListResult = import_zod24.z.strictObject({
|
|
@@ -3529,8 +3569,17 @@ var WindowMoveParams = import_zod24.z.strictObject({
|
|
|
3529
3569
|
height: import_zod24.z.int().min(50).max(16384).optional()
|
|
3530
3570
|
});
|
|
3531
3571
|
var WindowMoveResult = import_zod24.z.strictObject({ window: WindowInfo });
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
3572
|
+
var WindowState = import_zod24.z.enum(["minimize", "maximize", "restore"]);
|
|
3573
|
+
var WindowMinimizeParams = import_zod24.z.strictObject({
|
|
3574
|
+
id: nonNegInt,
|
|
3575
|
+
/** (1.66) minimize (the default), maximize (fill its display), or restore (bring a minimized or maximized window back). */
|
|
3576
|
+
mode: WindowState.optional()
|
|
3577
|
+
});
|
|
3578
|
+
var WindowMinimizeResult = import_zod24.z.strictObject({
|
|
3579
|
+
id: nonNegInt,
|
|
3580
|
+
/** (1.66) What was done. */
|
|
3581
|
+
mode: WindowState.optional()
|
|
3582
|
+
});
|
|
3534
3583
|
|
|
3535
3584
|
// src/schema/input.ts
|
|
3536
3585
|
var import_zod25 = require("zod");
|
|
@@ -4042,16 +4091,27 @@ var AudioRecordParams = import_zod30.z.strictObject({
|
|
|
4042
4091
|
/** The microphone (from audio.devices); the default input when absent. */
|
|
4043
4092
|
device_id: import_zod30.z.string().min(1).max(256).optional(),
|
|
4044
4093
|
/** Where the WAV file goes; a new file in the temp folder when absent. */
|
|
4045
|
-
path: AbsPath.optional()
|
|
4094
|
+
path: AbsPath.optional(),
|
|
4095
|
+
/** (1.66) 1 (mono, the default) or 2 (stereo). */
|
|
4096
|
+
channels: import_zod30.z.int().min(1).max(2).optional(),
|
|
4097
|
+
/** (1.66) Samples per second; the device's own rate when absent. */
|
|
4098
|
+
sample_rate: import_zod30.z.int().min(8e3).max(192e3).optional()
|
|
4046
4099
|
});
|
|
4047
4100
|
var AudioRecordResult = import_zod30.z.strictObject({
|
|
4048
4101
|
path: AbsPath,
|
|
4049
4102
|
seconds: import_zod30.z.number().min(0),
|
|
4050
4103
|
bytes: nonNegInt,
|
|
4051
4104
|
/** Loudest sample, 0–1: 0 means the device gave silence. */
|
|
4052
|
-
peak: import_zod30.z.number().min(0).max(1)
|
|
4105
|
+
peak: import_zod30.z.number().min(0).max(1),
|
|
4106
|
+
/** (1.66) The file's channels and sample rate, as written. */
|
|
4107
|
+
channels: import_zod30.z.int().min(1).max(8).optional(),
|
|
4108
|
+
sample_rate: import_zod30.z.int().min(1).max(768e3).optional()
|
|
4109
|
+
});
|
|
4110
|
+
var AudioPlayParams = import_zod30.z.strictObject({
|
|
4111
|
+
path: AbsPath,
|
|
4112
|
+
/** (1.66) The speaker or output (its id from audio.devices' outputs); the system's output when absent. */
|
|
4113
|
+
device_id: import_zod30.z.string().min(1).max(256).optional()
|
|
4053
4114
|
});
|
|
4054
|
-
var AudioPlayParams = import_zod30.z.strictObject({ path: AbsPath });
|
|
4055
4115
|
var AudioPlayResult = import_zod30.z.strictObject({ path: AbsPath, seconds: import_zod30.z.number().min(0) });
|
|
4056
4116
|
var AudioLevelsParams = import_zod30.z.strictObject({});
|
|
4057
4117
|
var AudioLevelsResult = import_zod30.z.strictObject({
|
|
@@ -4339,6 +4399,8 @@ var CodingTranscriptItem = import_zod34.z.discriminatedUnion("kind", [
|
|
|
4339
4399
|
}),
|
|
4340
4400
|
import_zod34.z.strictObject({ kind: import_zod34.z.literal("usage"), usage: CodingRunUsage, costUsd: import_zod34.z.number().nullable() }),
|
|
4341
4401
|
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() }),
|
|
4402
|
+
/** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
|
|
4403
|
+
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() }),
|
|
4342
4404
|
import_zod34.z.strictObject({ kind: import_zod34.z.literal("error"), id: import_zod34.z.string().max(200), text: import_zod34.z.string() })
|
|
4343
4405
|
]);
|
|
4344
4406
|
var CodingHistoryRecord = import_zod34.z.strictObject({
|
|
@@ -5648,6 +5710,9 @@ var OPS = {
|
|
|
5648
5710
|
"account.agents.get": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5649
5711
|
"account.agents.runs": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5650
5712
|
"account.agents.favorite": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: "unary", since: "1.39", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
5713
|
+
"account.agents.versions": { params: AccountAgentsVersionsParams, result: AccountAgentsVersionsResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5714
|
+
"account.agents.version_diff": { params: AccountAgentsVersionDiffParams, result: AccountAgentsVersionDiffResult, kind: "unary", since: "1.64", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
5715
|
+
"account.agents.restore_version": { params: AccountAgentsRestoreVersionParams, result: AccountAgentsRestoreVersionResult, kind: "unary", since: "1.64", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
5651
5716
|
// 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
|
|
5652
5717
|
"apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
5653
5718
|
"apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -6099,6 +6164,7 @@ var NAMED_SCHEMAS = {
|
|
|
6099
6164
|
WindowMoveResult,
|
|
6100
6165
|
WindowMinimizeParams,
|
|
6101
6166
|
WindowMinimizeResult,
|
|
6167
|
+
WindowState,
|
|
6102
6168
|
InputKey,
|
|
6103
6169
|
InputKeyboardSettingsParams,
|
|
6104
6170
|
InputKeyboardSettingsResult,
|
|
@@ -6407,6 +6473,13 @@ var NAMED_SCHEMAS = {
|
|
|
6407
6473
|
AccountAgentsRunsResult,
|
|
6408
6474
|
AccountAgentsFavoriteParams,
|
|
6409
6475
|
AccountAgentsFavoriteResult,
|
|
6476
|
+
AccountAgentVersion,
|
|
6477
|
+
AccountAgentsVersionsParams,
|
|
6478
|
+
AccountAgentsVersionsResult,
|
|
6479
|
+
AccountAgentsVersionDiffParams,
|
|
6480
|
+
AccountAgentsVersionDiffResult,
|
|
6481
|
+
AccountAgentsRestoreVersionParams,
|
|
6482
|
+
AccountAgentsRestoreVersionResult,
|
|
6410
6483
|
AppsWindowsUpdateStateParams,
|
|
6411
6484
|
AppsWindowsUpdateStateResult,
|
|
6412
6485
|
AppsWindowsReopenParams,
|
|
@@ -6611,6 +6684,12 @@ var FIELDS_SINCE = {
|
|
|
6611
6684
|
ResourcesDisk: { name: "1.17" },
|
|
6612
6685
|
StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
|
|
6613
6686
|
AudioDevice: { kind: "1.24" },
|
|
6687
|
+
AudioRecordParams: { channels: "1.66", sample_rate: "1.66" },
|
|
6688
|
+
AudioRecordResult: { channels: "1.66", sample_rate: "1.66" },
|
|
6689
|
+
AudioPlayParams: { device_id: "1.66" },
|
|
6690
|
+
WindowListParams: { app: "1.66" },
|
|
6691
|
+
WindowMinimizeParams: { mode: "1.66" },
|
|
6692
|
+
WindowMinimizeResult: { mode: "1.66" },
|
|
6614
6693
|
ScreenDisplay: { rotation: "1.24", refresh_hz: "1.24", builtin: "1.24" },
|
|
6615
6694
|
PowerStatusResult: { energy: "1.24" },
|
|
6616
6695
|
AppsSpendResult: { days: "1.24" },
|
|
@@ -6803,6 +6882,18 @@ function providersForPeer(value, version) {
|
|
|
6803
6882
|
});
|
|
6804
6883
|
return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
|
|
6805
6884
|
}
|
|
6885
|
+
function transcriptItemsForPeer(value, version) {
|
|
6886
|
+
if (knows(version, "1.65") || value === null || typeof value !== "object") return value;
|
|
6887
|
+
const body = value;
|
|
6888
|
+
if (!Array.isArray(body.items)) return value;
|
|
6889
|
+
const items = body.items;
|
|
6890
|
+
const next = items.map((item) => {
|
|
6891
|
+
const it = item;
|
|
6892
|
+
if (it?.kind !== "continued") return item;
|
|
6893
|
+
return { kind: "notice", id: it.id, level: "info", text: it.text };
|
|
6894
|
+
});
|
|
6895
|
+
return next.some((it, i) => it !== items[i]) ? { ...body, items: next } : value;
|
|
6896
|
+
}
|
|
6806
6897
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
6807
6898
|
["window.list", "windows"],
|
|
6808
6899
|
["window.focus", "window"],
|
|
@@ -6831,6 +6922,7 @@ function forPeer(op, part, value, version) {
|
|
|
6831
6922
|
const nested = op ? NESTED_RESULTS.get(op) : void 0;
|
|
6832
6923
|
const stripped = nested ? stripNested(top, nested, version) : top;
|
|
6833
6924
|
if (op === "coding.providers") return providersForPeer(stripped, version);
|
|
6925
|
+
if (op === "coding.history" || op === "coding.transcript.read") return transcriptItemsForPeer(stripped, version);
|
|
6834
6926
|
return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
|
|
6835
6927
|
}
|
|
6836
6928
|
if (value === null || typeof value !== "object") return value;
|
|
@@ -6848,7 +6940,7 @@ function forPeer(op, part, value, version) {
|
|
|
6848
6940
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6849
6941
|
|
|
6850
6942
|
// src/contract.ts
|
|
6851
|
-
var CONTRACT_SHA256 = "
|
|
6943
|
+
var CONTRACT_SHA256 = "12cce30e22d7106e7344708176202949a2b2fea7eede2c570f663d46d3cedf34";
|
|
6852
6944
|
|
|
6853
6945
|
// src/close-policy.ts
|
|
6854
6946
|
var CLOSE_RULES = {
|