@camstack/addon-provider-wyze 0.2.137 → 0.2.138
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 +1039 -124
- package/dist/addon.mjs +1039 -124
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -31,7 +31,7 @@ let net = require("net");
|
|
|
31
31
|
net = __toESM(net, 1);
|
|
32
32
|
let node_child_process = require("node:child_process");
|
|
33
33
|
let node_tls = require("node:tls");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -95,6 +95,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
95
95
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
96
96
|
*/
|
|
97
97
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
98
|
+
/**
|
|
99
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
100
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
101
|
+
* action. One event per refusal.
|
|
102
|
+
*/
|
|
103
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
104
|
+
/**
|
|
105
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
106
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
107
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
108
|
+
*/
|
|
109
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
110
|
+
/**
|
|
111
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
112
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
113
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
114
|
+
*/
|
|
115
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
98
116
|
EventCategory["AddonError"] = "addon.error";
|
|
99
117
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
100
118
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5419,7 +5437,7 @@ var ZodIssueCode = {
|
|
|
5419
5437
|
var ZodFirstPartyTypeKind;
|
|
5420
5438
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5421
5439
|
//#endregion
|
|
5422
|
-
//#region ../types/dist/sleep-
|
|
5440
|
+
//#region ../types/dist/sleep-bZIhUvjd.mjs
|
|
5423
5441
|
/**
|
|
5424
5442
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5425
5443
|
* window to float samples (D455).
|
|
@@ -5536,7 +5554,7 @@ function isKeychainStoredField(field) {
|
|
|
5536
5554
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5537
5555
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5538
5556
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5539
|
-
function isRecord$
|
|
5557
|
+
function isRecord$5(value) {
|
|
5540
5558
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5541
5559
|
}
|
|
5542
5560
|
function makeSecretMarker(ref) {
|
|
@@ -5547,12 +5565,12 @@ function makeSecretMarker(ref) {
|
|
|
5547
5565
|
}
|
|
5548
5566
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5549
5567
|
function isSecretMarker(value) {
|
|
5550
|
-
if (!isRecord$
|
|
5568
|
+
if (!isRecord$5(value)) return false;
|
|
5551
5569
|
const ref = value["$secret"];
|
|
5552
5570
|
return typeof ref === "string" && ref.length > 0;
|
|
5553
5571
|
}
|
|
5554
5572
|
function isSecretClear(value) {
|
|
5555
|
-
return isRecord$
|
|
5573
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5556
5574
|
}
|
|
5557
5575
|
/**
|
|
5558
5576
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6162,7 +6180,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6162
6180
|
}
|
|
6163
6181
|
};
|
|
6164
6182
|
var KEEP = { kind: "keep" };
|
|
6165
|
-
function isRecord$
|
|
6183
|
+
function isRecord$4(value) {
|
|
6166
6184
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6167
6185
|
}
|
|
6168
6186
|
function defaultMintId() {
|
|
@@ -6175,7 +6193,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6175
6193
|
return out;
|
|
6176
6194
|
}
|
|
6177
6195
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6178
|
-
else if (isRecord$
|
|
6196
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6179
6197
|
return out;
|
|
6180
6198
|
}
|
|
6181
6199
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6230,7 +6248,7 @@ function rowId(row, idKey) {
|
|
|
6230
6248
|
return null;
|
|
6231
6249
|
}
|
|
6232
6250
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6233
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6251
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6234
6252
|
if (!Array.isArray(incoming)) {
|
|
6235
6253
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6236
6254
|
return {
|
|
@@ -6246,7 +6264,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6246
6264
|
const kept = /* @__PURE__ */ new Set();
|
|
6247
6265
|
const rows = [];
|
|
6248
6266
|
for (const row of incoming) {
|
|
6249
|
-
if (!isRecord$
|
|
6267
|
+
if (!isRecord$4(row)) {
|
|
6250
6268
|
rows.push(row);
|
|
6251
6269
|
continue;
|
|
6252
6270
|
}
|
|
@@ -6271,7 +6289,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6271
6289
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6272
6290
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6273
6291
|
case "object": {
|
|
6274
|
-
if (!isRecord$
|
|
6292
|
+
if (!isRecord$4(incoming)) {
|
|
6275
6293
|
if (incoming === void 0) return KEEP;
|
|
6276
6294
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6277
6295
|
return {
|
|
@@ -6279,7 +6297,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6279
6297
|
value: incoming
|
|
6280
6298
|
};
|
|
6281
6299
|
}
|
|
6282
|
-
const storedObj = isRecord$
|
|
6300
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6283
6301
|
return {
|
|
6284
6302
|
kind: "value",
|
|
6285
6303
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6402,7 +6420,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6402
6420
|
value: items
|
|
6403
6421
|
};
|
|
6404
6422
|
}
|
|
6405
|
-
if (isRecord$
|
|
6423
|
+
if (isRecord$4(v)) {
|
|
6406
6424
|
const out = {};
|
|
6407
6425
|
for (const [k, child] of Object.entries(v)) {
|
|
6408
6426
|
const s = substitute(child);
|
|
@@ -6434,7 +6452,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6434
6452
|
this.name = "SecretOverwriteRefusedError";
|
|
6435
6453
|
}
|
|
6436
6454
|
};
|
|
6437
|
-
function isRecord(value) {
|
|
6455
|
+
function isRecord$3(value) {
|
|
6438
6456
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6439
6457
|
}
|
|
6440
6458
|
function resolvedValue(pass, marker) {
|
|
@@ -6463,7 +6481,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6463
6481
|
return incoming.map((item, index) => {
|
|
6464
6482
|
const twin = stored[index];
|
|
6465
6483
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6466
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6484
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6467
6485
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6468
6486
|
return item;
|
|
6469
6487
|
});
|
|
@@ -6474,7 +6492,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6474
6492
|
const twin = stored[key];
|
|
6475
6493
|
if (isSecretMarker(twin)) {
|
|
6476
6494
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6477
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6495
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6478
6496
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6479
6497
|
}
|
|
6480
6498
|
return out;
|
|
@@ -6482,7 +6500,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6482
6500
|
async function walk(pass, incoming, stored) {
|
|
6483
6501
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6484
6502
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6485
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6503
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6486
6504
|
const out = { ...incoming };
|
|
6487
6505
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6488
6506
|
return out;
|
|
@@ -6513,7 +6531,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6513
6531
|
function isJsonEqual(a, b) {
|
|
6514
6532
|
if (Object.is(a, b)) return true;
|
|
6515
6533
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6516
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6534
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6517
6535
|
const keys = Object.keys(a);
|
|
6518
6536
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6519
6537
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6537,7 +6555,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6537
6555
|
}
|
|
6538
6556
|
function nodeFromStored(value, owner) {
|
|
6539
6557
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6540
|
-
if (!isRecord(value)) return null;
|
|
6558
|
+
if (!isRecord$3(value)) return null;
|
|
6541
6559
|
const children = /* @__PURE__ */ new Map();
|
|
6542
6560
|
for (const [key, child] of Object.entries(value)) {
|
|
6543
6561
|
const node = nodeFromStored(child, owner);
|
|
@@ -6670,7 +6688,6 @@ function createHandle(raw, opts) {
|
|
|
6670
6688
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6671
6689
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6672
6690
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6673
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6674
6691
|
const overrides = {
|
|
6675
6692
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6676
6693
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6694,12 +6711,12 @@ function createHandle(raw, opts) {
|
|
|
6694
6711
|
};
|
|
6695
6712
|
} } : {},
|
|
6696
6713
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6697
|
-
|
|
6698
|
-
const rows = await readDeviceStoreBatch
|
|
6714
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6715
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6699
6716
|
const out = /* @__PURE__ */ new Map();
|
|
6700
6717
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6701
6718
|
return out;
|
|
6702
|
-
}
|
|
6719
|
+
},
|
|
6703
6720
|
writeAddonStore: async (patch) => {
|
|
6704
6721
|
await writeAddon(patch);
|
|
6705
6722
|
},
|
|
@@ -7326,7 +7343,7 @@ var BaseAddon = class {
|
|
|
7326
7343
|
if (!ctx) return;
|
|
7327
7344
|
const addonId = ctx.id;
|
|
7328
7345
|
setImmediate(() => {
|
|
7329
|
-
ctx.api.addons
|
|
7346
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7330
7347
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7331
7348
|
}).catch((err) => {
|
|
7332
7349
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7526,7 +7543,7 @@ var BaseAddon = class {
|
|
|
7526
7543
|
return this._addonSecretTree;
|
|
7527
7544
|
}
|
|
7528
7545
|
deviceSecretTree() {
|
|
7529
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7546
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7530
7547
|
return this._deviceSecretTree;
|
|
7531
7548
|
}
|
|
7532
7549
|
/**
|
|
@@ -7602,42 +7619,135 @@ var BaseAddon = class {
|
|
|
7602
7619
|
this[timerOf] = timer;
|
|
7603
7620
|
}
|
|
7604
7621
|
/**
|
|
7605
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7606
|
-
*
|
|
7607
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7608
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7622
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7623
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7609
7624
|
* addon permanently broken.
|
|
7610
7625
|
*
|
|
7611
|
-
*
|
|
7612
|
-
*
|
|
7613
|
-
* `
|
|
7626
|
+
* Two kinds of outage, two budgets:
|
|
7627
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7628
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7629
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7630
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7631
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7632
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7633
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7634
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7635
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7636
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7614
7637
|
*/
|
|
7615
7638
|
async readAddonStoreWithRetry() {
|
|
7616
7639
|
const settings = this.rawSettings();
|
|
7617
7640
|
if (!settings) return {};
|
|
7618
|
-
const delaysMs = [
|
|
7619
|
-
150,
|
|
7620
|
-
350,
|
|
7621
|
-
600,
|
|
7622
|
-
900
|
|
7623
|
-
];
|
|
7624
7641
|
let lastErr;
|
|
7625
|
-
for (let attempt = 0
|
|
7642
|
+
for (let attempt = 0;; attempt++) try {
|
|
7626
7643
|
const stored = await settings.readAddonStore() ?? {};
|
|
7627
7644
|
this.settingsStoreReady = true;
|
|
7628
7645
|
return stored;
|
|
7629
7646
|
} catch (err) {
|
|
7630
7647
|
lastErr = err;
|
|
7631
|
-
const
|
|
7632
|
-
if (
|
|
7633
|
-
|
|
7634
|
-
|
|
7648
|
+
const kind = classifyStoreError(err);
|
|
7649
|
+
if (kind === "permanent") throw err;
|
|
7650
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7651
|
+
if (delay === void 0) {
|
|
7652
|
+
if (kind === "transport") throw err;
|
|
7653
|
+
break;
|
|
7654
|
+
}
|
|
7655
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7635
7656
|
}
|
|
7636
7657
|
this.settingsStoreReady = false;
|
|
7637
7658
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7638
7659
|
return {};
|
|
7639
7660
|
}
|
|
7640
7661
|
};
|
|
7662
|
+
/** The settings store's own restart fingerprints. */
|
|
7663
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7664
|
+
150,
|
|
7665
|
+
350,
|
|
7666
|
+
600,
|
|
7667
|
+
900
|
|
7668
|
+
];
|
|
7669
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7670
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7671
|
+
150,
|
|
7672
|
+
350,
|
|
7673
|
+
600,
|
|
7674
|
+
900,
|
|
7675
|
+
2e3,
|
|
7676
|
+
5e3,
|
|
7677
|
+
1e4,
|
|
7678
|
+
2e4,
|
|
7679
|
+
3e4,
|
|
7680
|
+
3e4
|
|
7681
|
+
];
|
|
7682
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7683
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7684
|
+
var TRANSPORT_CODES = new Set([
|
|
7685
|
+
"ECONNREFUSED",
|
|
7686
|
+
"ECONNRESET",
|
|
7687
|
+
"ETIMEDOUT",
|
|
7688
|
+
"EPIPE",
|
|
7689
|
+
"EHOSTUNREACH",
|
|
7690
|
+
"ENETUNREACH"
|
|
7691
|
+
]);
|
|
7692
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7693
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7694
|
+
"TIMEOUT",
|
|
7695
|
+
"SERVICE_UNAVAILABLE",
|
|
7696
|
+
"BAD_GATEWAY",
|
|
7697
|
+
"GATEWAY_TIMEOUT"
|
|
7698
|
+
]);
|
|
7699
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7700
|
+
var TRANSPORT_PHRASES = [
|
|
7701
|
+
"discovery deadline exceeded",
|
|
7702
|
+
"parent could not route child unowned cap call",
|
|
7703
|
+
"UDS request timed out after",
|
|
7704
|
+
"channel closed"
|
|
7705
|
+
];
|
|
7706
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7707
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7708
|
+
"REQUEST_TIMEOUT",
|
|
7709
|
+
"SERVICE_NOT_FOUND",
|
|
7710
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7711
|
+
"REQUEST_REJECTED",
|
|
7712
|
+
"BROKER_DISCONNECTED"
|
|
7713
|
+
]);
|
|
7714
|
+
function stringProp(value, key) {
|
|
7715
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7716
|
+
const found = Reflect.get(value, key);
|
|
7717
|
+
return typeof found === "string" ? found : void 0;
|
|
7718
|
+
}
|
|
7719
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7720
|
+
function errorCode(err) {
|
|
7721
|
+
const out = {};
|
|
7722
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7723
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7724
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7725
|
+
if (node !== void 0) out.node = node;
|
|
7726
|
+
const trpc = stringProp(data, "code");
|
|
7727
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7728
|
+
return out;
|
|
7729
|
+
}
|
|
7730
|
+
/**
|
|
7731
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7732
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7733
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7734
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7735
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7736
|
+
*/
|
|
7737
|
+
function classifyStoreError(err) {
|
|
7738
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7739
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7740
|
+
const code = errorCode(err);
|
|
7741
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7742
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7743
|
+
if (typeof err === "object" && err !== null) {
|
|
7744
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7745
|
+
const type = stringProp(err, "type");
|
|
7746
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7747
|
+
}
|
|
7748
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7749
|
+
return "permanent";
|
|
7750
|
+
}
|
|
7641
7751
|
/**
|
|
7642
7752
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7643
7753
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7727,6 +7837,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7727
7837
|
*/
|
|
7728
7838
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7729
7839
|
});
|
|
7840
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7841
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7842
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7843
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7844
|
+
var RECORD_CLASSES = [
|
|
7845
|
+
"config",
|
|
7846
|
+
"ledger",
|
|
7847
|
+
"audit",
|
|
7848
|
+
"mirror",
|
|
7849
|
+
"ephemeral"
|
|
7850
|
+
];
|
|
7851
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7852
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7853
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7854
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7855
|
+
function defOf(schema) {
|
|
7856
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7857
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7858
|
+
const def = Reflect.get(zodBag, "def");
|
|
7859
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7860
|
+
return def;
|
|
7861
|
+
}
|
|
7862
|
+
function declaredHere(schema) {
|
|
7863
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7864
|
+
}
|
|
7865
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7866
|
+
var WRAPPERS = new Set([
|
|
7867
|
+
"optional",
|
|
7868
|
+
"nullable",
|
|
7869
|
+
"default",
|
|
7870
|
+
"prefault",
|
|
7871
|
+
"catch",
|
|
7872
|
+
"readonly",
|
|
7873
|
+
"nonoptional"
|
|
7874
|
+
]);
|
|
7875
|
+
/**
|
|
7876
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7877
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7878
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7879
|
+
* `.transform` on `in`).
|
|
7880
|
+
*/
|
|
7881
|
+
function layersOf(schema) {
|
|
7882
|
+
const out = [];
|
|
7883
|
+
const queue = [schema];
|
|
7884
|
+
while (queue.length > 0) {
|
|
7885
|
+
const s = queue.shift();
|
|
7886
|
+
if (!s || out.includes(s)) continue;
|
|
7887
|
+
out.push(s);
|
|
7888
|
+
const def = defOf(s);
|
|
7889
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7890
|
+
if (def.type === "pipe") {
|
|
7891
|
+
if (def.in) queue.push(def.in);
|
|
7892
|
+
if (def.out) queue.push(def.out);
|
|
7893
|
+
}
|
|
7894
|
+
}
|
|
7895
|
+
return out;
|
|
7896
|
+
}
|
|
7897
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7898
|
+
function isZodSecret(schema) {
|
|
7899
|
+
return layersOf(schema).some(declaredHere);
|
|
7900
|
+
}
|
|
7901
|
+
/**
|
|
7902
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7903
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7904
|
+
* object or array is reported as one path and not descended into — everything
|
|
7905
|
+
* under it is secret.
|
|
7906
|
+
*/
|
|
7907
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7908
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7909
|
+
const paths = [];
|
|
7910
|
+
for (const layer of layersOf(schema)) {
|
|
7911
|
+
const def = defOf(layer);
|
|
7912
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7913
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7914
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7915
|
+
else if (def.type === "intersection") {
|
|
7916
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7917
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7918
|
+
}
|
|
7919
|
+
}
|
|
7920
|
+
return [...new Set(paths)];
|
|
7921
|
+
}
|
|
7922
|
+
/**
|
|
7923
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7924
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7925
|
+
* JSON the engine stores.
|
|
7926
|
+
*
|
|
7927
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7928
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7929
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7930
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7931
|
+
* never a field name (D879).
|
|
7932
|
+
*/
|
|
7933
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7934
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7935
|
+
var RecordIndexSchema = object({
|
|
7936
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7937
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7938
|
+
unique: boolean().optional()
|
|
7939
|
+
}).strict();
|
|
7940
|
+
var RecordRetentionSchema = union([
|
|
7941
|
+
object({
|
|
7942
|
+
ttlMs: number().int().positive(),
|
|
7943
|
+
from: _enum(["at", "write"])
|
|
7944
|
+
}).strict(),
|
|
7945
|
+
object({
|
|
7946
|
+
maxRows: number().int().positive().optional(),
|
|
7947
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7948
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7949
|
+
object({
|
|
7950
|
+
owner: string().min(1),
|
|
7951
|
+
reason: string().min(1)
|
|
7952
|
+
}).strict(),
|
|
7953
|
+
object({ none: string().min(1) }).strict()
|
|
7954
|
+
]);
|
|
7955
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7956
|
+
var EntryDescriptorSchema = object({
|
|
7957
|
+
title: string().min(1),
|
|
7958
|
+
/** The record body field shown as the entry's name. */
|
|
7959
|
+
nameField: string().min(1),
|
|
7960
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7961
|
+
fields: record(string(), unknown())
|
|
7962
|
+
}).strict();
|
|
7963
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7964
|
+
var RecordKindDeclarationSchema = object({
|
|
7965
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7966
|
+
class: _enum(RECORD_CLASSES),
|
|
7967
|
+
writeTrigger: string().min(1),
|
|
7968
|
+
device: _enum([
|
|
7969
|
+
"required",
|
|
7970
|
+
"optional",
|
|
7971
|
+
"none"
|
|
7972
|
+
]).default("none"),
|
|
7973
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7974
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7975
|
+
retention: RecordRetentionSchema,
|
|
7976
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7977
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7978
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7979
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7980
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7981
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7982
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7983
|
+
adoptsFrom: string().min(1).optional(),
|
|
7984
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7985
|
+
transactFamily: string().min(1).optional(),
|
|
7986
|
+
entry: EntryDescriptorSchema.optional()
|
|
7987
|
+
}).strict();
|
|
7988
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7989
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7730
7990
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7731
7991
|
var CamProfileSchema = _enum([
|
|
7732
7992
|
"high",
|
|
@@ -8191,69 +8451,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8191
8451
|
kind: "mutation",
|
|
8192
8452
|
auth: "admin"
|
|
8193
8453
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8194
|
-
function defOf(schema) {
|
|
8195
|
-
return schema._zod?.def ?? {};
|
|
8196
|
-
}
|
|
8197
|
-
function declaredHere(schema) {
|
|
8198
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8199
|
-
}
|
|
8200
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8201
|
-
var WRAPPERS = new Set([
|
|
8202
|
-
"optional",
|
|
8203
|
-
"nullable",
|
|
8204
|
-
"default",
|
|
8205
|
-
"prefault",
|
|
8206
|
-
"catch",
|
|
8207
|
-
"readonly",
|
|
8208
|
-
"nonoptional"
|
|
8209
|
-
]);
|
|
8210
|
-
/**
|
|
8211
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8212
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8213
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8214
|
-
* `.transform` on `in`).
|
|
8215
|
-
*/
|
|
8216
|
-
function layersOf(schema) {
|
|
8217
|
-
const out = [];
|
|
8218
|
-
const queue = [schema];
|
|
8219
|
-
while (queue.length > 0) {
|
|
8220
|
-
const s = queue.shift();
|
|
8221
|
-
if (!s || out.includes(s)) continue;
|
|
8222
|
-
out.push(s);
|
|
8223
|
-
const def = defOf(s);
|
|
8224
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8225
|
-
if (def.type === "pipe") {
|
|
8226
|
-
if (def.in) queue.push(def.in);
|
|
8227
|
-
if (def.out) queue.push(def.out);
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
return out;
|
|
8231
|
-
}
|
|
8232
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8233
|
-
function isZodSecret(schema) {
|
|
8234
|
-
return layersOf(schema).some(declaredHere);
|
|
8235
|
-
}
|
|
8236
|
-
/**
|
|
8237
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8238
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8239
|
-
* object or array is reported as one path and not descended into — everything
|
|
8240
|
-
* under it is secret.
|
|
8241
|
-
*/
|
|
8242
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8243
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8244
|
-
const paths = [];
|
|
8245
|
-
for (const layer of layersOf(schema)) {
|
|
8246
|
-
const def = defOf(layer);
|
|
8247
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8248
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8249
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8250
|
-
else if (def.type === "intersection") {
|
|
8251
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8252
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8253
|
-
}
|
|
8254
|
-
}
|
|
8255
|
-
return [...new Set(paths)];
|
|
8256
|
-
}
|
|
8257
8454
|
object({
|
|
8258
8455
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8259
8456
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8273,7 +8470,7 @@ function userError(code, params, englishFallback) {
|
|
|
8273
8470
|
return new CamstackError(code, params, englishFallback);
|
|
8274
8471
|
}
|
|
8275
8472
|
//#endregion
|
|
8276
|
-
//#region ../types/dist/err-msg
|
|
8473
|
+
//#region ../types/dist/err-msg--2RrYiLO.mjs
|
|
8277
8474
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8278
8475
|
DeviceType["Camera"] = "camera";
|
|
8279
8476
|
DeviceType["Hub"] = "hub";
|
|
@@ -8542,6 +8739,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8542
8739
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8543
8740
|
* real Switch device for UI rendering / export adapters. */
|
|
8544
8741
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8742
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8743
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8744
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8545
8745
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8546
8746
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8547
8747
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8619,7 +8819,7 @@ function errMsg(err) {
|
|
|
8619
8819
|
return String(err);
|
|
8620
8820
|
}
|
|
8621
8821
|
//#endregion
|
|
8622
|
-
//#region ../types/dist/composition-
|
|
8822
|
+
//#region ../types/dist/composition-DOwQB_Ua.mjs
|
|
8623
8823
|
/**
|
|
8624
8824
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8625
8825
|
*
|
|
@@ -11843,11 +12043,10 @@ var ClipModelMetaSchema = object({
|
|
|
11843
12043
|
/**
|
|
11844
12044
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11845
12045
|
* per index: two models share an index only when their vectors are ranked
|
|
11846
|
-
* against each other, which for CLIP means never across families.
|
|
11847
|
-
*
|
|
11848
|
-
* `modelId`); any other model gets its own.
|
|
12046
|
+
* against each other, which for CLIP means never across families. Every
|
|
12047
|
+
* model gets its own.
|
|
11849
12048
|
*/
|
|
11850
|
-
vectorIndex: string().regex(/^object-clip
|
|
12049
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11851
12050
|
/**
|
|
11852
12051
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11853
12052
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -15580,6 +15779,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15580
15779
|
keyField: string()
|
|
15581
15780
|
}).optional()
|
|
15582
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
|
+
});
|
|
15583
15817
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15584
15818
|
* agent is the reason placement is not fixed to the hub. */
|
|
15585
15819
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15806,6 +16040,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15806
16040
|
}), SettingsUpdateResultSchema, {
|
|
15807
16041
|
kind: "mutation",
|
|
15808
16042
|
auth: "admin"
|
|
16043
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16044
|
+
kind: "mutation",
|
|
16045
|
+
auth: "admin"
|
|
15809
16046
|
}), method(object({}), object({ libs: array(object({
|
|
15810
16047
|
filePath: string(),
|
|
15811
16048
|
content: string()
|
|
@@ -16069,6 +16306,347 @@ id: union([string(), number()]) }), {
|
|
|
16069
16306
|
auth: "admin"
|
|
16070
16307
|
});
|
|
16071
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
|
+
/**
|
|
16072
16650
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16073
16651
|
*
|
|
16074
16652
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16609,6 +17187,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16609
17187
|
kind: "mutation",
|
|
16610
17188
|
auth: "admin",
|
|
16611
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"
|
|
16612
17200
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16613
17201
|
deleted: array(string()).readonly(),
|
|
16614
17202
|
kept: array(object({
|
|
@@ -39287,6 +39875,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39287
39875
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39288
39876
|
kind: "mutation",
|
|
39289
39877
|
auth: "admin"
|
|
39878
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
39879
|
+
kind: "mutation",
|
|
39880
|
+
auth: "admin"
|
|
39290
39881
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39291
39882
|
kind: "mutation",
|
|
39292
39883
|
auth: "admin"
|
|
@@ -49796,6 +50387,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49796
50387
|
atMs: number(),
|
|
49797
50388
|
reason: string()
|
|
49798
50389
|
});
|
|
50390
|
+
/**
|
|
50391
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50392
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50393
|
+
* service holds, because only the hub plans) against the states the process
|
|
50394
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50395
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50396
|
+
*
|
|
50397
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50398
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50399
|
+
* planned runner the process service has no entry for.
|
|
50400
|
+
*/
|
|
50401
|
+
var RunnerRefusalSchema = object({
|
|
50402
|
+
runnerId: string(),
|
|
50403
|
+
addonIds: array(string()),
|
|
50404
|
+
reason: string()
|
|
50405
|
+
});
|
|
50406
|
+
var RunnerBootCheckSchema = object({
|
|
50407
|
+
checkedAtMs: number(),
|
|
50408
|
+
/** Runners planned for this node. */
|
|
50409
|
+
expected: number(),
|
|
50410
|
+
/** Planned runners whose process is `running`. */
|
|
50411
|
+
running: number(),
|
|
50412
|
+
failed: array(string()),
|
|
50413
|
+
refused: array(RunnerRefusalSchema),
|
|
50414
|
+
missing: array(string()),
|
|
50415
|
+
/**
|
|
50416
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50417
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50418
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50419
|
+
* Optional for version skew (absent = settled).
|
|
50420
|
+
*/
|
|
50421
|
+
pending: array(string()).optional(),
|
|
50422
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50423
|
+
planKnown: boolean()
|
|
50424
|
+
});
|
|
49799
50425
|
var ServerPackageStatusSchema = object({
|
|
49800
50426
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49801
50427
|
packageName: string(),
|
|
@@ -49858,7 +50484,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49858
50484
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49859
50485
|
* absent wrapper is unknown — never `native`.
|
|
49860
50486
|
*/
|
|
49861
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50487
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50488
|
+
/**
|
|
50489
|
+
* What this node PLANNED to run against what its process service reports
|
|
50490
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50491
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50492
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50493
|
+
*/
|
|
50494
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49862
50495
|
});
|
|
49863
50496
|
var ServerUpdateCheckResultSchema = object({
|
|
49864
50497
|
packageName: string(),
|
|
@@ -49909,6 +50542,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49909
50542
|
"refused",
|
|
49910
50543
|
"failed"
|
|
49911
50544
|
]);
|
|
50545
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50546
|
+
var UpdateBlockerSchema = object({
|
|
50547
|
+
addonId: string(),
|
|
50548
|
+
reason: string(),
|
|
50549
|
+
/** What the operator does about it. */
|
|
50550
|
+
remedy: string()
|
|
50551
|
+
});
|
|
49912
50552
|
var ServerUpdateActionResultSchema = object({
|
|
49913
50553
|
accepted: boolean(),
|
|
49914
50554
|
targetVersion: string().nullable(),
|
|
@@ -49926,14 +50566,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49926
50566
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49927
50567
|
* staging install). Non-null only for `failed`.
|
|
49928
50568
|
*/
|
|
49929
|
-
error: string().nullable().optional()
|
|
50569
|
+
error: string().nullable().optional(),
|
|
50570
|
+
/**
|
|
50571
|
+
* The addons the target version would refuse to start on this node's live
|
|
50572
|
+
* store (D877), present when the pre-flight refused the update
|
|
50573
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50574
|
+
*/
|
|
50575
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49930
50576
|
});
|
|
49931
50577
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49932
50578
|
kind: "mutation",
|
|
49933
50579
|
auth: "admin"
|
|
49934
|
-
}), method(object({
|
|
49935
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49936
|
-
version: string().optional()
|
|
50580
|
+
}), method(object({
|
|
50581
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50582
|
+
version: string().optional(),
|
|
50583
|
+
/**
|
|
50584
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50585
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50586
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50587
|
+
*/
|
|
50588
|
+
acknowledgeRefusals: boolean().optional()
|
|
50589
|
+
}), ServerUpdateActionResultSchema, {
|
|
49937
50590
|
kind: "mutation",
|
|
49938
50591
|
auth: "admin",
|
|
49939
50592
|
timeoutMs: 16 * 6e4
|
|
@@ -52483,7 +53136,9 @@ var ManifestShapeSchema = object({
|
|
|
52483
53136
|
var AddonProcessSchema = object({
|
|
52484
53137
|
pid: number().optional(),
|
|
52485
53138
|
mode: string(),
|
|
52486
|
-
state: string()
|
|
53139
|
+
state: string(),
|
|
53140
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53141
|
+
reason: string().optional()
|
|
52487
53142
|
});
|
|
52488
53143
|
/**
|
|
52489
53144
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -53872,6 +54527,12 @@ var ClimateControlStatusSchema = object({
|
|
|
53872
54527
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53873
54528
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53874
54529
|
swingHorizontal: boolean().nullable(),
|
|
54530
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54531
|
+
minTemp: number().nullable().optional(),
|
|
54532
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54533
|
+
maxTemp: number().nullable().optional(),
|
|
54534
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54535
|
+
tempStep: number().positive().nullable().optional(),
|
|
53875
54536
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53876
54537
|
lastFetchedAt: number()
|
|
53877
54538
|
});
|
|
@@ -56660,7 +57321,19 @@ var TlsStatusSchema = object({
|
|
|
56660
57321
|
sans: array(string()),
|
|
56661
57322
|
caCertPem: string().nullable(),
|
|
56662
57323
|
reissueError: string().nullable(),
|
|
56663
|
-
restartRequired: boolean()
|
|
57324
|
+
restartRequired: boolean(),
|
|
57325
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
57326
|
+
caMissing: boolean(),
|
|
57327
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
57328
|
+
localCaConstrained: boolean().nullable(),
|
|
57329
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
57330
|
+
caReplacedAt: string().nullable(),
|
|
57331
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
57332
|
+
storedUpload: object({
|
|
57333
|
+
leafFingerprintSha256: string(),
|
|
57334
|
+
validTo: string(),
|
|
57335
|
+
hasCa: boolean()
|
|
57336
|
+
}).nullable()
|
|
56664
57337
|
});
|
|
56665
57338
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
56666
57339
|
/**
|
|
@@ -56716,6 +57389,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
56716
57389
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
56717
57390
|
kind: "mutation",
|
|
56718
57391
|
auth: "admin"
|
|
57392
|
+
}), method(_void(), TlsStatusSchema, {
|
|
57393
|
+
kind: "mutation",
|
|
57394
|
+
auth: "admin"
|
|
56719
57395
|
});
|
|
56720
57396
|
var LockControlStatusSchema = object({
|
|
56721
57397
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -63209,7 +63885,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
63209
63885
|
kind: "mutation",
|
|
63210
63886
|
auth: "admin",
|
|
63211
63887
|
access: "delete"
|
|
63212
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
63888
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
63889
|
+
kind: "mutation",
|
|
63890
|
+
auth: "admin",
|
|
63891
|
+
access: "create"
|
|
63892
|
+
}), method(object({
|
|
63213
63893
|
userId: string(),
|
|
63214
63894
|
code: string()
|
|
63215
63895
|
}), object({ valid: boolean() }), {
|
|
@@ -65021,13 +65701,14 @@ var BaseDevice = class {
|
|
|
65021
65701
|
get state() {
|
|
65022
65702
|
if (!this._stateProxyCache) {
|
|
65023
65703
|
const cache = {};
|
|
65024
|
-
const handler = { get: (
|
|
65704
|
+
const handler = { get: (target, key) => {
|
|
65025
65705
|
const k = key;
|
|
65026
|
-
|
|
65706
|
+
const existing = Reflect.get(target, k);
|
|
65707
|
+
if (existing !== void 0) return existing;
|
|
65027
65708
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
65028
65709
|
if (!cap) return void 0;
|
|
65029
65710
|
const proxy = this.sliceProxy(cap);
|
|
65030
|
-
|
|
65711
|
+
Reflect.set(target, k, proxy);
|
|
65031
65712
|
return proxy;
|
|
65032
65713
|
} };
|
|
65033
65714
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -65226,7 +65907,7 @@ var BaseDevice = class {
|
|
|
65226
65907
|
async updateSourceInfo(patch) {
|
|
65227
65908
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
65228
65909
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
65229
|
-
const action = this.ctx.api
|
|
65910
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
65230
65911
|
if (action) try {
|
|
65231
65912
|
await action.mutate({
|
|
65232
65913
|
deviceId: this.id,
|
|
@@ -65261,7 +65942,7 @@ var BaseDevice = class {
|
|
|
65261
65942
|
* device boot on a meta refresh.
|
|
65262
65943
|
*/
|
|
65263
65944
|
async refreshFeatures() {
|
|
65264
|
-
const action = this.ctx.api
|
|
65945
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
65265
65946
|
if (!action) return;
|
|
65266
65947
|
try {
|
|
65267
65948
|
await action.mutate({
|
|
@@ -67335,6 +68016,12 @@ Object.freeze({
|
|
|
67335
68016
|
addonId: null,
|
|
67336
68017
|
access: "view"
|
|
67337
68018
|
},
|
|
68019
|
+
"coreBlocks.migrateRawSecrets": {
|
|
68020
|
+
capName: "core-blocks",
|
|
68021
|
+
capScope: "system",
|
|
68022
|
+
addonId: null,
|
|
68023
|
+
access: "create"
|
|
68024
|
+
},
|
|
67338
68025
|
"coreBlocks.restart": {
|
|
67339
68026
|
capName: "core-blocks",
|
|
67340
68027
|
capScope: "system",
|
|
@@ -69021,6 +69708,12 @@ Object.freeze({
|
|
|
69021
69708
|
addonId: null,
|
|
69022
69709
|
access: "create"
|
|
69023
69710
|
},
|
|
69711
|
+
"keychainAdmin.importSecret": {
|
|
69712
|
+
capName: "keychain-admin",
|
|
69713
|
+
capScope: "system",
|
|
69714
|
+
addonId: null,
|
|
69715
|
+
access: "create"
|
|
69716
|
+
},
|
|
69024
69717
|
"keychainAdmin.listAudit": {
|
|
69025
69718
|
capName: "keychain-admin",
|
|
69026
69719
|
capScope: "system",
|
|
@@ -69189,6 +69882,12 @@ Object.freeze({
|
|
|
69189
69882
|
addonId: null,
|
|
69190
69883
|
access: "view"
|
|
69191
69884
|
},
|
|
69885
|
+
"llm.migrateRawSecrets": {
|
|
69886
|
+
capName: "llm",
|
|
69887
|
+
capScope: "system",
|
|
69888
|
+
addonId: null,
|
|
69889
|
+
access: "create"
|
|
69890
|
+
},
|
|
69192
69891
|
"llm.resolveModelRef": {
|
|
69193
69892
|
capName: "llm",
|
|
69194
69893
|
capScope: "system",
|
|
@@ -69417,6 +70116,12 @@ Object.freeze({
|
|
|
69417
70116
|
addonId: null,
|
|
69418
70117
|
access: "create"
|
|
69419
70118
|
},
|
|
70119
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
70120
|
+
capName: "local-network",
|
|
70121
|
+
capScope: "system",
|
|
70122
|
+
addonId: null,
|
|
70123
|
+
access: "create"
|
|
70124
|
+
},
|
|
69420
70125
|
"lockControl.getStatus": {
|
|
69421
70126
|
capName: "lock-control",
|
|
69422
70127
|
capScope: "device",
|
|
@@ -72069,6 +72774,30 @@ Object.freeze({
|
|
|
72069
72774
|
addonId: null,
|
|
72070
72775
|
access: "create"
|
|
72071
72776
|
},
|
|
72777
|
+
"recordEntries.deleteEntry": {
|
|
72778
|
+
capName: "record-entries",
|
|
72779
|
+
capScope: "system",
|
|
72780
|
+
addonId: null,
|
|
72781
|
+
access: "delete"
|
|
72782
|
+
},
|
|
72783
|
+
"recordEntries.listEntries": {
|
|
72784
|
+
capName: "record-entries",
|
|
72785
|
+
capScope: "system",
|
|
72786
|
+
addonId: null,
|
|
72787
|
+
access: "view"
|
|
72788
|
+
},
|
|
72789
|
+
"recordEntries.listEntryKinds": {
|
|
72790
|
+
capName: "record-entries",
|
|
72791
|
+
capScope: "system",
|
|
72792
|
+
addonId: null,
|
|
72793
|
+
access: "view"
|
|
72794
|
+
},
|
|
72795
|
+
"recordEntries.putEntry": {
|
|
72796
|
+
capName: "record-entries",
|
|
72797
|
+
capScope: "system",
|
|
72798
|
+
addonId: null,
|
|
72799
|
+
access: "create"
|
|
72800
|
+
},
|
|
72072
72801
|
"recording.getAvailability": {
|
|
72073
72802
|
capName: "recording",
|
|
72074
72803
|
capScope: "device",
|
|
@@ -72369,6 +73098,102 @@ Object.freeze({
|
|
|
72369
73098
|
addonId: null,
|
|
72370
73099
|
access: "view"
|
|
72371
73100
|
},
|
|
73101
|
+
"records.aggregate": {
|
|
73102
|
+
capName: "records",
|
|
73103
|
+
capScope: "system",
|
|
73104
|
+
addonId: null,
|
|
73105
|
+
access: "view"
|
|
73106
|
+
},
|
|
73107
|
+
"records.allocateId": {
|
|
73108
|
+
capName: "records",
|
|
73109
|
+
capScope: "system",
|
|
73110
|
+
addonId: null,
|
|
73111
|
+
access: "create"
|
|
73112
|
+
},
|
|
73113
|
+
"records.count": {
|
|
73114
|
+
capName: "records",
|
|
73115
|
+
capScope: "system",
|
|
73116
|
+
addonId: null,
|
|
73117
|
+
access: "view"
|
|
73118
|
+
},
|
|
73119
|
+
"records.declareKinds": {
|
|
73120
|
+
capName: "records",
|
|
73121
|
+
capScope: "system",
|
|
73122
|
+
addonId: null,
|
|
73123
|
+
access: "create"
|
|
73124
|
+
},
|
|
73125
|
+
"records.delete": {
|
|
73126
|
+
capName: "records",
|
|
73127
|
+
capScope: "system",
|
|
73128
|
+
addonId: null,
|
|
73129
|
+
access: "delete"
|
|
73130
|
+
},
|
|
73131
|
+
"records.deleteDevice": {
|
|
73132
|
+
capName: "records",
|
|
73133
|
+
capScope: "system",
|
|
73134
|
+
addonId: null,
|
|
73135
|
+
access: "delete"
|
|
73136
|
+
},
|
|
73137
|
+
"records.deleteMany": {
|
|
73138
|
+
capName: "records",
|
|
73139
|
+
capScope: "system",
|
|
73140
|
+
addonId: null,
|
|
73141
|
+
access: "delete"
|
|
73142
|
+
},
|
|
73143
|
+
"records.deleteWhere": {
|
|
73144
|
+
capName: "records",
|
|
73145
|
+
capScope: "system",
|
|
73146
|
+
addonId: null,
|
|
73147
|
+
access: "delete"
|
|
73148
|
+
},
|
|
73149
|
+
"records.get": {
|
|
73150
|
+
capName: "records",
|
|
73151
|
+
capScope: "system",
|
|
73152
|
+
addonId: null,
|
|
73153
|
+
access: "view"
|
|
73154
|
+
},
|
|
73155
|
+
"records.getMany": {
|
|
73156
|
+
capName: "records",
|
|
73157
|
+
capScope: "system",
|
|
73158
|
+
addonId: null,
|
|
73159
|
+
access: "view"
|
|
73160
|
+
},
|
|
73161
|
+
"records.histogram": {
|
|
73162
|
+
capName: "records",
|
|
73163
|
+
capScope: "system",
|
|
73164
|
+
addonId: null,
|
|
73165
|
+
access: "view"
|
|
73166
|
+
},
|
|
73167
|
+
"records.patch": {
|
|
73168
|
+
capName: "records",
|
|
73169
|
+
capScope: "system",
|
|
73170
|
+
addonId: null,
|
|
73171
|
+
access: "create"
|
|
73172
|
+
},
|
|
73173
|
+
"records.put": {
|
|
73174
|
+
capName: "records",
|
|
73175
|
+
capScope: "system",
|
|
73176
|
+
addonId: null,
|
|
73177
|
+
access: "create"
|
|
73178
|
+
},
|
|
73179
|
+
"records.putMany": {
|
|
73180
|
+
capName: "records",
|
|
73181
|
+
capScope: "system",
|
|
73182
|
+
addonId: null,
|
|
73183
|
+
access: "create"
|
|
73184
|
+
},
|
|
73185
|
+
"records.query": {
|
|
73186
|
+
capName: "records",
|
|
73187
|
+
capScope: "system",
|
|
73188
|
+
addonId: null,
|
|
73189
|
+
access: "view"
|
|
73190
|
+
},
|
|
73191
|
+
"records.secretRefs": {
|
|
73192
|
+
capName: "records",
|
|
73193
|
+
capScope: "system",
|
|
73194
|
+
addonId: null,
|
|
73195
|
+
access: "view"
|
|
73196
|
+
},
|
|
72372
73197
|
"sceneMonitor.captureReference": {
|
|
72373
73198
|
capName: "scene-monitor",
|
|
72374
73199
|
capScope: "device",
|
|
@@ -72801,6 +73626,48 @@ Object.freeze({
|
|
|
72801
73626
|
addonId: null,
|
|
72802
73627
|
access: "create"
|
|
72803
73628
|
},
|
|
73629
|
+
"storageAdmin.adoptRecords": {
|
|
73630
|
+
capName: "storage-admin",
|
|
73631
|
+
capScope: "system",
|
|
73632
|
+
addonId: null,
|
|
73633
|
+
access: "create"
|
|
73634
|
+
},
|
|
73635
|
+
"storageAdmin.dropCollection": {
|
|
73636
|
+
capName: "storage-admin",
|
|
73637
|
+
capScope: "system",
|
|
73638
|
+
addonId: null,
|
|
73639
|
+
access: "delete"
|
|
73640
|
+
},
|
|
73641
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
73642
|
+
capName: "storage-admin",
|
|
73643
|
+
capScope: "system",
|
|
73644
|
+
addonId: null,
|
|
73645
|
+
access: "view"
|
|
73646
|
+
},
|
|
73647
|
+
"storageAdmin.listKinds": {
|
|
73648
|
+
capName: "storage-admin",
|
|
73649
|
+
capScope: "system",
|
|
73650
|
+
addonId: null,
|
|
73651
|
+
access: "view"
|
|
73652
|
+
},
|
|
73653
|
+
"storageAdmin.listTables": {
|
|
73654
|
+
capName: "storage-admin",
|
|
73655
|
+
capScope: "system",
|
|
73656
|
+
addonId: null,
|
|
73657
|
+
access: "view"
|
|
73658
|
+
},
|
|
73659
|
+
"storageAdmin.readLegacyCollection": {
|
|
73660
|
+
capName: "storage-admin",
|
|
73661
|
+
capScope: "system",
|
|
73662
|
+
addonId: null,
|
|
73663
|
+
access: "view"
|
|
73664
|
+
},
|
|
73665
|
+
"storageAdmin.readRecords": {
|
|
73666
|
+
capName: "storage-admin",
|
|
73667
|
+
capScope: "system",
|
|
73668
|
+
addonId: null,
|
|
73669
|
+
access: "view"
|
|
73670
|
+
},
|
|
72804
73671
|
"storageEvictable.evict": {
|
|
72805
73672
|
capName: "storage-evictable",
|
|
72806
73673
|
capScope: "system",
|
|
@@ -73713,6 +74580,12 @@ Object.freeze({
|
|
|
73713
74580
|
addonId: null,
|
|
73714
74581
|
access: "view"
|
|
73715
74582
|
},
|
|
74583
|
+
"userManagement.migrateRawSecrets": {
|
|
74584
|
+
capName: "user-management",
|
|
74585
|
+
capScope: "system",
|
|
74586
|
+
addonId: null,
|
|
74587
|
+
access: "create"
|
|
74588
|
+
},
|
|
73716
74589
|
"userManagement.oauthExchangeCode": {
|
|
73717
74590
|
capName: "user-management",
|
|
73718
74591
|
capScope: "system",
|
|
@@ -76389,6 +77262,37 @@ Object.freeze({
|
|
|
76389
77262
|
form: "single",
|
|
76390
77263
|
optional: false
|
|
76391
77264
|
}],
|
|
77265
|
+
"records.count": [{
|
|
77266
|
+
name: "deviceId",
|
|
77267
|
+
form: "single",
|
|
77268
|
+
optional: true
|
|
77269
|
+
}],
|
|
77270
|
+
"records.deleteDevice": [{
|
|
77271
|
+
name: "deviceId",
|
|
77272
|
+
form: "single",
|
|
77273
|
+
optional: false
|
|
77274
|
+
}],
|
|
77275
|
+
"records.deleteWhere": [{
|
|
77276
|
+
name: "deviceId",
|
|
77277
|
+
form: "single",
|
|
77278
|
+
optional: true
|
|
77279
|
+
}],
|
|
77280
|
+
"records.histogram": [{
|
|
77281
|
+
name: "deviceId",
|
|
77282
|
+
form: "single",
|
|
77283
|
+
optional: true
|
|
77284
|
+
}],
|
|
77285
|
+
"records.putMany": [{
|
|
77286
|
+
name: "records",
|
|
77287
|
+
form: "object-array",
|
|
77288
|
+
optional: false,
|
|
77289
|
+
itemField: "deviceId"
|
|
77290
|
+
}],
|
|
77291
|
+
"records.query": [{
|
|
77292
|
+
name: "deviceId",
|
|
77293
|
+
form: "single",
|
|
77294
|
+
optional: true
|
|
77295
|
+
}],
|
|
76392
77296
|
"sceneMonitor.captureReference": [{
|
|
76393
77297
|
name: "deviceId",
|
|
76394
77298
|
form: "single",
|
|
@@ -76505,6 +77409,17 @@ Object.freeze({
|
|
|
76505
77409
|
form: "single",
|
|
76506
77410
|
optional: false
|
|
76507
77411
|
}],
|
|
77412
|
+
"storageAdmin.adoptRecords": [{
|
|
77413
|
+
name: "records",
|
|
77414
|
+
form: "object-array",
|
|
77415
|
+
optional: false,
|
|
77416
|
+
itemField: "deviceId"
|
|
77417
|
+
}],
|
|
77418
|
+
"storageAdmin.readRecords": [{
|
|
77419
|
+
name: "deviceId",
|
|
77420
|
+
form: "single",
|
|
77421
|
+
optional: true
|
|
77422
|
+
}],
|
|
76508
77423
|
"streamBroker.acquireEgressTranscode": [{
|
|
76509
77424
|
name: "deviceId",
|
|
76510
77425
|
form: "single",
|