@ai-matrx/desktop-protocol 0.21.45 → 0.21.47
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 +27 -1
- package/README.md +1 -1
- package/dist/client.cjs +42 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.js +42 -8
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +73 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1724 -1487
- package/dist/index.d.ts +1724 -1487
- package/dist/index.js +73 -9
- package/dist/index.js.map +1 -1
- package/dist/{models-BFAtNMgx.d.cts → models-Di-SL_jw.d.cts} +254 -107
- package/dist/{models-BFAtNMgx.d.ts → models-Di-SL_jw.d.ts} +254 -107
- package/dist/react.cjs +9 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +52 -5
- package/dist/react.d.ts +52 -5
- package/dist/react.js +9 -0
- package/dist/react.js.map +1 -1
- package/generated/desktop-protocol.schema.json +147 -1
- package/package.json +5 -5
package/dist/client.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BackoffOptions } from '@ai-matrx/realtime';
|
|
2
|
-
export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
|
|
1
|
+
import { BackoffOptions } from '@ai-matrx/data/realtime';
|
|
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-Di-SL_jw.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Di-SL_jw.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. */
|
|
@@ -104,7 +104,7 @@ interface DesktopClientOptions {
|
|
|
104
104
|
protocolVersion?: string;
|
|
105
105
|
/** Default: `globalThis.WebSocket`. */
|
|
106
106
|
webSocket?: WebSocketFactory;
|
|
107
|
-
/** Reconnect ladder — the shared @ai-matrx/realtime backoff (stability reset + jitter). */
|
|
107
|
+
/** Reconnect ladder — the shared @ai-matrx/data/realtime backoff (stability reset + jitter). */
|
|
108
108
|
backoff?: Omit<BackoffOptions, "now">;
|
|
109
109
|
/** Heartbeat interval (PING_TEXT). Two silent intervals = reconnect. Default 25 000. */
|
|
110
110
|
heartbeatMs?: number;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BackoffOptions } from '@ai-matrx/realtime';
|
|
2
|
-
export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
|
|
1
|
+
import { BackoffOptions } from '@ai-matrx/data/realtime';
|
|
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-Di-SL_jw.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Di-SL_jw.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. */
|
|
@@ -104,7 +104,7 @@ interface DesktopClientOptions {
|
|
|
104
104
|
protocolVersion?: string;
|
|
105
105
|
/** Default: `globalThis.WebSocket`. */
|
|
106
106
|
webSocket?: WebSocketFactory;
|
|
107
|
-
/** Reconnect ladder — the shared @ai-matrx/realtime backoff (stability reset + jitter). */
|
|
107
|
+
/** Reconnect ladder — the shared @ai-matrx/data/realtime backoff (stability reset + jitter). */
|
|
108
108
|
backoff?: Omit<BackoffOptions, "now">;
|
|
109
109
|
/** Heartbeat interval (PING_TEXT). Two silent intervals = reconnect. Default 25 000. */
|
|
110
110
|
heartbeatMs?: number;
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/client/client.ts
|
|
2
|
-
import { RECONNECT_ALARM_ATTEMPTS, createBackoff } from "@ai-matrx/realtime";
|
|
2
|
+
import { RECONNECT_ALARM_ATTEMPTS, createBackoff } from "@ai-matrx/data/realtime";
|
|
3
3
|
|
|
4
4
|
// src/error.ts
|
|
5
5
|
var DesktopProtocolError = class _DesktopProtocolError extends Error {
|
|
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
|
|
|
112
112
|
import { z } from "zod";
|
|
113
113
|
import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
|
|
114
114
|
var PROTOCOL_MAJOR = 1;
|
|
115
|
-
var PROTOCOL_MINOR =
|
|
115
|
+
var PROTOCOL_MINOR = 52;
|
|
116
116
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
117
117
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
118
118
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -3011,6 +3011,23 @@ var AppsChatsStarResult = z30.strictObject({ chat: ChatRow });
|
|
|
3011
3011
|
|
|
3012
3012
|
// src/schema/apps-accounts.ts
|
|
3013
3013
|
import { z as z31 } from "zod";
|
|
3014
|
+
var WindowRemoteControl = z31.strictObject({
|
|
3015
|
+
/**
|
|
3016
|
+
* As the window's settings file holds it: on, off, or never set (the app's default). 1.52:
|
|
3017
|
+
* "unreadable" = the file is there but damaged, so the setting is not known (`problem` says why).
|
|
3018
|
+
*/
|
|
3019
|
+
setting: z31.enum(["on", "off", "default", "unreadable"]),
|
|
3020
|
+
/** The window serves Remote Control now (its live state says "on"); null: not known (closed, or no state file). */
|
|
3021
|
+
serving: z31.boolean().nullable(),
|
|
3022
|
+
/** A change queued until the window next closes (or restarts); null: none. */
|
|
3023
|
+
pending: z31.enum(["on", "off"]).nullable(),
|
|
3024
|
+
/**
|
|
3025
|
+
* 1.52: why the setting cannot be trusted, as a plain sentence for the person: the settings file is
|
|
3026
|
+
* damaged ("unreadable"), or a queued change failed to land (it stays queued; asking again retries).
|
|
3027
|
+
* Absent: nothing wrong. An older core omits it.
|
|
3028
|
+
*/
|
|
3029
|
+
problem: z31.string().max(300).optional()
|
|
3030
|
+
});
|
|
3014
3031
|
var AppWindowInfo = z31.strictObject({
|
|
3015
3032
|
key: ChatPlace,
|
|
3016
3033
|
/** The app's default profile (Claude: main, which may sign into any account). */
|
|
@@ -3027,7 +3044,9 @@ var AppWindowInfo = z31.strictObject({
|
|
|
3027
3044
|
/** Open now. */
|
|
3028
3045
|
running: z31.boolean(),
|
|
3029
3046
|
/** Chats open in it now (a process resuming each one). */
|
|
3030
|
-
open_chats: nonNegInt
|
|
3047
|
+
open_chats: nonNegInt,
|
|
3048
|
+
/** 1.50: its Remote Control (phone) setting; absent from an older core, or an app without one. */
|
|
3049
|
+
remote_control: WindowRemoteControl.optional()
|
|
3031
3050
|
});
|
|
3032
3051
|
var AccountUsage = z31.strictObject({
|
|
3033
3052
|
/** The account's email, or "org <8 chars>" when no window has ever sampled that org. */
|
|
@@ -3107,6 +3126,13 @@ var AppsWindowsShownResult = z31.strictObject({
|
|
|
3107
3126
|
sections: z31.array(ShownSection).max(200),
|
|
3108
3127
|
problem: z31.string().max(400).nullable()
|
|
3109
3128
|
});
|
|
3129
|
+
var AppsWindowsSetRemoteControlParams = z31.strictObject({ app_key: AppKey, window: ChatPlace, enabled: z31.boolean() });
|
|
3130
|
+
var AppsWindowsSetRemoteControlResult = z31.strictObject({
|
|
3131
|
+
message: z31.string().max(400),
|
|
3132
|
+
/** "now" = written into the closed window; "next_close" = queued until it closes. */
|
|
3133
|
+
when: z31.enum(["now", "next_close"]),
|
|
3134
|
+
remote_control: WindowRemoteControl
|
|
3135
|
+
});
|
|
3110
3136
|
var AppsWindowsRestartParams = z31.strictObject({ app_key: AppKey, window: ChatPlace, force: z31.boolean().default(false) });
|
|
3111
3137
|
var AppsWindowsRefreshUsageParams = z31.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
3112
3138
|
var AppsProjectsMoveParams = z31.strictObject({
|
|
@@ -3450,19 +3476,23 @@ var AppAccount = z32.strictObject({
|
|
|
3450
3476
|
last_seen_ms: epochMs.nullable(),
|
|
3451
3477
|
missing: z32.array(AccountGap).max(3)
|
|
3452
3478
|
});
|
|
3453
|
-
var AppsInstancesListParams = z32.strictObject({ app_key: AppKey });
|
|
3479
|
+
var AppsInstancesListParams = z32.strictObject({ app_key: AppKey, fresh: z32.boolean().optional() });
|
|
3454
3480
|
var AppsInstancesListResult = z32.strictObject({
|
|
3455
3481
|
app_key: AppKey,
|
|
3456
3482
|
install: AppInstall.nullable(),
|
|
3457
3483
|
instances: z32.array(AppInstance).max(200),
|
|
3458
3484
|
/** The rows are right but something around them failed; shown, never hidden. */
|
|
3459
|
-
problem: z32.string().max(400).optional()
|
|
3485
|
+
problem: z32.string().max(400).optional(),
|
|
3486
|
+
as_of_ms: epochMs.optional(),
|
|
3487
|
+
refreshing: z32.boolean().optional()
|
|
3460
3488
|
});
|
|
3461
|
-
var AppsAccountsListParams = z32.strictObject({ app_key: AppKey });
|
|
3489
|
+
var AppsAccountsListParams = z32.strictObject({ app_key: AppKey, fresh: z32.boolean().optional() });
|
|
3462
3490
|
var AppsAccountsListResult = z32.strictObject({
|
|
3463
3491
|
app_key: AppKey,
|
|
3464
3492
|
accounts: z32.array(AppAccount).max(500),
|
|
3465
|
-
problem: z32.string().max(400).optional()
|
|
3493
|
+
problem: z32.string().max(400).optional(),
|
|
3494
|
+
as_of_ms: epochMs.optional(),
|
|
3495
|
+
refreshing: z32.boolean().optional()
|
|
3466
3496
|
});
|
|
3467
3497
|
|
|
3468
3498
|
// src/schema/browser.ts
|
|
@@ -4302,6 +4332,8 @@ var OPS = {
|
|
|
4302
4332
|
"apps.windows.open": { params: AppsWindowsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4303
4333
|
"apps.windows.reload": { params: AppsWindowsReloadParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4304
4334
|
"apps.windows.restart": { params: AppsWindowsRestartParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4335
|
+
// 1.50: a window's Remote Control (phone) setting, written while closed or queued for its next close.
|
|
4336
|
+
"apps.windows.set_remote_control": { params: AppsWindowsSetRemoteControlParams, result: AppsWindowsSetRemoteControlResult, kind: "unary", since: "1.50", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4305
4337
|
"apps.windows.refresh_usage": { params: AppsWindowsRefreshUsageParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4306
4338
|
"apps.accounts.usage": { params: AppsAccountsUsageParams, result: AppsAccountsUsageResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4307
4339
|
"apps.accounts.resets": { params: AppsAccountsResetsParams, result: AppsAccountsResetsResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -4568,7 +4600,9 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
4568
4600
|
["web.scrape", [["pages", "WebScrapePage"]]],
|
|
4569
4601
|
["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
|
|
4570
4602
|
["models.downloads.list", [["downloads", "DownloadRow"]]],
|
|
4571
|
-
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
|
|
4603
|
+
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
4604
|
+
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
4605
|
+
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]]
|
|
4572
4606
|
]);
|
|
4573
4607
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
4574
4608
|
["window.list", "windows"],
|