@camstack/addon-provider-hikvision 1.2.151 → 1.2.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +1323 -130
- package/dist/addon.mjs +1323 -130
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { Agent as Agent$1, request as request$1 } from "node:https";
|
|
|
13
13
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
14
14
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region ../types/dist/event-category-
|
|
16
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
17
17
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
18
18
|
EventCategory["SystemBoot"] = "system.boot";
|
|
19
19
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -77,6 +77,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
77
77
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
78
78
|
*/
|
|
79
79
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
80
|
+
/**
|
|
81
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
82
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
83
|
+
* action. One event per refusal.
|
|
84
|
+
*/
|
|
85
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
86
|
+
/**
|
|
87
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
88
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
89
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
90
|
+
*/
|
|
91
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
92
|
+
/**
|
|
93
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
94
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
95
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
96
|
+
*/
|
|
97
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
80
98
|
EventCategory["AddonError"] = "addon.error";
|
|
81
99
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
82
100
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5401,7 +5419,7 @@ var ZodIssueCode = {
|
|
|
5401
5419
|
var ZodFirstPartyTypeKind;
|
|
5402
5420
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5403
5421
|
//#endregion
|
|
5404
|
-
//#region ../types/dist/sleep-
|
|
5422
|
+
//#region ../types/dist/sleep-BOjuyoPC.mjs
|
|
5405
5423
|
/**
|
|
5406
5424
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5407
5425
|
* window to float samples (D455).
|
|
@@ -5518,7 +5536,7 @@ function isKeychainStoredField(field) {
|
|
|
5518
5536
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5519
5537
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5520
5538
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5521
|
-
function isRecord$
|
|
5539
|
+
function isRecord$5(value) {
|
|
5522
5540
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5523
5541
|
}
|
|
5524
5542
|
function makeSecretMarker(ref) {
|
|
@@ -5529,12 +5547,12 @@ function makeSecretMarker(ref) {
|
|
|
5529
5547
|
}
|
|
5530
5548
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5531
5549
|
function isSecretMarker(value) {
|
|
5532
|
-
if (!isRecord$
|
|
5550
|
+
if (!isRecord$5(value)) return false;
|
|
5533
5551
|
const ref = value["$secret"];
|
|
5534
5552
|
return typeof ref === "string" && ref.length > 0;
|
|
5535
5553
|
}
|
|
5536
5554
|
function isSecretClear(value) {
|
|
5537
|
-
return isRecord$
|
|
5555
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5538
5556
|
}
|
|
5539
5557
|
/**
|
|
5540
5558
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6144,7 +6162,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6144
6162
|
}
|
|
6145
6163
|
};
|
|
6146
6164
|
var KEEP = { kind: "keep" };
|
|
6147
|
-
function isRecord$
|
|
6165
|
+
function isRecord$4(value) {
|
|
6148
6166
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6149
6167
|
}
|
|
6150
6168
|
function defaultMintId() {
|
|
@@ -6157,7 +6175,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6157
6175
|
return out;
|
|
6158
6176
|
}
|
|
6159
6177
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6160
|
-
else if (isRecord$
|
|
6178
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6161
6179
|
return out;
|
|
6162
6180
|
}
|
|
6163
6181
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6212,7 +6230,7 @@ function rowId(row, idKey) {
|
|
|
6212
6230
|
return null;
|
|
6213
6231
|
}
|
|
6214
6232
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6215
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6233
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6216
6234
|
if (!Array.isArray(incoming)) {
|
|
6217
6235
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6218
6236
|
return {
|
|
@@ -6228,7 +6246,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6228
6246
|
const kept = /* @__PURE__ */ new Set();
|
|
6229
6247
|
const rows = [];
|
|
6230
6248
|
for (const row of incoming) {
|
|
6231
|
-
if (!isRecord$
|
|
6249
|
+
if (!isRecord$4(row)) {
|
|
6232
6250
|
rows.push(row);
|
|
6233
6251
|
continue;
|
|
6234
6252
|
}
|
|
@@ -6253,7 +6271,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6253
6271
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6254
6272
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6255
6273
|
case "object": {
|
|
6256
|
-
if (!isRecord$
|
|
6274
|
+
if (!isRecord$4(incoming)) {
|
|
6257
6275
|
if (incoming === void 0) return KEEP;
|
|
6258
6276
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6259
6277
|
return {
|
|
@@ -6261,7 +6279,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6261
6279
|
value: incoming
|
|
6262
6280
|
};
|
|
6263
6281
|
}
|
|
6264
|
-
const storedObj = isRecord$
|
|
6282
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6265
6283
|
return {
|
|
6266
6284
|
kind: "value",
|
|
6267
6285
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6384,7 +6402,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6384
6402
|
value: items
|
|
6385
6403
|
};
|
|
6386
6404
|
}
|
|
6387
|
-
if (isRecord$
|
|
6405
|
+
if (isRecord$4(v)) {
|
|
6388
6406
|
const out = {};
|
|
6389
6407
|
for (const [k, child] of Object.entries(v)) {
|
|
6390
6408
|
const s = substitute(child);
|
|
@@ -6416,7 +6434,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6416
6434
|
this.name = "SecretOverwriteRefusedError";
|
|
6417
6435
|
}
|
|
6418
6436
|
};
|
|
6419
|
-
function isRecord(value) {
|
|
6437
|
+
function isRecord$3(value) {
|
|
6420
6438
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6421
6439
|
}
|
|
6422
6440
|
function resolvedValue(pass, marker) {
|
|
@@ -6445,7 +6463,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6445
6463
|
return incoming.map((item, index) => {
|
|
6446
6464
|
const twin = stored[index];
|
|
6447
6465
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6448
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6466
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6449
6467
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6450
6468
|
return item;
|
|
6451
6469
|
});
|
|
@@ -6456,7 +6474,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6456
6474
|
const twin = stored[key];
|
|
6457
6475
|
if (isSecretMarker(twin)) {
|
|
6458
6476
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6459
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6477
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6460
6478
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6461
6479
|
}
|
|
6462
6480
|
return out;
|
|
@@ -6464,7 +6482,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6464
6482
|
async function walk(pass, incoming, stored) {
|
|
6465
6483
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6466
6484
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6467
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6485
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6468
6486
|
const out = { ...incoming };
|
|
6469
6487
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6470
6488
|
return out;
|
|
@@ -6495,7 +6513,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6495
6513
|
function isJsonEqual(a, b) {
|
|
6496
6514
|
if (Object.is(a, b)) return true;
|
|
6497
6515
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6498
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6516
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6499
6517
|
const keys = Object.keys(a);
|
|
6500
6518
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6501
6519
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6519,7 +6537,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6519
6537
|
}
|
|
6520
6538
|
function nodeFromStored(value, owner) {
|
|
6521
6539
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6522
|
-
if (!isRecord(value)) return null;
|
|
6540
|
+
if (!isRecord$3(value)) return null;
|
|
6523
6541
|
const children = /* @__PURE__ */ new Map();
|
|
6524
6542
|
for (const [key, child] of Object.entries(value)) {
|
|
6525
6543
|
const node = nodeFromStored(child, owner);
|
|
@@ -6652,7 +6670,6 @@ function createHandle(raw, opts) {
|
|
|
6652
6670
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6653
6671
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6654
6672
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6655
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6656
6673
|
const overrides = {
|
|
6657
6674
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6658
6675
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6676,12 +6693,12 @@ function createHandle(raw, opts) {
|
|
|
6676
6693
|
};
|
|
6677
6694
|
} } : {},
|
|
6678
6695
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6679
|
-
|
|
6680
|
-
const rows = await readDeviceStoreBatch
|
|
6696
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6697
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6681
6698
|
const out = /* @__PURE__ */ new Map();
|
|
6682
6699
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6683
6700
|
return out;
|
|
6684
|
-
}
|
|
6701
|
+
},
|
|
6685
6702
|
writeAddonStore: async (patch) => {
|
|
6686
6703
|
await writeAddon(patch);
|
|
6687
6704
|
},
|
|
@@ -7308,7 +7325,7 @@ var BaseAddon = class {
|
|
|
7308
7325
|
if (!ctx) return;
|
|
7309
7326
|
const addonId = ctx.id;
|
|
7310
7327
|
setImmediate(() => {
|
|
7311
|
-
ctx.api.addons
|
|
7328
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7312
7329
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7313
7330
|
}).catch((err) => {
|
|
7314
7331
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7508,7 +7525,7 @@ var BaseAddon = class {
|
|
|
7508
7525
|
return this._addonSecretTree;
|
|
7509
7526
|
}
|
|
7510
7527
|
deviceSecretTree() {
|
|
7511
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7528
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7512
7529
|
return this._deviceSecretTree;
|
|
7513
7530
|
}
|
|
7514
7531
|
/**
|
|
@@ -7584,42 +7601,135 @@ var BaseAddon = class {
|
|
|
7584
7601
|
this[timerOf] = timer;
|
|
7585
7602
|
}
|
|
7586
7603
|
/**
|
|
7587
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7588
|
-
*
|
|
7589
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7590
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7604
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7605
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7591
7606
|
* addon permanently broken.
|
|
7592
7607
|
*
|
|
7593
|
-
*
|
|
7594
|
-
*
|
|
7595
|
-
* `
|
|
7608
|
+
* Two kinds of outage, two budgets:
|
|
7609
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7610
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7611
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7612
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7613
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7614
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7615
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7616
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7617
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7618
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7596
7619
|
*/
|
|
7597
7620
|
async readAddonStoreWithRetry() {
|
|
7598
7621
|
const settings = this.rawSettings();
|
|
7599
7622
|
if (!settings) return {};
|
|
7600
|
-
const delaysMs = [
|
|
7601
|
-
150,
|
|
7602
|
-
350,
|
|
7603
|
-
600,
|
|
7604
|
-
900
|
|
7605
|
-
];
|
|
7606
7623
|
let lastErr;
|
|
7607
|
-
for (let attempt = 0
|
|
7624
|
+
for (let attempt = 0;; attempt++) try {
|
|
7608
7625
|
const stored = await settings.readAddonStore() ?? {};
|
|
7609
7626
|
this.settingsStoreReady = true;
|
|
7610
7627
|
return stored;
|
|
7611
7628
|
} catch (err) {
|
|
7612
7629
|
lastErr = err;
|
|
7613
|
-
const
|
|
7614
|
-
if (
|
|
7615
|
-
|
|
7616
|
-
|
|
7630
|
+
const kind = classifyStoreError(err);
|
|
7631
|
+
if (kind === "permanent") throw err;
|
|
7632
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7633
|
+
if (delay === void 0) {
|
|
7634
|
+
if (kind === "transport") throw err;
|
|
7635
|
+
break;
|
|
7636
|
+
}
|
|
7637
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7617
7638
|
}
|
|
7618
7639
|
this.settingsStoreReady = false;
|
|
7619
7640
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7620
7641
|
return {};
|
|
7621
7642
|
}
|
|
7622
7643
|
};
|
|
7644
|
+
/** The settings store's own restart fingerprints. */
|
|
7645
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7646
|
+
150,
|
|
7647
|
+
350,
|
|
7648
|
+
600,
|
|
7649
|
+
900
|
|
7650
|
+
];
|
|
7651
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7652
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7653
|
+
150,
|
|
7654
|
+
350,
|
|
7655
|
+
600,
|
|
7656
|
+
900,
|
|
7657
|
+
2e3,
|
|
7658
|
+
5e3,
|
|
7659
|
+
1e4,
|
|
7660
|
+
2e4,
|
|
7661
|
+
3e4,
|
|
7662
|
+
3e4
|
|
7663
|
+
];
|
|
7664
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7665
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7666
|
+
var TRANSPORT_CODES = new Set([
|
|
7667
|
+
"ECONNREFUSED",
|
|
7668
|
+
"ECONNRESET",
|
|
7669
|
+
"ETIMEDOUT",
|
|
7670
|
+
"EPIPE",
|
|
7671
|
+
"EHOSTUNREACH",
|
|
7672
|
+
"ENETUNREACH"
|
|
7673
|
+
]);
|
|
7674
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7675
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7676
|
+
"TIMEOUT",
|
|
7677
|
+
"SERVICE_UNAVAILABLE",
|
|
7678
|
+
"BAD_GATEWAY",
|
|
7679
|
+
"GATEWAY_TIMEOUT"
|
|
7680
|
+
]);
|
|
7681
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7682
|
+
var TRANSPORT_PHRASES = [
|
|
7683
|
+
"discovery deadline exceeded",
|
|
7684
|
+
"parent could not route child unowned cap call",
|
|
7685
|
+
"UDS request timed out after",
|
|
7686
|
+
"channel closed"
|
|
7687
|
+
];
|
|
7688
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7689
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7690
|
+
"REQUEST_TIMEOUT",
|
|
7691
|
+
"SERVICE_NOT_FOUND",
|
|
7692
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7693
|
+
"REQUEST_REJECTED",
|
|
7694
|
+
"BROKER_DISCONNECTED"
|
|
7695
|
+
]);
|
|
7696
|
+
function stringProp(value, key) {
|
|
7697
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7698
|
+
const found = Reflect.get(value, key);
|
|
7699
|
+
return typeof found === "string" ? found : void 0;
|
|
7700
|
+
}
|
|
7701
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7702
|
+
function errorCode(err) {
|
|
7703
|
+
const out = {};
|
|
7704
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7705
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7706
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7707
|
+
if (node !== void 0) out.node = node;
|
|
7708
|
+
const trpc = stringProp(data, "code");
|
|
7709
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7710
|
+
return out;
|
|
7711
|
+
}
|
|
7712
|
+
/**
|
|
7713
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7714
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7715
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7716
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7717
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7718
|
+
*/
|
|
7719
|
+
function classifyStoreError(err) {
|
|
7720
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7721
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7722
|
+
const code = errorCode(err);
|
|
7723
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7724
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7725
|
+
if (typeof err === "object" && err !== null) {
|
|
7726
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7727
|
+
const type = stringProp(err, "type");
|
|
7728
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7729
|
+
}
|
|
7730
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7731
|
+
return "permanent";
|
|
7732
|
+
}
|
|
7623
7733
|
/**
|
|
7624
7734
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7625
7735
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7709,6 +7819,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7709
7819
|
*/
|
|
7710
7820
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7711
7821
|
});
|
|
7822
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7823
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7824
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7825
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7826
|
+
var RECORD_CLASSES = [
|
|
7827
|
+
"config",
|
|
7828
|
+
"ledger",
|
|
7829
|
+
"audit",
|
|
7830
|
+
"mirror",
|
|
7831
|
+
"ephemeral"
|
|
7832
|
+
];
|
|
7833
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7834
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7835
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7836
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7837
|
+
function defOf(schema) {
|
|
7838
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7839
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7840
|
+
const def = Reflect.get(zodBag, "def");
|
|
7841
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7842
|
+
return def;
|
|
7843
|
+
}
|
|
7844
|
+
function declaredHere(schema) {
|
|
7845
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7846
|
+
}
|
|
7847
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7848
|
+
var WRAPPERS = new Set([
|
|
7849
|
+
"optional",
|
|
7850
|
+
"nullable",
|
|
7851
|
+
"default",
|
|
7852
|
+
"prefault",
|
|
7853
|
+
"catch",
|
|
7854
|
+
"readonly",
|
|
7855
|
+
"nonoptional"
|
|
7856
|
+
]);
|
|
7857
|
+
/**
|
|
7858
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7859
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7860
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7861
|
+
* `.transform` on `in`).
|
|
7862
|
+
*/
|
|
7863
|
+
function layersOf(schema) {
|
|
7864
|
+
const out = [];
|
|
7865
|
+
const queue = [schema];
|
|
7866
|
+
while (queue.length > 0) {
|
|
7867
|
+
const s = queue.shift();
|
|
7868
|
+
if (!s || out.includes(s)) continue;
|
|
7869
|
+
out.push(s);
|
|
7870
|
+
const def = defOf(s);
|
|
7871
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7872
|
+
if (def.type === "pipe") {
|
|
7873
|
+
if (def.in) queue.push(def.in);
|
|
7874
|
+
if (def.out) queue.push(def.out);
|
|
7875
|
+
}
|
|
7876
|
+
}
|
|
7877
|
+
return out;
|
|
7878
|
+
}
|
|
7879
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7880
|
+
function isZodSecret(schema) {
|
|
7881
|
+
return layersOf(schema).some(declaredHere);
|
|
7882
|
+
}
|
|
7883
|
+
/**
|
|
7884
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7885
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7886
|
+
* object or array is reported as one path and not descended into — everything
|
|
7887
|
+
* under it is secret.
|
|
7888
|
+
*/
|
|
7889
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7890
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7891
|
+
const paths = [];
|
|
7892
|
+
for (const layer of layersOf(schema)) {
|
|
7893
|
+
const def = defOf(layer);
|
|
7894
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7895
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7896
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7897
|
+
else if (def.type === "intersection") {
|
|
7898
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7899
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
7902
|
+
return [...new Set(paths)];
|
|
7903
|
+
}
|
|
7904
|
+
/**
|
|
7905
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7906
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7907
|
+
* JSON the engine stores.
|
|
7908
|
+
*
|
|
7909
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7910
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7911
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7912
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7913
|
+
* never a field name (D879).
|
|
7914
|
+
*/
|
|
7915
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7916
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7917
|
+
var RecordIndexSchema = object({
|
|
7918
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7919
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7920
|
+
unique: boolean().optional()
|
|
7921
|
+
}).strict();
|
|
7922
|
+
var RecordRetentionSchema = union([
|
|
7923
|
+
object({
|
|
7924
|
+
ttlMs: number().int().positive(),
|
|
7925
|
+
from: _enum(["at", "write"])
|
|
7926
|
+
}).strict(),
|
|
7927
|
+
object({
|
|
7928
|
+
maxRows: number().int().positive().optional(),
|
|
7929
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7930
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7931
|
+
object({
|
|
7932
|
+
owner: string().min(1),
|
|
7933
|
+
reason: string().min(1)
|
|
7934
|
+
}).strict(),
|
|
7935
|
+
object({ none: string().min(1) }).strict()
|
|
7936
|
+
]);
|
|
7937
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7938
|
+
var EntryDescriptorSchema = object({
|
|
7939
|
+
title: string().min(1),
|
|
7940
|
+
/** The record body field shown as the entry's name. */
|
|
7941
|
+
nameField: string().min(1),
|
|
7942
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7943
|
+
fields: record(string(), unknown())
|
|
7944
|
+
}).strict();
|
|
7945
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7946
|
+
var RecordKindDeclarationSchema = object({
|
|
7947
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7948
|
+
class: _enum(RECORD_CLASSES),
|
|
7949
|
+
writeTrigger: string().min(1),
|
|
7950
|
+
device: _enum([
|
|
7951
|
+
"required",
|
|
7952
|
+
"optional",
|
|
7953
|
+
"none"
|
|
7954
|
+
]).default("none"),
|
|
7955
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7956
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7957
|
+
retention: RecordRetentionSchema,
|
|
7958
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7959
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7960
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7961
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7962
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7963
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7964
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7965
|
+
adoptsFrom: string().min(1).optional(),
|
|
7966
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7967
|
+
transactFamily: string().min(1).optional(),
|
|
7968
|
+
entry: EntryDescriptorSchema.optional()
|
|
7969
|
+
}).strict();
|
|
7970
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7971
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7712
7972
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7713
7973
|
var CamProfileSchema = _enum([
|
|
7714
7974
|
"high",
|
|
@@ -8185,69 +8445,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8185
8445
|
kind: "mutation",
|
|
8186
8446
|
auth: "admin"
|
|
8187
8447
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8188
|
-
function defOf(schema) {
|
|
8189
|
-
return schema._zod?.def ?? {};
|
|
8190
|
-
}
|
|
8191
|
-
function declaredHere(schema) {
|
|
8192
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8193
|
-
}
|
|
8194
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8195
|
-
var WRAPPERS = new Set([
|
|
8196
|
-
"optional",
|
|
8197
|
-
"nullable",
|
|
8198
|
-
"default",
|
|
8199
|
-
"prefault",
|
|
8200
|
-
"catch",
|
|
8201
|
-
"readonly",
|
|
8202
|
-
"nonoptional"
|
|
8203
|
-
]);
|
|
8204
|
-
/**
|
|
8205
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8206
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8207
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8208
|
-
* `.transform` on `in`).
|
|
8209
|
-
*/
|
|
8210
|
-
function layersOf(schema) {
|
|
8211
|
-
const out = [];
|
|
8212
|
-
const queue = [schema];
|
|
8213
|
-
while (queue.length > 0) {
|
|
8214
|
-
const s = queue.shift();
|
|
8215
|
-
if (!s || out.includes(s)) continue;
|
|
8216
|
-
out.push(s);
|
|
8217
|
-
const def = defOf(s);
|
|
8218
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8219
|
-
if (def.type === "pipe") {
|
|
8220
|
-
if (def.in) queue.push(def.in);
|
|
8221
|
-
if (def.out) queue.push(def.out);
|
|
8222
|
-
}
|
|
8223
|
-
}
|
|
8224
|
-
return out;
|
|
8225
|
-
}
|
|
8226
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8227
|
-
function isZodSecret(schema) {
|
|
8228
|
-
return layersOf(schema).some(declaredHere);
|
|
8229
|
-
}
|
|
8230
|
-
/**
|
|
8231
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8232
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8233
|
-
* object or array is reported as one path and not descended into — everything
|
|
8234
|
-
* under it is secret.
|
|
8235
|
-
*/
|
|
8236
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8237
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8238
|
-
const paths = [];
|
|
8239
|
-
for (const layer of layersOf(schema)) {
|
|
8240
|
-
const def = defOf(layer);
|
|
8241
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8242
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8243
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8244
|
-
else if (def.type === "intersection") {
|
|
8245
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8246
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8247
|
-
}
|
|
8248
|
-
}
|
|
8249
|
-
return [...new Set(paths)];
|
|
8250
|
-
}
|
|
8251
8448
|
object({
|
|
8252
8449
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8253
8450
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8267,7 +8464,7 @@ function userError(code, params, englishFallback) {
|
|
|
8267
8464
|
return new CamstackError(code, params, englishFallback);
|
|
8268
8465
|
}
|
|
8269
8466
|
//#endregion
|
|
8270
|
-
//#region ../types/dist/err-msg-
|
|
8467
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8271
8468
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8272
8469
|
DeviceType["Camera"] = "camera";
|
|
8273
8470
|
DeviceType["Hub"] = "hub";
|
|
@@ -8359,6 +8556,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8359
8556
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8360
8557
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8361
8558
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8559
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8560
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8561
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8562
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8362
8563
|
return DeviceType;
|
|
8363
8564
|
}({});
|
|
8364
8565
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8536,6 +8737,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8536
8737
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8537
8738
|
* real Switch device for UI rendering / export adapters. */
|
|
8538
8739
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8740
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8741
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8742
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8539
8743
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8540
8744
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8541
8745
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8603,7 +8807,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8603
8807
|
return DeviceRole;
|
|
8604
8808
|
}({});
|
|
8605
8809
|
//#endregion
|
|
8606
|
-
//#region ../types/dist/composition-
|
|
8810
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8607
8811
|
/**
|
|
8608
8812
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8609
8813
|
*
|
|
@@ -12108,11 +12312,10 @@ var ClipModelMetaSchema = object({
|
|
|
12108
12312
|
/**
|
|
12109
12313
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
12110
12314
|
* per index: two models share an index only when their vectors are ranked
|
|
12111
|
-
* against each other, which for CLIP means never across families.
|
|
12112
|
-
*
|
|
12113
|
-
* `modelId`); any other model gets its own.
|
|
12315
|
+
* against each other, which for CLIP means never across families. Every
|
|
12316
|
+
* model gets its own.
|
|
12114
12317
|
*/
|
|
12115
|
-
vectorIndex: string().regex(/^object-clip
|
|
12318
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
12116
12319
|
/**
|
|
12117
12320
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
12118
12321
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -13291,8 +13494,13 @@ var AlertSeveritySchema = _enum([
|
|
|
13291
13494
|
"info",
|
|
13292
13495
|
"success",
|
|
13293
13496
|
"warning",
|
|
13294
|
-
"error"
|
|
13497
|
+
"error",
|
|
13498
|
+
"critical"
|
|
13295
13499
|
]);
|
|
13500
|
+
var AlertActionSchema = object({
|
|
13501
|
+
label: string(),
|
|
13502
|
+
href: string().optional()
|
|
13503
|
+
});
|
|
13296
13504
|
var AlertStatusSchema = _enum([
|
|
13297
13505
|
"active",
|
|
13298
13506
|
"in-progress",
|
|
@@ -13310,6 +13518,7 @@ var AlertSchema = object({
|
|
|
13310
13518
|
severity: AlertSeveritySchema,
|
|
13311
13519
|
title: string(),
|
|
13312
13520
|
message: string(),
|
|
13521
|
+
action: AlertActionSchema.optional(),
|
|
13313
13522
|
status: AlertStatusSchema,
|
|
13314
13523
|
progress: number().optional(),
|
|
13315
13524
|
read: boolean(),
|
|
@@ -15845,6 +16054,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15845
16054
|
keyField: string()
|
|
15846
16055
|
}).optional()
|
|
15847
16056
|
})) });
|
|
16057
|
+
/**
|
|
16058
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
16059
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
16060
|
+
*
|
|
16061
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
16062
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
16063
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
16064
|
+
*/
|
|
16065
|
+
var RawSecretMigrationInputSchema = object({
|
|
16066
|
+
/** `false` (the default of the script) = report only. */
|
|
16067
|
+
apply: boolean() });
|
|
16068
|
+
var RawSecretMigrationReportSchema = object({
|
|
16069
|
+
apply: boolean(),
|
|
16070
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
16071
|
+
rows: number().int(),
|
|
16072
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
16073
|
+
raw: number().int(),
|
|
16074
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
16075
|
+
markers: number().int(),
|
|
16076
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
16077
|
+
migrated: number().int(),
|
|
16078
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
16079
|
+
failed: number().int(),
|
|
16080
|
+
/** After the run: rows still holding plaintext. */
|
|
16081
|
+
remainingRaw: number().int(),
|
|
16082
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
16083
|
+
unresolvedMarkers: number().int(),
|
|
16084
|
+
/**
|
|
16085
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
16086
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
16087
|
+
*/
|
|
16088
|
+
redundantCopies: number().int().optional(),
|
|
16089
|
+
/** True when nothing is raw and every marker resolves. */
|
|
16090
|
+
verified: boolean()
|
|
16091
|
+
});
|
|
15848
16092
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15849
16093
|
* agent is the reason placement is not fixed to the hub. */
|
|
15850
16094
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -16071,6 +16315,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
16071
16315
|
}), SettingsUpdateResultSchema, {
|
|
16072
16316
|
kind: "mutation",
|
|
16073
16317
|
auth: "admin"
|
|
16318
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16319
|
+
kind: "mutation",
|
|
16320
|
+
auth: "admin"
|
|
16074
16321
|
}), method(object({}), object({ libs: array(object({
|
|
16075
16322
|
filePath: string(),
|
|
16076
16323
|
content: string()
|
|
@@ -16334,6 +16581,347 @@ id: union([string(), number()]) }), {
|
|
|
16334
16581
|
auth: "admin"
|
|
16335
16582
|
});
|
|
16336
16583
|
/**
|
|
16584
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16585
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16586
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16587
|
+
*
|
|
16588
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16589
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16590
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16591
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16592
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16593
|
+
* addons go through the owner's capability.
|
|
16594
|
+
*
|
|
16595
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16596
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16597
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16598
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16599
|
+
* row's own ref.
|
|
16600
|
+
*
|
|
16601
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16602
|
+
*/
|
|
16603
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16604
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16605
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16606
|
+
var RecordInputSchema = object({
|
|
16607
|
+
id: RecordIdSchema,
|
|
16608
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16609
|
+
deviceId: number().int().optional(),
|
|
16610
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16611
|
+
at: number().int().optional(),
|
|
16612
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16613
|
+
expiresAt: number().int().optional(),
|
|
16614
|
+
data: RecordBodySchema
|
|
16615
|
+
});
|
|
16616
|
+
var RecordViewSchema = object({
|
|
16617
|
+
id: string(),
|
|
16618
|
+
deviceId: number().int().nullable(),
|
|
16619
|
+
at: number().nullable(),
|
|
16620
|
+
expiresAt: number().nullable(),
|
|
16621
|
+
rev: number().int(),
|
|
16622
|
+
updatedAt: number(),
|
|
16623
|
+
data: RecordBodySchema
|
|
16624
|
+
});
|
|
16625
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16626
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16627
|
+
string(),
|
|
16628
|
+
number(),
|
|
16629
|
+
boolean(),
|
|
16630
|
+
object({ in: array(union([
|
|
16631
|
+
string(),
|
|
16632
|
+
number(),
|
|
16633
|
+
boolean()
|
|
16634
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16635
|
+
object({
|
|
16636
|
+
gt: union([string(), number()]).optional(),
|
|
16637
|
+
gte: union([string(), number()]).optional(),
|
|
16638
|
+
lt: union([string(), number()]).optional(),
|
|
16639
|
+
lte: union([string(), number()]).optional()
|
|
16640
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16641
|
+
]));
|
|
16642
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16643
|
+
var TimeWindowShape = {
|
|
16644
|
+
deviceId: number().int().optional(),
|
|
16645
|
+
atFrom: number().optional(),
|
|
16646
|
+
atTo: number().optional()
|
|
16647
|
+
};
|
|
16648
|
+
var RecordQueryInputSchema = object({
|
|
16649
|
+
...KindShape,
|
|
16650
|
+
...TimeWindowShape,
|
|
16651
|
+
where: RecordWhereSchema.optional(),
|
|
16652
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16653
|
+
order: _enum(["at", "id"]).optional(),
|
|
16654
|
+
desc: boolean().optional(),
|
|
16655
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16656
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16657
|
+
cursor: string().min(1).optional()
|
|
16658
|
+
});
|
|
16659
|
+
var RecordQueryResultSchema = object({
|
|
16660
|
+
records: array(RecordViewSchema),
|
|
16661
|
+
nextCursor: string().nullable()
|
|
16662
|
+
});
|
|
16663
|
+
var RecordKindStateSchema = _enum([
|
|
16664
|
+
"created",
|
|
16665
|
+
"unchanged",
|
|
16666
|
+
"updated"
|
|
16667
|
+
]);
|
|
16668
|
+
var DeclareKindResultSchema = object({
|
|
16669
|
+
kindId: number().int(),
|
|
16670
|
+
state: RecordKindStateSchema,
|
|
16671
|
+
createdIndexes: array(string()),
|
|
16672
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16673
|
+
adoptionPending: object({
|
|
16674
|
+
legacyTable: string(),
|
|
16675
|
+
legacyRows: number().int()
|
|
16676
|
+
}).nullable()
|
|
16677
|
+
});
|
|
16678
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16679
|
+
var SecretRefsList = array(string());
|
|
16680
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16681
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16682
|
+
kind: "mutation",
|
|
16683
|
+
auth: "admin"
|
|
16684
|
+
}), method(object({
|
|
16685
|
+
...KindShape,
|
|
16686
|
+
id: RecordIdSchema
|
|
16687
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16688
|
+
...KindShape,
|
|
16689
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16690
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16691
|
+
...KindShape,
|
|
16692
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16693
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16694
|
+
...KindShape,
|
|
16695
|
+
record: RecordInputSchema,
|
|
16696
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16697
|
+
ifRev: number().int().min(0).optional()
|
|
16698
|
+
}), object({
|
|
16699
|
+
rev: number().int(),
|
|
16700
|
+
releasedRefs: SecretRefsList
|
|
16701
|
+
}), {
|
|
16702
|
+
kind: "mutation",
|
|
16703
|
+
auth: "admin"
|
|
16704
|
+
}), method(object({
|
|
16705
|
+
...KindShape,
|
|
16706
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16707
|
+
}), object({
|
|
16708
|
+
count: number().int(),
|
|
16709
|
+
releasedRefs: SecretRefsList
|
|
16710
|
+
}), {
|
|
16711
|
+
kind: "mutation",
|
|
16712
|
+
auth: "admin"
|
|
16713
|
+
}), method(object({
|
|
16714
|
+
...KindShape,
|
|
16715
|
+
id: RecordIdSchema,
|
|
16716
|
+
data: RecordBodySchema,
|
|
16717
|
+
at: number().int().nullable().optional(),
|
|
16718
|
+
expiresAt: number().int().nullable().optional(),
|
|
16719
|
+
ifRev: number().int().min(1).optional()
|
|
16720
|
+
}), object({
|
|
16721
|
+
rev: number().int(),
|
|
16722
|
+
releasedRefs: SecretRefsList
|
|
16723
|
+
}), {
|
|
16724
|
+
kind: "mutation",
|
|
16725
|
+
auth: "admin"
|
|
16726
|
+
}), method(object({
|
|
16727
|
+
...KindShape,
|
|
16728
|
+
id: RecordIdSchema
|
|
16729
|
+
}), object({
|
|
16730
|
+
deleted: boolean(),
|
|
16731
|
+
secretRefs: SecretRefsList
|
|
16732
|
+
}), {
|
|
16733
|
+
kind: "mutation",
|
|
16734
|
+
auth: "admin"
|
|
16735
|
+
}), method(object({
|
|
16736
|
+
...KindShape,
|
|
16737
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16738
|
+
}), object({
|
|
16739
|
+
deleted: number().int(),
|
|
16740
|
+
secretRefs: SecretRefsList
|
|
16741
|
+
}), {
|
|
16742
|
+
kind: "mutation",
|
|
16743
|
+
auth: "admin"
|
|
16744
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16745
|
+
...KindShape,
|
|
16746
|
+
...TimeWindowShape,
|
|
16747
|
+
where: RecordWhereSchema.optional()
|
|
16748
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
16749
|
+
...KindShape,
|
|
16750
|
+
deviceId: number().int().optional(),
|
|
16751
|
+
from: number(),
|
|
16752
|
+
to: number(),
|
|
16753
|
+
bucketMs: number().int().positive()
|
|
16754
|
+
}), object({ buckets: array(object({
|
|
16755
|
+
bucketStart: number(),
|
|
16756
|
+
count: number().int()
|
|
16757
|
+
})) }), { auth: "admin" }), method(object({
|
|
16758
|
+
...KindShape,
|
|
16759
|
+
op: _enum([
|
|
16760
|
+
"sum",
|
|
16761
|
+
"min",
|
|
16762
|
+
"max",
|
|
16763
|
+
"count"
|
|
16764
|
+
]),
|
|
16765
|
+
field: RecordFieldPathSchema.optional(),
|
|
16766
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
16767
|
+
where: RecordWhereSchema.optional()
|
|
16768
|
+
}), object({ rows: array(object({
|
|
16769
|
+
group: union([
|
|
16770
|
+
string(),
|
|
16771
|
+
number(),
|
|
16772
|
+
_null()
|
|
16773
|
+
]),
|
|
16774
|
+
value: number().nullable()
|
|
16775
|
+
})) }), { auth: "admin" }), method(object({
|
|
16776
|
+
...KindShape,
|
|
16777
|
+
deviceId: number().int().optional(),
|
|
16778
|
+
atBefore: number().optional(),
|
|
16779
|
+
where: RecordWhereSchema.optional()
|
|
16780
|
+
}), object({
|
|
16781
|
+
deleted: number().int(),
|
|
16782
|
+
secretRefs: SecretRefsList
|
|
16783
|
+
}), {
|
|
16784
|
+
kind: "mutation",
|
|
16785
|
+
auth: "admin"
|
|
16786
|
+
}), method(object({
|
|
16787
|
+
deviceId: number().int(),
|
|
16788
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
16789
|
+
}), object({
|
|
16790
|
+
deleted: record(string(), number().int()),
|
|
16791
|
+
secretRefs: SecretRefsList
|
|
16792
|
+
}), {
|
|
16793
|
+
kind: "mutation",
|
|
16794
|
+
auth: "admin"
|
|
16795
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
16796
|
+
kind: "mutation",
|
|
16797
|
+
auth: "admin"
|
|
16798
|
+
});
|
|
16799
|
+
/** One table of the settings database. */
|
|
16800
|
+
var StorageTableSchema = object({
|
|
16801
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
16802
|
+
name: string(),
|
|
16803
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
16804
|
+
owner: string().nullable(),
|
|
16805
|
+
rows: number().int().nonnegative(),
|
|
16806
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
16807
|
+
bytes: number().int().nonnegative().nullable(),
|
|
16808
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
16809
|
+
declaredThisBoot: boolean()
|
|
16810
|
+
});
|
|
16811
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
16812
|
+
var StorageKindSchema = object({
|
|
16813
|
+
owner: string(),
|
|
16814
|
+
kind: string(),
|
|
16815
|
+
database: _enum(["settings", "events"]),
|
|
16816
|
+
class: string(),
|
|
16817
|
+
state: _enum([
|
|
16818
|
+
"declared",
|
|
16819
|
+
"orphaned",
|
|
16820
|
+
"dropped"
|
|
16821
|
+
]),
|
|
16822
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
16823
|
+
rows: number().int().nonnegative().nullable(),
|
|
16824
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
16825
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
16826
|
+
writeTrigger: string(),
|
|
16827
|
+
retention: RecordRetentionSchema,
|
|
16828
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
16829
|
+
entry: boolean(),
|
|
16830
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
16831
|
+
declaration: RecordKindDeclarationSchema
|
|
16832
|
+
});
|
|
16833
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
16834
|
+
collection: string().min(1),
|
|
16835
|
+
expectRows: number().int().nonnegative()
|
|
16836
|
+
}), object({
|
|
16837
|
+
dropped: literal(true),
|
|
16838
|
+
rows: number().int().nonnegative()
|
|
16839
|
+
}), {
|
|
16840
|
+
kind: "mutation",
|
|
16841
|
+
auth: "admin"
|
|
16842
|
+
}), method(object({
|
|
16843
|
+
owner: string().min(1).optional(),
|
|
16844
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
16845
|
+
counts: boolean().optional()
|
|
16846
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
16847
|
+
owner: string().min(1),
|
|
16848
|
+
kind: RecordKindNameSchema
|
|
16849
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16850
|
+
owner: string().min(1),
|
|
16851
|
+
kind: RecordKindNameSchema,
|
|
16852
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
16853
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
16854
|
+
complete: boolean().optional()
|
|
16855
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
16856
|
+
kind: "mutation",
|
|
16857
|
+
auth: "admin"
|
|
16858
|
+
}), method(object({
|
|
16859
|
+
collection: string().min(1),
|
|
16860
|
+
cursor: string().optional(),
|
|
16861
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
16862
|
+
}), object({
|
|
16863
|
+
rows: array(object({
|
|
16864
|
+
id: string(),
|
|
16865
|
+
data: record(string(), unknown())
|
|
16866
|
+
})),
|
|
16867
|
+
nextCursor: string().nullable()
|
|
16868
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
16869
|
+
/**
|
|
16870
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
16871
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
16872
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
16873
|
+
*
|
|
16874
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
16875
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
16876
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
16877
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
16878
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
16879
|
+
* a secret value, and a locked keychain refuses the write with
|
|
16880
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
16881
|
+
*
|
|
16882
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
16883
|
+
*/
|
|
16884
|
+
var EntryKindInfoSchema = object({
|
|
16885
|
+
owner: string(),
|
|
16886
|
+
kind: RecordKindNameSchema,
|
|
16887
|
+
title: string(),
|
|
16888
|
+
nameField: string(),
|
|
16889
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
16890
|
+
fields: record(string(), unknown()),
|
|
16891
|
+
secretPaths: array(string()),
|
|
16892
|
+
rows: number().int().nonnegative()
|
|
16893
|
+
});
|
|
16894
|
+
var EntryViewSchema = object({
|
|
16895
|
+
id: RecordIdSchema,
|
|
16896
|
+
name: string(),
|
|
16897
|
+
rev: number().int(),
|
|
16898
|
+
updatedAt: number(),
|
|
16899
|
+
/** Secret fields hold the redaction token. */
|
|
16900
|
+
data: RecordBodySchema
|
|
16901
|
+
});
|
|
16902
|
+
var EntryAddress = {
|
|
16903
|
+
owner: string().min(1),
|
|
16904
|
+
kind: RecordKindNameSchema
|
|
16905
|
+
};
|
|
16906
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
16907
|
+
...EntryAddress,
|
|
16908
|
+
id: RecordIdSchema.optional(),
|
|
16909
|
+
data: RecordBodySchema,
|
|
16910
|
+
ifRev: number().int().min(1).optional()
|
|
16911
|
+
}), object({
|
|
16912
|
+
id: string(),
|
|
16913
|
+
rev: number().int()
|
|
16914
|
+
}), {
|
|
16915
|
+
kind: "mutation",
|
|
16916
|
+
auth: "admin"
|
|
16917
|
+
}), method(object({
|
|
16918
|
+
...EntryAddress,
|
|
16919
|
+
id: RecordIdSchema
|
|
16920
|
+
}), object({ deleted: boolean() }), {
|
|
16921
|
+
kind: "mutation",
|
|
16922
|
+
auth: "admin"
|
|
16923
|
+
});
|
|
16924
|
+
/**
|
|
16337
16925
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16338
16926
|
*
|
|
16339
16927
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16874,6 +17462,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16874
17462
|
kind: "mutation",
|
|
16875
17463
|
auth: "admin",
|
|
16876
17464
|
caller: "required"
|
|
17465
|
+
}), method(object({
|
|
17466
|
+
ref: string().min(1),
|
|
17467
|
+
value: string().min(1)
|
|
17468
|
+
}), object({
|
|
17469
|
+
ref: string(),
|
|
17470
|
+
version: number().int()
|
|
17471
|
+
}), {
|
|
17472
|
+
kind: "mutation",
|
|
17473
|
+
auth: "admin",
|
|
17474
|
+
caller: "required"
|
|
16877
17475
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16878
17476
|
deleted: array(string()).readonly(),
|
|
16879
17477
|
kept: array(object({
|
|
@@ -39667,6 +40265,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39667
40265
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39668
40266
|
kind: "mutation",
|
|
39669
40267
|
auth: "admin"
|
|
40268
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
40269
|
+
kind: "mutation",
|
|
40270
|
+
auth: "admin"
|
|
39670
40271
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39671
40272
|
kind: "mutation",
|
|
39672
40273
|
auth: "admin"
|
|
@@ -50176,6 +50777,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
50176
50777
|
atMs: number(),
|
|
50177
50778
|
reason: string()
|
|
50178
50779
|
});
|
|
50780
|
+
/**
|
|
50781
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50782
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50783
|
+
* service holds, because only the hub plans) against the states the process
|
|
50784
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50785
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50786
|
+
*
|
|
50787
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50788
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50789
|
+
* planned runner the process service has no entry for.
|
|
50790
|
+
*/
|
|
50791
|
+
var RunnerRefusalSchema = object({
|
|
50792
|
+
runnerId: string(),
|
|
50793
|
+
addonIds: array(string()),
|
|
50794
|
+
reason: string()
|
|
50795
|
+
});
|
|
50796
|
+
var RunnerBootCheckSchema = object({
|
|
50797
|
+
checkedAtMs: number(),
|
|
50798
|
+
/** Runners planned for this node. */
|
|
50799
|
+
expected: number(),
|
|
50800
|
+
/** Planned runners whose process is `running`. */
|
|
50801
|
+
running: number(),
|
|
50802
|
+
failed: array(string()),
|
|
50803
|
+
refused: array(RunnerRefusalSchema),
|
|
50804
|
+
missing: array(string()),
|
|
50805
|
+
/**
|
|
50806
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50807
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50808
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50809
|
+
* Optional for version skew (absent = settled).
|
|
50810
|
+
*/
|
|
50811
|
+
pending: array(string()).optional(),
|
|
50812
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50813
|
+
planKnown: boolean()
|
|
50814
|
+
});
|
|
50179
50815
|
var ServerPackageStatusSchema = object({
|
|
50180
50816
|
/** Root package name (`@camstack/server` on the hub). */
|
|
50181
50817
|
packageName: string(),
|
|
@@ -50238,7 +50874,14 @@ var ServerPackageStatusSchema = object({
|
|
|
50238
50874
|
* for version skew: an older provider's payload simply omits it, and an
|
|
50239
50875
|
* absent wrapper is unknown — never `native`.
|
|
50240
50876
|
*/
|
|
50241
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50877
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50878
|
+
/**
|
|
50879
|
+
* What this node PLANNED to run against what its process service reports
|
|
50880
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50881
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50882
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50883
|
+
*/
|
|
50884
|
+
runners: RunnerBootCheckSchema.optional()
|
|
50242
50885
|
});
|
|
50243
50886
|
var ServerUpdateCheckResultSchema = object({
|
|
50244
50887
|
packageName: string(),
|
|
@@ -50289,6 +50932,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
50289
50932
|
"refused",
|
|
50290
50933
|
"failed"
|
|
50291
50934
|
]);
|
|
50935
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50936
|
+
var UpdateBlockerSchema = object({
|
|
50937
|
+
addonId: string(),
|
|
50938
|
+
reason: string(),
|
|
50939
|
+
/** What the operator does about it. */
|
|
50940
|
+
remedy: string()
|
|
50941
|
+
});
|
|
50292
50942
|
var ServerUpdateActionResultSchema = object({
|
|
50293
50943
|
accepted: boolean(),
|
|
50294
50944
|
targetVersion: string().nullable(),
|
|
@@ -50306,14 +50956,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
50306
50956
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
50307
50957
|
* staging install). Non-null only for `failed`.
|
|
50308
50958
|
*/
|
|
50309
|
-
error: string().nullable().optional()
|
|
50959
|
+
error: string().nullable().optional(),
|
|
50960
|
+
/**
|
|
50961
|
+
* The addons the target version would refuse to start on this node's live
|
|
50962
|
+
* store (D877), present when the pre-flight refused the update
|
|
50963
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50964
|
+
*/
|
|
50965
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
50310
50966
|
});
|
|
50311
50967
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
50312
50968
|
kind: "mutation",
|
|
50313
50969
|
auth: "admin"
|
|
50314
|
-
}), method(object({
|
|
50315
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
50316
|
-
version: string().optional()
|
|
50970
|
+
}), method(object({
|
|
50971
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50972
|
+
version: string().optional(),
|
|
50973
|
+
/**
|
|
50974
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50975
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50976
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50977
|
+
*/
|
|
50978
|
+
acknowledgeRefusals: boolean().optional()
|
|
50979
|
+
}), ServerUpdateActionResultSchema, {
|
|
50317
50980
|
kind: "mutation",
|
|
50318
50981
|
auth: "admin",
|
|
50319
50982
|
timeoutMs: 16 * 6e4
|
|
@@ -53281,7 +53944,9 @@ var ManifestShapeSchema = object({
|
|
|
53281
53944
|
var AddonProcessSchema = object({
|
|
53282
53945
|
pid: number().optional(),
|
|
53283
53946
|
mode: string(),
|
|
53284
|
-
state: string()
|
|
53947
|
+
state: string(),
|
|
53948
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53949
|
+
reason: string().optional()
|
|
53285
53950
|
});
|
|
53286
53951
|
/**
|
|
53287
53952
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -54049,7 +54714,8 @@ var batteryCapability = {
|
|
|
54049
54714
|
DeviceType.Button,
|
|
54050
54715
|
DeviceType.Switch,
|
|
54051
54716
|
DeviceType.PetFeeder,
|
|
54052
|
-
DeviceType.Container
|
|
54717
|
+
DeviceType.Container,
|
|
54718
|
+
DeviceType.Thermostat
|
|
54053
54719
|
],
|
|
54054
54720
|
methods: {
|
|
54055
54721
|
/**
|
|
@@ -54670,6 +55336,12 @@ var ClimateControlStatusSchema = object({
|
|
|
54670
55336
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
54671
55337
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
54672
55338
|
swingHorizontal: boolean().nullable(),
|
|
55339
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
55340
|
+
minTemp: number().nullable().optional(),
|
|
55341
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
55342
|
+
maxTemp: number().nullable().optional(),
|
|
55343
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
55344
|
+
tempStep: number().positive().nullable().optional(),
|
|
54673
55345
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
54674
55346
|
lastFetchedAt: number()
|
|
54675
55347
|
});
|
|
@@ -55516,6 +56188,125 @@ onStatusChanged: { data: object({
|
|
|
55516
56188
|
* whether persisting is worth a SQLite commit. */
|
|
55517
56189
|
volatileStateFields: ["lastChangedAt"]
|
|
55518
56190
|
};
|
|
56191
|
+
/**
|
|
56192
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
56193
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
56194
|
+
*
|
|
56195
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
56196
|
+
* by any integration that exposes the same program / option surface.
|
|
56197
|
+
*
|
|
56198
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
56199
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
56200
|
+
*/
|
|
56201
|
+
var DishwasherStateSchema = _enum([
|
|
56202
|
+
"idle",
|
|
56203
|
+
"running",
|
|
56204
|
+
"paused",
|
|
56205
|
+
"finished",
|
|
56206
|
+
"error",
|
|
56207
|
+
"unavailable"
|
|
56208
|
+
]);
|
|
56209
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
56210
|
+
"ok",
|
|
56211
|
+
"low",
|
|
56212
|
+
"empty"
|
|
56213
|
+
]);
|
|
56214
|
+
var DishwasherStatusSchema = object({
|
|
56215
|
+
state: DishwasherStateSchema,
|
|
56216
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
56217
|
+
program: string().nullable(),
|
|
56218
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
56219
|
+
availablePrograms: array(string()),
|
|
56220
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
56221
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
56222
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
56223
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
56224
|
+
/** True when the door is reported open. */
|
|
56225
|
+
doorOpen: boolean(),
|
|
56226
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
56227
|
+
remoteStartAllowed: boolean(),
|
|
56228
|
+
/** Main power / switched-on state. */
|
|
56229
|
+
powerOn: boolean(),
|
|
56230
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56231
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56232
|
+
halfLoad: boolean(),
|
|
56233
|
+
hygienePlus: boolean(),
|
|
56234
|
+
errorCode: number().nullable(),
|
|
56235
|
+
errorLabel: string().nullable(),
|
|
56236
|
+
lastFetchedAt: number()
|
|
56237
|
+
});
|
|
56238
|
+
var dishwasherCapability = {
|
|
56239
|
+
name: "dishwasher",
|
|
56240
|
+
scope: "device",
|
|
56241
|
+
deviceNative: true,
|
|
56242
|
+
mode: "singleton",
|
|
56243
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
56244
|
+
methods: {
|
|
56245
|
+
start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56246
|
+
kind: "mutation",
|
|
56247
|
+
auth: "protected"
|
|
56248
|
+
}),
|
|
56249
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56250
|
+
kind: "mutation",
|
|
56251
|
+
auth: "protected"
|
|
56252
|
+
}),
|
|
56253
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56254
|
+
kind: "mutation",
|
|
56255
|
+
auth: "protected"
|
|
56256
|
+
}),
|
|
56257
|
+
setProgram: method(object({
|
|
56258
|
+
deviceId: number().int().nonnegative(),
|
|
56259
|
+
program: string().min(1)
|
|
56260
|
+
}), _void(), {
|
|
56261
|
+
kind: "mutation",
|
|
56262
|
+
auth: "protected"
|
|
56263
|
+
}),
|
|
56264
|
+
setPower: method(object({
|
|
56265
|
+
deviceId: number().int().nonnegative(),
|
|
56266
|
+
on: boolean()
|
|
56267
|
+
}), _void(), {
|
|
56268
|
+
kind: "mutation",
|
|
56269
|
+
auth: "protected"
|
|
56270
|
+
}),
|
|
56271
|
+
setHalfLoad: method(object({
|
|
56272
|
+
deviceId: number().int().nonnegative(),
|
|
56273
|
+
on: boolean()
|
|
56274
|
+
}), _void(), {
|
|
56275
|
+
kind: "mutation",
|
|
56276
|
+
auth: "protected"
|
|
56277
|
+
}),
|
|
56278
|
+
setHygienePlus: method(object({
|
|
56279
|
+
deviceId: number().int().nonnegative(),
|
|
56280
|
+
on: boolean()
|
|
56281
|
+
}), _void(), {
|
|
56282
|
+
kind: "mutation",
|
|
56283
|
+
auth: "protected"
|
|
56284
|
+
}),
|
|
56285
|
+
setOption: method(object({
|
|
56286
|
+
deviceId: number().int().nonnegative(),
|
|
56287
|
+
key: string().min(1),
|
|
56288
|
+
value: union([
|
|
56289
|
+
boolean(),
|
|
56290
|
+
string(),
|
|
56291
|
+
number()
|
|
56292
|
+
])
|
|
56293
|
+
}), _void(), {
|
|
56294
|
+
kind: "mutation",
|
|
56295
|
+
auth: "protected"
|
|
56296
|
+
})
|
|
56297
|
+
},
|
|
56298
|
+
status: {
|
|
56299
|
+
schema: DishwasherStatusSchema,
|
|
56300
|
+
kind: "poll"
|
|
56301
|
+
},
|
|
56302
|
+
runtimeState: DishwasherStatusSchema,
|
|
56303
|
+
durability: "session",
|
|
56304
|
+
history: { fields: { progressPercent: {
|
|
56305
|
+
kind: "gauge",
|
|
56306
|
+
unit: "%",
|
|
56307
|
+
deadband: 2
|
|
56308
|
+
} } }
|
|
56309
|
+
};
|
|
55519
56310
|
var DoorbellStatusSchema = object({
|
|
55520
56311
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
55521
56312
|
lastPressedAt: number().nullable(),
|
|
@@ -56318,6 +57109,32 @@ var gasCapability = {
|
|
|
56318
57109
|
* whether persisting is worth a SQLite commit. */
|
|
56319
57110
|
volatileStateFields: ["lastChangedAt"]
|
|
56320
57111
|
};
|
|
57112
|
+
var HeatingValveStatusSchema = object({
|
|
57113
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
57114
|
+
position: number().min(0).max(100).nullable(),
|
|
57115
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
57116
|
+
lastFetchedAt: number()
|
|
57117
|
+
});
|
|
57118
|
+
var heatingValveCapability = {
|
|
57119
|
+
name: "heating-valve",
|
|
57120
|
+
scope: "device",
|
|
57121
|
+
deviceNative: true,
|
|
57122
|
+
mode: "singleton",
|
|
57123
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
57124
|
+
methods: {},
|
|
57125
|
+
status: {
|
|
57126
|
+
schema: HeatingValveStatusSchema,
|
|
57127
|
+
kind: "push"
|
|
57128
|
+
},
|
|
57129
|
+
runtimeState: HeatingValveStatusSchema,
|
|
57130
|
+
durability: "session",
|
|
57131
|
+
history: { fields: { position: {
|
|
57132
|
+
kind: "gauge",
|
|
57133
|
+
unit: "%",
|
|
57134
|
+
deadband: 1
|
|
57135
|
+
} } },
|
|
57136
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
57137
|
+
};
|
|
56321
57138
|
/**
|
|
56322
57139
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
56323
57140
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -57450,7 +58267,19 @@ var TlsStatusSchema = object({
|
|
|
57450
58267
|
sans: array(string()),
|
|
57451
58268
|
caCertPem: string().nullable(),
|
|
57452
58269
|
reissueError: string().nullable(),
|
|
57453
|
-
restartRequired: boolean()
|
|
58270
|
+
restartRequired: boolean(),
|
|
58271
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
58272
|
+
caMissing: boolean(),
|
|
58273
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
58274
|
+
localCaConstrained: boolean().nullable(),
|
|
58275
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
58276
|
+
caReplacedAt: string().nullable(),
|
|
58277
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
58278
|
+
storedUpload: object({
|
|
58279
|
+
leafFingerprintSha256: string(),
|
|
58280
|
+
validTo: string(),
|
|
58281
|
+
hasCa: boolean()
|
|
58282
|
+
}).nullable()
|
|
57454
58283
|
});
|
|
57455
58284
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
57456
58285
|
/**
|
|
@@ -57506,6 +58335,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
57506
58335
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
57507
58336
|
kind: "mutation",
|
|
57508
58337
|
auth: "admin"
|
|
58338
|
+
}), method(_void(), TlsStatusSchema, {
|
|
58339
|
+
kind: "mutation",
|
|
58340
|
+
auth: "admin"
|
|
57509
58341
|
});
|
|
57510
58342
|
var LockControlStatusSchema = object({
|
|
57511
58343
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -64560,7 +65392,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64560
65392
|
kind: "mutation",
|
|
64561
65393
|
auth: "admin",
|
|
64562
65394
|
access: "delete"
|
|
64563
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
65395
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
65396
|
+
kind: "mutation",
|
|
65397
|
+
auth: "admin",
|
|
65398
|
+
access: "create"
|
|
65399
|
+
}), method(object({
|
|
64564
65400
|
userId: string(),
|
|
64565
65401
|
code: string()
|
|
64566
65402
|
}), object({ valid: boolean() }), {
|
|
@@ -66295,6 +67131,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
66295
67131
|
dayNight: dayNightCapability,
|
|
66296
67132
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
66297
67133
|
deviceStatus: deviceStatusCapability,
|
|
67134
|
+
dishwasher: dishwasherCapability,
|
|
66298
67135
|
doorbell: doorbellCapability,
|
|
66299
67136
|
enumSensor: enumSensorCapability,
|
|
66300
67137
|
eventEmitter: eventEmitterCapability,
|
|
@@ -66302,6 +67139,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
66302
67139
|
featureProbe: featureProbeCapability,
|
|
66303
67140
|
flood: floodCapability,
|
|
66304
67141
|
gas: gasCapability,
|
|
67142
|
+
heatingValve: heatingValveCapability,
|
|
66305
67143
|
humidifier: humidifierCapability,
|
|
66306
67144
|
humiditySensor: humiditySensorCapability,
|
|
66307
67145
|
image: imageCapability,
|
|
@@ -66387,13 +67225,14 @@ var BaseDevice = class {
|
|
|
66387
67225
|
get state() {
|
|
66388
67226
|
if (!this._stateProxyCache) {
|
|
66389
67227
|
const cache = {};
|
|
66390
|
-
const handler = { get: (
|
|
67228
|
+
const handler = { get: (target, key) => {
|
|
66391
67229
|
const k = key;
|
|
66392
|
-
|
|
67230
|
+
const existing = Reflect.get(target, k);
|
|
67231
|
+
if (existing !== void 0) return existing;
|
|
66393
67232
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
66394
67233
|
if (!cap) return void 0;
|
|
66395
67234
|
const proxy = this.sliceProxy(cap);
|
|
66396
|
-
|
|
67235
|
+
Reflect.set(target, k, proxy);
|
|
66397
67236
|
return proxy;
|
|
66398
67237
|
} };
|
|
66399
67238
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -66592,7 +67431,7 @@ var BaseDevice = class {
|
|
|
66592
67431
|
async updateSourceInfo(patch) {
|
|
66593
67432
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
66594
67433
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
66595
|
-
const action = this.ctx.api
|
|
67434
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
66596
67435
|
if (action) try {
|
|
66597
67436
|
await action.mutate({
|
|
66598
67437
|
deviceId: this.id,
|
|
@@ -66627,7 +67466,7 @@ var BaseDevice = class {
|
|
|
66627
67466
|
* device boot on a meta refresh.
|
|
66628
67467
|
*/
|
|
66629
67468
|
async refreshFeatures() {
|
|
66630
|
-
const action = this.ctx.api
|
|
67469
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
66631
67470
|
if (!action) return;
|
|
66632
67471
|
try {
|
|
66633
67472
|
await action.mutate({
|
|
@@ -67026,6 +67865,12 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
67026
67865
|
provider: this
|
|
67027
67866
|
}];
|
|
67028
67867
|
}
|
|
67868
|
+
/** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
|
|
67869
|
+
providerRegistrationsFromSuper(result) {
|
|
67870
|
+
if (Array.isArray(result)) return result;
|
|
67871
|
+
if (result !== void 0 && result.providers !== void 0) return [...result.providers];
|
|
67872
|
+
return [];
|
|
67873
|
+
}
|
|
67029
67874
|
async onShutdown() {
|
|
67030
67875
|
this._restoreShuttingDown = true;
|
|
67031
67876
|
this.cancelRestoreRetries();
|
|
@@ -67552,7 +68397,11 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
67552
68397
|
return toDeviceSummary(device, this.addonId);
|
|
67553
68398
|
}
|
|
67554
68399
|
};
|
|
67555
|
-
|
|
68400
|
+
/** Map entry helper — concrete camera/hub classes widen to `DeviceConstructor<IDevice>`. */
|
|
68401
|
+
function widenDeviceConstructor(ctor) {
|
|
68402
|
+
return ctor;
|
|
68403
|
+
}
|
|
68404
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
67556
68405
|
new Set(Object.values(DeviceType));
|
|
67557
68406
|
Object.freeze({
|
|
67558
68407
|
"accessories.getStatus": {
|
|
@@ -68701,6 +69550,12 @@ Object.freeze({
|
|
|
68701
69550
|
addonId: null,
|
|
68702
69551
|
access: "view"
|
|
68703
69552
|
},
|
|
69553
|
+
"coreBlocks.migrateRawSecrets": {
|
|
69554
|
+
capName: "core-blocks",
|
|
69555
|
+
capScope: "system",
|
|
69556
|
+
addonId: null,
|
|
69557
|
+
access: "create"
|
|
69558
|
+
},
|
|
68704
69559
|
"coreBlocks.restart": {
|
|
68705
69560
|
capName: "core-blocks",
|
|
68706
69561
|
capScope: "system",
|
|
@@ -69967,6 +70822,60 @@ Object.freeze({
|
|
|
69967
70822
|
addonId: null,
|
|
69968
70823
|
access: "view"
|
|
69969
70824
|
},
|
|
70825
|
+
"dishwasher.getStatus": {
|
|
70826
|
+
capName: "dishwasher",
|
|
70827
|
+
capScope: "device",
|
|
70828
|
+
addonId: null,
|
|
70829
|
+
access: "view"
|
|
70830
|
+
},
|
|
70831
|
+
"dishwasher.pause": {
|
|
70832
|
+
capName: "dishwasher",
|
|
70833
|
+
capScope: "device",
|
|
70834
|
+
addonId: null,
|
|
70835
|
+
access: "create"
|
|
70836
|
+
},
|
|
70837
|
+
"dishwasher.setHalfLoad": {
|
|
70838
|
+
capName: "dishwasher",
|
|
70839
|
+
capScope: "device",
|
|
70840
|
+
addonId: null,
|
|
70841
|
+
access: "create"
|
|
70842
|
+
},
|
|
70843
|
+
"dishwasher.setHygienePlus": {
|
|
70844
|
+
capName: "dishwasher",
|
|
70845
|
+
capScope: "device",
|
|
70846
|
+
addonId: null,
|
|
70847
|
+
access: "create"
|
|
70848
|
+
},
|
|
70849
|
+
"dishwasher.setOption": {
|
|
70850
|
+
capName: "dishwasher",
|
|
70851
|
+
capScope: "device",
|
|
70852
|
+
addonId: null,
|
|
70853
|
+
access: "create"
|
|
70854
|
+
},
|
|
70855
|
+
"dishwasher.setPower": {
|
|
70856
|
+
capName: "dishwasher",
|
|
70857
|
+
capScope: "device",
|
|
70858
|
+
addonId: null,
|
|
70859
|
+
access: "create"
|
|
70860
|
+
},
|
|
70861
|
+
"dishwasher.setProgram": {
|
|
70862
|
+
capName: "dishwasher",
|
|
70863
|
+
capScope: "device",
|
|
70864
|
+
addonId: null,
|
|
70865
|
+
access: "create"
|
|
70866
|
+
},
|
|
70867
|
+
"dishwasher.start": {
|
|
70868
|
+
capName: "dishwasher",
|
|
70869
|
+
capScope: "device",
|
|
70870
|
+
addonId: null,
|
|
70871
|
+
access: "create"
|
|
70872
|
+
},
|
|
70873
|
+
"dishwasher.stop": {
|
|
70874
|
+
capName: "dishwasher",
|
|
70875
|
+
capScope: "device",
|
|
70876
|
+
addonId: null,
|
|
70877
|
+
access: "create"
|
|
70878
|
+
},
|
|
69970
70879
|
"doorbell.getStatus": {
|
|
69971
70880
|
capName: "doorbell",
|
|
69972
70881
|
capScope: "device",
|
|
@@ -70177,6 +71086,12 @@ Object.freeze({
|
|
|
70177
71086
|
addonId: null,
|
|
70178
71087
|
access: "view"
|
|
70179
71088
|
},
|
|
71089
|
+
"heatingValve.getStatus": {
|
|
71090
|
+
capName: "heating-valve",
|
|
71091
|
+
capScope: "device",
|
|
71092
|
+
addonId: null,
|
|
71093
|
+
access: "view"
|
|
71094
|
+
},
|
|
70180
71095
|
"humidifier.getStatus": {
|
|
70181
71096
|
capName: "humidifier",
|
|
70182
71097
|
capScope: "device",
|
|
@@ -70387,6 +71302,12 @@ Object.freeze({
|
|
|
70387
71302
|
addonId: null,
|
|
70388
71303
|
access: "create"
|
|
70389
71304
|
},
|
|
71305
|
+
"keychainAdmin.importSecret": {
|
|
71306
|
+
capName: "keychain-admin",
|
|
71307
|
+
capScope: "system",
|
|
71308
|
+
addonId: null,
|
|
71309
|
+
access: "create"
|
|
71310
|
+
},
|
|
70390
71311
|
"keychainAdmin.listAudit": {
|
|
70391
71312
|
capName: "keychain-admin",
|
|
70392
71313
|
capScope: "system",
|
|
@@ -70555,6 +71476,12 @@ Object.freeze({
|
|
|
70555
71476
|
addonId: null,
|
|
70556
71477
|
access: "view"
|
|
70557
71478
|
},
|
|
71479
|
+
"llm.migrateRawSecrets": {
|
|
71480
|
+
capName: "llm",
|
|
71481
|
+
capScope: "system",
|
|
71482
|
+
addonId: null,
|
|
71483
|
+
access: "create"
|
|
71484
|
+
},
|
|
70558
71485
|
"llm.resolveModelRef": {
|
|
70559
71486
|
capName: "llm",
|
|
70560
71487
|
capScope: "system",
|
|
@@ -70783,6 +71710,12 @@ Object.freeze({
|
|
|
70783
71710
|
addonId: null,
|
|
70784
71711
|
access: "create"
|
|
70785
71712
|
},
|
|
71713
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
71714
|
+
capName: "local-network",
|
|
71715
|
+
capScope: "system",
|
|
71716
|
+
addonId: null,
|
|
71717
|
+
access: "create"
|
|
71718
|
+
},
|
|
70786
71719
|
"lockControl.getStatus": {
|
|
70787
71720
|
capName: "lock-control",
|
|
70788
71721
|
capScope: "device",
|
|
@@ -73435,6 +74368,30 @@ Object.freeze({
|
|
|
73435
74368
|
addonId: null,
|
|
73436
74369
|
access: "create"
|
|
73437
74370
|
},
|
|
74371
|
+
"recordEntries.deleteEntry": {
|
|
74372
|
+
capName: "record-entries",
|
|
74373
|
+
capScope: "system",
|
|
74374
|
+
addonId: null,
|
|
74375
|
+
access: "delete"
|
|
74376
|
+
},
|
|
74377
|
+
"recordEntries.listEntries": {
|
|
74378
|
+
capName: "record-entries",
|
|
74379
|
+
capScope: "system",
|
|
74380
|
+
addonId: null,
|
|
74381
|
+
access: "view"
|
|
74382
|
+
},
|
|
74383
|
+
"recordEntries.listEntryKinds": {
|
|
74384
|
+
capName: "record-entries",
|
|
74385
|
+
capScope: "system",
|
|
74386
|
+
addonId: null,
|
|
74387
|
+
access: "view"
|
|
74388
|
+
},
|
|
74389
|
+
"recordEntries.putEntry": {
|
|
74390
|
+
capName: "record-entries",
|
|
74391
|
+
capScope: "system",
|
|
74392
|
+
addonId: null,
|
|
74393
|
+
access: "create"
|
|
74394
|
+
},
|
|
73438
74395
|
"recording.getAvailability": {
|
|
73439
74396
|
capName: "recording",
|
|
73440
74397
|
capScope: "device",
|
|
@@ -73735,6 +74692,102 @@ Object.freeze({
|
|
|
73735
74692
|
addonId: null,
|
|
73736
74693
|
access: "view"
|
|
73737
74694
|
},
|
|
74695
|
+
"records.aggregate": {
|
|
74696
|
+
capName: "records",
|
|
74697
|
+
capScope: "system",
|
|
74698
|
+
addonId: null,
|
|
74699
|
+
access: "view"
|
|
74700
|
+
},
|
|
74701
|
+
"records.allocateId": {
|
|
74702
|
+
capName: "records",
|
|
74703
|
+
capScope: "system",
|
|
74704
|
+
addonId: null,
|
|
74705
|
+
access: "create"
|
|
74706
|
+
},
|
|
74707
|
+
"records.count": {
|
|
74708
|
+
capName: "records",
|
|
74709
|
+
capScope: "system",
|
|
74710
|
+
addonId: null,
|
|
74711
|
+
access: "view"
|
|
74712
|
+
},
|
|
74713
|
+
"records.declareKinds": {
|
|
74714
|
+
capName: "records",
|
|
74715
|
+
capScope: "system",
|
|
74716
|
+
addonId: null,
|
|
74717
|
+
access: "create"
|
|
74718
|
+
},
|
|
74719
|
+
"records.delete": {
|
|
74720
|
+
capName: "records",
|
|
74721
|
+
capScope: "system",
|
|
74722
|
+
addonId: null,
|
|
74723
|
+
access: "delete"
|
|
74724
|
+
},
|
|
74725
|
+
"records.deleteDevice": {
|
|
74726
|
+
capName: "records",
|
|
74727
|
+
capScope: "system",
|
|
74728
|
+
addonId: null,
|
|
74729
|
+
access: "delete"
|
|
74730
|
+
},
|
|
74731
|
+
"records.deleteMany": {
|
|
74732
|
+
capName: "records",
|
|
74733
|
+
capScope: "system",
|
|
74734
|
+
addonId: null,
|
|
74735
|
+
access: "delete"
|
|
74736
|
+
},
|
|
74737
|
+
"records.deleteWhere": {
|
|
74738
|
+
capName: "records",
|
|
74739
|
+
capScope: "system",
|
|
74740
|
+
addonId: null,
|
|
74741
|
+
access: "delete"
|
|
74742
|
+
},
|
|
74743
|
+
"records.get": {
|
|
74744
|
+
capName: "records",
|
|
74745
|
+
capScope: "system",
|
|
74746
|
+
addonId: null,
|
|
74747
|
+
access: "view"
|
|
74748
|
+
},
|
|
74749
|
+
"records.getMany": {
|
|
74750
|
+
capName: "records",
|
|
74751
|
+
capScope: "system",
|
|
74752
|
+
addonId: null,
|
|
74753
|
+
access: "view"
|
|
74754
|
+
},
|
|
74755
|
+
"records.histogram": {
|
|
74756
|
+
capName: "records",
|
|
74757
|
+
capScope: "system",
|
|
74758
|
+
addonId: null,
|
|
74759
|
+
access: "view"
|
|
74760
|
+
},
|
|
74761
|
+
"records.patch": {
|
|
74762
|
+
capName: "records",
|
|
74763
|
+
capScope: "system",
|
|
74764
|
+
addonId: null,
|
|
74765
|
+
access: "create"
|
|
74766
|
+
},
|
|
74767
|
+
"records.put": {
|
|
74768
|
+
capName: "records",
|
|
74769
|
+
capScope: "system",
|
|
74770
|
+
addonId: null,
|
|
74771
|
+
access: "create"
|
|
74772
|
+
},
|
|
74773
|
+
"records.putMany": {
|
|
74774
|
+
capName: "records",
|
|
74775
|
+
capScope: "system",
|
|
74776
|
+
addonId: null,
|
|
74777
|
+
access: "create"
|
|
74778
|
+
},
|
|
74779
|
+
"records.query": {
|
|
74780
|
+
capName: "records",
|
|
74781
|
+
capScope: "system",
|
|
74782
|
+
addonId: null,
|
|
74783
|
+
access: "view"
|
|
74784
|
+
},
|
|
74785
|
+
"records.secretRefs": {
|
|
74786
|
+
capName: "records",
|
|
74787
|
+
capScope: "system",
|
|
74788
|
+
addonId: null,
|
|
74789
|
+
access: "view"
|
|
74790
|
+
},
|
|
73738
74791
|
"sceneMonitor.captureReference": {
|
|
73739
74792
|
capName: "scene-monitor",
|
|
73740
74793
|
capScope: "device",
|
|
@@ -74167,6 +75220,48 @@ Object.freeze({
|
|
|
74167
75220
|
addonId: null,
|
|
74168
75221
|
access: "create"
|
|
74169
75222
|
},
|
|
75223
|
+
"storageAdmin.adoptRecords": {
|
|
75224
|
+
capName: "storage-admin",
|
|
75225
|
+
capScope: "system",
|
|
75226
|
+
addonId: null,
|
|
75227
|
+
access: "create"
|
|
75228
|
+
},
|
|
75229
|
+
"storageAdmin.dropCollection": {
|
|
75230
|
+
capName: "storage-admin",
|
|
75231
|
+
capScope: "system",
|
|
75232
|
+
addonId: null,
|
|
75233
|
+
access: "delete"
|
|
75234
|
+
},
|
|
75235
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
75236
|
+
capName: "storage-admin",
|
|
75237
|
+
capScope: "system",
|
|
75238
|
+
addonId: null,
|
|
75239
|
+
access: "view"
|
|
75240
|
+
},
|
|
75241
|
+
"storageAdmin.listKinds": {
|
|
75242
|
+
capName: "storage-admin",
|
|
75243
|
+
capScope: "system",
|
|
75244
|
+
addonId: null,
|
|
75245
|
+
access: "view"
|
|
75246
|
+
},
|
|
75247
|
+
"storageAdmin.listTables": {
|
|
75248
|
+
capName: "storage-admin",
|
|
75249
|
+
capScope: "system",
|
|
75250
|
+
addonId: null,
|
|
75251
|
+
access: "view"
|
|
75252
|
+
},
|
|
75253
|
+
"storageAdmin.readLegacyCollection": {
|
|
75254
|
+
capName: "storage-admin",
|
|
75255
|
+
capScope: "system",
|
|
75256
|
+
addonId: null,
|
|
75257
|
+
access: "view"
|
|
75258
|
+
},
|
|
75259
|
+
"storageAdmin.readRecords": {
|
|
75260
|
+
capName: "storage-admin",
|
|
75261
|
+
capScope: "system",
|
|
75262
|
+
addonId: null,
|
|
75263
|
+
access: "view"
|
|
75264
|
+
},
|
|
74170
75265
|
"storageEvictable.evict": {
|
|
74171
75266
|
capName: "storage-evictable",
|
|
74172
75267
|
capScope: "system",
|
|
@@ -75079,6 +76174,12 @@ Object.freeze({
|
|
|
75079
76174
|
addonId: null,
|
|
75080
76175
|
access: "view"
|
|
75081
76176
|
},
|
|
76177
|
+
"userManagement.migrateRawSecrets": {
|
|
76178
|
+
capName: "user-management",
|
|
76179
|
+
capScope: "system",
|
|
76180
|
+
addonId: null,
|
|
76181
|
+
access: "create"
|
|
76182
|
+
},
|
|
75082
76183
|
"userManagement.oauthExchangeCode": {
|
|
75083
76184
|
capName: "user-management",
|
|
75084
76185
|
capScope: "system",
|
|
@@ -75578,7 +76679,7 @@ Object.freeze({
|
|
|
75578
76679
|
access: "create"
|
|
75579
76680
|
}
|
|
75580
76681
|
});
|
|
75581
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder;
|
|
76682
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
75582
76683
|
DeviceFeature.BatteryOperated;
|
|
75583
76684
|
/** Reject after `ms`; always clears its own timer. */
|
|
75584
76685
|
async function withTimeout$1(promise, ms, label) {
|
|
@@ -76620,6 +77721,51 @@ Object.freeze({
|
|
|
76620
77721
|
form: "single",
|
|
76621
77722
|
optional: false
|
|
76622
77723
|
}],
|
|
77724
|
+
"dishwasher.getStatus": [{
|
|
77725
|
+
name: "deviceId",
|
|
77726
|
+
form: "single",
|
|
77727
|
+
optional: false
|
|
77728
|
+
}],
|
|
77729
|
+
"dishwasher.pause": [{
|
|
77730
|
+
name: "deviceId",
|
|
77731
|
+
form: "single",
|
|
77732
|
+
optional: false
|
|
77733
|
+
}],
|
|
77734
|
+
"dishwasher.setHalfLoad": [{
|
|
77735
|
+
name: "deviceId",
|
|
77736
|
+
form: "single",
|
|
77737
|
+
optional: false
|
|
77738
|
+
}],
|
|
77739
|
+
"dishwasher.setHygienePlus": [{
|
|
77740
|
+
name: "deviceId",
|
|
77741
|
+
form: "single",
|
|
77742
|
+
optional: false
|
|
77743
|
+
}],
|
|
77744
|
+
"dishwasher.setOption": [{
|
|
77745
|
+
name: "deviceId",
|
|
77746
|
+
form: "single",
|
|
77747
|
+
optional: false
|
|
77748
|
+
}],
|
|
77749
|
+
"dishwasher.setPower": [{
|
|
77750
|
+
name: "deviceId",
|
|
77751
|
+
form: "single",
|
|
77752
|
+
optional: false
|
|
77753
|
+
}],
|
|
77754
|
+
"dishwasher.setProgram": [{
|
|
77755
|
+
name: "deviceId",
|
|
77756
|
+
form: "single",
|
|
77757
|
+
optional: false
|
|
77758
|
+
}],
|
|
77759
|
+
"dishwasher.start": [{
|
|
77760
|
+
name: "deviceId",
|
|
77761
|
+
form: "single",
|
|
77762
|
+
optional: false
|
|
77763
|
+
}],
|
|
77764
|
+
"dishwasher.stop": [{
|
|
77765
|
+
name: "deviceId",
|
|
77766
|
+
form: "single",
|
|
77767
|
+
optional: false
|
|
77768
|
+
}],
|
|
76623
77769
|
"doorbell.getStatus": [{
|
|
76624
77770
|
name: "deviceId",
|
|
76625
77771
|
form: "single",
|
|
@@ -76689,6 +77835,11 @@ Object.freeze({
|
|
|
76689
77835
|
form: "single",
|
|
76690
77836
|
optional: false
|
|
76691
77837
|
}],
|
|
77838
|
+
"heatingValve.getStatus": [{
|
|
77839
|
+
name: "deviceId",
|
|
77840
|
+
form: "single",
|
|
77841
|
+
optional: false
|
|
77842
|
+
}],
|
|
76692
77843
|
"humidifier.getStatus": [{
|
|
76693
77844
|
name: "deviceId",
|
|
76694
77845
|
form: "single",
|
|
@@ -77973,6 +79124,37 @@ Object.freeze({
|
|
|
77973
79124
|
form: "single",
|
|
77974
79125
|
optional: false
|
|
77975
79126
|
}],
|
|
79127
|
+
"records.count": [{
|
|
79128
|
+
name: "deviceId",
|
|
79129
|
+
form: "single",
|
|
79130
|
+
optional: true
|
|
79131
|
+
}],
|
|
79132
|
+
"records.deleteDevice": [{
|
|
79133
|
+
name: "deviceId",
|
|
79134
|
+
form: "single",
|
|
79135
|
+
optional: false
|
|
79136
|
+
}],
|
|
79137
|
+
"records.deleteWhere": [{
|
|
79138
|
+
name: "deviceId",
|
|
79139
|
+
form: "single",
|
|
79140
|
+
optional: true
|
|
79141
|
+
}],
|
|
79142
|
+
"records.histogram": [{
|
|
79143
|
+
name: "deviceId",
|
|
79144
|
+
form: "single",
|
|
79145
|
+
optional: true
|
|
79146
|
+
}],
|
|
79147
|
+
"records.putMany": [{
|
|
79148
|
+
name: "records",
|
|
79149
|
+
form: "object-array",
|
|
79150
|
+
optional: false,
|
|
79151
|
+
itemField: "deviceId"
|
|
79152
|
+
}],
|
|
79153
|
+
"records.query": [{
|
|
79154
|
+
name: "deviceId",
|
|
79155
|
+
form: "single",
|
|
79156
|
+
optional: true
|
|
79157
|
+
}],
|
|
77976
79158
|
"sceneMonitor.captureReference": [{
|
|
77977
79159
|
name: "deviceId",
|
|
77978
79160
|
form: "single",
|
|
@@ -78089,6 +79271,17 @@ Object.freeze({
|
|
|
78089
79271
|
form: "single",
|
|
78090
79272
|
optional: false
|
|
78091
79273
|
}],
|
|
79274
|
+
"storageAdmin.adoptRecords": [{
|
|
79275
|
+
name: "records",
|
|
79276
|
+
form: "object-array",
|
|
79277
|
+
optional: false,
|
|
79278
|
+
itemField: "deviceId"
|
|
79279
|
+
}],
|
|
79280
|
+
"storageAdmin.readRecords": [{
|
|
79281
|
+
name: "deviceId",
|
|
79282
|
+
form: "single",
|
|
79283
|
+
optional: true
|
|
79284
|
+
}],
|
|
78092
79285
|
"streamBroker.acquireEgressTranscode": [{
|
|
78093
79286
|
name: "deviceId",
|
|
78094
79287
|
form: "single",
|
|
@@ -102195,7 +103388,7 @@ function isMeaningfulIdentifier(s) {
|
|
|
102195
103388
|
var HikvisionProviderAddon = class extends BaseDeviceProvider {
|
|
102196
103389
|
addonId = HIKVISION_ADDON_ID;
|
|
102197
103390
|
providerName = "Hikvision";
|
|
102198
|
-
deviceClasses = { [DeviceType.Camera]: HikvisionCamera };
|
|
103391
|
+
deviceClasses = { [DeviceType.Camera]: widenDeviceConstructor(HikvisionCamera) };
|
|
102199
103392
|
constructor() {
|
|
102200
103393
|
super({});
|
|
102201
103394
|
}
|
|
@@ -102248,7 +103441,7 @@ var HikvisionProviderAddon = class extends BaseDeviceProvider {
|
|
|
102248
103441
|
throw new Error(`Hikvision: ${reason}`);
|
|
102249
103442
|
}
|
|
102250
103443
|
async onInitialize() {
|
|
102251
|
-
const regs = await super.onInitialize();
|
|
103444
|
+
const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
|
|
102252
103445
|
regs.push({
|
|
102253
103446
|
capability: failureContributionCapability,
|
|
102254
103447
|
provider: { list: () => intercomFailureReport.list() }
|