@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/dist/client.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-A0PWllJz.cjs';
5
- export { i as isDesktopProtocolError } from './models-A0PWllJz.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BOPMXUz-.cjs';
5
+ export { i as isDesktopProtocolError } from './models-BOPMXUz-.cjs';
6
6
  import { FrameHeader } from './frame.cjs';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-A0PWllJz.js';
5
- export { i as isDesktopProtocolError } from './models-A0PWllJz.js';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BOPMXUz-.js';
5
+ export { i as isDesktopProtocolError } from './models-BOPMXUz-.js';
6
6
  import { FrameHeader } from './frame.js';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.js CHANGED
@@ -111,7 +111,7 @@ import { z as z2 } from "zod";
111
111
  // src/schema/primitives.ts
112
112
  import { z } from "zod";
113
113
  var PROTOCOL_MAJOR = 1;
114
- var PROTOCOL_MINOR = 16;
114
+ var PROTOCOL_MINOR = 17;
115
115
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
116
116
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
117
117
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1137,6 +1137,8 @@ import { z as z19 } from "zod";
1137
1137
  var ResourcesDisk = z19.strictObject({
1138
1138
  /** Where it is mounted ("/", "C:"). */
1139
1139
  mount: z19.string().max(512),
1140
+ /** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
1141
+ name: z19.string().max(256).optional(),
1140
1142
  /** The file system ("apfs", "NTFS", "ext4"). */
1141
1143
  fs: z19.string().max(64),
1142
1144
  size_bytes: nonNegInt,
@@ -1157,6 +1159,117 @@ var ResourcesSnapshotResult = z19.strictObject({
1157
1159
  disks: z19.array(ResourcesDisk).max(64),
1158
1160
  uptime_seconds: nonNegInt
1159
1161
  });
1162
+ var ResourcesJobKind = z19.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
1163
+ var ResourcesStrain = z19.enum(["good", "strain", "overloaded"]);
1164
+ var ResourcesPressure = z19.enum(["normal", "warning", "critical"]);
1165
+ var ResourcesJob = z19.strictObject({
1166
+ /** The job's root process (Stop takes its whole tree). */
1167
+ pid: z19.int().min(0),
1168
+ kind: ResourcesJobKind,
1169
+ /** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
1170
+ command: z19.string().max(256),
1171
+ /** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
1172
+ started_by: z19.string().max(64).nullable(),
1173
+ /** Whatever started it is gone and nothing waits for it. */
1174
+ orphan: z19.boolean(),
1175
+ /** A type-check queued for its turn (no compiler running yet). */
1176
+ waiting: z19.boolean(),
1177
+ /** The project folder it runs in ("matrx-frontend"); null when not in one. */
1178
+ folder: z19.string().max(256).nullable(),
1179
+ /** The same command in the same folder, running this many times (1 = no duplicate). */
1180
+ duplicates: z19.int().min(1),
1181
+ processes: z19.int().min(1),
1182
+ /** Sum over the tree, as `ps` reports it: 100 = one full core. */
1183
+ cpu_percent: z19.number().min(0),
1184
+ /** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
1185
+ memory_bytes: nonNegInt,
1186
+ started_at_ms: epochMs.nullable(),
1187
+ /** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
1188
+ stoppable: z19.boolean()
1189
+ });
1190
+ var ResourcesProcess = z19.strictObject({
1191
+ pid: z19.int().min(0),
1192
+ /** The command line, shortened. */
1193
+ name: z19.string().max(256),
1194
+ cpu_percent: z19.number().min(0),
1195
+ memory_bytes: nonNegInt,
1196
+ started_by: z19.string().max(64).nullable(),
1197
+ /** The job it belongs to ("type-check in aidream"); null when none. */
1198
+ job: z19.string().max(256).nullable(),
1199
+ started_at_ms: epochMs.nullable()
1200
+ });
1201
+ var ResourcesVerdict = z19.strictObject({
1202
+ level: ResourcesStrain,
1203
+ /** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
1204
+ text: z19.string().max(256),
1205
+ /** The biggest jobs behind it; null when all is well. */
1206
+ cause: z19.string().max(1024).nullable()
1207
+ });
1208
+ var ResourcesSample = z19.strictObject({
1209
+ at_ms: epochMs,
1210
+ /** The 1-minute load average. */
1211
+ load: z19.number().min(0),
1212
+ memory_used_bytes: nonNegInt,
1213
+ typechecks: nonNegInt
1214
+ });
1215
+ var ResourcesActivityParams = z19.strictObject({});
1216
+ var ResourcesActivityResult = z19.strictObject({
1217
+ /** False until the first reading (a second or two after start). */
1218
+ ready: z19.boolean(),
1219
+ sampled_at_ms: epochMs.nullable(),
1220
+ cores: z19.int().min(1),
1221
+ /** 1, 5 and 15 minute load averages. */
1222
+ load: z19.array(z19.number().min(0)).length(3),
1223
+ memory: z19.strictObject({
1224
+ total_bytes: nonNegInt,
1225
+ /** Activity Monitor's Memory Used: app memory + wired + compressed. */
1226
+ used_bytes: nonNegInt,
1227
+ /** Data held compressed, and the memory the compressor takes to hold it. */
1228
+ compressed_bytes: nonNegInt,
1229
+ compressor_bytes: nonNegInt,
1230
+ swap_used_bytes: nonNegInt,
1231
+ pressure: ResourcesPressure.nullable()
1232
+ }),
1233
+ verdict: ResourcesVerdict,
1234
+ typechecks: z19.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
1235
+ /** Heaviest first (1 GB weighs as much as 16 % of a core). */
1236
+ jobs: z19.array(ResourcesJob).max(200),
1237
+ /** The 15 heaviest by memory and the 15 busiest by CPU, together. */
1238
+ top: z19.array(ResourcesProcess).max(30),
1239
+ /** The last hour, oldest first. */
1240
+ history: z19.array(ResourcesSample).max(1200)
1241
+ });
1242
+ var ResourcesStopJobParams = z19.strictObject({ pid: z19.int().min(1) });
1243
+ var ResourcesStopJobResult = z19.strictObject({
1244
+ /** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
1245
+ processes: nonNegInt,
1246
+ /** It had finished before the request arrived. */
1247
+ already_finished: z19.boolean()
1248
+ });
1249
+ var ResourcesIncident = z19.strictObject({
1250
+ at_ms: epochMs,
1251
+ verdict: ResourcesVerdict,
1252
+ load: z19.number().min(0),
1253
+ memory_used_bytes: nonNegInt,
1254
+ compressed_bytes: nonNegInt,
1255
+ pressure: ResourcesPressure.nullable(),
1256
+ jobs: z19.array(
1257
+ z19.strictObject({
1258
+ kind: ResourcesJobKind,
1259
+ started_by: z19.string().max(64).nullable(),
1260
+ folder: z19.string().max(256).nullable(),
1261
+ command: z19.string().max(256),
1262
+ cpu_percent: z19.number().min(0),
1263
+ memory_bytes: nonNegInt,
1264
+ duplicates: z19.int().min(1)
1265
+ })
1266
+ ).max(8)
1267
+ });
1268
+ var ResourcesIncidentsParams = z19.strictObject({ limit: z19.int().min(1).max(200).default(50) });
1269
+ var ResourcesIncidentsResult = z19.strictObject({
1270
+ /** Newest first; at most one a minute is written. */
1271
+ incidents: z19.array(ResourcesIncident).max(200)
1272
+ });
1160
1273
 
1161
1274
  // src/schema/stack.ts
1162
1275
  import { z as z20 } from "zod";
@@ -1946,6 +2059,9 @@ var OPS = {
1946
2059
  "power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
1947
2060
  "power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1948
2061
  "resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
2062
+ "resources.activity": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: "unary", since: "1.17", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2063
+ "resources.stop_job": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: "unary", since: "1.17", errors: ["NOT_FOUND", "CONFLICT", "AUTH_FORBIDDEN", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2064
+ "resources.incidents": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: "unary", since: "1.17", errors: ["INTERNAL"] },
1949
2065
  "audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
1950
2066
  "audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
1951
2067
  "audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },