@ai-matrx/desktop-protocol 0.21.45 → 0.21.46
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 +17 -2
- package/README.md +1 -1
- package/dist/client.cjs +30 -7
- 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 +30 -7
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +41 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1710 -1488
- package/dist/index.d.ts +1710 -1488
- package/dist/index.js +41 -7
- package/dist/index.js.map +1 -1
- package/dist/{models-BFAtNMgx.d.cts → models-DIsQe_Ef.d.cts} +242 -107
- package/dist/{models-BFAtNMgx.d.ts → models-DIsQe_Ef.d.ts} +242 -107
- package/dist/react.cjs +9 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +48 -5
- package/dist/react.d.ts +48 -5
- package/dist/react.js +9 -0
- package/dist/react.js.map +1 -1
- package/generated/desktop-protocol.schema.json +139 -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-DIsQe_Ef.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-DIsQe_Ef.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-DIsQe_Ef.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-DIsQe_Ef.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 = 51;
|
|
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,14 @@ 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
|
+
/** As the window's settings file holds it: on, off, or never set (the app's default). */
|
|
3016
|
+
setting: z31.enum(["on", "off", "default"]),
|
|
3017
|
+
/** The window serves Remote Control now (its live state says "on"); null: not known (closed, or no state file). */
|
|
3018
|
+
serving: z31.boolean().nullable(),
|
|
3019
|
+
/** A change queued until the window next closes (or restarts); null: none. */
|
|
3020
|
+
pending: z31.enum(["on", "off"]).nullable()
|
|
3021
|
+
});
|
|
3014
3022
|
var AppWindowInfo = z31.strictObject({
|
|
3015
3023
|
key: ChatPlace,
|
|
3016
3024
|
/** The app's default profile (Claude: main, which may sign into any account). */
|
|
@@ -3027,7 +3035,9 @@ var AppWindowInfo = z31.strictObject({
|
|
|
3027
3035
|
/** Open now. */
|
|
3028
3036
|
running: z31.boolean(),
|
|
3029
3037
|
/** Chats open in it now (a process resuming each one). */
|
|
3030
|
-
open_chats: nonNegInt
|
|
3038
|
+
open_chats: nonNegInt,
|
|
3039
|
+
/** 1.50: its Remote Control (phone) setting; absent from an older core, or an app without one. */
|
|
3040
|
+
remote_control: WindowRemoteControl.optional()
|
|
3031
3041
|
});
|
|
3032
3042
|
var AccountUsage = z31.strictObject({
|
|
3033
3043
|
/** The account's email, or "org <8 chars>" when no window has ever sampled that org. */
|
|
@@ -3107,6 +3117,13 @@ var AppsWindowsShownResult = z31.strictObject({
|
|
|
3107
3117
|
sections: z31.array(ShownSection).max(200),
|
|
3108
3118
|
problem: z31.string().max(400).nullable()
|
|
3109
3119
|
});
|
|
3120
|
+
var AppsWindowsSetRemoteControlParams = z31.strictObject({ app_key: AppKey, window: ChatPlace, enabled: z31.boolean() });
|
|
3121
|
+
var AppsWindowsSetRemoteControlResult = z31.strictObject({
|
|
3122
|
+
message: z31.string().max(400),
|
|
3123
|
+
/** "now" = written into the closed window; "next_close" = queued until it closes. */
|
|
3124
|
+
when: z31.enum(["now", "next_close"]),
|
|
3125
|
+
remote_control: WindowRemoteControl
|
|
3126
|
+
});
|
|
3110
3127
|
var AppsWindowsRestartParams = z31.strictObject({ app_key: AppKey, window: ChatPlace, force: z31.boolean().default(false) });
|
|
3111
3128
|
var AppsWindowsRefreshUsageParams = z31.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
3112
3129
|
var AppsProjectsMoveParams = z31.strictObject({
|
|
@@ -3450,19 +3467,23 @@ var AppAccount = z32.strictObject({
|
|
|
3450
3467
|
last_seen_ms: epochMs.nullable(),
|
|
3451
3468
|
missing: z32.array(AccountGap).max(3)
|
|
3452
3469
|
});
|
|
3453
|
-
var AppsInstancesListParams = z32.strictObject({ app_key: AppKey });
|
|
3470
|
+
var AppsInstancesListParams = z32.strictObject({ app_key: AppKey, fresh: z32.boolean().optional() });
|
|
3454
3471
|
var AppsInstancesListResult = z32.strictObject({
|
|
3455
3472
|
app_key: AppKey,
|
|
3456
3473
|
install: AppInstall.nullable(),
|
|
3457
3474
|
instances: z32.array(AppInstance).max(200),
|
|
3458
3475
|
/** The rows are right but something around them failed; shown, never hidden. */
|
|
3459
|
-
problem: z32.string().max(400).optional()
|
|
3476
|
+
problem: z32.string().max(400).optional(),
|
|
3477
|
+
as_of_ms: epochMs.optional(),
|
|
3478
|
+
refreshing: z32.boolean().optional()
|
|
3460
3479
|
});
|
|
3461
|
-
var AppsAccountsListParams = z32.strictObject({ app_key: AppKey });
|
|
3480
|
+
var AppsAccountsListParams = z32.strictObject({ app_key: AppKey, fresh: z32.boolean().optional() });
|
|
3462
3481
|
var AppsAccountsListResult = z32.strictObject({
|
|
3463
3482
|
app_key: AppKey,
|
|
3464
3483
|
accounts: z32.array(AppAccount).max(500),
|
|
3465
|
-
problem: z32.string().max(400).optional()
|
|
3484
|
+
problem: z32.string().max(400).optional(),
|
|
3485
|
+
as_of_ms: epochMs.optional(),
|
|
3486
|
+
refreshing: z32.boolean().optional()
|
|
3466
3487
|
});
|
|
3467
3488
|
|
|
3468
3489
|
// src/schema/browser.ts
|
|
@@ -4302,6 +4323,8 @@ var OPS = {
|
|
|
4302
4323
|
"apps.windows.open": { params: AppsWindowsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4303
4324
|
"apps.windows.reload": { params: AppsWindowsReloadParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4304
4325
|
"apps.windows.restart": { params: AppsWindowsRestartParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4326
|
+
// 1.50: a window's Remote Control (phone) setting, written while closed or queued for its next close.
|
|
4327
|
+
"apps.windows.set_remote_control": { params: AppsWindowsSetRemoteControlParams, result: AppsWindowsSetRemoteControlResult, kind: "unary", since: "1.50", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4305
4328
|
"apps.windows.refresh_usage": { params: AppsWindowsRefreshUsageParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4306
4329
|
"apps.accounts.usage": { params: AppsAccountsUsageParams, result: AppsAccountsUsageResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4307
4330
|
"apps.accounts.resets": { params: AppsAccountsResetsParams, result: AppsAccountsResetsResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|