@camstack/types 1.2.373 → 1.2.375

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 (40) hide show
  1. package/dist/addon.d.ts +2 -0
  2. package/dist/addon.js +6 -3
  3. package/dist/addon.mjs +5 -4
  4. package/dist/capabilities/addon-settings.cap.d.ts +10 -0
  5. package/dist/capabilities/core-blocks.cap.d.ts +2 -0
  6. package/dist/capabilities/device-manager.cap.d.ts +78 -0
  7. package/dist/capabilities/device-removal-hook.cap.d.ts +93 -0
  8. package/dist/capabilities/index.d.ts +6 -3
  9. package/dist/capabilities/keychain.cap.d.ts +11 -0
  10. package/dist/capabilities/local-network.cap.d.ts +62 -2
  11. package/dist/client.js +3 -0
  12. package/dist/client.mjs +3 -0
  13. package/dist/{composition-DCYnv4I6.js → composition-DIp0uE_b.js} +1 -1
  14. package/dist/{composition-C-WpVYTX.mjs → composition-EQ9Ok0Ee.mjs} +1 -1
  15. package/dist/device/device-removal-reconcile.d.ts +49 -0
  16. package/dist/device/device-type.d.ts +16 -0
  17. package/dist/{err-msg-DX6i_MY4.mjs → err-msg-DLerKiVO.mjs} +16 -0
  18. package/dist/{err-msg-Dx2Kor0g.js → err-msg-Ls8Q6dHO.js} +16 -0
  19. package/dist/generated/addon-api.d.ts +51 -0
  20. package/dist/generated/capability-router-map.d.ts +5 -2
  21. package/dist/generated/collection-array-methods.d.ts +1 -1
  22. package/dist/generated/method-access-map.d.ts +1 -1
  23. package/dist/generated/method-device-selectors.d.ts +2 -2
  24. package/dist/generated/system-proxy.d.ts +2 -2
  25. package/dist/i18n/camstack-error.d.ts +31 -0
  26. package/dist/i18n/translation.d.ts +39 -0
  27. package/dist/index.d.ts +6 -0
  28. package/dist/index.js +498 -25
  29. package/dist/index.mjs +470 -26
  30. package/dist/interfaces/addon.d.ts +11 -0
  31. package/dist/interfaces/config-ui.d.ts +20 -0
  32. package/dist/keychain/secrets-access.d.ts +12 -0
  33. package/dist/node.js +2 -2
  34. package/dist/node.mjs +2 -2
  35. package/dist/pipeline/face-rescore-schedule.d.ts +35 -0
  36. package/dist/{sleep-DAX0-2v9.mjs → sleep-DRqxtc0C.mjs} +62 -1
  37. package/dist/{sleep-DnQ5WsMI.js → sleep-rqlHXgwb.js} +91 -0
  38. package/dist/system/server-name.d.ts +7 -1
  39. package/dist/types/clip-model.d.ts +2 -1
  40. package/package.json +1 -1
package/dist/addon.d.ts CHANGED
@@ -17,6 +17,8 @@
17
17
  * See memory: camstack_runner_ram_and_build_rootcause.
18
18
  */
19
19
  export { BaseAddon, normalizeAddonInitResult } from './addon/base-addon.js';
20
+ export { ErrorI18nPayloadSchema, readErrorI18n } from './i18n/camstack-error.js';
21
+ export type { ErrorI18nPayload } from './i18n/camstack-error.js';
20
22
  export { nodePin, readNodePin } from './cap-call-context.js';
21
23
  export type { IAdminUiProvider } from './capabilities/admin-ui.cap.js';
22
24
  export { adminUiCapability } from './capabilities/admin-ui.cap.js';
package/dist/addon.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-DnQ5WsMI.js");
2
+ const require_sleep = require("./sleep-rqlHXgwb.js");
3
3
  const require_event_category = require("./event-category-T43rdQWR.js");
4
- const require_err_msg = require("./err-msg-Dx2Kor0g.js");
4
+ const require_err_msg = require("./err-msg-Ls8Q6dHO.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
7
7
  * AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
@@ -355,7 +355,7 @@ function materialise(defaults) {
355
355
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
356
356
  * forked runner. See docs/decisions/adr-0028.md.
357
357
  *
358
- * Coverage: 26 collection caps, 45 array methods.
358
+ * Coverage: 27 collection caps, 46 array methods.
359
359
  */
360
360
  var COLLECTION_ARRAY_METHODS = Object.freeze({
361
361
  "addon-pages-source": ["listPages"],
@@ -368,6 +368,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
368
368
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
369
369
  "device-extension": ["listSlots", "listSources"],
370
370
  "device-provider": ["discoverDevices", "getDevices"],
371
+ "device-removal-hook": ["listDeviceData"],
371
372
  "failure-contribution": ["list"],
372
373
  "llm": [
373
374
  "getDefaults",
@@ -2131,6 +2132,7 @@ exports.DEVICE_CHILDREN_BATCH_MAX = require_sleep.DEVICE_CHILDREN_BATCH_MAX;
2131
2132
  exports.DEVICE_SCOPED_CAPS = require_sleep.DEVICE_SCOPED_CAPS;
2132
2133
  exports.DeviceType = require_err_msg.DeviceType;
2133
2134
  exports.DisposerChain = require_sleep.DisposerChain;
2135
+ exports.ErrorI18nPayloadSchema = require_sleep.ErrorI18nPayloadSchema;
2134
2136
  exports.EventCategory = require_event_category.EventCategory;
2135
2137
  exports.HF_REPO = require_sleep.HF_REPO;
2136
2138
  exports.MIN_SCRUBBED_LENGTH = require_sleep.MIN_SCRUBBED_LENGTH;
@@ -2183,6 +2185,7 @@ exports.normalizeAddonInitResult = require_sleep.normalizeAddonInitResult;
2183
2185
  exports.normalizeSecretOwner = require_sleep.normalizeSecretOwner;
2184
2186
  exports.parseJsonUnknown = require_sleep.parseJsonUnknown;
2185
2187
  exports.parseSecretRef = require_sleep.parseSecretRef;
2188
+ exports.readErrorI18n = require_sleep.readErrorI18n;
2186
2189
  exports.readNodePin = require_sleep.readNodePin;
2187
2190
  exports.registerKnownSecret = require_sleep.registerKnownSecret;
2188
2191
  exports.resolveSecretViewsIn = require_sleep.resolveSecretViewsIn;
package/dist/addon.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { A as viewerUiCapability, At as createSecretsAccess, Bt as PEER_BYTES_STALL_MS, C as isZodSecret, Cn as isSecretClear, Dn as makeSecretMarker, E as HF_REPO, En as isSecretMarkerLike, Ft as registerKnownSecret, Gt as DisposerChain, I as adminUiCapability, It as scrubKnownSecrets, Kt as BaseAddon, Lt as shortSecretRefHash, Mt as clearKnownSecrets, Nt as forgetKnownSecret, On as toSecretFieldView, Ot as resolveSecretViewsIn, P as describeCustomActions, Pt as knownSecretCount, Q as readNodePin, Rt as PEER_BYTES_CHUNK_BYTES, S as collectZodSecretPaths, Sn as classifySecretWrite, Tn as isSecretMarker, Ut as DATAPLANE_SECRET_HEADER, Vt as PEER_BYTES_TICKET_TTL_MS, W as expandCapMethods, Z as nodePin, _ as createEventBusSliceSource, an as formatSecretScope, at as scopeKey, c as asString, cn as normalizeSecretOwner, d as parseJsonUnknown, et as MODEL_FORMATS, f as hfModelUrl, fn as createEvent, g as createDeviceProxy, h as isDeviceScopedCap, in as buildSecretRef, j as DEVICE_CHILDREN_BATCH_MAX, jt as MIN_SCRUBBED_LENGTH, k as deviceOpsCapability, kt as REVALIDATE_AFTER_MS, ln as parseSecretRef, m as DEVICE_SCOPED_CAPS, nn as SECRET_REF_SCHEME, nt as ReadinessTimeoutError, o as asJsonObject, on as globalSecretScope, p as BOOT_RECOVERY_BACKOFF_MS, pn as emitReadiness, qt as normalizeAddonInitResult, r as maskUrlCredentials, rn as arrayItemFieldPath, sn as isSecretRef, t as sleep, tt as ReadinessRegistry, wn as isSecretFieldView, xn as SECRET_CLEAR, zt as PEER_BYTES_MAX_OUTSTANDING } from "./sleep-DAX0-2v9.mjs";
1
+ import { An as isSecretMarker, Bt as registerKnownSecret, D as collectZodSecretPaths, Dn as classifySecretWrite, En as SECRET_CLEAR, F as viewerUiCapability, Ft as createSecretsAccess, Gt as PEER_BYTES_STALL_MS, Ht as shortSecretRefHash, I as DEVICE_CHILDREN_BATCH_MAX, It as MIN_SCRUBBED_LENGTH, Jt as DATAPLANE_SECRET_HEADER, Kt as PEER_BYTES_TICKET_TTL_MS, Lt as clearKnownSecrets, Mn as makeSecretMarker, Nn as toSecretFieldView, Nt as resolveSecretViewsIn, O as isZodSecret, On as isSecretClear, P as deviceOpsCapability, Pt as REVALIDATE_AFTER_MS, Qt as normalizeAddonInitResult, Rt as forgetKnownSecret, S as createEventBusSliceSource, Ut as PEER_BYTES_CHUNK_BYTES, V as adminUiCapability, Vt as scrubKnownSecrets, Wt as PEER_BYTES_MAX_OUTSTANDING, Xt as DisposerChain, Y as expandCapMethods, Zt as BaseAddon, _ as readErrorI18n, _n as createEvent, at as MODEL_FORMATS, b as isDeviceScopedCap, c as asString, cn as arrayItemFieldPath, d as parseJsonUnknown, dn as globalSecretScope, f as hfModelUrl, fn as isSecretRef, g as ErrorI18nPayloadSchema, j as HF_REPO, jn as isSecretMarkerLike, kn as isSecretFieldView, ln as buildSecretRef, mn as parseSecretRef, nt as nodePin, o as asJsonObject, ot as ReadinessRegistry, p as BOOT_RECOVERY_BACKOFF_MS, pn as normalizeSecretOwner, r as maskUrlCredentials, rt as readNodePin, sn as SECRET_REF_SCHEME, st as ReadinessTimeoutError, t as sleep, un as formatSecretScope, ut as scopeKey, vn as emitReadiness, x as createDeviceProxy, y as DEVICE_SCOPED_CAPS, z as describeCustomActions, zt as knownSecretCount } from "./sleep-DRqxtc0C.mjs";
2
2
  import { t as EventCategory } from "./event-category-C4hVnRo8.mjs";
3
- import { a as DeviceType, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
3
+ import { a as DeviceType, t as errMsg } from "./err-msg-DLerKiVO.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
6
6
  * AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
@@ -354,7 +354,7 @@ function materialise(defaults) {
354
354
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
355
355
  * forked runner. See docs/decisions/adr-0028.md.
356
356
  *
357
- * Coverage: 26 collection caps, 45 array methods.
357
+ * Coverage: 27 collection caps, 46 array methods.
358
358
  */
359
359
  var COLLECTION_ARRAY_METHODS = Object.freeze({
360
360
  "addon-pages-source": ["listPages"],
@@ -367,6 +367,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
367
367
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
368
368
  "device-extension": ["listSlots", "listSources"],
369
369
  "device-provider": ["discoverDevices", "getDevices"],
370
+ "device-removal-hook": ["listDeviceData"],
370
371
  "failure-contribution": ["list"],
371
372
  "llm": [
372
373
  "getDefaults",
@@ -2119,4 +2120,4 @@ var CAP_STATE_LEAVES = Object.freeze({
2119
2120
  ]
2120
2121
  });
2121
2122
  //#endregion
2122
- export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_ADVANCE_FIELDS, CAP_INPUT_DEFAULTS, CAP_STATE_LEAVES, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, EventCategory, HF_REPO, MIN_SCRUBBED_LENGTH, MODEL_FORMATS, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PROVIDER_OPTIONAL_METHODS, REVALIDATE_AFTER_MS, ReadinessRegistry, ReadinessTimeoutError, SECRET_CLEAR, SECRET_REF_SCHEME, adminUiCapability, arrayItemFieldPath, asJsonObject, asString, buildSecretRef, classifySecretWrite, clearKnownSecrets, collectZodSecretPaths, createDeviceProxy, createEvent, createEventBusSliceSource, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, forgetKnownSecret, formatSecretScope, globalSecretScope, hfModelUrl, isCollectionArrayMethodName, isDeviceScopedCap, isProviderOptionalMethodName, isSecretClear, isSecretFieldView, isSecretMarker, isSecretMarkerLike, isSecretRef, isZodSecret, knownSecretCount, makeSecretMarker, maskUrlCredentials, nodePin, normalizeAddonInitResult, normalizeSecretOwner, parseJsonUnknown, parseSecretRef, readNodePin, registerKnownSecret, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, shortSecretRefHash, sleep, toSecretFieldView, viewerUiCapability, withCapInputDefaults };
2123
+ export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_ADVANCE_FIELDS, CAP_INPUT_DEFAULTS, CAP_STATE_LEAVES, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, HF_REPO, MIN_SCRUBBED_LENGTH, MODEL_FORMATS, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PROVIDER_OPTIONAL_METHODS, REVALIDATE_AFTER_MS, ReadinessRegistry, ReadinessTimeoutError, SECRET_CLEAR, SECRET_REF_SCHEME, adminUiCapability, arrayItemFieldPath, asJsonObject, asString, buildSecretRef, classifySecretWrite, clearKnownSecrets, collectZodSecretPaths, createDeviceProxy, createEvent, createEventBusSliceSource, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, forgetKnownSecret, formatSecretScope, globalSecretScope, hfModelUrl, isCollectionArrayMethodName, isDeviceScopedCap, isProviderOptionalMethodName, isSecretClear, isSecretFieldView, isSecretMarker, isSecretMarkerLike, isSecretRef, isZodSecret, knownSecretCount, makeSecretMarker, maskUrlCredentials, nodePin, normalizeAddonInitResult, normalizeSecretOwner, parseJsonUnknown, parseSecretRef, readErrorI18n, readNodePin, registerKnownSecret, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, shortSecretRefHash, sleep, toSecretFieldView, viewerUiCapability, withCapInputDefaults };
@@ -9,7 +9,9 @@ declare const ConfigTabDeclarationSchema: z.ZodObject<{
9
9
  declare const ConfigSectionWithValuesSchema: z.ZodObject<{
10
10
  id: z.ZodString;
11
11
  title: z.ZodString;
12
+ titleKey: z.ZodOptional<z.ZodString>;
12
13
  description: z.ZodOptional<z.ZodString>;
14
+ descriptionKey: z.ZodOptional<z.ZodString>;
13
15
  style: z.ZodOptional<z.ZodEnum<{
14
16
  accordion: "accordion";
15
17
  card: "card";
@@ -34,7 +36,9 @@ declare const SettingsSchemaWithValuesSchema: z.ZodObject<{
34
36
  sections: z.ZodArray<z.ZodObject<{
35
37
  id: z.ZodString;
36
38
  title: z.ZodString;
39
+ titleKey: z.ZodOptional<z.ZodString>;
37
40
  description: z.ZodOptional<z.ZodString>;
41
+ descriptionKey: z.ZodOptional<z.ZodString>;
38
42
  style: z.ZodOptional<z.ZodEnum<{
39
43
  accordion: "accordion";
40
44
  card: "card";
@@ -103,7 +107,9 @@ export declare const addonSettingsCapability: {
103
107
  sections: z.ZodArray<z.ZodObject<{
104
108
  id: z.ZodString;
105
109
  title: z.ZodString;
110
+ titleKey: z.ZodOptional<z.ZodString>;
106
111
  description: z.ZodOptional<z.ZodString>;
112
+ descriptionKey: z.ZodOptional<z.ZodString>;
107
113
  style: z.ZodOptional<z.ZodEnum<{
108
114
  accordion: "accordion";
109
115
  card: "card";
@@ -139,7 +145,9 @@ export declare const addonSettingsCapability: {
139
145
  sections: z.ZodArray<z.ZodObject<{
140
146
  id: z.ZodString;
141
147
  title: z.ZodString;
148
+ titleKey: z.ZodOptional<z.ZodString>;
142
149
  description: z.ZodOptional<z.ZodString>;
150
+ descriptionKey: z.ZodOptional<z.ZodString>;
143
151
  style: z.ZodOptional<z.ZodEnum<{
144
152
  accordion: "accordion";
145
153
  card: "card";
@@ -169,7 +177,9 @@ export declare const addonSettingsCapability: {
169
177
  sections: z.ZodArray<z.ZodObject<{
170
178
  id: z.ZodString;
171
179
  title: z.ZodString;
180
+ titleKey: z.ZodOptional<z.ZodString>;
172
181
  description: z.ZodOptional<z.ZodString>;
182
+ descriptionKey: z.ZodOptional<z.ZodString>;
173
183
  style: z.ZodOptional<z.ZodEnum<{
174
184
  accordion: "accordion";
175
185
  card: "card";
@@ -2497,7 +2497,9 @@ export declare const coreBlocksCapability: {
2497
2497
  sections: z.ZodArray<z.ZodObject<{
2498
2498
  id: z.ZodString;
2499
2499
  title: z.ZodString;
2500
+ titleKey: z.ZodOptional<z.ZodString>;
2500
2501
  description: z.ZodOptional<z.ZodString>;
2502
+ descriptionKey: z.ZodOptional<z.ZodString>;
2501
2503
  style: z.ZodOptional<z.ZodEnum<{
2502
2504
  accordion: "accordion";
2503
2505
  card: "card";
@@ -295,6 +295,38 @@ export declare const DeviceRegisterPayloadSchema: z.ZodObject<{
295
295
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
296
296
  secretConfigPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
297
297
  }, z.core.$strip>;
298
+ /** One deleted device, kept by device-manager so an addon that missed the
299
+ * deletion can still learn of it (D865). Written by the delete path ONLY. */
300
+ export declare const DeviceTombstoneSchema: z.ZodObject<{
301
+ deviceId: z.ZodNumber;
302
+ deletedAt: z.ZodNumber;
303
+ providerAddonId: z.ZodString;
304
+ }, z.core.$strip>;
305
+ export type DeviceTombstone = z.infer<typeof DeviceTombstoneSchema>;
306
+ /** How long a tombstone stays readable. Past it, a device that was deleted
307
+ * and never cleaned is only reachable by the admin "clean data of deleted
308
+ * devices" action. */
309
+ export declare const DEVICE_TOMBSTONE_RETENTION_MS: number;
310
+ /** Data held for one device that device-manager no longer knows. */
311
+ export declare const OrphanDeviceDataSchema: z.ZodObject<{
312
+ deviceId: z.ZodNumber;
313
+ stores: z.ZodRecord<z.ZodString, z.ZodNumber>;
314
+ }, z.core.$strip>;
315
+ export type OrphanDeviceData = z.infer<typeof OrphanDeviceDataSchema>;
316
+ export declare const CleanupDeletedDevicesResultSchema: z.ZodObject<{
317
+ status: z.ZodEnum<{
318
+ cleaned: "cleaned";
319
+ "dry-run": "dry-run";
320
+ skipped: "skipped";
321
+ }>;
322
+ reason: z.ZodNullable<z.ZodString>;
323
+ devices: z.ZodArray<z.ZodObject<{
324
+ deviceId: z.ZodNumber;
325
+ stores: z.ZodRecord<z.ZodString, z.ZodNumber>;
326
+ }, z.core.$strip>>;
327
+ unreachable: z.ZodArray<z.ZodString>;
328
+ }, z.core.$strip>;
329
+ export type CleanupDeletedDevicesResult = z.infer<typeof CleanupDeletedDevicesResultSchema>;
298
330
  export declare const DeviceRemovePayloadSchema: z.ZodObject<{
299
331
  deviceId: z.ZodNumber;
300
332
  }, z.core.$strip>;
@@ -1255,6 +1287,44 @@ export declare const deviceManagerCapability: {
1255
1287
  }, z.core.$strip>, z.ZodObject<{
1256
1288
  success: z.ZodLiteral<true>;
1257
1289
  }, z.core.$strip>, "mutation">;
1290
+ /**
1291
+ * The tombstones of devices deleted at or after `sinceMs` (D865). The
1292
+ * reconcile feed of every `device-removal-hook` implementer: an addon that
1293
+ * was down when a device was deleted asks here at start and periodically.
1294
+ * A tombstone exists only for a DELETE — never for a device that is merely
1295
+ * unregistered, offline or whose provider is restarting. Tombstones older
1296
+ * than `DEVICE_TOMBSTONE_RETENTION_MS` are gone.
1297
+ */
1298
+ readonly listDeletedSince: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1299
+ sinceMs: z.ZodNumber;
1300
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
1301
+ deviceId: z.ZodNumber;
1302
+ deletedAt: z.ZodNumber;
1303
+ providerAddonId: z.ZodString;
1304
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
1305
+ /**
1306
+ * Admin-triggered clean-up of data that belongs to devices deleted BEFORE
1307
+ * tombstones existed (D865). Asks every `device-removal-hook` implementer
1308
+ * which device ids it holds data for, keeps those absent from the device
1309
+ * list — confirmed by TWO reads of the list, skipped if either fails — and
1310
+ * with `confirm: false` only reports the counts per store. `confirm: true`
1311
+ * deletes. Never runs on its own.
1312
+ */
1313
+ readonly cleanupDeletedDevicesData: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1314
+ confirm: z.ZodBoolean;
1315
+ }, z.core.$strip>, z.ZodObject<{
1316
+ status: z.ZodEnum<{
1317
+ cleaned: "cleaned";
1318
+ "dry-run": "dry-run";
1319
+ skipped: "skipped";
1320
+ }>;
1321
+ reason: z.ZodNullable<z.ZodString>;
1322
+ devices: z.ZodArray<z.ZodObject<{
1323
+ deviceId: z.ZodNumber;
1324
+ stores: z.ZodRecord<z.ZodString, z.ZodNumber>;
1325
+ }, z.core.$strip>>;
1326
+ unreachable: z.ZodArray<z.ZodString>;
1327
+ }, z.core.$strip>, "mutation">;
1258
1328
  /** Cascade-delete every top-level device whose `integrationId` matches.
1259
1329
  * Children cascade automatically via the per-parent remove path.
1260
1330
  * Idempotent: a device whose `integrationId` was never set never matches.
@@ -1470,7 +1540,9 @@ export declare const deviceManagerCapability: {
1470
1540
  sections: z.ZodArray<z.ZodObject<{
1471
1541
  id: z.ZodString;
1472
1542
  title: z.ZodString;
1543
+ titleKey: z.ZodOptional<z.ZodString>;
1473
1544
  description: z.ZodOptional<z.ZodString>;
1545
+ descriptionKey: z.ZodOptional<z.ZodString>;
1474
1546
  style: z.ZodOptional<z.ZodEnum<{
1475
1547
  accordion: "accordion";
1476
1548
  card: "card";
@@ -1498,7 +1570,9 @@ export declare const deviceManagerCapability: {
1498
1570
  sections: z.ZodArray<z.ZodObject<{
1499
1571
  id: z.ZodString;
1500
1572
  title: z.ZodString;
1573
+ titleKey: z.ZodOptional<z.ZodString>;
1501
1574
  description: z.ZodOptional<z.ZodString>;
1575
+ descriptionKey: z.ZodOptional<z.ZodString>;
1502
1576
  style: z.ZodOptional<z.ZodEnum<{
1503
1577
  accordion: "accordion";
1504
1578
  card: "card";
@@ -1535,7 +1609,9 @@ export declare const deviceManagerCapability: {
1535
1609
  sections: z.ZodArray<z.ZodObject<{
1536
1610
  id: z.ZodString;
1537
1611
  title: z.ZodString;
1612
+ titleKey: z.ZodOptional<z.ZodString>;
1538
1613
  description: z.ZodOptional<z.ZodString>;
1614
+ descriptionKey: z.ZodOptional<z.ZodString>;
1539
1615
  style: z.ZodOptional<z.ZodEnum<{
1540
1616
  accordion: "accordion";
1541
1617
  card: "card";
@@ -1561,7 +1637,9 @@ export declare const deviceManagerCapability: {
1561
1637
  sections: z.ZodArray<z.ZodObject<{
1562
1638
  id: z.ZodString;
1563
1639
  title: z.ZodString;
1640
+ titleKey: z.ZodOptional<z.ZodString>;
1564
1641
  description: z.ZodOptional<z.ZodString>;
1642
+ descriptionKey: z.ZodOptional<z.ZodString>;
1565
1643
  style: z.ZodOptional<z.ZodEnum<{
1566
1644
  accordion: "accordion";
1567
1645
  card: "card";
@@ -0,0 +1,93 @@
1
+ /**
2
+ * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
3
+ * so it can delete what it keeps for that device (D865).
4
+ *
5
+ * ## Why an event was not enough
6
+ *
7
+ * `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
8
+ * hung its per-device clean-up on it left durable garbage whenever the event was
9
+ * lost, the addon was down, or it was restarting at that moment — footage,
10
+ * analytics rows and settings of device 4483 outlived the device. Loss of this
11
+ * signal corrupts durable state, so it travels by RPC with a recorded fact
12
+ * behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
13
+ *
14
+ * ## The three pieces
15
+ *
16
+ * 1. device-manager records a TOMBSTONE per deleted device
17
+ * (`deviceManager.listDeletedSince`). The tombstone is written by the delete
18
+ * path only — a device that is unregistered, offline or whose provider is
19
+ * restarting is NOT deleted and gets none.
20
+ * 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
21
+ * this collection, one by one, with bounded retries, logged.
22
+ * 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
23
+ * (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
24
+ * may have missed. Reconcile is driven by tombstones, never by "the device is
25
+ * not in the current list": a failed or partial list read must not destroy data.
26
+ *
27
+ * ## Contract for an implementer
28
+ *
29
+ * - **Idempotent.** It is called again by a retry, by a reconcile and by the
30
+ * admin cleanup of data that predates tombstones. A device with nothing left
31
+ * answers zero counts.
32
+ * - **One key per store** in `counts`, deleted rows/files per store, so the log
33
+ * line and the admin dry run can say where the data was.
34
+ * - **Training datasets are NOT device data** and are never deleted by a hook.
35
+ * - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
36
+ * per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
37
+ * for every addon centrally at delete time. This hook is for device DATA
38
+ * that is not settings: footage, event media, analytics rows, history.
39
+ * - A provider that cannot tell is allowed to throw; the caller retries it.
40
+ *
41
+ * `listDeviceData` is the read side of the admin "Clean data of deleted devices"
42
+ * action: which device ids this addon holds data for, and how much per store. It
43
+ * never deletes. device-manager decides which of those ids are absent from the
44
+ * fleet, from TWO consistent reads of the device list (D49).
45
+ */
46
+ import { z } from 'zod';
47
+ import { type InferProvider } from './capability-definition.js';
48
+ /** What a hook is told about the deletion. */
49
+ export declare const DeviceRemovedInputSchema: z.ZodObject<{
50
+ deviceId: z.ZodNumber;
51
+ deletedAt: z.ZodNumber;
52
+ providerAddonId: z.ZodString;
53
+ }, z.core.$strip>;
54
+ export type DeviceRemovedInput = z.infer<typeof DeviceRemovedInputSchema>;
55
+ /** Rows/files/refs deleted, per store this implementer owns. */
56
+ export declare const DeviceRemovedResultSchema: z.ZodObject<{
57
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
58
+ }, z.core.$strip>;
59
+ export type DeviceRemovedResult = z.infer<typeof DeviceRemovedResultSchema>;
60
+ /** One (store, device) pair an implementer holds data for. */
61
+ export declare const DeviceDataEntrySchema: z.ZodObject<{
62
+ store: z.ZodString;
63
+ deviceId: z.ZodNumber;
64
+ count: z.ZodNumber;
65
+ }, z.core.$strip>;
66
+ export type DeviceDataEntry = z.infer<typeof DeviceDataEntrySchema>;
67
+ export declare const deviceRemovalHookCapability: {
68
+ readonly name: 'device-removal-hook';
69
+ readonly scope: 'system';
70
+ readonly mode: 'collection';
71
+ readonly internal: true;
72
+ readonly methods: {
73
+ /** Delete everything this addon keeps for the deleted device. Idempotent. */
74
+ readonly onDeviceRemoved: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
75
+ deviceId: z.ZodNumber;
76
+ deletedAt: z.ZodNumber;
77
+ providerAddonId: z.ZodString;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
80
+ }, z.core.$strip>, "mutation">;
81
+ /** Which devices this addon holds data for, per store. Reads only. */
82
+ readonly listDeviceData: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
83
+ store: z.ZodString;
84
+ deviceId: z.ZodNumber;
85
+ count: z.ZodNumber;
86
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
87
+ };
88
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
89
+ readonly mount: {
90
+ readonly kind: 'skip';
91
+ };
92
+ };
93
+ export type IDeviceRemovalHookProvider = InferProvider<typeof deviceRemovalHookCapability>;
@@ -60,12 +60,14 @@ export type { IDeviceExportProvider } from './device-export.cap.js';
60
60
  export { DeviceExportStatusSchema, deviceExportCapability, ExportSetupFieldSchema, ExportSetupSchema, ExposedDeviceSchema, ExposeInputSchema as DeviceExportExposeInputSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, } from './device-export.cap.js';
61
61
  export type { ExtensionCandidate, ExtensionCandidates, ExtensionSetResult, ExtensionSetSlotInput, ExtensionSlotActivation, ExtensionSlotRefInput, ExtensionSlotRow, ExtensionSlotSource, ExtensionSlotState, ExtensionSlotUnreachable, ExtensionSource, ExtensionSourceAvailability, ExtensionSourceHealth, IDeviceExtensionProvider, } from './device-extension.cap.js';
62
62
  export { deviceExtensionCapability, EXTENSION_SLOT_LISTING_METHOD, EXTENSION_SLOT_REF_SEPARATOR, ExtensionCandidateSchema, ExtensionCandidatesSchema, ExtensionSetResultSchema, ExtensionSetSlotInputSchema, ExtensionSlotActivationSchema, ExtensionSlotRefInputSchema, ExtensionSlotRowSchema, ExtensionSlotSourceSchema, ExtensionSlotStateSchema, ExtensionSlotUnreachableSchema, ExtensionSourceAvailabilitySchema, ExtensionSourceHealthSchema, ExtensionSourceSchema, unreachableExtensionSlotRow, } from './device-extension.cap.js';
63
- export type { DeviceInfo, DeviceManagerApplyInitialMetaInput } from './device-manager.cap.js';
64
- export { ConfigEntrySchema, DEVICE_CHILDREN_BATCH_MAX, DeviceInfoSchema, deviceManagerCapability, type IDeviceManagerProvider, LINKED_DEVICES_SLOT, type LinkedDevice, LinkedDeviceSchema, type LinkedDevicesMode, LinkedDevicesModeSchema, type LinkedDevicesSlotValue, LinkedDevicesSlotValueSchema, type MigrateDeviceResult, MigrateDeviceResultSchema, type MigrateSwitchOutcome, MigrateSwitchOutcomeSchema, type MigrateSwitchReport, MigrateSwitchReportSchema, type WrapperActivationRead, WrapperActivationReadSchema, } from './device-manager.cap.js';
63
+ export type { CleanupDeletedDevicesResult, DeviceInfo, DeviceManagerApplyInitialMetaInput, DeviceTombstone, OrphanDeviceData, } from './device-manager.cap.js';
64
+ export { CleanupDeletedDevicesResultSchema, ConfigEntrySchema, DEVICE_CHILDREN_BATCH_MAX, DEVICE_TOMBSTONE_RETENTION_MS, DeviceInfoSchema, DeviceTombstoneSchema, OrphanDeviceDataSchema, deviceManagerCapability, type IDeviceManagerProvider, LINKED_DEVICES_SLOT, type LinkedDevice, LinkedDeviceSchema, type LinkedDevicesMode, LinkedDevicesModeSchema, type LinkedDevicesSlotValue, LinkedDevicesSlotValueSchema, type MigrateDeviceResult, MigrateDeviceResultSchema, type MigrateSwitchOutcome, MigrateSwitchOutcomeSchema, type MigrateSwitchReport, MigrateSwitchReportSchema, type WrapperActivationRead, WrapperActivationReadSchema, } from './device-manager.cap.js';
65
65
  export { DiscoveredDeviceSchema, deviceProviderCapability, ProviderStatusSchema, } from './device-provider.cap.js';
66
66
  export { type ClaimOutcome, ClaimOutcomeSchema, type ClaimsListing, ClaimsListingSchema, deviceStateCapability, type FieldClaim, type FieldClaimMode, FieldClaimModeSchema, FieldClaimSchema, } from './device-state.cap.js';
67
67
  export type { EmbeddingFailedModel, EmbeddingFailedRequirement, EmbeddingModelFailure, EmbeddingRefusal, EmbeddingRefusalCode, EmbeddingTower, IEmbeddingEncoderProvider, } from './embedding-encoder.cap.js';
68
68
  export { EMBEDDING_MODEL_FAILED, EMBEDDING_REQUIREMENTS_FAILED, EMBEDDING_REQUIREMENTS_UNAVAILABLE, EmbeddingFailedModelSchema, EmbeddingFailedRequirementSchema, EmbeddingInfoSchema, EmbeddingRefusalCodeSchema, EmbeddingResultSchema, EmbeddingTowerSchema, embeddingEncoderCapability, embeddingModelFailedError, embeddingModelFailedOf, embeddingRefusalOf, embeddingRequirementsFailedError, embeddingRequirementsUnavailableError, isEmbeddingModelFailed, } from './embedding-encoder.cap.js';
69
+ export type { DeviceDataEntry, DeviceRemovedInput, DeviceRemovedResult, IDeviceRemovalHookProvider, } from './device-removal-hook.cap.js';
70
+ export { DeviceDataEntrySchema, DeviceRemovedInputSchema, DeviceRemovedResultSchema, deviceRemovalHookCapability, } from './device-removal-hook.cap.js';
69
71
  export type { FailureContribution, IFailureContributionProvider, } from './failure-contribution.cap.js';
70
72
  export { FailureContributionSchema, FailureReasonCountSchema, failureContributionCapability, } from './failure-contribution.cap.js';
71
73
  export { filesystemBrowseCapability, type IFilesystemBrowseProvider, } from './filesystem-browse.cap.js';
@@ -306,6 +308,7 @@ import type { deviceOpsCapability } from './device-ops.cap.js';
306
308
  import type { deviceProviderCapability } from './device-provider.cap.js';
307
309
  import type { deviceStateCapability } from './device-state.cap.js';
308
310
  import type { deviceStatusCapability } from './device-status.cap.js';
311
+ import type { deviceRemovalHookCapability } from './device-removal-hook.cap.js';
309
312
  import type { doorbellCapability } from './doorbell.cap.js';
310
313
  import type { embeddingEncoderCapability } from './embedding-encoder.cap.js';
311
314
  import type { enumSensorCapability } from './enum-sensor.cap.js';
@@ -416,6 +419,6 @@ import type { trainingProviderCapability } from './training-provider.cap.js';
416
419
  import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
417
420
  import type { zoneRulesCapability } from './zone-rules.cap.js';
418
421
  import type { zonesCapability } from './zones.cap.js';
419
- type AnyCapability = typeof streamSignalsCapability | typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageMigrationCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof storageOccupancyCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof databaseSnapshotCapability | typeof deviceHistoryCapability | typeof keychainCapability | typeof keychainAdminCapability | typeof deviceCredentialsCapability | typeof nodeCertificatesCapability | typeof logChannelsCapability | typeof logDestinationCapability | typeof loadContributionCapability | typeof failureContributionCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceAdminLinkCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof calendarSourceCapability | typeof calendarsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof vectorStoreCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof composerCapability | typeof coreBlocksCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof navigationCapability | typeof consumablesCapability | typeof connectionTestCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof trainingCapability | typeof trainingProviderCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingArchiveCapability | typeof recordingExportCapability | typeof recordingSignalCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof oidcConnectionsCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof cameraGridLayoutCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof recordingOnboardCapability | typeof imageSettingsCapability | typeof osdCapability | typeof osdManagerCapability | typeof accessoriesCapability | typeof batteryCapability | typeof networkLinkCapability | typeof buttonCapability | typeof cameraCredentialsCapability | typeof deviceStatusCapability | typeof doorbellCapability | typeof eventEmitterCapability | typeof faceGalleryCapability | typeof featureProbeCapability | typeof intercomCapability | typeof nativeObjectDetectionCapability | typeof plateGalleryCapability | typeof switchCapability | typeof updateCapability | typeof videoclipsCapability | typeof deviceExtensionCapability;
422
+ type AnyCapability = typeof streamSignalsCapability | typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageMigrationCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof storageOccupancyCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof databaseSnapshotCapability | typeof deviceHistoryCapability | typeof keychainCapability | typeof keychainAdminCapability | typeof deviceCredentialsCapability | typeof nodeCertificatesCapability | typeof logChannelsCapability | typeof logDestinationCapability | typeof loadContributionCapability | typeof failureContributionCapability | typeof deviceRemovalHookCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceAdminLinkCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof calendarSourceCapability | typeof calendarsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof vectorStoreCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof composerCapability | typeof coreBlocksCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof navigationCapability | typeof consumablesCapability | typeof connectionTestCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof trainingCapability | typeof trainingProviderCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingArchiveCapability | typeof recordingExportCapability | typeof recordingSignalCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof oidcConnectionsCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof cameraGridLayoutCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof recordingOnboardCapability | typeof imageSettingsCapability | typeof osdCapability | typeof osdManagerCapability | typeof accessoriesCapability | typeof batteryCapability | typeof networkLinkCapability | typeof buttonCapability | typeof cameraCredentialsCapability | typeof deviceStatusCapability | typeof doorbellCapability | typeof eventEmitterCapability | typeof faceGalleryCapability | typeof featureProbeCapability | typeof intercomCapability | typeof nativeObjectDetectionCapability | typeof plateGalleryCapability | typeof switchCapability | typeof updateCapability | typeof videoclipsCapability | typeof deviceExtensionCapability;
420
423
  export type CapabilityName = AnyCapability['name'];
421
424
  export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
@@ -149,6 +149,17 @@ export declare const keychainCapability: {
149
149
  }, z.core.$strip>, z.ZodObject<{
150
150
  deleted: z.ZodNumber;
151
151
  }, z.core.$strip>, "mutation">;
152
+ /**
153
+ * Delete every value scoped `device/<deviceId>`, whatever its owner (D864).
154
+ * Reserved to `device-manager`, on the device-removed path: a driver's
155
+ * device-scoped secret is not anybody's once the device is gone. Answers the
156
+ * refs removed (never values).
157
+ */
158
+ readonly deleteDeviceScope: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
159
+ deviceId: z.ZodNumber;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ refs: z.ZodReadonly<z.ZodArray<z.ZodString>>;
162
+ }, z.core.$strip>, "mutation">;
152
163
  /** The caller's own refs, metadata only. */
153
164
  readonly listMeta: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
154
165
  ref: z.ZodString;
@@ -953,6 +953,14 @@ export declare const localNetworkCapability: {
953
953
  caCertPem: z.ZodNullable<z.ZodString>;
954
954
  reissueError: z.ZodNullable<z.ZodString>;
955
955
  restartRequired: z.ZodBoolean;
956
+ caMissing: z.ZodBoolean;
957
+ localCaConstrained: z.ZodNullable<z.ZodBoolean>;
958
+ caReplacedAt: z.ZodNullable<z.ZodString>;
959
+ storedUpload: z.ZodNullable<z.ZodObject<{
960
+ leafFingerprintSha256: z.ZodString;
961
+ validTo: z.ZodString;
962
+ hasCa: z.ZodBoolean;
963
+ }, z.core.$strip>>;
956
964
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
957
965
  /** Issue a new leaf under the existing local CA. Disabled in uploaded mode. */
958
966
  readonly regenerateCertificate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
@@ -970,8 +978,19 @@ export declare const localNetworkCapability: {
970
978
  caCertPem: z.ZodNullable<z.ZodString>;
971
979
  reissueError: z.ZodNullable<z.ZodString>;
972
980
  restartRequired: z.ZodBoolean;
981
+ caMissing: z.ZodBoolean;
982
+ localCaConstrained: z.ZodNullable<z.ZodBoolean>;
983
+ caReplacedAt: z.ZodNullable<z.ZodString>;
984
+ storedUpload: z.ZodNullable<z.ZodObject<{
985
+ leafFingerprintSha256: z.ZodString;
986
+ validTo: z.ZodString;
987
+ hasCa: z.ZodBoolean;
988
+ }, z.core.$strip>>;
973
989
  }, z.core.$strip>, "mutation">;
974
- /** Replace the served material with operator-supplied PEMs. */
990
+ /**
991
+ * Replace the served material with operator-supplied PEMs. A certificate that does not lead
992
+ * to a public CA must come with its CA certificate, validated and kept for Download CA (D873).
993
+ */
975
994
  readonly uploadCertificate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
976
995
  certPem: z.ZodString;
977
996
  keyPem: z.ZodString;
@@ -989,12 +1008,45 @@ export declare const localNetworkCapability: {
989
1008
  caCertPem: z.ZodNullable<z.ZodString>;
990
1009
  reissueError: z.ZodNullable<z.ZodString>;
991
1010
  restartRequired: z.ZodBoolean;
1011
+ caMissing: z.ZodBoolean;
1012
+ localCaConstrained: z.ZodNullable<z.ZodBoolean>;
1013
+ caReplacedAt: z.ZodNullable<z.ZodString>;
1014
+ storedUpload: z.ZodNullable<z.ZodObject<{
1015
+ leafFingerprintSha256: z.ZodString;
1016
+ validTo: z.ZodString;
1017
+ hasCa: z.ZodBoolean;
1018
+ }, z.core.$strip>>;
992
1019
  }, z.core.$strip>, "mutation">;
993
1020
  /** The local CA PEM, or empty when there is none to download. */
994
1021
  readonly downloadCa: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
995
1022
  pem: z.ZodString;
996
1023
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
997
- /** Drop uploaded material and return to the generated local CA. */
1024
+ /**
1025
+ * Serve the kept upload again after "Revert to generated" (D873). Refused when none is kept.
1026
+ */
1027
+ readonly useStoredUploadedCertificate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
1028
+ mode: z.ZodEnum<{
1029
+ disabled: "disabled";
1030
+ generated: "generated";
1031
+ uploaded: "uploaded";
1032
+ }>;
1033
+ leafFingerprintSha256: z.ZodNullable<z.ZodString>;
1034
+ caFingerprintSha256: z.ZodNullable<z.ZodString>;
1035
+ validTo: z.ZodNullable<z.ZodString>;
1036
+ sans: z.ZodArray<z.ZodString>;
1037
+ caCertPem: z.ZodNullable<z.ZodString>;
1038
+ reissueError: z.ZodNullable<z.ZodString>;
1039
+ restartRequired: z.ZodBoolean;
1040
+ caMissing: z.ZodBoolean;
1041
+ localCaConstrained: z.ZodNullable<z.ZodBoolean>;
1042
+ caReplacedAt: z.ZodNullable<z.ZodString>;
1043
+ storedUpload: z.ZodNullable<z.ZodObject<{
1044
+ leafFingerprintSha256: z.ZodString;
1045
+ validTo: z.ZodString;
1046
+ hasCa: z.ZodBoolean;
1047
+ }, z.core.$strip>>;
1048
+ }, z.core.$strip>, "mutation">;
1049
+ /** Return to the generated local CA. The uploaded certificate stays stored (D873). */
998
1050
  readonly revertToGeneratedCertificate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
999
1051
  mode: z.ZodEnum<{
1000
1052
  disabled: "disabled";
@@ -1008,6 +1060,14 @@ export declare const localNetworkCapability: {
1008
1060
  caCertPem: z.ZodNullable<z.ZodString>;
1009
1061
  reissueError: z.ZodNullable<z.ZodString>;
1010
1062
  restartRequired: z.ZodBoolean;
1063
+ caMissing: z.ZodBoolean;
1064
+ localCaConstrained: z.ZodNullable<z.ZodBoolean>;
1065
+ caReplacedAt: z.ZodNullable<z.ZodString>;
1066
+ storedUpload: z.ZodNullable<z.ZodObject<{
1067
+ leafFingerprintSha256: z.ZodString;
1068
+ validTo: z.ZodString;
1069
+ hasCa: z.ZodBoolean;
1070
+ }, z.core.$strip>>;
1011
1071
  }, z.core.$strip>, "mutation">;
1012
1072
  };
1013
1073
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
package/dist/client.js CHANGED
@@ -27713,6 +27713,8 @@ function createSystemProxy(api) {
27713
27713
  getChildren: (input) => dispatch("deviceManager", "getChildren", "query", input),
27714
27714
  getChildrenBatch: (input) => dispatch("deviceManager", "getChildrenBatch", "query", input),
27715
27715
  getLinkedDevicesBatch: (input) => dispatch("deviceManager", "getLinkedDevicesBatch", "query", input),
27716
+ listDeletedSince: (input) => dispatch("deviceManager", "listDeletedSince", "query", input),
27717
+ cleanupDeletedDevicesData: (input) => dispatch("deviceManager", "cleanupDeletedDevicesData", "mutation", input),
27716
27718
  removeByIntegration: (input) => dispatch("deviceManager", "removeByIntegration", "mutation", input),
27717
27719
  getBindingsBatch: (input) => dispatch("deviceManager", "getBindingsBatch", "query", input),
27718
27720
  getAllBindings: (input) => dispatch("deviceManager", "getAllBindings", "query", input),
@@ -27845,6 +27847,7 @@ function createSystemProxy(api) {
27845
27847
  regenerateCertificate: (input) => dispatch("localNetwork", "regenerateCertificate", "mutation", input),
27846
27848
  uploadCertificate: (input) => dispatch("localNetwork", "uploadCertificate", "mutation", input),
27847
27849
  downloadCa: (input) => dispatch("localNetwork", "downloadCa", "query", input),
27850
+ useStoredUploadedCertificate: (input) => dispatch("localNetwork", "useStoredUploadedCertificate", "mutation", input),
27848
27851
  revertToGeneratedCertificate: (input) => dispatch("localNetwork", "revertToGeneratedCertificate", "mutation", input)
27849
27852
  },
27850
27853
  meshNetwork: {
package/dist/client.mjs CHANGED
@@ -27712,6 +27712,8 @@ function createSystemProxy(api) {
27712
27712
  getChildren: (input) => dispatch("deviceManager", "getChildren", "query", input),
27713
27713
  getChildrenBatch: (input) => dispatch("deviceManager", "getChildrenBatch", "query", input),
27714
27714
  getLinkedDevicesBatch: (input) => dispatch("deviceManager", "getLinkedDevicesBatch", "query", input),
27715
+ listDeletedSince: (input) => dispatch("deviceManager", "listDeletedSince", "query", input),
27716
+ cleanupDeletedDevicesData: (input) => dispatch("deviceManager", "cleanupDeletedDevicesData", "mutation", input),
27715
27717
  removeByIntegration: (input) => dispatch("deviceManager", "removeByIntegration", "mutation", input),
27716
27718
  getBindingsBatch: (input) => dispatch("deviceManager", "getBindingsBatch", "query", input),
27717
27719
  getAllBindings: (input) => dispatch("deviceManager", "getAllBindings", "query", input),
@@ -27844,6 +27846,7 @@ function createSystemProxy(api) {
27844
27846
  regenerateCertificate: (input) => dispatch("localNetwork", "regenerateCertificate", "mutation", input),
27845
27847
  uploadCertificate: (input) => dispatch("localNetwork", "uploadCertificate", "mutation", input),
27846
27848
  downloadCa: (input) => dispatch("localNetwork", "downloadCa", "query", input),
27849
+ useStoredUploadedCertificate: (input) => dispatch("localNetwork", "useStoredUploadedCertificate", "mutation", input),
27847
27850
  revertToGeneratedCertificate: (input) => dispatch("localNetwork", "revertToGeneratedCertificate", "mutation", input)
27848
27851
  },
27849
27852
  meshNetwork: {
@@ -1,4 +1,4 @@
1
- const require_err_msg = require("./err-msg-Dx2Kor0g.js");
1
+ const require_err_msg = require("./err-msg-Ls8Q6dHO.js");
2
2
  let zod = require("zod");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/ffmpeg/invocation.ts
@@ -1,4 +1,4 @@
1
- import { a as DeviceType, i as DeviceRole } from "./err-msg-DX6i_MY4.mjs";
1
+ import { a as DeviceType, i as DeviceRole } from "./err-msg-DLerKiVO.mjs";
2
2
  import { z } from "zod";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region src/ffmpeg/invocation.ts