@camstack/addon-provider-hikvision 1.2.145 → 1.2.147
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 +2722 -513
- package/dist/addon.mjs +2722 -513
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -33,7 +33,7 @@ let node_net = require("node:net");
|
|
|
33
33
|
let node_http = require("node:http");
|
|
34
34
|
let node_https = require("node:https");
|
|
35
35
|
let node_os = require("node:os");
|
|
36
|
-
//#region ../types/dist/event-category-
|
|
36
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
37
37
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
38
38
|
EventCategory["SystemBoot"] = "system.boot";
|
|
39
39
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -112,6 +112,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
112
112
|
*/
|
|
113
113
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
114
114
|
/**
|
|
115
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
116
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
117
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
118
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
119
|
+
*/
|
|
120
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
121
|
+
/**
|
|
115
122
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
116
123
|
* transitions from `failed` back to `healthy` (typically via the
|
|
117
124
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -534,15 +541,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
534
541
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
535
542
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
536
543
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
537
|
-
/**
|
|
538
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
539
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
540
|
-
* `createSession`, so running sessions keep their current backend until
|
|
541
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
542
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
543
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
544
|
-
*/
|
|
545
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
546
544
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
547
545
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
548
546
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5413,7 +5411,7 @@ var ZodIssueCode = {
|
|
|
5413
5411
|
var ZodFirstPartyTypeKind;
|
|
5414
5412
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5415
5413
|
//#endregion
|
|
5416
|
-
//#region ../types/dist/sleep-
|
|
5414
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5417
5415
|
/**
|
|
5418
5416
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5419
5417
|
* window to float samples (D455).
|
|
@@ -5492,6 +5490,97 @@ function buildAlawTable() {
|
|
|
5492
5490
|
}
|
|
5493
5491
|
buildUlawTable();
|
|
5494
5492
|
buildAlawTable();
|
|
5493
|
+
/** Is this field's stored value a credential? */
|
|
5494
|
+
function isSecretConfigField(field) {
|
|
5495
|
+
if (field.type === "password") return true;
|
|
5496
|
+
return "secret" in field && field.secret === true;
|
|
5497
|
+
}
|
|
5498
|
+
/**
|
|
5499
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5500
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5501
|
+
*/
|
|
5502
|
+
function isKeychainStoredField(field) {
|
|
5503
|
+
if (!isSecretConfigField(field)) return false;
|
|
5504
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5505
|
+
return !("storage" in field && field.storage === "inline");
|
|
5506
|
+
}
|
|
5507
|
+
/**
|
|
5508
|
+
* What a settings blob holds where a secret used to be.
|
|
5509
|
+
*
|
|
5510
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5511
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5512
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5513
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5514
|
+
*
|
|
5515
|
+
* The same shapes travel to and from the admin UI:
|
|
5516
|
+
*
|
|
5517
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5518
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5519
|
+
* value is set, never the value.
|
|
5520
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5521
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5522
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5523
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5524
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5525
|
+
*
|
|
5526
|
+
* Pure and browser-safe.
|
|
5527
|
+
*/
|
|
5528
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5529
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5530
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5531
|
+
function isRecord$1(value) {
|
|
5532
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5533
|
+
}
|
|
5534
|
+
function makeSecretMarker(ref) {
|
|
5535
|
+
return {
|
|
5536
|
+
$secret: ref,
|
|
5537
|
+
v: 1
|
|
5538
|
+
};
|
|
5539
|
+
}
|
|
5540
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5541
|
+
function isSecretMarker(value) {
|
|
5542
|
+
if (!isRecord$1(value)) return false;
|
|
5543
|
+
const ref = value["$secret"];
|
|
5544
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5545
|
+
}
|
|
5546
|
+
function isSecretClear(value) {
|
|
5547
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5548
|
+
}
|
|
5549
|
+
/**
|
|
5550
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5551
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5552
|
+
* survives this function.
|
|
5553
|
+
*/
|
|
5554
|
+
function toSecretFieldView(stored) {
|
|
5555
|
+
if (isSecretMarker(stored)) return {
|
|
5556
|
+
$secret: stored.$secret,
|
|
5557
|
+
v: 1,
|
|
5558
|
+
set: true
|
|
5559
|
+
};
|
|
5560
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5561
|
+
$secret: null,
|
|
5562
|
+
v: 1,
|
|
5563
|
+
set: true,
|
|
5564
|
+
inline: true
|
|
5565
|
+
};
|
|
5566
|
+
return null;
|
|
5567
|
+
}
|
|
5568
|
+
/**
|
|
5569
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5570
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5571
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5572
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5573
|
+
*/
|
|
5574
|
+
function classifySecretWrite(incoming) {
|
|
5575
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5576
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5577
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5578
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5579
|
+
return {
|
|
5580
|
+
kind: "set",
|
|
5581
|
+
value: incoming
|
|
5582
|
+
};
|
|
5583
|
+
}
|
|
5495
5584
|
Object.fromEntries([
|
|
5496
5585
|
{
|
|
5497
5586
|
id: "overview",
|
|
@@ -5663,33 +5752,19 @@ Object.fromEntries([
|
|
|
5663
5752
|
function isValuelessField(field) {
|
|
5664
5753
|
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";
|
|
5665
5754
|
}
|
|
5666
|
-
|
|
5667
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5668
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5669
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5670
|
-
*
|
|
5671
|
-
* For each leaf field:
|
|
5672
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5673
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5674
|
-
*
|
|
5675
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5676
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5677
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5678
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5679
|
-
*/
|
|
5680
|
-
function hydrateSchema(schema, values) {
|
|
5755
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5681
5756
|
return {
|
|
5682
5757
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5683
5758
|
sections: schema.sections.map((section) => ({
|
|
5684
5759
|
...section,
|
|
5685
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5760
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5686
5761
|
}))
|
|
5687
5762
|
};
|
|
5688
5763
|
}
|
|
5689
|
-
function hydrateField(field, values) {
|
|
5764
|
+
function hydrateField(field, values, options) {
|
|
5690
5765
|
if (isValuelessField(field)) return field;
|
|
5691
5766
|
if (field.type === "group") {
|
|
5692
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5767
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5693
5768
|
return {
|
|
5694
5769
|
...field,
|
|
5695
5770
|
fields: hydratedChildren
|
|
@@ -5698,7 +5773,7 @@ function hydrateField(field, values) {
|
|
|
5698
5773
|
if (field.type === "sub-tabs") {
|
|
5699
5774
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5700
5775
|
...tab,
|
|
5701
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5776
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5702
5777
|
}));
|
|
5703
5778
|
return {
|
|
5704
5779
|
...field,
|
|
@@ -5708,6 +5783,33 @@ function hydrateField(field, values) {
|
|
|
5708
5783
|
const key = field.key;
|
|
5709
5784
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5710
5785
|
const defaultValue = field.default;
|
|
5786
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5787
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5788
|
+
...field,
|
|
5789
|
+
value: toSecretFieldView(storedValue)
|
|
5790
|
+
};
|
|
5791
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5792
|
+
...field,
|
|
5793
|
+
value: null
|
|
5794
|
+
};
|
|
5795
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5796
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5797
|
+
if (secretItemKeys.length > 0) {
|
|
5798
|
+
const rows = storedValue.map((row) => {
|
|
5799
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5800
|
+
const out = { ...row };
|
|
5801
|
+
for (const k of secretItemKeys) {
|
|
5802
|
+
const v = Reflect.get(row, k);
|
|
5803
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5804
|
+
}
|
|
5805
|
+
return out;
|
|
5806
|
+
});
|
|
5807
|
+
return {
|
|
5808
|
+
...field,
|
|
5809
|
+
value: rows
|
|
5810
|
+
};
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5711
5813
|
if (field.multiple) {
|
|
5712
5814
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5713
5815
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5950,6 +6052,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5950
6052
|
}
|
|
5951
6053
|
return out;
|
|
5952
6054
|
}
|
|
6055
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6056
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6057
|
+
function globalSecretScope() {
|
|
6058
|
+
return GLOBAL_SCOPE;
|
|
6059
|
+
}
|
|
6060
|
+
function encodeSegment(value) {
|
|
6061
|
+
return encodeURIComponent(value);
|
|
6062
|
+
}
|
|
6063
|
+
/**
|
|
6064
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6065
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6066
|
+
* `providers[authentik].clientSecret`.
|
|
6067
|
+
*/
|
|
6068
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6069
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6070
|
+
}
|
|
6071
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6072
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6073
|
+
fieldPath;
|
|
6074
|
+
constructor(fieldPath, cause) {
|
|
6075
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6076
|
+
this.fieldPath = fieldPath;
|
|
6077
|
+
this.name = "KeychainWriteRefusedError";
|
|
6078
|
+
}
|
|
6079
|
+
};
|
|
6080
|
+
var KEEP = { kind: "keep" };
|
|
6081
|
+
function isRecord(value) {
|
|
6082
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6083
|
+
}
|
|
6084
|
+
function defaultMintId() {
|
|
6085
|
+
return globalThis.crypto.randomUUID();
|
|
6086
|
+
}
|
|
6087
|
+
/** Every marker ref anywhere under `value`. */
|
|
6088
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6089
|
+
if (isSecretMarker(value)) {
|
|
6090
|
+
out.push(value.$secret);
|
|
6091
|
+
return out;
|
|
6092
|
+
}
|
|
6093
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6094
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6095
|
+
return out;
|
|
6096
|
+
}
|
|
6097
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6098
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6099
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6100
|
+
}
|
|
6101
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6102
|
+
const intent = classifySecretWrite(incoming);
|
|
6103
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6104
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6105
|
+
if (intent.kind === "keep") return KEEP;
|
|
6106
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6107
|
+
if (intent.kind === "clear") {
|
|
6108
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6109
|
+
return {
|
|
6110
|
+
kind: "value",
|
|
6111
|
+
value: null
|
|
6112
|
+
};
|
|
6113
|
+
}
|
|
6114
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6115
|
+
kind: "value",
|
|
6116
|
+
value: stored
|
|
6117
|
+
};
|
|
6118
|
+
try {
|
|
6119
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6120
|
+
} catch (err) {
|
|
6121
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6122
|
+
}
|
|
6123
|
+
return {
|
|
6124
|
+
kind: "value",
|
|
6125
|
+
value: makeSecretMarker(ref)
|
|
6126
|
+
};
|
|
6127
|
+
}
|
|
6128
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6129
|
+
function applyMember(out, key, result, storedParent) {
|
|
6130
|
+
if (result.kind === "value") {
|
|
6131
|
+
out[key] = result.value;
|
|
6132
|
+
return;
|
|
6133
|
+
}
|
|
6134
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6135
|
+
else delete out[key];
|
|
6136
|
+
}
|
|
6137
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6138
|
+
const out = { ...incoming };
|
|
6139
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6140
|
+
return out;
|
|
6141
|
+
}
|
|
6142
|
+
function rowId(row, idKey) {
|
|
6143
|
+
const raw = row[idKey];
|
|
6144
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6145
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6146
|
+
return null;
|
|
6147
|
+
}
|
|
6148
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6149
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6150
|
+
if (!Array.isArray(incoming)) {
|
|
6151
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6152
|
+
return {
|
|
6153
|
+
kind: "value",
|
|
6154
|
+
value: incoming
|
|
6155
|
+
};
|
|
6156
|
+
}
|
|
6157
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6158
|
+
for (const row of storedRows) {
|
|
6159
|
+
const id = rowId(row, node.idKey);
|
|
6160
|
+
if (id !== null) storedById.set(id, row);
|
|
6161
|
+
}
|
|
6162
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6163
|
+
const rows = [];
|
|
6164
|
+
for (const row of incoming) {
|
|
6165
|
+
if (!isRecord(row)) {
|
|
6166
|
+
rows.push(row);
|
|
6167
|
+
continue;
|
|
6168
|
+
}
|
|
6169
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6170
|
+
kept.add(id);
|
|
6171
|
+
const withId = {
|
|
6172
|
+
...row,
|
|
6173
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6174
|
+
};
|
|
6175
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6176
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6177
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6178
|
+
}
|
|
6179
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6180
|
+
return {
|
|
6181
|
+
kind: "value",
|
|
6182
|
+
value: rows
|
|
6183
|
+
};
|
|
6184
|
+
}
|
|
6185
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6186
|
+
switch (node.kind) {
|
|
6187
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6188
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6189
|
+
case "object": {
|
|
6190
|
+
if (!isRecord(incoming)) {
|
|
6191
|
+
if (incoming === void 0) return KEEP;
|
|
6192
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6193
|
+
return {
|
|
6194
|
+
kind: "value",
|
|
6195
|
+
value: incoming
|
|
6196
|
+
};
|
|
6197
|
+
}
|
|
6198
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6199
|
+
return {
|
|
6200
|
+
kind: "value",
|
|
6201
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6202
|
+
};
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6207
|
+
function splitNodeKey(key) {
|
|
6208
|
+
const at = key.indexOf("@");
|
|
6209
|
+
return at <= 0 ? {
|
|
6210
|
+
base: key,
|
|
6211
|
+
nodeId: null
|
|
6212
|
+
} : {
|
|
6213
|
+
base: key.slice(0, at),
|
|
6214
|
+
nodeId: key.slice(at + 1)
|
|
6215
|
+
};
|
|
6216
|
+
}
|
|
6217
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6218
|
+
async function transformSecretWrite(input) {
|
|
6219
|
+
const deletes = [];
|
|
6220
|
+
const base = {
|
|
6221
|
+
secrets: input.secrets,
|
|
6222
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6223
|
+
deletes,
|
|
6224
|
+
operatorWrite: input.operatorWrite === true
|
|
6225
|
+
};
|
|
6226
|
+
const out = {};
|
|
6227
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6228
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6229
|
+
const node = input.tree.get(baseKey);
|
|
6230
|
+
if (node === void 0) {
|
|
6231
|
+
out[key] = incoming;
|
|
6232
|
+
continue;
|
|
6233
|
+
}
|
|
6234
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6235
|
+
kind: "node",
|
|
6236
|
+
nodeId
|
|
6237
|
+
} : input.scope ?? globalSecretScope();
|
|
6238
|
+
const result = await writeNode({
|
|
6239
|
+
...base,
|
|
6240
|
+
scope
|
|
6241
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6242
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6243
|
+
}
|
|
6244
|
+
return {
|
|
6245
|
+
patch: out,
|
|
6246
|
+
afterWrite: async () => {
|
|
6247
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6248
|
+
try {
|
|
6249
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6250
|
+
return { orphaned: [] };
|
|
6251
|
+
} catch {
|
|
6252
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6253
|
+
}
|
|
6254
|
+
}
|
|
6255
|
+
};
|
|
6256
|
+
}
|
|
6257
|
+
/**
|
|
6258
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6259
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6260
|
+
*/
|
|
6261
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6262
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6263
|
+
if (refs.length === 0) return {
|
|
6264
|
+
value,
|
|
6265
|
+
unresolved: []
|
|
6266
|
+
};
|
|
6267
|
+
const answers = await secrets.resolve(refs);
|
|
6268
|
+
const unresolved = [];
|
|
6269
|
+
for (const ref of new Set(refs)) {
|
|
6270
|
+
const answer = answers[ref];
|
|
6271
|
+
if (answer === void 0) unresolved.push({
|
|
6272
|
+
ref,
|
|
6273
|
+
reason: "not-initialized"
|
|
6274
|
+
});
|
|
6275
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6276
|
+
ref,
|
|
6277
|
+
reason: answer.reason
|
|
6278
|
+
});
|
|
6279
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6280
|
+
ref,
|
|
6281
|
+
reason: answer.kind
|
|
6282
|
+
});
|
|
6283
|
+
}
|
|
6284
|
+
const substitute = (v) => {
|
|
6285
|
+
if (isSecretMarker(v)) {
|
|
6286
|
+
const answer = answers[v.$secret];
|
|
6287
|
+
return answer?.kind === "value" ? {
|
|
6288
|
+
keep: true,
|
|
6289
|
+
value: answer.value
|
|
6290
|
+
} : {
|
|
6291
|
+
keep: false,
|
|
6292
|
+
value: void 0
|
|
6293
|
+
};
|
|
6294
|
+
}
|
|
6295
|
+
if (Array.isArray(v)) {
|
|
6296
|
+
const items = [];
|
|
6297
|
+
for (const item of v) {
|
|
6298
|
+
const s = substitute(item);
|
|
6299
|
+
if (s.keep) items.push(s.value);
|
|
6300
|
+
}
|
|
6301
|
+
return {
|
|
6302
|
+
keep: true,
|
|
6303
|
+
value: items
|
|
6304
|
+
};
|
|
6305
|
+
}
|
|
6306
|
+
if (isRecord(v)) {
|
|
6307
|
+
const out = {};
|
|
6308
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6309
|
+
const s = substitute(child);
|
|
6310
|
+
if (s.keep) out[k] = s.value;
|
|
6311
|
+
}
|
|
6312
|
+
return {
|
|
6313
|
+
keep: true,
|
|
6314
|
+
value: out
|
|
6315
|
+
};
|
|
6316
|
+
}
|
|
6317
|
+
return {
|
|
6318
|
+
keep: true,
|
|
6319
|
+
value: v
|
|
6320
|
+
};
|
|
6321
|
+
};
|
|
6322
|
+
return {
|
|
6323
|
+
value: substitute(value).value,
|
|
6324
|
+
unresolved
|
|
6325
|
+
};
|
|
6326
|
+
}
|
|
6327
|
+
function touchesTree(tree, patch) {
|
|
6328
|
+
if (tree.size === 0) return false;
|
|
6329
|
+
for (const key of Object.keys(patch)) {
|
|
6330
|
+
const at = key.indexOf("@");
|
|
6331
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6332
|
+
}
|
|
6333
|
+
return false;
|
|
6334
|
+
}
|
|
6335
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6336
|
+
async function readStoredAddonBlob(raw) {
|
|
6337
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6338
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6339
|
+
const result = await threeWay.call(raw);
|
|
6340
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6341
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6342
|
+
}
|
|
6343
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6344
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6345
|
+
const serialize = (key, fn) => {
|
|
6346
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6347
|
+
const tail = next.catch(() => void 0);
|
|
6348
|
+
chains.set(key, tail);
|
|
6349
|
+
tail.then(() => {
|
|
6350
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6351
|
+
});
|
|
6352
|
+
return next;
|
|
6353
|
+
};
|
|
6354
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6355
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6356
|
+
return serialize(chainKey, async () => {
|
|
6357
|
+
const stored = await readStored();
|
|
6358
|
+
const result = await transformSecretWrite({
|
|
6359
|
+
tree,
|
|
6360
|
+
secrets: opts.secrets,
|
|
6361
|
+
patch,
|
|
6362
|
+
stored,
|
|
6363
|
+
...scope !== void 0 ? { scope } : {},
|
|
6364
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6365
|
+
});
|
|
6366
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6367
|
+
const { orphaned } = await result.afterWrite();
|
|
6368
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6369
|
+
});
|
|
6370
|
+
};
|
|
6371
|
+
const wrapped = {
|
|
6372
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6373
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6374
|
+
kind: "device",
|
|
6375
|
+
deviceId
|
|
6376
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6377
|
+
};
|
|
6378
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6379
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6380
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6381
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6382
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6383
|
+
} });
|
|
6384
|
+
}
|
|
6385
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6386
|
+
function withSecretAwareSettings(context, opts) {
|
|
6387
|
+
const raw = context.settings;
|
|
6388
|
+
if (raw === void 0) return context;
|
|
6389
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6390
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6391
|
+
if (prop === "settings") return settings;
|
|
6392
|
+
return Reflect.get(target, prop, receiver);
|
|
6393
|
+
} });
|
|
6394
|
+
}
|
|
6395
|
+
var LEAF = { kind: "leaf" };
|
|
6396
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6397
|
+
function collectFields(fields, out) {
|
|
6398
|
+
for (const field of fields) {
|
|
6399
|
+
if (field.type === "group") {
|
|
6400
|
+
collectFields(field.fields, out);
|
|
6401
|
+
continue;
|
|
6402
|
+
}
|
|
6403
|
+
if (field.type === "sub-tabs") {
|
|
6404
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6405
|
+
continue;
|
|
6406
|
+
}
|
|
6407
|
+
if (field.type === "editable-array") {
|
|
6408
|
+
const item = /* @__PURE__ */ new Map();
|
|
6409
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6410
|
+
if (item.size > 0) out.set(field.key, {
|
|
6411
|
+
kind: "array",
|
|
6412
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6413
|
+
item
|
|
6414
|
+
});
|
|
6415
|
+
continue;
|
|
6416
|
+
}
|
|
6417
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6418
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6419
|
+
}
|
|
6420
|
+
}
|
|
6421
|
+
/** The secret tree a settings schema declares. */
|
|
6422
|
+
function secretTreeFromSchema(schema) {
|
|
6423
|
+
const out = /* @__PURE__ */ new Map();
|
|
6424
|
+
if (schema === null) return out;
|
|
6425
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6426
|
+
return out;
|
|
6427
|
+
}
|
|
6428
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6429
|
+
function parseSecretStatePath(path) {
|
|
6430
|
+
const segments = [];
|
|
6431
|
+
for (const raw of path.split(".")) {
|
|
6432
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6433
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6434
|
+
segments.push(m[2] !== void 0 ? {
|
|
6435
|
+
key: m[1],
|
|
6436
|
+
idKey: m[2]
|
|
6437
|
+
} : { key: m[1] });
|
|
6438
|
+
}
|
|
6439
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6440
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6441
|
+
return segments;
|
|
6442
|
+
}
|
|
6443
|
+
function insert(into, segments) {
|
|
6444
|
+
const [head, ...rest] = segments;
|
|
6445
|
+
if (head === void 0) return;
|
|
6446
|
+
if (rest.length === 0) {
|
|
6447
|
+
into.set(head.key, LEAF);
|
|
6448
|
+
return;
|
|
6449
|
+
}
|
|
6450
|
+
const existing = into.get(head.key);
|
|
6451
|
+
if (head.idKey !== void 0) {
|
|
6452
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6453
|
+
insert(item, rest);
|
|
6454
|
+
into.set(head.key, {
|
|
6455
|
+
kind: "array",
|
|
6456
|
+
idKey: head.idKey,
|
|
6457
|
+
item
|
|
6458
|
+
});
|
|
6459
|
+
return;
|
|
6460
|
+
}
|
|
6461
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6462
|
+
insert(children, rest);
|
|
6463
|
+
into.set(head.key, {
|
|
6464
|
+
kind: "object",
|
|
6465
|
+
children
|
|
6466
|
+
});
|
|
6467
|
+
}
|
|
6468
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6469
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6470
|
+
if (paths.length === 0) return tree;
|
|
6471
|
+
const out = new Map(tree);
|
|
6472
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6473
|
+
return out;
|
|
6474
|
+
}
|
|
6475
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6476
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6477
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6478
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6479
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5953
6480
|
/**
|
|
5954
6481
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5955
6482
|
*
|
|
@@ -6019,6 +6546,25 @@ var BaseAddon = class {
|
|
|
6019
6546
|
settingsStoreReady = false;
|
|
6020
6547
|
/** Default config values. Provided via constructor. */
|
|
6021
6548
|
defaults;
|
|
6549
|
+
/**
|
|
6550
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6551
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6552
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6553
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6554
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6555
|
+
*/
|
|
6556
|
+
secretStatePaths = [];
|
|
6557
|
+
_addonSecretTree = null;
|
|
6558
|
+
_deviceSecretTree = null;
|
|
6559
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6560
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6561
|
+
_unresolvedSecrets = [];
|
|
6562
|
+
_secretRetryTimer = null;
|
|
6563
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6564
|
+
_secretChangeTimer = null;
|
|
6565
|
+
_secretChangeUnsub = null;
|
|
6566
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6567
|
+
_operatorWriteDepth = 0;
|
|
6022
6568
|
constructor(defaults) {
|
|
6023
6569
|
this.defaults = defaults;
|
|
6024
6570
|
this._config = { ...defaults };
|
|
@@ -6054,8 +6600,18 @@ var BaseAddon = class {
|
|
|
6054
6600
|
return this._config;
|
|
6055
6601
|
}
|
|
6056
6602
|
async initialize(context) {
|
|
6057
|
-
|
|
6603
|
+
const secrets = context.secrets;
|
|
6604
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6605
|
+
secrets,
|
|
6606
|
+
addonTree: () => this.addonSecretTree(),
|
|
6607
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6608
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6609
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6610
|
+
}) : context;
|
|
6058
6611
|
await this.resolveConfig();
|
|
6612
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6613
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6614
|
+
});
|
|
6059
6615
|
const result = await this.onInitialize();
|
|
6060
6616
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6061
6617
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6088,6 +6644,12 @@ var BaseAddon = class {
|
|
|
6088
6644
|
*/
|
|
6089
6645
|
async onHubReachable() {}
|
|
6090
6646
|
async shutdown() {
|
|
6647
|
+
this._secretChangeUnsub?.();
|
|
6648
|
+
this._secretChangeUnsub = null;
|
|
6649
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6650
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6651
|
+
this._secretRetryTimer = null;
|
|
6652
|
+
this._secretChangeTimer = null;
|
|
6091
6653
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6092
6654
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6093
6655
|
await this.onShutdown();
|
|
@@ -6166,7 +6728,7 @@ var BaseAddon = class {
|
|
|
6166
6728
|
return hydrateSchema(schema, overlay ? {
|
|
6167
6729
|
...projected,
|
|
6168
6730
|
...overlay
|
|
6169
|
-
} : projected);
|
|
6731
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6170
6732
|
}
|
|
6171
6733
|
/**
|
|
6172
6734
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6215,7 +6777,7 @@ var BaseAddon = class {
|
|
|
6215
6777
|
return hydrateSchema({
|
|
6216
6778
|
...schema,
|
|
6217
6779
|
sections
|
|
6218
|
-
}, projected);
|
|
6780
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6219
6781
|
}
|
|
6220
6782
|
/**
|
|
6221
6783
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6269,18 +6831,50 @@ var BaseAddon = class {
|
|
|
6269
6831
|
value: result.value[key]
|
|
6270
6832
|
};
|
|
6271
6833
|
}
|
|
6834
|
+
/**
|
|
6835
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6836
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6837
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6838
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6839
|
+
* writing back what it read is not (D787).
|
|
6840
|
+
*/
|
|
6841
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6842
|
+
this._operatorWriteDepth++;
|
|
6843
|
+
try {
|
|
6844
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6845
|
+
} finally {
|
|
6846
|
+
this._operatorWriteDepth--;
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6272
6849
|
async updateGlobalSettings(patch, nodeId) {
|
|
6850
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6851
|
+
}
|
|
6852
|
+
/**
|
|
6853
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6854
|
+
*
|
|
6855
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6856
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6857
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6858
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6859
|
+
*/
|
|
6860
|
+
async clearSecrets(keys, nodeId) {
|
|
6861
|
+
const tree = this.addonSecretTree();
|
|
6862
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6863
|
+
const patch = {};
|
|
6864
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6865
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6866
|
+
}
|
|
6867
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6273
6868
|
const keys = this.perNodeKeys();
|
|
6274
6869
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6275
6870
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6276
|
-
const barePatch = patch;
|
|
6277
6871
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6278
6872
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6279
6873
|
if (target !== localNode) return;
|
|
6280
6874
|
await this.resolveConfig();
|
|
6281
6875
|
await this.onConfigChanged();
|
|
6282
6876
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6283
|
-
this.maybeAutoRestart(
|
|
6877
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6284
6878
|
}
|
|
6285
6879
|
/**
|
|
6286
6880
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6305,7 +6899,7 @@ var BaseAddon = class {
|
|
|
6305
6899
|
* time to return its response before the addon is torn down and
|
|
6306
6900
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6307
6901
|
*/
|
|
6308
|
-
maybeAutoRestart(
|
|
6902
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6309
6903
|
if (!schema) return;
|
|
6310
6904
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6311
6905
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6313,13 +6907,13 @@ var BaseAddon = class {
|
|
|
6313
6907
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6314
6908
|
}
|
|
6315
6909
|
if (restartKeys.size === 0) return;
|
|
6316
|
-
if (!
|
|
6910
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6317
6911
|
const ctx = this._ctx;
|
|
6318
6912
|
if (!ctx) return;
|
|
6319
6913
|
const addonId = ctx.id;
|
|
6320
6914
|
setImmediate(() => {
|
|
6321
6915
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6322
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6916
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6323
6917
|
}).catch((err) => {
|
|
6324
6918
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6325
6919
|
});
|
|
@@ -6328,7 +6922,7 @@ var BaseAddon = class {
|
|
|
6328
6922
|
async getDeviceSettings(deviceId) {
|
|
6329
6923
|
const schema = this.deviceSettingsSchema();
|
|
6330
6924
|
if (!schema) return { sections: [] };
|
|
6331
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6925
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6332
6926
|
}
|
|
6333
6927
|
async updateDeviceSettings(deviceId, patch) {
|
|
6334
6928
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6458,7 +7052,7 @@ var BaseAddon = class {
|
|
|
6458
7052
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6459
7053
|
*/
|
|
6460
7054
|
async resolveConfig() {
|
|
6461
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7055
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6462
7056
|
const perNode = this.perNodeKeys();
|
|
6463
7057
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6464
7058
|
const resolved = { ...this.defaults };
|
|
@@ -6483,7 +7077,7 @@ var BaseAddon = class {
|
|
|
6483
7077
|
key,
|
|
6484
7078
|
schema,
|
|
6485
7079
|
fallback,
|
|
6486
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7080
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6487
7081
|
write: async (patch) => {
|
|
6488
7082
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6489
7083
|
},
|
|
@@ -6500,7 +7094,7 @@ var BaseAddon = class {
|
|
|
6500
7094
|
key,
|
|
6501
7095
|
schema,
|
|
6502
7096
|
fallback,
|
|
6503
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7097
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6504
7098
|
write: async (patch) => {
|
|
6505
7099
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6506
7100
|
},
|
|
@@ -6512,6 +7106,70 @@ var BaseAddon = class {
|
|
|
6512
7106
|
} })
|
|
6513
7107
|
});
|
|
6514
7108
|
}
|
|
7109
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7110
|
+
addonSecretTree() {
|
|
7111
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7112
|
+
return this._addonSecretTree;
|
|
7113
|
+
}
|
|
7114
|
+
deviceSecretTree() {
|
|
7115
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7116
|
+
return this._deviceSecretTree;
|
|
7117
|
+
}
|
|
7118
|
+
/**
|
|
7119
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7120
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7121
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7122
|
+
* than start on an empty credential.
|
|
7123
|
+
*/
|
|
7124
|
+
get unresolvedSecrets() {
|
|
7125
|
+
return this._unresolvedSecrets;
|
|
7126
|
+
}
|
|
7127
|
+
/**
|
|
7128
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7129
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7130
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7131
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7132
|
+
* ever written back from here.
|
|
7133
|
+
*/
|
|
7134
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7135
|
+
const secrets = this._ctx?.secrets;
|
|
7136
|
+
if (secrets === void 0) return blob;
|
|
7137
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7138
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7139
|
+
if (refs.length === 0) {
|
|
7140
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7141
|
+
return blob;
|
|
7142
|
+
}
|
|
7143
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7144
|
+
if (trackForConfig) {
|
|
7145
|
+
this._unresolvedSecrets = unresolved;
|
|
7146
|
+
if (unresolved.length > 0) {
|
|
7147
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7148
|
+
ref: u.ref,
|
|
7149
|
+
reason: u.reason
|
|
7150
|
+
})) } });
|
|
7151
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7152
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7153
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7154
|
+
}
|
|
7155
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7156
|
+
}
|
|
7157
|
+
return value;
|
|
7158
|
+
}
|
|
7159
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7160
|
+
scheduleSecretReresolve(delayMs) {
|
|
7161
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7162
|
+
if (this[timerOf] !== null) return;
|
|
7163
|
+
const timer = setTimeout(() => {
|
|
7164
|
+
this[timerOf] = null;
|
|
7165
|
+
if (this._ctx === null) return;
|
|
7166
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7167
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7168
|
+
});
|
|
7169
|
+
}, delayMs);
|
|
7170
|
+
timer.unref?.();
|
|
7171
|
+
this[timerOf] = timer;
|
|
7172
|
+
}
|
|
6515
7173
|
/**
|
|
6516
7174
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6517
7175
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6779,32 +7437,12 @@ object({
|
|
|
6779
7437
|
audioCodec: string().optional(),
|
|
6780
7438
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6781
7439
|
});
|
|
6782
|
-
var EncodedPacketSchema = object({
|
|
6783
|
-
type: _enum(["video", "audio"]),
|
|
6784
|
-
data: _instanceof(Uint8Array),
|
|
6785
|
-
pts: number(),
|
|
6786
|
-
dts: number(),
|
|
6787
|
-
keyframe: boolean(),
|
|
6788
|
-
codec: string()
|
|
6789
|
-
});
|
|
6790
|
-
var DecodedFrameSchema = object({
|
|
6791
|
-
data: _instanceof(Uint8Array),
|
|
6792
|
-
width: number(),
|
|
6793
|
-
height: number(),
|
|
6794
|
-
format: _enum([
|
|
6795
|
-
"jpeg",
|
|
6796
|
-
"rgb",
|
|
6797
|
-
"bgr",
|
|
6798
|
-
"yuv420",
|
|
6799
|
-
"gray"
|
|
6800
|
-
]),
|
|
6801
|
-
timestamp: number()
|
|
6802
|
-
});
|
|
6803
7440
|
/**
|
|
6804
7441
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6805
7442
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6806
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6807
|
-
*
|
|
7443
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7444
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7445
|
+
* over tRPC / Moleculer.
|
|
6808
7446
|
*
|
|
6809
7447
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6810
7448
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6830,50 +7468,6 @@ var FrameHandleSchema = object({
|
|
|
6830
7468
|
slotCount: number().int().positive()
|
|
6831
7469
|
});
|
|
6832
7470
|
/**
|
|
6833
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6834
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6835
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6836
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6837
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6838
|
-
*/
|
|
6839
|
-
var FrameHandleFormatSchema = _enum([
|
|
6840
|
-
"rgb",
|
|
6841
|
-
"bgr",
|
|
6842
|
-
"yuv420",
|
|
6843
|
-
"gray"
|
|
6844
|
-
]);
|
|
6845
|
-
/**
|
|
6846
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6847
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6848
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6849
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6850
|
-
* they asked for with no broker-side conversion.
|
|
6851
|
-
*/
|
|
6852
|
-
var SubscribeFramesInputSchema = object({
|
|
6853
|
-
brokerId: string(),
|
|
6854
|
-
format: FrameHandleFormatSchema,
|
|
6855
|
-
/**
|
|
6856
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6857
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6858
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6859
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6860
|
-
*/
|
|
6861
|
-
maxFps: number().positive().optional(),
|
|
6862
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6863
|
-
tag: string().optional()
|
|
6864
|
-
});
|
|
6865
|
-
/**
|
|
6866
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6867
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6868
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6869
|
-
*/
|
|
6870
|
-
var SubscribeFramesResultSchema = object({
|
|
6871
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6872
|
-
subscriptionId: string(),
|
|
6873
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6874
|
-
maxFps: number().nonnegative()
|
|
6875
|
-
});
|
|
6876
|
-
/**
|
|
6877
7471
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6878
7472
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6879
7473
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6881,8 +7475,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6881
7475
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6882
7476
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6883
7477
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6884
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6885
|
-
*
|
|
7478
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7479
|
+
* it.
|
|
6886
7480
|
*/
|
|
6887
7481
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6888
7482
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6900,11 +7494,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6900
7494
|
format: AudioChunkFormatSchema.optional()
|
|
6901
7495
|
});
|
|
6902
7496
|
/**
|
|
6903
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6904
|
-
*
|
|
6905
|
-
*
|
|
6906
|
-
*
|
|
6907
|
-
* `pullAudioChunks`.
|
|
7497
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7498
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7499
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7500
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6908
7501
|
*/
|
|
6909
7502
|
var SubscribeAudioChunksInputSchema = object({
|
|
6910
7503
|
brokerId: string(),
|
|
@@ -6935,9 +7528,7 @@ var BrokerStatsSchema = object({
|
|
|
6935
7528
|
"stopped"
|
|
6936
7529
|
]),
|
|
6937
7530
|
inputFps: number(),
|
|
6938
|
-
decodeFps: number(),
|
|
6939
7531
|
encodedSubscribers: number(),
|
|
6940
|
-
decodedSubscribers: number(),
|
|
6941
7532
|
uptimeMs: number(),
|
|
6942
7533
|
bitrateKbps: number(),
|
|
6943
7534
|
idrIntervalMs: number(),
|
|
@@ -6950,14 +7541,6 @@ var BrokerStatsSchema = object({
|
|
|
6950
7541
|
preBufferMs: number(),
|
|
6951
7542
|
preBufferPackets: number(),
|
|
6952
7543
|
/**
|
|
6953
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6954
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6955
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6956
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6957
|
-
* a separate cap call per broker.
|
|
6958
|
-
*/
|
|
6959
|
-
decoderNodeId: string().nullable(),
|
|
6960
|
-
/**
|
|
6961
7544
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6962
7545
|
* when the stream has no audio track or the broker is in cold start.
|
|
6963
7546
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7174,6 +7757,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7174
7757
|
kind: "mutation",
|
|
7175
7758
|
auth: "admin"
|
|
7176
7759
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7760
|
+
function defOf(schema) {
|
|
7761
|
+
return schema._zod?.def ?? {};
|
|
7762
|
+
}
|
|
7763
|
+
function declaredHere(schema) {
|
|
7764
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7765
|
+
}
|
|
7766
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7767
|
+
var WRAPPERS = new Set([
|
|
7768
|
+
"optional",
|
|
7769
|
+
"nullable",
|
|
7770
|
+
"default",
|
|
7771
|
+
"prefault",
|
|
7772
|
+
"catch",
|
|
7773
|
+
"readonly",
|
|
7774
|
+
"nonoptional"
|
|
7775
|
+
]);
|
|
7776
|
+
/**
|
|
7777
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7778
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7779
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7780
|
+
* `.transform` on `in`).
|
|
7781
|
+
*/
|
|
7782
|
+
function layersOf(schema) {
|
|
7783
|
+
const out = [];
|
|
7784
|
+
const queue = [schema];
|
|
7785
|
+
while (queue.length > 0) {
|
|
7786
|
+
const s = queue.shift();
|
|
7787
|
+
if (!s || out.includes(s)) continue;
|
|
7788
|
+
out.push(s);
|
|
7789
|
+
const def = defOf(s);
|
|
7790
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7791
|
+
if (def.type === "pipe") {
|
|
7792
|
+
if (def.in) queue.push(def.in);
|
|
7793
|
+
if (def.out) queue.push(def.out);
|
|
7794
|
+
}
|
|
7795
|
+
}
|
|
7796
|
+
return out;
|
|
7797
|
+
}
|
|
7798
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7799
|
+
function isZodSecret(schema) {
|
|
7800
|
+
return layersOf(schema).some(declaredHere);
|
|
7801
|
+
}
|
|
7802
|
+
/**
|
|
7803
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7804
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7805
|
+
* object or array is reported as one path and not descended into — everything
|
|
7806
|
+
* under it is secret.
|
|
7807
|
+
*/
|
|
7808
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7809
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7810
|
+
const paths = [];
|
|
7811
|
+
for (const layer of layersOf(schema)) {
|
|
7812
|
+
const def = defOf(layer);
|
|
7813
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7814
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7815
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7816
|
+
else if (def.type === "intersection") {
|
|
7817
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7818
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7819
|
+
}
|
|
7820
|
+
}
|
|
7821
|
+
return [...new Set(paths)];
|
|
7822
|
+
}
|
|
7177
7823
|
//#endregion
|
|
7178
7824
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7179
7825
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -10315,70 +10961,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10315
10961
|
"backup"
|
|
10316
10962
|
]).optional()
|
|
10317
10963
|
});
|
|
10318
|
-
var DecoderStatsSchema = object({
|
|
10319
|
-
inputFps: number(),
|
|
10320
|
-
outputFps: number(),
|
|
10321
|
-
avgDecodeTimeMs: number(),
|
|
10322
|
-
droppedFrames: number(),
|
|
10323
|
-
/**
|
|
10324
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10325
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10326
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10327
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10328
|
-
*/
|
|
10329
|
-
lagMs: number().optional(),
|
|
10330
|
-
effectiveFps: number().optional(),
|
|
10331
|
-
adaptiveFps: number().optional()
|
|
10332
|
-
});
|
|
10333
|
-
var DecoderSessionConfigSchema = object({
|
|
10334
|
-
codec: string(),
|
|
10335
|
-
maxFps: number().default(0),
|
|
10336
|
-
outputFormat: _enum([
|
|
10337
|
-
"jpeg",
|
|
10338
|
-
"rgb",
|
|
10339
|
-
"bgr",
|
|
10340
|
-
"yuv420",
|
|
10341
|
-
"gray"
|
|
10342
|
-
]).default("jpeg"),
|
|
10343
|
-
scale: number().default(1),
|
|
10344
|
-
width: number().optional(),
|
|
10345
|
-
height: number().optional(),
|
|
10346
|
-
/**
|
|
10347
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10348
|
-
* because the cap is generic (any caller could request decode), but
|
|
10349
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10350
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10351
|
-
* sendPacket errors on a single hung camera).
|
|
10352
|
-
*/
|
|
10353
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10354
|
-
/**
|
|
10355
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10356
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10357
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10358
|
-
* profile cleanly.
|
|
10359
|
-
*/
|
|
10360
|
-
tag: string().optional(),
|
|
10361
|
-
/**
|
|
10362
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10363
|
-
*
|
|
10364
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10365
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10366
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10367
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10368
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10369
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10370
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10371
|
-
*/
|
|
10372
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10373
|
-
/**
|
|
10374
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10375
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10376
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10377
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10378
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10379
|
-
*/
|
|
10380
|
-
debug: boolean().optional()
|
|
10381
|
-
});
|
|
10382
10964
|
var EU_DST = {
|
|
10383
10965
|
offsetHours: 1,
|
|
10384
10966
|
startMonth: 3,
|
|
@@ -10810,7 +11392,18 @@ var LABEL_SUPPLY_STEP_IDS = [
|
|
|
10810
11392
|
];
|
|
10811
11393
|
/** Steps whose box a root detection can BE. */
|
|
10812
11394
|
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
10813
|
-
|
|
11395
|
+
/**
|
|
11396
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11397
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11398
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11399
|
+
* no camera tree carries.)
|
|
11400
|
+
*/
|
|
11401
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11402
|
+
[
|
|
11403
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11404
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11405
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11406
|
+
];
|
|
10814
11407
|
var MODEL_FORMATS = [
|
|
10815
11408
|
"onnx",
|
|
10816
11409
|
"coreml",
|
|
@@ -10839,7 +11432,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10839
11432
|
/** Multi-file payload (directory members or sibling files). */
|
|
10840
11433
|
files: array(string()).readonly().optional(),
|
|
10841
11434
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10842
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11435
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11436
|
+
/**
|
|
11437
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11438
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11439
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11440
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11441
|
+
* node records the revision it downloaded next to the file
|
|
11442
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11443
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11444
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11445
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11446
|
+
*/
|
|
11447
|
+
revision: string().min(1).optional()
|
|
11448
|
+
});
|
|
11449
|
+
/**
|
|
11450
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11451
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11452
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11453
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11454
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11455
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11456
|
+
*/
|
|
11457
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11458
|
+
"current",
|
|
11459
|
+
"stale",
|
|
11460
|
+
"missing"
|
|
11461
|
+
]);
|
|
11462
|
+
/**
|
|
11463
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11464
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11465
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11466
|
+
*/
|
|
11467
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11468
|
+
"fp32",
|
|
11469
|
+
"fp16",
|
|
11470
|
+
"int8"
|
|
11471
|
+
]);
|
|
11472
|
+
/**
|
|
11473
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11474
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11475
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11476
|
+
*/
|
|
11477
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11478
|
+
downloaded: boolean(),
|
|
11479
|
+
sizeMB: number(),
|
|
11480
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11481
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10843
11482
|
});
|
|
10844
11483
|
/**
|
|
10845
11484
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10953,25 +11592,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10953
11592
|
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
10954
11593
|
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
10955
11594
|
* child of the `parentMacro` detection that contains it — never a track.
|
|
11595
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11596
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11597
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11598
|
+
* postprocessor on read, never stored by an import.
|
|
10956
11599
|
*/
|
|
10957
|
-
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
11600
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11601
|
+
object({
|
|
11602
|
+
kind: literal("label"),
|
|
11603
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11604
|
+
labelToEffect: record(string(), string()),
|
|
11605
|
+
uncovered: array(string()).readonly()
|
|
11606
|
+
}),
|
|
11607
|
+
object({
|
|
11608
|
+
kind: literal("crop"),
|
|
11609
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11610
|
+
rootLabels: array(string()).readonly(),
|
|
11611
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11612
|
+
childClass: _enum(["plate", "face"]),
|
|
11613
|
+
/**
|
|
11614
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11615
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11616
|
+
* stored by an import.
|
|
11617
|
+
*/
|
|
11618
|
+
rootInputPx: number().int().positive().optional()
|
|
11619
|
+
}),
|
|
11620
|
+
object({
|
|
11621
|
+
kind: literal("mask"),
|
|
11622
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11623
|
+
})
|
|
11624
|
+
]);
|
|
10975
11625
|
var ModelCatalogEntrySchema = object({
|
|
10976
11626
|
id: string(),
|
|
10977
11627
|
name: string(),
|
|
@@ -11037,6 +11687,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
11037
11687
|
*/
|
|
11038
11688
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
11039
11689
|
/**
|
|
11690
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11691
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11692
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11693
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11694
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11695
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11696
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11697
|
+
*/
|
|
11698
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11699
|
+
/**
|
|
11700
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11701
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11702
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11703
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11704
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11705
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11706
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11707
|
+
*/
|
|
11708
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11709
|
+
/**
|
|
11710
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11711
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11712
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11713
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11714
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11715
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11716
|
+
*/
|
|
11717
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11718
|
+
/**
|
|
11040
11719
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
11041
11720
|
* onto the canonical template) before this step runs, instead of a plain
|
|
11042
11721
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -12709,13 +13388,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12709
13388
|
lastRtpAt: number(),
|
|
12710
13389
|
bytesSent: number()
|
|
12711
13390
|
});
|
|
12712
|
-
var BrokerDecodedClientSchema = object({
|
|
12713
|
-
tag: string(),
|
|
12714
|
-
subscribedAt: number(),
|
|
12715
|
-
maxFps: number(),
|
|
12716
|
-
framesDelivered: number(),
|
|
12717
|
-
framesDropped: number()
|
|
12718
|
-
});
|
|
12719
13391
|
var BrokerAudioClientSchema = object({
|
|
12720
13392
|
tag: string(),
|
|
12721
13393
|
subscribedAt: number(),
|
|
@@ -12807,7 +13479,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12807
13479
|
});
|
|
12808
13480
|
var BrokerClientsSchema = object({
|
|
12809
13481
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12810
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12811
13482
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12812
13483
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12813
13484
|
pipeClients: number(),
|
|
@@ -13176,11 +13847,7 @@ method(object({
|
|
|
13176
13847
|
auth: "admin"
|
|
13177
13848
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
13178
13849
|
brokerId: string(),
|
|
13179
|
-
channel: _enum([
|
|
13180
|
-
"rtsp",
|
|
13181
|
-
"decoded",
|
|
13182
|
-
"audio"
|
|
13183
|
-
]),
|
|
13850
|
+
channel: _enum(["rtsp", "audio"]),
|
|
13184
13851
|
handle: string()
|
|
13185
13852
|
}), object({ killed: boolean() }), {
|
|
13186
13853
|
kind: "mutation",
|
|
@@ -13215,10 +13882,7 @@ method(object({
|
|
|
13215
13882
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
13216
13883
|
subscriptionId: string(),
|
|
13217
13884
|
maxCount: number().int().positive().default(8)
|
|
13218
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
13219
|
-
subscriptionId: string(),
|
|
13220
|
-
maxCount: number().int().positive().default(4)
|
|
13221
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13885
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13222
13886
|
brokerId: string(),
|
|
13223
13887
|
seconds: number().min(0).max(30)
|
|
13224
13888
|
}), _void(), {
|
|
@@ -14478,53 +15142,201 @@ id: union([string(), number()]) }), {
|
|
|
14478
15142
|
auth: "admin"
|
|
14479
15143
|
});
|
|
14480
15144
|
/**
|
|
14481
|
-
*
|
|
14482
|
-
*
|
|
14483
|
-
*
|
|
15145
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
15146
|
+
*
|
|
15147
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
15148
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
15149
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
15150
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
15151
|
+
* against the CALLER, never against anything the caller claims.
|
|
15152
|
+
*
|
|
15153
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
15154
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
15155
|
+
* connection, the agent from its child's connection carried in
|
|
15156
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
15157
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
15158
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
15159
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
15160
|
+
* runner is the same OS user): see the threat model in
|
|
15161
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
15162
|
+
*
|
|
15163
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
15164
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
15165
|
+
* floors every method to admin anyway (D240).
|
|
15166
|
+
*
|
|
15167
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
15168
|
+
*/
|
|
15169
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
15170
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
15171
|
+
"key-missing",
|
|
15172
|
+
"wrong-key",
|
|
15173
|
+
"key-file-unreadable",
|
|
15174
|
+
"store-unavailable",
|
|
15175
|
+
"not-initialized",
|
|
15176
|
+
"decrypt-failed"
|
|
15177
|
+
]);
|
|
15178
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
15179
|
+
state: literal("locked"),
|
|
15180
|
+
reason: KeychainUnavailableReasonSchema
|
|
15181
|
+
})]);
|
|
15182
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
15183
|
+
object({
|
|
15184
|
+
kind: literal("value"),
|
|
15185
|
+
value: string(),
|
|
15186
|
+
version: number().int()
|
|
15187
|
+
}),
|
|
15188
|
+
object({ kind: literal("missing") }),
|
|
15189
|
+
object({
|
|
15190
|
+
kind: literal("unavailable"),
|
|
15191
|
+
reason: KeychainUnavailableReasonSchema
|
|
15192
|
+
}),
|
|
15193
|
+
object({ kind: literal("forbidden") })
|
|
15194
|
+
]);
|
|
15195
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
15196
|
+
/** Metadata of one stored value — never the value. */
|
|
15197
|
+
var KeychainSecretMetaSchema = object({
|
|
15198
|
+
ref: string(),
|
|
15199
|
+
owner: string(),
|
|
15200
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
15201
|
+
scope: string(),
|
|
15202
|
+
fieldPath: string(),
|
|
15203
|
+
version: number().int(),
|
|
15204
|
+
createdAt: number(),
|
|
15205
|
+
updatedAt: number(),
|
|
15206
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15207
|
+
updatedBy: string(),
|
|
15208
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
15209
|
+
lastReadAt: number().nullable()
|
|
15210
|
+
});
|
|
15211
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
15212
|
+
method(object({
|
|
15213
|
+
ref: string().min(1),
|
|
15214
|
+
value: string().min(1)
|
|
15215
|
+
}), object({
|
|
15216
|
+
ref: string(),
|
|
15217
|
+
version: number().int()
|
|
15218
|
+
}), {
|
|
15219
|
+
kind: "mutation",
|
|
15220
|
+
auth: "admin"
|
|
15221
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
15222
|
+
kind: "mutation",
|
|
15223
|
+
auth: "admin"
|
|
15224
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15225
|
+
var KeychainKeySourceSchema = object({
|
|
15226
|
+
kind: _enum([
|
|
15227
|
+
"config-file",
|
|
15228
|
+
"previous-config-file",
|
|
15229
|
+
"platform",
|
|
15230
|
+
"default-file"
|
|
15231
|
+
]),
|
|
15232
|
+
/** File sources only — a path is not a secret. */
|
|
15233
|
+
path: string().optional(),
|
|
15234
|
+
/**
|
|
15235
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
15236
|
+
* next to the database it protects (the default file). The page warns.
|
|
15237
|
+
*/
|
|
15238
|
+
sharesBackupWithDatabase: boolean()
|
|
15239
|
+
});
|
|
15240
|
+
var KeychainStatusSchema = object({
|
|
15241
|
+
keychain: KeychainStateSchema,
|
|
15242
|
+
/** The source of the master key in use; `null` while locked. */
|
|
15243
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
15244
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
15245
|
+
configuredSource: KeychainKeySourceSchema,
|
|
15246
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
15247
|
+
fingerprint: string().nullable(),
|
|
15248
|
+
activeKeyId: string().nullable(),
|
|
15249
|
+
/**
|
|
15250
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
15251
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
15252
|
+
*/
|
|
15253
|
+
rotationPending: boolean(),
|
|
15254
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15255
|
+
retiredWraps: number().int(),
|
|
15256
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
15257
|
+
secretCount: number().int()
|
|
15258
|
+
});
|
|
15259
|
+
/**
|
|
15260
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
15261
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
15262
|
+
* never reported as an orphan (and never deleted as one).
|
|
14484
15263
|
*/
|
|
14485
|
-
var
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
15264
|
+
var KeychainSecretUsageSchema = _enum([
|
|
15265
|
+
"in-use",
|
|
15266
|
+
"orphan",
|
|
15267
|
+
"unknown"
|
|
15268
|
+
]);
|
|
15269
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
15270
|
+
var KeychainAuditActionSchema = _enum([
|
|
15271
|
+
"put",
|
|
15272
|
+
"delete",
|
|
15273
|
+
"reveal",
|
|
15274
|
+
"rotate-master-key",
|
|
15275
|
+
"purge-retired-keys",
|
|
15276
|
+
"download-recovery-key",
|
|
15277
|
+
"delete-orphans",
|
|
15278
|
+
"reset",
|
|
15279
|
+
"initialize"
|
|
15280
|
+
]);
|
|
15281
|
+
var KeychainAuditEntrySchema = object({
|
|
15282
|
+
id: string(),
|
|
15283
|
+
at: number(),
|
|
15284
|
+
action: KeychainAuditActionSchema,
|
|
15285
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15286
|
+
actor: string(),
|
|
15287
|
+
ref: string().nullable(),
|
|
15288
|
+
detail: string().nullable()
|
|
15289
|
+
});
|
|
15290
|
+
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({
|
|
15291
|
+
value: string(),
|
|
15292
|
+
version: number().int()
|
|
15293
|
+
}), {
|
|
15294
|
+
kind: "mutation",
|
|
15295
|
+
auth: "admin",
|
|
15296
|
+
caller: "required"
|
|
15297
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15298
|
+
deleted: array(string()).readonly(),
|
|
15299
|
+
kept: array(object({
|
|
15300
|
+
ref: string(),
|
|
15301
|
+
usage: KeychainSecretUsageSchema
|
|
15302
|
+
})).readonly()
|
|
15303
|
+
}), {
|
|
15304
|
+
kind: "mutation",
|
|
15305
|
+
auth: "admin",
|
|
15306
|
+
caller: "required"
|
|
15307
|
+
}), method(object({}), object({
|
|
15308
|
+
fingerprint: string(),
|
|
15309
|
+
keySource: KeychainKeySourceSchema
|
|
15310
|
+
}), {
|
|
15311
|
+
kind: "mutation",
|
|
15312
|
+
auth: "admin",
|
|
15313
|
+
caller: "required"
|
|
15314
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15315
|
+
kind: "mutation",
|
|
15316
|
+
auth: "admin",
|
|
15317
|
+
caller: "required"
|
|
15318
|
+
}), method(object({}), object({
|
|
15319
|
+
key: string(),
|
|
15320
|
+
fingerprint: string(),
|
|
15321
|
+
keySource: KeychainKeySourceSchema
|
|
15322
|
+
}), {
|
|
15323
|
+
kind: "mutation",
|
|
15324
|
+
auth: "admin",
|
|
15325
|
+
caller: "required"
|
|
15326
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15327
|
+
archivedCollection: string().nullable(),
|
|
15328
|
+
archived: number().int()
|
|
15329
|
+
}), {
|
|
15330
|
+
kind: "mutation",
|
|
15331
|
+
auth: "admin",
|
|
15332
|
+
caller: "required"
|
|
15333
|
+
});
|
|
15334
|
+
method(_void(), object({
|
|
14496
15335
|
id: string(),
|
|
14497
15336
|
name: string(),
|
|
14498
|
-
isPullMode: boolean().optional(),
|
|
14499
|
-
priority: number().optional(),
|
|
14500
15337
|
hwaccel: string().optional(),
|
|
14501
15338
|
probedBestHwaccel: string().optional()
|
|
14502
|
-
})), method(
|
|
14503
|
-
sessionId: string(),
|
|
14504
|
-
nodeId: string()
|
|
14505
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14506
|
-
sessionId: string(),
|
|
14507
|
-
packet: EncodedPacketSchema
|
|
14508
|
-
}), _void()), method(object({
|
|
14509
|
-
sessionId: string(),
|
|
14510
|
-
url: string()
|
|
14511
|
-
}), _void()), method(object({
|
|
14512
|
-
sessionId: string(),
|
|
14513
|
-
maxCount: number().default(1),
|
|
14514
|
-
waitMs: number().optional()
|
|
14515
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14516
|
-
sessionId: string(),
|
|
14517
|
-
maxCount: number().default(1),
|
|
14518
|
-
waitMs: number().optional()
|
|
14519
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14520
|
-
sessionId: string(),
|
|
14521
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14522
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14523
|
-
sessionId: string(),
|
|
14524
|
-
codec: string(),
|
|
14525
|
-
outputFormat: string(),
|
|
14526
|
-
createdAtMs: number()
|
|
14527
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15339
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14528
15340
|
kind: "mutation",
|
|
14529
15341
|
auth: "admin"
|
|
14530
15342
|
});
|
|
@@ -15637,6 +16449,10 @@ var DeviceInfoSchema = object({
|
|
|
15637
16449
|
isCamera: boolean(),
|
|
15638
16450
|
/** Current config values — serializable snapshot */
|
|
15639
16451
|
config: record(string(), unknown()),
|
|
16452
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16453
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16454
|
+
* when the owning runner has not reported them. */
|
|
16455
|
+
secretConfigPaths: array(string()).optional(),
|
|
15640
16456
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15641
16457
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15642
16458
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15842,12 +16658,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15842
16658
|
* call (workers re-register on init), so probe-driven updates
|
|
15843
16659
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15844
16660
|
features: array(string()).optional(),
|
|
15845
|
-
config: record(string(), unknown())
|
|
16661
|
+
config: record(string(), unknown()),
|
|
16662
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16663
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16664
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16665
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16666
|
+
* omits it and the keyword backstop applies. */
|
|
16667
|
+
secretConfigPaths: array(string()).optional()
|
|
15846
16668
|
});
|
|
15847
16669
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15848
16670
|
var DevicePersistConfigPayloadSchema = object({
|
|
15849
16671
|
deviceId: number(),
|
|
15850
|
-
data: record(string(), unknown())
|
|
16672
|
+
data: record(string(), unknown()),
|
|
16673
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16674
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16675
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16676
|
+
secretConfigPaths: array(string()).optional()
|
|
15851
16677
|
});
|
|
15852
16678
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15853
16679
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -17520,7 +18346,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17520
18346
|
icon: string().optional(),
|
|
17521
18347
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17522
18348
|
startUrl: string(),
|
|
17523
|
-
stage: LoginStageEnum
|
|
18349
|
+
stage: LoginStageEnum,
|
|
18350
|
+
/**
|
|
18351
|
+
* The provider names an external identity a signed-in user can link to
|
|
18352
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
18353
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
18354
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
18355
|
+
*/
|
|
18356
|
+
linkable: boolean().optional()
|
|
17524
18357
|
}),
|
|
17525
18358
|
object({
|
|
17526
18359
|
kind: literal("widget"),
|
|
@@ -21902,8 +22735,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21902
22735
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21903
22736
|
stepId: "face-embedding",
|
|
21904
22737
|
key: "minLandmarkFaceSize",
|
|
21905
|
-
label: "Min face size
|
|
21906
|
-
description: "
|
|
22738
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22739
|
+
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.",
|
|
21907
22740
|
type: "slider",
|
|
21908
22741
|
min: 0,
|
|
21909
22742
|
max: 64,
|
|
@@ -22876,8 +23709,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22876
23709
|
]);
|
|
22877
23710
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22878
23711
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22879
|
-
/**
|
|
22880
|
-
|
|
23712
|
+
/**
|
|
23713
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23714
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23715
|
+
*
|
|
23716
|
+
* - `operator` — drawn by hand.
|
|
23717
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23718
|
+
* model, or a larger teacher model).
|
|
23719
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23720
|
+
* back from the track store (never a re-run).
|
|
23721
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23722
|
+
*/
|
|
23723
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23724
|
+
"operator",
|
|
23725
|
+
"assist",
|
|
23726
|
+
"pipeline",
|
|
23727
|
+
"llm"
|
|
23728
|
+
]);
|
|
22881
23729
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22882
23730
|
var RetrainBboxSchema = object({
|
|
22883
23731
|
x: number(),
|
|
@@ -22895,7 +23743,8 @@ var RetrainBboxSchema = object({
|
|
|
22895
23743
|
*/
|
|
22896
23744
|
var RetrainAnnotationSchema = object({
|
|
22897
23745
|
id: string(),
|
|
22898
|
-
|
|
23746
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23747
|
+
trackId: string().optional(),
|
|
22899
23748
|
deviceId: number(),
|
|
22900
23749
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22901
23750
|
mediaKey: string(),
|
|
@@ -22944,18 +23793,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22944
23793
|
* fail, whatever became of the original. */
|
|
22945
23794
|
copied: boolean()
|
|
22946
23795
|
});
|
|
23796
|
+
/**
|
|
23797
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23798
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23799
|
+
* box recorded on the source media row when there is one, else the track
|
|
23800
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23801
|
+
* until the operator confirms it.
|
|
23802
|
+
*/
|
|
23803
|
+
var RetrainPipelineBoxSchema = object({
|
|
23804
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23805
|
+
bbox: RetrainBboxSchema,
|
|
23806
|
+
macroClass: RetrainMacroClassSchema,
|
|
23807
|
+
label: string().optional(),
|
|
23808
|
+
subLabel: string().optional(),
|
|
23809
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23810
|
+
score: number().optional(),
|
|
23811
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23812
|
+
modelId: string().optional(),
|
|
23813
|
+
trackId: string(),
|
|
23814
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23815
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23816
|
+
basis: _enum(["subject-box", "position"]),
|
|
23817
|
+
deltaMs: number()
|
|
23818
|
+
});
|
|
23819
|
+
/**
|
|
23820
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23821
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23822
|
+
* track at all.
|
|
23823
|
+
*/
|
|
23824
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22947
23825
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22948
23826
|
var RetrainFrameSchema = object({
|
|
22949
23827
|
frameId: string(),
|
|
22950
23828
|
deviceId: number(),
|
|
22951
|
-
|
|
22952
|
-
/**
|
|
22953
|
-
|
|
23829
|
+
origin: RetrainFrameOriginSchema,
|
|
23830
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23831
|
+
trackId: string().optional(),
|
|
23832
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23833
|
+
* Absent on a recording still. */
|
|
23834
|
+
sourceMediaId: number().int().optional(),
|
|
23835
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23836
|
+
epochMs: number().optional(),
|
|
22954
23837
|
sourceKind: MediaFileKindEnum,
|
|
22955
23838
|
sizeBytes: number().int(),
|
|
22956
23839
|
width: number().int(),
|
|
22957
23840
|
height: number().int(),
|
|
22958
|
-
copiedAt: number()
|
|
23841
|
+
copiedAt: number(),
|
|
23842
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23843
|
+
capturedAt: number().optional(),
|
|
23844
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23845
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23846
|
+
* a false positive. */
|
|
23847
|
+
complete: boolean(),
|
|
23848
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23849
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23850
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23851
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23852
|
+
collectionIds: array(string()).readonly().optional()
|
|
22959
23853
|
});
|
|
22960
23854
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22961
23855
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22976,6 +23870,53 @@ var RetrainFrameListSchema = object({
|
|
|
22976
23870
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22977
23871
|
autoPickMediaId: number().int().optional()
|
|
22978
23872
|
});
|
|
23873
|
+
/**
|
|
23874
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23875
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23876
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23877
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23878
|
+
* export carried (`exportedInBatch`).
|
|
23879
|
+
*/
|
|
23880
|
+
var RetrainExportFilterSchema = object({
|
|
23881
|
+
deviceIds: array(number()).optional(),
|
|
23882
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23883
|
+
/** Only frames in at least one of these named collections. */
|
|
23884
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23885
|
+
batchId: string().optional(),
|
|
23886
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23887
|
+
completeOnly: boolean().optional()
|
|
23888
|
+
});
|
|
23889
|
+
/**
|
|
23890
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23891
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23892
|
+
* convention — the classifier layout.
|
|
23893
|
+
*/
|
|
23894
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23895
|
+
/**
|
|
23896
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23897
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23898
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23899
|
+
* logged.
|
|
23900
|
+
*/
|
|
23901
|
+
var RetrainArchiveTargetSchema = object({
|
|
23902
|
+
kind: literal("http"),
|
|
23903
|
+
method: _enum(["PUT", "POST"]),
|
|
23904
|
+
url: string().url(),
|
|
23905
|
+
headers: record(string(), string()).optional()
|
|
23906
|
+
});
|
|
23907
|
+
var RetrainArchiveResultSchema = object({
|
|
23908
|
+
batchId: string(),
|
|
23909
|
+
frames: number().int(),
|
|
23910
|
+
crops: number().int(),
|
|
23911
|
+
annotations: number().int(),
|
|
23912
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23913
|
+
missing: number().int(),
|
|
23914
|
+
bytes: number().int(),
|
|
23915
|
+
/** sha256 of the exact bytes sent. */
|
|
23916
|
+
sha256: string(),
|
|
23917
|
+
/** The target's HTTP status. */
|
|
23918
|
+
status: number().int()
|
|
23919
|
+
});
|
|
22979
23920
|
/** What the operator asked the assist to look for. */
|
|
22980
23921
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22981
23922
|
kind: literal("package"),
|
|
@@ -23005,6 +23946,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
23005
23946
|
reason: string(),
|
|
23006
23947
|
detail: string().optional()
|
|
23007
23948
|
})]);
|
|
23949
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23950
|
+
var RetrainCollectionSchema = object({
|
|
23951
|
+
id: string(),
|
|
23952
|
+
name: string(),
|
|
23953
|
+
createdAt: number(),
|
|
23954
|
+
frameCount: number().int()
|
|
23955
|
+
});
|
|
23956
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23957
|
+
kind: literal("created"),
|
|
23958
|
+
collection: RetrainCollectionSchema
|
|
23959
|
+
}), object({
|
|
23960
|
+
kind: literal("refused"),
|
|
23961
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23962
|
+
})]);
|
|
23963
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23964
|
+
kind: literal("renamed"),
|
|
23965
|
+
collection: RetrainCollectionSchema
|
|
23966
|
+
}), object({
|
|
23967
|
+
kind: literal("refused"),
|
|
23968
|
+
reason: _enum([
|
|
23969
|
+
"empty-name",
|
|
23970
|
+
"duplicate-name",
|
|
23971
|
+
"unknown-collection"
|
|
23972
|
+
])
|
|
23973
|
+
})]);
|
|
23974
|
+
/**
|
|
23975
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23976
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23977
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23978
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23979
|
+
*/
|
|
23980
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23981
|
+
kind: literal("added"),
|
|
23982
|
+
collectionId: string(),
|
|
23983
|
+
frame: RetrainFrameSchema,
|
|
23984
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23985
|
+
reused: boolean()
|
|
23986
|
+
}), object({
|
|
23987
|
+
kind: literal("refused"),
|
|
23988
|
+
reason: _enum([
|
|
23989
|
+
"unknown-collection",
|
|
23990
|
+
"still-unavailable",
|
|
23991
|
+
"still-busy",
|
|
23992
|
+
"unreadable-image",
|
|
23993
|
+
"write-failed"
|
|
23994
|
+
]),
|
|
23995
|
+
detail: string().optional()
|
|
23996
|
+
})]);
|
|
23997
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23998
|
+
var RetrainAssistProfileSchema = object({
|
|
23999
|
+
id: string(),
|
|
24000
|
+
name: string(),
|
|
24001
|
+
model: string(),
|
|
24002
|
+
kind: string(),
|
|
24003
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
24004
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
24005
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
24006
|
+
leavesHouse: boolean()
|
|
24007
|
+
});
|
|
24008
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
24009
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
24010
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
24011
|
+
var RetrainLlmReviewSchema = object({
|
|
24012
|
+
/** The `ref` the page sent the box under. */
|
|
24013
|
+
ref: string(),
|
|
24014
|
+
verdict: _enum([
|
|
24015
|
+
"confirmed",
|
|
24016
|
+
"wrong-class",
|
|
24017
|
+
"not-an-object",
|
|
24018
|
+
"uncertain"
|
|
24019
|
+
]),
|
|
24020
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
24021
|
+
reason: string()
|
|
24022
|
+
});
|
|
24023
|
+
/**
|
|
24024
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
24025
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
24026
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
24027
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
24028
|
+
*/
|
|
24029
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
24030
|
+
kind: literal("proposed"),
|
|
24031
|
+
profileId: string(),
|
|
24032
|
+
model: string(),
|
|
24033
|
+
/** The frame was sent outside the house for this answer. */
|
|
24034
|
+
leftHouse: boolean(),
|
|
24035
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
24036
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
24037
|
+
rejected: number().int()
|
|
24038
|
+
}), object({
|
|
24039
|
+
kind: literal("refused"),
|
|
24040
|
+
reason: _enum([
|
|
24041
|
+
"unknown-frame",
|
|
24042
|
+
"unreadable-frame",
|
|
24043
|
+
"unknown-profile",
|
|
24044
|
+
"profile-disabled",
|
|
24045
|
+
"no-vision",
|
|
24046
|
+
"cloud-not-confirmed",
|
|
24047
|
+
"llm-error",
|
|
24048
|
+
"malformed-answer"
|
|
24049
|
+
]),
|
|
24050
|
+
detail: string().optional()
|
|
24051
|
+
})]);
|
|
23008
24052
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
23009
24053
|
var RetrainTransitionResultSchema = object({
|
|
23010
24054
|
trackId: string(),
|
|
@@ -23722,7 +24766,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23722
24766
|
auth: "admin"
|
|
23723
24767
|
}), method(object({
|
|
23724
24768
|
deviceId: number(),
|
|
23725
|
-
trackId: string(),
|
|
24769
|
+
trackId: string().optional(),
|
|
23726
24770
|
frameId: string()
|
|
23727
24771
|
}), object({
|
|
23728
24772
|
removed: boolean(),
|
|
@@ -23739,7 +24783,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23739
24783
|
auth: "admin"
|
|
23740
24784
|
}), method(object({
|
|
23741
24785
|
deviceId: number(),
|
|
23742
|
-
|
|
24786
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24787
|
+
trackId: string().optional(),
|
|
23743
24788
|
frameId: string(),
|
|
23744
24789
|
subject: RetrainAssistSubjectSchema,
|
|
23745
24790
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23747,12 +24792,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23747
24792
|
}), RetrainAssistResultSchema, {
|
|
23748
24793
|
kind: "mutation",
|
|
23749
24794
|
auth: "admin"
|
|
23750
|
-
}), method(object({
|
|
24795
|
+
}), method(object({
|
|
24796
|
+
trackId: string().optional(),
|
|
24797
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24798
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23751
24799
|
kind: "query",
|
|
23752
24800
|
auth: "admin"
|
|
23753
24801
|
}), method(object({
|
|
23754
24802
|
deviceId: number(),
|
|
23755
|
-
|
|
24803
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24804
|
+
trackId: string().optional(),
|
|
23756
24805
|
frameId: string(),
|
|
23757
24806
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23758
24807
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23770,7 +24819,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23770
24819
|
}), RetrainTransitionResultSchema, {
|
|
23771
24820
|
kind: "mutation",
|
|
23772
24821
|
auth: "admin"
|
|
23773
|
-
}), method(
|
|
24822
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24823
|
+
kind: "query",
|
|
24824
|
+
auth: "admin"
|
|
24825
|
+
}), method(object({
|
|
24826
|
+
deviceId: number(),
|
|
24827
|
+
trackId: string().optional(),
|
|
24828
|
+
frameId: string(),
|
|
24829
|
+
complete: boolean()
|
|
24830
|
+
}), RetrainFrameSchema, {
|
|
24831
|
+
kind: "mutation",
|
|
24832
|
+
auth: "admin"
|
|
24833
|
+
}), method(object({
|
|
24834
|
+
filter: RetrainExportFilterSchema,
|
|
24835
|
+
layout: RetrainExportLayoutSchema,
|
|
24836
|
+
target: RetrainArchiveTargetSchema
|
|
24837
|
+
}), RetrainArchiveResultSchema, {
|
|
24838
|
+
kind: "mutation",
|
|
24839
|
+
auth: "admin",
|
|
24840
|
+
timeoutMs: 60 * 6e4
|
|
24841
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24842
|
+
kind: "query",
|
|
24843
|
+
auth: "admin"
|
|
24844
|
+
}), method(object({
|
|
24845
|
+
deviceId: number(),
|
|
24846
|
+
trackId: string().optional(),
|
|
24847
|
+
frameId: string(),
|
|
24848
|
+
profileId: string(),
|
|
24849
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24850
|
+
boxes: array(object({
|
|
24851
|
+
ref: string(),
|
|
24852
|
+
bbox: RetrainBboxSchema,
|
|
24853
|
+
macroClass: RetrainMacroClassSchema,
|
|
24854
|
+
label: string().optional()
|
|
24855
|
+
})).max(50),
|
|
24856
|
+
allowCloud: boolean()
|
|
24857
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24858
|
+
kind: "mutation",
|
|
24859
|
+
auth: "admin",
|
|
24860
|
+
timeoutMs: 18e4
|
|
24861
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24862
|
+
kind: "mutation",
|
|
24863
|
+
auth: "admin"
|
|
24864
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24865
|
+
kind: "query",
|
|
24866
|
+
auth: "admin"
|
|
24867
|
+
}), method(object({
|
|
24868
|
+
id: string(),
|
|
24869
|
+
name: string().max(120)
|
|
24870
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24871
|
+
kind: "mutation",
|
|
24872
|
+
auth: "admin"
|
|
24873
|
+
}), method(object({ id: string() }), object({
|
|
24874
|
+
deleted: boolean(),
|
|
24875
|
+
removedFrames: number().int()
|
|
24876
|
+
}), {
|
|
24877
|
+
kind: "mutation",
|
|
24878
|
+
auth: "admin"
|
|
24879
|
+
}), method(object({
|
|
24880
|
+
collectionId: string(),
|
|
24881
|
+
deviceId: number(),
|
|
24882
|
+
epochMs: number()
|
|
24883
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24884
|
+
kind: "mutation",
|
|
24885
|
+
auth: "admin",
|
|
24886
|
+
timeoutMs: 6e4
|
|
24887
|
+
}), method(object({
|
|
24888
|
+
collectionId: string(),
|
|
24889
|
+
frameIds: array(string()).min(1).max(500)
|
|
24890
|
+
}), object({
|
|
24891
|
+
added: number().int(),
|
|
24892
|
+
alreadyMember: number().int(),
|
|
24893
|
+
unknownFrameIds: array(string()).readonly()
|
|
24894
|
+
}), {
|
|
24895
|
+
kind: "mutation",
|
|
24896
|
+
auth: "admin"
|
|
24897
|
+
}), method(object({
|
|
24898
|
+
collectionId: string(),
|
|
24899
|
+
frameId: string()
|
|
24900
|
+
}), object({
|
|
24901
|
+
removed: boolean(),
|
|
24902
|
+
deletedFrame: boolean()
|
|
24903
|
+
}), {
|
|
24904
|
+
kind: "mutation",
|
|
24905
|
+
auth: "admin"
|
|
24906
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23774
24907
|
kind: "query",
|
|
23775
24908
|
auth: "admin"
|
|
23776
24909
|
}), method(object({
|
|
@@ -23898,7 +25031,7 @@ var FrameRefSchema = object({
|
|
|
23898
25031
|
timestamp: number(),
|
|
23899
25032
|
capturedAt: number().optional()
|
|
23900
25033
|
});
|
|
23901
|
-
var ModelFormatSchema$
|
|
25034
|
+
var ModelFormatSchema$2 = _enum([
|
|
23902
25035
|
"onnx",
|
|
23903
25036
|
"coreml",
|
|
23904
25037
|
"openvino",
|
|
@@ -23916,7 +25049,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23916
25049
|
var PipelineEngineChoiceSchema = object({
|
|
23917
25050
|
runtime: literal("python"),
|
|
23918
25051
|
backend: string(),
|
|
23919
|
-
format: ModelFormatSchema$
|
|
25052
|
+
format: ModelFormatSchema$2,
|
|
23920
25053
|
device: string().optional()
|
|
23921
25054
|
});
|
|
23922
25055
|
/**
|
|
@@ -23955,28 +25088,10 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23955
25088
|
group: string().optional(),
|
|
23956
25089
|
settings: record(string(), unknown()).optional()
|
|
23957
25090
|
}));
|
|
23958
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23959
|
-
addonId: string(),
|
|
23960
|
-
enabled: boolean(),
|
|
23961
|
-
modelId: string(),
|
|
23962
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23963
|
-
settings: record(string(), unknown()).optional()
|
|
23964
|
-
}));
|
|
23965
|
-
var PipelineTemplateSchema$1 = object({
|
|
23966
|
-
id: string(),
|
|
23967
|
-
name: string(),
|
|
23968
|
-
createdAt: string(),
|
|
23969
|
-
updatedAt: string(),
|
|
23970
|
-
engine: PipelineEngineChoiceSchema,
|
|
23971
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23972
|
-
});
|
|
23973
25091
|
var PipelineModelOptionSchema = object({
|
|
23974
25092
|
id: string(),
|
|
23975
25093
|
name: string(),
|
|
23976
|
-
formats: record(string(),
|
|
23977
|
-
downloaded: boolean(),
|
|
23978
|
-
sizeMB: number()
|
|
23979
|
-
})),
|
|
25094
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23980
25095
|
group: ModelVariantGroupSchema.optional(),
|
|
23981
25096
|
legacy: boolean().optional(),
|
|
23982
25097
|
provider: ModelProviderIdSchema.optional(),
|
|
@@ -24143,6 +25258,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24143
25258
|
}), {
|
|
24144
25259
|
kind: "mutation",
|
|
24145
25260
|
auth: "admin"
|
|
25261
|
+
}), method(object({
|
|
25262
|
+
nodeId: string(),
|
|
25263
|
+
deviceIds: array(number()).readonly().optional(),
|
|
25264
|
+
dryRun: boolean()
|
|
25265
|
+
}), object({
|
|
25266
|
+
entries: array(object({
|
|
25267
|
+
deviceId: number(),
|
|
25268
|
+
keys: array(string()).readonly()
|
|
25269
|
+
})).readonly(),
|
|
25270
|
+
refused: array(object({
|
|
25271
|
+
deviceId: number(),
|
|
25272
|
+
reason: string()
|
|
25273
|
+
})).readonly()
|
|
25274
|
+
}), {
|
|
25275
|
+
kind: "mutation",
|
|
25276
|
+
auth: "admin"
|
|
24146
25277
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
24147
25278
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
24148
25279
|
deviceKey: string(),
|
|
@@ -24168,22 +25299,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24168
25299
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
24169
25300
|
steps: array(PipelineStepInputSchema),
|
|
24170
25301
|
deviceKey: string().optional()
|
|
24171
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
24172
|
-
name: string(),
|
|
24173
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
24174
|
-
engine: PipelineEngineChoiceSchema
|
|
24175
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
24176
|
-
id: string(),
|
|
24177
|
-
name: string().optional(),
|
|
24178
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
24179
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
25302
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24180
25303
|
addonId: string(),
|
|
24181
25304
|
modelId: string(),
|
|
24182
|
-
format: ModelFormatSchema$
|
|
25305
|
+
format: ModelFormatSchema$2
|
|
24183
25306
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
24184
25307
|
addonId: string(),
|
|
24185
25308
|
modelId: string(),
|
|
24186
|
-
format: ModelFormatSchema$
|
|
25309
|
+
format: ModelFormatSchema$2
|
|
24187
25310
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
24188
25311
|
steps: array(PipelineStepInputSchema).min(1),
|
|
24189
25312
|
frame: FrameInputSchema.optional(),
|
|
@@ -24340,6 +25463,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
24340
25463
|
filename: string().optional(),
|
|
24341
25464
|
settings: record(string(), unknown()).optional()
|
|
24342
25465
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25466
|
+
/**
|
|
25467
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25468
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25469
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25470
|
+
* schemas are what crosses the cap boundary.
|
|
25471
|
+
*/
|
|
25472
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25473
|
+
/** The operator's range for it. */
|
|
25474
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25475
|
+
min: 1,
|
|
25476
|
+
max: 8
|
|
25477
|
+
};
|
|
25478
|
+
var HardwareClassIdSchema = _enum([
|
|
25479
|
+
"intel-core-ultra",
|
|
25480
|
+
"intel-n-series",
|
|
25481
|
+
"apple-m-base",
|
|
25482
|
+
"apple-m-pro",
|
|
25483
|
+
"unknown"
|
|
25484
|
+
]);
|
|
25485
|
+
var AcceleratorKindSchema = _enum([
|
|
25486
|
+
"intel-npu",
|
|
25487
|
+
"intel-igpu",
|
|
25488
|
+
"x86-cpu",
|
|
25489
|
+
"arm-cpu",
|
|
25490
|
+
"apple-ane",
|
|
25491
|
+
"coral"
|
|
25492
|
+
]);
|
|
25493
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25494
|
+
object({
|
|
25495
|
+
kind: literal("capacity"),
|
|
25496
|
+
sessions: number(),
|
|
25497
|
+
minSessions: number()
|
|
25498
|
+
}),
|
|
25499
|
+
object({
|
|
25500
|
+
kind: literal("tie-faster"),
|
|
25501
|
+
over: string(),
|
|
25502
|
+
recallDelta: number()
|
|
25503
|
+
}),
|
|
25504
|
+
object({
|
|
25505
|
+
kind: literal("stepped-down"),
|
|
25506
|
+
from: string(),
|
|
25507
|
+
to: string(),
|
|
25508
|
+
limitedBy: string()
|
|
25509
|
+
}),
|
|
25510
|
+
object({
|
|
25511
|
+
kind: literal("no-fit-lightest"),
|
|
25512
|
+
sessions: number(),
|
|
25513
|
+
minSessions: number()
|
|
25514
|
+
}),
|
|
25515
|
+
object({
|
|
25516
|
+
kind: literal("derived-latency"),
|
|
25517
|
+
modelId: string()
|
|
25518
|
+
}),
|
|
25519
|
+
object({ kind: literal("cpu-device") }),
|
|
25520
|
+
object({ kind: literal("coral-untouched") }),
|
|
25521
|
+
object({ kind: literal("device-disabled") }),
|
|
25522
|
+
object({ kind: literal("device-unavailable") }),
|
|
25523
|
+
object({ kind: literal("node-offline") }),
|
|
25524
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25525
|
+
object({
|
|
25526
|
+
kind: literal("no-measured-data"),
|
|
25527
|
+
hardwareClass: HardwareClassIdSchema
|
|
25528
|
+
}),
|
|
25529
|
+
object({
|
|
25530
|
+
kind: literal("no-family-build"),
|
|
25531
|
+
format: ModelFormatSchema$1
|
|
25532
|
+
}),
|
|
25533
|
+
object({
|
|
25534
|
+
kind: literal("kept-custom-pin"),
|
|
25535
|
+
modelId: string(),
|
|
25536
|
+
deviceKey: string()
|
|
25537
|
+
})
|
|
25538
|
+
]);
|
|
25539
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25540
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25541
|
+
/**
|
|
25542
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25543
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25544
|
+
*/
|
|
25545
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25546
|
+
kind: literal("node-benchmark"),
|
|
25547
|
+
resultId: string(),
|
|
25548
|
+
measuredAtMs: number()
|
|
25549
|
+
})]);
|
|
25550
|
+
var DeviceModelChoiceSchema = object({
|
|
25551
|
+
modelId: string(),
|
|
25552
|
+
p50Ms: number(),
|
|
25553
|
+
fps: number(),
|
|
25554
|
+
measured: boolean(),
|
|
25555
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25556
|
+
source: LatencySourceSchema.optional(),
|
|
25557
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25558
|
+
capacitySessions: number(),
|
|
25559
|
+
personRecall: number()
|
|
25560
|
+
});
|
|
25561
|
+
var DeviceRecommendationSchema = object({
|
|
25562
|
+
deviceKey: string(),
|
|
25563
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25564
|
+
enabled: boolean(),
|
|
25565
|
+
available: boolean(),
|
|
25566
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25567
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25568
|
+
kept: KeptReasonSchema.optional(),
|
|
25569
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25570
|
+
});
|
|
25571
|
+
var NodeRecommendationSchema = object({
|
|
25572
|
+
nodeId: string(),
|
|
25573
|
+
reachable: boolean(),
|
|
25574
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25575
|
+
cpuModel: string().nullable(),
|
|
25576
|
+
skipped: boolean(),
|
|
25577
|
+
acceleratorModelId: string().nullable(),
|
|
25578
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25579
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25580
|
+
});
|
|
25581
|
+
var ModelPinChangeSchema = object({
|
|
25582
|
+
stepId: string(),
|
|
25583
|
+
before: string().nullable(),
|
|
25584
|
+
after: string().nullable()
|
|
25585
|
+
});
|
|
25586
|
+
var NodeDeviceChangeSchema = object({
|
|
25587
|
+
nodeId: string(),
|
|
25588
|
+
deviceKey: string(),
|
|
25589
|
+
madeExplicit: boolean(),
|
|
25590
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25591
|
+
thresholds: array(object({
|
|
25592
|
+
stepId: string(),
|
|
25593
|
+
keys: array(string()).readonly()
|
|
25594
|
+
})).readonly()
|
|
25595
|
+
});
|
|
25596
|
+
var CameraOverrideClearSchema = object({
|
|
25597
|
+
deviceId: number(),
|
|
25598
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25599
|
+
nodeId: string(),
|
|
25600
|
+
deviceKey: string().nullable(),
|
|
25601
|
+
stepId: string(),
|
|
25602
|
+
modelIdBefore: string().nullable(),
|
|
25603
|
+
keys: array(string()).readonly()
|
|
25604
|
+
});
|
|
25605
|
+
var DetectorStoreClearSchema = object({
|
|
25606
|
+
deviceId: number(),
|
|
25607
|
+
keys: array(string()).readonly()
|
|
25608
|
+
});
|
|
25609
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25610
|
+
object({
|
|
25611
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25612
|
+
skippedNodes: array(string()).readonly()
|
|
25613
|
+
}),
|
|
25614
|
+
object({
|
|
25615
|
+
kind: literal("detector-store-unreadable"),
|
|
25616
|
+
error: string()
|
|
25617
|
+
}),
|
|
25618
|
+
object({
|
|
25619
|
+
kind: literal("coral-enabled"),
|
|
25620
|
+
nodeId: string(),
|
|
25621
|
+
deviceKey: string()
|
|
25622
|
+
}),
|
|
25623
|
+
object({
|
|
25624
|
+
kind: literal("custom-pin-kept"),
|
|
25625
|
+
nodeId: string(),
|
|
25626
|
+
deviceKey: string().nullable(),
|
|
25627
|
+
deviceId: number().nullable(),
|
|
25628
|
+
modelId: string()
|
|
25629
|
+
}),
|
|
25630
|
+
object({
|
|
25631
|
+
kind: literal("custom-registry-unreadable"),
|
|
25632
|
+
error: string()
|
|
25633
|
+
})
|
|
25634
|
+
]);
|
|
25635
|
+
var AutoTuneOptionsSchema = object({
|
|
25636
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
25637
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25638
|
+
/**
|
|
25639
|
+
* The least number of parallel sessions every device must sustain at the
|
|
25640
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
25641
|
+
* that reaches it wins.
|
|
25642
|
+
*/
|
|
25643
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25644
|
+
});
|
|
25645
|
+
var AutoTunePlanSchema = object({
|
|
25646
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
25647
|
+
planHash: string(),
|
|
25648
|
+
family: literal("yolov9"),
|
|
25649
|
+
headroom: number(),
|
|
25650
|
+
minSessionsPerDevice: number(),
|
|
25651
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
25652
|
+
cameraFps: number(),
|
|
25653
|
+
generatedAt: number(),
|
|
25654
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
25655
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
25656
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
25657
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
25658
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
25659
|
+
});
|
|
25660
|
+
var AutoTuneApplyInputSchema = object({
|
|
25661
|
+
planHash: string(),
|
|
25662
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25663
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25664
|
+
});
|
|
25665
|
+
var AutoTunePhaseResultSchema = object({
|
|
25666
|
+
phase: _enum([
|
|
25667
|
+
"download",
|
|
25668
|
+
"camera-overrides",
|
|
25669
|
+
"detector-thresholds",
|
|
25670
|
+
"node-models",
|
|
25671
|
+
"redispatch"
|
|
25672
|
+
]),
|
|
25673
|
+
ok: boolean(),
|
|
25674
|
+
detail: string()
|
|
25675
|
+
});
|
|
25676
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
25677
|
+
object({
|
|
25678
|
+
kind: literal("applied"),
|
|
25679
|
+
planHash: string(),
|
|
25680
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25681
|
+
}),
|
|
25682
|
+
object({
|
|
25683
|
+
kind: literal("aborted"),
|
|
25684
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25685
|
+
}),
|
|
25686
|
+
object({
|
|
25687
|
+
kind: literal("stale"),
|
|
25688
|
+
plan: AutoTunePlanSchema
|
|
25689
|
+
}),
|
|
25690
|
+
object({
|
|
25691
|
+
kind: literal("refused"),
|
|
25692
|
+
reason: _enum(["apply-in-progress"])
|
|
25693
|
+
})
|
|
25694
|
+
]);
|
|
25695
|
+
/**
|
|
25696
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25697
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25698
|
+
* hardware share suggestion and the stale device pins.
|
|
25699
|
+
*/
|
|
25700
|
+
/**
|
|
25701
|
+
* How a new detection session picks its node and device.
|
|
25702
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25703
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25704
|
+
* weight only bites once a node already holds a session.
|
|
25705
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25706
|
+
* full or drowning node yields to a free one (D748).
|
|
25707
|
+
*/
|
|
25708
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25709
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25710
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25711
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25712
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25713
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25714
|
+
});
|
|
25715
|
+
var PlacementStatsInputSchema = object({
|
|
25716
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25717
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25718
|
+
var PlacementDeviceStatsSchema = object({
|
|
25719
|
+
deviceKey: string(),
|
|
25720
|
+
/** Sessions running on this device now. */
|
|
25721
|
+
sessionsNow: number(),
|
|
25722
|
+
/** Sessions started on this device inside the window. */
|
|
25723
|
+
sessionsStarted: number(),
|
|
25724
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25725
|
+
observedShare: number().nullable()
|
|
25726
|
+
});
|
|
25727
|
+
var PlacementNodeStatsSchema = object({
|
|
25728
|
+
nodeId: string(),
|
|
25729
|
+
sessionsNow: number(),
|
|
25730
|
+
sessionsStarted: number(),
|
|
25731
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25732
|
+
observedShare: number().nullable(),
|
|
25733
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25734
|
+
peakSessions: number(),
|
|
25735
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25736
|
+
yieldsAway: number(),
|
|
25737
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25738
|
+
});
|
|
25739
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25740
|
+
var StaleDevicePinSchema = object({
|
|
25741
|
+
deviceId: number(),
|
|
25742
|
+
deviceKey: string(),
|
|
25743
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25744
|
+
reason: _enum(["disabled", "absent"])
|
|
25745
|
+
});
|
|
25746
|
+
var PlacementStatsSchema = object({
|
|
25747
|
+
policy: SessionPlacementPolicySchema,
|
|
25748
|
+
windowMs: number(),
|
|
25749
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25750
|
+
observedForMs: number(),
|
|
25751
|
+
sessionsNow: number(),
|
|
25752
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25753
|
+
clusterPeakSessions: number(),
|
|
25754
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25755
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25756
|
+
});
|
|
25757
|
+
/**
|
|
25758
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25759
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25760
|
+
* the measured latency table for the node's hardware class.
|
|
25761
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25762
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25763
|
+
*/
|
|
25764
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25765
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25766
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25767
|
+
var SuggestSharesInputSchema = object({
|
|
25768
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25769
|
+
/** Default `hardware`. */
|
|
25770
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25771
|
+
});
|
|
25772
|
+
var SuggestedDeviceShareSchema = object({
|
|
25773
|
+
deviceKey: string(),
|
|
25774
|
+
/** Share of the node (0–100, rounded). */
|
|
25775
|
+
share: number(),
|
|
25776
|
+
modelId: string().nullable(),
|
|
25777
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25778
|
+
fps: number().nullable(),
|
|
25779
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25780
|
+
measured: boolean(),
|
|
25781
|
+
/**
|
|
25782
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25783
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25784
|
+
*/
|
|
25785
|
+
suggestedMaxSessions: number().nullable()
|
|
25786
|
+
});
|
|
25787
|
+
var SuggestedNodeShareSchema = object({
|
|
25788
|
+
nodeId: string(),
|
|
25789
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25790
|
+
share: number().nullable(),
|
|
25791
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25792
|
+
capacitySessions: number(),
|
|
25793
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25794
|
+
skippedReason: string().nullable(),
|
|
25795
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25796
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25797
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25798
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25799
|
+
});
|
|
25800
|
+
var SuggestSharesResultSchema = object({
|
|
25801
|
+
headroom: number(),
|
|
25802
|
+
/** The source asked for; each node says what it actually used. */
|
|
25803
|
+
source: CapacitySourceSchema,
|
|
25804
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25805
|
+
cameraFps: number(),
|
|
25806
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25807
|
+
minSessionsPerDevice: number(),
|
|
25808
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25809
|
+
});
|
|
25810
|
+
/**
|
|
25811
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25812
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25813
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25814
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25815
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25816
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25817
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25818
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25819
|
+
* - `manual` — the operator's stored sliders.
|
|
25820
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25821
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25822
|
+
*/
|
|
25823
|
+
var ShareSourceSchema = _enum([
|
|
25824
|
+
"hardware",
|
|
25825
|
+
"benchmark",
|
|
25826
|
+
"manual"
|
|
25827
|
+
]);
|
|
25828
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25829
|
+
object({
|
|
25830
|
+
nodes: record(string(), number()),
|
|
25831
|
+
devices: record(string(), record(string(), number()))
|
|
25832
|
+
});
|
|
25833
|
+
var EffectiveDeviceShareSchema = object({
|
|
25834
|
+
deviceKey: string(),
|
|
25835
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25836
|
+
eligible: boolean(),
|
|
25837
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25838
|
+
configuredPct: number(),
|
|
25839
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25840
|
+
effectivePct: number()
|
|
25841
|
+
});
|
|
25842
|
+
var EffectiveNodeShareSchema = object({
|
|
25843
|
+
nodeId: string(),
|
|
25844
|
+
eligible: boolean(),
|
|
25845
|
+
configuredPct: number(),
|
|
25846
|
+
effectivePct: number(),
|
|
25847
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25848
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25849
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25850
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25851
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25852
|
+
});
|
|
25853
|
+
var EffectiveSharesSchema = object({
|
|
25854
|
+
source: ShareSourceSchema,
|
|
25855
|
+
policy: SessionPlacementPolicySchema,
|
|
25856
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25857
|
+
autoPending: boolean(),
|
|
25858
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25859
|
+
computedAt: number().nullable(),
|
|
25860
|
+
/** What made the system recompute them last. */
|
|
25861
|
+
trigger: string().nullable(),
|
|
25862
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25863
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25864
|
+
nodeWeights: record(string(), number()),
|
|
25865
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25866
|
+
});
|
|
25867
|
+
/**
|
|
25868
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25869
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25870
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25871
|
+
* shares read.
|
|
25872
|
+
*
|
|
25873
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25874
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25875
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25876
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25877
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25878
|
+
*
|
|
25879
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25880
|
+
* cross a process at frame rate, D9):
|
|
25881
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25882
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25883
|
+
* interval;
|
|
25884
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25885
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25886
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25887
|
+
* CPU, RAM or the event loop give out.
|
|
25888
|
+
*/
|
|
25889
|
+
/** Defaults and bounds, one place. */
|
|
25890
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25891
|
+
fpsPerStream: 10,
|
|
25892
|
+
budgetMinutes: 45,
|
|
25893
|
+
minBudgetMinutes: 10,
|
|
25894
|
+
maxBudgetMinutes: 120,
|
|
25895
|
+
/** A result older than this no longer beats the table. */
|
|
25896
|
+
staleAfterDays: 30,
|
|
25897
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25898
|
+
settleSec: 5,
|
|
25899
|
+
/** Accounted window per ramp step. */
|
|
25900
|
+
measureSec: 20,
|
|
25901
|
+
/** Longest the drain may take before the run is refused. */
|
|
25902
|
+
drainTimeoutSec: 120,
|
|
25903
|
+
/** Candidate models per device in one run. */
|
|
25904
|
+
maxModelsPerDevice: 6
|
|
25905
|
+
};
|
|
25906
|
+
/** The two measurements a run can make. */
|
|
25907
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25908
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25909
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25910
|
+
deviceKey: string().min(1),
|
|
25911
|
+
/**
|
|
25912
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25913
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25914
|
+
*/
|
|
25915
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25916
|
+
});
|
|
25917
|
+
/** What the operator confirmed. */
|
|
25918
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25919
|
+
nodeId: string().min(1),
|
|
25920
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25921
|
+
/** Which measurements run. At least one. */
|
|
25922
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25923
|
+
/**
|
|
25924
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25925
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25926
|
+
* detector always runs.
|
|
25927
|
+
*/
|
|
25928
|
+
steps: array(string().min(1)).default([]),
|
|
25929
|
+
/** Offered rate of one stream / session. */
|
|
25930
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25931
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25932
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25933
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25934
|
+
keepDownloadedModels: boolean().default(false),
|
|
25935
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25936
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25937
|
+
});
|
|
25938
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25939
|
+
kind: _enum([
|
|
25940
|
+
"benchmark-active",
|
|
25941
|
+
"node-offline",
|
|
25942
|
+
"unknown-device",
|
|
25943
|
+
"no-phase",
|
|
25944
|
+
"insufficient-headroom"
|
|
25945
|
+
]),
|
|
25946
|
+
detail: string(),
|
|
25947
|
+
overridable: boolean()
|
|
25948
|
+
});
|
|
25949
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25950
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25951
|
+
deviceId: number(),
|
|
25952
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25953
|
+
placedOnNode: boolean(),
|
|
25954
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25955
|
+
pinnedToNode: boolean()
|
|
25956
|
+
});
|
|
25957
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25958
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25959
|
+
deviceId: number(),
|
|
25960
|
+
reason: literal("only-frame-source")
|
|
25961
|
+
});
|
|
25962
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25963
|
+
nodeId: string(),
|
|
25964
|
+
online: boolean(),
|
|
25965
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25966
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25967
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25968
|
+
estimatedDurationMs: number(),
|
|
25969
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25970
|
+
budgetMs: number(),
|
|
25971
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25972
|
+
steps: array(string()).readonly(),
|
|
25973
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25974
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25975
|
+
headroom: object({
|
|
25976
|
+
sessionsNow: number(),
|
|
25977
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25978
|
+
}),
|
|
25979
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25980
|
+
canStart: boolean()
|
|
25981
|
+
});
|
|
25982
|
+
/** Where the measuring runner is. */
|
|
25983
|
+
var NodeBenchProgressSchema = object({
|
|
25984
|
+
phase: _enum([
|
|
25985
|
+
"preparing",
|
|
25986
|
+
"device",
|
|
25987
|
+
"pipeline",
|
|
25988
|
+
"cleanup"
|
|
25989
|
+
]),
|
|
25990
|
+
deviceKey: string().nullable(),
|
|
25991
|
+
modelId: string().nullable(),
|
|
25992
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25993
|
+
load: number().nullable(),
|
|
25994
|
+
cellsDone: number(),
|
|
25995
|
+
cellsTotal: number(),
|
|
25996
|
+
message: string()
|
|
25997
|
+
});
|
|
25998
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25999
|
+
var NodeBenchLimitSchema = _enum([
|
|
26000
|
+
"p95",
|
|
26001
|
+
"drops",
|
|
26002
|
+
"errors",
|
|
26003
|
+
"stall",
|
|
26004
|
+
"cpu",
|
|
26005
|
+
"ram",
|
|
26006
|
+
"none"
|
|
26007
|
+
]);
|
|
26008
|
+
var NodeBenchRampStepSchema = object({
|
|
26009
|
+
load: number(),
|
|
26010
|
+
pass: boolean(),
|
|
26011
|
+
p95Ms: number(),
|
|
26012
|
+
dropRatio: number(),
|
|
26013
|
+
/** Completed frames per second over the accounted window. */
|
|
26014
|
+
fps: number(),
|
|
26015
|
+
cpuPct: number().nullable(),
|
|
26016
|
+
ramFreePct: number().nullable(),
|
|
26017
|
+
failReasons: array(string()).readonly()
|
|
26018
|
+
});
|
|
26019
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
26020
|
+
phase: literal("device"),
|
|
26021
|
+
deviceKey: string(),
|
|
26022
|
+
modelId: string(),
|
|
26023
|
+
/** Single-stream latency (the K = 1 step). */
|
|
26024
|
+
p50Ms: number(),
|
|
26025
|
+
p95Ms: number(),
|
|
26026
|
+
p99Ms: number(),
|
|
26027
|
+
/** Frames per second sustained at the last passing step. */
|
|
26028
|
+
fps: number(),
|
|
26029
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
26030
|
+
kMax: number(),
|
|
26031
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26032
|
+
/** First call (model load + warm-up). */
|
|
26033
|
+
warmupMs: number(),
|
|
26034
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26035
|
+
}), object({
|
|
26036
|
+
phase: literal("pipeline"),
|
|
26037
|
+
deviceKey: string(),
|
|
26038
|
+
modelId: string(),
|
|
26039
|
+
steps: array(string()).readonly(),
|
|
26040
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
26041
|
+
maxSessions: number(),
|
|
26042
|
+
limitedBy: NodeBenchLimitSchema,
|
|
26043
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
26044
|
+
stepsFired: array(string()).readonly(),
|
|
26045
|
+
warmupMs: number(),
|
|
26046
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
26047
|
+
})]);
|
|
26048
|
+
/**
|
|
26049
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
26050
|
+
* the node no longer beats the table.
|
|
26051
|
+
*/
|
|
26052
|
+
var NodeBenchFingerprintSchema = object({
|
|
26053
|
+
pipelineVersion: string().nullable(),
|
|
26054
|
+
cpuModel: string().nullable(),
|
|
26055
|
+
ramGb: number().nullable(),
|
|
26056
|
+
os: string().nullable(),
|
|
26057
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
26058
|
+
pools: record(string(), object({
|
|
26059
|
+
runtime: string(),
|
|
26060
|
+
numWorkers: number(),
|
|
26061
|
+
concurrency: number(),
|
|
26062
|
+
batchMode: string()
|
|
26063
|
+
})).default({})
|
|
26064
|
+
});
|
|
26065
|
+
/** The frames the run used. */
|
|
26066
|
+
var NodeBenchClipSchema = object({
|
|
26067
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
26068
|
+
id: string(),
|
|
26069
|
+
revision: string().nullable(),
|
|
26070
|
+
frames: number(),
|
|
26071
|
+
width: number(),
|
|
26072
|
+
height: number()
|
|
26073
|
+
});
|
|
26074
|
+
var NodeBenchRunnerInputSchema = object({
|
|
26075
|
+
runId: string().min(1),
|
|
26076
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
26077
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
26078
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
26079
|
+
steps: array(string()).default([]),
|
|
26080
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
26081
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
26082
|
+
deadlineAtMs: number(),
|
|
26083
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
26084
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
26085
|
+
keepDownloadedModels: boolean().default(false)
|
|
26086
|
+
});
|
|
26087
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
26088
|
+
"running",
|
|
26089
|
+
"done",
|
|
26090
|
+
"failed",
|
|
26091
|
+
"aborted"
|
|
26092
|
+
]);
|
|
26093
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
26094
|
+
runId: string(),
|
|
26095
|
+
nodeId: string(),
|
|
26096
|
+
state: NodeBenchRunnerStateSchema,
|
|
26097
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26098
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
26099
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
26100
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26101
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26102
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
26103
|
+
activeCameraIds: array(number()).readonly(),
|
|
26104
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
26105
|
+
deletedModels: array(string()).readonly(),
|
|
26106
|
+
error: string().nullable(),
|
|
26107
|
+
startedAtMs: number(),
|
|
26108
|
+
finishedAtMs: number().nullable()
|
|
26109
|
+
});
|
|
26110
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
26111
|
+
"draining",
|
|
26112
|
+
"measuring",
|
|
26113
|
+
"restoring",
|
|
26114
|
+
"done",
|
|
26115
|
+
"failed",
|
|
26116
|
+
"aborted"
|
|
26117
|
+
]);
|
|
26118
|
+
/** Why a run ended. */
|
|
26119
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
26120
|
+
"completed",
|
|
26121
|
+
"operator-abort",
|
|
26122
|
+
"deadline",
|
|
26123
|
+
"node-lost",
|
|
26124
|
+
"runner-lost",
|
|
26125
|
+
"hub-restart",
|
|
26126
|
+
"drain-timeout",
|
|
26127
|
+
"failed"
|
|
26128
|
+
]);
|
|
26129
|
+
var NodeBenchmarkRunSchema = object({
|
|
26130
|
+
runId: string(),
|
|
26131
|
+
nodeId: string(),
|
|
26132
|
+
state: NodeBenchmarkStateSchema,
|
|
26133
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26134
|
+
startedAtMs: number(),
|
|
26135
|
+
deadlineAtMs: number(),
|
|
26136
|
+
finishedAtMs: number().nullable(),
|
|
26137
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
26138
|
+
error: string().nullable(),
|
|
26139
|
+
/** Cameras moved off the node for the run. */
|
|
26140
|
+
moved: array(number()).readonly(),
|
|
26141
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
26142
|
+
staying: array(number()).readonly(),
|
|
26143
|
+
/** Something else ran on the node's pools during the run. */
|
|
26144
|
+
contaminated: boolean(),
|
|
26145
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
26146
|
+
resultIds: array(string()).readonly()
|
|
26147
|
+
});
|
|
26148
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
26149
|
+
var NodeBenchmarkStatusSchema = object({
|
|
26150
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
26151
|
+
modeNodeId: string().nullable(),
|
|
26152
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
26153
|
+
});
|
|
26154
|
+
/**
|
|
26155
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
26156
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
26157
|
+
* ends, never by anyone else.
|
|
26158
|
+
*/
|
|
26159
|
+
var NodeBenchmarkResultSchema = object({
|
|
26160
|
+
id: string(),
|
|
26161
|
+
runId: string(),
|
|
26162
|
+
nodeId: string(),
|
|
26163
|
+
cell: NodeBenchCellSchema,
|
|
26164
|
+
fpsPerStream: number(),
|
|
26165
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26166
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26167
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
26168
|
+
contaminated: boolean(),
|
|
26169
|
+
stayingCameras: array(number()).readonly(),
|
|
26170
|
+
/** The run ended early; the cell itself completed. */
|
|
26171
|
+
partialRun: boolean(),
|
|
26172
|
+
measuredAtMs: number()
|
|
26173
|
+
});
|
|
26174
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
26175
|
+
nodeId: string().optional(),
|
|
26176
|
+
deviceKey: string().optional()
|
|
26177
|
+
});
|
|
26178
|
+
/** A result with its standing today: does it still beat the table? */
|
|
26179
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
26180
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
26181
|
+
standing: _enum([
|
|
26182
|
+
"fresh",
|
|
26183
|
+
"stale",
|
|
26184
|
+
"superseded"
|
|
26185
|
+
]),
|
|
26186
|
+
staleWhy: _enum([
|
|
26187
|
+
"age",
|
|
26188
|
+
"runtime",
|
|
26189
|
+
"pool-tuning"
|
|
26190
|
+
]).nullable()
|
|
26191
|
+
});
|
|
26192
|
+
object({
|
|
26193
|
+
runId: string(),
|
|
26194
|
+
nodeId: string(),
|
|
26195
|
+
startedAtMs: number(),
|
|
26196
|
+
deadlineAtMs: number(),
|
|
26197
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26198
|
+
moved: array(number()).readonly(),
|
|
26199
|
+
staying: array(number()).readonly()
|
|
26200
|
+
});
|
|
26201
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
26202
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
26203
|
+
nodeId: string(),
|
|
26204
|
+
reachable: boolean(),
|
|
26205
|
+
devices: array(object({
|
|
26206
|
+
deviceKey: string(),
|
|
26207
|
+
enabled: boolean(),
|
|
26208
|
+
available: boolean(),
|
|
26209
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
26210
|
+
suggested: array(string()).readonly(),
|
|
26211
|
+
/** Every root detector the device has a build for. */
|
|
26212
|
+
all: array(string()).readonly(),
|
|
26213
|
+
/** The model the device runs now, when pinned. */
|
|
26214
|
+
currentModelId: string().nullable()
|
|
26215
|
+
})).readonly(),
|
|
26216
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
26217
|
+
steps: array(object({
|
|
26218
|
+
id: string(),
|
|
26219
|
+
name: string(),
|
|
26220
|
+
slot: string()
|
|
26221
|
+
})).readonly()
|
|
26222
|
+
});
|
|
24343
26223
|
object({
|
|
24344
26224
|
activeCameras: number(),
|
|
24345
26225
|
throttledCameras: number(),
|
|
@@ -25257,14 +27137,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
25257
27137
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
25258
27138
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
25259
27139
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
25260
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
25261
|
-
* per
|
|
27140
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
27141
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
27142
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
27143
|
+
* (D762).
|
|
25262
27144
|
*/
|
|
25263
27145
|
devices: array(object({
|
|
25264
27146
|
deviceKey: string(),
|
|
25265
27147
|
backend: string(),
|
|
25266
|
-
attachedCameras: number()
|
|
25267
|
-
queueDepthTotal: number()
|
|
27148
|
+
attachedCameras: number()
|
|
25268
27149
|
})).default([]),
|
|
25269
27150
|
/** Hardware capability flags reported by this node. */
|
|
25270
27151
|
hardware: object({
|
|
@@ -25467,7 +27348,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25467
27348
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
25468
27349
|
deviceId: number(),
|
|
25469
27350
|
trackId: string()
|
|
25470
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27351
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27352
|
+
accepted: literal(true),
|
|
27353
|
+
runId: string()
|
|
27354
|
+
}), {
|
|
27355
|
+
kind: "mutation",
|
|
27356
|
+
auth: "admin"
|
|
27357
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27358
|
+
kind: "mutation",
|
|
27359
|
+
auth: "admin"
|
|
27360
|
+
});
|
|
25471
27361
|
var CameraPipelineConfigSchema = object({
|
|
25472
27362
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
25473
27363
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -25478,14 +27368,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
25478
27368
|
settings: record(string(), unknown()).readonly().optional()
|
|
25479
27369
|
}).nullable().optional()
|
|
25480
27370
|
});
|
|
25481
|
-
var PipelineTemplateSchema = object({
|
|
25482
|
-
id: string(),
|
|
25483
|
-
name: string(),
|
|
25484
|
-
description: string().optional(),
|
|
25485
|
-
config: CameraPipelineConfigSchema,
|
|
25486
|
-
createdAt: string(),
|
|
25487
|
-
updatedAt: string()
|
|
25488
|
-
});
|
|
25489
27371
|
var DeviceStepConfigSchema = object({
|
|
25490
27372
|
modelId: string().optional(),
|
|
25491
27373
|
settings: record(string(), unknown()).optional(),
|
|
@@ -25559,9 +27441,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
25559
27441
|
modelId: string().optional(),
|
|
25560
27442
|
settings: record(string(), unknown()).readonly().optional()
|
|
25561
27443
|
});
|
|
27444
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
25562
27445
|
var CameraPipelineSettingsSchema = object({
|
|
25563
|
-
pinnedAgentNodeId: string().optional(),
|
|
25564
27446
|
stepToggles: record(string(), boolean()).optional(),
|
|
27447
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
25565
27448
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
25566
27449
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25567
27450
|
});
|
|
@@ -25594,7 +27477,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25594
27477
|
});
|
|
25595
27478
|
/**
|
|
25596
27479
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25597
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27480
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27481
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27482
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27483
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25598
27484
|
*/
|
|
25599
27485
|
var AgentLoadSummarySchema = object({
|
|
25600
27486
|
nodeId: string(),
|
|
@@ -25683,26 +27569,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25683
27569
|
width: number(),
|
|
25684
27570
|
height: number(),
|
|
25685
27571
|
subscribers: number(),
|
|
25686
|
-
|
|
25687
|
-
|
|
27572
|
+
/**
|
|
27573
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27574
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27575
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27576
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27577
|
+
* camera and is not served (D758).
|
|
27578
|
+
*/
|
|
27579
|
+
inFps: number().nullable()
|
|
25688
27580
|
})).readonly(),
|
|
25689
27581
|
webrtcSessions: number(),
|
|
25690
27582
|
rtspRestream: boolean()
|
|
25691
27583
|
});
|
|
25692
|
-
/**
|
|
25693
|
-
|
|
25694
|
-
|
|
25695
|
-
|
|
25696
|
-
|
|
25697
|
-
|
|
25698
|
-
|
|
25699
|
-
|
|
25700
|
-
var CameraDecoderStatusSchema = object({
|
|
25701
|
-
nodeId: string(),
|
|
25702
|
-
formats: array(string()).readonly(),
|
|
25703
|
-
sessionCount: number(),
|
|
25704
|
-
shm: CameraDecoderShmSchema
|
|
25705
|
-
});
|
|
27584
|
+
/**
|
|
27585
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27586
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27587
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27588
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27589
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27590
|
+
* detector), never from a counter nothing feeds.
|
|
27591
|
+
*/
|
|
27592
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25706
27593
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25707
27594
|
var CameraMotionStatusSchema = object({
|
|
25708
27595
|
enabled: boolean(),
|
|
@@ -26059,12 +27946,6 @@ method(object({
|
|
|
26059
27946
|
}), object({ success: literal(true) }), {
|
|
26060
27947
|
kind: "mutation",
|
|
26061
27948
|
auth: "admin"
|
|
26062
|
-
}), method(object({
|
|
26063
|
-
agentNodeId: string(),
|
|
26064
|
-
detectWeight: number().positive().nullable()
|
|
26065
|
-
}), object({ success: literal(true) }), {
|
|
26066
|
-
kind: "mutation",
|
|
26067
|
-
auth: "admin"
|
|
26068
27949
|
}), method(object({
|
|
26069
27950
|
agentNodeId: string(),
|
|
26070
27951
|
detect: boolean().nullable().optional(),
|
|
@@ -26106,6 +27987,30 @@ method(object({
|
|
|
26106
27987
|
}), {
|
|
26107
27988
|
kind: "mutation",
|
|
26108
27989
|
auth: "admin"
|
|
27990
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27991
|
+
kind: "mutation",
|
|
27992
|
+
auth: "admin"
|
|
27993
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27994
|
+
kind: "mutation",
|
|
27995
|
+
auth: "admin"
|
|
27996
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27997
|
+
kind: "mutation",
|
|
27998
|
+
auth: "admin"
|
|
27999
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
28000
|
+
kind: literal("started"),
|
|
28001
|
+
runId: string()
|
|
28002
|
+
}), object({
|
|
28003
|
+
kind: literal("refused"),
|
|
28004
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
28005
|
+
})]), {
|
|
28006
|
+
kind: "mutation",
|
|
28007
|
+
auth: "admin"
|
|
28008
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
28009
|
+
kind: "mutation",
|
|
28010
|
+
auth: "admin"
|
|
28011
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
28012
|
+
kind: "mutation",
|
|
28013
|
+
auth: "admin"
|
|
26109
28014
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
26110
28015
|
deviceId: number(),
|
|
26111
28016
|
addonId: string(),
|
|
@@ -26122,6 +28027,13 @@ method(object({
|
|
|
26122
28027
|
}), object({ success: literal(true) }), {
|
|
26123
28028
|
kind: "mutation",
|
|
26124
28029
|
auth: "admin"
|
|
28030
|
+
}), method(object({
|
|
28031
|
+
deviceId: number(),
|
|
28032
|
+
addonId: string(),
|
|
28033
|
+
settings: record(string(), unknown()).nullable()
|
|
28034
|
+
}), object({ success: literal(true) }), {
|
|
28035
|
+
kind: "mutation",
|
|
28036
|
+
auth: "admin"
|
|
26125
28037
|
}), method(object({
|
|
26126
28038
|
deviceId: number(),
|
|
26127
28039
|
agentNodeId: string(),
|
|
@@ -26145,25 +28057,7 @@ method(object({
|
|
|
26145
28057
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
26146
28058
|
kind: "mutation",
|
|
26147
28059
|
auth: "admin"
|
|
26148
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
26149
|
-
name: string(),
|
|
26150
|
-
description: string().optional(),
|
|
26151
|
-
config: CameraPipelineConfigSchema
|
|
26152
|
-
}), PipelineTemplateSchema, {
|
|
26153
|
-
kind: "mutation",
|
|
26154
|
-
auth: "admin"
|
|
26155
|
-
}), method(object({
|
|
26156
|
-
id: string(),
|
|
26157
|
-
name: string().optional(),
|
|
26158
|
-
description: string().optional(),
|
|
26159
|
-
config: CameraPipelineConfigSchema.optional()
|
|
26160
|
-
}), PipelineTemplateSchema, {
|
|
26161
|
-
kind: "mutation",
|
|
26162
|
-
auth: "admin"
|
|
26163
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
26164
|
-
kind: "mutation",
|
|
26165
|
-
auth: "admin"
|
|
26166
|
-
});
|
|
28060
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
26167
28061
|
/**
|
|
26168
28062
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
26169
28063
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26857,7 +28751,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26857
28751
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26858
28752
|
* operator already consented to.
|
|
26859
28753
|
*/
|
|
26860
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
28754
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
28755
|
+
/**
|
|
28756
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
28757
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
28758
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
28759
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
28760
|
+
*/
|
|
28761
|
+
linkIntent: string().optional(),
|
|
28762
|
+
/**
|
|
28763
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28764
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
28765
|
+
*/
|
|
28766
|
+
issuer: string().optional()
|
|
26861
28767
|
});
|
|
26862
28768
|
method(object({
|
|
26863
28769
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28934,8 +30840,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
28934
30840
|
]).nullable(),
|
|
28935
30841
|
/** Input FPS from the camera (null for adaptive). */
|
|
28936
30842
|
inputFps: number().nullable(),
|
|
28937
|
-
/** Decoded FPS (null for adaptive). */
|
|
28938
|
-
decodeFps: number().nullable(),
|
|
28939
30843
|
/** Bitrate in kbps (null for adaptive). */
|
|
28940
30844
|
bitrateKbps: number().nullable()
|
|
28941
30845
|
});
|
|
@@ -29212,7 +31116,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
29212
31116
|
* field their hints were silently stripped by the schema and the
|
|
29213
31117
|
* adaptive ladder started blind on the client's display size.
|
|
29214
31118
|
*/
|
|
29215
|
-
hints: webrtcClientHintsSchema.optional()
|
|
31119
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
31120
|
+
/**
|
|
31121
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
31122
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
31123
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
31124
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
31125
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
31126
|
+
*
|
|
31127
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
31128
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
31129
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
31130
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
31131
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
31132
|
+
* flag must not become a second door to the camera's speaker.
|
|
31133
|
+
*/
|
|
31134
|
+
talkback: boolean().optional()
|
|
29216
31135
|
}), object({
|
|
29217
31136
|
sessionId: string(),
|
|
29218
31137
|
sdpAnswer: string()
|
|
@@ -29514,6 +31433,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
29514
31433
|
var RestartAddonResultSchema = unknown();
|
|
29515
31434
|
var InstallPackageResultSchema = unknown();
|
|
29516
31435
|
var ReloadPackagesResultSchema = unknown();
|
|
31436
|
+
/**
|
|
31437
|
+
* What an uninstall did on ONE node.
|
|
31438
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
31439
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
31440
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
31441
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
31442
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
31443
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
31444
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
31445
|
+
*/
|
|
31446
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
31447
|
+
"uninstalled",
|
|
31448
|
+
"not-installed",
|
|
31449
|
+
"refused",
|
|
31450
|
+
"failed",
|
|
31451
|
+
"pending-reconnect"
|
|
31452
|
+
]);
|
|
31453
|
+
var UninstallNodeResultSchema = object({
|
|
31454
|
+
nodeId: string(),
|
|
31455
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
31456
|
+
error: string().optional(),
|
|
31457
|
+
addonIds: array(string()).readonly(),
|
|
31458
|
+
runnersStopped: array(string()).readonly(),
|
|
31459
|
+
warnings: array(string()).readonly()
|
|
31460
|
+
});
|
|
31461
|
+
var UninstallPackageResultSchema = object({
|
|
31462
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
31463
|
+
success: boolean(),
|
|
31464
|
+
packageName: string(),
|
|
31465
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
31466
|
+
});
|
|
31467
|
+
/**
|
|
31468
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
31469
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
31470
|
+
*/
|
|
31471
|
+
var PackageInstallationsSchema = object({
|
|
31472
|
+
installations: array(object({
|
|
31473
|
+
packageName: string(),
|
|
31474
|
+
nodeId: string(),
|
|
31475
|
+
nodeName: string(),
|
|
31476
|
+
isHub: boolean(),
|
|
31477
|
+
isOnline: boolean(),
|
|
31478
|
+
version: string().nullable(),
|
|
31479
|
+
addonIds: array(string()).readonly(),
|
|
31480
|
+
source: _enum(["live", "recorded"]),
|
|
31481
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
31482
|
+
onHub: boolean()
|
|
31483
|
+
})).readonly(),
|
|
31484
|
+
unreachable: array(object({
|
|
31485
|
+
nodeId: string(),
|
|
31486
|
+
error: string()
|
|
31487
|
+
})).readonly()
|
|
31488
|
+
});
|
|
29517
31489
|
var BulkUpdateItemStatusSchema = _enum([
|
|
29518
31490
|
"queued",
|
|
29519
31491
|
"updating",
|
|
@@ -29596,10 +31568,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
29596
31568
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
29597
31569
|
kind: "mutation",
|
|
29598
31570
|
auth: "admin"
|
|
29599
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31571
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31572
|
+
packageName: string().min(1),
|
|
31573
|
+
nodeId: string().optional(),
|
|
31574
|
+
everywhere: boolean().optional()
|
|
31575
|
+
}), UninstallPackageResultSchema, {
|
|
29600
31576
|
kind: "mutation",
|
|
29601
31577
|
auth: "admin"
|
|
29602
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
31578
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
29603
31579
|
kind: "mutation",
|
|
29604
31580
|
auth: "admin"
|
|
29605
31581
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -32664,6 +34640,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
32664
34640
|
enabled: boolean().optional(),
|
|
32665
34641
|
info: record(string(), unknown()).optional(),
|
|
32666
34642
|
settings: record(string(), unknown()).optional(),
|
|
34643
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
34644
|
+
* the keychain, not the table (D787). */
|
|
34645
|
+
secretKeys: array(string()).optional(),
|
|
32667
34646
|
skipRestart: boolean().optional()
|
|
32668
34647
|
});
|
|
32669
34648
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -32687,7 +34666,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
32687
34666
|
auth: "admin"
|
|
32688
34667
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
32689
34668
|
id: string(),
|
|
32690
|
-
settings: record(string(), unknown())
|
|
34669
|
+
settings: record(string(), unknown()),
|
|
34670
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
34671
|
+
secretKeys: array(string()).optional()
|
|
32691
34672
|
}), object({ success: boolean() }), {
|
|
32692
34673
|
kind: "mutation",
|
|
32693
34674
|
auth: "admin"
|
|
@@ -40070,6 +42051,32 @@ var TotpStatusSchema = object({
|
|
|
40070
42051
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
40071
42052
|
confirmedAt: number().nullable()
|
|
40072
42053
|
});
|
|
42054
|
+
/**
|
|
42055
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
42056
|
+
* and scoped tokens.
|
|
42057
|
+
*
|
|
42058
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
42059
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
42060
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
42061
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
42062
|
+
* provider.
|
|
42063
|
+
*/
|
|
42064
|
+
var ExternalIdentitySchema = object({
|
|
42065
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
42066
|
+
provider: string(),
|
|
42067
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
42068
|
+
subject: string(),
|
|
42069
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
42070
|
+
issuer: string(),
|
|
42071
|
+
userId: string(),
|
|
42072
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
42073
|
+
label: string().optional(),
|
|
42074
|
+
linkedAt: number()
|
|
42075
|
+
});
|
|
42076
|
+
var ExternalIdentityKeySchema = object({
|
|
42077
|
+
provider: string().min(1),
|
|
42078
|
+
subject: string().min(1)
|
|
42079
|
+
});
|
|
40073
42080
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
40074
42081
|
kind: "mutation",
|
|
40075
42082
|
auth: "admin",
|
|
@@ -40183,7 +42190,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
40183
42190
|
userId: string(),
|
|
40184
42191
|
username: string(),
|
|
40185
42192
|
scopes: array(TokenScopeSchema)
|
|
40186
|
-
}).nullable(), { access: "view" }), method(
|
|
42193
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
42194
|
+
userId: string(),
|
|
42195
|
+
issuer: string()
|
|
42196
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
42197
|
+
userId: string(),
|
|
42198
|
+
issuer: string().min(1),
|
|
42199
|
+
label: string().optional()
|
|
42200
|
+
}), object({ success: literal(true) }), {
|
|
42201
|
+
kind: "mutation",
|
|
42202
|
+
auth: "admin",
|
|
42203
|
+
access: "create"
|
|
42204
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
42205
|
+
kind: "mutation",
|
|
42206
|
+
auth: "admin",
|
|
42207
|
+
access: "delete"
|
|
42208
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
40187
42209
|
kind: "mutation",
|
|
40188
42210
|
auth: "admin",
|
|
40189
42211
|
access: "delete"
|
|
@@ -40885,6 +42907,16 @@ var zoneRulesCapability = {
|
|
|
40885
42907
|
durability: "restored"
|
|
40886
42908
|
};
|
|
40887
42909
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
42910
|
+
Object.freeze({
|
|
42911
|
+
person: .5,
|
|
42912
|
+
vehicle: .5,
|
|
42913
|
+
animal: .5
|
|
42914
|
+
});
|
|
42915
|
+
Object.freeze({
|
|
42916
|
+
person: .65,
|
|
42917
|
+
vehicle: .65,
|
|
42918
|
+
animal: .65
|
|
42919
|
+
});
|
|
40888
42920
|
/**
|
|
40889
42921
|
* Accessory device helpers — shared across drivers.
|
|
40890
42922
|
*
|
|
@@ -41375,7 +43407,8 @@ var BaseDevice = class {
|
|
|
41375
43407
|
this.role = options.role;
|
|
41376
43408
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
41377
43409
|
const seedData = ctx.persistedConfig ?? {};
|
|
41378
|
-
|
|
43410
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
43411
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
41379
43412
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
41380
43413
|
tags: {
|
|
41381
43414
|
deviceId: ctx.id,
|
|
@@ -42598,6 +44631,12 @@ Object.freeze({
|
|
|
42598
44631
|
addonId: null,
|
|
42599
44632
|
access: "view"
|
|
42600
44633
|
},
|
|
44634
|
+
"addons.listInstallations": {
|
|
44635
|
+
capName: "addons",
|
|
44636
|
+
capScope: "system",
|
|
44637
|
+
addonId: null,
|
|
44638
|
+
access: "view"
|
|
44639
|
+
},
|
|
42601
44640
|
"addons.listJobs": {
|
|
42602
44641
|
capName: "addons",
|
|
42603
44642
|
capScope: "system",
|
|
@@ -43780,90 +45819,18 @@ Object.freeze({
|
|
|
43780
45819
|
addonId: null,
|
|
43781
45820
|
access: "create"
|
|
43782
45821
|
},
|
|
43783
|
-
"decoder.createSession": {
|
|
43784
|
-
capName: "decoder",
|
|
43785
|
-
capScope: "system",
|
|
43786
|
-
addonId: null,
|
|
43787
|
-
access: "view"
|
|
43788
|
-
},
|
|
43789
|
-
"decoder.destroySession": {
|
|
43790
|
-
capName: "decoder",
|
|
43791
|
-
capScope: "system",
|
|
43792
|
-
addonId: null,
|
|
43793
|
-
access: "delete"
|
|
43794
|
-
},
|
|
43795
|
-
"decoder.getFrame": {
|
|
43796
|
-
capName: "decoder",
|
|
43797
|
-
capScope: "system",
|
|
43798
|
-
addonId: null,
|
|
43799
|
-
access: "view"
|
|
43800
|
-
},
|
|
43801
45822
|
"decoder.getInfo": {
|
|
43802
45823
|
capName: "decoder",
|
|
43803
45824
|
capScope: "system",
|
|
43804
45825
|
addonId: null,
|
|
43805
45826
|
access: "view"
|
|
43806
45827
|
},
|
|
43807
|
-
"decoder.getShmStats": {
|
|
43808
|
-
capName: "decoder",
|
|
43809
|
-
capScope: "system",
|
|
43810
|
-
addonId: null,
|
|
43811
|
-
access: "view"
|
|
43812
|
-
},
|
|
43813
|
-
"decoder.getStats": {
|
|
43814
|
-
capName: "decoder",
|
|
43815
|
-
capScope: "system",
|
|
43816
|
-
addonId: null,
|
|
43817
|
-
access: "view"
|
|
43818
|
-
},
|
|
43819
|
-
"decoder.listActiveSessions": {
|
|
43820
|
-
capName: "decoder",
|
|
43821
|
-
capScope: "system",
|
|
43822
|
-
addonId: null,
|
|
43823
|
-
access: "view"
|
|
43824
|
-
},
|
|
43825
|
-
"decoder.openStream": {
|
|
43826
|
-
capName: "decoder",
|
|
43827
|
-
capScope: "system",
|
|
43828
|
-
addonId: null,
|
|
43829
|
-
access: "view"
|
|
43830
|
-
},
|
|
43831
|
-
"decoder.pullFrames": {
|
|
43832
|
-
capName: "decoder",
|
|
43833
|
-
capScope: "system",
|
|
43834
|
-
addonId: null,
|
|
43835
|
-
access: "view"
|
|
43836
|
-
},
|
|
43837
|
-
"decoder.pullHandles": {
|
|
43838
|
-
capName: "decoder",
|
|
43839
|
-
capScope: "system",
|
|
43840
|
-
addonId: null,
|
|
43841
|
-
access: "view"
|
|
43842
|
-
},
|
|
43843
|
-
"decoder.pushPacket": {
|
|
43844
|
-
capName: "decoder",
|
|
43845
|
-
capScope: "system",
|
|
43846
|
-
addonId: null,
|
|
43847
|
-
access: "view"
|
|
43848
|
-
},
|
|
43849
45828
|
"decoder.reprobeHwaccel": {
|
|
43850
45829
|
capName: "decoder",
|
|
43851
45830
|
capScope: "system",
|
|
43852
45831
|
addonId: null,
|
|
43853
45832
|
access: "create"
|
|
43854
45833
|
},
|
|
43855
|
-
"decoder.supportsCodec": {
|
|
43856
|
-
capName: "decoder",
|
|
43857
|
-
capScope: "system",
|
|
43858
|
-
addonId: null,
|
|
43859
|
-
access: "view"
|
|
43860
|
-
},
|
|
43861
|
-
"decoder.updateConfig": {
|
|
43862
|
-
capName: "decoder",
|
|
43863
|
-
capScope: "system",
|
|
43864
|
-
addonId: null,
|
|
43865
|
-
access: "view"
|
|
43866
|
-
},
|
|
43867
45834
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
43868
45835
|
capName: "detection-pipeline",
|
|
43869
45836
|
capScope: "device",
|
|
@@ -45130,6 +47097,90 @@ Object.freeze({
|
|
|
45130
47097
|
addonId: null,
|
|
45131
47098
|
access: "create"
|
|
45132
47099
|
},
|
|
47100
|
+
"keychain.delete": {
|
|
47101
|
+
capName: "keychain",
|
|
47102
|
+
capScope: "system",
|
|
47103
|
+
addonId: null,
|
|
47104
|
+
access: "delete"
|
|
47105
|
+
},
|
|
47106
|
+
"keychain.getState": {
|
|
47107
|
+
capName: "keychain",
|
|
47108
|
+
capScope: "system",
|
|
47109
|
+
addonId: null,
|
|
47110
|
+
access: "view"
|
|
47111
|
+
},
|
|
47112
|
+
"keychain.listMeta": {
|
|
47113
|
+
capName: "keychain",
|
|
47114
|
+
capScope: "system",
|
|
47115
|
+
addonId: null,
|
|
47116
|
+
access: "view"
|
|
47117
|
+
},
|
|
47118
|
+
"keychain.put": {
|
|
47119
|
+
capName: "keychain",
|
|
47120
|
+
capScope: "system",
|
|
47121
|
+
addonId: null,
|
|
47122
|
+
access: "create"
|
|
47123
|
+
},
|
|
47124
|
+
"keychain.resolve": {
|
|
47125
|
+
capName: "keychain",
|
|
47126
|
+
capScope: "system",
|
|
47127
|
+
addonId: null,
|
|
47128
|
+
access: "view"
|
|
47129
|
+
},
|
|
47130
|
+
"keychainAdmin.deleteOrphans": {
|
|
47131
|
+
capName: "keychain-admin",
|
|
47132
|
+
capScope: "system",
|
|
47133
|
+
addonId: null,
|
|
47134
|
+
access: "delete"
|
|
47135
|
+
},
|
|
47136
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
47137
|
+
capName: "keychain-admin",
|
|
47138
|
+
capScope: "system",
|
|
47139
|
+
addonId: null,
|
|
47140
|
+
access: "create"
|
|
47141
|
+
},
|
|
47142
|
+
"keychainAdmin.listAudit": {
|
|
47143
|
+
capName: "keychain-admin",
|
|
47144
|
+
capScope: "system",
|
|
47145
|
+
addonId: null,
|
|
47146
|
+
access: "view"
|
|
47147
|
+
},
|
|
47148
|
+
"keychainAdmin.listSecrets": {
|
|
47149
|
+
capName: "keychain-admin",
|
|
47150
|
+
capScope: "system",
|
|
47151
|
+
addonId: null,
|
|
47152
|
+
access: "view"
|
|
47153
|
+
},
|
|
47154
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
47155
|
+
capName: "keychain-admin",
|
|
47156
|
+
capScope: "system",
|
|
47157
|
+
addonId: null,
|
|
47158
|
+
access: "delete"
|
|
47159
|
+
},
|
|
47160
|
+
"keychainAdmin.resetKeychain": {
|
|
47161
|
+
capName: "keychain-admin",
|
|
47162
|
+
capScope: "system",
|
|
47163
|
+
addonId: null,
|
|
47164
|
+
access: "delete"
|
|
47165
|
+
},
|
|
47166
|
+
"keychainAdmin.reveal": {
|
|
47167
|
+
capName: "keychain-admin",
|
|
47168
|
+
capScope: "system",
|
|
47169
|
+
addonId: null,
|
|
47170
|
+
access: "create"
|
|
47171
|
+
},
|
|
47172
|
+
"keychainAdmin.rotateMasterKey": {
|
|
47173
|
+
capName: "keychain-admin",
|
|
47174
|
+
capScope: "system",
|
|
47175
|
+
addonId: null,
|
|
47176
|
+
access: "create"
|
|
47177
|
+
},
|
|
47178
|
+
"keychainAdmin.status": {
|
|
47179
|
+
capName: "keychain-admin",
|
|
47180
|
+
capScope: "system",
|
|
47181
|
+
addonId: null,
|
|
47182
|
+
access: "view"
|
|
47183
|
+
},
|
|
45133
47184
|
"lawnMowerControl.dock": {
|
|
45134
47185
|
capName: "lawn-mower-control",
|
|
45135
47186
|
capScope: "device",
|
|
@@ -46504,6 +48555,18 @@ Object.freeze({
|
|
|
46504
48555
|
addonId: null,
|
|
46505
48556
|
access: "create"
|
|
46506
48557
|
},
|
|
48558
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
48559
|
+
capName: "pipeline-analytics",
|
|
48560
|
+
capScope: "device",
|
|
48561
|
+
addonId: null,
|
|
48562
|
+
access: "create"
|
|
48563
|
+
},
|
|
48564
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
48565
|
+
capName: "pipeline-analytics",
|
|
48566
|
+
capScope: "device",
|
|
48567
|
+
addonId: null,
|
|
48568
|
+
access: "create"
|
|
48569
|
+
},
|
|
46507
48570
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
46508
48571
|
capName: "pipeline-analytics",
|
|
46509
48572
|
capScope: "device",
|
|
@@ -46552,12 +48615,24 @@ Object.freeze({
|
|
|
46552
48615
|
addonId: null,
|
|
46553
48616
|
access: "view"
|
|
46554
48617
|
},
|
|
48618
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
48619
|
+
capName: "pipeline-analytics",
|
|
48620
|
+
capScope: "device",
|
|
48621
|
+
addonId: null,
|
|
48622
|
+
access: "create"
|
|
48623
|
+
},
|
|
46555
48624
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
46556
48625
|
capName: "pipeline-analytics",
|
|
46557
48626
|
capScope: "device",
|
|
46558
48627
|
addonId: null,
|
|
46559
48628
|
access: "delete"
|
|
46560
48629
|
},
|
|
48630
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
48631
|
+
capName: "pipeline-analytics",
|
|
48632
|
+
capScope: "device",
|
|
48633
|
+
addonId: null,
|
|
48634
|
+
access: "delete"
|
|
48635
|
+
},
|
|
46561
48636
|
"pipelineAnalytics.deleteTracks": {
|
|
46562
48637
|
capName: "pipeline-analytics",
|
|
46563
48638
|
capScope: "device",
|
|
@@ -46762,6 +48837,24 @@ Object.freeze({
|
|
|
46762
48837
|
addonId: null,
|
|
46763
48838
|
access: "view"
|
|
46764
48839
|
},
|
|
48840
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
48841
|
+
capName: "pipeline-analytics",
|
|
48842
|
+
capScope: "device",
|
|
48843
|
+
addonId: null,
|
|
48844
|
+
access: "view"
|
|
48845
|
+
},
|
|
48846
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
48847
|
+
capName: "pipeline-analytics",
|
|
48848
|
+
capScope: "device",
|
|
48849
|
+
addonId: null,
|
|
48850
|
+
access: "view"
|
|
48851
|
+
},
|
|
48852
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
48853
|
+
capName: "pipeline-analytics",
|
|
48854
|
+
capScope: "device",
|
|
48855
|
+
addonId: null,
|
|
48856
|
+
access: "view"
|
|
48857
|
+
},
|
|
46765
48858
|
"pipelineAnalytics.listRetrainFrames": {
|
|
46766
48859
|
capName: "pipeline-analytics",
|
|
46767
48860
|
capScope: "device",
|
|
@@ -46810,6 +48903,12 @@ Object.freeze({
|
|
|
46810
48903
|
addonId: null,
|
|
46811
48904
|
access: "create"
|
|
46812
48905
|
},
|
|
48906
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
48907
|
+
capName: "pipeline-analytics",
|
|
48908
|
+
capScope: "device",
|
|
48909
|
+
addonId: null,
|
|
48910
|
+
access: "create"
|
|
48911
|
+
},
|
|
46813
48912
|
"pipelineAnalytics.pruneEvents": {
|
|
46814
48913
|
capName: "pipeline-analytics",
|
|
46815
48914
|
capScope: "device",
|
|
@@ -46864,6 +48963,18 @@ Object.freeze({
|
|
|
46864
48963
|
addonId: null,
|
|
46865
48964
|
access: "create"
|
|
46866
48965
|
},
|
|
48966
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
48967
|
+
capName: "pipeline-analytics",
|
|
48968
|
+
capScope: "device",
|
|
48969
|
+
addonId: null,
|
|
48970
|
+
access: "delete"
|
|
48971
|
+
},
|
|
48972
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
48973
|
+
capName: "pipeline-analytics",
|
|
48974
|
+
capScope: "device",
|
|
48975
|
+
addonId: null,
|
|
48976
|
+
access: "create"
|
|
48977
|
+
},
|
|
46867
48978
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
46868
48979
|
capName: "pipeline-analytics",
|
|
46869
48980
|
capScope: "device",
|
|
@@ -46894,6 +49005,12 @@ Object.freeze({
|
|
|
46894
49005
|
addonId: null,
|
|
46895
49006
|
access: "create"
|
|
46896
49007
|
},
|
|
49008
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
49009
|
+
capName: "pipeline-analytics",
|
|
49010
|
+
capScope: "device",
|
|
49011
|
+
addonId: null,
|
|
49012
|
+
access: "create"
|
|
49013
|
+
},
|
|
46897
49014
|
"pipelineAnalytics.setTrackFlags": {
|
|
46898
49015
|
capName: "pipeline-analytics",
|
|
46899
49016
|
capScope: "device",
|
|
@@ -46930,6 +49047,12 @@ Object.freeze({
|
|
|
46930
49047
|
addonId: null,
|
|
46931
49048
|
access: "delete"
|
|
46932
49049
|
},
|
|
49050
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
49051
|
+
capName: "pipeline-analytics",
|
|
49052
|
+
capScope: "device",
|
|
49053
|
+
addonId: null,
|
|
49054
|
+
access: "create"
|
|
49055
|
+
},
|
|
46933
49056
|
"pipelineExecutor.cacheFrameInPool": {
|
|
46934
49057
|
capName: "pipeline-executor",
|
|
46935
49058
|
capScope: "system",
|
|
@@ -46942,13 +49065,13 @@ Object.freeze({
|
|
|
46942
49065
|
addonId: null,
|
|
46943
49066
|
access: "delete"
|
|
46944
49067
|
},
|
|
46945
|
-
"pipelineExecutor.
|
|
49068
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
46946
49069
|
capName: "pipeline-executor",
|
|
46947
49070
|
capScope: "system",
|
|
46948
49071
|
addonId: null,
|
|
46949
49072
|
access: "delete"
|
|
46950
49073
|
},
|
|
46951
|
-
"pipelineExecutor.
|
|
49074
|
+
"pipelineExecutor.deleteModel": {
|
|
46952
49075
|
capName: "pipeline-executor",
|
|
46953
49076
|
capScope: "system",
|
|
46954
49077
|
addonId: null,
|
|
@@ -47092,12 +49215,6 @@ Object.freeze({
|
|
|
47092
49215
|
addonId: null,
|
|
47093
49216
|
access: "view"
|
|
47094
49217
|
},
|
|
47095
|
-
"pipelineExecutor.listTemplates": {
|
|
47096
|
-
capName: "pipeline-executor",
|
|
47097
|
-
capScope: "system",
|
|
47098
|
-
addonId: null,
|
|
47099
|
-
access: "view"
|
|
47100
|
-
},
|
|
47101
49218
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
47102
49219
|
capName: "pipeline-executor",
|
|
47103
49220
|
capScope: "system",
|
|
@@ -47122,12 +49239,6 @@ Object.freeze({
|
|
|
47122
49239
|
addonId: null,
|
|
47123
49240
|
access: "create"
|
|
47124
49241
|
},
|
|
47125
|
-
"pipelineExecutor.saveTemplate": {
|
|
47126
|
-
capName: "pipeline-executor",
|
|
47127
|
-
capScope: "system",
|
|
47128
|
-
addonId: null,
|
|
47129
|
-
access: "create"
|
|
47130
|
-
},
|
|
47131
49242
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
47132
49243
|
capName: "pipeline-executor",
|
|
47133
49244
|
capScope: "system",
|
|
@@ -47146,17 +49257,23 @@ Object.freeze({
|
|
|
47146
49257
|
addonId: null,
|
|
47147
49258
|
access: "create"
|
|
47148
49259
|
},
|
|
47149
|
-
"pipelineExecutor.
|
|
49260
|
+
"pipelineExecutor.validatePipeline": {
|
|
47150
49261
|
capName: "pipeline-executor",
|
|
47151
49262
|
capScope: "system",
|
|
47152
49263
|
addonId: null,
|
|
49264
|
+
access: "view"
|
|
49265
|
+
},
|
|
49266
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
49267
|
+
capName: "pipeline-orchestrator",
|
|
49268
|
+
capScope: "system",
|
|
49269
|
+
addonId: null,
|
|
47153
49270
|
access: "create"
|
|
47154
49271
|
},
|
|
47155
|
-
"
|
|
47156
|
-
capName: "pipeline-
|
|
49272
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
49273
|
+
capName: "pipeline-orchestrator",
|
|
47157
49274
|
capScope: "system",
|
|
47158
49275
|
addonId: null,
|
|
47159
|
-
access: "
|
|
49276
|
+
access: "create"
|
|
47160
49277
|
},
|
|
47161
49278
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
47162
49279
|
capName: "pipeline-orchestrator",
|
|
@@ -47176,7 +49293,7 @@ Object.freeze({
|
|
|
47176
49293
|
addonId: null,
|
|
47177
49294
|
access: "create"
|
|
47178
49295
|
},
|
|
47179
|
-
"pipelineOrchestrator.
|
|
49296
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
47180
49297
|
capName: "pipeline-orchestrator",
|
|
47181
49298
|
capScope: "system",
|
|
47182
49299
|
addonId: null,
|
|
@@ -47272,6 +49389,12 @@ Object.freeze({
|
|
|
47272
49389
|
addonId: null,
|
|
47273
49390
|
access: "view"
|
|
47274
49391
|
},
|
|
49392
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
49393
|
+
capName: "pipeline-orchestrator",
|
|
49394
|
+
capScope: "system",
|
|
49395
|
+
addonId: null,
|
|
49396
|
+
access: "view"
|
|
49397
|
+
},
|
|
47275
49398
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
47276
49399
|
capName: "pipeline-orchestrator",
|
|
47277
49400
|
capScope: "system",
|
|
@@ -47284,6 +49407,24 @@ Object.freeze({
|
|
|
47284
49407
|
addonId: null,
|
|
47285
49408
|
access: "view"
|
|
47286
49409
|
},
|
|
49410
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
49411
|
+
capName: "pipeline-orchestrator",
|
|
49412
|
+
capScope: "system",
|
|
49413
|
+
addonId: null,
|
|
49414
|
+
access: "view"
|
|
49415
|
+
},
|
|
49416
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
49417
|
+
capName: "pipeline-orchestrator",
|
|
49418
|
+
capScope: "system",
|
|
49419
|
+
addonId: null,
|
|
49420
|
+
access: "view"
|
|
49421
|
+
},
|
|
49422
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
49423
|
+
capName: "pipeline-orchestrator",
|
|
49424
|
+
capScope: "system",
|
|
49425
|
+
addonId: null,
|
|
49426
|
+
access: "view"
|
|
49427
|
+
},
|
|
47287
49428
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
47288
49429
|
capName: "pipeline-orchestrator",
|
|
47289
49430
|
capScope: "system",
|
|
@@ -47308,6 +49449,12 @@ Object.freeze({
|
|
|
47308
49449
|
addonId: null,
|
|
47309
49450
|
access: "view"
|
|
47310
49451
|
},
|
|
49452
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
49453
|
+
capName: "pipeline-orchestrator",
|
|
49454
|
+
capScope: "system",
|
|
49455
|
+
addonId: null,
|
|
49456
|
+
access: "view"
|
|
49457
|
+
},
|
|
47311
49458
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
47312
49459
|
capName: "pipeline-orchestrator",
|
|
47313
49460
|
capScope: "system",
|
|
@@ -47320,7 +49467,7 @@ Object.freeze({
|
|
|
47320
49467
|
addonId: null,
|
|
47321
49468
|
access: "view"
|
|
47322
49469
|
},
|
|
47323
|
-
"pipelineOrchestrator.
|
|
49470
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
47324
49471
|
capName: "pipeline-orchestrator",
|
|
47325
49472
|
capScope: "system",
|
|
47326
49473
|
addonId: null,
|
|
@@ -47332,6 +49479,12 @@ Object.freeze({
|
|
|
47332
49479
|
addonId: null,
|
|
47333
49480
|
access: "create"
|
|
47334
49481
|
},
|
|
49482
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
49483
|
+
capName: "pipeline-orchestrator",
|
|
49484
|
+
capScope: "system",
|
|
49485
|
+
addonId: null,
|
|
49486
|
+
access: "view"
|
|
49487
|
+
},
|
|
47335
49488
|
"pipelineOrchestrator.rebalance": {
|
|
47336
49489
|
capName: "pipeline-orchestrator",
|
|
47337
49490
|
capScope: "system",
|
|
@@ -47374,12 +49527,6 @@ Object.freeze({
|
|
|
47374
49527
|
addonId: null,
|
|
47375
49528
|
access: "create"
|
|
47376
49529
|
},
|
|
47377
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
47378
|
-
capName: "pipeline-orchestrator",
|
|
47379
|
-
capScope: "system",
|
|
47380
|
-
addonId: null,
|
|
47381
|
-
access: "create"
|
|
47382
|
-
},
|
|
47383
49530
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
47384
49531
|
capName: "pipeline-orchestrator",
|
|
47385
49532
|
capScope: "system",
|
|
@@ -47392,12 +49539,6 @@ Object.freeze({
|
|
|
47392
49539
|
addonId: null,
|
|
47393
49540
|
access: "create"
|
|
47394
49541
|
},
|
|
47395
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
47396
|
-
capName: "pipeline-orchestrator",
|
|
47397
|
-
capScope: "system",
|
|
47398
|
-
addonId: null,
|
|
47399
|
-
access: "create"
|
|
47400
|
-
},
|
|
47401
49542
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
47402
49543
|
capName: "pipeline-orchestrator",
|
|
47403
49544
|
capScope: "system",
|
|
@@ -47434,6 +49575,12 @@ Object.freeze({
|
|
|
47434
49575
|
addonId: null,
|
|
47435
49576
|
access: "create"
|
|
47436
49577
|
},
|
|
49578
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
49579
|
+
capName: "pipeline-orchestrator",
|
|
49580
|
+
capScope: "system",
|
|
49581
|
+
addonId: null,
|
|
49582
|
+
access: "create"
|
|
49583
|
+
},
|
|
47437
49584
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
47438
49585
|
capName: "pipeline-orchestrator",
|
|
47439
49586
|
capScope: "system",
|
|
@@ -47452,12 +49599,36 @@ Object.freeze({
|
|
|
47452
49599
|
addonId: null,
|
|
47453
49600
|
access: "create"
|
|
47454
49601
|
},
|
|
49602
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
49603
|
+
capName: "pipeline-orchestrator",
|
|
49604
|
+
capScope: "system",
|
|
49605
|
+
addonId: null,
|
|
49606
|
+
access: "create"
|
|
49607
|
+
},
|
|
47455
49608
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
47456
49609
|
capName: "pipeline-orchestrator",
|
|
47457
49610
|
capScope: "system",
|
|
47458
49611
|
addonId: null,
|
|
47459
49612
|
access: "create"
|
|
47460
49613
|
},
|
|
49614
|
+
"pipelineOrchestrator.setShareSource": {
|
|
49615
|
+
capName: "pipeline-orchestrator",
|
|
49616
|
+
capScope: "system",
|
|
49617
|
+
addonId: null,
|
|
49618
|
+
access: "create"
|
|
49619
|
+
},
|
|
49620
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
49621
|
+
capName: "pipeline-orchestrator",
|
|
49622
|
+
capScope: "system",
|
|
49623
|
+
addonId: null,
|
|
49624
|
+
access: "create"
|
|
49625
|
+
},
|
|
49626
|
+
"pipelineOrchestrator.suggestShares": {
|
|
49627
|
+
capName: "pipeline-orchestrator",
|
|
49628
|
+
capScope: "system",
|
|
49629
|
+
addonId: null,
|
|
49630
|
+
access: "view"
|
|
49631
|
+
},
|
|
47461
49632
|
"pipelineOrchestrator.unassignAudio": {
|
|
47462
49633
|
capName: "pipeline-orchestrator",
|
|
47463
49634
|
capScope: "system",
|
|
@@ -47470,8 +49641,8 @@ Object.freeze({
|
|
|
47470
49641
|
addonId: null,
|
|
47471
49642
|
access: "create"
|
|
47472
49643
|
},
|
|
47473
|
-
"
|
|
47474
|
-
capName: "pipeline-
|
|
49644
|
+
"pipelineRunner.abortNodeBench": {
|
|
49645
|
+
capName: "pipeline-runner",
|
|
47475
49646
|
capScope: "system",
|
|
47476
49647
|
addonId: null,
|
|
47477
49648
|
access: "create"
|
|
@@ -47524,6 +49695,12 @@ Object.freeze({
|
|
|
47524
49695
|
addonId: null,
|
|
47525
49696
|
access: "view"
|
|
47526
49697
|
},
|
|
49698
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
49699
|
+
capName: "pipeline-runner",
|
|
49700
|
+
capScope: "system",
|
|
49701
|
+
addonId: null,
|
|
49702
|
+
access: "view"
|
|
49703
|
+
},
|
|
47527
49704
|
"pipelineRunner.getParkedTrackFrame": {
|
|
47528
49705
|
capName: "pipeline-runner",
|
|
47529
49706
|
capScope: "system",
|
|
@@ -47566,6 +49743,12 @@ Object.freeze({
|
|
|
47566
49743
|
addonId: null,
|
|
47567
49744
|
access: "create"
|
|
47568
49745
|
},
|
|
49746
|
+
"pipelineRunner.startNodeBench": {
|
|
49747
|
+
capName: "pipeline-runner",
|
|
49748
|
+
capScope: "system",
|
|
49749
|
+
addonId: null,
|
|
49750
|
+
access: "create"
|
|
49751
|
+
},
|
|
47569
49752
|
"plateGallery.assignPlate": {
|
|
47570
49753
|
capName: "plate-gallery",
|
|
47571
49754
|
capScope: "system",
|
|
@@ -48910,12 +51093,6 @@ Object.freeze({
|
|
|
48910
51093
|
addonId: null,
|
|
48911
51094
|
access: "view"
|
|
48912
51095
|
},
|
|
48913
|
-
"streamBroker.pullFrameHandles": {
|
|
48914
|
-
capName: "stream-broker",
|
|
48915
|
-
capScope: "system",
|
|
48916
|
-
addonId: null,
|
|
48917
|
-
access: "view"
|
|
48918
|
-
},
|
|
48919
51096
|
"streamBroker.regenerateRtspToken": {
|
|
48920
51097
|
capName: "stream-broker",
|
|
48921
51098
|
capScope: "system",
|
|
@@ -48982,12 +51159,6 @@ Object.freeze({
|
|
|
48982
51159
|
addonId: null,
|
|
48983
51160
|
access: "create"
|
|
48984
51161
|
},
|
|
48985
|
-
"streamBroker.subscribeFrames": {
|
|
48986
|
-
capName: "stream-broker",
|
|
48987
|
-
capScope: "system",
|
|
48988
|
-
addonId: null,
|
|
48989
|
-
access: "create"
|
|
48990
|
-
},
|
|
48991
51162
|
"streamBroker.unassignProfile": {
|
|
48992
51163
|
capName: "stream-broker",
|
|
48993
51164
|
capScope: "system",
|
|
@@ -49000,12 +51171,6 @@ Object.freeze({
|
|
|
49000
51171
|
addonId: null,
|
|
49001
51172
|
access: "create"
|
|
49002
51173
|
},
|
|
49003
|
-
"streamBroker.unsubscribeFrames": {
|
|
49004
|
-
capName: "stream-broker",
|
|
49005
|
-
capScope: "system",
|
|
49006
|
-
addonId: null,
|
|
49007
|
-
access: "create"
|
|
49008
|
-
},
|
|
49009
51174
|
"streamCatalog.getCatalog": {
|
|
49010
51175
|
capName: "stream-catalog",
|
|
49011
51176
|
capScope: "device",
|
|
@@ -49300,18 +51465,36 @@ Object.freeze({
|
|
|
49300
51465
|
addonId: null,
|
|
49301
51466
|
access: "delete"
|
|
49302
51467
|
},
|
|
51468
|
+
"userManagement.findUserByExternalIdentity": {
|
|
51469
|
+
capName: "user-management",
|
|
51470
|
+
capScope: "system",
|
|
51471
|
+
addonId: null,
|
|
51472
|
+
access: "view"
|
|
51473
|
+
},
|
|
49303
51474
|
"userManagement.getTotpStatus": {
|
|
49304
51475
|
capName: "user-management",
|
|
49305
51476
|
capScope: "system",
|
|
49306
51477
|
addonId: null,
|
|
49307
51478
|
access: "view"
|
|
49308
51479
|
},
|
|
51480
|
+
"userManagement.linkExternalIdentity": {
|
|
51481
|
+
capName: "user-management",
|
|
51482
|
+
capScope: "system",
|
|
51483
|
+
addonId: null,
|
|
51484
|
+
access: "create"
|
|
51485
|
+
},
|
|
49309
51486
|
"userManagement.listApiKeys": {
|
|
49310
51487
|
capName: "user-management",
|
|
49311
51488
|
capScope: "system",
|
|
49312
51489
|
addonId: null,
|
|
49313
51490
|
access: "view"
|
|
49314
51491
|
},
|
|
51492
|
+
"userManagement.listExternalIdentities": {
|
|
51493
|
+
capName: "user-management",
|
|
51494
|
+
capScope: "system",
|
|
51495
|
+
addonId: null,
|
|
51496
|
+
access: "view"
|
|
51497
|
+
},
|
|
49315
51498
|
"userManagement.listOauthSessions": {
|
|
49316
51499
|
capName: "user-management",
|
|
49317
51500
|
capScope: "system",
|
|
@@ -49390,6 +51573,12 @@ Object.freeze({
|
|
|
49390
51573
|
addonId: null,
|
|
49391
51574
|
access: "create"
|
|
49392
51575
|
},
|
|
51576
|
+
"userManagement.unlinkExternalIdentity": {
|
|
51577
|
+
capName: "user-management",
|
|
51578
|
+
capScope: "system",
|
|
51579
|
+
addonId: null,
|
|
51580
|
+
access: "delete"
|
|
51581
|
+
},
|
|
49393
51582
|
"userManagement.updateUser": {
|
|
49394
51583
|
capName: "user-management",
|
|
49395
51584
|
capScope: "system",
|
|
@@ -51737,11 +53926,6 @@ Object.freeze({
|
|
|
51737
53926
|
form: "single",
|
|
51738
53927
|
optional: false
|
|
51739
53928
|
}],
|
|
51740
|
-
"decoder.createSession": [{
|
|
51741
|
-
name: "deviceId",
|
|
51742
|
-
form: "single",
|
|
51743
|
-
optional: true
|
|
51744
|
-
}],
|
|
51745
53929
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
51746
53930
|
name: "deviceId",
|
|
51747
53931
|
form: "single",
|
|
@@ -52712,6 +54896,11 @@ Object.freeze({
|
|
|
52712
54896
|
form: "single",
|
|
52713
54897
|
optional: false
|
|
52714
54898
|
}],
|
|
54899
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
54900
|
+
name: "deviceId",
|
|
54901
|
+
form: "single",
|
|
54902
|
+
optional: false
|
|
54903
|
+
}],
|
|
52715
54904
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
52716
54905
|
name: "deviceId",
|
|
52717
54906
|
form: "single",
|
|
@@ -52902,6 +55091,11 @@ Object.freeze({
|
|
|
52902
55091
|
form: "single",
|
|
52903
55092
|
optional: false
|
|
52904
55093
|
}],
|
|
55094
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
55095
|
+
name: "deviceId",
|
|
55096
|
+
form: "single",
|
|
55097
|
+
optional: false
|
|
55098
|
+
}],
|
|
52905
55099
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
52906
55100
|
name: "deviceId",
|
|
52907
55101
|
form: "single",
|
|
@@ -52952,6 +55146,11 @@ Object.freeze({
|
|
|
52952
55146
|
form: "single",
|
|
52953
55147
|
optional: false
|
|
52954
55148
|
}],
|
|
55149
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
55150
|
+
name: "deviceId",
|
|
55151
|
+
form: "single",
|
|
55152
|
+
optional: false
|
|
55153
|
+
}],
|
|
52955
55154
|
"pipelineAnalytics.setTrackFlags": [{
|
|
52956
55155
|
name: "deviceId",
|
|
52957
55156
|
form: "single",
|
|
@@ -52972,6 +55171,11 @@ Object.freeze({
|
|
|
52972
55171
|
form: "single",
|
|
52973
55172
|
optional: false
|
|
52974
55173
|
}],
|
|
55174
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
55175
|
+
name: "deviceIds",
|
|
55176
|
+
form: "array",
|
|
55177
|
+
optional: true
|
|
55178
|
+
}],
|
|
52975
55179
|
"pipelineExecutor.runPipeline": [{
|
|
52976
55180
|
name: "deviceId",
|
|
52977
55181
|
form: "single",
|
|
@@ -53077,6 +55281,11 @@ Object.freeze({
|
|
|
53077
55281
|
form: "single",
|
|
53078
55282
|
optional: false
|
|
53079
55283
|
}],
|
|
55284
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
55285
|
+
name: "deviceId",
|
|
55286
|
+
form: "single",
|
|
55287
|
+
optional: false
|
|
55288
|
+
}],
|
|
53080
55289
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
53081
55290
|
name: "deviceId",
|
|
53082
55291
|
form: "single",
|
|
@@ -58527,7 +60736,7 @@ var hikvisionCameraSchema = object({
|
|
|
58527
60736
|
*/
|
|
58528
60737
|
https: boolean().default(false),
|
|
58529
60738
|
username: string().default("admin").describe("ISAPI user"),
|
|
58530
|
-
password: string().describe("ISAPI password"),
|
|
60739
|
+
password: string().describe("ISAPI password").meta({ secret: true }),
|
|
58531
60740
|
/**
|
|
58532
60741
|
* RTSP transport hint forwarded to the broker as `transportmode`.
|
|
58533
60742
|
* Most installations use `unicast`; multicast needs explicit
|