@ai-matrx/desktop-protocol 0.21.96 → 0.21.98
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 +24 -1
- package/dist/{chunk-server-UNRE6WGX.js → chunk-server-4H74IJI4.js} +3 -3
- package/dist/{chunk-server-46JNNDT7.js → chunk-server-ATU4VUHA.js} +6 -4
- package/dist/chunk-server-ATU4VUHA.js.map +1 -0
- package/dist/{chunk-server-HU5BCBEF.js → chunk-server-I5MQ4EET.js} +4 -2
- package/dist/{chunk-server-HU5BCBEF.js.map → chunk-server-I5MQ4EET.js.map} +1 -1
- package/dist/{chunk-server-IHK7SYRO.js → chunk-server-M4ZZLI5M.js} +8 -3
- package/dist/chunk-server-M4ZZLI5M.js.map +1 -0
- package/dist/client.cjs +9 -2
- 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 +3 -3
- package/dist/index.cjs +14 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +269 -253
- package/dist/index.d.ts +269 -253
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{models-CW7-r8m4.d.cts → models-DDuVPiOe.d.cts} +493 -469
- package/dist/{models-CW7-r8m4.d.ts → models-DDuVPiOe.d.ts} +493 -469
- package/dist/react.d.cts +3 -1
- package/dist/react.d.ts +3 -1
- package/fixtures/device-model-contract.json +37 -0
- package/generated/desktop-protocol.schema.json +16 -3
- package/package.json +3 -2
- package/dist/chunk-server-46JNNDT7.js.map +0 -1
- package/dist/chunk-server-IHK7SYRO.js.map +0 -1
- /package/dist/{chunk-server-UNRE6WGX.js.map → chunk-server-4H74IJI4.js.map} +0 -0
package/dist/client.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult } from './models-
|
|
4
|
+
import { D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult } from './models-DDuVPiOe.cjs';
|
|
5
5
|
import { Welcome, CloseOutcome, OPS, StreamMeta, EndReason, EVENTS, ClientType, ModelsTranscribeResult, TranscriptionModelId, MlProgress } from './index.cjs';
|
|
6
|
-
export { i as isDesktopProtocolError } from './models-
|
|
6
|
+
export { i as isDesktopProtocolError } from './models-DDuVPiOe.cjs';
|
|
7
7
|
import { FrameHeader } from './frame.cjs';
|
|
8
8
|
|
|
9
9
|
/** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult } from './models-
|
|
4
|
+
import { D as DesktopProtocolError, O as OpName, a as OpParams, b as OpResult } from './models-DDuVPiOe.js';
|
|
5
5
|
import { Welcome, CloseOutcome, OPS, StreamMeta, EndReason, EVENTS, ClientType, ModelsTranscribeResult, TranscriptionModelId, MlProgress } from './index.js';
|
|
6
|
-
export { i as isDesktopProtocolError } from './models-
|
|
6
|
+
export { i as isDesktopProtocolError } from './models-DDuVPiOe.js';
|
|
7
7
|
import { FrameHeader } from './frame.js';
|
|
8
8
|
|
|
9
9
|
/** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
closeRule,
|
|
3
3
|
knows
|
|
4
|
-
} from "./chunk-server-
|
|
4
|
+
} from "./chunk-server-ATU4VUHA.js";
|
|
5
5
|
import {
|
|
6
6
|
CloseCode,
|
|
7
7
|
CoreToClientMsg,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
PROTOCOL_MAJOR,
|
|
13
13
|
PROTOCOL_MINOR,
|
|
14
14
|
Welcome
|
|
15
|
-
} from "./chunk-server-
|
|
15
|
+
} from "./chunk-server-M4ZZLI5M.js";
|
|
16
16
|
import {
|
|
17
17
|
DesktopProtocolError,
|
|
18
18
|
FRAME_VERSION,
|
|
@@ -28,7 +28,7 @@ var registry = null;
|
|
|
28
28
|
var registryLoad = null;
|
|
29
29
|
function loadRegistry() {
|
|
30
30
|
if (registry) return Promise.resolve(registry);
|
|
31
|
-
registryLoad ??= import("./chunk-server-
|
|
31
|
+
registryLoad ??= import("./chunk-server-4H74IJI4.js").then((m) => registry = m);
|
|
32
32
|
return registryLoad;
|
|
33
33
|
}
|
|
34
34
|
var WS_OPEN = 1;
|
package/dist/index.cjs
CHANGED
|
@@ -1053,7 +1053,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
1053
1053
|
var import_zod = require("zod");
|
|
1054
1054
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
1055
1055
|
var PROTOCOL_MAJOR = 1;
|
|
1056
|
-
var PROTOCOL_MINOR =
|
|
1056
|
+
var PROTOCOL_MINOR = 92;
|
|
1057
1057
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
1058
1058
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
1059
1059
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1145,8 +1145,11 @@ var ErrorReason = import_zod2.z.enum([
|
|
|
1145
1145
|
// 1.76 (REASONS_SINCE): models.llm.chat (1.88: models.embed names the same two)
|
|
1146
1146
|
"model_not_running",
|
|
1147
1147
|
// NOT_FOUND (nothing runs) or RESOURCE_BUSY (another model runs): start this model first
|
|
1148
|
-
"model_server_unreachable"
|
|
1148
|
+
"model_server_unreachable",
|
|
1149
1149
|
// RESOURCE_GONE (retryable): llama-server did not answer on this computer
|
|
1150
|
+
// 1.91 (REASONS_SINCE): models.llm.chat with start_if_stopped when another model answers a live chat
|
|
1151
|
+
"busy_with_another_chat"
|
|
1152
|
+
// RESOURCE_BUSY (retryable): the loaded model is answering another chat now; data.chat_title names it
|
|
1150
1153
|
]);
|
|
1151
1154
|
var FsPatchEditFailure = import_zod2.z.strictObject({ edit_index: nonNegInt, reason: import_zod2.z.string().max(300) });
|
|
1152
1155
|
var ProtocolErrorBody = import_zod2.z.strictObject({
|
|
@@ -1162,6 +1165,8 @@ var ProtocolErrorBody = import_zod2.z.strictObject({
|
|
|
1162
1165
|
settings_url: import_zod2.z.string().max(512).optional(),
|
|
1163
1166
|
// PERMISSION_DENIED_OS deep link
|
|
1164
1167
|
retry_after_ms: nonNegInt.optional(),
|
|
1168
|
+
/** (1.91) busy_with_another_chat: the title of the chat the loaded model is answering now, in words a person reads. */
|
|
1169
|
+
chat_title: import_zod2.z.string().max(200).optional(),
|
|
1165
1170
|
limit_bytes: nonNegInt.optional(),
|
|
1166
1171
|
/** fs.patch when every edit failed (CONFLICT, patch_no_match / patch_ambiguous): the daemon's 422 `failures`. */
|
|
1167
1172
|
edits_failed: import_zod2.z.array(FsPatchEditFailure).max(256).optional(),
|
|
@@ -2190,6 +2195,8 @@ var ModelsLlmChatParams = import_zod11.z.strictObject({
|
|
|
2190
2195
|
body: import_zod11.z.record(import_zod11.z.string().max(200), import_zod11.z.unknown()),
|
|
2191
2196
|
/** Start the model first when nothing runs (a `models` progress event says so); a different model running is never stopped. */
|
|
2192
2197
|
start_if_stopped: import_zod11.z.boolean().optional(),
|
|
2198
|
+
/** (1.92) The title of the chat this completion belongs to: named in the busy refusal to another chat that finds this model answering it. */
|
|
2199
|
+
chat_title: import_zod11.z.string().max(200).optional(),
|
|
2193
2200
|
window_bytes: import_zod11.z.int().min(4096).max(16777216).optional()
|
|
2194
2201
|
});
|
|
2195
2202
|
var ModelsLlmChatResult = import_zod11.z.strictObject({ model: TextModelId, content_type: import_zod11.z.string().max(128) });
|
|
@@ -7966,10 +7973,11 @@ var FIELDS_SINCE = {
|
|
|
7966
7973
|
MlCatalogSetParams: { unusable: "1.69", speech: "1.81", embedding: "1.88", wake: "1.89" },
|
|
7967
7974
|
ModelsLlmStatusResult: { embedding: "1.88" },
|
|
7968
7975
|
ModelsLlmStopParams: { slot: "1.88" },
|
|
7976
|
+
ModelsLlmChatParams: { chat_title: "1.92" },
|
|
7969
7977
|
MlProgress: { audio: "1.81" },
|
|
7970
7978
|
ModelsLlmStartParams: { gpu_layers: "1.48", threads: "1.48", load_timeout_s: "1.48", slot: "1.88" },
|
|
7971
7979
|
FsPatchResult: { edits_applied: "1.1", edits_failed: "1.1" },
|
|
7972
|
-
"ProtocolErrorBody.data": { edits_failed: "1.1" },
|
|
7980
|
+
"ProtocolErrorBody.data": { edits_failed: "1.1", chat_title: "1.91" },
|
|
7973
7981
|
"RelayCallResponse|0": { protocol_version: "1.1" },
|
|
7974
7982
|
"RelayCallResponse|1": { protocol_version: "1.1" },
|
|
7975
7983
|
WindowInfo: { app: "1.7", pid: "1.7" },
|
|
@@ -8062,7 +8070,8 @@ var REASONS_SINCE = {
|
|
|
8062
8070
|
awaiting_confirmation: "1.28",
|
|
8063
8071
|
tool_disabled_on_device: "1.34",
|
|
8064
8072
|
model_not_running: "1.76",
|
|
8065
|
-
model_server_unreachable: "1.76"
|
|
8073
|
+
model_server_unreachable: "1.76",
|
|
8074
|
+
busy_with_another_chat: "1.91"
|
|
8066
8075
|
};
|
|
8067
8076
|
var PERMISSIONS_SINCE = {
|
|
8068
8077
|
reminders: "1.41",
|
|
@@ -8317,7 +8326,7 @@ function forPeer(op, part, value, version) {
|
|
|
8317
8326
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
8318
8327
|
|
|
8319
8328
|
// src/contract.ts
|
|
8320
|
-
var CONTRACT_SHA256 = "
|
|
8329
|
+
var CONTRACT_SHA256 = "fa1b067e62a843a47cd663a87888c625674630db84ad3c4f18392a269dc756c2";
|
|
8321
8330
|
|
|
8322
8331
|
// src/close-policy.ts
|
|
8323
8332
|
var CLOSE_RULES = {
|