@agentdock/wire 0.0.94 → 0.0.96

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.
Files changed (73) hide show
  1. package/dist/accountLanguage.d.ts +2 -8
  2. package/dist/activityPreferences.d.ts +0 -2
  3. package/dist/agentCapabilities.d.ts +16 -46
  4. package/dist/agentCommonEnv.d.ts +0 -9
  5. package/dist/agentInstallGuide.d.ts +0 -7
  6. package/dist/agentRuntimeSettings.d.ts +1 -2
  7. package/dist/bgTask.d.ts +13 -24
  8. package/dist/checkpointSchemas.d.ts +1 -2
  9. package/dist/controlLevel.d.ts +1 -9
  10. package/dist/edition.d.ts +0 -1
  11. package/dist/enterpriseCurrency.d.ts +120 -0
  12. package/dist/enterpriseCurrency.js +1 -0
  13. package/dist/enterpriseDirectory.d.ts +636 -0
  14. package/dist/enterpriseDirectory.js +1 -0
  15. package/dist/enterpriseGateway.d.ts +1 -2
  16. package/dist/enterpriseGatewayExports.d.ts +4 -0
  17. package/dist/enterpriseGatewayExports.js +1 -0
  18. package/dist/enterpriseOverview.d.ts +423 -0
  19. package/dist/enterpriseOverview.js +1 -0
  20. package/dist/enterprisePolicy.d.ts +1393 -0
  21. package/dist/enterprisePolicy.js +1 -0
  22. package/dist/enterprisePolicyExports.d.ts +2 -0
  23. package/dist/enterprisePolicyExports.js +1 -0
  24. package/dist/enterpriseRange.d.ts +19 -0
  25. package/dist/enterpriseRange.js +1 -0
  26. package/dist/enterpriseRuntime.d.ts +420 -0
  27. package/dist/enterpriseRuntime.js +1 -0
  28. package/dist/envelope.d.ts +18 -30
  29. package/dist/errorMessage.d.ts +0 -1
  30. package/dist/events.d.ts +55 -71
  31. package/dist/features.d.ts +14 -29
  32. package/dist/feedback.d.ts +3 -4
  33. package/dist/fileWhitelist.d.ts +7 -39
  34. package/dist/gateway.d.ts +1643 -328
  35. package/dist/gateway.js +1 -1
  36. package/dist/gatewayBodyRetention.d.ts +149 -0
  37. package/dist/gatewayBodyRetention.js +2 -0
  38. package/dist/gatewayUsage.d.ts +3232 -0
  39. package/dist/gatewayUsage.js +1 -0
  40. package/dist/goals.d.ts +0 -1
  41. package/dist/handoffBrief.d.ts +1 -2
  42. package/dist/inboundEvents.d.ts +32 -75
  43. package/dist/index.d.ts +11 -7
  44. package/dist/index.js +1 -1
  45. package/dist/interactionEvents.d.ts +49 -57
  46. package/dist/legacyProtocol.d.ts +0 -6
  47. package/dist/license.d.ts +36 -37
  48. package/dist/machine.d.ts +48 -56
  49. package/dist/messageMeta.d.ts +15 -17
  50. package/dist/messages.d.ts +13 -20
  51. package/dist/notification.d.ts +2 -3
  52. package/dist/ops.d.ts +9 -27
  53. package/dist/pairing.d.ts +9 -49
  54. package/dist/permissionSubject.d.ts +3 -26
  55. package/dist/protocol.d.ts +0 -6
  56. package/dist/rpc.d.ts +118 -162
  57. package/dist/rpc.js +1 -1
  58. package/dist/scheduledTasks.d.ts +9 -10
  59. package/dist/semver.d.ts +3 -22
  60. package/dist/sessionBtw.d.ts +6 -7
  61. package/dist/sessionBtw.js +1 -1
  62. package/dist/sessionResult.d.ts +21 -27
  63. package/dist/sessionTitle.d.ts +2 -9
  64. package/dist/socketEvents.d.ts +4 -5
  65. package/dist/sourceMetadata.d.ts +1 -14
  66. package/dist/spawnError.d.ts +7 -14
  67. package/dist/stats.d.ts +13 -20
  68. package/dist/sync.d.ts +75 -156
  69. package/dist/taskResult.d.ts +3 -20
  70. package/dist/telemetry.d.ts +1 -11
  71. package/dist/utils.d.ts +0 -1
  72. package/dist/workItems.d.ts +6 -30
  73. package/package.json +1 -1
package/dist/events.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- /**
2
- * Session event schemas.
3
- *
4
- * Event types: text, service, tool-call-start, tool-call-end,
5
- * file, turn-start, turn-end, start, stop.
6
- */
7
1
  import { z } from 'zod';
8
2
  export declare const SessionTextEventSchema: z.ZodObject<{
9
3
  t: z.ZodLiteral<"text">;
@@ -83,23 +77,23 @@ export declare const SessionToolCallStartEventSchema: z.ZodObject<{
83
77
  export declare const SessionToolCallEndEventSchema: z.ZodObject<{
84
78
  t: z.ZodLiteral<"tool-call-end">;
85
79
  call: z.ZodString;
86
- /** Tool output text (may be truncated at source). */
80
+
87
81
  result: z.ZodOptional<z.ZodString>;
88
- /** True when the tool returned an error result. */
82
+
89
83
  error: z.ZodOptional<z.ZodBoolean>;
90
84
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
91
85
  t: z.ZodLiteral<"tool-call-end">;
92
86
  call: z.ZodString;
93
- /** Tool output text (may be truncated at source). */
87
+
94
88
  result: z.ZodOptional<z.ZodString>;
95
- /** True when the tool returned an error result. */
89
+
96
90
  error: z.ZodOptional<z.ZodBoolean>;
97
91
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
98
92
  t: z.ZodLiteral<"tool-call-end">;
99
93
  call: z.ZodString;
100
- /** Tool output text (may be truncated at source). */
94
+
101
95
  result: z.ZodOptional<z.ZodString>;
102
- /** True when the tool returned an error result. */
96
+
103
97
  error: z.ZodOptional<z.ZodBoolean>;
104
98
  }, z.ZodTypeAny, "passthrough">>;
105
99
  export declare const SessionFileEventSchema: z.ZodObject<{
@@ -166,7 +160,7 @@ export declare const SessionTurnStartEventSchema: z.ZodObject<{
166
160
  }, z.ZodTypeAny, "passthrough">>;
167
161
  export declare const SessionTurnEndStatusSchema: z.ZodEnum<["completed", "failed", "cancelled"]>;
168
162
  export type SessionTurnEndStatus = z.infer<typeof SessionTurnEndStatusSchema>;
169
- /** Token usage stats reported at turn end. */
163
+
170
164
  export declare const TurnUsageSchema: z.ZodObject<{
171
165
  inputTokens: z.ZodNumber;
172
166
  outputTokens: z.ZodNumber;
@@ -204,9 +198,9 @@ export declare const SessionTurnEndEventSchema: z.ZodObject<{
204
198
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
205
199
  }, z.ZodTypeAny, "passthrough">>>;
206
200
  model: z.ZodOptional<z.ZodString>;
207
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
201
+
208
202
  durationMs: z.ZodOptional<z.ZodNumber>;
209
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
203
+
210
204
  compact: z.ZodOptional<z.ZodBoolean>;
211
205
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
212
206
  t: z.ZodLiteral<"turn-end">;
@@ -228,9 +222,9 @@ export declare const SessionTurnEndEventSchema: z.ZodObject<{
228
222
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
229
223
  }, z.ZodTypeAny, "passthrough">>>;
230
224
  model: z.ZodOptional<z.ZodString>;
231
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
225
+
232
226
  durationMs: z.ZodOptional<z.ZodNumber>;
233
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
227
+
234
228
  compact: z.ZodOptional<z.ZodBoolean>;
235
229
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
236
230
  t: z.ZodLiteral<"turn-end">;
@@ -252,25 +246,25 @@ export declare const SessionTurnEndEventSchema: z.ZodObject<{
252
246
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
253
247
  }, z.ZodTypeAny, "passthrough">>>;
254
248
  model: z.ZodOptional<z.ZodString>;
255
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
249
+
256
250
  durationMs: z.ZodOptional<z.ZodNumber>;
257
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
251
+
258
252
  compact: z.ZodOptional<z.ZodBoolean>;
259
253
  }, z.ZodTypeAny, "passthrough">>;
260
254
  export declare const SessionStartEventSchema: z.ZodObject<{
261
255
  t: z.ZodLiteral<"start">;
262
256
  title: z.ZodOptional<z.ZodString>;
263
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
257
+
264
258
  taskId: z.ZodOptional<z.ZodString>;
265
259
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
266
260
  t: z.ZodLiteral<"start">;
267
261
  title: z.ZodOptional<z.ZodString>;
268
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
262
+
269
263
  taskId: z.ZodOptional<z.ZodString>;
270
264
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
271
265
  t: z.ZodLiteral<"start">;
272
266
  title: z.ZodOptional<z.ZodString>;
273
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
267
+
274
268
  taskId: z.ZodOptional<z.ZodString>;
275
269
  }, z.ZodTypeAny, "passthrough">>;
276
270
  export declare const SessionStopEventSchema: z.ZodObject<{
@@ -280,27 +274,27 @@ export declare const SessionStopEventSchema: z.ZodObject<{
280
274
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
281
275
  t: z.ZodLiteral<"stop">;
282
276
  }, z.ZodTypeAny, "passthrough">>;
283
- /** User-sent image stored inline in envelope (base64). */
277
+
284
278
  export declare const SessionImageEventSchema: z.ZodObject<{
285
279
  t: z.ZodLiteral<"image">;
286
- /** Base64-encoded image data. */
280
+
287
281
  data: z.ZodString;
288
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
282
+
289
283
  mediaType: z.ZodString;
290
284
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
291
285
  t: z.ZodLiteral<"image">;
292
- /** Base64-encoded image data. */
286
+
293
287
  data: z.ZodString;
294
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
288
+
295
289
  mediaType: z.ZodString;
296
290
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
297
291
  t: z.ZodLiteral<"image">;
298
- /** Base64-encoded image data. */
292
+
299
293
  data: z.ZodString;
300
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
294
+
301
295
  mediaType: z.ZodString;
302
296
  }, z.ZodTypeAny, "passthrough">>;
303
- /** Real-time context window usage breakdown from Claude CLI (getContextUsage). */
297
+
304
298
  export declare const SessionContextUsageEventSchema: z.ZodObject<{
305
299
  t: z.ZodLiteral<"context-usage">;
306
300
  categories: z.ZodArray<z.ZodObject<{
@@ -1067,14 +1061,14 @@ export declare const SessionContextUsageEventSchema: z.ZodObject<{
1067
1061
  cache_read_input_tokens: z.ZodNumber;
1068
1062
  }, z.ZodTypeAny, "passthrough">>>;
1069
1063
  }, z.ZodTypeAny, "passthrough">>;
1070
- /** Real-time compact boundary from Claude CLI after context compaction. */
1064
+
1071
1065
  export declare const SessionCompactBoundaryEventSchema: z.ZodObject<{
1072
1066
  t: z.ZodLiteral<"compact-boundary">;
1073
1067
  trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1074
1068
  preTokens: z.ZodOptional<z.ZodNumber>;
1075
1069
  postTokens: z.ZodOptional<z.ZodNumber>;
1076
1070
  durationMs: z.ZodOptional<z.ZodNumber>;
1077
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1071
+
1078
1072
  summary: z.ZodOptional<z.ZodString>;
1079
1073
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1080
1074
  t: z.ZodLiteral<"compact-boundary">;
@@ -1082,7 +1076,7 @@ export declare const SessionCompactBoundaryEventSchema: z.ZodObject<{
1082
1076
  preTokens: z.ZodOptional<z.ZodNumber>;
1083
1077
  postTokens: z.ZodOptional<z.ZodNumber>;
1084
1078
  durationMs: z.ZodOptional<z.ZodNumber>;
1085
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1079
+
1086
1080
  summary: z.ZodOptional<z.ZodString>;
1087
1081
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1088
1082
  t: z.ZodLiteral<"compact-boundary">;
@@ -1090,7 +1084,7 @@ export declare const SessionCompactBoundaryEventSchema: z.ZodObject<{
1090
1084
  preTokens: z.ZodOptional<z.ZodNumber>;
1091
1085
  postTokens: z.ZodOptional<z.ZodNumber>;
1092
1086
  durationMs: z.ZodOptional<z.ZodNumber>;
1093
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
1087
+
1094
1088
  summary: z.ZodOptional<z.ZodString>;
1095
1089
  }, z.ZodTypeAny, "passthrough">>;
1096
1090
  export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
@@ -1168,23 +1162,23 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
1168
1162
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1169
1163
  t: z.ZodLiteral<"tool-call-end">;
1170
1164
  call: z.ZodString;
1171
- /** Tool output text (may be truncated at source). */
1165
+
1172
1166
  result: z.ZodOptional<z.ZodString>;
1173
- /** True when the tool returned an error result. */
1167
+
1174
1168
  error: z.ZodOptional<z.ZodBoolean>;
1175
1169
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1176
1170
  t: z.ZodLiteral<"tool-call-end">;
1177
1171
  call: z.ZodString;
1178
- /** Tool output text (may be truncated at source). */
1172
+
1179
1173
  result: z.ZodOptional<z.ZodString>;
1180
- /** True when the tool returned an error result. */
1174
+
1181
1175
  error: z.ZodOptional<z.ZodBoolean>;
1182
1176
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1183
1177
  t: z.ZodLiteral<"tool-call-end">;
1184
1178
  call: z.ZodString;
1185
- /** Tool output text (may be truncated at source). */
1179
+
1186
1180
  result: z.ZodOptional<z.ZodString>;
1187
- /** True when the tool returned an error result. */
1181
+
1188
1182
  error: z.ZodOptional<z.ZodBoolean>;
1189
1183
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1190
1184
  t: z.ZodLiteral<"file">;
@@ -1266,9 +1260,9 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
1266
1260
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
1267
1261
  }, z.ZodTypeAny, "passthrough">>>;
1268
1262
  model: z.ZodOptional<z.ZodString>;
1269
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
1263
+
1270
1264
  durationMs: z.ZodOptional<z.ZodNumber>;
1271
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
1265
+
1272
1266
  compact: z.ZodOptional<z.ZodBoolean>;
1273
1267
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1274
1268
  t: z.ZodLiteral<"turn-end">;
@@ -1290,9 +1284,9 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
1290
1284
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
1291
1285
  }, z.ZodTypeAny, "passthrough">>>;
1292
1286
  model: z.ZodOptional<z.ZodString>;
1293
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
1287
+
1294
1288
  durationMs: z.ZodOptional<z.ZodNumber>;
1295
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
1289
+
1296
1290
  compact: z.ZodOptional<z.ZodBoolean>;
1297
1291
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1298
1292
  t: z.ZodLiteral<"turn-end">;
@@ -1314,24 +1308,24 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
1314
1308
  cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
1315
1309
  }, z.ZodTypeAny, "passthrough">>>;
1316
1310
  model: z.ZodOptional<z.ZodString>;
1317
- /** Wall-clock duration of the turn in milliseconds (Date.now() diff). */
1311
+
1318
1312
  durationMs: z.ZodOptional<z.ZodNumber>;
1319
- /** True when this turn-end is for a /compact or auto-compact turn (internal, not user-visible). */
1313
+
1320
1314
  compact: z.ZodOptional<z.ZodBoolean>;
1321
1315
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1322
1316
  t: z.ZodLiteral<"start">;
1323
1317
  title: z.ZodOptional<z.ZodString>;
1324
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
1318
+
1325
1319
  taskId: z.ZodOptional<z.ZodString>;
1326
1320
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1327
1321
  t: z.ZodLiteral<"start">;
1328
1322
  title: z.ZodOptional<z.ZodString>;
1329
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
1323
+
1330
1324
  taskId: z.ZodOptional<z.ZodString>;
1331
1325
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1332
1326
  t: z.ZodLiteral<"start">;
1333
1327
  title: z.ZodOptional<z.ZodString>;
1334
- /** Claude background task ID for cancellation (RFC-058 Phase 2). */
1328
+
1335
1329
  taskId: z.ZodOptional<z.ZodString>;
1336
1330
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1337
1331
  t: z.ZodLiteral<"stop">;
@@ -1443,21 +1437,21 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
1443
1437
  allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1444
1438
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1445
1439
  t: z.ZodLiteral<"image">;
1446
- /** Base64-encoded image data. */
1440
+
1447
1441
  data: z.ZodString;
1448
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
1442
+
1449
1443
  mediaType: z.ZodString;
1450
1444
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1451
1445
  t: z.ZodLiteral<"image">;
1452
- /** Base64-encoded image data. */
1446
+
1453
1447
  data: z.ZodString;
1454
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
1448
+
1455
1449
  mediaType: z.ZodString;
1456
1450
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1457
1451
  t: z.ZodLiteral<"image">;
1458
- /** Base64-encoded image data. */
1452
+
1459
1453
  data: z.ZodString;
1460
- /** MIME type: image/jpeg, image/png, image/gif, image/webp. */
1454
+
1461
1455
  mediaType: z.ZodString;
1462
1456
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1463
1457
  t: z.ZodLiteral<"context-usage">;
@@ -2230,7 +2224,7 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
2230
2224
  preTokens: z.ZodOptional<z.ZodNumber>;
2231
2225
  postTokens: z.ZodOptional<z.ZodNumber>;
2232
2226
  durationMs: z.ZodOptional<z.ZodNumber>;
2233
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2227
+
2234
2228
  summary: z.ZodOptional<z.ZodString>;
2235
2229
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2236
2230
  t: z.ZodLiteral<"compact-boundary">;
@@ -2238,7 +2232,7 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
2238
2232
  preTokens: z.ZodOptional<z.ZodNumber>;
2239
2233
  postTokens: z.ZodOptional<z.ZodNumber>;
2240
2234
  durationMs: z.ZodOptional<z.ZodNumber>;
2241
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2235
+
2242
2236
  summary: z.ZodOptional<z.ZodString>;
2243
2237
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2244
2238
  t: z.ZodLiteral<"compact-boundary">;
@@ -2246,25 +2240,15 @@ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObje
2246
2240
  preTokens: z.ZodOptional<z.ZodNumber>;
2247
2241
  postTokens: z.ZodOptional<z.ZodNumber>;
2248
2242
  durationMs: z.ZodOptional<z.ZodNumber>;
2249
- /** Claude's compacted context. The containing envelope is E2EE encrypted. */
2243
+
2250
2244
  summary: z.ZodOptional<z.ZodString>;
2251
2245
  }, z.ZodTypeAny, "passthrough">>]>;
2252
2246
  export type SessionEvent = z.infer<typeof SessionEventSchema>;
2253
- /** Real-time context window usage breakdown. */
2247
+
2254
2248
  export type SessionContextUsageEvent = z.infer<typeof SessionContextUsageEventSchema>;
2255
- /**
2256
- * Build a zeroed-out context-usage snapshot.
2257
- *
2258
- * Sent by the daemon after `/clear`, which starts a brand-new Claude session
2259
- * (empty conversation, usage reset to zero). Flowing this through the normal
2260
- * context-usage channel overwrites the stored `Session.contextUsage` with zeros
2261
- * and clears the frontend spinner — the cleared value survives a page refresh
2262
- * instead of reverting to the pre-clear usage. `model`/`maxTokens` carry the
2263
- * unchanged window so the bar renders "0% of <window>".
2264
- */
2249
+
2265
2250
  export declare function emptyContextUsageSnapshot(model?: string, maxTokens?: number): SessionContextUsageEvent;
2266
- /** Real-time compact boundary after context compaction. */
2251
+
2267
2252
  export type SessionCompactBoundaryEvent = z.infer<typeof SessionCompactBoundaryEventSchema>;
2268
2253
  export { SessionQuestionEventSchema, SessionPermissionRequestEventSchema, SessionAnswerEventSchema, SessionPermissionResolvedEventSchema, PermissionActionSchema, ImageAttachmentSchema, } from './interactionEvents.js';
2269
2254
  export type { SessionQuestionEvent, SessionPermissionRequestEvent, SessionAnswerEvent, SessionPermissionResolvedEvent, PermissionAction, ImageAttachment, } from './interactionEvents.js';
2270
- //# sourceMappingURL=events.d.ts.map
@@ -1,52 +1,37 @@
1
- /** A sub-feature that requires a minimum daemon version beyond the parent feature. */
2
1
  export interface SubFeatureDefinition {
3
2
  readonly id: string;
4
3
  readonly sinceVersion: string;
5
4
  readonly requiredMethods?: readonly string[];
6
5
  }
7
- /** A feature definition mapping a user-facing feature to its required RPC methods. */
6
+
8
7
  export interface FeatureDefinition {
9
- /** Unique feature identifier. */
8
+
10
9
  readonly id: string;
11
- /** RPC method names required for this feature to work. */
10
+
12
11
  readonly requiredMethods: readonly string[];
13
- /** Daemon capability flags required for this feature. */
12
+
14
13
  readonly requiredCapabilities?: readonly string[];
15
- /** Version where this feature was first introduced. */
14
+
16
15
  readonly sinceVersion: string;
17
- /** How a machine's availability should be determined. Defaults to registered RPC methods. */
16
+
18
17
  readonly availability?: 'methods' | 'daemon-version';
19
- /** Edition(s) this feature applies to. Undefined = both editions. */
18
+
20
19
  readonly edition?: 'personal' | 'enterprise';
21
- /** Sub-features gated by daemon version within this parent feature. */
20
+
22
21
  readonly subFeatures?: readonly SubFeatureDefinition[];
23
22
  }
24
- /**
25
- * Registry of all known features and their RPC dependencies.
26
- * Add new entries here when introducing features that require new daemon RPC methods.
27
- */
23
+
28
24
  export declare const FEATURE_REGISTRY: readonly FeatureDefinition[];
29
- /**
30
- * Check whether a specific feature is available given the set of supported methods.
31
- * A feature is available when ALL its required methods are present.
32
- */
25
+
33
26
  export declare function isFeatureAvailable(featureId: string, supportedMethods: readonly string[], daemonVersion?: string, capabilities?: readonly string[]): boolean;
34
- /**
35
- * Check whether a sub-feature is available given supported methods and daemon version.
36
- * Requires the parent feature to be available AND the daemon version to satisfy the sub-feature minimum.
37
- */
27
+
38
28
  export declare function isSubFeatureAvailable(featureId: string, subFeatureId: string, supportedMethods: readonly string[], daemonVersion: string | undefined, capabilities?: readonly string[]): boolean;
39
- /** Look up the minimum version required for a sub-feature. */
29
+
40
30
  export declare function getSubFeatureMinVersion(featureId: string, subFeatureId: string): string | undefined;
41
- /** Look up the minimum version required for a feature. */
31
+
42
32
  export declare function getFeatureMinVersion(featureId: string): string | undefined;
43
- /**
44
- * Return all features (and sub-features) that are NOT available.
45
- * Sub-features are returned as "parentId/subId" when the parent is available
46
- * but the daemon version is too low for the sub-feature.
47
- */
33
+
48
34
  export declare function getUnavailableFeatures(supportedMethods: readonly string[], daemonVersion?: string, capabilities?: readonly string[]): readonly {
49
35
  id: string;
50
36
  sinceVersion: string;
51
37
  }[];
52
- //# sourceMappingURL=features.d.ts.map
@@ -37,7 +37,7 @@ export declare const SettingsSnapshotSchema: z.ZodObject<{
37
37
  userAgent: string;
38
38
  viewport: string;
39
39
  }>>;
40
- /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
40
+
41
41
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
42
42
  preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
43
43
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -134,7 +134,7 @@ export declare const DeviceInfoSchema: z.ZodObject<{
134
134
  userAgent: string;
135
135
  viewport: string;
136
136
  }>>;
137
- /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
137
+
138
138
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
139
139
  preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
140
140
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -251,7 +251,7 @@ export declare const CreateFeedbackSchema: z.ZodObject<{
251
251
  userAgent: string;
252
252
  viewport: string;
253
253
  }>>;
254
- /** Per-machine diagnostics: platform, arch, daemonVersion, availableAgents, agentCliPaths */
254
+
255
255
  machines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
256
256
  preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
257
257
  labs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -423,4 +423,3 @@ export declare const UpdateFeedbackSchema: z.ZodObject<{
423
423
  reply?: string | undefined;
424
424
  }>;
425
425
  export type UpdateFeedback = z.infer<typeof UpdateFeedbackSchema>;
426
- //# sourceMappingURL=feedback.d.ts.map
@@ -1,55 +1,23 @@
1
- /**
2
- * File upload whitelist — single source of truth for personal-edition file
3
- * upload validation, shared across web (PWA client), server (relay preflight),
4
- * and daemon (receiver second-check).
5
- *
6
- * Contains ONLY isomorphic data + pure byte logic (no node:/DOM deps):
7
- * - per-category extension lists and max sizes
8
- * - blocked (executable) extensions
9
- * - magic-byte signatures
10
- * - category resolution + magic-byte verification over Uint8Array
11
- *
12
- * File reading differs per platform (File/FileReader on web, Buffer on
13
- * server/daemon), so callers read the head bytes themselves and pass a
14
- * Uint8Array in. Buffer is a Uint8Array subclass, so `verifyMagicBytes`
15
- * works unchanged on both.
16
- */
17
1
  export type FileCategory = 'text' | 'document' | 'code' | 'image';
18
2
  export declare const TEXT_EXTS: readonly string[];
19
3
  export declare const CODE_EXTS: readonly string[];
20
4
  export declare const DOC_EXTS: readonly string[];
21
5
  export declare const IMG_EXTS: readonly string[];
22
- /** Per-category max upload size in bytes. */
6
+
23
7
  export declare const FILE_CATEGORY_MAX_SIZE: Readonly<Record<FileCategory, number>>;
24
- /** Executable / dangerous extensions — always rejected. */
8
+
25
9
  export declare const BLOCKED_EXTS: ReadonlySet<string>;
26
- /** All allowed extensions across every category. */
10
+
27
11
  export declare const ALLOWED_EXTENSIONS: ReadonlySet<string>;
28
- /**
29
- * Binary magic-byte signatures keyed by extension. `subSig` is checked at an
30
- * offset immediately after `sig` (used by WEBP's RIFF...WEBP layout).
31
- * Text-based formats (text/code/svg) are not here — they use UTF-8 validation.
32
- */
12
+
33
13
  export declare const FILE_SIGNATURES: Readonly<Record<string, {
34
14
  sig: number[];
35
15
  subSigAt?: number;
36
16
  subSig?: number[];
37
17
  }>>;
38
- /** Lowercased extension (including leading dot) or '' if none. */
18
+
39
19
  export declare function getFileExt(filename: string): string;
40
- /**
41
- * Resolve the whitelist category for an extension.
42
- * Returns null for blocked, unknown, or extension-less files.
43
- */
20
+
44
21
  export declare function resolveFileCategory(ext: string): FileCategory | null;
45
- /**
46
- * Verify head bytes match the expected type for `ext`.
47
- * - text/code: valid UTF-8
48
- * - svg: XML text sniff
49
- * - binary formats: magic-byte signature (+ optional sub-signature)
50
- *
51
- * `ext` must already be lowercased (use getFileExt). Buffer is a Uint8Array
52
- * subclass, so server/daemon can pass a Buffer directly.
53
- */
22
+
54
23
  export declare function verifyMagicBytes(head: Uint8Array, ext: string): boolean;
55
- //# sourceMappingURL=fileWhitelist.d.ts.map