@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.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
|
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
11
|
var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../types/dist/event-category-
|
|
13
|
+
//#region ../types/dist/event-category-BvOFi6PY.mjs
|
|
14
14
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
15
15
|
EventCategory["SystemBoot"] = "system.boot";
|
|
16
16
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -74,6 +74,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
74
74
|
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
75
75
|
*/
|
|
76
76
|
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
77
|
+
/**
|
|
78
|
+
* A runner whose addon refused to start with a typed reason (D877) - parked
|
|
79
|
+
* in `refused`, never counted by the crash breaker, retried on operator
|
|
80
|
+
* action. One event per refusal.
|
|
81
|
+
*/
|
|
82
|
+
EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
|
|
83
|
+
/**
|
|
84
|
+
* A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
|
|
85
|
+
* `refused`. In-process telemetry for the boot check (re-evaluate while any
|
|
86
|
+
* runner is still pending) and the alert centre (close a recovered runner).
|
|
87
|
+
*/
|
|
88
|
+
EventCategory["ProcessStateChanged"] = "process.state-changed";
|
|
89
|
+
/**
|
|
90
|
+
* The node's one-shot runner boot check (D877): planned runners against the
|
|
91
|
+
* process service, `degraded` when any is failed, refused or missing. The
|
|
92
|
+
* alert centre turns it into one alert and a direct critical push.
|
|
93
|
+
*/
|
|
94
|
+
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
77
95
|
EventCategory["AddonError"] = "addon.error";
|
|
78
96
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
79
97
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5398,7 +5416,7 @@ var ZodIssueCode = {
|
|
|
5398
5416
|
var ZodFirstPartyTypeKind;
|
|
5399
5417
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5400
5418
|
//#endregion
|
|
5401
|
-
//#region ../types/dist/sleep-
|
|
5419
|
+
//#region ../types/dist/sleep-bZIhUvjd.mjs
|
|
5402
5420
|
/**
|
|
5403
5421
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5404
5422
|
* window to float samples (D455).
|
|
@@ -5515,7 +5533,7 @@ function isKeychainStoredField(field) {
|
|
|
5515
5533
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5516
5534
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5517
5535
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5518
|
-
function isRecord$
|
|
5536
|
+
function isRecord$5(value) {
|
|
5519
5537
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5520
5538
|
}
|
|
5521
5539
|
function makeSecretMarker(ref) {
|
|
@@ -5526,12 +5544,12 @@ function makeSecretMarker(ref) {
|
|
|
5526
5544
|
}
|
|
5527
5545
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5528
5546
|
function isSecretMarker(value) {
|
|
5529
|
-
if (!isRecord$
|
|
5547
|
+
if (!isRecord$5(value)) return false;
|
|
5530
5548
|
const ref = value["$secret"];
|
|
5531
5549
|
return typeof ref === "string" && ref.length > 0;
|
|
5532
5550
|
}
|
|
5533
5551
|
function isSecretClear(value) {
|
|
5534
|
-
return isRecord$
|
|
5552
|
+
return isRecord$5(value) && value["$secretClear"] === true;
|
|
5535
5553
|
}
|
|
5536
5554
|
/**
|
|
5537
5555
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6141,7 +6159,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6141
6159
|
}
|
|
6142
6160
|
};
|
|
6143
6161
|
var KEEP = { kind: "keep" };
|
|
6144
|
-
function isRecord$
|
|
6162
|
+
function isRecord$4(value) {
|
|
6145
6163
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6146
6164
|
}
|
|
6147
6165
|
function defaultMintId() {
|
|
@@ -6154,7 +6172,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6154
6172
|
return out;
|
|
6155
6173
|
}
|
|
6156
6174
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6157
|
-
else if (isRecord$
|
|
6175
|
+
else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6158
6176
|
return out;
|
|
6159
6177
|
}
|
|
6160
6178
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6209,7 +6227,7 @@ function rowId(row, idKey) {
|
|
|
6209
6227
|
return null;
|
|
6210
6228
|
}
|
|
6211
6229
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6212
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6230
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
|
|
6213
6231
|
if (!Array.isArray(incoming)) {
|
|
6214
6232
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6215
6233
|
return {
|
|
@@ -6225,7 +6243,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6225
6243
|
const kept = /* @__PURE__ */ new Set();
|
|
6226
6244
|
const rows = [];
|
|
6227
6245
|
for (const row of incoming) {
|
|
6228
|
-
if (!isRecord$
|
|
6246
|
+
if (!isRecord$4(row)) {
|
|
6229
6247
|
rows.push(row);
|
|
6230
6248
|
continue;
|
|
6231
6249
|
}
|
|
@@ -6250,7 +6268,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6250
6268
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6251
6269
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6252
6270
|
case "object": {
|
|
6253
|
-
if (!isRecord$
|
|
6271
|
+
if (!isRecord$4(incoming)) {
|
|
6254
6272
|
if (incoming === void 0) return KEEP;
|
|
6255
6273
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6256
6274
|
return {
|
|
@@ -6258,7 +6276,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6258
6276
|
value: incoming
|
|
6259
6277
|
};
|
|
6260
6278
|
}
|
|
6261
|
-
const storedObj = isRecord$
|
|
6279
|
+
const storedObj = isRecord$4(stored) ? stored : {};
|
|
6262
6280
|
return {
|
|
6263
6281
|
kind: "value",
|
|
6264
6282
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6381,7 +6399,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6381
6399
|
value: items
|
|
6382
6400
|
};
|
|
6383
6401
|
}
|
|
6384
|
-
if (isRecord$
|
|
6402
|
+
if (isRecord$4(v)) {
|
|
6385
6403
|
const out = {};
|
|
6386
6404
|
for (const [k, child] of Object.entries(v)) {
|
|
6387
6405
|
const s = substitute(child);
|
|
@@ -6413,7 +6431,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6413
6431
|
this.name = "SecretOverwriteRefusedError";
|
|
6414
6432
|
}
|
|
6415
6433
|
};
|
|
6416
|
-
function isRecord(value) {
|
|
6434
|
+
function isRecord$3(value) {
|
|
6417
6435
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6418
6436
|
}
|
|
6419
6437
|
function resolvedValue(pass, marker) {
|
|
@@ -6442,7 +6460,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6442
6460
|
return incoming.map((item, index) => {
|
|
6443
6461
|
const twin = stored[index];
|
|
6444
6462
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6445
|
-
if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
|
|
6463
|
+
if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
|
|
6446
6464
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6447
6465
|
return item;
|
|
6448
6466
|
});
|
|
@@ -6453,7 +6471,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6453
6471
|
const twin = stored[key];
|
|
6454
6472
|
if (isSecretMarker(twin)) {
|
|
6455
6473
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6456
|
-
} else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6474
|
+
} else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6457
6475
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6458
6476
|
}
|
|
6459
6477
|
return out;
|
|
@@ -6461,7 +6479,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6461
6479
|
async function walk(pass, incoming, stored) {
|
|
6462
6480
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6463
6481
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6464
|
-
if (!isRecord(incoming) || !isRecord(stored)) return incoming;
|
|
6482
|
+
if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
|
|
6465
6483
|
const out = { ...incoming };
|
|
6466
6484
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6467
6485
|
return out;
|
|
@@ -6492,7 +6510,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6492
6510
|
function isJsonEqual(a, b) {
|
|
6493
6511
|
if (Object.is(a, b)) return true;
|
|
6494
6512
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6495
|
-
if (isRecord(a) && isRecord(b)) {
|
|
6513
|
+
if (isRecord$3(a) && isRecord$3(b)) {
|
|
6496
6514
|
const keys = Object.keys(a);
|
|
6497
6515
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6498
6516
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6516,7 +6534,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6516
6534
|
}
|
|
6517
6535
|
function nodeFromStored(value, owner) {
|
|
6518
6536
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6519
|
-
if (!isRecord(value)) return null;
|
|
6537
|
+
if (!isRecord$3(value)) return null;
|
|
6520
6538
|
const children = /* @__PURE__ */ new Map();
|
|
6521
6539
|
for (const [key, child] of Object.entries(value)) {
|
|
6522
6540
|
const node = nodeFromStored(child, owner);
|
|
@@ -6649,7 +6667,6 @@ function createHandle(raw, opts) {
|
|
|
6649
6667
|
const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
|
|
6650
6668
|
const readAddonStoreResult = raw.readAddonStoreResult;
|
|
6651
6669
|
const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
|
|
6652
|
-
const readDeviceStoreBatch = raw.readDeviceStoreBatch;
|
|
6653
6670
|
const overrides = {
|
|
6654
6671
|
readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
|
|
6655
6672
|
...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
|
|
@@ -6673,12 +6690,12 @@ function createHandle(raw, opts) {
|
|
|
6673
6690
|
};
|
|
6674
6691
|
} } : {},
|
|
6675
6692
|
readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
|
|
6676
|
-
|
|
6677
|
-
const rows = await readDeviceStoreBatch
|
|
6693
|
+
readDeviceStoreBatch: async (deviceIds) => {
|
|
6694
|
+
const rows = await raw.readDeviceStoreBatch(deviceIds);
|
|
6678
6695
|
const out = /* @__PURE__ */ new Map();
|
|
6679
6696
|
for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
|
|
6680
6697
|
return out;
|
|
6681
|
-
}
|
|
6698
|
+
},
|
|
6682
6699
|
writeAddonStore: async (patch) => {
|
|
6683
6700
|
await writeAddon(patch);
|
|
6684
6701
|
},
|
|
@@ -7305,7 +7322,7 @@ var BaseAddon = class {
|
|
|
7305
7322
|
if (!ctx) return;
|
|
7306
7323
|
const addonId = ctx.id;
|
|
7307
7324
|
setImmediate(() => {
|
|
7308
|
-
ctx.api.addons
|
|
7325
|
+
ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
|
|
7309
7326
|
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7310
7327
|
}).catch((err) => {
|
|
7311
7328
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -7505,7 +7522,7 @@ var BaseAddon = class {
|
|
|
7505
7522
|
return this._addonSecretTree;
|
|
7506
7523
|
}
|
|
7507
7524
|
deviceSecretTree() {
|
|
7508
|
-
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7525
|
+
this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
|
|
7509
7526
|
return this._deviceSecretTree;
|
|
7510
7527
|
}
|
|
7511
7528
|
/**
|
|
@@ -7581,42 +7598,135 @@ var BaseAddon = class {
|
|
|
7581
7598
|
this[timerOf] = timer;
|
|
7582
7599
|
}
|
|
7583
7600
|
/**
|
|
7584
|
-
* Wrap `ctx.settings.readAddonStore()` with a
|
|
7585
|
-
*
|
|
7586
|
-
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
7587
|
-
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
7601
|
+
* Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
|
|
7602
|
+
* settings-store outage doesn't propagate up into `initialize()` and leave the
|
|
7588
7603
|
* addon permanently broken.
|
|
7589
7604
|
*
|
|
7590
|
-
*
|
|
7591
|
-
*
|
|
7592
|
-
* `
|
|
7605
|
+
* Two kinds of outage, two budgets:
|
|
7606
|
+
* - the store's own restart fingerprints (`SqliteSettingsBackend not
|
|
7607
|
+
* initialized`, `provider not available`): a short budget, then the addon
|
|
7608
|
+
* falls back to `{}` (defaults) - its first successful patch rehydrates;
|
|
7609
|
+
* - a TRANSPORT failure (the hub is restarting while this runner boots:
|
|
7610
|
+
* `discovery deadline exceeded`, `parent could not route`, a refused or
|
|
7611
|
+
* timed-out connection). Since D870 a runner's settings read THROWS instead
|
|
7612
|
+
* of answering `{}`, so without a budget a hub restart ends in a respawn
|
|
7613
|
+
* loop. A long, bounded budget; only after it the error propagates - the
|
|
7614
|
+
* addon never runs on defaults for a store it could not ask.
|
|
7615
|
+
* Anything else propagates immediately so real bugs surface.
|
|
7593
7616
|
*/
|
|
7594
7617
|
async readAddonStoreWithRetry() {
|
|
7595
7618
|
const settings = this.rawSettings();
|
|
7596
7619
|
if (!settings) return {};
|
|
7597
|
-
const delaysMs = [
|
|
7598
|
-
150,
|
|
7599
|
-
350,
|
|
7600
|
-
600,
|
|
7601
|
-
900
|
|
7602
|
-
];
|
|
7603
7620
|
let lastErr;
|
|
7604
|
-
for (let attempt = 0
|
|
7621
|
+
for (let attempt = 0;; attempt++) try {
|
|
7605
7622
|
const stored = await settings.readAddonStore() ?? {};
|
|
7606
7623
|
this.settingsStoreReady = true;
|
|
7607
7624
|
return stored;
|
|
7608
7625
|
} catch (err) {
|
|
7609
7626
|
lastErr = err;
|
|
7610
|
-
const
|
|
7611
|
-
if (
|
|
7612
|
-
|
|
7613
|
-
|
|
7627
|
+
const kind = classifyStoreError(err);
|
|
7628
|
+
if (kind === "permanent") throw err;
|
|
7629
|
+
const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
|
|
7630
|
+
if (delay === void 0) {
|
|
7631
|
+
if (kind === "transport") throw err;
|
|
7632
|
+
break;
|
|
7633
|
+
}
|
|
7634
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
7614
7635
|
}
|
|
7615
7636
|
this.settingsStoreReady = false;
|
|
7616
7637
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
7617
7638
|
return {};
|
|
7618
7639
|
}
|
|
7619
7640
|
};
|
|
7641
|
+
/** The settings store's own restart fingerprints. */
|
|
7642
|
+
var RESTART_RETRY_DELAYS_MS = [
|
|
7643
|
+
150,
|
|
7644
|
+
350,
|
|
7645
|
+
600,
|
|
7646
|
+
900
|
|
7647
|
+
];
|
|
7648
|
+
/** A hub restarting under a booting runner: ~100 s in total. */
|
|
7649
|
+
var TRANSPORT_RETRY_DELAYS_MS = [
|
|
7650
|
+
150,
|
|
7651
|
+
350,
|
|
7652
|
+
600,
|
|
7653
|
+
900,
|
|
7654
|
+
2e3,
|
|
7655
|
+
5e3,
|
|
7656
|
+
1e4,
|
|
7657
|
+
2e4,
|
|
7658
|
+
3e4,
|
|
7659
|
+
3e4
|
|
7660
|
+
];
|
|
7661
|
+
var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
|
|
7662
|
+
/** Node / socket error codes of a connection that did not happen or broke. */
|
|
7663
|
+
var TRANSPORT_CODES = new Set([
|
|
7664
|
+
"ECONNREFUSED",
|
|
7665
|
+
"ECONNRESET",
|
|
7666
|
+
"ETIMEDOUT",
|
|
7667
|
+
"EPIPE",
|
|
7668
|
+
"EHOSTUNREACH",
|
|
7669
|
+
"ENETUNREACH"
|
|
7670
|
+
]);
|
|
7671
|
+
/** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
|
|
7672
|
+
var UNAVAILABLE_TRPC_CODES = new Set([
|
|
7673
|
+
"TIMEOUT",
|
|
7674
|
+
"SERVICE_UNAVAILABLE",
|
|
7675
|
+
"BAD_GATEWAY",
|
|
7676
|
+
"GATEWAY_TIMEOUT"
|
|
7677
|
+
]);
|
|
7678
|
+
/** The exact phrases OUR transport raises when it cannot reach the hub. */
|
|
7679
|
+
var TRANSPORT_PHRASES = [
|
|
7680
|
+
"discovery deadline exceeded",
|
|
7681
|
+
"parent could not route child unowned cap call",
|
|
7682
|
+
"UDS request timed out after",
|
|
7683
|
+
"channel closed"
|
|
7684
|
+
];
|
|
7685
|
+
/** Moleculer error `type`s of a call that could not be served right now. */
|
|
7686
|
+
var MOLECULER_TRANSIENT_TYPES = new Set([
|
|
7687
|
+
"REQUEST_TIMEOUT",
|
|
7688
|
+
"SERVICE_NOT_FOUND",
|
|
7689
|
+
"SERVICE_NOT_AVAILABLE",
|
|
7690
|
+
"REQUEST_REJECTED",
|
|
7691
|
+
"BROKER_DISCONNECTED"
|
|
7692
|
+
]);
|
|
7693
|
+
function stringProp(value, key) {
|
|
7694
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
7695
|
+
const found = Reflect.get(value, key);
|
|
7696
|
+
return typeof found === "string" ? found : void 0;
|
|
7697
|
+
}
|
|
7698
|
+
/** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
|
|
7699
|
+
function errorCode(err) {
|
|
7700
|
+
const out = {};
|
|
7701
|
+
const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
|
|
7702
|
+
const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
|
|
7703
|
+
const node = stringProp(err, "code") ?? stringProp(cause, "code");
|
|
7704
|
+
if (node !== void 0) out.node = node;
|
|
7705
|
+
const trpc = stringProp(data, "code");
|
|
7706
|
+
if (trpc !== void 0) out.trpc = trpc;
|
|
7707
|
+
return out;
|
|
7708
|
+
}
|
|
7709
|
+
/**
|
|
7710
|
+
* Is a settings read failure worth retrying, and with which budget? Only
|
|
7711
|
+
* EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
|
|
7712
|
+
* one of the exact phrases our own transport raises. A message that merely
|
|
7713
|
+
* contains "timed out" or "unreachable" is not evidence of anything, and
|
|
7714
|
+
* `settings store not wired` is a wiring bug that retrying cannot fix.
|
|
7715
|
+
*/
|
|
7716
|
+
function classifyStoreError(err) {
|
|
7717
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7718
|
+
if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
|
|
7719
|
+
const code = errorCode(err);
|
|
7720
|
+
if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
|
|
7721
|
+
if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
|
|
7722
|
+
if (typeof err === "object" && err !== null) {
|
|
7723
|
+
if (Reflect.get(err, "retryable") === true) return "transport";
|
|
7724
|
+
const type = stringProp(err, "type");
|
|
7725
|
+
if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
|
|
7726
|
+
}
|
|
7727
|
+
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
7728
|
+
return "permanent";
|
|
7729
|
+
}
|
|
7620
7730
|
/**
|
|
7621
7731
|
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
7622
7732
|
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
@@ -7706,6 +7816,156 @@ var PeerBytesTicketSchema = object({
|
|
|
7706
7816
|
*/
|
|
7707
7817
|
declaredBytes: number().int().nonnegative().nullable()
|
|
7708
7818
|
});
|
|
7819
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
7820
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
7821
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
7822
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
7823
|
+
var RECORD_CLASSES = [
|
|
7824
|
+
"config",
|
|
7825
|
+
"ledger",
|
|
7826
|
+
"audit",
|
|
7827
|
+
"mirror",
|
|
7828
|
+
"ephemeral"
|
|
7829
|
+
];
|
|
7830
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
7831
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
7832
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
7833
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
7834
|
+
function defOf(schema) {
|
|
7835
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
7836
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
7837
|
+
const def = Reflect.get(zodBag, "def");
|
|
7838
|
+
if (typeof def !== "object" || def === null) return {};
|
|
7839
|
+
return def;
|
|
7840
|
+
}
|
|
7841
|
+
function declaredHere(schema) {
|
|
7842
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7843
|
+
}
|
|
7844
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7845
|
+
var WRAPPERS = new Set([
|
|
7846
|
+
"optional",
|
|
7847
|
+
"nullable",
|
|
7848
|
+
"default",
|
|
7849
|
+
"prefault",
|
|
7850
|
+
"catch",
|
|
7851
|
+
"readonly",
|
|
7852
|
+
"nonoptional"
|
|
7853
|
+
]);
|
|
7854
|
+
/**
|
|
7855
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7856
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7857
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7858
|
+
* `.transform` on `in`).
|
|
7859
|
+
*/
|
|
7860
|
+
function layersOf(schema) {
|
|
7861
|
+
const out = [];
|
|
7862
|
+
const queue = [schema];
|
|
7863
|
+
while (queue.length > 0) {
|
|
7864
|
+
const s = queue.shift();
|
|
7865
|
+
if (!s || out.includes(s)) continue;
|
|
7866
|
+
out.push(s);
|
|
7867
|
+
const def = defOf(s);
|
|
7868
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7869
|
+
if (def.type === "pipe") {
|
|
7870
|
+
if (def.in) queue.push(def.in);
|
|
7871
|
+
if (def.out) queue.push(def.out);
|
|
7872
|
+
}
|
|
7873
|
+
}
|
|
7874
|
+
return out;
|
|
7875
|
+
}
|
|
7876
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7877
|
+
function isZodSecret(schema) {
|
|
7878
|
+
return layersOf(schema).some(declaredHere);
|
|
7879
|
+
}
|
|
7880
|
+
/**
|
|
7881
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7882
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7883
|
+
* object or array is reported as one path and not descended into — everything
|
|
7884
|
+
* under it is secret.
|
|
7885
|
+
*/
|
|
7886
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7887
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7888
|
+
const paths = [];
|
|
7889
|
+
for (const layer of layersOf(schema)) {
|
|
7890
|
+
const def = defOf(layer);
|
|
7891
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7892
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7893
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7894
|
+
else if (def.type === "intersection") {
|
|
7895
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7896
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7897
|
+
}
|
|
7898
|
+
}
|
|
7899
|
+
return [...new Set(paths)];
|
|
7900
|
+
}
|
|
7901
|
+
/**
|
|
7902
|
+
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
7903
|
+
* Zod row schema that describes it, and the helper that turns the two into the
|
|
7904
|
+
* JSON the engine stores.
|
|
7905
|
+
*
|
|
7906
|
+
* A kind is declared ONCE, next to the code that owns it, and the engine's
|
|
7907
|
+
* reconciler creates its indexes - nothing creates DDL at runtime from a write.
|
|
7908
|
+
* Everything the generic machinery needs (secret fields, the entry descriptor)
|
|
7909
|
+
* is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
|
|
7910
|
+
* never a field name (D879).
|
|
7911
|
+
*/
|
|
7912
|
+
/** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
|
|
7913
|
+
var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
|
|
7914
|
+
var RecordIndexSchema = object({
|
|
7915
|
+
name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
|
|
7916
|
+
fields: array(RecordFieldPathSchema).min(1).max(4),
|
|
7917
|
+
unique: boolean().optional()
|
|
7918
|
+
}).strict();
|
|
7919
|
+
var RecordRetentionSchema = union([
|
|
7920
|
+
object({
|
|
7921
|
+
ttlMs: number().int().positive(),
|
|
7922
|
+
from: _enum(["at", "write"])
|
|
7923
|
+
}).strict(),
|
|
7924
|
+
object({
|
|
7925
|
+
maxRows: number().int().positive().optional(),
|
|
7926
|
+
maxRowsPerDevice: number().int().positive().optional()
|
|
7927
|
+
}).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
|
|
7928
|
+
object({
|
|
7929
|
+
owner: string().min(1),
|
|
7930
|
+
reason: string().min(1)
|
|
7931
|
+
}).strict(),
|
|
7932
|
+
object({ none: string().min(1) }).strict()
|
|
7933
|
+
]);
|
|
7934
|
+
/** The descriptor a generic entries UI reads (D881 "generic entries"). */
|
|
7935
|
+
var EntryDescriptorSchema = object({
|
|
7936
|
+
title: string().min(1),
|
|
7937
|
+
/** The record body field shown as the entry's name. */
|
|
7938
|
+
nameField: string().min(1),
|
|
7939
|
+
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7940
|
+
fields: record(string(), unknown())
|
|
7941
|
+
}).strict();
|
|
7942
|
+
/** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
|
|
7943
|
+
var RecordKindDeclarationSchema = object({
|
|
7944
|
+
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7945
|
+
class: _enum(RECORD_CLASSES),
|
|
7946
|
+
writeTrigger: string().min(1),
|
|
7947
|
+
device: _enum([
|
|
7948
|
+
"required",
|
|
7949
|
+
"optional",
|
|
7950
|
+
"none"
|
|
7951
|
+
]).default("none"),
|
|
7952
|
+
at: _enum(["required", "none"]).default("none"),
|
|
7953
|
+
indexes: array(RecordIndexSchema).max(8).default([]),
|
|
7954
|
+
retention: RecordRetentionSchema,
|
|
7955
|
+
deviceRemoval: _enum(["delete", "none"]).default("none"),
|
|
7956
|
+
maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
|
|
7957
|
+
/** Derived from the Zod schema; never written by hand. */
|
|
7958
|
+
secretPaths: array(string().min(1)).default([]),
|
|
7959
|
+
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7960
|
+
secretArrayKeys: record(string(), string()).default({}),
|
|
7961
|
+
/** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
|
|
7962
|
+
adoptsFrom: string().min(1).optional(),
|
|
7963
|
+
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7964
|
+
transactFamily: string().min(1).optional(),
|
|
7965
|
+
entry: EntryDescriptorSchema.optional()
|
|
7966
|
+
}).strict();
|
|
7967
|
+
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7968
|
+
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7709
7969
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7710
7970
|
var CamProfileSchema = _enum([
|
|
7711
7971
|
"high",
|
|
@@ -8170,69 +8430,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8170
8430
|
kind: "mutation",
|
|
8171
8431
|
auth: "admin"
|
|
8172
8432
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8173
|
-
function defOf(schema) {
|
|
8174
|
-
return schema._zod?.def ?? {};
|
|
8175
|
-
}
|
|
8176
|
-
function declaredHere(schema) {
|
|
8177
|
-
return globalRegistry.get(schema)?.secret === true;
|
|
8178
|
-
}
|
|
8179
|
-
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8180
|
-
var WRAPPERS = new Set([
|
|
8181
|
-
"optional",
|
|
8182
|
-
"nullable",
|
|
8183
|
-
"default",
|
|
8184
|
-
"prefault",
|
|
8185
|
-
"catch",
|
|
8186
|
-
"readonly",
|
|
8187
|
-
"nonoptional"
|
|
8188
|
-
]);
|
|
8189
|
-
/**
|
|
8190
|
-
* The schema layers that make up ONE field: the schema itself and every
|
|
8191
|
-
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8192
|
-
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8193
|
-
* `.transform` on `in`).
|
|
8194
|
-
*/
|
|
8195
|
-
function layersOf(schema) {
|
|
8196
|
-
const out = [];
|
|
8197
|
-
const queue = [schema];
|
|
8198
|
-
while (queue.length > 0) {
|
|
8199
|
-
const s = queue.shift();
|
|
8200
|
-
if (!s || out.includes(s)) continue;
|
|
8201
|
-
out.push(s);
|
|
8202
|
-
const def = defOf(s);
|
|
8203
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8204
|
-
if (def.type === "pipe") {
|
|
8205
|
-
if (def.in) queue.push(def.in);
|
|
8206
|
-
if (def.out) queue.push(def.out);
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
return out;
|
|
8210
|
-
}
|
|
8211
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8212
|
-
function isZodSecret(schema) {
|
|
8213
|
-
return layersOf(schema).some(declaredHere);
|
|
8214
|
-
}
|
|
8215
|
-
/**
|
|
8216
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8217
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8218
|
-
* object or array is reported as one path and not descended into — everything
|
|
8219
|
-
* under it is secret.
|
|
8220
|
-
*/
|
|
8221
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
8222
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8223
|
-
const paths = [];
|
|
8224
|
-
for (const layer of layersOf(schema)) {
|
|
8225
|
-
const def = defOf(layer);
|
|
8226
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8227
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8228
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8229
|
-
else if (def.type === "intersection") {
|
|
8230
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8231
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8232
|
-
}
|
|
8233
|
-
}
|
|
8234
|
-
return [...new Set(paths)];
|
|
8235
|
-
}
|
|
8236
8433
|
object({
|
|
8237
8434
|
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8238
8435
|
params: record(string(), union([string(), number()])).optional()
|
|
@@ -8252,7 +8449,7 @@ function userError(code, params, englishFallback) {
|
|
|
8252
8449
|
return new CamstackError(code, params, englishFallback);
|
|
8253
8450
|
}
|
|
8254
8451
|
//#endregion
|
|
8255
|
-
//#region ../types/dist/err-msg
|
|
8452
|
+
//#region ../types/dist/err-msg--2RrYiLO.mjs
|
|
8256
8453
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8257
8454
|
DeviceType["Camera"] = "camera";
|
|
8258
8455
|
DeviceType["Hub"] = "hub";
|
|
@@ -8521,6 +8718,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8521
8718
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8522
8719
|
* real Switch device for UI rendering / export adapters. */
|
|
8523
8720
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
8721
|
+
/** A smart plug: a `switch` whose source says it is an outlet (HA
|
|
8722
|
+
* `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
|
|
8723
|
+
DeviceRole["Outlet"] = "outlet";
|
|
8524
8724
|
/** Generic motion / occupancy / moving event source. Distinct from
|
|
8525
8725
|
* the camera accessory PirSensor role: that one is a camera child;
|
|
8526
8726
|
* this is a standalone HA / 3rd-party motion sensor. */
|
|
@@ -8598,7 +8798,7 @@ function errMsg(err) {
|
|
|
8598
8798
|
return String(err);
|
|
8599
8799
|
}
|
|
8600
8800
|
//#endregion
|
|
8601
|
-
//#region ../types/dist/composition-
|
|
8801
|
+
//#region ../types/dist/composition-DOwQB_Ua.mjs
|
|
8602
8802
|
/**
|
|
8603
8803
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8604
8804
|
*
|
|
@@ -11822,11 +12022,10 @@ var ClipModelMetaSchema = object({
|
|
|
11822
12022
|
/**
|
|
11823
12023
|
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
11824
12024
|
* per index: two models share an index only when their vectors are ranked
|
|
11825
|
-
* against each other, which for CLIP means never across families.
|
|
11826
|
-
*
|
|
11827
|
-
* `modelId`); any other model gets its own.
|
|
12025
|
+
* against each other, which for CLIP means never across families. Every
|
|
12026
|
+
* model gets its own.
|
|
11828
12027
|
*/
|
|
11829
|
-
vectorIndex: string().regex(/^object-clip
|
|
12028
|
+
vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
|
|
11830
12029
|
/**
|
|
11831
12030
|
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
11832
12031
|
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
@@ -15559,6 +15758,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
|
15559
15758
|
keyField: string()
|
|
15560
15759
|
}).optional()
|
|
15561
15760
|
})) });
|
|
15761
|
+
/**
|
|
15762
|
+
* The report of a one-shot "move this owner's plaintext secrets into the
|
|
15763
|
+
* keychain" run (D878). COUNTS only - never a value, never a ref.
|
|
15764
|
+
*
|
|
15765
|
+
* The owner runs it on its own rows, through its own write path; an operator
|
|
15766
|
+
* script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
|
|
15767
|
+
* Dry run (`apply: false`) reports what WOULD move and changes nothing.
|
|
15768
|
+
*/
|
|
15769
|
+
var RawSecretMigrationInputSchema = object({
|
|
15770
|
+
/** `false` (the default of the script) = report only. */
|
|
15771
|
+
apply: boolean() });
|
|
15772
|
+
var RawSecretMigrationReportSchema = object({
|
|
15773
|
+
apply: boolean(),
|
|
15774
|
+
/** Rows that can carry a secret (a profile, an enrolment). */
|
|
15775
|
+
rows: number().int(),
|
|
15776
|
+
/** Rows whose secret was plaintext when the run started. */
|
|
15777
|
+
raw: number().int(),
|
|
15778
|
+
/** Rows that already held a keychain marker when the run started. */
|
|
15779
|
+
markers: number().int(),
|
|
15780
|
+
/** Plaintext rows moved by THIS run (always 0 on a dry run). */
|
|
15781
|
+
migrated: number().int(),
|
|
15782
|
+
/** Plaintext rows left in place because the move or its read-back failed. */
|
|
15783
|
+
failed: number().int(),
|
|
15784
|
+
/** After the run: rows still holding plaintext. */
|
|
15785
|
+
remainingRaw: number().int(),
|
|
15786
|
+
/** After the run: markers the keychain could not resolve right now. */
|
|
15787
|
+
unresolvedMarkers: number().int(),
|
|
15788
|
+
/**
|
|
15789
|
+
* A second, redundant copy of the secrets' rows that the run found (and, on
|
|
15790
|
+
* `apply`, deleted after verifying the first). Owners with a single copy omit it.
|
|
15791
|
+
*/
|
|
15792
|
+
redundantCopies: number().int().optional(),
|
|
15793
|
+
/** True when nothing is raw and every marker resolves. */
|
|
15794
|
+
verified: boolean()
|
|
15795
|
+
});
|
|
15562
15796
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
15563
15797
|
* agent is the reason placement is not fixed to the hub. */
|
|
15564
15798
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -15785,6 +16019,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
15785
16019
|
}), SettingsUpdateResultSchema, {
|
|
15786
16020
|
kind: "mutation",
|
|
15787
16021
|
auth: "admin"
|
|
16022
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
16023
|
+
kind: "mutation",
|
|
16024
|
+
auth: "admin"
|
|
15788
16025
|
}), method(object({}), object({ libs: array(object({
|
|
15789
16026
|
filePath: string(),
|
|
15790
16027
|
content: string()
|
|
@@ -16048,6 +16285,347 @@ id: union([string(), number()]) }), {
|
|
|
16048
16285
|
auth: "admin"
|
|
16049
16286
|
});
|
|
16050
16287
|
/**
|
|
16288
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
16289
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
16290
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
16291
|
+
*
|
|
16292
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
16293
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
16294
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
16295
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
16296
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
16297
|
+
* addons go through the owner's capability.
|
|
16298
|
+
*
|
|
16299
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
16300
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
16301
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
16302
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
16303
|
+
* row's own ref.
|
|
16304
|
+
*
|
|
16305
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
16306
|
+
*/
|
|
16307
|
+
var RecordIdSchema = string().min(1).max(256);
|
|
16308
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
16309
|
+
var RecordBodySchema = record(string(), unknown());
|
|
16310
|
+
var RecordInputSchema = object({
|
|
16311
|
+
id: RecordIdSchema,
|
|
16312
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
16313
|
+
deviceId: number().int().optional(),
|
|
16314
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
16315
|
+
at: number().int().optional(),
|
|
16316
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
16317
|
+
expiresAt: number().int().optional(),
|
|
16318
|
+
data: RecordBodySchema
|
|
16319
|
+
});
|
|
16320
|
+
var RecordViewSchema = object({
|
|
16321
|
+
id: string(),
|
|
16322
|
+
deviceId: number().int().nullable(),
|
|
16323
|
+
at: number().nullable(),
|
|
16324
|
+
expiresAt: number().nullable(),
|
|
16325
|
+
rev: number().int(),
|
|
16326
|
+
updatedAt: number(),
|
|
16327
|
+
data: RecordBodySchema
|
|
16328
|
+
});
|
|
16329
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
16330
|
+
var RecordWhereSchema = record(RecordFieldPathSchema, union([
|
|
16331
|
+
string(),
|
|
16332
|
+
number(),
|
|
16333
|
+
boolean(),
|
|
16334
|
+
object({ in: array(union([
|
|
16335
|
+
string(),
|
|
16336
|
+
number(),
|
|
16337
|
+
boolean()
|
|
16338
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
16339
|
+
object({
|
|
16340
|
+
gt: union([string(), number()]).optional(),
|
|
16341
|
+
gte: union([string(), number()]).optional(),
|
|
16342
|
+
lt: union([string(), number()]).optional(),
|
|
16343
|
+
lte: union([string(), number()]).optional()
|
|
16344
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
16345
|
+
]));
|
|
16346
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
16347
|
+
var TimeWindowShape = {
|
|
16348
|
+
deviceId: number().int().optional(),
|
|
16349
|
+
atFrom: number().optional(),
|
|
16350
|
+
atTo: number().optional()
|
|
16351
|
+
};
|
|
16352
|
+
var RecordQueryInputSchema = object({
|
|
16353
|
+
...KindShape,
|
|
16354
|
+
...TimeWindowShape,
|
|
16355
|
+
where: RecordWhereSchema.optional(),
|
|
16356
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
16357
|
+
order: _enum(["at", "id"]).optional(),
|
|
16358
|
+
desc: boolean().optional(),
|
|
16359
|
+
limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
16360
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
16361
|
+
cursor: string().min(1).optional()
|
|
16362
|
+
});
|
|
16363
|
+
var RecordQueryResultSchema = object({
|
|
16364
|
+
records: array(RecordViewSchema),
|
|
16365
|
+
nextCursor: string().nullable()
|
|
16366
|
+
});
|
|
16367
|
+
var RecordKindStateSchema = _enum([
|
|
16368
|
+
"created",
|
|
16369
|
+
"unchanged",
|
|
16370
|
+
"updated"
|
|
16371
|
+
]);
|
|
16372
|
+
var DeclareKindResultSchema = object({
|
|
16373
|
+
kindId: number().int(),
|
|
16374
|
+
state: RecordKindStateSchema,
|
|
16375
|
+
createdIndexes: array(string()),
|
|
16376
|
+
/** The boot guard: the kind is empty while its legacy table still holds rows. */
|
|
16377
|
+
adoptionPending: object({
|
|
16378
|
+
legacyTable: string(),
|
|
16379
|
+
legacyRows: number().int()
|
|
16380
|
+
}).nullable()
|
|
16381
|
+
});
|
|
16382
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16383
|
+
var SecretRefsList = array(string());
|
|
16384
|
+
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16385
|
+
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16386
|
+
kind: "mutation",
|
|
16387
|
+
auth: "admin"
|
|
16388
|
+
}), method(object({
|
|
16389
|
+
...KindShape,
|
|
16390
|
+
id: RecordIdSchema
|
|
16391
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
|
|
16392
|
+
...KindShape,
|
|
16393
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16394
|
+
}), array(RecordViewSchema), { auth: "admin" }), method(object({
|
|
16395
|
+
...KindShape,
|
|
16396
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16397
|
+
}), RecordSecretRefsSchema, { auth: "admin" }), method(object({
|
|
16398
|
+
...KindShape,
|
|
16399
|
+
record: RecordInputSchema,
|
|
16400
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
16401
|
+
ifRev: number().int().min(0).optional()
|
|
16402
|
+
}), object({
|
|
16403
|
+
rev: number().int(),
|
|
16404
|
+
releasedRefs: SecretRefsList
|
|
16405
|
+
}), {
|
|
16406
|
+
kind: "mutation",
|
|
16407
|
+
auth: "admin"
|
|
16408
|
+
}), method(object({
|
|
16409
|
+
...KindShape,
|
|
16410
|
+
records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16411
|
+
}), object({
|
|
16412
|
+
count: number().int(),
|
|
16413
|
+
releasedRefs: SecretRefsList
|
|
16414
|
+
}), {
|
|
16415
|
+
kind: "mutation",
|
|
16416
|
+
auth: "admin"
|
|
16417
|
+
}), method(object({
|
|
16418
|
+
...KindShape,
|
|
16419
|
+
id: RecordIdSchema,
|
|
16420
|
+
data: RecordBodySchema,
|
|
16421
|
+
at: number().int().nullable().optional(),
|
|
16422
|
+
expiresAt: number().int().nullable().optional(),
|
|
16423
|
+
ifRev: number().int().min(1).optional()
|
|
16424
|
+
}), object({
|
|
16425
|
+
rev: number().int(),
|
|
16426
|
+
releasedRefs: SecretRefsList
|
|
16427
|
+
}), {
|
|
16428
|
+
kind: "mutation",
|
|
16429
|
+
auth: "admin"
|
|
16430
|
+
}), method(object({
|
|
16431
|
+
...KindShape,
|
|
16432
|
+
id: RecordIdSchema
|
|
16433
|
+
}), object({
|
|
16434
|
+
deleted: boolean(),
|
|
16435
|
+
secretRefs: SecretRefsList
|
|
16436
|
+
}), {
|
|
16437
|
+
kind: "mutation",
|
|
16438
|
+
auth: "admin"
|
|
16439
|
+
}), method(object({
|
|
16440
|
+
...KindShape,
|
|
16441
|
+
ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
16442
|
+
}), object({
|
|
16443
|
+
deleted: number().int(),
|
|
16444
|
+
secretRefs: SecretRefsList
|
|
16445
|
+
}), {
|
|
16446
|
+
kind: "mutation",
|
|
16447
|
+
auth: "admin"
|
|
16448
|
+
}), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16449
|
+
...KindShape,
|
|
16450
|
+
...TimeWindowShape,
|
|
16451
|
+
where: RecordWhereSchema.optional()
|
|
16452
|
+
}), object({ count: number().int() }), { auth: "admin" }), method(object({
|
|
16453
|
+
...KindShape,
|
|
16454
|
+
deviceId: number().int().optional(),
|
|
16455
|
+
from: number(),
|
|
16456
|
+
to: number(),
|
|
16457
|
+
bucketMs: number().int().positive()
|
|
16458
|
+
}), object({ buckets: array(object({
|
|
16459
|
+
bucketStart: number(),
|
|
16460
|
+
count: number().int()
|
|
16461
|
+
})) }), { auth: "admin" }), method(object({
|
|
16462
|
+
...KindShape,
|
|
16463
|
+
op: _enum([
|
|
16464
|
+
"sum",
|
|
16465
|
+
"min",
|
|
16466
|
+
"max",
|
|
16467
|
+
"count"
|
|
16468
|
+
]),
|
|
16469
|
+
field: RecordFieldPathSchema.optional(),
|
|
16470
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
16471
|
+
where: RecordWhereSchema.optional()
|
|
16472
|
+
}), object({ rows: array(object({
|
|
16473
|
+
group: union([
|
|
16474
|
+
string(),
|
|
16475
|
+
number(),
|
|
16476
|
+
_null()
|
|
16477
|
+
]),
|
|
16478
|
+
value: number().nullable()
|
|
16479
|
+
})) }), { auth: "admin" }), method(object({
|
|
16480
|
+
...KindShape,
|
|
16481
|
+
deviceId: number().int().optional(),
|
|
16482
|
+
atBefore: number().optional(),
|
|
16483
|
+
where: RecordWhereSchema.optional()
|
|
16484
|
+
}), object({
|
|
16485
|
+
deleted: number().int(),
|
|
16486
|
+
secretRefs: SecretRefsList
|
|
16487
|
+
}), {
|
|
16488
|
+
kind: "mutation",
|
|
16489
|
+
auth: "admin"
|
|
16490
|
+
}), method(object({
|
|
16491
|
+
deviceId: number().int(),
|
|
16492
|
+
kinds: array(RecordKindNameSchema).optional()
|
|
16493
|
+
}), object({
|
|
16494
|
+
deleted: record(string(), number().int()),
|
|
16495
|
+
secretRefs: SecretRefsList
|
|
16496
|
+
}), {
|
|
16497
|
+
kind: "mutation",
|
|
16498
|
+
auth: "admin"
|
|
16499
|
+
}), method(object(KindShape), object({ id: number().int() }), {
|
|
16500
|
+
kind: "mutation",
|
|
16501
|
+
auth: "admin"
|
|
16502
|
+
});
|
|
16503
|
+
/** One table of the settings database. */
|
|
16504
|
+
var StorageTableSchema = object({
|
|
16505
|
+
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
16506
|
+
name: string(),
|
|
16507
|
+
/** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
|
|
16508
|
+
owner: string().nullable(),
|
|
16509
|
+
rows: number().int().nonnegative(),
|
|
16510
|
+
/** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
|
|
16511
|
+
bytes: number().int().nonnegative().nullable(),
|
|
16512
|
+
/** Declared by an addon since this engine process started (a running addon claims it). */
|
|
16513
|
+
declaredThisBoot: boolean()
|
|
16514
|
+
});
|
|
16515
|
+
/** One declared record kind (D881) as System -> Data shows it. */
|
|
16516
|
+
var StorageKindSchema = object({
|
|
16517
|
+
owner: string(),
|
|
16518
|
+
kind: string(),
|
|
16519
|
+
database: _enum(["settings", "events"]),
|
|
16520
|
+
class: string(),
|
|
16521
|
+
state: _enum([
|
|
16522
|
+
"declared",
|
|
16523
|
+
"orphaned",
|
|
16524
|
+
"dropped"
|
|
16525
|
+
]),
|
|
16526
|
+
/** `null` when the caller asked for no counts (`counts: false`). */
|
|
16527
|
+
rows: number().int().nonnegative().nullable(),
|
|
16528
|
+
/** Rows x the average size of a sample; null for an empty kind. */
|
|
16529
|
+
bytesEstimate: number().int().nonnegative().nullable(),
|
|
16530
|
+
writeTrigger: string(),
|
|
16531
|
+
retention: RecordRetentionSchema,
|
|
16532
|
+
/** `true` when the kind is an entry kind (the generic entries UI lists it). */
|
|
16533
|
+
entry: boolean(),
|
|
16534
|
+
/** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
|
|
16535
|
+
declaration: RecordKindDeclarationSchema
|
|
16536
|
+
});
|
|
16537
|
+
method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
|
|
16538
|
+
collection: string().min(1),
|
|
16539
|
+
expectRows: number().int().nonnegative()
|
|
16540
|
+
}), object({
|
|
16541
|
+
dropped: literal(true),
|
|
16542
|
+
rows: number().int().nonnegative()
|
|
16543
|
+
}), {
|
|
16544
|
+
kind: "mutation",
|
|
16545
|
+
auth: "admin"
|
|
16546
|
+
}), method(object({
|
|
16547
|
+
owner: string().min(1).optional(),
|
|
16548
|
+
/** `false` skips the per-kind row count (a catalog read only). Default true. */
|
|
16549
|
+
counts: boolean().optional()
|
|
16550
|
+
}), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
|
|
16551
|
+
owner: string().min(1),
|
|
16552
|
+
kind: RecordKindNameSchema
|
|
16553
|
+
}), RecordQueryResultSchema, { auth: "admin" }), method(object({
|
|
16554
|
+
owner: string().min(1),
|
|
16555
|
+
kind: RecordKindNameSchema,
|
|
16556
|
+
records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
|
|
16557
|
+
/** The LAST batch: the copy is complete, the boot guard stops asking. */
|
|
16558
|
+
complete: boolean().optional()
|
|
16559
|
+
}).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
|
|
16560
|
+
kind: "mutation",
|
|
16561
|
+
auth: "admin"
|
|
16562
|
+
}), method(object({
|
|
16563
|
+
collection: string().min(1),
|
|
16564
|
+
cursor: string().optional(),
|
|
16565
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
16566
|
+
}), object({
|
|
16567
|
+
rows: array(object({
|
|
16568
|
+
id: string(),
|
|
16569
|
+
data: record(string(), unknown())
|
|
16570
|
+
})),
|
|
16571
|
+
nextCursor: string().nullable()
|
|
16572
|
+
}), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
|
|
16573
|
+
/**
|
|
16574
|
+
* record-entries - the ONE admin surface for every list of user-created entries
|
|
16575
|
+
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
16576
|
+
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
16577
|
+
*
|
|
16578
|
+
* The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
|
|
16579
|
+
* the entry body with `secret: true` on every credential field, so a password
|
|
16580
|
+
* field is derived from the schema and never from a name. `putEntry` takes the
|
|
16581
|
+
* redaction token for an untouched secret (the stored value is kept), a string
|
|
16582
|
+
* for a new one, and the clear instruction to remove one. A read never carries
|
|
16583
|
+
* a secret value, and a locked keychain refuses the write with
|
|
16584
|
+
* `records/secret-unavailable` instead of storing plaintext.
|
|
16585
|
+
*
|
|
16586
|
+
* Hub-only, served in-process (it acts for each entry's owner on the keychain).
|
|
16587
|
+
*/
|
|
16588
|
+
var EntryKindInfoSchema = object({
|
|
16589
|
+
owner: string(),
|
|
16590
|
+
kind: RecordKindNameSchema,
|
|
16591
|
+
title: string(),
|
|
16592
|
+
nameField: string(),
|
|
16593
|
+
/** JSON Schema of the body; `secret: true` marks a password field. */
|
|
16594
|
+
fields: record(string(), unknown()),
|
|
16595
|
+
secretPaths: array(string()),
|
|
16596
|
+
rows: number().int().nonnegative()
|
|
16597
|
+
});
|
|
16598
|
+
var EntryViewSchema = object({
|
|
16599
|
+
id: RecordIdSchema,
|
|
16600
|
+
name: string(),
|
|
16601
|
+
rev: number().int(),
|
|
16602
|
+
updatedAt: number(),
|
|
16603
|
+
/** Secret fields hold the redaction token. */
|
|
16604
|
+
data: RecordBodySchema
|
|
16605
|
+
});
|
|
16606
|
+
var EntryAddress = {
|
|
16607
|
+
owner: string().min(1),
|
|
16608
|
+
kind: RecordKindNameSchema
|
|
16609
|
+
};
|
|
16610
|
+
method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
|
|
16611
|
+
...EntryAddress,
|
|
16612
|
+
id: RecordIdSchema.optional(),
|
|
16613
|
+
data: RecordBodySchema,
|
|
16614
|
+
ifRev: number().int().min(1).optional()
|
|
16615
|
+
}), object({
|
|
16616
|
+
id: string(),
|
|
16617
|
+
rev: number().int()
|
|
16618
|
+
}), {
|
|
16619
|
+
kind: "mutation",
|
|
16620
|
+
auth: "admin"
|
|
16621
|
+
}), method(object({
|
|
16622
|
+
...EntryAddress,
|
|
16623
|
+
id: RecordIdSchema
|
|
16624
|
+
}), object({ deleted: boolean() }), {
|
|
16625
|
+
kind: "mutation",
|
|
16626
|
+
auth: "admin"
|
|
16627
|
+
});
|
|
16628
|
+
/**
|
|
16051
16629
|
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
16052
16630
|
*
|
|
16053
16631
|
* Settings blobs never hold a secret: they hold a marker
|
|
@@ -16588,6 +17166,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
|
|
|
16588
17166
|
kind: "mutation",
|
|
16589
17167
|
auth: "admin",
|
|
16590
17168
|
caller: "required"
|
|
17169
|
+
}), method(object({
|
|
17170
|
+
ref: string().min(1),
|
|
17171
|
+
value: string().min(1)
|
|
17172
|
+
}), object({
|
|
17173
|
+
ref: string(),
|
|
17174
|
+
version: number().int()
|
|
17175
|
+
}), {
|
|
17176
|
+
kind: "mutation",
|
|
17177
|
+
auth: "admin",
|
|
17178
|
+
caller: "required"
|
|
16591
17179
|
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
16592
17180
|
deleted: array(string()).readonly(),
|
|
16593
17181
|
kept: array(object({
|
|
@@ -39266,6 +39854,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
39266
39854
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
39267
39855
|
kind: "mutation",
|
|
39268
39856
|
auth: "admin"
|
|
39857
|
+
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
39858
|
+
kind: "mutation",
|
|
39859
|
+
auth: "admin"
|
|
39269
39860
|
}), method(ProfileRefInputSchema, _void(), {
|
|
39270
39861
|
kind: "mutation",
|
|
39271
39862
|
auth: "admin"
|
|
@@ -49775,6 +50366,41 @@ var ServerRollbackInfoSchema = object({
|
|
|
49775
50366
|
atMs: number(),
|
|
49776
50367
|
reason: string()
|
|
49777
50368
|
});
|
|
50369
|
+
/**
|
|
50370
|
+
* The runner boot check (D877): the runners this node PLANNED (hub: one per
|
|
50371
|
+
* `resolveRunnerId` over its forked addons; agent: the runners its process
|
|
50372
|
+
* service holds, because only the hub plans) against the states the process
|
|
50373
|
+
* service reports. Kept in memory, recomputed by the same one-shot check after
|
|
50374
|
+
* every boot, served on `getServerPackageStatus`.
|
|
50375
|
+
*
|
|
50376
|
+
* `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
|
|
50377
|
+
* refusal (an addon that said "I will not start, and here is why"), `missing` a
|
|
50378
|
+
* planned runner the process service has no entry for.
|
|
50379
|
+
*/
|
|
50380
|
+
var RunnerRefusalSchema = object({
|
|
50381
|
+
runnerId: string(),
|
|
50382
|
+
addonIds: array(string()),
|
|
50383
|
+
reason: string()
|
|
50384
|
+
});
|
|
50385
|
+
var RunnerBootCheckSchema = object({
|
|
50386
|
+
checkedAtMs: number(),
|
|
50387
|
+
/** Runners planned for this node. */
|
|
50388
|
+
expected: number(),
|
|
50389
|
+
/** Planned runners whose process is `running`. */
|
|
50390
|
+
running: number(),
|
|
50391
|
+
failed: array(string()),
|
|
50392
|
+
refused: array(RunnerRefusalSchema),
|
|
50393
|
+
missing: array(string()),
|
|
50394
|
+
/**
|
|
50395
|
+
* Runners still on their way: `starting`, or `crashed` waiting on a backoff
|
|
50396
|
+
* respawn. The check is FINAL only when this is empty; until then nothing is
|
|
50397
|
+
* pushed and the verdict is re-evaluated on the next runner state change.
|
|
50398
|
+
* Optional for version skew (absent = settled).
|
|
50399
|
+
*/
|
|
50400
|
+
pending: array(string()).optional(),
|
|
50401
|
+
/** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
|
|
50402
|
+
planKnown: boolean()
|
|
50403
|
+
});
|
|
49778
50404
|
var ServerPackageStatusSchema = object({
|
|
49779
50405
|
/** Root package name (`@camstack/server` on the hub). */
|
|
49780
50406
|
packageName: string(),
|
|
@@ -49837,7 +50463,14 @@ var ServerPackageStatusSchema = object({
|
|
|
49837
50463
|
* for version skew: an older provider's payload simply omits it, and an
|
|
49838
50464
|
* absent wrapper is unknown — never `native`.
|
|
49839
50465
|
*/
|
|
49840
|
-
wrapper: WrapperIdentitySchema.optional()
|
|
50466
|
+
wrapper: WrapperIdentitySchema.optional(),
|
|
50467
|
+
/**
|
|
50468
|
+
* What this node PLANNED to run against what its process service reports
|
|
50469
|
+
* (D877). Absent until the one-shot boot check has run (~60 s after boot) and
|
|
50470
|
+
* on a provider that predates it. Absent is "not checked yet", never "all
|
|
50471
|
+
* well": a consumer that needs the answer treats it as pending.
|
|
50472
|
+
*/
|
|
50473
|
+
runners: RunnerBootCheckSchema.optional()
|
|
49841
50474
|
});
|
|
49842
50475
|
var ServerUpdateCheckResultSchema = object({
|
|
49843
50476
|
packageName: string(),
|
|
@@ -49888,6 +50521,13 @@ var ServerUpdateOutcomeSchema = _enum([
|
|
|
49888
50521
|
"refused",
|
|
49889
50522
|
"failed"
|
|
49890
50523
|
]);
|
|
50524
|
+
/** One addon the pre-flight found the target version would refuse (D877). */
|
|
50525
|
+
var UpdateBlockerSchema = object({
|
|
50526
|
+
addonId: string(),
|
|
50527
|
+
reason: string(),
|
|
50528
|
+
/** What the operator does about it. */
|
|
50529
|
+
remedy: string()
|
|
50530
|
+
});
|
|
49891
50531
|
var ServerUpdateActionResultSchema = object({
|
|
49892
50532
|
accepted: boolean(),
|
|
49893
50533
|
targetVersion: string().nullable(),
|
|
@@ -49905,14 +50545,27 @@ var ServerUpdateActionResultSchema = object({
|
|
|
49905
50545
|
* The failure itself, verbatim enough to act on (the npm output for a
|
|
49906
50546
|
* staging install). Non-null only for `failed`.
|
|
49907
50547
|
*/
|
|
49908
|
-
error: string().nullable().optional()
|
|
50548
|
+
error: string().nullable().optional(),
|
|
50549
|
+
/**
|
|
50550
|
+
* The addons the target version would refuse to start on this node's live
|
|
50551
|
+
* store (D877), present when the pre-flight refused the update
|
|
50552
|
+
* (`reason: 'addon-would-refuse'`). Optional for version skew.
|
|
50553
|
+
*/
|
|
50554
|
+
blockers: array(UpdateBlockerSchema).optional()
|
|
49909
50555
|
});
|
|
49910
50556
|
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
49911
50557
|
kind: "mutation",
|
|
49912
50558
|
auth: "admin"
|
|
49913
|
-
}), method(object({
|
|
49914
|
-
/** Explicit target version; omitted = latest from the registry. */
|
|
49915
|
-
version: string().optional()
|
|
50559
|
+
}), method(object({
|
|
50560
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
50561
|
+
version: string().optional(),
|
|
50562
|
+
/**
|
|
50563
|
+
* Apply even though the pre-flight (D877) found addons the target would
|
|
50564
|
+
* refuse to start. Off by default: those addons stay down until the
|
|
50565
|
+
* remedy is run, which is the incident this gate exists to prevent.
|
|
50566
|
+
*/
|
|
50567
|
+
acknowledgeRefusals: boolean().optional()
|
|
50568
|
+
}), ServerUpdateActionResultSchema, {
|
|
49916
50569
|
kind: "mutation",
|
|
49917
50570
|
auth: "admin",
|
|
49918
50571
|
timeoutMs: 16 * 6e4
|
|
@@ -52462,7 +53115,9 @@ var ManifestShapeSchema = object({
|
|
|
52462
53115
|
var AddonProcessSchema = object({
|
|
52463
53116
|
pid: number().optional(),
|
|
52464
53117
|
mode: string(),
|
|
52465
|
-
state: string()
|
|
53118
|
+
state: string(),
|
|
53119
|
+
/** Why the runner is `refused` (an addon's own words), when it is (D877). */
|
|
53120
|
+
reason: string().optional()
|
|
52466
53121
|
});
|
|
52467
53122
|
/**
|
|
52468
53123
|
* Per-addon health snapshot from the kernel's AddonHealthMonitor.
|
|
@@ -53851,6 +54506,12 @@ var ClimateControlStatusSchema = object({
|
|
|
53851
54506
|
/** Horizontal louver swing on/off. Null when the device has no
|
|
53852
54507
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
53853
54508
|
swingHorizontal: boolean().nullable(),
|
|
54509
|
+
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54510
|
+
minTemp: number().nullable().optional(),
|
|
54511
|
+
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
54512
|
+
maxTemp: number().nullable().optional(),
|
|
54513
|
+
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
54514
|
+
tempStep: number().positive().nullable().optional(),
|
|
53854
54515
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
53855
54516
|
lastFetchedAt: number()
|
|
53856
54517
|
});
|
|
@@ -56639,7 +57300,19 @@ var TlsStatusSchema = object({
|
|
|
56639
57300
|
sans: array(string()),
|
|
56640
57301
|
caCertPem: string().nullable(),
|
|
56641
57302
|
reissueError: string().nullable(),
|
|
56642
|
-
restartRequired: boolean()
|
|
57303
|
+
restartRequired: boolean(),
|
|
57304
|
+
/** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
|
|
57305
|
+
caMissing: boolean(),
|
|
57306
|
+
/** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
|
|
57307
|
+
localCaConstrained: boolean().nullable(),
|
|
57308
|
+
/** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
|
|
57309
|
+
caReplacedAt: string().nullable(),
|
|
57310
|
+
/** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
|
|
57311
|
+
storedUpload: object({
|
|
57312
|
+
leafFingerprintSha256: string(),
|
|
57313
|
+
validTo: string(),
|
|
57314
|
+
hasCa: boolean()
|
|
57315
|
+
}).nullable()
|
|
56643
57316
|
});
|
|
56644
57317
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
56645
57318
|
/**
|
|
@@ -56695,6 +57368,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
56695
57368
|
}), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
|
|
56696
57369
|
kind: "mutation",
|
|
56697
57370
|
auth: "admin"
|
|
57371
|
+
}), method(_void(), TlsStatusSchema, {
|
|
57372
|
+
kind: "mutation",
|
|
57373
|
+
auth: "admin"
|
|
56698
57374
|
});
|
|
56699
57375
|
var LockControlStatusSchema = object({
|
|
56700
57376
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
@@ -63188,7 +63864,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
63188
63864
|
kind: "mutation",
|
|
63189
63865
|
auth: "admin",
|
|
63190
63866
|
access: "delete"
|
|
63191
|
-
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(
|
|
63867
|
+
}), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
63868
|
+
kind: "mutation",
|
|
63869
|
+
auth: "admin",
|
|
63870
|
+
access: "create"
|
|
63871
|
+
}), method(object({
|
|
63192
63872
|
userId: string(),
|
|
63193
63873
|
code: string()
|
|
63194
63874
|
}), object({ valid: boolean() }), {
|
|
@@ -65000,13 +65680,14 @@ var BaseDevice = class {
|
|
|
65000
65680
|
get state() {
|
|
65001
65681
|
if (!this._stateProxyCache) {
|
|
65002
65682
|
const cache = {};
|
|
65003
|
-
const handler = { get: (
|
|
65683
|
+
const handler = { get: (target, key) => {
|
|
65004
65684
|
const k = key;
|
|
65005
|
-
|
|
65685
|
+
const existing = Reflect.get(target, k);
|
|
65686
|
+
if (existing !== void 0) return existing;
|
|
65006
65687
|
const cap = DEVICE_LOCAL_STATE_CAPS[k];
|
|
65007
65688
|
if (!cap) return void 0;
|
|
65008
65689
|
const proxy = this.sliceProxy(cap);
|
|
65009
|
-
|
|
65690
|
+
Reflect.set(target, k, proxy);
|
|
65010
65691
|
return proxy;
|
|
65011
65692
|
} };
|
|
65012
65693
|
this._stateProxyCache = new Proxy(cache, handler);
|
|
@@ -65205,7 +65886,7 @@ var BaseDevice = class {
|
|
|
65205
65886
|
async updateSourceInfo(patch) {
|
|
65206
65887
|
const next = mergeSourceInfo(this.sourceInfo, patch);
|
|
65207
65888
|
this._sourceInfoCache = Object.freeze({ ...next });
|
|
65208
|
-
const action = this.ctx.api
|
|
65889
|
+
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
65209
65890
|
if (action) try {
|
|
65210
65891
|
await action.mutate({
|
|
65211
65892
|
deviceId: this.id,
|
|
@@ -65240,7 +65921,7 @@ var BaseDevice = class {
|
|
|
65240
65921
|
* device boot on a meta refresh.
|
|
65241
65922
|
*/
|
|
65242
65923
|
async refreshFeatures() {
|
|
65243
|
-
const action = this.ctx.api
|
|
65924
|
+
const action = this.ctx.api.deviceManager?.registerDevice;
|
|
65244
65925
|
if (!action) return;
|
|
65245
65926
|
try {
|
|
65246
65927
|
await action.mutate({
|
|
@@ -67314,6 +67995,12 @@ Object.freeze({
|
|
|
67314
67995
|
addonId: null,
|
|
67315
67996
|
access: "view"
|
|
67316
67997
|
},
|
|
67998
|
+
"coreBlocks.migrateRawSecrets": {
|
|
67999
|
+
capName: "core-blocks",
|
|
68000
|
+
capScope: "system",
|
|
68001
|
+
addonId: null,
|
|
68002
|
+
access: "create"
|
|
68003
|
+
},
|
|
67317
68004
|
"coreBlocks.restart": {
|
|
67318
68005
|
capName: "core-blocks",
|
|
67319
68006
|
capScope: "system",
|
|
@@ -69000,6 +69687,12 @@ Object.freeze({
|
|
|
69000
69687
|
addonId: null,
|
|
69001
69688
|
access: "create"
|
|
69002
69689
|
},
|
|
69690
|
+
"keychainAdmin.importSecret": {
|
|
69691
|
+
capName: "keychain-admin",
|
|
69692
|
+
capScope: "system",
|
|
69693
|
+
addonId: null,
|
|
69694
|
+
access: "create"
|
|
69695
|
+
},
|
|
69003
69696
|
"keychainAdmin.listAudit": {
|
|
69004
69697
|
capName: "keychain-admin",
|
|
69005
69698
|
capScope: "system",
|
|
@@ -69168,6 +69861,12 @@ Object.freeze({
|
|
|
69168
69861
|
addonId: null,
|
|
69169
69862
|
access: "view"
|
|
69170
69863
|
},
|
|
69864
|
+
"llm.migrateRawSecrets": {
|
|
69865
|
+
capName: "llm",
|
|
69866
|
+
capScope: "system",
|
|
69867
|
+
addonId: null,
|
|
69868
|
+
access: "create"
|
|
69869
|
+
},
|
|
69171
69870
|
"llm.resolveModelRef": {
|
|
69172
69871
|
capName: "llm",
|
|
69173
69872
|
capScope: "system",
|
|
@@ -69396,6 +70095,12 @@ Object.freeze({
|
|
|
69396
70095
|
addonId: null,
|
|
69397
70096
|
access: "create"
|
|
69398
70097
|
},
|
|
70098
|
+
"localNetwork.useStoredUploadedCertificate": {
|
|
70099
|
+
capName: "local-network",
|
|
70100
|
+
capScope: "system",
|
|
70101
|
+
addonId: null,
|
|
70102
|
+
access: "create"
|
|
70103
|
+
},
|
|
69399
70104
|
"lockControl.getStatus": {
|
|
69400
70105
|
capName: "lock-control",
|
|
69401
70106
|
capScope: "device",
|
|
@@ -72048,6 +72753,30 @@ Object.freeze({
|
|
|
72048
72753
|
addonId: null,
|
|
72049
72754
|
access: "create"
|
|
72050
72755
|
},
|
|
72756
|
+
"recordEntries.deleteEntry": {
|
|
72757
|
+
capName: "record-entries",
|
|
72758
|
+
capScope: "system",
|
|
72759
|
+
addonId: null,
|
|
72760
|
+
access: "delete"
|
|
72761
|
+
},
|
|
72762
|
+
"recordEntries.listEntries": {
|
|
72763
|
+
capName: "record-entries",
|
|
72764
|
+
capScope: "system",
|
|
72765
|
+
addonId: null,
|
|
72766
|
+
access: "view"
|
|
72767
|
+
},
|
|
72768
|
+
"recordEntries.listEntryKinds": {
|
|
72769
|
+
capName: "record-entries",
|
|
72770
|
+
capScope: "system",
|
|
72771
|
+
addonId: null,
|
|
72772
|
+
access: "view"
|
|
72773
|
+
},
|
|
72774
|
+
"recordEntries.putEntry": {
|
|
72775
|
+
capName: "record-entries",
|
|
72776
|
+
capScope: "system",
|
|
72777
|
+
addonId: null,
|
|
72778
|
+
access: "create"
|
|
72779
|
+
},
|
|
72051
72780
|
"recording.getAvailability": {
|
|
72052
72781
|
capName: "recording",
|
|
72053
72782
|
capScope: "device",
|
|
@@ -72348,6 +73077,102 @@ Object.freeze({
|
|
|
72348
73077
|
addonId: null,
|
|
72349
73078
|
access: "view"
|
|
72350
73079
|
},
|
|
73080
|
+
"records.aggregate": {
|
|
73081
|
+
capName: "records",
|
|
73082
|
+
capScope: "system",
|
|
73083
|
+
addonId: null,
|
|
73084
|
+
access: "view"
|
|
73085
|
+
},
|
|
73086
|
+
"records.allocateId": {
|
|
73087
|
+
capName: "records",
|
|
73088
|
+
capScope: "system",
|
|
73089
|
+
addonId: null,
|
|
73090
|
+
access: "create"
|
|
73091
|
+
},
|
|
73092
|
+
"records.count": {
|
|
73093
|
+
capName: "records",
|
|
73094
|
+
capScope: "system",
|
|
73095
|
+
addonId: null,
|
|
73096
|
+
access: "view"
|
|
73097
|
+
},
|
|
73098
|
+
"records.declareKinds": {
|
|
73099
|
+
capName: "records",
|
|
73100
|
+
capScope: "system",
|
|
73101
|
+
addonId: null,
|
|
73102
|
+
access: "create"
|
|
73103
|
+
},
|
|
73104
|
+
"records.delete": {
|
|
73105
|
+
capName: "records",
|
|
73106
|
+
capScope: "system",
|
|
73107
|
+
addonId: null,
|
|
73108
|
+
access: "delete"
|
|
73109
|
+
},
|
|
73110
|
+
"records.deleteDevice": {
|
|
73111
|
+
capName: "records",
|
|
73112
|
+
capScope: "system",
|
|
73113
|
+
addonId: null,
|
|
73114
|
+
access: "delete"
|
|
73115
|
+
},
|
|
73116
|
+
"records.deleteMany": {
|
|
73117
|
+
capName: "records",
|
|
73118
|
+
capScope: "system",
|
|
73119
|
+
addonId: null,
|
|
73120
|
+
access: "delete"
|
|
73121
|
+
},
|
|
73122
|
+
"records.deleteWhere": {
|
|
73123
|
+
capName: "records",
|
|
73124
|
+
capScope: "system",
|
|
73125
|
+
addonId: null,
|
|
73126
|
+
access: "delete"
|
|
73127
|
+
},
|
|
73128
|
+
"records.get": {
|
|
73129
|
+
capName: "records",
|
|
73130
|
+
capScope: "system",
|
|
73131
|
+
addonId: null,
|
|
73132
|
+
access: "view"
|
|
73133
|
+
},
|
|
73134
|
+
"records.getMany": {
|
|
73135
|
+
capName: "records",
|
|
73136
|
+
capScope: "system",
|
|
73137
|
+
addonId: null,
|
|
73138
|
+
access: "view"
|
|
73139
|
+
},
|
|
73140
|
+
"records.histogram": {
|
|
73141
|
+
capName: "records",
|
|
73142
|
+
capScope: "system",
|
|
73143
|
+
addonId: null,
|
|
73144
|
+
access: "view"
|
|
73145
|
+
},
|
|
73146
|
+
"records.patch": {
|
|
73147
|
+
capName: "records",
|
|
73148
|
+
capScope: "system",
|
|
73149
|
+
addonId: null,
|
|
73150
|
+
access: "create"
|
|
73151
|
+
},
|
|
73152
|
+
"records.put": {
|
|
73153
|
+
capName: "records",
|
|
73154
|
+
capScope: "system",
|
|
73155
|
+
addonId: null,
|
|
73156
|
+
access: "create"
|
|
73157
|
+
},
|
|
73158
|
+
"records.putMany": {
|
|
73159
|
+
capName: "records",
|
|
73160
|
+
capScope: "system",
|
|
73161
|
+
addonId: null,
|
|
73162
|
+
access: "create"
|
|
73163
|
+
},
|
|
73164
|
+
"records.query": {
|
|
73165
|
+
capName: "records",
|
|
73166
|
+
capScope: "system",
|
|
73167
|
+
addonId: null,
|
|
73168
|
+
access: "view"
|
|
73169
|
+
},
|
|
73170
|
+
"records.secretRefs": {
|
|
73171
|
+
capName: "records",
|
|
73172
|
+
capScope: "system",
|
|
73173
|
+
addonId: null,
|
|
73174
|
+
access: "view"
|
|
73175
|
+
},
|
|
72351
73176
|
"sceneMonitor.captureReference": {
|
|
72352
73177
|
capName: "scene-monitor",
|
|
72353
73178
|
capScope: "device",
|
|
@@ -72780,6 +73605,48 @@ Object.freeze({
|
|
|
72780
73605
|
addonId: null,
|
|
72781
73606
|
access: "create"
|
|
72782
73607
|
},
|
|
73608
|
+
"storageAdmin.adoptRecords": {
|
|
73609
|
+
capName: "storage-admin",
|
|
73610
|
+
capScope: "system",
|
|
73611
|
+
addonId: null,
|
|
73612
|
+
access: "create"
|
|
73613
|
+
},
|
|
73614
|
+
"storageAdmin.dropCollection": {
|
|
73615
|
+
capName: "storage-admin",
|
|
73616
|
+
capScope: "system",
|
|
73617
|
+
addonId: null,
|
|
73618
|
+
access: "delete"
|
|
73619
|
+
},
|
|
73620
|
+
"storageAdmin.isAdoptedLegacyTable": {
|
|
73621
|
+
capName: "storage-admin",
|
|
73622
|
+
capScope: "system",
|
|
73623
|
+
addonId: null,
|
|
73624
|
+
access: "view"
|
|
73625
|
+
},
|
|
73626
|
+
"storageAdmin.listKinds": {
|
|
73627
|
+
capName: "storage-admin",
|
|
73628
|
+
capScope: "system",
|
|
73629
|
+
addonId: null,
|
|
73630
|
+
access: "view"
|
|
73631
|
+
},
|
|
73632
|
+
"storageAdmin.listTables": {
|
|
73633
|
+
capName: "storage-admin",
|
|
73634
|
+
capScope: "system",
|
|
73635
|
+
addonId: null,
|
|
73636
|
+
access: "view"
|
|
73637
|
+
},
|
|
73638
|
+
"storageAdmin.readLegacyCollection": {
|
|
73639
|
+
capName: "storage-admin",
|
|
73640
|
+
capScope: "system",
|
|
73641
|
+
addonId: null,
|
|
73642
|
+
access: "view"
|
|
73643
|
+
},
|
|
73644
|
+
"storageAdmin.readRecords": {
|
|
73645
|
+
capName: "storage-admin",
|
|
73646
|
+
capScope: "system",
|
|
73647
|
+
addonId: null,
|
|
73648
|
+
access: "view"
|
|
73649
|
+
},
|
|
72783
73650
|
"storageEvictable.evict": {
|
|
72784
73651
|
capName: "storage-evictable",
|
|
72785
73652
|
capScope: "system",
|
|
@@ -73692,6 +74559,12 @@ Object.freeze({
|
|
|
73692
74559
|
addonId: null,
|
|
73693
74560
|
access: "view"
|
|
73694
74561
|
},
|
|
74562
|
+
"userManagement.migrateRawSecrets": {
|
|
74563
|
+
capName: "user-management",
|
|
74564
|
+
capScope: "system",
|
|
74565
|
+
addonId: null,
|
|
74566
|
+
access: "create"
|
|
74567
|
+
},
|
|
73695
74568
|
"userManagement.oauthExchangeCode": {
|
|
73696
74569
|
capName: "user-management",
|
|
73697
74570
|
capScope: "system",
|
|
@@ -76368,6 +77241,37 @@ Object.freeze({
|
|
|
76368
77241
|
form: "single",
|
|
76369
77242
|
optional: false
|
|
76370
77243
|
}],
|
|
77244
|
+
"records.count": [{
|
|
77245
|
+
name: "deviceId",
|
|
77246
|
+
form: "single",
|
|
77247
|
+
optional: true
|
|
77248
|
+
}],
|
|
77249
|
+
"records.deleteDevice": [{
|
|
77250
|
+
name: "deviceId",
|
|
77251
|
+
form: "single",
|
|
77252
|
+
optional: false
|
|
77253
|
+
}],
|
|
77254
|
+
"records.deleteWhere": [{
|
|
77255
|
+
name: "deviceId",
|
|
77256
|
+
form: "single",
|
|
77257
|
+
optional: true
|
|
77258
|
+
}],
|
|
77259
|
+
"records.histogram": [{
|
|
77260
|
+
name: "deviceId",
|
|
77261
|
+
form: "single",
|
|
77262
|
+
optional: true
|
|
77263
|
+
}],
|
|
77264
|
+
"records.putMany": [{
|
|
77265
|
+
name: "records",
|
|
77266
|
+
form: "object-array",
|
|
77267
|
+
optional: false,
|
|
77268
|
+
itemField: "deviceId"
|
|
77269
|
+
}],
|
|
77270
|
+
"records.query": [{
|
|
77271
|
+
name: "deviceId",
|
|
77272
|
+
form: "single",
|
|
77273
|
+
optional: true
|
|
77274
|
+
}],
|
|
76371
77275
|
"sceneMonitor.captureReference": [{
|
|
76372
77276
|
name: "deviceId",
|
|
76373
77277
|
form: "single",
|
|
@@ -76484,6 +77388,17 @@ Object.freeze({
|
|
|
76484
77388
|
form: "single",
|
|
76485
77389
|
optional: false
|
|
76486
77390
|
}],
|
|
77391
|
+
"storageAdmin.adoptRecords": [{
|
|
77392
|
+
name: "records",
|
|
77393
|
+
form: "object-array",
|
|
77394
|
+
optional: false,
|
|
77395
|
+
itemField: "deviceId"
|
|
77396
|
+
}],
|
|
77397
|
+
"storageAdmin.readRecords": [{
|
|
77398
|
+
name: "deviceId",
|
|
77399
|
+
form: "single",
|
|
77400
|
+
optional: true
|
|
77401
|
+
}],
|
|
76487
77402
|
"streamBroker.acquireEgressTranscode": [{
|
|
76488
77403
|
name: "deviceId",
|
|
76489
77404
|
form: "single",
|