@ai-matrx/desktop-protocol 0.7.0 → 0.10.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 +53 -0
- package/README.md +13 -0
- package/dist/client.cjs +230 -30
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -2
- package/dist/client.d.ts +7 -2
- package/dist/client.js +230 -30
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +747 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1048 -5
- package/dist/index.d.ts +1048 -5
- package/dist/index.js +747 -5
- package/dist/index.js.map +1 -1
- package/dist/react.d.cts +286 -1
- package/dist/react.d.ts +286 -1
- package/dist/{registry-Duc_VFN8.d.cts → registry-B3NqARgh.d.cts} +1224 -3
- package/dist/{registry-Duc_VFN8.d.ts → registry-B3NqARgh.d.ts} +1224 -3
- package/generated/desktop-protocol.schema.json +4554 -0
- package/package.json +3 -1
- package/scripts/gen_pydantic.py +335 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './registry-
|
|
3
|
-
export { B as BEARER_PREFIX, f as CLOSE_RULES, g as CancelMsg, h as ClientToCoreMsg, e as ClientType, j as CloseAction, k as CloseCode, l as CloseCodeValue, C as CloseOutcome, m as CloseRule, n as CoreToClientMsg, o as CreditMsg, D as DesktopProtocolError, d as EVENTS, p as EndMsg, E as EndReason, q as ErrorCode, r as ErrorCodeName, s as ErrorData, t as ErrorMsg, u as ErrorReason, v as ErrorReasonName, w as EventMsg, x as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, N as NAMED_SCHEMAS, y as NamedSchemaId, c as OPS, z as OpDescriptor, a as OpParams, b as OpResult, A as OpSpec, P as PING_TEXT, G as PONG_TEXT, I as ProtocolErrorBody, R as RelayMsg, J as RequestMsg, K as ResponseMsg, M as SUBPROTOCOL, S as StreamMeta,
|
|
2
|
+
import { O as OpName } from './registry-B3NqARgh.js';
|
|
3
|
+
export { B as BEARER_PREFIX, f as CLOSE_RULES, g as CancelMsg, h as ClientToCoreMsg, e as ClientType, j as CloseAction, k as CloseCode, l as CloseCodeValue, C as CloseOutcome, m as CloseRule, n as CoreToClientMsg, o as CreditMsg, D as DesktopProtocolError, d as EVENTS, p as EndMsg, E as EndReason, q as ErrorCode, r as ErrorCodeName, s as ErrorData, t as ErrorMsg, u as ErrorReason, v as ErrorReasonName, w as EventMsg, x as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, N as NAMED_SCHEMAS, y as NamedSchemaId, c as OPS, z as OpDescriptor, a as OpParams, b as OpResult, A as OpSpec, P as PING_TEXT, G as PONG_TEXT, I as ProtocolErrorBody, R as RelayMsg, J as RequestMsg, K as ResponseMsg, M as SERVICES, Q as SUBPROTOCOL, T as ServiceId, U as ServiceOpName, V as ServiceOpSpec, X as ServiceSpec, S as StreamMeta, Y as StreamMsg, W as Welcome, Z as closeRule, i as isDesktopProtocolError, _ as isTerminalClose } from './registry-B3NqARgh.js';
|
|
4
4
|
export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.js';
|
|
5
5
|
|
|
6
6
|
/** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
@@ -11,10 +11,12 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
11
11
|
* 1.0 — the first contract.
|
|
12
12
|
* 1.1 — fs.patch per-edit results; /call reports the negotiated version;
|
|
13
13
|
* device status since_ms is null for a device that never connected.
|
|
14
|
+
* 1.2 — the `models` capability (local transcription) and its error reasons (REASONS_SINCE);
|
|
15
|
+
* the `apps` capability (desktop apps, their profiles and usage).
|
|
14
16
|
*/
|
|
15
|
-
declare const PROTOCOL_MINOR:
|
|
17
|
+
declare const PROTOCOL_MINOR: 2;
|
|
16
18
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
17
|
-
declare const PROTOCOL_VERSION: "1.
|
|
19
|
+
declare const PROTOCOL_VERSION: "1.2";
|
|
18
20
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
19
21
|
declare const u32: z.ZodInt;
|
|
20
22
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -986,6 +988,13 @@ declare const RelayCallResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
986
988
|
resource_expired: "resource_expired";
|
|
987
989
|
control_taken: "control_taken";
|
|
988
990
|
window_exhausted: "window_exhausted";
|
|
991
|
+
runtime_not_installed: "runtime_not_installed";
|
|
992
|
+
model_not_installed: "model_not_installed";
|
|
993
|
+
unsupported_media: "unsupported_media";
|
|
994
|
+
download_failed: "download_failed";
|
|
995
|
+
service_starting: "service_starting";
|
|
996
|
+
service_restarted: "service_restarted";
|
|
997
|
+
service_failed: "service_failed";
|
|
989
998
|
}>>;
|
|
990
999
|
cap: z.ZodOptional<z.ZodString>;
|
|
991
1000
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -1032,6 +1041,898 @@ declare const RelayCallEnvelope: z.ZodObject<{
|
|
|
1032
1041
|
}, z.core.$strict>;
|
|
1033
1042
|
type RelayCallEnvelope = z.output<typeof RelayCallEnvelope>;
|
|
1034
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* @ai-matrx/desktop-protocol — the `models` capability (SPEC §6): local AI models on the device,
|
|
1046
|
+
* served by Matrx 2's `ml` Python service (SPEC §3.10). Schema source: lint-enforced rules in
|
|
1047
|
+
* scripts/check-schema-source.mjs.
|
|
1048
|
+
*
|
|
1049
|
+
* Two contracts share these shapes, both generated from this file (SPEC P11):
|
|
1050
|
+
* - the Router ops `models.*` (every transport: relay, localhost, extension, the app's screen);
|
|
1051
|
+
* - the internal service ops `ml.*` between the desktop core and the Python service
|
|
1052
|
+
* (src/schema/service.ts, `SERVICES` in registry.ts). A forwarded op uses the SAME named
|
|
1053
|
+
* schema on both hops, so the two can never disagree.
|
|
1054
|
+
*/
|
|
1055
|
+
|
|
1056
|
+
/** The heavy runtime (inference packages) is installed on first use, never shipped in the app. */
|
|
1057
|
+
declare const MlRuntimeState: z.ZodEnum<{
|
|
1058
|
+
not_installed: "not_installed";
|
|
1059
|
+
installing: "installing";
|
|
1060
|
+
installed: "installed";
|
|
1061
|
+
failed: "failed";
|
|
1062
|
+
}>;
|
|
1063
|
+
/** `packages`: the locked inference wheels; `model`: one model's weights; `verifying`: hashes and a load test. */
|
|
1064
|
+
declare const MlInstallPhase: z.ZodEnum<{
|
|
1065
|
+
model: "model";
|
|
1066
|
+
packages: "packages";
|
|
1067
|
+
verifying: "verifying";
|
|
1068
|
+
}>;
|
|
1069
|
+
declare const MlInstallProgress: z.ZodObject<{
|
|
1070
|
+
phase: z.ZodEnum<{
|
|
1071
|
+
model: "model";
|
|
1072
|
+
packages: "packages";
|
|
1073
|
+
verifying: "verifying";
|
|
1074
|
+
}>;
|
|
1075
|
+
item: z.ZodString;
|
|
1076
|
+
bytes_done: z.ZodInt;
|
|
1077
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
1078
|
+
}, z.core.$strict>;
|
|
1079
|
+
declare const TranscriptionModelInfo: z.ZodObject<{
|
|
1080
|
+
id: z.ZodEnum<{
|
|
1081
|
+
tiny: "tiny";
|
|
1082
|
+
base: "base";
|
|
1083
|
+
small: "small";
|
|
1084
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1085
|
+
}>;
|
|
1086
|
+
size_bytes: z.ZodInt;
|
|
1087
|
+
multilingual: z.ZodBoolean;
|
|
1088
|
+
installed: z.ZodBoolean;
|
|
1089
|
+
}, z.core.$strict>;
|
|
1090
|
+
/** What the `ml` service itself reports (the core adds the supervisor's view in ModelsStatusResult). */
|
|
1091
|
+
declare const MlStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
1092
|
+
/** The supervisor's view of the `ml` service process. */
|
|
1093
|
+
declare const MlServiceState: z.ZodEnum<{
|
|
1094
|
+
failed: "failed";
|
|
1095
|
+
starting: "starting";
|
|
1096
|
+
ready: "ready";
|
|
1097
|
+
restarting: "restarting";
|
|
1098
|
+
stopped: "stopped";
|
|
1099
|
+
}>;
|
|
1100
|
+
declare const MlServiceStatus: z.ZodObject<{
|
|
1101
|
+
state: z.ZodEnum<{
|
|
1102
|
+
failed: "failed";
|
|
1103
|
+
starting: "starting";
|
|
1104
|
+
ready: "ready";
|
|
1105
|
+
restarting: "restarting";
|
|
1106
|
+
stopped: "stopped";
|
|
1107
|
+
}>;
|
|
1108
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1109
|
+
restarts: z.ZodInt;
|
|
1110
|
+
python: z.ZodNullable<z.ZodString>;
|
|
1111
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1112
|
+
}, z.core.$strict>;
|
|
1113
|
+
declare const ModelsStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
1114
|
+
/** Whisper sizes the device can run (CTranslate2 weights). Larger = slower, more accurate. */
|
|
1115
|
+
declare const TranscriptionModelId: z.ZodEnum<{
|
|
1116
|
+
tiny: "tiny";
|
|
1117
|
+
base: "base";
|
|
1118
|
+
small: "small";
|
|
1119
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1120
|
+
}>;
|
|
1121
|
+
type TranscriptionModelId = z.output<typeof TranscriptionModelId>;
|
|
1122
|
+
declare const MlStatusResult: z.ZodObject<{
|
|
1123
|
+
runtime: z.ZodEnum<{
|
|
1124
|
+
not_installed: "not_installed";
|
|
1125
|
+
installing: "installing";
|
|
1126
|
+
installed: "installed";
|
|
1127
|
+
failed: "failed";
|
|
1128
|
+
}>;
|
|
1129
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
1130
|
+
phase: z.ZodEnum<{
|
|
1131
|
+
model: "model";
|
|
1132
|
+
packages: "packages";
|
|
1133
|
+
verifying: "verifying";
|
|
1134
|
+
}>;
|
|
1135
|
+
item: z.ZodString;
|
|
1136
|
+
bytes_done: z.ZodInt;
|
|
1137
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
1138
|
+
}, z.core.$strict>>;
|
|
1139
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1140
|
+
accelerator: z.ZodEnum<{
|
|
1141
|
+
cpu: "cpu";
|
|
1142
|
+
cuda: "cuda";
|
|
1143
|
+
}>;
|
|
1144
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1145
|
+
id: z.ZodEnum<{
|
|
1146
|
+
tiny: "tiny";
|
|
1147
|
+
base: "base";
|
|
1148
|
+
small: "small";
|
|
1149
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1150
|
+
}>;
|
|
1151
|
+
size_bytes: z.ZodInt;
|
|
1152
|
+
multilingual: z.ZodBoolean;
|
|
1153
|
+
installed: z.ZodBoolean;
|
|
1154
|
+
}, z.core.$strict>>;
|
|
1155
|
+
default_model: z.ZodEnum<{
|
|
1156
|
+
tiny: "tiny";
|
|
1157
|
+
base: "base";
|
|
1158
|
+
small: "small";
|
|
1159
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1160
|
+
}>;
|
|
1161
|
+
}, z.core.$strict>;
|
|
1162
|
+
type MlStatusResult = z.output<typeof MlStatusResult>;
|
|
1163
|
+
/** A progress report while `ml.install` / `ml.transcribe` runs. */
|
|
1164
|
+
declare const MlProgress: z.ZodObject<{
|
|
1165
|
+
kind: z.ZodEnum<{
|
|
1166
|
+
install: "install";
|
|
1167
|
+
transcribe: "transcribe";
|
|
1168
|
+
}>;
|
|
1169
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
1170
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
1171
|
+
phase: z.ZodEnum<{
|
|
1172
|
+
model: "model";
|
|
1173
|
+
packages: "packages";
|
|
1174
|
+
verifying: "verifying";
|
|
1175
|
+
}>;
|
|
1176
|
+
item: z.ZodString;
|
|
1177
|
+
bytes_done: z.ZodInt;
|
|
1178
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
1179
|
+
}, z.core.$strict>>;
|
|
1180
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
1181
|
+
start_s: z.ZodNumber;
|
|
1182
|
+
end_s: z.ZodNumber;
|
|
1183
|
+
text: z.ZodString;
|
|
1184
|
+
}, z.core.$strict>>;
|
|
1185
|
+
}, z.core.$strict>;
|
|
1186
|
+
type MlProgress = z.output<typeof MlProgress>;
|
|
1187
|
+
declare const ModelsStatusResult: z.ZodObject<{
|
|
1188
|
+
service: z.ZodObject<{
|
|
1189
|
+
state: z.ZodEnum<{
|
|
1190
|
+
failed: "failed";
|
|
1191
|
+
starting: "starting";
|
|
1192
|
+
ready: "ready";
|
|
1193
|
+
restarting: "restarting";
|
|
1194
|
+
stopped: "stopped";
|
|
1195
|
+
}>;
|
|
1196
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1197
|
+
restarts: z.ZodInt;
|
|
1198
|
+
python: z.ZodNullable<z.ZodString>;
|
|
1199
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1200
|
+
}, z.core.$strict>;
|
|
1201
|
+
transcription: z.ZodNullable<z.ZodObject<{
|
|
1202
|
+
runtime: z.ZodEnum<{
|
|
1203
|
+
not_installed: "not_installed";
|
|
1204
|
+
installing: "installing";
|
|
1205
|
+
installed: "installed";
|
|
1206
|
+
failed: "failed";
|
|
1207
|
+
}>;
|
|
1208
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
1209
|
+
phase: z.ZodEnum<{
|
|
1210
|
+
model: "model";
|
|
1211
|
+
packages: "packages";
|
|
1212
|
+
verifying: "verifying";
|
|
1213
|
+
}>;
|
|
1214
|
+
item: z.ZodString;
|
|
1215
|
+
bytes_done: z.ZodInt;
|
|
1216
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
1217
|
+
}, z.core.$strict>>;
|
|
1218
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1219
|
+
accelerator: z.ZodEnum<{
|
|
1220
|
+
cpu: "cpu";
|
|
1221
|
+
cuda: "cuda";
|
|
1222
|
+
}>;
|
|
1223
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1224
|
+
id: z.ZodEnum<{
|
|
1225
|
+
tiny: "tiny";
|
|
1226
|
+
base: "base";
|
|
1227
|
+
small: "small";
|
|
1228
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1229
|
+
}>;
|
|
1230
|
+
size_bytes: z.ZodInt;
|
|
1231
|
+
multilingual: z.ZodBoolean;
|
|
1232
|
+
installed: z.ZodBoolean;
|
|
1233
|
+
}, z.core.$strict>>;
|
|
1234
|
+
default_model: z.ZodEnum<{
|
|
1235
|
+
tiny: "tiny";
|
|
1236
|
+
base: "base";
|
|
1237
|
+
small: "small";
|
|
1238
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1239
|
+
}>;
|
|
1240
|
+
}, z.core.$strict>>;
|
|
1241
|
+
}, z.core.$strict>;
|
|
1242
|
+
type ModelsStatusResult = z.output<typeof ModelsStatusResult>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Transcribe an audio or video file on the device. Any format the bundled decoder reads (wav, mp3,
|
|
1245
|
+
* m4a, webm/opus, mp4…). `language` is ISO 639-1; omitted = detect. `translate` = into English.
|
|
1246
|
+
*/
|
|
1247
|
+
declare const ModelsTranscribeParams: z.ZodObject<{
|
|
1248
|
+
path: z.ZodString;
|
|
1249
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
1250
|
+
tiny: "tiny";
|
|
1251
|
+
base: "base";
|
|
1252
|
+
small: "small";
|
|
1253
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1254
|
+
}>>;
|
|
1255
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
task: z.ZodDefault<z.ZodEnum<{
|
|
1257
|
+
transcribe: "transcribe";
|
|
1258
|
+
translate: "translate";
|
|
1259
|
+
}>>;
|
|
1260
|
+
}, z.core.$strict>;
|
|
1261
|
+
type ModelsTranscribeParams = z.output<typeof ModelsTranscribeParams>;
|
|
1262
|
+
declare const ModelsTranscribeResult: z.ZodObject<{
|
|
1263
|
+
text: z.ZodString;
|
|
1264
|
+
language: z.ZodString;
|
|
1265
|
+
language_probability: z.ZodNumber;
|
|
1266
|
+
duration_s: z.ZodNumber;
|
|
1267
|
+
model: z.ZodEnum<{
|
|
1268
|
+
tiny: "tiny";
|
|
1269
|
+
base: "base";
|
|
1270
|
+
small: "small";
|
|
1271
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1272
|
+
}>;
|
|
1273
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
1274
|
+
start_s: z.ZodNumber;
|
|
1275
|
+
end_s: z.ZodNumber;
|
|
1276
|
+
text: z.ZodString;
|
|
1277
|
+
}, z.core.$strict>>;
|
|
1278
|
+
elapsed_ms: z.ZodInt;
|
|
1279
|
+
}, z.core.$strict>;
|
|
1280
|
+
type ModelsTranscribeResult = z.output<typeof ModelsTranscribeResult>;
|
|
1281
|
+
/** Install the runtime (if missing) and one model's weights (default: the default model). */
|
|
1282
|
+
declare const ModelsInstallParams: z.ZodObject<{
|
|
1283
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
1284
|
+
tiny: "tiny";
|
|
1285
|
+
base: "base";
|
|
1286
|
+
small: "small";
|
|
1287
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1288
|
+
}>>;
|
|
1289
|
+
}, z.core.$strict>;
|
|
1290
|
+
type ModelsInstallParams = z.output<typeof ModelsInstallParams>;
|
|
1291
|
+
declare const ModelsInstallResult: z.ZodObject<{
|
|
1292
|
+
model: z.ZodEnum<{
|
|
1293
|
+
tiny: "tiny";
|
|
1294
|
+
base: "base";
|
|
1295
|
+
small: "small";
|
|
1296
|
+
"large-v3-turbo": "large-v3-turbo";
|
|
1297
|
+
}>;
|
|
1298
|
+
elapsed_ms: z.ZodInt;
|
|
1299
|
+
}, z.core.$strict>;
|
|
1300
|
+
type ModelsInstallResult = z.output<typeof ModelsInstallResult>;
|
|
1301
|
+
/** Sent to the client that started a `models.install` or `models.transcribe`, for that request. */
|
|
1302
|
+
declare const ModelsProgressEvent: z.ZodObject<{
|
|
1303
|
+
request_id: z.ZodString;
|
|
1304
|
+
progress: z.ZodObject<{
|
|
1305
|
+
kind: z.ZodEnum<{
|
|
1306
|
+
install: "install";
|
|
1307
|
+
transcribe: "transcribe";
|
|
1308
|
+
}>;
|
|
1309
|
+
fraction: z.ZodNullable<z.ZodNumber>;
|
|
1310
|
+
install: z.ZodNullable<z.ZodObject<{
|
|
1311
|
+
phase: z.ZodEnum<{
|
|
1312
|
+
model: "model";
|
|
1313
|
+
packages: "packages";
|
|
1314
|
+
verifying: "verifying";
|
|
1315
|
+
}>;
|
|
1316
|
+
item: z.ZodString;
|
|
1317
|
+
bytes_done: z.ZodInt;
|
|
1318
|
+
bytes_total: z.ZodNullable<z.ZodInt>;
|
|
1319
|
+
}, z.core.$strict>>;
|
|
1320
|
+
segment: z.ZodNullable<z.ZodObject<{
|
|
1321
|
+
start_s: z.ZodNumber;
|
|
1322
|
+
end_s: z.ZodNumber;
|
|
1323
|
+
text: z.ZodString;
|
|
1324
|
+
}, z.core.$strict>>;
|
|
1325
|
+
}, z.core.$strict>;
|
|
1326
|
+
}, z.core.$strict>;
|
|
1327
|
+
type ModelsProgressEvent = z.output<typeof ModelsProgressEvent>;
|
|
1328
|
+
declare const TranscriptSegment: z.ZodObject<{
|
|
1329
|
+
start_s: z.ZodNumber;
|
|
1330
|
+
end_s: z.ZodNumber;
|
|
1331
|
+
text: z.ZodString;
|
|
1332
|
+
}, z.core.$strict>;
|
|
1333
|
+
type TranscriptSegment = z.output<typeof TranscriptSegment>;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* @ai-matrx/desktop-protocol — cap apps (SPEC §6): the desktop apps a person uses (Claude, Codex,
|
|
1337
|
+
* Cursor, VS Code, Antigravity, and any app a later adapter adds), their profiles and usage.
|
|
1338
|
+
* Schema source: lint-enforced rules in scripts/check-schema-source.mjs.
|
|
1339
|
+
*
|
|
1340
|
+
* A profile is one data folder of one app on one device, so several accounts of the same app run
|
|
1341
|
+
* side by side. Profiles are the person's own rows in `users.desktop_app_profile` (the one
|
|
1342
|
+
* database); folders found on disk that no row names yet are listed with `id: null` so they can be
|
|
1343
|
+
* added. Nothing here is ever a credential: signing in happens inside the app.
|
|
1344
|
+
*/
|
|
1345
|
+
|
|
1346
|
+
/** An adapter key: lowercase, open-ended (a new app needs only a new adapter). */
|
|
1347
|
+
declare const AppKey: z.ZodString;
|
|
1348
|
+
type AppKey = z.output<typeof AppKey>;
|
|
1349
|
+
/** A users.desktop_app_profile id. Plain pattern (see DeviceId for why not z.uuid()). */
|
|
1350
|
+
declare const AppProfileId: z.ZodString;
|
|
1351
|
+
type AppProfileId = z.output<typeof AppProfileId>;
|
|
1352
|
+
/**
|
|
1353
|
+
* Where a profile's folder lives, RELATIVE to the app adapter's data root on that device: one or
|
|
1354
|
+
* more plain names joined by "/" (none starting with a dot, so never "." or ".."), never absolute.
|
|
1355
|
+
* Null on a profile means the app's own default profile. No lookaround: Pydantic's regex engine
|
|
1356
|
+
* has none.
|
|
1357
|
+
*/
|
|
1358
|
+
declare const AppProfileLocator: z.ZodString;
|
|
1359
|
+
type AppProfileLocator = z.output<typeof AppProfileLocator>;
|
|
1360
|
+
/** supported: proven here; partial: works with a stated gap; unsupported: not on this OS. */
|
|
1361
|
+
declare const AppSupport: z.ZodEnum<{
|
|
1362
|
+
supported: "supported";
|
|
1363
|
+
partial: "partial";
|
|
1364
|
+
unsupported: "unsupported";
|
|
1365
|
+
}>;
|
|
1366
|
+
type AppSupport = z.output<typeof AppSupport>;
|
|
1367
|
+
declare const AppFeatureStatus: z.ZodObject<{
|
|
1368
|
+
status: z.ZodEnum<{
|
|
1369
|
+
supported: "supported";
|
|
1370
|
+
partial: "partial";
|
|
1371
|
+
unsupported: "unsupported";
|
|
1372
|
+
}>;
|
|
1373
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1374
|
+
}, z.core.$strict>;
|
|
1375
|
+
type AppFeatureStatus = z.output<typeof AppFeatureStatus>;
|
|
1376
|
+
declare const AppInfo: z.ZodObject<{
|
|
1377
|
+
app_key: z.ZodString;
|
|
1378
|
+
name: z.ZodString;
|
|
1379
|
+
installed: z.ZodBoolean;
|
|
1380
|
+
version: z.ZodNullable<z.ZodString>;
|
|
1381
|
+
location: z.ZodNullable<z.ZodString>;
|
|
1382
|
+
open: z.ZodObject<{
|
|
1383
|
+
status: z.ZodEnum<{
|
|
1384
|
+
supported: "supported";
|
|
1385
|
+
partial: "partial";
|
|
1386
|
+
unsupported: "unsupported";
|
|
1387
|
+
}>;
|
|
1388
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1389
|
+
}, z.core.$strict>;
|
|
1390
|
+
profiles: z.ZodObject<{
|
|
1391
|
+
status: z.ZodEnum<{
|
|
1392
|
+
supported: "supported";
|
|
1393
|
+
partial: "partial";
|
|
1394
|
+
unsupported: "unsupported";
|
|
1395
|
+
}>;
|
|
1396
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1397
|
+
}, z.core.$strict>;
|
|
1398
|
+
usage: z.ZodObject<{
|
|
1399
|
+
status: z.ZodEnum<{
|
|
1400
|
+
supported: "supported";
|
|
1401
|
+
partial: "partial";
|
|
1402
|
+
unsupported: "unsupported";
|
|
1403
|
+
}>;
|
|
1404
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1405
|
+
}, z.core.$strict>;
|
|
1406
|
+
}, z.core.$strict>;
|
|
1407
|
+
type AppInfo = z.output<typeof AppInfo>;
|
|
1408
|
+
/** One plan-usage figure, as the app itself last recorded it. */
|
|
1409
|
+
declare const AppUsageReading: z.ZodObject<{
|
|
1410
|
+
window: z.ZodEnum<{
|
|
1411
|
+
five_hour: "five_hour";
|
|
1412
|
+
weekly: "weekly";
|
|
1413
|
+
extra: "extra";
|
|
1414
|
+
}>;
|
|
1415
|
+
percent: z.ZodNumber;
|
|
1416
|
+
sampled_at_ms: z.ZodInt;
|
|
1417
|
+
reset_since: z.ZodBoolean;
|
|
1418
|
+
}, z.core.$strict>;
|
|
1419
|
+
type AppUsageReading = z.output<typeof AppUsageReading>;
|
|
1420
|
+
declare const AppProfile: z.ZodObject<{
|
|
1421
|
+
id: z.ZodNullable<z.ZodString>;
|
|
1422
|
+
app_key: z.ZodString;
|
|
1423
|
+
display_name: z.ZodString;
|
|
1424
|
+
account_identity: z.ZodNullable<z.ZodString>;
|
|
1425
|
+
profile_locator: z.ZodNullable<z.ZodString>;
|
|
1426
|
+
device_id: z.ZodNullable<z.ZodString>;
|
|
1427
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
1428
|
+
on_disk: z.ZodBoolean;
|
|
1429
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
1430
|
+
usage: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1431
|
+
window: z.ZodEnum<{
|
|
1432
|
+
five_hour: "five_hour";
|
|
1433
|
+
weekly: "weekly";
|
|
1434
|
+
extra: "extra";
|
|
1435
|
+
}>;
|
|
1436
|
+
percent: z.ZodNumber;
|
|
1437
|
+
sampled_at_ms: z.ZodInt;
|
|
1438
|
+
reset_since: z.ZodBoolean;
|
|
1439
|
+
}, z.core.$strict>>>;
|
|
1440
|
+
last_opened_ms: z.ZodNullable<z.ZodInt>;
|
|
1441
|
+
}, z.core.$strict>;
|
|
1442
|
+
type AppProfile = z.output<typeof AppProfile>;
|
|
1443
|
+
declare const AppsListParams: z.ZodObject<{}, z.core.$strict>;
|
|
1444
|
+
type AppsListParams = z.output<typeof AppsListParams>;
|
|
1445
|
+
declare const AppsListResult: z.ZodObject<{
|
|
1446
|
+
apps: z.ZodArray<z.ZodObject<{
|
|
1447
|
+
app_key: z.ZodString;
|
|
1448
|
+
name: z.ZodString;
|
|
1449
|
+
installed: z.ZodBoolean;
|
|
1450
|
+
version: z.ZodNullable<z.ZodString>;
|
|
1451
|
+
location: z.ZodNullable<z.ZodString>;
|
|
1452
|
+
open: z.ZodObject<{
|
|
1453
|
+
status: z.ZodEnum<{
|
|
1454
|
+
supported: "supported";
|
|
1455
|
+
partial: "partial";
|
|
1456
|
+
unsupported: "unsupported";
|
|
1457
|
+
}>;
|
|
1458
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1459
|
+
}, z.core.$strict>;
|
|
1460
|
+
profiles: z.ZodObject<{
|
|
1461
|
+
status: z.ZodEnum<{
|
|
1462
|
+
supported: "supported";
|
|
1463
|
+
partial: "partial";
|
|
1464
|
+
unsupported: "unsupported";
|
|
1465
|
+
}>;
|
|
1466
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1467
|
+
}, z.core.$strict>;
|
|
1468
|
+
usage: z.ZodObject<{
|
|
1469
|
+
status: z.ZodEnum<{
|
|
1470
|
+
supported: "supported";
|
|
1471
|
+
partial: "partial";
|
|
1472
|
+
unsupported: "unsupported";
|
|
1473
|
+
}>;
|
|
1474
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1475
|
+
}, z.core.$strict>;
|
|
1476
|
+
}, z.core.$strict>>;
|
|
1477
|
+
}, z.core.$strict>;
|
|
1478
|
+
type AppsListResult = z.output<typeof AppsListResult>;
|
|
1479
|
+
declare const AppsProfilesListParams: z.ZodObject<{
|
|
1480
|
+
app_key: z.ZodOptional<z.ZodString>;
|
|
1481
|
+
}, z.core.$strict>;
|
|
1482
|
+
type AppsProfilesListParams = z.output<typeof AppsProfilesListParams>;
|
|
1483
|
+
declare const AppsProfilesListResult: z.ZodObject<{
|
|
1484
|
+
profiles: z.ZodArray<z.ZodObject<{
|
|
1485
|
+
id: z.ZodNullable<z.ZodString>;
|
|
1486
|
+
app_key: z.ZodString;
|
|
1487
|
+
display_name: z.ZodString;
|
|
1488
|
+
account_identity: z.ZodNullable<z.ZodString>;
|
|
1489
|
+
profile_locator: z.ZodNullable<z.ZodString>;
|
|
1490
|
+
device_id: z.ZodNullable<z.ZodString>;
|
|
1491
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
1492
|
+
on_disk: z.ZodBoolean;
|
|
1493
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
1494
|
+
usage: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1495
|
+
window: z.ZodEnum<{
|
|
1496
|
+
five_hour: "five_hour";
|
|
1497
|
+
weekly: "weekly";
|
|
1498
|
+
extra: "extra";
|
|
1499
|
+
}>;
|
|
1500
|
+
percent: z.ZodNumber;
|
|
1501
|
+
sampled_at_ms: z.ZodInt;
|
|
1502
|
+
reset_since: z.ZodBoolean;
|
|
1503
|
+
}, z.core.$strict>>>;
|
|
1504
|
+
last_opened_ms: z.ZodNullable<z.ZodInt>;
|
|
1505
|
+
}, z.core.$strict>>;
|
|
1506
|
+
registry: z.ZodEnum<{
|
|
1507
|
+
ok: "ok";
|
|
1508
|
+
signed_out: "signed_out";
|
|
1509
|
+
unavailable: "unavailable";
|
|
1510
|
+
}>;
|
|
1511
|
+
}, z.core.$strict>;
|
|
1512
|
+
type AppsProfilesListResult = z.output<typeof AppsProfilesListResult>;
|
|
1513
|
+
/** Create (no id) or update (id) the person's own profile row. */
|
|
1514
|
+
declare const AppsProfilesSaveParams: z.ZodObject<{
|
|
1515
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
app_key: z.ZodString;
|
|
1517
|
+
display_name: z.ZodString;
|
|
1518
|
+
account_identity: z.ZodNullable<z.ZodString>;
|
|
1519
|
+
profile_locator: z.ZodNullable<z.ZodString>;
|
|
1520
|
+
new_folder: z.ZodDefault<z.ZodBoolean>;
|
|
1521
|
+
}, z.core.$strict>;
|
|
1522
|
+
type AppsProfilesSaveParams = z.output<typeof AppsProfilesSaveParams>;
|
|
1523
|
+
declare const AppsProfilesSaveResult: z.ZodObject<{
|
|
1524
|
+
id: z.ZodNullable<z.ZodString>;
|
|
1525
|
+
app_key: z.ZodString;
|
|
1526
|
+
display_name: z.ZodString;
|
|
1527
|
+
account_identity: z.ZodNullable<z.ZodString>;
|
|
1528
|
+
profile_locator: z.ZodNullable<z.ZodString>;
|
|
1529
|
+
device_id: z.ZodNullable<z.ZodString>;
|
|
1530
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
1531
|
+
on_disk: z.ZodBoolean;
|
|
1532
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
1533
|
+
usage: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1534
|
+
window: z.ZodEnum<{
|
|
1535
|
+
five_hour: "five_hour";
|
|
1536
|
+
weekly: "weekly";
|
|
1537
|
+
extra: "extra";
|
|
1538
|
+
}>;
|
|
1539
|
+
percent: z.ZodNumber;
|
|
1540
|
+
sampled_at_ms: z.ZodInt;
|
|
1541
|
+
reset_since: z.ZodBoolean;
|
|
1542
|
+
}, z.core.$strict>>>;
|
|
1543
|
+
last_opened_ms: z.ZodNullable<z.ZodInt>;
|
|
1544
|
+
}, z.core.$strict>;
|
|
1545
|
+
type AppsProfilesSaveResult = z.output<typeof AppsProfilesSaveResult>;
|
|
1546
|
+
/** Remove the row (soft delete). The folder on disk is never touched. */
|
|
1547
|
+
declare const AppsProfilesRemoveParams: z.ZodObject<{
|
|
1548
|
+
id: z.ZodString;
|
|
1549
|
+
}, z.core.$strict>;
|
|
1550
|
+
type AppsProfilesRemoveParams = z.output<typeof AppsProfilesRemoveParams>;
|
|
1551
|
+
declare const AppsProfilesRemoveResult: z.ZodObject<{
|
|
1552
|
+
removed: z.ZodBoolean;
|
|
1553
|
+
}, z.core.$strict>;
|
|
1554
|
+
type AppsProfilesRemoveResult = z.output<typeof AppsProfilesRemoveResult>;
|
|
1555
|
+
/** Open the app with a profile (its default profile when profile_id is absent). */
|
|
1556
|
+
declare const AppsOpenParams: z.ZodObject<{
|
|
1557
|
+
app_key: z.ZodString;
|
|
1558
|
+
profile_id: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
}, z.core.$strict>;
|
|
1560
|
+
type AppsOpenParams = z.output<typeof AppsOpenParams>;
|
|
1561
|
+
declare const AppsOpenResult: z.ZodObject<{
|
|
1562
|
+
already_running: z.ZodBoolean;
|
|
1563
|
+
folder: z.ZodNullable<z.ZodString>;
|
|
1564
|
+
}, z.core.$strict>;
|
|
1565
|
+
type AppsOpenResult = z.output<typeof AppsOpenResult>;
|
|
1566
|
+
|
|
1567
|
+
/**
|
|
1568
|
+
* @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised
|
|
1569
|
+
* Python services (SPEC §3.10). Schema source: lint-enforced rules in scripts/check-schema-source.mjs.
|
|
1570
|
+
*
|
|
1571
|
+
* Never seen by a client: clients speak the Router protocol (envelope.ts); a capability owner in
|
|
1572
|
+
* the core forwards a Router op to its service op (SERVICES in registry.ts). One local socket per
|
|
1573
|
+
* service (a Unix socket on macOS/Linux, a named pipe on Windows). Each message is one frame:
|
|
1574
|
+
* a 4-byte big-endian length, then that many bytes of UTF-8 JSON (at most SERVICE_MAX_FRAME_BYTES).
|
|
1575
|
+
*
|
|
1576
|
+
* The first message on a connection is `hello` (the per-launch token the core handed the service
|
|
1577
|
+
* in its environment, plus the contract hash it was built against). A wrong token or a different
|
|
1578
|
+
* contract is answered with `error` id 0 and the connection is closed: the two sides of the
|
|
1579
|
+
* connection were generated from different contracts and must never talk (SPEC P11).
|
|
1580
|
+
*/
|
|
1581
|
+
|
|
1582
|
+
/** The largest frame either side accepts (16 MiB). */
|
|
1583
|
+
declare const SERVICE_MAX_FRAME_BYTES: 16777216;
|
|
1584
|
+
/** SHA-256 (hex) of generated/desktop-protocol.schema.json: CONTRACT_SHA256 on both sides. */
|
|
1585
|
+
declare const ContractHash: z.ZodString;
|
|
1586
|
+
/** The per-launch secret: 32 random bytes, base64url (43 characters). Passed by environment, never argv. */
|
|
1587
|
+
declare const ServiceToken: z.ZodString;
|
|
1588
|
+
declare const ServiceHello: z.ZodObject<{
|
|
1589
|
+
type: z.ZodLiteral<"hello">;
|
|
1590
|
+
token: z.ZodString;
|
|
1591
|
+
contract: z.ZodString;
|
|
1592
|
+
}, z.core.$strict>;
|
|
1593
|
+
declare const ServiceRequest: z.ZodObject<{
|
|
1594
|
+
type: z.ZodLiteral<"request">;
|
|
1595
|
+
id: z.ZodInt;
|
|
1596
|
+
op: z.ZodString;
|
|
1597
|
+
params: z.ZodUnknown;
|
|
1598
|
+
}, z.core.$strict>;
|
|
1599
|
+
declare const ServiceResponse: z.ZodObject<{
|
|
1600
|
+
type: z.ZodLiteral<"response">;
|
|
1601
|
+
id: z.ZodInt;
|
|
1602
|
+
result: z.ZodUnknown;
|
|
1603
|
+
}, z.core.$strict>;
|
|
1604
|
+
declare const ServiceErrorMsg: z.ZodObject<{
|
|
1605
|
+
type: z.ZodLiteral<"error">;
|
|
1606
|
+
id: z.ZodInt;
|
|
1607
|
+
error: z.ZodObject<{
|
|
1608
|
+
code: z.ZodEnum<{
|
|
1609
|
+
AUTH_REQUIRED: "AUTH_REQUIRED";
|
|
1610
|
+
AUTH_INVALID: "AUTH_INVALID";
|
|
1611
|
+
AUTH_EXPIRED: "AUTH_EXPIRED";
|
|
1612
|
+
AUTH_FORBIDDEN: "AUTH_FORBIDDEN";
|
|
1613
|
+
AUTH_DEVICE_REVOKED: "AUTH_DEVICE_REVOKED";
|
|
1614
|
+
PERMISSION_DENIED_OS: "PERMISSION_DENIED_OS";
|
|
1615
|
+
NOT_FOUND: "NOT_FOUND";
|
|
1616
|
+
CONFLICT: "CONFLICT";
|
|
1617
|
+
INVALID_PARAMS: "INVALID_PARAMS";
|
|
1618
|
+
RESOURCE_BUSY: "RESOURCE_BUSY";
|
|
1619
|
+
RESOURCE_GONE: "RESOURCE_GONE";
|
|
1620
|
+
CANCELLED: "CANCELLED";
|
|
1621
|
+
TIMEOUT: "TIMEOUT";
|
|
1622
|
+
PLATFORM_UNSUPPORTED: "PLATFORM_UNSUPPORTED";
|
|
1623
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
1624
|
+
INTERNAL: "INTERNAL";
|
|
1625
|
+
PROTOCOL_VERSION_UNSUPPORTED: "PROTOCOL_VERSION_UNSUPPORTED";
|
|
1626
|
+
PROTOCOL_ERROR: "PROTOCOL_ERROR";
|
|
1627
|
+
UNKNOWN_OPERATION: "UNKNOWN_OPERATION";
|
|
1628
|
+
DEVICE_OFFLINE: "DEVICE_OFFLINE";
|
|
1629
|
+
PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
|
|
1630
|
+
}>;
|
|
1631
|
+
message: z.ZodString;
|
|
1632
|
+
retryable: z.ZodBoolean;
|
|
1633
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
1634
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
1635
|
+
not_a_directory: "not_a_directory";
|
|
1636
|
+
is_a_directory: "is_a_directory";
|
|
1637
|
+
directory_not_empty: "directory_not_empty";
|
|
1638
|
+
already_exists: "already_exists";
|
|
1639
|
+
stale_write: "stale_write";
|
|
1640
|
+
binary_content: "binary_content";
|
|
1641
|
+
not_utf8_boundary: "not_utf8_boundary";
|
|
1642
|
+
patch_no_match: "patch_no_match";
|
|
1643
|
+
patch_ambiguous: "patch_ambiguous";
|
|
1644
|
+
resource_exited: "resource_exited";
|
|
1645
|
+
resource_expired: "resource_expired";
|
|
1646
|
+
control_taken: "control_taken";
|
|
1647
|
+
window_exhausted: "window_exhausted";
|
|
1648
|
+
runtime_not_installed: "runtime_not_installed";
|
|
1649
|
+
model_not_installed: "model_not_installed";
|
|
1650
|
+
unsupported_media: "unsupported_media";
|
|
1651
|
+
download_failed: "download_failed";
|
|
1652
|
+
service_starting: "service_starting";
|
|
1653
|
+
service_restarted: "service_restarted";
|
|
1654
|
+
service_failed: "service_failed";
|
|
1655
|
+
}>>;
|
|
1656
|
+
cap: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
op: z.ZodOptional<z.ZodString>;
|
|
1658
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1659
|
+
settings_url: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
retry_after_ms: z.ZodOptional<z.ZodInt>;
|
|
1661
|
+
limit_bytes: z.ZodOptional<z.ZodInt>;
|
|
1662
|
+
edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1663
|
+
edit_index: z.ZodInt;
|
|
1664
|
+
reason: z.ZodString;
|
|
1665
|
+
}, z.core.$strict>>>;
|
|
1666
|
+
upgrade: z.ZodOptional<z.ZodObject<{
|
|
1667
|
+
min_version: z.ZodString;
|
|
1668
|
+
max_version: z.ZodString;
|
|
1669
|
+
download_url: z.ZodOptional<z.ZodURL>;
|
|
1670
|
+
}, z.core.$strict>>;
|
|
1671
|
+
}, z.core.$strict>>;
|
|
1672
|
+
}, z.core.$strict>;
|
|
1673
|
+
}, z.core.$strict>;
|
|
1674
|
+
/** A running request's progress (validated against the service's progress schema). */
|
|
1675
|
+
declare const ServiceProgressMsg: z.ZodObject<{
|
|
1676
|
+
type: z.ZodLiteral<"progress">;
|
|
1677
|
+
id: z.ZodInt;
|
|
1678
|
+
progress: z.ZodUnknown;
|
|
1679
|
+
}, z.core.$strict>;
|
|
1680
|
+
declare const ServiceCancel: z.ZodObject<{
|
|
1681
|
+
type: z.ZodLiteral<"cancel">;
|
|
1682
|
+
id: z.ZodInt;
|
|
1683
|
+
}, z.core.$strict>;
|
|
1684
|
+
/** Health check: the service answers `pong` at once from its event loop, even while it works. */
|
|
1685
|
+
declare const ServicePing: z.ZodObject<{
|
|
1686
|
+
type: z.ZodLiteral<"ping">;
|
|
1687
|
+
id: z.ZodInt;
|
|
1688
|
+
}, z.core.$strict>;
|
|
1689
|
+
declare const ServicePong: z.ZodObject<{
|
|
1690
|
+
type: z.ZodLiteral<"pong">;
|
|
1691
|
+
id: z.ZodInt;
|
|
1692
|
+
busy: z.ZodInt;
|
|
1693
|
+
}, z.core.$strict>;
|
|
1694
|
+
/** Finish quickly: cancel running work, answer nothing more, exit 0. */
|
|
1695
|
+
declare const ServiceShutdown: z.ZodObject<{
|
|
1696
|
+
type: z.ZodLiteral<"shutdown">;
|
|
1697
|
+
}, z.core.$strict>;
|
|
1698
|
+
/** Supervised Python services. `tools` joins when it is built. */
|
|
1699
|
+
declare const ServiceName: z.ZodEnum<{
|
|
1700
|
+
ml: "ml";
|
|
1701
|
+
}>;
|
|
1702
|
+
type ServiceName = z.output<typeof ServiceName>;
|
|
1703
|
+
declare const CoreToServiceMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1704
|
+
type: z.ZodLiteral<"hello">;
|
|
1705
|
+
token: z.ZodString;
|
|
1706
|
+
contract: z.ZodString;
|
|
1707
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1708
|
+
type: z.ZodLiteral<"request">;
|
|
1709
|
+
id: z.ZodInt;
|
|
1710
|
+
op: z.ZodString;
|
|
1711
|
+
params: z.ZodUnknown;
|
|
1712
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1713
|
+
type: z.ZodLiteral<"cancel">;
|
|
1714
|
+
id: z.ZodInt;
|
|
1715
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1716
|
+
type: z.ZodLiteral<"ping">;
|
|
1717
|
+
id: z.ZodInt;
|
|
1718
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1719
|
+
type: z.ZodLiteral<"shutdown">;
|
|
1720
|
+
}, z.core.$strict>], "type">;
|
|
1721
|
+
type CoreToServiceMsg = z.output<typeof CoreToServiceMsg>;
|
|
1722
|
+
declare const ServiceToCoreMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1723
|
+
type: z.ZodLiteral<"welcome">;
|
|
1724
|
+
service: z.ZodEnum<{
|
|
1725
|
+
ml: "ml";
|
|
1726
|
+
}>;
|
|
1727
|
+
contract: z.ZodString;
|
|
1728
|
+
pid: z.ZodInt;
|
|
1729
|
+
python: z.ZodString;
|
|
1730
|
+
ops: z.ZodArray<z.ZodString>;
|
|
1731
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1732
|
+
type: z.ZodLiteral<"response">;
|
|
1733
|
+
id: z.ZodInt;
|
|
1734
|
+
result: z.ZodUnknown;
|
|
1735
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1736
|
+
type: z.ZodLiteral<"error">;
|
|
1737
|
+
id: z.ZodInt;
|
|
1738
|
+
error: z.ZodObject<{
|
|
1739
|
+
code: z.ZodEnum<{
|
|
1740
|
+
AUTH_REQUIRED: "AUTH_REQUIRED";
|
|
1741
|
+
AUTH_INVALID: "AUTH_INVALID";
|
|
1742
|
+
AUTH_EXPIRED: "AUTH_EXPIRED";
|
|
1743
|
+
AUTH_FORBIDDEN: "AUTH_FORBIDDEN";
|
|
1744
|
+
AUTH_DEVICE_REVOKED: "AUTH_DEVICE_REVOKED";
|
|
1745
|
+
PERMISSION_DENIED_OS: "PERMISSION_DENIED_OS";
|
|
1746
|
+
NOT_FOUND: "NOT_FOUND";
|
|
1747
|
+
CONFLICT: "CONFLICT";
|
|
1748
|
+
INVALID_PARAMS: "INVALID_PARAMS";
|
|
1749
|
+
RESOURCE_BUSY: "RESOURCE_BUSY";
|
|
1750
|
+
RESOURCE_GONE: "RESOURCE_GONE";
|
|
1751
|
+
CANCELLED: "CANCELLED";
|
|
1752
|
+
TIMEOUT: "TIMEOUT";
|
|
1753
|
+
PLATFORM_UNSUPPORTED: "PLATFORM_UNSUPPORTED";
|
|
1754
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
1755
|
+
INTERNAL: "INTERNAL";
|
|
1756
|
+
PROTOCOL_VERSION_UNSUPPORTED: "PROTOCOL_VERSION_UNSUPPORTED";
|
|
1757
|
+
PROTOCOL_ERROR: "PROTOCOL_ERROR";
|
|
1758
|
+
UNKNOWN_OPERATION: "UNKNOWN_OPERATION";
|
|
1759
|
+
DEVICE_OFFLINE: "DEVICE_OFFLINE";
|
|
1760
|
+
PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
|
|
1761
|
+
}>;
|
|
1762
|
+
message: z.ZodString;
|
|
1763
|
+
retryable: z.ZodBoolean;
|
|
1764
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
1765
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
1766
|
+
not_a_directory: "not_a_directory";
|
|
1767
|
+
is_a_directory: "is_a_directory";
|
|
1768
|
+
directory_not_empty: "directory_not_empty";
|
|
1769
|
+
already_exists: "already_exists";
|
|
1770
|
+
stale_write: "stale_write";
|
|
1771
|
+
binary_content: "binary_content";
|
|
1772
|
+
not_utf8_boundary: "not_utf8_boundary";
|
|
1773
|
+
patch_no_match: "patch_no_match";
|
|
1774
|
+
patch_ambiguous: "patch_ambiguous";
|
|
1775
|
+
resource_exited: "resource_exited";
|
|
1776
|
+
resource_expired: "resource_expired";
|
|
1777
|
+
control_taken: "control_taken";
|
|
1778
|
+
window_exhausted: "window_exhausted";
|
|
1779
|
+
runtime_not_installed: "runtime_not_installed";
|
|
1780
|
+
model_not_installed: "model_not_installed";
|
|
1781
|
+
unsupported_media: "unsupported_media";
|
|
1782
|
+
download_failed: "download_failed";
|
|
1783
|
+
service_starting: "service_starting";
|
|
1784
|
+
service_restarted: "service_restarted";
|
|
1785
|
+
service_failed: "service_failed";
|
|
1786
|
+
}>>;
|
|
1787
|
+
cap: z.ZodOptional<z.ZodString>;
|
|
1788
|
+
op: z.ZodOptional<z.ZodString>;
|
|
1789
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
settings_url: z.ZodOptional<z.ZodString>;
|
|
1791
|
+
retry_after_ms: z.ZodOptional<z.ZodInt>;
|
|
1792
|
+
limit_bytes: z.ZodOptional<z.ZodInt>;
|
|
1793
|
+
edits_failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1794
|
+
edit_index: z.ZodInt;
|
|
1795
|
+
reason: z.ZodString;
|
|
1796
|
+
}, z.core.$strict>>>;
|
|
1797
|
+
upgrade: z.ZodOptional<z.ZodObject<{
|
|
1798
|
+
min_version: z.ZodString;
|
|
1799
|
+
max_version: z.ZodString;
|
|
1800
|
+
download_url: z.ZodOptional<z.ZodURL>;
|
|
1801
|
+
}, z.core.$strict>>;
|
|
1802
|
+
}, z.core.$strict>>;
|
|
1803
|
+
}, z.core.$strict>;
|
|
1804
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1805
|
+
type: z.ZodLiteral<"progress">;
|
|
1806
|
+
id: z.ZodInt;
|
|
1807
|
+
progress: z.ZodUnknown;
|
|
1808
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1809
|
+
type: z.ZodLiteral<"pong">;
|
|
1810
|
+
id: z.ZodInt;
|
|
1811
|
+
busy: z.ZodInt;
|
|
1812
|
+
}, z.core.$strict>], "type">;
|
|
1813
|
+
type ServiceToCoreMsg = z.output<typeof ServiceToCoreMsg>;
|
|
1814
|
+
declare const ServiceWelcome: z.ZodObject<{
|
|
1815
|
+
type: z.ZodLiteral<"welcome">;
|
|
1816
|
+
service: z.ZodEnum<{
|
|
1817
|
+
ml: "ml";
|
|
1818
|
+
}>;
|
|
1819
|
+
contract: z.ZodString;
|
|
1820
|
+
pid: z.ZodInt;
|
|
1821
|
+
python: z.ZodString;
|
|
1822
|
+
ops: z.ZodArray<z.ZodString>;
|
|
1823
|
+
}, z.core.$strict>;
|
|
1824
|
+
type ServiceWelcome = z.output<typeof ServiceWelcome>;
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* @ai-matrx/desktop-protocol — local tool proof records (SPEC §10). Schema source: lint-enforced
|
|
1828
|
+
* rules in scripts/check-schema-source.mjs.
|
|
1829
|
+
*
|
|
1830
|
+
* A tool is "working" only when three levels pass: programmatic (its owner, called directly on the
|
|
1831
|
+
* real OS), protocol (through the transports, including the relay), chat (a real platform agent in a
|
|
1832
|
+
* real chat calls it and gets the right result). Every harness that proves a level — the desktop's
|
|
1833
|
+
* vitest suites, aidream's live pytest — writes `ToolResultsFile`s; the status table is generated
|
|
1834
|
+
* from them (src/tools/status.ts) and is never written by hand. This file is the one contract
|
|
1835
|
+
* between those harnesses: the Pydantic twin in aidream/_generated/desktop_protocol.py is generated
|
|
1836
|
+
* from it, so the Python writers and the TS reader cannot drift.
|
|
1837
|
+
*/
|
|
1838
|
+
|
|
1839
|
+
/** Tool names are the platform registry's (`tool.definition.name`): `fs_read`, `shell_execute`… */
|
|
1840
|
+
declare const ToolName: z.ZodString;
|
|
1841
|
+
declare const ToolLevel: z.ZodEnum<{
|
|
1842
|
+
programmatic: "programmatic";
|
|
1843
|
+
protocol: "protocol";
|
|
1844
|
+
chat: "chat";
|
|
1845
|
+
}>;
|
|
1846
|
+
type ToolLevel = z.output<typeof ToolLevel>;
|
|
1847
|
+
declare const ToolOutcome: z.ZodEnum<{
|
|
1848
|
+
pass: "pass";
|
|
1849
|
+
fail: "fail";
|
|
1850
|
+
skip: "skip";
|
|
1851
|
+
}>;
|
|
1852
|
+
type ToolOutcome = z.output<typeof ToolOutcome>;
|
|
1853
|
+
declare const ToolPlatform: z.ZodEnum<{
|
|
1854
|
+
darwin: "darwin";
|
|
1855
|
+
win32: "win32";
|
|
1856
|
+
linux: "linux";
|
|
1857
|
+
}>;
|
|
1858
|
+
type ToolPlatform = z.output<typeof ToolPlatform>;
|
|
1859
|
+
/**
|
|
1860
|
+
* How the call reached the owner. `in_process` is level 1; `localhost` and `relay` are level 2;
|
|
1861
|
+
* `agent` is level 3 (a model chose the call). `relay` means the platform's real path: a matrx-ai
|
|
1862
|
+
* tool → aidream local-proxy → the relay → the device.
|
|
1863
|
+
*/
|
|
1864
|
+
declare const ToolTransport: z.ZodEnum<{
|
|
1865
|
+
relay: "relay";
|
|
1866
|
+
in_process: "in_process";
|
|
1867
|
+
localhost: "localhost";
|
|
1868
|
+
agent: "agent";
|
|
1869
|
+
}>;
|
|
1870
|
+
type ToolTransport = z.output<typeof ToolTransport>;
|
|
1871
|
+
declare const ToolLevelResult: z.ZodObject<{
|
|
1872
|
+
tool: z.ZodString;
|
|
1873
|
+
level: z.ZodEnum<{
|
|
1874
|
+
programmatic: "programmatic";
|
|
1875
|
+
protocol: "protocol";
|
|
1876
|
+
chat: "chat";
|
|
1877
|
+
}>;
|
|
1878
|
+
platform: z.ZodEnum<{
|
|
1879
|
+
darwin: "darwin";
|
|
1880
|
+
win32: "win32";
|
|
1881
|
+
linux: "linux";
|
|
1882
|
+
}>;
|
|
1883
|
+
transport: z.ZodEnum<{
|
|
1884
|
+
relay: "relay";
|
|
1885
|
+
in_process: "in_process";
|
|
1886
|
+
localhost: "localhost";
|
|
1887
|
+
agent: "agent";
|
|
1888
|
+
}>;
|
|
1889
|
+
outcome: z.ZodEnum<{
|
|
1890
|
+
pass: "pass";
|
|
1891
|
+
fail: "fail";
|
|
1892
|
+
skip: "skip";
|
|
1893
|
+
}>;
|
|
1894
|
+
remote_network: z.ZodBoolean;
|
|
1895
|
+
detail: z.ZodString;
|
|
1896
|
+
suite: z.ZodString;
|
|
1897
|
+
test: z.ZodString;
|
|
1898
|
+
run_at_ms: z.ZodInt;
|
|
1899
|
+
}, z.core.$strict>;
|
|
1900
|
+
type ToolLevelResult = z.output<typeof ToolLevelResult>;
|
|
1901
|
+
declare const ToolResultsFile: z.ZodObject<{
|
|
1902
|
+
schema: z.ZodLiteral<"matrx.tool-results.v1">;
|
|
1903
|
+
commit: z.ZodString;
|
|
1904
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1905
|
+
tool: z.ZodString;
|
|
1906
|
+
level: z.ZodEnum<{
|
|
1907
|
+
programmatic: "programmatic";
|
|
1908
|
+
protocol: "protocol";
|
|
1909
|
+
chat: "chat";
|
|
1910
|
+
}>;
|
|
1911
|
+
platform: z.ZodEnum<{
|
|
1912
|
+
darwin: "darwin";
|
|
1913
|
+
win32: "win32";
|
|
1914
|
+
linux: "linux";
|
|
1915
|
+
}>;
|
|
1916
|
+
transport: z.ZodEnum<{
|
|
1917
|
+
relay: "relay";
|
|
1918
|
+
in_process: "in_process";
|
|
1919
|
+
localhost: "localhost";
|
|
1920
|
+
agent: "agent";
|
|
1921
|
+
}>;
|
|
1922
|
+
outcome: z.ZodEnum<{
|
|
1923
|
+
pass: "pass";
|
|
1924
|
+
fail: "fail";
|
|
1925
|
+
skip: "skip";
|
|
1926
|
+
}>;
|
|
1927
|
+
remote_network: z.ZodBoolean;
|
|
1928
|
+
detail: z.ZodString;
|
|
1929
|
+
suite: z.ZodString;
|
|
1930
|
+
test: z.ZodString;
|
|
1931
|
+
run_at_ms: z.ZodInt;
|
|
1932
|
+
}, z.core.$strict>>;
|
|
1933
|
+
}, z.core.$strict>;
|
|
1934
|
+
type ToolResultsFile = z.output<typeof ToolResultsFile>;
|
|
1935
|
+
|
|
1035
1936
|
/**
|
|
1036
1937
|
* Version skew is the normal state: a phone, the server and a desktop app in the field run
|
|
1037
1938
|
* different package versions, and a minor protocol bump must never make any of them fail.
|
|
@@ -1076,6 +1977,20 @@ declare const NULL_SINCE: {
|
|
|
1076
1977
|
readonly olderPeersGet: 0;
|
|
1077
1978
|
};
|
|
1078
1979
|
};
|
|
1980
|
+
/**
|
|
1981
|
+
* Error reasons added after x.0, with the minor that added each. An older peer's strict enum would
|
|
1982
|
+
* refuse the whole error body, so `forPeer` drops a reason the peer does not know (the code, the
|
|
1983
|
+
* message and `retryable` still tell it what happened).
|
|
1984
|
+
*/
|
|
1985
|
+
declare const REASONS_SINCE: {
|
|
1986
|
+
readonly runtime_not_installed: "1.2";
|
|
1987
|
+
readonly model_not_installed: "1.2";
|
|
1988
|
+
readonly unsupported_media: "1.2";
|
|
1989
|
+
readonly download_failed: "1.2";
|
|
1990
|
+
readonly service_starting: "1.2";
|
|
1991
|
+
readonly service_restarted: "1.2";
|
|
1992
|
+
readonly service_failed: "1.2";
|
|
1993
|
+
};
|
|
1079
1994
|
/** A device status for a reader at `version`: `since_ms` null ("never") becomes 0 before 1.1. */
|
|
1080
1995
|
declare function statusForPeer<T extends {
|
|
1081
1996
|
since_ms: number | null;
|
|
@@ -1103,4 +2018,132 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
1103
2018
|
/** Every op whose result has a versioned field is wired into forPeer (checked by the test). */
|
|
1104
2019
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
1105
2020
|
|
|
1106
|
-
|
|
2021
|
+
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
2022
|
+
declare const CONTRACT_SHA256: "ef9fd8c8ab611bf450730452a6cf48a4ebd566218b6e17e2834ef030fc2044cb";
|
|
2023
|
+
|
|
2024
|
+
/**
|
|
2025
|
+
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
2026
|
+
* protocol ops it reaches, the group it ships in, and what became of each of matrx-local's 139
|
|
2027
|
+
* handlers (120 actions + the 19 action-enum dispatchers that fanned out to them).
|
|
2028
|
+
*
|
|
2029
|
+
* Data only. The status table (./status.ts) joins it with the harnesses' results, so a tool listed
|
|
2030
|
+
* here with no passing result reads "untested", never "working". Design and the reasons behind each
|
|
2031
|
+
* group: matrx-desktop/design/local-tools.md.
|
|
2032
|
+
*/
|
|
2033
|
+
|
|
2034
|
+
type ToolGroupId = "files_shell" | "os_control" | "personal_automation" | "tools_service" | "ml_service" | "windows_admin";
|
|
2035
|
+
interface ToolGroup {
|
|
2036
|
+
readonly id: ToolGroupId;
|
|
2037
|
+
readonly order: number;
|
|
2038
|
+
readonly title: string;
|
|
2039
|
+
/** Who implements the ops: a TS capability owner in the core, or a Python service. */
|
|
2040
|
+
readonly owner: "core" | "python_tools" | "python_ml";
|
|
2041
|
+
}
|
|
2042
|
+
declare const TOOL_GROUPS: readonly ToolGroup[];
|
|
2043
|
+
/**
|
|
2044
|
+
* How an agent's call reaches the device. Both end at the relay's `POST /v1/devices/{id}/call`:
|
|
2045
|
+
* - `sandbox_proxy`: the cloud-sandbox-shaped tools (fs_*, shell_*). matrx-ai's `_sandbox_proxy`
|
|
2046
|
+
* calls aidream `/api/local-proxy/{device}/{fs|search|exec}/…`, which maps the route to its op.
|
|
2047
|
+
* Agent code never knows a laptop from a cloud box (SPEC §6.1).
|
|
2048
|
+
* - `device_op`: desktop-only capabilities. One generic route, `/api/local-proxy/{device}/op/{cap.op}`,
|
|
2049
|
+
* params and result exactly the op's schema; the tool definition is generated from that schema.
|
|
2050
|
+
* - `server`: runs on the aidream server even when the turn is bound to a device (a defect when
|
|
2051
|
+
* the tool reads a local path; see `note`).
|
|
2052
|
+
*/
|
|
2053
|
+
type ToolPath = "sandbox_proxy" | "device_op" | "server";
|
|
2054
|
+
/** `built`: the ops exist and the tool is registered; `planned`: designed, not built; `broken`: registered but wrong on a device. */
|
|
2055
|
+
type ToolState = "built" | "planned" | "broken";
|
|
2056
|
+
interface CatalogTool {
|
|
2057
|
+
/** The platform registry name (`tool.definition.name`). */
|
|
2058
|
+
readonly name: string;
|
|
2059
|
+
readonly group: ToolGroupId;
|
|
2060
|
+
readonly state: ToolState;
|
|
2061
|
+
readonly path: ToolPath;
|
|
2062
|
+
/** Ops the tool sends. For `built` tools every one is in OPS (a test enforces it). */
|
|
2063
|
+
readonly ops: readonly string[];
|
|
2064
|
+
readonly platforms: readonly ToolPlatform[];
|
|
2065
|
+
/** One line for the status table. */
|
|
2066
|
+
readonly summary: string;
|
|
2067
|
+
/** Required for `broken`: what is wrong. */
|
|
2068
|
+
readonly note?: string;
|
|
2069
|
+
}
|
|
2070
|
+
declare const TOOL_CATALOG: readonly CatalogTool[];
|
|
2071
|
+
/** What became of one matrx-local handler. */
|
|
2072
|
+
type LegacyDisposition = {
|
|
2073
|
+
readonly kind: "tool";
|
|
2074
|
+
readonly tool: string;
|
|
2075
|
+
} | {
|
|
2076
|
+
readonly kind: "dropped";
|
|
2077
|
+
readonly reason: string;
|
|
2078
|
+
};
|
|
2079
|
+
/** matrx-local's 120 actions (`app/tools/actions.py` ACTION_GROUPS), keyed `<mega tool>.<action>`. */
|
|
2080
|
+
declare const LEGACY_ACTIONS: Readonly<Record<string, LegacyDisposition>>;
|
|
2081
|
+
/**
|
|
2082
|
+
* matrx-local's 19 action-enum dispatchers. Each fanned an `action` out to the handlers above and
|
|
2083
|
+
* did nothing else; they retire with the `matrx-local` executor binding (the platform reaches a
|
|
2084
|
+
* device through the relay now, never by client delegation).
|
|
2085
|
+
*/
|
|
2086
|
+
declare const LEGACY_DISPATCHERS: readonly string[];
|
|
2087
|
+
/** Built tools' ops, typed: a built tool naming an op the protocol does not have fails to compile in the test. */
|
|
2088
|
+
declare function builtOps(): OpName[];
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* The generated tool status table (SPEC §10): tool × level × platform, built ONLY from harness
|
|
2092
|
+
* results (`ToolResultsFile`) joined with the catalog. Never written by hand; the one status anyone
|
|
2093
|
+
* cites. `renderToolStatusMarkdown` is the committed text form; screens render `ToolStatus` itself.
|
|
2094
|
+
*/
|
|
2095
|
+
|
|
2096
|
+
declare const TOOL_LEVELS: readonly ToolLevel[];
|
|
2097
|
+
declare const TOOL_PLATFORMS: readonly ToolPlatform[];
|
|
2098
|
+
/**
|
|
2099
|
+
* `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof
|
|
2100
|
+
* missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing
|
|
2101
|
+
* ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.
|
|
2102
|
+
*/
|
|
2103
|
+
type CellState = "pass" | "partial" | "fail" | "untested" | "not_built" | "unsupported";
|
|
2104
|
+
interface StatusEvidence {
|
|
2105
|
+
readonly suite: string;
|
|
2106
|
+
readonly test: string;
|
|
2107
|
+
readonly transport: ToolTransport;
|
|
2108
|
+
readonly outcome: ToolLevelResult["outcome"];
|
|
2109
|
+
readonly remote_network: boolean;
|
|
2110
|
+
readonly commit: string;
|
|
2111
|
+
readonly run_at_ms: number;
|
|
2112
|
+
readonly detail: string;
|
|
2113
|
+
}
|
|
2114
|
+
interface StatusCell {
|
|
2115
|
+
readonly state: CellState;
|
|
2116
|
+
/** Required proofs not yet passed, e.g. "relay from another network". */
|
|
2117
|
+
readonly missing: readonly string[];
|
|
2118
|
+
readonly last_run_at_ms: number | null;
|
|
2119
|
+
readonly evidence: readonly StatusEvidence[];
|
|
2120
|
+
}
|
|
2121
|
+
interface StatusRow {
|
|
2122
|
+
readonly tool: string;
|
|
2123
|
+
readonly group: ToolGroupId;
|
|
2124
|
+
readonly tool_state: ToolState;
|
|
2125
|
+
readonly summary: string;
|
|
2126
|
+
readonly note: string | null;
|
|
2127
|
+
readonly cells: Readonly<Record<ToolPlatform, Readonly<Record<ToolLevel, StatusCell>>>>;
|
|
2128
|
+
/** Working on a platform = all three levels pass there (SPEC §10). */
|
|
2129
|
+
readonly working: Readonly<Record<ToolPlatform, boolean>>;
|
|
2130
|
+
}
|
|
2131
|
+
interface ToolStatus {
|
|
2132
|
+
readonly schema: "matrx.tool-status.v1";
|
|
2133
|
+
readonly generated_at_ms: number;
|
|
2134
|
+
readonly commits: readonly string[];
|
|
2135
|
+
readonly rows: readonly StatusRow[];
|
|
2136
|
+
readonly totals: Readonly<Record<ToolPlatform, {
|
|
2137
|
+
readonly working: number;
|
|
2138
|
+
readonly built: number;
|
|
2139
|
+
readonly tools: number;
|
|
2140
|
+
}>>;
|
|
2141
|
+
}
|
|
2142
|
+
/** Build the table from every results file. Throws when a file is off-contract (never silently skipped). */
|
|
2143
|
+
declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
2144
|
+
readonly generatedAtMs: number;
|
|
2145
|
+
}): ToolStatus;
|
|
2146
|
+
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
2147
|
+
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
2148
|
+
|
|
2149
|
+
export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, ExecCwdEvent, ExecExitedEvent, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchParams, FsWatchResult, FsWriteParams, FsWriteResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, MlInstallPhase, MlInstallProgress, MlProgress, MlRuntimeState, MlServiceState, MlServiceStatus, MlStatusParams, MlStatusResult, ModelsInstallParams, ModelsInstallResult, ModelsProgressEvent, ModelsStatusParams, ModelsStatusResult, ModelsTranscribeParams, ModelsTranscribeResult, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, SERVICE_MAX_FRAME_BYTES, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, TranscriptSegment, TranscriptionModelId, TranscriptionModelInfo, VERSIONED_RESULT_OPS, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
|