@camstack/addon-provider-dreame 0.2.133 → 0.2.134
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 +1312 -123
- package/dist/addon.mjs +1312 -123
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
42
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../types/dist/event-category-
|
|
44
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
45
45
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
46
46
|
EventCategory["SystemBoot"] = "system.boot";
|
|
47
47
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -105,6 +105,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
105
105
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
106
106
|
*/
|
|
107
107
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
108
|
+
/**
|
|
109
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
110
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
111
|
+
* action. One event per refusal.
|
|
112
|
+
*/
|
|
113
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
114
|
+
/**
|
|
115
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
116
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
117
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
118
|
+
*/
|
|
119
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
120
|
+
/**
|
|
121
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
122
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
123
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
124
|
+
*/
|
|
125
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
108
126
|
EventCategory["AddonError"] = "addon.error";
|
|
109
127
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
110
128
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5429,7 +5447,7 @@ var ZodIssueCode$1 = {
|
|
|
5429
5447
|
var ZodFirstPartyTypeKind$1;
|
|
5430
5448
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5431
5449
|
//#endregion
|
|
5432
|
-
//#region ../types/dist/sleep-
|
|
5450
|
+
//#region ../types/dist/sleep-BOjuyoPC.mjs
|
|
5433
5451
|
/**
|
|
5434
5452
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5435
5453
|
* window to float samples (D455).
|
|
@@ -5546,7 +5564,7 @@ function isKeychainStoredField(field) {
|
|
|
5546
5564
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5547
5565
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5548
5566
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5549
|
-
function isRecord$
|
|
5567
|
+
function isRecord$5(value) {
|
|
5550
5568
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5551
5569
|
}
|
|
5552
5570
|
function makeSecretMarker(ref) {
|
|
@@ -5557,12 +5575,12 @@ function makeSecretMarker(ref) {
|
|
|
5557
5575
|
}
|
|
5558
5576
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5559
5577
|
function isSecretMarker(value) {
|
|
5560
|
-
if (!isRecord$
|
|
5578
|
+
if (!isRecord$5(value)) return false;
|
|
5561
5579
|
const ref = value["$secret"];
|
|
5562
5580
|
return typeof ref === "string" && ref.length > 0;
|
|
5563
5581
|
}
|
|
5564
5582
|
function isSecretClear(value) {
|
|
5565
|
-
return isRecord$
|
|
5583
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5566
5584
|
}
|
|
5567
5585
|
/**
|
|
5568
5586
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6172,7 +6190,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6172
6190
|
}
|
|
6173
6191
|
};
|
|
6174
6192
|
var KEEP = { kind: "keep" };
|
|
6175
|
-
function isRecord$
|
|
6193
|
+
function isRecord$4(value) {
|
|
6176
6194
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6177
6195
|
}
|
|
6178
6196
|
function defaultMintId() {
|
|
@@ -6185,7 +6203,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6185
6203
|
return out;
|
|
6186
6204
|
}
|
|
6187
6205
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6188
|
-
else if (isRecord$
|
|
6206
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6189
6207
|
return out;
|
|
6190
6208
|
}
|
|
6191
6209
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6240,7 +6258,7 @@ function rowId(row, idKey) {
|
|
|
6240
6258
|
return null;
|
|
6241
6259
|
}
|
|
6242
6260
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6243
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6261
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6244
6262
|
if (!Array.isArray(incoming)) {
|
|
6245
6263
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6246
6264
|
return {
|
|
@@ -6256,7 +6274,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6256
6274
|
const kept = /* @__PURE__ */ new Set();
|
|
6257
6275
|
const rows = [];
|
|
6258
6276
|
for (const row of incoming) {
|
|
6259
|
-
if (!isRecord$
|
|
6277
|
+
if (!isRecord$4(row)) {
|
|
6260
6278
|
rows.push(row);
|
|
6261
6279
|
continue;
|
|
6262
6280
|
}
|
|
@@ -6281,7 +6299,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6281
6299
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6282
6300
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6283
6301
|
case "object": {
|
|
6284
|
-
if (!isRecord$
|
|
6302
|
+
if (!isRecord$4(incoming)) {
|
|
6285
6303
|
if (incoming === void 0) return KEEP;
|
|
6286
6304
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6287
6305
|
return {
|
|
@@ -6289,7 +6307,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6289
6307
|
value: incoming
|
|
6290
6308
|
};
|
|
6291
6309
|
}
|
|
6292
|
-
const storedObj = isRecord$
|
|
6310
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6293
6311
|
return {
|
|
6294
6312
|
kind: "value",
|
|
6295
6313
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6412,7 +6430,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6412
6430
|
value: items
|
|
6413
6431
|
};
|
|
6414
6432
|
}
|
|
6415
|
-
if (isRecord$
|
|
6433
|
+
if (isRecord$4(v)) {
|
|
6416
6434
|
const out = {};
|
|
6417
6435
|
for (const [k, child] of Object.entries(v)) {
|
|
6418
6436
|
const s = substitute(child);
|
|
@@ -6680,7 +6698,6 @@ function createHandle(raw, opts) {
|
|
|
6680
6698
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6681
6699
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6682
6700
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6683
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6684
6701
|
const overrides = {
|
|
6685
6702
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6686
6703
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6704,12 +6721,12 @@ function createHandle(raw, opts) {
|
|
|
6704
6721
|
};
|
|
6705
6722
|
} } : {},
|
|
6706
6723
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6707
|
-
|
|
6708
|
-
const rows = await readDeviceStoreBatch
|
|
6724
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6725
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6709
6726
|
const out = /* @__PURE__ */ new Map();
|
|
6710
6727
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6711
6728
|
return out;
|
|
6712
|
-
}
|
|
6729
|
+
},
|
|
6713
6730
|
writeAddonStore: async (patch) => {
|
|
6714
6731
|
await writeAddon(patch);
|
|
6715
6732
|
},
|
|
@@ -7336,7 +7353,7 @@ var BaseAddon = class {
|
|
|
7336
7353
|
if (!ctx) return;
|
|
7337
7354
|
const addonId = ctx.id;
|
|
7338
7355
|
setImmediate(() => {
|
|
7339
|
-
ctx.api.addons
|
|
7356
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7340
7357
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7341
7358
|
}).catch((err) => {
|
|
7342
7359
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7536,7 +7553,7 @@ var BaseAddon = class {
|
|
|
7536
7553
|
return this._addonSecretTree;
|
|
7537
7554
|
}
|
|
7538
7555
|
deviceSecretTree() {
|
|
7539
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7556
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7540
7557
|
return this._deviceSecretTree;
|
|
7541
7558
|
}
|
|
7542
7559
|
/**
|
|
@@ -7612,42 +7629,135 @@ var BaseAddon = class {
|
|
|
7612
7629
|
this[timerOf] = timer;
|
|
7613
7630
|
}
|
|
7614
7631
|
/**
|
|
7615
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7616
|
-
*
|
|
7617
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7618
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7632
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7633
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7619
7634
|
* addon permanently broken.
|
|
7620
7635
|
*
|
|
7621
|
-
*
|
|
7622
|
-
*
|
|
7623
|
-
* `
|
|
7636
|
+
* Two kinds of outage, two budgets:
|
|
7637
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7638
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7639
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7640
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7641
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7642
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7643
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7644
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7645
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7646
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7624
7647
|
*/
|
|
7625
7648
|
async readAddonStoreWithRetry() {
|
|
7626
7649
|
const settings = this.rawSettings();
|
|
7627
7650
|
if (!settings) return {};
|
|
7628
|
-
const delaysMs = [
|
|
7629
|
-
150,
|
|
7630
|
-
350,
|
|
7631
|
-
600,
|
|
7632
|
-
900
|
|
7633
|
-
];
|
|
7634
7651
|
let lastErr;
|
|
7635
|
-
for (let attempt = 0
|
|
7652
|
+
for (let attempt = 0;; attempt++) try {
|
|
7636
7653
|
const stored = await settings.readAddonStore() ?? {};
|
|
7637
7654
|
this.settingsStoreReady = true;
|
|
7638
7655
|
return stored;
|
|
7639
7656
|
} catch (err) {
|
|
7640
7657
|
lastErr = err;
|
|
7641
|
-
const
|
|
7642
|
-
if (
|
|
7643
|
-
|
|
7644
|
-
|
|
7658
|
+
const kind = classifyStoreError(err);
|
|
7659
|
+
if (kind === "permanent") throw err;
|
|
7660
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7661
|
+
if (delay === void 0) {
|
|
7662
|
+
if (kind === "transport") throw err;
|
|
7663
|
+
break;
|
|
7664
|
+
}
|
|
7665
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7645
7666
|
}
|
|
7646
7667
|
this.settingsStoreReady = false;
|
|
7647
7668
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7648
7669
|
return {};
|
|
7649
7670
|
}
|
|
7650
7671
|
};
|
|
7672
|
+
/** The settings store's own restart fingerprints. */
|
|
7673
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7674
|
+
150,
|
|
7675
|
+
350,
|
|
7676
|
+
600,
|
|
7677
|
+
900
|
|
7678
|
+
];
|
|
7679
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7680
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7681
|
+
150,
|
|
7682
|
+
350,
|
|
7683
|
+
600,
|
|
7684
|
+
900,
|
|
7685
|
+
2e3,
|
|
7686
|
+
5e3,
|
|
7687
|
+
1e4,
|
|
7688
|
+
2e4,
|
|
7689
|
+
3e4,
|
|
7690
|
+
3e4
|
|
7691
|
+
];
|
|
7692
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7693
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7694
|
+
var TRANSPORT_CODES = new Set([
|
|
7695
|
+
"ECONNREFUSED",
|
|
7696
|
+
"ECONNRESET",
|
|
7697
|
+
"ETIMEDOUT",
|
|
7698
|
+
"EPIPE",
|
|
7699
|
+
"EHOSTUNREACH",
|
|
7700
|
+
"ENETUNREACH"
|
|
7701
|
+
]);
|
|
7702
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7703
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7704
|
+
"TIMEOUT",
|
|
7705
|
+
"SERVICE_UNAVAILABLE",
|
|
7706
|
+
"BAD_GATEWAY",
|
|
7707
|
+
"GATEWAY_TIMEOUT"
|
|
7708
|
+
]);
|
|
7709
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7710
|
+
var TRANSPORT_PHRASES = [
|
|
7711
|
+
"discovery deadline exceeded",
|
|
7712
|
+
"parent could not route child unowned cap call",
|
|
7713
|
+
"UDS request timed out after",
|
|
7714
|
+
"channel closed"
|
|
7715
|
+
];
|
|
7716
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7717
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7718
|
+
"REQUEST_TIMEOUT",
|
|
7719
|
+
"SERVICE_NOT_FOUND",
|
|
7720
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7721
|
+
"REQUEST_REJECTED",
|
|
7722
|
+
"BROKER_DISCONNECTED"
|
|
7723
|
+
]);
|
|
7724
|
+
function stringProp(value, key) {
|
|
7725
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7726
|
+
const found = Reflect.get(value, key);
|
|
7727
|
+
return typeof found === "string" ? found : void 0;
|
|
7728
|
+
}
|
|
7729
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7730
|
+
function errorCode(err) {
|
|
7731
|
+
const out = {};
|
|
7732
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7733
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7734
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7735
|
+
if (node !== void 0) out.node = node;
|
|
7736
|
+
const trpc = stringProp(data, "code");
|
|
7737
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7738
|
+
return out;
|
|
7739
|
+
}
|
|
7740
|
+
/**
|
|
7741
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7742
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7743
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7744
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7745
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7746
|
+
*/
|
|
7747
|
+
function classifyStoreError(err) {
|
|
7748
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7749
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7750
|
+
const code = errorCode(err);
|
|
7751
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7752
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7753
|
+
if (typeof err === "object" && err !== null) {
|
|
7754
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7755
|
+
const type = stringProp(err, "type");
|
|
7756
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7757
|
+
}
|
|
7758
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7759
|
+
return "permanent";
|
|
7760
|
+
}
|
|
7651
7761
|
/**
|
|
7652
7762
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7653
7763
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7737,6 +7847,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7737
7847
|
*/
|
|
7738
7848
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7739
7849
|
});
|
|
7850
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7851
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7852
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7853
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7854
|
+
var RECORD_CLASSES = [
|
|
7855
|
+
"config",
|
|
7856
|
+
"ledger",
|
|
7857
|
+
"audit",
|
|
7858
|
+
"mirror",
|
|
7859
|
+
"ephemeral"
|
|
7860
|
+
];
|
|
7861
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7862
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7863
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7864
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7865
|
+
function defOf(schema) {
|
|
7866
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7867
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7868
|
+
const def = Reflect.get(zodBag, "def");
|
|
7869
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7870
|
+
return def;
|
|
7871
|
+
}
|
|
7872
|
+
function declaredHere(schema) {
|
|
7873
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7874
|
+
}
|
|
7875
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7876
|
+
var WRAPPERS = new Set([
|
|
7877
|
+
"optional",
|
|
7878
|
+
"nullable",
|
|
7879
|
+
"default",
|
|
7880
|
+
"prefault",
|
|
7881
|
+
"catch",
|
|
7882
|
+
"readonly",
|
|
7883
|
+
"nonoptional"
|
|
7884
|
+
]);
|
|
7885
|
+
/**
|
|
7886
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7887
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7888
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7889
|
+
* `.transform` on `in`).
|
|
7890
|
+
*/
|
|
7891
|
+
function layersOf(schema) {
|
|
7892
|
+
const out = [];
|
|
7893
|
+
const queue = [schema];
|
|
7894
|
+
while (queue.length > 0) {
|
|
7895
|
+
const s = queue.shift();
|
|
7896
|
+
if (!s || out.includes(s)) continue;
|
|
7897
|
+
out.push(s);
|
|
7898
|
+
const def = defOf(s);
|
|
7899
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7900
|
+
if (def.type === "pipe") {
|
|
7901
|
+
if (def.in) queue.push(def.in);
|
|
7902
|
+
if (def.out) queue.push(def.out);
|
|
7903
|
+
}
|
|
7904
|
+
}
|
|
7905
|
+
return out;
|
|
7906
|
+
}
|
|
7907
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7908
|
+
function isZodSecret(schema) {
|
|
7909
|
+
return layersOf(schema).some(declaredHere);
|
|
7910
|
+
}
|
|
7911
|
+
/**
|
|
7912
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7913
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7914
|
+
* object or array is reported as one path and not descended into — everything
|
|
7915
|
+
* under it is secret.
|
|
7916
|
+
*/
|
|
7917
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7918
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7919
|
+
const paths = [];
|
|
7920
|
+
for (const layer of layersOf(schema)) {
|
|
7921
|
+
const def = defOf(layer);
|
|
7922
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7923
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7924
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7925
|
+
else if (def.type === "intersection") {
|
|
7926
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7927
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7928
|
+
}
|
|
7929
|
+
}
|
|
7930
|
+
return [...new Set(paths)];
|
|
7931
|
+
}
|
|
7932
|
+
/**
|
|
7933
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7934
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7935
|
+
* JSON the engine stores.
|
|
7936
|
+
*
|
|
7937
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7938
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7939
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7940
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7941
|
+
* never a field name (D879).
|
|
7942
|
+
*/
|
|
7943
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7944
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7945
|
+
var RecordIndexSchema = object({
|
|
7946
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7947
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7948
|
+
unique: boolean().optional()
|
|
7949
|
+
}).strict();
|
|
7950
|
+
var RecordRetentionSchema = union([
|
|
7951
|
+
object({
|
|
7952
|
+
ttlMs: number().int().positive(),
|
|
7953
|
+
from: _enum(["at", "write"])
|
|
7954
|
+
}).strict(),
|
|
7955
|
+
object({
|
|
7956
|
+
maxRows: number().int().positive().optional(),
|
|
7957
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7958
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7959
|
+
object({
|
|
7960
|
+
owner: string().min(1),
|
|
7961
|
+
reason: string().min(1)
|
|
7962
|
+
}).strict(),
|
|
7963
|
+
object({ none: string().min(1) }).strict()
|
|
7964
|
+
]);
|
|
7965
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7966
|
+
var EntryDescriptorSchema = object({
|
|
7967
|
+
title: string().min(1),
|
|
7968
|
+
/** The record body field shown as the entry's name. */
|
|
7969
|
+
nameField: string().min(1),
|
|
7970
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7971
|
+
fields: record(string(), unknown())
|
|
7972
|
+
}).strict();
|
|
7973
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7974
|
+
var RecordKindDeclarationSchema = object({
|
|
7975
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7976
|
+
class: _enum(RECORD_CLASSES),
|
|
7977
|
+
writeTrigger: string().min(1),
|
|
7978
|
+
device: _enum([
|
|
7979
|
+
"required",
|
|
7980
|
+
"optional",
|
|
7981
|
+
"none"
|
|
7982
|
+
]).default("none"),
|
|
7983
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7984
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7985
|
+
retention: RecordRetentionSchema,
|
|
7986
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7987
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7988
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7989
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7990
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7991
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7992
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7993
|
+
adoptsFrom: string().min(1).optional(),
|
|
7994
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7995
|
+
transactFamily: string().min(1).optional(),
|
|
7996
|
+
entry: EntryDescriptorSchema.optional()
|
|
7997
|
+
}).strict();
|
|
7998
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7999
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7740
8000
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7741
8001
|
var CamProfileSchema = _enum([
|
|
7742
8002
|
"high",
|
|
@@ -8201,69 +8461,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8201
8461
|
kind: "mutation",
|
|
8202
8462
|
auth: "admin"
|
|
8203
8463
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8204
|
-
function defOf(schema) {
|
|
8205
|
-
return schema._zod?.def ?? {};
|
|
8206
|
-
}
|
|
8207
|
-
function declaredHere(schema) {
|
|
8208
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8209
|
-
}
|
|
8210
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8211
|
-
var WRAPPERS = new Set([
|
|
8212
|
-
"optional",
|
|
8213
|
-
"nullable",
|
|
8214
|
-
"default",
|
|
8215
|
-
"prefault",
|
|
8216
|
-
"catch",
|
|
8217
|
-
"readonly",
|
|
8218
|
-
"nonoptional"
|
|
8219
|
-
]);
|
|
8220
|
-
/**
|
|
8221
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8222
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8223
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8224
|
-
* `.transform` on `in`).
|
|
8225
|
-
*/
|
|
8226
|
-
function layersOf(schema) {
|
|
8227
|
-
const out = [];
|
|
8228
|
-
const queue = [schema];
|
|
8229
|
-
while (queue.length > 0) {
|
|
8230
|
-
const s = queue.shift();
|
|
8231
|
-
if (!s || out.includes(s)) continue;
|
|
8232
|
-
out.push(s);
|
|
8233
|
-
const def = defOf(s);
|
|
8234
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8235
|
-
if (def.type === "pipe") {
|
|
8236
|
-
if (def.in) queue.push(def.in);
|
|
8237
|
-
if (def.out) queue.push(def.out);
|
|
8238
|
-
}
|
|
8239
|
-
}
|
|
8240
|
-
return out;
|
|
8241
|
-
}
|
|
8242
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8243
|
-
function isZodSecret(schema) {
|
|
8244
|
-
return layersOf(schema).some(declaredHere);
|
|
8245
|
-
}
|
|
8246
|
-
/**
|
|
8247
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8248
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8249
|
-
* object or array is reported as one path and not descended into — everything
|
|
8250
|
-
* under it is secret.
|
|
8251
|
-
*/
|
|
8252
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8253
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8254
|
-
const paths = [];
|
|
8255
|
-
for (const layer of layersOf(schema)) {
|
|
8256
|
-
const def = defOf(layer);
|
|
8257
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8258
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8259
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8260
|
-
else if (def.type === "intersection") {
|
|
8261
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8262
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8263
|
-
}
|
|
8264
|
-
}
|
|
8265
|
-
return [...new Set(paths)];
|
|
8266
|
-
}
|
|
8267
8464
|
object({
|
|
8268
8465
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8269
8466
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8283,7 +8480,7 @@ function userError(code, params, englishFallback) {
|
|
|
8283
8480
|
return new CamstackError(code, params, englishFallback);
|
|
8284
8481
|
}
|
|
8285
8482
|
//#endregion
|
|
8286
|
-
//#region ../types/dist/err-msg-
|
|
8483
|
+
//#region ../types/dist/err-msg-BXKzRBwg.mjs
|
|
8287
8484
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8288
8485
|
DeviceType["Camera"] = "camera";
|
|
8289
8486
|
DeviceType["Hub"] = "hub";
|
|
@@ -8375,6 +8572,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
8375
8572
|
* native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
|
|
8376
8573
|
* integrations sharing the same food/desiccant/hopper surface. */
|
|
8377
8574
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
8575
|
+
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
8576
|
+
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
8577
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations. */
|
|
8578
|
+
DeviceType["Dishwasher"] = "dishwasher";
|
|
8378
8579
|
return DeviceType;
|
|
8379
8580
|
}({});
|
|
8380
8581
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -8552,6 +8753,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8552
8753
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8553
8754
|
* real Switch device for UI rendering / export adapters. */
|
|
8554
8755
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8756
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8757
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8758
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8555
8759
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8556
8760
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8557
8761
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8629,7 +8833,7 @@ function errMsg(err) {
|
|
|
8629
8833
|
return String(err);
|
|
8630
8834
|
}
|
|
8631
8835
|
//#endregion
|
|
8632
|
-
//#region ../types/dist/composition-
|
|
8836
|
+
//#region ../types/dist/composition-CB6PMT9p.mjs
|
|
8633
8837
|
/**
|
|
8634
8838
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8635
8839
|
*
|
|
@@ -11833,11 +12037,10 @@ var ClipModelMetaSchema = object({
|
|
|
11833
12037
|
/**
|
|
11834
12038
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11835
12039
|
* per index: two models share an index only when their vectors are ranked
|
|
11836
|
-
* against each other, which for CLIP means never across families.
|
|
11837
|
-
*
|
|
11838
|
-
* `modelId`); any other model gets its own.
|
|
12040
|
+
* against each other, which for CLIP means never across families. Every
|
|
12041
|
+
* model gets its own.
|
|
11839
12042
|
*/
|
|
11840
|
-
vectorIndex: string().regex(/^object-clip
|
|
12043
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11841
12044
|
/**
|
|
11842
12045
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11843
12046
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -13016,8 +13219,13 @@ var AlertSeveritySchema = _enum([
|
|
|
13016
13219
|
"info",
|
|
13017
13220
|
"success",
|
|
13018
13221
|
"warning",
|
|
13019
|
-
"error"
|
|
13222
|
+
"error",
|
|
13223
|
+
"critical"
|
|
13020
13224
|
]);
|
|
13225
|
+
var AlertActionSchema = object({
|
|
13226
|
+
label: string(),
|
|
13227
|
+
href: string().optional()
|
|
13228
|
+
});
|
|
13021
13229
|
var AlertStatusSchema = _enum([
|
|
13022
13230
|
"active",
|
|
13023
13231
|
"in-progress",
|
|
@@ -13035,6 +13243,7 @@ var AlertSchema = object({
|
|
|
13035
13243
|
severity: AlertSeveritySchema,
|
|
13036
13244
|
title: string(),
|
|
13037
13245
|
message: string(),
|
|
13246
|
+
action: AlertActionSchema.optional(),
|
|
13038
13247
|
status: AlertStatusSchema,
|
|
13039
13248
|
progress: number().optional(),
|
|
13040
13249
|
read: boolean(),
|
|
@@ -15570,6 +15779,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15570
15779
|
keyField: string()
|
|
15571
15780
|
}).optional()
|
|
15572
15781
|
})) });
|
|
15782
|
+
/**
|
|
15783
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
15784
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
15785
|
+
*
|
|
15786
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
15787
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
15788
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
15789
|
+
*/
|
|
15790
|
+
var RawSecretMigrationInputSchema = object({
|
|
15791
|
+
/** `false` (the default of the script) = report only. */
|
|
15792
|
+
apply: boolean() });
|
|
15793
|
+
var RawSecretMigrationReportSchema = object({
|
|
15794
|
+
apply: boolean(),
|
|
15795
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
15796
|
+
rows: number().int(),
|
|
15797
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
15798
|
+
raw: number().int(),
|
|
15799
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
15800
|
+
markers: number().int(),
|
|
15801
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
15802
|
+
migrated: number().int(),
|
|
15803
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
15804
|
+
failed: number().int(),
|
|
15805
|
+
/** After the run: rows still holding plaintext. */
|
|
15806
|
+
remainingRaw: number().int(),
|
|
15807
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
15808
|
+
unresolvedMarkers: number().int(),
|
|
15809
|
+
/**
|
|
15810
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
15811
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
15812
|
+
*/
|
|
15813
|
+
redundantCopies: number().int().optional(),
|
|
15814
|
+
/** True when nothing is raw and every marker resolves. */
|
|
15815
|
+
verified: boolean()
|
|
15816
|
+
});
|
|
15573
15817
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15574
15818
|
* agent is the reason placement is not fixed to the hub. */
|
|
15575
15819
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15796,6 +16040,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15796
16040
|
}), SettingsUpdateResultSchema, {
|
|
15797
16041
|
kind: "mutation",
|
|
15798
16042
|
auth: "admin"
|
|
16043
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16044
|
+
kind: "mutation",
|
|
16045
|
+
auth: "admin"
|
|
15799
16046
|
}), method(object({}), object({ libs: array(object({
|
|
15800
16047
|
filePath: string(),
|
|
15801
16048
|
content: string()
|
|
@@ -16059,6 +16306,347 @@ id: union([string(), number()]) }), {
|
|
|
16059
16306
|
auth: "admin"
|
|
16060
16307
|
});
|
|
16061
16308
|
/**
|
|
16309
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16310
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16311
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16312
|
+
*
|
|
16313
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16314
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16315
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16316
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16317
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16318
|
+
* addons go through the owner's capability.
|
|
16319
|
+
*
|
|
16320
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16321
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16322
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16323
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16324
|
+
* row's own ref.
|
|
16325
|
+
*
|
|
16326
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16327
|
+
*/
|
|
16328
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16329
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16330
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16331
|
+
var RecordInputSchema = object({
|
|
16332
|
+
id: RecordIdSchema,
|
|
16333
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16334
|
+
deviceId: number().int().optional(),
|
|
16335
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16336
|
+
at: number().int().optional(),
|
|
16337
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16338
|
+
expiresAt: number().int().optional(),
|
|
16339
|
+
data: RecordBodySchema
|
|
16340
|
+
});
|
|
16341
|
+
var RecordViewSchema = object({
|
|
16342
|
+
id: string(),
|
|
16343
|
+
deviceId: number().int().nullable(),
|
|
16344
|
+
at: number().nullable(),
|
|
16345
|
+
expiresAt: number().nullable(),
|
|
16346
|
+
rev: number().int(),
|
|
16347
|
+
updatedAt: number(),
|
|
16348
|
+
data: RecordBodySchema
|
|
16349
|
+
});
|
|
16350
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16351
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16352
|
+
string(),
|
|
16353
|
+
number(),
|
|
16354
|
+
boolean(),
|
|
16355
|
+
object({ in: array(union([
|
|
16356
|
+
string(),
|
|
16357
|
+
number(),
|
|
16358
|
+
boolean()
|
|
16359
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16360
|
+
object({
|
|
16361
|
+
gt: union([string(), number()]).optional(),
|
|
16362
|
+
gte: union([string(), number()]).optional(),
|
|
16363
|
+
lt: union([string(), number()]).optional(),
|
|
16364
|
+
lte: union([string(), number()]).optional()
|
|
16365
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16366
|
+
]));
|
|
16367
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16368
|
+
var TimeWindowShape = {
|
|
16369
|
+
deviceId: number().int().optional(),
|
|
16370
|
+
atFrom: number().optional(),
|
|
16371
|
+
atTo: number().optional()
|
|
16372
|
+
};
|
|
16373
|
+
var RecordQueryInputSchema = object({
|
|
16374
|
+
...KindShape,
|
|
16375
|
+
...TimeWindowShape,
|
|
16376
|
+
where: RecordWhereSchema.optional(),
|
|
16377
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16378
|
+
order: _enum(["at", "id"]).optional(),
|
|
16379
|
+
desc: boolean().optional(),
|
|
16380
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16381
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16382
|
+
cursor: string().min(1).optional()
|
|
16383
|
+
});
|
|
16384
|
+
var RecordQueryResultSchema = object({
|
|
16385
|
+
records: array(RecordViewSchema),
|
|
16386
|
+
nextCursor: string().nullable()
|
|
16387
|
+
});
|
|
16388
|
+
var RecordKindStateSchema = _enum([
|
|
16389
|
+
"created",
|
|
16390
|
+
"unchanged",
|
|
16391
|
+
"updated"
|
|
16392
|
+
]);
|
|
16393
|
+
var DeclareKindResultSchema = object({
|
|
16394
|
+
kindId: number().int(),
|
|
16395
|
+
state: RecordKindStateSchema,
|
|
16396
|
+
createdIndexes: array(string()),
|
|
16397
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16398
|
+
adoptionPending: object({
|
|
16399
|
+
legacyTable: string(),
|
|
16400
|
+
legacyRows: number().int()
|
|
16401
|
+
}).nullable()
|
|
16402
|
+
});
|
|
16403
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16404
|
+
var SecretRefsList = array(string());
|
|
16405
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16406
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16407
|
+
kind: "mutation",
|
|
16408
|
+
auth: "admin"
|
|
16409
|
+
}), method(object({
|
|
16410
|
+
...KindShape,
|
|
16411
|
+
id: RecordIdSchema
|
|
16412
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16413
|
+
...KindShape,
|
|
16414
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16415
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16416
|
+
...KindShape,
|
|
16417
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16418
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16419
|
+
...KindShape,
|
|
16420
|
+
record: RecordInputSchema,
|
|
16421
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16422
|
+
ifRev: number().int().min(0).optional()
|
|
16423
|
+
}), object({
|
|
16424
|
+
rev: number().int(),
|
|
16425
|
+
releasedRefs: SecretRefsList
|
|
16426
|
+
}), {
|
|
16427
|
+
kind: "mutation",
|
|
16428
|
+
auth: "admin"
|
|
16429
|
+
}), method(object({
|
|
16430
|
+
...KindShape,
|
|
16431
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16432
|
+
}), object({
|
|
16433
|
+
count: number().int(),
|
|
16434
|
+
releasedRefs: SecretRefsList
|
|
16435
|
+
}), {
|
|
16436
|
+
kind: "mutation",
|
|
16437
|
+
auth: "admin"
|
|
16438
|
+
}), method(object({
|
|
16439
|
+
...KindShape,
|
|
16440
|
+
id: RecordIdSchema,
|
|
16441
|
+
data: RecordBodySchema,
|
|
16442
|
+
at: number().int().nullable().optional(),
|
|
16443
|
+
expiresAt: number().int().nullable().optional(),
|
|
16444
|
+
ifRev: number().int().min(1).optional()
|
|
16445
|
+
}), object({
|
|
16446
|
+
rev: number().int(),
|
|
16447
|
+
releasedRefs: SecretRefsList
|
|
16448
|
+
}), {
|
|
16449
|
+
kind: "mutation",
|
|
16450
|
+
auth: "admin"
|
|
16451
|
+
}), method(object({
|
|
16452
|
+
...KindShape,
|
|
16453
|
+
id: RecordIdSchema
|
|
16454
|
+
}), object({
|
|
16455
|
+
deleted: boolean(),
|
|
16456
|
+
secretRefs: SecretRefsList
|
|
16457
|
+
}), {
|
|
16458
|
+
kind: "mutation",
|
|
16459
|
+
auth: "admin"
|
|
16460
|
+
}), method(object({
|
|
16461
|
+
...KindShape,
|
|
16462
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16463
|
+
}), object({
|
|
16464
|
+
deleted: number().int(),
|
|
16465
|
+
secretRefs: SecretRefsList
|
|
16466
|
+
}), {
|
|
16467
|
+
kind: "mutation",
|
|
16468
|
+
auth: "admin"
|
|
16469
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16470
|
+
...KindShape,
|
|
16471
|
+
...TimeWindowShape,
|
|
16472
|
+
where: RecordWhereSchema.optional()
|
|
16473
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
16474
|
+
...KindShape,
|
|
16475
|
+
deviceId: number().int().optional(),
|
|
16476
|
+
from: number(),
|
|
16477
|
+
to: number(),
|
|
16478
|
+
bucketMs: number().int().positive()
|
|
16479
|
+
}), object({ buckets: array(object({
|
|
16480
|
+
bucketStart: number(),
|
|
16481
|
+
count: number().int()
|
|
16482
|
+
})) }), { auth: "admin" }), method(object({
|
|
16483
|
+
...KindShape,
|
|
16484
|
+
op: _enum([
|
|
16485
|
+
"sum",
|
|
16486
|
+
"min",
|
|
16487
|
+
"max",
|
|
16488
|
+
"count"
|
|
16489
|
+
]),
|
|
16490
|
+
field: RecordFieldPathSchema.optional(),
|
|
16491
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
16492
|
+
where: RecordWhereSchema.optional()
|
|
16493
|
+
}), object({ rows: array(object({
|
|
16494
|
+
group: union([
|
|
16495
|
+
string(),
|
|
16496
|
+
number(),
|
|
16497
|
+
_null()
|
|
16498
|
+
]),
|
|
16499
|
+
value: number().nullable()
|
|
16500
|
+
})) }), { auth: "admin" }), method(object({
|
|
16501
|
+
...KindShape,
|
|
16502
|
+
deviceId: number().int().optional(),
|
|
16503
|
+
atBefore: number().optional(),
|
|
16504
|
+
where: RecordWhereSchema.optional()
|
|
16505
|
+
}), object({
|
|
16506
|
+
deleted: number().int(),
|
|
16507
|
+
secretRefs: SecretRefsList
|
|
16508
|
+
}), {
|
|
16509
|
+
kind: "mutation",
|
|
16510
|
+
auth: "admin"
|
|
16511
|
+
}), method(object({
|
|
16512
|
+
deviceId: number().int(),
|
|
16513
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
16514
|
+
}), object({
|
|
16515
|
+
deleted: record(string(), number().int()),
|
|
16516
|
+
secretRefs: SecretRefsList
|
|
16517
|
+
}), {
|
|
16518
|
+
kind: "mutation",
|
|
16519
|
+
auth: "admin"
|
|
16520
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
16521
|
+
kind: "mutation",
|
|
16522
|
+
auth: "admin"
|
|
16523
|
+
});
|
|
16524
|
+
/** One table of the settings database. */
|
|
16525
|
+
var StorageTableSchema = object({
|
|
16526
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
16527
|
+
name: string(),
|
|
16528
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
16529
|
+
owner: string().nullable(),
|
|
16530
|
+
rows: number().int().nonnegative(),
|
|
16531
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
16532
|
+
bytes: number().int().nonnegative().nullable(),
|
|
16533
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
16534
|
+
declaredThisBoot: boolean()
|
|
16535
|
+
});
|
|
16536
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
16537
|
+
var StorageKindSchema = object({
|
|
16538
|
+
owner: string(),
|
|
16539
|
+
kind: string(),
|
|
16540
|
+
database: _enum(["settings", "events"]),
|
|
16541
|
+
class: string(),
|
|
16542
|
+
state: _enum([
|
|
16543
|
+
"declared",
|
|
16544
|
+
"orphaned",
|
|
16545
|
+
"dropped"
|
|
16546
|
+
]),
|
|
16547
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
16548
|
+
rows: number().int().nonnegative().nullable(),
|
|
16549
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
16550
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
16551
|
+
writeTrigger: string(),
|
|
16552
|
+
retention: RecordRetentionSchema,
|
|
16553
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
16554
|
+
entry: boolean(),
|
|
16555
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
16556
|
+
declaration: RecordKindDeclarationSchema
|
|
16557
|
+
});
|
|
16558
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
16559
|
+
collection: string().min(1),
|
|
16560
|
+
expectRows: number().int().nonnegative()
|
|
16561
|
+
}), object({
|
|
16562
|
+
dropped: literal(true),
|
|
16563
|
+
rows: number().int().nonnegative()
|
|
16564
|
+
}), {
|
|
16565
|
+
kind: "mutation",
|
|
16566
|
+
auth: "admin"
|
|
16567
|
+
}), method(object({
|
|
16568
|
+
owner: string().min(1).optional(),
|
|
16569
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
16570
|
+
counts: boolean().optional()
|
|
16571
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
16572
|
+
owner: string().min(1),
|
|
16573
|
+
kind: RecordKindNameSchema
|
|
16574
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16575
|
+
owner: string().min(1),
|
|
16576
|
+
kind: RecordKindNameSchema,
|
|
16577
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
16578
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
16579
|
+
complete: boolean().optional()
|
|
16580
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
16581
|
+
kind: "mutation",
|
|
16582
|
+
auth: "admin"
|
|
16583
|
+
}), method(object({
|
|
16584
|
+
collection: string().min(1),
|
|
16585
|
+
cursor: string().optional(),
|
|
16586
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
16587
|
+
}), object({
|
|
16588
|
+
rows: array(object({
|
|
16589
|
+
id: string(),
|
|
16590
|
+
data: record(string(), unknown())
|
|
16591
|
+
})),
|
|
16592
|
+
nextCursor: string().nullable()
|
|
16593
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
16594
|
+
/**
|
|
16595
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
16596
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
16597
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
16598
|
+
*
|
|
16599
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
16600
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
16601
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
16602
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
16603
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
16604
|
+
* a secret value, and a locked keychain refuses the write with
|
|
16605
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
16606
|
+
*
|
|
16607
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
16608
|
+
*/
|
|
16609
|
+
var EntryKindInfoSchema = object({
|
|
16610
|
+
owner: string(),
|
|
16611
|
+
kind: RecordKindNameSchema,
|
|
16612
|
+
title: string(),
|
|
16613
|
+
nameField: string(),
|
|
16614
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
16615
|
+
fields: record(string(), unknown()),
|
|
16616
|
+
secretPaths: array(string()),
|
|
16617
|
+
rows: number().int().nonnegative()
|
|
16618
|
+
});
|
|
16619
|
+
var EntryViewSchema = object({
|
|
16620
|
+
id: RecordIdSchema,
|
|
16621
|
+
name: string(),
|
|
16622
|
+
rev: number().int(),
|
|
16623
|
+
updatedAt: number(),
|
|
16624
|
+
/** Secret fields hold the redaction token. */
|
|
16625
|
+
data: RecordBodySchema
|
|
16626
|
+
});
|
|
16627
|
+
var EntryAddress = {
|
|
16628
|
+
owner: string().min(1),
|
|
16629
|
+
kind: RecordKindNameSchema
|
|
16630
|
+
};
|
|
16631
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
16632
|
+
...EntryAddress,
|
|
16633
|
+
id: RecordIdSchema.optional(),
|
|
16634
|
+
data: RecordBodySchema,
|
|
16635
|
+
ifRev: number().int().min(1).optional()
|
|
16636
|
+
}), object({
|
|
16637
|
+
id: string(),
|
|
16638
|
+
rev: number().int()
|
|
16639
|
+
}), {
|
|
16640
|
+
kind: "mutation",
|
|
16641
|
+
auth: "admin"
|
|
16642
|
+
}), method(object({
|
|
16643
|
+
...EntryAddress,
|
|
16644
|
+
id: RecordIdSchema
|
|
16645
|
+
}), object({ deleted: boolean() }), {
|
|
16646
|
+
kind: "mutation",
|
|
16647
|
+
auth: "admin"
|
|
16648
|
+
});
|
|
16649
|
+
/**
|
|
16062
16650
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16063
16651
|
*
|
|
16064
16652
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16599,6 +17187,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16599
17187
|
kind: "mutation",
|
|
16600
17188
|
auth: "admin",
|
|
16601
17189
|
caller: "required"
|
|
17190
|
+
}), method(object({
|
|
17191
|
+
ref: string().min(1),
|
|
17192
|
+
value: string().min(1)
|
|
17193
|
+
}), object({
|
|
17194
|
+
ref: string(),
|
|
17195
|
+
version: number().int()
|
|
17196
|
+
}), {
|
|
17197
|
+
kind: "mutation",
|
|
17198
|
+
auth: "admin",
|
|
17199
|
+
caller: "required"
|
|
16602
17200
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16603
17201
|
deleted: array(string()).readonly(),
|
|
16604
17202
|
kept: array(object({
|
|
@@ -39289,6 +39887,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39289
39887
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39290
39888
|
kind: "mutation",
|
|
39291
39889
|
auth: "admin"
|
|
39890
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
39891
|
+
kind: "mutation",
|
|
39892
|
+
auth: "admin"
|
|
39292
39893
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39293
39894
|
kind: "mutation",
|
|
39294
39895
|
auth: "admin"
|
|
@@ -49798,6 +50399,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49798
50399
|
atMs: number(),
|
|
49799
50400
|
reason: string()
|
|
49800
50401
|
});
|
|
50402
|
+
/**
|
|
50403
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50404
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50405
|
+
* service holds, because only the hub plans) against the states the process
|
|
50406
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50407
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50408
|
+
*
|
|
50409
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50410
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50411
|
+
* planned runner the process service has no entry for.
|
|
50412
|
+
*/
|
|
50413
|
+
var RunnerRefusalSchema = object({
|
|
50414
|
+
runnerId: string(),
|
|
50415
|
+
addonIds: array(string()),
|
|
50416
|
+
reason: string()
|
|
50417
|
+
});
|
|
50418
|
+
var RunnerBootCheckSchema = object({
|
|
50419
|
+
checkedAtMs: number(),
|
|
50420
|
+
/** Runners planned for this node. */
|
|
50421
|
+
expected: number(),
|
|
50422
|
+
/** Planned runners whose process is `running`. */
|
|
50423
|
+
running: number(),
|
|
50424
|
+
failed: array(string()),
|
|
50425
|
+
refused: array(RunnerRefusalSchema),
|
|
50426
|
+
missing: array(string()),
|
|
50427
|
+
/**
|
|
50428
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50429
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50430
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50431
|
+
* Optional for version skew (absent = settled).
|
|
50432
|
+
*/
|
|
50433
|
+
pending: array(string()).optional(),
|
|
50434
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50435
|
+
planKnown: boolean()
|
|
50436
|
+
});
|
|
49801
50437
|
var ServerPackageStatusSchema = object({
|
|
49802
50438
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49803
50439
|
packageName: string(),
|
|
@@ -49860,7 +50496,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49860
50496
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49861
50497
|
* absent wrapper is unknown — never `native`.
|
|
49862
50498
|
*/
|
|
49863
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50499
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50500
|
+
/**
|
|
50501
|
+
* What this node PLANNED to run against what its process service reports
|
|
50502
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50503
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50504
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50505
|
+
*/
|
|
50506
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49864
50507
|
});
|
|
49865
50508
|
var ServerUpdateCheckResultSchema = object({
|
|
49866
50509
|
packageName: string(),
|
|
@@ -49911,6 +50554,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49911
50554
|
"refused",
|
|
49912
50555
|
"failed"
|
|
49913
50556
|
]);
|
|
50557
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50558
|
+
var UpdateBlockerSchema = object({
|
|
50559
|
+
addonId: string(),
|
|
50560
|
+
reason: string(),
|
|
50561
|
+
/** What the operator does about it. */
|
|
50562
|
+
remedy: string()
|
|
50563
|
+
});
|
|
49914
50564
|
var ServerUpdateActionResultSchema = object({
|
|
49915
50565
|
accepted: boolean(),
|
|
49916
50566
|
targetVersion: string().nullable(),
|
|
@@ -49928,14 +50578,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49928
50578
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49929
50579
|
* staging install). Non-null only for `failed`.
|
|
49930
50580
|
*/
|
|
49931
|
-
error: string().nullable().optional()
|
|
50581
|
+
error: string().nullable().optional(),
|
|
50582
|
+
/**
|
|
50583
|
+
* The addons the target version would refuse to start on this node's live
|
|
50584
|
+
* store (D877), present when the pre-flight refused the update
|
|
50585
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50586
|
+
*/
|
|
50587
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49932
50588
|
});
|
|
49933
50589
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49934
50590
|
kind: "mutation",
|
|
49935
50591
|
auth: "admin"
|
|
49936
|
-
}), method(object({
|
|
49937
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49938
|
-
version: string().optional()
|
|
50592
|
+
}), method(object({
|
|
50593
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50594
|
+
version: string().optional(),
|
|
50595
|
+
/**
|
|
50596
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50597
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50598
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50599
|
+
*/
|
|
50600
|
+
acknowledgeRefusals: boolean().optional()
|
|
50601
|
+
}), ServerUpdateActionResultSchema, {
|
|
49939
50602
|
kind: "mutation",
|
|
49940
50603
|
auth: "admin",
|
|
49941
50604
|
timeoutMs: 16 * 6e4
|
|
@@ -52381,7 +53044,9 @@ var ManifestShapeSchema = object({
|
|
|
52381
53044
|
var AddonProcessSchema = object({
|
|
52382
53045
|
pid: number().optional(),
|
|
52383
53046
|
mode: string(),
|
|
52384
|
-
state: string()
|
|
53047
|
+
state: string(),
|
|
53048
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53049
|
+
reason: string().optional()
|
|
52385
53050
|
});
|
|
52386
53051
|
/**
|
|
52387
53052
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -53149,7 +53814,8 @@ var batteryCapability = {
|
|
|
53149
53814
|
DeviceType.Button,
|
|
53150
53815
|
DeviceType.Switch,
|
|
53151
53816
|
DeviceType.PetFeeder,
|
|
53152
|
-
DeviceType.Container
|
|
53817
|
+
DeviceType.Container,
|
|
53818
|
+
DeviceType.Thermostat
|
|
53153
53819
|
],
|
|
53154
53820
|
methods: {
|
|
53155
53821
|
/**
|
|
@@ -53787,6 +54453,12 @@ var ClimateControlStatusSchema = object({
|
|
|
53787
54453
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53788
54454
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53789
54455
|
swingHorizontal: boolean().nullable(),
|
|
54456
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54457
|
+
minTemp: number().nullable().optional(),
|
|
54458
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54459
|
+
maxTemp: number().nullable().optional(),
|
|
54460
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54461
|
+
tempStep: number().positive().nullable().optional(),
|
|
53790
54462
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53791
54463
|
lastFetchedAt: number()
|
|
53792
54464
|
});
|
|
@@ -54641,6 +55313,125 @@ onStatusChanged: { data: object({
|
|
|
54641
55313
|
* whether persisting is worth a SQLite commit. */
|
|
54642
55314
|
volatileStateFields: ["lastChangedAt"]
|
|
54643
55315
|
};
|
|
55316
|
+
/**
|
|
55317
|
+
* Smart-dishwasher cap — program lifecycle, door / remote-start gates,
|
|
55318
|
+
* consumable levels (salt, rinse aid) and common program options.
|
|
55319
|
+
*
|
|
55320
|
+
* Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
|
|
55321
|
+
* by any integration that exposes the same program / option surface.
|
|
55322
|
+
*
|
|
55323
|
+
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55324
|
+
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55325
|
+
*/
|
|
55326
|
+
var DishwasherStateSchema = _enum([
|
|
55327
|
+
"idle",
|
|
55328
|
+
"running",
|
|
55329
|
+
"paused",
|
|
55330
|
+
"finished",
|
|
55331
|
+
"error",
|
|
55332
|
+
"unavailable"
|
|
55333
|
+
]);
|
|
55334
|
+
var DishwasherConsumableLevelSchema = _enum([
|
|
55335
|
+
"ok",
|
|
55336
|
+
"low",
|
|
55337
|
+
"empty"
|
|
55338
|
+
]);
|
|
55339
|
+
var DishwasherStatusSchema = object({
|
|
55340
|
+
state: DishwasherStateSchema,
|
|
55341
|
+
/** Active program id/name, or null when none selected / unknown. */
|
|
55342
|
+
program: string().nullable(),
|
|
55343
|
+
/** Program tokens the hardware accepts — drives the UI selector. */
|
|
55344
|
+
availablePrograms: array(string()),
|
|
55345
|
+
/** Minutes remaining on the active cycle, or null when not running. */
|
|
55346
|
+
remainingMinutes: number().int().nonnegative().nullable(),
|
|
55347
|
+
/** Cycle completion 0..100, or null when not applicable. */
|
|
55348
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
55349
|
+
/** True when the door is reported open. */
|
|
55350
|
+
doorOpen: boolean(),
|
|
55351
|
+
/** True when remote start is allowed (door closed, power on, etc.). */
|
|
55352
|
+
remoteStartAllowed: boolean(),
|
|
55353
|
+
/** Main power / switched-on state. */
|
|
55354
|
+
powerOn: boolean(),
|
|
55355
|
+
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55356
|
+
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55357
|
+
halfLoad: boolean(),
|
|
55358
|
+
hygienePlus: boolean(),
|
|
55359
|
+
errorCode: number().nullable(),
|
|
55360
|
+
errorLabel: string().nullable(),
|
|
55361
|
+
lastFetchedAt: number()
|
|
55362
|
+
});
|
|
55363
|
+
var dishwasherCapability = {
|
|
55364
|
+
name: "dishwasher",
|
|
55365
|
+
scope: "device",
|
|
55366
|
+
deviceNative: true,
|
|
55367
|
+
mode: "singleton",
|
|
55368
|
+
deviceTypes: [DeviceType.Dishwasher],
|
|
55369
|
+
methods: {
|
|
55370
|
+
start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55371
|
+
kind: "mutation",
|
|
55372
|
+
auth: "protected"
|
|
55373
|
+
}),
|
|
55374
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55375
|
+
kind: "mutation",
|
|
55376
|
+
auth: "protected"
|
|
55377
|
+
}),
|
|
55378
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
55379
|
+
kind: "mutation",
|
|
55380
|
+
auth: "protected"
|
|
55381
|
+
}),
|
|
55382
|
+
setProgram: method(object({
|
|
55383
|
+
deviceId: number().int().nonnegative(),
|
|
55384
|
+
program: string().min(1)
|
|
55385
|
+
}), _void(), {
|
|
55386
|
+
kind: "mutation",
|
|
55387
|
+
auth: "protected"
|
|
55388
|
+
}),
|
|
55389
|
+
setPower: method(object({
|
|
55390
|
+
deviceId: number().int().nonnegative(),
|
|
55391
|
+
on: boolean()
|
|
55392
|
+
}), _void(), {
|
|
55393
|
+
kind: "mutation",
|
|
55394
|
+
auth: "protected"
|
|
55395
|
+
}),
|
|
55396
|
+
setHalfLoad: method(object({
|
|
55397
|
+
deviceId: number().int().nonnegative(),
|
|
55398
|
+
on: boolean()
|
|
55399
|
+
}), _void(), {
|
|
55400
|
+
kind: "mutation",
|
|
55401
|
+
auth: "protected"
|
|
55402
|
+
}),
|
|
55403
|
+
setHygienePlus: method(object({
|
|
55404
|
+
deviceId: number().int().nonnegative(),
|
|
55405
|
+
on: boolean()
|
|
55406
|
+
}), _void(), {
|
|
55407
|
+
kind: "mutation",
|
|
55408
|
+
auth: "protected"
|
|
55409
|
+
}),
|
|
55410
|
+
setOption: method(object({
|
|
55411
|
+
deviceId: number().int().nonnegative(),
|
|
55412
|
+
key: string().min(1),
|
|
55413
|
+
value: union([
|
|
55414
|
+
boolean(),
|
|
55415
|
+
string(),
|
|
55416
|
+
number()
|
|
55417
|
+
])
|
|
55418
|
+
}), _void(), {
|
|
55419
|
+
kind: "mutation",
|
|
55420
|
+
auth: "protected"
|
|
55421
|
+
})
|
|
55422
|
+
},
|
|
55423
|
+
status: {
|
|
55424
|
+
schema: DishwasherStatusSchema,
|
|
55425
|
+
kind: "poll"
|
|
55426
|
+
},
|
|
55427
|
+
runtimeState: DishwasherStatusSchema,
|
|
55428
|
+
durability: "session",
|
|
55429
|
+
history: { fields: { progressPercent: {
|
|
55430
|
+
kind: "gauge",
|
|
55431
|
+
unit: "%",
|
|
55432
|
+
deadband: 2
|
|
55433
|
+
} } }
|
|
55434
|
+
};
|
|
54644
55435
|
var DoorbellStatusSchema = object({
|
|
54645
55436
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54646
55437
|
lastPressedAt: number().nullable(),
|
|
@@ -55443,6 +56234,32 @@ var gasCapability = {
|
|
|
55443
56234
|
* whether persisting is worth a SQLite commit. */
|
|
55444
56235
|
volatileStateFields: ["lastChangedAt"]
|
|
55445
56236
|
};
|
|
56237
|
+
var HeatingValveStatusSchema = object({
|
|
56238
|
+
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
56239
|
+
position: number().min(0).max(100).nullable(),
|
|
56240
|
+
/** Ms epoch when the slice was last updated (push or poll). */
|
|
56241
|
+
lastFetchedAt: number()
|
|
56242
|
+
});
|
|
56243
|
+
var heatingValveCapability = {
|
|
56244
|
+
name: "heating-valve",
|
|
56245
|
+
scope: "device",
|
|
56246
|
+
deviceNative: true,
|
|
56247
|
+
mode: "singleton",
|
|
56248
|
+
deviceTypes: [DeviceType.Thermostat],
|
|
56249
|
+
methods: {},
|
|
56250
|
+
status: {
|
|
56251
|
+
schema: HeatingValveStatusSchema,
|
|
56252
|
+
kind: "push"
|
|
56253
|
+
},
|
|
56254
|
+
runtimeState: HeatingValveStatusSchema,
|
|
56255
|
+
durability: "session",
|
|
56256
|
+
history: { fields: { position: {
|
|
56257
|
+
kind: "gauge",
|
|
56258
|
+
unit: "%",
|
|
56259
|
+
deadband: 1
|
|
56260
|
+
} } },
|
|
56261
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
56262
|
+
};
|
|
55446
56263
|
/**
|
|
55447
56264
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
55448
56265
|
* an on/off actuator with an optional target-humidity setpoint and an
|
|
@@ -56575,7 +57392,19 @@ var TlsStatusSchema = object({
|
|
|
56575
57392
|
sans: array(string()),
|
|
56576
57393
|
caCertPem: string().nullable(),
|
|
56577
57394
|
reissueError: string().nullable(),
|
|
56578
|
-
restartRequired: boolean()
|
|
57395
|
+
restartRequired: boolean(),
|
|
57396
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
57397
|
+
caMissing: boolean(),
|
|
57398
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
57399
|
+
localCaConstrained: boolean().nullable(),
|
|
57400
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
57401
|
+
caReplacedAt: string().nullable(),
|
|
57402
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
57403
|
+
storedUpload: object({
|
|
57404
|
+
leafFingerprintSha256: string(),
|
|
57405
|
+
validTo: string(),
|
|
57406
|
+
hasCa: boolean()
|
|
57407
|
+
}).nullable()
|
|
56579
57408
|
});
|
|
56580
57409
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
56581
57410
|
/**
|
|
@@ -56631,6 +57460,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
56631
57460
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
56632
57461
|
kind: "mutation",
|
|
56633
57462
|
auth: "admin"
|
|
57463
|
+
}), method(_void(), TlsStatusSchema, {
|
|
57464
|
+
kind: "mutation",
|
|
57465
|
+
auth: "admin"
|
|
56634
57466
|
});
|
|
56635
57467
|
var LockControlStatusSchema = object({
|
|
56636
57468
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -63272,7 +64104,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
63272
64104
|
kind: "mutation",
|
|
63273
64105
|
auth: "admin",
|
|
63274
64106
|
access: "delete"
|
|
63275
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
64107
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
64108
|
+
kind: "mutation",
|
|
64109
|
+
auth: "admin",
|
|
64110
|
+
access: "create"
|
|
64111
|
+
}), method(object({
|
|
63276
64112
|
userId: string(),
|
|
63277
64113
|
code: string()
|
|
63278
64114
|
}), object({ valid: boolean() }), {
|
|
@@ -64992,6 +65828,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64992
65828
|
dayNight: dayNightCapability,
|
|
64993
65829
|
deviceDiscovery: deviceDiscoveryCapability,
|
|
64994
65830
|
deviceStatus: deviceStatusCapability,
|
|
65831
|
+
dishwasher: dishwasherCapability,
|
|
64995
65832
|
doorbell: doorbellCapability,
|
|
64996
65833
|
enumSensor: enumSensorCapability,
|
|
64997
65834
|
eventEmitter: eventEmitterCapability,
|
|
@@ -64999,6 +65836,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
64999
65836
|
featureProbe: featureProbeCapability,
|
|
65000
65837
|
flood: floodCapability,
|
|
65001
65838
|
gas: gasCapability,
|
|
65839
|
+
heatingValve: heatingValveCapability,
|
|
65002
65840
|
humidifier: humidifierCapability,
|
|
65003
65841
|
humiditySensor: humiditySensorCapability,
|
|
65004
65842
|
image: imageCapability,
|
|
@@ -65084,13 +65922,14 @@ var BaseDevice$1 = class {
|
|
|
65084
65922
|
get state() {
|
|
65085
65923
|
if (!this._stateProxyCache) {
|
|
65086
65924
|
const cache = {};
|
|
65087
|
-
const handler = { get: (
|
|
65925
|
+
const handler = { get: (target, key) => {
|
|
65088
65926
|
const k = key;
|
|
65089
|
-
|
|
65927
|
+
const existing = Reflect.get(target, k);
|
|
65928
|
+
if (existing !== void 0) return existing;
|
|
65090
65929
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
65091
65930
|
if (!cap) return void 0;
|
|
65092
65931
|
const proxy = this.sliceProxy(cap);
|
|
65093
|
-
|
|
65932
|
+
Reflect.set(target, k, proxy);
|
|
65094
65933
|
return proxy;
|
|
65095
65934
|
} };
|
|
65096
65935
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -65289,7 +66128,7 @@ var BaseDevice$1 = class {
|
|
|
65289
66128
|
async updateSourceInfo(patch) {
|
|
65290
66129
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
65291
66130
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
65292
|
-
const action = this.ctx.api
|
|
66131
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
65293
66132
|
if (action) try {
|
|
65294
66133
|
await action.mutate({
|
|
65295
66134
|
deviceId: this.id,
|
|
@@ -65324,7 +66163,7 @@ var BaseDevice$1 = class {
|
|
|
65324
66163
|
* device boot on a meta refresh.
|
|
65325
66164
|
*/
|
|
65326
66165
|
async refreshFeatures() {
|
|
65327
|
-
const action = this.ctx.api
|
|
66166
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
65328
66167
|
if (!action) return;
|
|
65329
66168
|
try {
|
|
65330
66169
|
await action.mutate({
|
|
@@ -65723,6 +66562,12 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
65723
66562
|
provider: this
|
|
65724
66563
|
}];
|
|
65725
66564
|
}
|
|
66565
|
+
/** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
|
|
66566
|
+
providerRegistrationsFromSuper(result) {
|
|
66567
|
+
if (Array.isArray(result)) return result;
|
|
66568
|
+
if (result !== void 0 && result.providers !== void 0) return [...result.providers];
|
|
66569
|
+
return [];
|
|
66570
|
+
}
|
|
65726
66571
|
async onShutdown() {
|
|
65727
66572
|
this._restoreShuttingDown = true;
|
|
65728
66573
|
this.cancelRestoreRetries();
|
|
@@ -66249,7 +67094,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
66249
67094
|
return toDeviceSummary(device, this.addonId);
|
|
66250
67095
|
}
|
|
66251
67096
|
};
|
|
66252
|
-
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;
|
|
67097
|
+
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;
|
|
66253
67098
|
new Set(Object.values(DeviceType));
|
|
66254
67099
|
Object.freeze({
|
|
66255
67100
|
"accessories.getStatus": {
|
|
@@ -67398,6 +68243,12 @@ Object.freeze({
|
|
|
67398
68243
|
addonId: null,
|
|
67399
68244
|
access: "view"
|
|
67400
68245
|
},
|
|
68246
|
+
"coreBlocks.migrateRawSecrets": {
|
|
68247
|
+
capName: "core-blocks",
|
|
68248
|
+
capScope: "system",
|
|
68249
|
+
addonId: null,
|
|
68250
|
+
access: "create"
|
|
68251
|
+
},
|
|
67401
68252
|
"coreBlocks.restart": {
|
|
67402
68253
|
capName: "core-blocks",
|
|
67403
68254
|
capScope: "system",
|
|
@@ -68664,6 +69515,60 @@ Object.freeze({
|
|
|
68664
69515
|
addonId: null,
|
|
68665
69516
|
access: "view"
|
|
68666
69517
|
},
|
|
69518
|
+
"dishwasher.getStatus": {
|
|
69519
|
+
capName: "dishwasher",
|
|
69520
|
+
capScope: "device",
|
|
69521
|
+
addonId: null,
|
|
69522
|
+
access: "view"
|
|
69523
|
+
},
|
|
69524
|
+
"dishwasher.pause": {
|
|
69525
|
+
capName: "dishwasher",
|
|
69526
|
+
capScope: "device",
|
|
69527
|
+
addonId: null,
|
|
69528
|
+
access: "create"
|
|
69529
|
+
},
|
|
69530
|
+
"dishwasher.setHalfLoad": {
|
|
69531
|
+
capName: "dishwasher",
|
|
69532
|
+
capScope: "device",
|
|
69533
|
+
addonId: null,
|
|
69534
|
+
access: "create"
|
|
69535
|
+
},
|
|
69536
|
+
"dishwasher.setHygienePlus": {
|
|
69537
|
+
capName: "dishwasher",
|
|
69538
|
+
capScope: "device",
|
|
69539
|
+
addonId: null,
|
|
69540
|
+
access: "create"
|
|
69541
|
+
},
|
|
69542
|
+
"dishwasher.setOption": {
|
|
69543
|
+
capName: "dishwasher",
|
|
69544
|
+
capScope: "device",
|
|
69545
|
+
addonId: null,
|
|
69546
|
+
access: "create"
|
|
69547
|
+
},
|
|
69548
|
+
"dishwasher.setPower": {
|
|
69549
|
+
capName: "dishwasher",
|
|
69550
|
+
capScope: "device",
|
|
69551
|
+
addonId: null,
|
|
69552
|
+
access: "create"
|
|
69553
|
+
},
|
|
69554
|
+
"dishwasher.setProgram": {
|
|
69555
|
+
capName: "dishwasher",
|
|
69556
|
+
capScope: "device",
|
|
69557
|
+
addonId: null,
|
|
69558
|
+
access: "create"
|
|
69559
|
+
},
|
|
69560
|
+
"dishwasher.start": {
|
|
69561
|
+
capName: "dishwasher",
|
|
69562
|
+
capScope: "device",
|
|
69563
|
+
addonId: null,
|
|
69564
|
+
access: "create"
|
|
69565
|
+
},
|
|
69566
|
+
"dishwasher.stop": {
|
|
69567
|
+
capName: "dishwasher",
|
|
69568
|
+
capScope: "device",
|
|
69569
|
+
addonId: null,
|
|
69570
|
+
access: "create"
|
|
69571
|
+
},
|
|
68667
69572
|
"doorbell.getStatus": {
|
|
68668
69573
|
capName: "doorbell",
|
|
68669
69574
|
capScope: "device",
|
|
@@ -68874,6 +69779,12 @@ Object.freeze({
|
|
|
68874
69779
|
addonId: null,
|
|
68875
69780
|
access: "view"
|
|
68876
69781
|
},
|
|
69782
|
+
"heatingValve.getStatus": {
|
|
69783
|
+
capName: "heating-valve",
|
|
69784
|
+
capScope: "device",
|
|
69785
|
+
addonId: null,
|
|
69786
|
+
access: "view"
|
|
69787
|
+
},
|
|
68877
69788
|
"humidifier.getStatus": {
|
|
68878
69789
|
capName: "humidifier",
|
|
68879
69790
|
capScope: "device",
|
|
@@ -69084,6 +69995,12 @@ Object.freeze({
|
|
|
69084
69995
|
addonId: null,
|
|
69085
69996
|
access: "create"
|
|
69086
69997
|
},
|
|
69998
|
+
"keychainAdmin.importSecret": {
|
|
69999
|
+
capName: "keychain-admin",
|
|
70000
|
+
capScope: "system",
|
|
70001
|
+
addonId: null,
|
|
70002
|
+
access: "create"
|
|
70003
|
+
},
|
|
69087
70004
|
"keychainAdmin.listAudit": {
|
|
69088
70005
|
capName: "keychain-admin",
|
|
69089
70006
|
capScope: "system",
|
|
@@ -69252,6 +70169,12 @@ Object.freeze({
|
|
|
69252
70169
|
addonId: null,
|
|
69253
70170
|
access: "view"
|
|
69254
70171
|
},
|
|
70172
|
+
"llm.migrateRawSecrets": {
|
|
70173
|
+
capName: "llm",
|
|
70174
|
+
capScope: "system",
|
|
70175
|
+
addonId: null,
|
|
70176
|
+
access: "create"
|
|
70177
|
+
},
|
|
69255
70178
|
"llm.resolveModelRef": {
|
|
69256
70179
|
capName: "llm",
|
|
69257
70180
|
capScope: "system",
|
|
@@ -69480,6 +70403,12 @@ Object.freeze({
|
|
|
69480
70403
|
addonId: null,
|
|
69481
70404
|
access: "create"
|
|
69482
70405
|
},
|
|
70406
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
70407
|
+
capName: "local-network",
|
|
70408
|
+
capScope: "system",
|
|
70409
|
+
addonId: null,
|
|
70410
|
+
access: "create"
|
|
70411
|
+
},
|
|
69483
70412
|
"lockControl.getStatus": {
|
|
69484
70413
|
capName: "lock-control",
|
|
69485
70414
|
capScope: "device",
|
|
@@ -72132,6 +73061,30 @@ Object.freeze({
|
|
|
72132
73061
|
addonId: null,
|
|
72133
73062
|
access: "create"
|
|
72134
73063
|
},
|
|
73064
|
+
"recordEntries.deleteEntry": {
|
|
73065
|
+
capName: "record-entries",
|
|
73066
|
+
capScope: "system",
|
|
73067
|
+
addonId: null,
|
|
73068
|
+
access: "delete"
|
|
73069
|
+
},
|
|
73070
|
+
"recordEntries.listEntries": {
|
|
73071
|
+
capName: "record-entries",
|
|
73072
|
+
capScope: "system",
|
|
73073
|
+
addonId: null,
|
|
73074
|
+
access: "view"
|
|
73075
|
+
},
|
|
73076
|
+
"recordEntries.listEntryKinds": {
|
|
73077
|
+
capName: "record-entries",
|
|
73078
|
+
capScope: "system",
|
|
73079
|
+
addonId: null,
|
|
73080
|
+
access: "view"
|
|
73081
|
+
},
|
|
73082
|
+
"recordEntries.putEntry": {
|
|
73083
|
+
capName: "record-entries",
|
|
73084
|
+
capScope: "system",
|
|
73085
|
+
addonId: null,
|
|
73086
|
+
access: "create"
|
|
73087
|
+
},
|
|
72135
73088
|
"recording.getAvailability": {
|
|
72136
73089
|
capName: "recording",
|
|
72137
73090
|
capScope: "device",
|
|
@@ -72432,6 +73385,102 @@ Object.freeze({
|
|
|
72432
73385
|
addonId: null,
|
|
72433
73386
|
access: "view"
|
|
72434
73387
|
},
|
|
73388
|
+
"records.aggregate": {
|
|
73389
|
+
capName: "records",
|
|
73390
|
+
capScope: "system",
|
|
73391
|
+
addonId: null,
|
|
73392
|
+
access: "view"
|
|
73393
|
+
},
|
|
73394
|
+
"records.allocateId": {
|
|
73395
|
+
capName: "records",
|
|
73396
|
+
capScope: "system",
|
|
73397
|
+
addonId: null,
|
|
73398
|
+
access: "create"
|
|
73399
|
+
},
|
|
73400
|
+
"records.count": {
|
|
73401
|
+
capName: "records",
|
|
73402
|
+
capScope: "system",
|
|
73403
|
+
addonId: null,
|
|
73404
|
+
access: "view"
|
|
73405
|
+
},
|
|
73406
|
+
"records.declareKinds": {
|
|
73407
|
+
capName: "records",
|
|
73408
|
+
capScope: "system",
|
|
73409
|
+
addonId: null,
|
|
73410
|
+
access: "create"
|
|
73411
|
+
},
|
|
73412
|
+
"records.delete": {
|
|
73413
|
+
capName: "records",
|
|
73414
|
+
capScope: "system",
|
|
73415
|
+
addonId: null,
|
|
73416
|
+
access: "delete"
|
|
73417
|
+
},
|
|
73418
|
+
"records.deleteDevice": {
|
|
73419
|
+
capName: "records",
|
|
73420
|
+
capScope: "system",
|
|
73421
|
+
addonId: null,
|
|
73422
|
+
access: "delete"
|
|
73423
|
+
},
|
|
73424
|
+
"records.deleteMany": {
|
|
73425
|
+
capName: "records",
|
|
73426
|
+
capScope: "system",
|
|
73427
|
+
addonId: null,
|
|
73428
|
+
access: "delete"
|
|
73429
|
+
},
|
|
73430
|
+
"records.deleteWhere": {
|
|
73431
|
+
capName: "records",
|
|
73432
|
+
capScope: "system",
|
|
73433
|
+
addonId: null,
|
|
73434
|
+
access: "delete"
|
|
73435
|
+
},
|
|
73436
|
+
"records.get": {
|
|
73437
|
+
capName: "records",
|
|
73438
|
+
capScope: "system",
|
|
73439
|
+
addonId: null,
|
|
73440
|
+
access: "view"
|
|
73441
|
+
},
|
|
73442
|
+
"records.getMany": {
|
|
73443
|
+
capName: "records",
|
|
73444
|
+
capScope: "system",
|
|
73445
|
+
addonId: null,
|
|
73446
|
+
access: "view"
|
|
73447
|
+
},
|
|
73448
|
+
"records.histogram": {
|
|
73449
|
+
capName: "records",
|
|
73450
|
+
capScope: "system",
|
|
73451
|
+
addonId: null,
|
|
73452
|
+
access: "view"
|
|
73453
|
+
},
|
|
73454
|
+
"records.patch": {
|
|
73455
|
+
capName: "records",
|
|
73456
|
+
capScope: "system",
|
|
73457
|
+
addonId: null,
|
|
73458
|
+
access: "create"
|
|
73459
|
+
},
|
|
73460
|
+
"records.put": {
|
|
73461
|
+
capName: "records",
|
|
73462
|
+
capScope: "system",
|
|
73463
|
+
addonId: null,
|
|
73464
|
+
access: "create"
|
|
73465
|
+
},
|
|
73466
|
+
"records.putMany": {
|
|
73467
|
+
capName: "records",
|
|
73468
|
+
capScope: "system",
|
|
73469
|
+
addonId: null,
|
|
73470
|
+
access: "create"
|
|
73471
|
+
},
|
|
73472
|
+
"records.query": {
|
|
73473
|
+
capName: "records",
|
|
73474
|
+
capScope: "system",
|
|
73475
|
+
addonId: null,
|
|
73476
|
+
access: "view"
|
|
73477
|
+
},
|
|
73478
|
+
"records.secretRefs": {
|
|
73479
|
+
capName: "records",
|
|
73480
|
+
capScope: "system",
|
|
73481
|
+
addonId: null,
|
|
73482
|
+
access: "view"
|
|
73483
|
+
},
|
|
72435
73484
|
"sceneMonitor.captureReference": {
|
|
72436
73485
|
capName: "scene-monitor",
|
|
72437
73486
|
capScope: "device",
|
|
@@ -72864,6 +73913,48 @@ Object.freeze({
|
|
|
72864
73913
|
addonId: null,
|
|
72865
73914
|
access: "create"
|
|
72866
73915
|
},
|
|
73916
|
+
"storageAdmin.adoptRecords": {
|
|
73917
|
+
capName: "storage-admin",
|
|
73918
|
+
capScope: "system",
|
|
73919
|
+
addonId: null,
|
|
73920
|
+
access: "create"
|
|
73921
|
+
},
|
|
73922
|
+
"storageAdmin.dropCollection": {
|
|
73923
|
+
capName: "storage-admin",
|
|
73924
|
+
capScope: "system",
|
|
73925
|
+
addonId: null,
|
|
73926
|
+
access: "delete"
|
|
73927
|
+
},
|
|
73928
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
73929
|
+
capName: "storage-admin",
|
|
73930
|
+
capScope: "system",
|
|
73931
|
+
addonId: null,
|
|
73932
|
+
access: "view"
|
|
73933
|
+
},
|
|
73934
|
+
"storageAdmin.listKinds": {
|
|
73935
|
+
capName: "storage-admin",
|
|
73936
|
+
capScope: "system",
|
|
73937
|
+
addonId: null,
|
|
73938
|
+
access: "view"
|
|
73939
|
+
},
|
|
73940
|
+
"storageAdmin.listTables": {
|
|
73941
|
+
capName: "storage-admin",
|
|
73942
|
+
capScope: "system",
|
|
73943
|
+
addonId: null,
|
|
73944
|
+
access: "view"
|
|
73945
|
+
},
|
|
73946
|
+
"storageAdmin.readLegacyCollection": {
|
|
73947
|
+
capName: "storage-admin",
|
|
73948
|
+
capScope: "system",
|
|
73949
|
+
addonId: null,
|
|
73950
|
+
access: "view"
|
|
73951
|
+
},
|
|
73952
|
+
"storageAdmin.readRecords": {
|
|
73953
|
+
capName: "storage-admin",
|
|
73954
|
+
capScope: "system",
|
|
73955
|
+
addonId: null,
|
|
73956
|
+
access: "view"
|
|
73957
|
+
},
|
|
72867
73958
|
"storageEvictable.evict": {
|
|
72868
73959
|
capName: "storage-evictable",
|
|
72869
73960
|
capScope: "system",
|
|
@@ -73776,6 +74867,12 @@ Object.freeze({
|
|
|
73776
74867
|
addonId: null,
|
|
73777
74868
|
access: "view"
|
|
73778
74869
|
},
|
|
74870
|
+
"userManagement.migrateRawSecrets": {
|
|
74871
|
+
capName: "user-management",
|
|
74872
|
+
capScope: "system",
|
|
74873
|
+
addonId: null,
|
|
74874
|
+
access: "create"
|
|
74875
|
+
},
|
|
73779
74876
|
"userManagement.oauthExchangeCode": {
|
|
73780
74877
|
capName: "user-management",
|
|
73781
74878
|
capScope: "system",
|
|
@@ -74275,7 +75372,7 @@ Object.freeze({
|
|
|
74275
75372
|
access: "create"
|
|
74276
75373
|
}
|
|
74277
75374
|
});
|
|
74278
|
-
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;
|
|
75375
|
+
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;
|
|
74279
75376
|
DeviceFeature.BatteryOperated;
|
|
74280
75377
|
Object.freeze({
|
|
74281
75378
|
"accessories.getStatus": [{
|
|
@@ -75099,6 +76196,51 @@ Object.freeze({
|
|
|
75099
76196
|
form: "single",
|
|
75100
76197
|
optional: false
|
|
75101
76198
|
}],
|
|
76199
|
+
"dishwasher.getStatus": [{
|
|
76200
|
+
name: "deviceId",
|
|
76201
|
+
form: "single",
|
|
76202
|
+
optional: false
|
|
76203
|
+
}],
|
|
76204
|
+
"dishwasher.pause": [{
|
|
76205
|
+
name: "deviceId",
|
|
76206
|
+
form: "single",
|
|
76207
|
+
optional: false
|
|
76208
|
+
}],
|
|
76209
|
+
"dishwasher.setHalfLoad": [{
|
|
76210
|
+
name: "deviceId",
|
|
76211
|
+
form: "single",
|
|
76212
|
+
optional: false
|
|
76213
|
+
}],
|
|
76214
|
+
"dishwasher.setHygienePlus": [{
|
|
76215
|
+
name: "deviceId",
|
|
76216
|
+
form: "single",
|
|
76217
|
+
optional: false
|
|
76218
|
+
}],
|
|
76219
|
+
"dishwasher.setOption": [{
|
|
76220
|
+
name: "deviceId",
|
|
76221
|
+
form: "single",
|
|
76222
|
+
optional: false
|
|
76223
|
+
}],
|
|
76224
|
+
"dishwasher.setPower": [{
|
|
76225
|
+
name: "deviceId",
|
|
76226
|
+
form: "single",
|
|
76227
|
+
optional: false
|
|
76228
|
+
}],
|
|
76229
|
+
"dishwasher.setProgram": [{
|
|
76230
|
+
name: "deviceId",
|
|
76231
|
+
form: "single",
|
|
76232
|
+
optional: false
|
|
76233
|
+
}],
|
|
76234
|
+
"dishwasher.start": [{
|
|
76235
|
+
name: "deviceId",
|
|
76236
|
+
form: "single",
|
|
76237
|
+
optional: false
|
|
76238
|
+
}],
|
|
76239
|
+
"dishwasher.stop": [{
|
|
76240
|
+
name: "deviceId",
|
|
76241
|
+
form: "single",
|
|
76242
|
+
optional: false
|
|
76243
|
+
}],
|
|
75102
76244
|
"doorbell.getStatus": [{
|
|
75103
76245
|
name: "deviceId",
|
|
75104
76246
|
form: "single",
|
|
@@ -75168,6 +76310,11 @@ Object.freeze({
|
|
|
75168
76310
|
form: "single",
|
|
75169
76311
|
optional: false
|
|
75170
76312
|
}],
|
|
76313
|
+
"heatingValve.getStatus": [{
|
|
76314
|
+
name: "deviceId",
|
|
76315
|
+
form: "single",
|
|
76316
|
+
optional: false
|
|
76317
|
+
}],
|
|
75171
76318
|
"humidifier.getStatus": [{
|
|
75172
76319
|
name: "deviceId",
|
|
75173
76320
|
form: "single",
|
|
@@ -76452,6 +77599,37 @@ Object.freeze({
|
|
|
76452
77599
|
form: "single",
|
|
76453
77600
|
optional: false
|
|
76454
77601
|
}],
|
|
77602
|
+
"records.count": [{
|
|
77603
|
+
name: "deviceId",
|
|
77604
|
+
form: "single",
|
|
77605
|
+
optional: true
|
|
77606
|
+
}],
|
|
77607
|
+
"records.deleteDevice": [{
|
|
77608
|
+
name: "deviceId",
|
|
77609
|
+
form: "single",
|
|
77610
|
+
optional: false
|
|
77611
|
+
}],
|
|
77612
|
+
"records.deleteWhere": [{
|
|
77613
|
+
name: "deviceId",
|
|
77614
|
+
form: "single",
|
|
77615
|
+
optional: true
|
|
77616
|
+
}],
|
|
77617
|
+
"records.histogram": [{
|
|
77618
|
+
name: "deviceId",
|
|
77619
|
+
form: "single",
|
|
77620
|
+
optional: true
|
|
77621
|
+
}],
|
|
77622
|
+
"records.putMany": [{
|
|
77623
|
+
name: "records",
|
|
77624
|
+
form: "object-array",
|
|
77625
|
+
optional: false,
|
|
77626
|
+
itemField: "deviceId"
|
|
77627
|
+
}],
|
|
77628
|
+
"records.query": [{
|
|
77629
|
+
name: "deviceId",
|
|
77630
|
+
form: "single",
|
|
77631
|
+
optional: true
|
|
77632
|
+
}],
|
|
76455
77633
|
"sceneMonitor.captureReference": [{
|
|
76456
77634
|
name: "deviceId",
|
|
76457
77635
|
form: "single",
|
|
@@ -76568,6 +77746,17 @@ Object.freeze({
|
|
|
76568
77746
|
form: "single",
|
|
76569
77747
|
optional: false
|
|
76570
77748
|
}],
|
|
77749
|
+
"storageAdmin.adoptRecords": [{
|
|
77750
|
+
name: "records",
|
|
77751
|
+
form: "object-array",
|
|
77752
|
+
optional: false,
|
|
77753
|
+
itemField: "deviceId"
|
|
77754
|
+
}],
|
|
77755
|
+
"storageAdmin.readRecords": [{
|
|
77756
|
+
name: "deviceId",
|
|
77757
|
+
form: "single",
|
|
77758
|
+
optional: true
|
|
77759
|
+
}],
|
|
76571
77760
|
"streamBroker.acquireEgressTranscode": [{
|
|
76572
77761
|
name: "deviceId",
|
|
76573
77762
|
form: "single",
|
|
@@ -183466,7 +184655,7 @@ var DreameProviderAddon = class extends BaseDeviceProvider {
|
|
|
183466
184655
|
super({});
|
|
183467
184656
|
}
|
|
183468
184657
|
async onInitialize() {
|
|
183469
|
-
const regs = await super.onInitialize();
|
|
184658
|
+
const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
|
|
183470
184659
|
this.clients = new DreameClientRegistry(this.ctx.logger);
|
|
183471
184660
|
this.clients.setOnConnected((integrationId) => {
|
|
183472
184661
|
this.ctx.logger.info("Dreame: integration connected", { meta: { integrationId } });
|