@ai-matrx/desktop-protocol 0.21.74 → 0.21.76
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 +34 -1
- package/dist/{chunk-server-3L5JNEHY.js → chunk-server-HOQE4M4I.js} +58 -9
- package/dist/chunk-server-HOQE4M4I.js.map +1 -0
- package/dist/client.cjs +43 -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 +1 -1
- package/dist/index.cjs +58 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-BRm_O6a-.d.cts → models-Bz88NHi0.d.cts} +195 -2
- package/dist/{models-BRm_O6a-.d.ts → models-Bz88NHi0.d.ts} +195 -2
- package/dist/react.d.cts +43 -0
- package/dist/react.d.ts +43 -0
- package/generated/desktop-protocol.schema.json +164 -7
- package/package.json +2 -2
- package/dist/chunk-server-3L5JNEHY.js.map +0 -1
package/dist/client.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var import_zod2 = require("zod");
|
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
146
146
|
var PROTOCOL_MAJOR = 1;
|
|
147
|
-
var PROTOCOL_MINOR =
|
|
147
|
+
var PROTOCOL_MINOR = 75;
|
|
148
148
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
149
149
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
150
150
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -829,7 +829,8 @@ var MlStatusResult = import_zod9.z.strictObject({
|
|
|
829
829
|
error: import_zod9.z.string().max(300).nullable(),
|
|
830
830
|
/** Where inference runs once the runtime is installed: `cuda` only when a usable GPU is present. */
|
|
831
831
|
accelerator: import_zod9.z.enum(["cpu", "cuda"]),
|
|
832
|
-
|
|
832
|
+
/** Every transcription model in the catalog (1.74: unbounded; a bound here silently dropped models past 16). */
|
|
833
|
+
models: import_zod9.z.array(TranscriptionModelInfo),
|
|
833
834
|
default_model: TranscriptionModelId
|
|
834
835
|
});
|
|
835
836
|
var ModelsInstallParams = import_zod9.z.strictObject({ model: TranscriptionModelId.optional() });
|
|
@@ -892,9 +893,10 @@ var ModelsLlmStatusResult = import_zod9.z.strictObject({
|
|
|
892
893
|
state: LlmServerState,
|
|
893
894
|
/**
|
|
894
895
|
* Every language model: (1.69) the ones on this computer first (installed, then those that cannot run
|
|
895
|
-
* here, each with its `problem`), then the rest of the catalog.
|
|
896
|
+
* here, each with its `problem`), then the rest of the catalog. Every one: unbounded since 1.74
|
|
897
|
+
* (64 until 1.69, 1024 until 1.74; a bound silently cut off models).
|
|
896
898
|
*/
|
|
897
|
-
models: import_zod9.z.array(TextModelInfo)
|
|
899
|
+
models: import_zod9.z.array(TextModelInfo),
|
|
898
900
|
running: LlmRunning.nullable(),
|
|
899
901
|
/** The model being loaded while `state` is "starting". */
|
|
900
902
|
starting: TextModelId.nullable(),
|
|
@@ -961,8 +963,9 @@ var LlamaServerBuild = import_zod9.z.strictObject({
|
|
|
961
963
|
sha256: Sha256Hex
|
|
962
964
|
});
|
|
963
965
|
var MlCatalogSetParams = import_zod9.z.strictObject({
|
|
964
|
-
|
|
965
|
-
|
|
966
|
+
/** (1.74) Unbounded, like every models list: a catalog or a person's own models are never cut off. */
|
|
967
|
+
text: import_zod9.z.array(CatalogModelEntry),
|
|
968
|
+
transcription: import_zod9.z.array(CatalogModelEntry),
|
|
966
969
|
/** Null where the catalog has no build for this os/arch (installs then say so). */
|
|
967
970
|
llama_server: LlamaServerBuild.nullable(),
|
|
968
971
|
/** The knob desktop.models/default_transcription_model; null when the knob could not be read (a transcribe naming no model then says so). */
|
|
@@ -970,7 +973,7 @@ var MlCatalogSetParams = import_zod9.z.strictObject({
|
|
|
970
973
|
/** When the catalog was last changed (catalog_updated_at), for the service's log. */
|
|
971
974
|
catalog_updated_at: import_zod9.z.string().max(40),
|
|
972
975
|
/** (1.69) Language models on this computer that cannot run here, each with its one-line reason: models.llm.status lists them. */
|
|
973
|
-
unusable: import_zod9.z.array(UnusableTextModel).
|
|
976
|
+
unusable: import_zod9.z.array(UnusableTextModel).optional()
|
|
974
977
|
});
|
|
975
978
|
var MlCatalogSetResult = import_zod9.z.strictObject({ text: nonNegInt, transcription: nonNegInt });
|
|
976
979
|
var DownloadKind = import_zod9.z.enum(["speech_model", "text_model", "runtime"]);
|
|
@@ -995,9 +998,39 @@ var DownloadRow = import_zod9.z.strictObject({
|
|
|
995
998
|
error: import_zod9.z.string().max(300).optional()
|
|
996
999
|
});
|
|
997
1000
|
var ModelsDownloadsListParams = import_zod9.z.strictObject({});
|
|
998
|
-
var ModelsDownloadsListResult = import_zod9.z.strictObject({ downloads: import_zod9.z.array(DownloadRow)
|
|
1001
|
+
var ModelsDownloadsListResult = import_zod9.z.strictObject({ downloads: import_zod9.z.array(DownloadRow) });
|
|
999
1002
|
var ModelsDownloadsCancelParams = import_zod9.z.strictObject({ key: import_zod9.z.string().max(64) });
|
|
1000
1003
|
var ModelsDownloadsCancelResult = import_zod9.z.strictObject({ cancelled: import_zod9.z.boolean() });
|
|
1004
|
+
var LocalModelKind = import_zod9.z.enum(["text", "speech"]);
|
|
1005
|
+
var LocalModelRow = import_zod9.z.strictObject({
|
|
1006
|
+
kind: LocalModelKind,
|
|
1007
|
+
model: ModelKey,
|
|
1008
|
+
/** Its folder in the service's store. */
|
|
1009
|
+
path: import_zod9.z.string().max(1024),
|
|
1010
|
+
/** Every file of the model, as installed. */
|
|
1011
|
+
size_bytes: nonNegInt,
|
|
1012
|
+
/** What Remove frees: the files only Matrx 2 holds. A file linked from the person's own folder frees nothing. */
|
|
1013
|
+
freed_bytes: nonNegInt,
|
|
1014
|
+
/** True when any file is a link to a file elsewhere (used in place): Remove then never deletes that file. */
|
|
1015
|
+
in_place: import_zod9.z.boolean(),
|
|
1016
|
+
/** The folder the person's files stay in (in place), when the service can tell; null otherwise. */
|
|
1017
|
+
source: import_zod9.z.string().max(1024).nullable(),
|
|
1018
|
+
/** The language model the server runs now (Remove stops it first). */
|
|
1019
|
+
running: import_zod9.z.boolean()
|
|
1020
|
+
});
|
|
1021
|
+
var ModelsLocalListParams = import_zod9.z.strictObject({});
|
|
1022
|
+
var ModelsLocalListResult = import_zod9.z.strictObject({ models: import_zod9.z.array(LocalModelRow) });
|
|
1023
|
+
var ModelsLocalRemoveParams = import_zod9.z.strictObject({ kind: LocalModelKind, model: ModelKey });
|
|
1024
|
+
var ModelsLocalRemoveResult = import_zod9.z.strictObject({
|
|
1025
|
+
kind: LocalModelKind,
|
|
1026
|
+
model: ModelKey,
|
|
1027
|
+
/** Bytes of disk the removal gave back (0 for a model used in place). */
|
|
1028
|
+
freed_bytes: nonNegInt,
|
|
1029
|
+
/** True when it was the running model and the server was stopped first. */
|
|
1030
|
+
stopped: import_zod9.z.boolean(),
|
|
1031
|
+
/** Where the person's files stay (a model used in place); null when nothing was kept. */
|
|
1032
|
+
kept: import_zod9.z.string().max(1024).nullable()
|
|
1033
|
+
});
|
|
1001
1034
|
var MlServiceState = import_zod9.z.enum(["starting", "ready", "restarting", "failed", "stopped"]);
|
|
1002
1035
|
var MlServiceStatus = import_zod9.z.strictObject({
|
|
1003
1036
|
state: MlServiceState,
|
|
@@ -4780,6 +4813,8 @@ var OPS = {
|
|
|
4780
4813
|
"models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
|
|
4781
4814
|
"models.downloads.list": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult, kind: "unary", since: "1.45", errors: ["INTERNAL"] },
|
|
4782
4815
|
"models.downloads.cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult, kind: "unary", since: "1.45", errors: ["NOT_FOUND", "INTERNAL"] },
|
|
4816
|
+
"models.local.list": { params: ModelsLocalListParams, result: ModelsLocalListResult, kind: "unary", since: "1.74", errors: ["INTERNAL"] },
|
|
4817
|
+
"models.local.remove": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult, kind: "unary", since: "1.74", errors: ["NOT_FOUND", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"] },
|
|
4783
4818
|
// Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.
|
|
4784
4819
|
"apps.list": { params: AppsListParams, result: AppsListResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
|
|
4785
4820
|
"apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },
|