@camstack/addon-provider-rtsp 1.2.126 → 1.2.127
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 +1318 -129
- package/dist/addon.mjs +1318 -129
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import net from "node:net";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -63,6 +63,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
63
63
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
64
64
|
*/
|
|
65
65
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
66
|
+
/**
|
|
67
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
68
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
69
|
+
* action. One event per refusal.
|
|
70
|
+
*/
|
|
71
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
72
|
+
/**
|
|
73
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
74
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
75
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
76
|
+
*/
|
|
77
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
78
|
+
/**
|
|
79
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
80
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
81
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
82
|
+
*/
|
|
83
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
66
84
|
EventCategory["AddonError"] = "addon.error";
|
|
67
85
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
68
86
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5387,7 +5405,7 @@ var ZodIssueCode = {
|
|
|
5387
5405
|
var ZodFirstPartyTypeKind;
|
|
5388
5406
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5389
5407
|
//#endregion
|
|
5390
|
-
//#region ../types/dist/sleep-
|
|
5408
|
+
//#region ../types/dist/sleep-BOjuyoPC.mjs
|
|
5391
5409
|
/**
|
|
5392
5410
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5393
5411
|
* window to float samples (D455).
|
|
@@ -5504,7 +5522,7 @@ function isKeychainStoredField(field) {
|
|
|
5504
5522
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5505
5523
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5506
5524
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5507
|
-
function isRecord$
|
|
5525
|
+
function isRecord$5(value) {
|
|
5508
5526
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5509
5527
|
}
|
|
5510
5528
|
function makeSecretMarker(ref) {
|
|
@@ -5515,12 +5533,12 @@ function makeSecretMarker(ref) {
|
|
|
5515
5533
|
}
|
|
5516
5534
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5517
5535
|
function isSecretMarker(value) {
|
|
5518
|
-
if (!isRecord$
|
|
5536
|
+
if (!isRecord$5(value)) return false;
|
|
5519
5537
|
const ref = value["$secret"];
|
|
5520
5538
|
return typeof ref === "string" && ref.length > 0;
|
|
5521
5539
|
}
|
|
5522
5540
|
function isSecretClear(value) {
|
|
5523
|
-
return isRecord$
|
|
5541
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5524
5542
|
}
|
|
5525
5543
|
/**
|
|
5526
5544
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6130,7 +6148,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6130
6148
|
}
|
|
6131
6149
|
};
|
|
6132
6150
|
var KEEP = { kind: "keep" };
|
|
6133
|
-
function isRecord$
|
|
6151
|
+
function isRecord$4(value) {
|
|
6134
6152
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6135
6153
|
}
|
|
6136
6154
|
function defaultMintId() {
|
|
@@ -6143,7 +6161,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6143
6161
|
return out;
|
|
6144
6162
|
}
|
|
6145
6163
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6146
|
-
else if (isRecord$
|
|
6164
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6147
6165
|
return out;
|
|
6148
6166
|
}
|
|
6149
6167
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6198,7 +6216,7 @@ function rowId(row, idKey) {
|
|
|
6198
6216
|
return null;
|
|
6199
6217
|
}
|
|
6200
6218
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6201
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6219
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6202
6220
|
if (!Array.isArray(incoming)) {
|
|
6203
6221
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6204
6222
|
return {
|
|
@@ -6214,7 +6232,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6214
6232
|
const kept = /* @__PURE__ */ new Set();
|
|
6215
6233
|
const rows = [];
|
|
6216
6234
|
for (const row of incoming) {
|
|
6217
|
-
if (!isRecord$
|
|
6235
|
+
if (!isRecord$4(row)) {
|
|
6218
6236
|
rows.push(row);
|
|
6219
6237
|
continue;
|
|
6220
6238
|
}
|
|
@@ -6239,7 +6257,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6239
6257
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6240
6258
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6241
6259
|
case "object": {
|
|
6242
|
-
if (!isRecord$
|
|
6260
|
+
if (!isRecord$4(incoming)) {
|
|
6243
6261
|
if (incoming === void 0) return KEEP;
|
|
6244
6262
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6245
6263
|
return {
|
|
@@ -6247,7 +6265,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6247
6265
|
value: incoming
|
|
6248
6266
|
};
|
|
6249
6267
|
}
|
|
6250
|
-
const storedObj = isRecord$
|
|
6268
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6251
6269
|
return {
|
|
6252
6270
|
kind: "value",
|
|
6253
6271
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6370,7 +6388,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6370
6388
|
value: items
|
|
6371
6389
|
};
|
|
6372
6390
|
}
|
|
6373
|
-
if (isRecord$
|
|
6391
|
+
if (isRecord$4(v)) {
|
|
6374
6392
|
const out = {};
|
|
6375
6393
|
for (const [k, child] of Object.entries(v)) {
|
|
6376
6394
|
const s = substitute(child);
|
|
@@ -6402,7 +6420,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6402
6420
|
this.name = "SecretOverwriteRefusedError";
|
|
6403
6421
|
}
|
|
6404
6422
|
};
|
|
6405
|
-
function isRecord(value) {
|
|
6423
|
+
function isRecord$3(value) {
|
|
6406
6424
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6407
6425
|
}
|
|
6408
6426
|
function resolvedValue(pass, marker) {
|
|
@@ -6431,7 +6449,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6431
6449
|
return incoming.map((item, index) => {
|
|
6432
6450
|
const twin = stored[index];
|
|
6433
6451
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6434
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6452
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6435
6453
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6436
6454
|
return item;
|
|
6437
6455
|
});
|
|
@@ -6442,7 +6460,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6442
6460
|
const twin = stored[key];
|
|
6443
6461
|
if (isSecretMarker(twin)) {
|
|
6444
6462
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6445
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6463
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6446
6464
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6447
6465
|
}
|
|
6448
6466
|
return out;
|
|
@@ -6450,7 +6468,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6450
6468
|
async function walk(pass, incoming, stored) {
|
|
6451
6469
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6452
6470
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6453
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6471
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6454
6472
|
const out = { ...incoming };
|
|
6455
6473
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6456
6474
|
return out;
|
|
@@ -6481,7 +6499,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6481
6499
|
function isJsonEqual(a, b) {
|
|
6482
6500
|
if (Object.is(a, b)) return true;
|
|
6483
6501
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6484
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6502
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6485
6503
|
const keys = Object.keys(a);
|
|
6486
6504
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6487
6505
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6505,7 +6523,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6505
6523
|
}
|
|
6506
6524
|
function nodeFromStored(value, owner) {
|
|
6507
6525
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6508
|
-
if (!isRecord(value)) return null;
|
|
6526
|
+
if (!isRecord$3(value)) return null;
|
|
6509
6527
|
const children = /* @__PURE__ */ new Map();
|
|
6510
6528
|
for (const [key, child] of Object.entries(value)) {
|
|
6511
6529
|
const node = nodeFromStored(child, owner);
|
|
@@ -6638,7 +6656,6 @@ function createHandle(raw, opts) {
|
|
|
6638
6656
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6639
6657
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6640
6658
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6641
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6642
6659
|
const overrides = {
|
|
6643
6660
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6644
6661
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6662,12 +6679,12 @@ function createHandle(raw, opts) {
|
|
|
6662
6679
|
};
|
|
6663
6680
|
} } : {},
|
|
6664
6681
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6665
|
-
|
|
6666
|
-
const rows = await readDeviceStoreBatch
|
|
6682
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6683
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6667
6684
|
const out = /* @__PURE__ */ new Map();
|
|
6668
6685
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6669
6686
|
return out;
|
|
6670
|
-
}
|
|
6687
|
+
},
|
|
6671
6688
|
writeAddonStore: async (patch) => {
|
|
6672
6689
|
await writeAddon(patch);
|
|
6673
6690
|
},
|
|
@@ -7294,7 +7311,7 @@ var BaseAddon = class {
|
|
|
7294
7311
|
if (!ctx) return;
|
|
7295
7312
|
const addonId = ctx.id;
|
|
7296
7313
|
setImmediate(() => {
|
|
7297
|
-
ctx.api.addons
|
|
7314
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7298
7315
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7299
7316
|
}).catch((err) => {
|
|
7300
7317
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7494,7 +7511,7 @@ var BaseAddon = class {
|
|
|
7494
7511
|
return this._addonSecretTree;
|
|
7495
7512
|
}
|
|
7496
7513
|
deviceSecretTree() {
|
|
7497
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7514
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7498
7515
|
return this._deviceSecretTree;
|
|
7499
7516
|
}
|
|
7500
7517
|
/**
|
|
@@ -7570,42 +7587,135 @@ var BaseAddon = class {
|
|
|
7570
7587
|
this[timerOf] = timer;
|
|
7571
7588
|
}
|
|
7572
7589
|
/**
|
|
7573
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7574
|
-
*
|
|
7575
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7576
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7590
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7591
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7577
7592
|
* addon permanently broken.
|
|
7578
7593
|
*
|
|
7579
|
-
*
|
|
7580
|
-
*
|
|
7581
|
-
* `
|
|
7594
|
+
* Two kinds of outage, two budgets:
|
|
7595
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7596
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7597
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7598
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7599
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7600
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7601
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7602
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7603
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7604
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7582
7605
|
*/
|
|
7583
7606
|
async readAddonStoreWithRetry() {
|
|
7584
7607
|
const settings = this.rawSettings();
|
|
7585
7608
|
if (!settings) return {};
|
|
7586
|
-
const delaysMs = [
|
|
7587
|
-
150,
|
|
7588
|
-
350,
|
|
7589
|
-
600,
|
|
7590
|
-
900
|
|
7591
|
-
];
|
|
7592
7609
|
let lastErr;
|
|
7593
|
-
for (let attempt = 0
|
|
7610
|
+
for (let attempt = 0;; attempt++) try {
|
|
7594
7611
|
const stored = await settings.readAddonStore() ?? {};
|
|
7595
7612
|
this.settingsStoreReady = true;
|
|
7596
7613
|
return stored;
|
|
7597
7614
|
} catch (err) {
|
|
7598
7615
|
lastErr = err;
|
|
7599
|
-
const
|
|
7600
|
-
if (
|
|
7601
|
-
|
|
7602
|
-
|
|
7616
|
+
const kind = classifyStoreError(err);
|
|
7617
|
+
if (kind === "permanent") throw err;
|
|
7618
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7619
|
+
if (delay === void 0) {
|
|
7620
|
+
if (kind === "transport") throw err;
|
|
7621
|
+
break;
|
|
7622
|
+
}
|
|
7623
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7603
7624
|
}
|
|
7604
7625
|
this.settingsStoreReady = false;
|
|
7605
7626
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7606
7627
|
return {};
|
|
7607
7628
|
}
|
|
7608
7629
|
};
|
|
7630
|
+
/** The settings store's own restart fingerprints. */
|
|
7631
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7632
|
+
150,
|
|
7633
|
+
350,
|
|
7634
|
+
600,
|
|
7635
|
+
900
|
|
7636
|
+
];
|
|
7637
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7638
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7639
|
+
150,
|
|
7640
|
+
350,
|
|
7641
|
+
600,
|
|
7642
|
+
900,
|
|
7643
|
+
2e3,
|
|
7644
|
+
5e3,
|
|
7645
|
+
1e4,
|
|
7646
|
+
2e4,
|
|
7647
|
+
3e4,
|
|
7648
|
+
3e4
|
|
7649
|
+
];
|
|
7650
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7651
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7652
|
+
var TRANSPORT_CODES = new Set([
|
|
7653
|
+
"ECONNREFUSED",
|
|
7654
|
+
"ECONNRESET",
|
|
7655
|
+
"ETIMEDOUT",
|
|
7656
|
+
"EPIPE",
|
|
7657
|
+
"EHOSTUNREACH",
|
|
7658
|
+
"ENETUNREACH"
|
|
7659
|
+
]);
|
|
7660
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7661
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7662
|
+
"TIMEOUT",
|
|
7663
|
+
"SERVICE_UNAVAILABLE",
|
|
7664
|
+
"BAD_GATEWAY",
|
|
7665
|
+
"GATEWAY_TIMEOUT"
|
|
7666
|
+
]);
|
|
7667
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7668
|
+
var TRANSPORT_PHRASES = [
|
|
7669
|
+
"discovery deadline exceeded",
|
|
7670
|
+
"parent could not route child unowned cap call",
|
|
7671
|
+
"UDS request timed out after",
|
|
7672
|
+
"channel closed"
|
|
7673
|
+
];
|
|
7674
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7675
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7676
|
+
"REQUEST_TIMEOUT",
|
|
7677
|
+
"SERVICE_NOT_FOUND",
|
|
7678
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7679
|
+
"REQUEST_REJECTED",
|
|
7680
|
+
"BROKER_DISCONNECTED"
|
|
7681
|
+
]);
|
|
7682
|
+
function stringProp(value, key) {
|
|
7683
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7684
|
+
const found = Reflect.get(value, key);
|
|
7685
|
+
return typeof found === "string" ? found : void 0;
|
|
7686
|
+
}
|
|
7687
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7688
|
+
function errorCode(err) {
|
|
7689
|
+
const out = {};
|
|
7690
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7691
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7692
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7693
|
+
if (node !== void 0) out.node = node;
|
|
7694
|
+
const trpc = stringProp(data, "code");
|
|
7695
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7696
|
+
return out;
|
|
7697
|
+
}
|
|
7698
|
+
/**
|
|
7699
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7700
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7701
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7702
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7703
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7704
|
+
*/
|
|
7705
|
+
function classifyStoreError(err) {
|
|
7706
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7707
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7708
|
+
const code = errorCode(err);
|
|
7709
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7710
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7711
|
+
if (typeof err === "object" && err !== null) {
|
|
7712
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7713
|
+
const type = stringProp(err, "type");
|
|
7714
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7715
|
+
}
|
|
7716
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7717
|
+
return "permanent";
|
|
7718
|
+
}
|
|
7609
7719
|
/**
|
|
7610
7720
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7611
7721
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7695,6 +7805,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7695
7805
|
*/
|
|
7696
7806
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7697
7807
|
});
|
|
7808
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7809
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7810
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7811
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7812
|
+
var RECORD_CLASSES = [
|
|
7813
|
+
"config",
|
|
7814
|
+
"ledger",
|
|
7815
|
+
"audit",
|
|
7816
|
+
"mirror",
|
|
7817
|
+
"ephemeral"
|
|
7818
|
+
];
|
|
7819
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7820
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7821
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7822
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7823
|
+
function defOf(schema) {
|
|
7824
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7825
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7826
|
+
const def = Reflect.get(zodBag, "def");
|
|
7827
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7828
|
+
return def;
|
|
7829
|
+
}
|
|
7830
|
+
function declaredHere(schema) {
|
|
7831
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7832
|
+
}
|
|
7833
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7834
|
+
var WRAPPERS = new Set([
|
|
7835
|
+
"optional",
|
|
7836
|
+
"nullable",
|
|
7837
|
+
"default",
|
|
7838
|
+
"prefault",
|
|
7839
|
+
"catch",
|
|
7840
|
+
"readonly",
|
|
7841
|
+
"nonoptional"
|
|
7842
|
+
]);
|
|
7843
|
+
/**
|
|
7844
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7845
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7846
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7847
|
+
* `.transform` on `in`).
|
|
7848
|
+
*/
|
|
7849
|
+
function layersOf(schema) {
|
|
7850
|
+
const out = [];
|
|
7851
|
+
const queue = [schema];
|
|
7852
|
+
while (queue.length > 0) {
|
|
7853
|
+
const s = queue.shift();
|
|
7854
|
+
if (!s || out.includes(s)) continue;
|
|
7855
|
+
out.push(s);
|
|
7856
|
+
const def = defOf(s);
|
|
7857
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7858
|
+
if (def.type === "pipe") {
|
|
7859
|
+
if (def.in) queue.push(def.in);
|
|
7860
|
+
if (def.out) queue.push(def.out);
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7863
|
+
return out;
|
|
7864
|
+
}
|
|
7865
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7866
|
+
function isZodSecret(schema) {
|
|
7867
|
+
return layersOf(schema).some(declaredHere);
|
|
7868
|
+
}
|
|
7869
|
+
/**
|
|
7870
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7871
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7872
|
+
* object or array is reported as one path and not descended into — everything
|
|
7873
|
+
* under it is secret.
|
|
7874
|
+
*/
|
|
7875
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7876
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7877
|
+
const paths = [];
|
|
7878
|
+
for (const layer of layersOf(schema)) {
|
|
7879
|
+
const def = defOf(layer);
|
|
7880
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7881
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7882
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7883
|
+
else if (def.type === "intersection") {
|
|
7884
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7885
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7886
|
+
}
|
|
7887
|
+
}
|
|
7888
|
+
return [...new Set(paths)];
|
|
7889
|
+
}
|
|
7890
|
+
/**
|
|
7891
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7892
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7893
|
+
* JSON the engine stores.
|
|
7894
|
+
*
|
|
7895
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7896
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7897
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7898
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7899
|
+
* never a field name (D879).
|
|
7900
|
+
*/
|
|
7901
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7902
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7903
|
+
var RecordIndexSchema = object({
|
|
7904
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7905
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7906
|
+
unique: boolean().optional()
|
|
7907
|
+
}).strict();
|
|
7908
|
+
var RecordRetentionSchema = union([
|
|
7909
|
+
object({
|
|
7910
|
+
ttlMs: number().int().positive(),
|
|
7911
|
+
from: _enum(["at", "write"])
|
|
7912
|
+
}).strict(),
|
|
7913
|
+
object({
|
|
7914
|
+
maxRows: number().int().positive().optional(),
|
|
7915
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7916
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7917
|
+
object({
|
|
7918
|
+
owner: string().min(1),
|
|
7919
|
+
reason: string().min(1)
|
|
7920
|
+
}).strict(),
|
|
7921
|
+
object({ none: string().min(1) }).strict()
|
|
7922
|
+
]);
|
|
7923
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7924
|
+
var EntryDescriptorSchema = object({
|
|
7925
|
+
title: string().min(1),
|
|
7926
|
+
/** The record body field shown as the entry's name. */
|
|
7927
|
+
nameField: string().min(1),
|
|
7928
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7929
|
+
fields: record(string(), unknown())
|
|
7930
|
+
}).strict();
|
|
7931
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7932
|
+
var RecordKindDeclarationSchema = object({
|
|
7933
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7934
|
+
class: _enum(RECORD_CLASSES),
|
|
7935
|
+
writeTrigger: string().min(1),
|
|
7936
|
+
device: _enum([
|
|
7937
|
+
"required",
|
|
7938
|
+
"optional",
|
|
7939
|
+
"none"
|
|
7940
|
+
]).default("none"),
|
|
7941
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7942
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7943
|
+
retention: RecordRetentionSchema,
|
|
7944
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7945
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7946
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7947
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7948
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7949
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7950
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7951
|
+
adoptsFrom: string().min(1).optional(),
|
|
7952
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7953
|
+
transactFamily: string().min(1).optional(),
|
|
7954
|
+
entry: EntryDescriptorSchema.optional()
|
|
7955
|
+
}).strict();
|
|
7956
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7957
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7698
7958
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7699
7959
|
var CamProfileSchema = _enum([
|
|
7700
7960
|
"high",
|
|
@@ -8159,69 +8419,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8159
8419
|
kind: "mutation",
|
|
8160
8420
|
auth: "admin"
|
|
8161
8421
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8162
|
-
function defOf(schema) {
|
|
8163
|
-
return schema._zod?.def ?? {};
|
|
8164
|
-
}
|
|
8165
|
-
function declaredHere(schema) {
|
|
8166
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8167
|
-
}
|
|
8168
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8169
|
-
var WRAPPERS = new Set([
|
|
8170
|
-
"optional",
|
|
8171
|
-
"nullable",
|
|
8172
|
-
"default",
|
|
8173
|
-
"prefault",
|
|
8174
|
-
"catch",
|
|
8175
|
-
"readonly",
|
|
8176
|
-
"nonoptional"
|
|
8177
|
-
]);
|
|
8178
|
-
/**
|
|
8179
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8180
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8181
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8182
|
-
* `.transform` on `in`).
|
|
8183
|
-
*/
|
|
8184
|
-
function layersOf(schema) {
|
|
8185
|
-
const out = [];
|
|
8186
|
-
const queue = [schema];
|
|
8187
|
-
while (queue.length > 0) {
|
|
8188
|
-
const s = queue.shift();
|
|
8189
|
-
if (!s || out.includes(s)) continue;
|
|
8190
|
-
out.push(s);
|
|
8191
|
-
const def = defOf(s);
|
|
8192
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8193
|
-
if (def.type === "pipe") {
|
|
8194
|
-
if (def.in) queue.push(def.in);
|
|
8195
|
-
if (def.out) queue.push(def.out);
|
|
8196
|
-
}
|
|
8197
|
-
}
|
|
8198
|
-
return out;
|
|
8199
|
-
}
|
|
8200
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8201
|
-
function isZodSecret(schema) {
|
|
8202
|
-
return layersOf(schema).some(declaredHere);
|
|
8203
|
-
}
|
|
8204
|
-
/**
|
|
8205
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8206
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8207
|
-
* object or array is reported as one path and not descended into — everything
|
|
8208
|
-
* under it is secret.
|
|
8209
|
-
*/
|
|
8210
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8211
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8212
|
-
const paths = [];
|
|
8213
|
-
for (const layer of layersOf(schema)) {
|
|
8214
|
-
const def = defOf(layer);
|
|
8215
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8216
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8217
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8218
|
-
else if (def.type === "intersection") {
|
|
8219
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8220
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8221
|
-
}
|
|
8222
|
-
}
|
|
8223
|
-
return [...new Set(paths)];
|
|
8224
|
-
}
|
|
8225
8422
|
object({
|
|
8226
8423
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8227
8424
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8316,7 +8513,7 @@ function maskUrlCredentials(rawUrl) {
|
|
|
8316
8513
|
}
|
|
8317
8514
|
}
|
|
8318
8515
|
//#endregion
|
|
8319
|
-
//#region ../types/dist/err-msg-
|
|
8516
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8320
8517
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8321
8518
|
DeviceType["Camera"] = "camera";
|
|
8322
8519
|
DeviceType["Hub"] = "hub";
|
|
@@ -8408,6 +8605,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8408
8605
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8409
8606
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8410
8607
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8608
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8609
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8610
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8611
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8411
8612
|
return DeviceType;
|
|
8412
8613
|
}({});
|
|
8413
8614
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8585,6 +8786,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8585
8786
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8586
8787
|
* real Switch device for UI rendering / export adapters. */
|
|
8587
8788
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8789
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8790
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8791
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8588
8792
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8589
8793
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8590
8794
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8662,7 +8866,7 @@ function errMsg(err) {
|
|
|
8662
8866
|
return String(err);
|
|
8663
8867
|
}
|
|
8664
8868
|
//#endregion
|
|
8665
|
-
//#region ../types/dist/composition-
|
|
8869
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8666
8870
|
/**
|
|
8667
8871
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8668
8872
|
*
|
|
@@ -11898,11 +12102,10 @@ var ClipModelMetaSchema = object({
|
|
|
11898
12102
|
/**
|
|
11899
12103
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11900
12104
|
* per index: two models share an index only when their vectors are ranked
|
|
11901
|
-
* against each other, which for CLIP means never across families.
|
|
11902
|
-
*
|
|
11903
|
-
* `modelId`); any other model gets its own.
|
|
12105
|
+
* against each other, which for CLIP means never across families. Every
|
|
12106
|
+
* model gets its own.
|
|
11904
12107
|
*/
|
|
11905
|
-
vectorIndex: string().regex(/^object-clip
|
|
12108
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11906
12109
|
/**
|
|
11907
12110
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11908
12111
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -13081,8 +13284,13 @@ var AlertSeveritySchema = _enum([
|
|
|
13081
13284
|
"info",
|
|
13082
13285
|
"success",
|
|
13083
13286
|
"warning",
|
|
13084
|
-
"error"
|
|
13287
|
+
"error",
|
|
13288
|
+
"critical"
|
|
13085
13289
|
]);
|
|
13290
|
+
var AlertActionSchema = object({
|
|
13291
|
+
label: string(),
|
|
13292
|
+
href: string().optional()
|
|
13293
|
+
});
|
|
13086
13294
|
var AlertStatusSchema = _enum([
|
|
13087
13295
|
"active",
|
|
13088
13296
|
"in-progress",
|
|
@@ -13100,6 +13308,7 @@ var AlertSchema = object({
|
|
|
13100
13308
|
severity: AlertSeveritySchema,
|
|
13101
13309
|
title: string(),
|
|
13102
13310
|
message: string(),
|
|
13311
|
+
action: AlertActionSchema.optional(),
|
|
13103
13312
|
status: AlertStatusSchema,
|
|
13104
13313
|
progress: number().optional(),
|
|
13105
13314
|
read: boolean(),
|
|
@@ -15635,6 +15844,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15635
15844
|
keyField: string()
|
|
15636
15845
|
}).optional()
|
|
15637
15846
|
})) });
|
|
15847
|
+
/**
|
|
15848
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
15849
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
15850
|
+
*
|
|
15851
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
15852
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
15853
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
15854
|
+
*/
|
|
15855
|
+
var RawSecretMigrationInputSchema = object({
|
|
15856
|
+
/** `false` (the default of the script) = report only. */
|
|
15857
|
+
apply: boolean() });
|
|
15858
|
+
var RawSecretMigrationReportSchema = object({
|
|
15859
|
+
apply: boolean(),
|
|
15860
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
15861
|
+
rows: number().int(),
|
|
15862
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
15863
|
+
raw: number().int(),
|
|
15864
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
15865
|
+
markers: number().int(),
|
|
15866
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
15867
|
+
migrated: number().int(),
|
|
15868
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
15869
|
+
failed: number().int(),
|
|
15870
|
+
/** After the run: rows still holding plaintext. */
|
|
15871
|
+
remainingRaw: number().int(),
|
|
15872
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
15873
|
+
unresolvedMarkers: number().int(),
|
|
15874
|
+
/**
|
|
15875
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
15876
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
15877
|
+
*/
|
|
15878
|
+
redundantCopies: number().int().optional(),
|
|
15879
|
+
/** True when nothing is raw and every marker resolves. */
|
|
15880
|
+
verified: boolean()
|
|
15881
|
+
});
|
|
15638
15882
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15639
15883
|
* agent is the reason placement is not fixed to the hub. */
|
|
15640
15884
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15861,6 +16105,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15861
16105
|
}), SettingsUpdateResultSchema, {
|
|
15862
16106
|
kind: "mutation",
|
|
15863
16107
|
auth: "admin"
|
|
16108
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16109
|
+
kind: "mutation",
|
|
16110
|
+
auth: "admin"
|
|
15864
16111
|
}), method(object({}), object({ libs: array(object({
|
|
15865
16112
|
filePath: string(),
|
|
15866
16113
|
content: string()
|
|
@@ -16124,6 +16371,347 @@ id: union([string(), number()]) }), {
|
|
|
16124
16371
|
auth: "admin"
|
|
16125
16372
|
});
|
|
16126
16373
|
/**
|
|
16374
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16375
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16376
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16377
|
+
*
|
|
16378
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16379
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16380
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16381
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16382
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16383
|
+
* addons go through the owner's capability.
|
|
16384
|
+
*
|
|
16385
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16386
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16387
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16388
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16389
|
+
* row's own ref.
|
|
16390
|
+
*
|
|
16391
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16392
|
+
*/
|
|
16393
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16394
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16395
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16396
|
+
var RecordInputSchema = object({
|
|
16397
|
+
id: RecordIdSchema,
|
|
16398
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16399
|
+
deviceId: number().int().optional(),
|
|
16400
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16401
|
+
at: number().int().optional(),
|
|
16402
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16403
|
+
expiresAt: number().int().optional(),
|
|
16404
|
+
data: RecordBodySchema
|
|
16405
|
+
});
|
|
16406
|
+
var RecordViewSchema = object({
|
|
16407
|
+
id: string(),
|
|
16408
|
+
deviceId: number().int().nullable(),
|
|
16409
|
+
at: number().nullable(),
|
|
16410
|
+
expiresAt: number().nullable(),
|
|
16411
|
+
rev: number().int(),
|
|
16412
|
+
updatedAt: number(),
|
|
16413
|
+
data: RecordBodySchema
|
|
16414
|
+
});
|
|
16415
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16416
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16417
|
+
string(),
|
|
16418
|
+
number(),
|
|
16419
|
+
boolean(),
|
|
16420
|
+
object({ in: array(union([
|
|
16421
|
+
string(),
|
|
16422
|
+
number(),
|
|
16423
|
+
boolean()
|
|
16424
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16425
|
+
object({
|
|
16426
|
+
gt: union([string(), number()]).optional(),
|
|
16427
|
+
gte: union([string(), number()]).optional(),
|
|
16428
|
+
lt: union([string(), number()]).optional(),
|
|
16429
|
+
lte: union([string(), number()]).optional()
|
|
16430
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16431
|
+
]));
|
|
16432
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16433
|
+
var TimeWindowShape = {
|
|
16434
|
+
deviceId: number().int().optional(),
|
|
16435
|
+
atFrom: number().optional(),
|
|
16436
|
+
atTo: number().optional()
|
|
16437
|
+
};
|
|
16438
|
+
var RecordQueryInputSchema = object({
|
|
16439
|
+
...KindShape,
|
|
16440
|
+
...TimeWindowShape,
|
|
16441
|
+
where: RecordWhereSchema.optional(),
|
|
16442
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16443
|
+
order: _enum(["at", "id"]).optional(),
|
|
16444
|
+
desc: boolean().optional(),
|
|
16445
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16446
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16447
|
+
cursor: string().min(1).optional()
|
|
16448
|
+
});
|
|
16449
|
+
var RecordQueryResultSchema = object({
|
|
16450
|
+
records: array(RecordViewSchema),
|
|
16451
|
+
nextCursor: string().nullable()
|
|
16452
|
+
});
|
|
16453
|
+
var RecordKindStateSchema = _enum([
|
|
16454
|
+
"created",
|
|
16455
|
+
"unchanged",
|
|
16456
|
+
"updated"
|
|
16457
|
+
]);
|
|
16458
|
+
var DeclareKindResultSchema = object({
|
|
16459
|
+
kindId: number().int(),
|
|
16460
|
+
state: RecordKindStateSchema,
|
|
16461
|
+
createdIndexes: array(string()),
|
|
16462
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16463
|
+
adoptionPending: object({
|
|
16464
|
+
legacyTable: string(),
|
|
16465
|
+
legacyRows: number().int()
|
|
16466
|
+
}).nullable()
|
|
16467
|
+
});
|
|
16468
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16469
|
+
var SecretRefsList = array(string());
|
|
16470
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16471
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16472
|
+
kind: "mutation",
|
|
16473
|
+
auth: "admin"
|
|
16474
|
+
}), method(object({
|
|
16475
|
+
...KindShape,
|
|
16476
|
+
id: RecordIdSchema
|
|
16477
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16478
|
+
...KindShape,
|
|
16479
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16480
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16481
|
+
...KindShape,
|
|
16482
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16483
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16484
|
+
...KindShape,
|
|
16485
|
+
record: RecordInputSchema,
|
|
16486
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16487
|
+
ifRev: number().int().min(0).optional()
|
|
16488
|
+
}), object({
|
|
16489
|
+
rev: number().int(),
|
|
16490
|
+
releasedRefs: SecretRefsList
|
|
16491
|
+
}), {
|
|
16492
|
+
kind: "mutation",
|
|
16493
|
+
auth: "admin"
|
|
16494
|
+
}), method(object({
|
|
16495
|
+
...KindShape,
|
|
16496
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16497
|
+
}), object({
|
|
16498
|
+
count: number().int(),
|
|
16499
|
+
releasedRefs: SecretRefsList
|
|
16500
|
+
}), {
|
|
16501
|
+
kind: "mutation",
|
|
16502
|
+
auth: "admin"
|
|
16503
|
+
}), method(object({
|
|
16504
|
+
...KindShape,
|
|
16505
|
+
id: RecordIdSchema,
|
|
16506
|
+
data: RecordBodySchema,
|
|
16507
|
+
at: number().int().nullable().optional(),
|
|
16508
|
+
expiresAt: number().int().nullable().optional(),
|
|
16509
|
+
ifRev: number().int().min(1).optional()
|
|
16510
|
+
}), object({
|
|
16511
|
+
rev: number().int(),
|
|
16512
|
+
releasedRefs: SecretRefsList
|
|
16513
|
+
}), {
|
|
16514
|
+
kind: "mutation",
|
|
16515
|
+
auth: "admin"
|
|
16516
|
+
}), method(object({
|
|
16517
|
+
...KindShape,
|
|
16518
|
+
id: RecordIdSchema
|
|
16519
|
+
}), object({
|
|
16520
|
+
deleted: boolean(),
|
|
16521
|
+
secretRefs: SecretRefsList
|
|
16522
|
+
}), {
|
|
16523
|
+
kind: "mutation",
|
|
16524
|
+
auth: "admin"
|
|
16525
|
+
}), method(object({
|
|
16526
|
+
...KindShape,
|
|
16527
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16528
|
+
}), object({
|
|
16529
|
+
deleted: number().int(),
|
|
16530
|
+
secretRefs: SecretRefsList
|
|
16531
|
+
}), {
|
|
16532
|
+
kind: "mutation",
|
|
16533
|
+
auth: "admin"
|
|
16534
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16535
|
+
...KindShape,
|
|
16536
|
+
...TimeWindowShape,
|
|
16537
|
+
where: RecordWhereSchema.optional()
|
|
16538
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
16539
|
+
...KindShape,
|
|
16540
|
+
deviceId: number().int().optional(),
|
|
16541
|
+
from: number(),
|
|
16542
|
+
to: number(),
|
|
16543
|
+
bucketMs: number().int().positive()
|
|
16544
|
+
}), object({ buckets: array(object({
|
|
16545
|
+
bucketStart: number(),
|
|
16546
|
+
count: number().int()
|
|
16547
|
+
})) }), { auth: "admin" }), method(object({
|
|
16548
|
+
...KindShape,
|
|
16549
|
+
op: _enum([
|
|
16550
|
+
"sum",
|
|
16551
|
+
"min",
|
|
16552
|
+
"max",
|
|
16553
|
+
"count"
|
|
16554
|
+
]),
|
|
16555
|
+
field: RecordFieldPathSchema.optional(),
|
|
16556
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
16557
|
+
where: RecordWhereSchema.optional()
|
|
16558
|
+
}), object({ rows: array(object({
|
|
16559
|
+
group: union([
|
|
16560
|
+
string(),
|
|
16561
|
+
number(),
|
|
16562
|
+
_null()
|
|
16563
|
+
]),
|
|
16564
|
+
value: number().nullable()
|
|
16565
|
+
})) }), { auth: "admin" }), method(object({
|
|
16566
|
+
...KindShape,
|
|
16567
|
+
deviceId: number().int().optional(),
|
|
16568
|
+
atBefore: number().optional(),
|
|
16569
|
+
where: RecordWhereSchema.optional()
|
|
16570
|
+
}), object({
|
|
16571
|
+
deleted: number().int(),
|
|
16572
|
+
secretRefs: SecretRefsList
|
|
16573
|
+
}), {
|
|
16574
|
+
kind: "mutation",
|
|
16575
|
+
auth: "admin"
|
|
16576
|
+
}), method(object({
|
|
16577
|
+
deviceId: number().int(),
|
|
16578
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
16579
|
+
}), object({
|
|
16580
|
+
deleted: record(string(), number().int()),
|
|
16581
|
+
secretRefs: SecretRefsList
|
|
16582
|
+
}), {
|
|
16583
|
+
kind: "mutation",
|
|
16584
|
+
auth: "admin"
|
|
16585
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
16586
|
+
kind: "mutation",
|
|
16587
|
+
auth: "admin"
|
|
16588
|
+
});
|
|
16589
|
+
/** One table of the settings database. */
|
|
16590
|
+
var StorageTableSchema = object({
|
|
16591
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
16592
|
+
name: string(),
|
|
16593
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
16594
|
+
owner: string().nullable(),
|
|
16595
|
+
rows: number().int().nonnegative(),
|
|
16596
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
16597
|
+
bytes: number().int().nonnegative().nullable(),
|
|
16598
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
16599
|
+
declaredThisBoot: boolean()
|
|
16600
|
+
});
|
|
16601
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
16602
|
+
var StorageKindSchema = object({
|
|
16603
|
+
owner: string(),
|
|
16604
|
+
kind: string(),
|
|
16605
|
+
database: _enum(["settings", "events"]),
|
|
16606
|
+
class: string(),
|
|
16607
|
+
state: _enum([
|
|
16608
|
+
"declared",
|
|
16609
|
+
"orphaned",
|
|
16610
|
+
"dropped"
|
|
16611
|
+
]),
|
|
16612
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
16613
|
+
rows: number().int().nonnegative().nullable(),
|
|
16614
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
16615
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
16616
|
+
writeTrigger: string(),
|
|
16617
|
+
retention: RecordRetentionSchema,
|
|
16618
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
16619
|
+
entry: boolean(),
|
|
16620
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
16621
|
+
declaration: RecordKindDeclarationSchema
|
|
16622
|
+
});
|
|
16623
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
16624
|
+
collection: string().min(1),
|
|
16625
|
+
expectRows: number().int().nonnegative()
|
|
16626
|
+
}), object({
|
|
16627
|
+
dropped: literal(true),
|
|
16628
|
+
rows: number().int().nonnegative()
|
|
16629
|
+
}), {
|
|
16630
|
+
kind: "mutation",
|
|
16631
|
+
auth: "admin"
|
|
16632
|
+
}), method(object({
|
|
16633
|
+
owner: string().min(1).optional(),
|
|
16634
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
16635
|
+
counts: boolean().optional()
|
|
16636
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
16637
|
+
owner: string().min(1),
|
|
16638
|
+
kind: RecordKindNameSchema
|
|
16639
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16640
|
+
owner: string().min(1),
|
|
16641
|
+
kind: RecordKindNameSchema,
|
|
16642
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
16643
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
16644
|
+
complete: boolean().optional()
|
|
16645
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
16646
|
+
kind: "mutation",
|
|
16647
|
+
auth: "admin"
|
|
16648
|
+
}), method(object({
|
|
16649
|
+
collection: string().min(1),
|
|
16650
|
+
cursor: string().optional(),
|
|
16651
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
16652
|
+
}), object({
|
|
16653
|
+
rows: array(object({
|
|
16654
|
+
id: string(),
|
|
16655
|
+
data: record(string(), unknown())
|
|
16656
|
+
})),
|
|
16657
|
+
nextCursor: string().nullable()
|
|
16658
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
16659
|
+
/**
|
|
16660
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
16661
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
16662
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
16663
|
+
*
|
|
16664
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
16665
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
16666
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
16667
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
16668
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
16669
|
+
* a secret value, and a locked keychain refuses the write with
|
|
16670
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
16671
|
+
*
|
|
16672
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
16673
|
+
*/
|
|
16674
|
+
var EntryKindInfoSchema = object({
|
|
16675
|
+
owner: string(),
|
|
16676
|
+
kind: RecordKindNameSchema,
|
|
16677
|
+
title: string(),
|
|
16678
|
+
nameField: string(),
|
|
16679
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
16680
|
+
fields: record(string(), unknown()),
|
|
16681
|
+
secretPaths: array(string()),
|
|
16682
|
+
rows: number().int().nonnegative()
|
|
16683
|
+
});
|
|
16684
|
+
var EntryViewSchema = object({
|
|
16685
|
+
id: RecordIdSchema,
|
|
16686
|
+
name: string(),
|
|
16687
|
+
rev: number().int(),
|
|
16688
|
+
updatedAt: number(),
|
|
16689
|
+
/** Secret fields hold the redaction token. */
|
|
16690
|
+
data: RecordBodySchema
|
|
16691
|
+
});
|
|
16692
|
+
var EntryAddress = {
|
|
16693
|
+
owner: string().min(1),
|
|
16694
|
+
kind: RecordKindNameSchema
|
|
16695
|
+
};
|
|
16696
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
16697
|
+
...EntryAddress,
|
|
16698
|
+
id: RecordIdSchema.optional(),
|
|
16699
|
+
data: RecordBodySchema,
|
|
16700
|
+
ifRev: number().int().min(1).optional()
|
|
16701
|
+
}), object({
|
|
16702
|
+
id: string(),
|
|
16703
|
+
rev: number().int()
|
|
16704
|
+
}), {
|
|
16705
|
+
kind: "mutation",
|
|
16706
|
+
auth: "admin"
|
|
16707
|
+
}), method(object({
|
|
16708
|
+
...EntryAddress,
|
|
16709
|
+
id: RecordIdSchema
|
|
16710
|
+
}), object({ deleted: boolean() }), {
|
|
16711
|
+
kind: "mutation",
|
|
16712
|
+
auth: "admin"
|
|
16713
|
+
});
|
|
16714
|
+
/**
|
|
16127
16715
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16128
16716
|
*
|
|
16129
16717
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16664,6 +17252,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16664
17252
|
kind: "mutation",
|
|
16665
17253
|
auth: "admin",
|
|
16666
17254
|
caller: "required"
|
|
17255
|
+
}), method(object({
|
|
17256
|
+
ref: string().min(1),
|
|
17257
|
+
value: string().min(1)
|
|
17258
|
+
}), object({
|
|
17259
|
+
ref: string(),
|
|
17260
|
+
version: number().int()
|
|
17261
|
+
}), {
|
|
17262
|
+
kind: "mutation",
|
|
17263
|
+
auth: "admin",
|
|
17264
|
+
caller: "required"
|
|
16667
17265
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16668
17266
|
deleted: array(string()).readonly(),
|
|
16669
17267
|
kept: array(object({
|
|
@@ -39325,6 +39923,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39325
39923
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39326
39924
|
kind: "mutation",
|
|
39327
39925
|
auth: "admin"
|
|
39926
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
39927
|
+
kind: "mutation",
|
|
39928
|
+
auth: "admin"
|
|
39328
39929
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39329
39930
|
kind: "mutation",
|
|
39330
39931
|
auth: "admin"
|
|
@@ -49834,6 +50435,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49834
50435
|
atMs: number(),
|
|
49835
50436
|
reason: string()
|
|
49836
50437
|
});
|
|
50438
|
+
/**
|
|
50439
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50440
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50441
|
+
* service holds, because only the hub plans) against the states the process
|
|
50442
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50443
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50444
|
+
*
|
|
50445
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50446
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50447
|
+
* planned runner the process service has no entry for.
|
|
50448
|
+
*/
|
|
50449
|
+
var RunnerRefusalSchema = object({
|
|
50450
|
+
runnerId: string(),
|
|
50451
|
+
addonIds: array(string()),
|
|
50452
|
+
reason: string()
|
|
50453
|
+
});
|
|
50454
|
+
var RunnerBootCheckSchema = object({
|
|
50455
|
+
checkedAtMs: number(),
|
|
50456
|
+
/** Runners planned for this node. */
|
|
50457
|
+
expected: number(),
|
|
50458
|
+
/** Planned runners whose process is `running`. */
|
|
50459
|
+
running: number(),
|
|
50460
|
+
failed: array(string()),
|
|
50461
|
+
refused: array(RunnerRefusalSchema),
|
|
50462
|
+
missing: array(string()),
|
|
50463
|
+
/**
|
|
50464
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50465
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50466
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50467
|
+
* Optional for version skew (absent = settled).
|
|
50468
|
+
*/
|
|
50469
|
+
pending: array(string()).optional(),
|
|
50470
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50471
|
+
planKnown: boolean()
|
|
50472
|
+
});
|
|
49837
50473
|
var ServerPackageStatusSchema = object({
|
|
49838
50474
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49839
50475
|
packageName: string(),
|
|
@@ -49896,7 +50532,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49896
50532
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49897
50533
|
* absent wrapper is unknown — never `native`.
|
|
49898
50534
|
*/
|
|
49899
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50535
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50536
|
+
/**
|
|
50537
|
+
* What this node PLANNED to run against what its process service reports
|
|
50538
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50539
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50540
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50541
|
+
*/
|
|
50542
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49900
50543
|
});
|
|
49901
50544
|
var ServerUpdateCheckResultSchema = object({
|
|
49902
50545
|
packageName: string(),
|
|
@@ -49947,6 +50590,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49947
50590
|
"refused",
|
|
49948
50591
|
"failed"
|
|
49949
50592
|
]);
|
|
50593
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50594
|
+
var UpdateBlockerSchema = object({
|
|
50595
|
+
addonId: string(),
|
|
50596
|
+
reason: string(),
|
|
50597
|
+
/** What the operator does about it. */
|
|
50598
|
+
remedy: string()
|
|
50599
|
+
});
|
|
49950
50600
|
var ServerUpdateActionResultSchema = object({
|
|
49951
50601
|
accepted: boolean(),
|
|
49952
50602
|
targetVersion: string().nullable(),
|
|
@@ -49964,14 +50614,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49964
50614
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49965
50615
|
* staging install). Non-null only for `failed`.
|
|
49966
50616
|
*/
|
|
49967
|
-
error: string().nullable().optional()
|
|
50617
|
+
error: string().nullable().optional(),
|
|
50618
|
+
/**
|
|
50619
|
+
* The addons the target version would refuse to start on this node's live
|
|
50620
|
+
* store (D877), present when the pre-flight refused the update
|
|
50621
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50622
|
+
*/
|
|
50623
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49968
50624
|
});
|
|
49969
50625
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49970
50626
|
kind: "mutation",
|
|
49971
50627
|
auth: "admin"
|
|
49972
|
-
}), method(object({
|
|
49973
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49974
|
-
version: string().optional()
|
|
50628
|
+
}), method(object({
|
|
50629
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50630
|
+
version: string().optional(),
|
|
50631
|
+
/**
|
|
50632
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50633
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50634
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50635
|
+
*/
|
|
50636
|
+
acknowledgeRefusals: boolean().optional()
|
|
50637
|
+
}), ServerUpdateActionResultSchema, {
|
|
49975
50638
|
kind: "mutation",
|
|
49976
50639
|
auth: "admin",
|
|
49977
50640
|
timeoutMs: 16 * 6e4
|
|
@@ -52521,7 +53184,9 @@ var ManifestShapeSchema = object({
|
|
|
52521
53184
|
var AddonProcessSchema = object({
|
|
52522
53185
|
pid: number().optional(),
|
|
52523
53186
|
mode: string(),
|
|
52524
|
-
state: string()
|
|
53187
|
+
state: string(),
|
|
53188
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53189
|
+
reason: string().optional()
|
|
52525
53190
|
});
|
|
52526
53191
|
/**
|
|
52527
53192
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -53289,7 +53954,8 @@ var batteryCapability = {
|
|
|
53289
53954
|
DeviceType.Button,
|
|
53290
53955
|
DeviceType.Switch,
|
|
53291
53956
|
DeviceType.PetFeeder,
|
|
53292
|
-
DeviceType.Container
|
|
53957
|
+
DeviceType.Container,
|
|
53958
|
+
DeviceType.Thermostat
|
|
53293
53959
|
],
|
|
53294
53960
|
methods: {
|
|
53295
53961
|
/**
|
|
@@ -53910,6 +54576,12 @@ var ClimateControlStatusSchema = object({
|
|
|
53910
54576
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53911
54577
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53912
54578
|
swingHorizontal: boolean().nullable(),
|
|
54579
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54580
|
+
minTemp: number().nullable().optional(),
|
|
54581
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54582
|
+
maxTemp: number().nullable().optional(),
|
|
54583
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54584
|
+
tempStep: number().positive().nullable().optional(),
|
|
53913
54585
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53914
54586
|
lastFetchedAt: number()
|
|
53915
54587
|
});
|
|
@@ -54764,6 +55436,125 @@ onStatusChanged: { data: object({
|
|
|
54764
55436
|
* whether persisting is worth a SQLite commit. */
|
|
54765
55437
|
volatileStateFields: ["lastChangedAt"]
|
|
54766
55438
|
};
|
|
55439
|
+
/**
|
|
55440
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
55441
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
55442
|
+
*
|
|
55443
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
55444
|
+
* by any integration that exposes the same program / option surface.
|
|
55445
|
+
*
|
|
55446
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55447
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55448
|
+
*/
|
|
55449
|
+
var DishwasherStateSchema = _enum([
|
|
55450
|
+
"idle",
|
|
55451
|
+
"running",
|
|
55452
|
+
"paused",
|
|
55453
|
+
"finished",
|
|
55454
|
+
"error",
|
|
55455
|
+
"unavailable"
|
|
55456
|
+
]);
|
|
55457
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
55458
|
+
"ok",
|
|
55459
|
+
"low",
|
|
55460
|
+
"empty"
|
|
55461
|
+
]);
|
|
55462
|
+
var DishwasherStatusSchema = object({
|
|
55463
|
+
state: DishwasherStateSchema,
|
|
55464
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
55465
|
+
program: string().nullable(),
|
|
55466
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
55467
|
+
availablePrograms: array(string()),
|
|
55468
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
55469
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
55470
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
55471
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
55472
|
+
/** True when the door is reported open. */
|
|
55473
|
+
doorOpen: boolean(),
|
|
55474
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
55475
|
+
remoteStartAllowed: boolean(),
|
|
55476
|
+
/** Main power / switched-on state. */
|
|
55477
|
+
powerOn: boolean(),
|
|
55478
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55479
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55480
|
+
halfLoad: boolean(),
|
|
55481
|
+
hygienePlus: boolean(),
|
|
55482
|
+
errorCode: number().nullable(),
|
|
55483
|
+
errorLabel: string().nullable(),
|
|
55484
|
+
lastFetchedAt: number()
|
|
55485
|
+
});
|
|
55486
|
+
var dishwasherCapability = {
|
|
55487
|
+
name: "dishwasher",
|
|
55488
|
+
scope: "device",
|
|
55489
|
+
deviceNative: true,
|
|
55490
|
+
mode: "singleton",
|
|
55491
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
55492
|
+
methods: {
|
|
55493
|
+
start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55494
|
+
kind: "mutation",
|
|
55495
|
+
auth: "protected"
|
|
55496
|
+
}),
|
|
55497
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55498
|
+
kind: "mutation",
|
|
55499
|
+
auth: "protected"
|
|
55500
|
+
}),
|
|
55501
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55502
|
+
kind: "mutation",
|
|
55503
|
+
auth: "protected"
|
|
55504
|
+
}),
|
|
55505
|
+
setProgram: method(object({
|
|
55506
|
+
deviceId: number().int().nonnegative(),
|
|
55507
|
+
program: string().min(1)
|
|
55508
|
+
}), _void(), {
|
|
55509
|
+
kind: "mutation",
|
|
55510
|
+
auth: "protected"
|
|
55511
|
+
}),
|
|
55512
|
+
setPower: method(object({
|
|
55513
|
+
deviceId: number().int().nonnegative(),
|
|
55514
|
+
on: boolean()
|
|
55515
|
+
}), _void(), {
|
|
55516
|
+
kind: "mutation",
|
|
55517
|
+
auth: "protected"
|
|
55518
|
+
}),
|
|
55519
|
+
setHalfLoad: method(object({
|
|
55520
|
+
deviceId: number().int().nonnegative(),
|
|
55521
|
+
on: boolean()
|
|
55522
|
+
}), _void(), {
|
|
55523
|
+
kind: "mutation",
|
|
55524
|
+
auth: "protected"
|
|
55525
|
+
}),
|
|
55526
|
+
setHygienePlus: method(object({
|
|
55527
|
+
deviceId: number().int().nonnegative(),
|
|
55528
|
+
on: boolean()
|
|
55529
|
+
}), _void(), {
|
|
55530
|
+
kind: "mutation",
|
|
55531
|
+
auth: "protected"
|
|
55532
|
+
}),
|
|
55533
|
+
setOption: method(object({
|
|
55534
|
+
deviceId: number().int().nonnegative(),
|
|
55535
|
+
key: string().min(1),
|
|
55536
|
+
value: union([
|
|
55537
|
+
boolean(),
|
|
55538
|
+
string(),
|
|
55539
|
+
number()
|
|
55540
|
+
])
|
|
55541
|
+
}), _void(), {
|
|
55542
|
+
kind: "mutation",
|
|
55543
|
+
auth: "protected"
|
|
55544
|
+
})
|
|
55545
|
+
},
|
|
55546
|
+
status: {
|
|
55547
|
+
schema: DishwasherStatusSchema,
|
|
55548
|
+
kind: "poll"
|
|
55549
|
+
},
|
|
55550
|
+
runtimeState: DishwasherStatusSchema,
|
|
55551
|
+
durability: "session",
|
|
55552
|
+
history: { fields: { progressPercent: {
|
|
55553
|
+
kind: "gauge",
|
|
55554
|
+
unit: "%",
|
|
55555
|
+
deadband: 2
|
|
55556
|
+
} } }
|
|
55557
|
+
};
|
|
54767
55558
|
var DoorbellStatusSchema = object({
|
|
54768
55559
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54769
55560
|
lastPressedAt: number().nullable(),
|
|
@@ -55566,6 +56357,32 @@ var gasCapability = {
|
|
|
55566
56357
|
* whether persisting is worth a SQLite commit. */
|
|
55567
56358
|
volatileStateFields: ["lastChangedAt"]
|
|
55568
56359
|
};
|
|
56360
|
+
var HeatingValveStatusSchema = object({
|
|
56361
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
56362
|
+
position: number().min(0).max(100).nullable(),
|
|
56363
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
56364
|
+
lastFetchedAt: number()
|
|
56365
|
+
});
|
|
56366
|
+
var heatingValveCapability = {
|
|
56367
|
+
name: "heating-valve",
|
|
56368
|
+
scope: "device",
|
|
56369
|
+
deviceNative: true,
|
|
56370
|
+
mode: "singleton",
|
|
56371
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
56372
|
+
methods: {},
|
|
56373
|
+
status: {
|
|
56374
|
+
schema: HeatingValveStatusSchema,
|
|
56375
|
+
kind: "push"
|
|
56376
|
+
},
|
|
56377
|
+
runtimeState: HeatingValveStatusSchema,
|
|
56378
|
+
durability: "session",
|
|
56379
|
+
history: { fields: { position: {
|
|
56380
|
+
kind: "gauge",
|
|
56381
|
+
unit: "%",
|
|
56382
|
+
deadband: 1
|
|
56383
|
+
} } },
|
|
56384
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
56385
|
+
};
|
|
55569
56386
|
/**
|
|
55570
56387
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
55571
56388
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -56698,7 +57515,19 @@ var TlsStatusSchema = object({
|
|
|
56698
57515
|
sans: array(string()),
|
|
56699
57516
|
caCertPem: string().nullable(),
|
|
56700
57517
|
reissueError: string().nullable(),
|
|
56701
|
-
restartRequired: boolean()
|
|
57518
|
+
restartRequired: boolean(),
|
|
57519
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
57520
|
+
caMissing: boolean(),
|
|
57521
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
57522
|
+
localCaConstrained: boolean().nullable(),
|
|
57523
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
57524
|
+
caReplacedAt: string().nullable(),
|
|
57525
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
57526
|
+
storedUpload: object({
|
|
57527
|
+
leafFingerprintSha256: string(),
|
|
57528
|
+
validTo: string(),
|
|
57529
|
+
hasCa: boolean()
|
|
57530
|
+
}).nullable()
|
|
56702
57531
|
});
|
|
56703
57532
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
56704
57533
|
/**
|
|
@@ -56754,6 +57583,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
56754
57583
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
56755
57584
|
kind: "mutation",
|
|
56756
57585
|
auth: "admin"
|
|
57586
|
+
}), method(_void(), TlsStatusSchema, {
|
|
57587
|
+
kind: "mutation",
|
|
57588
|
+
auth: "admin"
|
|
56757
57589
|
});
|
|
56758
57590
|
var LockControlStatusSchema = object({
|
|
56759
57591
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -63247,7 +64079,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
63247
64079
|
kind: "mutation",
|
|
63248
64080
|
auth: "admin",
|
|
63249
64081
|
access: "delete"
|
|
63250
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
64082
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
64083
|
+
kind: "mutation",
|
|
64084
|
+
auth: "admin",
|
|
64085
|
+
access: "create"
|
|
64086
|
+
}), method(object({
|
|
63251
64087
|
userId: string(),
|
|
63252
64088
|
code: string()
|
|
63253
64089
|
}), object({ valid: boolean() }), {
|
|
@@ -64967,6 +65803,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64967
65803
|
dayNight: dayNightCapability,
|
|
64968
65804
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
64969
65805
|
deviceStatus: deviceStatusCapability,
|
|
65806
|
+
dishwasher: dishwasherCapability,
|
|
64970
65807
|
doorbell: doorbellCapability,
|
|
64971
65808
|
enumSensor: enumSensorCapability,
|
|
64972
65809
|
eventEmitter: eventEmitterCapability,
|
|
@@ -64974,6 +65811,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64974
65811
|
featureProbe: featureProbeCapability,
|
|
64975
65812
|
flood: floodCapability,
|
|
64976
65813
|
gas: gasCapability,
|
|
65814
|
+
heatingValve: heatingValveCapability,
|
|
64977
65815
|
humidifier: humidifierCapability,
|
|
64978
65816
|
humiditySensor: humiditySensorCapability,
|
|
64979
65817
|
image: imageCapability,
|
|
@@ -65059,13 +65897,14 @@ var BaseDevice = class {
|
|
|
65059
65897
|
get state() {
|
|
65060
65898
|
if (!this._stateProxyCache) {
|
|
65061
65899
|
const cache = {};
|
|
65062
|
-
const handler = { get: (
|
|
65900
|
+
const handler = { get: (target, key) => {
|
|
65063
65901
|
const k = key;
|
|
65064
|
-
|
|
65902
|
+
const existing = Reflect.get(target, k);
|
|
65903
|
+
if (existing !== void 0) return existing;
|
|
65065
65904
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
65066
65905
|
if (!cap) return void 0;
|
|
65067
65906
|
const proxy = this.sliceProxy(cap);
|
|
65068
|
-
|
|
65907
|
+
Reflect.set(target, k, proxy);
|
|
65069
65908
|
return proxy;
|
|
65070
65909
|
} };
|
|
65071
65910
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -65264,7 +66103,7 @@ var BaseDevice = class {
|
|
|
65264
66103
|
async updateSourceInfo(patch) {
|
|
65265
66104
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
65266
66105
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
65267
|
-
const action = this.ctx.api
|
|
66106
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
65268
66107
|
if (action) try {
|
|
65269
66108
|
await action.mutate({
|
|
65270
66109
|
deviceId: this.id,
|
|
@@ -65299,7 +66138,7 @@ var BaseDevice = class {
|
|
|
65299
66138
|
* device boot on a meta refresh.
|
|
65300
66139
|
*/
|
|
65301
66140
|
async refreshFeatures() {
|
|
65302
|
-
const action = this.ctx.api
|
|
66141
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
65303
66142
|
if (!action) return;
|
|
65304
66143
|
try {
|
|
65305
66144
|
await action.mutate({
|
|
@@ -65698,6 +66537,12 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
65698
66537
|
provider: this
|
|
65699
66538
|
}];
|
|
65700
66539
|
}
|
|
66540
|
+
/** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
|
|
66541
|
+
providerRegistrationsFromSuper(result) {
|
|
66542
|
+
if (Array.isArray(result)) return result;
|
|
66543
|
+
if (result !== void 0 && result.providers !== void 0) return [...result.providers];
|
|
66544
|
+
return [];
|
|
66545
|
+
}
|
|
65701
66546
|
async onShutdown() {
|
|
65702
66547
|
this._restoreShuttingDown = true;
|
|
65703
66548
|
this.cancelRestoreRetries();
|
|
@@ -66224,7 +67069,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
66224
67069
|
return toDeviceSummary(device, this.addonId);
|
|
66225
67070
|
}
|
|
66226
67071
|
};
|
|
66227
|
-
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;
|
|
67072
|
+
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;
|
|
66228
67073
|
new Set(Object.values(DeviceType));
|
|
66229
67074
|
Object.freeze({
|
|
66230
67075
|
"accessories.getStatus": {
|
|
@@ -67373,6 +68218,12 @@ Object.freeze({
|
|
|
67373
68218
|
addonId: null,
|
|
67374
68219
|
access: "view"
|
|
67375
68220
|
},
|
|
68221
|
+
"coreBlocks.migrateRawSecrets": {
|
|
68222
|
+
capName: "core-blocks",
|
|
68223
|
+
capScope: "system",
|
|
68224
|
+
addonId: null,
|
|
68225
|
+
access: "create"
|
|
68226
|
+
},
|
|
67376
68227
|
"coreBlocks.restart": {
|
|
67377
68228
|
capName: "core-blocks",
|
|
67378
68229
|
capScope: "system",
|
|
@@ -68639,6 +69490,60 @@ Object.freeze({
|
|
|
68639
69490
|
addonId: null,
|
|
68640
69491
|
access: "view"
|
|
68641
69492
|
},
|
|
69493
|
+
"dishwasher.getStatus": {
|
|
69494
|
+
capName: "dishwasher",
|
|
69495
|
+
capScope: "device",
|
|
69496
|
+
addonId: null,
|
|
69497
|
+
access: "view"
|
|
69498
|
+
},
|
|
69499
|
+
"dishwasher.pause": {
|
|
69500
|
+
capName: "dishwasher",
|
|
69501
|
+
capScope: "device",
|
|
69502
|
+
addonId: null,
|
|
69503
|
+
access: "create"
|
|
69504
|
+
},
|
|
69505
|
+
"dishwasher.setHalfLoad": {
|
|
69506
|
+
capName: "dishwasher",
|
|
69507
|
+
capScope: "device",
|
|
69508
|
+
addonId: null,
|
|
69509
|
+
access: "create"
|
|
69510
|
+
},
|
|
69511
|
+
"dishwasher.setHygienePlus": {
|
|
69512
|
+
capName: "dishwasher",
|
|
69513
|
+
capScope: "device",
|
|
69514
|
+
addonId: null,
|
|
69515
|
+
access: "create"
|
|
69516
|
+
},
|
|
69517
|
+
"dishwasher.setOption": {
|
|
69518
|
+
capName: "dishwasher",
|
|
69519
|
+
capScope: "device",
|
|
69520
|
+
addonId: null,
|
|
69521
|
+
access: "create"
|
|
69522
|
+
},
|
|
69523
|
+
"dishwasher.setPower": {
|
|
69524
|
+
capName: "dishwasher",
|
|
69525
|
+
capScope: "device",
|
|
69526
|
+
addonId: null,
|
|
69527
|
+
access: "create"
|
|
69528
|
+
},
|
|
69529
|
+
"dishwasher.setProgram": {
|
|
69530
|
+
capName: "dishwasher",
|
|
69531
|
+
capScope: "device",
|
|
69532
|
+
addonId: null,
|
|
69533
|
+
access: "create"
|
|
69534
|
+
},
|
|
69535
|
+
"dishwasher.start": {
|
|
69536
|
+
capName: "dishwasher",
|
|
69537
|
+
capScope: "device",
|
|
69538
|
+
addonId: null,
|
|
69539
|
+
access: "create"
|
|
69540
|
+
},
|
|
69541
|
+
"dishwasher.stop": {
|
|
69542
|
+
capName: "dishwasher",
|
|
69543
|
+
capScope: "device",
|
|
69544
|
+
addonId: null,
|
|
69545
|
+
access: "create"
|
|
69546
|
+
},
|
|
68642
69547
|
"doorbell.getStatus": {
|
|
68643
69548
|
capName: "doorbell",
|
|
68644
69549
|
capScope: "device",
|
|
@@ -68849,6 +69754,12 @@ Object.freeze({
|
|
|
68849
69754
|
addonId: null,
|
|
68850
69755
|
access: "view"
|
|
68851
69756
|
},
|
|
69757
|
+
"heatingValve.getStatus": {
|
|
69758
|
+
capName: "heating-valve",
|
|
69759
|
+
capScope: "device",
|
|
69760
|
+
addonId: null,
|
|
69761
|
+
access: "view"
|
|
69762
|
+
},
|
|
68852
69763
|
"humidifier.getStatus": {
|
|
68853
69764
|
capName: "humidifier",
|
|
68854
69765
|
capScope: "device",
|
|
@@ -69059,6 +69970,12 @@ Object.freeze({
|
|
|
69059
69970
|
addonId: null,
|
|
69060
69971
|
access: "create"
|
|
69061
69972
|
},
|
|
69973
|
+
"keychainAdmin.importSecret": {
|
|
69974
|
+
capName: "keychain-admin",
|
|
69975
|
+
capScope: "system",
|
|
69976
|
+
addonId: null,
|
|
69977
|
+
access: "create"
|
|
69978
|
+
},
|
|
69062
69979
|
"keychainAdmin.listAudit": {
|
|
69063
69980
|
capName: "keychain-admin",
|
|
69064
69981
|
capScope: "system",
|
|
@@ -69227,6 +70144,12 @@ Object.freeze({
|
|
|
69227
70144
|
addonId: null,
|
|
69228
70145
|
access: "view"
|
|
69229
70146
|
},
|
|
70147
|
+
"llm.migrateRawSecrets": {
|
|
70148
|
+
capName: "llm",
|
|
70149
|
+
capScope: "system",
|
|
70150
|
+
addonId: null,
|
|
70151
|
+
access: "create"
|
|
70152
|
+
},
|
|
69230
70153
|
"llm.resolveModelRef": {
|
|
69231
70154
|
capName: "llm",
|
|
69232
70155
|
capScope: "system",
|
|
@@ -69455,6 +70378,12 @@ Object.freeze({
|
|
|
69455
70378
|
addonId: null,
|
|
69456
70379
|
access: "create"
|
|
69457
70380
|
},
|
|
70381
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
70382
|
+
capName: "local-network",
|
|
70383
|
+
capScope: "system",
|
|
70384
|
+
addonId: null,
|
|
70385
|
+
access: "create"
|
|
70386
|
+
},
|
|
69458
70387
|
"lockControl.getStatus": {
|
|
69459
70388
|
capName: "lock-control",
|
|
69460
70389
|
capScope: "device",
|
|
@@ -72107,6 +73036,30 @@ Object.freeze({
|
|
|
72107
73036
|
addonId: null,
|
|
72108
73037
|
access: "create"
|
|
72109
73038
|
},
|
|
73039
|
+
"recordEntries.deleteEntry": {
|
|
73040
|
+
capName: "record-entries",
|
|
73041
|
+
capScope: "system",
|
|
73042
|
+
addonId: null,
|
|
73043
|
+
access: "delete"
|
|
73044
|
+
},
|
|
73045
|
+
"recordEntries.listEntries": {
|
|
73046
|
+
capName: "record-entries",
|
|
73047
|
+
capScope: "system",
|
|
73048
|
+
addonId: null,
|
|
73049
|
+
access: "view"
|
|
73050
|
+
},
|
|
73051
|
+
"recordEntries.listEntryKinds": {
|
|
73052
|
+
capName: "record-entries",
|
|
73053
|
+
capScope: "system",
|
|
73054
|
+
addonId: null,
|
|
73055
|
+
access: "view"
|
|
73056
|
+
},
|
|
73057
|
+
"recordEntries.putEntry": {
|
|
73058
|
+
capName: "record-entries",
|
|
73059
|
+
capScope: "system",
|
|
73060
|
+
addonId: null,
|
|
73061
|
+
access: "create"
|
|
73062
|
+
},
|
|
72110
73063
|
"recording.getAvailability": {
|
|
72111
73064
|
capName: "recording",
|
|
72112
73065
|
capScope: "device",
|
|
@@ -72407,6 +73360,102 @@ Object.freeze({
|
|
|
72407
73360
|
addonId: null,
|
|
72408
73361
|
access: "view"
|
|
72409
73362
|
},
|
|
73363
|
+
"records.aggregate": {
|
|
73364
|
+
capName: "records",
|
|
73365
|
+
capScope: "system",
|
|
73366
|
+
addonId: null,
|
|
73367
|
+
access: "view"
|
|
73368
|
+
},
|
|
73369
|
+
"records.allocateId": {
|
|
73370
|
+
capName: "records",
|
|
73371
|
+
capScope: "system",
|
|
73372
|
+
addonId: null,
|
|
73373
|
+
access: "create"
|
|
73374
|
+
},
|
|
73375
|
+
"records.count": {
|
|
73376
|
+
capName: "records",
|
|
73377
|
+
capScope: "system",
|
|
73378
|
+
addonId: null,
|
|
73379
|
+
access: "view"
|
|
73380
|
+
},
|
|
73381
|
+
"records.declareKinds": {
|
|
73382
|
+
capName: "records",
|
|
73383
|
+
capScope: "system",
|
|
73384
|
+
addonId: null,
|
|
73385
|
+
access: "create"
|
|
73386
|
+
},
|
|
73387
|
+
"records.delete": {
|
|
73388
|
+
capName: "records",
|
|
73389
|
+
capScope: "system",
|
|
73390
|
+
addonId: null,
|
|
73391
|
+
access: "delete"
|
|
73392
|
+
},
|
|
73393
|
+
"records.deleteDevice": {
|
|
73394
|
+
capName: "records",
|
|
73395
|
+
capScope: "system",
|
|
73396
|
+
addonId: null,
|
|
73397
|
+
access: "delete"
|
|
73398
|
+
},
|
|
73399
|
+
"records.deleteMany": {
|
|
73400
|
+
capName: "records",
|
|
73401
|
+
capScope: "system",
|
|
73402
|
+
addonId: null,
|
|
73403
|
+
access: "delete"
|
|
73404
|
+
},
|
|
73405
|
+
"records.deleteWhere": {
|
|
73406
|
+
capName: "records",
|
|
73407
|
+
capScope: "system",
|
|
73408
|
+
addonId: null,
|
|
73409
|
+
access: "delete"
|
|
73410
|
+
},
|
|
73411
|
+
"records.get": {
|
|
73412
|
+
capName: "records",
|
|
73413
|
+
capScope: "system",
|
|
73414
|
+
addonId: null,
|
|
73415
|
+
access: "view"
|
|
73416
|
+
},
|
|
73417
|
+
"records.getMany": {
|
|
73418
|
+
capName: "records",
|
|
73419
|
+
capScope: "system",
|
|
73420
|
+
addonId: null,
|
|
73421
|
+
access: "view"
|
|
73422
|
+
},
|
|
73423
|
+
"records.histogram": {
|
|
73424
|
+
capName: "records",
|
|
73425
|
+
capScope: "system",
|
|
73426
|
+
addonId: null,
|
|
73427
|
+
access: "view"
|
|
73428
|
+
},
|
|
73429
|
+
"records.patch": {
|
|
73430
|
+
capName: "records",
|
|
73431
|
+
capScope: "system",
|
|
73432
|
+
addonId: null,
|
|
73433
|
+
access: "create"
|
|
73434
|
+
},
|
|
73435
|
+
"records.put": {
|
|
73436
|
+
capName: "records",
|
|
73437
|
+
capScope: "system",
|
|
73438
|
+
addonId: null,
|
|
73439
|
+
access: "create"
|
|
73440
|
+
},
|
|
73441
|
+
"records.putMany": {
|
|
73442
|
+
capName: "records",
|
|
73443
|
+
capScope: "system",
|
|
73444
|
+
addonId: null,
|
|
73445
|
+
access: "create"
|
|
73446
|
+
},
|
|
73447
|
+
"records.query": {
|
|
73448
|
+
capName: "records",
|
|
73449
|
+
capScope: "system",
|
|
73450
|
+
addonId: null,
|
|
73451
|
+
access: "view"
|
|
73452
|
+
},
|
|
73453
|
+
"records.secretRefs": {
|
|
73454
|
+
capName: "records",
|
|
73455
|
+
capScope: "system",
|
|
73456
|
+
addonId: null,
|
|
73457
|
+
access: "view"
|
|
73458
|
+
},
|
|
72410
73459
|
"sceneMonitor.captureReference": {
|
|
72411
73460
|
capName: "scene-monitor",
|
|
72412
73461
|
capScope: "device",
|
|
@@ -72839,6 +73888,48 @@ Object.freeze({
|
|
|
72839
73888
|
addonId: null,
|
|
72840
73889
|
access: "create"
|
|
72841
73890
|
},
|
|
73891
|
+
"storageAdmin.adoptRecords": {
|
|
73892
|
+
capName: "storage-admin",
|
|
73893
|
+
capScope: "system",
|
|
73894
|
+
addonId: null,
|
|
73895
|
+
access: "create"
|
|
73896
|
+
},
|
|
73897
|
+
"storageAdmin.dropCollection": {
|
|
73898
|
+
capName: "storage-admin",
|
|
73899
|
+
capScope: "system",
|
|
73900
|
+
addonId: null,
|
|
73901
|
+
access: "delete"
|
|
73902
|
+
},
|
|
73903
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
73904
|
+
capName: "storage-admin",
|
|
73905
|
+
capScope: "system",
|
|
73906
|
+
addonId: null,
|
|
73907
|
+
access: "view"
|
|
73908
|
+
},
|
|
73909
|
+
"storageAdmin.listKinds": {
|
|
73910
|
+
capName: "storage-admin",
|
|
73911
|
+
capScope: "system",
|
|
73912
|
+
addonId: null,
|
|
73913
|
+
access: "view"
|
|
73914
|
+
},
|
|
73915
|
+
"storageAdmin.listTables": {
|
|
73916
|
+
capName: "storage-admin",
|
|
73917
|
+
capScope: "system",
|
|
73918
|
+
addonId: null,
|
|
73919
|
+
access: "view"
|
|
73920
|
+
},
|
|
73921
|
+
"storageAdmin.readLegacyCollection": {
|
|
73922
|
+
capName: "storage-admin",
|
|
73923
|
+
capScope: "system",
|
|
73924
|
+
addonId: null,
|
|
73925
|
+
access: "view"
|
|
73926
|
+
},
|
|
73927
|
+
"storageAdmin.readRecords": {
|
|
73928
|
+
capName: "storage-admin",
|
|
73929
|
+
capScope: "system",
|
|
73930
|
+
addonId: null,
|
|
73931
|
+
access: "view"
|
|
73932
|
+
},
|
|
72842
73933
|
"storageEvictable.evict": {
|
|
72843
73934
|
capName: "storage-evictable",
|
|
72844
73935
|
capScope: "system",
|
|
@@ -73751,6 +74842,12 @@ Object.freeze({
|
|
|
73751
74842
|
addonId: null,
|
|
73752
74843
|
access: "view"
|
|
73753
74844
|
},
|
|
74845
|
+
"userManagement.migrateRawSecrets": {
|
|
74846
|
+
capName: "user-management",
|
|
74847
|
+
capScope: "system",
|
|
74848
|
+
addonId: null,
|
|
74849
|
+
access: "create"
|
|
74850
|
+
},
|
|
73754
74851
|
"userManagement.oauthExchangeCode": {
|
|
73755
74852
|
capName: "user-management",
|
|
73756
74853
|
capScope: "system",
|
|
@@ -74250,7 +75347,7 @@ Object.freeze({
|
|
|
74250
75347
|
access: "create"
|
|
74251
75348
|
}
|
|
74252
75349
|
});
|
|
74253
|
-
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;
|
|
75350
|
+
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;
|
|
74254
75351
|
DeviceFeature.BatteryOperated;
|
|
74255
75352
|
/** Reject after `ms`; always clears its own timer. */
|
|
74256
75353
|
async function withTimeout$1(promise, ms, label) {
|
|
@@ -75140,6 +76237,51 @@ Object.freeze({
|
|
|
75140
76237
|
form: "single",
|
|
75141
76238
|
optional: false
|
|
75142
76239
|
}],
|
|
76240
|
+
"dishwasher.getStatus": [{
|
|
76241
|
+
name: "deviceId",
|
|
76242
|
+
form: "single",
|
|
76243
|
+
optional: false
|
|
76244
|
+
}],
|
|
76245
|
+
"dishwasher.pause": [{
|
|
76246
|
+
name: "deviceId",
|
|
76247
|
+
form: "single",
|
|
76248
|
+
optional: false
|
|
76249
|
+
}],
|
|
76250
|
+
"dishwasher.setHalfLoad": [{
|
|
76251
|
+
name: "deviceId",
|
|
76252
|
+
form: "single",
|
|
76253
|
+
optional: false
|
|
76254
|
+
}],
|
|
76255
|
+
"dishwasher.setHygienePlus": [{
|
|
76256
|
+
name: "deviceId",
|
|
76257
|
+
form: "single",
|
|
76258
|
+
optional: false
|
|
76259
|
+
}],
|
|
76260
|
+
"dishwasher.setOption": [{
|
|
76261
|
+
name: "deviceId",
|
|
76262
|
+
form: "single",
|
|
76263
|
+
optional: false
|
|
76264
|
+
}],
|
|
76265
|
+
"dishwasher.setPower": [{
|
|
76266
|
+
name: "deviceId",
|
|
76267
|
+
form: "single",
|
|
76268
|
+
optional: false
|
|
76269
|
+
}],
|
|
76270
|
+
"dishwasher.setProgram": [{
|
|
76271
|
+
name: "deviceId",
|
|
76272
|
+
form: "single",
|
|
76273
|
+
optional: false
|
|
76274
|
+
}],
|
|
76275
|
+
"dishwasher.start": [{
|
|
76276
|
+
name: "deviceId",
|
|
76277
|
+
form: "single",
|
|
76278
|
+
optional: false
|
|
76279
|
+
}],
|
|
76280
|
+
"dishwasher.stop": [{
|
|
76281
|
+
name: "deviceId",
|
|
76282
|
+
form: "single",
|
|
76283
|
+
optional: false
|
|
76284
|
+
}],
|
|
75143
76285
|
"doorbell.getStatus": [{
|
|
75144
76286
|
name: "deviceId",
|
|
75145
76287
|
form: "single",
|
|
@@ -75209,6 +76351,11 @@ Object.freeze({
|
|
|
75209
76351
|
form: "single",
|
|
75210
76352
|
optional: false
|
|
75211
76353
|
}],
|
|
76354
|
+
"heatingValve.getStatus": [{
|
|
76355
|
+
name: "deviceId",
|
|
76356
|
+
form: "single",
|
|
76357
|
+
optional: false
|
|
76358
|
+
}],
|
|
75212
76359
|
"humidifier.getStatus": [{
|
|
75213
76360
|
name: "deviceId",
|
|
75214
76361
|
form: "single",
|
|
@@ -76493,6 +77640,37 @@ Object.freeze({
|
|
|
76493
77640
|
form: "single",
|
|
76494
77641
|
optional: false
|
|
76495
77642
|
}],
|
|
77643
|
+
"records.count": [{
|
|
77644
|
+
name: "deviceId",
|
|
77645
|
+
form: "single",
|
|
77646
|
+
optional: true
|
|
77647
|
+
}],
|
|
77648
|
+
"records.deleteDevice": [{
|
|
77649
|
+
name: "deviceId",
|
|
77650
|
+
form: "single",
|
|
77651
|
+
optional: false
|
|
77652
|
+
}],
|
|
77653
|
+
"records.deleteWhere": [{
|
|
77654
|
+
name: "deviceId",
|
|
77655
|
+
form: "single",
|
|
77656
|
+
optional: true
|
|
77657
|
+
}],
|
|
77658
|
+
"records.histogram": [{
|
|
77659
|
+
name: "deviceId",
|
|
77660
|
+
form: "single",
|
|
77661
|
+
optional: true
|
|
77662
|
+
}],
|
|
77663
|
+
"records.putMany": [{
|
|
77664
|
+
name: "records",
|
|
77665
|
+
form: "object-array",
|
|
77666
|
+
optional: false,
|
|
77667
|
+
itemField: "deviceId"
|
|
77668
|
+
}],
|
|
77669
|
+
"records.query": [{
|
|
77670
|
+
name: "deviceId",
|
|
77671
|
+
form: "single",
|
|
77672
|
+
optional: true
|
|
77673
|
+
}],
|
|
76496
77674
|
"sceneMonitor.captureReference": [{
|
|
76497
77675
|
name: "deviceId",
|
|
76498
77676
|
form: "single",
|
|
@@ -76609,6 +77787,17 @@ Object.freeze({
|
|
|
76609
77787
|
form: "single",
|
|
76610
77788
|
optional: false
|
|
76611
77789
|
}],
|
|
77790
|
+
"storageAdmin.adoptRecords": [{
|
|
77791
|
+
name: "records",
|
|
77792
|
+
form: "object-array",
|
|
77793
|
+
optional: false,
|
|
77794
|
+
itemField: "deviceId"
|
|
77795
|
+
}],
|
|
77796
|
+
"storageAdmin.readRecords": [{
|
|
77797
|
+
name: "deviceId",
|
|
77798
|
+
form: "single",
|
|
77799
|
+
optional: true
|
|
77800
|
+
}],
|
|
76612
77801
|
"streamBroker.acquireEgressTranscode": [{
|
|
76613
77802
|
name: "deviceId",
|
|
76614
77803
|
form: "single",
|
|
@@ -78672,7 +79861,7 @@ var RtspProviderAddon = class extends BaseDeviceProvider {
|
|
|
78672
79861
|
super({});
|
|
78673
79862
|
}
|
|
78674
79863
|
async onInitialize() {
|
|
78675
|
-
return [...await super.onInitialize(), {
|
|
79864
|
+
return [...this.providerRegistrationsFromSuper(await super.onInitialize()), {
|
|
78676
79865
|
capability: connectionTestCapability,
|
|
78677
79866
|
provider: this.buildConnectionTestProvider()
|
|
78678
79867
|
}];
|