@camstack/addon-provider-petkit 0.2.126 → 0.2.128
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 +1404 -131
- package/dist/addon.mjs +1404 -131
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1101,7 +1101,7 @@ var Nodepetkit = class {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
//#endregion
|
|
1104
|
-
//#region ../types/dist/event-category-
|
|
1104
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
1105
1105
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
1106
1106
|
EventCategory["SystemBoot"] = "system.boot";
|
|
1107
1107
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1165,6 +1165,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1165
1165
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
1166
1166
|
*/
|
|
1167
1167
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
1168
|
+
/**
|
|
1169
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
1170
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
1171
|
+
* action. One event per refusal.
|
|
1172
|
+
*/
|
|
1173
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
1174
|
+
/**
|
|
1175
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
1176
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
1177
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
1178
|
+
*/
|
|
1179
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
1180
|
+
/**
|
|
1181
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
1182
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
1183
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
1184
|
+
*/
|
|
1185
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
1168
1186
|
EventCategory["AddonError"] = "addon.error";
|
|
1169
1187
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
1170
1188
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -6489,7 +6507,7 @@ var ZodIssueCode = {
|
|
|
6489
6507
|
var ZodFirstPartyTypeKind;
|
|
6490
6508
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6491
6509
|
//#endregion
|
|
6492
|
-
//#region ../types/dist/sleep-
|
|
6510
|
+
//#region ../types/dist/sleep-BegKjwUu.mjs
|
|
6493
6511
|
/**
|
|
6494
6512
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6495
6513
|
* window to float samples (D455).
|
|
@@ -6606,7 +6624,7 @@ function isKeychainStoredField(field) {
|
|
|
6606
6624
|
var SECRET_CLEAR = { $secretClear: true };
|
|
6607
6625
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
6608
6626
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
6609
|
-
function isRecord$
|
|
6627
|
+
function isRecord$5(value) {
|
|
6610
6628
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6611
6629
|
}
|
|
6612
6630
|
function makeSecretMarker(ref) {
|
|
@@ -6617,12 +6635,12 @@ function makeSecretMarker(ref) {
|
|
|
6617
6635
|
}
|
|
6618
6636
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
6619
6637
|
function isSecretMarker(value) {
|
|
6620
|
-
if (!isRecord$
|
|
6638
|
+
if (!isRecord$5(value)) return false;
|
|
6621
6639
|
const ref = value["$secret"];
|
|
6622
6640
|
return typeof ref === "string" && ref.length > 0;
|
|
6623
6641
|
}
|
|
6624
6642
|
function isSecretClear(value) {
|
|
6625
|
-
return isRecord$
|
|
6643
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
6626
6644
|
}
|
|
6627
6645
|
/**
|
|
6628
6646
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -7232,7 +7250,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
7232
7250
|
}
|
|
7233
7251
|
};
|
|
7234
7252
|
var KEEP = { kind: "keep" };
|
|
7235
|
-
function isRecord$
|
|
7253
|
+
function isRecord$4(value) {
|
|
7236
7254
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7237
7255
|
}
|
|
7238
7256
|
function defaultMintId() {
|
|
@@ -7245,7 +7263,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
7245
7263
|
return out;
|
|
7246
7264
|
}
|
|
7247
7265
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
7248
|
-
else if (isRecord$
|
|
7266
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
7249
7267
|
return out;
|
|
7250
7268
|
}
|
|
7251
7269
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -7300,7 +7318,7 @@ function rowId(row, idKey) {
|
|
|
7300
7318
|
return null;
|
|
7301
7319
|
}
|
|
7302
7320
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
7303
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
7321
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
7304
7322
|
if (!Array.isArray(incoming)) {
|
|
7305
7323
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
7306
7324
|
return {
|
|
@@ -7316,7 +7334,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
7316
7334
|
const kept = /* @__PURE__ */ new Set();
|
|
7317
7335
|
const rows = [];
|
|
7318
7336
|
for (const row of incoming) {
|
|
7319
|
-
if (!isRecord$
|
|
7337
|
+
if (!isRecord$4(row)) {
|
|
7320
7338
|
rows.push(row);
|
|
7321
7339
|
continue;
|
|
7322
7340
|
}
|
|
@@ -7341,7 +7359,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
7341
7359
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
7342
7360
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
7343
7361
|
case "object": {
|
|
7344
|
-
if (!isRecord$
|
|
7362
|
+
if (!isRecord$4(incoming)) {
|
|
7345
7363
|
if (incoming === void 0) return KEEP;
|
|
7346
7364
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
7347
7365
|
return {
|
|
@@ -7349,7 +7367,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
7349
7367
|
value: incoming
|
|
7350
7368
|
};
|
|
7351
7369
|
}
|
|
7352
|
-
const storedObj = isRecord$
|
|
7370
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
7353
7371
|
return {
|
|
7354
7372
|
kind: "value",
|
|
7355
7373
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -7472,7 +7490,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
7472
7490
|
value: items
|
|
7473
7491
|
};
|
|
7474
7492
|
}
|
|
7475
|
-
if (isRecord$
|
|
7493
|
+
if (isRecord$4(v)) {
|
|
7476
7494
|
const out = {};
|
|
7477
7495
|
for (const [k, child] of Object.entries(v)) {
|
|
7478
7496
|
const s = substitute(child);
|
|
@@ -7504,7 +7522,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
7504
7522
|
this.name = "SecretOverwriteRefusedError";
|
|
7505
7523
|
}
|
|
7506
7524
|
};
|
|
7507
|
-
function isRecord(value) {
|
|
7525
|
+
function isRecord$3(value) {
|
|
7508
7526
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7509
7527
|
}
|
|
7510
7528
|
function resolvedValue(pass, marker) {
|
|
@@ -7533,7 +7551,7 @@ function inArray(pass, incoming, stored) {
|
|
|
7533
7551
|
return incoming.map((item, index) => {
|
|
7534
7552
|
const twin = stored[index];
|
|
7535
7553
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
7536
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
7554
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
7537
7555
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
7538
7556
|
return item;
|
|
7539
7557
|
});
|
|
@@ -7544,7 +7562,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
7544
7562
|
const twin = stored[key];
|
|
7545
7563
|
if (isSecretMarker(twin)) {
|
|
7546
7564
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
7547
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
7565
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
7548
7566
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
7549
7567
|
}
|
|
7550
7568
|
return out;
|
|
@@ -7552,7 +7570,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
7552
7570
|
async function walk(pass, incoming, stored) {
|
|
7553
7571
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
7554
7572
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
7555
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
7573
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
7556
7574
|
const out = { ...incoming };
|
|
7557
7575
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
7558
7576
|
return out;
|
|
@@ -7583,7 +7601,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
7583
7601
|
function isJsonEqual(a, b) {
|
|
7584
7602
|
if (Object.is(a, b)) return true;
|
|
7585
7603
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
7586
|
-
if (isRecord(a) && isRecord(b)) {
|
|
7604
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
7587
7605
|
const keys = Object.keys(a);
|
|
7588
7606
|
if (keys.length !== Object.keys(b).length) return false;
|
|
7589
7607
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -7607,7 +7625,7 @@ function markerKeysOf(blob, owner) {
|
|
|
7607
7625
|
}
|
|
7608
7626
|
function nodeFromStored(value, owner) {
|
|
7609
7627
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
7610
|
-
if (!isRecord(value)) return null;
|
|
7628
|
+
if (!isRecord$3(value)) return null;
|
|
7611
7629
|
const children = /* @__PURE__ */ new Map();
|
|
7612
7630
|
for (const [key, child] of Object.entries(value)) {
|
|
7613
7631
|
const node = nodeFromStored(child, owner);
|
|
@@ -7740,7 +7758,6 @@ function createHandle(raw, opts) {
|
|
|
7740
7758
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
7741
7759
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
7742
7760
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
7743
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
7744
7761
|
const overrides = {
|
|
7745
7762
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
7746
7763
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -7764,12 +7781,12 @@ function createHandle(raw, opts) {
|
|
|
7764
7781
|
};
|
|
7765
7782
|
} } : {},
|
|
7766
7783
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
7767
|
-
|
|
7768
|
-
const rows = await readDeviceStoreBatch
|
|
7784
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
7785
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
7769
7786
|
const out = /* @__PURE__ */ new Map();
|
|
7770
7787
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
7771
7788
|
return out;
|
|
7772
|
-
}
|
|
7789
|
+
},
|
|
7773
7790
|
writeAddonStore: async (patch) => {
|
|
7774
7791
|
await writeAddon(patch);
|
|
7775
7792
|
},
|
|
@@ -8396,7 +8413,7 @@ var BaseAddon = class {
|
|
|
8396
8413
|
if (!ctx) return;
|
|
8397
8414
|
const addonId = ctx.id;
|
|
8398
8415
|
setImmediate(() => {
|
|
8399
|
-
ctx.api.addons
|
|
8416
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
8400
8417
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
8401
8418
|
}).catch((err) => {
|
|
8402
8419
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -8596,7 +8613,7 @@ var BaseAddon = class {
|
|
|
8596
8613
|
return this._addonSecretTree;
|
|
8597
8614
|
}
|
|
8598
8615
|
deviceSecretTree() {
|
|
8599
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
8616
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
8600
8617
|
return this._deviceSecretTree;
|
|
8601
8618
|
}
|
|
8602
8619
|
/**
|
|
@@ -8672,42 +8689,135 @@ var BaseAddon = class {
|
|
|
8672
8689
|
this[timerOf] = timer;
|
|
8673
8690
|
}
|
|
8674
8691
|
/**
|
|
8675
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
8676
|
-
*
|
|
8677
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
8678
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
8692
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
8693
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
8679
8694
|
* addon permanently broken.
|
|
8680
8695
|
*
|
|
8681
|
-
*
|
|
8682
|
-
*
|
|
8683
|
-
* `
|
|
8696
|
+
* Two kinds of outage, two budgets:
|
|
8697
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
8698
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
8699
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
8700
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
8701
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
8702
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
8703
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
8704
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
8705
|
+
* addon never runs on defaults for a store it could not ask.
|
|
8706
|
+
* Anything else propagates immediately so real bugs surface.
|
|
8684
8707
|
*/
|
|
8685
8708
|
async readAddonStoreWithRetry() {
|
|
8686
8709
|
const settings = this.rawSettings();
|
|
8687
8710
|
if (!settings) return {};
|
|
8688
|
-
const delaysMs = [
|
|
8689
|
-
150,
|
|
8690
|
-
350,
|
|
8691
|
-
600,
|
|
8692
|
-
900
|
|
8693
|
-
];
|
|
8694
8711
|
let lastErr;
|
|
8695
|
-
for (let attempt = 0
|
|
8712
|
+
for (let attempt = 0;; attempt++) try {
|
|
8696
8713
|
const stored = await settings.readAddonStore() ?? {};
|
|
8697
8714
|
this.settingsStoreReady = true;
|
|
8698
8715
|
return stored;
|
|
8699
8716
|
} catch (err) {
|
|
8700
8717
|
lastErr = err;
|
|
8701
|
-
const
|
|
8702
|
-
if (
|
|
8703
|
-
|
|
8704
|
-
|
|
8718
|
+
const kind = classifyStoreError(err);
|
|
8719
|
+
if (kind === "permanent") throw err;
|
|
8720
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
8721
|
+
if (delay === void 0) {
|
|
8722
|
+
if (kind === "transport") throw err;
|
|
8723
|
+
break;
|
|
8724
|
+
}
|
|
8725
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
8705
8726
|
}
|
|
8706
8727
|
this.settingsStoreReady = false;
|
|
8707
8728
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
8708
8729
|
return {};
|
|
8709
8730
|
}
|
|
8710
8731
|
};
|
|
8732
|
+
/** The settings store's own restart fingerprints. */
|
|
8733
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
8734
|
+
150,
|
|
8735
|
+
350,
|
|
8736
|
+
600,
|
|
8737
|
+
900
|
|
8738
|
+
];
|
|
8739
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
8740
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
8741
|
+
150,
|
|
8742
|
+
350,
|
|
8743
|
+
600,
|
|
8744
|
+
900,
|
|
8745
|
+
2e3,
|
|
8746
|
+
5e3,
|
|
8747
|
+
1e4,
|
|
8748
|
+
2e4,
|
|
8749
|
+
3e4,
|
|
8750
|
+
3e4
|
|
8751
|
+
];
|
|
8752
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
8753
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
8754
|
+
var TRANSPORT_CODES = new Set([
|
|
8755
|
+
"ECONNREFUSED",
|
|
8756
|
+
"ECONNRESET",
|
|
8757
|
+
"ETIMEDOUT",
|
|
8758
|
+
"EPIPE",
|
|
8759
|
+
"EHOSTUNREACH",
|
|
8760
|
+
"ENETUNREACH"
|
|
8761
|
+
]);
|
|
8762
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
8763
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
8764
|
+
"TIMEOUT",
|
|
8765
|
+
"SERVICE_UNAVAILABLE",
|
|
8766
|
+
"BAD_GATEWAY",
|
|
8767
|
+
"GATEWAY_TIMEOUT"
|
|
8768
|
+
]);
|
|
8769
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
8770
|
+
var TRANSPORT_PHRASES = [
|
|
8771
|
+
"discovery deadline exceeded",
|
|
8772
|
+
"parent could not route child unowned cap call",
|
|
8773
|
+
"UDS request timed out after",
|
|
8774
|
+
"channel closed"
|
|
8775
|
+
];
|
|
8776
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
8777
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
8778
|
+
"REQUEST_TIMEOUT",
|
|
8779
|
+
"SERVICE_NOT_FOUND",
|
|
8780
|
+
"SERVICE_NOT_AVAILABLE",
|
|
8781
|
+
"REQUEST_REJECTED",
|
|
8782
|
+
"BROKER_DISCONNECTED"
|
|
8783
|
+
]);
|
|
8784
|
+
function stringProp(value, key) {
|
|
8785
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
8786
|
+
const found = Reflect.get(value, key);
|
|
8787
|
+
return typeof found === "string" ? found : void 0;
|
|
8788
|
+
}
|
|
8789
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
8790
|
+
function errorCode(err) {
|
|
8791
|
+
const out = {};
|
|
8792
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
8793
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
8794
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
8795
|
+
if (node !== void 0) out.node = node;
|
|
8796
|
+
const trpc = stringProp(data, "code");
|
|
8797
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
8798
|
+
return out;
|
|
8799
|
+
}
|
|
8800
|
+
/**
|
|
8801
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
8802
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
8803
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
8804
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
8805
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
8806
|
+
*/
|
|
8807
|
+
function classifyStoreError(err) {
|
|
8808
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
8809
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
8810
|
+
const code = errorCode(err);
|
|
8811
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
8812
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
8813
|
+
if (typeof err === "object" && err !== null) {
|
|
8814
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
8815
|
+
const type = stringProp(err, "type");
|
|
8816
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
8817
|
+
}
|
|
8818
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
8819
|
+
return "permanent";
|
|
8820
|
+
}
|
|
8711
8821
|
/**
|
|
8712
8822
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
8713
8823
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -8797,6 +8907,156 @@ var PeerBytesTicketSchema = object({
|
|
|
8797
8907
|
*/
|
|
8798
8908
|
declaredBytes: number().int().nonnegative().nullable()
|
|
8799
8909
|
});
|
|
8910
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
8911
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
8912
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
8913
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
8914
|
+
var RECORD_CLASSES = [
|
|
8915
|
+
"config",
|
|
8916
|
+
"ledger",
|
|
8917
|
+
"audit",
|
|
8918
|
+
"mirror",
|
|
8919
|
+
"ephemeral"
|
|
8920
|
+
];
|
|
8921
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
8922
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
8923
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
8924
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
8925
|
+
function defOf(schema) {
|
|
8926
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
8927
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
8928
|
+
const def = Reflect.get(zodBag, "def");
|
|
8929
|
+
if (typeof def !== "object" || def === null) return {};
|
|
8930
|
+
return def;
|
|
8931
|
+
}
|
|
8932
|
+
function declaredHere(schema) {
|
|
8933
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
8934
|
+
}
|
|
8935
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8936
|
+
var WRAPPERS = new Set([
|
|
8937
|
+
"optional",
|
|
8938
|
+
"nullable",
|
|
8939
|
+
"default",
|
|
8940
|
+
"prefault",
|
|
8941
|
+
"catch",
|
|
8942
|
+
"readonly",
|
|
8943
|
+
"nonoptional"
|
|
8944
|
+
]);
|
|
8945
|
+
/**
|
|
8946
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
8947
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8948
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8949
|
+
* `.transform` on `in`).
|
|
8950
|
+
*/
|
|
8951
|
+
function layersOf(schema) {
|
|
8952
|
+
const out = [];
|
|
8953
|
+
const queue = [schema];
|
|
8954
|
+
while (queue.length > 0) {
|
|
8955
|
+
const s = queue.shift();
|
|
8956
|
+
if (!s || out.includes(s)) continue;
|
|
8957
|
+
out.push(s);
|
|
8958
|
+
const def = defOf(s);
|
|
8959
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8960
|
+
if (def.type === "pipe") {
|
|
8961
|
+
if (def.in) queue.push(def.in);
|
|
8962
|
+
if (def.out) queue.push(def.out);
|
|
8963
|
+
}
|
|
8964
|
+
}
|
|
8965
|
+
return out;
|
|
8966
|
+
}
|
|
8967
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8968
|
+
function isZodSecret(schema) {
|
|
8969
|
+
return layersOf(schema).some(declaredHere);
|
|
8970
|
+
}
|
|
8971
|
+
/**
|
|
8972
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8973
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8974
|
+
* object or array is reported as one path and not descended into — everything
|
|
8975
|
+
* under it is secret.
|
|
8976
|
+
*/
|
|
8977
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
8978
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8979
|
+
const paths = [];
|
|
8980
|
+
for (const layer of layersOf(schema)) {
|
|
8981
|
+
const def = defOf(layer);
|
|
8982
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8983
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8984
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8985
|
+
else if (def.type === "intersection") {
|
|
8986
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8987
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8988
|
+
}
|
|
8989
|
+
}
|
|
8990
|
+
return [...new Set(paths)];
|
|
8991
|
+
}
|
|
8992
|
+
/**
|
|
8993
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
8994
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
8995
|
+
* JSON the engine stores.
|
|
8996
|
+
*
|
|
8997
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
8998
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
8999
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
9000
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
9001
|
+
* never a field name (D879).
|
|
9002
|
+
*/
|
|
9003
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
9004
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
9005
|
+
var RecordIndexSchema = object({
|
|
9006
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
9007
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
9008
|
+
unique: boolean().optional()
|
|
9009
|
+
}).strict();
|
|
9010
|
+
var RecordRetentionSchema = union([
|
|
9011
|
+
object({
|
|
9012
|
+
ttlMs: number().int().positive(),
|
|
9013
|
+
from: _enum(["at", "write"])
|
|
9014
|
+
}).strict(),
|
|
9015
|
+
object({
|
|
9016
|
+
maxRows: number().int().positive().optional(),
|
|
9017
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
9018
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
9019
|
+
object({
|
|
9020
|
+
owner: string().min(1),
|
|
9021
|
+
reason: string().min(1)
|
|
9022
|
+
}).strict(),
|
|
9023
|
+
object({ none: string().min(1) }).strict()
|
|
9024
|
+
]);
|
|
9025
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
9026
|
+
var EntryDescriptorSchema = object({
|
|
9027
|
+
title: string().min(1),
|
|
9028
|
+
/** The record body field shown as the entry's name. */
|
|
9029
|
+
nameField: string().min(1),
|
|
9030
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
9031
|
+
fields: record(string(), unknown())
|
|
9032
|
+
}).strict();
|
|
9033
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
9034
|
+
var RecordKindDeclarationSchema = object({
|
|
9035
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
9036
|
+
class: _enum(RECORD_CLASSES),
|
|
9037
|
+
writeTrigger: string().min(1),
|
|
9038
|
+
device: _enum([
|
|
9039
|
+
"required",
|
|
9040
|
+
"optional",
|
|
9041
|
+
"none"
|
|
9042
|
+
]).default("none"),
|
|
9043
|
+
at: _enum(["required", "none"]).default("none"),
|
|
9044
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
9045
|
+
retention: RecordRetentionSchema,
|
|
9046
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
9047
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
9048
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
9049
|
+
secretPaths: array(string().min(1)).default([]),
|
|
9050
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
9051
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
9052
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
9053
|
+
adoptsFrom: string().min(1).optional(),
|
|
9054
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
9055
|
+
transactFamily: string().min(1).optional(),
|
|
9056
|
+
entry: EntryDescriptorSchema.optional()
|
|
9057
|
+
}).strict();
|
|
9058
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
9059
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
8800
9060
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
8801
9061
|
var CamProfileSchema = _enum([
|
|
8802
9062
|
"high",
|
|
@@ -9261,75 +9521,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
9261
9521
|
kind: "mutation",
|
|
9262
9522
|
auth: "admin"
|
|
9263
9523
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
9264
|
-
function defOf(schema) {
|
|
9265
|
-
return schema._zod?.def ?? {};
|
|
9266
|
-
}
|
|
9267
|
-
function declaredHere(schema) {
|
|
9268
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
9269
|
-
}
|
|
9270
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
9271
|
-
var WRAPPERS = new Set([
|
|
9272
|
-
"optional",
|
|
9273
|
-
"nullable",
|
|
9274
|
-
"default",
|
|
9275
|
-
"prefault",
|
|
9276
|
-
"catch",
|
|
9277
|
-
"readonly",
|
|
9278
|
-
"nonoptional"
|
|
9279
|
-
]);
|
|
9280
|
-
/**
|
|
9281
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
9282
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
9283
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
9284
|
-
* `.transform` on `in`).
|
|
9285
|
-
*/
|
|
9286
|
-
function layersOf(schema) {
|
|
9287
|
-
const out = [];
|
|
9288
|
-
const queue = [schema];
|
|
9289
|
-
while (queue.length > 0) {
|
|
9290
|
-
const s = queue.shift();
|
|
9291
|
-
if (!s || out.includes(s)) continue;
|
|
9292
|
-
out.push(s);
|
|
9293
|
-
const def = defOf(s);
|
|
9294
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
9295
|
-
if (def.type === "pipe") {
|
|
9296
|
-
if (def.in) queue.push(def.in);
|
|
9297
|
-
if (def.out) queue.push(def.out);
|
|
9298
|
-
}
|
|
9299
|
-
}
|
|
9300
|
-
return out;
|
|
9301
|
-
}
|
|
9302
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
9303
|
-
function isZodSecret(schema) {
|
|
9304
|
-
return layersOf(schema).some(declaredHere);
|
|
9305
|
-
}
|
|
9306
|
-
/**
|
|
9307
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
9308
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
9309
|
-
* object or array is reported as one path and not descended into — everything
|
|
9310
|
-
* under it is secret.
|
|
9311
|
-
*/
|
|
9312
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
9313
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
9314
|
-
const paths = [];
|
|
9315
|
-
for (const layer of layersOf(schema)) {
|
|
9316
|
-
const def = defOf(layer);
|
|
9317
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
9318
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
9319
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
9320
|
-
else if (def.type === "intersection") {
|
|
9321
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
9322
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
9323
|
-
}
|
|
9324
|
-
}
|
|
9325
|
-
return [...new Set(paths)];
|
|
9326
|
-
}
|
|
9327
9524
|
object({
|
|
9328
9525
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
9329
9526
|
params: record(string(), union([string(), number()])).optional()
|
|
9330
9527
|
});
|
|
9331
9528
|
//#endregion
|
|
9332
|
-
//#region ../types/dist/err-msg-
|
|
9529
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
9333
9530
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
9334
9531
|
DeviceType["Camera"] = "camera";
|
|
9335
9532
|
DeviceType["Hub"] = "hub";
|
|
@@ -9421,6 +9618,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
9421
9618
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
9422
9619
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
9423
9620
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
9621
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
9622
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
9623
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
9624
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
9424
9625
|
return DeviceType;
|
|
9425
9626
|
}({});
|
|
9426
9627
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -9598,6 +9799,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
9598
9799
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
9599
9800
|
* real Switch device for UI rendering / export adapters. */
|
|
9600
9801
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
9802
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
9803
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
9804
|
+
DeviceRole["Outlet"] = "outlet";
|
|
9601
9805
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
9602
9806
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
9603
9807
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -9675,7 +9879,7 @@ function errMsg(err) {
|
|
|
9675
9879
|
return String(err);
|
|
9676
9880
|
}
|
|
9677
9881
|
//#endregion
|
|
9678
|
-
//#region ../types/dist/composition-
|
|
9882
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
9679
9883
|
/**
|
|
9680
9884
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
9681
9885
|
*
|
|
@@ -12879,11 +13083,10 @@ var ClipModelMetaSchema = object({
|
|
|
12879
13083
|
/**
|
|
12880
13084
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
12881
13085
|
* per index: two models share an index only when their vectors are ranked
|
|
12882
|
-
* against each other, which for CLIP means never across families.
|
|
12883
|
-
*
|
|
12884
|
-
* `modelId`); any other model gets its own.
|
|
13086
|
+
* against each other, which for CLIP means never across families. Every
|
|
13087
|
+
* model gets its own.
|
|
12885
13088
|
*/
|
|
12886
|
-
vectorIndex: string().regex(/^object-clip
|
|
13089
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
12887
13090
|
/**
|
|
12888
13091
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
12889
13092
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -14062,8 +14265,13 @@ var AlertSeveritySchema = _enum([
|
|
|
14062
14265
|
"info",
|
|
14063
14266
|
"success",
|
|
14064
14267
|
"warning",
|
|
14065
|
-
"error"
|
|
14268
|
+
"error",
|
|
14269
|
+
"critical"
|
|
14066
14270
|
]);
|
|
14271
|
+
var AlertActionSchema = object({
|
|
14272
|
+
label: string(),
|
|
14273
|
+
href: string().optional()
|
|
14274
|
+
});
|
|
14067
14275
|
var AlertStatusSchema = _enum([
|
|
14068
14276
|
"active",
|
|
14069
14277
|
"in-progress",
|
|
@@ -14081,6 +14289,7 @@ var AlertSchema = object({
|
|
|
14081
14289
|
severity: AlertSeveritySchema,
|
|
14082
14290
|
title: string(),
|
|
14083
14291
|
message: string(),
|
|
14292
|
+
action: AlertActionSchema.optional(),
|
|
14084
14293
|
status: AlertStatusSchema,
|
|
14085
14294
|
progress: number().optional(),
|
|
14086
14295
|
read: boolean(),
|
|
@@ -16616,6 +16825,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
16616
16825
|
keyField: string()
|
|
16617
16826
|
}).optional()
|
|
16618
16827
|
})) });
|
|
16828
|
+
/**
|
|
16829
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
16830
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
16831
|
+
*
|
|
16832
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
16833
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
16834
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
16835
|
+
*/
|
|
16836
|
+
var RawSecretMigrationInputSchema = object({
|
|
16837
|
+
/** `false` (the default of the script) = report only. */
|
|
16838
|
+
apply: boolean() });
|
|
16839
|
+
var RawSecretMigrationReportSchema = object({
|
|
16840
|
+
apply: boolean(),
|
|
16841
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
16842
|
+
rows: number().int(),
|
|
16843
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
16844
|
+
raw: number().int(),
|
|
16845
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
16846
|
+
markers: number().int(),
|
|
16847
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
16848
|
+
migrated: number().int(),
|
|
16849
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
16850
|
+
failed: number().int(),
|
|
16851
|
+
/** After the run: rows still holding plaintext. */
|
|
16852
|
+
remainingRaw: number().int(),
|
|
16853
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
16854
|
+
unresolvedMarkers: number().int(),
|
|
16855
|
+
/**
|
|
16856
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
16857
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
16858
|
+
*/
|
|
16859
|
+
redundantCopies: number().int().optional(),
|
|
16860
|
+
/** True when nothing is raw and every marker resolves. */
|
|
16861
|
+
verified: boolean()
|
|
16862
|
+
});
|
|
16619
16863
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
16620
16864
|
* agent is the reason placement is not fixed to the hub. */
|
|
16621
16865
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -16842,6 +17086,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
16842
17086
|
}), SettingsUpdateResultSchema, {
|
|
16843
17087
|
kind: "mutation",
|
|
16844
17088
|
auth: "admin"
|
|
17089
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
17090
|
+
kind: "mutation",
|
|
17091
|
+
auth: "admin"
|
|
16845
17092
|
}), method(object({}), object({ libs: array(object({
|
|
16846
17093
|
filePath: string(),
|
|
16847
17094
|
content: string()
|
|
@@ -17105,6 +17352,347 @@ id: union([string(), number()]) }), {
|
|
|
17105
17352
|
auth: "admin"
|
|
17106
17353
|
});
|
|
17107
17354
|
/**
|
|
17355
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
17356
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
17357
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
17358
|
+
*
|
|
17359
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
17360
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
17361
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
17362
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
17363
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
17364
|
+
* addons go through the owner's capability.
|
|
17365
|
+
*
|
|
17366
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
17367
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
17368
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
17369
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
17370
|
+
* row's own ref.
|
|
17371
|
+
*
|
|
17372
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
17373
|
+
*/
|
|
17374
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
17375
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
17376
|
+
var RecordBodySchema = record(string(), unknown());
|
|
17377
|
+
var RecordInputSchema = object({
|
|
17378
|
+
id: RecordIdSchema,
|
|
17379
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
17380
|
+
deviceId: number().int().optional(),
|
|
17381
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
17382
|
+
at: number().int().optional(),
|
|
17383
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
17384
|
+
expiresAt: number().int().optional(),
|
|
17385
|
+
data: RecordBodySchema
|
|
17386
|
+
});
|
|
17387
|
+
var RecordViewSchema = object({
|
|
17388
|
+
id: string(),
|
|
17389
|
+
deviceId: number().int().nullable(),
|
|
17390
|
+
at: number().nullable(),
|
|
17391
|
+
expiresAt: number().nullable(),
|
|
17392
|
+
rev: number().int(),
|
|
17393
|
+
updatedAt: number(),
|
|
17394
|
+
data: RecordBodySchema
|
|
17395
|
+
});
|
|
17396
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
17397
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
17398
|
+
string(),
|
|
17399
|
+
number(),
|
|
17400
|
+
boolean(),
|
|
17401
|
+
object({ in: array(union([
|
|
17402
|
+
string(),
|
|
17403
|
+
number(),
|
|
17404
|
+
boolean()
|
|
17405
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
17406
|
+
object({
|
|
17407
|
+
gt: union([string(), number()]).optional(),
|
|
17408
|
+
gte: union([string(), number()]).optional(),
|
|
17409
|
+
lt: union([string(), number()]).optional(),
|
|
17410
|
+
lte: union([string(), number()]).optional()
|
|
17411
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
17412
|
+
]));
|
|
17413
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
17414
|
+
var TimeWindowShape = {
|
|
17415
|
+
deviceId: number().int().optional(),
|
|
17416
|
+
atFrom: number().optional(),
|
|
17417
|
+
atTo: number().optional()
|
|
17418
|
+
};
|
|
17419
|
+
var RecordQueryInputSchema = object({
|
|
17420
|
+
...KindShape,
|
|
17421
|
+
...TimeWindowShape,
|
|
17422
|
+
where: RecordWhereSchema.optional(),
|
|
17423
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
17424
|
+
order: _enum(["at", "id"]).optional(),
|
|
17425
|
+
desc: boolean().optional(),
|
|
17426
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
17427
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
17428
|
+
cursor: string().min(1).optional()
|
|
17429
|
+
});
|
|
17430
|
+
var RecordQueryResultSchema = object({
|
|
17431
|
+
records: array(RecordViewSchema),
|
|
17432
|
+
nextCursor: string().nullable()
|
|
17433
|
+
});
|
|
17434
|
+
var RecordKindStateSchema = _enum([
|
|
17435
|
+
"created",
|
|
17436
|
+
"unchanged",
|
|
17437
|
+
"updated"
|
|
17438
|
+
]);
|
|
17439
|
+
var DeclareKindResultSchema = object({
|
|
17440
|
+
kindId: number().int(),
|
|
17441
|
+
state: RecordKindStateSchema,
|
|
17442
|
+
createdIndexes: array(string()),
|
|
17443
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
17444
|
+
adoptionPending: object({
|
|
17445
|
+
legacyTable: string(),
|
|
17446
|
+
legacyRows: number().int()
|
|
17447
|
+
}).nullable()
|
|
17448
|
+
});
|
|
17449
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
17450
|
+
var SecretRefsList = array(string());
|
|
17451
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
17452
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
17453
|
+
kind: "mutation",
|
|
17454
|
+
auth: "admin"
|
|
17455
|
+
}), method(object({
|
|
17456
|
+
...KindShape,
|
|
17457
|
+
id: RecordIdSchema
|
|
17458
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
17459
|
+
...KindShape,
|
|
17460
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
17461
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
17462
|
+
...KindShape,
|
|
17463
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
17464
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
17465
|
+
...KindShape,
|
|
17466
|
+
record: RecordInputSchema,
|
|
17467
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
17468
|
+
ifRev: number().int().min(0).optional()
|
|
17469
|
+
}), object({
|
|
17470
|
+
rev: number().int(),
|
|
17471
|
+
releasedRefs: SecretRefsList
|
|
17472
|
+
}), {
|
|
17473
|
+
kind: "mutation",
|
|
17474
|
+
auth: "admin"
|
|
17475
|
+
}), method(object({
|
|
17476
|
+
...KindShape,
|
|
17477
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
17478
|
+
}), object({
|
|
17479
|
+
count: number().int(),
|
|
17480
|
+
releasedRefs: SecretRefsList
|
|
17481
|
+
}), {
|
|
17482
|
+
kind: "mutation",
|
|
17483
|
+
auth: "admin"
|
|
17484
|
+
}), method(object({
|
|
17485
|
+
...KindShape,
|
|
17486
|
+
id: RecordIdSchema,
|
|
17487
|
+
data: RecordBodySchema,
|
|
17488
|
+
at: number().int().nullable().optional(),
|
|
17489
|
+
expiresAt: number().int().nullable().optional(),
|
|
17490
|
+
ifRev: number().int().min(1).optional()
|
|
17491
|
+
}), object({
|
|
17492
|
+
rev: number().int(),
|
|
17493
|
+
releasedRefs: SecretRefsList
|
|
17494
|
+
}), {
|
|
17495
|
+
kind: "mutation",
|
|
17496
|
+
auth: "admin"
|
|
17497
|
+
}), method(object({
|
|
17498
|
+
...KindShape,
|
|
17499
|
+
id: RecordIdSchema
|
|
17500
|
+
}), object({
|
|
17501
|
+
deleted: boolean(),
|
|
17502
|
+
secretRefs: SecretRefsList
|
|
17503
|
+
}), {
|
|
17504
|
+
kind: "mutation",
|
|
17505
|
+
auth: "admin"
|
|
17506
|
+
}), method(object({
|
|
17507
|
+
...KindShape,
|
|
17508
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
17509
|
+
}), object({
|
|
17510
|
+
deleted: number().int(),
|
|
17511
|
+
secretRefs: SecretRefsList
|
|
17512
|
+
}), {
|
|
17513
|
+
kind: "mutation",
|
|
17514
|
+
auth: "admin"
|
|
17515
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17516
|
+
...KindShape,
|
|
17517
|
+
...TimeWindowShape,
|
|
17518
|
+
where: RecordWhereSchema.optional()
|
|
17519
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
17520
|
+
...KindShape,
|
|
17521
|
+
deviceId: number().int().optional(),
|
|
17522
|
+
from: number(),
|
|
17523
|
+
to: number(),
|
|
17524
|
+
bucketMs: number().int().positive()
|
|
17525
|
+
}), object({ buckets: array(object({
|
|
17526
|
+
bucketStart: number(),
|
|
17527
|
+
count: number().int()
|
|
17528
|
+
})) }), { auth: "admin" }), method(object({
|
|
17529
|
+
...KindShape,
|
|
17530
|
+
op: _enum([
|
|
17531
|
+
"sum",
|
|
17532
|
+
"min",
|
|
17533
|
+
"max",
|
|
17534
|
+
"count"
|
|
17535
|
+
]),
|
|
17536
|
+
field: RecordFieldPathSchema.optional(),
|
|
17537
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
17538
|
+
where: RecordWhereSchema.optional()
|
|
17539
|
+
}), object({ rows: array(object({
|
|
17540
|
+
group: union([
|
|
17541
|
+
string(),
|
|
17542
|
+
number(),
|
|
17543
|
+
_null()
|
|
17544
|
+
]),
|
|
17545
|
+
value: number().nullable()
|
|
17546
|
+
})) }), { auth: "admin" }), method(object({
|
|
17547
|
+
...KindShape,
|
|
17548
|
+
deviceId: number().int().optional(),
|
|
17549
|
+
atBefore: number().optional(),
|
|
17550
|
+
where: RecordWhereSchema.optional()
|
|
17551
|
+
}), object({
|
|
17552
|
+
deleted: number().int(),
|
|
17553
|
+
secretRefs: SecretRefsList
|
|
17554
|
+
}), {
|
|
17555
|
+
kind: "mutation",
|
|
17556
|
+
auth: "admin"
|
|
17557
|
+
}), method(object({
|
|
17558
|
+
deviceId: number().int(),
|
|
17559
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
17560
|
+
}), object({
|
|
17561
|
+
deleted: record(string(), number().int()),
|
|
17562
|
+
secretRefs: SecretRefsList
|
|
17563
|
+
}), {
|
|
17564
|
+
kind: "mutation",
|
|
17565
|
+
auth: "admin"
|
|
17566
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
17567
|
+
kind: "mutation",
|
|
17568
|
+
auth: "admin"
|
|
17569
|
+
});
|
|
17570
|
+
/** One table of the settings database. */
|
|
17571
|
+
var StorageTableSchema = object({
|
|
17572
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
17573
|
+
name: string(),
|
|
17574
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
17575
|
+
owner: string().nullable(),
|
|
17576
|
+
rows: number().int().nonnegative(),
|
|
17577
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
17578
|
+
bytes: number().int().nonnegative().nullable(),
|
|
17579
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
17580
|
+
declaredThisBoot: boolean()
|
|
17581
|
+
});
|
|
17582
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
17583
|
+
var StorageKindSchema = object({
|
|
17584
|
+
owner: string(),
|
|
17585
|
+
kind: string(),
|
|
17586
|
+
database: _enum(["settings", "events"]),
|
|
17587
|
+
class: string(),
|
|
17588
|
+
state: _enum([
|
|
17589
|
+
"declared",
|
|
17590
|
+
"orphaned",
|
|
17591
|
+
"dropped"
|
|
17592
|
+
]),
|
|
17593
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
17594
|
+
rows: number().int().nonnegative().nullable(),
|
|
17595
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
17596
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
17597
|
+
writeTrigger: string(),
|
|
17598
|
+
retention: RecordRetentionSchema,
|
|
17599
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
17600
|
+
entry: boolean(),
|
|
17601
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
17602
|
+
declaration: RecordKindDeclarationSchema
|
|
17603
|
+
});
|
|
17604
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
17605
|
+
collection: string().min(1),
|
|
17606
|
+
expectRows: number().int().nonnegative()
|
|
17607
|
+
}), object({
|
|
17608
|
+
dropped: literal(true),
|
|
17609
|
+
rows: number().int().nonnegative()
|
|
17610
|
+
}), {
|
|
17611
|
+
kind: "mutation",
|
|
17612
|
+
auth: "admin"
|
|
17613
|
+
}), method(object({
|
|
17614
|
+
owner: string().min(1).optional(),
|
|
17615
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
17616
|
+
counts: boolean().optional()
|
|
17617
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
17618
|
+
owner: string().min(1),
|
|
17619
|
+
kind: RecordKindNameSchema
|
|
17620
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
17621
|
+
owner: string().min(1),
|
|
17622
|
+
kind: RecordKindNameSchema,
|
|
17623
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
17624
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
17625
|
+
complete: boolean().optional()
|
|
17626
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
17627
|
+
kind: "mutation",
|
|
17628
|
+
auth: "admin"
|
|
17629
|
+
}), method(object({
|
|
17630
|
+
collection: string().min(1),
|
|
17631
|
+
cursor: string().optional(),
|
|
17632
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
17633
|
+
}), object({
|
|
17634
|
+
rows: array(object({
|
|
17635
|
+
id: string(),
|
|
17636
|
+
data: record(string(), unknown())
|
|
17637
|
+
})),
|
|
17638
|
+
nextCursor: string().nullable()
|
|
17639
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
17640
|
+
/**
|
|
17641
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
17642
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
17643
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
17644
|
+
*
|
|
17645
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
17646
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
17647
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
17648
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
17649
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
17650
|
+
* a secret value, and a locked keychain refuses the write with
|
|
17651
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
17652
|
+
*
|
|
17653
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
17654
|
+
*/
|
|
17655
|
+
var EntryKindInfoSchema = object({
|
|
17656
|
+
owner: string(),
|
|
17657
|
+
kind: RecordKindNameSchema,
|
|
17658
|
+
title: string(),
|
|
17659
|
+
nameField: string(),
|
|
17660
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
17661
|
+
fields: record(string(), unknown()),
|
|
17662
|
+
secretPaths: array(string()),
|
|
17663
|
+
rows: number().int().nonnegative()
|
|
17664
|
+
});
|
|
17665
|
+
var EntryViewSchema = object({
|
|
17666
|
+
id: RecordIdSchema,
|
|
17667
|
+
name: string(),
|
|
17668
|
+
rev: number().int(),
|
|
17669
|
+
updatedAt: number(),
|
|
17670
|
+
/** Secret fields hold the redaction token. */
|
|
17671
|
+
data: RecordBodySchema
|
|
17672
|
+
});
|
|
17673
|
+
var EntryAddress = {
|
|
17674
|
+
owner: string().min(1),
|
|
17675
|
+
kind: RecordKindNameSchema
|
|
17676
|
+
};
|
|
17677
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
17678
|
+
...EntryAddress,
|
|
17679
|
+
id: RecordIdSchema.optional(),
|
|
17680
|
+
data: RecordBodySchema,
|
|
17681
|
+
ifRev: number().int().min(1).optional()
|
|
17682
|
+
}), object({
|
|
17683
|
+
id: string(),
|
|
17684
|
+
rev: number().int()
|
|
17685
|
+
}), {
|
|
17686
|
+
kind: "mutation",
|
|
17687
|
+
auth: "admin"
|
|
17688
|
+
}), method(object({
|
|
17689
|
+
...EntryAddress,
|
|
17690
|
+
id: RecordIdSchema
|
|
17691
|
+
}), object({ deleted: boolean() }), {
|
|
17692
|
+
kind: "mutation",
|
|
17693
|
+
auth: "admin"
|
|
17694
|
+
});
|
|
17695
|
+
/**
|
|
17108
17696
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
17109
17697
|
*
|
|
17110
17698
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -17645,6 +18233,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
17645
18233
|
kind: "mutation",
|
|
17646
18234
|
auth: "admin",
|
|
17647
18235
|
caller: "required"
|
|
18236
|
+
}), method(object({
|
|
18237
|
+
ref: string().min(1),
|
|
18238
|
+
value: string().min(1)
|
|
18239
|
+
}), object({
|
|
18240
|
+
ref: string(),
|
|
18241
|
+
version: number().int()
|
|
18242
|
+
}), {
|
|
18243
|
+
kind: "mutation",
|
|
18244
|
+
auth: "admin",
|
|
18245
|
+
caller: "required"
|
|
17648
18246
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
17649
18247
|
deleted: array(string()).readonly(),
|
|
17650
18248
|
kept: array(object({
|
|
@@ -18053,7 +18651,11 @@ var deviceDiscoveryCapability = {
|
|
|
18053
18651
|
};
|
|
18054
18652
|
/**
|
|
18055
18653
|
* `device-adoption` — generic discovery + adoption surface,
|
|
18056
|
-
* system-scoped
|
|
18654
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
18655
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
18656
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
18657
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
18658
|
+
* successor to `ha-discovery`:
|
|
18057
18659
|
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
18058
18660
|
* internally) rather than a connection-specific `brokerId`, and it
|
|
18059
18661
|
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
@@ -18218,7 +18820,7 @@ var ResyncResultSchema = object({
|
|
|
18218
18820
|
var deviceAdoptionCapability = {
|
|
18219
18821
|
name: "device-adoption",
|
|
18220
18822
|
scope: "system",
|
|
18221
|
-
mode: "
|
|
18823
|
+
mode: "collection",
|
|
18222
18824
|
status: {
|
|
18223
18825
|
schema: AdoptionStatusSchema,
|
|
18224
18826
|
kind: "poll"
|
|
@@ -40323,6 +40925,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
40323
40925
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
40324
40926
|
kind: "mutation",
|
|
40325
40927
|
auth: "admin"
|
|
40928
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
40929
|
+
kind: "mutation",
|
|
40930
|
+
auth: "admin"
|
|
40326
40931
|
}), method(ProfileRefInputSchema, _void(), {
|
|
40327
40932
|
kind: "mutation",
|
|
40328
40933
|
auth: "admin"
|
|
@@ -50832,6 +51437,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
50832
51437
|
atMs: number(),
|
|
50833
51438
|
reason: string()
|
|
50834
51439
|
});
|
|
51440
|
+
/**
|
|
51441
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
51442
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
51443
|
+
* service holds, because only the hub plans) against the states the process
|
|
51444
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
51445
|
+
* every boot, served on `getServerPackageStatus`.
|
|
51446
|
+
*
|
|
51447
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
51448
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
51449
|
+
* planned runner the process service has no entry for.
|
|
51450
|
+
*/
|
|
51451
|
+
var RunnerRefusalSchema = object({
|
|
51452
|
+
runnerId: string(),
|
|
51453
|
+
addonIds: array(string()),
|
|
51454
|
+
reason: string()
|
|
51455
|
+
});
|
|
51456
|
+
var RunnerBootCheckSchema = object({
|
|
51457
|
+
checkedAtMs: number(),
|
|
51458
|
+
/** Runners planned for this node. */
|
|
51459
|
+
expected: number(),
|
|
51460
|
+
/** Planned runners whose process is `running`. */
|
|
51461
|
+
running: number(),
|
|
51462
|
+
failed: array(string()),
|
|
51463
|
+
refused: array(RunnerRefusalSchema),
|
|
51464
|
+
missing: array(string()),
|
|
51465
|
+
/**
|
|
51466
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
51467
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
51468
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
51469
|
+
* Optional for version skew (absent = settled).
|
|
51470
|
+
*/
|
|
51471
|
+
pending: array(string()).optional(),
|
|
51472
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
51473
|
+
planKnown: boolean()
|
|
51474
|
+
});
|
|
50835
51475
|
var ServerPackageStatusSchema = object({
|
|
50836
51476
|
/** Root package name (`@camstack/server` on the hub). */
|
|
50837
51477
|
packageName: string(),
|
|
@@ -50894,7 +51534,14 @@ var ServerPackageStatusSchema = object({
|
|
|
50894
51534
|
* for version skew: an older provider's payload simply omits it, and an
|
|
50895
51535
|
* absent wrapper is unknown — never `native`.
|
|
50896
51536
|
*/
|
|
50897
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
51537
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
51538
|
+
/**
|
|
51539
|
+
* What this node PLANNED to run against what its process service reports
|
|
51540
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
51541
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
51542
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
51543
|
+
*/
|
|
51544
|
+
runners: RunnerBootCheckSchema.optional()
|
|
50898
51545
|
});
|
|
50899
51546
|
var ServerUpdateCheckResultSchema = object({
|
|
50900
51547
|
packageName: string(),
|
|
@@ -50945,6 +51592,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
50945
51592
|
"refused",
|
|
50946
51593
|
"failed"
|
|
50947
51594
|
]);
|
|
51595
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
51596
|
+
var UpdateBlockerSchema = object({
|
|
51597
|
+
addonId: string(),
|
|
51598
|
+
reason: string(),
|
|
51599
|
+
/** What the operator does about it. */
|
|
51600
|
+
remedy: string()
|
|
51601
|
+
});
|
|
50948
51602
|
var ServerUpdateActionResultSchema = object({
|
|
50949
51603
|
accepted: boolean(),
|
|
50950
51604
|
targetVersion: string().nullable(),
|
|
@@ -50962,14 +51616,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
50962
51616
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
50963
51617
|
* staging install). Non-null only for `failed`.
|
|
50964
51618
|
*/
|
|
50965
|
-
error: string().nullable().optional()
|
|
51619
|
+
error: string().nullable().optional(),
|
|
51620
|
+
/**
|
|
51621
|
+
* The addons the target version would refuse to start on this node's live
|
|
51622
|
+
* store (D877), present when the pre-flight refused the update
|
|
51623
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
51624
|
+
*/
|
|
51625
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
50966
51626
|
});
|
|
50967
51627
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
50968
51628
|
kind: "mutation",
|
|
50969
51629
|
auth: "admin"
|
|
50970
|
-
}), method(object({
|
|
50971
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
50972
|
-
version: string().optional()
|
|
51630
|
+
}), method(object({
|
|
51631
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
51632
|
+
version: string().optional(),
|
|
51633
|
+
/**
|
|
51634
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
51635
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
51636
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
51637
|
+
*/
|
|
51638
|
+
acknowledgeRefusals: boolean().optional()
|
|
51639
|
+
}), ServerUpdateActionResultSchema, {
|
|
50973
51640
|
kind: "mutation",
|
|
50974
51641
|
auth: "admin",
|
|
50975
51642
|
timeoutMs: 16 * 6e4
|
|
@@ -53415,7 +54082,9 @@ var ManifestShapeSchema = object({
|
|
|
53415
54082
|
var AddonProcessSchema = object({
|
|
53416
54083
|
pid: number().optional(),
|
|
53417
54084
|
mode: string(),
|
|
53418
|
-
state: string()
|
|
54085
|
+
state: string(),
|
|
54086
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
54087
|
+
reason: string().optional()
|
|
53419
54088
|
});
|
|
53420
54089
|
/**
|
|
53421
54090
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -54183,7 +54852,8 @@ var batteryCapability = {
|
|
|
54183
54852
|
DeviceType.Button,
|
|
54184
54853
|
DeviceType.Switch,
|
|
54185
54854
|
DeviceType.PetFeeder,
|
|
54186
|
-
DeviceType.Container
|
|
54855
|
+
DeviceType.Container,
|
|
54856
|
+
DeviceType.Thermostat
|
|
54187
54857
|
],
|
|
54188
54858
|
methods: {
|
|
54189
54859
|
/**
|
|
@@ -54804,6 +55474,12 @@ var ClimateControlStatusSchema = object({
|
|
|
54804
55474
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
54805
55475
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
54806
55476
|
swingHorizontal: boolean().nullable(),
|
|
55477
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
55478
|
+
minTemp: number().nullable().optional(),
|
|
55479
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
55480
|
+
maxTemp: number().nullable().optional(),
|
|
55481
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
55482
|
+
tempStep: number().positive().nullable().optional(),
|
|
54807
55483
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
54808
55484
|
lastFetchedAt: number()
|
|
54809
55485
|
});
|
|
@@ -55658,6 +56334,161 @@ onStatusChanged: { data: object({
|
|
|
55658
56334
|
* whether persisting is worth a SQLite commit. */
|
|
55659
56335
|
volatileStateFields: ["lastChangedAt"]
|
|
55660
56336
|
};
|
|
56337
|
+
/**
|
|
56338
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
56339
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
56340
|
+
*
|
|
56341
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
56342
|
+
* by any integration that exposes the same program / option surface.
|
|
56343
|
+
*
|
|
56344
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
56345
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
56346
|
+
*/
|
|
56347
|
+
var DishwasherStateSchema = _enum([
|
|
56348
|
+
"idle",
|
|
56349
|
+
"running",
|
|
56350
|
+
"paused",
|
|
56351
|
+
"finished",
|
|
56352
|
+
"error",
|
|
56353
|
+
"unavailable"
|
|
56354
|
+
]);
|
|
56355
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
56356
|
+
"ok",
|
|
56357
|
+
"low",
|
|
56358
|
+
"empty"
|
|
56359
|
+
]);
|
|
56360
|
+
var DishwasherStatusSchema = object({
|
|
56361
|
+
state: DishwasherStateSchema,
|
|
56362
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
56363
|
+
program: string().nullable(),
|
|
56364
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
56365
|
+
availablePrograms: array(string()),
|
|
56366
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
56367
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
56368
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
56369
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
56370
|
+
/** True when the door is reported open. */
|
|
56371
|
+
doorOpen: boolean(),
|
|
56372
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
56373
|
+
remoteStartAllowed: boolean(),
|
|
56374
|
+
/** Main power / switched-on state. */
|
|
56375
|
+
powerOn: boolean(),
|
|
56376
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56377
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56378
|
+
halfLoad: boolean(),
|
|
56379
|
+
hygienePlus: boolean(),
|
|
56380
|
+
/** Extra dry option when the appliance exposes it. */
|
|
56381
|
+
extraDry: boolean(),
|
|
56382
|
+
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
56383
|
+
intensiveZone: boolean(),
|
|
56384
|
+
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
56385
|
+
varioSpeedPlus: boolean(),
|
|
56386
|
+
/** Child lock (controls disabled on the appliance). */
|
|
56387
|
+
childLock: boolean(),
|
|
56388
|
+
errorCode: number().nullable(),
|
|
56389
|
+
errorLabel: string().nullable(),
|
|
56390
|
+
lastFetchedAt: number()
|
|
56391
|
+
});
|
|
56392
|
+
var dishwasherCapability = {
|
|
56393
|
+
name: "dishwasher",
|
|
56394
|
+
scope: "device",
|
|
56395
|
+
deviceNative: true,
|
|
56396
|
+
mode: "singleton",
|
|
56397
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
56398
|
+
methods: {
|
|
56399
|
+
start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56400
|
+
kind: "mutation",
|
|
56401
|
+
auth: "protected"
|
|
56402
|
+
}),
|
|
56403
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56404
|
+
kind: "mutation",
|
|
56405
|
+
auth: "protected"
|
|
56406
|
+
}),
|
|
56407
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
56408
|
+
kind: "mutation",
|
|
56409
|
+
auth: "protected"
|
|
56410
|
+
}),
|
|
56411
|
+
setProgram: method(object({
|
|
56412
|
+
deviceId: number().int().nonnegative(),
|
|
56413
|
+
program: string().min(1)
|
|
56414
|
+
}), _void(), {
|
|
56415
|
+
kind: "mutation",
|
|
56416
|
+
auth: "protected"
|
|
56417
|
+
}),
|
|
56418
|
+
setPower: method(object({
|
|
56419
|
+
deviceId: number().int().nonnegative(),
|
|
56420
|
+
on: boolean()
|
|
56421
|
+
}), _void(), {
|
|
56422
|
+
kind: "mutation",
|
|
56423
|
+
auth: "protected"
|
|
56424
|
+
}),
|
|
56425
|
+
setHalfLoad: method(object({
|
|
56426
|
+
deviceId: number().int().nonnegative(),
|
|
56427
|
+
on: boolean()
|
|
56428
|
+
}), _void(), {
|
|
56429
|
+
kind: "mutation",
|
|
56430
|
+
auth: "protected"
|
|
56431
|
+
}),
|
|
56432
|
+
setHygienePlus: method(object({
|
|
56433
|
+
deviceId: number().int().nonnegative(),
|
|
56434
|
+
on: boolean()
|
|
56435
|
+
}), _void(), {
|
|
56436
|
+
kind: "mutation",
|
|
56437
|
+
auth: "protected"
|
|
56438
|
+
}),
|
|
56439
|
+
setExtraDry: method(object({
|
|
56440
|
+
deviceId: number().int().nonnegative(),
|
|
56441
|
+
on: boolean()
|
|
56442
|
+
}), _void(), {
|
|
56443
|
+
kind: "mutation",
|
|
56444
|
+
auth: "protected"
|
|
56445
|
+
}),
|
|
56446
|
+
setIntensiveZone: method(object({
|
|
56447
|
+
deviceId: number().int().nonnegative(),
|
|
56448
|
+
on: boolean()
|
|
56449
|
+
}), _void(), {
|
|
56450
|
+
kind: "mutation",
|
|
56451
|
+
auth: "protected"
|
|
56452
|
+
}),
|
|
56453
|
+
setVarioSpeedPlus: method(object({
|
|
56454
|
+
deviceId: number().int().nonnegative(),
|
|
56455
|
+
on: boolean()
|
|
56456
|
+
}), _void(), {
|
|
56457
|
+
kind: "mutation",
|
|
56458
|
+
auth: "protected"
|
|
56459
|
+
}),
|
|
56460
|
+
setChildLock: method(object({
|
|
56461
|
+
deviceId: number().int().nonnegative(),
|
|
56462
|
+
on: boolean()
|
|
56463
|
+
}), _void(), {
|
|
56464
|
+
kind: "mutation",
|
|
56465
|
+
auth: "protected"
|
|
56466
|
+
}),
|
|
56467
|
+
setOption: method(object({
|
|
56468
|
+
deviceId: number().int().nonnegative(),
|
|
56469
|
+
key: string().min(1),
|
|
56470
|
+
value: union([
|
|
56471
|
+
boolean(),
|
|
56472
|
+
string(),
|
|
56473
|
+
number()
|
|
56474
|
+
])
|
|
56475
|
+
}), _void(), {
|
|
56476
|
+
kind: "mutation",
|
|
56477
|
+
auth: "protected"
|
|
56478
|
+
})
|
|
56479
|
+
},
|
|
56480
|
+
status: {
|
|
56481
|
+
schema: DishwasherStatusSchema,
|
|
56482
|
+
kind: "poll"
|
|
56483
|
+
},
|
|
56484
|
+
runtimeState: DishwasherStatusSchema,
|
|
56485
|
+
durability: "session",
|
|
56486
|
+
history: { fields: { progressPercent: {
|
|
56487
|
+
kind: "gauge",
|
|
56488
|
+
unit: "%",
|
|
56489
|
+
deadband: 2
|
|
56490
|
+
} } }
|
|
56491
|
+
};
|
|
55661
56492
|
var DoorbellStatusSchema = object({
|
|
55662
56493
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
55663
56494
|
lastPressedAt: number().nullable(),
|
|
@@ -56460,6 +57291,32 @@ var gasCapability = {
|
|
|
56460
57291
|
* whether persisting is worth a SQLite commit. */
|
|
56461
57292
|
volatileStateFields: ["lastChangedAt"]
|
|
56462
57293
|
};
|
|
57294
|
+
var HeatingValveStatusSchema = object({
|
|
57295
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
57296
|
+
position: number().min(0).max(100).nullable(),
|
|
57297
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
57298
|
+
lastFetchedAt: number()
|
|
57299
|
+
});
|
|
57300
|
+
var heatingValveCapability = {
|
|
57301
|
+
name: "heating-valve",
|
|
57302
|
+
scope: "device",
|
|
57303
|
+
deviceNative: true,
|
|
57304
|
+
mode: "singleton",
|
|
57305
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
57306
|
+
methods: {},
|
|
57307
|
+
status: {
|
|
57308
|
+
schema: HeatingValveStatusSchema,
|
|
57309
|
+
kind: "push"
|
|
57310
|
+
},
|
|
57311
|
+
runtimeState: HeatingValveStatusSchema,
|
|
57312
|
+
durability: "session",
|
|
57313
|
+
history: { fields: { position: {
|
|
57314
|
+
kind: "gauge",
|
|
57315
|
+
unit: "%",
|
|
57316
|
+
deadband: 1
|
|
57317
|
+
} } },
|
|
57318
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
57319
|
+
};
|
|
56463
57320
|
/**
|
|
56464
57321
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
56465
57322
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -57592,7 +58449,19 @@ var TlsStatusSchema = object({
|
|
|
57592
58449
|
sans: array(string()),
|
|
57593
58450
|
caCertPem: string().nullable(),
|
|
57594
58451
|
reissueError: string().nullable(),
|
|
57595
|
-
restartRequired: boolean()
|
|
58452
|
+
restartRequired: boolean(),
|
|
58453
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
58454
|
+
caMissing: boolean(),
|
|
58455
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
58456
|
+
localCaConstrained: boolean().nullable(),
|
|
58457
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
58458
|
+
caReplacedAt: string().nullable(),
|
|
58459
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
58460
|
+
storedUpload: object({
|
|
58461
|
+
leafFingerprintSha256: string(),
|
|
58462
|
+
validTo: string(),
|
|
58463
|
+
hasCa: boolean()
|
|
58464
|
+
}).nullable()
|
|
57596
58465
|
});
|
|
57597
58466
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
57598
58467
|
/**
|
|
@@ -57648,6 +58517,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
57648
58517
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
57649
58518
|
kind: "mutation",
|
|
57650
58519
|
auth: "admin"
|
|
58520
|
+
}), method(_void(), TlsStatusSchema, {
|
|
58521
|
+
kind: "mutation",
|
|
58522
|
+
auth: "admin"
|
|
57651
58523
|
});
|
|
57652
58524
|
var LockControlStatusSchema = object({
|
|
57653
58525
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -64141,7 +65013,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64141
65013
|
kind: "mutation",
|
|
64142
65014
|
auth: "admin",
|
|
64143
65015
|
access: "delete"
|
|
64144
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
65016
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
65017
|
+
kind: "mutation",
|
|
65018
|
+
auth: "admin",
|
|
65019
|
+
access: "create"
|
|
65020
|
+
}), method(object({
|
|
64145
65021
|
userId: string(),
|
|
64146
65022
|
code: string()
|
|
64147
65023
|
}), object({ valid: boolean() }), {
|
|
@@ -65861,6 +66737,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
65861
66737
|
dayNight: dayNightCapability,
|
|
65862
66738
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
65863
66739
|
deviceStatus: deviceStatusCapability,
|
|
66740
|
+
dishwasher: dishwasherCapability,
|
|
65864
66741
|
doorbell: doorbellCapability,
|
|
65865
66742
|
enumSensor: enumSensorCapability,
|
|
65866
66743
|
eventEmitter: eventEmitterCapability,
|
|
@@ -65868,6 +66745,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
65868
66745
|
featureProbe: featureProbeCapability,
|
|
65869
66746
|
flood: floodCapability,
|
|
65870
66747
|
gas: gasCapability,
|
|
66748
|
+
heatingValve: heatingValveCapability,
|
|
65871
66749
|
humidifier: humidifierCapability,
|
|
65872
66750
|
humiditySensor: humiditySensorCapability,
|
|
65873
66751
|
image: imageCapability,
|
|
@@ -65953,13 +66831,14 @@ var BaseDevice = class {
|
|
|
65953
66831
|
get state() {
|
|
65954
66832
|
if (!this._stateProxyCache) {
|
|
65955
66833
|
const cache = {};
|
|
65956
|
-
const handler = { get: (
|
|
66834
|
+
const handler = { get: (target, key) => {
|
|
65957
66835
|
const k = key;
|
|
65958
|
-
|
|
66836
|
+
const existing = Reflect.get(target, k);
|
|
66837
|
+
if (existing !== void 0) return existing;
|
|
65959
66838
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
65960
66839
|
if (!cap) return void 0;
|
|
65961
66840
|
const proxy = this.sliceProxy(cap);
|
|
65962
|
-
|
|
66841
|
+
Reflect.set(target, k, proxy);
|
|
65963
66842
|
return proxy;
|
|
65964
66843
|
} };
|
|
65965
66844
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -66158,7 +67037,7 @@ var BaseDevice = class {
|
|
|
66158
67037
|
async updateSourceInfo(patch) {
|
|
66159
67038
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
66160
67039
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
66161
|
-
const action = this.ctx.api
|
|
67040
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
66162
67041
|
if (action) try {
|
|
66163
67042
|
await action.mutate({
|
|
66164
67043
|
deviceId: this.id,
|
|
@@ -66193,7 +67072,7 @@ var BaseDevice = class {
|
|
|
66193
67072
|
* device boot on a meta refresh.
|
|
66194
67073
|
*/
|
|
66195
67074
|
async refreshFeatures() {
|
|
66196
|
-
const action = this.ctx.api
|
|
67075
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
66197
67076
|
if (!action) return;
|
|
66198
67077
|
try {
|
|
66199
67078
|
await action.mutate({
|
|
@@ -66592,6 +67471,12 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
66592
67471
|
provider: this
|
|
66593
67472
|
}];
|
|
66594
67473
|
}
|
|
67474
|
+
/** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
|
|
67475
|
+
providerRegistrationsFromSuper(result) {
|
|
67476
|
+
if (Array.isArray(result)) return result;
|
|
67477
|
+
if (result !== void 0 && result.providers !== void 0) return [...result.providers];
|
|
67478
|
+
return [];
|
|
67479
|
+
}
|
|
66595
67480
|
async onShutdown() {
|
|
66596
67481
|
this._restoreShuttingDown = true;
|
|
66597
67482
|
this.cancelRestoreRetries();
|
|
@@ -67118,7 +68003,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
67118
68003
|
return toDeviceSummary(device, this.addonId);
|
|
67119
68004
|
}
|
|
67120
68005
|
};
|
|
67121
|
-
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;
|
|
68006
|
+
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;
|
|
67122
68007
|
new Set(Object.values(DeviceType));
|
|
67123
68008
|
Object.freeze({
|
|
67124
68009
|
"accessories.getStatus": {
|
|
@@ -68267,6 +69152,12 @@ Object.freeze({
|
|
|
68267
69152
|
addonId: null,
|
|
68268
69153
|
access: "view"
|
|
68269
69154
|
},
|
|
69155
|
+
"coreBlocks.migrateRawSecrets": {
|
|
69156
|
+
capName: "core-blocks",
|
|
69157
|
+
capScope: "system",
|
|
69158
|
+
addonId: null,
|
|
69159
|
+
access: "create"
|
|
69160
|
+
},
|
|
68270
69161
|
"coreBlocks.restart": {
|
|
68271
69162
|
capName: "core-blocks",
|
|
68272
69163
|
capScope: "system",
|
|
@@ -69533,6 +70424,84 @@ Object.freeze({
|
|
|
69533
70424
|
addonId: null,
|
|
69534
70425
|
access: "view"
|
|
69535
70426
|
},
|
|
70427
|
+
"dishwasher.getStatus": {
|
|
70428
|
+
capName: "dishwasher",
|
|
70429
|
+
capScope: "device",
|
|
70430
|
+
addonId: null,
|
|
70431
|
+
access: "view"
|
|
70432
|
+
},
|
|
70433
|
+
"dishwasher.pause": {
|
|
70434
|
+
capName: "dishwasher",
|
|
70435
|
+
capScope: "device",
|
|
70436
|
+
addonId: null,
|
|
70437
|
+
access: "create"
|
|
70438
|
+
},
|
|
70439
|
+
"dishwasher.setChildLock": {
|
|
70440
|
+
capName: "dishwasher",
|
|
70441
|
+
capScope: "device",
|
|
70442
|
+
addonId: null,
|
|
70443
|
+
access: "create"
|
|
70444
|
+
},
|
|
70445
|
+
"dishwasher.setExtraDry": {
|
|
70446
|
+
capName: "dishwasher",
|
|
70447
|
+
capScope: "device",
|
|
70448
|
+
addonId: null,
|
|
70449
|
+
access: "create"
|
|
70450
|
+
},
|
|
70451
|
+
"dishwasher.setHalfLoad": {
|
|
70452
|
+
capName: "dishwasher",
|
|
70453
|
+
capScope: "device",
|
|
70454
|
+
addonId: null,
|
|
70455
|
+
access: "create"
|
|
70456
|
+
},
|
|
70457
|
+
"dishwasher.setHygienePlus": {
|
|
70458
|
+
capName: "dishwasher",
|
|
70459
|
+
capScope: "device",
|
|
70460
|
+
addonId: null,
|
|
70461
|
+
access: "create"
|
|
70462
|
+
},
|
|
70463
|
+
"dishwasher.setIntensiveZone": {
|
|
70464
|
+
capName: "dishwasher",
|
|
70465
|
+
capScope: "device",
|
|
70466
|
+
addonId: null,
|
|
70467
|
+
access: "create"
|
|
70468
|
+
},
|
|
70469
|
+
"dishwasher.setOption": {
|
|
70470
|
+
capName: "dishwasher",
|
|
70471
|
+
capScope: "device",
|
|
70472
|
+
addonId: null,
|
|
70473
|
+
access: "create"
|
|
70474
|
+
},
|
|
70475
|
+
"dishwasher.setPower": {
|
|
70476
|
+
capName: "dishwasher",
|
|
70477
|
+
capScope: "device",
|
|
70478
|
+
addonId: null,
|
|
70479
|
+
access: "create"
|
|
70480
|
+
},
|
|
70481
|
+
"dishwasher.setProgram": {
|
|
70482
|
+
capName: "dishwasher",
|
|
70483
|
+
capScope: "device",
|
|
70484
|
+
addonId: null,
|
|
70485
|
+
access: "create"
|
|
70486
|
+
},
|
|
70487
|
+
"dishwasher.setVarioSpeedPlus": {
|
|
70488
|
+
capName: "dishwasher",
|
|
70489
|
+
capScope: "device",
|
|
70490
|
+
addonId: null,
|
|
70491
|
+
access: "create"
|
|
70492
|
+
},
|
|
70493
|
+
"dishwasher.start": {
|
|
70494
|
+
capName: "dishwasher",
|
|
70495
|
+
capScope: "device",
|
|
70496
|
+
addonId: null,
|
|
70497
|
+
access: "create"
|
|
70498
|
+
},
|
|
70499
|
+
"dishwasher.stop": {
|
|
70500
|
+
capName: "dishwasher",
|
|
70501
|
+
capScope: "device",
|
|
70502
|
+
addonId: null,
|
|
70503
|
+
access: "create"
|
|
70504
|
+
},
|
|
69536
70505
|
"doorbell.getStatus": {
|
|
69537
70506
|
capName: "doorbell",
|
|
69538
70507
|
capScope: "device",
|
|
@@ -69743,6 +70712,12 @@ Object.freeze({
|
|
|
69743
70712
|
addonId: null,
|
|
69744
70713
|
access: "view"
|
|
69745
70714
|
},
|
|
70715
|
+
"heatingValve.getStatus": {
|
|
70716
|
+
capName: "heating-valve",
|
|
70717
|
+
capScope: "device",
|
|
70718
|
+
addonId: null,
|
|
70719
|
+
access: "view"
|
|
70720
|
+
},
|
|
69746
70721
|
"humidifier.getStatus": {
|
|
69747
70722
|
capName: "humidifier",
|
|
69748
70723
|
capScope: "device",
|
|
@@ -69953,6 +70928,12 @@ Object.freeze({
|
|
|
69953
70928
|
addonId: null,
|
|
69954
70929
|
access: "create"
|
|
69955
70930
|
},
|
|
70931
|
+
"keychainAdmin.importSecret": {
|
|
70932
|
+
capName: "keychain-admin",
|
|
70933
|
+
capScope: "system",
|
|
70934
|
+
addonId: null,
|
|
70935
|
+
access: "create"
|
|
70936
|
+
},
|
|
69956
70937
|
"keychainAdmin.listAudit": {
|
|
69957
70938
|
capName: "keychain-admin",
|
|
69958
70939
|
capScope: "system",
|
|
@@ -70121,6 +71102,12 @@ Object.freeze({
|
|
|
70121
71102
|
addonId: null,
|
|
70122
71103
|
access: "view"
|
|
70123
71104
|
},
|
|
71105
|
+
"llm.migrateRawSecrets": {
|
|
71106
|
+
capName: "llm",
|
|
71107
|
+
capScope: "system",
|
|
71108
|
+
addonId: null,
|
|
71109
|
+
access: "create"
|
|
71110
|
+
},
|
|
70124
71111
|
"llm.resolveModelRef": {
|
|
70125
71112
|
capName: "llm",
|
|
70126
71113
|
capScope: "system",
|
|
@@ -70349,6 +71336,12 @@ Object.freeze({
|
|
|
70349
71336
|
addonId: null,
|
|
70350
71337
|
access: "create"
|
|
70351
71338
|
},
|
|
71339
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
71340
|
+
capName: "local-network",
|
|
71341
|
+
capScope: "system",
|
|
71342
|
+
addonId: null,
|
|
71343
|
+
access: "create"
|
|
71344
|
+
},
|
|
70352
71345
|
"lockControl.getStatus": {
|
|
70353
71346
|
capName: "lock-control",
|
|
70354
71347
|
capScope: "device",
|
|
@@ -73001,6 +73994,30 @@ Object.freeze({
|
|
|
73001
73994
|
addonId: null,
|
|
73002
73995
|
access: "create"
|
|
73003
73996
|
},
|
|
73997
|
+
"recordEntries.deleteEntry": {
|
|
73998
|
+
capName: "record-entries",
|
|
73999
|
+
capScope: "system",
|
|
74000
|
+
addonId: null,
|
|
74001
|
+
access: "delete"
|
|
74002
|
+
},
|
|
74003
|
+
"recordEntries.listEntries": {
|
|
74004
|
+
capName: "record-entries",
|
|
74005
|
+
capScope: "system",
|
|
74006
|
+
addonId: null,
|
|
74007
|
+
access: "view"
|
|
74008
|
+
},
|
|
74009
|
+
"recordEntries.listEntryKinds": {
|
|
74010
|
+
capName: "record-entries",
|
|
74011
|
+
capScope: "system",
|
|
74012
|
+
addonId: null,
|
|
74013
|
+
access: "view"
|
|
74014
|
+
},
|
|
74015
|
+
"recordEntries.putEntry": {
|
|
74016
|
+
capName: "record-entries",
|
|
74017
|
+
capScope: "system",
|
|
74018
|
+
addonId: null,
|
|
74019
|
+
access: "create"
|
|
74020
|
+
},
|
|
73004
74021
|
"recording.getAvailability": {
|
|
73005
74022
|
capName: "recording",
|
|
73006
74023
|
capScope: "device",
|
|
@@ -73301,6 +74318,102 @@ Object.freeze({
|
|
|
73301
74318
|
addonId: null,
|
|
73302
74319
|
access: "view"
|
|
73303
74320
|
},
|
|
74321
|
+
"records.aggregate": {
|
|
74322
|
+
capName: "records",
|
|
74323
|
+
capScope: "system",
|
|
74324
|
+
addonId: null,
|
|
74325
|
+
access: "view"
|
|
74326
|
+
},
|
|
74327
|
+
"records.allocateId": {
|
|
74328
|
+
capName: "records",
|
|
74329
|
+
capScope: "system",
|
|
74330
|
+
addonId: null,
|
|
74331
|
+
access: "create"
|
|
74332
|
+
},
|
|
74333
|
+
"records.count": {
|
|
74334
|
+
capName: "records",
|
|
74335
|
+
capScope: "system",
|
|
74336
|
+
addonId: null,
|
|
74337
|
+
access: "view"
|
|
74338
|
+
},
|
|
74339
|
+
"records.declareKinds": {
|
|
74340
|
+
capName: "records",
|
|
74341
|
+
capScope: "system",
|
|
74342
|
+
addonId: null,
|
|
74343
|
+
access: "create"
|
|
74344
|
+
},
|
|
74345
|
+
"records.delete": {
|
|
74346
|
+
capName: "records",
|
|
74347
|
+
capScope: "system",
|
|
74348
|
+
addonId: null,
|
|
74349
|
+
access: "delete"
|
|
74350
|
+
},
|
|
74351
|
+
"records.deleteDevice": {
|
|
74352
|
+
capName: "records",
|
|
74353
|
+
capScope: "system",
|
|
74354
|
+
addonId: null,
|
|
74355
|
+
access: "delete"
|
|
74356
|
+
},
|
|
74357
|
+
"records.deleteMany": {
|
|
74358
|
+
capName: "records",
|
|
74359
|
+
capScope: "system",
|
|
74360
|
+
addonId: null,
|
|
74361
|
+
access: "delete"
|
|
74362
|
+
},
|
|
74363
|
+
"records.deleteWhere": {
|
|
74364
|
+
capName: "records",
|
|
74365
|
+
capScope: "system",
|
|
74366
|
+
addonId: null,
|
|
74367
|
+
access: "delete"
|
|
74368
|
+
},
|
|
74369
|
+
"records.get": {
|
|
74370
|
+
capName: "records",
|
|
74371
|
+
capScope: "system",
|
|
74372
|
+
addonId: null,
|
|
74373
|
+
access: "view"
|
|
74374
|
+
},
|
|
74375
|
+
"records.getMany": {
|
|
74376
|
+
capName: "records",
|
|
74377
|
+
capScope: "system",
|
|
74378
|
+
addonId: null,
|
|
74379
|
+
access: "view"
|
|
74380
|
+
},
|
|
74381
|
+
"records.histogram": {
|
|
74382
|
+
capName: "records",
|
|
74383
|
+
capScope: "system",
|
|
74384
|
+
addonId: null,
|
|
74385
|
+
access: "view"
|
|
74386
|
+
},
|
|
74387
|
+
"records.patch": {
|
|
74388
|
+
capName: "records",
|
|
74389
|
+
capScope: "system",
|
|
74390
|
+
addonId: null,
|
|
74391
|
+
access: "create"
|
|
74392
|
+
},
|
|
74393
|
+
"records.put": {
|
|
74394
|
+
capName: "records",
|
|
74395
|
+
capScope: "system",
|
|
74396
|
+
addonId: null,
|
|
74397
|
+
access: "create"
|
|
74398
|
+
},
|
|
74399
|
+
"records.putMany": {
|
|
74400
|
+
capName: "records",
|
|
74401
|
+
capScope: "system",
|
|
74402
|
+
addonId: null,
|
|
74403
|
+
access: "create"
|
|
74404
|
+
},
|
|
74405
|
+
"records.query": {
|
|
74406
|
+
capName: "records",
|
|
74407
|
+
capScope: "system",
|
|
74408
|
+
addonId: null,
|
|
74409
|
+
access: "view"
|
|
74410
|
+
},
|
|
74411
|
+
"records.secretRefs": {
|
|
74412
|
+
capName: "records",
|
|
74413
|
+
capScope: "system",
|
|
74414
|
+
addonId: null,
|
|
74415
|
+
access: "view"
|
|
74416
|
+
},
|
|
73304
74417
|
"sceneMonitor.captureReference": {
|
|
73305
74418
|
capName: "scene-monitor",
|
|
73306
74419
|
capScope: "device",
|
|
@@ -73733,6 +74846,48 @@ Object.freeze({
|
|
|
73733
74846
|
addonId: null,
|
|
73734
74847
|
access: "create"
|
|
73735
74848
|
},
|
|
74849
|
+
"storageAdmin.adoptRecords": {
|
|
74850
|
+
capName: "storage-admin",
|
|
74851
|
+
capScope: "system",
|
|
74852
|
+
addonId: null,
|
|
74853
|
+
access: "create"
|
|
74854
|
+
},
|
|
74855
|
+
"storageAdmin.dropCollection": {
|
|
74856
|
+
capName: "storage-admin",
|
|
74857
|
+
capScope: "system",
|
|
74858
|
+
addonId: null,
|
|
74859
|
+
access: "delete"
|
|
74860
|
+
},
|
|
74861
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
74862
|
+
capName: "storage-admin",
|
|
74863
|
+
capScope: "system",
|
|
74864
|
+
addonId: null,
|
|
74865
|
+
access: "view"
|
|
74866
|
+
},
|
|
74867
|
+
"storageAdmin.listKinds": {
|
|
74868
|
+
capName: "storage-admin",
|
|
74869
|
+
capScope: "system",
|
|
74870
|
+
addonId: null,
|
|
74871
|
+
access: "view"
|
|
74872
|
+
},
|
|
74873
|
+
"storageAdmin.listTables": {
|
|
74874
|
+
capName: "storage-admin",
|
|
74875
|
+
capScope: "system",
|
|
74876
|
+
addonId: null,
|
|
74877
|
+
access: "view"
|
|
74878
|
+
},
|
|
74879
|
+
"storageAdmin.readLegacyCollection": {
|
|
74880
|
+
capName: "storage-admin",
|
|
74881
|
+
capScope: "system",
|
|
74882
|
+
addonId: null,
|
|
74883
|
+
access: "view"
|
|
74884
|
+
},
|
|
74885
|
+
"storageAdmin.readRecords": {
|
|
74886
|
+
capName: "storage-admin",
|
|
74887
|
+
capScope: "system",
|
|
74888
|
+
addonId: null,
|
|
74889
|
+
access: "view"
|
|
74890
|
+
},
|
|
73736
74891
|
"storageEvictable.evict": {
|
|
73737
74892
|
capName: "storage-evictable",
|
|
73738
74893
|
capScope: "system",
|
|
@@ -74645,6 +75800,12 @@ Object.freeze({
|
|
|
74645
75800
|
addonId: null,
|
|
74646
75801
|
access: "view"
|
|
74647
75802
|
},
|
|
75803
|
+
"userManagement.migrateRawSecrets": {
|
|
75804
|
+
capName: "user-management",
|
|
75805
|
+
capScope: "system",
|
|
75806
|
+
addonId: null,
|
|
75807
|
+
access: "create"
|
|
75808
|
+
},
|
|
74648
75809
|
"userManagement.oauthExchangeCode": {
|
|
74649
75810
|
capName: "user-management",
|
|
74650
75811
|
capScope: "system",
|
|
@@ -75144,7 +76305,7 @@ Object.freeze({
|
|
|
75144
76305
|
access: "create"
|
|
75145
76306
|
}
|
|
75146
76307
|
});
|
|
75147
|
-
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;
|
|
76308
|
+
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;
|
|
75148
76309
|
DeviceFeature.BatteryOperated;
|
|
75149
76310
|
Object.freeze({
|
|
75150
76311
|
"accessories.getStatus": [{
|
|
@@ -75968,6 +77129,71 @@ Object.freeze({
|
|
|
75968
77129
|
form: "single",
|
|
75969
77130
|
optional: false
|
|
75970
77131
|
}],
|
|
77132
|
+
"dishwasher.getStatus": [{
|
|
77133
|
+
name: "deviceId",
|
|
77134
|
+
form: "single",
|
|
77135
|
+
optional: false
|
|
77136
|
+
}],
|
|
77137
|
+
"dishwasher.pause": [{
|
|
77138
|
+
name: "deviceId",
|
|
77139
|
+
form: "single",
|
|
77140
|
+
optional: false
|
|
77141
|
+
}],
|
|
77142
|
+
"dishwasher.setChildLock": [{
|
|
77143
|
+
name: "deviceId",
|
|
77144
|
+
form: "single",
|
|
77145
|
+
optional: false
|
|
77146
|
+
}],
|
|
77147
|
+
"dishwasher.setExtraDry": [{
|
|
77148
|
+
name: "deviceId",
|
|
77149
|
+
form: "single",
|
|
77150
|
+
optional: false
|
|
77151
|
+
}],
|
|
77152
|
+
"dishwasher.setHalfLoad": [{
|
|
77153
|
+
name: "deviceId",
|
|
77154
|
+
form: "single",
|
|
77155
|
+
optional: false
|
|
77156
|
+
}],
|
|
77157
|
+
"dishwasher.setHygienePlus": [{
|
|
77158
|
+
name: "deviceId",
|
|
77159
|
+
form: "single",
|
|
77160
|
+
optional: false
|
|
77161
|
+
}],
|
|
77162
|
+
"dishwasher.setIntensiveZone": [{
|
|
77163
|
+
name: "deviceId",
|
|
77164
|
+
form: "single",
|
|
77165
|
+
optional: false
|
|
77166
|
+
}],
|
|
77167
|
+
"dishwasher.setOption": [{
|
|
77168
|
+
name: "deviceId",
|
|
77169
|
+
form: "single",
|
|
77170
|
+
optional: false
|
|
77171
|
+
}],
|
|
77172
|
+
"dishwasher.setPower": [{
|
|
77173
|
+
name: "deviceId",
|
|
77174
|
+
form: "single",
|
|
77175
|
+
optional: false
|
|
77176
|
+
}],
|
|
77177
|
+
"dishwasher.setProgram": [{
|
|
77178
|
+
name: "deviceId",
|
|
77179
|
+
form: "single",
|
|
77180
|
+
optional: false
|
|
77181
|
+
}],
|
|
77182
|
+
"dishwasher.setVarioSpeedPlus": [{
|
|
77183
|
+
name: "deviceId",
|
|
77184
|
+
form: "single",
|
|
77185
|
+
optional: false
|
|
77186
|
+
}],
|
|
77187
|
+
"dishwasher.start": [{
|
|
77188
|
+
name: "deviceId",
|
|
77189
|
+
form: "single",
|
|
77190
|
+
optional: false
|
|
77191
|
+
}],
|
|
77192
|
+
"dishwasher.stop": [{
|
|
77193
|
+
name: "deviceId",
|
|
77194
|
+
form: "single",
|
|
77195
|
+
optional: false
|
|
77196
|
+
}],
|
|
75971
77197
|
"doorbell.getStatus": [{
|
|
75972
77198
|
name: "deviceId",
|
|
75973
77199
|
form: "single",
|
|
@@ -76037,6 +77263,11 @@ Object.freeze({
|
|
|
76037
77263
|
form: "single",
|
|
76038
77264
|
optional: false
|
|
76039
77265
|
}],
|
|
77266
|
+
"heatingValve.getStatus": [{
|
|
77267
|
+
name: "deviceId",
|
|
77268
|
+
form: "single",
|
|
77269
|
+
optional: false
|
|
77270
|
+
}],
|
|
76040
77271
|
"humidifier.getStatus": [{
|
|
76041
77272
|
name: "deviceId",
|
|
76042
77273
|
form: "single",
|
|
@@ -77321,6 +78552,37 @@ Object.freeze({
|
|
|
77321
78552
|
form: "single",
|
|
77322
78553
|
optional: false
|
|
77323
78554
|
}],
|
|
78555
|
+
"records.count": [{
|
|
78556
|
+
name: "deviceId",
|
|
78557
|
+
form: "single",
|
|
78558
|
+
optional: true
|
|
78559
|
+
}],
|
|
78560
|
+
"records.deleteDevice": [{
|
|
78561
|
+
name: "deviceId",
|
|
78562
|
+
form: "single",
|
|
78563
|
+
optional: false
|
|
78564
|
+
}],
|
|
78565
|
+
"records.deleteWhere": [{
|
|
78566
|
+
name: "deviceId",
|
|
78567
|
+
form: "single",
|
|
78568
|
+
optional: true
|
|
78569
|
+
}],
|
|
78570
|
+
"records.histogram": [{
|
|
78571
|
+
name: "deviceId",
|
|
78572
|
+
form: "single",
|
|
78573
|
+
optional: true
|
|
78574
|
+
}],
|
|
78575
|
+
"records.putMany": [{
|
|
78576
|
+
name: "records",
|
|
78577
|
+
form: "object-array",
|
|
78578
|
+
optional: false,
|
|
78579
|
+
itemField: "deviceId"
|
|
78580
|
+
}],
|
|
78581
|
+
"records.query": [{
|
|
78582
|
+
name: "deviceId",
|
|
78583
|
+
form: "single",
|
|
78584
|
+
optional: true
|
|
78585
|
+
}],
|
|
77324
78586
|
"sceneMonitor.captureReference": [{
|
|
77325
78587
|
name: "deviceId",
|
|
77326
78588
|
form: "single",
|
|
@@ -77437,6 +78699,17 @@ Object.freeze({
|
|
|
77437
78699
|
form: "single",
|
|
77438
78700
|
optional: false
|
|
77439
78701
|
}],
|
|
78702
|
+
"storageAdmin.adoptRecords": [{
|
|
78703
|
+
name: "records",
|
|
78704
|
+
form: "object-array",
|
|
78705
|
+
optional: false,
|
|
78706
|
+
itemField: "deviceId"
|
|
78707
|
+
}],
|
|
78708
|
+
"storageAdmin.readRecords": [{
|
|
78709
|
+
name: "deviceId",
|
|
78710
|
+
form: "single",
|
|
78711
|
+
optional: true
|
|
78712
|
+
}],
|
|
77440
78713
|
"streamBroker.acquireEgressTranscode": [{
|
|
77441
78714
|
name: "deviceId",
|
|
77442
78715
|
form: "single",
|
|
@@ -79962,7 +81235,7 @@ var PetkitProviderAddon = class extends BaseDeviceProvider {
|
|
|
79962
81235
|
super({});
|
|
79963
81236
|
}
|
|
79964
81237
|
async onInitialize() {
|
|
79965
|
-
const regs = await super.onInitialize();
|
|
81238
|
+
const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
|
|
79966
81239
|
this.clients = new PetkitClientRegistry(this.ctx.logger);
|
|
79967
81240
|
this.clients.setOnConnected((integrationId) => {
|
|
79968
81241
|
this.ctx.logger.info("PetKit: integration connected", { meta: { integrationId } });
|