@camstack/addon-provider-tuya 0.2.120 → 0.2.122
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 +2972 -506
- package/dist/addon.mjs +2972 -506
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -819,7 +819,7 @@ async function discoverDevices(options = {}, binder = createDgramBinder()) {
|
|
|
819
819
|
return [...byId.values()];
|
|
820
820
|
}
|
|
821
821
|
//#endregion
|
|
822
|
-
//#region ../types/dist/event-category-
|
|
822
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
823
823
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
824
824
|
EventCategory["SystemBoot"] = "system.boot";
|
|
825
825
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -898,6 +898,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
898
898
|
*/
|
|
899
899
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
900
900
|
/**
|
|
901
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
902
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
903
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
904
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
905
|
+
*/
|
|
906
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
907
|
+
/**
|
|
901
908
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
902
909
|
* transitions from `failed` back to `healthy` (typically via the
|
|
903
910
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -1320,15 +1327,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1320
1327
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
1321
1328
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
1322
1329
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
1323
|
-
/**
|
|
1324
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
1325
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
1326
|
-
* `createSession`, so running sessions keep their current backend until
|
|
1327
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
1328
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
1329
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
1330
|
-
*/
|
|
1331
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
1332
1330
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
1333
1331
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
1334
1332
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -6199,7 +6197,7 @@ var ZodIssueCode = {
|
|
|
6199
6197
|
var ZodFirstPartyTypeKind;
|
|
6200
6198
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6201
6199
|
//#endregion
|
|
6202
|
-
//#region ../types/dist/sleep-
|
|
6200
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
6203
6201
|
/**
|
|
6204
6202
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6205
6203
|
* window to float samples (D455).
|
|
@@ -6278,6 +6276,97 @@ function buildAlawTable() {
|
|
|
6278
6276
|
}
|
|
6279
6277
|
buildUlawTable();
|
|
6280
6278
|
buildAlawTable();
|
|
6279
|
+
/** Is this field's stored value a credential? */
|
|
6280
|
+
function isSecretConfigField(field) {
|
|
6281
|
+
if (field.type === "password") return true;
|
|
6282
|
+
return "secret" in field && field.secret === true;
|
|
6283
|
+
}
|
|
6284
|
+
/**
|
|
6285
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
6286
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
6287
|
+
*/
|
|
6288
|
+
function isKeychainStoredField(field) {
|
|
6289
|
+
if (!isSecretConfigField(field)) return false;
|
|
6290
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
6291
|
+
return !("storage" in field && field.storage === "inline");
|
|
6292
|
+
}
|
|
6293
|
+
/**
|
|
6294
|
+
* What a settings blob holds where a secret used to be.
|
|
6295
|
+
*
|
|
6296
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
6297
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
6298
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
6299
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
6300
|
+
*
|
|
6301
|
+
* The same shapes travel to and from the admin UI:
|
|
6302
|
+
*
|
|
6303
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
6304
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
6305
|
+
* value is set, never the value.
|
|
6306
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
6307
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
6308
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
6309
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
6310
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
6311
|
+
*
|
|
6312
|
+
* Pure and browser-safe.
|
|
6313
|
+
*/
|
|
6314
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
6315
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
6316
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
6317
|
+
function isRecord$1(value) {
|
|
6318
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6319
|
+
}
|
|
6320
|
+
function makeSecretMarker(ref) {
|
|
6321
|
+
return {
|
|
6322
|
+
$secret: ref,
|
|
6323
|
+
v: 1
|
|
6324
|
+
};
|
|
6325
|
+
}
|
|
6326
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
6327
|
+
function isSecretMarker(value) {
|
|
6328
|
+
if (!isRecord$1(value)) return false;
|
|
6329
|
+
const ref = value["$secret"];
|
|
6330
|
+
return typeof ref === "string" && ref.length > 0;
|
|
6331
|
+
}
|
|
6332
|
+
function isSecretClear(value) {
|
|
6333
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
6334
|
+
}
|
|
6335
|
+
/**
|
|
6336
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
6337
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
6338
|
+
* survives this function.
|
|
6339
|
+
*/
|
|
6340
|
+
function toSecretFieldView(stored) {
|
|
6341
|
+
if (isSecretMarker(stored)) return {
|
|
6342
|
+
$secret: stored.$secret,
|
|
6343
|
+
v: 1,
|
|
6344
|
+
set: true
|
|
6345
|
+
};
|
|
6346
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
6347
|
+
$secret: null,
|
|
6348
|
+
v: 1,
|
|
6349
|
+
set: true,
|
|
6350
|
+
inline: true
|
|
6351
|
+
};
|
|
6352
|
+
return null;
|
|
6353
|
+
}
|
|
6354
|
+
/**
|
|
6355
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
6356
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
6357
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
6358
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
6359
|
+
*/
|
|
6360
|
+
function classifySecretWrite(incoming) {
|
|
6361
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
6362
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
6363
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
6364
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
6365
|
+
return {
|
|
6366
|
+
kind: "set",
|
|
6367
|
+
value: incoming
|
|
6368
|
+
};
|
|
6369
|
+
}
|
|
6281
6370
|
Object.fromEntries([
|
|
6282
6371
|
{
|
|
6283
6372
|
id: "overview",
|
|
@@ -6449,33 +6538,19 @@ Object.fromEntries([
|
|
|
6449
6538
|
function isValuelessField(field) {
|
|
6450
6539
|
return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button";
|
|
6451
6540
|
}
|
|
6452
|
-
|
|
6453
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
6454
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
6455
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
6456
|
-
*
|
|
6457
|
-
* For each leaf field:
|
|
6458
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
6459
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
6460
|
-
*
|
|
6461
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
6462
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
6463
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
6464
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
6465
|
-
*/
|
|
6466
|
-
function hydrateSchema(schema, values) {
|
|
6541
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
6467
6542
|
return {
|
|
6468
6543
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
6469
6544
|
sections: schema.sections.map((section) => ({
|
|
6470
6545
|
...section,
|
|
6471
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
6546
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
6472
6547
|
}))
|
|
6473
6548
|
};
|
|
6474
6549
|
}
|
|
6475
|
-
function hydrateField(field, values) {
|
|
6550
|
+
function hydrateField(field, values, options) {
|
|
6476
6551
|
if (isValuelessField(field)) return field;
|
|
6477
6552
|
if (field.type === "group") {
|
|
6478
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
6553
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
6479
6554
|
return {
|
|
6480
6555
|
...field,
|
|
6481
6556
|
fields: hydratedChildren
|
|
@@ -6484,7 +6559,7 @@ function hydrateField(field, values) {
|
|
|
6484
6559
|
if (field.type === "sub-tabs") {
|
|
6485
6560
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
6486
6561
|
...tab,
|
|
6487
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
6562
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
6488
6563
|
}));
|
|
6489
6564
|
return {
|
|
6490
6565
|
...field,
|
|
@@ -6494,6 +6569,33 @@ function hydrateField(field, values) {
|
|
|
6494
6569
|
const key = field.key;
|
|
6495
6570
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
6496
6571
|
const defaultValue = field.default;
|
|
6572
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
6573
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
6574
|
+
...field,
|
|
6575
|
+
value: toSecretFieldView(storedValue)
|
|
6576
|
+
};
|
|
6577
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
6578
|
+
...field,
|
|
6579
|
+
value: null
|
|
6580
|
+
};
|
|
6581
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
6582
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
6583
|
+
if (secretItemKeys.length > 0) {
|
|
6584
|
+
const rows = storedValue.map((row) => {
|
|
6585
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
6586
|
+
const out = { ...row };
|
|
6587
|
+
for (const k of secretItemKeys) {
|
|
6588
|
+
const v = Reflect.get(row, k);
|
|
6589
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
6590
|
+
}
|
|
6591
|
+
return out;
|
|
6592
|
+
});
|
|
6593
|
+
return {
|
|
6594
|
+
...field,
|
|
6595
|
+
value: rows
|
|
6596
|
+
};
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6497
6599
|
if (field.multiple) {
|
|
6498
6600
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
6499
6601
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -6736,6 +6838,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
6736
6838
|
}
|
|
6737
6839
|
return out;
|
|
6738
6840
|
}
|
|
6841
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6842
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6843
|
+
function globalSecretScope() {
|
|
6844
|
+
return GLOBAL_SCOPE;
|
|
6845
|
+
}
|
|
6846
|
+
function encodeSegment(value) {
|
|
6847
|
+
return encodeURIComponent(value);
|
|
6848
|
+
}
|
|
6849
|
+
/**
|
|
6850
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6851
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6852
|
+
* `providers[authentik].clientSecret`.
|
|
6853
|
+
*/
|
|
6854
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6855
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6856
|
+
}
|
|
6857
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6858
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6859
|
+
fieldPath;
|
|
6860
|
+
constructor(fieldPath, cause) {
|
|
6861
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6862
|
+
this.fieldPath = fieldPath;
|
|
6863
|
+
this.name = "KeychainWriteRefusedError";
|
|
6864
|
+
}
|
|
6865
|
+
};
|
|
6866
|
+
var KEEP = { kind: "keep" };
|
|
6867
|
+
function isRecord(value) {
|
|
6868
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6869
|
+
}
|
|
6870
|
+
function defaultMintId() {
|
|
6871
|
+
return globalThis.crypto.randomUUID();
|
|
6872
|
+
}
|
|
6873
|
+
/** Every marker ref anywhere under `value`. */
|
|
6874
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6875
|
+
if (isSecretMarker(value)) {
|
|
6876
|
+
out.push(value.$secret);
|
|
6877
|
+
return out;
|
|
6878
|
+
}
|
|
6879
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6880
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6881
|
+
return out;
|
|
6882
|
+
}
|
|
6883
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6884
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6885
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6886
|
+
}
|
|
6887
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6888
|
+
const intent = classifySecretWrite(incoming);
|
|
6889
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6890
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6891
|
+
if (intent.kind === "keep") return KEEP;
|
|
6892
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6893
|
+
if (intent.kind === "clear") {
|
|
6894
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6895
|
+
return {
|
|
6896
|
+
kind: "value",
|
|
6897
|
+
value: null
|
|
6898
|
+
};
|
|
6899
|
+
}
|
|
6900
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6901
|
+
kind: "value",
|
|
6902
|
+
value: stored
|
|
6903
|
+
};
|
|
6904
|
+
try {
|
|
6905
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6906
|
+
} catch (err) {
|
|
6907
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6908
|
+
}
|
|
6909
|
+
return {
|
|
6910
|
+
kind: "value",
|
|
6911
|
+
value: makeSecretMarker(ref)
|
|
6912
|
+
};
|
|
6913
|
+
}
|
|
6914
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6915
|
+
function applyMember(out, key, result, storedParent) {
|
|
6916
|
+
if (result.kind === "value") {
|
|
6917
|
+
out[key] = result.value;
|
|
6918
|
+
return;
|
|
6919
|
+
}
|
|
6920
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6921
|
+
else delete out[key];
|
|
6922
|
+
}
|
|
6923
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6924
|
+
const out = { ...incoming };
|
|
6925
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6926
|
+
return out;
|
|
6927
|
+
}
|
|
6928
|
+
function rowId(row, idKey) {
|
|
6929
|
+
const raw = row[idKey];
|
|
6930
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6931
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6932
|
+
return null;
|
|
6933
|
+
}
|
|
6934
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6935
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6936
|
+
if (!Array.isArray(incoming)) {
|
|
6937
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6938
|
+
return {
|
|
6939
|
+
kind: "value",
|
|
6940
|
+
value: incoming
|
|
6941
|
+
};
|
|
6942
|
+
}
|
|
6943
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6944
|
+
for (const row of storedRows) {
|
|
6945
|
+
const id = rowId(row, node.idKey);
|
|
6946
|
+
if (id !== null) storedById.set(id, row);
|
|
6947
|
+
}
|
|
6948
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6949
|
+
const rows = [];
|
|
6950
|
+
for (const row of incoming) {
|
|
6951
|
+
if (!isRecord(row)) {
|
|
6952
|
+
rows.push(row);
|
|
6953
|
+
continue;
|
|
6954
|
+
}
|
|
6955
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6956
|
+
kept.add(id);
|
|
6957
|
+
const withId = {
|
|
6958
|
+
...row,
|
|
6959
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6960
|
+
};
|
|
6961
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6962
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6963
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6964
|
+
}
|
|
6965
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6966
|
+
return {
|
|
6967
|
+
kind: "value",
|
|
6968
|
+
value: rows
|
|
6969
|
+
};
|
|
6970
|
+
}
|
|
6971
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6972
|
+
switch (node.kind) {
|
|
6973
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6974
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6975
|
+
case "object": {
|
|
6976
|
+
if (!isRecord(incoming)) {
|
|
6977
|
+
if (incoming === void 0) return KEEP;
|
|
6978
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6979
|
+
return {
|
|
6980
|
+
kind: "value",
|
|
6981
|
+
value: incoming
|
|
6982
|
+
};
|
|
6983
|
+
}
|
|
6984
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6985
|
+
return {
|
|
6986
|
+
kind: "value",
|
|
6987
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6988
|
+
};
|
|
6989
|
+
}
|
|
6990
|
+
}
|
|
6991
|
+
}
|
|
6992
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6993
|
+
function splitNodeKey(key) {
|
|
6994
|
+
const at = key.indexOf("@");
|
|
6995
|
+
return at <= 0 ? {
|
|
6996
|
+
base: key,
|
|
6997
|
+
nodeId: null
|
|
6998
|
+
} : {
|
|
6999
|
+
base: key.slice(0, at),
|
|
7000
|
+
nodeId: key.slice(at + 1)
|
|
7001
|
+
};
|
|
7002
|
+
}
|
|
7003
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
7004
|
+
async function transformSecretWrite(input) {
|
|
7005
|
+
const deletes = [];
|
|
7006
|
+
const base = {
|
|
7007
|
+
secrets: input.secrets,
|
|
7008
|
+
mintId: input.mintId ?? defaultMintId,
|
|
7009
|
+
deletes,
|
|
7010
|
+
operatorWrite: input.operatorWrite === true
|
|
7011
|
+
};
|
|
7012
|
+
const out = {};
|
|
7013
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
7014
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
7015
|
+
const node = input.tree.get(baseKey);
|
|
7016
|
+
if (node === void 0) {
|
|
7017
|
+
out[key] = incoming;
|
|
7018
|
+
continue;
|
|
7019
|
+
}
|
|
7020
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
7021
|
+
kind: "node",
|
|
7022
|
+
nodeId
|
|
7023
|
+
} : input.scope ?? globalSecretScope();
|
|
7024
|
+
const result = await writeNode({
|
|
7025
|
+
...base,
|
|
7026
|
+
scope
|
|
7027
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
7028
|
+
if (result.kind === "value") out[key] = result.value;
|
|
7029
|
+
}
|
|
7030
|
+
return {
|
|
7031
|
+
patch: out,
|
|
7032
|
+
afterWrite: async () => {
|
|
7033
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
7034
|
+
try {
|
|
7035
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
7036
|
+
return { orphaned: [] };
|
|
7037
|
+
} catch {
|
|
7038
|
+
return { orphaned: [...new Set(deletes)] };
|
|
7039
|
+
}
|
|
7040
|
+
}
|
|
7041
|
+
};
|
|
7042
|
+
}
|
|
7043
|
+
/**
|
|
7044
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
7045
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
7046
|
+
*/
|
|
7047
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
7048
|
+
const refs = collectSecretMarkerRefs(value);
|
|
7049
|
+
if (refs.length === 0) return {
|
|
7050
|
+
value,
|
|
7051
|
+
unresolved: []
|
|
7052
|
+
};
|
|
7053
|
+
const answers = await secrets.resolve(refs);
|
|
7054
|
+
const unresolved = [];
|
|
7055
|
+
for (const ref of new Set(refs)) {
|
|
7056
|
+
const answer = answers[ref];
|
|
7057
|
+
if (answer === void 0) unresolved.push({
|
|
7058
|
+
ref,
|
|
7059
|
+
reason: "not-initialized"
|
|
7060
|
+
});
|
|
7061
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
7062
|
+
ref,
|
|
7063
|
+
reason: answer.reason
|
|
7064
|
+
});
|
|
7065
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
7066
|
+
ref,
|
|
7067
|
+
reason: answer.kind
|
|
7068
|
+
});
|
|
7069
|
+
}
|
|
7070
|
+
const substitute = (v) => {
|
|
7071
|
+
if (isSecretMarker(v)) {
|
|
7072
|
+
const answer = answers[v.$secret];
|
|
7073
|
+
return answer?.kind === "value" ? {
|
|
7074
|
+
keep: true,
|
|
7075
|
+
value: answer.value
|
|
7076
|
+
} : {
|
|
7077
|
+
keep: false,
|
|
7078
|
+
value: void 0
|
|
7079
|
+
};
|
|
7080
|
+
}
|
|
7081
|
+
if (Array.isArray(v)) {
|
|
7082
|
+
const items = [];
|
|
7083
|
+
for (const item of v) {
|
|
7084
|
+
const s = substitute(item);
|
|
7085
|
+
if (s.keep) items.push(s.value);
|
|
7086
|
+
}
|
|
7087
|
+
return {
|
|
7088
|
+
keep: true,
|
|
7089
|
+
value: items
|
|
7090
|
+
};
|
|
7091
|
+
}
|
|
7092
|
+
if (isRecord(v)) {
|
|
7093
|
+
const out = {};
|
|
7094
|
+
for (const [k, child] of Object.entries(v)) {
|
|
7095
|
+
const s = substitute(child);
|
|
7096
|
+
if (s.keep) out[k] = s.value;
|
|
7097
|
+
}
|
|
7098
|
+
return {
|
|
7099
|
+
keep: true,
|
|
7100
|
+
value: out
|
|
7101
|
+
};
|
|
7102
|
+
}
|
|
7103
|
+
return {
|
|
7104
|
+
keep: true,
|
|
7105
|
+
value: v
|
|
7106
|
+
};
|
|
7107
|
+
};
|
|
7108
|
+
return {
|
|
7109
|
+
value: substitute(value).value,
|
|
7110
|
+
unresolved
|
|
7111
|
+
};
|
|
7112
|
+
}
|
|
7113
|
+
function touchesTree(tree, patch) {
|
|
7114
|
+
if (tree.size === 0) return false;
|
|
7115
|
+
for (const key of Object.keys(patch)) {
|
|
7116
|
+
const at = key.indexOf("@");
|
|
7117
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
7118
|
+
}
|
|
7119
|
+
return false;
|
|
7120
|
+
}
|
|
7121
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
7122
|
+
async function readStoredAddonBlob(raw) {
|
|
7123
|
+
const threeWay = raw.readAddonStoreResult;
|
|
7124
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
7125
|
+
const result = await threeWay.call(raw);
|
|
7126
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
7127
|
+
return result.kind === "missing" ? {} : result.value;
|
|
7128
|
+
}
|
|
7129
|
+
function createSecretAwareSettings(raw, opts) {
|
|
7130
|
+
const chains = /* @__PURE__ */ new Map();
|
|
7131
|
+
const serialize = (key, fn) => {
|
|
7132
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
7133
|
+
const tail = next.catch(() => void 0);
|
|
7134
|
+
chains.set(key, tail);
|
|
7135
|
+
tail.then(() => {
|
|
7136
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
7137
|
+
});
|
|
7138
|
+
return next;
|
|
7139
|
+
};
|
|
7140
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
7141
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
7142
|
+
return serialize(chainKey, async () => {
|
|
7143
|
+
const stored = await readStored();
|
|
7144
|
+
const result = await transformSecretWrite({
|
|
7145
|
+
tree,
|
|
7146
|
+
secrets: opts.secrets,
|
|
7147
|
+
patch,
|
|
7148
|
+
stored,
|
|
7149
|
+
...scope !== void 0 ? { scope } : {},
|
|
7150
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
7151
|
+
});
|
|
7152
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
7153
|
+
const { orphaned } = await result.afterWrite();
|
|
7154
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
7155
|
+
});
|
|
7156
|
+
};
|
|
7157
|
+
const wrapped = {
|
|
7158
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
7159
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
7160
|
+
kind: "device",
|
|
7161
|
+
deviceId
|
|
7162
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
7163
|
+
};
|
|
7164
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
7165
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
7166
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
7167
|
+
const value = Reflect.get(target, prop, receiver);
|
|
7168
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
7169
|
+
} });
|
|
7170
|
+
}
|
|
7171
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
7172
|
+
function withSecretAwareSettings(context, opts) {
|
|
7173
|
+
const raw = context.settings;
|
|
7174
|
+
if (raw === void 0) return context;
|
|
7175
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
7176
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
7177
|
+
if (prop === "settings") return settings;
|
|
7178
|
+
return Reflect.get(target, prop, receiver);
|
|
7179
|
+
} });
|
|
7180
|
+
}
|
|
7181
|
+
var LEAF = { kind: "leaf" };
|
|
7182
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
7183
|
+
function collectFields(fields, out) {
|
|
7184
|
+
for (const field of fields) {
|
|
7185
|
+
if (field.type === "group") {
|
|
7186
|
+
collectFields(field.fields, out);
|
|
7187
|
+
continue;
|
|
7188
|
+
}
|
|
7189
|
+
if (field.type === "sub-tabs") {
|
|
7190
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
7191
|
+
continue;
|
|
7192
|
+
}
|
|
7193
|
+
if (field.type === "editable-array") {
|
|
7194
|
+
const item = /* @__PURE__ */ new Map();
|
|
7195
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
7196
|
+
if (item.size > 0) out.set(field.key, {
|
|
7197
|
+
kind: "array",
|
|
7198
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
7199
|
+
item
|
|
7200
|
+
});
|
|
7201
|
+
continue;
|
|
7202
|
+
}
|
|
7203
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
7204
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
7205
|
+
}
|
|
7206
|
+
}
|
|
7207
|
+
/** The secret tree a settings schema declares. */
|
|
7208
|
+
function secretTreeFromSchema(schema) {
|
|
7209
|
+
const out = /* @__PURE__ */ new Map();
|
|
7210
|
+
if (schema === null) return out;
|
|
7211
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
7212
|
+
return out;
|
|
7213
|
+
}
|
|
7214
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
7215
|
+
function parseSecretStatePath(path) {
|
|
7216
|
+
const segments = [];
|
|
7217
|
+
for (const raw of path.split(".")) {
|
|
7218
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
7219
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
7220
|
+
segments.push(m[2] !== void 0 ? {
|
|
7221
|
+
key: m[1],
|
|
7222
|
+
idKey: m[2]
|
|
7223
|
+
} : { key: m[1] });
|
|
7224
|
+
}
|
|
7225
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
7226
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
7227
|
+
return segments;
|
|
7228
|
+
}
|
|
7229
|
+
function insert(into, segments) {
|
|
7230
|
+
const [head, ...rest] = segments;
|
|
7231
|
+
if (head === void 0) return;
|
|
7232
|
+
if (rest.length === 0) {
|
|
7233
|
+
into.set(head.key, LEAF);
|
|
7234
|
+
return;
|
|
7235
|
+
}
|
|
7236
|
+
const existing = into.get(head.key);
|
|
7237
|
+
if (head.idKey !== void 0) {
|
|
7238
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
7239
|
+
insert(item, rest);
|
|
7240
|
+
into.set(head.key, {
|
|
7241
|
+
kind: "array",
|
|
7242
|
+
idKey: head.idKey,
|
|
7243
|
+
item
|
|
7244
|
+
});
|
|
7245
|
+
return;
|
|
7246
|
+
}
|
|
7247
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
7248
|
+
insert(children, rest);
|
|
7249
|
+
into.set(head.key, {
|
|
7250
|
+
kind: "object",
|
|
7251
|
+
children
|
|
7252
|
+
});
|
|
7253
|
+
}
|
|
7254
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
7255
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
7256
|
+
if (paths.length === 0) return tree;
|
|
7257
|
+
const out = new Map(tree);
|
|
7258
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
7259
|
+
return out;
|
|
7260
|
+
}
|
|
7261
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
7262
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
7263
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
7264
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
7265
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
6739
7266
|
/**
|
|
6740
7267
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
6741
7268
|
*
|
|
@@ -6805,6 +7332,25 @@ var BaseAddon = class {
|
|
|
6805
7332
|
settingsStoreReady = false;
|
|
6806
7333
|
/** Default config values. Provided via constructor. */
|
|
6807
7334
|
defaults;
|
|
7335
|
+
/**
|
|
7336
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
7337
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
7338
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
7339
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
7340
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
7341
|
+
*/
|
|
7342
|
+
secretStatePaths = [];
|
|
7343
|
+
_addonSecretTree = null;
|
|
7344
|
+
_deviceSecretTree = null;
|
|
7345
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
7346
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
7347
|
+
_unresolvedSecrets = [];
|
|
7348
|
+
_secretRetryTimer = null;
|
|
7349
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7350
|
+
_secretChangeTimer = null;
|
|
7351
|
+
_secretChangeUnsub = null;
|
|
7352
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
7353
|
+
_operatorWriteDepth = 0;
|
|
6808
7354
|
constructor(defaults) {
|
|
6809
7355
|
this.defaults = defaults;
|
|
6810
7356
|
this._config = { ...defaults };
|
|
@@ -6840,8 +7386,18 @@ var BaseAddon = class {
|
|
|
6840
7386
|
return this._config;
|
|
6841
7387
|
}
|
|
6842
7388
|
async initialize(context) {
|
|
6843
|
-
|
|
7389
|
+
const secrets = context.secrets;
|
|
7390
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
7391
|
+
secrets,
|
|
7392
|
+
addonTree: () => this.addonSecretTree(),
|
|
7393
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
7394
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
7395
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
7396
|
+
}) : context;
|
|
6844
7397
|
await this.resolveConfig();
|
|
7398
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
7399
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
7400
|
+
});
|
|
6845
7401
|
const result = await this.onInitialize();
|
|
6846
7402
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6847
7403
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6874,6 +7430,12 @@ var BaseAddon = class {
|
|
|
6874
7430
|
*/
|
|
6875
7431
|
async onHubReachable() {}
|
|
6876
7432
|
async shutdown() {
|
|
7433
|
+
this._secretChangeUnsub?.();
|
|
7434
|
+
this._secretChangeUnsub = null;
|
|
7435
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
7436
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
7437
|
+
this._secretRetryTimer = null;
|
|
7438
|
+
this._secretChangeTimer = null;
|
|
6877
7439
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6878
7440
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6879
7441
|
await this.onShutdown();
|
|
@@ -6952,7 +7514,7 @@ var BaseAddon = class {
|
|
|
6952
7514
|
return hydrateSchema(schema, overlay ? {
|
|
6953
7515
|
...projected,
|
|
6954
7516
|
...overlay
|
|
6955
|
-
} : projected);
|
|
7517
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6956
7518
|
}
|
|
6957
7519
|
/**
|
|
6958
7520
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -7001,7 +7563,7 @@ var BaseAddon = class {
|
|
|
7001
7563
|
return hydrateSchema({
|
|
7002
7564
|
...schema,
|
|
7003
7565
|
sections
|
|
7004
|
-
}, projected);
|
|
7566
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
7005
7567
|
}
|
|
7006
7568
|
/**
|
|
7007
7569
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -7055,18 +7617,50 @@ var BaseAddon = class {
|
|
|
7055
7617
|
value: result.value[key]
|
|
7056
7618
|
};
|
|
7057
7619
|
}
|
|
7620
|
+
/**
|
|
7621
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
7622
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
7623
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
7624
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
7625
|
+
* writing back what it read is not (D787).
|
|
7626
|
+
*/
|
|
7627
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
7628
|
+
this._operatorWriteDepth++;
|
|
7629
|
+
try {
|
|
7630
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7631
|
+
} finally {
|
|
7632
|
+
this._operatorWriteDepth--;
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7058
7635
|
async updateGlobalSettings(patch, nodeId) {
|
|
7636
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7637
|
+
}
|
|
7638
|
+
/**
|
|
7639
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
7640
|
+
*
|
|
7641
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
7642
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
7643
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
7644
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
7645
|
+
*/
|
|
7646
|
+
async clearSecrets(keys, nodeId) {
|
|
7647
|
+
const tree = this.addonSecretTree();
|
|
7648
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
7649
|
+
const patch = {};
|
|
7650
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
7651
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7652
|
+
}
|
|
7653
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
7059
7654
|
const keys = this.perNodeKeys();
|
|
7060
7655
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
7061
7656
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
7062
|
-
const barePatch = patch;
|
|
7063
7657
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
7064
7658
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
7065
7659
|
if (target !== localNode) return;
|
|
7066
7660
|
await this.resolveConfig();
|
|
7067
7661
|
await this.onConfigChanged();
|
|
7068
7662
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
7069
|
-
this.maybeAutoRestart(
|
|
7663
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
7070
7664
|
}
|
|
7071
7665
|
/**
|
|
7072
7666
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -7091,7 +7685,7 @@ var BaseAddon = class {
|
|
|
7091
7685
|
* time to return its response before the addon is torn down and
|
|
7092
7686
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
7093
7687
|
*/
|
|
7094
|
-
maybeAutoRestart(
|
|
7688
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
7095
7689
|
if (!schema) return;
|
|
7096
7690
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
7097
7691
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -7099,13 +7693,13 @@ var BaseAddon = class {
|
|
|
7099
7693
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
7100
7694
|
}
|
|
7101
7695
|
if (restartKeys.size === 0) return;
|
|
7102
|
-
if (!
|
|
7696
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
7103
7697
|
const ctx = this._ctx;
|
|
7104
7698
|
if (!ctx) return;
|
|
7105
7699
|
const addonId = ctx.id;
|
|
7106
7700
|
setImmediate(() => {
|
|
7107
7701
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
7108
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
7702
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
7109
7703
|
}).catch((err) => {
|
|
7110
7704
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7111
7705
|
});
|
|
@@ -7114,7 +7708,7 @@ var BaseAddon = class {
|
|
|
7114
7708
|
async getDeviceSettings(deviceId) {
|
|
7115
7709
|
const schema = this.deviceSettingsSchema();
|
|
7116
7710
|
if (!schema) return { sections: [] };
|
|
7117
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
7711
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
7118
7712
|
}
|
|
7119
7713
|
async updateDeviceSettings(deviceId, patch) {
|
|
7120
7714
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -7244,7 +7838,7 @@ var BaseAddon = class {
|
|
|
7244
7838
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
7245
7839
|
*/
|
|
7246
7840
|
async resolveConfig() {
|
|
7247
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7841
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
7248
7842
|
const perNode = this.perNodeKeys();
|
|
7249
7843
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
7250
7844
|
const resolved = { ...this.defaults };
|
|
@@ -7269,7 +7863,7 @@ var BaseAddon = class {
|
|
|
7269
7863
|
key,
|
|
7270
7864
|
schema,
|
|
7271
7865
|
fallback,
|
|
7272
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7866
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
7273
7867
|
write: async (patch) => {
|
|
7274
7868
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
7275
7869
|
},
|
|
@@ -7286,7 +7880,7 @@ var BaseAddon = class {
|
|
|
7286
7880
|
key,
|
|
7287
7881
|
schema,
|
|
7288
7882
|
fallback,
|
|
7289
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7883
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
7290
7884
|
write: async (patch) => {
|
|
7291
7885
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
7292
7886
|
},
|
|
@@ -7298,6 +7892,70 @@ var BaseAddon = class {
|
|
|
7298
7892
|
} })
|
|
7299
7893
|
});
|
|
7300
7894
|
}
|
|
7895
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7896
|
+
addonSecretTree() {
|
|
7897
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7898
|
+
return this._addonSecretTree;
|
|
7899
|
+
}
|
|
7900
|
+
deviceSecretTree() {
|
|
7901
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7902
|
+
return this._deviceSecretTree;
|
|
7903
|
+
}
|
|
7904
|
+
/**
|
|
7905
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7906
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7907
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7908
|
+
* than start on an empty credential.
|
|
7909
|
+
*/
|
|
7910
|
+
get unresolvedSecrets() {
|
|
7911
|
+
return this._unresolvedSecrets;
|
|
7912
|
+
}
|
|
7913
|
+
/**
|
|
7914
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7915
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7916
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7917
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7918
|
+
* ever written back from here.
|
|
7919
|
+
*/
|
|
7920
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7921
|
+
const secrets = this._ctx?.secrets;
|
|
7922
|
+
if (secrets === void 0) return blob;
|
|
7923
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7924
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7925
|
+
if (refs.length === 0) {
|
|
7926
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7927
|
+
return blob;
|
|
7928
|
+
}
|
|
7929
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7930
|
+
if (trackForConfig) {
|
|
7931
|
+
this._unresolvedSecrets = unresolved;
|
|
7932
|
+
if (unresolved.length > 0) {
|
|
7933
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7934
|
+
ref: u.ref,
|
|
7935
|
+
reason: u.reason
|
|
7936
|
+
})) } });
|
|
7937
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7938
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7939
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7940
|
+
}
|
|
7941
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7942
|
+
}
|
|
7943
|
+
return value;
|
|
7944
|
+
}
|
|
7945
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7946
|
+
scheduleSecretReresolve(delayMs) {
|
|
7947
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7948
|
+
if (this[timerOf] !== null) return;
|
|
7949
|
+
const timer = setTimeout(() => {
|
|
7950
|
+
this[timerOf] = null;
|
|
7951
|
+
if (this._ctx === null) return;
|
|
7952
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7953
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7954
|
+
});
|
|
7955
|
+
}, delayMs);
|
|
7956
|
+
timer.unref?.();
|
|
7957
|
+
this[timerOf] = timer;
|
|
7958
|
+
}
|
|
7301
7959
|
/**
|
|
7302
7960
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
7303
7961
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -7565,32 +8223,12 @@ object({
|
|
|
7565
8223
|
audioCodec: string().optional(),
|
|
7566
8224
|
metadata: record(string(), unknown()).readonly().optional()
|
|
7567
8225
|
});
|
|
7568
|
-
var EncodedPacketSchema = object({
|
|
7569
|
-
type: _enum(["video", "audio"]),
|
|
7570
|
-
data: _instanceof(Uint8Array),
|
|
7571
|
-
pts: number(),
|
|
7572
|
-
dts: number(),
|
|
7573
|
-
keyframe: boolean(),
|
|
7574
|
-
codec: string()
|
|
7575
|
-
});
|
|
7576
|
-
var DecodedFrameSchema = object({
|
|
7577
|
-
data: _instanceof(Uint8Array),
|
|
7578
|
-
width: number(),
|
|
7579
|
-
height: number(),
|
|
7580
|
-
format: _enum([
|
|
7581
|
-
"jpeg",
|
|
7582
|
-
"rgb",
|
|
7583
|
-
"bgr",
|
|
7584
|
-
"yuv420",
|
|
7585
|
-
"gray"
|
|
7586
|
-
]),
|
|
7587
|
-
timestamp: number()
|
|
7588
|
-
});
|
|
7589
8226
|
/**
|
|
7590
8227
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
7591
8228
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
7592
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
7593
|
-
*
|
|
8229
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
8230
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
8231
|
+
* over tRPC / Moleculer.
|
|
7594
8232
|
*
|
|
7595
8233
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
7596
8234
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -7616,50 +8254,6 @@ var FrameHandleSchema = object({
|
|
|
7616
8254
|
slotCount: number().int().positive()
|
|
7617
8255
|
});
|
|
7618
8256
|
/**
|
|
7619
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
7620
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
7621
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
7622
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
7623
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
7624
|
-
*/
|
|
7625
|
-
var FrameHandleFormatSchema = _enum([
|
|
7626
|
-
"rgb",
|
|
7627
|
-
"bgr",
|
|
7628
|
-
"yuv420",
|
|
7629
|
-
"gray"
|
|
7630
|
-
]);
|
|
7631
|
-
/**
|
|
7632
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
7633
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
7634
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
7635
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
7636
|
-
* they asked for with no broker-side conversion.
|
|
7637
|
-
*/
|
|
7638
|
-
var SubscribeFramesInputSchema = object({
|
|
7639
|
-
brokerId: string(),
|
|
7640
|
-
format: FrameHandleFormatSchema,
|
|
7641
|
-
/**
|
|
7642
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
7643
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
7644
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
7645
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
7646
|
-
*/
|
|
7647
|
-
maxFps: number().positive().optional(),
|
|
7648
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
7649
|
-
tag: string().optional()
|
|
7650
|
-
});
|
|
7651
|
-
/**
|
|
7652
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
7653
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
7654
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
7655
|
-
*/
|
|
7656
|
-
var SubscribeFramesResultSchema = object({
|
|
7657
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
7658
|
-
subscriptionId: string(),
|
|
7659
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
7660
|
-
maxFps: number().nonnegative()
|
|
7661
|
-
});
|
|
7662
|
-
/**
|
|
7663
8257
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
7664
8258
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
7665
8259
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -7667,8 +8261,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
7667
8261
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
7668
8262
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
7669
8263
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
7670
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
7671
|
-
*
|
|
8264
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
8265
|
+
* it.
|
|
7672
8266
|
*/
|
|
7673
8267
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
7674
8268
|
var DecodedAudioChunkSchema = object({
|
|
@@ -7686,11 +8280,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
7686
8280
|
format: AudioChunkFormatSchema.optional()
|
|
7687
8281
|
});
|
|
7688
8282
|
/**
|
|
7689
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
7690
|
-
*
|
|
7691
|
-
*
|
|
7692
|
-
*
|
|
7693
|
-
* `pullAudioChunks`.
|
|
8283
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
8284
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
8285
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
8286
|
+
* the consumer drains via `pullAudioChunks`.
|
|
7694
8287
|
*/
|
|
7695
8288
|
var SubscribeAudioChunksInputSchema = object({
|
|
7696
8289
|
brokerId: string(),
|
|
@@ -7721,9 +8314,7 @@ var BrokerStatsSchema = object({
|
|
|
7721
8314
|
"stopped"
|
|
7722
8315
|
]),
|
|
7723
8316
|
inputFps: number(),
|
|
7724
|
-
decodeFps: number(),
|
|
7725
8317
|
encodedSubscribers: number(),
|
|
7726
|
-
decodedSubscribers: number(),
|
|
7727
8318
|
uptimeMs: number(),
|
|
7728
8319
|
bitrateKbps: number(),
|
|
7729
8320
|
idrIntervalMs: number(),
|
|
@@ -7736,14 +8327,6 @@ var BrokerStatsSchema = object({
|
|
|
7736
8327
|
preBufferMs: number(),
|
|
7737
8328
|
preBufferPackets: number(),
|
|
7738
8329
|
/**
|
|
7739
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
7740
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
7741
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
7742
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
7743
|
-
* a separate cap call per broker.
|
|
7744
|
-
*/
|
|
7745
|
-
decoderNodeId: string().nullable(),
|
|
7746
|
-
/**
|
|
7747
8330
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
7748
8331
|
* when the stream has no audio track or the broker is in cold start.
|
|
7749
8332
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7948,6 +8531,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7948
8531
|
kind: "mutation",
|
|
7949
8532
|
auth: "admin"
|
|
7950
8533
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8534
|
+
function defOf(schema) {
|
|
8535
|
+
return schema._zod?.def ?? {};
|
|
8536
|
+
}
|
|
8537
|
+
function declaredHere(schema) {
|
|
8538
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
8539
|
+
}
|
|
8540
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
8541
|
+
var WRAPPERS = new Set([
|
|
8542
|
+
"optional",
|
|
8543
|
+
"nullable",
|
|
8544
|
+
"default",
|
|
8545
|
+
"prefault",
|
|
8546
|
+
"catch",
|
|
8547
|
+
"readonly",
|
|
8548
|
+
"nonoptional"
|
|
8549
|
+
]);
|
|
8550
|
+
/**
|
|
8551
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
8552
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
8553
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
8554
|
+
* `.transform` on `in`).
|
|
8555
|
+
*/
|
|
8556
|
+
function layersOf(schema) {
|
|
8557
|
+
const out = [];
|
|
8558
|
+
const queue = [schema];
|
|
8559
|
+
while (queue.length > 0) {
|
|
8560
|
+
const s = queue.shift();
|
|
8561
|
+
if (!s || out.includes(s)) continue;
|
|
8562
|
+
out.push(s);
|
|
8563
|
+
const def = defOf(s);
|
|
8564
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
8565
|
+
if (def.type === "pipe") {
|
|
8566
|
+
if (def.in) queue.push(def.in);
|
|
8567
|
+
if (def.out) queue.push(def.out);
|
|
8568
|
+
}
|
|
8569
|
+
}
|
|
8570
|
+
return out;
|
|
8571
|
+
}
|
|
8572
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
8573
|
+
function isZodSecret(schema) {
|
|
8574
|
+
return layersOf(schema).some(declaredHere);
|
|
8575
|
+
}
|
|
8576
|
+
/**
|
|
8577
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
8578
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
8579
|
+
* object or array is reported as one path and not descended into — everything
|
|
8580
|
+
* under it is secret.
|
|
8581
|
+
*/
|
|
8582
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
8583
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
8584
|
+
const paths = [];
|
|
8585
|
+
for (const layer of layersOf(schema)) {
|
|
8586
|
+
const def = defOf(layer);
|
|
8587
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
8588
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
8589
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
8590
|
+
else if (def.type === "intersection") {
|
|
8591
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
8592
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
8593
|
+
}
|
|
8594
|
+
}
|
|
8595
|
+
return [...new Set(paths)];
|
|
8596
|
+
}
|
|
7951
8597
|
//#endregion
|
|
7952
8598
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7953
8599
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -11079,70 +11725,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
11079
11725
|
"backup"
|
|
11080
11726
|
]).optional()
|
|
11081
11727
|
});
|
|
11082
|
-
var DecoderStatsSchema = object({
|
|
11083
|
-
inputFps: number(),
|
|
11084
|
-
outputFps: number(),
|
|
11085
|
-
avgDecodeTimeMs: number(),
|
|
11086
|
-
droppedFrames: number(),
|
|
11087
|
-
/**
|
|
11088
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
11089
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
11090
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
11091
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
11092
|
-
*/
|
|
11093
|
-
lagMs: number().optional(),
|
|
11094
|
-
effectiveFps: number().optional(),
|
|
11095
|
-
adaptiveFps: number().optional()
|
|
11096
|
-
});
|
|
11097
|
-
var DecoderSessionConfigSchema = object({
|
|
11098
|
-
codec: string(),
|
|
11099
|
-
maxFps: number().default(0),
|
|
11100
|
-
outputFormat: _enum([
|
|
11101
|
-
"jpeg",
|
|
11102
|
-
"rgb",
|
|
11103
|
-
"bgr",
|
|
11104
|
-
"yuv420",
|
|
11105
|
-
"gray"
|
|
11106
|
-
]).default("jpeg"),
|
|
11107
|
-
scale: number().default(1),
|
|
11108
|
-
width: number().optional(),
|
|
11109
|
-
height: number().optional(),
|
|
11110
|
-
/**
|
|
11111
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
11112
|
-
* because the cap is generic (any caller could request decode), but
|
|
11113
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
11114
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
11115
|
-
* sendPacket errors on a single hung camera).
|
|
11116
|
-
*/
|
|
11117
|
-
deviceId: number().int().nonnegative().optional(),
|
|
11118
|
-
/**
|
|
11119
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
11120
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
11121
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
11122
|
-
* profile cleanly.
|
|
11123
|
-
*/
|
|
11124
|
-
tag: string().optional(),
|
|
11125
|
-
/**
|
|
11126
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
11127
|
-
*
|
|
11128
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
11129
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
11130
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
11131
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
11132
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
11133
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
11134
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
11135
|
-
*/
|
|
11136
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
11137
|
-
/**
|
|
11138
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
11139
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
11140
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
11141
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
11142
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
11143
|
-
*/
|
|
11144
|
-
debug: boolean().optional()
|
|
11145
|
-
});
|
|
11146
11728
|
/**
|
|
11147
11729
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
11148
11730
|
* an addon declares its channels in.
|
|
@@ -11285,6 +11867,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
11285
11867
|
"balanced",
|
|
11286
11868
|
"strict"
|
|
11287
11869
|
]);
|
|
11870
|
+
/** Steps whose effect a root label can BE. */
|
|
11871
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
11872
|
+
"animal-classifier",
|
|
11873
|
+
"vehicle-classifier",
|
|
11874
|
+
"package-detection"
|
|
11875
|
+
];
|
|
11876
|
+
/** Steps whose box a root detection can BE. */
|
|
11877
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11878
|
+
/**
|
|
11879
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11880
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11881
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11882
|
+
* no camera tree carries.)
|
|
11883
|
+
*/
|
|
11884
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11885
|
+
[
|
|
11886
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11887
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11888
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11889
|
+
];
|
|
11288
11890
|
var MODEL_FORMATS = [
|
|
11289
11891
|
"onnx",
|
|
11290
11892
|
"coreml",
|
|
@@ -11313,7 +11915,53 @@ var ModelFormatEntrySchema = object({
|
|
|
11313
11915
|
/** Multi-file payload (directory members or sibling files). */
|
|
11314
11916
|
files: array(string()).readonly().optional(),
|
|
11315
11917
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
11316
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11918
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11919
|
+
/**
|
|
11920
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11921
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11922
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11923
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11924
|
+
* node records the revision it downloaded next to the file
|
|
11925
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11926
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11927
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11928
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11929
|
+
*/
|
|
11930
|
+
revision: string().min(1).optional()
|
|
11931
|
+
});
|
|
11932
|
+
/**
|
|
11933
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11934
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11935
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11936
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11937
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11938
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11939
|
+
*/
|
|
11940
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11941
|
+
"current",
|
|
11942
|
+
"stale",
|
|
11943
|
+
"missing"
|
|
11944
|
+
]);
|
|
11945
|
+
/**
|
|
11946
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11947
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11948
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11949
|
+
*/
|
|
11950
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11951
|
+
"fp32",
|
|
11952
|
+
"fp16",
|
|
11953
|
+
"int8"
|
|
11954
|
+
]);
|
|
11955
|
+
/**
|
|
11956
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11957
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11958
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11959
|
+
*/
|
|
11960
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11961
|
+
downloaded: boolean(),
|
|
11962
|
+
sizeMB: number(),
|
|
11963
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11964
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
11317
11965
|
});
|
|
11318
11966
|
/**
|
|
11319
11967
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -11417,6 +12065,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
11417
12065
|
/** True when the weights or their data forbid commercial use. */
|
|
11418
12066
|
nonCommercial: boolean().optional()
|
|
11419
12067
|
}));
|
|
12068
|
+
/**
|
|
12069
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
12070
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
12071
|
+
*
|
|
12072
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
12073
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
12074
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
12075
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
12076
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
12077
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
12078
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
12079
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
12080
|
+
* detection in the shape that step produces. Derived from the model's
|
|
12081
|
+
* postprocessor on read, never stored by an import.
|
|
12082
|
+
*/
|
|
12083
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
12084
|
+
object({
|
|
12085
|
+
kind: literal("label"),
|
|
12086
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
12087
|
+
labelToEffect: record(string(), string()),
|
|
12088
|
+
uncovered: array(string()).readonly()
|
|
12089
|
+
}),
|
|
12090
|
+
object({
|
|
12091
|
+
kind: literal("crop"),
|
|
12092
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
12093
|
+
rootLabels: array(string()).readonly(),
|
|
12094
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
12095
|
+
childClass: _enum(["plate", "face"]),
|
|
12096
|
+
/**
|
|
12097
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
12098
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
12099
|
+
* stored by an import.
|
|
12100
|
+
*/
|
|
12101
|
+
rootInputPx: number().int().positive().optional()
|
|
12102
|
+
}),
|
|
12103
|
+
object({
|
|
12104
|
+
kind: literal("mask"),
|
|
12105
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
12106
|
+
})
|
|
12107
|
+
]);
|
|
11420
12108
|
var ModelCatalogEntrySchema = object({
|
|
11421
12109
|
id: string(),
|
|
11422
12110
|
name: string(),
|
|
@@ -11482,6 +12170,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
11482
12170
|
*/
|
|
11483
12171
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
11484
12172
|
/**
|
|
12173
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
12174
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
12175
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
12176
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
12177
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
12178
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
12179
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
12180
|
+
*/
|
|
12181
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
12182
|
+
/**
|
|
12183
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
12184
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
12185
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
12186
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
12187
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
12188
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
12189
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
12190
|
+
*/
|
|
12191
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
12192
|
+
/**
|
|
12193
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
12194
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
12195
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
12196
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
12197
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
12198
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
12199
|
+
*/
|
|
12200
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
12201
|
+
/**
|
|
11485
12202
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
11486
12203
|
* onto the canonical template) before this step runs, instead of a plain
|
|
11487
12204
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -11543,6 +12260,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
11543
12260
|
*/
|
|
11544
12261
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
11545
12262
|
/**
|
|
12263
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
12264
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
12265
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
12266
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
12267
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
12268
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
12269
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
12270
|
+
*/
|
|
12271
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
12272
|
+
/**
|
|
11546
12273
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
11547
12274
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
11548
12275
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -13144,13 +13871,6 @@ var BrokerRtspClientSchema = object({
|
|
|
13144
13871
|
lastRtpAt: number(),
|
|
13145
13872
|
bytesSent: number()
|
|
13146
13873
|
});
|
|
13147
|
-
var BrokerDecodedClientSchema = object({
|
|
13148
|
-
tag: string(),
|
|
13149
|
-
subscribedAt: number(),
|
|
13150
|
-
maxFps: number(),
|
|
13151
|
-
framesDelivered: number(),
|
|
13152
|
-
framesDropped: number()
|
|
13153
|
-
});
|
|
13154
13874
|
var BrokerAudioClientSchema = object({
|
|
13155
13875
|
tag: string(),
|
|
13156
13876
|
subscribedAt: number(),
|
|
@@ -13242,7 +13962,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
13242
13962
|
});
|
|
13243
13963
|
var BrokerClientsSchema = object({
|
|
13244
13964
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
13245
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
13246
13965
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
13247
13966
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
13248
13967
|
pipeClients: number(),
|
|
@@ -13611,11 +14330,7 @@ method(object({
|
|
|
13611
14330
|
auth: "admin"
|
|
13612
14331
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
13613
14332
|
brokerId: string(),
|
|
13614
|
-
channel: _enum([
|
|
13615
|
-
"rtsp",
|
|
13616
|
-
"decoded",
|
|
13617
|
-
"audio"
|
|
13618
|
-
]),
|
|
14333
|
+
channel: _enum(["rtsp", "audio"]),
|
|
13619
14334
|
handle: string()
|
|
13620
14335
|
}), object({ killed: boolean() }), {
|
|
13621
14336
|
kind: "mutation",
|
|
@@ -13650,10 +14365,7 @@ method(object({
|
|
|
13650
14365
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
13651
14366
|
subscriptionId: string(),
|
|
13652
14367
|
maxCount: number().int().positive().default(8)
|
|
13653
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
13654
|
-
subscriptionId: string(),
|
|
13655
|
-
maxCount: number().int().positive().default(4)
|
|
13656
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
14368
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13657
14369
|
brokerId: string(),
|
|
13658
14370
|
seconds: number().min(0).max(30)
|
|
13659
14371
|
}), _void(), {
|
|
@@ -14913,53 +15625,201 @@ id: union([string(), number()]) }), {
|
|
|
14913
15625
|
auth: "admin"
|
|
14914
15626
|
});
|
|
14915
15627
|
/**
|
|
14916
|
-
*
|
|
14917
|
-
*
|
|
14918
|
-
*
|
|
15628
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
15629
|
+
*
|
|
15630
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
15631
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
15632
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
15633
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
15634
|
+
* against the CALLER, never against anything the caller claims.
|
|
15635
|
+
*
|
|
15636
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
15637
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
15638
|
+
* connection, the agent from its child's connection carried in
|
|
15639
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
15640
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
15641
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
15642
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
15643
|
+
* runner is the same OS user): see the threat model in
|
|
15644
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
15645
|
+
*
|
|
15646
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
15647
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
15648
|
+
* floors every method to admin anyway (D240).
|
|
15649
|
+
*
|
|
15650
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14919
15651
|
*/
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
})
|
|
14930
|
-
|
|
15652
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
15653
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
15654
|
+
"key-missing",
|
|
15655
|
+
"wrong-key",
|
|
15656
|
+
"key-file-unreadable",
|
|
15657
|
+
"store-unavailable",
|
|
15658
|
+
"not-initialized",
|
|
15659
|
+
"decrypt-failed"
|
|
15660
|
+
]);
|
|
15661
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
15662
|
+
state: literal("locked"),
|
|
15663
|
+
reason: KeychainUnavailableReasonSchema
|
|
15664
|
+
})]);
|
|
15665
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
15666
|
+
object({
|
|
15667
|
+
kind: literal("value"),
|
|
15668
|
+
value: string(),
|
|
15669
|
+
version: number().int()
|
|
15670
|
+
}),
|
|
15671
|
+
object({ kind: literal("missing") }),
|
|
15672
|
+
object({
|
|
15673
|
+
kind: literal("unavailable"),
|
|
15674
|
+
reason: KeychainUnavailableReasonSchema
|
|
15675
|
+
}),
|
|
15676
|
+
object({ kind: literal("forbidden") })
|
|
15677
|
+
]);
|
|
15678
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
15679
|
+
/** Metadata of one stored value — never the value. */
|
|
15680
|
+
var KeychainSecretMetaSchema = object({
|
|
15681
|
+
ref: string(),
|
|
15682
|
+
owner: string(),
|
|
15683
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
15684
|
+
scope: string(),
|
|
15685
|
+
fieldPath: string(),
|
|
15686
|
+
version: number().int(),
|
|
15687
|
+
createdAt: number(),
|
|
15688
|
+
updatedAt: number(),
|
|
15689
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15690
|
+
updatedBy: string(),
|
|
15691
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
15692
|
+
lastReadAt: number().nullable()
|
|
15693
|
+
});
|
|
15694
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
15695
|
+
method(object({
|
|
15696
|
+
ref: string().min(1),
|
|
15697
|
+
value: string().min(1)
|
|
15698
|
+
}), object({
|
|
15699
|
+
ref: string(),
|
|
15700
|
+
version: number().int()
|
|
15701
|
+
}), {
|
|
15702
|
+
kind: "mutation",
|
|
15703
|
+
auth: "admin"
|
|
15704
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
15705
|
+
kind: "mutation",
|
|
15706
|
+
auth: "admin"
|
|
15707
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15708
|
+
var KeychainKeySourceSchema = object({
|
|
15709
|
+
kind: _enum([
|
|
15710
|
+
"config-file",
|
|
15711
|
+
"previous-config-file",
|
|
15712
|
+
"platform",
|
|
15713
|
+
"default-file"
|
|
15714
|
+
]),
|
|
15715
|
+
/** File sources only — a path is not a secret. */
|
|
15716
|
+
path: string().optional(),
|
|
15717
|
+
/**
|
|
15718
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
15719
|
+
* next to the database it protects (the default file). The page warns.
|
|
15720
|
+
*/
|
|
15721
|
+
sharesBackupWithDatabase: boolean()
|
|
15722
|
+
});
|
|
15723
|
+
var KeychainStatusSchema = object({
|
|
15724
|
+
keychain: KeychainStateSchema,
|
|
15725
|
+
/** The source of the master key in use; `null` while locked. */
|
|
15726
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
15727
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
15728
|
+
configuredSource: KeychainKeySourceSchema,
|
|
15729
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
15730
|
+
fingerprint: string().nullable(),
|
|
15731
|
+
activeKeyId: string().nullable(),
|
|
15732
|
+
/**
|
|
15733
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
15734
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
15735
|
+
*/
|
|
15736
|
+
rotationPending: boolean(),
|
|
15737
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15738
|
+
retiredWraps: number().int(),
|
|
15739
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
15740
|
+
secretCount: number().int()
|
|
15741
|
+
});
|
|
15742
|
+
/**
|
|
15743
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
15744
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
15745
|
+
* never reported as an orphan (and never deleted as one).
|
|
15746
|
+
*/
|
|
15747
|
+
var KeychainSecretUsageSchema = _enum([
|
|
15748
|
+
"in-use",
|
|
15749
|
+
"orphan",
|
|
15750
|
+
"unknown"
|
|
15751
|
+
]);
|
|
15752
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
15753
|
+
var KeychainAuditActionSchema = _enum([
|
|
15754
|
+
"put",
|
|
15755
|
+
"delete",
|
|
15756
|
+
"reveal",
|
|
15757
|
+
"rotate-master-key",
|
|
15758
|
+
"purge-retired-keys",
|
|
15759
|
+
"download-recovery-key",
|
|
15760
|
+
"delete-orphans",
|
|
15761
|
+
"reset",
|
|
15762
|
+
"initialize"
|
|
15763
|
+
]);
|
|
15764
|
+
var KeychainAuditEntrySchema = object({
|
|
15765
|
+
id: string(),
|
|
15766
|
+
at: number(),
|
|
15767
|
+
action: KeychainAuditActionSchema,
|
|
15768
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15769
|
+
actor: string(),
|
|
15770
|
+
ref: string().nullable(),
|
|
15771
|
+
detail: string().nullable()
|
|
15772
|
+
});
|
|
15773
|
+
method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}), array(KeychainAdminSecretSchema).readonly(), { auth: "admin" }), method(object({ limit: number().int().min(1).max(500).optional() }), array(KeychainAuditEntrySchema).readonly(), { auth: "admin" }), method(object({ ref: string().min(1) }), object({
|
|
15774
|
+
value: string(),
|
|
15775
|
+
version: number().int()
|
|
15776
|
+
}), {
|
|
15777
|
+
kind: "mutation",
|
|
15778
|
+
auth: "admin",
|
|
15779
|
+
caller: "required"
|
|
15780
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15781
|
+
deleted: array(string()).readonly(),
|
|
15782
|
+
kept: array(object({
|
|
15783
|
+
ref: string(),
|
|
15784
|
+
usage: KeychainSecretUsageSchema
|
|
15785
|
+
})).readonly()
|
|
15786
|
+
}), {
|
|
15787
|
+
kind: "mutation",
|
|
15788
|
+
auth: "admin",
|
|
15789
|
+
caller: "required"
|
|
15790
|
+
}), method(object({}), object({
|
|
15791
|
+
fingerprint: string(),
|
|
15792
|
+
keySource: KeychainKeySourceSchema
|
|
15793
|
+
}), {
|
|
15794
|
+
kind: "mutation",
|
|
15795
|
+
auth: "admin",
|
|
15796
|
+
caller: "required"
|
|
15797
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15798
|
+
kind: "mutation",
|
|
15799
|
+
auth: "admin",
|
|
15800
|
+
caller: "required"
|
|
15801
|
+
}), method(object({}), object({
|
|
15802
|
+
key: string(),
|
|
15803
|
+
fingerprint: string(),
|
|
15804
|
+
keySource: KeychainKeySourceSchema
|
|
15805
|
+
}), {
|
|
15806
|
+
kind: "mutation",
|
|
15807
|
+
auth: "admin",
|
|
15808
|
+
caller: "required"
|
|
15809
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15810
|
+
archivedCollection: string().nullable(),
|
|
15811
|
+
archived: number().int()
|
|
15812
|
+
}), {
|
|
15813
|
+
kind: "mutation",
|
|
15814
|
+
auth: "admin",
|
|
15815
|
+
caller: "required"
|
|
15816
|
+
});
|
|
15817
|
+
method(_void(), object({
|
|
14931
15818
|
id: string(),
|
|
14932
15819
|
name: string(),
|
|
14933
|
-
isPullMode: boolean().optional(),
|
|
14934
|
-
priority: number().optional(),
|
|
14935
15820
|
hwaccel: string().optional(),
|
|
14936
15821
|
probedBestHwaccel: string().optional()
|
|
14937
|
-
})), method(
|
|
14938
|
-
sessionId: string(),
|
|
14939
|
-
nodeId: string()
|
|
14940
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14941
|
-
sessionId: string(),
|
|
14942
|
-
packet: EncodedPacketSchema
|
|
14943
|
-
}), _void()), method(object({
|
|
14944
|
-
sessionId: string(),
|
|
14945
|
-
url: string()
|
|
14946
|
-
}), _void()), method(object({
|
|
14947
|
-
sessionId: string(),
|
|
14948
|
-
maxCount: number().default(1),
|
|
14949
|
-
waitMs: number().optional()
|
|
14950
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14951
|
-
sessionId: string(),
|
|
14952
|
-
maxCount: number().default(1),
|
|
14953
|
-
waitMs: number().optional()
|
|
14954
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14955
|
-
sessionId: string(),
|
|
14956
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14957
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14958
|
-
sessionId: string(),
|
|
14959
|
-
codec: string(),
|
|
14960
|
-
outputFormat: string(),
|
|
14961
|
-
createdAtMs: number()
|
|
14962
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15822
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14963
15823
|
kind: "mutation",
|
|
14964
15824
|
auth: "admin"
|
|
14965
15825
|
});
|
|
@@ -15976,6 +16836,10 @@ var DeviceInfoSchema = object({
|
|
|
15976
16836
|
isCamera: boolean(),
|
|
15977
16837
|
/** Current config values — serializable snapshot */
|
|
15978
16838
|
config: record(string(), unknown()),
|
|
16839
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16840
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16841
|
+
* when the owning runner has not reported them. */
|
|
16842
|
+
secretConfigPaths: array(string()).optional(),
|
|
15979
16843
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15980
16844
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15981
16845
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -16181,12 +17045,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
16181
17045
|
* call (workers re-register on init), so probe-driven updates
|
|
16182
17046
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
16183
17047
|
features: array(string()).optional(),
|
|
16184
|
-
config: record(string(), unknown())
|
|
17048
|
+
config: record(string(), unknown()),
|
|
17049
|
+
/** Config paths the device's own schema DECLARES secret
|
|
17050
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
17051
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
17052
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
17053
|
+
* omits it and the keyword backstop applies. */
|
|
17054
|
+
secretConfigPaths: array(string()).optional()
|
|
16185
17055
|
});
|
|
16186
17056
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
16187
17057
|
var DevicePersistConfigPayloadSchema = object({
|
|
16188
17058
|
deviceId: number(),
|
|
16189
|
-
data: record(string(), unknown())
|
|
17059
|
+
data: record(string(), unknown()),
|
|
17060
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
17061
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
17062
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
17063
|
+
secretConfigPaths: array(string()).optional()
|
|
16190
17064
|
});
|
|
16191
17065
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
16192
17066
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -17008,6 +17882,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
17008
17882
|
kind: "mutation",
|
|
17009
17883
|
auth: "admin"
|
|
17010
17884
|
});
|
|
17885
|
+
var HUB_ADDRESS_ROLES = [
|
|
17886
|
+
"appConnections",
|
|
17887
|
+
"notificationTaps",
|
|
17888
|
+
"internal",
|
|
17889
|
+
"publicEndpoint"
|
|
17890
|
+
];
|
|
17011
17891
|
/**
|
|
17012
17892
|
* Transport bounds for AI capability methods.
|
|
17013
17893
|
*
|
|
@@ -17834,7 +18714,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17834
18714
|
icon: string().optional(),
|
|
17835
18715
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17836
18716
|
startUrl: string(),
|
|
17837
|
-
stage: LoginStageEnum
|
|
18717
|
+
stage: LoginStageEnum,
|
|
18718
|
+
/**
|
|
18719
|
+
* The provider names an external identity a signed-in user can link to
|
|
18720
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
18721
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
18722
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
18723
|
+
*/
|
|
18724
|
+
linkable: boolean().optional()
|
|
17838
18725
|
}),
|
|
17839
18726
|
object({
|
|
17840
18727
|
kind: literal("widget"),
|
|
@@ -19610,6 +20497,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
19610
20497
|
"stream-offline",
|
|
19611
20498
|
"node-online",
|
|
19612
20499
|
"node-offline",
|
|
20500
|
+
"node-restarting",
|
|
20501
|
+
"node-updating",
|
|
19613
20502
|
"node-inference-unavailable",
|
|
19614
20503
|
"detection-blind",
|
|
19615
20504
|
"addon-crash-loop",
|
|
@@ -21215,7 +22104,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
21215
22104
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
21216
22105
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
21217
22106
|
*/
|
|
21218
|
-
notifySensorRewatched: boolean().optional()
|
|
22107
|
+
notifySensorRewatched: boolean().optional(),
|
|
22108
|
+
/**
|
|
22109
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
22110
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
22111
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
22112
|
+
*/
|
|
22113
|
+
notifySensorIgnored: boolean().optional()
|
|
21219
22114
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
21220
22115
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
21221
22116
|
mode: AlarmArmModeSchema,
|
|
@@ -21228,7 +22123,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
21228
22123
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
21229
22124
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
21230
22125
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
21231
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
22126
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
22127
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
22128
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
21232
22129
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
21233
22130
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
21234
22131
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -22206,8 +23103,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
22206
23103
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
22207
23104
|
stepId: "face-embedding",
|
|
22208
23105
|
key: "minLandmarkFaceSize",
|
|
22209
|
-
label: "Min face size
|
|
22210
|
-
description: "
|
|
23106
|
+
label: "Min face size to embed (detection-frame px)",
|
|
23107
|
+
description: "Faces smaller than this in the small frame the detector sees are not embedded, so they can never be recognised. Below it the face cannot be aligned reliably and a bad embedding matches everyone. Same value on every node. 0 = no limit.",
|
|
22211
23108
|
type: "slider",
|
|
22212
23109
|
min: 0,
|
|
22213
23110
|
max: 64,
|
|
@@ -23180,8 +24077,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
23180
24077
|
]);
|
|
23181
24078
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
23182
24079
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
23183
|
-
/**
|
|
23184
|
-
|
|
24080
|
+
/**
|
|
24081
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
24082
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
24083
|
+
*
|
|
24084
|
+
* - `operator` — drawn by hand.
|
|
24085
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
24086
|
+
* model, or a larger teacher model).
|
|
24087
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
24088
|
+
* back from the track store (never a re-run).
|
|
24089
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
24090
|
+
*/
|
|
24091
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
24092
|
+
"operator",
|
|
24093
|
+
"assist",
|
|
24094
|
+
"pipeline",
|
|
24095
|
+
"llm"
|
|
24096
|
+
]);
|
|
23185
24097
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
23186
24098
|
var RetrainBboxSchema = object({
|
|
23187
24099
|
x: number(),
|
|
@@ -23199,7 +24111,8 @@ var RetrainBboxSchema = object({
|
|
|
23199
24111
|
*/
|
|
23200
24112
|
var RetrainAnnotationSchema = object({
|
|
23201
24113
|
id: string(),
|
|
23202
|
-
|
|
24114
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
24115
|
+
trackId: string().optional(),
|
|
23203
24116
|
deviceId: number(),
|
|
23204
24117
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
23205
24118
|
mediaKey: string(),
|
|
@@ -23248,18 +24161,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
23248
24161
|
* fail, whatever became of the original. */
|
|
23249
24162
|
copied: boolean()
|
|
23250
24163
|
});
|
|
24164
|
+
/**
|
|
24165
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
24166
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
24167
|
+
* box recorded on the source media row when there is one, else the track
|
|
24168
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
24169
|
+
* until the operator confirms it.
|
|
24170
|
+
*/
|
|
24171
|
+
var RetrainPipelineBoxSchema = object({
|
|
24172
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
24173
|
+
bbox: RetrainBboxSchema,
|
|
24174
|
+
macroClass: RetrainMacroClassSchema,
|
|
24175
|
+
label: string().optional(),
|
|
24176
|
+
subLabel: string().optional(),
|
|
24177
|
+
/** The detection score of the position used, when it was recorded. */
|
|
24178
|
+
score: number().optional(),
|
|
24179
|
+
/** The root model that produced the track, when it was recorded. */
|
|
24180
|
+
modelId: string().optional(),
|
|
24181
|
+
trackId: string(),
|
|
24182
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
24183
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
24184
|
+
basis: _enum(["subject-box", "position"]),
|
|
24185
|
+
deltaMs: number()
|
|
24186
|
+
});
|
|
24187
|
+
/**
|
|
24188
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
24189
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
24190
|
+
* track at all.
|
|
24191
|
+
*/
|
|
24192
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
23251
24193
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
23252
24194
|
var RetrainFrameSchema = object({
|
|
23253
24195
|
frameId: string(),
|
|
23254
24196
|
deviceId: number(),
|
|
23255
|
-
|
|
23256
|
-
/**
|
|
23257
|
-
|
|
24197
|
+
origin: RetrainFrameOriginSchema,
|
|
24198
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
24199
|
+
trackId: string().optional(),
|
|
24200
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
24201
|
+
* Absent on a recording still. */
|
|
24202
|
+
sourceMediaId: number().int().optional(),
|
|
24203
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
24204
|
+
epochMs: number().optional(),
|
|
23258
24205
|
sourceKind: MediaFileKindEnum,
|
|
23259
24206
|
sizeBytes: number().int(),
|
|
23260
24207
|
width: number().int(),
|
|
23261
24208
|
height: number().int(),
|
|
23262
|
-
copiedAt: number()
|
|
24209
|
+
copiedAt: number(),
|
|
24210
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
24211
|
+
capturedAt: number().optional(),
|
|
24212
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
24213
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
24214
|
+
* a false positive. */
|
|
24215
|
+
complete: boolean(),
|
|
24216
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
24217
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
24218
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
24219
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
24220
|
+
collectionIds: array(string()).readonly().optional()
|
|
23263
24221
|
});
|
|
23264
24222
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
23265
24223
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -23280,6 +24238,53 @@ var RetrainFrameListSchema = object({
|
|
|
23280
24238
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
23281
24239
|
autoPickMediaId: number().int().optional()
|
|
23282
24240
|
});
|
|
24241
|
+
/**
|
|
24242
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
24243
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
24244
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
24245
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
24246
|
+
* export carried (`exportedInBatch`).
|
|
24247
|
+
*/
|
|
24248
|
+
var RetrainExportFilterSchema = object({
|
|
24249
|
+
deviceIds: array(number()).optional(),
|
|
24250
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
24251
|
+
/** Only frames in at least one of these named collections. */
|
|
24252
|
+
collectionIds: array(string()).max(200).optional(),
|
|
24253
|
+
batchId: string().optional(),
|
|
24254
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
24255
|
+
completeOnly: boolean().optional()
|
|
24256
|
+
});
|
|
24257
|
+
/**
|
|
24258
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
24259
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
24260
|
+
* convention — the classifier layout.
|
|
24261
|
+
*/
|
|
24262
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
24263
|
+
/**
|
|
24264
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
24265
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
24266
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
24267
|
+
* logged.
|
|
24268
|
+
*/
|
|
24269
|
+
var RetrainArchiveTargetSchema = object({
|
|
24270
|
+
kind: literal("http"),
|
|
24271
|
+
method: _enum(["PUT", "POST"]),
|
|
24272
|
+
url: string().url(),
|
|
24273
|
+
headers: record(string(), string()).optional()
|
|
24274
|
+
});
|
|
24275
|
+
var RetrainArchiveResultSchema = object({
|
|
24276
|
+
batchId: string(),
|
|
24277
|
+
frames: number().int(),
|
|
24278
|
+
crops: number().int(),
|
|
24279
|
+
annotations: number().int(),
|
|
24280
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
24281
|
+
missing: number().int(),
|
|
24282
|
+
bytes: number().int(),
|
|
24283
|
+
/** sha256 of the exact bytes sent. */
|
|
24284
|
+
sha256: string(),
|
|
24285
|
+
/** The target's HTTP status. */
|
|
24286
|
+
status: number().int()
|
|
24287
|
+
});
|
|
23283
24288
|
/** What the operator asked the assist to look for. */
|
|
23284
24289
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
23285
24290
|
kind: literal("package"),
|
|
@@ -23309,6 +24314,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
23309
24314
|
reason: string(),
|
|
23310
24315
|
detail: string().optional()
|
|
23311
24316
|
})]);
|
|
24317
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
24318
|
+
var RetrainCollectionSchema = object({
|
|
24319
|
+
id: string(),
|
|
24320
|
+
name: string(),
|
|
24321
|
+
createdAt: number(),
|
|
24322
|
+
frameCount: number().int()
|
|
24323
|
+
});
|
|
24324
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
24325
|
+
kind: literal("created"),
|
|
24326
|
+
collection: RetrainCollectionSchema
|
|
24327
|
+
}), object({
|
|
24328
|
+
kind: literal("refused"),
|
|
24329
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
24330
|
+
})]);
|
|
24331
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
24332
|
+
kind: literal("renamed"),
|
|
24333
|
+
collection: RetrainCollectionSchema
|
|
24334
|
+
}), object({
|
|
24335
|
+
kind: literal("refused"),
|
|
24336
|
+
reason: _enum([
|
|
24337
|
+
"empty-name",
|
|
24338
|
+
"duplicate-name",
|
|
24339
|
+
"unknown-collection"
|
|
24340
|
+
])
|
|
24341
|
+
})]);
|
|
24342
|
+
/**
|
|
24343
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
24344
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
24345
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
24346
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
24347
|
+
*/
|
|
24348
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
24349
|
+
kind: literal("added"),
|
|
24350
|
+
collectionId: string(),
|
|
24351
|
+
frame: RetrainFrameSchema,
|
|
24352
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
24353
|
+
reused: boolean()
|
|
24354
|
+
}), object({
|
|
24355
|
+
kind: literal("refused"),
|
|
24356
|
+
reason: _enum([
|
|
24357
|
+
"unknown-collection",
|
|
24358
|
+
"still-unavailable",
|
|
24359
|
+
"still-busy",
|
|
24360
|
+
"unreadable-image",
|
|
24361
|
+
"write-failed"
|
|
24362
|
+
]),
|
|
24363
|
+
detail: string().optional()
|
|
24364
|
+
})]);
|
|
24365
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
24366
|
+
var RetrainAssistProfileSchema = object({
|
|
24367
|
+
id: string(),
|
|
24368
|
+
name: string(),
|
|
24369
|
+
model: string(),
|
|
24370
|
+
kind: string(),
|
|
24371
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
24372
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
24373
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
24374
|
+
leavesHouse: boolean()
|
|
24375
|
+
});
|
|
24376
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
24377
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
24378
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
24379
|
+
var RetrainLlmReviewSchema = object({
|
|
24380
|
+
/** The `ref` the page sent the box under. */
|
|
24381
|
+
ref: string(),
|
|
24382
|
+
verdict: _enum([
|
|
24383
|
+
"confirmed",
|
|
24384
|
+
"wrong-class",
|
|
24385
|
+
"not-an-object",
|
|
24386
|
+
"uncertain"
|
|
24387
|
+
]),
|
|
24388
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
24389
|
+
reason: string()
|
|
24390
|
+
});
|
|
24391
|
+
/**
|
|
24392
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
24393
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
24394
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
24395
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
24396
|
+
*/
|
|
24397
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
24398
|
+
kind: literal("proposed"),
|
|
24399
|
+
profileId: string(),
|
|
24400
|
+
model: string(),
|
|
24401
|
+
/** The frame was sent outside the house for this answer. */
|
|
24402
|
+
leftHouse: boolean(),
|
|
24403
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
24404
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
24405
|
+
rejected: number().int()
|
|
24406
|
+
}), object({
|
|
24407
|
+
kind: literal("refused"),
|
|
24408
|
+
reason: _enum([
|
|
24409
|
+
"unknown-frame",
|
|
24410
|
+
"unreadable-frame",
|
|
24411
|
+
"unknown-profile",
|
|
24412
|
+
"profile-disabled",
|
|
24413
|
+
"no-vision",
|
|
24414
|
+
"cloud-not-confirmed",
|
|
24415
|
+
"llm-error",
|
|
24416
|
+
"malformed-answer"
|
|
24417
|
+
]),
|
|
24418
|
+
detail: string().optional()
|
|
24419
|
+
})]);
|
|
23312
24420
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
23313
24421
|
var RetrainTransitionResultSchema = object({
|
|
23314
24422
|
trackId: string(),
|
|
@@ -24026,7 +25134,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24026
25134
|
auth: "admin"
|
|
24027
25135
|
}), method(object({
|
|
24028
25136
|
deviceId: number(),
|
|
24029
|
-
trackId: string(),
|
|
25137
|
+
trackId: string().optional(),
|
|
24030
25138
|
frameId: string()
|
|
24031
25139
|
}), object({
|
|
24032
25140
|
removed: boolean(),
|
|
@@ -24043,7 +25151,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24043
25151
|
auth: "admin"
|
|
24044
25152
|
}), method(object({
|
|
24045
25153
|
deviceId: number(),
|
|
24046
|
-
|
|
25154
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
25155
|
+
trackId: string().optional(),
|
|
24047
25156
|
frameId: string(),
|
|
24048
25157
|
subject: RetrainAssistSubjectSchema,
|
|
24049
25158
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -24051,12 +25160,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24051
25160
|
}), RetrainAssistResultSchema, {
|
|
24052
25161
|
kind: "mutation",
|
|
24053
25162
|
auth: "admin"
|
|
24054
|
-
}), method(object({
|
|
25163
|
+
}), method(object({
|
|
25164
|
+
trackId: string().optional(),
|
|
25165
|
+
frameIds: array(string()).max(2e3).optional()
|
|
25166
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
24055
25167
|
kind: "query",
|
|
24056
25168
|
auth: "admin"
|
|
24057
25169
|
}), method(object({
|
|
24058
25170
|
deviceId: number(),
|
|
24059
|
-
|
|
25171
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
25172
|
+
trackId: string().optional(),
|
|
24060
25173
|
frameId: string(),
|
|
24061
25174
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
24062
25175
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -24074,7 +25187,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24074
25187
|
}), RetrainTransitionResultSchema, {
|
|
24075
25188
|
kind: "mutation",
|
|
24076
25189
|
auth: "admin"
|
|
24077
|
-
}), method(
|
|
25190
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
25191
|
+
kind: "query",
|
|
25192
|
+
auth: "admin"
|
|
25193
|
+
}), method(object({
|
|
25194
|
+
deviceId: number(),
|
|
25195
|
+
trackId: string().optional(),
|
|
25196
|
+
frameId: string(),
|
|
25197
|
+
complete: boolean()
|
|
25198
|
+
}), RetrainFrameSchema, {
|
|
25199
|
+
kind: "mutation",
|
|
25200
|
+
auth: "admin"
|
|
25201
|
+
}), method(object({
|
|
25202
|
+
filter: RetrainExportFilterSchema,
|
|
25203
|
+
layout: RetrainExportLayoutSchema,
|
|
25204
|
+
target: RetrainArchiveTargetSchema
|
|
25205
|
+
}), RetrainArchiveResultSchema, {
|
|
25206
|
+
kind: "mutation",
|
|
25207
|
+
auth: "admin",
|
|
25208
|
+
timeoutMs: 60 * 6e4
|
|
25209
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
25210
|
+
kind: "query",
|
|
25211
|
+
auth: "admin"
|
|
25212
|
+
}), method(object({
|
|
25213
|
+
deviceId: number(),
|
|
25214
|
+
trackId: string().optional(),
|
|
25215
|
+
frameId: string(),
|
|
25216
|
+
profileId: string(),
|
|
25217
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
25218
|
+
boxes: array(object({
|
|
25219
|
+
ref: string(),
|
|
25220
|
+
bbox: RetrainBboxSchema,
|
|
25221
|
+
macroClass: RetrainMacroClassSchema,
|
|
25222
|
+
label: string().optional()
|
|
25223
|
+
})).max(50),
|
|
25224
|
+
allowCloud: boolean()
|
|
25225
|
+
}), RetrainLlmAssistResultSchema, {
|
|
25226
|
+
kind: "mutation",
|
|
25227
|
+
auth: "admin",
|
|
25228
|
+
timeoutMs: 18e4
|
|
25229
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
25230
|
+
kind: "mutation",
|
|
25231
|
+
auth: "admin"
|
|
25232
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
25233
|
+
kind: "query",
|
|
25234
|
+
auth: "admin"
|
|
25235
|
+
}), method(object({
|
|
25236
|
+
id: string(),
|
|
25237
|
+
name: string().max(120)
|
|
25238
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
25239
|
+
kind: "mutation",
|
|
25240
|
+
auth: "admin"
|
|
25241
|
+
}), method(object({ id: string() }), object({
|
|
25242
|
+
deleted: boolean(),
|
|
25243
|
+
removedFrames: number().int()
|
|
25244
|
+
}), {
|
|
25245
|
+
kind: "mutation",
|
|
25246
|
+
auth: "admin"
|
|
25247
|
+
}), method(object({
|
|
25248
|
+
collectionId: string(),
|
|
25249
|
+
deviceId: number(),
|
|
25250
|
+
epochMs: number()
|
|
25251
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
25252
|
+
kind: "mutation",
|
|
25253
|
+
auth: "admin",
|
|
25254
|
+
timeoutMs: 6e4
|
|
25255
|
+
}), method(object({
|
|
25256
|
+
collectionId: string(),
|
|
25257
|
+
frameIds: array(string()).min(1).max(500)
|
|
25258
|
+
}), object({
|
|
25259
|
+
added: number().int(),
|
|
25260
|
+
alreadyMember: number().int(),
|
|
25261
|
+
unknownFrameIds: array(string()).readonly()
|
|
25262
|
+
}), {
|
|
25263
|
+
kind: "mutation",
|
|
25264
|
+
auth: "admin"
|
|
25265
|
+
}), method(object({
|
|
25266
|
+
collectionId: string(),
|
|
25267
|
+
frameId: string()
|
|
25268
|
+
}), object({
|
|
25269
|
+
removed: boolean(),
|
|
25270
|
+
deletedFrame: boolean()
|
|
25271
|
+
}), {
|
|
25272
|
+
kind: "mutation",
|
|
25273
|
+
auth: "admin"
|
|
25274
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
24078
25275
|
kind: "query",
|
|
24079
25276
|
auth: "admin"
|
|
24080
25277
|
}), method(object({
|
|
@@ -24127,6 +25324,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
24127
25324
|
timestamp: number()
|
|
24128
25325
|
});
|
|
24129
25326
|
/**
|
|
25327
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
25328
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
25329
|
+
*/
|
|
25330
|
+
var SuppliedRootOutputSchema = object({
|
|
25331
|
+
stepId: string(),
|
|
25332
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
25333
|
+
modelId: string(),
|
|
25334
|
+
detections: array(object({
|
|
25335
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
25336
|
+
bbox: tuple([
|
|
25337
|
+
number(),
|
|
25338
|
+
number(),
|
|
25339
|
+
number(),
|
|
25340
|
+
number()
|
|
25341
|
+
]),
|
|
25342
|
+
score: number(),
|
|
25343
|
+
/**
|
|
25344
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
25345
|
+
* detector already re-found inside a root face box (D730), so its
|
|
25346
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
25347
|
+
*/
|
|
25348
|
+
landmarks: array(object({
|
|
25349
|
+
x: number(),
|
|
25350
|
+
y: number()
|
|
25351
|
+
})).optional()
|
|
25352
|
+
})).min(1)
|
|
25353
|
+
});
|
|
25354
|
+
/**
|
|
24130
25355
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
24131
25356
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
24132
25357
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -24174,7 +25399,7 @@ var FrameRefSchema = object({
|
|
|
24174
25399
|
timestamp: number(),
|
|
24175
25400
|
capturedAt: number().optional()
|
|
24176
25401
|
});
|
|
24177
|
-
var ModelFormatSchema$
|
|
25402
|
+
var ModelFormatSchema$2 = _enum([
|
|
24178
25403
|
"onnx",
|
|
24179
25404
|
"coreml",
|
|
24180
25405
|
"openvino",
|
|
@@ -24192,7 +25417,7 @@ var PipelineSlotSchema = _enum([
|
|
|
24192
25417
|
var PipelineEngineChoiceSchema = object({
|
|
24193
25418
|
runtime: literal("python"),
|
|
24194
25419
|
backend: string(),
|
|
24195
|
-
format: ModelFormatSchema$
|
|
25420
|
+
format: ModelFormatSchema$2,
|
|
24196
25421
|
device: string().optional()
|
|
24197
25422
|
});
|
|
24198
25423
|
/**
|
|
@@ -24231,32 +25456,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
24231
25456
|
group: string().optional(),
|
|
24232
25457
|
settings: record(string(), unknown()).optional()
|
|
24233
25458
|
}));
|
|
24234
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
24235
|
-
addonId: string(),
|
|
24236
|
-
enabled: boolean(),
|
|
24237
|
-
modelId: string(),
|
|
24238
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
24239
|
-
settings: record(string(), unknown()).optional()
|
|
24240
|
-
}));
|
|
24241
|
-
var PipelineTemplateSchema$1 = object({
|
|
24242
|
-
id: string(),
|
|
24243
|
-
name: string(),
|
|
24244
|
-
createdAt: string(),
|
|
24245
|
-
updatedAt: string(),
|
|
24246
|
-
engine: PipelineEngineChoiceSchema,
|
|
24247
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
24248
|
-
});
|
|
24249
25459
|
var PipelineModelOptionSchema = object({
|
|
24250
25460
|
id: string(),
|
|
24251
25461
|
name: string(),
|
|
24252
|
-
formats: record(string(),
|
|
24253
|
-
downloaded: boolean(),
|
|
24254
|
-
sizeMB: number()
|
|
24255
|
-
})),
|
|
25462
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
24256
25463
|
group: ModelVariantGroupSchema.optional(),
|
|
24257
25464
|
legacy: boolean().optional(),
|
|
24258
25465
|
provider: ModelProviderIdSchema.optional(),
|
|
24259
|
-
defaultConfidence: number().optional()
|
|
25466
|
+
defaultConfidence: number().optional(),
|
|
25467
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
24260
25468
|
});
|
|
24261
25469
|
var ConfigFieldBridge = custom();
|
|
24262
25470
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -24418,6 +25626,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24418
25626
|
}), {
|
|
24419
25627
|
kind: "mutation",
|
|
24420
25628
|
auth: "admin"
|
|
25629
|
+
}), method(object({
|
|
25630
|
+
nodeId: string(),
|
|
25631
|
+
deviceIds: array(number()).readonly().optional(),
|
|
25632
|
+
dryRun: boolean()
|
|
25633
|
+
}), object({
|
|
25634
|
+
entries: array(object({
|
|
25635
|
+
deviceId: number(),
|
|
25636
|
+
keys: array(string()).readonly()
|
|
25637
|
+
})).readonly(),
|
|
25638
|
+
refused: array(object({
|
|
25639
|
+
deviceId: number(),
|
|
25640
|
+
reason: string()
|
|
25641
|
+
})).readonly()
|
|
25642
|
+
}), {
|
|
25643
|
+
kind: "mutation",
|
|
25644
|
+
auth: "admin"
|
|
24421
25645
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
24422
25646
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
24423
25647
|
deviceKey: string(),
|
|
@@ -24443,22 +25667,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24443
25667
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
24444
25668
|
steps: array(PipelineStepInputSchema),
|
|
24445
25669
|
deviceKey: string().optional()
|
|
24446
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
24447
|
-
name: string(),
|
|
24448
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
24449
|
-
engine: PipelineEngineChoiceSchema
|
|
24450
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
24451
|
-
id: string(),
|
|
24452
|
-
name: string().optional(),
|
|
24453
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
24454
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
25670
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24455
25671
|
addonId: string(),
|
|
24456
25672
|
modelId: string(),
|
|
24457
|
-
format: ModelFormatSchema$
|
|
25673
|
+
format: ModelFormatSchema$2
|
|
24458
25674
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
24459
25675
|
addonId: string(),
|
|
24460
25676
|
modelId: string(),
|
|
24461
|
-
format: ModelFormatSchema$
|
|
25677
|
+
format: ModelFormatSchema$2
|
|
24462
25678
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
24463
25679
|
steps: array(PipelineStepInputSchema).min(1),
|
|
24464
25680
|
frame: FrameInputSchema.optional(),
|
|
@@ -24524,7 +25740,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24524
25740
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
24525
25741
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
24526
25742
|
*/
|
|
24527
|
-
replay: literal(true).optional()
|
|
25743
|
+
replay: literal(true).optional(),
|
|
25744
|
+
/**
|
|
25745
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
25746
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
25747
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
25748
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
25749
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
25750
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
25751
|
+
*/
|
|
25752
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
24528
25753
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
24529
25754
|
steps: array(PipelineStepInputSchema).min(1),
|
|
24530
25755
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -24606,6 +25831,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24606
25831
|
filename: string().optional(),
|
|
24607
25832
|
settings: record(string(), unknown()).optional()
|
|
24608
25833
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25834
|
+
/**
|
|
25835
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25836
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25837
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25838
|
+
* schemas are what crosses the cap boundary.
|
|
25839
|
+
*/
|
|
25840
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25841
|
+
/** The operator's range for it. */
|
|
25842
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25843
|
+
min: 1,
|
|
25844
|
+
max: 8
|
|
25845
|
+
};
|
|
25846
|
+
var HardwareClassIdSchema = _enum([
|
|
25847
|
+
"intel-core-ultra",
|
|
25848
|
+
"intel-n-series",
|
|
25849
|
+
"apple-m-base",
|
|
25850
|
+
"apple-m-pro",
|
|
25851
|
+
"unknown"
|
|
25852
|
+
]);
|
|
25853
|
+
var AcceleratorKindSchema = _enum([
|
|
25854
|
+
"intel-npu",
|
|
25855
|
+
"intel-igpu",
|
|
25856
|
+
"x86-cpu",
|
|
25857
|
+
"arm-cpu",
|
|
25858
|
+
"apple-ane",
|
|
25859
|
+
"coral"
|
|
25860
|
+
]);
|
|
25861
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25862
|
+
object({
|
|
25863
|
+
kind: literal("capacity"),
|
|
25864
|
+
sessions: number(),
|
|
25865
|
+
minSessions: number()
|
|
25866
|
+
}),
|
|
25867
|
+
object({
|
|
25868
|
+
kind: literal("tie-faster"),
|
|
25869
|
+
over: string(),
|
|
25870
|
+
recallDelta: number()
|
|
25871
|
+
}),
|
|
25872
|
+
object({
|
|
25873
|
+
kind: literal("stepped-down"),
|
|
25874
|
+
from: string(),
|
|
25875
|
+
to: string(),
|
|
25876
|
+
limitedBy: string()
|
|
25877
|
+
}),
|
|
25878
|
+
object({
|
|
25879
|
+
kind: literal("no-fit-lightest"),
|
|
25880
|
+
sessions: number(),
|
|
25881
|
+
minSessions: number()
|
|
25882
|
+
}),
|
|
25883
|
+
object({
|
|
25884
|
+
kind: literal("derived-latency"),
|
|
25885
|
+
modelId: string()
|
|
25886
|
+
}),
|
|
25887
|
+
object({ kind: literal("cpu-device") }),
|
|
25888
|
+
object({ kind: literal("coral-untouched") }),
|
|
25889
|
+
object({ kind: literal("device-disabled") }),
|
|
25890
|
+
object({ kind: literal("device-unavailable") }),
|
|
25891
|
+
object({ kind: literal("node-offline") }),
|
|
25892
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25893
|
+
object({
|
|
25894
|
+
kind: literal("no-measured-data"),
|
|
25895
|
+
hardwareClass: HardwareClassIdSchema
|
|
25896
|
+
}),
|
|
25897
|
+
object({
|
|
25898
|
+
kind: literal("no-family-build"),
|
|
25899
|
+
format: ModelFormatSchema$1
|
|
25900
|
+
}),
|
|
25901
|
+
object({
|
|
25902
|
+
kind: literal("kept-custom-pin"),
|
|
25903
|
+
modelId: string(),
|
|
25904
|
+
deviceKey: string()
|
|
25905
|
+
})
|
|
25906
|
+
]);
|
|
25907
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25908
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25909
|
+
/**
|
|
25910
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25911
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25912
|
+
*/
|
|
25913
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25914
|
+
kind: literal("node-benchmark"),
|
|
25915
|
+
resultId: string(),
|
|
25916
|
+
measuredAtMs: number()
|
|
25917
|
+
})]);
|
|
25918
|
+
var DeviceModelChoiceSchema = object({
|
|
25919
|
+
modelId: string(),
|
|
25920
|
+
p50Ms: number(),
|
|
25921
|
+
fps: number(),
|
|
25922
|
+
measured: boolean(),
|
|
25923
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25924
|
+
source: LatencySourceSchema.optional(),
|
|
25925
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25926
|
+
capacitySessions: number(),
|
|
25927
|
+
personRecall: number()
|
|
25928
|
+
});
|
|
25929
|
+
var DeviceRecommendationSchema = object({
|
|
25930
|
+
deviceKey: string(),
|
|
25931
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25932
|
+
enabled: boolean(),
|
|
25933
|
+
available: boolean(),
|
|
25934
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25935
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25936
|
+
kept: KeptReasonSchema.optional(),
|
|
25937
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25938
|
+
});
|
|
25939
|
+
var NodeRecommendationSchema = object({
|
|
25940
|
+
nodeId: string(),
|
|
25941
|
+
reachable: boolean(),
|
|
25942
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25943
|
+
cpuModel: string().nullable(),
|
|
25944
|
+
skipped: boolean(),
|
|
25945
|
+
acceleratorModelId: string().nullable(),
|
|
25946
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25947
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25948
|
+
});
|
|
25949
|
+
var ModelPinChangeSchema = object({
|
|
25950
|
+
stepId: string(),
|
|
25951
|
+
before: string().nullable(),
|
|
25952
|
+
after: string().nullable()
|
|
25953
|
+
});
|
|
25954
|
+
var NodeDeviceChangeSchema = object({
|
|
25955
|
+
nodeId: string(),
|
|
25956
|
+
deviceKey: string(),
|
|
25957
|
+
madeExplicit: boolean(),
|
|
25958
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25959
|
+
thresholds: array(object({
|
|
25960
|
+
stepId: string(),
|
|
25961
|
+
keys: array(string()).readonly()
|
|
25962
|
+
})).readonly()
|
|
25963
|
+
});
|
|
25964
|
+
var CameraOverrideClearSchema = object({
|
|
25965
|
+
deviceId: number(),
|
|
25966
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25967
|
+
nodeId: string(),
|
|
25968
|
+
deviceKey: string().nullable(),
|
|
25969
|
+
stepId: string(),
|
|
25970
|
+
modelIdBefore: string().nullable(),
|
|
25971
|
+
keys: array(string()).readonly()
|
|
25972
|
+
});
|
|
25973
|
+
var DetectorStoreClearSchema = object({
|
|
25974
|
+
deviceId: number(),
|
|
25975
|
+
keys: array(string()).readonly()
|
|
25976
|
+
});
|
|
25977
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25978
|
+
object({
|
|
25979
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25980
|
+
skippedNodes: array(string()).readonly()
|
|
25981
|
+
}),
|
|
25982
|
+
object({
|
|
25983
|
+
kind: literal("detector-store-unreadable"),
|
|
25984
|
+
error: string()
|
|
25985
|
+
}),
|
|
25986
|
+
object({
|
|
25987
|
+
kind: literal("coral-enabled"),
|
|
25988
|
+
nodeId: string(),
|
|
25989
|
+
deviceKey: string()
|
|
25990
|
+
}),
|
|
25991
|
+
object({
|
|
25992
|
+
kind: literal("custom-pin-kept"),
|
|
25993
|
+
nodeId: string(),
|
|
25994
|
+
deviceKey: string().nullable(),
|
|
25995
|
+
deviceId: number().nullable(),
|
|
25996
|
+
modelId: string()
|
|
25997
|
+
}),
|
|
25998
|
+
object({
|
|
25999
|
+
kind: literal("custom-registry-unreadable"),
|
|
26000
|
+
error: string()
|
|
26001
|
+
})
|
|
26002
|
+
]);
|
|
26003
|
+
var AutoTuneOptionsSchema = object({
|
|
26004
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
26005
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
26006
|
+
/**
|
|
26007
|
+
* The least number of parallel sessions every device must sustain at the
|
|
26008
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
26009
|
+
* that reaches it wins.
|
|
26010
|
+
*/
|
|
26011
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
26012
|
+
});
|
|
26013
|
+
var AutoTunePlanSchema = object({
|
|
26014
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
26015
|
+
planHash: string(),
|
|
26016
|
+
family: literal("yolov9"),
|
|
26017
|
+
headroom: number(),
|
|
26018
|
+
minSessionsPerDevice: number(),
|
|
26019
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
26020
|
+
cameraFps: number(),
|
|
26021
|
+
generatedAt: number(),
|
|
26022
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
26023
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
26024
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
26025
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
26026
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
26027
|
+
});
|
|
26028
|
+
var AutoTuneApplyInputSchema = object({
|
|
26029
|
+
planHash: string(),
|
|
26030
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
26031
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
26032
|
+
});
|
|
26033
|
+
var AutoTunePhaseResultSchema = object({
|
|
26034
|
+
phase: _enum([
|
|
26035
|
+
"download",
|
|
26036
|
+
"camera-overrides",
|
|
26037
|
+
"detector-thresholds",
|
|
26038
|
+
"node-models",
|
|
26039
|
+
"redispatch"
|
|
26040
|
+
]),
|
|
26041
|
+
ok: boolean(),
|
|
26042
|
+
detail: string()
|
|
26043
|
+
});
|
|
26044
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
26045
|
+
object({
|
|
26046
|
+
kind: literal("applied"),
|
|
26047
|
+
planHash: string(),
|
|
26048
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
26049
|
+
}),
|
|
26050
|
+
object({
|
|
26051
|
+
kind: literal("aborted"),
|
|
26052
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
26053
|
+
}),
|
|
26054
|
+
object({
|
|
26055
|
+
kind: literal("stale"),
|
|
26056
|
+
plan: AutoTunePlanSchema
|
|
26057
|
+
}),
|
|
26058
|
+
object({
|
|
26059
|
+
kind: literal("refused"),
|
|
26060
|
+
reason: _enum(["apply-in-progress"])
|
|
26061
|
+
})
|
|
26062
|
+
]);
|
|
26063
|
+
/**
|
|
26064
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
26065
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
26066
|
+
* hardware share suggestion and the stale device pins.
|
|
26067
|
+
*/
|
|
26068
|
+
/**
|
|
26069
|
+
* How a new detection session picks its node and device.
|
|
26070
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
26071
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
26072
|
+
* weight only bites once a node already holds a session.
|
|
26073
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
26074
|
+
* full or drowning node yields to a free one (D748).
|
|
26075
|
+
*/
|
|
26076
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
26077
|
+
var LoadBalancingSharesInputSchema = object({
|
|
26078
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
26079
|
+
nodes: record(string(), number().positive()).default({}),
|
|
26080
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
26081
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
26082
|
+
});
|
|
26083
|
+
var PlacementStatsInputSchema = object({
|
|
26084
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
26085
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
26086
|
+
var PlacementDeviceStatsSchema = object({
|
|
26087
|
+
deviceKey: string(),
|
|
26088
|
+
/** Sessions running on this device now. */
|
|
26089
|
+
sessionsNow: number(),
|
|
26090
|
+
/** Sessions started on this device inside the window. */
|
|
26091
|
+
sessionsStarted: number(),
|
|
26092
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
26093
|
+
observedShare: number().nullable()
|
|
26094
|
+
});
|
|
26095
|
+
var PlacementNodeStatsSchema = object({
|
|
26096
|
+
nodeId: string(),
|
|
26097
|
+
sessionsNow: number(),
|
|
26098
|
+
sessionsStarted: number(),
|
|
26099
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
26100
|
+
observedShare: number().nullable(),
|
|
26101
|
+
/** Most sessions this node ran at once inside the window. */
|
|
26102
|
+
peakSessions: number(),
|
|
26103
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
26104
|
+
yieldsAway: number(),
|
|
26105
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
26106
|
+
});
|
|
26107
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
26108
|
+
var StaleDevicePinSchema = object({
|
|
26109
|
+
deviceId: number(),
|
|
26110
|
+
deviceKey: string(),
|
|
26111
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
26112
|
+
reason: _enum(["disabled", "absent"])
|
|
26113
|
+
});
|
|
26114
|
+
var PlacementStatsSchema = object({
|
|
26115
|
+
policy: SessionPlacementPolicySchema,
|
|
26116
|
+
windowMs: number(),
|
|
26117
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
26118
|
+
observedForMs: number(),
|
|
26119
|
+
sessionsNow: number(),
|
|
26120
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
26121
|
+
clusterPeakSessions: number(),
|
|
26122
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
26123
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
26124
|
+
});
|
|
26125
|
+
/**
|
|
26126
|
+
* Where an automatic share's capacity comes from (D755).
|
|
26127
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
26128
|
+
* the measured latency table for the node's hardware class.
|
|
26129
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
26130
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
26131
|
+
*/
|
|
26132
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
26133
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
26134
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
26135
|
+
var SuggestSharesInputSchema = object({
|
|
26136
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
26137
|
+
/** Default `hardware`. */
|
|
26138
|
+
source: CapacitySourceSchema.default("hardware")
|
|
26139
|
+
});
|
|
26140
|
+
var SuggestedDeviceShareSchema = object({
|
|
26141
|
+
deviceKey: string(),
|
|
26142
|
+
/** Share of the node (0–100, rounded). */
|
|
26143
|
+
share: number(),
|
|
26144
|
+
modelId: string().nullable(),
|
|
26145
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
26146
|
+
fps: number().nullable(),
|
|
26147
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
26148
|
+
measured: boolean(),
|
|
26149
|
+
/**
|
|
26150
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
26151
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
26152
|
+
*/
|
|
26153
|
+
suggestedMaxSessions: number().nullable()
|
|
26154
|
+
});
|
|
26155
|
+
var SuggestedNodeShareSchema = object({
|
|
26156
|
+
nodeId: string(),
|
|
26157
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
26158
|
+
share: number().nullable(),
|
|
26159
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
26160
|
+
capacitySessions: number(),
|
|
26161
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
26162
|
+
skippedReason: string().nullable(),
|
|
26163
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
26164
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
26165
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
26166
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
26167
|
+
});
|
|
26168
|
+
var SuggestSharesResultSchema = object({
|
|
26169
|
+
headroom: number(),
|
|
26170
|
+
/** The source asked for; each node says what it actually used. */
|
|
26171
|
+
source: CapacitySourceSchema,
|
|
26172
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
26173
|
+
cameraFps: number(),
|
|
26174
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
26175
|
+
minSessionsPerDevice: number(),
|
|
26176
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
26177
|
+
});
|
|
26178
|
+
/**
|
|
26179
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
26180
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
26181
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
26182
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
26183
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
26184
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
26185
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
26186
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
26187
|
+
* - `manual` — the operator's stored sliders.
|
|
26188
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
26189
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
26190
|
+
*/
|
|
26191
|
+
var ShareSourceSchema = _enum([
|
|
26192
|
+
"hardware",
|
|
26193
|
+
"benchmark",
|
|
26194
|
+
"manual"
|
|
26195
|
+
]);
|
|
26196
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
26197
|
+
object({
|
|
26198
|
+
nodes: record(string(), number()),
|
|
26199
|
+
devices: record(string(), record(string(), number()))
|
|
26200
|
+
});
|
|
26201
|
+
var EffectiveDeviceShareSchema = object({
|
|
26202
|
+
deviceKey: string(),
|
|
26203
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
26204
|
+
eligible: boolean(),
|
|
26205
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
26206
|
+
configuredPct: number(),
|
|
26207
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
26208
|
+
effectivePct: number()
|
|
26209
|
+
});
|
|
26210
|
+
var EffectiveNodeShareSchema = object({
|
|
26211
|
+
nodeId: string(),
|
|
26212
|
+
eligible: boolean(),
|
|
26213
|
+
configuredPct: number(),
|
|
26214
|
+
effectivePct: number(),
|
|
26215
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
26216
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
26217
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
26218
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
26219
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
26220
|
+
});
|
|
26221
|
+
var EffectiveSharesSchema = object({
|
|
26222
|
+
source: ShareSourceSchema,
|
|
26223
|
+
policy: SessionPlacementPolicySchema,
|
|
26224
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
26225
|
+
autoPending: boolean(),
|
|
26226
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
26227
|
+
computedAt: number().nullable(),
|
|
26228
|
+
/** What made the system recompute them last. */
|
|
26229
|
+
trigger: string().nullable(),
|
|
26230
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
26231
|
+
/** The relative weights the election reads (before eligibility). */
|
|
26232
|
+
nodeWeights: record(string(), number()),
|
|
26233
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
26234
|
+
});
|
|
26235
|
+
/**
|
|
26236
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
26237
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
26238
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
26239
|
+
* shares read.
|
|
26240
|
+
*
|
|
26241
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
26242
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
26243
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
26244
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
26245
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
26246
|
+
*
|
|
26247
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
26248
|
+
* cross a process at frame rate, D9):
|
|
26249
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
26250
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
26251
|
+
* interval;
|
|
26252
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
26253
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
26254
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
26255
|
+
* CPU, RAM or the event loop give out.
|
|
26256
|
+
*/
|
|
26257
|
+
/** Defaults and bounds, one place. */
|
|
26258
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
26259
|
+
fpsPerStream: 10,
|
|
26260
|
+
budgetMinutes: 45,
|
|
26261
|
+
minBudgetMinutes: 10,
|
|
26262
|
+
maxBudgetMinutes: 120,
|
|
26263
|
+
/** A result older than this no longer beats the table. */
|
|
26264
|
+
staleAfterDays: 30,
|
|
26265
|
+
/** Warm-in per ramp step (not accounted). */
|
|
26266
|
+
settleSec: 5,
|
|
26267
|
+
/** Accounted window per ramp step. */
|
|
26268
|
+
measureSec: 20,
|
|
26269
|
+
/** Longest the drain may take before the run is refused. */
|
|
26270
|
+
drainTimeoutSec: 120,
|
|
26271
|
+
/** Candidate models per device in one run. */
|
|
26272
|
+
maxModelsPerDevice: 6
|
|
26273
|
+
};
|
|
26274
|
+
/** The two measurements a run can make. */
|
|
26275
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
26276
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
26277
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
26278
|
+
deviceKey: string().min(1),
|
|
26279
|
+
/**
|
|
26280
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
26281
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
26282
|
+
*/
|
|
26283
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
26284
|
+
});
|
|
26285
|
+
/** What the operator confirmed. */
|
|
26286
|
+
var NodeBenchmarkPlanSchema = object({
|
|
26287
|
+
nodeId: string().min(1),
|
|
26288
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
26289
|
+
/** Which measurements run. At least one. */
|
|
26290
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
26291
|
+
/**
|
|
26292
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
26293
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
26294
|
+
* detector always runs.
|
|
26295
|
+
*/
|
|
26296
|
+
steps: array(string().min(1)).default([]),
|
|
26297
|
+
/** Offered rate of one stream / session. */
|
|
26298
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
26299
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
26300
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
26301
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
26302
|
+
keepDownloadedModels: boolean().default(false),
|
|
26303
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
26304
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
26305
|
+
});
|
|
26306
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
26307
|
+
kind: _enum([
|
|
26308
|
+
"benchmark-active",
|
|
26309
|
+
"node-offline",
|
|
26310
|
+
"unknown-device",
|
|
26311
|
+
"no-phase",
|
|
26312
|
+
"insufficient-headroom"
|
|
26313
|
+
]),
|
|
26314
|
+
detail: string(),
|
|
26315
|
+
overridable: boolean()
|
|
26316
|
+
});
|
|
26317
|
+
/** A camera whose detection leaves the node for the run. */
|
|
26318
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
26319
|
+
deviceId: number(),
|
|
26320
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
26321
|
+
placedOnNode: boolean(),
|
|
26322
|
+
/** A node pin naming this node, ignored for the run. */
|
|
26323
|
+
pinnedToNode: boolean()
|
|
26324
|
+
});
|
|
26325
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
26326
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
26327
|
+
deviceId: number(),
|
|
26328
|
+
reason: literal("only-frame-source")
|
|
26329
|
+
});
|
|
26330
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
26331
|
+
nodeId: string(),
|
|
26332
|
+
online: boolean(),
|
|
26333
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
26334
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
26335
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
26336
|
+
estimatedDurationMs: number(),
|
|
26337
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
26338
|
+
budgetMs: number(),
|
|
26339
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
26340
|
+
steps: array(string()).readonly(),
|
|
26341
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
26342
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
26343
|
+
headroom: object({
|
|
26344
|
+
sessionsNow: number(),
|
|
26345
|
+
otherNodesCapacitySessions: number().nullable()
|
|
26346
|
+
}),
|
|
26347
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
26348
|
+
canStart: boolean()
|
|
26349
|
+
});
|
|
26350
|
+
/** Where the measuring runner is. */
|
|
26351
|
+
var NodeBenchProgressSchema = object({
|
|
26352
|
+
phase: _enum([
|
|
26353
|
+
"preparing",
|
|
26354
|
+
"device",
|
|
26355
|
+
"pipeline",
|
|
26356
|
+
"cleanup"
|
|
26357
|
+
]),
|
|
26358
|
+
deviceKey: string().nullable(),
|
|
26359
|
+
modelId: string().nullable(),
|
|
26360
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
26361
|
+
load: number().nullable(),
|
|
26362
|
+
cellsDone: number(),
|
|
26363
|
+
cellsTotal: number(),
|
|
26364
|
+
message: string()
|
|
26365
|
+
});
|
|
26366
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
26367
|
+
var NodeBenchLimitSchema = _enum([
|
|
26368
|
+
"p95",
|
|
26369
|
+
"drops",
|
|
26370
|
+
"errors",
|
|
26371
|
+
"stall",
|
|
26372
|
+
"cpu",
|
|
26373
|
+
"ram",
|
|
26374
|
+
"none"
|
|
26375
|
+
]);
|
|
26376
|
+
var NodeBenchRampStepSchema = object({
|
|
26377
|
+
load: number(),
|
|
26378
|
+
pass: boolean(),
|
|
26379
|
+
p95Ms: number(),
|
|
26380
|
+
dropRatio: number(),
|
|
26381
|
+
/** Completed frames per second over the accounted window. */
|
|
26382
|
+
fps: number(),
|
|
26383
|
+
cpuPct: number().nullable(),
|
|
26384
|
+
ramFreePct: number().nullable(),
|
|
26385
|
+
failReasons: array(string()).readonly()
|
|
26386
|
+
});
|
|
26387
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
26388
|
+
phase: literal("device"),
|
|
26389
|
+
deviceKey: string(),
|
|
26390
|
+
modelId: string(),
|
|
26391
|
+
/** Single-stream latency (the K = 1 step). */
|
|
26392
|
+
p50Ms: number(),
|
|
26393
|
+
p95Ms: number(),
|
|
26394
|
+
p99Ms: number(),
|
|
26395
|
+
/** Frames per second sustained at the last passing step. */
|
|
26396
|
+
fps: number(),
|
|
26397
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
26398
|
+
kMax: number(),
|
|
26399
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26400
|
+
/** First call (model load + warm-up). */
|
|
26401
|
+
warmupMs: number(),
|
|
26402
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26403
|
+
}), object({
|
|
26404
|
+
phase: literal("pipeline"),
|
|
26405
|
+
deviceKey: string(),
|
|
26406
|
+
modelId: string(),
|
|
26407
|
+
steps: array(string()).readonly(),
|
|
26408
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
26409
|
+
maxSessions: number(),
|
|
26410
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26411
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
26412
|
+
stepsFired: array(string()).readonly(),
|
|
26413
|
+
warmupMs: number(),
|
|
26414
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26415
|
+
})]);
|
|
26416
|
+
/**
|
|
26417
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
26418
|
+
* the node no longer beats the table.
|
|
26419
|
+
*/
|
|
26420
|
+
var NodeBenchFingerprintSchema = object({
|
|
26421
|
+
pipelineVersion: string().nullable(),
|
|
26422
|
+
cpuModel: string().nullable(),
|
|
26423
|
+
ramGb: number().nullable(),
|
|
26424
|
+
os: string().nullable(),
|
|
26425
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
26426
|
+
pools: record(string(), object({
|
|
26427
|
+
runtime: string(),
|
|
26428
|
+
numWorkers: number(),
|
|
26429
|
+
concurrency: number(),
|
|
26430
|
+
batchMode: string()
|
|
26431
|
+
})).default({})
|
|
26432
|
+
});
|
|
26433
|
+
/** The frames the run used. */
|
|
26434
|
+
var NodeBenchClipSchema = object({
|
|
26435
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
26436
|
+
id: string(),
|
|
26437
|
+
revision: string().nullable(),
|
|
26438
|
+
frames: number(),
|
|
26439
|
+
width: number(),
|
|
26440
|
+
height: number()
|
|
26441
|
+
});
|
|
26442
|
+
var NodeBenchRunnerInputSchema = object({
|
|
26443
|
+
runId: string().min(1),
|
|
26444
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
26445
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
26446
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
26447
|
+
steps: array(string()).default([]),
|
|
26448
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
26449
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
26450
|
+
deadlineAtMs: number(),
|
|
26451
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
26452
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
26453
|
+
keepDownloadedModels: boolean().default(false)
|
|
26454
|
+
});
|
|
26455
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
26456
|
+
"running",
|
|
26457
|
+
"done",
|
|
26458
|
+
"failed",
|
|
26459
|
+
"aborted"
|
|
26460
|
+
]);
|
|
26461
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
26462
|
+
runId: string(),
|
|
26463
|
+
nodeId: string(),
|
|
26464
|
+
state: NodeBenchRunnerStateSchema,
|
|
26465
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26466
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
26467
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
26468
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26469
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26470
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
26471
|
+
activeCameraIds: array(number()).readonly(),
|
|
26472
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
26473
|
+
deletedModels: array(string()).readonly(),
|
|
26474
|
+
error: string().nullable(),
|
|
26475
|
+
startedAtMs: number(),
|
|
26476
|
+
finishedAtMs: number().nullable()
|
|
26477
|
+
});
|
|
26478
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
26479
|
+
"draining",
|
|
26480
|
+
"measuring",
|
|
26481
|
+
"restoring",
|
|
26482
|
+
"done",
|
|
26483
|
+
"failed",
|
|
26484
|
+
"aborted"
|
|
26485
|
+
]);
|
|
26486
|
+
/** Why a run ended. */
|
|
26487
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
26488
|
+
"completed",
|
|
26489
|
+
"operator-abort",
|
|
26490
|
+
"deadline",
|
|
26491
|
+
"node-lost",
|
|
26492
|
+
"runner-lost",
|
|
26493
|
+
"hub-restart",
|
|
26494
|
+
"drain-timeout",
|
|
26495
|
+
"failed"
|
|
26496
|
+
]);
|
|
26497
|
+
var NodeBenchmarkRunSchema = object({
|
|
26498
|
+
runId: string(),
|
|
26499
|
+
nodeId: string(),
|
|
26500
|
+
state: NodeBenchmarkStateSchema,
|
|
26501
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26502
|
+
startedAtMs: number(),
|
|
26503
|
+
deadlineAtMs: number(),
|
|
26504
|
+
finishedAtMs: number().nullable(),
|
|
26505
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
26506
|
+
error: string().nullable(),
|
|
26507
|
+
/** Cameras moved off the node for the run. */
|
|
26508
|
+
moved: array(number()).readonly(),
|
|
26509
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
26510
|
+
staying: array(number()).readonly(),
|
|
26511
|
+
/** Something else ran on the node's pools during the run. */
|
|
26512
|
+
contaminated: boolean(),
|
|
26513
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26514
|
+
resultIds: array(string()).readonly()
|
|
26515
|
+
});
|
|
26516
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
26517
|
+
var NodeBenchmarkStatusSchema = object({
|
|
26518
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
26519
|
+
modeNodeId: string().nullable(),
|
|
26520
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
26521
|
+
});
|
|
26522
|
+
/**
|
|
26523
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
26524
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
26525
|
+
* ends, never by anyone else.
|
|
26526
|
+
*/
|
|
26527
|
+
var NodeBenchmarkResultSchema = object({
|
|
26528
|
+
id: string(),
|
|
26529
|
+
runId: string(),
|
|
26530
|
+
nodeId: string(),
|
|
26531
|
+
cell: NodeBenchCellSchema,
|
|
26532
|
+
fpsPerStream: number(),
|
|
26533
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26534
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26535
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
26536
|
+
contaminated: boolean(),
|
|
26537
|
+
stayingCameras: array(number()).readonly(),
|
|
26538
|
+
/** The run ended early; the cell itself completed. */
|
|
26539
|
+
partialRun: boolean(),
|
|
26540
|
+
measuredAtMs: number()
|
|
26541
|
+
});
|
|
26542
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
26543
|
+
nodeId: string().optional(),
|
|
26544
|
+
deviceKey: string().optional()
|
|
26545
|
+
});
|
|
26546
|
+
/** A result with its standing today: does it still beat the table? */
|
|
26547
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
26548
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
26549
|
+
standing: _enum([
|
|
26550
|
+
"fresh",
|
|
26551
|
+
"stale",
|
|
26552
|
+
"superseded"
|
|
26553
|
+
]),
|
|
26554
|
+
staleWhy: _enum([
|
|
26555
|
+
"age",
|
|
26556
|
+
"runtime",
|
|
26557
|
+
"pool-tuning"
|
|
26558
|
+
]).nullable()
|
|
26559
|
+
});
|
|
26560
|
+
object({
|
|
26561
|
+
runId: string(),
|
|
26562
|
+
nodeId: string(),
|
|
26563
|
+
startedAtMs: number(),
|
|
26564
|
+
deadlineAtMs: number(),
|
|
26565
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26566
|
+
moved: array(number()).readonly(),
|
|
26567
|
+
staying: array(number()).readonly()
|
|
26568
|
+
});
|
|
26569
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
26570
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
26571
|
+
nodeId: string(),
|
|
26572
|
+
reachable: boolean(),
|
|
26573
|
+
devices: array(object({
|
|
26574
|
+
deviceKey: string(),
|
|
26575
|
+
enabled: boolean(),
|
|
26576
|
+
available: boolean(),
|
|
26577
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
26578
|
+
suggested: array(string()).readonly(),
|
|
26579
|
+
/** Every root detector the device has a build for. */
|
|
26580
|
+
all: array(string()).readonly(),
|
|
26581
|
+
/** The model the device runs now, when pinned. */
|
|
26582
|
+
currentModelId: string().nullable()
|
|
26583
|
+
})).readonly(),
|
|
26584
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
26585
|
+
steps: array(object({
|
|
26586
|
+
id: string(),
|
|
26587
|
+
name: string(),
|
|
26588
|
+
slot: string()
|
|
26589
|
+
})).readonly()
|
|
26590
|
+
});
|
|
24609
26591
|
object({
|
|
24610
26592
|
activeCameras: number(),
|
|
24611
26593
|
throttledCameras: number(),
|
|
@@ -25523,14 +27505,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
25523
27505
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
25524
27506
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
25525
27507
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
25526
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
25527
|
-
* per
|
|
27508
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
27509
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
27510
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
27511
|
+
* (D762).
|
|
25528
27512
|
*/
|
|
25529
27513
|
devices: array(object({
|
|
25530
27514
|
deviceKey: string(),
|
|
25531
27515
|
backend: string(),
|
|
25532
|
-
attachedCameras: number()
|
|
25533
|
-
queueDepthTotal: number()
|
|
27516
|
+
attachedCameras: number()
|
|
25534
27517
|
})).default([]),
|
|
25535
27518
|
/** Hardware capability flags reported by this node. */
|
|
25536
27519
|
hardware: object({
|
|
@@ -25666,7 +27649,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25666
27649
|
*/
|
|
25667
27650
|
cropJpeg: string().optional(),
|
|
25668
27651
|
parent: DetailParentSchema,
|
|
25669
|
-
steps: array(string()).optional()
|
|
27652
|
+
steps: array(string()).optional(),
|
|
27653
|
+
/**
|
|
27654
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
27655
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
27656
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
27657
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
27658
|
+
* requested step infers as before.
|
|
27659
|
+
*/
|
|
27660
|
+
supplied: object({
|
|
27661
|
+
stepId: string(),
|
|
27662
|
+
modelId: string(),
|
|
27663
|
+
boxes: array(object({
|
|
27664
|
+
bbox: NativeCropBboxSchema,
|
|
27665
|
+
score: number()
|
|
27666
|
+
})).min(1)
|
|
27667
|
+
}).optional()
|
|
25670
27668
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
25671
27669
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
25672
27670
|
stepId: string(),
|
|
@@ -25718,7 +27716,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25718
27716
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
25719
27717
|
deviceId: number(),
|
|
25720
27718
|
trackId: string()
|
|
25721
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27719
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27720
|
+
accepted: literal(true),
|
|
27721
|
+
runId: string()
|
|
27722
|
+
}), {
|
|
27723
|
+
kind: "mutation",
|
|
27724
|
+
auth: "admin"
|
|
27725
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27726
|
+
kind: "mutation",
|
|
27727
|
+
auth: "admin"
|
|
27728
|
+
});
|
|
25722
27729
|
var CameraPipelineConfigSchema = object({
|
|
25723
27730
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
25724
27731
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -25729,14 +27736,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
25729
27736
|
settings: record(string(), unknown()).readonly().optional()
|
|
25730
27737
|
}).nullable().optional()
|
|
25731
27738
|
});
|
|
25732
|
-
var PipelineTemplateSchema = object({
|
|
25733
|
-
id: string(),
|
|
25734
|
-
name: string(),
|
|
25735
|
-
description: string().optional(),
|
|
25736
|
-
config: CameraPipelineConfigSchema,
|
|
25737
|
-
createdAt: string(),
|
|
25738
|
-
updatedAt: string()
|
|
25739
|
-
});
|
|
25740
27739
|
var DeviceStepConfigSchema = object({
|
|
25741
27740
|
modelId: string().optional(),
|
|
25742
27741
|
settings: record(string(), unknown()).optional(),
|
|
@@ -25810,9 +27809,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
25810
27809
|
modelId: string().optional(),
|
|
25811
27810
|
settings: record(string(), unknown()).readonly().optional()
|
|
25812
27811
|
});
|
|
27812
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
25813
27813
|
var CameraPipelineSettingsSchema = object({
|
|
25814
|
-
pinnedAgentNodeId: string().optional(),
|
|
25815
27814
|
stepToggles: record(string(), boolean()).optional(),
|
|
27815
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
25816
27816
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
25817
27817
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25818
27818
|
});
|
|
@@ -25845,7 +27845,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25845
27845
|
});
|
|
25846
27846
|
/**
|
|
25847
27847
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25848
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27848
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27849
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27850
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27851
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25849
27852
|
*/
|
|
25850
27853
|
var AgentLoadSummarySchema = object({
|
|
25851
27854
|
nodeId: string(),
|
|
@@ -25934,26 +27937,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25934
27937
|
width: number(),
|
|
25935
27938
|
height: number(),
|
|
25936
27939
|
subscribers: number(),
|
|
25937
|
-
|
|
25938
|
-
|
|
27940
|
+
/**
|
|
27941
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27942
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27943
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27944
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27945
|
+
* camera and is not served (D758).
|
|
27946
|
+
*/
|
|
27947
|
+
inFps: number().nullable()
|
|
25939
27948
|
})).readonly(),
|
|
25940
27949
|
webrtcSessions: number(),
|
|
25941
27950
|
rtspRestream: boolean()
|
|
25942
27951
|
});
|
|
25943
|
-
/**
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
var CameraDecoderStatusSchema = object({
|
|
25952
|
-
nodeId: string(),
|
|
25953
|
-
formats: array(string()).readonly(),
|
|
25954
|
-
sessionCount: number(),
|
|
25955
|
-
shm: CameraDecoderShmSchema
|
|
25956
|
-
});
|
|
27952
|
+
/**
|
|
27953
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27954
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27955
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27956
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27957
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27958
|
+
* detector), never from a counter nothing feeds.
|
|
27959
|
+
*/
|
|
27960
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25957
27961
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25958
27962
|
var CameraMotionStatusSchema = object({
|
|
25959
27963
|
enabled: boolean(),
|
|
@@ -26310,12 +28314,6 @@ method(object({
|
|
|
26310
28314
|
}), object({ success: literal(true) }), {
|
|
26311
28315
|
kind: "mutation",
|
|
26312
28316
|
auth: "admin"
|
|
26313
|
-
}), method(object({
|
|
26314
|
-
agentNodeId: string(),
|
|
26315
|
-
detectWeight: number().positive().nullable()
|
|
26316
|
-
}), object({ success: literal(true) }), {
|
|
26317
|
-
kind: "mutation",
|
|
26318
|
-
auth: "admin"
|
|
26319
28317
|
}), method(object({
|
|
26320
28318
|
agentNodeId: string(),
|
|
26321
28319
|
detect: boolean().nullable().optional(),
|
|
@@ -26357,6 +28355,30 @@ method(object({
|
|
|
26357
28355
|
}), {
|
|
26358
28356
|
kind: "mutation",
|
|
26359
28357
|
auth: "admin"
|
|
28358
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
28359
|
+
kind: "mutation",
|
|
28360
|
+
auth: "admin"
|
|
28361
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
28362
|
+
kind: "mutation",
|
|
28363
|
+
auth: "admin"
|
|
28364
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
28365
|
+
kind: "mutation",
|
|
28366
|
+
auth: "admin"
|
|
28367
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
28368
|
+
kind: literal("started"),
|
|
28369
|
+
runId: string()
|
|
28370
|
+
}), object({
|
|
28371
|
+
kind: literal("refused"),
|
|
28372
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
28373
|
+
})]), {
|
|
28374
|
+
kind: "mutation",
|
|
28375
|
+
auth: "admin"
|
|
28376
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
28377
|
+
kind: "mutation",
|
|
28378
|
+
auth: "admin"
|
|
28379
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
28380
|
+
kind: "mutation",
|
|
28381
|
+
auth: "admin"
|
|
26360
28382
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
26361
28383
|
deviceId: number(),
|
|
26362
28384
|
addonId: string(),
|
|
@@ -26373,6 +28395,13 @@ method(object({
|
|
|
26373
28395
|
}), object({ success: literal(true) }), {
|
|
26374
28396
|
kind: "mutation",
|
|
26375
28397
|
auth: "admin"
|
|
28398
|
+
}), method(object({
|
|
28399
|
+
deviceId: number(),
|
|
28400
|
+
addonId: string(),
|
|
28401
|
+
settings: record(string(), unknown()).nullable()
|
|
28402
|
+
}), object({ success: literal(true) }), {
|
|
28403
|
+
kind: "mutation",
|
|
28404
|
+
auth: "admin"
|
|
26376
28405
|
}), method(object({
|
|
26377
28406
|
deviceId: number(),
|
|
26378
28407
|
agentNodeId: string(),
|
|
@@ -26396,25 +28425,7 @@ method(object({
|
|
|
26396
28425
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
26397
28426
|
kind: "mutation",
|
|
26398
28427
|
auth: "admin"
|
|
26399
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
26400
|
-
name: string(),
|
|
26401
|
-
description: string().optional(),
|
|
26402
|
-
config: CameraPipelineConfigSchema
|
|
26403
|
-
}), PipelineTemplateSchema, {
|
|
26404
|
-
kind: "mutation",
|
|
26405
|
-
auth: "admin"
|
|
26406
|
-
}), method(object({
|
|
26407
|
-
id: string(),
|
|
26408
|
-
name: string().optional(),
|
|
26409
|
-
description: string().optional(),
|
|
26410
|
-
config: CameraPipelineConfigSchema.optional()
|
|
26411
|
-
}), PipelineTemplateSchema, {
|
|
26412
|
-
kind: "mutation",
|
|
26413
|
-
auth: "admin"
|
|
26414
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
26415
|
-
kind: "mutation",
|
|
26416
|
-
auth: "admin"
|
|
26417
|
-
});
|
|
28428
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
26418
28429
|
/**
|
|
26419
28430
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
26420
28431
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -27004,7 +29015,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
27004
29015
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
27005
29016
|
* operator already consented to.
|
|
27006
29017
|
*/
|
|
27007
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
29018
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
29019
|
+
/**
|
|
29020
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
29021
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
29022
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
29023
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
29024
|
+
*/
|
|
29025
|
+
linkIntent: string().optional(),
|
|
29026
|
+
/**
|
|
29027
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
29028
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
29029
|
+
*/
|
|
29030
|
+
issuer: string().optional()
|
|
27008
29031
|
});
|
|
27009
29032
|
method(object({
|
|
27010
29033
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28663,8 +30686,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
28663
30686
|
]).nullable(),
|
|
28664
30687
|
/** Input FPS from the camera (null for adaptive). */
|
|
28665
30688
|
inputFps: number().nullable(),
|
|
28666
|
-
/** Decoded FPS (null for adaptive). */
|
|
28667
|
-
decodeFps: number().nullable(),
|
|
28668
30689
|
/** Bitrate in kbps (null for adaptive). */
|
|
28669
30690
|
bitrateKbps: number().nullable()
|
|
28670
30691
|
});
|
|
@@ -28941,7 +30962,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28941
30962
|
* field their hints were silently stripped by the schema and the
|
|
28942
30963
|
* adaptive ladder started blind on the client's display size.
|
|
28943
30964
|
*/
|
|
28944
|
-
hints: webrtcClientHintsSchema.optional()
|
|
30965
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
30966
|
+
/**
|
|
30967
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
30968
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
30969
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
30970
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
30971
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
30972
|
+
*
|
|
30973
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
30974
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
30975
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
30976
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
30977
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
30978
|
+
* flag must not become a second door to the camera's speaker.
|
|
30979
|
+
*/
|
|
30980
|
+
talkback: boolean().optional()
|
|
28945
30981
|
}), object({
|
|
28946
30982
|
sessionId: string(),
|
|
28947
30983
|
sdpAnswer: string()
|
|
@@ -28996,6 +31032,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28996
31032
|
*/
|
|
28997
31033
|
alive: boolean()
|
|
28998
31034
|
})), method(object({
|
|
31035
|
+
deviceId: number().int().nonnegative(),
|
|
31036
|
+
sessionId: string(),
|
|
31037
|
+
downlinkMbps: number().nonnegative()
|
|
31038
|
+
}), object({
|
|
31039
|
+
outcome: _enum(["switching", "held"]),
|
|
31040
|
+
tier: CamProfileSchema.nullable(),
|
|
31041
|
+
reason: string()
|
|
31042
|
+
}), { kind: "mutation" }), method(object({
|
|
28999
31043
|
deviceId: number().int().nonnegative(),
|
|
29000
31044
|
sessionId: string()
|
|
29001
31045
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -29235,6 +31279,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
29235
31279
|
var RestartAddonResultSchema = unknown();
|
|
29236
31280
|
var InstallPackageResultSchema = unknown();
|
|
29237
31281
|
var ReloadPackagesResultSchema = unknown();
|
|
31282
|
+
/**
|
|
31283
|
+
* What an uninstall did on ONE node.
|
|
31284
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
31285
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
31286
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
31287
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
31288
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
31289
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
31290
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
31291
|
+
*/
|
|
31292
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
31293
|
+
"uninstalled",
|
|
31294
|
+
"not-installed",
|
|
31295
|
+
"refused",
|
|
31296
|
+
"failed",
|
|
31297
|
+
"pending-reconnect"
|
|
31298
|
+
]);
|
|
31299
|
+
var UninstallNodeResultSchema = object({
|
|
31300
|
+
nodeId: string(),
|
|
31301
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
31302
|
+
error: string().optional(),
|
|
31303
|
+
addonIds: array(string()).readonly(),
|
|
31304
|
+
runnersStopped: array(string()).readonly(),
|
|
31305
|
+
warnings: array(string()).readonly()
|
|
31306
|
+
});
|
|
31307
|
+
var UninstallPackageResultSchema = object({
|
|
31308
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
31309
|
+
success: boolean(),
|
|
31310
|
+
packageName: string(),
|
|
31311
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
31312
|
+
});
|
|
31313
|
+
/**
|
|
31314
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
31315
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
31316
|
+
*/
|
|
31317
|
+
var PackageInstallationsSchema = object({
|
|
31318
|
+
installations: array(object({
|
|
31319
|
+
packageName: string(),
|
|
31320
|
+
nodeId: string(),
|
|
31321
|
+
nodeName: string(),
|
|
31322
|
+
isHub: boolean(),
|
|
31323
|
+
isOnline: boolean(),
|
|
31324
|
+
version: string().nullable(),
|
|
31325
|
+
addonIds: array(string()).readonly(),
|
|
31326
|
+
source: _enum(["live", "recorded"]),
|
|
31327
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
31328
|
+
onHub: boolean()
|
|
31329
|
+
})).readonly(),
|
|
31330
|
+
unreachable: array(object({
|
|
31331
|
+
nodeId: string(),
|
|
31332
|
+
error: string()
|
|
31333
|
+
})).readonly()
|
|
31334
|
+
});
|
|
29238
31335
|
var BulkUpdateItemStatusSchema = _enum([
|
|
29239
31336
|
"queued",
|
|
29240
31337
|
"updating",
|
|
@@ -29317,10 +31414,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
29317
31414
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
29318
31415
|
kind: "mutation",
|
|
29319
31416
|
auth: "admin"
|
|
29320
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31417
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31418
|
+
packageName: string().min(1),
|
|
31419
|
+
nodeId: string().optional(),
|
|
31420
|
+
everywhere: boolean().optional()
|
|
31421
|
+
}), UninstallPackageResultSchema, {
|
|
29321
31422
|
kind: "mutation",
|
|
29322
31423
|
auth: "admin"
|
|
29323
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
31424
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
29324
31425
|
kind: "mutation",
|
|
29325
31426
|
auth: "admin"
|
|
29326
31427
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -32393,6 +34494,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
32393
34494
|
enabled: boolean().optional(),
|
|
32394
34495
|
info: record(string(), unknown()).optional(),
|
|
32395
34496
|
settings: record(string(), unknown()).optional(),
|
|
34497
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
34498
|
+
* the keychain, not the table (D787). */
|
|
34499
|
+
secretKeys: array(string()).optional(),
|
|
32396
34500
|
skipRestart: boolean().optional()
|
|
32397
34501
|
});
|
|
32398
34502
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -32416,7 +34520,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
32416
34520
|
auth: "admin"
|
|
32417
34521
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
32418
34522
|
id: string(),
|
|
32419
|
-
settings: record(string(), unknown())
|
|
34523
|
+
settings: record(string(), unknown()),
|
|
34524
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
34525
|
+
secretKeys: array(string()).optional()
|
|
32420
34526
|
}), object({ success: boolean() }), {
|
|
32421
34527
|
kind: "mutation",
|
|
32422
34528
|
auth: "admin"
|
|
@@ -32815,7 +34921,8 @@ var ConnectionEndpointSchema = object({
|
|
|
32815
34921
|
"lan-ipv6",
|
|
32816
34922
|
"public",
|
|
32817
34923
|
"loopback",
|
|
32818
|
-
"app-link"
|
|
34924
|
+
"app-link",
|
|
34925
|
+
"custom"
|
|
32819
34926
|
]),
|
|
32820
34927
|
/**
|
|
32821
34928
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -32884,7 +34991,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
32884
34991
|
localPort: AdvertisedLocalPortSchema
|
|
32885
34992
|
});
|
|
32886
34993
|
/**
|
|
32887
|
-
* The address flagged for notification
|
|
34994
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
32888
34995
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
32889
34996
|
* so the UI can show it either way.
|
|
32890
34997
|
*/
|
|
@@ -32917,6 +35024,72 @@ var ViewerEndpointsSchema = object({
|
|
|
32917
35024
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
32918
35025
|
resolved: array(string()).readonly()
|
|
32919
35026
|
});
|
|
35027
|
+
/**
|
|
35028
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
35029
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
35030
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
35031
|
+
*/
|
|
35032
|
+
var HubAddressSnapshotSchema = object({
|
|
35033
|
+
override: string().nullable(),
|
|
35034
|
+
resolved: string().nullable(),
|
|
35035
|
+
source: _enum([
|
|
35036
|
+
"override",
|
|
35037
|
+
"auto",
|
|
35038
|
+
"none"
|
|
35039
|
+
])
|
|
35040
|
+
});
|
|
35041
|
+
var HubAddressesSchema = object({
|
|
35042
|
+
cluster: HubAddressSnapshotSchema,
|
|
35043
|
+
browser: HubAddressSnapshotSchema
|
|
35044
|
+
});
|
|
35045
|
+
/**
|
|
35046
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
35047
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
35048
|
+
* by at most one address.
|
|
35049
|
+
*/
|
|
35050
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
35051
|
+
var RoleSourceSchema = _enum([
|
|
35052
|
+
"flagged",
|
|
35053
|
+
"auto",
|
|
35054
|
+
"none"
|
|
35055
|
+
]);
|
|
35056
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
35057
|
+
var HubAddressRoleResolutionSchema = object({
|
|
35058
|
+
/** The address carrying the flag, or null = automatic. */
|
|
35059
|
+
flagged: string().nullable(),
|
|
35060
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
35061
|
+
resolved: string().nullable(),
|
|
35062
|
+
source: RoleSourceSchema
|
|
35063
|
+
});
|
|
35064
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
35065
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
35066
|
+
flagged: array(string()).readonly(),
|
|
35067
|
+
/** What the apps race right now. */
|
|
35068
|
+
resolved: array(string()).readonly(),
|
|
35069
|
+
source: RoleSourceSchema
|
|
35070
|
+
});
|
|
35071
|
+
var HubAddressBookSchema = object({
|
|
35072
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
35073
|
+
/** In the hub's detected palette right now. */
|
|
35074
|
+
detected: boolean(),
|
|
35075
|
+
/** Entered by the operator (removable). */
|
|
35076
|
+
custom: boolean(),
|
|
35077
|
+
/** The roles explicitly flagged on this address. */
|
|
35078
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
35079
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
35080
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
35081
|
+
/** The roles this address may be flagged with. */
|
|
35082
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
35083
|
+
})).readonly(),
|
|
35084
|
+
roles: object({
|
|
35085
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
35086
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
35087
|
+
internal: HubAddressRoleResolutionSchema,
|
|
35088
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
35089
|
+
}),
|
|
35090
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
35091
|
+
appLinkHub: string().nullable()
|
|
35092
|
+
});
|
|
32920
35093
|
var AllowedAddressesSchema = object({
|
|
32921
35094
|
/**
|
|
32922
35095
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -32960,10 +35133,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
32960
35133
|
* tunnel always emits `https://` regardless. */
|
|
32961
35134
|
scheme: _enum(["http", "https"]).optional(),
|
|
32962
35135
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
32963
|
-
* an address notification
|
|
35136
|
+
* an address notification taps can be flagged with, not a hub
|
|
32964
35137
|
* route. Default `false`: racers and rankers never see it. */
|
|
32965
35138
|
includeAppLink: boolean().optional()
|
|
32966
|
-
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(
|
|
35139
|
+
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
|
|
35140
|
+
baseUrl: string(),
|
|
35141
|
+
label: string().max(80)
|
|
35142
|
+
}), HubAddressBookSchema, {
|
|
35143
|
+
kind: "mutation",
|
|
35144
|
+
auth: "admin"
|
|
35145
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
35146
|
+
kind: "mutation",
|
|
35147
|
+
auth: "admin"
|
|
35148
|
+
}), method(object({
|
|
35149
|
+
role: HubAddressRoleSchema,
|
|
35150
|
+
baseUrl: string().nullable(),
|
|
35151
|
+
enabled: boolean(),
|
|
35152
|
+
acceptInsecureHttp: boolean().optional()
|
|
35153
|
+
}), HubAddressBookSchema, {
|
|
35154
|
+
kind: "mutation",
|
|
35155
|
+
auth: "admin"
|
|
35156
|
+
}), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
|
|
32967
35157
|
kind: "mutation",
|
|
32968
35158
|
auth: "admin"
|
|
32969
35159
|
}), method(object({
|
|
@@ -33421,7 +35611,8 @@ var MotionStatusSchema = object({
|
|
|
33421
35611
|
* writes this slice (not even a boot seed), and neither does the runner's
|
|
33422
35612
|
* phase machine: its phase is "a session is attached" for every on-motion
|
|
33423
35613
|
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
33424
|
-
* A provider's `isDetected`
|
|
35614
|
+
* A provider's `isDetected` and `getStatus` answer from the hub's slice
|
|
35615
|
+
* (`hubMotionNativeProvider`).
|
|
33425
35616
|
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
33426
35617
|
* imports) — the provider pushes both edges itself, from the upstream
|
|
33427
35618
|
* system's own state change. That is the sensor's own fact.
|
|
@@ -39153,6 +41344,32 @@ var TotpStatusSchema = object({
|
|
|
39153
41344
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
39154
41345
|
confirmedAt: number().nullable()
|
|
39155
41346
|
});
|
|
41347
|
+
/**
|
|
41348
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
41349
|
+
* and scoped tokens.
|
|
41350
|
+
*
|
|
41351
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
41352
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
41353
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
41354
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
41355
|
+
* provider.
|
|
41356
|
+
*/
|
|
41357
|
+
var ExternalIdentitySchema = object({
|
|
41358
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
41359
|
+
provider: string(),
|
|
41360
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
41361
|
+
subject: string(),
|
|
41362
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
41363
|
+
issuer: string(),
|
|
41364
|
+
userId: string(),
|
|
41365
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
41366
|
+
label: string().optional(),
|
|
41367
|
+
linkedAt: number()
|
|
41368
|
+
});
|
|
41369
|
+
var ExternalIdentityKeySchema = object({
|
|
41370
|
+
provider: string().min(1),
|
|
41371
|
+
subject: string().min(1)
|
|
41372
|
+
});
|
|
39156
41373
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
39157
41374
|
kind: "mutation",
|
|
39158
41375
|
auth: "admin",
|
|
@@ -39266,7 +41483,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
39266
41483
|
userId: string(),
|
|
39267
41484
|
username: string(),
|
|
39268
41485
|
scopes: array(TokenScopeSchema)
|
|
39269
|
-
}).nullable(), { access: "view" }), method(
|
|
41486
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
41487
|
+
userId: string(),
|
|
41488
|
+
issuer: string()
|
|
41489
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
41490
|
+
userId: string(),
|
|
41491
|
+
issuer: string().min(1),
|
|
41492
|
+
label: string().optional()
|
|
41493
|
+
}), object({ success: literal(true) }), {
|
|
41494
|
+
kind: "mutation",
|
|
41495
|
+
auth: "admin",
|
|
41496
|
+
access: "create"
|
|
41497
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
41498
|
+
kind: "mutation",
|
|
41499
|
+
auth: "admin",
|
|
41500
|
+
access: "delete"
|
|
41501
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
39270
41502
|
kind: "mutation",
|
|
39271
41503
|
auth: "admin",
|
|
39272
41504
|
access: "delete"
|
|
@@ -39968,6 +42200,16 @@ var zoneRulesCapability = {
|
|
|
39968
42200
|
durability: "restored"
|
|
39969
42201
|
};
|
|
39970
42202
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
42203
|
+
Object.freeze({
|
|
42204
|
+
person: .5,
|
|
42205
|
+
vehicle: .5,
|
|
42206
|
+
animal: .5
|
|
42207
|
+
});
|
|
42208
|
+
Object.freeze({
|
|
42209
|
+
person: .65,
|
|
42210
|
+
vehicle: .65,
|
|
42211
|
+
animal: .65
|
|
42212
|
+
});
|
|
39971
42213
|
/**
|
|
39972
42214
|
* Accessory device helpers — shared across drivers.
|
|
39973
42215
|
*
|
|
@@ -40443,7 +42685,8 @@ var BaseDevice = class {
|
|
|
40443
42685
|
this.role = options.role;
|
|
40444
42686
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
40445
42687
|
const seedData = ctx.persistedConfig ?? {};
|
|
40446
|
-
|
|
42688
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
42689
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
40447
42690
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
40448
42691
|
tags: {
|
|
40449
42692
|
deviceId: ctx.id,
|
|
@@ -41666,6 +43909,12 @@ Object.freeze({
|
|
|
41666
43909
|
addonId: null,
|
|
41667
43910
|
access: "view"
|
|
41668
43911
|
},
|
|
43912
|
+
"addons.listInstallations": {
|
|
43913
|
+
capName: "addons",
|
|
43914
|
+
capScope: "system",
|
|
43915
|
+
addonId: null,
|
|
43916
|
+
access: "view"
|
|
43917
|
+
},
|
|
41669
43918
|
"addons.listJobs": {
|
|
41670
43919
|
capName: "addons",
|
|
41671
43920
|
capScope: "system",
|
|
@@ -42848,90 +45097,18 @@ Object.freeze({
|
|
|
42848
45097
|
addonId: null,
|
|
42849
45098
|
access: "create"
|
|
42850
45099
|
},
|
|
42851
|
-
"decoder.createSession": {
|
|
42852
|
-
capName: "decoder",
|
|
42853
|
-
capScope: "system",
|
|
42854
|
-
addonId: null,
|
|
42855
|
-
access: "view"
|
|
42856
|
-
},
|
|
42857
|
-
"decoder.destroySession": {
|
|
42858
|
-
capName: "decoder",
|
|
42859
|
-
capScope: "system",
|
|
42860
|
-
addonId: null,
|
|
42861
|
-
access: "delete"
|
|
42862
|
-
},
|
|
42863
|
-
"decoder.getFrame": {
|
|
42864
|
-
capName: "decoder",
|
|
42865
|
-
capScope: "system",
|
|
42866
|
-
addonId: null,
|
|
42867
|
-
access: "view"
|
|
42868
|
-
},
|
|
42869
45100
|
"decoder.getInfo": {
|
|
42870
45101
|
capName: "decoder",
|
|
42871
45102
|
capScope: "system",
|
|
42872
45103
|
addonId: null,
|
|
42873
45104
|
access: "view"
|
|
42874
45105
|
},
|
|
42875
|
-
"decoder.getShmStats": {
|
|
42876
|
-
capName: "decoder",
|
|
42877
|
-
capScope: "system",
|
|
42878
|
-
addonId: null,
|
|
42879
|
-
access: "view"
|
|
42880
|
-
},
|
|
42881
|
-
"decoder.getStats": {
|
|
42882
|
-
capName: "decoder",
|
|
42883
|
-
capScope: "system",
|
|
42884
|
-
addonId: null,
|
|
42885
|
-
access: "view"
|
|
42886
|
-
},
|
|
42887
|
-
"decoder.listActiveSessions": {
|
|
42888
|
-
capName: "decoder",
|
|
42889
|
-
capScope: "system",
|
|
42890
|
-
addonId: null,
|
|
42891
|
-
access: "view"
|
|
42892
|
-
},
|
|
42893
|
-
"decoder.openStream": {
|
|
42894
|
-
capName: "decoder",
|
|
42895
|
-
capScope: "system",
|
|
42896
|
-
addonId: null,
|
|
42897
|
-
access: "view"
|
|
42898
|
-
},
|
|
42899
|
-
"decoder.pullFrames": {
|
|
42900
|
-
capName: "decoder",
|
|
42901
|
-
capScope: "system",
|
|
42902
|
-
addonId: null,
|
|
42903
|
-
access: "view"
|
|
42904
|
-
},
|
|
42905
|
-
"decoder.pullHandles": {
|
|
42906
|
-
capName: "decoder",
|
|
42907
|
-
capScope: "system",
|
|
42908
|
-
addonId: null,
|
|
42909
|
-
access: "view"
|
|
42910
|
-
},
|
|
42911
|
-
"decoder.pushPacket": {
|
|
42912
|
-
capName: "decoder",
|
|
42913
|
-
capScope: "system",
|
|
42914
|
-
addonId: null,
|
|
42915
|
-
access: "view"
|
|
42916
|
-
},
|
|
42917
45106
|
"decoder.reprobeHwaccel": {
|
|
42918
45107
|
capName: "decoder",
|
|
42919
45108
|
capScope: "system",
|
|
42920
45109
|
addonId: null,
|
|
42921
45110
|
access: "create"
|
|
42922
45111
|
},
|
|
42923
|
-
"decoder.supportsCodec": {
|
|
42924
|
-
capName: "decoder",
|
|
42925
|
-
capScope: "system",
|
|
42926
|
-
addonId: null,
|
|
42927
|
-
access: "view"
|
|
42928
|
-
},
|
|
42929
|
-
"decoder.updateConfig": {
|
|
42930
|
-
capName: "decoder",
|
|
42931
|
-
capScope: "system",
|
|
42932
|
-
addonId: null,
|
|
42933
|
-
access: "view"
|
|
42934
|
-
},
|
|
42935
45112
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
42936
45113
|
capName: "detection-pipeline",
|
|
42937
45114
|
capScope: "device",
|
|
@@ -44198,6 +46375,90 @@ Object.freeze({
|
|
|
44198
46375
|
addonId: null,
|
|
44199
46376
|
access: "create"
|
|
44200
46377
|
},
|
|
46378
|
+
"keychain.delete": {
|
|
46379
|
+
capName: "keychain",
|
|
46380
|
+
capScope: "system",
|
|
46381
|
+
addonId: null,
|
|
46382
|
+
access: "delete"
|
|
46383
|
+
},
|
|
46384
|
+
"keychain.getState": {
|
|
46385
|
+
capName: "keychain",
|
|
46386
|
+
capScope: "system",
|
|
46387
|
+
addonId: null,
|
|
46388
|
+
access: "view"
|
|
46389
|
+
},
|
|
46390
|
+
"keychain.listMeta": {
|
|
46391
|
+
capName: "keychain",
|
|
46392
|
+
capScope: "system",
|
|
46393
|
+
addonId: null,
|
|
46394
|
+
access: "view"
|
|
46395
|
+
},
|
|
46396
|
+
"keychain.put": {
|
|
46397
|
+
capName: "keychain",
|
|
46398
|
+
capScope: "system",
|
|
46399
|
+
addonId: null,
|
|
46400
|
+
access: "create"
|
|
46401
|
+
},
|
|
46402
|
+
"keychain.resolve": {
|
|
46403
|
+
capName: "keychain",
|
|
46404
|
+
capScope: "system",
|
|
46405
|
+
addonId: null,
|
|
46406
|
+
access: "view"
|
|
46407
|
+
},
|
|
46408
|
+
"keychainAdmin.deleteOrphans": {
|
|
46409
|
+
capName: "keychain-admin",
|
|
46410
|
+
capScope: "system",
|
|
46411
|
+
addonId: null,
|
|
46412
|
+
access: "delete"
|
|
46413
|
+
},
|
|
46414
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
46415
|
+
capName: "keychain-admin",
|
|
46416
|
+
capScope: "system",
|
|
46417
|
+
addonId: null,
|
|
46418
|
+
access: "create"
|
|
46419
|
+
},
|
|
46420
|
+
"keychainAdmin.listAudit": {
|
|
46421
|
+
capName: "keychain-admin",
|
|
46422
|
+
capScope: "system",
|
|
46423
|
+
addonId: null,
|
|
46424
|
+
access: "view"
|
|
46425
|
+
},
|
|
46426
|
+
"keychainAdmin.listSecrets": {
|
|
46427
|
+
capName: "keychain-admin",
|
|
46428
|
+
capScope: "system",
|
|
46429
|
+
addonId: null,
|
|
46430
|
+
access: "view"
|
|
46431
|
+
},
|
|
46432
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
46433
|
+
capName: "keychain-admin",
|
|
46434
|
+
capScope: "system",
|
|
46435
|
+
addonId: null,
|
|
46436
|
+
access: "delete"
|
|
46437
|
+
},
|
|
46438
|
+
"keychainAdmin.resetKeychain": {
|
|
46439
|
+
capName: "keychain-admin",
|
|
46440
|
+
capScope: "system",
|
|
46441
|
+
addonId: null,
|
|
46442
|
+
access: "delete"
|
|
46443
|
+
},
|
|
46444
|
+
"keychainAdmin.reveal": {
|
|
46445
|
+
capName: "keychain-admin",
|
|
46446
|
+
capScope: "system",
|
|
46447
|
+
addonId: null,
|
|
46448
|
+
access: "create"
|
|
46449
|
+
},
|
|
46450
|
+
"keychainAdmin.rotateMasterKey": {
|
|
46451
|
+
capName: "keychain-admin",
|
|
46452
|
+
capScope: "system",
|
|
46453
|
+
addonId: null,
|
|
46454
|
+
access: "create"
|
|
46455
|
+
},
|
|
46456
|
+
"keychainAdmin.status": {
|
|
46457
|
+
capName: "keychain-admin",
|
|
46458
|
+
capScope: "system",
|
|
46459
|
+
addonId: null,
|
|
46460
|
+
access: "view"
|
|
46461
|
+
},
|
|
44201
46462
|
"lawnMowerControl.dock": {
|
|
44202
46463
|
capName: "lawn-mower-control",
|
|
44203
46464
|
capScope: "device",
|
|
@@ -44420,12 +46681,24 @@ Object.freeze({
|
|
|
44420
46681
|
addonId: null,
|
|
44421
46682
|
access: "view"
|
|
44422
46683
|
},
|
|
46684
|
+
"localNetwork.addCustomAddress": {
|
|
46685
|
+
capName: "local-network",
|
|
46686
|
+
capScope: "system",
|
|
46687
|
+
addonId: null,
|
|
46688
|
+
access: "create"
|
|
46689
|
+
},
|
|
44423
46690
|
"localNetwork.downloadCa": {
|
|
44424
46691
|
capName: "local-network",
|
|
44425
46692
|
capScope: "system",
|
|
44426
46693
|
addonId: null,
|
|
44427
46694
|
access: "view"
|
|
44428
46695
|
},
|
|
46696
|
+
"localNetwork.getAddresses": {
|
|
46697
|
+
capName: "local-network",
|
|
46698
|
+
capScope: "system",
|
|
46699
|
+
addonId: null,
|
|
46700
|
+
access: "view"
|
|
46701
|
+
},
|
|
44429
46702
|
"localNetwork.getAllowedAddresses": {
|
|
44430
46703
|
capName: "local-network",
|
|
44431
46704
|
capScope: "system",
|
|
@@ -44438,6 +46711,12 @@ Object.freeze({
|
|
|
44438
46711
|
addonId: null,
|
|
44439
46712
|
access: "view"
|
|
44440
46713
|
},
|
|
46714
|
+
"localNetwork.getHubAddresses": {
|
|
46715
|
+
capName: "local-network",
|
|
46716
|
+
capScope: "system",
|
|
46717
|
+
addonId: null,
|
|
46718
|
+
access: "view"
|
|
46719
|
+
},
|
|
44441
46720
|
"localNetwork.getNotificationEndpoint": {
|
|
44442
46721
|
capName: "local-network",
|
|
44443
46722
|
capScope: "system",
|
|
@@ -44474,6 +46753,12 @@ Object.freeze({
|
|
|
44474
46753
|
addonId: null,
|
|
44475
46754
|
access: "create"
|
|
44476
46755
|
},
|
|
46756
|
+
"localNetwork.removeCustomAddress": {
|
|
46757
|
+
capName: "local-network",
|
|
46758
|
+
capScope: "system",
|
|
46759
|
+
addonId: null,
|
|
46760
|
+
access: "delete"
|
|
46761
|
+
},
|
|
44477
46762
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
44478
46763
|
capName: "local-network",
|
|
44479
46764
|
capScope: "system",
|
|
@@ -44486,6 +46771,12 @@ Object.freeze({
|
|
|
44486
46771
|
addonId: null,
|
|
44487
46772
|
access: "create"
|
|
44488
46773
|
},
|
|
46774
|
+
"localNetwork.setAddressRole": {
|
|
46775
|
+
capName: "local-network",
|
|
46776
|
+
capScope: "system",
|
|
46777
|
+
addonId: null,
|
|
46778
|
+
access: "create"
|
|
46779
|
+
},
|
|
44489
46780
|
"localNetwork.setAllowedAddresses": {
|
|
44490
46781
|
capName: "local-network",
|
|
44491
46782
|
capScope: "system",
|
|
@@ -45542,6 +47833,18 @@ Object.freeze({
|
|
|
45542
47833
|
addonId: null,
|
|
45543
47834
|
access: "create"
|
|
45544
47835
|
},
|
|
47836
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
47837
|
+
capName: "pipeline-analytics",
|
|
47838
|
+
capScope: "device",
|
|
47839
|
+
addonId: null,
|
|
47840
|
+
access: "create"
|
|
47841
|
+
},
|
|
47842
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
47843
|
+
capName: "pipeline-analytics",
|
|
47844
|
+
capScope: "device",
|
|
47845
|
+
addonId: null,
|
|
47846
|
+
access: "create"
|
|
47847
|
+
},
|
|
45545
47848
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
45546
47849
|
capName: "pipeline-analytics",
|
|
45547
47850
|
capScope: "device",
|
|
@@ -45590,12 +47893,24 @@ Object.freeze({
|
|
|
45590
47893
|
addonId: null,
|
|
45591
47894
|
access: "view"
|
|
45592
47895
|
},
|
|
47896
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
47897
|
+
capName: "pipeline-analytics",
|
|
47898
|
+
capScope: "device",
|
|
47899
|
+
addonId: null,
|
|
47900
|
+
access: "create"
|
|
47901
|
+
},
|
|
45593
47902
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
45594
47903
|
capName: "pipeline-analytics",
|
|
45595
47904
|
capScope: "device",
|
|
45596
47905
|
addonId: null,
|
|
45597
47906
|
access: "delete"
|
|
45598
47907
|
},
|
|
47908
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
47909
|
+
capName: "pipeline-analytics",
|
|
47910
|
+
capScope: "device",
|
|
47911
|
+
addonId: null,
|
|
47912
|
+
access: "delete"
|
|
47913
|
+
},
|
|
45599
47914
|
"pipelineAnalytics.deleteTracks": {
|
|
45600
47915
|
capName: "pipeline-analytics",
|
|
45601
47916
|
capScope: "device",
|
|
@@ -45800,6 +48115,24 @@ Object.freeze({
|
|
|
45800
48115
|
addonId: null,
|
|
45801
48116
|
access: "view"
|
|
45802
48117
|
},
|
|
48118
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
48119
|
+
capName: "pipeline-analytics",
|
|
48120
|
+
capScope: "device",
|
|
48121
|
+
addonId: null,
|
|
48122
|
+
access: "view"
|
|
48123
|
+
},
|
|
48124
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
48125
|
+
capName: "pipeline-analytics",
|
|
48126
|
+
capScope: "device",
|
|
48127
|
+
addonId: null,
|
|
48128
|
+
access: "view"
|
|
48129
|
+
},
|
|
48130
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
48131
|
+
capName: "pipeline-analytics",
|
|
48132
|
+
capScope: "device",
|
|
48133
|
+
addonId: null,
|
|
48134
|
+
access: "view"
|
|
48135
|
+
},
|
|
45803
48136
|
"pipelineAnalytics.listRetrainFrames": {
|
|
45804
48137
|
capName: "pipeline-analytics",
|
|
45805
48138
|
capScope: "device",
|
|
@@ -45848,6 +48181,12 @@ Object.freeze({
|
|
|
45848
48181
|
addonId: null,
|
|
45849
48182
|
access: "create"
|
|
45850
48183
|
},
|
|
48184
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
48185
|
+
capName: "pipeline-analytics",
|
|
48186
|
+
capScope: "device",
|
|
48187
|
+
addonId: null,
|
|
48188
|
+
access: "create"
|
|
48189
|
+
},
|
|
45851
48190
|
"pipelineAnalytics.pruneEvents": {
|
|
45852
48191
|
capName: "pipeline-analytics",
|
|
45853
48192
|
capScope: "device",
|
|
@@ -45902,6 +48241,18 @@ Object.freeze({
|
|
|
45902
48241
|
addonId: null,
|
|
45903
48242
|
access: "create"
|
|
45904
48243
|
},
|
|
48244
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
48245
|
+
capName: "pipeline-analytics",
|
|
48246
|
+
capScope: "device",
|
|
48247
|
+
addonId: null,
|
|
48248
|
+
access: "delete"
|
|
48249
|
+
},
|
|
48250
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
48251
|
+
capName: "pipeline-analytics",
|
|
48252
|
+
capScope: "device",
|
|
48253
|
+
addonId: null,
|
|
48254
|
+
access: "create"
|
|
48255
|
+
},
|
|
45905
48256
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
45906
48257
|
capName: "pipeline-analytics",
|
|
45907
48258
|
capScope: "device",
|
|
@@ -45932,6 +48283,12 @@ Object.freeze({
|
|
|
45932
48283
|
addonId: null,
|
|
45933
48284
|
access: "create"
|
|
45934
48285
|
},
|
|
48286
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
48287
|
+
capName: "pipeline-analytics",
|
|
48288
|
+
capScope: "device",
|
|
48289
|
+
addonId: null,
|
|
48290
|
+
access: "create"
|
|
48291
|
+
},
|
|
45935
48292
|
"pipelineAnalytics.setTrackFlags": {
|
|
45936
48293
|
capName: "pipeline-analytics",
|
|
45937
48294
|
capScope: "device",
|
|
@@ -45968,6 +48325,12 @@ Object.freeze({
|
|
|
45968
48325
|
addonId: null,
|
|
45969
48326
|
access: "delete"
|
|
45970
48327
|
},
|
|
48328
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
48329
|
+
capName: "pipeline-analytics",
|
|
48330
|
+
capScope: "device",
|
|
48331
|
+
addonId: null,
|
|
48332
|
+
access: "create"
|
|
48333
|
+
},
|
|
45971
48334
|
"pipelineExecutor.cacheFrameInPool": {
|
|
45972
48335
|
capName: "pipeline-executor",
|
|
45973
48336
|
capScope: "system",
|
|
@@ -45980,13 +48343,13 @@ Object.freeze({
|
|
|
45980
48343
|
addonId: null,
|
|
45981
48344
|
access: "delete"
|
|
45982
48345
|
},
|
|
45983
|
-
"pipelineExecutor.
|
|
48346
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
45984
48347
|
capName: "pipeline-executor",
|
|
45985
48348
|
capScope: "system",
|
|
45986
48349
|
addonId: null,
|
|
45987
48350
|
access: "delete"
|
|
45988
48351
|
},
|
|
45989
|
-
"pipelineExecutor.
|
|
48352
|
+
"pipelineExecutor.deleteModel": {
|
|
45990
48353
|
capName: "pipeline-executor",
|
|
45991
48354
|
capScope: "system",
|
|
45992
48355
|
addonId: null,
|
|
@@ -46130,12 +48493,6 @@ Object.freeze({
|
|
|
46130
48493
|
addonId: null,
|
|
46131
48494
|
access: "view"
|
|
46132
48495
|
},
|
|
46133
|
-
"pipelineExecutor.listTemplates": {
|
|
46134
|
-
capName: "pipeline-executor",
|
|
46135
|
-
capScope: "system",
|
|
46136
|
-
addonId: null,
|
|
46137
|
-
access: "view"
|
|
46138
|
-
},
|
|
46139
48496
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
46140
48497
|
capName: "pipeline-executor",
|
|
46141
48498
|
capScope: "system",
|
|
@@ -46160,12 +48517,6 @@ Object.freeze({
|
|
|
46160
48517
|
addonId: null,
|
|
46161
48518
|
access: "create"
|
|
46162
48519
|
},
|
|
46163
|
-
"pipelineExecutor.saveTemplate": {
|
|
46164
|
-
capName: "pipeline-executor",
|
|
46165
|
-
capScope: "system",
|
|
46166
|
-
addonId: null,
|
|
46167
|
-
access: "create"
|
|
46168
|
-
},
|
|
46169
48520
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
46170
48521
|
capName: "pipeline-executor",
|
|
46171
48522
|
capScope: "system",
|
|
@@ -46184,17 +48535,23 @@ Object.freeze({
|
|
|
46184
48535
|
addonId: null,
|
|
46185
48536
|
access: "create"
|
|
46186
48537
|
},
|
|
46187
|
-
"pipelineExecutor.
|
|
48538
|
+
"pipelineExecutor.validatePipeline": {
|
|
46188
48539
|
capName: "pipeline-executor",
|
|
46189
48540
|
capScope: "system",
|
|
46190
48541
|
addonId: null,
|
|
48542
|
+
access: "view"
|
|
48543
|
+
},
|
|
48544
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
48545
|
+
capName: "pipeline-orchestrator",
|
|
48546
|
+
capScope: "system",
|
|
48547
|
+
addonId: null,
|
|
46191
48548
|
access: "create"
|
|
46192
48549
|
},
|
|
46193
|
-
"
|
|
46194
|
-
capName: "pipeline-
|
|
48550
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
48551
|
+
capName: "pipeline-orchestrator",
|
|
46195
48552
|
capScope: "system",
|
|
46196
48553
|
addonId: null,
|
|
46197
|
-
access: "
|
|
48554
|
+
access: "create"
|
|
46198
48555
|
},
|
|
46199
48556
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
46200
48557
|
capName: "pipeline-orchestrator",
|
|
@@ -46214,7 +48571,7 @@ Object.freeze({
|
|
|
46214
48571
|
addonId: null,
|
|
46215
48572
|
access: "create"
|
|
46216
48573
|
},
|
|
46217
|
-
"pipelineOrchestrator.
|
|
48574
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
46218
48575
|
capName: "pipeline-orchestrator",
|
|
46219
48576
|
capScope: "system",
|
|
46220
48577
|
addonId: null,
|
|
@@ -46310,6 +48667,12 @@ Object.freeze({
|
|
|
46310
48667
|
addonId: null,
|
|
46311
48668
|
access: "view"
|
|
46312
48669
|
},
|
|
48670
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
48671
|
+
capName: "pipeline-orchestrator",
|
|
48672
|
+
capScope: "system",
|
|
48673
|
+
addonId: null,
|
|
48674
|
+
access: "view"
|
|
48675
|
+
},
|
|
46313
48676
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
46314
48677
|
capName: "pipeline-orchestrator",
|
|
46315
48678
|
capScope: "system",
|
|
@@ -46322,6 +48685,24 @@ Object.freeze({
|
|
|
46322
48685
|
addonId: null,
|
|
46323
48686
|
access: "view"
|
|
46324
48687
|
},
|
|
48688
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
48689
|
+
capName: "pipeline-orchestrator",
|
|
48690
|
+
capScope: "system",
|
|
48691
|
+
addonId: null,
|
|
48692
|
+
access: "view"
|
|
48693
|
+
},
|
|
48694
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
48695
|
+
capName: "pipeline-orchestrator",
|
|
48696
|
+
capScope: "system",
|
|
48697
|
+
addonId: null,
|
|
48698
|
+
access: "view"
|
|
48699
|
+
},
|
|
48700
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
48701
|
+
capName: "pipeline-orchestrator",
|
|
48702
|
+
capScope: "system",
|
|
48703
|
+
addonId: null,
|
|
48704
|
+
access: "view"
|
|
48705
|
+
},
|
|
46325
48706
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
46326
48707
|
capName: "pipeline-orchestrator",
|
|
46327
48708
|
capScope: "system",
|
|
@@ -46346,6 +48727,12 @@ Object.freeze({
|
|
|
46346
48727
|
addonId: null,
|
|
46347
48728
|
access: "view"
|
|
46348
48729
|
},
|
|
48730
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
48731
|
+
capName: "pipeline-orchestrator",
|
|
48732
|
+
capScope: "system",
|
|
48733
|
+
addonId: null,
|
|
48734
|
+
access: "view"
|
|
48735
|
+
},
|
|
46349
48736
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
46350
48737
|
capName: "pipeline-orchestrator",
|
|
46351
48738
|
capScope: "system",
|
|
@@ -46358,7 +48745,7 @@ Object.freeze({
|
|
|
46358
48745
|
addonId: null,
|
|
46359
48746
|
access: "view"
|
|
46360
48747
|
},
|
|
46361
|
-
"pipelineOrchestrator.
|
|
48748
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
46362
48749
|
capName: "pipeline-orchestrator",
|
|
46363
48750
|
capScope: "system",
|
|
46364
48751
|
addonId: null,
|
|
@@ -46370,6 +48757,12 @@ Object.freeze({
|
|
|
46370
48757
|
addonId: null,
|
|
46371
48758
|
access: "create"
|
|
46372
48759
|
},
|
|
48760
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
48761
|
+
capName: "pipeline-orchestrator",
|
|
48762
|
+
capScope: "system",
|
|
48763
|
+
addonId: null,
|
|
48764
|
+
access: "view"
|
|
48765
|
+
},
|
|
46373
48766
|
"pipelineOrchestrator.rebalance": {
|
|
46374
48767
|
capName: "pipeline-orchestrator",
|
|
46375
48768
|
capScope: "system",
|
|
@@ -46412,12 +48805,6 @@ Object.freeze({
|
|
|
46412
48805
|
addonId: null,
|
|
46413
48806
|
access: "create"
|
|
46414
48807
|
},
|
|
46415
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
46416
|
-
capName: "pipeline-orchestrator",
|
|
46417
|
-
capScope: "system",
|
|
46418
|
-
addonId: null,
|
|
46419
|
-
access: "create"
|
|
46420
|
-
},
|
|
46421
48808
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
46422
48809
|
capName: "pipeline-orchestrator",
|
|
46423
48810
|
capScope: "system",
|
|
@@ -46430,12 +48817,6 @@ Object.freeze({
|
|
|
46430
48817
|
addonId: null,
|
|
46431
48818
|
access: "create"
|
|
46432
48819
|
},
|
|
46433
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
46434
|
-
capName: "pipeline-orchestrator",
|
|
46435
|
-
capScope: "system",
|
|
46436
|
-
addonId: null,
|
|
46437
|
-
access: "create"
|
|
46438
|
-
},
|
|
46439
48820
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
46440
48821
|
capName: "pipeline-orchestrator",
|
|
46441
48822
|
capScope: "system",
|
|
@@ -46472,6 +48853,12 @@ Object.freeze({
|
|
|
46472
48853
|
addonId: null,
|
|
46473
48854
|
access: "create"
|
|
46474
48855
|
},
|
|
48856
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
48857
|
+
capName: "pipeline-orchestrator",
|
|
48858
|
+
capScope: "system",
|
|
48859
|
+
addonId: null,
|
|
48860
|
+
access: "create"
|
|
48861
|
+
},
|
|
46475
48862
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
46476
48863
|
capName: "pipeline-orchestrator",
|
|
46477
48864
|
capScope: "system",
|
|
@@ -46490,12 +48877,36 @@ Object.freeze({
|
|
|
46490
48877
|
addonId: null,
|
|
46491
48878
|
access: "create"
|
|
46492
48879
|
},
|
|
48880
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
48881
|
+
capName: "pipeline-orchestrator",
|
|
48882
|
+
capScope: "system",
|
|
48883
|
+
addonId: null,
|
|
48884
|
+
access: "create"
|
|
48885
|
+
},
|
|
46493
48886
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
46494
48887
|
capName: "pipeline-orchestrator",
|
|
46495
48888
|
capScope: "system",
|
|
46496
48889
|
addonId: null,
|
|
46497
48890
|
access: "create"
|
|
46498
48891
|
},
|
|
48892
|
+
"pipelineOrchestrator.setShareSource": {
|
|
48893
|
+
capName: "pipeline-orchestrator",
|
|
48894
|
+
capScope: "system",
|
|
48895
|
+
addonId: null,
|
|
48896
|
+
access: "create"
|
|
48897
|
+
},
|
|
48898
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
48899
|
+
capName: "pipeline-orchestrator",
|
|
48900
|
+
capScope: "system",
|
|
48901
|
+
addonId: null,
|
|
48902
|
+
access: "create"
|
|
48903
|
+
},
|
|
48904
|
+
"pipelineOrchestrator.suggestShares": {
|
|
48905
|
+
capName: "pipeline-orchestrator",
|
|
48906
|
+
capScope: "system",
|
|
48907
|
+
addonId: null,
|
|
48908
|
+
access: "view"
|
|
48909
|
+
},
|
|
46499
48910
|
"pipelineOrchestrator.unassignAudio": {
|
|
46500
48911
|
capName: "pipeline-orchestrator",
|
|
46501
48912
|
capScope: "system",
|
|
@@ -46508,8 +48919,8 @@ Object.freeze({
|
|
|
46508
48919
|
addonId: null,
|
|
46509
48920
|
access: "create"
|
|
46510
48921
|
},
|
|
46511
|
-
"
|
|
46512
|
-
capName: "pipeline-
|
|
48922
|
+
"pipelineRunner.abortNodeBench": {
|
|
48923
|
+
capName: "pipeline-runner",
|
|
46513
48924
|
capScope: "system",
|
|
46514
48925
|
addonId: null,
|
|
46515
48926
|
access: "create"
|
|
@@ -46562,6 +48973,12 @@ Object.freeze({
|
|
|
46562
48973
|
addonId: null,
|
|
46563
48974
|
access: "view"
|
|
46564
48975
|
},
|
|
48976
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
48977
|
+
capName: "pipeline-runner",
|
|
48978
|
+
capScope: "system",
|
|
48979
|
+
addonId: null,
|
|
48980
|
+
access: "view"
|
|
48981
|
+
},
|
|
46565
48982
|
"pipelineRunner.getParkedTrackFrame": {
|
|
46566
48983
|
capName: "pipeline-runner",
|
|
46567
48984
|
capScope: "system",
|
|
@@ -46604,6 +49021,12 @@ Object.freeze({
|
|
|
46604
49021
|
addonId: null,
|
|
46605
49022
|
access: "create"
|
|
46606
49023
|
},
|
|
49024
|
+
"pipelineRunner.startNodeBench": {
|
|
49025
|
+
capName: "pipeline-runner",
|
|
49026
|
+
capScope: "system",
|
|
49027
|
+
addonId: null,
|
|
49028
|
+
access: "create"
|
|
49029
|
+
},
|
|
46607
49030
|
"plateGallery.assignPlate": {
|
|
46608
49031
|
capName: "plate-gallery",
|
|
46609
49032
|
capScope: "system",
|
|
@@ -47948,12 +50371,6 @@ Object.freeze({
|
|
|
47948
50371
|
addonId: null,
|
|
47949
50372
|
access: "view"
|
|
47950
50373
|
},
|
|
47951
|
-
"streamBroker.pullFrameHandles": {
|
|
47952
|
-
capName: "stream-broker",
|
|
47953
|
-
capScope: "system",
|
|
47954
|
-
addonId: null,
|
|
47955
|
-
access: "view"
|
|
47956
|
-
},
|
|
47957
50374
|
"streamBroker.regenerateRtspToken": {
|
|
47958
50375
|
capName: "stream-broker",
|
|
47959
50376
|
capScope: "system",
|
|
@@ -48020,12 +50437,6 @@ Object.freeze({
|
|
|
48020
50437
|
addonId: null,
|
|
48021
50438
|
access: "create"
|
|
48022
50439
|
},
|
|
48023
|
-
"streamBroker.subscribeFrames": {
|
|
48024
|
-
capName: "stream-broker",
|
|
48025
|
-
capScope: "system",
|
|
48026
|
-
addonId: null,
|
|
48027
|
-
access: "create"
|
|
48028
|
-
},
|
|
48029
50440
|
"streamBroker.unassignProfile": {
|
|
48030
50441
|
capName: "stream-broker",
|
|
48031
50442
|
capScope: "system",
|
|
@@ -48038,12 +50449,6 @@ Object.freeze({
|
|
|
48038
50449
|
addonId: null,
|
|
48039
50450
|
access: "create"
|
|
48040
50451
|
},
|
|
48041
|
-
"streamBroker.unsubscribeFrames": {
|
|
48042
|
-
capName: "stream-broker",
|
|
48043
|
-
capScope: "system",
|
|
48044
|
-
addonId: null,
|
|
48045
|
-
access: "create"
|
|
48046
|
-
},
|
|
48047
50452
|
"streamCatalog.getCatalog": {
|
|
48048
50453
|
capName: "stream-catalog",
|
|
48049
50454
|
capScope: "device",
|
|
@@ -48338,18 +50743,36 @@ Object.freeze({
|
|
|
48338
50743
|
addonId: null,
|
|
48339
50744
|
access: "delete"
|
|
48340
50745
|
},
|
|
50746
|
+
"userManagement.findUserByExternalIdentity": {
|
|
50747
|
+
capName: "user-management",
|
|
50748
|
+
capScope: "system",
|
|
50749
|
+
addonId: null,
|
|
50750
|
+
access: "view"
|
|
50751
|
+
},
|
|
48341
50752
|
"userManagement.getTotpStatus": {
|
|
48342
50753
|
capName: "user-management",
|
|
48343
50754
|
capScope: "system",
|
|
48344
50755
|
addonId: null,
|
|
48345
50756
|
access: "view"
|
|
48346
50757
|
},
|
|
50758
|
+
"userManagement.linkExternalIdentity": {
|
|
50759
|
+
capName: "user-management",
|
|
50760
|
+
capScope: "system",
|
|
50761
|
+
addonId: null,
|
|
50762
|
+
access: "create"
|
|
50763
|
+
},
|
|
48347
50764
|
"userManagement.listApiKeys": {
|
|
48348
50765
|
capName: "user-management",
|
|
48349
50766
|
capScope: "system",
|
|
48350
50767
|
addonId: null,
|
|
48351
50768
|
access: "view"
|
|
48352
50769
|
},
|
|
50770
|
+
"userManagement.listExternalIdentities": {
|
|
50771
|
+
capName: "user-management",
|
|
50772
|
+
capScope: "system",
|
|
50773
|
+
addonId: null,
|
|
50774
|
+
access: "view"
|
|
50775
|
+
},
|
|
48353
50776
|
"userManagement.listOauthSessions": {
|
|
48354
50777
|
capName: "user-management",
|
|
48355
50778
|
capScope: "system",
|
|
@@ -48428,6 +50851,12 @@ Object.freeze({
|
|
|
48428
50851
|
addonId: null,
|
|
48429
50852
|
access: "create"
|
|
48430
50853
|
},
|
|
50854
|
+
"userManagement.unlinkExternalIdentity": {
|
|
50855
|
+
capName: "user-management",
|
|
50856
|
+
capScope: "system",
|
|
50857
|
+
addonId: null,
|
|
50858
|
+
access: "delete"
|
|
50859
|
+
},
|
|
48431
50860
|
"userManagement.updateUser": {
|
|
48432
50861
|
capName: "user-management",
|
|
48433
50862
|
capScope: "system",
|
|
@@ -48740,6 +51169,12 @@ Object.freeze({
|
|
|
48740
51169
|
addonId: null,
|
|
48741
51170
|
access: "create"
|
|
48742
51171
|
},
|
|
51172
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
51173
|
+
capName: "webrtc-session",
|
|
51174
|
+
capScope: "device",
|
|
51175
|
+
addonId: null,
|
|
51176
|
+
access: "create"
|
|
51177
|
+
},
|
|
48743
51178
|
"webrtcSession.closeSession": {
|
|
48744
51179
|
capName: "webrtc-session",
|
|
48745
51180
|
capScope: "device",
|
|
@@ -50551,11 +52986,6 @@ Object.freeze({
|
|
|
50551
52986
|
form: "single",
|
|
50552
52987
|
optional: false
|
|
50553
52988
|
}],
|
|
50554
|
-
"decoder.createSession": [{
|
|
50555
|
-
name: "deviceId",
|
|
50556
|
-
form: "single",
|
|
50557
|
-
optional: true
|
|
50558
|
-
}],
|
|
50559
52989
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
50560
52990
|
name: "deviceId",
|
|
50561
52991
|
form: "single",
|
|
@@ -51526,6 +53956,11 @@ Object.freeze({
|
|
|
51526
53956
|
form: "single",
|
|
51527
53957
|
optional: false
|
|
51528
53958
|
}],
|
|
53959
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
53960
|
+
name: "deviceId",
|
|
53961
|
+
form: "single",
|
|
53962
|
+
optional: false
|
|
53963
|
+
}],
|
|
51529
53964
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
51530
53965
|
name: "deviceId",
|
|
51531
53966
|
form: "single",
|
|
@@ -51716,6 +54151,11 @@ Object.freeze({
|
|
|
51716
54151
|
form: "single",
|
|
51717
54152
|
optional: false
|
|
51718
54153
|
}],
|
|
54154
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
54155
|
+
name: "deviceId",
|
|
54156
|
+
form: "single",
|
|
54157
|
+
optional: false
|
|
54158
|
+
}],
|
|
51719
54159
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
51720
54160
|
name: "deviceId",
|
|
51721
54161
|
form: "single",
|
|
@@ -51766,6 +54206,11 @@ Object.freeze({
|
|
|
51766
54206
|
form: "single",
|
|
51767
54207
|
optional: false
|
|
51768
54208
|
}],
|
|
54209
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
54210
|
+
name: "deviceId",
|
|
54211
|
+
form: "single",
|
|
54212
|
+
optional: false
|
|
54213
|
+
}],
|
|
51769
54214
|
"pipelineAnalytics.setTrackFlags": [{
|
|
51770
54215
|
name: "deviceId",
|
|
51771
54216
|
form: "single",
|
|
@@ -51786,6 +54231,11 @@ Object.freeze({
|
|
|
51786
54231
|
form: "single",
|
|
51787
54232
|
optional: false
|
|
51788
54233
|
}],
|
|
54234
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
54235
|
+
name: "deviceIds",
|
|
54236
|
+
form: "array",
|
|
54237
|
+
optional: true
|
|
54238
|
+
}],
|
|
51789
54239
|
"pipelineExecutor.runPipeline": [{
|
|
51790
54240
|
name: "deviceId",
|
|
51791
54241
|
form: "single",
|
|
@@ -51891,6 +54341,11 @@ Object.freeze({
|
|
|
51891
54341
|
form: "single",
|
|
51892
54342
|
optional: false
|
|
51893
54343
|
}],
|
|
54344
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
54345
|
+
name: "deviceId",
|
|
54346
|
+
form: "single",
|
|
54347
|
+
optional: false
|
|
54348
|
+
}],
|
|
51894
54349
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
51895
54350
|
name: "deviceId",
|
|
51896
54351
|
form: "single",
|
|
@@ -52662,6 +55117,11 @@ Object.freeze({
|
|
|
52662
55117
|
form: "single",
|
|
52663
55118
|
optional: false
|
|
52664
55119
|
}],
|
|
55120
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
55121
|
+
name: "deviceId",
|
|
55122
|
+
form: "single",
|
|
55123
|
+
optional: false
|
|
55124
|
+
}],
|
|
52665
55125
|
"webrtcSession.closeSession": [{
|
|
52666
55126
|
name: "deviceId",
|
|
52667
55127
|
form: "single",
|
|
@@ -52891,6 +55351,8 @@ new Map(Object.entries({
|
|
|
52891
55351
|
"detection-blind": "device-events",
|
|
52892
55352
|
"node-online": "system",
|
|
52893
55353
|
"node-offline": "system",
|
|
55354
|
+
"node-restarting": "system",
|
|
55355
|
+
"node-updating": "system",
|
|
52894
55356
|
"node-inference-unavailable": "system",
|
|
52895
55357
|
"addon-crash-loop": "system",
|
|
52896
55358
|
"addon-update-available": "system",
|
|
@@ -52968,6 +55430,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
52968
55430
|
kinds: [
|
|
52969
55431
|
"node-offline",
|
|
52970
55432
|
"node-online",
|
|
55433
|
+
"node-restarting",
|
|
52971
55434
|
"node-inference-unavailable"
|
|
52972
55435
|
]
|
|
52973
55436
|
},
|
|
@@ -52989,6 +55452,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
52989
55452
|
label: "Server & container updates",
|
|
52990
55453
|
kinds: [
|
|
52991
55454
|
"server-update-available",
|
|
55455
|
+
"node-updating",
|
|
52992
55456
|
"server-updated",
|
|
52993
55457
|
"wrapper-update-available"
|
|
52994
55458
|
]
|
|
@@ -53136,6 +55600,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
53136
55600
|
kinds: [
|
|
53137
55601
|
"node-offline",
|
|
53138
55602
|
"node-online",
|
|
55603
|
+
"node-restarting",
|
|
53139
55604
|
"node-inference-unavailable"
|
|
53140
55605
|
]
|
|
53141
55606
|
},
|
|
@@ -53157,6 +55622,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
53157
55622
|
example: "server 1.2.377 → 1.2.378",
|
|
53158
55623
|
kinds: [
|
|
53159
55624
|
"server-update-available",
|
|
55625
|
+
"node-updating",
|
|
53160
55626
|
"server-updated",
|
|
53161
55627
|
"wrapper-update-available"
|
|
53162
55628
|
]
|
|
@@ -53189,7 +55655,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
53189
55655
|
{
|
|
53190
55656
|
name: "summarySection",
|
|
53191
55657
|
label: "Summary: this section",
|
|
53192
|
-
description: "The section a per-section summary row is about
|
|
55658
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
53193
55659
|
example: "Batterie scariche",
|
|
53194
55660
|
group: "system",
|
|
53195
55661
|
families: ["rule"],
|
|
@@ -53824,7 +56290,7 @@ var TuyaRegionSchema = _enum(TUYA_REGION_VALUES);
|
|
|
53824
56290
|
*/
|
|
53825
56291
|
var tuyaConfigSchema = object({
|
|
53826
56292
|
accessId: string().min(1).describe("Tuya IoT project Access ID / Client ID"),
|
|
53827
|
-
accessSecret: string().min(1).describe("Tuya IoT project Access Secret / Client Secret"),
|
|
56293
|
+
accessSecret: string().min(1).describe("Tuya IoT project Access Secret / Client Secret").meta({ secret: true }),
|
|
53828
56294
|
region: TuyaRegionSchema.default("eu").describe("Tuya cloud data-centre region"),
|
|
53829
56295
|
discoveryTimeoutMs: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(1e3).max(3e4).default(6e3)).describe("LAN discovery sweep window (ms) used to resolve device IP / protocol version")
|
|
53830
56296
|
});
|
|
@@ -54089,7 +56555,7 @@ var tuyaConnections = new TuyaConnectionResolver();
|
|
|
54089
56555
|
var tuyaDeviceConfigSchema = object({
|
|
54090
56556
|
integrationId: string().min(1).describe("Owning Tuya integration id"),
|
|
54091
56557
|
tuyaDeviceId: string().min(1).describe("Tuya cloud device id (gwId/devId)"),
|
|
54092
|
-
localKey: string().min(1).describe("Device local key (from the Tuya cloud)"),
|
|
56558
|
+
localKey: string().min(1).describe("Device local key (from the Tuya cloud)").meta({ secret: true }),
|
|
54093
56559
|
host: string().default("").describe("Device LAN IP / host"),
|
|
54094
56560
|
version: string().default("3.3").describe("Tuya protocol version (3.1–3.5)"),
|
|
54095
56561
|
switchDp: string().default("1").describe("Boolean DP a raw switch drives"),
|