@ai-matrx/desktop-protocol 0.10.0 → 0.11.0
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 +11 -0
- package/README.md +10 -0
- package/dist/client.cjs +57 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +43 -3
- package/dist/client.d.ts +43 -3
- package/dist/client.js +57 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.cts +3 -294
- package/dist/index.d.ts +3 -294
- package/dist/{registry-B3NqARgh.d.cts → models-CxAHZMAM.d.cts} +292 -1
- package/dist/{registry-B3NqARgh.d.ts → models-CxAHZMAM.d.ts} +292 -1
- package/package.json +1 -1
|
@@ -3756,4 +3756,295 @@ declare const NAMED_SCHEMAS: {
|
|
|
3756
3756
|
};
|
|
3757
3757
|
type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
|
|
3758
3758
|
|
|
3759
|
-
|
|
3759
|
+
/**
|
|
3760
|
+
* @ai-matrx/desktop-protocol — the `models` capability (SPEC §6): local AI models on the device,
|
|
3761
|
+
* served by Matrx 2's `ml` Python service (SPEC §3.10). Schema source: lint-enforced rules in
|
|
3762
|
+
* scripts/check-schema-source.mjs.
|
|
3763
|
+
*
|
|
3764
|
+
* Two contracts share these shapes, both generated from this file (SPEC P11):
|
|
3765
|
+
* - the Router ops `models.*` (every transport: relay, localhost, extension, the app's screen);
|
|
3766
|
+
* - the internal service ops `ml.*` between the desktop core and the Python service
|
|
3767
|
+
* (src/schema/service.ts, `SERVICES` in registry.ts). A forwarded op uses the SAME named
|
|
3768
|
+
* schema on both hops, so the two can never disagree.
|
|
3769
|
+
*/
|
|
3770
|
+
|
|
3771
|
+
/** The heavy runtime (inference packages) is installed on first use, never shipped in the app. */
|
|
3772
|
+
declare const MlRuntimeState: z.ZodEnum<{
|
|
3773
|
+
not_installed: "not_installed";
|
|
3774
|
+
installing: "installing";
|
|
3775
|
+
installed: "installed";
|
|
3776
|
+
failed: "failed";
|
|
3777
|
+
}>;
|
|
3778
|
+
/** `packages`: the locked inference wheels; `model`: one model's weights; `verifying`: hashes and a load test. */
|
|
3779
|
+
declare const MlInstallPhase: z.ZodEnum<{
|
|
3780
|
+
model: "model";
|
|
3781
|
+
packages: "packages";
|
|
3782
|
+
verifying: "verifying";
|
|
3783
|
+
}>;
|
|
3784
|
+
declare const MlInstallProgress: z.ZodObject<{
|
|
3785
|
+
phase: z.ZodEnum<{
|
|
3786
|
+
model: "model";
|
|
3787
|
+
packages: "packages";
|
|
3788
|
+
verifying: "verifying";
|
|
3789
|
+
}>;
|
|
3790
|
+
item: z.ZodString;
|
|
3791
|
+
bytes_done: z.ZodInt;
|
|
3792
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3793
|
+
}, z.core.$strict>;
|
|
3794
|
+
declare const TranscriptionModelInfo: z.ZodObject<{
|
|
3795
|
+
id: z.ZodEnum<{
|
|
3796
|
+
tiny: "tiny";
|
|
3797
|
+
base: "base";
|
|
3798
|
+
small: "small";
|
|
3799
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3800
|
+
}>;
|
|
3801
|
+
size_bytes: z.ZodInt;
|
|
3802
|
+
multilingual: z.ZodBoolean;
|
|
3803
|
+
installed: z.ZodBoolean;
|
|
3804
|
+
}, z.core.$strict>;
|
|
3805
|
+
/** What the `ml` service itself reports (the core adds the supervisor's view in ModelsStatusResult). */
|
|
3806
|
+
declare const MlStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
3807
|
+
/** The supervisor's view of the `ml` service process. */
|
|
3808
|
+
declare const MlServiceState: z.ZodEnum<{
|
|
3809
|
+
failed: "failed";
|
|
3810
|
+
starting: "starting";
|
|
3811
|
+
ready: "ready";
|
|
3812
|
+
restarting: "restarting";
|
|
3813
|
+
stopped: "stopped";
|
|
3814
|
+
}>;
|
|
3815
|
+
declare const MlServiceStatus: z.ZodObject<{
|
|
3816
|
+
state: z.ZodEnum<{
|
|
3817
|
+
failed: "failed";
|
|
3818
|
+
starting: "starting";
|
|
3819
|
+
ready: "ready";
|
|
3820
|
+
restarting: "restarting";
|
|
3821
|
+
stopped: "stopped";
|
|
3822
|
+
}>;
|
|
3823
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
3824
|
+
restarts: z.ZodInt;
|
|
3825
|
+
python: z.ZodNullable<z.ZodString>;
|
|
3826
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3827
|
+
}, z.core.$strict>;
|
|
3828
|
+
declare const ModelsStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
3829
|
+
/** Whisper sizes the device can run (CTranslate2 weights). Larger = slower, more accurate. */
|
|
3830
|
+
declare const TranscriptionModelId: z.ZodEnum<{
|
|
3831
|
+
tiny: "tiny";
|
|
3832
|
+
base: "base";
|
|
3833
|
+
small: "small";
|
|
3834
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3835
|
+
}>;
|
|
3836
|
+
type TranscriptionModelId = z.output<typeof TranscriptionModelId>;
|
|
3837
|
+
declare const MlStatusResult: z.ZodObject<{
|
|
3838
|
+
runtime: z.ZodEnum<{
|
|
3839
|
+
not_installed: "not_installed";
|
|
3840
|
+
installing: "installing";
|
|
3841
|
+
installed: "installed";
|
|
3842
|
+
failed: "failed";
|
|
3843
|
+
}>;
|
|
3844
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3845
|
+
phase: z.ZodEnum<{
|
|
3846
|
+
model: "model";
|
|
3847
|
+
packages: "packages";
|
|
3848
|
+
verifying: "verifying";
|
|
3849
|
+
}>;
|
|
3850
|
+
item: z.ZodString;
|
|
3851
|
+
bytes_done: z.ZodInt;
|
|
3852
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3853
|
+
}, z.core.$strict>>;
|
|
3854
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3855
|
+
accelerator: z.ZodEnum<{
|
|
3856
|
+
cpu: "cpu";
|
|
3857
|
+
cuda: "cuda";
|
|
3858
|
+
}>;
|
|
3859
|
+
models: z.ZodArray<z.ZodObject<{
|
|
3860
|
+
id: z.ZodEnum<{
|
|
3861
|
+
tiny: "tiny";
|
|
3862
|
+
base: "base";
|
|
3863
|
+
small: "small";
|
|
3864
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3865
|
+
}>;
|
|
3866
|
+
size_bytes: z.ZodInt;
|
|
3867
|
+
multilingual: z.ZodBoolean;
|
|
3868
|
+
installed: z.ZodBoolean;
|
|
3869
|
+
}, z.core.$strict>>;
|
|
3870
|
+
default_model: z.ZodEnum<{
|
|
3871
|
+
tiny: "tiny";
|
|
3872
|
+
base: "base";
|
|
3873
|
+
small: "small";
|
|
3874
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3875
|
+
}>;
|
|
3876
|
+
}, z.core.$strict>;
|
|
3877
|
+
type MlStatusResult = z.output<typeof MlStatusResult>;
|
|
3878
|
+
/** A progress report while `ml.install` / `ml.transcribe` runs. */
|
|
3879
|
+
declare const MlProgress: z.ZodObject<{
|
|
3880
|
+
kind: z.ZodEnum<{
|
|
3881
|
+
install: "install";
|
|
3882
|
+
transcribe: "transcribe";
|
|
3883
|
+
}>;
|
|
3884
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
3885
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3886
|
+
phase: z.ZodEnum<{
|
|
3887
|
+
model: "model";
|
|
3888
|
+
packages: "packages";
|
|
3889
|
+
verifying: "verifying";
|
|
3890
|
+
}>;
|
|
3891
|
+
item: z.ZodString;
|
|
3892
|
+
bytes_done: z.ZodInt;
|
|
3893
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3894
|
+
}, z.core.$strict>>;
|
|
3895
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
3896
|
+
start_s: z.ZodNumber;
|
|
3897
|
+
end_s: z.ZodNumber;
|
|
3898
|
+
text: z.ZodString;
|
|
3899
|
+
}, z.core.$strict>>;
|
|
3900
|
+
}, z.core.$strict>;
|
|
3901
|
+
type MlProgress = z.output<typeof MlProgress>;
|
|
3902
|
+
declare const ModelsStatusResult: z.ZodObject<{
|
|
3903
|
+
service: z.ZodObject<{
|
|
3904
|
+
state: z.ZodEnum<{
|
|
3905
|
+
failed: "failed";
|
|
3906
|
+
starting: "starting";
|
|
3907
|
+
ready: "ready";
|
|
3908
|
+
restarting: "restarting";
|
|
3909
|
+
stopped: "stopped";
|
|
3910
|
+
}>;
|
|
3911
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
3912
|
+
restarts: z.ZodInt;
|
|
3913
|
+
python: z.ZodNullable<z.ZodString>;
|
|
3914
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3915
|
+
}, z.core.$strict>;
|
|
3916
|
+
transcription: z.ZodNullable<z.ZodObject<{
|
|
3917
|
+
runtime: z.ZodEnum<{
|
|
3918
|
+
not_installed: "not_installed";
|
|
3919
|
+
installing: "installing";
|
|
3920
|
+
installed: "installed";
|
|
3921
|
+
failed: "failed";
|
|
3922
|
+
}>;
|
|
3923
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3924
|
+
phase: z.ZodEnum<{
|
|
3925
|
+
model: "model";
|
|
3926
|
+
packages: "packages";
|
|
3927
|
+
verifying: "verifying";
|
|
3928
|
+
}>;
|
|
3929
|
+
item: z.ZodString;
|
|
3930
|
+
bytes_done: z.ZodInt;
|
|
3931
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3932
|
+
}, z.core.$strict>>;
|
|
3933
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3934
|
+
accelerator: z.ZodEnum<{
|
|
3935
|
+
cpu: "cpu";
|
|
3936
|
+
cuda: "cuda";
|
|
3937
|
+
}>;
|
|
3938
|
+
models: z.ZodArray<z.ZodObject<{
|
|
3939
|
+
id: z.ZodEnum<{
|
|
3940
|
+
tiny: "tiny";
|
|
3941
|
+
base: "base";
|
|
3942
|
+
small: "small";
|
|
3943
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3944
|
+
}>;
|
|
3945
|
+
size_bytes: z.ZodInt;
|
|
3946
|
+
multilingual: z.ZodBoolean;
|
|
3947
|
+
installed: z.ZodBoolean;
|
|
3948
|
+
}, z.core.$strict>>;
|
|
3949
|
+
default_model: z.ZodEnum<{
|
|
3950
|
+
tiny: "tiny";
|
|
3951
|
+
base: "base";
|
|
3952
|
+
small: "small";
|
|
3953
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3954
|
+
}>;
|
|
3955
|
+
}, z.core.$strict>>;
|
|
3956
|
+
}, z.core.$strict>;
|
|
3957
|
+
type ModelsStatusResult = z.output<typeof ModelsStatusResult>;
|
|
3958
|
+
/**
|
|
3959
|
+
* Transcribe an audio or video file on the device. Any format the bundled decoder reads (wav, mp3,
|
|
3960
|
+
* m4a, webm/opus, mp4…). `language` is ISO 639-1; omitted = detect. `translate` = into English.
|
|
3961
|
+
*/
|
|
3962
|
+
declare const ModelsTranscribeParams: z.ZodObject<{
|
|
3963
|
+
path: z.ZodString;
|
|
3964
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
3965
|
+
tiny: "tiny";
|
|
3966
|
+
base: "base";
|
|
3967
|
+
small: "small";
|
|
3968
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3969
|
+
}>>;
|
|
3970
|
+
language: z.ZodOptional<z.ZodString>;
|
|
3971
|
+
task: z.ZodDefault<z.ZodEnum<{
|
|
3972
|
+
transcribe: "transcribe";
|
|
3973
|
+
translate: "translate";
|
|
3974
|
+
}>>;
|
|
3975
|
+
}, z.core.$strict>;
|
|
3976
|
+
type ModelsTranscribeParams = z.output<typeof ModelsTranscribeParams>;
|
|
3977
|
+
declare const ModelsTranscribeResult: z.ZodObject<{
|
|
3978
|
+
text: z.ZodString;
|
|
3979
|
+
language: z.ZodString;
|
|
3980
|
+
language_probability: z.ZodNumber;
|
|
3981
|
+
duration_s: z.ZodNumber;
|
|
3982
|
+
model: z.ZodEnum<{
|
|
3983
|
+
tiny: "tiny";
|
|
3984
|
+
base: "base";
|
|
3985
|
+
small: "small";
|
|
3986
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3987
|
+
}>;
|
|
3988
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
3989
|
+
start_s: z.ZodNumber;
|
|
3990
|
+
end_s: z.ZodNumber;
|
|
3991
|
+
text: z.ZodString;
|
|
3992
|
+
}, z.core.$strict>>;
|
|
3993
|
+
elapsed_ms: z.ZodInt;
|
|
3994
|
+
}, z.core.$strict>;
|
|
3995
|
+
type ModelsTranscribeResult = z.output<typeof ModelsTranscribeResult>;
|
|
3996
|
+
/** Install the runtime (if missing) and one model's weights (default: the default model). */
|
|
3997
|
+
declare const ModelsInstallParams: z.ZodObject<{
|
|
3998
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
3999
|
+
tiny: "tiny";
|
|
4000
|
+
base: "base";
|
|
4001
|
+
small: "small";
|
|
4002
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
4003
|
+
}>>;
|
|
4004
|
+
}, z.core.$strict>;
|
|
4005
|
+
type ModelsInstallParams = z.output<typeof ModelsInstallParams>;
|
|
4006
|
+
declare const ModelsInstallResult: z.ZodObject<{
|
|
4007
|
+
model: z.ZodEnum<{
|
|
4008
|
+
tiny: "tiny";
|
|
4009
|
+
base: "base";
|
|
4010
|
+
small: "small";
|
|
4011
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
4012
|
+
}>;
|
|
4013
|
+
elapsed_ms: z.ZodInt;
|
|
4014
|
+
}, z.core.$strict>;
|
|
4015
|
+
type ModelsInstallResult = z.output<typeof ModelsInstallResult>;
|
|
4016
|
+
/** Sent to the client that started a `models.install` or `models.transcribe`, for that request. */
|
|
4017
|
+
declare const ModelsProgressEvent: z.ZodObject<{
|
|
4018
|
+
request_id: z.ZodString;
|
|
4019
|
+
progress: z.ZodObject<{
|
|
4020
|
+
kind: z.ZodEnum<{
|
|
4021
|
+
install: "install";
|
|
4022
|
+
transcribe: "transcribe";
|
|
4023
|
+
}>;
|
|
4024
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
4025
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
4026
|
+
phase: z.ZodEnum<{
|
|
4027
|
+
model: "model";
|
|
4028
|
+
packages: "packages";
|
|
4029
|
+
verifying: "verifying";
|
|
4030
|
+
}>;
|
|
4031
|
+
item: z.ZodString;
|
|
4032
|
+
bytes_done: z.ZodInt;
|
|
4033
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
4034
|
+
}, z.core.$strict>>;
|
|
4035
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
4036
|
+
start_s: z.ZodNumber;
|
|
4037
|
+
end_s: z.ZodNumber;
|
|
4038
|
+
text: z.ZodString;
|
|
4039
|
+
}, z.core.$strict>>;
|
|
4040
|
+
}, z.core.$strict>;
|
|
4041
|
+
}, z.core.$strict>;
|
|
4042
|
+
type ModelsProgressEvent = z.output<typeof ModelsProgressEvent>;
|
|
4043
|
+
declare const TranscriptSegment: z.ZodObject<{
|
|
4044
|
+
start_s: z.ZodNumber;
|
|
4045
|
+
end_s: z.ZodNumber;
|
|
4046
|
+
text: z.ZodString;
|
|
4047
|
+
}, z.core.$strict>;
|
|
4048
|
+
type TranscriptSegment = z.output<typeof TranscriptSegment>;
|
|
4049
|
+
|
|
4050
|
+
export { type OpSpec as $, MlInstallProgress as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, FsPatchEditFailure as F, MlRuntimeState as G, HelloMsg as H, MlServiceState as I, MlServiceStatus as J, MlStatusParams as K, Limits as L, ModelsTranscribeResult as M, MlStatusResult as N, type OpName as O, ModelsInstallParams as P, ModelsInstallResult as Q, ModelsProgressEvent as R, StreamMeta as S, TranscriptionModelId as T, ModelsStatusParams as U, ModelsStatusResult as V, Welcome as W, ModelsTranscribeParams as X, NAMED_SCHEMAS as Y, type NamedSchemaId as Z, OpDescriptor as _, type OpParams as a, PING_TEXT as a0, PONG_TEXT as a1, ProtocolErrorBody as a2, RelayMsg as a3, RequestMsg as a4, ResponseMsg as a5, SERVICES as a6, SUBPROTOCOL as a7, type ServiceId as a8, type ServiceOpName as a9, type ServiceOpSpec as aa, type ServiceSpec as ab, StreamMsg as ac, TranscriptSegment as ad, TranscriptionModelInfo as ae, closeRule as af, isTerminalClose as ag, type OpResult as b, OPS as c, EVENTS as d, ClientType as e, MlProgress as f, CLOSE_RULES as g, CancelMsg as h, isDesktopProtocolError as i, ClientToCoreMsg as j, type CloseAction as k, CloseCode as l, CloseCodeValue as m, type CloseRule as n, CoreToClientMsg as o, CreditMsg as p, EndMsg as q, ErrorCode as r, type ErrorCodeName as s, type ErrorData as t, ErrorMsg as u, ErrorReason as v, type ErrorReasonName as w, EventMsg as x, type EventName as y, MlInstallPhase as z };
|
|
@@ -3756,4 +3756,295 @@ declare const NAMED_SCHEMAS: {
|
|
|
3756
3756
|
};
|
|
3757
3757
|
type NamedSchemaId = keyof typeof NAMED_SCHEMAS;
|
|
3758
3758
|
|
|
3759
|
-
|
|
3759
|
+
/**
|
|
3760
|
+
* @ai-matrx/desktop-protocol — the `models` capability (SPEC §6): local AI models on the device,
|
|
3761
|
+
* served by Matrx 2's `ml` Python service (SPEC §3.10). Schema source: lint-enforced rules in
|
|
3762
|
+
* scripts/check-schema-source.mjs.
|
|
3763
|
+
*
|
|
3764
|
+
* Two contracts share these shapes, both generated from this file (SPEC P11):
|
|
3765
|
+
* - the Router ops `models.*` (every transport: relay, localhost, extension, the app's screen);
|
|
3766
|
+
* - the internal service ops `ml.*` between the desktop core and the Python service
|
|
3767
|
+
* (src/schema/service.ts, `SERVICES` in registry.ts). A forwarded op uses the SAME named
|
|
3768
|
+
* schema on both hops, so the two can never disagree.
|
|
3769
|
+
*/
|
|
3770
|
+
|
|
3771
|
+
/** The heavy runtime (inference packages) is installed on first use, never shipped in the app. */
|
|
3772
|
+
declare const MlRuntimeState: z.ZodEnum<{
|
|
3773
|
+
not_installed: "not_installed";
|
|
3774
|
+
installing: "installing";
|
|
3775
|
+
installed: "installed";
|
|
3776
|
+
failed: "failed";
|
|
3777
|
+
}>;
|
|
3778
|
+
/** `packages`: the locked inference wheels; `model`: one model's weights; `verifying`: hashes and a load test. */
|
|
3779
|
+
declare const MlInstallPhase: z.ZodEnum<{
|
|
3780
|
+
model: "model";
|
|
3781
|
+
packages: "packages";
|
|
3782
|
+
verifying: "verifying";
|
|
3783
|
+
}>;
|
|
3784
|
+
declare const MlInstallProgress: z.ZodObject<{
|
|
3785
|
+
phase: z.ZodEnum<{
|
|
3786
|
+
model: "model";
|
|
3787
|
+
packages: "packages";
|
|
3788
|
+
verifying: "verifying";
|
|
3789
|
+
}>;
|
|
3790
|
+
item: z.ZodString;
|
|
3791
|
+
bytes_done: z.ZodInt;
|
|
3792
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3793
|
+
}, z.core.$strict>;
|
|
3794
|
+
declare const TranscriptionModelInfo: z.ZodObject<{
|
|
3795
|
+
id: z.ZodEnum<{
|
|
3796
|
+
tiny: "tiny";
|
|
3797
|
+
base: "base";
|
|
3798
|
+
small: "small";
|
|
3799
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3800
|
+
}>;
|
|
3801
|
+
size_bytes: z.ZodInt;
|
|
3802
|
+
multilingual: z.ZodBoolean;
|
|
3803
|
+
installed: z.ZodBoolean;
|
|
3804
|
+
}, z.core.$strict>;
|
|
3805
|
+
/** What the `ml` service itself reports (the core adds the supervisor's view in ModelsStatusResult). */
|
|
3806
|
+
declare const MlStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
3807
|
+
/** The supervisor's view of the `ml` service process. */
|
|
3808
|
+
declare const MlServiceState: z.ZodEnum<{
|
|
3809
|
+
failed: "failed";
|
|
3810
|
+
starting: "starting";
|
|
3811
|
+
ready: "ready";
|
|
3812
|
+
restarting: "restarting";
|
|
3813
|
+
stopped: "stopped";
|
|
3814
|
+
}>;
|
|
3815
|
+
declare const MlServiceStatus: z.ZodObject<{
|
|
3816
|
+
state: z.ZodEnum<{
|
|
3817
|
+
failed: "failed";
|
|
3818
|
+
starting: "starting";
|
|
3819
|
+
ready: "ready";
|
|
3820
|
+
restarting: "restarting";
|
|
3821
|
+
stopped: "stopped";
|
|
3822
|
+
}>;
|
|
3823
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
3824
|
+
restarts: z.ZodInt;
|
|
3825
|
+
python: z.ZodNullable<z.ZodString>;
|
|
3826
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3827
|
+
}, z.core.$strict>;
|
|
3828
|
+
declare const ModelsStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
3829
|
+
/** Whisper sizes the device can run (CTranslate2 weights). Larger = slower, more accurate. */
|
|
3830
|
+
declare const TranscriptionModelId: z.ZodEnum<{
|
|
3831
|
+
tiny: "tiny";
|
|
3832
|
+
base: "base";
|
|
3833
|
+
small: "small";
|
|
3834
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3835
|
+
}>;
|
|
3836
|
+
type TranscriptionModelId = z.output<typeof TranscriptionModelId>;
|
|
3837
|
+
declare const MlStatusResult: z.ZodObject<{
|
|
3838
|
+
runtime: z.ZodEnum<{
|
|
3839
|
+
not_installed: "not_installed";
|
|
3840
|
+
installing: "installing";
|
|
3841
|
+
installed: "installed";
|
|
3842
|
+
failed: "failed";
|
|
3843
|
+
}>;
|
|
3844
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3845
|
+
phase: z.ZodEnum<{
|
|
3846
|
+
model: "model";
|
|
3847
|
+
packages: "packages";
|
|
3848
|
+
verifying: "verifying";
|
|
3849
|
+
}>;
|
|
3850
|
+
item: z.ZodString;
|
|
3851
|
+
bytes_done: z.ZodInt;
|
|
3852
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3853
|
+
}, z.core.$strict>>;
|
|
3854
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3855
|
+
accelerator: z.ZodEnum<{
|
|
3856
|
+
cpu: "cpu";
|
|
3857
|
+
cuda: "cuda";
|
|
3858
|
+
}>;
|
|
3859
|
+
models: z.ZodArray<z.ZodObject<{
|
|
3860
|
+
id: z.ZodEnum<{
|
|
3861
|
+
tiny: "tiny";
|
|
3862
|
+
base: "base";
|
|
3863
|
+
small: "small";
|
|
3864
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3865
|
+
}>;
|
|
3866
|
+
size_bytes: z.ZodInt;
|
|
3867
|
+
multilingual: z.ZodBoolean;
|
|
3868
|
+
installed: z.ZodBoolean;
|
|
3869
|
+
}, z.core.$strict>>;
|
|
3870
|
+
default_model: z.ZodEnum<{
|
|
3871
|
+
tiny: "tiny";
|
|
3872
|
+
base: "base";
|
|
3873
|
+
small: "small";
|
|
3874
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3875
|
+
}>;
|
|
3876
|
+
}, z.core.$strict>;
|
|
3877
|
+
type MlStatusResult = z.output<typeof MlStatusResult>;
|
|
3878
|
+
/** A progress report while `ml.install` / `ml.transcribe` runs. */
|
|
3879
|
+
declare const MlProgress: z.ZodObject<{
|
|
3880
|
+
kind: z.ZodEnum<{
|
|
3881
|
+
install: "install";
|
|
3882
|
+
transcribe: "transcribe";
|
|
3883
|
+
}>;
|
|
3884
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
3885
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3886
|
+
phase: z.ZodEnum<{
|
|
3887
|
+
model: "model";
|
|
3888
|
+
packages: "packages";
|
|
3889
|
+
verifying: "verifying";
|
|
3890
|
+
}>;
|
|
3891
|
+
item: z.ZodString;
|
|
3892
|
+
bytes_done: z.ZodInt;
|
|
3893
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3894
|
+
}, z.core.$strict>>;
|
|
3895
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
3896
|
+
start_s: z.ZodNumber;
|
|
3897
|
+
end_s: z.ZodNumber;
|
|
3898
|
+
text: z.ZodString;
|
|
3899
|
+
}, z.core.$strict>>;
|
|
3900
|
+
}, z.core.$strict>;
|
|
3901
|
+
type MlProgress = z.output<typeof MlProgress>;
|
|
3902
|
+
declare const ModelsStatusResult: z.ZodObject<{
|
|
3903
|
+
service: z.ZodObject<{
|
|
3904
|
+
state: z.ZodEnum<{
|
|
3905
|
+
failed: "failed";
|
|
3906
|
+
starting: "starting";
|
|
3907
|
+
ready: "ready";
|
|
3908
|
+
restarting: "restarting";
|
|
3909
|
+
stopped: "stopped";
|
|
3910
|
+
}>;
|
|
3911
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
3912
|
+
restarts: z.ZodInt;
|
|
3913
|
+
python: z.ZodNullable<z.ZodString>;
|
|
3914
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3915
|
+
}, z.core.$strict>;
|
|
3916
|
+
transcription: z.ZodNullable<z.ZodObject<{
|
|
3917
|
+
runtime: z.ZodEnum<{
|
|
3918
|
+
not_installed: "not_installed";
|
|
3919
|
+
installing: "installing";
|
|
3920
|
+
installed: "installed";
|
|
3921
|
+
failed: "failed";
|
|
3922
|
+
}>;
|
|
3923
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
3924
|
+
phase: z.ZodEnum<{
|
|
3925
|
+
model: "model";
|
|
3926
|
+
packages: "packages";
|
|
3927
|
+
verifying: "verifying";
|
|
3928
|
+
}>;
|
|
3929
|
+
item: z.ZodString;
|
|
3930
|
+
bytes_done: z.ZodInt;
|
|
3931
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
3932
|
+
}, z.core.$strict>>;
|
|
3933
|
+
error: z.ZodNullable<z.ZodString>;
|
|
3934
|
+
accelerator: z.ZodEnum<{
|
|
3935
|
+
cpu: "cpu";
|
|
3936
|
+
cuda: "cuda";
|
|
3937
|
+
}>;
|
|
3938
|
+
models: z.ZodArray<z.ZodObject<{
|
|
3939
|
+
id: z.ZodEnum<{
|
|
3940
|
+
tiny: "tiny";
|
|
3941
|
+
base: "base";
|
|
3942
|
+
small: "small";
|
|
3943
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3944
|
+
}>;
|
|
3945
|
+
size_bytes: z.ZodInt;
|
|
3946
|
+
multilingual: z.ZodBoolean;
|
|
3947
|
+
installed: z.ZodBoolean;
|
|
3948
|
+
}, z.core.$strict>>;
|
|
3949
|
+
default_model: z.ZodEnum<{
|
|
3950
|
+
tiny: "tiny";
|
|
3951
|
+
base: "base";
|
|
3952
|
+
small: "small";
|
|
3953
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3954
|
+
}>;
|
|
3955
|
+
}, z.core.$strict>>;
|
|
3956
|
+
}, z.core.$strict>;
|
|
3957
|
+
type ModelsStatusResult = z.output<typeof ModelsStatusResult>;
|
|
3958
|
+
/**
|
|
3959
|
+
* Transcribe an audio or video file on the device. Any format the bundled decoder reads (wav, mp3,
|
|
3960
|
+
* m4a, webm/opus, mp4…). `language` is ISO 639-1; omitted = detect. `translate` = into English.
|
|
3961
|
+
*/
|
|
3962
|
+
declare const ModelsTranscribeParams: z.ZodObject<{
|
|
3963
|
+
path: z.ZodString;
|
|
3964
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
3965
|
+
tiny: "tiny";
|
|
3966
|
+
base: "base";
|
|
3967
|
+
small: "small";
|
|
3968
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3969
|
+
}>>;
|
|
3970
|
+
language: z.ZodOptional<z.ZodString>;
|
|
3971
|
+
task: z.ZodDefault<z.ZodEnum<{
|
|
3972
|
+
transcribe: "transcribe";
|
|
3973
|
+
translate: "translate";
|
|
3974
|
+
}>>;
|
|
3975
|
+
}, z.core.$strict>;
|
|
3976
|
+
type ModelsTranscribeParams = z.output<typeof ModelsTranscribeParams>;
|
|
3977
|
+
declare const ModelsTranscribeResult: z.ZodObject<{
|
|
3978
|
+
text: z.ZodString;
|
|
3979
|
+
language: z.ZodString;
|
|
3980
|
+
language_probability: z.ZodNumber;
|
|
3981
|
+
duration_s: z.ZodNumber;
|
|
3982
|
+
model: z.ZodEnum<{
|
|
3983
|
+
tiny: "tiny";
|
|
3984
|
+
base: "base";
|
|
3985
|
+
small: "small";
|
|
3986
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
3987
|
+
}>;
|
|
3988
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
3989
|
+
start_s: z.ZodNumber;
|
|
3990
|
+
end_s: z.ZodNumber;
|
|
3991
|
+
text: z.ZodString;
|
|
3992
|
+
}, z.core.$strict>>;
|
|
3993
|
+
elapsed_ms: z.ZodInt;
|
|
3994
|
+
}, z.core.$strict>;
|
|
3995
|
+
type ModelsTranscribeResult = z.output<typeof ModelsTranscribeResult>;
|
|
3996
|
+
/** Install the runtime (if missing) and one model's weights (default: the default model). */
|
|
3997
|
+
declare const ModelsInstallParams: z.ZodObject<{
|
|
3998
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
3999
|
+
tiny: "tiny";
|
|
4000
|
+
base: "base";
|
|
4001
|
+
small: "small";
|
|
4002
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
4003
|
+
}>>;
|
|
4004
|
+
}, z.core.$strict>;
|
|
4005
|
+
type ModelsInstallParams = z.output<typeof ModelsInstallParams>;
|
|
4006
|
+
declare const ModelsInstallResult: z.ZodObject<{
|
|
4007
|
+
model: z.ZodEnum<{
|
|
4008
|
+
tiny: "tiny";
|
|
4009
|
+
base: "base";
|
|
4010
|
+
small: "small";
|
|
4011
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
4012
|
+
}>;
|
|
4013
|
+
elapsed_ms: z.ZodInt;
|
|
4014
|
+
}, z.core.$strict>;
|
|
4015
|
+
type ModelsInstallResult = z.output<typeof ModelsInstallResult>;
|
|
4016
|
+
/** Sent to the client that started a `models.install` or `models.transcribe`, for that request. */
|
|
4017
|
+
declare const ModelsProgressEvent: z.ZodObject<{
|
|
4018
|
+
request_id: z.ZodString;
|
|
4019
|
+
progress: z.ZodObject<{
|
|
4020
|
+
kind: z.ZodEnum<{
|
|
4021
|
+
install: "install";
|
|
4022
|
+
transcribe: "transcribe";
|
|
4023
|
+
}>;
|
|
4024
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
4025
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
4026
|
+
phase: z.ZodEnum<{
|
|
4027
|
+
model: "model";
|
|
4028
|
+
packages: "packages";
|
|
4029
|
+
verifying: "verifying";
|
|
4030
|
+
}>;
|
|
4031
|
+
item: z.ZodString;
|
|
4032
|
+
bytes_done: z.ZodInt;
|
|
4033
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
4034
|
+
}, z.core.$strict>>;
|
|
4035
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
4036
|
+
start_s: z.ZodNumber;
|
|
4037
|
+
end_s: z.ZodNumber;
|
|
4038
|
+
text: z.ZodString;
|
|
4039
|
+
}, z.core.$strict>>;
|
|
4040
|
+
}, z.core.$strict>;
|
|
4041
|
+
}, z.core.$strict>;
|
|
4042
|
+
type ModelsProgressEvent = z.output<typeof ModelsProgressEvent>;
|
|
4043
|
+
declare const TranscriptSegment: z.ZodObject<{
|
|
4044
|
+
start_s: z.ZodNumber;
|
|
4045
|
+
end_s: z.ZodNumber;
|
|
4046
|
+
text: z.ZodString;
|
|
4047
|
+
}, z.core.$strict>;
|
|
4048
|
+
type TranscriptSegment = z.output<typeof TranscriptSegment>;
|
|
4049
|
+
|
|
4050
|
+
export { type OpSpec as $, MlInstallProgress as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, FsPatchEditFailure as F, MlRuntimeState as G, HelloMsg as H, MlServiceState as I, MlServiceStatus as J, MlStatusParams as K, Limits as L, ModelsTranscribeResult as M, MlStatusResult as N, type OpName as O, ModelsInstallParams as P, ModelsInstallResult as Q, ModelsProgressEvent as R, StreamMeta as S, TranscriptionModelId as T, ModelsStatusParams as U, ModelsStatusResult as V, Welcome as W, ModelsTranscribeParams as X, NAMED_SCHEMAS as Y, type NamedSchemaId as Z, OpDescriptor as _, type OpParams as a, PING_TEXT as a0, PONG_TEXT as a1, ProtocolErrorBody as a2, RelayMsg as a3, RequestMsg as a4, ResponseMsg as a5, SERVICES as a6, SUBPROTOCOL as a7, type ServiceId as a8, type ServiceOpName as a9, type ServiceOpSpec as aa, type ServiceSpec as ab, StreamMsg as ac, TranscriptSegment as ad, TranscriptionModelInfo as ae, closeRule as af, isTerminalClose as ag, type OpResult as b, OPS as c, EVENTS as d, ClientType as e, MlProgress as f, CLOSE_RULES as g, CancelMsg as h, isDesktopProtocolError as i, ClientToCoreMsg as j, type CloseAction as k, CloseCode as l, CloseCodeValue as m, type CloseRule as n, CoreToClientMsg as o, CreditMsg as p, EndMsg as q, ErrorCode as r, type ErrorCodeName as s, type ErrorData as t, ErrorMsg as u, ErrorReason as v, type ErrorReasonName as w, EventMsg as x, type EventName as y, MlInstallPhase as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/desktop-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The one wire contract between Matrx 2 (the desktop app) and every client that drives it — phone, web app, extension, server: zod schemas for the envelope and every cap.op, the 16-byte binary frame codec, a reconnecting request/stream/credit/reattach client, React hooks, and a generated JSON Schema + Pydantic twin that CI keeps byte-identical.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|