@ai-matrx/desktop-protocol 0.21.93 → 0.21.94
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 +14 -1
- package/dist/{chunk-server-HBZSBBGI.js → chunk-server-5MKSD7FQ.js} +3 -3
- package/dist/chunk-server-5MKSD7FQ.js.map +1 -0
- package/dist/{chunk-server-FJWACRBP.js → chunk-server-PXHL7V3H.js} +3 -3
- package/dist/{chunk-server-MCBYY6QK.js → chunk-server-Q7F4IE6F.js} +9 -5
- package/dist/chunk-server-Q7F4IE6F.js.map +1 -0
- package/dist/{chunk-server-7CEUIBDY.js → chunk-server-RWKOPRNC.js} +51 -6
- package/dist/chunk-server-RWKOPRNC.js.map +1 -0
- package/dist/client.cjs +50 -8
- 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 +59 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -17
- package/dist/index.d.ts +30 -17
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/{models-BpWoHvNe.d.cts → models-D2apXuiZ.d.cts} +335 -24
- package/dist/{models-BpWoHvNe.d.ts → models-D2apXuiZ.d.ts} +335 -24
- package/dist/react.d.cts +56 -1
- package/dist/react.d.ts +56 -1
- package/generated/desktop-protocol.schema.json +209 -4
- package/package.json +2 -2
- package/dist/chunk-server-7CEUIBDY.js.map +0 -1
- package/dist/chunk-server-HBZSBBGI.js.map +0 -1
- package/dist/chunk-server-MCBYY6QK.js.map +0 -1
- /package/dist/{chunk-server-FJWACRBP.js.map → chunk-server-PXHL7V3H.js.map} +0 -0
package/dist/client.cjs
CHANGED
|
@@ -147,7 +147,7 @@ var init_primitives = __esm({
|
|
|
147
147
|
import_zod = require("zod");
|
|
148
148
|
import_uuid = require("@ai-matrx/kit/uuid");
|
|
149
149
|
PROTOCOL_MAJOR = 1;
|
|
150
|
-
PROTOCOL_MINOR =
|
|
150
|
+
PROTOCOL_MINOR = 88;
|
|
151
151
|
PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
152
152
|
ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
153
153
|
RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -243,7 +243,7 @@ var init_errors = __esm({
|
|
|
243
243
|
// 1.34 (REASONS_SINCE): the per-device tool policy (src/tools/policy.ts)
|
|
244
244
|
"tool_disabled_on_device",
|
|
245
245
|
// AUTH_FORBIDDEN: the person turned this tool off for agents on this computer (Agents › Tools)
|
|
246
|
-
// 1.76 (REASONS_SINCE): models.llm.chat
|
|
246
|
+
// 1.76 (REASONS_SINCE): models.llm.chat (1.88: models.embed names the same two)
|
|
247
247
|
"model_not_running",
|
|
248
248
|
// NOT_FOUND (nothing runs) or RESOURCE_BUSY (another model runs): start this model first
|
|
249
249
|
"model_server_unreachable"
|
|
@@ -898,7 +898,7 @@ var init_session = __esm({
|
|
|
898
898
|
});
|
|
899
899
|
|
|
900
900
|
// src/schema/models.ts
|
|
901
|
-
var import_zod10, ModelKey, TranscriptionModelId, MlRuntimeState, MlInstallPhase, MlInstallProgress, TranscriptionModelInfo, TranscriptSegment, MlStatusParams, MlStatusResult, ModelsInstallParams, ModelsInstallResult, ModelsTranscribeParams, ModelsTranscribeResult, TtsVoiceId, TtsVoice, TtsModelInfo, ModelsTtsStatusParams, ModelsTtsStatusResult, ModelsTtsInstallParams, ModelsTtsInstallResult, TtsBlendPart, ModelsTtsSpeakParams, ModelsTtsSpeakResult, TtsAudioChunk, ModelsTtsVoiceSaveParams, ModelsTtsVoiceSaveResult, ModelsTtsVoiceRemoveParams, ModelsTtsVoiceRemoveResult, MlProgress, TextModelId, TextModelInfo, UnusableTextModel, LlmServerState, LlmRunning, ModelsLlmStatusParams, ModelsLlmStatusResult, ModelsLlmInstallParams, ModelsLlmInstallResult, ModelsLlmStartParams, ModelsLlmStartResult, ModelsLlmStopParams, ModelsLlmStopResult, ModelsLlmChatParams, ModelsLlmChatResult, Sha256Hex, CatalogFile, CatalogModelEntry, LlamaServerBuild, MlCatalogSetParams, MlCatalogSetResult, DownloadKind, DownloadRow, ModelsDownloadsListParams, ModelsDownloadsListResult, ModelsDownloadsCancelParams, ModelsDownloadsCancelResult, LocalModelKind, LocalModelRow, ModelsLocalListParams, ModelsLocalListResult, ModelsLocalRemoveParams, ModelsLocalRemoveResult, MlServiceState, MlServiceStatus, ModelsStatusParams, ModelsStatusResult, ModelsProgressEvent;
|
|
901
|
+
var import_zod10, ModelKey, TranscriptionModelId, MlRuntimeState, MlInstallPhase, MlInstallProgress, TranscriptionModelInfo, TranscriptSegment, MlStatusParams, MlStatusResult, ModelsInstallParams, ModelsInstallResult, ModelsTranscribeParams, ModelsTranscribeResult, TtsVoiceId, TtsVoice, TtsModelInfo, ModelsTtsStatusParams, ModelsTtsStatusResult, ModelsTtsInstallParams, ModelsTtsInstallResult, TtsBlendPart, ModelsTtsSpeakParams, ModelsTtsSpeakResult, TtsAudioChunk, ModelsTtsVoiceSaveParams, ModelsTtsVoiceSaveResult, ModelsTtsVoiceRemoveParams, ModelsTtsVoiceRemoveResult, MlProgress, TextModelId, TextModelInfo, UnusableTextModel, LlmServerState, LlmRunning, LlmSlot, LlmEmbeddingSlot, ModelsLlmStatusParams, ModelsLlmStatusResult, ModelsLlmInstallParams, ModelsLlmInstallResult, ModelsLlmStartParams, ModelsLlmStartResult, ModelsLlmStopParams, ModelsLlmStopResult, ModelsLlmChatParams, ModelsLlmChatResult, ModelsEmbedParams, EmbeddingVector, ModelsEmbedResult, Sha256Hex, CatalogFile, CatalogModelEntry, LlamaServerBuild, MlCatalogSetParams, MlCatalogSetResult, DownloadKind, DownloadRow, ModelsDownloadsListParams, ModelsDownloadsListResult, ModelsDownloadsCancelParams, ModelsDownloadsCancelResult, LocalModelKind, LocalModelRow, ModelsLocalListParams, ModelsLocalListResult, ModelsLocalRemoveParams, ModelsLocalRemoveResult, MlServiceState, MlServiceStatus, ModelsStatusParams, ModelsStatusResult, ModelsProgressEvent;
|
|
902
902
|
var init_models = __esm({
|
|
903
903
|
"src/schema/models.ts"() {
|
|
904
904
|
"use strict";
|
|
@@ -1062,6 +1062,14 @@ var init_models = __esm({
|
|
|
1062
1062
|
gpu_layers: import_zod10.z.int().min(-1).max(999).optional(),
|
|
1063
1063
|
threads: import_zod10.z.int().min(1).max(512).optional()
|
|
1064
1064
|
});
|
|
1065
|
+
LlmSlot = import_zod10.z.enum(["chat", "embed"]);
|
|
1066
|
+
LlmEmbeddingSlot = import_zod10.z.strictObject({
|
|
1067
|
+
state: LlmServerState,
|
|
1068
|
+
models: import_zod10.z.array(TextModelInfo),
|
|
1069
|
+
running: LlmRunning.nullable(),
|
|
1070
|
+
starting: TextModelId.nullable(),
|
|
1071
|
+
error: import_zod10.z.string().max(300).nullable()
|
|
1072
|
+
});
|
|
1065
1073
|
ModelsLlmStatusParams = import_zod10.z.strictObject({});
|
|
1066
1074
|
ModelsLlmStatusResult = import_zod10.z.strictObject({
|
|
1067
1075
|
state: LlmServerState,
|
|
@@ -1077,7 +1085,9 @@ var init_models = __esm({
|
|
|
1077
1085
|
/** Non-null while the server program or a model's weights are being downloaded. */
|
|
1078
1086
|
install: MlInstallProgress.nullable(),
|
|
1079
1087
|
/** Why the last start or download failed, one human line; null otherwise. */
|
|
1080
|
-
error: import_zod10.z.string().max(300).nullable()
|
|
1088
|
+
error: import_zod10.z.string().max(300).nullable(),
|
|
1089
|
+
/** (1.88) The embeddings slot: the same model service's second llama-server, in embeddings mode, beside the chat model. */
|
|
1090
|
+
embedding: LlmEmbeddingSlot.optional()
|
|
1081
1091
|
});
|
|
1082
1092
|
ModelsLlmInstallParams = import_zod10.z.strictObject({
|
|
1083
1093
|
model: TextModelId,
|
|
@@ -1099,10 +1109,15 @@ var init_models = __esm({
|
|
|
1099
1109
|
/** (1.48) CPU threads, computed by the app from the knobs. */
|
|
1100
1110
|
threads: import_zod10.z.int().min(1).max(512).optional(),
|
|
1101
1111
|
/** (1.48) Seconds to wait for the model to load, computed by the app from the knobs. */
|
|
1102
|
-
load_timeout_s: import_zod10.z.int().min(10).max(3600).optional()
|
|
1112
|
+
load_timeout_s: import_zod10.z.int().min(10).max(3600).optional(),
|
|
1113
|
+
/** (1.88) Which slot: `chat` (default) or `embed` (the embedding model, beside the chat model; neither stops the other). */
|
|
1114
|
+
slot: LlmSlot.optional()
|
|
1103
1115
|
});
|
|
1104
1116
|
ModelsLlmStartResult = import_zod10.z.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
|
|
1105
|
-
ModelsLlmStopParams = import_zod10.z.strictObject({
|
|
1117
|
+
ModelsLlmStopParams = import_zod10.z.strictObject({
|
|
1118
|
+
/** (1.88) Which slot to stop: `chat` (default) or `embed`. */
|
|
1119
|
+
slot: LlmSlot.optional()
|
|
1120
|
+
});
|
|
1106
1121
|
ModelsLlmStopResult = import_zod10.z.strictObject({ stopped: import_zod10.z.boolean() });
|
|
1107
1122
|
ModelsLlmChatParams = import_zod10.z.strictObject({
|
|
1108
1123
|
model: TextModelId,
|
|
@@ -1112,6 +1127,23 @@ var init_models = __esm({
|
|
|
1112
1127
|
window_bytes: import_zod10.z.int().min(4096).max(16777216).optional()
|
|
1113
1128
|
});
|
|
1114
1129
|
ModelsLlmChatResult = import_zod10.z.strictObject({ model: TextModelId, content_type: import_zod10.z.string().max(128) });
|
|
1130
|
+
ModelsEmbedParams = import_zod10.z.strictObject({
|
|
1131
|
+
model: TextModelId,
|
|
1132
|
+
input: import_zod10.z.union([import_zod10.z.string().min(1).max(262144), import_zod10.z.array(import_zod10.z.string().min(1).max(262144)).min(1).max(256)]),
|
|
1133
|
+
/** Start the model in the embeddings slot first when nothing runs there (a different embedding model running is never stopped). */
|
|
1134
|
+
start_if_stopped: import_zod10.z.boolean().optional()
|
|
1135
|
+
});
|
|
1136
|
+
EmbeddingVector = import_zod10.z.strictObject({
|
|
1137
|
+
index: nonNegInt,
|
|
1138
|
+
embedding: import_zod10.z.array(import_zod10.z.number()).min(1).max(16384)
|
|
1139
|
+
});
|
|
1140
|
+
ModelsEmbedResult = import_zod10.z.strictObject({
|
|
1141
|
+
model: TextModelId,
|
|
1142
|
+
/** The vector length (every row has it). */
|
|
1143
|
+
dimensions: import_zod10.z.int().min(1).max(16384),
|
|
1144
|
+
data: import_zod10.z.array(EmbeddingVector).min(1).max(256),
|
|
1145
|
+
usage: import_zod10.z.strictObject({ prompt_tokens: nonNegInt, total_tokens: nonNegInt })
|
|
1146
|
+
});
|
|
1115
1147
|
Sha256Hex = import_zod10.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1116
1148
|
CatalogFile = import_zod10.z.strictObject({
|
|
1117
1149
|
/** Path inside the model's folder (the artifact's path_in_repo). */
|
|
@@ -1157,7 +1189,9 @@ var init_models = __esm({
|
|
|
1157
1189
|
/** (1.69) Language models on this computer that cannot run here, each with its one-line reason: models.llm.status lists them. */
|
|
1158
1190
|
unusable: import_zod10.z.array(UnusableTextModel).optional(),
|
|
1159
1191
|
/** (1.81) Text-to-speech models (Kokoro): what models.tts.* runs. */
|
|
1160
|
-
speech: import_zod10.z.array(CatalogModelEntry).optional()
|
|
1192
|
+
speech: import_zod10.z.array(CatalogModelEntry).optional(),
|
|
1193
|
+
/** (1.88) Embedding models (GGUF, run by llama-server with --embeddings in the embeddings slot): what models.embed runs. */
|
|
1194
|
+
embedding: import_zod10.z.array(CatalogModelEntry).optional()
|
|
1161
1195
|
});
|
|
1162
1196
|
MlCatalogSetResult = import_zod10.z.strictObject({ text: nonNegInt, transcription: nonNegInt });
|
|
1163
1197
|
DownloadKind = import_zod10.z.enum(["speech_model", "text_model", "runtime"]);
|
|
@@ -5847,6 +5881,7 @@ var init_registry = __esm({
|
|
|
5847
5881
|
"models.llm.start": { params: ModelsLlmStartParams, result: ModelsLlmStartResult, kind: "unary", since: "1.31", errors: ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
5848
5882
|
"models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
|
|
5849
5883
|
"models.llm.chat": { params: ModelsLlmChatParams, result: ModelsLlmChatResult, kind: "stream", since: "1.76", errors: ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "RATE_LIMITED", "INTERNAL"] },
|
|
5884
|
+
"models.embed": { params: ModelsEmbedParams, result: ModelsEmbedResult, kind: "unary", since: "1.88", errors: ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "INTERNAL"] },
|
|
5850
5885
|
"models.downloads.list": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult, kind: "unary", since: "1.45", errors: ["INTERNAL"] },
|
|
5851
5886
|
"models.downloads.cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult, kind: "unary", since: "1.45", errors: ["NOT_FOUND", "INTERNAL"] },
|
|
5852
5887
|
"models.local.list": { params: ModelsLocalListParams, result: ModelsLocalListResult, kind: "unary", since: "1.74", errors: ["INTERNAL"] },
|
|
@@ -6414,6 +6449,11 @@ var init_registry = __esm({
|
|
|
6414
6449
|
ModelsLlmStopResult,
|
|
6415
6450
|
ModelsLlmChatParams,
|
|
6416
6451
|
ModelsLlmChatResult,
|
|
6452
|
+
ModelsEmbedParams,
|
|
6453
|
+
ModelsEmbedResult,
|
|
6454
|
+
EmbeddingVector,
|
|
6455
|
+
LlmSlot,
|
|
6456
|
+
LlmEmbeddingSlot,
|
|
6417
6457
|
DownloadKind,
|
|
6418
6458
|
DownloadRow,
|
|
6419
6459
|
ModelsDownloadsListParams,
|
|
@@ -7188,7 +7228,9 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
|
|
|
7188
7228
|
// 1.67: Matrx Local's local_mac_apps result fields.
|
|
7189
7229
|
["photos.get", "PhotosGetResult"],
|
|
7190
7230
|
["location.get", "LocationGetResult"],
|
|
7191
|
-
["account.agents.restore_version", "AccountAgentsRestoreVersionResult"]
|
|
7231
|
+
["account.agents.restore_version", "AccountAgentsRestoreVersionResult"],
|
|
7232
|
+
// 1.88: the embeddings slot beside the chat model.
|
|
7233
|
+
["models.llm.status", "ModelsLlmStatusResult"]
|
|
7192
7234
|
]);
|
|
7193
7235
|
var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
7194
7236
|
["apps.chats.list", [["chats", "ChatRow"]]],
|