@camstack/addon-provider-velux 0.2.127 → 0.2.129
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 +1627 -134
- package/dist/addon.mjs +1627 -134
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -62,6 +62,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
62
62
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
63
63
|
*/
|
|
64
64
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
65
|
+
/**
|
|
66
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
67
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
68
|
+
* action. One event per refusal.
|
|
69
|
+
*/
|
|
70
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
71
|
+
/**
|
|
72
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
73
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
74
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
75
|
+
*/
|
|
76
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
77
|
+
/**
|
|
78
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
79
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
80
|
+
* alert centre turns it into one critical alert.
|
|
81
|
+
*/
|
|
82
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
83
|
+
/**
|
|
84
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
85
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
86
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
87
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
88
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
89
|
+
* event may be dropped (D8, D11).
|
|
90
|
+
*/
|
|
91
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
65
92
|
EventCategory["AddonError"] = "addon.error";
|
|
66
93
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
67
94
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5386,7 +5413,7 @@ var ZodIssueCode = {
|
|
|
5386
5413
|
var ZodFirstPartyTypeKind;
|
|
5387
5414
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5388
5415
|
//#endregion
|
|
5389
|
-
//#region ../types/dist/sleep-
|
|
5416
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5390
5417
|
/**
|
|
5391
5418
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5392
5419
|
* window to float samples (D455).
|
|
@@ -5503,7 +5530,7 @@ function isKeychainStoredField(field) {
|
|
|
5503
5530
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5504
5531
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5505
5532
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5506
|
-
function isRecord$
|
|
5533
|
+
function isRecord$5(value) {
|
|
5507
5534
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5508
5535
|
}
|
|
5509
5536
|
function makeSecretMarker(ref) {
|
|
@@ -5514,12 +5541,12 @@ function makeSecretMarker(ref) {
|
|
|
5514
5541
|
}
|
|
5515
5542
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5516
5543
|
function isSecretMarker(value) {
|
|
5517
|
-
if (!isRecord$
|
|
5544
|
+
if (!isRecord$5(value)) return false;
|
|
5518
5545
|
const ref = value["$secret"];
|
|
5519
5546
|
return typeof ref === "string" && ref.length > 0;
|
|
5520
5547
|
}
|
|
5521
5548
|
function isSecretClear(value) {
|
|
5522
|
-
return isRecord$
|
|
5549
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5523
5550
|
}
|
|
5524
5551
|
/**
|
|
5525
5552
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6129,7 +6156,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6129
6156
|
}
|
|
6130
6157
|
};
|
|
6131
6158
|
var KEEP = { kind: "keep" };
|
|
6132
|
-
function isRecord$
|
|
6159
|
+
function isRecord$4(value) {
|
|
6133
6160
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6134
6161
|
}
|
|
6135
6162
|
function defaultMintId() {
|
|
@@ -6142,7 +6169,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6142
6169
|
return out;
|
|
6143
6170
|
}
|
|
6144
6171
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6145
|
-
else if (isRecord$
|
|
6172
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6146
6173
|
return out;
|
|
6147
6174
|
}
|
|
6148
6175
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6197,7 +6224,7 @@ function rowId(row, idKey) {
|
|
|
6197
6224
|
return null;
|
|
6198
6225
|
}
|
|
6199
6226
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6200
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6227
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6201
6228
|
if (!Array.isArray(incoming)) {
|
|
6202
6229
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6203
6230
|
return {
|
|
@@ -6213,7 +6240,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6213
6240
|
const kept = /* @__PURE__ */ new Set();
|
|
6214
6241
|
const rows = [];
|
|
6215
6242
|
for (const row of incoming) {
|
|
6216
|
-
if (!isRecord$
|
|
6243
|
+
if (!isRecord$4(row)) {
|
|
6217
6244
|
rows.push(row);
|
|
6218
6245
|
continue;
|
|
6219
6246
|
}
|
|
@@ -6238,7 +6265,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6238
6265
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6239
6266
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6240
6267
|
case "object": {
|
|
6241
|
-
if (!isRecord$
|
|
6268
|
+
if (!isRecord$4(incoming)) {
|
|
6242
6269
|
if (incoming === void 0) return KEEP;
|
|
6243
6270
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6244
6271
|
return {
|
|
@@ -6246,7 +6273,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6246
6273
|
value: incoming
|
|
6247
6274
|
};
|
|
6248
6275
|
}
|
|
6249
|
-
const storedObj = isRecord$
|
|
6276
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6250
6277
|
return {
|
|
6251
6278
|
kind: "value",
|
|
6252
6279
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6369,7 +6396,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6369
6396
|
value: items
|
|
6370
6397
|
};
|
|
6371
6398
|
}
|
|
6372
|
-
if (isRecord$
|
|
6399
|
+
if (isRecord$4(v)) {
|
|
6373
6400
|
const out = {};
|
|
6374
6401
|
for (const [k, child] of Object.entries(v)) {
|
|
6375
6402
|
const s = substitute(child);
|
|
@@ -6401,7 +6428,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6401
6428
|
this.name = "SecretOverwriteRefusedError";
|
|
6402
6429
|
}
|
|
6403
6430
|
};
|
|
6404
|
-
function isRecord(value) {
|
|
6431
|
+
function isRecord$3(value) {
|
|
6405
6432
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6406
6433
|
}
|
|
6407
6434
|
function resolvedValue(pass, marker) {
|
|
@@ -6430,7 +6457,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6430
6457
|
return incoming.map((item, index) => {
|
|
6431
6458
|
const twin = stored[index];
|
|
6432
6459
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6433
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6460
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6434
6461
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6435
6462
|
return item;
|
|
6436
6463
|
});
|
|
@@ -6441,7 +6468,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6441
6468
|
const twin = stored[key];
|
|
6442
6469
|
if (isSecretMarker(twin)) {
|
|
6443
6470
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6444
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6471
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6445
6472
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6446
6473
|
}
|
|
6447
6474
|
return out;
|
|
@@ -6449,7 +6476,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6449
6476
|
async function walk(pass, incoming, stored) {
|
|
6450
6477
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6451
6478
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6452
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6479
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6453
6480
|
const out = { ...incoming };
|
|
6454
6481
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6455
6482
|
return out;
|
|
@@ -6480,7 +6507,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6480
6507
|
function isJsonEqual(a, b) {
|
|
6481
6508
|
if (Object.is(a, b)) return true;
|
|
6482
6509
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6483
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6510
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6484
6511
|
const keys = Object.keys(a);
|
|
6485
6512
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6486
6513
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6504,7 +6531,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6504
6531
|
}
|
|
6505
6532
|
function nodeFromStored(value, owner) {
|
|
6506
6533
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6507
|
-
if (!isRecord(value)) return null;
|
|
6534
|
+
if (!isRecord$3(value)) return null;
|
|
6508
6535
|
const children = /* @__PURE__ */ new Map();
|
|
6509
6536
|
for (const [key, child] of Object.entries(value)) {
|
|
6510
6537
|
const node = nodeFromStored(child, owner);
|
|
@@ -6637,7 +6664,6 @@ function createHandle(raw, opts) {
|
|
|
6637
6664
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6638
6665
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6639
6666
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6640
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6641
6667
|
const overrides = {
|
|
6642
6668
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6643
6669
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6661,12 +6687,12 @@ function createHandle(raw, opts) {
|
|
|
6661
6687
|
};
|
|
6662
6688
|
} } : {},
|
|
6663
6689
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6664
|
-
|
|
6665
|
-
const rows = await readDeviceStoreBatch
|
|
6690
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6691
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6666
6692
|
const out = /* @__PURE__ */ new Map();
|
|
6667
6693
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6668
6694
|
return out;
|
|
6669
|
-
}
|
|
6695
|
+
},
|
|
6670
6696
|
writeAddonStore: async (patch) => {
|
|
6671
6697
|
await writeAddon(patch);
|
|
6672
6698
|
},
|
|
@@ -7293,7 +7319,7 @@ var BaseAddon = class {
|
|
|
7293
7319
|
if (!ctx) return;
|
|
7294
7320
|
const addonId = ctx.id;
|
|
7295
7321
|
setImmediate(() => {
|
|
7296
|
-
ctx.api.addons
|
|
7322
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7297
7323
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7298
7324
|
}).catch((err) => {
|
|
7299
7325
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7493,7 +7519,7 @@ var BaseAddon = class {
|
|
|
7493
7519
|
return this._addonSecretTree;
|
|
7494
7520
|
}
|
|
7495
7521
|
deviceSecretTree() {
|
|
7496
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7522
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7497
7523
|
return this._deviceSecretTree;
|
|
7498
7524
|
}
|
|
7499
7525
|
/**
|
|
@@ -7569,42 +7595,135 @@ var BaseAddon = class {
|
|
|
7569
7595
|
this[timerOf] = timer;
|
|
7570
7596
|
}
|
|
7571
7597
|
/**
|
|
7572
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7573
|
-
*
|
|
7574
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7575
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7598
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7599
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7576
7600
|
* addon permanently broken.
|
|
7577
7601
|
*
|
|
7578
|
-
*
|
|
7579
|
-
*
|
|
7580
|
-
* `
|
|
7602
|
+
* Two kinds of outage, two budgets:
|
|
7603
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7604
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7605
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7606
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7607
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7608
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7609
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7610
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7611
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7612
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7581
7613
|
*/
|
|
7582
7614
|
async readAddonStoreWithRetry() {
|
|
7583
7615
|
const settings = this.rawSettings();
|
|
7584
7616
|
if (!settings) return {};
|
|
7585
|
-
const delaysMs = [
|
|
7586
|
-
150,
|
|
7587
|
-
350,
|
|
7588
|
-
600,
|
|
7589
|
-
900
|
|
7590
|
-
];
|
|
7591
7617
|
let lastErr;
|
|
7592
|
-
for (let attempt = 0
|
|
7618
|
+
for (let attempt = 0;; attempt++) try {
|
|
7593
7619
|
const stored = await settings.readAddonStore() ?? {};
|
|
7594
7620
|
this.settingsStoreReady = true;
|
|
7595
7621
|
return stored;
|
|
7596
7622
|
} catch (err) {
|
|
7597
7623
|
lastErr = err;
|
|
7598
|
-
const
|
|
7599
|
-
if (
|
|
7600
|
-
|
|
7601
|
-
|
|
7624
|
+
const kind = classifyStoreError(err);
|
|
7625
|
+
if (kind === "permanent") throw err;
|
|
7626
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7627
|
+
if (delay === void 0) {
|
|
7628
|
+
if (kind === "transport") throw err;
|
|
7629
|
+
break;
|
|
7630
|
+
}
|
|
7631
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7602
7632
|
}
|
|
7603
7633
|
this.settingsStoreReady = false;
|
|
7604
7634
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7605
7635
|
return {};
|
|
7606
7636
|
}
|
|
7607
7637
|
};
|
|
7638
|
+
/** The settings store's own restart fingerprints. */
|
|
7639
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7640
|
+
150,
|
|
7641
|
+
350,
|
|
7642
|
+
600,
|
|
7643
|
+
900
|
|
7644
|
+
];
|
|
7645
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7646
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7647
|
+
150,
|
|
7648
|
+
350,
|
|
7649
|
+
600,
|
|
7650
|
+
900,
|
|
7651
|
+
2e3,
|
|
7652
|
+
5e3,
|
|
7653
|
+
1e4,
|
|
7654
|
+
2e4,
|
|
7655
|
+
3e4,
|
|
7656
|
+
3e4
|
|
7657
|
+
];
|
|
7658
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7659
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7660
|
+
var TRANSPORT_CODES = new Set([
|
|
7661
|
+
"ECONNREFUSED",
|
|
7662
|
+
"ECONNRESET",
|
|
7663
|
+
"ETIMEDOUT",
|
|
7664
|
+
"EPIPE",
|
|
7665
|
+
"EHOSTUNREACH",
|
|
7666
|
+
"ENETUNREACH"
|
|
7667
|
+
]);
|
|
7668
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7669
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7670
|
+
"TIMEOUT",
|
|
7671
|
+
"SERVICE_UNAVAILABLE",
|
|
7672
|
+
"BAD_GATEWAY",
|
|
7673
|
+
"GATEWAY_TIMEOUT"
|
|
7674
|
+
]);
|
|
7675
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7676
|
+
var TRANSPORT_PHRASES = [
|
|
7677
|
+
"discovery deadline exceeded",
|
|
7678
|
+
"parent could not route child unowned cap call",
|
|
7679
|
+
"UDS request timed out after",
|
|
7680
|
+
"channel closed"
|
|
7681
|
+
];
|
|
7682
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7683
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7684
|
+
"REQUEST_TIMEOUT",
|
|
7685
|
+
"SERVICE_NOT_FOUND",
|
|
7686
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7687
|
+
"REQUEST_REJECTED",
|
|
7688
|
+
"BROKER_DISCONNECTED"
|
|
7689
|
+
]);
|
|
7690
|
+
function stringProp(value, key) {
|
|
7691
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7692
|
+
const found = Reflect.get(value, key);
|
|
7693
|
+
return typeof found === "string" ? found : void 0;
|
|
7694
|
+
}
|
|
7695
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7696
|
+
function errorCode(err) {
|
|
7697
|
+
const out = {};
|
|
7698
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7699
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7700
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7701
|
+
if (node !== void 0) out.node = node;
|
|
7702
|
+
const trpc = stringProp(data, "code");
|
|
7703
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7704
|
+
return out;
|
|
7705
|
+
}
|
|
7706
|
+
/**
|
|
7707
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7708
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7709
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7710
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7711
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7712
|
+
*/
|
|
7713
|
+
function classifyStoreError(err) {
|
|
7714
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7715
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7716
|
+
const code = errorCode(err);
|
|
7717
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7718
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7719
|
+
if (typeof err === "object" && err !== null) {
|
|
7720
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7721
|
+
const type = stringProp(err, "type");
|
|
7722
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7723
|
+
}
|
|
7724
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7725
|
+
return "permanent";
|
|
7726
|
+
}
|
|
7608
7727
|
/**
|
|
7609
7728
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7610
7729
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7694,6 +7813,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7694
7813
|
*/
|
|
7695
7814
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7696
7815
|
});
|
|
7816
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7817
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7818
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7819
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7820
|
+
var RECORD_CLASSES = [
|
|
7821
|
+
"config",
|
|
7822
|
+
"ledger",
|
|
7823
|
+
"audit",
|
|
7824
|
+
"mirror",
|
|
7825
|
+
"ephemeral"
|
|
7826
|
+
];
|
|
7827
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7828
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7829
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7830
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7831
|
+
function defOf(schema) {
|
|
7832
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7833
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7834
|
+
const def = Reflect.get(zodBag, "def");
|
|
7835
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7836
|
+
return def;
|
|
7837
|
+
}
|
|
7838
|
+
function declaredHere(schema) {
|
|
7839
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7840
|
+
}
|
|
7841
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7842
|
+
var WRAPPERS = new Set([
|
|
7843
|
+
"optional",
|
|
7844
|
+
"nullable",
|
|
7845
|
+
"default",
|
|
7846
|
+
"prefault",
|
|
7847
|
+
"catch",
|
|
7848
|
+
"readonly",
|
|
7849
|
+
"nonoptional"
|
|
7850
|
+
]);
|
|
7851
|
+
/**
|
|
7852
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7853
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7854
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7855
|
+
* `.transform` on `in`).
|
|
7856
|
+
*/
|
|
7857
|
+
function layersOf(schema) {
|
|
7858
|
+
const out = [];
|
|
7859
|
+
const queue = [schema];
|
|
7860
|
+
while (queue.length > 0) {
|
|
7861
|
+
const s = queue.shift();
|
|
7862
|
+
if (!s || out.includes(s)) continue;
|
|
7863
|
+
out.push(s);
|
|
7864
|
+
const def = defOf(s);
|
|
7865
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7866
|
+
if (def.type === "pipe") {
|
|
7867
|
+
if (def.in) queue.push(def.in);
|
|
7868
|
+
if (def.out) queue.push(def.out);
|
|
7869
|
+
}
|
|
7870
|
+
}
|
|
7871
|
+
return out;
|
|
7872
|
+
}
|
|
7873
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7874
|
+
function isZodSecret(schema) {
|
|
7875
|
+
return layersOf(schema).some(declaredHere);
|
|
7876
|
+
}
|
|
7877
|
+
/**
|
|
7878
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7879
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7880
|
+
* object or array is reported as one path and not descended into — everything
|
|
7881
|
+
* under it is secret.
|
|
7882
|
+
*/
|
|
7883
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7884
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7885
|
+
const paths = [];
|
|
7886
|
+
for (const layer of layersOf(schema)) {
|
|
7887
|
+
const def = defOf(layer);
|
|
7888
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7889
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7890
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7891
|
+
else if (def.type === "intersection") {
|
|
7892
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7893
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7894
|
+
}
|
|
7895
|
+
}
|
|
7896
|
+
return [...new Set(paths)];
|
|
7897
|
+
}
|
|
7898
|
+
/**
|
|
7899
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7900
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7901
|
+
* JSON the engine stores.
|
|
7902
|
+
*
|
|
7903
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7904
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7905
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7906
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7907
|
+
* never a field name (D879).
|
|
7908
|
+
*/
|
|
7909
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7910
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7911
|
+
var RecordIndexSchema = object({
|
|
7912
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7913
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7914
|
+
unique: boolean().optional()
|
|
7915
|
+
}).strict();
|
|
7916
|
+
var RecordRetentionSchema = union([
|
|
7917
|
+
object({
|
|
7918
|
+
ttlMs: number().int().positive(),
|
|
7919
|
+
from: _enum(["at", "write"])
|
|
7920
|
+
}).strict(),
|
|
7921
|
+
object({
|
|
7922
|
+
maxRows: number().int().positive().optional(),
|
|
7923
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7924
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7925
|
+
object({
|
|
7926
|
+
owner: string().min(1),
|
|
7927
|
+
reason: string().min(1)
|
|
7928
|
+
}).strict(),
|
|
7929
|
+
object({ none: string().min(1) }).strict()
|
|
7930
|
+
]);
|
|
7931
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7932
|
+
var EntryDescriptorSchema = object({
|
|
7933
|
+
title: string().min(1),
|
|
7934
|
+
/** The record body field shown as the entry's name. */
|
|
7935
|
+
nameField: string().min(1),
|
|
7936
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7937
|
+
fields: record(string(), unknown())
|
|
7938
|
+
}).strict();
|
|
7939
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7940
|
+
var RecordKindDeclarationSchema = object({
|
|
7941
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7942
|
+
class: _enum(RECORD_CLASSES),
|
|
7943
|
+
writeTrigger: string().min(1),
|
|
7944
|
+
device: _enum([
|
|
7945
|
+
"required",
|
|
7946
|
+
"optional",
|
|
7947
|
+
"none"
|
|
7948
|
+
]).default("none"),
|
|
7949
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7950
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7951
|
+
retention: RecordRetentionSchema,
|
|
7952
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7953
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7954
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7955
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7956
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7957
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7958
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7959
|
+
adoptsFrom: string().min(1).optional(),
|
|
7960
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7961
|
+
transactFamily: string().min(1).optional(),
|
|
7962
|
+
entry: EntryDescriptorSchema.optional()
|
|
7963
|
+
}).strict();
|
|
7964
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7965
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7697
7966
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7698
7967
|
var CamProfileSchema = _enum([
|
|
7699
7968
|
"high",
|
|
@@ -8158,69 +8427,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8158
8427
|
kind: "mutation",
|
|
8159
8428
|
auth: "admin"
|
|
8160
8429
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8161
|
-
function defOf(schema) {
|
|
8162
|
-
return schema._zod?.def ?? {};
|
|
8163
|
-
}
|
|
8164
|
-
function declaredHere(schema) {
|
|
8165
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8166
|
-
}
|
|
8167
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8168
|
-
var WRAPPERS = new Set([
|
|
8169
|
-
"optional",
|
|
8170
|
-
"nullable",
|
|
8171
|
-
"default",
|
|
8172
|
-
"prefault",
|
|
8173
|
-
"catch",
|
|
8174
|
-
"readonly",
|
|
8175
|
-
"nonoptional"
|
|
8176
|
-
]);
|
|
8177
|
-
/**
|
|
8178
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8179
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8180
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8181
|
-
* `.transform` on `in`).
|
|
8182
|
-
*/
|
|
8183
|
-
function layersOf(schema) {
|
|
8184
|
-
const out = [];
|
|
8185
|
-
const queue = [schema];
|
|
8186
|
-
while (queue.length > 0) {
|
|
8187
|
-
const s = queue.shift();
|
|
8188
|
-
if (!s || out.includes(s)) continue;
|
|
8189
|
-
out.push(s);
|
|
8190
|
-
const def = defOf(s);
|
|
8191
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8192
|
-
if (def.type === "pipe") {
|
|
8193
|
-
if (def.in) queue.push(def.in);
|
|
8194
|
-
if (def.out) queue.push(def.out);
|
|
8195
|
-
}
|
|
8196
|
-
}
|
|
8197
|
-
return out;
|
|
8198
|
-
}
|
|
8199
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8200
|
-
function isZodSecret(schema) {
|
|
8201
|
-
return layersOf(schema).some(declaredHere);
|
|
8202
|
-
}
|
|
8203
|
-
/**
|
|
8204
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8205
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8206
|
-
* object or array is reported as one path and not descended into — everything
|
|
8207
|
-
* under it is secret.
|
|
8208
|
-
*/
|
|
8209
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8210
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8211
|
-
const paths = [];
|
|
8212
|
-
for (const layer of layersOf(schema)) {
|
|
8213
|
-
const def = defOf(layer);
|
|
8214
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8215
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8216
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8217
|
-
else if (def.type === "intersection") {
|
|
8218
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8219
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8220
|
-
}
|
|
8221
|
-
}
|
|
8222
|
-
return [...new Set(paths)];
|
|
8223
|
-
}
|
|
8224
8430
|
object({
|
|
8225
8431
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8226
8432
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8240,7 +8446,7 @@ function userError(code, params, englishFallback) {
|
|
|
8240
8446
|
return new CamstackError(code, params, englishFallback);
|
|
8241
8447
|
}
|
|
8242
8448
|
//#endregion
|
|
8243
|
-
//#region ../types/dist/err-msg-
|
|
8449
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8244
8450
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8245
8451
|
DeviceType["Camera"] = "camera";
|
|
8246
8452
|
DeviceType["Hub"] = "hub";
|
|
@@ -8332,6 +8538,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8332
8538
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8333
8539
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8334
8540
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8541
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8542
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8543
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8544
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8335
8545
|
return DeviceType;
|
|
8336
8546
|
}({});
|
|
8337
8547
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8509,6 +8719,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8509
8719
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8510
8720
|
* real Switch device for UI rendering / export adapters. */
|
|
8511
8721
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8722
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8723
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8724
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8512
8725
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8513
8726
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8514
8727
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8586,7 +8799,7 @@ function errMsg(err) {
|
|
|
8586
8799
|
return String(err);
|
|
8587
8800
|
}
|
|
8588
8801
|
//#endregion
|
|
8589
|
-
//#region ../types/dist/composition-
|
|
8802
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8590
8803
|
/**
|
|
8591
8804
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8592
8805
|
*
|
|
@@ -11790,11 +12003,10 @@ var ClipModelMetaSchema = object({
|
|
|
11790
12003
|
/**
|
|
11791
12004
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11792
12005
|
* per index: two models share an index only when their vectors are ranked
|
|
11793
|
-
* against each other, which for CLIP means never across families.
|
|
11794
|
-
*
|
|
11795
|
-
* `modelId`); any other model gets its own.
|
|
12006
|
+
* against each other, which for CLIP means never across families. Every
|
|
12007
|
+
* model gets its own.
|
|
11796
12008
|
*/
|
|
11797
|
-
vectorIndex: string().regex(/^object-clip
|
|
12009
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11798
12010
|
/**
|
|
11799
12011
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11800
12012
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -12973,8 +13185,20 @@ var AlertSeveritySchema = _enum([
|
|
|
12973
13185
|
"info",
|
|
12974
13186
|
"success",
|
|
12975
13187
|
"warning",
|
|
12976
|
-
"error"
|
|
13188
|
+
"error",
|
|
13189
|
+
"critical"
|
|
12977
13190
|
]);
|
|
13191
|
+
var AlertActionSchema = object({
|
|
13192
|
+
label: string(),
|
|
13193
|
+
href: string().optional(),
|
|
13194
|
+
/**
|
|
13195
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13196
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13197
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13198
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13199
|
+
*/
|
|
13200
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13201
|
+
});
|
|
12978
13202
|
var AlertStatusSchema = _enum([
|
|
12979
13203
|
"active",
|
|
12980
13204
|
"in-progress",
|
|
@@ -12992,6 +13216,7 @@ var AlertSchema = object({
|
|
|
12992
13216
|
severity: AlertSeveritySchema,
|
|
12993
13217
|
title: string(),
|
|
12994
13218
|
message: string(),
|
|
13219
|
+
action: AlertActionSchema.optional(),
|
|
12995
13220
|
status: AlertStatusSchema,
|
|
12996
13221
|
progress: number().optional(),
|
|
12997
13222
|
read: boolean(),
|
|
@@ -15527,6 +15752,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15527
15752
|
keyField: string()
|
|
15528
15753
|
}).optional()
|
|
15529
15754
|
})) });
|
|
15755
|
+
/**
|
|
15756
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
15757
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
15758
|
+
*
|
|
15759
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
15760
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
15761
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
15762
|
+
*/
|
|
15763
|
+
var RawSecretMigrationInputSchema = object({
|
|
15764
|
+
/** `false` (the default of the script) = report only. */
|
|
15765
|
+
apply: boolean() });
|
|
15766
|
+
var RawSecretMigrationReportSchema = object({
|
|
15767
|
+
apply: boolean(),
|
|
15768
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
15769
|
+
rows: number().int(),
|
|
15770
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
15771
|
+
raw: number().int(),
|
|
15772
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
15773
|
+
markers: number().int(),
|
|
15774
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
15775
|
+
migrated: number().int(),
|
|
15776
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
15777
|
+
failed: number().int(),
|
|
15778
|
+
/** After the run: rows still holding plaintext. */
|
|
15779
|
+
remainingRaw: number().int(),
|
|
15780
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
15781
|
+
unresolvedMarkers: number().int(),
|
|
15782
|
+
/**
|
|
15783
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
15784
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
15785
|
+
*/
|
|
15786
|
+
redundantCopies: number().int().optional(),
|
|
15787
|
+
/** True when nothing is raw and every marker resolves. */
|
|
15788
|
+
verified: boolean()
|
|
15789
|
+
});
|
|
15530
15790
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15531
15791
|
* agent is the reason placement is not fixed to the hub. */
|
|
15532
15792
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15753,6 +16013,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15753
16013
|
}), SettingsUpdateResultSchema, {
|
|
15754
16014
|
kind: "mutation",
|
|
15755
16015
|
auth: "admin"
|
|
16016
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16017
|
+
kind: "mutation",
|
|
16018
|
+
auth: "admin"
|
|
15756
16019
|
}), method(object({}), object({ libs: array(object({
|
|
15757
16020
|
filePath: string(),
|
|
15758
16021
|
content: string()
|
|
@@ -16016,6 +16279,347 @@ id: union([string(), number()]) }), {
|
|
|
16016
16279
|
auth: "admin"
|
|
16017
16280
|
});
|
|
16018
16281
|
/**
|
|
16282
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16283
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16284
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16285
|
+
*
|
|
16286
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16287
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16288
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16289
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16290
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16291
|
+
* addons go through the owner's capability.
|
|
16292
|
+
*
|
|
16293
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16294
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16295
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16296
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16297
|
+
* row's own ref.
|
|
16298
|
+
*
|
|
16299
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16300
|
+
*/
|
|
16301
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16302
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16303
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16304
|
+
var RecordInputSchema = object({
|
|
16305
|
+
id: RecordIdSchema,
|
|
16306
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16307
|
+
deviceId: number().int().optional(),
|
|
16308
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16309
|
+
at: number().int().optional(),
|
|
16310
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16311
|
+
expiresAt: number().int().optional(),
|
|
16312
|
+
data: RecordBodySchema
|
|
16313
|
+
});
|
|
16314
|
+
var RecordViewSchema = object({
|
|
16315
|
+
id: string(),
|
|
16316
|
+
deviceId: number().int().nullable(),
|
|
16317
|
+
at: number().nullable(),
|
|
16318
|
+
expiresAt: number().nullable(),
|
|
16319
|
+
rev: number().int(),
|
|
16320
|
+
updatedAt: number(),
|
|
16321
|
+
data: RecordBodySchema
|
|
16322
|
+
});
|
|
16323
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16324
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16325
|
+
string(),
|
|
16326
|
+
number(),
|
|
16327
|
+
boolean(),
|
|
16328
|
+
object({ in: array(union([
|
|
16329
|
+
string(),
|
|
16330
|
+
number(),
|
|
16331
|
+
boolean()
|
|
16332
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16333
|
+
object({
|
|
16334
|
+
gt: union([string(), number()]).optional(),
|
|
16335
|
+
gte: union([string(), number()]).optional(),
|
|
16336
|
+
lt: union([string(), number()]).optional(),
|
|
16337
|
+
lte: union([string(), number()]).optional()
|
|
16338
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16339
|
+
]));
|
|
16340
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16341
|
+
var TimeWindowShape = {
|
|
16342
|
+
deviceId: number().int().optional(),
|
|
16343
|
+
atFrom: number().optional(),
|
|
16344
|
+
atTo: number().optional()
|
|
16345
|
+
};
|
|
16346
|
+
var RecordQueryInputSchema = object({
|
|
16347
|
+
...KindShape,
|
|
16348
|
+
...TimeWindowShape,
|
|
16349
|
+
where: RecordWhereSchema.optional(),
|
|
16350
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16351
|
+
order: _enum(["at", "id"]).optional(),
|
|
16352
|
+
desc: boolean().optional(),
|
|
16353
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16354
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16355
|
+
cursor: string().min(1).optional()
|
|
16356
|
+
});
|
|
16357
|
+
var RecordQueryResultSchema = object({
|
|
16358
|
+
records: array(RecordViewSchema),
|
|
16359
|
+
nextCursor: string().nullable()
|
|
16360
|
+
});
|
|
16361
|
+
var RecordKindStateSchema = _enum([
|
|
16362
|
+
"created",
|
|
16363
|
+
"unchanged",
|
|
16364
|
+
"updated"
|
|
16365
|
+
]);
|
|
16366
|
+
var DeclareKindResultSchema = object({
|
|
16367
|
+
kindId: number().int(),
|
|
16368
|
+
state: RecordKindStateSchema,
|
|
16369
|
+
createdIndexes: array(string()),
|
|
16370
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16371
|
+
adoptionPending: object({
|
|
16372
|
+
legacyTable: string(),
|
|
16373
|
+
legacyRows: number().int()
|
|
16374
|
+
}).nullable()
|
|
16375
|
+
});
|
|
16376
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16377
|
+
var SecretRefsList = array(string());
|
|
16378
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16379
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16380
|
+
kind: "mutation",
|
|
16381
|
+
auth: "admin"
|
|
16382
|
+
}), method(object({
|
|
16383
|
+
...KindShape,
|
|
16384
|
+
id: RecordIdSchema
|
|
16385
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16386
|
+
...KindShape,
|
|
16387
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16388
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16389
|
+
...KindShape,
|
|
16390
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16391
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16392
|
+
...KindShape,
|
|
16393
|
+
record: RecordInputSchema,
|
|
16394
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16395
|
+
ifRev: number().int().min(0).optional()
|
|
16396
|
+
}), object({
|
|
16397
|
+
rev: number().int(),
|
|
16398
|
+
releasedRefs: SecretRefsList
|
|
16399
|
+
}), {
|
|
16400
|
+
kind: "mutation",
|
|
16401
|
+
auth: "admin"
|
|
16402
|
+
}), method(object({
|
|
16403
|
+
...KindShape,
|
|
16404
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16405
|
+
}), object({
|
|
16406
|
+
count: number().int(),
|
|
16407
|
+
releasedRefs: SecretRefsList
|
|
16408
|
+
}), {
|
|
16409
|
+
kind: "mutation",
|
|
16410
|
+
auth: "admin"
|
|
16411
|
+
}), method(object({
|
|
16412
|
+
...KindShape,
|
|
16413
|
+
id: RecordIdSchema,
|
|
16414
|
+
data: RecordBodySchema,
|
|
16415
|
+
at: number().int().nullable().optional(),
|
|
16416
|
+
expiresAt: number().int().nullable().optional(),
|
|
16417
|
+
ifRev: number().int().min(1).optional()
|
|
16418
|
+
}), object({
|
|
16419
|
+
rev: number().int(),
|
|
16420
|
+
releasedRefs: SecretRefsList
|
|
16421
|
+
}), {
|
|
16422
|
+
kind: "mutation",
|
|
16423
|
+
auth: "admin"
|
|
16424
|
+
}), method(object({
|
|
16425
|
+
...KindShape,
|
|
16426
|
+
id: RecordIdSchema
|
|
16427
|
+
}), object({
|
|
16428
|
+
deleted: boolean(),
|
|
16429
|
+
secretRefs: SecretRefsList
|
|
16430
|
+
}), {
|
|
16431
|
+
kind: "mutation",
|
|
16432
|
+
auth: "admin"
|
|
16433
|
+
}), method(object({
|
|
16434
|
+
...KindShape,
|
|
16435
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16436
|
+
}), object({
|
|
16437
|
+
deleted: number().int(),
|
|
16438
|
+
secretRefs: SecretRefsList
|
|
16439
|
+
}), {
|
|
16440
|
+
kind: "mutation",
|
|
16441
|
+
auth: "admin"
|
|
16442
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16443
|
+
...KindShape,
|
|
16444
|
+
...TimeWindowShape,
|
|
16445
|
+
where: RecordWhereSchema.optional()
|
|
16446
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
16447
|
+
...KindShape,
|
|
16448
|
+
deviceId: number().int().optional(),
|
|
16449
|
+
from: number(),
|
|
16450
|
+
to: number(),
|
|
16451
|
+
bucketMs: number().int().positive()
|
|
16452
|
+
}), object({ buckets: array(object({
|
|
16453
|
+
bucketStart: number(),
|
|
16454
|
+
count: number().int()
|
|
16455
|
+
})) }), { auth: "admin" }), method(object({
|
|
16456
|
+
...KindShape,
|
|
16457
|
+
op: _enum([
|
|
16458
|
+
"sum",
|
|
16459
|
+
"min",
|
|
16460
|
+
"max",
|
|
16461
|
+
"count"
|
|
16462
|
+
]),
|
|
16463
|
+
field: RecordFieldPathSchema.optional(),
|
|
16464
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
16465
|
+
where: RecordWhereSchema.optional()
|
|
16466
|
+
}), object({ rows: array(object({
|
|
16467
|
+
group: union([
|
|
16468
|
+
string(),
|
|
16469
|
+
number(),
|
|
16470
|
+
_null()
|
|
16471
|
+
]),
|
|
16472
|
+
value: number().nullable()
|
|
16473
|
+
})) }), { auth: "admin" }), method(object({
|
|
16474
|
+
...KindShape,
|
|
16475
|
+
deviceId: number().int().optional(),
|
|
16476
|
+
atBefore: number().optional(),
|
|
16477
|
+
where: RecordWhereSchema.optional()
|
|
16478
|
+
}), object({
|
|
16479
|
+
deleted: number().int(),
|
|
16480
|
+
secretRefs: SecretRefsList
|
|
16481
|
+
}), {
|
|
16482
|
+
kind: "mutation",
|
|
16483
|
+
auth: "admin"
|
|
16484
|
+
}), method(object({
|
|
16485
|
+
deviceId: number().int(),
|
|
16486
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
16487
|
+
}), object({
|
|
16488
|
+
deleted: record(string(), number().int()),
|
|
16489
|
+
secretRefs: SecretRefsList
|
|
16490
|
+
}), {
|
|
16491
|
+
kind: "mutation",
|
|
16492
|
+
auth: "admin"
|
|
16493
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
16494
|
+
kind: "mutation",
|
|
16495
|
+
auth: "admin"
|
|
16496
|
+
});
|
|
16497
|
+
/** One table of the settings database. */
|
|
16498
|
+
var StorageTableSchema = object({
|
|
16499
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
16500
|
+
name: string(),
|
|
16501
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
16502
|
+
owner: string().nullable(),
|
|
16503
|
+
rows: number().int().nonnegative(),
|
|
16504
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
16505
|
+
bytes: number().int().nonnegative().nullable(),
|
|
16506
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
16507
|
+
declaredThisBoot: boolean()
|
|
16508
|
+
});
|
|
16509
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
16510
|
+
var StorageKindSchema = object({
|
|
16511
|
+
owner: string(),
|
|
16512
|
+
kind: string(),
|
|
16513
|
+
database: _enum(["settings", "events"]),
|
|
16514
|
+
class: string(),
|
|
16515
|
+
state: _enum([
|
|
16516
|
+
"declared",
|
|
16517
|
+
"orphaned",
|
|
16518
|
+
"dropped"
|
|
16519
|
+
]),
|
|
16520
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
16521
|
+
rows: number().int().nonnegative().nullable(),
|
|
16522
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
16523
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
16524
|
+
writeTrigger: string(),
|
|
16525
|
+
retention: RecordRetentionSchema,
|
|
16526
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
16527
|
+
entry: boolean(),
|
|
16528
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
16529
|
+
declaration: RecordKindDeclarationSchema
|
|
16530
|
+
});
|
|
16531
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
16532
|
+
collection: string().min(1),
|
|
16533
|
+
expectRows: number().int().nonnegative()
|
|
16534
|
+
}), object({
|
|
16535
|
+
dropped: literal(true),
|
|
16536
|
+
rows: number().int().nonnegative()
|
|
16537
|
+
}), {
|
|
16538
|
+
kind: "mutation",
|
|
16539
|
+
auth: "admin"
|
|
16540
|
+
}), method(object({
|
|
16541
|
+
owner: string().min(1).optional(),
|
|
16542
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
16543
|
+
counts: boolean().optional()
|
|
16544
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
16545
|
+
owner: string().min(1),
|
|
16546
|
+
kind: RecordKindNameSchema
|
|
16547
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16548
|
+
owner: string().min(1),
|
|
16549
|
+
kind: RecordKindNameSchema,
|
|
16550
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
16551
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
16552
|
+
complete: boolean().optional()
|
|
16553
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
16554
|
+
kind: "mutation",
|
|
16555
|
+
auth: "admin"
|
|
16556
|
+
}), method(object({
|
|
16557
|
+
collection: string().min(1),
|
|
16558
|
+
cursor: string().optional(),
|
|
16559
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
16560
|
+
}), object({
|
|
16561
|
+
rows: array(object({
|
|
16562
|
+
id: string(),
|
|
16563
|
+
data: record(string(), unknown())
|
|
16564
|
+
})),
|
|
16565
|
+
nextCursor: string().nullable()
|
|
16566
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
16567
|
+
/**
|
|
16568
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
16569
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
16570
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
16571
|
+
*
|
|
16572
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
16573
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
16574
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
16575
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
16576
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
16577
|
+
* a secret value, and a locked keychain refuses the write with
|
|
16578
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
16579
|
+
*
|
|
16580
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
16581
|
+
*/
|
|
16582
|
+
var EntryKindInfoSchema = object({
|
|
16583
|
+
owner: string(),
|
|
16584
|
+
kind: RecordKindNameSchema,
|
|
16585
|
+
title: string(),
|
|
16586
|
+
nameField: string(),
|
|
16587
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
16588
|
+
fields: record(string(), unknown()),
|
|
16589
|
+
secretPaths: array(string()),
|
|
16590
|
+
rows: number().int().nonnegative()
|
|
16591
|
+
});
|
|
16592
|
+
var EntryViewSchema = object({
|
|
16593
|
+
id: RecordIdSchema,
|
|
16594
|
+
name: string(),
|
|
16595
|
+
rev: number().int(),
|
|
16596
|
+
updatedAt: number(),
|
|
16597
|
+
/** Secret fields hold the redaction token. */
|
|
16598
|
+
data: RecordBodySchema
|
|
16599
|
+
});
|
|
16600
|
+
var EntryAddress = {
|
|
16601
|
+
owner: string().min(1),
|
|
16602
|
+
kind: RecordKindNameSchema
|
|
16603
|
+
};
|
|
16604
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
16605
|
+
...EntryAddress,
|
|
16606
|
+
id: RecordIdSchema.optional(),
|
|
16607
|
+
data: RecordBodySchema,
|
|
16608
|
+
ifRev: number().int().min(1).optional()
|
|
16609
|
+
}), object({
|
|
16610
|
+
id: string(),
|
|
16611
|
+
rev: number().int()
|
|
16612
|
+
}), {
|
|
16613
|
+
kind: "mutation",
|
|
16614
|
+
auth: "admin"
|
|
16615
|
+
}), method(object({
|
|
16616
|
+
...EntryAddress,
|
|
16617
|
+
id: RecordIdSchema
|
|
16618
|
+
}), object({ deleted: boolean() }), {
|
|
16619
|
+
kind: "mutation",
|
|
16620
|
+
auth: "admin"
|
|
16621
|
+
});
|
|
16622
|
+
/**
|
|
16019
16623
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16020
16624
|
*
|
|
16021
16625
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16556,6 +17160,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16556
17160
|
kind: "mutation",
|
|
16557
17161
|
auth: "admin",
|
|
16558
17162
|
caller: "required"
|
|
17163
|
+
}), method(object({
|
|
17164
|
+
ref: string().min(1),
|
|
17165
|
+
value: string().min(1)
|
|
17166
|
+
}), object({
|
|
17167
|
+
ref: string(),
|
|
17168
|
+
version: number().int()
|
|
17169
|
+
}), {
|
|
17170
|
+
kind: "mutation",
|
|
17171
|
+
auth: "admin",
|
|
17172
|
+
caller: "required"
|
|
16559
17173
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16560
17174
|
deleted: array(string()).readonly(),
|
|
16561
17175
|
kept: array(object({
|
|
@@ -17077,7 +17691,11 @@ var deviceDiscoveryCapability = {
|
|
|
17077
17691
|
};
|
|
17078
17692
|
/**
|
|
17079
17693
|
* `device-adoption` — generic discovery + adoption surface,
|
|
17080
|
-
* system-scoped
|
|
17694
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
17695
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
17696
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
17697
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
17698
|
+
* successor to `ha-discovery`:
|
|
17081
17699
|
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
17082
17700
|
* internally) rather than a connection-specific `brokerId`, and it
|
|
17083
17701
|
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
@@ -39330,6 +39948,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39330
39948
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39331
39949
|
kind: "mutation",
|
|
39332
39950
|
auth: "admin"
|
|
39951
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
39952
|
+
kind: "mutation",
|
|
39953
|
+
auth: "admin"
|
|
39333
39954
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39334
39955
|
kind: "mutation",
|
|
39335
39956
|
auth: "admin"
|
|
@@ -41405,6 +42026,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41405
42026
|
"server-updated",
|
|
41406
42027
|
"export-completed",
|
|
41407
42028
|
"backup-completed",
|
|
42029
|
+
"alert-critical",
|
|
42030
|
+
"alert-error",
|
|
42031
|
+
"alert-critical-resolved",
|
|
41408
42032
|
"camera-online",
|
|
41409
42033
|
"camera-offline",
|
|
41410
42034
|
"camera-disabled",
|
|
@@ -49839,6 +50463,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49839
50463
|
atMs: number(),
|
|
49840
50464
|
reason: string()
|
|
49841
50465
|
});
|
|
50466
|
+
/**
|
|
50467
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50468
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50469
|
+
* service holds, because only the hub plans) against the states the process
|
|
50470
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50471
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50472
|
+
*
|
|
50473
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50474
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50475
|
+
* planned runner the process service has no entry for.
|
|
50476
|
+
*/
|
|
50477
|
+
var RunnerRefusalSchema = object({
|
|
50478
|
+
runnerId: string(),
|
|
50479
|
+
addonIds: array(string()),
|
|
50480
|
+
reason: string()
|
|
50481
|
+
});
|
|
50482
|
+
var RunnerBootCheckSchema = object({
|
|
50483
|
+
checkedAtMs: number(),
|
|
50484
|
+
/** Runners planned for this node. */
|
|
50485
|
+
expected: number(),
|
|
50486
|
+
/** Planned runners whose process is `running`. */
|
|
50487
|
+
running: number(),
|
|
50488
|
+
failed: array(string()),
|
|
50489
|
+
refused: array(RunnerRefusalSchema),
|
|
50490
|
+
missing: array(string()),
|
|
50491
|
+
/**
|
|
50492
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50493
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50494
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50495
|
+
* Optional for version skew (absent = settled).
|
|
50496
|
+
*/
|
|
50497
|
+
pending: array(string()).optional(),
|
|
50498
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50499
|
+
planKnown: boolean()
|
|
50500
|
+
});
|
|
49842
50501
|
var ServerPackageStatusSchema = object({
|
|
49843
50502
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49844
50503
|
packageName: string(),
|
|
@@ -49901,7 +50560,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49901
50560
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49902
50561
|
* absent wrapper is unknown — never `native`.
|
|
49903
50562
|
*/
|
|
49904
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50563
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50564
|
+
/**
|
|
50565
|
+
* What this node PLANNED to run against what its process service reports
|
|
50566
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50567
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50568
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50569
|
+
*/
|
|
50570
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49905
50571
|
});
|
|
49906
50572
|
var ServerUpdateCheckResultSchema = object({
|
|
49907
50573
|
packageName: string(),
|
|
@@ -49952,6 +50618,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49952
50618
|
"refused",
|
|
49953
50619
|
"failed"
|
|
49954
50620
|
]);
|
|
50621
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50622
|
+
var UpdateBlockerSchema = object({
|
|
50623
|
+
addonId: string(),
|
|
50624
|
+
reason: string(),
|
|
50625
|
+
/** What the operator does about it. */
|
|
50626
|
+
remedy: string()
|
|
50627
|
+
});
|
|
49955
50628
|
var ServerUpdateActionResultSchema = object({
|
|
49956
50629
|
accepted: boolean(),
|
|
49957
50630
|
targetVersion: string().nullable(),
|
|
@@ -49969,14 +50642,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49969
50642
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49970
50643
|
* staging install). Non-null only for `failed`.
|
|
49971
50644
|
*/
|
|
49972
|
-
error: string().nullable().optional()
|
|
50645
|
+
error: string().nullable().optional(),
|
|
50646
|
+
/**
|
|
50647
|
+
* The addons the target version would refuse to start on this node's live
|
|
50648
|
+
* store (D877), present when the pre-flight refused the update
|
|
50649
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50650
|
+
*/
|
|
50651
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49973
50652
|
});
|
|
49974
50653
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49975
50654
|
kind: "mutation",
|
|
49976
50655
|
auth: "admin"
|
|
49977
|
-
}), method(object({
|
|
49978
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49979
|
-
version: string().optional()
|
|
50656
|
+
}), method(object({
|
|
50657
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50658
|
+
version: string().optional(),
|
|
50659
|
+
/**
|
|
50660
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50661
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50662
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50663
|
+
*/
|
|
50664
|
+
acknowledgeRefusals: boolean().optional()
|
|
50665
|
+
}), ServerUpdateActionResultSchema, {
|
|
49980
50666
|
kind: "mutation",
|
|
49981
50667
|
auth: "admin",
|
|
49982
50668
|
timeoutMs: 16 * 6e4
|
|
@@ -50419,7 +51105,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
50419
51105
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
50420
51106
|
kind: "mutation",
|
|
50421
51107
|
auth: "admin"
|
|
50422
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51108
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51109
|
+
clear: boolean(),
|
|
51110
|
+
repointLocationId: string().optional()
|
|
51111
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
50423
51112
|
kind: "mutation",
|
|
50424
51113
|
auth: "admin"
|
|
50425
51114
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -52422,7 +53111,9 @@ var ManifestShapeSchema = object({
|
|
|
52422
53111
|
var AddonProcessSchema = object({
|
|
52423
53112
|
pid: number().optional(),
|
|
52424
53113
|
mode: string(),
|
|
52425
|
-
state: string()
|
|
53114
|
+
state: string(),
|
|
53115
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53116
|
+
reason: string().optional()
|
|
52426
53117
|
});
|
|
52427
53118
|
/**
|
|
52428
53119
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -53190,7 +53881,8 @@ var batteryCapability = {
|
|
|
53190
53881
|
DeviceType.Button,
|
|
53191
53882
|
DeviceType.Switch,
|
|
53192
53883
|
DeviceType.PetFeeder,
|
|
53193
|
-
DeviceType.Container
|
|
53884
|
+
DeviceType.Container,
|
|
53885
|
+
DeviceType.Thermostat
|
|
53194
53886
|
],
|
|
53195
53887
|
methods: {
|
|
53196
53888
|
/**
|
|
@@ -53811,6 +54503,12 @@ var ClimateControlStatusSchema = object({
|
|
|
53811
54503
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53812
54504
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53813
54505
|
swingHorizontal: boolean().nullable(),
|
|
54506
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54507
|
+
minTemp: number().nullable().optional(),
|
|
54508
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54509
|
+
maxTemp: number().nullable().optional(),
|
|
54510
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54511
|
+
tempStep: number().positive().nullable().optional(),
|
|
53814
54512
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53815
54513
|
lastFetchedAt: number()
|
|
53816
54514
|
});
|
|
@@ -54657,6 +55355,294 @@ onStatusChanged: { data: object({
|
|
|
54657
55355
|
* whether persisting is worth a SQLite commit. */
|
|
54658
55356
|
volatileStateFields: ["lastChangedAt"]
|
|
54659
55357
|
};
|
|
55358
|
+
/**
|
|
55359
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
55360
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
55361
|
+
*
|
|
55362
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
55363
|
+
* by any integration that exposes the same program / option surface.
|
|
55364
|
+
*
|
|
55365
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55366
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55367
|
+
*
|
|
55368
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55369
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55370
|
+
* the link is down, or the description does not carry it) and is never
|
|
55371
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55372
|
+
*/
|
|
55373
|
+
var DishwasherStateSchema = _enum([
|
|
55374
|
+
"idle",
|
|
55375
|
+
"running",
|
|
55376
|
+
"paused",
|
|
55377
|
+
"finished",
|
|
55378
|
+
"error",
|
|
55379
|
+
"unavailable"
|
|
55380
|
+
]);
|
|
55381
|
+
/**
|
|
55382
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55383
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55384
|
+
*/
|
|
55385
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55386
|
+
"Inactive",
|
|
55387
|
+
"Ready",
|
|
55388
|
+
"DelayedStart",
|
|
55389
|
+
"Run",
|
|
55390
|
+
"Pause",
|
|
55391
|
+
"ActionRequired",
|
|
55392
|
+
"Finished",
|
|
55393
|
+
"Error",
|
|
55394
|
+
"Aborting"
|
|
55395
|
+
]);
|
|
55396
|
+
/**
|
|
55397
|
+
* Why fields may be `null`:
|
|
55398
|
+
* - `available` — the link is up and the description is loaded;
|
|
55399
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55400
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55401
|
+
* be loaded, so its values cannot be decoded.
|
|
55402
|
+
*/
|
|
55403
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55404
|
+
"available",
|
|
55405
|
+
"offline",
|
|
55406
|
+
"description-missing"
|
|
55407
|
+
]);
|
|
55408
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
55409
|
+
"ok",
|
|
55410
|
+
"low",
|
|
55411
|
+
"empty"
|
|
55412
|
+
]);
|
|
55413
|
+
var DishwasherStatusSchema = object({
|
|
55414
|
+
availability: DishwasherAvailabilitySchema,
|
|
55415
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55416
|
+
state: DishwasherStateSchema,
|
|
55417
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55418
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55419
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55420
|
+
program: string().nullable(),
|
|
55421
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55422
|
+
selectedProgram: string().nullable(),
|
|
55423
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55424
|
+
availablePrograms: array(string()),
|
|
55425
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55426
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55427
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55428
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55429
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
55430
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
55431
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55432
|
+
doorOpen: boolean().nullable(),
|
|
55433
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55434
|
+
doorLocked: boolean().nullable(),
|
|
55435
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55436
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55437
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55438
|
+
remoteControlActive: boolean().nullable(),
|
|
55439
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55440
|
+
localControlActive: boolean().nullable(),
|
|
55441
|
+
/** Main power / switched-on state; null when not known. */
|
|
55442
|
+
powerOn: boolean().nullable(),
|
|
55443
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55444
|
+
powerState: string().nullable(),
|
|
55445
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55446
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55447
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55448
|
+
halfLoad: boolean().nullable(),
|
|
55449
|
+
hygienePlus: boolean().nullable(),
|
|
55450
|
+
/** Extra dry option when the appliance exposes it. */
|
|
55451
|
+
extraDry: boolean().nullable(),
|
|
55452
|
+
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55453
|
+
intensiveZone: boolean().nullable(),
|
|
55454
|
+
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55455
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55456
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55457
|
+
childLock: boolean().nullable(),
|
|
55458
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55459
|
+
activeEvents: array(string()),
|
|
55460
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55461
|
+
errorCode: number().nullable(),
|
|
55462
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55463
|
+
errorLabel: string().nullable(),
|
|
55464
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55465
|
+
lastFetchedAt: number()
|
|
55466
|
+
});
|
|
55467
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55468
|
+
/** A value a program option or setting can take. */
|
|
55469
|
+
var DishwasherValueSchema = union([
|
|
55470
|
+
boolean(),
|
|
55471
|
+
string(),
|
|
55472
|
+
number()
|
|
55473
|
+
]);
|
|
55474
|
+
var DishwasherAccessSchema = _enum([
|
|
55475
|
+
"none",
|
|
55476
|
+
"read",
|
|
55477
|
+
"readWrite",
|
|
55478
|
+
"writeOnly",
|
|
55479
|
+
"readStatic"
|
|
55480
|
+
]);
|
|
55481
|
+
/**
|
|
55482
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55483
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55484
|
+
*/
|
|
55485
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55486
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55487
|
+
key: string(),
|
|
55488
|
+
/** Last segment of the key, for display. */
|
|
55489
|
+
name: string(),
|
|
55490
|
+
type: _enum([
|
|
55491
|
+
"boolean",
|
|
55492
|
+
"number",
|
|
55493
|
+
"enum",
|
|
55494
|
+
"string"
|
|
55495
|
+
]),
|
|
55496
|
+
access: DishwasherAccessSchema,
|
|
55497
|
+
/** The appliance reports this entity as currently available. */
|
|
55498
|
+
available: boolean(),
|
|
55499
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55500
|
+
unit: string().nullable(),
|
|
55501
|
+
min: number().nullable(),
|
|
55502
|
+
max: number().nullable(),
|
|
55503
|
+
step: number().nullable(),
|
|
55504
|
+
/** Allowed members of an enum; null for other types. */
|
|
55505
|
+
enumValues: array(string()).nullable(),
|
|
55506
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55507
|
+
});
|
|
55508
|
+
var DishwasherProgramSchema = object({
|
|
55509
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55510
|
+
key: string(),
|
|
55511
|
+
name: string(),
|
|
55512
|
+
/** The appliance currently offers this program. */
|
|
55513
|
+
available: boolean(),
|
|
55514
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55515
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55516
|
+
});
|
|
55517
|
+
var DishwasherOptionsSchema = object({
|
|
55518
|
+
availability: DishwasherAvailabilitySchema,
|
|
55519
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55520
|
+
supportsStart: boolean(),
|
|
55521
|
+
supportsPause: boolean(),
|
|
55522
|
+
supportsResume: boolean(),
|
|
55523
|
+
supportsStop: boolean(),
|
|
55524
|
+
supportsPower: boolean(),
|
|
55525
|
+
/** Every program the description lists, with its options. */
|
|
55526
|
+
programs: array(DishwasherProgramSchema),
|
|
55527
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55528
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55529
|
+
});
|
|
55530
|
+
var dishwasherCapability = {
|
|
55531
|
+
name: "dishwasher",
|
|
55532
|
+
scope: "device",
|
|
55533
|
+
deviceNative: true,
|
|
55534
|
+
mode: "singleton",
|
|
55535
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
55536
|
+
methods: {
|
|
55537
|
+
/**
|
|
55538
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55539
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55540
|
+
*/
|
|
55541
|
+
start: method(object({
|
|
55542
|
+
deviceId: DeviceIdSchema,
|
|
55543
|
+
program: string().min(1).optional(),
|
|
55544
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55545
|
+
}), _void(), {
|
|
55546
|
+
kind: "mutation",
|
|
55547
|
+
auth: "protected"
|
|
55548
|
+
}),
|
|
55549
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55550
|
+
kind: "mutation",
|
|
55551
|
+
auth: "protected"
|
|
55552
|
+
}),
|
|
55553
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55554
|
+
kind: "mutation",
|
|
55555
|
+
auth: "protected"
|
|
55556
|
+
}),
|
|
55557
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55558
|
+
kind: "mutation",
|
|
55559
|
+
auth: "protected"
|
|
55560
|
+
}),
|
|
55561
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55562
|
+
setProgram: method(object({
|
|
55563
|
+
deviceId: DeviceIdSchema,
|
|
55564
|
+
program: string().min(1)
|
|
55565
|
+
}), _void(), {
|
|
55566
|
+
kind: "mutation",
|
|
55567
|
+
auth: "protected"
|
|
55568
|
+
}),
|
|
55569
|
+
setPower: method(object({
|
|
55570
|
+
deviceId: DeviceIdSchema,
|
|
55571
|
+
on: boolean()
|
|
55572
|
+
}), _void(), {
|
|
55573
|
+
kind: "mutation",
|
|
55574
|
+
auth: "protected"
|
|
55575
|
+
}),
|
|
55576
|
+
setHalfLoad: method(object({
|
|
55577
|
+
deviceId: DeviceIdSchema,
|
|
55578
|
+
on: boolean()
|
|
55579
|
+
}), _void(), {
|
|
55580
|
+
kind: "mutation",
|
|
55581
|
+
auth: "protected"
|
|
55582
|
+
}),
|
|
55583
|
+
setHygienePlus: method(object({
|
|
55584
|
+
deviceId: DeviceIdSchema,
|
|
55585
|
+
on: boolean()
|
|
55586
|
+
}), _void(), {
|
|
55587
|
+
kind: "mutation",
|
|
55588
|
+
auth: "protected"
|
|
55589
|
+
}),
|
|
55590
|
+
setExtraDry: method(object({
|
|
55591
|
+
deviceId: DeviceIdSchema,
|
|
55592
|
+
on: boolean()
|
|
55593
|
+
}), _void(), {
|
|
55594
|
+
kind: "mutation",
|
|
55595
|
+
auth: "protected"
|
|
55596
|
+
}),
|
|
55597
|
+
setIntensiveZone: method(object({
|
|
55598
|
+
deviceId: DeviceIdSchema,
|
|
55599
|
+
on: boolean()
|
|
55600
|
+
}), _void(), {
|
|
55601
|
+
kind: "mutation",
|
|
55602
|
+
auth: "protected"
|
|
55603
|
+
}),
|
|
55604
|
+
setVarioSpeedPlus: method(object({
|
|
55605
|
+
deviceId: DeviceIdSchema,
|
|
55606
|
+
on: boolean()
|
|
55607
|
+
}), _void(), {
|
|
55608
|
+
kind: "mutation",
|
|
55609
|
+
auth: "protected"
|
|
55610
|
+
}),
|
|
55611
|
+
setChildLock: method(object({
|
|
55612
|
+
deviceId: DeviceIdSchema,
|
|
55613
|
+
on: boolean()
|
|
55614
|
+
}), _void(), {
|
|
55615
|
+
kind: "mutation",
|
|
55616
|
+
auth: "protected"
|
|
55617
|
+
}),
|
|
55618
|
+
/**
|
|
55619
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55620
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55621
|
+
* its declared range / members.
|
|
55622
|
+
*/
|
|
55623
|
+
setOption: method(object({
|
|
55624
|
+
deviceId: DeviceIdSchema,
|
|
55625
|
+
key: string().min(1),
|
|
55626
|
+
value: DishwasherValueSchema
|
|
55627
|
+
}), _void(), {
|
|
55628
|
+
kind: "mutation",
|
|
55629
|
+
auth: "protected"
|
|
55630
|
+
}),
|
|
55631
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55632
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55633
|
+
},
|
|
55634
|
+
status: {
|
|
55635
|
+
schema: DishwasherStatusSchema,
|
|
55636
|
+
kind: "poll"
|
|
55637
|
+
},
|
|
55638
|
+
runtimeState: DishwasherStatusSchema,
|
|
55639
|
+
durability: "session",
|
|
55640
|
+
history: { fields: { progressPercent: {
|
|
55641
|
+
kind: "gauge",
|
|
55642
|
+
unit: "%",
|
|
55643
|
+
deadband: 2
|
|
55644
|
+
} } }
|
|
55645
|
+
};
|
|
54660
55646
|
var DoorbellStatusSchema = object({
|
|
54661
55647
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54662
55648
|
lastPressedAt: number().nullable(),
|
|
@@ -55459,6 +56445,32 @@ var gasCapability = {
|
|
|
55459
56445
|
* whether persisting is worth a SQLite commit. */
|
|
55460
56446
|
volatileStateFields: ["lastChangedAt"]
|
|
55461
56447
|
};
|
|
56448
|
+
var HeatingValveStatusSchema = object({
|
|
56449
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
56450
|
+
position: number().min(0).max(100).nullable(),
|
|
56451
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
56452
|
+
lastFetchedAt: number()
|
|
56453
|
+
});
|
|
56454
|
+
var heatingValveCapability = {
|
|
56455
|
+
name: "heating-valve",
|
|
56456
|
+
scope: "device",
|
|
56457
|
+
deviceNative: true,
|
|
56458
|
+
mode: "singleton",
|
|
56459
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
56460
|
+
methods: {},
|
|
56461
|
+
status: {
|
|
56462
|
+
schema: HeatingValveStatusSchema,
|
|
56463
|
+
kind: "push"
|
|
56464
|
+
},
|
|
56465
|
+
runtimeState: HeatingValveStatusSchema,
|
|
56466
|
+
durability: "session",
|
|
56467
|
+
history: { fields: { position: {
|
|
56468
|
+
kind: "gauge",
|
|
56469
|
+
unit: "%",
|
|
56470
|
+
deadband: 1
|
|
56471
|
+
} } },
|
|
56472
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
56473
|
+
};
|
|
55462
56474
|
/**
|
|
55463
56475
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
55464
56476
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -56591,7 +57603,19 @@ var TlsStatusSchema = object({
|
|
|
56591
57603
|
sans: array(string()),
|
|
56592
57604
|
caCertPem: string().nullable(),
|
|
56593
57605
|
reissueError: string().nullable(),
|
|
56594
|
-
restartRequired: boolean()
|
|
57606
|
+
restartRequired: boolean(),
|
|
57607
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
57608
|
+
caMissing: boolean(),
|
|
57609
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
57610
|
+
localCaConstrained: boolean().nullable(),
|
|
57611
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
57612
|
+
caReplacedAt: string().nullable(),
|
|
57613
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
57614
|
+
storedUpload: object({
|
|
57615
|
+
leafFingerprintSha256: string(),
|
|
57616
|
+
validTo: string(),
|
|
57617
|
+
hasCa: boolean()
|
|
57618
|
+
}).nullable()
|
|
56595
57619
|
});
|
|
56596
57620
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
56597
57621
|
/**
|
|
@@ -56647,6 +57671,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
56647
57671
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
56648
57672
|
kind: "mutation",
|
|
56649
57673
|
auth: "admin"
|
|
57674
|
+
}), method(_void(), TlsStatusSchema, {
|
|
57675
|
+
kind: "mutation",
|
|
57676
|
+
auth: "admin"
|
|
56650
57677
|
});
|
|
56651
57678
|
var LockControlStatusSchema = object({
|
|
56652
57679
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -63140,7 +64167,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
63140
64167
|
kind: "mutation",
|
|
63141
64168
|
auth: "admin",
|
|
63142
64169
|
access: "delete"
|
|
63143
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
64170
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
64171
|
+
kind: "mutation",
|
|
64172
|
+
auth: "admin",
|
|
64173
|
+
access: "create"
|
|
64174
|
+
}), method(object({
|
|
63144
64175
|
userId: string(),
|
|
63145
64176
|
code: string()
|
|
63146
64177
|
}), object({ valid: boolean() }), {
|
|
@@ -64860,6 +65891,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64860
65891
|
dayNight: dayNightCapability,
|
|
64861
65892
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
64862
65893
|
deviceStatus: deviceStatusCapability,
|
|
65894
|
+
dishwasher: dishwasherCapability,
|
|
64863
65895
|
doorbell: doorbellCapability,
|
|
64864
65896
|
enumSensor: enumSensorCapability,
|
|
64865
65897
|
eventEmitter: eventEmitterCapability,
|
|
@@ -64867,6 +65899,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64867
65899
|
featureProbe: featureProbeCapability,
|
|
64868
65900
|
flood: floodCapability,
|
|
64869
65901
|
gas: gasCapability,
|
|
65902
|
+
heatingValve: heatingValveCapability,
|
|
64870
65903
|
humidifier: humidifierCapability,
|
|
64871
65904
|
humiditySensor: humiditySensorCapability,
|
|
64872
65905
|
image: imageCapability,
|
|
@@ -64952,13 +65985,14 @@ var BaseDevice = class {
|
|
|
64952
65985
|
get state() {
|
|
64953
65986
|
if (!this._stateProxyCache) {
|
|
64954
65987
|
const cache = {};
|
|
64955
|
-
const handler = { get: (
|
|
65988
|
+
const handler = { get: (target, key) => {
|
|
64956
65989
|
const k = key;
|
|
64957
|
-
|
|
65990
|
+
const existing = Reflect.get(target, k);
|
|
65991
|
+
if (existing !== void 0) return existing;
|
|
64958
65992
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
64959
65993
|
if (!cap) return void 0;
|
|
64960
65994
|
const proxy = this.sliceProxy(cap);
|
|
64961
|
-
|
|
65995
|
+
Reflect.set(target, k, proxy);
|
|
64962
65996
|
return proxy;
|
|
64963
65997
|
} };
|
|
64964
65998
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -65157,7 +66191,7 @@ var BaseDevice = class {
|
|
|
65157
66191
|
async updateSourceInfo(patch) {
|
|
65158
66192
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
65159
66193
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
65160
|
-
const action = this.ctx.api
|
|
66194
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
65161
66195
|
if (action) try {
|
|
65162
66196
|
await action.mutate({
|
|
65163
66197
|
deviceId: this.id,
|
|
@@ -65192,7 +66226,7 @@ var BaseDevice = class {
|
|
|
65192
66226
|
* device boot on a meta refresh.
|
|
65193
66227
|
*/
|
|
65194
66228
|
async refreshFeatures() {
|
|
65195
|
-
const action = this.ctx.api
|
|
66229
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
65196
66230
|
if (!action) return;
|
|
65197
66231
|
try {
|
|
65198
66232
|
await action.mutate({
|
|
@@ -65591,6 +66625,12 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
65591
66625
|
provider: this
|
|
65592
66626
|
}];
|
|
65593
66627
|
}
|
|
66628
|
+
/** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
|
|
66629
|
+
providerRegistrationsFromSuper(result) {
|
|
66630
|
+
if (Array.isArray(result)) return result;
|
|
66631
|
+
if (result !== void 0 && result.providers !== void 0) return [...result.providers];
|
|
66632
|
+
return [];
|
|
66633
|
+
}
|
|
65594
66634
|
async onShutdown() {
|
|
65595
66635
|
this._restoreShuttingDown = true;
|
|
65596
66636
|
this.cancelRestoreRetries();
|
|
@@ -66117,7 +67157,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
66117
67157
|
return toDeviceSummary(device, this.addonId);
|
|
66118
67158
|
}
|
|
66119
67159
|
};
|
|
66120
|
-
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;
|
|
67160
|
+
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;
|
|
66121
67161
|
new Set(Object.values(DeviceType));
|
|
66122
67162
|
Object.freeze({
|
|
66123
67163
|
"accessories.getStatus": {
|
|
@@ -67266,6 +68306,12 @@ Object.freeze({
|
|
|
67266
68306
|
addonId: null,
|
|
67267
68307
|
access: "view"
|
|
67268
68308
|
},
|
|
68309
|
+
"coreBlocks.migrateRawSecrets": {
|
|
68310
|
+
capName: "core-blocks",
|
|
68311
|
+
capScope: "system",
|
|
68312
|
+
addonId: null,
|
|
68313
|
+
access: "create"
|
|
68314
|
+
},
|
|
67269
68315
|
"coreBlocks.restart": {
|
|
67270
68316
|
capName: "core-blocks",
|
|
67271
68317
|
capScope: "system",
|
|
@@ -68532,6 +69578,96 @@ Object.freeze({
|
|
|
68532
69578
|
addonId: null,
|
|
68533
69579
|
access: "view"
|
|
68534
69580
|
},
|
|
69581
|
+
"dishwasher.getOptions": {
|
|
69582
|
+
capName: "dishwasher",
|
|
69583
|
+
capScope: "device",
|
|
69584
|
+
addonId: null,
|
|
69585
|
+
access: "view"
|
|
69586
|
+
},
|
|
69587
|
+
"dishwasher.getStatus": {
|
|
69588
|
+
capName: "dishwasher",
|
|
69589
|
+
capScope: "device",
|
|
69590
|
+
addonId: null,
|
|
69591
|
+
access: "view"
|
|
69592
|
+
},
|
|
69593
|
+
"dishwasher.pause": {
|
|
69594
|
+
capName: "dishwasher",
|
|
69595
|
+
capScope: "device",
|
|
69596
|
+
addonId: null,
|
|
69597
|
+
access: "create"
|
|
69598
|
+
},
|
|
69599
|
+
"dishwasher.resume": {
|
|
69600
|
+
capName: "dishwasher",
|
|
69601
|
+
capScope: "device",
|
|
69602
|
+
addonId: null,
|
|
69603
|
+
access: "create"
|
|
69604
|
+
},
|
|
69605
|
+
"dishwasher.setChildLock": {
|
|
69606
|
+
capName: "dishwasher",
|
|
69607
|
+
capScope: "device",
|
|
69608
|
+
addonId: null,
|
|
69609
|
+
access: "create"
|
|
69610
|
+
},
|
|
69611
|
+
"dishwasher.setExtraDry": {
|
|
69612
|
+
capName: "dishwasher",
|
|
69613
|
+
capScope: "device",
|
|
69614
|
+
addonId: null,
|
|
69615
|
+
access: "create"
|
|
69616
|
+
},
|
|
69617
|
+
"dishwasher.setHalfLoad": {
|
|
69618
|
+
capName: "dishwasher",
|
|
69619
|
+
capScope: "device",
|
|
69620
|
+
addonId: null,
|
|
69621
|
+
access: "create"
|
|
69622
|
+
},
|
|
69623
|
+
"dishwasher.setHygienePlus": {
|
|
69624
|
+
capName: "dishwasher",
|
|
69625
|
+
capScope: "device",
|
|
69626
|
+
addonId: null,
|
|
69627
|
+
access: "create"
|
|
69628
|
+
},
|
|
69629
|
+
"dishwasher.setIntensiveZone": {
|
|
69630
|
+
capName: "dishwasher",
|
|
69631
|
+
capScope: "device",
|
|
69632
|
+
addonId: null,
|
|
69633
|
+
access: "create"
|
|
69634
|
+
},
|
|
69635
|
+
"dishwasher.setOption": {
|
|
69636
|
+
capName: "dishwasher",
|
|
69637
|
+
capScope: "device",
|
|
69638
|
+
addonId: null,
|
|
69639
|
+
access: "create"
|
|
69640
|
+
},
|
|
69641
|
+
"dishwasher.setPower": {
|
|
69642
|
+
capName: "dishwasher",
|
|
69643
|
+
capScope: "device",
|
|
69644
|
+
addonId: null,
|
|
69645
|
+
access: "create"
|
|
69646
|
+
},
|
|
69647
|
+
"dishwasher.setProgram": {
|
|
69648
|
+
capName: "dishwasher",
|
|
69649
|
+
capScope: "device",
|
|
69650
|
+
addonId: null,
|
|
69651
|
+
access: "create"
|
|
69652
|
+
},
|
|
69653
|
+
"dishwasher.setVarioSpeedPlus": {
|
|
69654
|
+
capName: "dishwasher",
|
|
69655
|
+
capScope: "device",
|
|
69656
|
+
addonId: null,
|
|
69657
|
+
access: "create"
|
|
69658
|
+
},
|
|
69659
|
+
"dishwasher.start": {
|
|
69660
|
+
capName: "dishwasher",
|
|
69661
|
+
capScope: "device",
|
|
69662
|
+
addonId: null,
|
|
69663
|
+
access: "create"
|
|
69664
|
+
},
|
|
69665
|
+
"dishwasher.stop": {
|
|
69666
|
+
capName: "dishwasher",
|
|
69667
|
+
capScope: "device",
|
|
69668
|
+
addonId: null,
|
|
69669
|
+
access: "create"
|
|
69670
|
+
},
|
|
68535
69671
|
"doorbell.getStatus": {
|
|
68536
69672
|
capName: "doorbell",
|
|
68537
69673
|
capScope: "device",
|
|
@@ -68742,6 +69878,12 @@ Object.freeze({
|
|
|
68742
69878
|
addonId: null,
|
|
68743
69879
|
access: "view"
|
|
68744
69880
|
},
|
|
69881
|
+
"heatingValve.getStatus": {
|
|
69882
|
+
capName: "heating-valve",
|
|
69883
|
+
capScope: "device",
|
|
69884
|
+
addonId: null,
|
|
69885
|
+
access: "view"
|
|
69886
|
+
},
|
|
68745
69887
|
"humidifier.getStatus": {
|
|
68746
69888
|
capName: "humidifier",
|
|
68747
69889
|
capScope: "device",
|
|
@@ -68952,6 +70094,12 @@ Object.freeze({
|
|
|
68952
70094
|
addonId: null,
|
|
68953
70095
|
access: "create"
|
|
68954
70096
|
},
|
|
70097
|
+
"keychainAdmin.importSecret": {
|
|
70098
|
+
capName: "keychain-admin",
|
|
70099
|
+
capScope: "system",
|
|
70100
|
+
addonId: null,
|
|
70101
|
+
access: "create"
|
|
70102
|
+
},
|
|
68955
70103
|
"keychainAdmin.listAudit": {
|
|
68956
70104
|
capName: "keychain-admin",
|
|
68957
70105
|
capScope: "system",
|
|
@@ -69120,6 +70268,12 @@ Object.freeze({
|
|
|
69120
70268
|
addonId: null,
|
|
69121
70269
|
access: "view"
|
|
69122
70270
|
},
|
|
70271
|
+
"llm.migrateRawSecrets": {
|
|
70272
|
+
capName: "llm",
|
|
70273
|
+
capScope: "system",
|
|
70274
|
+
addonId: null,
|
|
70275
|
+
access: "create"
|
|
70276
|
+
},
|
|
69123
70277
|
"llm.resolveModelRef": {
|
|
69124
70278
|
capName: "llm",
|
|
69125
70279
|
capScope: "system",
|
|
@@ -69348,6 +70502,12 @@ Object.freeze({
|
|
|
69348
70502
|
addonId: null,
|
|
69349
70503
|
access: "create"
|
|
69350
70504
|
},
|
|
70505
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
70506
|
+
capName: "local-network",
|
|
70507
|
+
capScope: "system",
|
|
70508
|
+
addonId: null,
|
|
70509
|
+
access: "create"
|
|
70510
|
+
},
|
|
69351
70511
|
"lockControl.getStatus": {
|
|
69352
70512
|
capName: "lock-control",
|
|
69353
70513
|
capScope: "device",
|
|
@@ -72000,6 +73160,30 @@ Object.freeze({
|
|
|
72000
73160
|
addonId: null,
|
|
72001
73161
|
access: "create"
|
|
72002
73162
|
},
|
|
73163
|
+
"recordEntries.deleteEntry": {
|
|
73164
|
+
capName: "record-entries",
|
|
73165
|
+
capScope: "system",
|
|
73166
|
+
addonId: null,
|
|
73167
|
+
access: "delete"
|
|
73168
|
+
},
|
|
73169
|
+
"recordEntries.listEntries": {
|
|
73170
|
+
capName: "record-entries",
|
|
73171
|
+
capScope: "system",
|
|
73172
|
+
addonId: null,
|
|
73173
|
+
access: "view"
|
|
73174
|
+
},
|
|
73175
|
+
"recordEntries.listEntryKinds": {
|
|
73176
|
+
capName: "record-entries",
|
|
73177
|
+
capScope: "system",
|
|
73178
|
+
addonId: null,
|
|
73179
|
+
access: "view"
|
|
73180
|
+
},
|
|
73181
|
+
"recordEntries.putEntry": {
|
|
73182
|
+
capName: "record-entries",
|
|
73183
|
+
capScope: "system",
|
|
73184
|
+
addonId: null,
|
|
73185
|
+
access: "create"
|
|
73186
|
+
},
|
|
72003
73187
|
"recording.getAvailability": {
|
|
72004
73188
|
capName: "recording",
|
|
72005
73189
|
capScope: "device",
|
|
@@ -72300,6 +73484,102 @@ Object.freeze({
|
|
|
72300
73484
|
addonId: null,
|
|
72301
73485
|
access: "view"
|
|
72302
73486
|
},
|
|
73487
|
+
"records.aggregate": {
|
|
73488
|
+
capName: "records",
|
|
73489
|
+
capScope: "system",
|
|
73490
|
+
addonId: null,
|
|
73491
|
+
access: "view"
|
|
73492
|
+
},
|
|
73493
|
+
"records.allocateId": {
|
|
73494
|
+
capName: "records",
|
|
73495
|
+
capScope: "system",
|
|
73496
|
+
addonId: null,
|
|
73497
|
+
access: "create"
|
|
73498
|
+
},
|
|
73499
|
+
"records.count": {
|
|
73500
|
+
capName: "records",
|
|
73501
|
+
capScope: "system",
|
|
73502
|
+
addonId: null,
|
|
73503
|
+
access: "view"
|
|
73504
|
+
},
|
|
73505
|
+
"records.declareKinds": {
|
|
73506
|
+
capName: "records",
|
|
73507
|
+
capScope: "system",
|
|
73508
|
+
addonId: null,
|
|
73509
|
+
access: "create"
|
|
73510
|
+
},
|
|
73511
|
+
"records.delete": {
|
|
73512
|
+
capName: "records",
|
|
73513
|
+
capScope: "system",
|
|
73514
|
+
addonId: null,
|
|
73515
|
+
access: "delete"
|
|
73516
|
+
},
|
|
73517
|
+
"records.deleteDevice": {
|
|
73518
|
+
capName: "records",
|
|
73519
|
+
capScope: "system",
|
|
73520
|
+
addonId: null,
|
|
73521
|
+
access: "delete"
|
|
73522
|
+
},
|
|
73523
|
+
"records.deleteMany": {
|
|
73524
|
+
capName: "records",
|
|
73525
|
+
capScope: "system",
|
|
73526
|
+
addonId: null,
|
|
73527
|
+
access: "delete"
|
|
73528
|
+
},
|
|
73529
|
+
"records.deleteWhere": {
|
|
73530
|
+
capName: "records",
|
|
73531
|
+
capScope: "system",
|
|
73532
|
+
addonId: null,
|
|
73533
|
+
access: "delete"
|
|
73534
|
+
},
|
|
73535
|
+
"records.get": {
|
|
73536
|
+
capName: "records",
|
|
73537
|
+
capScope: "system",
|
|
73538
|
+
addonId: null,
|
|
73539
|
+
access: "view"
|
|
73540
|
+
},
|
|
73541
|
+
"records.getMany": {
|
|
73542
|
+
capName: "records",
|
|
73543
|
+
capScope: "system",
|
|
73544
|
+
addonId: null,
|
|
73545
|
+
access: "view"
|
|
73546
|
+
},
|
|
73547
|
+
"records.histogram": {
|
|
73548
|
+
capName: "records",
|
|
73549
|
+
capScope: "system",
|
|
73550
|
+
addonId: null,
|
|
73551
|
+
access: "view"
|
|
73552
|
+
},
|
|
73553
|
+
"records.patch": {
|
|
73554
|
+
capName: "records",
|
|
73555
|
+
capScope: "system",
|
|
73556
|
+
addonId: null,
|
|
73557
|
+
access: "create"
|
|
73558
|
+
},
|
|
73559
|
+
"records.put": {
|
|
73560
|
+
capName: "records",
|
|
73561
|
+
capScope: "system",
|
|
73562
|
+
addonId: null,
|
|
73563
|
+
access: "create"
|
|
73564
|
+
},
|
|
73565
|
+
"records.putMany": {
|
|
73566
|
+
capName: "records",
|
|
73567
|
+
capScope: "system",
|
|
73568
|
+
addonId: null,
|
|
73569
|
+
access: "create"
|
|
73570
|
+
},
|
|
73571
|
+
"records.query": {
|
|
73572
|
+
capName: "records",
|
|
73573
|
+
capScope: "system",
|
|
73574
|
+
addonId: null,
|
|
73575
|
+
access: "view"
|
|
73576
|
+
},
|
|
73577
|
+
"records.secretRefs": {
|
|
73578
|
+
capName: "records",
|
|
73579
|
+
capScope: "system",
|
|
73580
|
+
addonId: null,
|
|
73581
|
+
access: "view"
|
|
73582
|
+
},
|
|
72303
73583
|
"sceneMonitor.captureReference": {
|
|
72304
73584
|
capName: "scene-monitor",
|
|
72305
73585
|
capScope: "device",
|
|
@@ -72732,6 +74012,48 @@ Object.freeze({
|
|
|
72732
74012
|
addonId: null,
|
|
72733
74013
|
access: "create"
|
|
72734
74014
|
},
|
|
74015
|
+
"storageAdmin.adoptRecords": {
|
|
74016
|
+
capName: "storage-admin",
|
|
74017
|
+
capScope: "system",
|
|
74018
|
+
addonId: null,
|
|
74019
|
+
access: "create"
|
|
74020
|
+
},
|
|
74021
|
+
"storageAdmin.dropCollection": {
|
|
74022
|
+
capName: "storage-admin",
|
|
74023
|
+
capScope: "system",
|
|
74024
|
+
addonId: null,
|
|
74025
|
+
access: "delete"
|
|
74026
|
+
},
|
|
74027
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
74028
|
+
capName: "storage-admin",
|
|
74029
|
+
capScope: "system",
|
|
74030
|
+
addonId: null,
|
|
74031
|
+
access: "view"
|
|
74032
|
+
},
|
|
74033
|
+
"storageAdmin.listKinds": {
|
|
74034
|
+
capName: "storage-admin",
|
|
74035
|
+
capScope: "system",
|
|
74036
|
+
addonId: null,
|
|
74037
|
+
access: "view"
|
|
74038
|
+
},
|
|
74039
|
+
"storageAdmin.listTables": {
|
|
74040
|
+
capName: "storage-admin",
|
|
74041
|
+
capScope: "system",
|
|
74042
|
+
addonId: null,
|
|
74043
|
+
access: "view"
|
|
74044
|
+
},
|
|
74045
|
+
"storageAdmin.readLegacyCollection": {
|
|
74046
|
+
capName: "storage-admin",
|
|
74047
|
+
capScope: "system",
|
|
74048
|
+
addonId: null,
|
|
74049
|
+
access: "view"
|
|
74050
|
+
},
|
|
74051
|
+
"storageAdmin.readRecords": {
|
|
74052
|
+
capName: "storage-admin",
|
|
74053
|
+
capScope: "system",
|
|
74054
|
+
addonId: null,
|
|
74055
|
+
access: "view"
|
|
74056
|
+
},
|
|
72735
74057
|
"storageEvictable.evict": {
|
|
72736
74058
|
capName: "storage-evictable",
|
|
72737
74059
|
capScope: "system",
|
|
@@ -72780,6 +74102,12 @@ Object.freeze({
|
|
|
72780
74102
|
addonId: null,
|
|
72781
74103
|
access: "view"
|
|
72782
74104
|
},
|
|
74105
|
+
"storageMigration.moverClearance": {
|
|
74106
|
+
capName: "storage-migration",
|
|
74107
|
+
capScope: "system",
|
|
74108
|
+
addonId: null,
|
|
74109
|
+
access: "view"
|
|
74110
|
+
},
|
|
72783
74111
|
"storageMigration.movers": {
|
|
72784
74112
|
capName: "storage-migration",
|
|
72785
74113
|
capScope: "system",
|
|
@@ -73644,6 +74972,12 @@ Object.freeze({
|
|
|
73644
74972
|
addonId: null,
|
|
73645
74973
|
access: "view"
|
|
73646
74974
|
},
|
|
74975
|
+
"userManagement.migrateRawSecrets": {
|
|
74976
|
+
capName: "user-management",
|
|
74977
|
+
capScope: "system",
|
|
74978
|
+
addonId: null,
|
|
74979
|
+
access: "create"
|
|
74980
|
+
},
|
|
73647
74981
|
"userManagement.oauthExchangeCode": {
|
|
73648
74982
|
capName: "user-management",
|
|
73649
74983
|
capScope: "system",
|
|
@@ -74143,7 +75477,7 @@ Object.freeze({
|
|
|
74143
75477
|
access: "create"
|
|
74144
75478
|
}
|
|
74145
75479
|
});
|
|
74146
|
-
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;
|
|
75480
|
+
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;
|
|
74147
75481
|
DeviceFeature.BatteryOperated;
|
|
74148
75482
|
Object.freeze({
|
|
74149
75483
|
"accessories.getStatus": [{
|
|
@@ -74967,6 +76301,81 @@ Object.freeze({
|
|
|
74967
76301
|
form: "single",
|
|
74968
76302
|
optional: false
|
|
74969
76303
|
}],
|
|
76304
|
+
"dishwasher.getOptions": [{
|
|
76305
|
+
name: "deviceId",
|
|
76306
|
+
form: "single",
|
|
76307
|
+
optional: false
|
|
76308
|
+
}],
|
|
76309
|
+
"dishwasher.getStatus": [{
|
|
76310
|
+
name: "deviceId",
|
|
76311
|
+
form: "single",
|
|
76312
|
+
optional: false
|
|
76313
|
+
}],
|
|
76314
|
+
"dishwasher.pause": [{
|
|
76315
|
+
name: "deviceId",
|
|
76316
|
+
form: "single",
|
|
76317
|
+
optional: false
|
|
76318
|
+
}],
|
|
76319
|
+
"dishwasher.resume": [{
|
|
76320
|
+
name: "deviceId",
|
|
76321
|
+
form: "single",
|
|
76322
|
+
optional: false
|
|
76323
|
+
}],
|
|
76324
|
+
"dishwasher.setChildLock": [{
|
|
76325
|
+
name: "deviceId",
|
|
76326
|
+
form: "single",
|
|
76327
|
+
optional: false
|
|
76328
|
+
}],
|
|
76329
|
+
"dishwasher.setExtraDry": [{
|
|
76330
|
+
name: "deviceId",
|
|
76331
|
+
form: "single",
|
|
76332
|
+
optional: false
|
|
76333
|
+
}],
|
|
76334
|
+
"dishwasher.setHalfLoad": [{
|
|
76335
|
+
name: "deviceId",
|
|
76336
|
+
form: "single",
|
|
76337
|
+
optional: false
|
|
76338
|
+
}],
|
|
76339
|
+
"dishwasher.setHygienePlus": [{
|
|
76340
|
+
name: "deviceId",
|
|
76341
|
+
form: "single",
|
|
76342
|
+
optional: false
|
|
76343
|
+
}],
|
|
76344
|
+
"dishwasher.setIntensiveZone": [{
|
|
76345
|
+
name: "deviceId",
|
|
76346
|
+
form: "single",
|
|
76347
|
+
optional: false
|
|
76348
|
+
}],
|
|
76349
|
+
"dishwasher.setOption": [{
|
|
76350
|
+
name: "deviceId",
|
|
76351
|
+
form: "single",
|
|
76352
|
+
optional: false
|
|
76353
|
+
}],
|
|
76354
|
+
"dishwasher.setPower": [{
|
|
76355
|
+
name: "deviceId",
|
|
76356
|
+
form: "single",
|
|
76357
|
+
optional: false
|
|
76358
|
+
}],
|
|
76359
|
+
"dishwasher.setProgram": [{
|
|
76360
|
+
name: "deviceId",
|
|
76361
|
+
form: "single",
|
|
76362
|
+
optional: false
|
|
76363
|
+
}],
|
|
76364
|
+
"dishwasher.setVarioSpeedPlus": [{
|
|
76365
|
+
name: "deviceId",
|
|
76366
|
+
form: "single",
|
|
76367
|
+
optional: false
|
|
76368
|
+
}],
|
|
76369
|
+
"dishwasher.start": [{
|
|
76370
|
+
name: "deviceId",
|
|
76371
|
+
form: "single",
|
|
76372
|
+
optional: false
|
|
76373
|
+
}],
|
|
76374
|
+
"dishwasher.stop": [{
|
|
76375
|
+
name: "deviceId",
|
|
76376
|
+
form: "single",
|
|
76377
|
+
optional: false
|
|
76378
|
+
}],
|
|
74970
76379
|
"doorbell.getStatus": [{
|
|
74971
76380
|
name: "deviceId",
|
|
74972
76381
|
form: "single",
|
|
@@ -75036,6 +76445,11 @@ Object.freeze({
|
|
|
75036
76445
|
form: "single",
|
|
75037
76446
|
optional: false
|
|
75038
76447
|
}],
|
|
76448
|
+
"heatingValve.getStatus": [{
|
|
76449
|
+
name: "deviceId",
|
|
76450
|
+
form: "single",
|
|
76451
|
+
optional: false
|
|
76452
|
+
}],
|
|
75039
76453
|
"humidifier.getStatus": [{
|
|
75040
76454
|
name: "deviceId",
|
|
75041
76455
|
form: "single",
|
|
@@ -76320,6 +77734,37 @@ Object.freeze({
|
|
|
76320
77734
|
form: "single",
|
|
76321
77735
|
optional: false
|
|
76322
77736
|
}],
|
|
77737
|
+
"records.count": [{
|
|
77738
|
+
name: "deviceId",
|
|
77739
|
+
form: "single",
|
|
77740
|
+
optional: true
|
|
77741
|
+
}],
|
|
77742
|
+
"records.deleteDevice": [{
|
|
77743
|
+
name: "deviceId",
|
|
77744
|
+
form: "single",
|
|
77745
|
+
optional: false
|
|
77746
|
+
}],
|
|
77747
|
+
"records.deleteWhere": [{
|
|
77748
|
+
name: "deviceId",
|
|
77749
|
+
form: "single",
|
|
77750
|
+
optional: true
|
|
77751
|
+
}],
|
|
77752
|
+
"records.histogram": [{
|
|
77753
|
+
name: "deviceId",
|
|
77754
|
+
form: "single",
|
|
77755
|
+
optional: true
|
|
77756
|
+
}],
|
|
77757
|
+
"records.putMany": [{
|
|
77758
|
+
name: "records",
|
|
77759
|
+
form: "object-array",
|
|
77760
|
+
optional: false,
|
|
77761
|
+
itemField: "deviceId"
|
|
77762
|
+
}],
|
|
77763
|
+
"records.query": [{
|
|
77764
|
+
name: "deviceId",
|
|
77765
|
+
form: "single",
|
|
77766
|
+
optional: true
|
|
77767
|
+
}],
|
|
76323
77768
|
"sceneMonitor.captureReference": [{
|
|
76324
77769
|
name: "deviceId",
|
|
76325
77770
|
form: "single",
|
|
@@ -76436,6 +77881,17 @@ Object.freeze({
|
|
|
76436
77881
|
form: "single",
|
|
76437
77882
|
optional: false
|
|
76438
77883
|
}],
|
|
77884
|
+
"storageAdmin.adoptRecords": [{
|
|
77885
|
+
name: "records",
|
|
77886
|
+
form: "object-array",
|
|
77887
|
+
optional: false,
|
|
77888
|
+
itemField: "deviceId"
|
|
77889
|
+
}],
|
|
77890
|
+
"storageAdmin.readRecords": [{
|
|
77891
|
+
name: "deviceId",
|
|
77892
|
+
form: "single",
|
|
77893
|
+
optional: true
|
|
77894
|
+
}],
|
|
76439
77895
|
"streamBroker.acquireEgressTranscode": [{
|
|
76440
77896
|
name: "deviceId",
|
|
76441
77897
|
form: "single",
|
|
@@ -76951,6 +78407,9 @@ new Map(Object.entries({
|
|
|
76951
78407
|
"wrapper-update-available": "system",
|
|
76952
78408
|
"backup-completed": "system",
|
|
76953
78409
|
"export-completed": "system",
|
|
78410
|
+
"alert-critical": "system",
|
|
78411
|
+
"alert-error": "system",
|
|
78412
|
+
"alert-critical-resolved": "system",
|
|
76954
78413
|
"storage-location-low": "system",
|
|
76955
78414
|
"storage-location-critical": "system",
|
|
76956
78415
|
"storage-location-ok": "system",
|
|
@@ -77075,6 +78534,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
77075
78534
|
"storage-location-ok"
|
|
77076
78535
|
]
|
|
77077
78536
|
},
|
|
78537
|
+
{
|
|
78538
|
+
id: "alerts",
|
|
78539
|
+
family: "system",
|
|
78540
|
+
label: "Alerts",
|
|
78541
|
+
kinds: [
|
|
78542
|
+
"alert-critical",
|
|
78543
|
+
"alert-error",
|
|
78544
|
+
"alert-critical-resolved"
|
|
78545
|
+
]
|
|
78546
|
+
},
|
|
77078
78547
|
{
|
|
77079
78548
|
id: "alarm",
|
|
77080
78549
|
family: "alarm",
|
|
@@ -77119,6 +78588,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
77119
78588
|
return [[descriptor.kind, field]];
|
|
77120
78589
|
})));
|
|
77121
78590
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78591
|
+
object({
|
|
78592
|
+
phase: _enum(["raised", "resolved"]),
|
|
78593
|
+
episodeId: string().min(1),
|
|
78594
|
+
alertId: string().min(1),
|
|
78595
|
+
severity: AlertSeveritySchema,
|
|
78596
|
+
category: string(),
|
|
78597
|
+
title: string(),
|
|
78598
|
+
message: string(),
|
|
78599
|
+
sourceType: string().optional(),
|
|
78600
|
+
sourceId: string().optional(),
|
|
78601
|
+
nodeId: string().optional(),
|
|
78602
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78603
|
+
actionUrl: string().optional(),
|
|
78604
|
+
at: number()
|
|
78605
|
+
});
|
|
77122
78606
|
var RULE_BODY_ONLY = ["body"];
|
|
77123
78607
|
var RULE_TEXT = ["title", "body"];
|
|
77124
78608
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -77128,6 +78612,11 @@ var TANK = [
|
|
|
77128
78612
|
"device-tank-full",
|
|
77129
78613
|
"device-tank-normal"
|
|
77130
78614
|
];
|
|
78615
|
+
var ALERT_EPISODE = [
|
|
78616
|
+
"alert-critical",
|
|
78617
|
+
"alert-error",
|
|
78618
|
+
"alert-critical-resolved"
|
|
78619
|
+
];
|
|
77131
78620
|
var UPDATES = [
|
|
77132
78621
|
"addon-update-available",
|
|
77133
78622
|
"server-update-available",
|
|
@@ -77320,14 +78809,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
77320
78809
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
77321
78810
|
([...RULE_TEXT], [...TANK]),
|
|
77322
78811
|
[...RULE_TEXT],
|
|
77323
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
77324
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
77325
|
-
[...RULE_TEXT],
|
|
78812
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78813
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
77326
78814
|
[...RULE_TEXT],
|
|
77327
78815
|
[...RULE_TEXT],
|
|
77328
78816
|
[...RULE_TEXT],
|
|
77329
78817
|
[...RULE_TEXT],
|
|
77330
78818
|
[...RULE_TEXT],
|
|
78819
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
77331
78820
|
[...RULE_TEXT],
|
|
77332
78821
|
[...RULE_TEXT],
|
|
77333
78822
|
[...RULE_TEXT],
|
|
@@ -77345,7 +78834,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
77345
78834
|
[...RULE_TEXT],
|
|
77346
78835
|
[...RULE_TEXT],
|
|
77347
78836
|
[...RULE_TEXT],
|
|
77348
|
-
[...RULE_TEXT],
|
|
78837
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78838
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78839
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78840
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78841
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
77349
78842
|
[...RULE_TEXT],
|
|
77350
78843
|
[...RULE_TEXT],
|
|
77351
78844
|
[...RULE_TEXT],
|