@ai-matrx/desktop-protocol 0.16.0 → 0.17.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 +16 -0
- package/dist/client.cjs +145 -112
- 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 +145 -112
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +112 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -12
- package/dist/index.d.ts +66 -12
- package/dist/index.js +112 -65
- package/dist/index.js.map +1 -1
- package/dist/{models-k4pDkXUe.d.cts → models-Dj_B9wHj.d.cts} +91 -9
- package/dist/{models-k4pDkXUe.d.ts → models-Dj_B9wHj.d.ts} +91 -9
- package/dist/react.d.cts +46 -0
- package/dist/react.d.ts +46 -0
- package/generated/desktop-protocol.schema.json +184 -3
- package/package.json +1 -1
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-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
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-Dj_B9wHj.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Dj_B9wHj.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-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
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-Dj_B9wHj.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-Dj_B9wHj.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
|
@@ -94,7 +94,7 @@ import { z as z2 } from "zod";
|
|
|
94
94
|
// src/schema/primitives.ts
|
|
95
95
|
import { z } from "zod";
|
|
96
96
|
var PROTOCOL_MAJOR = 1;
|
|
97
|
-
var PROTOCOL_MINOR =
|
|
97
|
+
var PROTOCOL_MINOR = 6;
|
|
98
98
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
99
99
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
100
100
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1077,117 +1077,147 @@ var PowerPreventSleepResult = z17.strictObject({
|
|
|
1077
1077
|
awake_until_ms: epochMs.nullable()
|
|
1078
1078
|
});
|
|
1079
1079
|
|
|
1080
|
-
// src/schema/
|
|
1080
|
+
// src/schema/audio.ts
|
|
1081
1081
|
import { z as z18 } from "zod";
|
|
1082
|
-
var
|
|
1082
|
+
var AudioDevice = z18.strictObject({
|
|
1083
|
+
/** The OS's name for it, as audio.record takes it. */
|
|
1084
|
+
id: z18.string().min(1).max(256),
|
|
1085
|
+
name: z18.string().max(256),
|
|
1086
|
+
default: z18.boolean()
|
|
1087
|
+
});
|
|
1088
|
+
var AudioDevicesParams = z18.strictObject({});
|
|
1089
|
+
var AudioDevicesResult = z18.strictObject({
|
|
1090
|
+
inputs: z18.array(AudioDevice).max(64),
|
|
1091
|
+
outputs: z18.array(AudioDevice).max(64)
|
|
1092
|
+
});
|
|
1093
|
+
var AudioRecordParams = z18.strictObject({
|
|
1094
|
+
seconds: z18.number().min(0.5).max(600),
|
|
1095
|
+
/** The microphone (from audio.devices); the default input when absent. */
|
|
1096
|
+
device_id: z18.string().min(1).max(256).optional(),
|
|
1097
|
+
/** Where the WAV file goes; a new file in the temp folder when absent. */
|
|
1098
|
+
path: AbsPath.optional()
|
|
1099
|
+
});
|
|
1100
|
+
var AudioRecordResult = z18.strictObject({
|
|
1101
|
+
path: AbsPath,
|
|
1102
|
+
seconds: z18.number().min(0),
|
|
1103
|
+
bytes: nonNegInt,
|
|
1104
|
+
/** Loudest sample, 0–1: 0 means the device gave silence. */
|
|
1105
|
+
peak: z18.number().min(0).max(1)
|
|
1106
|
+
});
|
|
1107
|
+
var AudioPlayParams = z18.strictObject({ path: AbsPath });
|
|
1108
|
+
var AudioPlayResult = z18.strictObject({ path: AbsPath, seconds: z18.number().min(0) });
|
|
1109
|
+
|
|
1110
|
+
// src/schema/resources.ts
|
|
1111
|
+
import { z as z19 } from "zod";
|
|
1112
|
+
var ResourcesDisk = z19.strictObject({
|
|
1083
1113
|
/** Where it is mounted ("/", "C:"). */
|
|
1084
|
-
mount:
|
|
1114
|
+
mount: z19.string().max(512),
|
|
1085
1115
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1086
|
-
fs:
|
|
1116
|
+
fs: z19.string().max(64),
|
|
1087
1117
|
size_bytes: nonNegInt,
|
|
1088
1118
|
used_bytes: nonNegInt,
|
|
1089
1119
|
available_bytes: nonNegInt
|
|
1090
1120
|
});
|
|
1091
|
-
var ResourcesSnapshotParams =
|
|
1092
|
-
var ResourcesSnapshotResult =
|
|
1093
|
-
cpu:
|
|
1121
|
+
var ResourcesSnapshotParams = z19.strictObject({});
|
|
1122
|
+
var ResourcesSnapshotResult = z19.strictObject({
|
|
1123
|
+
cpu: z19.strictObject({
|
|
1094
1124
|
/** Busy share of all cores, 0–100, measured now. */
|
|
1095
|
-
percent:
|
|
1096
|
-
cores:
|
|
1125
|
+
percent: z19.number().min(0).max(100),
|
|
1126
|
+
cores: z19.int().min(1),
|
|
1097
1127
|
/** 1, 5 and 15 minute load averages; null on Windows. */
|
|
1098
|
-
load:
|
|
1128
|
+
load: z19.array(z19.number().min(0)).length(3).nullable()
|
|
1099
1129
|
}),
|
|
1100
|
-
memory:
|
|
1101
|
-
swap:
|
|
1102
|
-
disks:
|
|
1130
|
+
memory: z19.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
|
|
1131
|
+
swap: z19.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
|
|
1132
|
+
disks: z19.array(ResourcesDisk).max(64),
|
|
1103
1133
|
uptime_seconds: nonNegInt
|
|
1104
1134
|
});
|
|
1105
1135
|
|
|
1106
1136
|
// src/schema/fs-watch.ts
|
|
1107
|
-
import { z as
|
|
1108
|
-
var FsWatchId =
|
|
1109
|
-
var FsWatchStartParams =
|
|
1137
|
+
import { z as z20 } from "zod";
|
|
1138
|
+
var FsWatchId = z20.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
|
|
1139
|
+
var FsWatchStartParams = z20.strictObject({
|
|
1110
1140
|
path: AbsPath,
|
|
1111
|
-
recursive:
|
|
1141
|
+
recursive: z20.boolean().default(true),
|
|
1112
1142
|
/** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
|
|
1113
|
-
ignore:
|
|
1143
|
+
ignore: z20.array(z20.string().max(256)).max(64).default([])
|
|
1114
1144
|
});
|
|
1115
|
-
var FsWatchStartResult =
|
|
1145
|
+
var FsWatchStartResult = z20.strictObject({
|
|
1116
1146
|
watch_id: FsWatchId,
|
|
1117
1147
|
path: AbsPath,
|
|
1118
1148
|
/** The watch ends by itself if nobody reads it for 30 minutes. */
|
|
1119
1149
|
expires_at_ms: epochMs
|
|
1120
1150
|
});
|
|
1121
|
-
var FsWatchEventsParams =
|
|
1151
|
+
var FsWatchEventsParams = z20.strictObject({
|
|
1122
1152
|
watch_id: FsWatchId,
|
|
1123
1153
|
/** Wait up to this long for a first change when none is waiting (0 answers at once). */
|
|
1124
|
-
wait_ms:
|
|
1154
|
+
wait_ms: z20.int().min(0).max(25e3).default(0)
|
|
1125
1155
|
});
|
|
1126
|
-
var FsWatchEventsResult =
|
|
1156
|
+
var FsWatchEventsResult = z20.strictObject({
|
|
1127
1157
|
/** What changed since the last read, oldest first; re-checked against the disk when read. */
|
|
1128
|
-
changes:
|
|
1158
|
+
changes: z20.array(FsChange).max(1e3),
|
|
1129
1159
|
/** Changes were dropped (more than 1000 waited): list the folder again. */
|
|
1130
|
-
overflow:
|
|
1160
|
+
overflow: z20.boolean(),
|
|
1131
1161
|
expires_at_ms: epochMs
|
|
1132
1162
|
});
|
|
1133
|
-
var FsWatchStopParams =
|
|
1134
|
-
var FsWatchStopResult =
|
|
1163
|
+
var FsWatchStopParams = z20.strictObject({ watch_id: FsWatchId });
|
|
1164
|
+
var FsWatchStopResult = z20.strictObject({ watch_id: FsWatchId });
|
|
1135
1165
|
|
|
1136
1166
|
// src/schema/exec-job.ts
|
|
1137
|
-
import { z as
|
|
1138
|
-
var ExecJobId =
|
|
1139
|
-
var ExecJobStartParams =
|
|
1140
|
-
command:
|
|
1167
|
+
import { z as z21 } from "zod";
|
|
1168
|
+
var ExecJobId = z21.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
|
|
1169
|
+
var ExecJobStartParams = z21.strictObject({
|
|
1170
|
+
command: z21.string().min(1).max(131072),
|
|
1141
1171
|
/** The folder it runs in; the home folder when absent. */
|
|
1142
1172
|
cwd: AbsPath.optional(),
|
|
1143
|
-
env:
|
|
1173
|
+
env: z21.record(z21.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z21.string().max(32768)).optional()
|
|
1144
1174
|
});
|
|
1145
|
-
var ExecJobStartResult =
|
|
1146
|
-
var ExecJobOutputParams =
|
|
1175
|
+
var ExecJobStartResult = z21.strictObject({ job_id: ExecJobId, pid: z21.int().min(1), cwd: AbsPath });
|
|
1176
|
+
var ExecJobOutputParams = z21.strictObject({
|
|
1147
1177
|
job_id: ExecJobId,
|
|
1148
1178
|
/** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
|
|
1149
1179
|
offset: nonNegInt.default(0),
|
|
1150
1180
|
/** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
|
|
1151
|
-
wait_ms:
|
|
1152
|
-
max_bytes:
|
|
1181
|
+
wait_ms: z21.int().min(0).max(25e3).default(0),
|
|
1182
|
+
max_bytes: z21.int().min(1024).max(1048576).default(65536)
|
|
1153
1183
|
});
|
|
1154
|
-
var ExecJobOutputResult =
|
|
1184
|
+
var ExecJobOutputResult = z21.strictObject({
|
|
1155
1185
|
/** stdout and stderr interleaved as they arrived (UTF-8). */
|
|
1156
|
-
output:
|
|
1186
|
+
output: z21.string(),
|
|
1157
1187
|
next_offset: nonNegInt,
|
|
1158
1188
|
/** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
|
|
1159
1189
|
dropped_bytes: nonNegInt,
|
|
1160
|
-
running:
|
|
1161
|
-
exit_code:
|
|
1190
|
+
running: z21.boolean(),
|
|
1191
|
+
exit_code: z21.int().nullable()
|
|
1162
1192
|
});
|
|
1163
|
-
var ExecJobStopParams =
|
|
1193
|
+
var ExecJobStopParams = z21.strictObject({
|
|
1164
1194
|
job_id: ExecJobId,
|
|
1165
1195
|
/** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
|
|
1166
|
-
force:
|
|
1196
|
+
force: z21.boolean().default(false)
|
|
1167
1197
|
});
|
|
1168
|
-
var ExecJobStopResult =
|
|
1169
|
-
var ExecJobInfo =
|
|
1198
|
+
var ExecJobStopResult = z21.strictObject({ job_id: ExecJobId, exited: z21.boolean(), exit_code: z21.int().nullable() });
|
|
1199
|
+
var ExecJobInfo = z21.strictObject({
|
|
1170
1200
|
job_id: ExecJobId,
|
|
1171
|
-
command:
|
|
1172
|
-
pid:
|
|
1201
|
+
command: z21.string().max(1024),
|
|
1202
|
+
pid: z21.int().min(1),
|
|
1173
1203
|
cwd: AbsPath,
|
|
1174
|
-
running:
|
|
1175
|
-
exit_code:
|
|
1204
|
+
running: z21.boolean(),
|
|
1205
|
+
exit_code: z21.int().nullable(),
|
|
1176
1206
|
started_at_ms: epochMs,
|
|
1177
1207
|
output_bytes: nonNegInt
|
|
1178
1208
|
});
|
|
1179
|
-
var ExecJobListParams =
|
|
1180
|
-
var ExecJobListResult =
|
|
1209
|
+
var ExecJobListParams = z21.strictObject({});
|
|
1210
|
+
var ExecJobListResult = z21.strictObject({ jobs: z21.array(ExecJobInfo).max(64) });
|
|
1181
1211
|
|
|
1182
1212
|
// src/schema/coding.ts
|
|
1183
|
-
import { z as
|
|
1184
|
-
var CodingServiceCredentials =
|
|
1185
|
-
access_token:
|
|
1186
|
-
user_id:
|
|
1213
|
+
import { z as z22 } from "zod";
|
|
1214
|
+
var CodingServiceCredentials = z22.strictObject({
|
|
1215
|
+
access_token: z22.string().min(16).max(16384),
|
|
1216
|
+
user_id: z22.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/),
|
|
1187
1217
|
/** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
|
|
1188
|
-
server_url:
|
|
1218
|
+
server_url: z22.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
|
|
1189
1219
|
});
|
|
1190
|
-
var CodingHistoryBlocked =
|
|
1220
|
+
var CodingHistoryBlocked = z22.enum([
|
|
1191
1221
|
"signed_out",
|
|
1192
1222
|
"offline",
|
|
1193
1223
|
"organization_required",
|
|
@@ -1195,11 +1225,11 @@ var CodingHistoryBlocked = z21.enum([
|
|
|
1195
1225
|
"cloud_list_unavailable",
|
|
1196
1226
|
"history_too_large"
|
|
1197
1227
|
]);
|
|
1198
|
-
var CodingHistoryFailure =
|
|
1199
|
-
session_id:
|
|
1200
|
-
reason:
|
|
1228
|
+
var CodingHistoryFailure = z22.strictObject({
|
|
1229
|
+
session_id: z22.string().max(64),
|
|
1230
|
+
reason: z22.string().max(300)
|
|
1201
1231
|
});
|
|
1202
|
-
var CodingHistoryRun =
|
|
1232
|
+
var CodingHistoryRun = z22.strictObject({
|
|
1203
1233
|
/** Claude Code sessions found on this computer. */
|
|
1204
1234
|
local_sessions: nonNegInt,
|
|
1205
1235
|
/** Of those, already complete in AI Matrx. */
|
|
@@ -1214,39 +1244,39 @@ var CodingHistoryRun = z21.strictObject({
|
|
|
1214
1244
|
/** Changed while being read; a later run takes them. */
|
|
1215
1245
|
changed: nonNegInt,
|
|
1216
1246
|
failed: nonNegInt,
|
|
1217
|
-
failures:
|
|
1247
|
+
failures: z22.array(CodingHistoryFailure).max(20),
|
|
1218
1248
|
/** Candidates not reached yet. */
|
|
1219
1249
|
remaining: nonNegInt,
|
|
1220
1250
|
/** The one line a person reads, e.g. "Imported 12 of 14 sessions. 140 already in AI Matrx." */
|
|
1221
|
-
summary:
|
|
1251
|
+
summary: z22.string().max(400)
|
|
1222
1252
|
});
|
|
1223
|
-
var CodingHistoryStep =
|
|
1253
|
+
var CodingHistoryStep = z22.strictObject({
|
|
1224
1254
|
/** Null when the run could not start (blocked before a plan existed). */
|
|
1225
|
-
plan_id:
|
|
1226
|
-
finished:
|
|
1255
|
+
plan_id: z22.string().regex(/^[0-9a-f]{32}$/).nullable(),
|
|
1256
|
+
finished: z22.boolean(),
|
|
1227
1257
|
blocked: CodingHistoryBlocked.nullable(),
|
|
1228
1258
|
run: CodingHistoryRun
|
|
1229
1259
|
});
|
|
1230
|
-
var CodingPlanMissingParams =
|
|
1231
|
-
var CodingImportNextParams =
|
|
1232
|
-
plan_id:
|
|
1233
|
-
credentials: CodingServiceCredentials
|
|
1260
|
+
var CodingPlanMissingParams = z22.strictObject({ credentials: CodingServiceCredentials.nullable() });
|
|
1261
|
+
var CodingImportNextParams = z22.strictObject({
|
|
1262
|
+
plan_id: z22.string().regex(/^[0-9a-f]{32}$/),
|
|
1263
|
+
credentials: CodingServiceCredentials.nullable()
|
|
1234
1264
|
});
|
|
1235
|
-
var CodingServiceProgress =
|
|
1236
|
-
phase:
|
|
1265
|
+
var CodingServiceProgress = z22.strictObject({
|
|
1266
|
+
phase: z22.enum(["checking", "importing"]),
|
|
1237
1267
|
done: nonNegInt,
|
|
1238
1268
|
total: nonNegInt
|
|
1239
1269
|
});
|
|
1240
|
-
var CodingHistoryImportMissingParams =
|
|
1241
|
-
var CodingHistoryImportMissingResult =
|
|
1242
|
-
state:
|
|
1270
|
+
var CodingHistoryImportMissingParams = z22.strictObject({});
|
|
1271
|
+
var CodingHistoryImportMissingResult = z22.strictObject({
|
|
1272
|
+
state: z22.enum(["done", "blocked", "cancelled"]),
|
|
1243
1273
|
blocked: CodingHistoryBlocked.nullable(),
|
|
1244
1274
|
run: CodingHistoryRun,
|
|
1245
1275
|
elapsed_ms: nonNegInt
|
|
1246
1276
|
});
|
|
1247
|
-
var CodingHistoryProgressEvent =
|
|
1277
|
+
var CodingHistoryProgressEvent = z22.strictObject({
|
|
1248
1278
|
request_id: RequestId,
|
|
1249
|
-
phase:
|
|
1279
|
+
phase: z22.enum(["checking", "importing"]),
|
|
1250
1280
|
/** Sessions settled so far, of `total` candidates (0 of 0 while checking). */
|
|
1251
1281
|
done: nonNegInt,
|
|
1252
1282
|
total: nonNegInt,
|
|
@@ -1255,22 +1285,22 @@ var CodingHistoryProgressEvent = z21.strictObject({
|
|
|
1255
1285
|
});
|
|
1256
1286
|
|
|
1257
1287
|
// src/schema/apps.ts
|
|
1258
|
-
import { z as
|
|
1259
|
-
var AppKey =
|
|
1260
|
-
var AppProfileId =
|
|
1261
|
-
var AppProfileLocator =
|
|
1262
|
-
var AppSupport =
|
|
1263
|
-
var AppFeatureStatus =
|
|
1288
|
+
import { z as z23 } from "zod";
|
|
1289
|
+
var AppKey = z23.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
|
|
1290
|
+
var AppProfileId = z23.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/);
|
|
1291
|
+
var AppProfileLocator = z23.string().min(1).max(512).regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);
|
|
1292
|
+
var AppSupport = z23.enum(["supported", "partial", "unsupported"]);
|
|
1293
|
+
var AppFeatureStatus = z23.strictObject({
|
|
1264
1294
|
status: AppSupport,
|
|
1265
1295
|
/** One line, set whenever status is not "supported". */
|
|
1266
|
-
reason:
|
|
1296
|
+
reason: z23.string().max(140).nullable()
|
|
1267
1297
|
});
|
|
1268
|
-
var AppInfo =
|
|
1298
|
+
var AppInfo = z23.strictObject({
|
|
1269
1299
|
app_key: AppKey,
|
|
1270
|
-
name:
|
|
1271
|
-
installed:
|
|
1300
|
+
name: z23.string().max(64),
|
|
1301
|
+
installed: z23.boolean(),
|
|
1272
1302
|
/** The app's own version string, or null when it is not installed or does not say. */
|
|
1273
|
-
version:
|
|
1303
|
+
version: z23.string().max(64).nullable(),
|
|
1274
1304
|
/** The install found (an .app bundle, an .exe, a binary), or null. */
|
|
1275
1305
|
location: AbsPath.nullable(),
|
|
1276
1306
|
/** Open the app at all on this OS. */
|
|
@@ -1280,69 +1310,69 @@ var AppInfo = z22.strictObject({
|
|
|
1280
1310
|
/** Plan usage read from the app's own files on this OS. */
|
|
1281
1311
|
usage: AppFeatureStatus
|
|
1282
1312
|
});
|
|
1283
|
-
var AppUsageReading =
|
|
1284
|
-
window:
|
|
1313
|
+
var AppUsageReading = z23.strictObject({
|
|
1314
|
+
window: z23.enum(["five_hour", "weekly", "extra"]),
|
|
1285
1315
|
/** 0–100 for five_hour and weekly; extra-usage spend as a percent of its cap (may pass 100). */
|
|
1286
|
-
percent:
|
|
1316
|
+
percent: z23.number().min(0).max(1e4),
|
|
1287
1317
|
/** When the app recorded it. */
|
|
1288
1318
|
sampled_at_ms: epochMs,
|
|
1289
1319
|
/** True when the window has rolled over since the sample, so the figure has reset. */
|
|
1290
|
-
reset_since:
|
|
1320
|
+
reset_since: z23.boolean()
|
|
1291
1321
|
});
|
|
1292
|
-
var AppProfile =
|
|
1322
|
+
var AppProfile = z23.strictObject({
|
|
1293
1323
|
/** The row's id; null for a folder found on disk that no row names yet. */
|
|
1294
1324
|
id: AppProfileId.nullable(),
|
|
1295
1325
|
app_key: AppKey,
|
|
1296
|
-
display_name:
|
|
1326
|
+
display_name: z23.string().min(1).max(120),
|
|
1297
1327
|
/** The account the person means to be signed in here; null when not stated (never guessed). */
|
|
1298
|
-
account_identity:
|
|
1328
|
+
account_identity: z23.string().min(3).max(320).nullable(),
|
|
1299
1329
|
profile_locator: AppProfileLocator.nullable(),
|
|
1300
1330
|
/** The device the row is tied to; null when the row names none. */
|
|
1301
1331
|
device_id: DeviceId.nullable(),
|
|
1302
1332
|
/** The folder this profile resolves to on this device; null for a row tied to another device. */
|
|
1303
1333
|
folder: AbsPath.nullable(),
|
|
1304
1334
|
/** The folder exists on this device. */
|
|
1305
|
-
on_disk:
|
|
1335
|
+
on_disk: z23.boolean(),
|
|
1306
1336
|
/** An instance with this profile is running; null when it could not be determined. */
|
|
1307
|
-
running:
|
|
1337
|
+
running: z23.boolean().nullable(),
|
|
1308
1338
|
/** Usage the app recorded for this profile; null when the app exposes none here. */
|
|
1309
|
-
usage:
|
|
1339
|
+
usage: z23.array(AppUsageReading).nullable(),
|
|
1310
1340
|
last_opened_ms: epochMs.nullable()
|
|
1311
1341
|
});
|
|
1312
|
-
var AppsListParams =
|
|
1313
|
-
var AppsListResult =
|
|
1314
|
-
var AppsProfilesListParams =
|
|
1342
|
+
var AppsListParams = z23.strictObject({});
|
|
1343
|
+
var AppsListResult = z23.strictObject({ apps: z23.array(AppInfo) });
|
|
1344
|
+
var AppsProfilesListParams = z23.strictObject({
|
|
1315
1345
|
/** Only this app's profiles; every app's when absent. */
|
|
1316
1346
|
app_key: AppKey.optional()
|
|
1317
1347
|
});
|
|
1318
|
-
var AppsProfilesListResult =
|
|
1319
|
-
profiles:
|
|
1348
|
+
var AppsProfilesListResult = z23.strictObject({
|
|
1349
|
+
profiles: z23.array(AppProfile),
|
|
1320
1350
|
/**
|
|
1321
1351
|
* Whether the saved rows could be read: false while signed out or offline, when only folders
|
|
1322
1352
|
* found on disk are listed.
|
|
1323
1353
|
*/
|
|
1324
|
-
registry:
|
|
1354
|
+
registry: z23.enum(["ok", "signed_out", "unavailable"])
|
|
1325
1355
|
});
|
|
1326
|
-
var AppsProfilesSaveParams =
|
|
1356
|
+
var AppsProfilesSaveParams = z23.strictObject({
|
|
1327
1357
|
id: AppProfileId.optional(),
|
|
1328
1358
|
app_key: AppKey,
|
|
1329
|
-
display_name:
|
|
1330
|
-
account_identity:
|
|
1359
|
+
display_name: z23.string().min(1).max(120),
|
|
1360
|
+
account_identity: z23.string().min(3).max(320).nullable(),
|
|
1331
1361
|
/** On create: the folder to use (one found on disk), or null for the app's default profile. Ignored on update. */
|
|
1332
1362
|
profile_locator: AppProfileLocator.nullable(),
|
|
1333
1363
|
/** On create with profile_locator null: make a new folder named after display_name instead. */
|
|
1334
|
-
new_folder:
|
|
1364
|
+
new_folder: z23.boolean().default(false)
|
|
1335
1365
|
});
|
|
1336
1366
|
var AppsProfilesSaveResult = AppProfile;
|
|
1337
|
-
var AppsProfilesRemoveParams =
|
|
1338
|
-
var AppsProfilesRemoveResult =
|
|
1339
|
-
var AppsOpenParams =
|
|
1367
|
+
var AppsProfilesRemoveParams = z23.strictObject({ id: AppProfileId });
|
|
1368
|
+
var AppsProfilesRemoveResult = z23.strictObject({ removed: z23.boolean() });
|
|
1369
|
+
var AppsOpenParams = z23.strictObject({
|
|
1340
1370
|
app_key: AppKey,
|
|
1341
1371
|
profile_id: AppProfileId.optional()
|
|
1342
1372
|
});
|
|
1343
|
-
var AppsOpenResult =
|
|
1373
|
+
var AppsOpenResult = z23.strictObject({
|
|
1344
1374
|
/** True when an instance with this profile was already running; it is brought forward. */
|
|
1345
|
-
already_running:
|
|
1375
|
+
already_running: z23.boolean(),
|
|
1346
1376
|
folder: AbsPath.nullable()
|
|
1347
1377
|
});
|
|
1348
1378
|
|
|
@@ -1411,6 +1441,9 @@ var OPS = {
|
|
|
1411
1441
|
"power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
1412
1442
|
"power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1413
1443
|
"resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
1444
|
+
"audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1445
|
+
"audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
|
|
1446
|
+
"audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1414
1447
|
// Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
|
|
1415
1448
|
"coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] }
|
|
1416
1449
|
};
|