@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/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-pdHTZ3YT.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-pdHTZ3YT.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-pdHTZ3YT.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-pdHTZ3YT.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
|
@@ -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 = 56;
|
|
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_-]+$/);
|
|
@@ -2671,6 +2671,16 @@ var CodingOptionsSetParams = z28.strictObject({
|
|
|
2671
2671
|
effort: z28.string().max(40).optional()
|
|
2672
2672
|
});
|
|
2673
2673
|
var CodingOptionsSetResult = z28.strictObject({ session: CodingSessionRecord });
|
|
2674
|
+
var CodingAccountContinueParams = z28.strictObject({
|
|
2675
|
+
session_id: SessionKey,
|
|
2676
|
+
account_profile_id: z28.string().min(1).max(64).optional(),
|
|
2677
|
+
client_request_id: CodingClientRequestId
|
|
2678
|
+
});
|
|
2679
|
+
var CodingAccountContinueResult = z28.strictObject({
|
|
2680
|
+
session: CodingSessionRecord,
|
|
2681
|
+
run: CodingRunRecord.nullable(),
|
|
2682
|
+
how: z28.enum(["moved", "fresh"])
|
|
2683
|
+
});
|
|
2674
2684
|
var CodingAgentSetParams = z28.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
2675
2685
|
var CodingAgentSetResult = z28.strictObject({ session: CodingSessionRecord });
|
|
2676
2686
|
var CodingAgentsAccessParams = z28.strictObject({});
|
|
@@ -3421,6 +3431,50 @@ var AppsWindowsUpdateAndReopenResult = z31.strictObject({
|
|
|
3421
3431
|
/** The version installed, null when the install did not happen (or dry_run). */
|
|
3422
3432
|
installed_version: z31.string().max(64).nullable()
|
|
3423
3433
|
});
|
|
3434
|
+
var AppsChatsCopyToAccountParams = z31.strictObject({
|
|
3435
|
+
app_key: AppKey,
|
|
3436
|
+
origin: ChatPlace,
|
|
3437
|
+
target: ChatPlace,
|
|
3438
|
+
chat_ids: z31.array(ChatId).min(1).max(500),
|
|
3439
|
+
mode: z31.enum(["copy", "move"]).default("copy"),
|
|
3440
|
+
restart: z31.enum(["queued", "restart_verify"]).default("queued"),
|
|
3441
|
+
/** Put each chat in the target group named as its origin group (default true). */
|
|
3442
|
+
mirror_groups: z31.boolean().default(true),
|
|
3443
|
+
/** Pin in the target the chats pinned in the origin (default true). */
|
|
3444
|
+
pins_follow: z31.boolean().default(true),
|
|
3445
|
+
/** A copy: group them in the origin under this name ("Copied to <target>"). */
|
|
3446
|
+
source_group: z31.string().trim().min(1).max(200).optional()
|
|
3447
|
+
});
|
|
3448
|
+
var CopiedChat = z31.strictObject({
|
|
3449
|
+
chat_id: ChatId,
|
|
3450
|
+
title: z31.string().max(500),
|
|
3451
|
+
outcome: z31.enum(["copied", "moved", "already", "skipped"]),
|
|
3452
|
+
/** The target group it was put in (its origin group's name), or null. */
|
|
3453
|
+
group: z31.string().max(200).nullable(),
|
|
3454
|
+
group_state: z31.enum(["now", "next_close", "failed"]).nullable(),
|
|
3455
|
+
pinned: z31.boolean(),
|
|
3456
|
+
pin_state: z31.enum(["now", "next_close", "failed"]).nullable(),
|
|
3457
|
+
/** The read-back: verified, waiting for a window to close (queued), or failed. */
|
|
3458
|
+
state: z31.enum(["verified", "queued", "failed"]),
|
|
3459
|
+
reason: z31.string().max(400).nullable()
|
|
3460
|
+
});
|
|
3461
|
+
var AppsChatsCopyToAccountResult = z31.strictObject({
|
|
3462
|
+
message: z31.string().max(400),
|
|
3463
|
+
origin: ChatPlace,
|
|
3464
|
+
target: ChatPlace,
|
|
3465
|
+
mode: z31.enum(["copy", "move"]),
|
|
3466
|
+
/** The marker the chats are filed under ("From <origin>"), for Bring back. */
|
|
3467
|
+
project: z31.strictObject({ id: ChatProjectId, name: z31.string().max(200) }),
|
|
3468
|
+
/** The target groups used, by name: made or reused, now or at the next close. */
|
|
3469
|
+
groups: z31.array(z31.strictObject({ name: z31.string().max(200), chats: z31.number().int().nonnegative(), ok: z31.boolean(), when: z31.enum(["now", "next_close"]).nullable(), reason: z31.string().max(400).nullable() })).max(500),
|
|
3470
|
+
source_group: z31.strictObject({ name: z31.string().max(200), ok: z31.boolean(), when: z31.enum(["now", "next_close"]).nullable(), reason: z31.string().max(400).nullable() }).nullable(),
|
|
3471
|
+
chats: z31.array(CopiedChat).max(500),
|
|
3472
|
+
verified: z31.number().int().nonnegative(),
|
|
3473
|
+
queued: z31.number().int().nonnegative(),
|
|
3474
|
+
failed: z31.number().int().nonnegative(),
|
|
3475
|
+
/** What the restart choice did: "restart_verify" closed and reopened `windows`; a fall back to "queued" says why. */
|
|
3476
|
+
restart: z31.strictObject({ asked: z31.enum(["queued", "restart_verify"]), done: z31.enum(["queued", "restart_verify"]), windows: z31.array(ChatPlace).max(2), reason: z31.string().max(400).nullable() })
|
|
3477
|
+
});
|
|
3424
3478
|
|
|
3425
3479
|
// src/schema/apps-instances.ts
|
|
3426
3480
|
import { z as z32 } from "zod";
|
|
@@ -3507,6 +3561,12 @@ var AppsAccountsListResult = z32.strictObject({
|
|
|
3507
3561
|
as_of_ms: epochMs.optional(),
|
|
3508
3562
|
refreshing: z32.boolean().optional()
|
|
3509
3563
|
});
|
|
3564
|
+
var AppsWindowsSetAccountParams = z32.strictObject({ app_key: AppKey, window: ChatPlace, email: z32.string().min(3).max(320) });
|
|
3565
|
+
var AppsWindowsForgetParams = z32.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
3566
|
+
var ProbeFact = z32.strictObject({ key: z32.string().max(200), value: z32.string().max(2e3) });
|
|
3567
|
+
var ProbeSource = z32.strictObject({ source: z32.string().max(120), instance: z32.string().max(64).nullable(), facts: z32.array(ProbeFact).max(500) });
|
|
3568
|
+
var AppsChatsProbeParams = z32.strictObject({ app_key: AppKey, chat_id: z32.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
3569
|
+
var AppsChatsProbeResult = z32.strictObject({ app_key: AppKey, chat_id: z32.string().max(128), sources: z32.array(ProbeSource).max(200) });
|
|
3510
3570
|
|
|
3511
3571
|
// src/schema/browser.ts
|
|
3512
3572
|
import { z as z33 } from "zod";
|
|
@@ -4353,9 +4413,15 @@ var OPS = {
|
|
|
4353
4413
|
// 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.
|
|
4354
4414
|
"apps.instances.list": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4355
4415
|
"apps.accounts.list": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: "unary", since: "1.47", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4416
|
+
// 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.
|
|
4417
|
+
"apps.windows.set_account": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4418
|
+
"apps.windows.forget": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4419
|
+
"apps.chats.probe": { params: AppsChatsProbeParams, result: AppsChatsProbeResult, kind: "unary", since: "1.56", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4356
4420
|
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4357
4421
|
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4358
4422
|
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4423
|
+
// 1.55: copy (or move) chats to another account with their groups and pins, in one engine pass, read back.
|
|
4424
|
+
"apps.chats.copy_to_account": { params: AppsChatsCopyToAccountParams, result: AppsChatsCopyToAccountResult, kind: "unary", since: "1.55", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4359
4425
|
"apps.projects.to_window": { params: AppsProjectsToWindowParams, result: AppsProjectsToWindowResult, kind: "unary", since: "1.19", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
4360
4426
|
// 1.11: Going cold, Spend, sync health, windows upkeep.
|
|
4361
4427
|
"apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -4441,6 +4507,8 @@ var OPS = {
|
|
|
4441
4507
|
"coding.stop": { params: CodingStopParams, result: CodingStopResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
4442
4508
|
"coding.stop_elsewhere": { params: CodingStopElsewhereParams, result: CodingStopElsewhereResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
4443
4509
|
"coding.options.set": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
4510
|
+
// 1.56: "Continue on <account>" — the session moves to another account and its stopped turn is sent again, exactly once.
|
|
4511
|
+
"coding.account.continue": { params: CodingAccountContinueParams, result: CodingAccountContinueResult, kind: "unary", since: "1.56", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4444
4512
|
"coding.agent.set": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
4445
4513
|
"coding.agents.access": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
4446
4514
|
"coding.titles.status": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|