@ai-matrx/desktop-protocol 0.17.12 → 0.17.13
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 +8 -0
- package/dist/client.cjs +117 -1
- 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 +117 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +151 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +259 -8
- package/dist/index.d.ts +259 -8
- package/dist/index.js +151 -5
- package/dist/index.js.map +1 -1
- package/dist/{models-A0PWllJz.d.cts → models-BOPMXUz-.d.cts} +362 -1
- package/dist/{models-A0PWllJz.d.ts → models-BOPMXUz-.d.ts} +362 -1
- package/dist/react.d.cts +136 -0
- package/dist/react.d.ts +136 -0
- package/generated/desktop-protocol.schema.json +610 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.13
|
|
4
|
+
### Unreleased
|
|
5
|
+
### (protocol 1.17)
|
|
6
|
+
|
|
7
|
+
- **What is using the computer.** `resources.activity`: processes grouped into jobs (type-check, tests, build, lint, dev server, language server, search) with who started each, its project folder, duplicates, orphans and queued type-checks; the heaviest processes; the strain verdict; memory as Activity Monitor counts it (used, compressed, pressure); the last hour. `resources.stop_job` stops a listed job's whole tree (protected trees refused). `resources.incidents`: the slowdown log, newest first. `ResourcesDisk.name` (optional): the volume's name as the file manager shows it, stripped for peers below 1.17 (guard: versioning.test.ts "disk name 1.17").
|
|
8
|
+
|
|
9
|
+
Consumer action: none for older peers.
|
|
10
|
+
|
|
3
11
|
## 0.17.12
|
|
4
12
|
### (protocol 1.16)
|
|
5
13
|
|
package/dist/client.cjs
CHANGED
|
@@ -143,7 +143,7 @@ var import_zod2 = require("zod");
|
|
|
143
143
|
// src/schema/primitives.ts
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var PROTOCOL_MAJOR = 1;
|
|
146
|
-
var PROTOCOL_MINOR =
|
|
146
|
+
var PROTOCOL_MINOR = 17;
|
|
147
147
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
148
148
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
149
149
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1169,6 +1169,8 @@ var import_zod19 = require("zod");
|
|
|
1169
1169
|
var ResourcesDisk = import_zod19.z.strictObject({
|
|
1170
1170
|
/** Where it is mounted ("/", "C:"). */
|
|
1171
1171
|
mount: import_zod19.z.string().max(512),
|
|
1172
|
+
/** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
|
|
1173
|
+
name: import_zod19.z.string().max(256).optional(),
|
|
1172
1174
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1173
1175
|
fs: import_zod19.z.string().max(64),
|
|
1174
1176
|
size_bytes: nonNegInt,
|
|
@@ -1189,6 +1191,117 @@ var ResourcesSnapshotResult = import_zod19.z.strictObject({
|
|
|
1189
1191
|
disks: import_zod19.z.array(ResourcesDisk).max(64),
|
|
1190
1192
|
uptime_seconds: nonNegInt
|
|
1191
1193
|
});
|
|
1194
|
+
var ResourcesJobKind = import_zod19.z.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
|
|
1195
|
+
var ResourcesStrain = import_zod19.z.enum(["good", "strain", "overloaded"]);
|
|
1196
|
+
var ResourcesPressure = import_zod19.z.enum(["normal", "warning", "critical"]);
|
|
1197
|
+
var ResourcesJob = import_zod19.z.strictObject({
|
|
1198
|
+
/** The job's root process (Stop takes its whole tree). */
|
|
1199
|
+
pid: import_zod19.z.int().min(0),
|
|
1200
|
+
kind: ResourcesJobKind,
|
|
1201
|
+
/** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
|
|
1202
|
+
command: import_zod19.z.string().max(256),
|
|
1203
|
+
/** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
|
|
1204
|
+
started_by: import_zod19.z.string().max(64).nullable(),
|
|
1205
|
+
/** Whatever started it is gone and nothing waits for it. */
|
|
1206
|
+
orphan: import_zod19.z.boolean(),
|
|
1207
|
+
/** A type-check queued for its turn (no compiler running yet). */
|
|
1208
|
+
waiting: import_zod19.z.boolean(),
|
|
1209
|
+
/** The project folder it runs in ("matrx-frontend"); null when not in one. */
|
|
1210
|
+
folder: import_zod19.z.string().max(256).nullable(),
|
|
1211
|
+
/** The same command in the same folder, running this many times (1 = no duplicate). */
|
|
1212
|
+
duplicates: import_zod19.z.int().min(1),
|
|
1213
|
+
processes: import_zod19.z.int().min(1),
|
|
1214
|
+
/** Sum over the tree, as `ps` reports it: 100 = one full core. */
|
|
1215
|
+
cpu_percent: import_zod19.z.number().min(0),
|
|
1216
|
+
/** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
|
|
1217
|
+
memory_bytes: nonNegInt,
|
|
1218
|
+
started_at_ms: epochMs.nullable(),
|
|
1219
|
+
/** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
|
|
1220
|
+
stoppable: import_zod19.z.boolean()
|
|
1221
|
+
});
|
|
1222
|
+
var ResourcesProcess = import_zod19.z.strictObject({
|
|
1223
|
+
pid: import_zod19.z.int().min(0),
|
|
1224
|
+
/** The command line, shortened. */
|
|
1225
|
+
name: import_zod19.z.string().max(256),
|
|
1226
|
+
cpu_percent: import_zod19.z.number().min(0),
|
|
1227
|
+
memory_bytes: nonNegInt,
|
|
1228
|
+
started_by: import_zod19.z.string().max(64).nullable(),
|
|
1229
|
+
/** The job it belongs to ("type-check in aidream"); null when none. */
|
|
1230
|
+
job: import_zod19.z.string().max(256).nullable(),
|
|
1231
|
+
started_at_ms: epochMs.nullable()
|
|
1232
|
+
});
|
|
1233
|
+
var ResourcesVerdict = import_zod19.z.strictObject({
|
|
1234
|
+
level: ResourcesStrain,
|
|
1235
|
+
/** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
|
|
1236
|
+
text: import_zod19.z.string().max(256),
|
|
1237
|
+
/** The biggest jobs behind it; null when all is well. */
|
|
1238
|
+
cause: import_zod19.z.string().max(1024).nullable()
|
|
1239
|
+
});
|
|
1240
|
+
var ResourcesSample = import_zod19.z.strictObject({
|
|
1241
|
+
at_ms: epochMs,
|
|
1242
|
+
/** The 1-minute load average. */
|
|
1243
|
+
load: import_zod19.z.number().min(0),
|
|
1244
|
+
memory_used_bytes: nonNegInt,
|
|
1245
|
+
typechecks: nonNegInt
|
|
1246
|
+
});
|
|
1247
|
+
var ResourcesActivityParams = import_zod19.z.strictObject({});
|
|
1248
|
+
var ResourcesActivityResult = import_zod19.z.strictObject({
|
|
1249
|
+
/** False until the first reading (a second or two after start). */
|
|
1250
|
+
ready: import_zod19.z.boolean(),
|
|
1251
|
+
sampled_at_ms: epochMs.nullable(),
|
|
1252
|
+
cores: import_zod19.z.int().min(1),
|
|
1253
|
+
/** 1, 5 and 15 minute load averages. */
|
|
1254
|
+
load: import_zod19.z.array(import_zod19.z.number().min(0)).length(3),
|
|
1255
|
+
memory: import_zod19.z.strictObject({
|
|
1256
|
+
total_bytes: nonNegInt,
|
|
1257
|
+
/** Activity Monitor's Memory Used: app memory + wired + compressed. */
|
|
1258
|
+
used_bytes: nonNegInt,
|
|
1259
|
+
/** Data held compressed, and the memory the compressor takes to hold it. */
|
|
1260
|
+
compressed_bytes: nonNegInt,
|
|
1261
|
+
compressor_bytes: nonNegInt,
|
|
1262
|
+
swap_used_bytes: nonNegInt,
|
|
1263
|
+
pressure: ResourcesPressure.nullable()
|
|
1264
|
+
}),
|
|
1265
|
+
verdict: ResourcesVerdict,
|
|
1266
|
+
typechecks: import_zod19.z.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
|
|
1267
|
+
/** Heaviest first (1 GB weighs as much as 16 % of a core). */
|
|
1268
|
+
jobs: import_zod19.z.array(ResourcesJob).max(200),
|
|
1269
|
+
/** The 15 heaviest by memory and the 15 busiest by CPU, together. */
|
|
1270
|
+
top: import_zod19.z.array(ResourcesProcess).max(30),
|
|
1271
|
+
/** The last hour, oldest first. */
|
|
1272
|
+
history: import_zod19.z.array(ResourcesSample).max(1200)
|
|
1273
|
+
});
|
|
1274
|
+
var ResourcesStopJobParams = import_zod19.z.strictObject({ pid: import_zod19.z.int().min(1) });
|
|
1275
|
+
var ResourcesStopJobResult = import_zod19.z.strictObject({
|
|
1276
|
+
/** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
|
|
1277
|
+
processes: nonNegInt,
|
|
1278
|
+
/** It had finished before the request arrived. */
|
|
1279
|
+
already_finished: import_zod19.z.boolean()
|
|
1280
|
+
});
|
|
1281
|
+
var ResourcesIncident = import_zod19.z.strictObject({
|
|
1282
|
+
at_ms: epochMs,
|
|
1283
|
+
verdict: ResourcesVerdict,
|
|
1284
|
+
load: import_zod19.z.number().min(0),
|
|
1285
|
+
memory_used_bytes: nonNegInt,
|
|
1286
|
+
compressed_bytes: nonNegInt,
|
|
1287
|
+
pressure: ResourcesPressure.nullable(),
|
|
1288
|
+
jobs: import_zod19.z.array(
|
|
1289
|
+
import_zod19.z.strictObject({
|
|
1290
|
+
kind: ResourcesJobKind,
|
|
1291
|
+
started_by: import_zod19.z.string().max(64).nullable(),
|
|
1292
|
+
folder: import_zod19.z.string().max(256).nullable(),
|
|
1293
|
+
command: import_zod19.z.string().max(256),
|
|
1294
|
+
cpu_percent: import_zod19.z.number().min(0),
|
|
1295
|
+
memory_bytes: nonNegInt,
|
|
1296
|
+
duplicates: import_zod19.z.int().min(1)
|
|
1297
|
+
})
|
|
1298
|
+
).max(8)
|
|
1299
|
+
});
|
|
1300
|
+
var ResourcesIncidentsParams = import_zod19.z.strictObject({ limit: import_zod19.z.int().min(1).max(200).default(50) });
|
|
1301
|
+
var ResourcesIncidentsResult = import_zod19.z.strictObject({
|
|
1302
|
+
/** Newest first; at most one a minute is written. */
|
|
1303
|
+
incidents: import_zod19.z.array(ResourcesIncident).max(200)
|
|
1304
|
+
});
|
|
1192
1305
|
|
|
1193
1306
|
// src/schema/stack.ts
|
|
1194
1307
|
var import_zod20 = require("zod");
|
|
@@ -1978,6 +2091,9 @@ var OPS = {
|
|
|
1978
2091
|
"power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
1979
2092
|
"power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1980
2093
|
"resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
2094
|
+
"resources.activity": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: "unary", since: "1.17", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2095
|
+
"resources.stop_job": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: "unary", since: "1.17", errors: ["NOT_FOUND", "CONFLICT", "AUTH_FORBIDDEN", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2096
|
+
"resources.incidents": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: "unary", since: "1.17", errors: ["INTERNAL"] },
|
|
1981
2097
|
"audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1982
2098
|
"audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
|
|
1983
2099
|
"audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|