@camstack/addon-provider-homeassistant 1.2.162 → 1.2.164
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 +7 -7
- package/dist/addon.mjs +7 -7
- package/dist/{dist-Cw91Z1Ew.mjs → dist-Bkkyc3Ai.mjs} +2723 -514
- package/dist/{dist-WoiCiuhv.js → dist-DztWg_Y_.js} +2723 -514
- package/dist/ha-export/ha-export.addon.js +42 -31
- package/dist/ha-export/ha-export.addon.mjs +42 -31
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("node:crypto");
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -78,6 +78,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
78
78
|
*/
|
|
79
79
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
80
80
|
/**
|
|
81
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
82
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
83
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
84
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
85
|
+
*/
|
|
86
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
87
|
+
/**
|
|
81
88
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
82
89
|
* transitions from `failed` back to `healthy` (typically via the
|
|
83
90
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -500,15 +507,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
500
507
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
501
508
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
502
509
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
503
|
-
/**
|
|
504
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
505
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
506
|
-
* `createSession`, so running sessions keep their current backend until
|
|
507
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
508
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
509
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
510
|
-
*/
|
|
511
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
512
510
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
513
511
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
514
512
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5379,7 +5377,7 @@ var ZodIssueCode = {
|
|
|
5379
5377
|
var ZodFirstPartyTypeKind;
|
|
5380
5378
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5381
5379
|
//#endregion
|
|
5382
|
-
//#region ../types/dist/sleep-
|
|
5380
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5383
5381
|
/**
|
|
5384
5382
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5385
5383
|
* window to float samples (D455).
|
|
@@ -5458,6 +5456,97 @@ function buildAlawTable() {
|
|
|
5458
5456
|
}
|
|
5459
5457
|
buildUlawTable();
|
|
5460
5458
|
buildAlawTable();
|
|
5459
|
+
/** Is this field's stored value a credential? */
|
|
5460
|
+
function isSecretConfigField(field) {
|
|
5461
|
+
if (field.type === "password") return true;
|
|
5462
|
+
return "secret" in field && field.secret === true;
|
|
5463
|
+
}
|
|
5464
|
+
/**
|
|
5465
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5466
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5467
|
+
*/
|
|
5468
|
+
function isKeychainStoredField(field) {
|
|
5469
|
+
if (!isSecretConfigField(field)) return false;
|
|
5470
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5471
|
+
return !("storage" in field && field.storage === "inline");
|
|
5472
|
+
}
|
|
5473
|
+
/**
|
|
5474
|
+
* What a settings blob holds where a secret used to be.
|
|
5475
|
+
*
|
|
5476
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5477
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5478
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5479
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5480
|
+
*
|
|
5481
|
+
* The same shapes travel to and from the admin UI:
|
|
5482
|
+
*
|
|
5483
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5484
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5485
|
+
* value is set, never the value.
|
|
5486
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5487
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5488
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5489
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5490
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5491
|
+
*
|
|
5492
|
+
* Pure and browser-safe.
|
|
5493
|
+
*/
|
|
5494
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5495
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5496
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5497
|
+
function isRecord$1(value) {
|
|
5498
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5499
|
+
}
|
|
5500
|
+
function makeSecretMarker(ref) {
|
|
5501
|
+
return {
|
|
5502
|
+
$secret: ref,
|
|
5503
|
+
v: 1
|
|
5504
|
+
};
|
|
5505
|
+
}
|
|
5506
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5507
|
+
function isSecretMarker(value) {
|
|
5508
|
+
if (!isRecord$1(value)) return false;
|
|
5509
|
+
const ref = value["$secret"];
|
|
5510
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5511
|
+
}
|
|
5512
|
+
function isSecretClear(value) {
|
|
5513
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5514
|
+
}
|
|
5515
|
+
/**
|
|
5516
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5517
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5518
|
+
* survives this function.
|
|
5519
|
+
*/
|
|
5520
|
+
function toSecretFieldView(stored) {
|
|
5521
|
+
if (isSecretMarker(stored)) return {
|
|
5522
|
+
$secret: stored.$secret,
|
|
5523
|
+
v: 1,
|
|
5524
|
+
set: true
|
|
5525
|
+
};
|
|
5526
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5527
|
+
$secret: null,
|
|
5528
|
+
v: 1,
|
|
5529
|
+
set: true,
|
|
5530
|
+
inline: true
|
|
5531
|
+
};
|
|
5532
|
+
return null;
|
|
5533
|
+
}
|
|
5534
|
+
/**
|
|
5535
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5536
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5537
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5538
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5539
|
+
*/
|
|
5540
|
+
function classifySecretWrite(incoming) {
|
|
5541
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5542
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5543
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5544
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5545
|
+
return {
|
|
5546
|
+
kind: "set",
|
|
5547
|
+
value: incoming
|
|
5548
|
+
};
|
|
5549
|
+
}
|
|
5461
5550
|
Object.fromEntries([
|
|
5462
5551
|
{
|
|
5463
5552
|
id: "overview",
|
|
@@ -5629,33 +5718,19 @@ Object.fromEntries([
|
|
|
5629
5718
|
function isValuelessField(field) {
|
|
5630
5719
|
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";
|
|
5631
5720
|
}
|
|
5632
|
-
|
|
5633
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5634
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5635
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5636
|
-
*
|
|
5637
|
-
* For each leaf field:
|
|
5638
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5639
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5640
|
-
*
|
|
5641
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5642
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5643
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5644
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5645
|
-
*/
|
|
5646
|
-
function hydrateSchema(schema, values) {
|
|
5721
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5647
5722
|
return {
|
|
5648
5723
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5649
5724
|
sections: schema.sections.map((section) => ({
|
|
5650
5725
|
...section,
|
|
5651
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5726
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5652
5727
|
}))
|
|
5653
5728
|
};
|
|
5654
5729
|
}
|
|
5655
|
-
function hydrateField(field, values) {
|
|
5730
|
+
function hydrateField(field, values, options) {
|
|
5656
5731
|
if (isValuelessField(field)) return field;
|
|
5657
5732
|
if (field.type === "group") {
|
|
5658
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5733
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5659
5734
|
return {
|
|
5660
5735
|
...field,
|
|
5661
5736
|
fields: hydratedChildren
|
|
@@ -5664,7 +5739,7 @@ function hydrateField(field, values) {
|
|
|
5664
5739
|
if (field.type === "sub-tabs") {
|
|
5665
5740
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5666
5741
|
...tab,
|
|
5667
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5742
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5668
5743
|
}));
|
|
5669
5744
|
return {
|
|
5670
5745
|
...field,
|
|
@@ -5674,6 +5749,33 @@ function hydrateField(field, values) {
|
|
|
5674
5749
|
const key = field.key;
|
|
5675
5750
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5676
5751
|
const defaultValue = field.default;
|
|
5752
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5753
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5754
|
+
...field,
|
|
5755
|
+
value: toSecretFieldView(storedValue)
|
|
5756
|
+
};
|
|
5757
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5758
|
+
...field,
|
|
5759
|
+
value: null
|
|
5760
|
+
};
|
|
5761
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5762
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5763
|
+
if (secretItemKeys.length > 0) {
|
|
5764
|
+
const rows = storedValue.map((row) => {
|
|
5765
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5766
|
+
const out = { ...row };
|
|
5767
|
+
for (const k of secretItemKeys) {
|
|
5768
|
+
const v = Reflect.get(row, k);
|
|
5769
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5770
|
+
}
|
|
5771
|
+
return out;
|
|
5772
|
+
});
|
|
5773
|
+
return {
|
|
5774
|
+
...field,
|
|
5775
|
+
value: rows
|
|
5776
|
+
};
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
5677
5779
|
if (field.multiple) {
|
|
5678
5780
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5679
5781
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5916,6 +6018,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5916
6018
|
}
|
|
5917
6019
|
return out;
|
|
5918
6020
|
}
|
|
6021
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6022
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6023
|
+
function globalSecretScope() {
|
|
6024
|
+
return GLOBAL_SCOPE;
|
|
6025
|
+
}
|
|
6026
|
+
function encodeSegment(value) {
|
|
6027
|
+
return encodeURIComponent(value);
|
|
6028
|
+
}
|
|
6029
|
+
/**
|
|
6030
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6031
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6032
|
+
* `providers[authentik].clientSecret`.
|
|
6033
|
+
*/
|
|
6034
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6035
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6036
|
+
}
|
|
6037
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6038
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6039
|
+
fieldPath;
|
|
6040
|
+
constructor(fieldPath, cause) {
|
|
6041
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6042
|
+
this.fieldPath = fieldPath;
|
|
6043
|
+
this.name = "KeychainWriteRefusedError";
|
|
6044
|
+
}
|
|
6045
|
+
};
|
|
6046
|
+
var KEEP = { kind: "keep" };
|
|
6047
|
+
function isRecord(value) {
|
|
6048
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6049
|
+
}
|
|
6050
|
+
function defaultMintId() {
|
|
6051
|
+
return globalThis.crypto.randomUUID();
|
|
6052
|
+
}
|
|
6053
|
+
/** Every marker ref anywhere under `value`. */
|
|
6054
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6055
|
+
if (isSecretMarker(value)) {
|
|
6056
|
+
out.push(value.$secret);
|
|
6057
|
+
return out;
|
|
6058
|
+
}
|
|
6059
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6060
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6061
|
+
return out;
|
|
6062
|
+
}
|
|
6063
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6064
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6065
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6066
|
+
}
|
|
6067
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6068
|
+
const intent = classifySecretWrite(incoming);
|
|
6069
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6070
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6071
|
+
if (intent.kind === "keep") return KEEP;
|
|
6072
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6073
|
+
if (intent.kind === "clear") {
|
|
6074
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6075
|
+
return {
|
|
6076
|
+
kind: "value",
|
|
6077
|
+
value: null
|
|
6078
|
+
};
|
|
6079
|
+
}
|
|
6080
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6081
|
+
kind: "value",
|
|
6082
|
+
value: stored
|
|
6083
|
+
};
|
|
6084
|
+
try {
|
|
6085
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6086
|
+
} catch (err) {
|
|
6087
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6088
|
+
}
|
|
6089
|
+
return {
|
|
6090
|
+
kind: "value",
|
|
6091
|
+
value: makeSecretMarker(ref)
|
|
6092
|
+
};
|
|
6093
|
+
}
|
|
6094
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6095
|
+
function applyMember(out, key, result, storedParent) {
|
|
6096
|
+
if (result.kind === "value") {
|
|
6097
|
+
out[key] = result.value;
|
|
6098
|
+
return;
|
|
6099
|
+
}
|
|
6100
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6101
|
+
else delete out[key];
|
|
6102
|
+
}
|
|
6103
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6104
|
+
const out = { ...incoming };
|
|
6105
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6106
|
+
return out;
|
|
6107
|
+
}
|
|
6108
|
+
function rowId(row, idKey) {
|
|
6109
|
+
const raw = row[idKey];
|
|
6110
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6111
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6112
|
+
return null;
|
|
6113
|
+
}
|
|
6114
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6115
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6116
|
+
if (!Array.isArray(incoming)) {
|
|
6117
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6118
|
+
return {
|
|
6119
|
+
kind: "value",
|
|
6120
|
+
value: incoming
|
|
6121
|
+
};
|
|
6122
|
+
}
|
|
6123
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6124
|
+
for (const row of storedRows) {
|
|
6125
|
+
const id = rowId(row, node.idKey);
|
|
6126
|
+
if (id !== null) storedById.set(id, row);
|
|
6127
|
+
}
|
|
6128
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6129
|
+
const rows = [];
|
|
6130
|
+
for (const row of incoming) {
|
|
6131
|
+
if (!isRecord(row)) {
|
|
6132
|
+
rows.push(row);
|
|
6133
|
+
continue;
|
|
6134
|
+
}
|
|
6135
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6136
|
+
kept.add(id);
|
|
6137
|
+
const withId = {
|
|
6138
|
+
...row,
|
|
6139
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6140
|
+
};
|
|
6141
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6142
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6143
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6144
|
+
}
|
|
6145
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6146
|
+
return {
|
|
6147
|
+
kind: "value",
|
|
6148
|
+
value: rows
|
|
6149
|
+
};
|
|
6150
|
+
}
|
|
6151
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6152
|
+
switch (node.kind) {
|
|
6153
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6154
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6155
|
+
case "object": {
|
|
6156
|
+
if (!isRecord(incoming)) {
|
|
6157
|
+
if (incoming === void 0) return KEEP;
|
|
6158
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6159
|
+
return {
|
|
6160
|
+
kind: "value",
|
|
6161
|
+
value: incoming
|
|
6162
|
+
};
|
|
6163
|
+
}
|
|
6164
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6165
|
+
return {
|
|
6166
|
+
kind: "value",
|
|
6167
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6168
|
+
};
|
|
6169
|
+
}
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6173
|
+
function splitNodeKey(key) {
|
|
6174
|
+
const at = key.indexOf("@");
|
|
6175
|
+
return at <= 0 ? {
|
|
6176
|
+
base: key,
|
|
6177
|
+
nodeId: null
|
|
6178
|
+
} : {
|
|
6179
|
+
base: key.slice(0, at),
|
|
6180
|
+
nodeId: key.slice(at + 1)
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6184
|
+
async function transformSecretWrite(input) {
|
|
6185
|
+
const deletes = [];
|
|
6186
|
+
const base = {
|
|
6187
|
+
secrets: input.secrets,
|
|
6188
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6189
|
+
deletes,
|
|
6190
|
+
operatorWrite: input.operatorWrite === true
|
|
6191
|
+
};
|
|
6192
|
+
const out = {};
|
|
6193
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6194
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6195
|
+
const node = input.tree.get(baseKey);
|
|
6196
|
+
if (node === void 0) {
|
|
6197
|
+
out[key] = incoming;
|
|
6198
|
+
continue;
|
|
6199
|
+
}
|
|
6200
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6201
|
+
kind: "node",
|
|
6202
|
+
nodeId
|
|
6203
|
+
} : input.scope ?? globalSecretScope();
|
|
6204
|
+
const result = await writeNode({
|
|
6205
|
+
...base,
|
|
6206
|
+
scope
|
|
6207
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6208
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6209
|
+
}
|
|
6210
|
+
return {
|
|
6211
|
+
patch: out,
|
|
6212
|
+
afterWrite: async () => {
|
|
6213
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6214
|
+
try {
|
|
6215
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6216
|
+
return { orphaned: [] };
|
|
6217
|
+
} catch {
|
|
6218
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
};
|
|
6222
|
+
}
|
|
6223
|
+
/**
|
|
6224
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6225
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6226
|
+
*/
|
|
6227
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6228
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6229
|
+
if (refs.length === 0) return {
|
|
6230
|
+
value,
|
|
6231
|
+
unresolved: []
|
|
6232
|
+
};
|
|
6233
|
+
const answers = await secrets.resolve(refs);
|
|
6234
|
+
const unresolved = [];
|
|
6235
|
+
for (const ref of new Set(refs)) {
|
|
6236
|
+
const answer = answers[ref];
|
|
6237
|
+
if (answer === void 0) unresolved.push({
|
|
6238
|
+
ref,
|
|
6239
|
+
reason: "not-initialized"
|
|
6240
|
+
});
|
|
6241
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6242
|
+
ref,
|
|
6243
|
+
reason: answer.reason
|
|
6244
|
+
});
|
|
6245
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6246
|
+
ref,
|
|
6247
|
+
reason: answer.kind
|
|
6248
|
+
});
|
|
6249
|
+
}
|
|
6250
|
+
const substitute = (v) => {
|
|
6251
|
+
if (isSecretMarker(v)) {
|
|
6252
|
+
const answer = answers[v.$secret];
|
|
6253
|
+
return answer?.kind === "value" ? {
|
|
6254
|
+
keep: true,
|
|
6255
|
+
value: answer.value
|
|
6256
|
+
} : {
|
|
6257
|
+
keep: false,
|
|
6258
|
+
value: void 0
|
|
6259
|
+
};
|
|
6260
|
+
}
|
|
6261
|
+
if (Array.isArray(v)) {
|
|
6262
|
+
const items = [];
|
|
6263
|
+
for (const item of v) {
|
|
6264
|
+
const s = substitute(item);
|
|
6265
|
+
if (s.keep) items.push(s.value);
|
|
6266
|
+
}
|
|
6267
|
+
return {
|
|
6268
|
+
keep: true,
|
|
6269
|
+
value: items
|
|
6270
|
+
};
|
|
6271
|
+
}
|
|
6272
|
+
if (isRecord(v)) {
|
|
6273
|
+
const out = {};
|
|
6274
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6275
|
+
const s = substitute(child);
|
|
6276
|
+
if (s.keep) out[k] = s.value;
|
|
6277
|
+
}
|
|
6278
|
+
return {
|
|
6279
|
+
keep: true,
|
|
6280
|
+
value: out
|
|
6281
|
+
};
|
|
6282
|
+
}
|
|
6283
|
+
return {
|
|
6284
|
+
keep: true,
|
|
6285
|
+
value: v
|
|
6286
|
+
};
|
|
6287
|
+
};
|
|
6288
|
+
return {
|
|
6289
|
+
value: substitute(value).value,
|
|
6290
|
+
unresolved
|
|
6291
|
+
};
|
|
6292
|
+
}
|
|
6293
|
+
function touchesTree(tree, patch) {
|
|
6294
|
+
if (tree.size === 0) return false;
|
|
6295
|
+
for (const key of Object.keys(patch)) {
|
|
6296
|
+
const at = key.indexOf("@");
|
|
6297
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6298
|
+
}
|
|
6299
|
+
return false;
|
|
6300
|
+
}
|
|
6301
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6302
|
+
async function readStoredAddonBlob(raw) {
|
|
6303
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6304
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6305
|
+
const result = await threeWay.call(raw);
|
|
6306
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6307
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6308
|
+
}
|
|
6309
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6310
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6311
|
+
const serialize = (key, fn) => {
|
|
6312
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6313
|
+
const tail = next.catch(() => void 0);
|
|
6314
|
+
chains.set(key, tail);
|
|
6315
|
+
tail.then(() => {
|
|
6316
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6317
|
+
});
|
|
6318
|
+
return next;
|
|
6319
|
+
};
|
|
6320
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6321
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6322
|
+
return serialize(chainKey, async () => {
|
|
6323
|
+
const stored = await readStored();
|
|
6324
|
+
const result = await transformSecretWrite({
|
|
6325
|
+
tree,
|
|
6326
|
+
secrets: opts.secrets,
|
|
6327
|
+
patch,
|
|
6328
|
+
stored,
|
|
6329
|
+
...scope !== void 0 ? { scope } : {},
|
|
6330
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6331
|
+
});
|
|
6332
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6333
|
+
const { orphaned } = await result.afterWrite();
|
|
6334
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6335
|
+
});
|
|
6336
|
+
};
|
|
6337
|
+
const wrapped = {
|
|
6338
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6339
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6340
|
+
kind: "device",
|
|
6341
|
+
deviceId
|
|
6342
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6343
|
+
};
|
|
6344
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6345
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6346
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6347
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6348
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6349
|
+
} });
|
|
6350
|
+
}
|
|
6351
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6352
|
+
function withSecretAwareSettings(context, opts) {
|
|
6353
|
+
const raw = context.settings;
|
|
6354
|
+
if (raw === void 0) return context;
|
|
6355
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6356
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6357
|
+
if (prop === "settings") return settings;
|
|
6358
|
+
return Reflect.get(target, prop, receiver);
|
|
6359
|
+
} });
|
|
6360
|
+
}
|
|
6361
|
+
var LEAF = { kind: "leaf" };
|
|
6362
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6363
|
+
function collectFields(fields, out) {
|
|
6364
|
+
for (const field of fields) {
|
|
6365
|
+
if (field.type === "group") {
|
|
6366
|
+
collectFields(field.fields, out);
|
|
6367
|
+
continue;
|
|
6368
|
+
}
|
|
6369
|
+
if (field.type === "sub-tabs") {
|
|
6370
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6371
|
+
continue;
|
|
6372
|
+
}
|
|
6373
|
+
if (field.type === "editable-array") {
|
|
6374
|
+
const item = /* @__PURE__ */ new Map();
|
|
6375
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6376
|
+
if (item.size > 0) out.set(field.key, {
|
|
6377
|
+
kind: "array",
|
|
6378
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6379
|
+
item
|
|
6380
|
+
});
|
|
6381
|
+
continue;
|
|
6382
|
+
}
|
|
6383
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6384
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6385
|
+
}
|
|
6386
|
+
}
|
|
6387
|
+
/** The secret tree a settings schema declares. */
|
|
6388
|
+
function secretTreeFromSchema(schema) {
|
|
6389
|
+
const out = /* @__PURE__ */ new Map();
|
|
6390
|
+
if (schema === null) return out;
|
|
6391
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6392
|
+
return out;
|
|
6393
|
+
}
|
|
6394
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6395
|
+
function parseSecretStatePath(path) {
|
|
6396
|
+
const segments = [];
|
|
6397
|
+
for (const raw of path.split(".")) {
|
|
6398
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6399
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6400
|
+
segments.push(m[2] !== void 0 ? {
|
|
6401
|
+
key: m[1],
|
|
6402
|
+
idKey: m[2]
|
|
6403
|
+
} : { key: m[1] });
|
|
6404
|
+
}
|
|
6405
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6406
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6407
|
+
return segments;
|
|
6408
|
+
}
|
|
6409
|
+
function insert(into, segments) {
|
|
6410
|
+
const [head, ...rest] = segments;
|
|
6411
|
+
if (head === void 0) return;
|
|
6412
|
+
if (rest.length === 0) {
|
|
6413
|
+
into.set(head.key, LEAF);
|
|
6414
|
+
return;
|
|
6415
|
+
}
|
|
6416
|
+
const existing = into.get(head.key);
|
|
6417
|
+
if (head.idKey !== void 0) {
|
|
6418
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6419
|
+
insert(item, rest);
|
|
6420
|
+
into.set(head.key, {
|
|
6421
|
+
kind: "array",
|
|
6422
|
+
idKey: head.idKey,
|
|
6423
|
+
item
|
|
6424
|
+
});
|
|
6425
|
+
return;
|
|
6426
|
+
}
|
|
6427
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6428
|
+
insert(children, rest);
|
|
6429
|
+
into.set(head.key, {
|
|
6430
|
+
kind: "object",
|
|
6431
|
+
children
|
|
6432
|
+
});
|
|
6433
|
+
}
|
|
6434
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6435
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6436
|
+
if (paths.length === 0) return tree;
|
|
6437
|
+
const out = new Map(tree);
|
|
6438
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6439
|
+
return out;
|
|
6440
|
+
}
|
|
6441
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6442
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6443
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6444
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6445
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5919
6446
|
/**
|
|
5920
6447
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5921
6448
|
*
|
|
@@ -5985,6 +6512,25 @@ var BaseAddon = class {
|
|
|
5985
6512
|
settingsStoreReady = false;
|
|
5986
6513
|
/** Default config values. Provided via constructor. */
|
|
5987
6514
|
defaults;
|
|
6515
|
+
/**
|
|
6516
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6517
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6518
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6519
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6520
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6521
|
+
*/
|
|
6522
|
+
secretStatePaths = [];
|
|
6523
|
+
_addonSecretTree = null;
|
|
6524
|
+
_deviceSecretTree = null;
|
|
6525
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6526
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6527
|
+
_unresolvedSecrets = [];
|
|
6528
|
+
_secretRetryTimer = null;
|
|
6529
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6530
|
+
_secretChangeTimer = null;
|
|
6531
|
+
_secretChangeUnsub = null;
|
|
6532
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6533
|
+
_operatorWriteDepth = 0;
|
|
5988
6534
|
constructor(defaults) {
|
|
5989
6535
|
this.defaults = defaults;
|
|
5990
6536
|
this._config = { ...defaults };
|
|
@@ -6020,8 +6566,18 @@ var BaseAddon = class {
|
|
|
6020
6566
|
return this._config;
|
|
6021
6567
|
}
|
|
6022
6568
|
async initialize(context) {
|
|
6023
|
-
|
|
6569
|
+
const secrets = context.secrets;
|
|
6570
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6571
|
+
secrets,
|
|
6572
|
+
addonTree: () => this.addonSecretTree(),
|
|
6573
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6574
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6575
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6576
|
+
}) : context;
|
|
6024
6577
|
await this.resolveConfig();
|
|
6578
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6579
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6580
|
+
});
|
|
6025
6581
|
const result = await this.onInitialize();
|
|
6026
6582
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6027
6583
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6054,6 +6610,12 @@ var BaseAddon = class {
|
|
|
6054
6610
|
*/
|
|
6055
6611
|
async onHubReachable() {}
|
|
6056
6612
|
async shutdown() {
|
|
6613
|
+
this._secretChangeUnsub?.();
|
|
6614
|
+
this._secretChangeUnsub = null;
|
|
6615
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6616
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6617
|
+
this._secretRetryTimer = null;
|
|
6618
|
+
this._secretChangeTimer = null;
|
|
6057
6619
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6058
6620
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6059
6621
|
await this.onShutdown();
|
|
@@ -6132,7 +6694,7 @@ var BaseAddon = class {
|
|
|
6132
6694
|
return hydrateSchema(schema, overlay ? {
|
|
6133
6695
|
...projected,
|
|
6134
6696
|
...overlay
|
|
6135
|
-
} : projected);
|
|
6697
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6136
6698
|
}
|
|
6137
6699
|
/**
|
|
6138
6700
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6181,7 +6743,7 @@ var BaseAddon = class {
|
|
|
6181
6743
|
return hydrateSchema({
|
|
6182
6744
|
...schema,
|
|
6183
6745
|
sections
|
|
6184
|
-
}, projected);
|
|
6746
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6185
6747
|
}
|
|
6186
6748
|
/**
|
|
6187
6749
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6235,18 +6797,50 @@ var BaseAddon = class {
|
|
|
6235
6797
|
value: result.value[key]
|
|
6236
6798
|
};
|
|
6237
6799
|
}
|
|
6800
|
+
/**
|
|
6801
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6802
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6803
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6804
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6805
|
+
* writing back what it read is not (D787).
|
|
6806
|
+
*/
|
|
6807
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6808
|
+
this._operatorWriteDepth++;
|
|
6809
|
+
try {
|
|
6810
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6811
|
+
} finally {
|
|
6812
|
+
this._operatorWriteDepth--;
|
|
6813
|
+
}
|
|
6814
|
+
}
|
|
6238
6815
|
async updateGlobalSettings(patch, nodeId) {
|
|
6816
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6817
|
+
}
|
|
6818
|
+
/**
|
|
6819
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6820
|
+
*
|
|
6821
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6822
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6823
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6824
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6825
|
+
*/
|
|
6826
|
+
async clearSecrets(keys, nodeId) {
|
|
6827
|
+
const tree = this.addonSecretTree();
|
|
6828
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6829
|
+
const patch = {};
|
|
6830
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6831
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6832
|
+
}
|
|
6833
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6239
6834
|
const keys = this.perNodeKeys();
|
|
6240
6835
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6241
6836
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6242
|
-
const barePatch = patch;
|
|
6243
6837
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6244
6838
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6245
6839
|
if (target !== localNode) return;
|
|
6246
6840
|
await this.resolveConfig();
|
|
6247
6841
|
await this.onConfigChanged();
|
|
6248
6842
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6249
|
-
this.maybeAutoRestart(
|
|
6843
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6250
6844
|
}
|
|
6251
6845
|
/**
|
|
6252
6846
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6271,7 +6865,7 @@ var BaseAddon = class {
|
|
|
6271
6865
|
* time to return its response before the addon is torn down and
|
|
6272
6866
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6273
6867
|
*/
|
|
6274
|
-
maybeAutoRestart(
|
|
6868
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6275
6869
|
if (!schema) return;
|
|
6276
6870
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6277
6871
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6279,13 +6873,13 @@ var BaseAddon = class {
|
|
|
6279
6873
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6280
6874
|
}
|
|
6281
6875
|
if (restartKeys.size === 0) return;
|
|
6282
|
-
if (!
|
|
6876
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6283
6877
|
const ctx = this._ctx;
|
|
6284
6878
|
if (!ctx) return;
|
|
6285
6879
|
const addonId = ctx.id;
|
|
6286
6880
|
setImmediate(() => {
|
|
6287
6881
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6288
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6882
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6289
6883
|
}).catch((err) => {
|
|
6290
6884
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6291
6885
|
});
|
|
@@ -6294,7 +6888,7 @@ var BaseAddon = class {
|
|
|
6294
6888
|
async getDeviceSettings(deviceId) {
|
|
6295
6889
|
const schema = this.deviceSettingsSchema();
|
|
6296
6890
|
if (!schema) return { sections: [] };
|
|
6297
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6891
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6298
6892
|
}
|
|
6299
6893
|
async updateDeviceSettings(deviceId, patch) {
|
|
6300
6894
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6424,7 +7018,7 @@ var BaseAddon = class {
|
|
|
6424
7018
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6425
7019
|
*/
|
|
6426
7020
|
async resolveConfig() {
|
|
6427
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7021
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6428
7022
|
const perNode = this.perNodeKeys();
|
|
6429
7023
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6430
7024
|
const resolved = { ...this.defaults };
|
|
@@ -6449,7 +7043,7 @@ var BaseAddon = class {
|
|
|
6449
7043
|
key,
|
|
6450
7044
|
schema,
|
|
6451
7045
|
fallback,
|
|
6452
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7046
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6453
7047
|
write: async (patch) => {
|
|
6454
7048
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6455
7049
|
},
|
|
@@ -6466,7 +7060,7 @@ var BaseAddon = class {
|
|
|
6466
7060
|
key,
|
|
6467
7061
|
schema,
|
|
6468
7062
|
fallback,
|
|
6469
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7063
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6470
7064
|
write: async (patch) => {
|
|
6471
7065
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6472
7066
|
},
|
|
@@ -6478,6 +7072,70 @@ var BaseAddon = class {
|
|
|
6478
7072
|
} })
|
|
6479
7073
|
});
|
|
6480
7074
|
}
|
|
7075
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7076
|
+
addonSecretTree() {
|
|
7077
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7078
|
+
return this._addonSecretTree;
|
|
7079
|
+
}
|
|
7080
|
+
deviceSecretTree() {
|
|
7081
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7082
|
+
return this._deviceSecretTree;
|
|
7083
|
+
}
|
|
7084
|
+
/**
|
|
7085
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7086
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7087
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7088
|
+
* than start on an empty credential.
|
|
7089
|
+
*/
|
|
7090
|
+
get unresolvedSecrets() {
|
|
7091
|
+
return this._unresolvedSecrets;
|
|
7092
|
+
}
|
|
7093
|
+
/**
|
|
7094
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7095
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7096
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7097
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7098
|
+
* ever written back from here.
|
|
7099
|
+
*/
|
|
7100
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7101
|
+
const secrets = this._ctx?.secrets;
|
|
7102
|
+
if (secrets === void 0) return blob;
|
|
7103
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7104
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7105
|
+
if (refs.length === 0) {
|
|
7106
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7107
|
+
return blob;
|
|
7108
|
+
}
|
|
7109
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7110
|
+
if (trackForConfig) {
|
|
7111
|
+
this._unresolvedSecrets = unresolved;
|
|
7112
|
+
if (unresolved.length > 0) {
|
|
7113
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7114
|
+
ref: u.ref,
|
|
7115
|
+
reason: u.reason
|
|
7116
|
+
})) } });
|
|
7117
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7118
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7119
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7120
|
+
}
|
|
7121
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7122
|
+
}
|
|
7123
|
+
return value;
|
|
7124
|
+
}
|
|
7125
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7126
|
+
scheduleSecretReresolve(delayMs) {
|
|
7127
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7128
|
+
if (this[timerOf] !== null) return;
|
|
7129
|
+
const timer = setTimeout(() => {
|
|
7130
|
+
this[timerOf] = null;
|
|
7131
|
+
if (this._ctx === null) return;
|
|
7132
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7133
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7134
|
+
});
|
|
7135
|
+
}, delayMs);
|
|
7136
|
+
timer.unref?.();
|
|
7137
|
+
this[timerOf] = timer;
|
|
7138
|
+
}
|
|
6481
7139
|
/**
|
|
6482
7140
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6483
7141
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6745,32 +7403,12 @@ object({
|
|
|
6745
7403
|
audioCodec: string().optional(),
|
|
6746
7404
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6747
7405
|
});
|
|
6748
|
-
var EncodedPacketSchema = object({
|
|
6749
|
-
type: _enum(["video", "audio"]),
|
|
6750
|
-
data: _instanceof(Uint8Array),
|
|
6751
|
-
pts: number(),
|
|
6752
|
-
dts: number(),
|
|
6753
|
-
keyframe: boolean(),
|
|
6754
|
-
codec: string()
|
|
6755
|
-
});
|
|
6756
|
-
var DecodedFrameSchema = object({
|
|
6757
|
-
data: _instanceof(Uint8Array),
|
|
6758
|
-
width: number(),
|
|
6759
|
-
height: number(),
|
|
6760
|
-
format: _enum([
|
|
6761
|
-
"jpeg",
|
|
6762
|
-
"rgb",
|
|
6763
|
-
"bgr",
|
|
6764
|
-
"yuv420",
|
|
6765
|
-
"gray"
|
|
6766
|
-
]),
|
|
6767
|
-
timestamp: number()
|
|
6768
|
-
});
|
|
6769
7406
|
/**
|
|
6770
7407
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6771
7408
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6772
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6773
|
-
*
|
|
7409
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7410
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7411
|
+
* over tRPC / Moleculer.
|
|
6774
7412
|
*
|
|
6775
7413
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6776
7414
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6796,50 +7434,6 @@ var FrameHandleSchema = object({
|
|
|
6796
7434
|
slotCount: number().int().positive()
|
|
6797
7435
|
});
|
|
6798
7436
|
/**
|
|
6799
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6800
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6801
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6802
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6803
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6804
|
-
*/
|
|
6805
|
-
var FrameHandleFormatSchema = _enum([
|
|
6806
|
-
"rgb",
|
|
6807
|
-
"bgr",
|
|
6808
|
-
"yuv420",
|
|
6809
|
-
"gray"
|
|
6810
|
-
]);
|
|
6811
|
-
/**
|
|
6812
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6813
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6814
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6815
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6816
|
-
* they asked for with no broker-side conversion.
|
|
6817
|
-
*/
|
|
6818
|
-
var SubscribeFramesInputSchema = object({
|
|
6819
|
-
brokerId: string(),
|
|
6820
|
-
format: FrameHandleFormatSchema,
|
|
6821
|
-
/**
|
|
6822
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6823
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6824
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6825
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6826
|
-
*/
|
|
6827
|
-
maxFps: number().positive().optional(),
|
|
6828
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6829
|
-
tag: string().optional()
|
|
6830
|
-
});
|
|
6831
|
-
/**
|
|
6832
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6833
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6834
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6835
|
-
*/
|
|
6836
|
-
var SubscribeFramesResultSchema = object({
|
|
6837
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6838
|
-
subscriptionId: string(),
|
|
6839
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6840
|
-
maxFps: number().nonnegative()
|
|
6841
|
-
});
|
|
6842
|
-
/**
|
|
6843
7437
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6844
7438
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6845
7439
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6847,8 +7441,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6847
7441
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6848
7442
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6849
7443
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6850
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6851
|
-
*
|
|
7444
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7445
|
+
* it.
|
|
6852
7446
|
*/
|
|
6853
7447
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6854
7448
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6866,11 +7460,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6866
7460
|
format: AudioChunkFormatSchema.optional()
|
|
6867
7461
|
});
|
|
6868
7462
|
/**
|
|
6869
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6870
|
-
*
|
|
6871
|
-
*
|
|
6872
|
-
*
|
|
6873
|
-
* `pullAudioChunks`.
|
|
7463
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7464
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7465
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7466
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6874
7467
|
*/
|
|
6875
7468
|
var SubscribeAudioChunksInputSchema = object({
|
|
6876
7469
|
brokerId: string(),
|
|
@@ -6901,9 +7494,7 @@ var BrokerStatsSchema = object({
|
|
|
6901
7494
|
"stopped"
|
|
6902
7495
|
]),
|
|
6903
7496
|
inputFps: number(),
|
|
6904
|
-
decodeFps: number(),
|
|
6905
7497
|
encodedSubscribers: number(),
|
|
6906
|
-
decodedSubscribers: number(),
|
|
6907
7498
|
uptimeMs: number(),
|
|
6908
7499
|
bitrateKbps: number(),
|
|
6909
7500
|
idrIntervalMs: number(),
|
|
@@ -6916,14 +7507,6 @@ var BrokerStatsSchema = object({
|
|
|
6916
7507
|
preBufferMs: number(),
|
|
6917
7508
|
preBufferPackets: number(),
|
|
6918
7509
|
/**
|
|
6919
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6920
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6921
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6922
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6923
|
-
* a separate cap call per broker.
|
|
6924
|
-
*/
|
|
6925
|
-
decoderNodeId: string().nullable(),
|
|
6926
|
-
/**
|
|
6927
7510
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6928
7511
|
* when the stream has no audio track or the broker is in cold start.
|
|
6929
7512
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7187,6 +7770,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7187
7770
|
kind: "mutation",
|
|
7188
7771
|
auth: "admin"
|
|
7189
7772
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7773
|
+
function defOf(schema) {
|
|
7774
|
+
return schema._zod?.def ?? {};
|
|
7775
|
+
}
|
|
7776
|
+
function declaredHere(schema) {
|
|
7777
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7778
|
+
}
|
|
7779
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7780
|
+
var WRAPPERS = new Set([
|
|
7781
|
+
"optional",
|
|
7782
|
+
"nullable",
|
|
7783
|
+
"default",
|
|
7784
|
+
"prefault",
|
|
7785
|
+
"catch",
|
|
7786
|
+
"readonly",
|
|
7787
|
+
"nonoptional"
|
|
7788
|
+
]);
|
|
7789
|
+
/**
|
|
7790
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7791
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7792
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7793
|
+
* `.transform` on `in`).
|
|
7794
|
+
*/
|
|
7795
|
+
function layersOf(schema) {
|
|
7796
|
+
const out = [];
|
|
7797
|
+
const queue = [schema];
|
|
7798
|
+
while (queue.length > 0) {
|
|
7799
|
+
const s = queue.shift();
|
|
7800
|
+
if (!s || out.includes(s)) continue;
|
|
7801
|
+
out.push(s);
|
|
7802
|
+
const def = defOf(s);
|
|
7803
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7804
|
+
if (def.type === "pipe") {
|
|
7805
|
+
if (def.in) queue.push(def.in);
|
|
7806
|
+
if (def.out) queue.push(def.out);
|
|
7807
|
+
}
|
|
7808
|
+
}
|
|
7809
|
+
return out;
|
|
7810
|
+
}
|
|
7811
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7812
|
+
function isZodSecret(schema) {
|
|
7813
|
+
return layersOf(schema).some(declaredHere);
|
|
7814
|
+
}
|
|
7815
|
+
/**
|
|
7816
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7817
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7818
|
+
* object or array is reported as one path and not descended into — everything
|
|
7819
|
+
* under it is secret.
|
|
7820
|
+
*/
|
|
7821
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7822
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7823
|
+
const paths = [];
|
|
7824
|
+
for (const layer of layersOf(schema)) {
|
|
7825
|
+
const def = defOf(layer);
|
|
7826
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7827
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7828
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7829
|
+
else if (def.type === "intersection") {
|
|
7830
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7831
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
return [...new Set(paths)];
|
|
7835
|
+
}
|
|
7190
7836
|
//#endregion
|
|
7191
7837
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7192
7838
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -8452,8 +9098,8 @@ function buildAddonRouteProvider(id, routes) {
|
|
|
8452
9098
|
const reply = buildCapturingReply(envelope);
|
|
8453
9099
|
const request = {
|
|
8454
9100
|
params: {
|
|
8455
|
-
...
|
|
8456
|
-
...
|
|
9101
|
+
...match.params,
|
|
9102
|
+
...input.params
|
|
8457
9103
|
},
|
|
8458
9104
|
query: input.query,
|
|
8459
9105
|
body: input.body,
|
|
@@ -10462,70 +11108,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10462
11108
|
"backup"
|
|
10463
11109
|
]).optional()
|
|
10464
11110
|
});
|
|
10465
|
-
var DecoderStatsSchema = object({
|
|
10466
|
-
inputFps: number(),
|
|
10467
|
-
outputFps: number(),
|
|
10468
|
-
avgDecodeTimeMs: number(),
|
|
10469
|
-
droppedFrames: number(),
|
|
10470
|
-
/**
|
|
10471
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10472
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10473
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10474
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10475
|
-
*/
|
|
10476
|
-
lagMs: number().optional(),
|
|
10477
|
-
effectiveFps: number().optional(),
|
|
10478
|
-
adaptiveFps: number().optional()
|
|
10479
|
-
});
|
|
10480
|
-
var DecoderSessionConfigSchema = object({
|
|
10481
|
-
codec: string(),
|
|
10482
|
-
maxFps: number().default(0),
|
|
10483
|
-
outputFormat: _enum([
|
|
10484
|
-
"jpeg",
|
|
10485
|
-
"rgb",
|
|
10486
|
-
"bgr",
|
|
10487
|
-
"yuv420",
|
|
10488
|
-
"gray"
|
|
10489
|
-
]).default("jpeg"),
|
|
10490
|
-
scale: number().default(1),
|
|
10491
|
-
width: number().optional(),
|
|
10492
|
-
height: number().optional(),
|
|
10493
|
-
/**
|
|
10494
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10495
|
-
* because the cap is generic (any caller could request decode), but
|
|
10496
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10497
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10498
|
-
* sendPacket errors on a single hung camera).
|
|
10499
|
-
*/
|
|
10500
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10501
|
-
/**
|
|
10502
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10503
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10504
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10505
|
-
* profile cleanly.
|
|
10506
|
-
*/
|
|
10507
|
-
tag: string().optional(),
|
|
10508
|
-
/**
|
|
10509
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10510
|
-
*
|
|
10511
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10512
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10513
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10514
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10515
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10516
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10517
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10518
|
-
*/
|
|
10519
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10520
|
-
/**
|
|
10521
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10522
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10523
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10524
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10525
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10526
|
-
*/
|
|
10527
|
-
debug: boolean().optional()
|
|
10528
|
-
});
|
|
10529
11111
|
/**
|
|
10530
11112
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10531
11113
|
* an addon declares its channels in.
|
|
@@ -10676,7 +11258,18 @@ var LABEL_SUPPLY_STEP_IDS = [
|
|
|
10676
11258
|
];
|
|
10677
11259
|
/** Steps whose box a root detection can BE. */
|
|
10678
11260
|
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
10679
|
-
|
|
11261
|
+
/**
|
|
11262
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11263
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11264
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11265
|
+
* no camera tree carries.)
|
|
11266
|
+
*/
|
|
11267
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11268
|
+
[
|
|
11269
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11270
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11271
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11272
|
+
];
|
|
10680
11273
|
var MODEL_FORMATS = [
|
|
10681
11274
|
"onnx",
|
|
10682
11275
|
"coreml",
|
|
@@ -10705,7 +11298,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10705
11298
|
/** Multi-file payload (directory members or sibling files). */
|
|
10706
11299
|
files: array(string()).readonly().optional(),
|
|
10707
11300
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10708
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11301
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11302
|
+
/**
|
|
11303
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11304
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11305
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11306
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11307
|
+
* node records the revision it downloaded next to the file
|
|
11308
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11309
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11310
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11311
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11312
|
+
*/
|
|
11313
|
+
revision: string().min(1).optional()
|
|
11314
|
+
});
|
|
11315
|
+
/**
|
|
11316
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11317
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11318
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11319
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11320
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11321
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11322
|
+
*/
|
|
11323
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11324
|
+
"current",
|
|
11325
|
+
"stale",
|
|
11326
|
+
"missing"
|
|
11327
|
+
]);
|
|
11328
|
+
/**
|
|
11329
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11330
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11331
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11332
|
+
*/
|
|
11333
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11334
|
+
"fp32",
|
|
11335
|
+
"fp16",
|
|
11336
|
+
"int8"
|
|
11337
|
+
]);
|
|
11338
|
+
/**
|
|
11339
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11340
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11341
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11342
|
+
*/
|
|
11343
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11344
|
+
downloaded: boolean(),
|
|
11345
|
+
sizeMB: number(),
|
|
11346
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11347
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10709
11348
|
});
|
|
10710
11349
|
/**
|
|
10711
11350
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10819,25 +11458,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10819
11458
|
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
10820
11459
|
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
10821
11460
|
* child of the `parentMacro` detection that contains it — never a track.
|
|
11461
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11462
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11463
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11464
|
+
* postprocessor on read, never stored by an import.
|
|
10822
11465
|
*/
|
|
10823
|
-
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
11466
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11467
|
+
object({
|
|
11468
|
+
kind: literal("label"),
|
|
11469
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11470
|
+
labelToEffect: record(string(), string()),
|
|
11471
|
+
uncovered: array(string()).readonly()
|
|
11472
|
+
}),
|
|
11473
|
+
object({
|
|
11474
|
+
kind: literal("crop"),
|
|
11475
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11476
|
+
rootLabels: array(string()).readonly(),
|
|
11477
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11478
|
+
childClass: _enum(["plate", "face"]),
|
|
11479
|
+
/**
|
|
11480
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11481
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11482
|
+
* stored by an import.
|
|
11483
|
+
*/
|
|
11484
|
+
rootInputPx: number().int().positive().optional()
|
|
11485
|
+
}),
|
|
11486
|
+
object({
|
|
11487
|
+
kind: literal("mask"),
|
|
11488
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11489
|
+
})
|
|
11490
|
+
]);
|
|
10841
11491
|
var ModelCatalogEntrySchema = object({
|
|
10842
11492
|
id: string(),
|
|
10843
11493
|
name: string(),
|
|
@@ -10903,6 +11553,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10903
11553
|
*/
|
|
10904
11554
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10905
11555
|
/**
|
|
11556
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11557
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11558
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11559
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11560
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11561
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11562
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11563
|
+
*/
|
|
11564
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11565
|
+
/**
|
|
11566
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11567
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11568
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11569
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11570
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11571
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11572
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11573
|
+
*/
|
|
11574
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11575
|
+
/**
|
|
11576
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11577
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11578
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11579
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11580
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11581
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11582
|
+
*/
|
|
11583
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11584
|
+
/**
|
|
10906
11585
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10907
11586
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10908
11587
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -12643,13 +13322,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12643
13322
|
lastRtpAt: number(),
|
|
12644
13323
|
bytesSent: number()
|
|
12645
13324
|
});
|
|
12646
|
-
var BrokerDecodedClientSchema = object({
|
|
12647
|
-
tag: string(),
|
|
12648
|
-
subscribedAt: number(),
|
|
12649
|
-
maxFps: number(),
|
|
12650
|
-
framesDelivered: number(),
|
|
12651
|
-
framesDropped: number()
|
|
12652
|
-
});
|
|
12653
13325
|
var BrokerAudioClientSchema = object({
|
|
12654
13326
|
tag: string(),
|
|
12655
13327
|
subscribedAt: number(),
|
|
@@ -12741,7 +13413,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12741
13413
|
});
|
|
12742
13414
|
var BrokerClientsSchema = object({
|
|
12743
13415
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12744
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12745
13416
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12746
13417
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12747
13418
|
pipeClients: number(),
|
|
@@ -13110,11 +13781,7 @@ method(object({
|
|
|
13110
13781
|
auth: "admin"
|
|
13111
13782
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
13112
13783
|
brokerId: string(),
|
|
13113
|
-
channel: _enum([
|
|
13114
|
-
"rtsp",
|
|
13115
|
-
"decoded",
|
|
13116
|
-
"audio"
|
|
13117
|
-
]),
|
|
13784
|
+
channel: _enum(["rtsp", "audio"]),
|
|
13118
13785
|
handle: string()
|
|
13119
13786
|
}), object({ killed: boolean() }), {
|
|
13120
13787
|
kind: "mutation",
|
|
@@ -13149,10 +13816,7 @@ method(object({
|
|
|
13149
13816
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
13150
13817
|
subscriptionId: string(),
|
|
13151
13818
|
maxCount: number().int().positive().default(8)
|
|
13152
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
13153
|
-
subscriptionId: string(),
|
|
13154
|
-
maxCount: number().int().positive().default(4)
|
|
13155
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13819
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13156
13820
|
brokerId: string(),
|
|
13157
13821
|
seconds: number().min(0).max(30)
|
|
13158
13822
|
}), _void(), {
|
|
@@ -14412,53 +15076,201 @@ id: union([string(), number()]) }), {
|
|
|
14412
15076
|
auth: "admin"
|
|
14413
15077
|
});
|
|
14414
15078
|
/**
|
|
14415
|
-
*
|
|
14416
|
-
*
|
|
14417
|
-
*
|
|
15079
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
15080
|
+
*
|
|
15081
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
15082
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
15083
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
15084
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
15085
|
+
* against the CALLER, never against anything the caller claims.
|
|
15086
|
+
*
|
|
15087
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
15088
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
15089
|
+
* connection, the agent from its child's connection carried in
|
|
15090
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
15091
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
15092
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
15093
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
15094
|
+
* runner is the same OS user): see the threat model in
|
|
15095
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
15096
|
+
*
|
|
15097
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
15098
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
15099
|
+
* floors every method to admin anyway (D240).
|
|
15100
|
+
*
|
|
15101
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14418
15102
|
*/
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
})
|
|
14429
|
-
|
|
15103
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
15104
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
15105
|
+
"key-missing",
|
|
15106
|
+
"wrong-key",
|
|
15107
|
+
"key-file-unreadable",
|
|
15108
|
+
"store-unavailable",
|
|
15109
|
+
"not-initialized",
|
|
15110
|
+
"decrypt-failed"
|
|
15111
|
+
]);
|
|
15112
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
15113
|
+
state: literal("locked"),
|
|
15114
|
+
reason: KeychainUnavailableReasonSchema
|
|
15115
|
+
})]);
|
|
15116
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
15117
|
+
object({
|
|
15118
|
+
kind: literal("value"),
|
|
15119
|
+
value: string(),
|
|
15120
|
+
version: number().int()
|
|
15121
|
+
}),
|
|
15122
|
+
object({ kind: literal("missing") }),
|
|
15123
|
+
object({
|
|
15124
|
+
kind: literal("unavailable"),
|
|
15125
|
+
reason: KeychainUnavailableReasonSchema
|
|
15126
|
+
}),
|
|
15127
|
+
object({ kind: literal("forbidden") })
|
|
15128
|
+
]);
|
|
15129
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
15130
|
+
/** Metadata of one stored value — never the value. */
|
|
15131
|
+
var KeychainSecretMetaSchema = object({
|
|
15132
|
+
ref: string(),
|
|
15133
|
+
owner: string(),
|
|
15134
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
15135
|
+
scope: string(),
|
|
15136
|
+
fieldPath: string(),
|
|
15137
|
+
version: number().int(),
|
|
15138
|
+
createdAt: number(),
|
|
15139
|
+
updatedAt: number(),
|
|
15140
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15141
|
+
updatedBy: string(),
|
|
15142
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
15143
|
+
lastReadAt: number().nullable()
|
|
15144
|
+
});
|
|
15145
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
15146
|
+
method(object({
|
|
15147
|
+
ref: string().min(1),
|
|
15148
|
+
value: string().min(1)
|
|
15149
|
+
}), object({
|
|
15150
|
+
ref: string(),
|
|
15151
|
+
version: number().int()
|
|
15152
|
+
}), {
|
|
15153
|
+
kind: "mutation",
|
|
15154
|
+
auth: "admin"
|
|
15155
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
15156
|
+
kind: "mutation",
|
|
15157
|
+
auth: "admin"
|
|
15158
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15159
|
+
var KeychainKeySourceSchema = object({
|
|
15160
|
+
kind: _enum([
|
|
15161
|
+
"config-file",
|
|
15162
|
+
"previous-config-file",
|
|
15163
|
+
"platform",
|
|
15164
|
+
"default-file"
|
|
15165
|
+
]),
|
|
15166
|
+
/** File sources only — a path is not a secret. */
|
|
15167
|
+
path: string().optional(),
|
|
15168
|
+
/**
|
|
15169
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
15170
|
+
* next to the database it protects (the default file). The page warns.
|
|
15171
|
+
*/
|
|
15172
|
+
sharesBackupWithDatabase: boolean()
|
|
15173
|
+
});
|
|
15174
|
+
var KeychainStatusSchema = object({
|
|
15175
|
+
keychain: KeychainStateSchema,
|
|
15176
|
+
/** The source of the master key in use; `null` while locked. */
|
|
15177
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
15178
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
15179
|
+
configuredSource: KeychainKeySourceSchema,
|
|
15180
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
15181
|
+
fingerprint: string().nullable(),
|
|
15182
|
+
activeKeyId: string().nullable(),
|
|
15183
|
+
/**
|
|
15184
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
15185
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
15186
|
+
*/
|
|
15187
|
+
rotationPending: boolean(),
|
|
15188
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15189
|
+
retiredWraps: number().int(),
|
|
15190
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
15191
|
+
secretCount: number().int()
|
|
15192
|
+
});
|
|
15193
|
+
/**
|
|
15194
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
15195
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
15196
|
+
* never reported as an orphan (and never deleted as one).
|
|
15197
|
+
*/
|
|
15198
|
+
var KeychainSecretUsageSchema = _enum([
|
|
15199
|
+
"in-use",
|
|
15200
|
+
"orphan",
|
|
15201
|
+
"unknown"
|
|
15202
|
+
]);
|
|
15203
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
15204
|
+
var KeychainAuditActionSchema = _enum([
|
|
15205
|
+
"put",
|
|
15206
|
+
"delete",
|
|
15207
|
+
"reveal",
|
|
15208
|
+
"rotate-master-key",
|
|
15209
|
+
"purge-retired-keys",
|
|
15210
|
+
"download-recovery-key",
|
|
15211
|
+
"delete-orphans",
|
|
15212
|
+
"reset",
|
|
15213
|
+
"initialize"
|
|
15214
|
+
]);
|
|
15215
|
+
var KeychainAuditEntrySchema = object({
|
|
15216
|
+
id: string(),
|
|
15217
|
+
at: number(),
|
|
15218
|
+
action: KeychainAuditActionSchema,
|
|
15219
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15220
|
+
actor: string(),
|
|
15221
|
+
ref: string().nullable(),
|
|
15222
|
+
detail: string().nullable()
|
|
15223
|
+
});
|
|
15224
|
+
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({
|
|
15225
|
+
value: string(),
|
|
15226
|
+
version: number().int()
|
|
15227
|
+
}), {
|
|
15228
|
+
kind: "mutation",
|
|
15229
|
+
auth: "admin",
|
|
15230
|
+
caller: "required"
|
|
15231
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15232
|
+
deleted: array(string()).readonly(),
|
|
15233
|
+
kept: array(object({
|
|
15234
|
+
ref: string(),
|
|
15235
|
+
usage: KeychainSecretUsageSchema
|
|
15236
|
+
})).readonly()
|
|
15237
|
+
}), {
|
|
15238
|
+
kind: "mutation",
|
|
15239
|
+
auth: "admin",
|
|
15240
|
+
caller: "required"
|
|
15241
|
+
}), method(object({}), object({
|
|
15242
|
+
fingerprint: string(),
|
|
15243
|
+
keySource: KeychainKeySourceSchema
|
|
15244
|
+
}), {
|
|
15245
|
+
kind: "mutation",
|
|
15246
|
+
auth: "admin",
|
|
15247
|
+
caller: "required"
|
|
15248
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15249
|
+
kind: "mutation",
|
|
15250
|
+
auth: "admin",
|
|
15251
|
+
caller: "required"
|
|
15252
|
+
}), method(object({}), object({
|
|
15253
|
+
key: string(),
|
|
15254
|
+
fingerprint: string(),
|
|
15255
|
+
keySource: KeychainKeySourceSchema
|
|
15256
|
+
}), {
|
|
15257
|
+
kind: "mutation",
|
|
15258
|
+
auth: "admin",
|
|
15259
|
+
caller: "required"
|
|
15260
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15261
|
+
archivedCollection: string().nullable(),
|
|
15262
|
+
archived: number().int()
|
|
15263
|
+
}), {
|
|
15264
|
+
kind: "mutation",
|
|
15265
|
+
auth: "admin",
|
|
15266
|
+
caller: "required"
|
|
15267
|
+
});
|
|
15268
|
+
method(_void(), object({
|
|
14430
15269
|
id: string(),
|
|
14431
15270
|
name: string(),
|
|
14432
|
-
isPullMode: boolean().optional(),
|
|
14433
|
-
priority: number().optional(),
|
|
14434
15271
|
hwaccel: string().optional(),
|
|
14435
15272
|
probedBestHwaccel: string().optional()
|
|
14436
|
-
})), method(
|
|
14437
|
-
sessionId: string(),
|
|
14438
|
-
nodeId: string()
|
|
14439
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14440
|
-
sessionId: string(),
|
|
14441
|
-
packet: EncodedPacketSchema
|
|
14442
|
-
}), _void()), method(object({
|
|
14443
|
-
sessionId: string(),
|
|
14444
|
-
url: string()
|
|
14445
|
-
}), _void()), method(object({
|
|
14446
|
-
sessionId: string(),
|
|
14447
|
-
maxCount: number().default(1),
|
|
14448
|
-
waitMs: number().optional()
|
|
14449
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14450
|
-
sessionId: string(),
|
|
14451
|
-
maxCount: number().default(1),
|
|
14452
|
-
waitMs: number().optional()
|
|
14453
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14454
|
-
sessionId: string(),
|
|
14455
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14456
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14457
|
-
sessionId: string(),
|
|
14458
|
-
codec: string(),
|
|
14459
|
-
outputFormat: string(),
|
|
14460
|
-
createdAtMs: number()
|
|
14461
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15273
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14462
15274
|
kind: "mutation",
|
|
14463
15275
|
auth: "admin"
|
|
14464
15276
|
});
|
|
@@ -15692,6 +16504,10 @@ var DeviceInfoSchema = object({
|
|
|
15692
16504
|
isCamera: boolean(),
|
|
15693
16505
|
/** Current config values — serializable snapshot */
|
|
15694
16506
|
config: record(string(), unknown()),
|
|
16507
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16508
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16509
|
+
* when the owning runner has not reported them. */
|
|
16510
|
+
secretConfigPaths: array(string()).optional(),
|
|
15695
16511
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15696
16512
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15697
16513
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15897,12 +16713,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15897
16713
|
* call (workers re-register on init), so probe-driven updates
|
|
15898
16714
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15899
16715
|
features: array(string()).optional(),
|
|
15900
|
-
config: record(string(), unknown())
|
|
16716
|
+
config: record(string(), unknown()),
|
|
16717
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16718
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16719
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16720
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16721
|
+
* omits it and the keyword backstop applies. */
|
|
16722
|
+
secretConfigPaths: array(string()).optional()
|
|
15901
16723
|
});
|
|
15902
16724
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15903
16725
|
var DevicePersistConfigPayloadSchema = object({
|
|
15904
16726
|
deviceId: number(),
|
|
15905
|
-
data: record(string(), unknown())
|
|
16727
|
+
data: record(string(), unknown()),
|
|
16728
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16729
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16730
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16731
|
+
secretConfigPaths: array(string()).optional()
|
|
15906
16732
|
});
|
|
15907
16733
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15908
16734
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -17556,7 +18382,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17556
18382
|
icon: string().optional(),
|
|
17557
18383
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17558
18384
|
startUrl: string(),
|
|
17559
|
-
stage: LoginStageEnum
|
|
18385
|
+
stage: LoginStageEnum,
|
|
18386
|
+
/**
|
|
18387
|
+
* The provider names an external identity a signed-in user can link to
|
|
18388
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
18389
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
18390
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
18391
|
+
*/
|
|
18392
|
+
linkable: boolean().optional()
|
|
17560
18393
|
}),
|
|
17561
18394
|
object({
|
|
17562
18395
|
kind: literal("widget"),
|
|
@@ -21976,8 +22809,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21976
22809
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21977
22810
|
stepId: "face-embedding",
|
|
21978
22811
|
key: "minLandmarkFaceSize",
|
|
21979
|
-
label: "Min face size
|
|
21980
|
-
description: "
|
|
22812
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22813
|
+
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.",
|
|
21981
22814
|
type: "slider",
|
|
21982
22815
|
min: 0,
|
|
21983
22816
|
max: 64,
|
|
@@ -22950,8 +23783,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22950
23783
|
]);
|
|
22951
23784
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22952
23785
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22953
|
-
/**
|
|
22954
|
-
|
|
23786
|
+
/**
|
|
23787
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23788
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23789
|
+
*
|
|
23790
|
+
* - `operator` — drawn by hand.
|
|
23791
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23792
|
+
* model, or a larger teacher model).
|
|
23793
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23794
|
+
* back from the track store (never a re-run).
|
|
23795
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23796
|
+
*/
|
|
23797
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23798
|
+
"operator",
|
|
23799
|
+
"assist",
|
|
23800
|
+
"pipeline",
|
|
23801
|
+
"llm"
|
|
23802
|
+
]);
|
|
22955
23803
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22956
23804
|
var RetrainBboxSchema = object({
|
|
22957
23805
|
x: number(),
|
|
@@ -22969,7 +23817,8 @@ var RetrainBboxSchema = object({
|
|
|
22969
23817
|
*/
|
|
22970
23818
|
var RetrainAnnotationSchema = object({
|
|
22971
23819
|
id: string(),
|
|
22972
|
-
|
|
23820
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23821
|
+
trackId: string().optional(),
|
|
22973
23822
|
deviceId: number(),
|
|
22974
23823
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22975
23824
|
mediaKey: string(),
|
|
@@ -23018,18 +23867,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
23018
23867
|
* fail, whatever became of the original. */
|
|
23019
23868
|
copied: boolean()
|
|
23020
23869
|
});
|
|
23870
|
+
/**
|
|
23871
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23872
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23873
|
+
* box recorded on the source media row when there is one, else the track
|
|
23874
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23875
|
+
* until the operator confirms it.
|
|
23876
|
+
*/
|
|
23877
|
+
var RetrainPipelineBoxSchema = object({
|
|
23878
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23879
|
+
bbox: RetrainBboxSchema,
|
|
23880
|
+
macroClass: RetrainMacroClassSchema,
|
|
23881
|
+
label: string().optional(),
|
|
23882
|
+
subLabel: string().optional(),
|
|
23883
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23884
|
+
score: number().optional(),
|
|
23885
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23886
|
+
modelId: string().optional(),
|
|
23887
|
+
trackId: string(),
|
|
23888
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23889
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23890
|
+
basis: _enum(["subject-box", "position"]),
|
|
23891
|
+
deltaMs: number()
|
|
23892
|
+
});
|
|
23893
|
+
/**
|
|
23894
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23895
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23896
|
+
* track at all.
|
|
23897
|
+
*/
|
|
23898
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
23021
23899
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
23022
23900
|
var RetrainFrameSchema = object({
|
|
23023
23901
|
frameId: string(),
|
|
23024
23902
|
deviceId: number(),
|
|
23025
|
-
|
|
23026
|
-
/**
|
|
23027
|
-
|
|
23903
|
+
origin: RetrainFrameOriginSchema,
|
|
23904
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23905
|
+
trackId: string().optional(),
|
|
23906
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23907
|
+
* Absent on a recording still. */
|
|
23908
|
+
sourceMediaId: number().int().optional(),
|
|
23909
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23910
|
+
epochMs: number().optional(),
|
|
23028
23911
|
sourceKind: MediaFileKindEnum,
|
|
23029
23912
|
sizeBytes: number().int(),
|
|
23030
23913
|
width: number().int(),
|
|
23031
23914
|
height: number().int(),
|
|
23032
|
-
copiedAt: number()
|
|
23915
|
+
copiedAt: number(),
|
|
23916
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23917
|
+
capturedAt: number().optional(),
|
|
23918
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23919
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23920
|
+
* a false positive. */
|
|
23921
|
+
complete: boolean(),
|
|
23922
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23923
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23924
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23925
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23926
|
+
collectionIds: array(string()).readonly().optional()
|
|
23033
23927
|
});
|
|
23034
23928
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
23035
23929
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -23050,6 +23944,53 @@ var RetrainFrameListSchema = object({
|
|
|
23050
23944
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
23051
23945
|
autoPickMediaId: number().int().optional()
|
|
23052
23946
|
});
|
|
23947
|
+
/**
|
|
23948
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23949
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23950
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23951
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23952
|
+
* export carried (`exportedInBatch`).
|
|
23953
|
+
*/
|
|
23954
|
+
var RetrainExportFilterSchema = object({
|
|
23955
|
+
deviceIds: array(number()).optional(),
|
|
23956
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23957
|
+
/** Only frames in at least one of these named collections. */
|
|
23958
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23959
|
+
batchId: string().optional(),
|
|
23960
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23961
|
+
completeOnly: boolean().optional()
|
|
23962
|
+
});
|
|
23963
|
+
/**
|
|
23964
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23965
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23966
|
+
* convention — the classifier layout.
|
|
23967
|
+
*/
|
|
23968
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23969
|
+
/**
|
|
23970
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23971
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23972
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23973
|
+
* logged.
|
|
23974
|
+
*/
|
|
23975
|
+
var RetrainArchiveTargetSchema = object({
|
|
23976
|
+
kind: literal("http"),
|
|
23977
|
+
method: _enum(["PUT", "POST"]),
|
|
23978
|
+
url: string().url(),
|
|
23979
|
+
headers: record(string(), string()).optional()
|
|
23980
|
+
});
|
|
23981
|
+
var RetrainArchiveResultSchema = object({
|
|
23982
|
+
batchId: string(),
|
|
23983
|
+
frames: number().int(),
|
|
23984
|
+
crops: number().int(),
|
|
23985
|
+
annotations: number().int(),
|
|
23986
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23987
|
+
missing: number().int(),
|
|
23988
|
+
bytes: number().int(),
|
|
23989
|
+
/** sha256 of the exact bytes sent. */
|
|
23990
|
+
sha256: string(),
|
|
23991
|
+
/** The target's HTTP status. */
|
|
23992
|
+
status: number().int()
|
|
23993
|
+
});
|
|
23053
23994
|
/** What the operator asked the assist to look for. */
|
|
23054
23995
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
23055
23996
|
kind: literal("package"),
|
|
@@ -23079,6 +24020,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
23079
24020
|
reason: string(),
|
|
23080
24021
|
detail: string().optional()
|
|
23081
24022
|
})]);
|
|
24023
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
24024
|
+
var RetrainCollectionSchema = object({
|
|
24025
|
+
id: string(),
|
|
24026
|
+
name: string(),
|
|
24027
|
+
createdAt: number(),
|
|
24028
|
+
frameCount: number().int()
|
|
24029
|
+
});
|
|
24030
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
24031
|
+
kind: literal("created"),
|
|
24032
|
+
collection: RetrainCollectionSchema
|
|
24033
|
+
}), object({
|
|
24034
|
+
kind: literal("refused"),
|
|
24035
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
24036
|
+
})]);
|
|
24037
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
24038
|
+
kind: literal("renamed"),
|
|
24039
|
+
collection: RetrainCollectionSchema
|
|
24040
|
+
}), object({
|
|
24041
|
+
kind: literal("refused"),
|
|
24042
|
+
reason: _enum([
|
|
24043
|
+
"empty-name",
|
|
24044
|
+
"duplicate-name",
|
|
24045
|
+
"unknown-collection"
|
|
24046
|
+
])
|
|
24047
|
+
})]);
|
|
24048
|
+
/**
|
|
24049
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
24050
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
24051
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
24052
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
24053
|
+
*/
|
|
24054
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
24055
|
+
kind: literal("added"),
|
|
24056
|
+
collectionId: string(),
|
|
24057
|
+
frame: RetrainFrameSchema,
|
|
24058
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
24059
|
+
reused: boolean()
|
|
24060
|
+
}), object({
|
|
24061
|
+
kind: literal("refused"),
|
|
24062
|
+
reason: _enum([
|
|
24063
|
+
"unknown-collection",
|
|
24064
|
+
"still-unavailable",
|
|
24065
|
+
"still-busy",
|
|
24066
|
+
"unreadable-image",
|
|
24067
|
+
"write-failed"
|
|
24068
|
+
]),
|
|
24069
|
+
detail: string().optional()
|
|
24070
|
+
})]);
|
|
24071
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
24072
|
+
var RetrainAssistProfileSchema = object({
|
|
24073
|
+
id: string(),
|
|
24074
|
+
name: string(),
|
|
24075
|
+
model: string(),
|
|
24076
|
+
kind: string(),
|
|
24077
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
24078
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
24079
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
24080
|
+
leavesHouse: boolean()
|
|
24081
|
+
});
|
|
24082
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
24083
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
24084
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
24085
|
+
var RetrainLlmReviewSchema = object({
|
|
24086
|
+
/** The `ref` the page sent the box under. */
|
|
24087
|
+
ref: string(),
|
|
24088
|
+
verdict: _enum([
|
|
24089
|
+
"confirmed",
|
|
24090
|
+
"wrong-class",
|
|
24091
|
+
"not-an-object",
|
|
24092
|
+
"uncertain"
|
|
24093
|
+
]),
|
|
24094
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
24095
|
+
reason: string()
|
|
24096
|
+
});
|
|
24097
|
+
/**
|
|
24098
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
24099
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
24100
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
24101
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
24102
|
+
*/
|
|
24103
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
24104
|
+
kind: literal("proposed"),
|
|
24105
|
+
profileId: string(),
|
|
24106
|
+
model: string(),
|
|
24107
|
+
/** The frame was sent outside the house for this answer. */
|
|
24108
|
+
leftHouse: boolean(),
|
|
24109
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
24110
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
24111
|
+
rejected: number().int()
|
|
24112
|
+
}), object({
|
|
24113
|
+
kind: literal("refused"),
|
|
24114
|
+
reason: _enum([
|
|
24115
|
+
"unknown-frame",
|
|
24116
|
+
"unreadable-frame",
|
|
24117
|
+
"unknown-profile",
|
|
24118
|
+
"profile-disabled",
|
|
24119
|
+
"no-vision",
|
|
24120
|
+
"cloud-not-confirmed",
|
|
24121
|
+
"llm-error",
|
|
24122
|
+
"malformed-answer"
|
|
24123
|
+
]),
|
|
24124
|
+
detail: string().optional()
|
|
24125
|
+
})]);
|
|
23082
24126
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
23083
24127
|
var RetrainTransitionResultSchema = object({
|
|
23084
24128
|
trackId: string(),
|
|
@@ -23796,7 +24840,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23796
24840
|
auth: "admin"
|
|
23797
24841
|
}), method(object({
|
|
23798
24842
|
deviceId: number(),
|
|
23799
|
-
trackId: string(),
|
|
24843
|
+
trackId: string().optional(),
|
|
23800
24844
|
frameId: string()
|
|
23801
24845
|
}), object({
|
|
23802
24846
|
removed: boolean(),
|
|
@@ -23813,7 +24857,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23813
24857
|
auth: "admin"
|
|
23814
24858
|
}), method(object({
|
|
23815
24859
|
deviceId: number(),
|
|
23816
|
-
|
|
24860
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24861
|
+
trackId: string().optional(),
|
|
23817
24862
|
frameId: string(),
|
|
23818
24863
|
subject: RetrainAssistSubjectSchema,
|
|
23819
24864
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23821,12 +24866,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23821
24866
|
}), RetrainAssistResultSchema, {
|
|
23822
24867
|
kind: "mutation",
|
|
23823
24868
|
auth: "admin"
|
|
23824
|
-
}), method(object({
|
|
24869
|
+
}), method(object({
|
|
24870
|
+
trackId: string().optional(),
|
|
24871
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24872
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23825
24873
|
kind: "query",
|
|
23826
24874
|
auth: "admin"
|
|
23827
24875
|
}), method(object({
|
|
23828
24876
|
deviceId: number(),
|
|
23829
|
-
|
|
24877
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24878
|
+
trackId: string().optional(),
|
|
23830
24879
|
frameId: string(),
|
|
23831
24880
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23832
24881
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23844,7 +24893,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23844
24893
|
}), RetrainTransitionResultSchema, {
|
|
23845
24894
|
kind: "mutation",
|
|
23846
24895
|
auth: "admin"
|
|
23847
|
-
}), method(
|
|
24896
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24897
|
+
kind: "query",
|
|
24898
|
+
auth: "admin"
|
|
24899
|
+
}), method(object({
|
|
24900
|
+
deviceId: number(),
|
|
24901
|
+
trackId: string().optional(),
|
|
24902
|
+
frameId: string(),
|
|
24903
|
+
complete: boolean()
|
|
24904
|
+
}), RetrainFrameSchema, {
|
|
24905
|
+
kind: "mutation",
|
|
24906
|
+
auth: "admin"
|
|
24907
|
+
}), method(object({
|
|
24908
|
+
filter: RetrainExportFilterSchema,
|
|
24909
|
+
layout: RetrainExportLayoutSchema,
|
|
24910
|
+
target: RetrainArchiveTargetSchema
|
|
24911
|
+
}), RetrainArchiveResultSchema, {
|
|
24912
|
+
kind: "mutation",
|
|
24913
|
+
auth: "admin",
|
|
24914
|
+
timeoutMs: 60 * 6e4
|
|
24915
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24916
|
+
kind: "query",
|
|
24917
|
+
auth: "admin"
|
|
24918
|
+
}), method(object({
|
|
24919
|
+
deviceId: number(),
|
|
24920
|
+
trackId: string().optional(),
|
|
24921
|
+
frameId: string(),
|
|
24922
|
+
profileId: string(),
|
|
24923
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24924
|
+
boxes: array(object({
|
|
24925
|
+
ref: string(),
|
|
24926
|
+
bbox: RetrainBboxSchema,
|
|
24927
|
+
macroClass: RetrainMacroClassSchema,
|
|
24928
|
+
label: string().optional()
|
|
24929
|
+
})).max(50),
|
|
24930
|
+
allowCloud: boolean()
|
|
24931
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24932
|
+
kind: "mutation",
|
|
24933
|
+
auth: "admin",
|
|
24934
|
+
timeoutMs: 18e4
|
|
24935
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24936
|
+
kind: "mutation",
|
|
24937
|
+
auth: "admin"
|
|
24938
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24939
|
+
kind: "query",
|
|
24940
|
+
auth: "admin"
|
|
24941
|
+
}), method(object({
|
|
24942
|
+
id: string(),
|
|
24943
|
+
name: string().max(120)
|
|
24944
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24945
|
+
kind: "mutation",
|
|
24946
|
+
auth: "admin"
|
|
24947
|
+
}), method(object({ id: string() }), object({
|
|
24948
|
+
deleted: boolean(),
|
|
24949
|
+
removedFrames: number().int()
|
|
24950
|
+
}), {
|
|
24951
|
+
kind: "mutation",
|
|
24952
|
+
auth: "admin"
|
|
24953
|
+
}), method(object({
|
|
24954
|
+
collectionId: string(),
|
|
24955
|
+
deviceId: number(),
|
|
24956
|
+
epochMs: number()
|
|
24957
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24958
|
+
kind: "mutation",
|
|
24959
|
+
auth: "admin",
|
|
24960
|
+
timeoutMs: 6e4
|
|
24961
|
+
}), method(object({
|
|
24962
|
+
collectionId: string(),
|
|
24963
|
+
frameIds: array(string()).min(1).max(500)
|
|
24964
|
+
}), object({
|
|
24965
|
+
added: number().int(),
|
|
24966
|
+
alreadyMember: number().int(),
|
|
24967
|
+
unknownFrameIds: array(string()).readonly()
|
|
24968
|
+
}), {
|
|
24969
|
+
kind: "mutation",
|
|
24970
|
+
auth: "admin"
|
|
24971
|
+
}), method(object({
|
|
24972
|
+
collectionId: string(),
|
|
24973
|
+
frameId: string()
|
|
24974
|
+
}), object({
|
|
24975
|
+
removed: boolean(),
|
|
24976
|
+
deletedFrame: boolean()
|
|
24977
|
+
}), {
|
|
24978
|
+
kind: "mutation",
|
|
24979
|
+
auth: "admin"
|
|
24980
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23848
24981
|
kind: "query",
|
|
23849
24982
|
auth: "admin"
|
|
23850
24983
|
}), method(object({
|
|
@@ -23972,7 +25105,7 @@ var FrameRefSchema = object({
|
|
|
23972
25105
|
timestamp: number(),
|
|
23973
25106
|
capturedAt: number().optional()
|
|
23974
25107
|
});
|
|
23975
|
-
var ModelFormatSchema$
|
|
25108
|
+
var ModelFormatSchema$2 = _enum([
|
|
23976
25109
|
"onnx",
|
|
23977
25110
|
"coreml",
|
|
23978
25111
|
"openvino",
|
|
@@ -23990,7 +25123,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23990
25123
|
var PipelineEngineChoiceSchema = object({
|
|
23991
25124
|
runtime: literal("python"),
|
|
23992
25125
|
backend: string(),
|
|
23993
|
-
format: ModelFormatSchema$
|
|
25126
|
+
format: ModelFormatSchema$2,
|
|
23994
25127
|
device: string().optional()
|
|
23995
25128
|
});
|
|
23996
25129
|
/**
|
|
@@ -24029,28 +25162,10 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
24029
25162
|
group: string().optional(),
|
|
24030
25163
|
settings: record(string(), unknown()).optional()
|
|
24031
25164
|
}));
|
|
24032
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
24033
|
-
addonId: string(),
|
|
24034
|
-
enabled: boolean(),
|
|
24035
|
-
modelId: string(),
|
|
24036
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
24037
|
-
settings: record(string(), unknown()).optional()
|
|
24038
|
-
}));
|
|
24039
|
-
var PipelineTemplateSchema$1 = object({
|
|
24040
|
-
id: string(),
|
|
24041
|
-
name: string(),
|
|
24042
|
-
createdAt: string(),
|
|
24043
|
-
updatedAt: string(),
|
|
24044
|
-
engine: PipelineEngineChoiceSchema,
|
|
24045
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
24046
|
-
});
|
|
24047
25165
|
var PipelineModelOptionSchema = object({
|
|
24048
25166
|
id: string(),
|
|
24049
25167
|
name: string(),
|
|
24050
|
-
formats: record(string(),
|
|
24051
|
-
downloaded: boolean(),
|
|
24052
|
-
sizeMB: number()
|
|
24053
|
-
})),
|
|
25168
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
24054
25169
|
group: ModelVariantGroupSchema.optional(),
|
|
24055
25170
|
legacy: boolean().optional(),
|
|
24056
25171
|
provider: ModelProviderIdSchema.optional(),
|
|
@@ -24217,6 +25332,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24217
25332
|
}), {
|
|
24218
25333
|
kind: "mutation",
|
|
24219
25334
|
auth: "admin"
|
|
25335
|
+
}), method(object({
|
|
25336
|
+
nodeId: string(),
|
|
25337
|
+
deviceIds: array(number()).readonly().optional(),
|
|
25338
|
+
dryRun: boolean()
|
|
25339
|
+
}), object({
|
|
25340
|
+
entries: array(object({
|
|
25341
|
+
deviceId: number(),
|
|
25342
|
+
keys: array(string()).readonly()
|
|
25343
|
+
})).readonly(),
|
|
25344
|
+
refused: array(object({
|
|
25345
|
+
deviceId: number(),
|
|
25346
|
+
reason: string()
|
|
25347
|
+
})).readonly()
|
|
25348
|
+
}), {
|
|
25349
|
+
kind: "mutation",
|
|
25350
|
+
auth: "admin"
|
|
24220
25351
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
24221
25352
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
24222
25353
|
deviceKey: string(),
|
|
@@ -24242,22 +25373,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24242
25373
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
24243
25374
|
steps: array(PipelineStepInputSchema),
|
|
24244
25375
|
deviceKey: string().optional()
|
|
24245
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
24246
|
-
name: string(),
|
|
24247
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
24248
|
-
engine: PipelineEngineChoiceSchema
|
|
24249
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
24250
|
-
id: string(),
|
|
24251
|
-
name: string().optional(),
|
|
24252
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
24253
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
25376
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24254
25377
|
addonId: string(),
|
|
24255
25378
|
modelId: string(),
|
|
24256
|
-
format: ModelFormatSchema$
|
|
25379
|
+
format: ModelFormatSchema$2
|
|
24257
25380
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
24258
25381
|
addonId: string(),
|
|
24259
25382
|
modelId: string(),
|
|
24260
|
-
format: ModelFormatSchema$
|
|
25383
|
+
format: ModelFormatSchema$2
|
|
24261
25384
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
24262
25385
|
steps: array(PipelineStepInputSchema).min(1),
|
|
24263
25386
|
frame: FrameInputSchema.optional(),
|
|
@@ -24414,6 +25537,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24414
25537
|
filename: string().optional(),
|
|
24415
25538
|
settings: record(string(), unknown()).optional()
|
|
24416
25539
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25540
|
+
/**
|
|
25541
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25542
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25543
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25544
|
+
* schemas are what crosses the cap boundary.
|
|
25545
|
+
*/
|
|
25546
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25547
|
+
/** The operator's range for it. */
|
|
25548
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25549
|
+
min: 1,
|
|
25550
|
+
max: 8
|
|
25551
|
+
};
|
|
25552
|
+
var HardwareClassIdSchema = _enum([
|
|
25553
|
+
"intel-core-ultra",
|
|
25554
|
+
"intel-n-series",
|
|
25555
|
+
"apple-m-base",
|
|
25556
|
+
"apple-m-pro",
|
|
25557
|
+
"unknown"
|
|
25558
|
+
]);
|
|
25559
|
+
var AcceleratorKindSchema = _enum([
|
|
25560
|
+
"intel-npu",
|
|
25561
|
+
"intel-igpu",
|
|
25562
|
+
"x86-cpu",
|
|
25563
|
+
"arm-cpu",
|
|
25564
|
+
"apple-ane",
|
|
25565
|
+
"coral"
|
|
25566
|
+
]);
|
|
25567
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25568
|
+
object({
|
|
25569
|
+
kind: literal("capacity"),
|
|
25570
|
+
sessions: number(),
|
|
25571
|
+
minSessions: number()
|
|
25572
|
+
}),
|
|
25573
|
+
object({
|
|
25574
|
+
kind: literal("tie-faster"),
|
|
25575
|
+
over: string(),
|
|
25576
|
+
recallDelta: number()
|
|
25577
|
+
}),
|
|
25578
|
+
object({
|
|
25579
|
+
kind: literal("stepped-down"),
|
|
25580
|
+
from: string(),
|
|
25581
|
+
to: string(),
|
|
25582
|
+
limitedBy: string()
|
|
25583
|
+
}),
|
|
25584
|
+
object({
|
|
25585
|
+
kind: literal("no-fit-lightest"),
|
|
25586
|
+
sessions: number(),
|
|
25587
|
+
minSessions: number()
|
|
25588
|
+
}),
|
|
25589
|
+
object({
|
|
25590
|
+
kind: literal("derived-latency"),
|
|
25591
|
+
modelId: string()
|
|
25592
|
+
}),
|
|
25593
|
+
object({ kind: literal("cpu-device") }),
|
|
25594
|
+
object({ kind: literal("coral-untouched") }),
|
|
25595
|
+
object({ kind: literal("device-disabled") }),
|
|
25596
|
+
object({ kind: literal("device-unavailable") }),
|
|
25597
|
+
object({ kind: literal("node-offline") }),
|
|
25598
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25599
|
+
object({
|
|
25600
|
+
kind: literal("no-measured-data"),
|
|
25601
|
+
hardwareClass: HardwareClassIdSchema
|
|
25602
|
+
}),
|
|
25603
|
+
object({
|
|
25604
|
+
kind: literal("no-family-build"),
|
|
25605
|
+
format: ModelFormatSchema$1
|
|
25606
|
+
}),
|
|
25607
|
+
object({
|
|
25608
|
+
kind: literal("kept-custom-pin"),
|
|
25609
|
+
modelId: string(),
|
|
25610
|
+
deviceKey: string()
|
|
25611
|
+
})
|
|
25612
|
+
]);
|
|
25613
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25614
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25615
|
+
/**
|
|
25616
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25617
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25618
|
+
*/
|
|
25619
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25620
|
+
kind: literal("node-benchmark"),
|
|
25621
|
+
resultId: string(),
|
|
25622
|
+
measuredAtMs: number()
|
|
25623
|
+
})]);
|
|
25624
|
+
var DeviceModelChoiceSchema = object({
|
|
25625
|
+
modelId: string(),
|
|
25626
|
+
p50Ms: number(),
|
|
25627
|
+
fps: number(),
|
|
25628
|
+
measured: boolean(),
|
|
25629
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25630
|
+
source: LatencySourceSchema.optional(),
|
|
25631
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25632
|
+
capacitySessions: number(),
|
|
25633
|
+
personRecall: number()
|
|
25634
|
+
});
|
|
25635
|
+
var DeviceRecommendationSchema = object({
|
|
25636
|
+
deviceKey: string(),
|
|
25637
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25638
|
+
enabled: boolean(),
|
|
25639
|
+
available: boolean(),
|
|
25640
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25641
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25642
|
+
kept: KeptReasonSchema.optional(),
|
|
25643
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25644
|
+
});
|
|
25645
|
+
var NodeRecommendationSchema = object({
|
|
25646
|
+
nodeId: string(),
|
|
25647
|
+
reachable: boolean(),
|
|
25648
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25649
|
+
cpuModel: string().nullable(),
|
|
25650
|
+
skipped: boolean(),
|
|
25651
|
+
acceleratorModelId: string().nullable(),
|
|
25652
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25653
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25654
|
+
});
|
|
25655
|
+
var ModelPinChangeSchema = object({
|
|
25656
|
+
stepId: string(),
|
|
25657
|
+
before: string().nullable(),
|
|
25658
|
+
after: string().nullable()
|
|
25659
|
+
});
|
|
25660
|
+
var NodeDeviceChangeSchema = object({
|
|
25661
|
+
nodeId: string(),
|
|
25662
|
+
deviceKey: string(),
|
|
25663
|
+
madeExplicit: boolean(),
|
|
25664
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25665
|
+
thresholds: array(object({
|
|
25666
|
+
stepId: string(),
|
|
25667
|
+
keys: array(string()).readonly()
|
|
25668
|
+
})).readonly()
|
|
25669
|
+
});
|
|
25670
|
+
var CameraOverrideClearSchema = object({
|
|
25671
|
+
deviceId: number(),
|
|
25672
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25673
|
+
nodeId: string(),
|
|
25674
|
+
deviceKey: string().nullable(),
|
|
25675
|
+
stepId: string(),
|
|
25676
|
+
modelIdBefore: string().nullable(),
|
|
25677
|
+
keys: array(string()).readonly()
|
|
25678
|
+
});
|
|
25679
|
+
var DetectorStoreClearSchema = object({
|
|
25680
|
+
deviceId: number(),
|
|
25681
|
+
keys: array(string()).readonly()
|
|
25682
|
+
});
|
|
25683
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25684
|
+
object({
|
|
25685
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25686
|
+
skippedNodes: array(string()).readonly()
|
|
25687
|
+
}),
|
|
25688
|
+
object({
|
|
25689
|
+
kind: literal("detector-store-unreadable"),
|
|
25690
|
+
error: string()
|
|
25691
|
+
}),
|
|
25692
|
+
object({
|
|
25693
|
+
kind: literal("coral-enabled"),
|
|
25694
|
+
nodeId: string(),
|
|
25695
|
+
deviceKey: string()
|
|
25696
|
+
}),
|
|
25697
|
+
object({
|
|
25698
|
+
kind: literal("custom-pin-kept"),
|
|
25699
|
+
nodeId: string(),
|
|
25700
|
+
deviceKey: string().nullable(),
|
|
25701
|
+
deviceId: number().nullable(),
|
|
25702
|
+
modelId: string()
|
|
25703
|
+
}),
|
|
25704
|
+
object({
|
|
25705
|
+
kind: literal("custom-registry-unreadable"),
|
|
25706
|
+
error: string()
|
|
25707
|
+
})
|
|
25708
|
+
]);
|
|
25709
|
+
var AutoTuneOptionsSchema = object({
|
|
25710
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
25711
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25712
|
+
/**
|
|
25713
|
+
* The least number of parallel sessions every device must sustain at the
|
|
25714
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
25715
|
+
* that reaches it wins.
|
|
25716
|
+
*/
|
|
25717
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25718
|
+
});
|
|
25719
|
+
var AutoTunePlanSchema = object({
|
|
25720
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
25721
|
+
planHash: string(),
|
|
25722
|
+
family: literal("yolov9"),
|
|
25723
|
+
headroom: number(),
|
|
25724
|
+
minSessionsPerDevice: number(),
|
|
25725
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
25726
|
+
cameraFps: number(),
|
|
25727
|
+
generatedAt: number(),
|
|
25728
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
25729
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
25730
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
25731
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
25732
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
25733
|
+
});
|
|
25734
|
+
var AutoTuneApplyInputSchema = object({
|
|
25735
|
+
planHash: string(),
|
|
25736
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25737
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25738
|
+
});
|
|
25739
|
+
var AutoTunePhaseResultSchema = object({
|
|
25740
|
+
phase: _enum([
|
|
25741
|
+
"download",
|
|
25742
|
+
"camera-overrides",
|
|
25743
|
+
"detector-thresholds",
|
|
25744
|
+
"node-models",
|
|
25745
|
+
"redispatch"
|
|
25746
|
+
]),
|
|
25747
|
+
ok: boolean(),
|
|
25748
|
+
detail: string()
|
|
25749
|
+
});
|
|
25750
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
25751
|
+
object({
|
|
25752
|
+
kind: literal("applied"),
|
|
25753
|
+
planHash: string(),
|
|
25754
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25755
|
+
}),
|
|
25756
|
+
object({
|
|
25757
|
+
kind: literal("aborted"),
|
|
25758
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25759
|
+
}),
|
|
25760
|
+
object({
|
|
25761
|
+
kind: literal("stale"),
|
|
25762
|
+
plan: AutoTunePlanSchema
|
|
25763
|
+
}),
|
|
25764
|
+
object({
|
|
25765
|
+
kind: literal("refused"),
|
|
25766
|
+
reason: _enum(["apply-in-progress"])
|
|
25767
|
+
})
|
|
25768
|
+
]);
|
|
25769
|
+
/**
|
|
25770
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25771
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25772
|
+
* hardware share suggestion and the stale device pins.
|
|
25773
|
+
*/
|
|
25774
|
+
/**
|
|
25775
|
+
* How a new detection session picks its node and device.
|
|
25776
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25777
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25778
|
+
* weight only bites once a node already holds a session.
|
|
25779
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25780
|
+
* full or drowning node yields to a free one (D748).
|
|
25781
|
+
*/
|
|
25782
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25783
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25784
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25785
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25786
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25787
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25788
|
+
});
|
|
25789
|
+
var PlacementStatsInputSchema = object({
|
|
25790
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25791
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25792
|
+
var PlacementDeviceStatsSchema = object({
|
|
25793
|
+
deviceKey: string(),
|
|
25794
|
+
/** Sessions running on this device now. */
|
|
25795
|
+
sessionsNow: number(),
|
|
25796
|
+
/** Sessions started on this device inside the window. */
|
|
25797
|
+
sessionsStarted: number(),
|
|
25798
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25799
|
+
observedShare: number().nullable()
|
|
25800
|
+
});
|
|
25801
|
+
var PlacementNodeStatsSchema = object({
|
|
25802
|
+
nodeId: string(),
|
|
25803
|
+
sessionsNow: number(),
|
|
25804
|
+
sessionsStarted: number(),
|
|
25805
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25806
|
+
observedShare: number().nullable(),
|
|
25807
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25808
|
+
peakSessions: number(),
|
|
25809
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25810
|
+
yieldsAway: number(),
|
|
25811
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25812
|
+
});
|
|
25813
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25814
|
+
var StaleDevicePinSchema = object({
|
|
25815
|
+
deviceId: number(),
|
|
25816
|
+
deviceKey: string(),
|
|
25817
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25818
|
+
reason: _enum(["disabled", "absent"])
|
|
25819
|
+
});
|
|
25820
|
+
var PlacementStatsSchema = object({
|
|
25821
|
+
policy: SessionPlacementPolicySchema,
|
|
25822
|
+
windowMs: number(),
|
|
25823
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25824
|
+
observedForMs: number(),
|
|
25825
|
+
sessionsNow: number(),
|
|
25826
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25827
|
+
clusterPeakSessions: number(),
|
|
25828
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25829
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25830
|
+
});
|
|
25831
|
+
/**
|
|
25832
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25833
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25834
|
+
* the measured latency table for the node's hardware class.
|
|
25835
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25836
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25837
|
+
*/
|
|
25838
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25839
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25840
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25841
|
+
var SuggestSharesInputSchema = object({
|
|
25842
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25843
|
+
/** Default `hardware`. */
|
|
25844
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25845
|
+
});
|
|
25846
|
+
var SuggestedDeviceShareSchema = object({
|
|
25847
|
+
deviceKey: string(),
|
|
25848
|
+
/** Share of the node (0–100, rounded). */
|
|
25849
|
+
share: number(),
|
|
25850
|
+
modelId: string().nullable(),
|
|
25851
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25852
|
+
fps: number().nullable(),
|
|
25853
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25854
|
+
measured: boolean(),
|
|
25855
|
+
/**
|
|
25856
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25857
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25858
|
+
*/
|
|
25859
|
+
suggestedMaxSessions: number().nullable()
|
|
25860
|
+
});
|
|
25861
|
+
var SuggestedNodeShareSchema = object({
|
|
25862
|
+
nodeId: string(),
|
|
25863
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25864
|
+
share: number().nullable(),
|
|
25865
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25866
|
+
capacitySessions: number(),
|
|
25867
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25868
|
+
skippedReason: string().nullable(),
|
|
25869
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25870
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25871
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25872
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25873
|
+
});
|
|
25874
|
+
var SuggestSharesResultSchema = object({
|
|
25875
|
+
headroom: number(),
|
|
25876
|
+
/** The source asked for; each node says what it actually used. */
|
|
25877
|
+
source: CapacitySourceSchema,
|
|
25878
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25879
|
+
cameraFps: number(),
|
|
25880
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25881
|
+
minSessionsPerDevice: number(),
|
|
25882
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25883
|
+
});
|
|
25884
|
+
/**
|
|
25885
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25886
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25887
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25888
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25889
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25890
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25891
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25892
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25893
|
+
* - `manual` — the operator's stored sliders.
|
|
25894
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25895
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25896
|
+
*/
|
|
25897
|
+
var ShareSourceSchema = _enum([
|
|
25898
|
+
"hardware",
|
|
25899
|
+
"benchmark",
|
|
25900
|
+
"manual"
|
|
25901
|
+
]);
|
|
25902
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25903
|
+
object({
|
|
25904
|
+
nodes: record(string(), number()),
|
|
25905
|
+
devices: record(string(), record(string(), number()))
|
|
25906
|
+
});
|
|
25907
|
+
var EffectiveDeviceShareSchema = object({
|
|
25908
|
+
deviceKey: string(),
|
|
25909
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25910
|
+
eligible: boolean(),
|
|
25911
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25912
|
+
configuredPct: number(),
|
|
25913
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25914
|
+
effectivePct: number()
|
|
25915
|
+
});
|
|
25916
|
+
var EffectiveNodeShareSchema = object({
|
|
25917
|
+
nodeId: string(),
|
|
25918
|
+
eligible: boolean(),
|
|
25919
|
+
configuredPct: number(),
|
|
25920
|
+
effectivePct: number(),
|
|
25921
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25922
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25923
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25924
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25925
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25926
|
+
});
|
|
25927
|
+
var EffectiveSharesSchema = object({
|
|
25928
|
+
source: ShareSourceSchema,
|
|
25929
|
+
policy: SessionPlacementPolicySchema,
|
|
25930
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25931
|
+
autoPending: boolean(),
|
|
25932
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25933
|
+
computedAt: number().nullable(),
|
|
25934
|
+
/** What made the system recompute them last. */
|
|
25935
|
+
trigger: string().nullable(),
|
|
25936
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25937
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25938
|
+
nodeWeights: record(string(), number()),
|
|
25939
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25940
|
+
});
|
|
25941
|
+
/**
|
|
25942
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25943
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25944
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25945
|
+
* shares read.
|
|
25946
|
+
*
|
|
25947
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25948
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25949
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25950
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25951
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25952
|
+
*
|
|
25953
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25954
|
+
* cross a process at frame rate, D9):
|
|
25955
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25956
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25957
|
+
* interval;
|
|
25958
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25959
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25960
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25961
|
+
* CPU, RAM or the event loop give out.
|
|
25962
|
+
*/
|
|
25963
|
+
/** Defaults and bounds, one place. */
|
|
25964
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25965
|
+
fpsPerStream: 10,
|
|
25966
|
+
budgetMinutes: 45,
|
|
25967
|
+
minBudgetMinutes: 10,
|
|
25968
|
+
maxBudgetMinutes: 120,
|
|
25969
|
+
/** A result older than this no longer beats the table. */
|
|
25970
|
+
staleAfterDays: 30,
|
|
25971
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25972
|
+
settleSec: 5,
|
|
25973
|
+
/** Accounted window per ramp step. */
|
|
25974
|
+
measureSec: 20,
|
|
25975
|
+
/** Longest the drain may take before the run is refused. */
|
|
25976
|
+
drainTimeoutSec: 120,
|
|
25977
|
+
/** Candidate models per device in one run. */
|
|
25978
|
+
maxModelsPerDevice: 6
|
|
25979
|
+
};
|
|
25980
|
+
/** The two measurements a run can make. */
|
|
25981
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25982
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25983
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25984
|
+
deviceKey: string().min(1),
|
|
25985
|
+
/**
|
|
25986
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25987
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25988
|
+
*/
|
|
25989
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25990
|
+
});
|
|
25991
|
+
/** What the operator confirmed. */
|
|
25992
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25993
|
+
nodeId: string().min(1),
|
|
25994
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25995
|
+
/** Which measurements run. At least one. */
|
|
25996
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25997
|
+
/**
|
|
25998
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25999
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
26000
|
+
* detector always runs.
|
|
26001
|
+
*/
|
|
26002
|
+
steps: array(string().min(1)).default([]),
|
|
26003
|
+
/** Offered rate of one stream / session. */
|
|
26004
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
26005
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
26006
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
26007
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
26008
|
+
keepDownloadedModels: boolean().default(false),
|
|
26009
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
26010
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
26011
|
+
});
|
|
26012
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
26013
|
+
kind: _enum([
|
|
26014
|
+
"benchmark-active",
|
|
26015
|
+
"node-offline",
|
|
26016
|
+
"unknown-device",
|
|
26017
|
+
"no-phase",
|
|
26018
|
+
"insufficient-headroom"
|
|
26019
|
+
]),
|
|
26020
|
+
detail: string(),
|
|
26021
|
+
overridable: boolean()
|
|
26022
|
+
});
|
|
26023
|
+
/** A camera whose detection leaves the node for the run. */
|
|
26024
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
26025
|
+
deviceId: number(),
|
|
26026
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
26027
|
+
placedOnNode: boolean(),
|
|
26028
|
+
/** A node pin naming this node, ignored for the run. */
|
|
26029
|
+
pinnedToNode: boolean()
|
|
26030
|
+
});
|
|
26031
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
26032
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
26033
|
+
deviceId: number(),
|
|
26034
|
+
reason: literal("only-frame-source")
|
|
26035
|
+
});
|
|
26036
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
26037
|
+
nodeId: string(),
|
|
26038
|
+
online: boolean(),
|
|
26039
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
26040
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
26041
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
26042
|
+
estimatedDurationMs: number(),
|
|
26043
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
26044
|
+
budgetMs: number(),
|
|
26045
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
26046
|
+
steps: array(string()).readonly(),
|
|
26047
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
26048
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
26049
|
+
headroom: object({
|
|
26050
|
+
sessionsNow: number(),
|
|
26051
|
+
otherNodesCapacitySessions: number().nullable()
|
|
26052
|
+
}),
|
|
26053
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
26054
|
+
canStart: boolean()
|
|
26055
|
+
});
|
|
26056
|
+
/** Where the measuring runner is. */
|
|
26057
|
+
var NodeBenchProgressSchema = object({
|
|
26058
|
+
phase: _enum([
|
|
26059
|
+
"preparing",
|
|
26060
|
+
"device",
|
|
26061
|
+
"pipeline",
|
|
26062
|
+
"cleanup"
|
|
26063
|
+
]),
|
|
26064
|
+
deviceKey: string().nullable(),
|
|
26065
|
+
modelId: string().nullable(),
|
|
26066
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
26067
|
+
load: number().nullable(),
|
|
26068
|
+
cellsDone: number(),
|
|
26069
|
+
cellsTotal: number(),
|
|
26070
|
+
message: string()
|
|
26071
|
+
});
|
|
26072
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
26073
|
+
var NodeBenchLimitSchema = _enum([
|
|
26074
|
+
"p95",
|
|
26075
|
+
"drops",
|
|
26076
|
+
"errors",
|
|
26077
|
+
"stall",
|
|
26078
|
+
"cpu",
|
|
26079
|
+
"ram",
|
|
26080
|
+
"none"
|
|
26081
|
+
]);
|
|
26082
|
+
var NodeBenchRampStepSchema = object({
|
|
26083
|
+
load: number(),
|
|
26084
|
+
pass: boolean(),
|
|
26085
|
+
p95Ms: number(),
|
|
26086
|
+
dropRatio: number(),
|
|
26087
|
+
/** Completed frames per second over the accounted window. */
|
|
26088
|
+
fps: number(),
|
|
26089
|
+
cpuPct: number().nullable(),
|
|
26090
|
+
ramFreePct: number().nullable(),
|
|
26091
|
+
failReasons: array(string()).readonly()
|
|
26092
|
+
});
|
|
26093
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
26094
|
+
phase: literal("device"),
|
|
26095
|
+
deviceKey: string(),
|
|
26096
|
+
modelId: string(),
|
|
26097
|
+
/** Single-stream latency (the K = 1 step). */
|
|
26098
|
+
p50Ms: number(),
|
|
26099
|
+
p95Ms: number(),
|
|
26100
|
+
p99Ms: number(),
|
|
26101
|
+
/** Frames per second sustained at the last passing step. */
|
|
26102
|
+
fps: number(),
|
|
26103
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
26104
|
+
kMax: number(),
|
|
26105
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26106
|
+
/** First call (model load + warm-up). */
|
|
26107
|
+
warmupMs: number(),
|
|
26108
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26109
|
+
}), object({
|
|
26110
|
+
phase: literal("pipeline"),
|
|
26111
|
+
deviceKey: string(),
|
|
26112
|
+
modelId: string(),
|
|
26113
|
+
steps: array(string()).readonly(),
|
|
26114
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
26115
|
+
maxSessions: number(),
|
|
26116
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26117
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
26118
|
+
stepsFired: array(string()).readonly(),
|
|
26119
|
+
warmupMs: number(),
|
|
26120
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26121
|
+
})]);
|
|
26122
|
+
/**
|
|
26123
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
26124
|
+
* the node no longer beats the table.
|
|
26125
|
+
*/
|
|
26126
|
+
var NodeBenchFingerprintSchema = object({
|
|
26127
|
+
pipelineVersion: string().nullable(),
|
|
26128
|
+
cpuModel: string().nullable(),
|
|
26129
|
+
ramGb: number().nullable(),
|
|
26130
|
+
os: string().nullable(),
|
|
26131
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
26132
|
+
pools: record(string(), object({
|
|
26133
|
+
runtime: string(),
|
|
26134
|
+
numWorkers: number(),
|
|
26135
|
+
concurrency: number(),
|
|
26136
|
+
batchMode: string()
|
|
26137
|
+
})).default({})
|
|
26138
|
+
});
|
|
26139
|
+
/** The frames the run used. */
|
|
26140
|
+
var NodeBenchClipSchema = object({
|
|
26141
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
26142
|
+
id: string(),
|
|
26143
|
+
revision: string().nullable(),
|
|
26144
|
+
frames: number(),
|
|
26145
|
+
width: number(),
|
|
26146
|
+
height: number()
|
|
26147
|
+
});
|
|
26148
|
+
var NodeBenchRunnerInputSchema = object({
|
|
26149
|
+
runId: string().min(1),
|
|
26150
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
26151
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
26152
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
26153
|
+
steps: array(string()).default([]),
|
|
26154
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
26155
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
26156
|
+
deadlineAtMs: number(),
|
|
26157
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
26158
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
26159
|
+
keepDownloadedModels: boolean().default(false)
|
|
26160
|
+
});
|
|
26161
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
26162
|
+
"running",
|
|
26163
|
+
"done",
|
|
26164
|
+
"failed",
|
|
26165
|
+
"aborted"
|
|
26166
|
+
]);
|
|
26167
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
26168
|
+
runId: string(),
|
|
26169
|
+
nodeId: string(),
|
|
26170
|
+
state: NodeBenchRunnerStateSchema,
|
|
26171
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26172
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
26173
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
26174
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26175
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26176
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
26177
|
+
activeCameraIds: array(number()).readonly(),
|
|
26178
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
26179
|
+
deletedModels: array(string()).readonly(),
|
|
26180
|
+
error: string().nullable(),
|
|
26181
|
+
startedAtMs: number(),
|
|
26182
|
+
finishedAtMs: number().nullable()
|
|
26183
|
+
});
|
|
26184
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
26185
|
+
"draining",
|
|
26186
|
+
"measuring",
|
|
26187
|
+
"restoring",
|
|
26188
|
+
"done",
|
|
26189
|
+
"failed",
|
|
26190
|
+
"aborted"
|
|
26191
|
+
]);
|
|
26192
|
+
/** Why a run ended. */
|
|
26193
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
26194
|
+
"completed",
|
|
26195
|
+
"operator-abort",
|
|
26196
|
+
"deadline",
|
|
26197
|
+
"node-lost",
|
|
26198
|
+
"runner-lost",
|
|
26199
|
+
"hub-restart",
|
|
26200
|
+
"drain-timeout",
|
|
26201
|
+
"failed"
|
|
26202
|
+
]);
|
|
26203
|
+
var NodeBenchmarkRunSchema = object({
|
|
26204
|
+
runId: string(),
|
|
26205
|
+
nodeId: string(),
|
|
26206
|
+
state: NodeBenchmarkStateSchema,
|
|
26207
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26208
|
+
startedAtMs: number(),
|
|
26209
|
+
deadlineAtMs: number(),
|
|
26210
|
+
finishedAtMs: number().nullable(),
|
|
26211
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
26212
|
+
error: string().nullable(),
|
|
26213
|
+
/** Cameras moved off the node for the run. */
|
|
26214
|
+
moved: array(number()).readonly(),
|
|
26215
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
26216
|
+
staying: array(number()).readonly(),
|
|
26217
|
+
/** Something else ran on the node's pools during the run. */
|
|
26218
|
+
contaminated: boolean(),
|
|
26219
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26220
|
+
resultIds: array(string()).readonly()
|
|
26221
|
+
});
|
|
26222
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
26223
|
+
var NodeBenchmarkStatusSchema = object({
|
|
26224
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
26225
|
+
modeNodeId: string().nullable(),
|
|
26226
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
26227
|
+
});
|
|
26228
|
+
/**
|
|
26229
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
26230
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
26231
|
+
* ends, never by anyone else.
|
|
26232
|
+
*/
|
|
26233
|
+
var NodeBenchmarkResultSchema = object({
|
|
26234
|
+
id: string(),
|
|
26235
|
+
runId: string(),
|
|
26236
|
+
nodeId: string(),
|
|
26237
|
+
cell: NodeBenchCellSchema,
|
|
26238
|
+
fpsPerStream: number(),
|
|
26239
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26240
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26241
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
26242
|
+
contaminated: boolean(),
|
|
26243
|
+
stayingCameras: array(number()).readonly(),
|
|
26244
|
+
/** The run ended early; the cell itself completed. */
|
|
26245
|
+
partialRun: boolean(),
|
|
26246
|
+
measuredAtMs: number()
|
|
26247
|
+
});
|
|
26248
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
26249
|
+
nodeId: string().optional(),
|
|
26250
|
+
deviceKey: string().optional()
|
|
26251
|
+
});
|
|
26252
|
+
/** A result with its standing today: does it still beat the table? */
|
|
26253
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
26254
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
26255
|
+
standing: _enum([
|
|
26256
|
+
"fresh",
|
|
26257
|
+
"stale",
|
|
26258
|
+
"superseded"
|
|
26259
|
+
]),
|
|
26260
|
+
staleWhy: _enum([
|
|
26261
|
+
"age",
|
|
26262
|
+
"runtime",
|
|
26263
|
+
"pool-tuning"
|
|
26264
|
+
]).nullable()
|
|
26265
|
+
});
|
|
26266
|
+
object({
|
|
26267
|
+
runId: string(),
|
|
26268
|
+
nodeId: string(),
|
|
26269
|
+
startedAtMs: number(),
|
|
26270
|
+
deadlineAtMs: number(),
|
|
26271
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26272
|
+
moved: array(number()).readonly(),
|
|
26273
|
+
staying: array(number()).readonly()
|
|
26274
|
+
});
|
|
26275
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
26276
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
26277
|
+
nodeId: string(),
|
|
26278
|
+
reachable: boolean(),
|
|
26279
|
+
devices: array(object({
|
|
26280
|
+
deviceKey: string(),
|
|
26281
|
+
enabled: boolean(),
|
|
26282
|
+
available: boolean(),
|
|
26283
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
26284
|
+
suggested: array(string()).readonly(),
|
|
26285
|
+
/** Every root detector the device has a build for. */
|
|
26286
|
+
all: array(string()).readonly(),
|
|
26287
|
+
/** The model the device runs now, when pinned. */
|
|
26288
|
+
currentModelId: string().nullable()
|
|
26289
|
+
})).readonly(),
|
|
26290
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
26291
|
+
steps: array(object({
|
|
26292
|
+
id: string(),
|
|
26293
|
+
name: string(),
|
|
26294
|
+
slot: string()
|
|
26295
|
+
})).readonly()
|
|
26296
|
+
});
|
|
24417
26297
|
object({
|
|
24418
26298
|
activeCameras: number(),
|
|
24419
26299
|
throttledCameras: number(),
|
|
@@ -25331,14 +27211,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
25331
27211
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
25332
27212
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
25333
27213
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
25334
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
25335
|
-
* per
|
|
27214
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
27215
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
27216
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
27217
|
+
* (D762).
|
|
25336
27218
|
*/
|
|
25337
27219
|
devices: array(object({
|
|
25338
27220
|
deviceKey: string(),
|
|
25339
27221
|
backend: string(),
|
|
25340
|
-
attachedCameras: number()
|
|
25341
|
-
queueDepthTotal: number()
|
|
27222
|
+
attachedCameras: number()
|
|
25342
27223
|
})).default([]),
|
|
25343
27224
|
/** Hardware capability flags reported by this node. */
|
|
25344
27225
|
hardware: object({
|
|
@@ -25541,7 +27422,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25541
27422
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
25542
27423
|
deviceId: number(),
|
|
25543
27424
|
trackId: string()
|
|
25544
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27425
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27426
|
+
accepted: literal(true),
|
|
27427
|
+
runId: string()
|
|
27428
|
+
}), {
|
|
27429
|
+
kind: "mutation",
|
|
27430
|
+
auth: "admin"
|
|
27431
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27432
|
+
kind: "mutation",
|
|
27433
|
+
auth: "admin"
|
|
27434
|
+
});
|
|
25545
27435
|
var CameraPipelineConfigSchema = object({
|
|
25546
27436
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
25547
27437
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -25552,14 +27442,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
25552
27442
|
settings: record(string(), unknown()).readonly().optional()
|
|
25553
27443
|
}).nullable().optional()
|
|
25554
27444
|
});
|
|
25555
|
-
var PipelineTemplateSchema = object({
|
|
25556
|
-
id: string(),
|
|
25557
|
-
name: string(),
|
|
25558
|
-
description: string().optional(),
|
|
25559
|
-
config: CameraPipelineConfigSchema,
|
|
25560
|
-
createdAt: string(),
|
|
25561
|
-
updatedAt: string()
|
|
25562
|
-
});
|
|
25563
27445
|
var DeviceStepConfigSchema = object({
|
|
25564
27446
|
modelId: string().optional(),
|
|
25565
27447
|
settings: record(string(), unknown()).optional(),
|
|
@@ -25633,9 +27515,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
25633
27515
|
modelId: string().optional(),
|
|
25634
27516
|
settings: record(string(), unknown()).readonly().optional()
|
|
25635
27517
|
});
|
|
27518
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
25636
27519
|
var CameraPipelineSettingsSchema = object({
|
|
25637
|
-
pinnedAgentNodeId: string().optional(),
|
|
25638
27520
|
stepToggles: record(string(), boolean()).optional(),
|
|
27521
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
25639
27522
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
25640
27523
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25641
27524
|
});
|
|
@@ -25668,7 +27551,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25668
27551
|
});
|
|
25669
27552
|
/**
|
|
25670
27553
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25671
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27554
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27555
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27556
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27557
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25672
27558
|
*/
|
|
25673
27559
|
var AgentLoadSummarySchema = object({
|
|
25674
27560
|
nodeId: string(),
|
|
@@ -25757,26 +27643,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25757
27643
|
width: number(),
|
|
25758
27644
|
height: number(),
|
|
25759
27645
|
subscribers: number(),
|
|
25760
|
-
|
|
25761
|
-
|
|
27646
|
+
/**
|
|
27647
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27648
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27649
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27650
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27651
|
+
* camera and is not served (D758).
|
|
27652
|
+
*/
|
|
27653
|
+
inFps: number().nullable()
|
|
25762
27654
|
})).readonly(),
|
|
25763
27655
|
webrtcSessions: number(),
|
|
25764
27656
|
rtspRestream: boolean()
|
|
25765
27657
|
});
|
|
25766
|
-
/**
|
|
25767
|
-
|
|
25768
|
-
|
|
25769
|
-
|
|
25770
|
-
|
|
25771
|
-
|
|
25772
|
-
|
|
25773
|
-
|
|
25774
|
-
var CameraDecoderStatusSchema = object({
|
|
25775
|
-
nodeId: string(),
|
|
25776
|
-
formats: array(string()).readonly(),
|
|
25777
|
-
sessionCount: number(),
|
|
25778
|
-
shm: CameraDecoderShmSchema
|
|
25779
|
-
});
|
|
27658
|
+
/**
|
|
27659
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27660
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27661
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27662
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27663
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27664
|
+
* detector), never from a counter nothing feeds.
|
|
27665
|
+
*/
|
|
27666
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25780
27667
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25781
27668
|
var CameraMotionStatusSchema = object({
|
|
25782
27669
|
enabled: boolean(),
|
|
@@ -26133,12 +28020,6 @@ method(object({
|
|
|
26133
28020
|
}), object({ success: literal(true) }), {
|
|
26134
28021
|
kind: "mutation",
|
|
26135
28022
|
auth: "admin"
|
|
26136
|
-
}), method(object({
|
|
26137
|
-
agentNodeId: string(),
|
|
26138
|
-
detectWeight: number().positive().nullable()
|
|
26139
|
-
}), object({ success: literal(true) }), {
|
|
26140
|
-
kind: "mutation",
|
|
26141
|
-
auth: "admin"
|
|
26142
28023
|
}), method(object({
|
|
26143
28024
|
agentNodeId: string(),
|
|
26144
28025
|
detect: boolean().nullable().optional(),
|
|
@@ -26180,6 +28061,30 @@ method(object({
|
|
|
26180
28061
|
}), {
|
|
26181
28062
|
kind: "mutation",
|
|
26182
28063
|
auth: "admin"
|
|
28064
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
28065
|
+
kind: "mutation",
|
|
28066
|
+
auth: "admin"
|
|
28067
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
28068
|
+
kind: "mutation",
|
|
28069
|
+
auth: "admin"
|
|
28070
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
28071
|
+
kind: "mutation",
|
|
28072
|
+
auth: "admin"
|
|
28073
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
28074
|
+
kind: literal("started"),
|
|
28075
|
+
runId: string()
|
|
28076
|
+
}), object({
|
|
28077
|
+
kind: literal("refused"),
|
|
28078
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
28079
|
+
})]), {
|
|
28080
|
+
kind: "mutation",
|
|
28081
|
+
auth: "admin"
|
|
28082
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
28083
|
+
kind: "mutation",
|
|
28084
|
+
auth: "admin"
|
|
28085
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
28086
|
+
kind: "mutation",
|
|
28087
|
+
auth: "admin"
|
|
26183
28088
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
26184
28089
|
deviceId: number(),
|
|
26185
28090
|
addonId: string(),
|
|
@@ -26196,6 +28101,13 @@ method(object({
|
|
|
26196
28101
|
}), object({ success: literal(true) }), {
|
|
26197
28102
|
kind: "mutation",
|
|
26198
28103
|
auth: "admin"
|
|
28104
|
+
}), method(object({
|
|
28105
|
+
deviceId: number(),
|
|
28106
|
+
addonId: string(),
|
|
28107
|
+
settings: record(string(), unknown()).nullable()
|
|
28108
|
+
}), object({ success: literal(true) }), {
|
|
28109
|
+
kind: "mutation",
|
|
28110
|
+
auth: "admin"
|
|
26199
28111
|
}), method(object({
|
|
26200
28112
|
deviceId: number(),
|
|
26201
28113
|
agentNodeId: string(),
|
|
@@ -26219,25 +28131,7 @@ method(object({
|
|
|
26219
28131
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
26220
28132
|
kind: "mutation",
|
|
26221
28133
|
auth: "admin"
|
|
26222
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
26223
|
-
name: string(),
|
|
26224
|
-
description: string().optional(),
|
|
26225
|
-
config: CameraPipelineConfigSchema
|
|
26226
|
-
}), PipelineTemplateSchema, {
|
|
26227
|
-
kind: "mutation",
|
|
26228
|
-
auth: "admin"
|
|
26229
|
-
}), method(object({
|
|
26230
|
-
id: string(),
|
|
26231
|
-
name: string().optional(),
|
|
26232
|
-
description: string().optional(),
|
|
26233
|
-
config: CameraPipelineConfigSchema.optional()
|
|
26234
|
-
}), PipelineTemplateSchema, {
|
|
26235
|
-
kind: "mutation",
|
|
26236
|
-
auth: "admin"
|
|
26237
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
26238
|
-
kind: "mutation",
|
|
26239
|
-
auth: "admin"
|
|
26240
|
-
});
|
|
28134
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
26241
28135
|
/**
|
|
26242
28136
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
26243
28137
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26827,7 +28721,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26827
28721
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26828
28722
|
* operator already consented to.
|
|
26829
28723
|
*/
|
|
26830
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
28724
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
28725
|
+
/**
|
|
28726
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
28727
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
28728
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
28729
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
28730
|
+
*/
|
|
28731
|
+
linkIntent: string().optional(),
|
|
28732
|
+
/**
|
|
28733
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28734
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
28735
|
+
*/
|
|
28736
|
+
issuer: string().optional()
|
|
26831
28737
|
});
|
|
26832
28738
|
method(object({
|
|
26833
28739
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28486,8 +30392,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
28486
30392
|
]).nullable(),
|
|
28487
30393
|
/** Input FPS from the camera (null for adaptive). */
|
|
28488
30394
|
inputFps: number().nullable(),
|
|
28489
|
-
/** Decoded FPS (null for adaptive). */
|
|
28490
|
-
decodeFps: number().nullable(),
|
|
28491
30395
|
/** Bitrate in kbps (null for adaptive). */
|
|
28492
30396
|
bitrateKbps: number().nullable()
|
|
28493
30397
|
});
|
|
@@ -28764,7 +30668,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28764
30668
|
* field their hints were silently stripped by the schema and the
|
|
28765
30669
|
* adaptive ladder started blind on the client's display size.
|
|
28766
30670
|
*/
|
|
28767
|
-
hints: webrtcClientHintsSchema.optional()
|
|
30671
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
30672
|
+
/**
|
|
30673
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
30674
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
30675
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
30676
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
30677
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
30678
|
+
*
|
|
30679
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
30680
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
30681
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
30682
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
30683
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
30684
|
+
* flag must not become a second door to the camera's speaker.
|
|
30685
|
+
*/
|
|
30686
|
+
talkback: boolean().optional()
|
|
28768
30687
|
}), object({
|
|
28769
30688
|
sessionId: string(),
|
|
28770
30689
|
sdpAnswer: string()
|
|
@@ -29138,6 +31057,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
29138
31057
|
var RestartAddonResultSchema = unknown();
|
|
29139
31058
|
var InstallPackageResultSchema = unknown();
|
|
29140
31059
|
var ReloadPackagesResultSchema = unknown();
|
|
31060
|
+
/**
|
|
31061
|
+
* What an uninstall did on ONE node.
|
|
31062
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
31063
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
31064
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
31065
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
31066
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
31067
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
31068
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
31069
|
+
*/
|
|
31070
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
31071
|
+
"uninstalled",
|
|
31072
|
+
"not-installed",
|
|
31073
|
+
"refused",
|
|
31074
|
+
"failed",
|
|
31075
|
+
"pending-reconnect"
|
|
31076
|
+
]);
|
|
31077
|
+
var UninstallNodeResultSchema = object({
|
|
31078
|
+
nodeId: string(),
|
|
31079
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
31080
|
+
error: string().optional(),
|
|
31081
|
+
addonIds: array(string()).readonly(),
|
|
31082
|
+
runnersStopped: array(string()).readonly(),
|
|
31083
|
+
warnings: array(string()).readonly()
|
|
31084
|
+
});
|
|
31085
|
+
var UninstallPackageResultSchema = object({
|
|
31086
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
31087
|
+
success: boolean(),
|
|
31088
|
+
packageName: string(),
|
|
31089
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
31090
|
+
});
|
|
31091
|
+
/**
|
|
31092
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
31093
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
31094
|
+
*/
|
|
31095
|
+
var PackageInstallationsSchema = object({
|
|
31096
|
+
installations: array(object({
|
|
31097
|
+
packageName: string(),
|
|
31098
|
+
nodeId: string(),
|
|
31099
|
+
nodeName: string(),
|
|
31100
|
+
isHub: boolean(),
|
|
31101
|
+
isOnline: boolean(),
|
|
31102
|
+
version: string().nullable(),
|
|
31103
|
+
addonIds: array(string()).readonly(),
|
|
31104
|
+
source: _enum(["live", "recorded"]),
|
|
31105
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
31106
|
+
onHub: boolean()
|
|
31107
|
+
})).readonly(),
|
|
31108
|
+
unreachable: array(object({
|
|
31109
|
+
nodeId: string(),
|
|
31110
|
+
error: string()
|
|
31111
|
+
})).readonly()
|
|
31112
|
+
});
|
|
29141
31113
|
var BulkUpdateItemStatusSchema = _enum([
|
|
29142
31114
|
"queued",
|
|
29143
31115
|
"updating",
|
|
@@ -29220,10 +31192,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
29220
31192
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
29221
31193
|
kind: "mutation",
|
|
29222
31194
|
auth: "admin"
|
|
29223
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31195
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31196
|
+
packageName: string().min(1),
|
|
31197
|
+
nodeId: string().optional(),
|
|
31198
|
+
everywhere: boolean().optional()
|
|
31199
|
+
}), UninstallPackageResultSchema, {
|
|
29224
31200
|
kind: "mutation",
|
|
29225
31201
|
auth: "admin"
|
|
29226
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
31202
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
29227
31203
|
kind: "mutation",
|
|
29228
31204
|
auth: "admin"
|
|
29229
31205
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -32314,6 +34290,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
32314
34290
|
enabled: boolean().optional(),
|
|
32315
34291
|
info: record(string(), unknown()).optional(),
|
|
32316
34292
|
settings: record(string(), unknown()).optional(),
|
|
34293
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
34294
|
+
* the keychain, not the table (D787). */
|
|
34295
|
+
secretKeys: array(string()).optional(),
|
|
32317
34296
|
skipRestart: boolean().optional()
|
|
32318
34297
|
});
|
|
32319
34298
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -32337,7 +34316,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
32337
34316
|
auth: "admin"
|
|
32338
34317
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
32339
34318
|
id: string(),
|
|
32340
|
-
settings: record(string(), unknown())
|
|
34319
|
+
settings: record(string(), unknown()),
|
|
34320
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
34321
|
+
secretKeys: array(string()).optional()
|
|
32341
34322
|
}), object({ success: boolean() }), {
|
|
32342
34323
|
kind: "mutation",
|
|
32343
34324
|
auth: "admin"
|
|
@@ -39159,6 +41140,32 @@ var TotpStatusSchema = object({
|
|
|
39159
41140
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
39160
41141
|
confirmedAt: number().nullable()
|
|
39161
41142
|
});
|
|
41143
|
+
/**
|
|
41144
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
41145
|
+
* and scoped tokens.
|
|
41146
|
+
*
|
|
41147
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
41148
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
41149
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
41150
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
41151
|
+
* provider.
|
|
41152
|
+
*/
|
|
41153
|
+
var ExternalIdentitySchema = object({
|
|
41154
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
41155
|
+
provider: string(),
|
|
41156
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
41157
|
+
subject: string(),
|
|
41158
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
41159
|
+
issuer: string(),
|
|
41160
|
+
userId: string(),
|
|
41161
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
41162
|
+
label: string().optional(),
|
|
41163
|
+
linkedAt: number()
|
|
41164
|
+
});
|
|
41165
|
+
var ExternalIdentityKeySchema = object({
|
|
41166
|
+
provider: string().min(1),
|
|
41167
|
+
subject: string().min(1)
|
|
41168
|
+
});
|
|
39162
41169
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
39163
41170
|
kind: "mutation",
|
|
39164
41171
|
auth: "admin",
|
|
@@ -39272,7 +41279,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
39272
41279
|
userId: string(),
|
|
39273
41280
|
username: string(),
|
|
39274
41281
|
scopes: array(TokenScopeSchema)
|
|
39275
|
-
}).nullable(), { access: "view" }), method(
|
|
41282
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
41283
|
+
userId: string(),
|
|
41284
|
+
issuer: string()
|
|
41285
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
41286
|
+
userId: string(),
|
|
41287
|
+
issuer: string().min(1),
|
|
41288
|
+
label: string().optional()
|
|
41289
|
+
}), object({ success: literal(true) }), {
|
|
41290
|
+
kind: "mutation",
|
|
41291
|
+
auth: "admin",
|
|
41292
|
+
access: "create"
|
|
41293
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
41294
|
+
kind: "mutation",
|
|
41295
|
+
auth: "admin",
|
|
41296
|
+
access: "delete"
|
|
41297
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
39276
41298
|
kind: "mutation",
|
|
39277
41299
|
auth: "admin",
|
|
39278
41300
|
access: "delete"
|
|
@@ -39974,6 +41996,16 @@ var zoneRulesCapability = {
|
|
|
39974
41996
|
durability: "restored"
|
|
39975
41997
|
};
|
|
39976
41998
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
41999
|
+
Object.freeze({
|
|
42000
|
+
person: .5,
|
|
42001
|
+
vehicle: .5,
|
|
42002
|
+
animal: .5
|
|
42003
|
+
});
|
|
42004
|
+
Object.freeze({
|
|
42005
|
+
person: .65,
|
|
42006
|
+
vehicle: .65,
|
|
42007
|
+
animal: .65
|
|
42008
|
+
});
|
|
39977
42009
|
/**
|
|
39978
42010
|
* Accessory device helpers — shared across drivers.
|
|
39979
42011
|
*
|
|
@@ -40449,7 +42481,8 @@ var BaseDevice = class {
|
|
|
40449
42481
|
this.role = options.role;
|
|
40450
42482
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
40451
42483
|
const seedData = ctx.persistedConfig ?? {};
|
|
40452
|
-
|
|
42484
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
42485
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
40453
42486
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
40454
42487
|
tags: {
|
|
40455
42488
|
deviceId: ctx.id,
|
|
@@ -41672,6 +43705,12 @@ Object.freeze({
|
|
|
41672
43705
|
addonId: null,
|
|
41673
43706
|
access: "view"
|
|
41674
43707
|
},
|
|
43708
|
+
"addons.listInstallations": {
|
|
43709
|
+
capName: "addons",
|
|
43710
|
+
capScope: "system",
|
|
43711
|
+
addonId: null,
|
|
43712
|
+
access: "view"
|
|
43713
|
+
},
|
|
41675
43714
|
"addons.listJobs": {
|
|
41676
43715
|
capName: "addons",
|
|
41677
43716
|
capScope: "system",
|
|
@@ -42854,90 +44893,18 @@ Object.freeze({
|
|
|
42854
44893
|
addonId: null,
|
|
42855
44894
|
access: "create"
|
|
42856
44895
|
},
|
|
42857
|
-
"decoder.createSession": {
|
|
42858
|
-
capName: "decoder",
|
|
42859
|
-
capScope: "system",
|
|
42860
|
-
addonId: null,
|
|
42861
|
-
access: "view"
|
|
42862
|
-
},
|
|
42863
|
-
"decoder.destroySession": {
|
|
42864
|
-
capName: "decoder",
|
|
42865
|
-
capScope: "system",
|
|
42866
|
-
addonId: null,
|
|
42867
|
-
access: "delete"
|
|
42868
|
-
},
|
|
42869
|
-
"decoder.getFrame": {
|
|
42870
|
-
capName: "decoder",
|
|
42871
|
-
capScope: "system",
|
|
42872
|
-
addonId: null,
|
|
42873
|
-
access: "view"
|
|
42874
|
-
},
|
|
42875
44896
|
"decoder.getInfo": {
|
|
42876
44897
|
capName: "decoder",
|
|
42877
44898
|
capScope: "system",
|
|
42878
44899
|
addonId: null,
|
|
42879
44900
|
access: "view"
|
|
42880
44901
|
},
|
|
42881
|
-
"decoder.getShmStats": {
|
|
42882
|
-
capName: "decoder",
|
|
42883
|
-
capScope: "system",
|
|
42884
|
-
addonId: null,
|
|
42885
|
-
access: "view"
|
|
42886
|
-
},
|
|
42887
|
-
"decoder.getStats": {
|
|
42888
|
-
capName: "decoder",
|
|
42889
|
-
capScope: "system",
|
|
42890
|
-
addonId: null,
|
|
42891
|
-
access: "view"
|
|
42892
|
-
},
|
|
42893
|
-
"decoder.listActiveSessions": {
|
|
42894
|
-
capName: "decoder",
|
|
42895
|
-
capScope: "system",
|
|
42896
|
-
addonId: null,
|
|
42897
|
-
access: "view"
|
|
42898
|
-
},
|
|
42899
|
-
"decoder.openStream": {
|
|
42900
|
-
capName: "decoder",
|
|
42901
|
-
capScope: "system",
|
|
42902
|
-
addonId: null,
|
|
42903
|
-
access: "view"
|
|
42904
|
-
},
|
|
42905
|
-
"decoder.pullFrames": {
|
|
42906
|
-
capName: "decoder",
|
|
42907
|
-
capScope: "system",
|
|
42908
|
-
addonId: null,
|
|
42909
|
-
access: "view"
|
|
42910
|
-
},
|
|
42911
|
-
"decoder.pullHandles": {
|
|
42912
|
-
capName: "decoder",
|
|
42913
|
-
capScope: "system",
|
|
42914
|
-
addonId: null,
|
|
42915
|
-
access: "view"
|
|
42916
|
-
},
|
|
42917
|
-
"decoder.pushPacket": {
|
|
42918
|
-
capName: "decoder",
|
|
42919
|
-
capScope: "system",
|
|
42920
|
-
addonId: null,
|
|
42921
|
-
access: "view"
|
|
42922
|
-
},
|
|
42923
44902
|
"decoder.reprobeHwaccel": {
|
|
42924
44903
|
capName: "decoder",
|
|
42925
44904
|
capScope: "system",
|
|
42926
44905
|
addonId: null,
|
|
42927
44906
|
access: "create"
|
|
42928
44907
|
},
|
|
42929
|
-
"decoder.supportsCodec": {
|
|
42930
|
-
capName: "decoder",
|
|
42931
|
-
capScope: "system",
|
|
42932
|
-
addonId: null,
|
|
42933
|
-
access: "view"
|
|
42934
|
-
},
|
|
42935
|
-
"decoder.updateConfig": {
|
|
42936
|
-
capName: "decoder",
|
|
42937
|
-
capScope: "system",
|
|
42938
|
-
addonId: null,
|
|
42939
|
-
access: "view"
|
|
42940
|
-
},
|
|
42941
44908
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
42942
44909
|
capName: "detection-pipeline",
|
|
42943
44910
|
capScope: "device",
|
|
@@ -44204,6 +46171,90 @@ Object.freeze({
|
|
|
44204
46171
|
addonId: null,
|
|
44205
46172
|
access: "create"
|
|
44206
46173
|
},
|
|
46174
|
+
"keychain.delete": {
|
|
46175
|
+
capName: "keychain",
|
|
46176
|
+
capScope: "system",
|
|
46177
|
+
addonId: null,
|
|
46178
|
+
access: "delete"
|
|
46179
|
+
},
|
|
46180
|
+
"keychain.getState": {
|
|
46181
|
+
capName: "keychain",
|
|
46182
|
+
capScope: "system",
|
|
46183
|
+
addonId: null,
|
|
46184
|
+
access: "view"
|
|
46185
|
+
},
|
|
46186
|
+
"keychain.listMeta": {
|
|
46187
|
+
capName: "keychain",
|
|
46188
|
+
capScope: "system",
|
|
46189
|
+
addonId: null,
|
|
46190
|
+
access: "view"
|
|
46191
|
+
},
|
|
46192
|
+
"keychain.put": {
|
|
46193
|
+
capName: "keychain",
|
|
46194
|
+
capScope: "system",
|
|
46195
|
+
addonId: null,
|
|
46196
|
+
access: "create"
|
|
46197
|
+
},
|
|
46198
|
+
"keychain.resolve": {
|
|
46199
|
+
capName: "keychain",
|
|
46200
|
+
capScope: "system",
|
|
46201
|
+
addonId: null,
|
|
46202
|
+
access: "view"
|
|
46203
|
+
},
|
|
46204
|
+
"keychainAdmin.deleteOrphans": {
|
|
46205
|
+
capName: "keychain-admin",
|
|
46206
|
+
capScope: "system",
|
|
46207
|
+
addonId: null,
|
|
46208
|
+
access: "delete"
|
|
46209
|
+
},
|
|
46210
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
46211
|
+
capName: "keychain-admin",
|
|
46212
|
+
capScope: "system",
|
|
46213
|
+
addonId: null,
|
|
46214
|
+
access: "create"
|
|
46215
|
+
},
|
|
46216
|
+
"keychainAdmin.listAudit": {
|
|
46217
|
+
capName: "keychain-admin",
|
|
46218
|
+
capScope: "system",
|
|
46219
|
+
addonId: null,
|
|
46220
|
+
access: "view"
|
|
46221
|
+
},
|
|
46222
|
+
"keychainAdmin.listSecrets": {
|
|
46223
|
+
capName: "keychain-admin",
|
|
46224
|
+
capScope: "system",
|
|
46225
|
+
addonId: null,
|
|
46226
|
+
access: "view"
|
|
46227
|
+
},
|
|
46228
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
46229
|
+
capName: "keychain-admin",
|
|
46230
|
+
capScope: "system",
|
|
46231
|
+
addonId: null,
|
|
46232
|
+
access: "delete"
|
|
46233
|
+
},
|
|
46234
|
+
"keychainAdmin.resetKeychain": {
|
|
46235
|
+
capName: "keychain-admin",
|
|
46236
|
+
capScope: "system",
|
|
46237
|
+
addonId: null,
|
|
46238
|
+
access: "delete"
|
|
46239
|
+
},
|
|
46240
|
+
"keychainAdmin.reveal": {
|
|
46241
|
+
capName: "keychain-admin",
|
|
46242
|
+
capScope: "system",
|
|
46243
|
+
addonId: null,
|
|
46244
|
+
access: "create"
|
|
46245
|
+
},
|
|
46246
|
+
"keychainAdmin.rotateMasterKey": {
|
|
46247
|
+
capName: "keychain-admin",
|
|
46248
|
+
capScope: "system",
|
|
46249
|
+
addonId: null,
|
|
46250
|
+
access: "create"
|
|
46251
|
+
},
|
|
46252
|
+
"keychainAdmin.status": {
|
|
46253
|
+
capName: "keychain-admin",
|
|
46254
|
+
capScope: "system",
|
|
46255
|
+
addonId: null,
|
|
46256
|
+
access: "view"
|
|
46257
|
+
},
|
|
44207
46258
|
"lawnMowerControl.dock": {
|
|
44208
46259
|
capName: "lawn-mower-control",
|
|
44209
46260
|
capScope: "device",
|
|
@@ -45578,6 +47629,18 @@ Object.freeze({
|
|
|
45578
47629
|
addonId: null,
|
|
45579
47630
|
access: "create"
|
|
45580
47631
|
},
|
|
47632
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
47633
|
+
capName: "pipeline-analytics",
|
|
47634
|
+
capScope: "device",
|
|
47635
|
+
addonId: null,
|
|
47636
|
+
access: "create"
|
|
47637
|
+
},
|
|
47638
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
47639
|
+
capName: "pipeline-analytics",
|
|
47640
|
+
capScope: "device",
|
|
47641
|
+
addonId: null,
|
|
47642
|
+
access: "create"
|
|
47643
|
+
},
|
|
45581
47644
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
45582
47645
|
capName: "pipeline-analytics",
|
|
45583
47646
|
capScope: "device",
|
|
@@ -45626,12 +47689,24 @@ Object.freeze({
|
|
|
45626
47689
|
addonId: null,
|
|
45627
47690
|
access: "view"
|
|
45628
47691
|
},
|
|
47692
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
47693
|
+
capName: "pipeline-analytics",
|
|
47694
|
+
capScope: "device",
|
|
47695
|
+
addonId: null,
|
|
47696
|
+
access: "create"
|
|
47697
|
+
},
|
|
45629
47698
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
45630
47699
|
capName: "pipeline-analytics",
|
|
45631
47700
|
capScope: "device",
|
|
45632
47701
|
addonId: null,
|
|
45633
47702
|
access: "delete"
|
|
45634
47703
|
},
|
|
47704
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
47705
|
+
capName: "pipeline-analytics",
|
|
47706
|
+
capScope: "device",
|
|
47707
|
+
addonId: null,
|
|
47708
|
+
access: "delete"
|
|
47709
|
+
},
|
|
45635
47710
|
"pipelineAnalytics.deleteTracks": {
|
|
45636
47711
|
capName: "pipeline-analytics",
|
|
45637
47712
|
capScope: "device",
|
|
@@ -45836,6 +47911,24 @@ Object.freeze({
|
|
|
45836
47911
|
addonId: null,
|
|
45837
47912
|
access: "view"
|
|
45838
47913
|
},
|
|
47914
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
47915
|
+
capName: "pipeline-analytics",
|
|
47916
|
+
capScope: "device",
|
|
47917
|
+
addonId: null,
|
|
47918
|
+
access: "view"
|
|
47919
|
+
},
|
|
47920
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
47921
|
+
capName: "pipeline-analytics",
|
|
47922
|
+
capScope: "device",
|
|
47923
|
+
addonId: null,
|
|
47924
|
+
access: "view"
|
|
47925
|
+
},
|
|
47926
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
47927
|
+
capName: "pipeline-analytics",
|
|
47928
|
+
capScope: "device",
|
|
47929
|
+
addonId: null,
|
|
47930
|
+
access: "view"
|
|
47931
|
+
},
|
|
45839
47932
|
"pipelineAnalytics.listRetrainFrames": {
|
|
45840
47933
|
capName: "pipeline-analytics",
|
|
45841
47934
|
capScope: "device",
|
|
@@ -45884,6 +47977,12 @@ Object.freeze({
|
|
|
45884
47977
|
addonId: null,
|
|
45885
47978
|
access: "create"
|
|
45886
47979
|
},
|
|
47980
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
47981
|
+
capName: "pipeline-analytics",
|
|
47982
|
+
capScope: "device",
|
|
47983
|
+
addonId: null,
|
|
47984
|
+
access: "create"
|
|
47985
|
+
},
|
|
45887
47986
|
"pipelineAnalytics.pruneEvents": {
|
|
45888
47987
|
capName: "pipeline-analytics",
|
|
45889
47988
|
capScope: "device",
|
|
@@ -45938,6 +48037,18 @@ Object.freeze({
|
|
|
45938
48037
|
addonId: null,
|
|
45939
48038
|
access: "create"
|
|
45940
48039
|
},
|
|
48040
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
48041
|
+
capName: "pipeline-analytics",
|
|
48042
|
+
capScope: "device",
|
|
48043
|
+
addonId: null,
|
|
48044
|
+
access: "delete"
|
|
48045
|
+
},
|
|
48046
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
48047
|
+
capName: "pipeline-analytics",
|
|
48048
|
+
capScope: "device",
|
|
48049
|
+
addonId: null,
|
|
48050
|
+
access: "create"
|
|
48051
|
+
},
|
|
45941
48052
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
45942
48053
|
capName: "pipeline-analytics",
|
|
45943
48054
|
capScope: "device",
|
|
@@ -45968,6 +48079,12 @@ Object.freeze({
|
|
|
45968
48079
|
addonId: null,
|
|
45969
48080
|
access: "create"
|
|
45970
48081
|
},
|
|
48082
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
48083
|
+
capName: "pipeline-analytics",
|
|
48084
|
+
capScope: "device",
|
|
48085
|
+
addonId: null,
|
|
48086
|
+
access: "create"
|
|
48087
|
+
},
|
|
45971
48088
|
"pipelineAnalytics.setTrackFlags": {
|
|
45972
48089
|
capName: "pipeline-analytics",
|
|
45973
48090
|
capScope: "device",
|
|
@@ -46004,6 +48121,12 @@ Object.freeze({
|
|
|
46004
48121
|
addonId: null,
|
|
46005
48122
|
access: "delete"
|
|
46006
48123
|
},
|
|
48124
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
48125
|
+
capName: "pipeline-analytics",
|
|
48126
|
+
capScope: "device",
|
|
48127
|
+
addonId: null,
|
|
48128
|
+
access: "create"
|
|
48129
|
+
},
|
|
46007
48130
|
"pipelineExecutor.cacheFrameInPool": {
|
|
46008
48131
|
capName: "pipeline-executor",
|
|
46009
48132
|
capScope: "system",
|
|
@@ -46016,13 +48139,13 @@ Object.freeze({
|
|
|
46016
48139
|
addonId: null,
|
|
46017
48140
|
access: "delete"
|
|
46018
48141
|
},
|
|
46019
|
-
"pipelineExecutor.
|
|
48142
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
46020
48143
|
capName: "pipeline-executor",
|
|
46021
48144
|
capScope: "system",
|
|
46022
48145
|
addonId: null,
|
|
46023
48146
|
access: "delete"
|
|
46024
48147
|
},
|
|
46025
|
-
"pipelineExecutor.
|
|
48148
|
+
"pipelineExecutor.deleteModel": {
|
|
46026
48149
|
capName: "pipeline-executor",
|
|
46027
48150
|
capScope: "system",
|
|
46028
48151
|
addonId: null,
|
|
@@ -46166,12 +48289,6 @@ Object.freeze({
|
|
|
46166
48289
|
addonId: null,
|
|
46167
48290
|
access: "view"
|
|
46168
48291
|
},
|
|
46169
|
-
"pipelineExecutor.listTemplates": {
|
|
46170
|
-
capName: "pipeline-executor",
|
|
46171
|
-
capScope: "system",
|
|
46172
|
-
addonId: null,
|
|
46173
|
-
access: "view"
|
|
46174
|
-
},
|
|
46175
48292
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
46176
48293
|
capName: "pipeline-executor",
|
|
46177
48294
|
capScope: "system",
|
|
@@ -46196,12 +48313,6 @@ Object.freeze({
|
|
|
46196
48313
|
addonId: null,
|
|
46197
48314
|
access: "create"
|
|
46198
48315
|
},
|
|
46199
|
-
"pipelineExecutor.saveTemplate": {
|
|
46200
|
-
capName: "pipeline-executor",
|
|
46201
|
-
capScope: "system",
|
|
46202
|
-
addonId: null,
|
|
46203
|
-
access: "create"
|
|
46204
|
-
},
|
|
46205
48316
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
46206
48317
|
capName: "pipeline-executor",
|
|
46207
48318
|
capScope: "system",
|
|
@@ -46220,17 +48331,23 @@ Object.freeze({
|
|
|
46220
48331
|
addonId: null,
|
|
46221
48332
|
access: "create"
|
|
46222
48333
|
},
|
|
46223
|
-
"pipelineExecutor.
|
|
48334
|
+
"pipelineExecutor.validatePipeline": {
|
|
46224
48335
|
capName: "pipeline-executor",
|
|
46225
48336
|
capScope: "system",
|
|
46226
48337
|
addonId: null,
|
|
48338
|
+
access: "view"
|
|
48339
|
+
},
|
|
48340
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
48341
|
+
capName: "pipeline-orchestrator",
|
|
48342
|
+
capScope: "system",
|
|
48343
|
+
addonId: null,
|
|
46227
48344
|
access: "create"
|
|
46228
48345
|
},
|
|
46229
|
-
"
|
|
46230
|
-
capName: "pipeline-
|
|
48346
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
48347
|
+
capName: "pipeline-orchestrator",
|
|
46231
48348
|
capScope: "system",
|
|
46232
48349
|
addonId: null,
|
|
46233
|
-
access: "
|
|
48350
|
+
access: "create"
|
|
46234
48351
|
},
|
|
46235
48352
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
46236
48353
|
capName: "pipeline-orchestrator",
|
|
@@ -46250,7 +48367,7 @@ Object.freeze({
|
|
|
46250
48367
|
addonId: null,
|
|
46251
48368
|
access: "create"
|
|
46252
48369
|
},
|
|
46253
|
-
"pipelineOrchestrator.
|
|
48370
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
46254
48371
|
capName: "pipeline-orchestrator",
|
|
46255
48372
|
capScope: "system",
|
|
46256
48373
|
addonId: null,
|
|
@@ -46346,6 +48463,12 @@ Object.freeze({
|
|
|
46346
48463
|
addonId: null,
|
|
46347
48464
|
access: "view"
|
|
46348
48465
|
},
|
|
48466
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
48467
|
+
capName: "pipeline-orchestrator",
|
|
48468
|
+
capScope: "system",
|
|
48469
|
+
addonId: null,
|
|
48470
|
+
access: "view"
|
|
48471
|
+
},
|
|
46349
48472
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
46350
48473
|
capName: "pipeline-orchestrator",
|
|
46351
48474
|
capScope: "system",
|
|
@@ -46358,6 +48481,24 @@ Object.freeze({
|
|
|
46358
48481
|
addonId: null,
|
|
46359
48482
|
access: "view"
|
|
46360
48483
|
},
|
|
48484
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
48485
|
+
capName: "pipeline-orchestrator",
|
|
48486
|
+
capScope: "system",
|
|
48487
|
+
addonId: null,
|
|
48488
|
+
access: "view"
|
|
48489
|
+
},
|
|
48490
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
48491
|
+
capName: "pipeline-orchestrator",
|
|
48492
|
+
capScope: "system",
|
|
48493
|
+
addonId: null,
|
|
48494
|
+
access: "view"
|
|
48495
|
+
},
|
|
48496
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
48497
|
+
capName: "pipeline-orchestrator",
|
|
48498
|
+
capScope: "system",
|
|
48499
|
+
addonId: null,
|
|
48500
|
+
access: "view"
|
|
48501
|
+
},
|
|
46361
48502
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
46362
48503
|
capName: "pipeline-orchestrator",
|
|
46363
48504
|
capScope: "system",
|
|
@@ -46382,6 +48523,12 @@ Object.freeze({
|
|
|
46382
48523
|
addonId: null,
|
|
46383
48524
|
access: "view"
|
|
46384
48525
|
},
|
|
48526
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
48527
|
+
capName: "pipeline-orchestrator",
|
|
48528
|
+
capScope: "system",
|
|
48529
|
+
addonId: null,
|
|
48530
|
+
access: "view"
|
|
48531
|
+
},
|
|
46385
48532
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
46386
48533
|
capName: "pipeline-orchestrator",
|
|
46387
48534
|
capScope: "system",
|
|
@@ -46394,7 +48541,7 @@ Object.freeze({
|
|
|
46394
48541
|
addonId: null,
|
|
46395
48542
|
access: "view"
|
|
46396
48543
|
},
|
|
46397
|
-
"pipelineOrchestrator.
|
|
48544
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
46398
48545
|
capName: "pipeline-orchestrator",
|
|
46399
48546
|
capScope: "system",
|
|
46400
48547
|
addonId: null,
|
|
@@ -46406,6 +48553,12 @@ Object.freeze({
|
|
|
46406
48553
|
addonId: null,
|
|
46407
48554
|
access: "create"
|
|
46408
48555
|
},
|
|
48556
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
48557
|
+
capName: "pipeline-orchestrator",
|
|
48558
|
+
capScope: "system",
|
|
48559
|
+
addonId: null,
|
|
48560
|
+
access: "view"
|
|
48561
|
+
},
|
|
46409
48562
|
"pipelineOrchestrator.rebalance": {
|
|
46410
48563
|
capName: "pipeline-orchestrator",
|
|
46411
48564
|
capScope: "system",
|
|
@@ -46448,12 +48601,6 @@ Object.freeze({
|
|
|
46448
48601
|
addonId: null,
|
|
46449
48602
|
access: "create"
|
|
46450
48603
|
},
|
|
46451
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
46452
|
-
capName: "pipeline-orchestrator",
|
|
46453
|
-
capScope: "system",
|
|
46454
|
-
addonId: null,
|
|
46455
|
-
access: "create"
|
|
46456
|
-
},
|
|
46457
48604
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
46458
48605
|
capName: "pipeline-orchestrator",
|
|
46459
48606
|
capScope: "system",
|
|
@@ -46466,12 +48613,6 @@ Object.freeze({
|
|
|
46466
48613
|
addonId: null,
|
|
46467
48614
|
access: "create"
|
|
46468
48615
|
},
|
|
46469
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
46470
|
-
capName: "pipeline-orchestrator",
|
|
46471
|
-
capScope: "system",
|
|
46472
|
-
addonId: null,
|
|
46473
|
-
access: "create"
|
|
46474
|
-
},
|
|
46475
48616
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
46476
48617
|
capName: "pipeline-orchestrator",
|
|
46477
48618
|
capScope: "system",
|
|
@@ -46508,6 +48649,12 @@ Object.freeze({
|
|
|
46508
48649
|
addonId: null,
|
|
46509
48650
|
access: "create"
|
|
46510
48651
|
},
|
|
48652
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
48653
|
+
capName: "pipeline-orchestrator",
|
|
48654
|
+
capScope: "system",
|
|
48655
|
+
addonId: null,
|
|
48656
|
+
access: "create"
|
|
48657
|
+
},
|
|
46511
48658
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
46512
48659
|
capName: "pipeline-orchestrator",
|
|
46513
48660
|
capScope: "system",
|
|
@@ -46526,12 +48673,36 @@ Object.freeze({
|
|
|
46526
48673
|
addonId: null,
|
|
46527
48674
|
access: "create"
|
|
46528
48675
|
},
|
|
48676
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
48677
|
+
capName: "pipeline-orchestrator",
|
|
48678
|
+
capScope: "system",
|
|
48679
|
+
addonId: null,
|
|
48680
|
+
access: "create"
|
|
48681
|
+
},
|
|
46529
48682
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
46530
48683
|
capName: "pipeline-orchestrator",
|
|
46531
48684
|
capScope: "system",
|
|
46532
48685
|
addonId: null,
|
|
46533
48686
|
access: "create"
|
|
46534
48687
|
},
|
|
48688
|
+
"pipelineOrchestrator.setShareSource": {
|
|
48689
|
+
capName: "pipeline-orchestrator",
|
|
48690
|
+
capScope: "system",
|
|
48691
|
+
addonId: null,
|
|
48692
|
+
access: "create"
|
|
48693
|
+
},
|
|
48694
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
48695
|
+
capName: "pipeline-orchestrator",
|
|
48696
|
+
capScope: "system",
|
|
48697
|
+
addonId: null,
|
|
48698
|
+
access: "create"
|
|
48699
|
+
},
|
|
48700
|
+
"pipelineOrchestrator.suggestShares": {
|
|
48701
|
+
capName: "pipeline-orchestrator",
|
|
48702
|
+
capScope: "system",
|
|
48703
|
+
addonId: null,
|
|
48704
|
+
access: "view"
|
|
48705
|
+
},
|
|
46535
48706
|
"pipelineOrchestrator.unassignAudio": {
|
|
46536
48707
|
capName: "pipeline-orchestrator",
|
|
46537
48708
|
capScope: "system",
|
|
@@ -46544,8 +48715,8 @@ Object.freeze({
|
|
|
46544
48715
|
addonId: null,
|
|
46545
48716
|
access: "create"
|
|
46546
48717
|
},
|
|
46547
|
-
"
|
|
46548
|
-
capName: "pipeline-
|
|
48718
|
+
"pipelineRunner.abortNodeBench": {
|
|
48719
|
+
capName: "pipeline-runner",
|
|
46549
48720
|
capScope: "system",
|
|
46550
48721
|
addonId: null,
|
|
46551
48722
|
access: "create"
|
|
@@ -46598,6 +48769,12 @@ Object.freeze({
|
|
|
46598
48769
|
addonId: null,
|
|
46599
48770
|
access: "view"
|
|
46600
48771
|
},
|
|
48772
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
48773
|
+
capName: "pipeline-runner",
|
|
48774
|
+
capScope: "system",
|
|
48775
|
+
addonId: null,
|
|
48776
|
+
access: "view"
|
|
48777
|
+
},
|
|
46601
48778
|
"pipelineRunner.getParkedTrackFrame": {
|
|
46602
48779
|
capName: "pipeline-runner",
|
|
46603
48780
|
capScope: "system",
|
|
@@ -46640,6 +48817,12 @@ Object.freeze({
|
|
|
46640
48817
|
addonId: null,
|
|
46641
48818
|
access: "create"
|
|
46642
48819
|
},
|
|
48820
|
+
"pipelineRunner.startNodeBench": {
|
|
48821
|
+
capName: "pipeline-runner",
|
|
48822
|
+
capScope: "system",
|
|
48823
|
+
addonId: null,
|
|
48824
|
+
access: "create"
|
|
48825
|
+
},
|
|
46643
48826
|
"plateGallery.assignPlate": {
|
|
46644
48827
|
capName: "plate-gallery",
|
|
46645
48828
|
capScope: "system",
|
|
@@ -47984,12 +50167,6 @@ Object.freeze({
|
|
|
47984
50167
|
addonId: null,
|
|
47985
50168
|
access: "view"
|
|
47986
50169
|
},
|
|
47987
|
-
"streamBroker.pullFrameHandles": {
|
|
47988
|
-
capName: "stream-broker",
|
|
47989
|
-
capScope: "system",
|
|
47990
|
-
addonId: null,
|
|
47991
|
-
access: "view"
|
|
47992
|
-
},
|
|
47993
50170
|
"streamBroker.regenerateRtspToken": {
|
|
47994
50171
|
capName: "stream-broker",
|
|
47995
50172
|
capScope: "system",
|
|
@@ -48056,12 +50233,6 @@ Object.freeze({
|
|
|
48056
50233
|
addonId: null,
|
|
48057
50234
|
access: "create"
|
|
48058
50235
|
},
|
|
48059
|
-
"streamBroker.subscribeFrames": {
|
|
48060
|
-
capName: "stream-broker",
|
|
48061
|
-
capScope: "system",
|
|
48062
|
-
addonId: null,
|
|
48063
|
-
access: "create"
|
|
48064
|
-
},
|
|
48065
50236
|
"streamBroker.unassignProfile": {
|
|
48066
50237
|
capName: "stream-broker",
|
|
48067
50238
|
capScope: "system",
|
|
@@ -48074,12 +50245,6 @@ Object.freeze({
|
|
|
48074
50245
|
addonId: null,
|
|
48075
50246
|
access: "create"
|
|
48076
50247
|
},
|
|
48077
|
-
"streamBroker.unsubscribeFrames": {
|
|
48078
|
-
capName: "stream-broker",
|
|
48079
|
-
capScope: "system",
|
|
48080
|
-
addonId: null,
|
|
48081
|
-
access: "create"
|
|
48082
|
-
},
|
|
48083
50248
|
"streamCatalog.getCatalog": {
|
|
48084
50249
|
capName: "stream-catalog",
|
|
48085
50250
|
capScope: "device",
|
|
@@ -48374,18 +50539,36 @@ Object.freeze({
|
|
|
48374
50539
|
addonId: null,
|
|
48375
50540
|
access: "delete"
|
|
48376
50541
|
},
|
|
50542
|
+
"userManagement.findUserByExternalIdentity": {
|
|
50543
|
+
capName: "user-management",
|
|
50544
|
+
capScope: "system",
|
|
50545
|
+
addonId: null,
|
|
50546
|
+
access: "view"
|
|
50547
|
+
},
|
|
48377
50548
|
"userManagement.getTotpStatus": {
|
|
48378
50549
|
capName: "user-management",
|
|
48379
50550
|
capScope: "system",
|
|
48380
50551
|
addonId: null,
|
|
48381
50552
|
access: "view"
|
|
48382
50553
|
},
|
|
50554
|
+
"userManagement.linkExternalIdentity": {
|
|
50555
|
+
capName: "user-management",
|
|
50556
|
+
capScope: "system",
|
|
50557
|
+
addonId: null,
|
|
50558
|
+
access: "create"
|
|
50559
|
+
},
|
|
48383
50560
|
"userManagement.listApiKeys": {
|
|
48384
50561
|
capName: "user-management",
|
|
48385
50562
|
capScope: "system",
|
|
48386
50563
|
addonId: null,
|
|
48387
50564
|
access: "view"
|
|
48388
50565
|
},
|
|
50566
|
+
"userManagement.listExternalIdentities": {
|
|
50567
|
+
capName: "user-management",
|
|
50568
|
+
capScope: "system",
|
|
50569
|
+
addonId: null,
|
|
50570
|
+
access: "view"
|
|
50571
|
+
},
|
|
48389
50572
|
"userManagement.listOauthSessions": {
|
|
48390
50573
|
capName: "user-management",
|
|
48391
50574
|
capScope: "system",
|
|
@@ -48464,6 +50647,12 @@ Object.freeze({
|
|
|
48464
50647
|
addonId: null,
|
|
48465
50648
|
access: "create"
|
|
48466
50649
|
},
|
|
50650
|
+
"userManagement.unlinkExternalIdentity": {
|
|
50651
|
+
capName: "user-management",
|
|
50652
|
+
capScope: "system",
|
|
50653
|
+
addonId: null,
|
|
50654
|
+
access: "delete"
|
|
50655
|
+
},
|
|
48467
50656
|
"userManagement.updateUser": {
|
|
48468
50657
|
capName: "user-management",
|
|
48469
50658
|
capScope: "system",
|
|
@@ -50593,11 +52782,6 @@ Object.freeze({
|
|
|
50593
52782
|
form: "single",
|
|
50594
52783
|
optional: false
|
|
50595
52784
|
}],
|
|
50596
|
-
"decoder.createSession": [{
|
|
50597
|
-
name: "deviceId",
|
|
50598
|
-
form: "single",
|
|
50599
|
-
optional: true
|
|
50600
|
-
}],
|
|
50601
52785
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
50602
52786
|
name: "deviceId",
|
|
50603
52787
|
form: "single",
|
|
@@ -51568,6 +53752,11 @@ Object.freeze({
|
|
|
51568
53752
|
form: "single",
|
|
51569
53753
|
optional: false
|
|
51570
53754
|
}],
|
|
53755
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
53756
|
+
name: "deviceId",
|
|
53757
|
+
form: "single",
|
|
53758
|
+
optional: false
|
|
53759
|
+
}],
|
|
51571
53760
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
51572
53761
|
name: "deviceId",
|
|
51573
53762
|
form: "single",
|
|
@@ -51758,6 +53947,11 @@ Object.freeze({
|
|
|
51758
53947
|
form: "single",
|
|
51759
53948
|
optional: false
|
|
51760
53949
|
}],
|
|
53950
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
53951
|
+
name: "deviceId",
|
|
53952
|
+
form: "single",
|
|
53953
|
+
optional: false
|
|
53954
|
+
}],
|
|
51761
53955
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
51762
53956
|
name: "deviceId",
|
|
51763
53957
|
form: "single",
|
|
@@ -51808,6 +54002,11 @@ Object.freeze({
|
|
|
51808
54002
|
form: "single",
|
|
51809
54003
|
optional: false
|
|
51810
54004
|
}],
|
|
54005
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
54006
|
+
name: "deviceId",
|
|
54007
|
+
form: "single",
|
|
54008
|
+
optional: false
|
|
54009
|
+
}],
|
|
51811
54010
|
"pipelineAnalytics.setTrackFlags": [{
|
|
51812
54011
|
name: "deviceId",
|
|
51813
54012
|
form: "single",
|
|
@@ -51828,6 +54027,11 @@ Object.freeze({
|
|
|
51828
54027
|
form: "single",
|
|
51829
54028
|
optional: false
|
|
51830
54029
|
}],
|
|
54030
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
54031
|
+
name: "deviceIds",
|
|
54032
|
+
form: "array",
|
|
54033
|
+
optional: true
|
|
54034
|
+
}],
|
|
51831
54035
|
"pipelineExecutor.runPipeline": [{
|
|
51832
54036
|
name: "deviceId",
|
|
51833
54037
|
form: "single",
|
|
@@ -51933,6 +54137,11 @@ Object.freeze({
|
|
|
51933
54137
|
form: "single",
|
|
51934
54138
|
optional: false
|
|
51935
54139
|
}],
|
|
54140
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
54141
|
+
name: "deviceId",
|
|
54142
|
+
form: "single",
|
|
54143
|
+
optional: false
|
|
54144
|
+
}],
|
|
51936
54145
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
51937
54146
|
name: "deviceId",
|
|
51938
54147
|
form: "single",
|