@camstack/addon-provider-rtsp 1.2.121 → 1.2.123
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 +2971 -505
- package/dist/addon.mjs +2971 -505
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
let node_net = require("node:net");
|
|
25
25
|
node_net = __toESM(node_net);
|
|
26
|
-
//#region ../types/dist/event-category-
|
|
26
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
27
27
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
28
28
|
EventCategory["SystemBoot"] = "system.boot";
|
|
29
29
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -102,6 +102,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
102
102
|
*/
|
|
103
103
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
104
104
|
/**
|
|
105
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
106
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
107
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
108
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
109
|
+
*/
|
|
110
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
111
|
+
/**
|
|
105
112
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
106
113
|
* transitions from `failed` back to `healthy` (typically via the
|
|
107
114
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -524,15 +531,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
524
531
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
525
532
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
526
533
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
527
|
-
/**
|
|
528
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
529
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
530
|
-
* `createSession`, so running sessions keep their current backend until
|
|
531
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
532
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
533
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
534
|
-
*/
|
|
535
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
536
534
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
537
535
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
538
536
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5403,7 +5401,7 @@ var ZodIssueCode = {
|
|
|
5403
5401
|
var ZodFirstPartyTypeKind;
|
|
5404
5402
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5405
5403
|
//#endregion
|
|
5406
|
-
//#region ../types/dist/sleep-
|
|
5404
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5407
5405
|
/**
|
|
5408
5406
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5409
5407
|
* window to float samples (D455).
|
|
@@ -5482,6 +5480,97 @@ function buildAlawTable() {
|
|
|
5482
5480
|
}
|
|
5483
5481
|
buildUlawTable();
|
|
5484
5482
|
buildAlawTable();
|
|
5483
|
+
/** Is this field's stored value a credential? */
|
|
5484
|
+
function isSecretConfigField(field) {
|
|
5485
|
+
if (field.type === "password") return true;
|
|
5486
|
+
return "secret" in field && field.secret === true;
|
|
5487
|
+
}
|
|
5488
|
+
/**
|
|
5489
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5490
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5491
|
+
*/
|
|
5492
|
+
function isKeychainStoredField(field) {
|
|
5493
|
+
if (!isSecretConfigField(field)) return false;
|
|
5494
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5495
|
+
return !("storage" in field && field.storage === "inline");
|
|
5496
|
+
}
|
|
5497
|
+
/**
|
|
5498
|
+
* What a settings blob holds where a secret used to be.
|
|
5499
|
+
*
|
|
5500
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5501
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5502
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5503
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5504
|
+
*
|
|
5505
|
+
* The same shapes travel to and from the admin UI:
|
|
5506
|
+
*
|
|
5507
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5508
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5509
|
+
* value is set, never the value.
|
|
5510
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5511
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5512
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5513
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5514
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5515
|
+
*
|
|
5516
|
+
* Pure and browser-safe.
|
|
5517
|
+
*/
|
|
5518
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5519
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5520
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5521
|
+
function isRecord$1(value) {
|
|
5522
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5523
|
+
}
|
|
5524
|
+
function makeSecretMarker(ref) {
|
|
5525
|
+
return {
|
|
5526
|
+
$secret: ref,
|
|
5527
|
+
v: 1
|
|
5528
|
+
};
|
|
5529
|
+
}
|
|
5530
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5531
|
+
function isSecretMarker(value) {
|
|
5532
|
+
if (!isRecord$1(value)) return false;
|
|
5533
|
+
const ref = value["$secret"];
|
|
5534
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5535
|
+
}
|
|
5536
|
+
function isSecretClear(value) {
|
|
5537
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5538
|
+
}
|
|
5539
|
+
/**
|
|
5540
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5541
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5542
|
+
* survives this function.
|
|
5543
|
+
*/
|
|
5544
|
+
function toSecretFieldView(stored) {
|
|
5545
|
+
if (isSecretMarker(stored)) return {
|
|
5546
|
+
$secret: stored.$secret,
|
|
5547
|
+
v: 1,
|
|
5548
|
+
set: true
|
|
5549
|
+
};
|
|
5550
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5551
|
+
$secret: null,
|
|
5552
|
+
v: 1,
|
|
5553
|
+
set: true,
|
|
5554
|
+
inline: true
|
|
5555
|
+
};
|
|
5556
|
+
return null;
|
|
5557
|
+
}
|
|
5558
|
+
/**
|
|
5559
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5560
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5561
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5562
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5563
|
+
*/
|
|
5564
|
+
function classifySecretWrite(incoming) {
|
|
5565
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5566
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5567
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5568
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5569
|
+
return {
|
|
5570
|
+
kind: "set",
|
|
5571
|
+
value: incoming
|
|
5572
|
+
};
|
|
5573
|
+
}
|
|
5485
5574
|
Object.fromEntries([
|
|
5486
5575
|
{
|
|
5487
5576
|
id: "overview",
|
|
@@ -5653,33 +5742,19 @@ Object.fromEntries([
|
|
|
5653
5742
|
function isValuelessField(field) {
|
|
5654
5743
|
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";
|
|
5655
5744
|
}
|
|
5656
|
-
|
|
5657
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5658
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5659
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5660
|
-
*
|
|
5661
|
-
* For each leaf field:
|
|
5662
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5663
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5664
|
-
*
|
|
5665
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5666
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5667
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5668
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5669
|
-
*/
|
|
5670
|
-
function hydrateSchema(schema, values) {
|
|
5745
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5671
5746
|
return {
|
|
5672
5747
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5673
5748
|
sections: schema.sections.map((section) => ({
|
|
5674
5749
|
...section,
|
|
5675
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5750
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5676
5751
|
}))
|
|
5677
5752
|
};
|
|
5678
5753
|
}
|
|
5679
|
-
function hydrateField(field, values) {
|
|
5754
|
+
function hydrateField(field, values, options) {
|
|
5680
5755
|
if (isValuelessField(field)) return field;
|
|
5681
5756
|
if (field.type === "group") {
|
|
5682
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5757
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5683
5758
|
return {
|
|
5684
5759
|
...field,
|
|
5685
5760
|
fields: hydratedChildren
|
|
@@ -5688,7 +5763,7 @@ function hydrateField(field, values) {
|
|
|
5688
5763
|
if (field.type === "sub-tabs") {
|
|
5689
5764
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5690
5765
|
...tab,
|
|
5691
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5766
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5692
5767
|
}));
|
|
5693
5768
|
return {
|
|
5694
5769
|
...field,
|
|
@@ -5698,6 +5773,33 @@ function hydrateField(field, values) {
|
|
|
5698
5773
|
const key = field.key;
|
|
5699
5774
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5700
5775
|
const defaultValue = field.default;
|
|
5776
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5777
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5778
|
+
...field,
|
|
5779
|
+
value: toSecretFieldView(storedValue)
|
|
5780
|
+
};
|
|
5781
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5782
|
+
...field,
|
|
5783
|
+
value: null
|
|
5784
|
+
};
|
|
5785
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5786
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5787
|
+
if (secretItemKeys.length > 0) {
|
|
5788
|
+
const rows = storedValue.map((row) => {
|
|
5789
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5790
|
+
const out = { ...row };
|
|
5791
|
+
for (const k of secretItemKeys) {
|
|
5792
|
+
const v = Reflect.get(row, k);
|
|
5793
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5794
|
+
}
|
|
5795
|
+
return out;
|
|
5796
|
+
});
|
|
5797
|
+
return {
|
|
5798
|
+
...field,
|
|
5799
|
+
value: rows
|
|
5800
|
+
};
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5701
5803
|
if (field.multiple) {
|
|
5702
5804
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5703
5805
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5940,6 +6042,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5940
6042
|
}
|
|
5941
6043
|
return out;
|
|
5942
6044
|
}
|
|
6045
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6046
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6047
|
+
function globalSecretScope() {
|
|
6048
|
+
return GLOBAL_SCOPE;
|
|
6049
|
+
}
|
|
6050
|
+
function encodeSegment(value) {
|
|
6051
|
+
return encodeURIComponent(value);
|
|
6052
|
+
}
|
|
6053
|
+
/**
|
|
6054
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6055
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6056
|
+
* `providers[authentik].clientSecret`.
|
|
6057
|
+
*/
|
|
6058
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6059
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6060
|
+
}
|
|
6061
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6062
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6063
|
+
fieldPath;
|
|
6064
|
+
constructor(fieldPath, cause) {
|
|
6065
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6066
|
+
this.fieldPath = fieldPath;
|
|
6067
|
+
this.name = "KeychainWriteRefusedError";
|
|
6068
|
+
}
|
|
6069
|
+
};
|
|
6070
|
+
var KEEP = { kind: "keep" };
|
|
6071
|
+
function isRecord(value) {
|
|
6072
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6073
|
+
}
|
|
6074
|
+
function defaultMintId() {
|
|
6075
|
+
return globalThis.crypto.randomUUID();
|
|
6076
|
+
}
|
|
6077
|
+
/** Every marker ref anywhere under `value`. */
|
|
6078
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6079
|
+
if (isSecretMarker(value)) {
|
|
6080
|
+
out.push(value.$secret);
|
|
6081
|
+
return out;
|
|
6082
|
+
}
|
|
6083
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6084
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6085
|
+
return out;
|
|
6086
|
+
}
|
|
6087
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6088
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6089
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6090
|
+
}
|
|
6091
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6092
|
+
const intent = classifySecretWrite(incoming);
|
|
6093
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6094
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6095
|
+
if (intent.kind === "keep") return KEEP;
|
|
6096
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6097
|
+
if (intent.kind === "clear") {
|
|
6098
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6099
|
+
return {
|
|
6100
|
+
kind: "value",
|
|
6101
|
+
value: null
|
|
6102
|
+
};
|
|
6103
|
+
}
|
|
6104
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6105
|
+
kind: "value",
|
|
6106
|
+
value: stored
|
|
6107
|
+
};
|
|
6108
|
+
try {
|
|
6109
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6110
|
+
} catch (err) {
|
|
6111
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6112
|
+
}
|
|
6113
|
+
return {
|
|
6114
|
+
kind: "value",
|
|
6115
|
+
value: makeSecretMarker(ref)
|
|
6116
|
+
};
|
|
6117
|
+
}
|
|
6118
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6119
|
+
function applyMember(out, key, result, storedParent) {
|
|
6120
|
+
if (result.kind === "value") {
|
|
6121
|
+
out[key] = result.value;
|
|
6122
|
+
return;
|
|
6123
|
+
}
|
|
6124
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6125
|
+
else delete out[key];
|
|
6126
|
+
}
|
|
6127
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6128
|
+
const out = { ...incoming };
|
|
6129
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6130
|
+
return out;
|
|
6131
|
+
}
|
|
6132
|
+
function rowId(row, idKey) {
|
|
6133
|
+
const raw = row[idKey];
|
|
6134
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6135
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6136
|
+
return null;
|
|
6137
|
+
}
|
|
6138
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6139
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6140
|
+
if (!Array.isArray(incoming)) {
|
|
6141
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6142
|
+
return {
|
|
6143
|
+
kind: "value",
|
|
6144
|
+
value: incoming
|
|
6145
|
+
};
|
|
6146
|
+
}
|
|
6147
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6148
|
+
for (const row of storedRows) {
|
|
6149
|
+
const id = rowId(row, node.idKey);
|
|
6150
|
+
if (id !== null) storedById.set(id, row);
|
|
6151
|
+
}
|
|
6152
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6153
|
+
const rows = [];
|
|
6154
|
+
for (const row of incoming) {
|
|
6155
|
+
if (!isRecord(row)) {
|
|
6156
|
+
rows.push(row);
|
|
6157
|
+
continue;
|
|
6158
|
+
}
|
|
6159
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6160
|
+
kept.add(id);
|
|
6161
|
+
const withId = {
|
|
6162
|
+
...row,
|
|
6163
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6164
|
+
};
|
|
6165
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6166
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6167
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6168
|
+
}
|
|
6169
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6170
|
+
return {
|
|
6171
|
+
kind: "value",
|
|
6172
|
+
value: rows
|
|
6173
|
+
};
|
|
6174
|
+
}
|
|
6175
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6176
|
+
switch (node.kind) {
|
|
6177
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6178
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6179
|
+
case "object": {
|
|
6180
|
+
if (!isRecord(incoming)) {
|
|
6181
|
+
if (incoming === void 0) return KEEP;
|
|
6182
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6183
|
+
return {
|
|
6184
|
+
kind: "value",
|
|
6185
|
+
value: incoming
|
|
6186
|
+
};
|
|
6187
|
+
}
|
|
6188
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6189
|
+
return {
|
|
6190
|
+
kind: "value",
|
|
6191
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6192
|
+
};
|
|
6193
|
+
}
|
|
6194
|
+
}
|
|
6195
|
+
}
|
|
6196
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6197
|
+
function splitNodeKey(key) {
|
|
6198
|
+
const at = key.indexOf("@");
|
|
6199
|
+
return at <= 0 ? {
|
|
6200
|
+
base: key,
|
|
6201
|
+
nodeId: null
|
|
6202
|
+
} : {
|
|
6203
|
+
base: key.slice(0, at),
|
|
6204
|
+
nodeId: key.slice(at + 1)
|
|
6205
|
+
};
|
|
6206
|
+
}
|
|
6207
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6208
|
+
async function transformSecretWrite(input) {
|
|
6209
|
+
const deletes = [];
|
|
6210
|
+
const base = {
|
|
6211
|
+
secrets: input.secrets,
|
|
6212
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6213
|
+
deletes,
|
|
6214
|
+
operatorWrite: input.operatorWrite === true
|
|
6215
|
+
};
|
|
6216
|
+
const out = {};
|
|
6217
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6218
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6219
|
+
const node = input.tree.get(baseKey);
|
|
6220
|
+
if (node === void 0) {
|
|
6221
|
+
out[key] = incoming;
|
|
6222
|
+
continue;
|
|
6223
|
+
}
|
|
6224
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6225
|
+
kind: "node",
|
|
6226
|
+
nodeId
|
|
6227
|
+
} : input.scope ?? globalSecretScope();
|
|
6228
|
+
const result = await writeNode({
|
|
6229
|
+
...base,
|
|
6230
|
+
scope
|
|
6231
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6232
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6233
|
+
}
|
|
6234
|
+
return {
|
|
6235
|
+
patch: out,
|
|
6236
|
+
afterWrite: async () => {
|
|
6237
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6238
|
+
try {
|
|
6239
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6240
|
+
return { orphaned: [] };
|
|
6241
|
+
} catch {
|
|
6242
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6243
|
+
}
|
|
6244
|
+
}
|
|
6245
|
+
};
|
|
6246
|
+
}
|
|
6247
|
+
/**
|
|
6248
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6249
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6250
|
+
*/
|
|
6251
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6252
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6253
|
+
if (refs.length === 0) return {
|
|
6254
|
+
value,
|
|
6255
|
+
unresolved: []
|
|
6256
|
+
};
|
|
6257
|
+
const answers = await secrets.resolve(refs);
|
|
6258
|
+
const unresolved = [];
|
|
6259
|
+
for (const ref of new Set(refs)) {
|
|
6260
|
+
const answer = answers[ref];
|
|
6261
|
+
if (answer === void 0) unresolved.push({
|
|
6262
|
+
ref,
|
|
6263
|
+
reason: "not-initialized"
|
|
6264
|
+
});
|
|
6265
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6266
|
+
ref,
|
|
6267
|
+
reason: answer.reason
|
|
6268
|
+
});
|
|
6269
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6270
|
+
ref,
|
|
6271
|
+
reason: answer.kind
|
|
6272
|
+
});
|
|
6273
|
+
}
|
|
6274
|
+
const substitute = (v) => {
|
|
6275
|
+
if (isSecretMarker(v)) {
|
|
6276
|
+
const answer = answers[v.$secret];
|
|
6277
|
+
return answer?.kind === "value" ? {
|
|
6278
|
+
keep: true,
|
|
6279
|
+
value: answer.value
|
|
6280
|
+
} : {
|
|
6281
|
+
keep: false,
|
|
6282
|
+
value: void 0
|
|
6283
|
+
};
|
|
6284
|
+
}
|
|
6285
|
+
if (Array.isArray(v)) {
|
|
6286
|
+
const items = [];
|
|
6287
|
+
for (const item of v) {
|
|
6288
|
+
const s = substitute(item);
|
|
6289
|
+
if (s.keep) items.push(s.value);
|
|
6290
|
+
}
|
|
6291
|
+
return {
|
|
6292
|
+
keep: true,
|
|
6293
|
+
value: items
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
if (isRecord(v)) {
|
|
6297
|
+
const out = {};
|
|
6298
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6299
|
+
const s = substitute(child);
|
|
6300
|
+
if (s.keep) out[k] = s.value;
|
|
6301
|
+
}
|
|
6302
|
+
return {
|
|
6303
|
+
keep: true,
|
|
6304
|
+
value: out
|
|
6305
|
+
};
|
|
6306
|
+
}
|
|
6307
|
+
return {
|
|
6308
|
+
keep: true,
|
|
6309
|
+
value: v
|
|
6310
|
+
};
|
|
6311
|
+
};
|
|
6312
|
+
return {
|
|
6313
|
+
value: substitute(value).value,
|
|
6314
|
+
unresolved
|
|
6315
|
+
};
|
|
6316
|
+
}
|
|
6317
|
+
function touchesTree(tree, patch) {
|
|
6318
|
+
if (tree.size === 0) return false;
|
|
6319
|
+
for (const key of Object.keys(patch)) {
|
|
6320
|
+
const at = key.indexOf("@");
|
|
6321
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6322
|
+
}
|
|
6323
|
+
return false;
|
|
6324
|
+
}
|
|
6325
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6326
|
+
async function readStoredAddonBlob(raw) {
|
|
6327
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6328
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6329
|
+
const result = await threeWay.call(raw);
|
|
6330
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6331
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6332
|
+
}
|
|
6333
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6334
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6335
|
+
const serialize = (key, fn) => {
|
|
6336
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6337
|
+
const tail = next.catch(() => void 0);
|
|
6338
|
+
chains.set(key, tail);
|
|
6339
|
+
tail.then(() => {
|
|
6340
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6341
|
+
});
|
|
6342
|
+
return next;
|
|
6343
|
+
};
|
|
6344
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6345
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6346
|
+
return serialize(chainKey, async () => {
|
|
6347
|
+
const stored = await readStored();
|
|
6348
|
+
const result = await transformSecretWrite({
|
|
6349
|
+
tree,
|
|
6350
|
+
secrets: opts.secrets,
|
|
6351
|
+
patch,
|
|
6352
|
+
stored,
|
|
6353
|
+
...scope !== void 0 ? { scope } : {},
|
|
6354
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6355
|
+
});
|
|
6356
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6357
|
+
const { orphaned } = await result.afterWrite();
|
|
6358
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6359
|
+
});
|
|
6360
|
+
};
|
|
6361
|
+
const wrapped = {
|
|
6362
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6363
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6364
|
+
kind: "device",
|
|
6365
|
+
deviceId
|
|
6366
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6367
|
+
};
|
|
6368
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6369
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6370
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6371
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6372
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6373
|
+
} });
|
|
6374
|
+
}
|
|
6375
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6376
|
+
function withSecretAwareSettings(context, opts) {
|
|
6377
|
+
const raw = context.settings;
|
|
6378
|
+
if (raw === void 0) return context;
|
|
6379
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6380
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6381
|
+
if (prop === "settings") return settings;
|
|
6382
|
+
return Reflect.get(target, prop, receiver);
|
|
6383
|
+
} });
|
|
6384
|
+
}
|
|
6385
|
+
var LEAF = { kind: "leaf" };
|
|
6386
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6387
|
+
function collectFields(fields, out) {
|
|
6388
|
+
for (const field of fields) {
|
|
6389
|
+
if (field.type === "group") {
|
|
6390
|
+
collectFields(field.fields, out);
|
|
6391
|
+
continue;
|
|
6392
|
+
}
|
|
6393
|
+
if (field.type === "sub-tabs") {
|
|
6394
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6395
|
+
continue;
|
|
6396
|
+
}
|
|
6397
|
+
if (field.type === "editable-array") {
|
|
6398
|
+
const item = /* @__PURE__ */ new Map();
|
|
6399
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6400
|
+
if (item.size > 0) out.set(field.key, {
|
|
6401
|
+
kind: "array",
|
|
6402
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6403
|
+
item
|
|
6404
|
+
});
|
|
6405
|
+
continue;
|
|
6406
|
+
}
|
|
6407
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6408
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6409
|
+
}
|
|
6410
|
+
}
|
|
6411
|
+
/** The secret tree a settings schema declares. */
|
|
6412
|
+
function secretTreeFromSchema(schema) {
|
|
6413
|
+
const out = /* @__PURE__ */ new Map();
|
|
6414
|
+
if (schema === null) return out;
|
|
6415
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6416
|
+
return out;
|
|
6417
|
+
}
|
|
6418
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6419
|
+
function parseSecretStatePath(path) {
|
|
6420
|
+
const segments = [];
|
|
6421
|
+
for (const raw of path.split(".")) {
|
|
6422
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6423
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6424
|
+
segments.push(m[2] !== void 0 ? {
|
|
6425
|
+
key: m[1],
|
|
6426
|
+
idKey: m[2]
|
|
6427
|
+
} : { key: m[1] });
|
|
6428
|
+
}
|
|
6429
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6430
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6431
|
+
return segments;
|
|
6432
|
+
}
|
|
6433
|
+
function insert(into, segments) {
|
|
6434
|
+
const [head, ...rest] = segments;
|
|
6435
|
+
if (head === void 0) return;
|
|
6436
|
+
if (rest.length === 0) {
|
|
6437
|
+
into.set(head.key, LEAF);
|
|
6438
|
+
return;
|
|
6439
|
+
}
|
|
6440
|
+
const existing = into.get(head.key);
|
|
6441
|
+
if (head.idKey !== void 0) {
|
|
6442
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6443
|
+
insert(item, rest);
|
|
6444
|
+
into.set(head.key, {
|
|
6445
|
+
kind: "array",
|
|
6446
|
+
idKey: head.idKey,
|
|
6447
|
+
item
|
|
6448
|
+
});
|
|
6449
|
+
return;
|
|
6450
|
+
}
|
|
6451
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6452
|
+
insert(children, rest);
|
|
6453
|
+
into.set(head.key, {
|
|
6454
|
+
kind: "object",
|
|
6455
|
+
children
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6459
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6460
|
+
if (paths.length === 0) return tree;
|
|
6461
|
+
const out = new Map(tree);
|
|
6462
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6463
|
+
return out;
|
|
6464
|
+
}
|
|
6465
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6466
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6467
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6468
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6469
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5943
6470
|
/**
|
|
5944
6471
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5945
6472
|
*
|
|
@@ -6009,6 +6536,25 @@ var BaseAddon = class {
|
|
|
6009
6536
|
settingsStoreReady = false;
|
|
6010
6537
|
/** Default config values. Provided via constructor. */
|
|
6011
6538
|
defaults;
|
|
6539
|
+
/**
|
|
6540
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6541
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6542
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6543
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6544
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6545
|
+
*/
|
|
6546
|
+
secretStatePaths = [];
|
|
6547
|
+
_addonSecretTree = null;
|
|
6548
|
+
_deviceSecretTree = null;
|
|
6549
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6550
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6551
|
+
_unresolvedSecrets = [];
|
|
6552
|
+
_secretRetryTimer = null;
|
|
6553
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6554
|
+
_secretChangeTimer = null;
|
|
6555
|
+
_secretChangeUnsub = null;
|
|
6556
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6557
|
+
_operatorWriteDepth = 0;
|
|
6012
6558
|
constructor(defaults) {
|
|
6013
6559
|
this.defaults = defaults;
|
|
6014
6560
|
this._config = { ...defaults };
|
|
@@ -6044,8 +6590,18 @@ var BaseAddon = class {
|
|
|
6044
6590
|
return this._config;
|
|
6045
6591
|
}
|
|
6046
6592
|
async initialize(context) {
|
|
6047
|
-
|
|
6593
|
+
const secrets = context.secrets;
|
|
6594
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6595
|
+
secrets,
|
|
6596
|
+
addonTree: () => this.addonSecretTree(),
|
|
6597
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6598
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6599
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6600
|
+
}) : context;
|
|
6048
6601
|
await this.resolveConfig();
|
|
6602
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6603
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6604
|
+
});
|
|
6049
6605
|
const result = await this.onInitialize();
|
|
6050
6606
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6051
6607
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6078,6 +6634,12 @@ var BaseAddon = class {
|
|
|
6078
6634
|
*/
|
|
6079
6635
|
async onHubReachable() {}
|
|
6080
6636
|
async shutdown() {
|
|
6637
|
+
this._secretChangeUnsub?.();
|
|
6638
|
+
this._secretChangeUnsub = null;
|
|
6639
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6640
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6641
|
+
this._secretRetryTimer = null;
|
|
6642
|
+
this._secretChangeTimer = null;
|
|
6081
6643
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6082
6644
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6083
6645
|
await this.onShutdown();
|
|
@@ -6156,7 +6718,7 @@ var BaseAddon = class {
|
|
|
6156
6718
|
return hydrateSchema(schema, overlay ? {
|
|
6157
6719
|
...projected,
|
|
6158
6720
|
...overlay
|
|
6159
|
-
} : projected);
|
|
6721
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6160
6722
|
}
|
|
6161
6723
|
/**
|
|
6162
6724
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6205,7 +6767,7 @@ var BaseAddon = class {
|
|
|
6205
6767
|
return hydrateSchema({
|
|
6206
6768
|
...schema,
|
|
6207
6769
|
sections
|
|
6208
|
-
}, projected);
|
|
6770
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6209
6771
|
}
|
|
6210
6772
|
/**
|
|
6211
6773
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6259,18 +6821,50 @@ var BaseAddon = class {
|
|
|
6259
6821
|
value: result.value[key]
|
|
6260
6822
|
};
|
|
6261
6823
|
}
|
|
6824
|
+
/**
|
|
6825
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6826
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6827
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6828
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6829
|
+
* writing back what it read is not (D787).
|
|
6830
|
+
*/
|
|
6831
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6832
|
+
this._operatorWriteDepth++;
|
|
6833
|
+
try {
|
|
6834
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6835
|
+
} finally {
|
|
6836
|
+
this._operatorWriteDepth--;
|
|
6837
|
+
}
|
|
6838
|
+
}
|
|
6262
6839
|
async updateGlobalSettings(patch, nodeId) {
|
|
6840
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6841
|
+
}
|
|
6842
|
+
/**
|
|
6843
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6844
|
+
*
|
|
6845
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6846
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6847
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6848
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6849
|
+
*/
|
|
6850
|
+
async clearSecrets(keys, nodeId) {
|
|
6851
|
+
const tree = this.addonSecretTree();
|
|
6852
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6853
|
+
const patch = {};
|
|
6854
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6855
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6856
|
+
}
|
|
6857
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6263
6858
|
const keys = this.perNodeKeys();
|
|
6264
6859
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6265
6860
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6266
|
-
const barePatch = patch;
|
|
6267
6861
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6268
6862
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6269
6863
|
if (target !== localNode) return;
|
|
6270
6864
|
await this.resolveConfig();
|
|
6271
6865
|
await this.onConfigChanged();
|
|
6272
6866
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6273
|
-
this.maybeAutoRestart(
|
|
6867
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6274
6868
|
}
|
|
6275
6869
|
/**
|
|
6276
6870
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6295,7 +6889,7 @@ var BaseAddon = class {
|
|
|
6295
6889
|
* time to return its response before the addon is torn down and
|
|
6296
6890
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6297
6891
|
*/
|
|
6298
|
-
maybeAutoRestart(
|
|
6892
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6299
6893
|
if (!schema) return;
|
|
6300
6894
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6301
6895
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6303,13 +6897,13 @@ var BaseAddon = class {
|
|
|
6303
6897
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6304
6898
|
}
|
|
6305
6899
|
if (restartKeys.size === 0) return;
|
|
6306
|
-
if (!
|
|
6900
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6307
6901
|
const ctx = this._ctx;
|
|
6308
6902
|
if (!ctx) return;
|
|
6309
6903
|
const addonId = ctx.id;
|
|
6310
6904
|
setImmediate(() => {
|
|
6311
6905
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6312
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6906
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6313
6907
|
}).catch((err) => {
|
|
6314
6908
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6315
6909
|
});
|
|
@@ -6318,7 +6912,7 @@ var BaseAddon = class {
|
|
|
6318
6912
|
async getDeviceSettings(deviceId) {
|
|
6319
6913
|
const schema = this.deviceSettingsSchema();
|
|
6320
6914
|
if (!schema) return { sections: [] };
|
|
6321
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6915
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6322
6916
|
}
|
|
6323
6917
|
async updateDeviceSettings(deviceId, patch) {
|
|
6324
6918
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6448,7 +7042,7 @@ var BaseAddon = class {
|
|
|
6448
7042
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6449
7043
|
*/
|
|
6450
7044
|
async resolveConfig() {
|
|
6451
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7045
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6452
7046
|
const perNode = this.perNodeKeys();
|
|
6453
7047
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6454
7048
|
const resolved = { ...this.defaults };
|
|
@@ -6473,7 +7067,7 @@ var BaseAddon = class {
|
|
|
6473
7067
|
key,
|
|
6474
7068
|
schema,
|
|
6475
7069
|
fallback,
|
|
6476
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7070
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6477
7071
|
write: async (patch) => {
|
|
6478
7072
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6479
7073
|
},
|
|
@@ -6490,7 +7084,7 @@ var BaseAddon = class {
|
|
|
6490
7084
|
key,
|
|
6491
7085
|
schema,
|
|
6492
7086
|
fallback,
|
|
6493
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7087
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6494
7088
|
write: async (patch) => {
|
|
6495
7089
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6496
7090
|
},
|
|
@@ -6502,6 +7096,70 @@ var BaseAddon = class {
|
|
|
6502
7096
|
} })
|
|
6503
7097
|
});
|
|
6504
7098
|
}
|
|
7099
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7100
|
+
addonSecretTree() {
|
|
7101
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7102
|
+
return this._addonSecretTree;
|
|
7103
|
+
}
|
|
7104
|
+
deviceSecretTree() {
|
|
7105
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7106
|
+
return this._deviceSecretTree;
|
|
7107
|
+
}
|
|
7108
|
+
/**
|
|
7109
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7110
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7111
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7112
|
+
* than start on an empty credential.
|
|
7113
|
+
*/
|
|
7114
|
+
get unresolvedSecrets() {
|
|
7115
|
+
return this._unresolvedSecrets;
|
|
7116
|
+
}
|
|
7117
|
+
/**
|
|
7118
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7119
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7120
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7121
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7122
|
+
* ever written back from here.
|
|
7123
|
+
*/
|
|
7124
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7125
|
+
const secrets = this._ctx?.secrets;
|
|
7126
|
+
if (secrets === void 0) return blob;
|
|
7127
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7128
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7129
|
+
if (refs.length === 0) {
|
|
7130
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7131
|
+
return blob;
|
|
7132
|
+
}
|
|
7133
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7134
|
+
if (trackForConfig) {
|
|
7135
|
+
this._unresolvedSecrets = unresolved;
|
|
7136
|
+
if (unresolved.length > 0) {
|
|
7137
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7138
|
+
ref: u.ref,
|
|
7139
|
+
reason: u.reason
|
|
7140
|
+
})) } });
|
|
7141
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7142
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7143
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7144
|
+
}
|
|
7145
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7146
|
+
}
|
|
7147
|
+
return value;
|
|
7148
|
+
}
|
|
7149
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7150
|
+
scheduleSecretReresolve(delayMs) {
|
|
7151
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7152
|
+
if (this[timerOf] !== null) return;
|
|
7153
|
+
const timer = setTimeout(() => {
|
|
7154
|
+
this[timerOf] = null;
|
|
7155
|
+
if (this._ctx === null) return;
|
|
7156
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7157
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7158
|
+
});
|
|
7159
|
+
}, delayMs);
|
|
7160
|
+
timer.unref?.();
|
|
7161
|
+
this[timerOf] = timer;
|
|
7162
|
+
}
|
|
6505
7163
|
/**
|
|
6506
7164
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6507
7165
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6769,32 +7427,12 @@ object({
|
|
|
6769
7427
|
audioCodec: string().optional(),
|
|
6770
7428
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6771
7429
|
});
|
|
6772
|
-
var EncodedPacketSchema = object({
|
|
6773
|
-
type: _enum(["video", "audio"]),
|
|
6774
|
-
data: _instanceof(Uint8Array),
|
|
6775
|
-
pts: number(),
|
|
6776
|
-
dts: number(),
|
|
6777
|
-
keyframe: boolean(),
|
|
6778
|
-
codec: string()
|
|
6779
|
-
});
|
|
6780
|
-
var DecodedFrameSchema = object({
|
|
6781
|
-
data: _instanceof(Uint8Array),
|
|
6782
|
-
width: number(),
|
|
6783
|
-
height: number(),
|
|
6784
|
-
format: _enum([
|
|
6785
|
-
"jpeg",
|
|
6786
|
-
"rgb",
|
|
6787
|
-
"bgr",
|
|
6788
|
-
"yuv420",
|
|
6789
|
-
"gray"
|
|
6790
|
-
]),
|
|
6791
|
-
timestamp: number()
|
|
6792
|
-
});
|
|
6793
7430
|
/**
|
|
6794
7431
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6795
7432
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6796
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6797
|
-
*
|
|
7433
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7434
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7435
|
+
* over tRPC / Moleculer.
|
|
6798
7436
|
*
|
|
6799
7437
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6800
7438
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6820,50 +7458,6 @@ var FrameHandleSchema = object({
|
|
|
6820
7458
|
slotCount: number().int().positive()
|
|
6821
7459
|
});
|
|
6822
7460
|
/**
|
|
6823
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6824
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6825
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6826
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6827
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6828
|
-
*/
|
|
6829
|
-
var FrameHandleFormatSchema = _enum([
|
|
6830
|
-
"rgb",
|
|
6831
|
-
"bgr",
|
|
6832
|
-
"yuv420",
|
|
6833
|
-
"gray"
|
|
6834
|
-
]);
|
|
6835
|
-
/**
|
|
6836
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6837
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6838
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6839
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6840
|
-
* they asked for with no broker-side conversion.
|
|
6841
|
-
*/
|
|
6842
|
-
var SubscribeFramesInputSchema = object({
|
|
6843
|
-
brokerId: string(),
|
|
6844
|
-
format: FrameHandleFormatSchema,
|
|
6845
|
-
/**
|
|
6846
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6847
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6848
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6849
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6850
|
-
*/
|
|
6851
|
-
maxFps: number().positive().optional(),
|
|
6852
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6853
|
-
tag: string().optional()
|
|
6854
|
-
});
|
|
6855
|
-
/**
|
|
6856
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6857
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6858
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6859
|
-
*/
|
|
6860
|
-
var SubscribeFramesResultSchema = object({
|
|
6861
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6862
|
-
subscriptionId: string(),
|
|
6863
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6864
|
-
maxFps: number().nonnegative()
|
|
6865
|
-
});
|
|
6866
|
-
/**
|
|
6867
7461
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6868
7462
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6869
7463
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6871,8 +7465,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6871
7465
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6872
7466
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6873
7467
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6874
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6875
|
-
*
|
|
7468
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7469
|
+
* it.
|
|
6876
7470
|
*/
|
|
6877
7471
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6878
7472
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6890,11 +7484,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6890
7484
|
format: AudioChunkFormatSchema.optional()
|
|
6891
7485
|
});
|
|
6892
7486
|
/**
|
|
6893
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6894
|
-
*
|
|
6895
|
-
*
|
|
6896
|
-
*
|
|
6897
|
-
* `pullAudioChunks`.
|
|
7487
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7488
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7489
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7490
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6898
7491
|
*/
|
|
6899
7492
|
var SubscribeAudioChunksInputSchema = object({
|
|
6900
7493
|
brokerId: string(),
|
|
@@ -6925,9 +7518,7 @@ var BrokerStatsSchema = object({
|
|
|
6925
7518
|
"stopped"
|
|
6926
7519
|
]),
|
|
6927
7520
|
inputFps: number(),
|
|
6928
|
-
decodeFps: number(),
|
|
6929
7521
|
encodedSubscribers: number(),
|
|
6930
|
-
decodedSubscribers: number(),
|
|
6931
7522
|
uptimeMs: number(),
|
|
6932
7523
|
bitrateKbps: number(),
|
|
6933
7524
|
idrIntervalMs: number(),
|
|
@@ -6940,14 +7531,6 @@ var BrokerStatsSchema = object({
|
|
|
6940
7531
|
preBufferMs: number(),
|
|
6941
7532
|
preBufferPackets: number(),
|
|
6942
7533
|
/**
|
|
6943
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6944
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6945
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6946
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6947
|
-
* a separate cap call per broker.
|
|
6948
|
-
*/
|
|
6949
|
-
decoderNodeId: string().nullable(),
|
|
6950
|
-
/**
|
|
6951
7534
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6952
7535
|
* when the stream has no audio track or the broker is in cold start.
|
|
6953
7536
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7152,6 +7735,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7152
7735
|
kind: "mutation",
|
|
7153
7736
|
auth: "admin"
|
|
7154
7737
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7738
|
+
function defOf(schema) {
|
|
7739
|
+
return schema._zod?.def ?? {};
|
|
7740
|
+
}
|
|
7741
|
+
function declaredHere(schema) {
|
|
7742
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7743
|
+
}
|
|
7744
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7745
|
+
var WRAPPERS = new Set([
|
|
7746
|
+
"optional",
|
|
7747
|
+
"nullable",
|
|
7748
|
+
"default",
|
|
7749
|
+
"prefault",
|
|
7750
|
+
"catch",
|
|
7751
|
+
"readonly",
|
|
7752
|
+
"nonoptional"
|
|
7753
|
+
]);
|
|
7754
|
+
/**
|
|
7755
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7756
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7757
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7758
|
+
* `.transform` on `in`).
|
|
7759
|
+
*/
|
|
7760
|
+
function layersOf(schema) {
|
|
7761
|
+
const out = [];
|
|
7762
|
+
const queue = [schema];
|
|
7763
|
+
while (queue.length > 0) {
|
|
7764
|
+
const s = queue.shift();
|
|
7765
|
+
if (!s || out.includes(s)) continue;
|
|
7766
|
+
out.push(s);
|
|
7767
|
+
const def = defOf(s);
|
|
7768
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7769
|
+
if (def.type === "pipe") {
|
|
7770
|
+
if (def.in) queue.push(def.in);
|
|
7771
|
+
if (def.out) queue.push(def.out);
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
return out;
|
|
7775
|
+
}
|
|
7776
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7777
|
+
function isZodSecret(schema) {
|
|
7778
|
+
return layersOf(schema).some(declaredHere);
|
|
7779
|
+
}
|
|
7780
|
+
/**
|
|
7781
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7782
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7783
|
+
* object or array is reported as one path and not descended into — everything
|
|
7784
|
+
* under it is secret.
|
|
7785
|
+
*/
|
|
7786
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7787
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7788
|
+
const paths = [];
|
|
7789
|
+
for (const layer of layersOf(schema)) {
|
|
7790
|
+
const def = defOf(layer);
|
|
7791
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7792
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7793
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7794
|
+
else if (def.type === "intersection") {
|
|
7795
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7796
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7797
|
+
}
|
|
7798
|
+
}
|
|
7799
|
+
return [...new Set(paths)];
|
|
7800
|
+
}
|
|
7155
7801
|
//#endregion
|
|
7156
7802
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7157
7803
|
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
|
/**
|
|
10383
10965
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10384
10966
|
* an addon declares its channels in.
|
|
@@ -10521,6 +11103,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10521
11103
|
"balanced",
|
|
10522
11104
|
"strict"
|
|
10523
11105
|
]);
|
|
11106
|
+
/** Steps whose effect a root label can BE. */
|
|
11107
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
11108
|
+
"animal-classifier",
|
|
11109
|
+
"vehicle-classifier",
|
|
11110
|
+
"package-detection"
|
|
11111
|
+
];
|
|
11112
|
+
/** Steps whose box a root detection can BE. */
|
|
11113
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11114
|
+
/**
|
|
11115
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11116
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11117
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11118
|
+
* no camera tree carries.)
|
|
11119
|
+
*/
|
|
11120
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11121
|
+
[
|
|
11122
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11123
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11124
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11125
|
+
];
|
|
10524
11126
|
var MODEL_FORMATS = [
|
|
10525
11127
|
"onnx",
|
|
10526
11128
|
"coreml",
|
|
@@ -10549,7 +11151,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10549
11151
|
/** Multi-file payload (directory members or sibling files). */
|
|
10550
11152
|
files: array(string()).readonly().optional(),
|
|
10551
11153
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10552
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11154
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11155
|
+
/**
|
|
11156
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11157
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11158
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11159
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11160
|
+
* node records the revision it downloaded next to the file
|
|
11161
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11162
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11163
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11164
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11165
|
+
*/
|
|
11166
|
+
revision: string().min(1).optional()
|
|
11167
|
+
});
|
|
11168
|
+
/**
|
|
11169
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11170
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11171
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11172
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11173
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11174
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11175
|
+
*/
|
|
11176
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11177
|
+
"current",
|
|
11178
|
+
"stale",
|
|
11179
|
+
"missing"
|
|
11180
|
+
]);
|
|
11181
|
+
/**
|
|
11182
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11183
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11184
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11185
|
+
*/
|
|
11186
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11187
|
+
"fp32",
|
|
11188
|
+
"fp16",
|
|
11189
|
+
"int8"
|
|
11190
|
+
]);
|
|
11191
|
+
/**
|
|
11192
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11193
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11194
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11195
|
+
*/
|
|
11196
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11197
|
+
downloaded: boolean(),
|
|
11198
|
+
sizeMB: number(),
|
|
11199
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11200
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10553
11201
|
});
|
|
10554
11202
|
/**
|
|
10555
11203
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10653,6 +11301,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10653
11301
|
/** True when the weights or their data forbid commercial use. */
|
|
10654
11302
|
nonCommercial: boolean().optional()
|
|
10655
11303
|
}));
|
|
11304
|
+
/**
|
|
11305
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
11306
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
11307
|
+
*
|
|
11308
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
11309
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
11310
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
11311
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
11312
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
11313
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
11314
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11315
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11316
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11317
|
+
* postprocessor on read, never stored by an import.
|
|
11318
|
+
*/
|
|
11319
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11320
|
+
object({
|
|
11321
|
+
kind: literal("label"),
|
|
11322
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11323
|
+
labelToEffect: record(string(), string()),
|
|
11324
|
+
uncovered: array(string()).readonly()
|
|
11325
|
+
}),
|
|
11326
|
+
object({
|
|
11327
|
+
kind: literal("crop"),
|
|
11328
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11329
|
+
rootLabels: array(string()).readonly(),
|
|
11330
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11331
|
+
childClass: _enum(["plate", "face"]),
|
|
11332
|
+
/**
|
|
11333
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11334
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11335
|
+
* stored by an import.
|
|
11336
|
+
*/
|
|
11337
|
+
rootInputPx: number().int().positive().optional()
|
|
11338
|
+
}),
|
|
11339
|
+
object({
|
|
11340
|
+
kind: literal("mask"),
|
|
11341
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11342
|
+
})
|
|
11343
|
+
]);
|
|
10656
11344
|
var ModelCatalogEntrySchema = object({
|
|
10657
11345
|
id: string(),
|
|
10658
11346
|
name: string(),
|
|
@@ -10718,6 +11406,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10718
11406
|
*/
|
|
10719
11407
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10720
11408
|
/**
|
|
11409
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11410
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11411
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11412
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11413
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11414
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11415
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11416
|
+
*/
|
|
11417
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11418
|
+
/**
|
|
11419
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11420
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11421
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11422
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11423
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11424
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11425
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11426
|
+
*/
|
|
11427
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11428
|
+
/**
|
|
11429
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11430
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11431
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11432
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11433
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11434
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11435
|
+
*/
|
|
11436
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11437
|
+
/**
|
|
10721
11438
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10722
11439
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10723
11440
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10779,6 +11496,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10779
11496
|
*/
|
|
10780
11497
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10781
11498
|
/**
|
|
11499
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
11500
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
11501
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
11502
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
11503
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
11504
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
11505
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
11506
|
+
*/
|
|
11507
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
11508
|
+
/**
|
|
10782
11509
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10783
11510
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
10784
11511
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -12380,13 +13107,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12380
13107
|
lastRtpAt: number(),
|
|
12381
13108
|
bytesSent: number()
|
|
12382
13109
|
});
|
|
12383
|
-
var BrokerDecodedClientSchema = object({
|
|
12384
|
-
tag: string(),
|
|
12385
|
-
subscribedAt: number(),
|
|
12386
|
-
maxFps: number(),
|
|
12387
|
-
framesDelivered: number(),
|
|
12388
|
-
framesDropped: number()
|
|
12389
|
-
});
|
|
12390
13110
|
var BrokerAudioClientSchema = object({
|
|
12391
13111
|
tag: string(),
|
|
12392
13112
|
subscribedAt: number(),
|
|
@@ -12478,7 +13198,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12478
13198
|
});
|
|
12479
13199
|
var BrokerClientsSchema = object({
|
|
12480
13200
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12481
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12482
13201
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12483
13202
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12484
13203
|
pipeClients: number(),
|
|
@@ -12847,11 +13566,7 @@ method(object({
|
|
|
12847
13566
|
auth: "admin"
|
|
12848
13567
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
12849
13568
|
brokerId: string(),
|
|
12850
|
-
channel: _enum([
|
|
12851
|
-
"rtsp",
|
|
12852
|
-
"decoded",
|
|
12853
|
-
"audio"
|
|
12854
|
-
]),
|
|
13569
|
+
channel: _enum(["rtsp", "audio"]),
|
|
12855
13570
|
handle: string()
|
|
12856
13571
|
}), object({ killed: boolean() }), {
|
|
12857
13572
|
kind: "mutation",
|
|
@@ -12886,10 +13601,7 @@ method(object({
|
|
|
12886
13601
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
12887
13602
|
subscriptionId: string(),
|
|
12888
13603
|
maxCount: number().int().positive().default(8)
|
|
12889
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
12890
|
-
subscriptionId: string(),
|
|
12891
|
-
maxCount: number().int().positive().default(4)
|
|
12892
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13604
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
12893
13605
|
brokerId: string(),
|
|
12894
13606
|
seconds: number().min(0).max(30)
|
|
12895
13607
|
}), _void(), {
|
|
@@ -14149,53 +14861,201 @@ id: union([string(), number()]) }), {
|
|
|
14149
14861
|
auth: "admin"
|
|
14150
14862
|
});
|
|
14151
14863
|
/**
|
|
14152
|
-
*
|
|
14153
|
-
*
|
|
14154
|
-
*
|
|
14864
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14865
|
+
*
|
|
14866
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14867
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14868
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14869
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14870
|
+
* against the CALLER, never against anything the caller claims.
|
|
14871
|
+
*
|
|
14872
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14873
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14874
|
+
* connection, the agent from its child's connection carried in
|
|
14875
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14876
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14877
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14878
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14879
|
+
* runner is the same OS user): see the threat model in
|
|
14880
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14881
|
+
*
|
|
14882
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14883
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14884
|
+
* floors every method to admin anyway (D240).
|
|
14885
|
+
*
|
|
14886
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14155
14887
|
*/
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
})
|
|
14166
|
-
|
|
14888
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14889
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14890
|
+
"key-missing",
|
|
14891
|
+
"wrong-key",
|
|
14892
|
+
"key-file-unreadable",
|
|
14893
|
+
"store-unavailable",
|
|
14894
|
+
"not-initialized",
|
|
14895
|
+
"decrypt-failed"
|
|
14896
|
+
]);
|
|
14897
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14898
|
+
state: literal("locked"),
|
|
14899
|
+
reason: KeychainUnavailableReasonSchema
|
|
14900
|
+
})]);
|
|
14901
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14902
|
+
object({
|
|
14903
|
+
kind: literal("value"),
|
|
14904
|
+
value: string(),
|
|
14905
|
+
version: number().int()
|
|
14906
|
+
}),
|
|
14907
|
+
object({ kind: literal("missing") }),
|
|
14908
|
+
object({
|
|
14909
|
+
kind: literal("unavailable"),
|
|
14910
|
+
reason: KeychainUnavailableReasonSchema
|
|
14911
|
+
}),
|
|
14912
|
+
object({ kind: literal("forbidden") })
|
|
14913
|
+
]);
|
|
14914
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14915
|
+
/** Metadata of one stored value — never the value. */
|
|
14916
|
+
var KeychainSecretMetaSchema = object({
|
|
14917
|
+
ref: string(),
|
|
14918
|
+
owner: string(),
|
|
14919
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14920
|
+
scope: string(),
|
|
14921
|
+
fieldPath: string(),
|
|
14922
|
+
version: number().int(),
|
|
14923
|
+
createdAt: number(),
|
|
14924
|
+
updatedAt: number(),
|
|
14925
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14926
|
+
updatedBy: string(),
|
|
14927
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14928
|
+
lastReadAt: number().nullable()
|
|
14929
|
+
});
|
|
14930
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14931
|
+
method(object({
|
|
14932
|
+
ref: string().min(1),
|
|
14933
|
+
value: string().min(1)
|
|
14934
|
+
}), object({
|
|
14935
|
+
ref: string(),
|
|
14936
|
+
version: number().int()
|
|
14937
|
+
}), {
|
|
14938
|
+
kind: "mutation",
|
|
14939
|
+
auth: "admin"
|
|
14940
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14941
|
+
kind: "mutation",
|
|
14942
|
+
auth: "admin"
|
|
14943
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14944
|
+
var KeychainKeySourceSchema = object({
|
|
14945
|
+
kind: _enum([
|
|
14946
|
+
"config-file",
|
|
14947
|
+
"previous-config-file",
|
|
14948
|
+
"platform",
|
|
14949
|
+
"default-file"
|
|
14950
|
+
]),
|
|
14951
|
+
/** File sources only — a path is not a secret. */
|
|
14952
|
+
path: string().optional(),
|
|
14953
|
+
/**
|
|
14954
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14955
|
+
* next to the database it protects (the default file). The page warns.
|
|
14956
|
+
*/
|
|
14957
|
+
sharesBackupWithDatabase: boolean()
|
|
14958
|
+
});
|
|
14959
|
+
var KeychainStatusSchema = object({
|
|
14960
|
+
keychain: KeychainStateSchema,
|
|
14961
|
+
/** The source of the master key in use; `null` while locked. */
|
|
14962
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
14963
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
14964
|
+
configuredSource: KeychainKeySourceSchema,
|
|
14965
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
14966
|
+
fingerprint: string().nullable(),
|
|
14967
|
+
activeKeyId: string().nullable(),
|
|
14968
|
+
/**
|
|
14969
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
14970
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
14971
|
+
*/
|
|
14972
|
+
rotationPending: boolean(),
|
|
14973
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14974
|
+
retiredWraps: number().int(),
|
|
14975
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
14976
|
+
secretCount: number().int()
|
|
14977
|
+
});
|
|
14978
|
+
/**
|
|
14979
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
14980
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
14981
|
+
* never reported as an orphan (and never deleted as one).
|
|
14982
|
+
*/
|
|
14983
|
+
var KeychainSecretUsageSchema = _enum([
|
|
14984
|
+
"in-use",
|
|
14985
|
+
"orphan",
|
|
14986
|
+
"unknown"
|
|
14987
|
+
]);
|
|
14988
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
14989
|
+
var KeychainAuditActionSchema = _enum([
|
|
14990
|
+
"put",
|
|
14991
|
+
"delete",
|
|
14992
|
+
"reveal",
|
|
14993
|
+
"rotate-master-key",
|
|
14994
|
+
"purge-retired-keys",
|
|
14995
|
+
"download-recovery-key",
|
|
14996
|
+
"delete-orphans",
|
|
14997
|
+
"reset",
|
|
14998
|
+
"initialize"
|
|
14999
|
+
]);
|
|
15000
|
+
var KeychainAuditEntrySchema = object({
|
|
15001
|
+
id: string(),
|
|
15002
|
+
at: number(),
|
|
15003
|
+
action: KeychainAuditActionSchema,
|
|
15004
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15005
|
+
actor: string(),
|
|
15006
|
+
ref: string().nullable(),
|
|
15007
|
+
detail: string().nullable()
|
|
15008
|
+
});
|
|
15009
|
+
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({
|
|
15010
|
+
value: string(),
|
|
15011
|
+
version: number().int()
|
|
15012
|
+
}), {
|
|
15013
|
+
kind: "mutation",
|
|
15014
|
+
auth: "admin",
|
|
15015
|
+
caller: "required"
|
|
15016
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15017
|
+
deleted: array(string()).readonly(),
|
|
15018
|
+
kept: array(object({
|
|
15019
|
+
ref: string(),
|
|
15020
|
+
usage: KeychainSecretUsageSchema
|
|
15021
|
+
})).readonly()
|
|
15022
|
+
}), {
|
|
15023
|
+
kind: "mutation",
|
|
15024
|
+
auth: "admin",
|
|
15025
|
+
caller: "required"
|
|
15026
|
+
}), method(object({}), object({
|
|
15027
|
+
fingerprint: string(),
|
|
15028
|
+
keySource: KeychainKeySourceSchema
|
|
15029
|
+
}), {
|
|
15030
|
+
kind: "mutation",
|
|
15031
|
+
auth: "admin",
|
|
15032
|
+
caller: "required"
|
|
15033
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15034
|
+
kind: "mutation",
|
|
15035
|
+
auth: "admin",
|
|
15036
|
+
caller: "required"
|
|
15037
|
+
}), method(object({}), object({
|
|
15038
|
+
key: string(),
|
|
15039
|
+
fingerprint: string(),
|
|
15040
|
+
keySource: KeychainKeySourceSchema
|
|
15041
|
+
}), {
|
|
15042
|
+
kind: "mutation",
|
|
15043
|
+
auth: "admin",
|
|
15044
|
+
caller: "required"
|
|
15045
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15046
|
+
archivedCollection: string().nullable(),
|
|
15047
|
+
archived: number().int()
|
|
15048
|
+
}), {
|
|
15049
|
+
kind: "mutation",
|
|
15050
|
+
auth: "admin",
|
|
15051
|
+
caller: "required"
|
|
15052
|
+
});
|
|
15053
|
+
method(_void(), object({
|
|
14167
15054
|
id: string(),
|
|
14168
15055
|
name: string(),
|
|
14169
|
-
isPullMode: boolean().optional(),
|
|
14170
|
-
priority: number().optional(),
|
|
14171
15056
|
hwaccel: string().optional(),
|
|
14172
15057
|
probedBestHwaccel: string().optional()
|
|
14173
|
-
})), method(
|
|
14174
|
-
sessionId: string(),
|
|
14175
|
-
nodeId: string()
|
|
14176
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14177
|
-
sessionId: string(),
|
|
14178
|
-
packet: EncodedPacketSchema
|
|
14179
|
-
}), _void()), method(object({
|
|
14180
|
-
sessionId: string(),
|
|
14181
|
-
url: string()
|
|
14182
|
-
}), _void()), method(object({
|
|
14183
|
-
sessionId: string(),
|
|
14184
|
-
maxCount: number().default(1),
|
|
14185
|
-
waitMs: number().optional()
|
|
14186
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14187
|
-
sessionId: string(),
|
|
14188
|
-
maxCount: number().default(1),
|
|
14189
|
-
waitMs: number().optional()
|
|
14190
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14191
|
-
sessionId: string(),
|
|
14192
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14193
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14194
|
-
sessionId: string(),
|
|
14195
|
-
codec: string(),
|
|
14196
|
-
outputFormat: string(),
|
|
14197
|
-
createdAtMs: number()
|
|
14198
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15058
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14199
15059
|
kind: "mutation",
|
|
14200
15060
|
auth: "admin"
|
|
14201
15061
|
});
|
|
@@ -15195,6 +16055,10 @@ var DeviceInfoSchema = object({
|
|
|
15195
16055
|
isCamera: boolean(),
|
|
15196
16056
|
/** Current config values — serializable snapshot */
|
|
15197
16057
|
config: record(string(), unknown()),
|
|
16058
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16059
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16060
|
+
* when the owning runner has not reported them. */
|
|
16061
|
+
secretConfigPaths: array(string()).optional(),
|
|
15198
16062
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15199
16063
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15200
16064
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15400,12 +16264,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15400
16264
|
* call (workers re-register on init), so probe-driven updates
|
|
15401
16265
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15402
16266
|
features: array(string()).optional(),
|
|
15403
|
-
config: record(string(), unknown())
|
|
16267
|
+
config: record(string(), unknown()),
|
|
16268
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16269
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16270
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16271
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16272
|
+
* omits it and the keyword backstop applies. */
|
|
16273
|
+
secretConfigPaths: array(string()).optional()
|
|
15404
16274
|
});
|
|
15405
16275
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15406
16276
|
var DevicePersistConfigPayloadSchema = object({
|
|
15407
16277
|
deviceId: number(),
|
|
15408
|
-
data: record(string(), unknown())
|
|
16278
|
+
data: record(string(), unknown()),
|
|
16279
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16280
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16281
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16282
|
+
secretConfigPaths: array(string()).optional()
|
|
15409
16283
|
});
|
|
15410
16284
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15411
16285
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -16227,6 +17101,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
16227
17101
|
kind: "mutation",
|
|
16228
17102
|
auth: "admin"
|
|
16229
17103
|
});
|
|
17104
|
+
var HUB_ADDRESS_ROLES = [
|
|
17105
|
+
"appConnections",
|
|
17106
|
+
"notificationTaps",
|
|
17107
|
+
"internal",
|
|
17108
|
+
"publicEndpoint"
|
|
17109
|
+
];
|
|
16230
17110
|
/**
|
|
16231
17111
|
* Transport bounds for AI capability methods.
|
|
16232
17112
|
*
|
|
@@ -17053,7 +17933,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17053
17933
|
icon: string().optional(),
|
|
17054
17934
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17055
17935
|
startUrl: string(),
|
|
17056
|
-
stage: LoginStageEnum
|
|
17936
|
+
stage: LoginStageEnum,
|
|
17937
|
+
/**
|
|
17938
|
+
* The provider names an external identity a signed-in user can link to
|
|
17939
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17940
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17941
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17942
|
+
*/
|
|
17943
|
+
linkable: boolean().optional()
|
|
17057
17944
|
}),
|
|
17058
17945
|
object({
|
|
17059
17946
|
kind: literal("widget"),
|
|
@@ -18829,6 +19716,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18829
19716
|
"stream-offline",
|
|
18830
19717
|
"node-online",
|
|
18831
19718
|
"node-offline",
|
|
19719
|
+
"node-restarting",
|
|
19720
|
+
"node-updating",
|
|
18832
19721
|
"node-inference-unavailable",
|
|
18833
19722
|
"detection-blind",
|
|
18834
19723
|
"addon-crash-loop",
|
|
@@ -20434,7 +21323,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
20434
21323
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
20435
21324
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
20436
21325
|
*/
|
|
20437
|
-
notifySensorRewatched: boolean().optional()
|
|
21326
|
+
notifySensorRewatched: boolean().optional(),
|
|
21327
|
+
/**
|
|
21328
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
21329
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
21330
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
21331
|
+
*/
|
|
21332
|
+
notifySensorIgnored: boolean().optional()
|
|
20438
21333
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20439
21334
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20440
21335
|
mode: AlarmArmModeSchema,
|
|
@@ -20447,7 +21342,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
20447
21342
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20448
21343
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
20449
21344
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20450
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
21345
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
21346
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
21347
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
20451
21348
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20452
21349
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20453
21350
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -21425,8 +22322,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21425
22322
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21426
22323
|
stepId: "face-embedding",
|
|
21427
22324
|
key: "minLandmarkFaceSize",
|
|
21428
|
-
label: "Min face size
|
|
21429
|
-
description: "
|
|
22325
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22326
|
+
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.",
|
|
21430
22327
|
type: "slider",
|
|
21431
22328
|
min: 0,
|
|
21432
22329
|
max: 64,
|
|
@@ -22399,8 +23296,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22399
23296
|
]);
|
|
22400
23297
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22401
23298
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22402
|
-
/**
|
|
22403
|
-
|
|
23299
|
+
/**
|
|
23300
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23301
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23302
|
+
*
|
|
23303
|
+
* - `operator` — drawn by hand.
|
|
23304
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23305
|
+
* model, or a larger teacher model).
|
|
23306
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23307
|
+
* back from the track store (never a re-run).
|
|
23308
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23309
|
+
*/
|
|
23310
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23311
|
+
"operator",
|
|
23312
|
+
"assist",
|
|
23313
|
+
"pipeline",
|
|
23314
|
+
"llm"
|
|
23315
|
+
]);
|
|
22404
23316
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22405
23317
|
var RetrainBboxSchema = object({
|
|
22406
23318
|
x: number(),
|
|
@@ -22418,7 +23330,8 @@ var RetrainBboxSchema = object({
|
|
|
22418
23330
|
*/
|
|
22419
23331
|
var RetrainAnnotationSchema = object({
|
|
22420
23332
|
id: string(),
|
|
22421
|
-
|
|
23333
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23334
|
+
trackId: string().optional(),
|
|
22422
23335
|
deviceId: number(),
|
|
22423
23336
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22424
23337
|
mediaKey: string(),
|
|
@@ -22467,18 +23380,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22467
23380
|
* fail, whatever became of the original. */
|
|
22468
23381
|
copied: boolean()
|
|
22469
23382
|
});
|
|
23383
|
+
/**
|
|
23384
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23385
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23386
|
+
* box recorded on the source media row when there is one, else the track
|
|
23387
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23388
|
+
* until the operator confirms it.
|
|
23389
|
+
*/
|
|
23390
|
+
var RetrainPipelineBoxSchema = object({
|
|
23391
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23392
|
+
bbox: RetrainBboxSchema,
|
|
23393
|
+
macroClass: RetrainMacroClassSchema,
|
|
23394
|
+
label: string().optional(),
|
|
23395
|
+
subLabel: string().optional(),
|
|
23396
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23397
|
+
score: number().optional(),
|
|
23398
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23399
|
+
modelId: string().optional(),
|
|
23400
|
+
trackId: string(),
|
|
23401
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23402
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23403
|
+
basis: _enum(["subject-box", "position"]),
|
|
23404
|
+
deltaMs: number()
|
|
23405
|
+
});
|
|
23406
|
+
/**
|
|
23407
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23408
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23409
|
+
* track at all.
|
|
23410
|
+
*/
|
|
23411
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22470
23412
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22471
23413
|
var RetrainFrameSchema = object({
|
|
22472
23414
|
frameId: string(),
|
|
22473
23415
|
deviceId: number(),
|
|
22474
|
-
|
|
22475
|
-
/**
|
|
22476
|
-
|
|
23416
|
+
origin: RetrainFrameOriginSchema,
|
|
23417
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23418
|
+
trackId: string().optional(),
|
|
23419
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23420
|
+
* Absent on a recording still. */
|
|
23421
|
+
sourceMediaId: number().int().optional(),
|
|
23422
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23423
|
+
epochMs: number().optional(),
|
|
22477
23424
|
sourceKind: MediaFileKindEnum,
|
|
22478
23425
|
sizeBytes: number().int(),
|
|
22479
23426
|
width: number().int(),
|
|
22480
23427
|
height: number().int(),
|
|
22481
|
-
copiedAt: number()
|
|
23428
|
+
copiedAt: number(),
|
|
23429
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23430
|
+
capturedAt: number().optional(),
|
|
23431
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23432
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23433
|
+
* a false positive. */
|
|
23434
|
+
complete: boolean(),
|
|
23435
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23436
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23437
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23438
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23439
|
+
collectionIds: array(string()).readonly().optional()
|
|
22482
23440
|
});
|
|
22483
23441
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22484
23442
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22499,6 +23457,53 @@ var RetrainFrameListSchema = object({
|
|
|
22499
23457
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22500
23458
|
autoPickMediaId: number().int().optional()
|
|
22501
23459
|
});
|
|
23460
|
+
/**
|
|
23461
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23462
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23463
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23464
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23465
|
+
* export carried (`exportedInBatch`).
|
|
23466
|
+
*/
|
|
23467
|
+
var RetrainExportFilterSchema = object({
|
|
23468
|
+
deviceIds: array(number()).optional(),
|
|
23469
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23470
|
+
/** Only frames in at least one of these named collections. */
|
|
23471
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23472
|
+
batchId: string().optional(),
|
|
23473
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23474
|
+
completeOnly: boolean().optional()
|
|
23475
|
+
});
|
|
23476
|
+
/**
|
|
23477
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23478
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23479
|
+
* convention — the classifier layout.
|
|
23480
|
+
*/
|
|
23481
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23482
|
+
/**
|
|
23483
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23484
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23485
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23486
|
+
* logged.
|
|
23487
|
+
*/
|
|
23488
|
+
var RetrainArchiveTargetSchema = object({
|
|
23489
|
+
kind: literal("http"),
|
|
23490
|
+
method: _enum(["PUT", "POST"]),
|
|
23491
|
+
url: string().url(),
|
|
23492
|
+
headers: record(string(), string()).optional()
|
|
23493
|
+
});
|
|
23494
|
+
var RetrainArchiveResultSchema = object({
|
|
23495
|
+
batchId: string(),
|
|
23496
|
+
frames: number().int(),
|
|
23497
|
+
crops: number().int(),
|
|
23498
|
+
annotations: number().int(),
|
|
23499
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23500
|
+
missing: number().int(),
|
|
23501
|
+
bytes: number().int(),
|
|
23502
|
+
/** sha256 of the exact bytes sent. */
|
|
23503
|
+
sha256: string(),
|
|
23504
|
+
/** The target's HTTP status. */
|
|
23505
|
+
status: number().int()
|
|
23506
|
+
});
|
|
22502
23507
|
/** What the operator asked the assist to look for. */
|
|
22503
23508
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22504
23509
|
kind: literal("package"),
|
|
@@ -22528,6 +23533,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22528
23533
|
reason: string(),
|
|
22529
23534
|
detail: string().optional()
|
|
22530
23535
|
})]);
|
|
23536
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23537
|
+
var RetrainCollectionSchema = object({
|
|
23538
|
+
id: string(),
|
|
23539
|
+
name: string(),
|
|
23540
|
+
createdAt: number(),
|
|
23541
|
+
frameCount: number().int()
|
|
23542
|
+
});
|
|
23543
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23544
|
+
kind: literal("created"),
|
|
23545
|
+
collection: RetrainCollectionSchema
|
|
23546
|
+
}), object({
|
|
23547
|
+
kind: literal("refused"),
|
|
23548
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23549
|
+
})]);
|
|
23550
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23551
|
+
kind: literal("renamed"),
|
|
23552
|
+
collection: RetrainCollectionSchema
|
|
23553
|
+
}), object({
|
|
23554
|
+
kind: literal("refused"),
|
|
23555
|
+
reason: _enum([
|
|
23556
|
+
"empty-name",
|
|
23557
|
+
"duplicate-name",
|
|
23558
|
+
"unknown-collection"
|
|
23559
|
+
])
|
|
23560
|
+
})]);
|
|
23561
|
+
/**
|
|
23562
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23563
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23564
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23565
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23566
|
+
*/
|
|
23567
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23568
|
+
kind: literal("added"),
|
|
23569
|
+
collectionId: string(),
|
|
23570
|
+
frame: RetrainFrameSchema,
|
|
23571
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23572
|
+
reused: boolean()
|
|
23573
|
+
}), object({
|
|
23574
|
+
kind: literal("refused"),
|
|
23575
|
+
reason: _enum([
|
|
23576
|
+
"unknown-collection",
|
|
23577
|
+
"still-unavailable",
|
|
23578
|
+
"still-busy",
|
|
23579
|
+
"unreadable-image",
|
|
23580
|
+
"write-failed"
|
|
23581
|
+
]),
|
|
23582
|
+
detail: string().optional()
|
|
23583
|
+
})]);
|
|
23584
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23585
|
+
var RetrainAssistProfileSchema = object({
|
|
23586
|
+
id: string(),
|
|
23587
|
+
name: string(),
|
|
23588
|
+
model: string(),
|
|
23589
|
+
kind: string(),
|
|
23590
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23591
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23592
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23593
|
+
leavesHouse: boolean()
|
|
23594
|
+
});
|
|
23595
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23596
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23597
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23598
|
+
var RetrainLlmReviewSchema = object({
|
|
23599
|
+
/** The `ref` the page sent the box under. */
|
|
23600
|
+
ref: string(),
|
|
23601
|
+
verdict: _enum([
|
|
23602
|
+
"confirmed",
|
|
23603
|
+
"wrong-class",
|
|
23604
|
+
"not-an-object",
|
|
23605
|
+
"uncertain"
|
|
23606
|
+
]),
|
|
23607
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23608
|
+
reason: string()
|
|
23609
|
+
});
|
|
23610
|
+
/**
|
|
23611
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23612
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23613
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23614
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23615
|
+
*/
|
|
23616
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23617
|
+
kind: literal("proposed"),
|
|
23618
|
+
profileId: string(),
|
|
23619
|
+
model: string(),
|
|
23620
|
+
/** The frame was sent outside the house for this answer. */
|
|
23621
|
+
leftHouse: boolean(),
|
|
23622
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23623
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23624
|
+
rejected: number().int()
|
|
23625
|
+
}), object({
|
|
23626
|
+
kind: literal("refused"),
|
|
23627
|
+
reason: _enum([
|
|
23628
|
+
"unknown-frame",
|
|
23629
|
+
"unreadable-frame",
|
|
23630
|
+
"unknown-profile",
|
|
23631
|
+
"profile-disabled",
|
|
23632
|
+
"no-vision",
|
|
23633
|
+
"cloud-not-confirmed",
|
|
23634
|
+
"llm-error",
|
|
23635
|
+
"malformed-answer"
|
|
23636
|
+
]),
|
|
23637
|
+
detail: string().optional()
|
|
23638
|
+
})]);
|
|
22531
23639
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22532
23640
|
var RetrainTransitionResultSchema = object({
|
|
22533
23641
|
trackId: string(),
|
|
@@ -23245,7 +24353,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23245
24353
|
auth: "admin"
|
|
23246
24354
|
}), method(object({
|
|
23247
24355
|
deviceId: number(),
|
|
23248
|
-
trackId: string(),
|
|
24356
|
+
trackId: string().optional(),
|
|
23249
24357
|
frameId: string()
|
|
23250
24358
|
}), object({
|
|
23251
24359
|
removed: boolean(),
|
|
@@ -23262,7 +24370,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23262
24370
|
auth: "admin"
|
|
23263
24371
|
}), method(object({
|
|
23264
24372
|
deviceId: number(),
|
|
23265
|
-
|
|
24373
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24374
|
+
trackId: string().optional(),
|
|
23266
24375
|
frameId: string(),
|
|
23267
24376
|
subject: RetrainAssistSubjectSchema,
|
|
23268
24377
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23270,12 +24379,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23270
24379
|
}), RetrainAssistResultSchema, {
|
|
23271
24380
|
kind: "mutation",
|
|
23272
24381
|
auth: "admin"
|
|
23273
|
-
}), method(object({
|
|
24382
|
+
}), method(object({
|
|
24383
|
+
trackId: string().optional(),
|
|
24384
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24385
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23274
24386
|
kind: "query",
|
|
23275
24387
|
auth: "admin"
|
|
23276
24388
|
}), method(object({
|
|
23277
24389
|
deviceId: number(),
|
|
23278
|
-
|
|
24390
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24391
|
+
trackId: string().optional(),
|
|
23279
24392
|
frameId: string(),
|
|
23280
24393
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23281
24394
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23293,7 +24406,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23293
24406
|
}), RetrainTransitionResultSchema, {
|
|
23294
24407
|
kind: "mutation",
|
|
23295
24408
|
auth: "admin"
|
|
23296
|
-
}), method(
|
|
24409
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24410
|
+
kind: "query",
|
|
24411
|
+
auth: "admin"
|
|
24412
|
+
}), method(object({
|
|
24413
|
+
deviceId: number(),
|
|
24414
|
+
trackId: string().optional(),
|
|
24415
|
+
frameId: string(),
|
|
24416
|
+
complete: boolean()
|
|
24417
|
+
}), RetrainFrameSchema, {
|
|
24418
|
+
kind: "mutation",
|
|
24419
|
+
auth: "admin"
|
|
24420
|
+
}), method(object({
|
|
24421
|
+
filter: RetrainExportFilterSchema,
|
|
24422
|
+
layout: RetrainExportLayoutSchema,
|
|
24423
|
+
target: RetrainArchiveTargetSchema
|
|
24424
|
+
}), RetrainArchiveResultSchema, {
|
|
24425
|
+
kind: "mutation",
|
|
24426
|
+
auth: "admin",
|
|
24427
|
+
timeoutMs: 60 * 6e4
|
|
24428
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24429
|
+
kind: "query",
|
|
24430
|
+
auth: "admin"
|
|
24431
|
+
}), method(object({
|
|
24432
|
+
deviceId: number(),
|
|
24433
|
+
trackId: string().optional(),
|
|
24434
|
+
frameId: string(),
|
|
24435
|
+
profileId: string(),
|
|
24436
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24437
|
+
boxes: array(object({
|
|
24438
|
+
ref: string(),
|
|
24439
|
+
bbox: RetrainBboxSchema,
|
|
24440
|
+
macroClass: RetrainMacroClassSchema,
|
|
24441
|
+
label: string().optional()
|
|
24442
|
+
})).max(50),
|
|
24443
|
+
allowCloud: boolean()
|
|
24444
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24445
|
+
kind: "mutation",
|
|
24446
|
+
auth: "admin",
|
|
24447
|
+
timeoutMs: 18e4
|
|
24448
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24449
|
+
kind: "mutation",
|
|
24450
|
+
auth: "admin"
|
|
24451
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24452
|
+
kind: "query",
|
|
24453
|
+
auth: "admin"
|
|
24454
|
+
}), method(object({
|
|
24455
|
+
id: string(),
|
|
24456
|
+
name: string().max(120)
|
|
24457
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24458
|
+
kind: "mutation",
|
|
24459
|
+
auth: "admin"
|
|
24460
|
+
}), method(object({ id: string() }), object({
|
|
24461
|
+
deleted: boolean(),
|
|
24462
|
+
removedFrames: number().int()
|
|
24463
|
+
}), {
|
|
24464
|
+
kind: "mutation",
|
|
24465
|
+
auth: "admin"
|
|
24466
|
+
}), method(object({
|
|
24467
|
+
collectionId: string(),
|
|
24468
|
+
deviceId: number(),
|
|
24469
|
+
epochMs: number()
|
|
24470
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24471
|
+
kind: "mutation",
|
|
24472
|
+
auth: "admin",
|
|
24473
|
+
timeoutMs: 6e4
|
|
24474
|
+
}), method(object({
|
|
24475
|
+
collectionId: string(),
|
|
24476
|
+
frameIds: array(string()).min(1).max(500)
|
|
24477
|
+
}), object({
|
|
24478
|
+
added: number().int(),
|
|
24479
|
+
alreadyMember: number().int(),
|
|
24480
|
+
unknownFrameIds: array(string()).readonly()
|
|
24481
|
+
}), {
|
|
24482
|
+
kind: "mutation",
|
|
24483
|
+
auth: "admin"
|
|
24484
|
+
}), method(object({
|
|
24485
|
+
collectionId: string(),
|
|
24486
|
+
frameId: string()
|
|
24487
|
+
}), object({
|
|
24488
|
+
removed: boolean(),
|
|
24489
|
+
deletedFrame: boolean()
|
|
24490
|
+
}), {
|
|
24491
|
+
kind: "mutation",
|
|
24492
|
+
auth: "admin"
|
|
24493
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23297
24494
|
kind: "query",
|
|
23298
24495
|
auth: "admin"
|
|
23299
24496
|
}), method(object({
|
|
@@ -23346,6 +24543,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23346
24543
|
timestamp: number()
|
|
23347
24544
|
});
|
|
23348
24545
|
/**
|
|
24546
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
24547
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
24548
|
+
*/
|
|
24549
|
+
var SuppliedRootOutputSchema = object({
|
|
24550
|
+
stepId: string(),
|
|
24551
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
24552
|
+
modelId: string(),
|
|
24553
|
+
detections: array(object({
|
|
24554
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
24555
|
+
bbox: tuple([
|
|
24556
|
+
number(),
|
|
24557
|
+
number(),
|
|
24558
|
+
number(),
|
|
24559
|
+
number()
|
|
24560
|
+
]),
|
|
24561
|
+
score: number(),
|
|
24562
|
+
/**
|
|
24563
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
24564
|
+
* detector already re-found inside a root face box (D730), so its
|
|
24565
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
24566
|
+
*/
|
|
24567
|
+
landmarks: array(object({
|
|
24568
|
+
x: number(),
|
|
24569
|
+
y: number()
|
|
24570
|
+
})).optional()
|
|
24571
|
+
})).min(1)
|
|
24572
|
+
});
|
|
24573
|
+
/**
|
|
23349
24574
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
23350
24575
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
23351
24576
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -23393,7 +24618,7 @@ var FrameRefSchema = object({
|
|
|
23393
24618
|
timestamp: number(),
|
|
23394
24619
|
capturedAt: number().optional()
|
|
23395
24620
|
});
|
|
23396
|
-
var ModelFormatSchema$
|
|
24621
|
+
var ModelFormatSchema$2 = _enum([
|
|
23397
24622
|
"onnx",
|
|
23398
24623
|
"coreml",
|
|
23399
24624
|
"openvino",
|
|
@@ -23411,7 +24636,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23411
24636
|
var PipelineEngineChoiceSchema = object({
|
|
23412
24637
|
runtime: literal("python"),
|
|
23413
24638
|
backend: string(),
|
|
23414
|
-
format: ModelFormatSchema$
|
|
24639
|
+
format: ModelFormatSchema$2,
|
|
23415
24640
|
device: string().optional()
|
|
23416
24641
|
});
|
|
23417
24642
|
/**
|
|
@@ -23450,32 +24675,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23450
24675
|
group: string().optional(),
|
|
23451
24676
|
settings: record(string(), unknown()).optional()
|
|
23452
24677
|
}));
|
|
23453
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23454
|
-
addonId: string(),
|
|
23455
|
-
enabled: boolean(),
|
|
23456
|
-
modelId: string(),
|
|
23457
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23458
|
-
settings: record(string(), unknown()).optional()
|
|
23459
|
-
}));
|
|
23460
|
-
var PipelineTemplateSchema$1 = object({
|
|
23461
|
-
id: string(),
|
|
23462
|
-
name: string(),
|
|
23463
|
-
createdAt: string(),
|
|
23464
|
-
updatedAt: string(),
|
|
23465
|
-
engine: PipelineEngineChoiceSchema,
|
|
23466
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23467
|
-
});
|
|
23468
24678
|
var PipelineModelOptionSchema = object({
|
|
23469
24679
|
id: string(),
|
|
23470
24680
|
name: string(),
|
|
23471
|
-
formats: record(string(),
|
|
23472
|
-
downloaded: boolean(),
|
|
23473
|
-
sizeMB: number()
|
|
23474
|
-
})),
|
|
24681
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23475
24682
|
group: ModelVariantGroupSchema.optional(),
|
|
23476
24683
|
legacy: boolean().optional(),
|
|
23477
24684
|
provider: ModelProviderIdSchema.optional(),
|
|
23478
|
-
defaultConfidence: number().optional()
|
|
24685
|
+
defaultConfidence: number().optional(),
|
|
24686
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
23479
24687
|
});
|
|
23480
24688
|
var ConfigFieldBridge = custom();
|
|
23481
24689
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -23637,6 +24845,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23637
24845
|
}), {
|
|
23638
24846
|
kind: "mutation",
|
|
23639
24847
|
auth: "admin"
|
|
24848
|
+
}), method(object({
|
|
24849
|
+
nodeId: string(),
|
|
24850
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24851
|
+
dryRun: boolean()
|
|
24852
|
+
}), object({
|
|
24853
|
+
entries: array(object({
|
|
24854
|
+
deviceId: number(),
|
|
24855
|
+
keys: array(string()).readonly()
|
|
24856
|
+
})).readonly(),
|
|
24857
|
+
refused: array(object({
|
|
24858
|
+
deviceId: number(),
|
|
24859
|
+
reason: string()
|
|
24860
|
+
})).readonly()
|
|
24861
|
+
}), {
|
|
24862
|
+
kind: "mutation",
|
|
24863
|
+
auth: "admin"
|
|
23640
24864
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23641
24865
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23642
24866
|
deviceKey: string(),
|
|
@@ -23662,22 +24886,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23662
24886
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23663
24887
|
steps: array(PipelineStepInputSchema),
|
|
23664
24888
|
deviceKey: string().optional()
|
|
23665
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23666
|
-
name: string(),
|
|
23667
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23668
|
-
engine: PipelineEngineChoiceSchema
|
|
23669
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23670
|
-
id: string(),
|
|
23671
|
-
name: string().optional(),
|
|
23672
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23673
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24889
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23674
24890
|
addonId: string(),
|
|
23675
24891
|
modelId: string(),
|
|
23676
|
-
format: ModelFormatSchema$
|
|
24892
|
+
format: ModelFormatSchema$2
|
|
23677
24893
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23678
24894
|
addonId: string(),
|
|
23679
24895
|
modelId: string(),
|
|
23680
|
-
format: ModelFormatSchema$
|
|
24896
|
+
format: ModelFormatSchema$2
|
|
23681
24897
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23682
24898
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23683
24899
|
frame: FrameInputSchema.optional(),
|
|
@@ -23743,7 +24959,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23743
24959
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
23744
24960
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
23745
24961
|
*/
|
|
23746
|
-
replay: literal(true).optional()
|
|
24962
|
+
replay: literal(true).optional(),
|
|
24963
|
+
/**
|
|
24964
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
24965
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
24966
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
24967
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
24968
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
24969
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
24970
|
+
*/
|
|
24971
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
23747
24972
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
23748
24973
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23749
24974
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -23825,6 +25050,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23825
25050
|
filename: string().optional(),
|
|
23826
25051
|
settings: record(string(), unknown()).optional()
|
|
23827
25052
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25053
|
+
/**
|
|
25054
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25055
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25056
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25057
|
+
* schemas are what crosses the cap boundary.
|
|
25058
|
+
*/
|
|
25059
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25060
|
+
/** The operator's range for it. */
|
|
25061
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25062
|
+
min: 1,
|
|
25063
|
+
max: 8
|
|
25064
|
+
};
|
|
25065
|
+
var HardwareClassIdSchema = _enum([
|
|
25066
|
+
"intel-core-ultra",
|
|
25067
|
+
"intel-n-series",
|
|
25068
|
+
"apple-m-base",
|
|
25069
|
+
"apple-m-pro",
|
|
25070
|
+
"unknown"
|
|
25071
|
+
]);
|
|
25072
|
+
var AcceleratorKindSchema = _enum([
|
|
25073
|
+
"intel-npu",
|
|
25074
|
+
"intel-igpu",
|
|
25075
|
+
"x86-cpu",
|
|
25076
|
+
"arm-cpu",
|
|
25077
|
+
"apple-ane",
|
|
25078
|
+
"coral"
|
|
25079
|
+
]);
|
|
25080
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25081
|
+
object({
|
|
25082
|
+
kind: literal("capacity"),
|
|
25083
|
+
sessions: number(),
|
|
25084
|
+
minSessions: number()
|
|
25085
|
+
}),
|
|
25086
|
+
object({
|
|
25087
|
+
kind: literal("tie-faster"),
|
|
25088
|
+
over: string(),
|
|
25089
|
+
recallDelta: number()
|
|
25090
|
+
}),
|
|
25091
|
+
object({
|
|
25092
|
+
kind: literal("stepped-down"),
|
|
25093
|
+
from: string(),
|
|
25094
|
+
to: string(),
|
|
25095
|
+
limitedBy: string()
|
|
25096
|
+
}),
|
|
25097
|
+
object({
|
|
25098
|
+
kind: literal("no-fit-lightest"),
|
|
25099
|
+
sessions: number(),
|
|
25100
|
+
minSessions: number()
|
|
25101
|
+
}),
|
|
25102
|
+
object({
|
|
25103
|
+
kind: literal("derived-latency"),
|
|
25104
|
+
modelId: string()
|
|
25105
|
+
}),
|
|
25106
|
+
object({ kind: literal("cpu-device") }),
|
|
25107
|
+
object({ kind: literal("coral-untouched") }),
|
|
25108
|
+
object({ kind: literal("device-disabled") }),
|
|
25109
|
+
object({ kind: literal("device-unavailable") }),
|
|
25110
|
+
object({ kind: literal("node-offline") }),
|
|
25111
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25112
|
+
object({
|
|
25113
|
+
kind: literal("no-measured-data"),
|
|
25114
|
+
hardwareClass: HardwareClassIdSchema
|
|
25115
|
+
}),
|
|
25116
|
+
object({
|
|
25117
|
+
kind: literal("no-family-build"),
|
|
25118
|
+
format: ModelFormatSchema$1
|
|
25119
|
+
}),
|
|
25120
|
+
object({
|
|
25121
|
+
kind: literal("kept-custom-pin"),
|
|
25122
|
+
modelId: string(),
|
|
25123
|
+
deviceKey: string()
|
|
25124
|
+
})
|
|
25125
|
+
]);
|
|
25126
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25127
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25128
|
+
/**
|
|
25129
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25130
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25131
|
+
*/
|
|
25132
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25133
|
+
kind: literal("node-benchmark"),
|
|
25134
|
+
resultId: string(),
|
|
25135
|
+
measuredAtMs: number()
|
|
25136
|
+
})]);
|
|
25137
|
+
var DeviceModelChoiceSchema = object({
|
|
25138
|
+
modelId: string(),
|
|
25139
|
+
p50Ms: number(),
|
|
25140
|
+
fps: number(),
|
|
25141
|
+
measured: boolean(),
|
|
25142
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25143
|
+
source: LatencySourceSchema.optional(),
|
|
25144
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25145
|
+
capacitySessions: number(),
|
|
25146
|
+
personRecall: number()
|
|
25147
|
+
});
|
|
25148
|
+
var DeviceRecommendationSchema = object({
|
|
25149
|
+
deviceKey: string(),
|
|
25150
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25151
|
+
enabled: boolean(),
|
|
25152
|
+
available: boolean(),
|
|
25153
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25154
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25155
|
+
kept: KeptReasonSchema.optional(),
|
|
25156
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25157
|
+
});
|
|
25158
|
+
var NodeRecommendationSchema = object({
|
|
25159
|
+
nodeId: string(),
|
|
25160
|
+
reachable: boolean(),
|
|
25161
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25162
|
+
cpuModel: string().nullable(),
|
|
25163
|
+
skipped: boolean(),
|
|
25164
|
+
acceleratorModelId: string().nullable(),
|
|
25165
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25166
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25167
|
+
});
|
|
25168
|
+
var ModelPinChangeSchema = object({
|
|
25169
|
+
stepId: string(),
|
|
25170
|
+
before: string().nullable(),
|
|
25171
|
+
after: string().nullable()
|
|
25172
|
+
});
|
|
25173
|
+
var NodeDeviceChangeSchema = object({
|
|
25174
|
+
nodeId: string(),
|
|
25175
|
+
deviceKey: string(),
|
|
25176
|
+
madeExplicit: boolean(),
|
|
25177
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25178
|
+
thresholds: array(object({
|
|
25179
|
+
stepId: string(),
|
|
25180
|
+
keys: array(string()).readonly()
|
|
25181
|
+
})).readonly()
|
|
25182
|
+
});
|
|
25183
|
+
var CameraOverrideClearSchema = object({
|
|
25184
|
+
deviceId: number(),
|
|
25185
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25186
|
+
nodeId: string(),
|
|
25187
|
+
deviceKey: string().nullable(),
|
|
25188
|
+
stepId: string(),
|
|
25189
|
+
modelIdBefore: string().nullable(),
|
|
25190
|
+
keys: array(string()).readonly()
|
|
25191
|
+
});
|
|
25192
|
+
var DetectorStoreClearSchema = object({
|
|
25193
|
+
deviceId: number(),
|
|
25194
|
+
keys: array(string()).readonly()
|
|
25195
|
+
});
|
|
25196
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25197
|
+
object({
|
|
25198
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25199
|
+
skippedNodes: array(string()).readonly()
|
|
25200
|
+
}),
|
|
25201
|
+
object({
|
|
25202
|
+
kind: literal("detector-store-unreadable"),
|
|
25203
|
+
error: string()
|
|
25204
|
+
}),
|
|
25205
|
+
object({
|
|
25206
|
+
kind: literal("coral-enabled"),
|
|
25207
|
+
nodeId: string(),
|
|
25208
|
+
deviceKey: string()
|
|
25209
|
+
}),
|
|
25210
|
+
object({
|
|
25211
|
+
kind: literal("custom-pin-kept"),
|
|
25212
|
+
nodeId: string(),
|
|
25213
|
+
deviceKey: string().nullable(),
|
|
25214
|
+
deviceId: number().nullable(),
|
|
25215
|
+
modelId: string()
|
|
25216
|
+
}),
|
|
25217
|
+
object({
|
|
25218
|
+
kind: literal("custom-registry-unreadable"),
|
|
25219
|
+
error: string()
|
|
25220
|
+
})
|
|
25221
|
+
]);
|
|
25222
|
+
var AutoTuneOptionsSchema = object({
|
|
25223
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
25224
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25225
|
+
/**
|
|
25226
|
+
* The least number of parallel sessions every device must sustain at the
|
|
25227
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
25228
|
+
* that reaches it wins.
|
|
25229
|
+
*/
|
|
25230
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25231
|
+
});
|
|
25232
|
+
var AutoTunePlanSchema = object({
|
|
25233
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
25234
|
+
planHash: string(),
|
|
25235
|
+
family: literal("yolov9"),
|
|
25236
|
+
headroom: number(),
|
|
25237
|
+
minSessionsPerDevice: number(),
|
|
25238
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
25239
|
+
cameraFps: number(),
|
|
25240
|
+
generatedAt: number(),
|
|
25241
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
25242
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
25243
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
25244
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
25245
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
25246
|
+
});
|
|
25247
|
+
var AutoTuneApplyInputSchema = object({
|
|
25248
|
+
planHash: string(),
|
|
25249
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25250
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25251
|
+
});
|
|
25252
|
+
var AutoTunePhaseResultSchema = object({
|
|
25253
|
+
phase: _enum([
|
|
25254
|
+
"download",
|
|
25255
|
+
"camera-overrides",
|
|
25256
|
+
"detector-thresholds",
|
|
25257
|
+
"node-models",
|
|
25258
|
+
"redispatch"
|
|
25259
|
+
]),
|
|
25260
|
+
ok: boolean(),
|
|
25261
|
+
detail: string()
|
|
25262
|
+
});
|
|
25263
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
25264
|
+
object({
|
|
25265
|
+
kind: literal("applied"),
|
|
25266
|
+
planHash: string(),
|
|
25267
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25268
|
+
}),
|
|
25269
|
+
object({
|
|
25270
|
+
kind: literal("aborted"),
|
|
25271
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25272
|
+
}),
|
|
25273
|
+
object({
|
|
25274
|
+
kind: literal("stale"),
|
|
25275
|
+
plan: AutoTunePlanSchema
|
|
25276
|
+
}),
|
|
25277
|
+
object({
|
|
25278
|
+
kind: literal("refused"),
|
|
25279
|
+
reason: _enum(["apply-in-progress"])
|
|
25280
|
+
})
|
|
25281
|
+
]);
|
|
25282
|
+
/**
|
|
25283
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25284
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25285
|
+
* hardware share suggestion and the stale device pins.
|
|
25286
|
+
*/
|
|
25287
|
+
/**
|
|
25288
|
+
* How a new detection session picks its node and device.
|
|
25289
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25290
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25291
|
+
* weight only bites once a node already holds a session.
|
|
25292
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25293
|
+
* full or drowning node yields to a free one (D748).
|
|
25294
|
+
*/
|
|
25295
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25296
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25297
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25298
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25299
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25300
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25301
|
+
});
|
|
25302
|
+
var PlacementStatsInputSchema = object({
|
|
25303
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25304
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25305
|
+
var PlacementDeviceStatsSchema = object({
|
|
25306
|
+
deviceKey: string(),
|
|
25307
|
+
/** Sessions running on this device now. */
|
|
25308
|
+
sessionsNow: number(),
|
|
25309
|
+
/** Sessions started on this device inside the window. */
|
|
25310
|
+
sessionsStarted: number(),
|
|
25311
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25312
|
+
observedShare: number().nullable()
|
|
25313
|
+
});
|
|
25314
|
+
var PlacementNodeStatsSchema = object({
|
|
25315
|
+
nodeId: string(),
|
|
25316
|
+
sessionsNow: number(),
|
|
25317
|
+
sessionsStarted: number(),
|
|
25318
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25319
|
+
observedShare: number().nullable(),
|
|
25320
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25321
|
+
peakSessions: number(),
|
|
25322
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25323
|
+
yieldsAway: number(),
|
|
25324
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25325
|
+
});
|
|
25326
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25327
|
+
var StaleDevicePinSchema = object({
|
|
25328
|
+
deviceId: number(),
|
|
25329
|
+
deviceKey: string(),
|
|
25330
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25331
|
+
reason: _enum(["disabled", "absent"])
|
|
25332
|
+
});
|
|
25333
|
+
var PlacementStatsSchema = object({
|
|
25334
|
+
policy: SessionPlacementPolicySchema,
|
|
25335
|
+
windowMs: number(),
|
|
25336
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25337
|
+
observedForMs: number(),
|
|
25338
|
+
sessionsNow: number(),
|
|
25339
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25340
|
+
clusterPeakSessions: number(),
|
|
25341
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25342
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25343
|
+
});
|
|
25344
|
+
/**
|
|
25345
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25346
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25347
|
+
* the measured latency table for the node's hardware class.
|
|
25348
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25349
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25350
|
+
*/
|
|
25351
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25352
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25353
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25354
|
+
var SuggestSharesInputSchema = object({
|
|
25355
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25356
|
+
/** Default `hardware`. */
|
|
25357
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25358
|
+
});
|
|
25359
|
+
var SuggestedDeviceShareSchema = object({
|
|
25360
|
+
deviceKey: string(),
|
|
25361
|
+
/** Share of the node (0–100, rounded). */
|
|
25362
|
+
share: number(),
|
|
25363
|
+
modelId: string().nullable(),
|
|
25364
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25365
|
+
fps: number().nullable(),
|
|
25366
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25367
|
+
measured: boolean(),
|
|
25368
|
+
/**
|
|
25369
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25370
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25371
|
+
*/
|
|
25372
|
+
suggestedMaxSessions: number().nullable()
|
|
25373
|
+
});
|
|
25374
|
+
var SuggestedNodeShareSchema = object({
|
|
25375
|
+
nodeId: string(),
|
|
25376
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25377
|
+
share: number().nullable(),
|
|
25378
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25379
|
+
capacitySessions: number(),
|
|
25380
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25381
|
+
skippedReason: string().nullable(),
|
|
25382
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25383
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25384
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25385
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25386
|
+
});
|
|
25387
|
+
var SuggestSharesResultSchema = object({
|
|
25388
|
+
headroom: number(),
|
|
25389
|
+
/** The source asked for; each node says what it actually used. */
|
|
25390
|
+
source: CapacitySourceSchema,
|
|
25391
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25392
|
+
cameraFps: number(),
|
|
25393
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25394
|
+
minSessionsPerDevice: number(),
|
|
25395
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25396
|
+
});
|
|
25397
|
+
/**
|
|
25398
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25399
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25400
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25401
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25402
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25403
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25404
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25405
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25406
|
+
* - `manual` — the operator's stored sliders.
|
|
25407
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25408
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25409
|
+
*/
|
|
25410
|
+
var ShareSourceSchema = _enum([
|
|
25411
|
+
"hardware",
|
|
25412
|
+
"benchmark",
|
|
25413
|
+
"manual"
|
|
25414
|
+
]);
|
|
25415
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25416
|
+
object({
|
|
25417
|
+
nodes: record(string(), number()),
|
|
25418
|
+
devices: record(string(), record(string(), number()))
|
|
25419
|
+
});
|
|
25420
|
+
var EffectiveDeviceShareSchema = object({
|
|
25421
|
+
deviceKey: string(),
|
|
25422
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25423
|
+
eligible: boolean(),
|
|
25424
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25425
|
+
configuredPct: number(),
|
|
25426
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25427
|
+
effectivePct: number()
|
|
25428
|
+
});
|
|
25429
|
+
var EffectiveNodeShareSchema = object({
|
|
25430
|
+
nodeId: string(),
|
|
25431
|
+
eligible: boolean(),
|
|
25432
|
+
configuredPct: number(),
|
|
25433
|
+
effectivePct: number(),
|
|
25434
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25435
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25436
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25437
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25438
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25439
|
+
});
|
|
25440
|
+
var EffectiveSharesSchema = object({
|
|
25441
|
+
source: ShareSourceSchema,
|
|
25442
|
+
policy: SessionPlacementPolicySchema,
|
|
25443
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25444
|
+
autoPending: boolean(),
|
|
25445
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25446
|
+
computedAt: number().nullable(),
|
|
25447
|
+
/** What made the system recompute them last. */
|
|
25448
|
+
trigger: string().nullable(),
|
|
25449
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25450
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25451
|
+
nodeWeights: record(string(), number()),
|
|
25452
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25453
|
+
});
|
|
25454
|
+
/**
|
|
25455
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25456
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25457
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25458
|
+
* shares read.
|
|
25459
|
+
*
|
|
25460
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25461
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25462
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25463
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25464
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25465
|
+
*
|
|
25466
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25467
|
+
* cross a process at frame rate, D9):
|
|
25468
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25469
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25470
|
+
* interval;
|
|
25471
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25472
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25473
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25474
|
+
* CPU, RAM or the event loop give out.
|
|
25475
|
+
*/
|
|
25476
|
+
/** Defaults and bounds, one place. */
|
|
25477
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25478
|
+
fpsPerStream: 10,
|
|
25479
|
+
budgetMinutes: 45,
|
|
25480
|
+
minBudgetMinutes: 10,
|
|
25481
|
+
maxBudgetMinutes: 120,
|
|
25482
|
+
/** A result older than this no longer beats the table. */
|
|
25483
|
+
staleAfterDays: 30,
|
|
25484
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25485
|
+
settleSec: 5,
|
|
25486
|
+
/** Accounted window per ramp step. */
|
|
25487
|
+
measureSec: 20,
|
|
25488
|
+
/** Longest the drain may take before the run is refused. */
|
|
25489
|
+
drainTimeoutSec: 120,
|
|
25490
|
+
/** Candidate models per device in one run. */
|
|
25491
|
+
maxModelsPerDevice: 6
|
|
25492
|
+
};
|
|
25493
|
+
/** The two measurements a run can make. */
|
|
25494
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25495
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25496
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25497
|
+
deviceKey: string().min(1),
|
|
25498
|
+
/**
|
|
25499
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25500
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25501
|
+
*/
|
|
25502
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25503
|
+
});
|
|
25504
|
+
/** What the operator confirmed. */
|
|
25505
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25506
|
+
nodeId: string().min(1),
|
|
25507
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25508
|
+
/** Which measurements run. At least one. */
|
|
25509
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25510
|
+
/**
|
|
25511
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25512
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25513
|
+
* detector always runs.
|
|
25514
|
+
*/
|
|
25515
|
+
steps: array(string().min(1)).default([]),
|
|
25516
|
+
/** Offered rate of one stream / session. */
|
|
25517
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25518
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25519
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25520
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25521
|
+
keepDownloadedModels: boolean().default(false),
|
|
25522
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25523
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25524
|
+
});
|
|
25525
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25526
|
+
kind: _enum([
|
|
25527
|
+
"benchmark-active",
|
|
25528
|
+
"node-offline",
|
|
25529
|
+
"unknown-device",
|
|
25530
|
+
"no-phase",
|
|
25531
|
+
"insufficient-headroom"
|
|
25532
|
+
]),
|
|
25533
|
+
detail: string(),
|
|
25534
|
+
overridable: boolean()
|
|
25535
|
+
});
|
|
25536
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25537
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25538
|
+
deviceId: number(),
|
|
25539
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25540
|
+
placedOnNode: boolean(),
|
|
25541
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25542
|
+
pinnedToNode: boolean()
|
|
25543
|
+
});
|
|
25544
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25545
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25546
|
+
deviceId: number(),
|
|
25547
|
+
reason: literal("only-frame-source")
|
|
25548
|
+
});
|
|
25549
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25550
|
+
nodeId: string(),
|
|
25551
|
+
online: boolean(),
|
|
25552
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25553
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25554
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25555
|
+
estimatedDurationMs: number(),
|
|
25556
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25557
|
+
budgetMs: number(),
|
|
25558
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25559
|
+
steps: array(string()).readonly(),
|
|
25560
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25561
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25562
|
+
headroom: object({
|
|
25563
|
+
sessionsNow: number(),
|
|
25564
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25565
|
+
}),
|
|
25566
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25567
|
+
canStart: boolean()
|
|
25568
|
+
});
|
|
25569
|
+
/** Where the measuring runner is. */
|
|
25570
|
+
var NodeBenchProgressSchema = object({
|
|
25571
|
+
phase: _enum([
|
|
25572
|
+
"preparing",
|
|
25573
|
+
"device",
|
|
25574
|
+
"pipeline",
|
|
25575
|
+
"cleanup"
|
|
25576
|
+
]),
|
|
25577
|
+
deviceKey: string().nullable(),
|
|
25578
|
+
modelId: string().nullable(),
|
|
25579
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25580
|
+
load: number().nullable(),
|
|
25581
|
+
cellsDone: number(),
|
|
25582
|
+
cellsTotal: number(),
|
|
25583
|
+
message: string()
|
|
25584
|
+
});
|
|
25585
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25586
|
+
var NodeBenchLimitSchema = _enum([
|
|
25587
|
+
"p95",
|
|
25588
|
+
"drops",
|
|
25589
|
+
"errors",
|
|
25590
|
+
"stall",
|
|
25591
|
+
"cpu",
|
|
25592
|
+
"ram",
|
|
25593
|
+
"none"
|
|
25594
|
+
]);
|
|
25595
|
+
var NodeBenchRampStepSchema = object({
|
|
25596
|
+
load: number(),
|
|
25597
|
+
pass: boolean(),
|
|
25598
|
+
p95Ms: number(),
|
|
25599
|
+
dropRatio: number(),
|
|
25600
|
+
/** Completed frames per second over the accounted window. */
|
|
25601
|
+
fps: number(),
|
|
25602
|
+
cpuPct: number().nullable(),
|
|
25603
|
+
ramFreePct: number().nullable(),
|
|
25604
|
+
failReasons: array(string()).readonly()
|
|
25605
|
+
});
|
|
25606
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25607
|
+
phase: literal("device"),
|
|
25608
|
+
deviceKey: string(),
|
|
25609
|
+
modelId: string(),
|
|
25610
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25611
|
+
p50Ms: number(),
|
|
25612
|
+
p95Ms: number(),
|
|
25613
|
+
p99Ms: number(),
|
|
25614
|
+
/** Frames per second sustained at the last passing step. */
|
|
25615
|
+
fps: number(),
|
|
25616
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25617
|
+
kMax: number(),
|
|
25618
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25619
|
+
/** First call (model load + warm-up). */
|
|
25620
|
+
warmupMs: number(),
|
|
25621
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25622
|
+
}), object({
|
|
25623
|
+
phase: literal("pipeline"),
|
|
25624
|
+
deviceKey: string(),
|
|
25625
|
+
modelId: string(),
|
|
25626
|
+
steps: array(string()).readonly(),
|
|
25627
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25628
|
+
maxSessions: number(),
|
|
25629
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25630
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25631
|
+
stepsFired: array(string()).readonly(),
|
|
25632
|
+
warmupMs: number(),
|
|
25633
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25634
|
+
})]);
|
|
25635
|
+
/**
|
|
25636
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25637
|
+
* the node no longer beats the table.
|
|
25638
|
+
*/
|
|
25639
|
+
var NodeBenchFingerprintSchema = object({
|
|
25640
|
+
pipelineVersion: string().nullable(),
|
|
25641
|
+
cpuModel: string().nullable(),
|
|
25642
|
+
ramGb: number().nullable(),
|
|
25643
|
+
os: string().nullable(),
|
|
25644
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25645
|
+
pools: record(string(), object({
|
|
25646
|
+
runtime: string(),
|
|
25647
|
+
numWorkers: number(),
|
|
25648
|
+
concurrency: number(),
|
|
25649
|
+
batchMode: string()
|
|
25650
|
+
})).default({})
|
|
25651
|
+
});
|
|
25652
|
+
/** The frames the run used. */
|
|
25653
|
+
var NodeBenchClipSchema = object({
|
|
25654
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25655
|
+
id: string(),
|
|
25656
|
+
revision: string().nullable(),
|
|
25657
|
+
frames: number(),
|
|
25658
|
+
width: number(),
|
|
25659
|
+
height: number()
|
|
25660
|
+
});
|
|
25661
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25662
|
+
runId: string().min(1),
|
|
25663
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25664
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25665
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25666
|
+
steps: array(string()).default([]),
|
|
25667
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25668
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25669
|
+
deadlineAtMs: number(),
|
|
25670
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25671
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25672
|
+
keepDownloadedModels: boolean().default(false)
|
|
25673
|
+
});
|
|
25674
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25675
|
+
"running",
|
|
25676
|
+
"done",
|
|
25677
|
+
"failed",
|
|
25678
|
+
"aborted"
|
|
25679
|
+
]);
|
|
25680
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25681
|
+
runId: string(),
|
|
25682
|
+
nodeId: string(),
|
|
25683
|
+
state: NodeBenchRunnerStateSchema,
|
|
25684
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25685
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25686
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25687
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25688
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25689
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25690
|
+
activeCameraIds: array(number()).readonly(),
|
|
25691
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25692
|
+
deletedModels: array(string()).readonly(),
|
|
25693
|
+
error: string().nullable(),
|
|
25694
|
+
startedAtMs: number(),
|
|
25695
|
+
finishedAtMs: number().nullable()
|
|
25696
|
+
});
|
|
25697
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25698
|
+
"draining",
|
|
25699
|
+
"measuring",
|
|
25700
|
+
"restoring",
|
|
25701
|
+
"done",
|
|
25702
|
+
"failed",
|
|
25703
|
+
"aborted"
|
|
25704
|
+
]);
|
|
25705
|
+
/** Why a run ended. */
|
|
25706
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25707
|
+
"completed",
|
|
25708
|
+
"operator-abort",
|
|
25709
|
+
"deadline",
|
|
25710
|
+
"node-lost",
|
|
25711
|
+
"runner-lost",
|
|
25712
|
+
"hub-restart",
|
|
25713
|
+
"drain-timeout",
|
|
25714
|
+
"failed"
|
|
25715
|
+
]);
|
|
25716
|
+
var NodeBenchmarkRunSchema = object({
|
|
25717
|
+
runId: string(),
|
|
25718
|
+
nodeId: string(),
|
|
25719
|
+
state: NodeBenchmarkStateSchema,
|
|
25720
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25721
|
+
startedAtMs: number(),
|
|
25722
|
+
deadlineAtMs: number(),
|
|
25723
|
+
finishedAtMs: number().nullable(),
|
|
25724
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25725
|
+
error: string().nullable(),
|
|
25726
|
+
/** Cameras moved off the node for the run. */
|
|
25727
|
+
moved: array(number()).readonly(),
|
|
25728
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25729
|
+
staying: array(number()).readonly(),
|
|
25730
|
+
/** Something else ran on the node's pools during the run. */
|
|
25731
|
+
contaminated: boolean(),
|
|
25732
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25733
|
+
resultIds: array(string()).readonly()
|
|
25734
|
+
});
|
|
25735
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25736
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25737
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25738
|
+
modeNodeId: string().nullable(),
|
|
25739
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25740
|
+
});
|
|
25741
|
+
/**
|
|
25742
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25743
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25744
|
+
* ends, never by anyone else.
|
|
25745
|
+
*/
|
|
25746
|
+
var NodeBenchmarkResultSchema = object({
|
|
25747
|
+
id: string(),
|
|
25748
|
+
runId: string(),
|
|
25749
|
+
nodeId: string(),
|
|
25750
|
+
cell: NodeBenchCellSchema,
|
|
25751
|
+
fpsPerStream: number(),
|
|
25752
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25753
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25754
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25755
|
+
contaminated: boolean(),
|
|
25756
|
+
stayingCameras: array(number()).readonly(),
|
|
25757
|
+
/** The run ended early; the cell itself completed. */
|
|
25758
|
+
partialRun: boolean(),
|
|
25759
|
+
measuredAtMs: number()
|
|
25760
|
+
});
|
|
25761
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25762
|
+
nodeId: string().optional(),
|
|
25763
|
+
deviceKey: string().optional()
|
|
25764
|
+
});
|
|
25765
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25766
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25767
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25768
|
+
standing: _enum([
|
|
25769
|
+
"fresh",
|
|
25770
|
+
"stale",
|
|
25771
|
+
"superseded"
|
|
25772
|
+
]),
|
|
25773
|
+
staleWhy: _enum([
|
|
25774
|
+
"age",
|
|
25775
|
+
"runtime",
|
|
25776
|
+
"pool-tuning"
|
|
25777
|
+
]).nullable()
|
|
25778
|
+
});
|
|
25779
|
+
object({
|
|
25780
|
+
runId: string(),
|
|
25781
|
+
nodeId: string(),
|
|
25782
|
+
startedAtMs: number(),
|
|
25783
|
+
deadlineAtMs: number(),
|
|
25784
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25785
|
+
moved: array(number()).readonly(),
|
|
25786
|
+
staying: array(number()).readonly()
|
|
25787
|
+
});
|
|
25788
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25789
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25790
|
+
nodeId: string(),
|
|
25791
|
+
reachable: boolean(),
|
|
25792
|
+
devices: array(object({
|
|
25793
|
+
deviceKey: string(),
|
|
25794
|
+
enabled: boolean(),
|
|
25795
|
+
available: boolean(),
|
|
25796
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25797
|
+
suggested: array(string()).readonly(),
|
|
25798
|
+
/** Every root detector the device has a build for. */
|
|
25799
|
+
all: array(string()).readonly(),
|
|
25800
|
+
/** The model the device runs now, when pinned. */
|
|
25801
|
+
currentModelId: string().nullable()
|
|
25802
|
+
})).readonly(),
|
|
25803
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25804
|
+
steps: array(object({
|
|
25805
|
+
id: string(),
|
|
25806
|
+
name: string(),
|
|
25807
|
+
slot: string()
|
|
25808
|
+
})).readonly()
|
|
25809
|
+
});
|
|
23828
25810
|
object({
|
|
23829
25811
|
activeCameras: number(),
|
|
23830
25812
|
throttledCameras: number(),
|
|
@@ -24742,14 +26724,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24742
26724
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24743
26725
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24744
26726
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24745
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24746
|
-
* per
|
|
26727
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26728
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26729
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26730
|
+
* (D762).
|
|
24747
26731
|
*/
|
|
24748
26732
|
devices: array(object({
|
|
24749
26733
|
deviceKey: string(),
|
|
24750
26734
|
backend: string(),
|
|
24751
|
-
attachedCameras: number()
|
|
24752
|
-
queueDepthTotal: number()
|
|
26735
|
+
attachedCameras: number()
|
|
24753
26736
|
})).default([]),
|
|
24754
26737
|
/** Hardware capability flags reported by this node. */
|
|
24755
26738
|
hardware: object({
|
|
@@ -24885,7 +26868,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24885
26868
|
*/
|
|
24886
26869
|
cropJpeg: string().optional(),
|
|
24887
26870
|
parent: DetailParentSchema,
|
|
24888
|
-
steps: array(string()).optional()
|
|
26871
|
+
steps: array(string()).optional(),
|
|
26872
|
+
/**
|
|
26873
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
26874
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
26875
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
26876
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
26877
|
+
* requested step infers as before.
|
|
26878
|
+
*/
|
|
26879
|
+
supplied: object({
|
|
26880
|
+
stepId: string(),
|
|
26881
|
+
modelId: string(),
|
|
26882
|
+
boxes: array(object({
|
|
26883
|
+
bbox: NativeCropBboxSchema,
|
|
26884
|
+
score: number()
|
|
26885
|
+
})).min(1)
|
|
26886
|
+
}).optional()
|
|
24889
26887
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
24890
26888
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
24891
26889
|
stepId: string(),
|
|
@@ -24937,7 +26935,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24937
26935
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
24938
26936
|
deviceId: number(),
|
|
24939
26937
|
trackId: string()
|
|
24940
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
26938
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
26939
|
+
accepted: literal(true),
|
|
26940
|
+
runId: string()
|
|
26941
|
+
}), {
|
|
26942
|
+
kind: "mutation",
|
|
26943
|
+
auth: "admin"
|
|
26944
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
26945
|
+
kind: "mutation",
|
|
26946
|
+
auth: "admin"
|
|
26947
|
+
});
|
|
24941
26948
|
var CameraPipelineConfigSchema = object({
|
|
24942
26949
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
24943
26950
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24948,14 +26955,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
24948
26955
|
settings: record(string(), unknown()).readonly().optional()
|
|
24949
26956
|
}).nullable().optional()
|
|
24950
26957
|
});
|
|
24951
|
-
var PipelineTemplateSchema = object({
|
|
24952
|
-
id: string(),
|
|
24953
|
-
name: string(),
|
|
24954
|
-
description: string().optional(),
|
|
24955
|
-
config: CameraPipelineConfigSchema,
|
|
24956
|
-
createdAt: string(),
|
|
24957
|
-
updatedAt: string()
|
|
24958
|
-
});
|
|
24959
26958
|
var DeviceStepConfigSchema = object({
|
|
24960
26959
|
modelId: string().optional(),
|
|
24961
26960
|
settings: record(string(), unknown()).optional(),
|
|
@@ -25029,9 +27028,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
25029
27028
|
modelId: string().optional(),
|
|
25030
27029
|
settings: record(string(), unknown()).readonly().optional()
|
|
25031
27030
|
});
|
|
27031
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
25032
27032
|
var CameraPipelineSettingsSchema = object({
|
|
25033
|
-
pinnedAgentNodeId: string().optional(),
|
|
25034
27033
|
stepToggles: record(string(), boolean()).optional(),
|
|
27034
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
25035
27035
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
25036
27036
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25037
27037
|
});
|
|
@@ -25064,7 +27064,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25064
27064
|
});
|
|
25065
27065
|
/**
|
|
25066
27066
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25067
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27067
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27068
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27069
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27070
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25068
27071
|
*/
|
|
25069
27072
|
var AgentLoadSummarySchema = object({
|
|
25070
27073
|
nodeId: string(),
|
|
@@ -25153,26 +27156,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25153
27156
|
width: number(),
|
|
25154
27157
|
height: number(),
|
|
25155
27158
|
subscribers: number(),
|
|
25156
|
-
|
|
25157
|
-
|
|
27159
|
+
/**
|
|
27160
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27161
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27162
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27163
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27164
|
+
* camera and is not served (D758).
|
|
27165
|
+
*/
|
|
27166
|
+
inFps: number().nullable()
|
|
25158
27167
|
})).readonly(),
|
|
25159
27168
|
webrtcSessions: number(),
|
|
25160
27169
|
rtspRestream: boolean()
|
|
25161
27170
|
});
|
|
25162
|
-
/**
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
var CameraDecoderStatusSchema = object({
|
|
25171
|
-
nodeId: string(),
|
|
25172
|
-
formats: array(string()).readonly(),
|
|
25173
|
-
sessionCount: number(),
|
|
25174
|
-
shm: CameraDecoderShmSchema
|
|
25175
|
-
});
|
|
27171
|
+
/**
|
|
27172
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27173
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27174
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27175
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27176
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27177
|
+
* detector), never from a counter nothing feeds.
|
|
27178
|
+
*/
|
|
27179
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25176
27180
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25177
27181
|
var CameraMotionStatusSchema = object({
|
|
25178
27182
|
enabled: boolean(),
|
|
@@ -25529,12 +27533,6 @@ method(object({
|
|
|
25529
27533
|
}), object({ success: literal(true) }), {
|
|
25530
27534
|
kind: "mutation",
|
|
25531
27535
|
auth: "admin"
|
|
25532
|
-
}), method(object({
|
|
25533
|
-
agentNodeId: string(),
|
|
25534
|
-
detectWeight: number().positive().nullable()
|
|
25535
|
-
}), object({ success: literal(true) }), {
|
|
25536
|
-
kind: "mutation",
|
|
25537
|
-
auth: "admin"
|
|
25538
27536
|
}), method(object({
|
|
25539
27537
|
agentNodeId: string(),
|
|
25540
27538
|
detect: boolean().nullable().optional(),
|
|
@@ -25576,6 +27574,30 @@ method(object({
|
|
|
25576
27574
|
}), {
|
|
25577
27575
|
kind: "mutation",
|
|
25578
27576
|
auth: "admin"
|
|
27577
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27578
|
+
kind: "mutation",
|
|
27579
|
+
auth: "admin"
|
|
27580
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27581
|
+
kind: "mutation",
|
|
27582
|
+
auth: "admin"
|
|
27583
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27584
|
+
kind: "mutation",
|
|
27585
|
+
auth: "admin"
|
|
27586
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27587
|
+
kind: literal("started"),
|
|
27588
|
+
runId: string()
|
|
27589
|
+
}), object({
|
|
27590
|
+
kind: literal("refused"),
|
|
27591
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27592
|
+
})]), {
|
|
27593
|
+
kind: "mutation",
|
|
27594
|
+
auth: "admin"
|
|
27595
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27596
|
+
kind: "mutation",
|
|
27597
|
+
auth: "admin"
|
|
27598
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27599
|
+
kind: "mutation",
|
|
27600
|
+
auth: "admin"
|
|
25579
27601
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25580
27602
|
deviceId: number(),
|
|
25581
27603
|
addonId: string(),
|
|
@@ -25592,6 +27614,13 @@ method(object({
|
|
|
25592
27614
|
}), object({ success: literal(true) }), {
|
|
25593
27615
|
kind: "mutation",
|
|
25594
27616
|
auth: "admin"
|
|
27617
|
+
}), method(object({
|
|
27618
|
+
deviceId: number(),
|
|
27619
|
+
addonId: string(),
|
|
27620
|
+
settings: record(string(), unknown()).nullable()
|
|
27621
|
+
}), object({ success: literal(true) }), {
|
|
27622
|
+
kind: "mutation",
|
|
27623
|
+
auth: "admin"
|
|
25595
27624
|
}), method(object({
|
|
25596
27625
|
deviceId: number(),
|
|
25597
27626
|
agentNodeId: string(),
|
|
@@ -25615,25 +27644,7 @@ method(object({
|
|
|
25615
27644
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25616
27645
|
kind: "mutation",
|
|
25617
27646
|
auth: "admin"
|
|
25618
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25619
|
-
name: string(),
|
|
25620
|
-
description: string().optional(),
|
|
25621
|
-
config: CameraPipelineConfigSchema
|
|
25622
|
-
}), PipelineTemplateSchema, {
|
|
25623
|
-
kind: "mutation",
|
|
25624
|
-
auth: "admin"
|
|
25625
|
-
}), method(object({
|
|
25626
|
-
id: string(),
|
|
25627
|
-
name: string().optional(),
|
|
25628
|
-
description: string().optional(),
|
|
25629
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25630
|
-
}), PipelineTemplateSchema, {
|
|
25631
|
-
kind: "mutation",
|
|
25632
|
-
auth: "admin"
|
|
25633
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25634
|
-
kind: "mutation",
|
|
25635
|
-
auth: "admin"
|
|
25636
|
-
});
|
|
27647
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25637
27648
|
/**
|
|
25638
27649
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25639
27650
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26327,7 +28338,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26327
28338
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26328
28339
|
* operator already consented to.
|
|
26329
28340
|
*/
|
|
26330
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
28341
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
28342
|
+
/**
|
|
28343
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
28344
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
28345
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
28346
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
28347
|
+
*/
|
|
28348
|
+
linkIntent: string().optional(),
|
|
28349
|
+
/**
|
|
28350
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28351
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
28352
|
+
*/
|
|
28353
|
+
issuer: string().optional()
|
|
26331
28354
|
});
|
|
26332
28355
|
method(object({
|
|
26333
28356
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -27986,8 +30009,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
27986
30009
|
]).nullable(),
|
|
27987
30010
|
/** Input FPS from the camera (null for adaptive). */
|
|
27988
30011
|
inputFps: number().nullable(),
|
|
27989
|
-
/** Decoded FPS (null for adaptive). */
|
|
27990
|
-
decodeFps: number().nullable(),
|
|
27991
30012
|
/** Bitrate in kbps (null for adaptive). */
|
|
27992
30013
|
bitrateKbps: number().nullable()
|
|
27993
30014
|
});
|
|
@@ -28264,7 +30285,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28264
30285
|
* field their hints were silently stripped by the schema and the
|
|
28265
30286
|
* adaptive ladder started blind on the client's display size.
|
|
28266
30287
|
*/
|
|
28267
|
-
hints: webrtcClientHintsSchema.optional()
|
|
30288
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
30289
|
+
/**
|
|
30290
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
30291
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
30292
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
30293
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
30294
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
30295
|
+
*
|
|
30296
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
30297
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
30298
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
30299
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
30300
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
30301
|
+
* flag must not become a second door to the camera's speaker.
|
|
30302
|
+
*/
|
|
30303
|
+
talkback: boolean().optional()
|
|
28268
30304
|
}), object({
|
|
28269
30305
|
sessionId: string(),
|
|
28270
30306
|
sdpAnswer: string()
|
|
@@ -28319,6 +30355,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28319
30355
|
*/
|
|
28320
30356
|
alive: boolean()
|
|
28321
30357
|
})), method(object({
|
|
30358
|
+
deviceId: number().int().nonnegative(),
|
|
30359
|
+
sessionId: string(),
|
|
30360
|
+
downlinkMbps: number().nonnegative()
|
|
30361
|
+
}), object({
|
|
30362
|
+
outcome: _enum(["switching", "held"]),
|
|
30363
|
+
tier: CamProfileSchema.nullable(),
|
|
30364
|
+
reason: string()
|
|
30365
|
+
}), { kind: "mutation" }), method(object({
|
|
28322
30366
|
deviceId: number().int().nonnegative(),
|
|
28323
30367
|
sessionId: string()
|
|
28324
30368
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -28558,6 +30602,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
28558
30602
|
var RestartAddonResultSchema = unknown();
|
|
28559
30603
|
var InstallPackageResultSchema = unknown();
|
|
28560
30604
|
var ReloadPackagesResultSchema = unknown();
|
|
30605
|
+
/**
|
|
30606
|
+
* What an uninstall did on ONE node.
|
|
30607
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
30608
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
30609
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
30610
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
30611
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
30612
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
30613
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
30614
|
+
*/
|
|
30615
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
30616
|
+
"uninstalled",
|
|
30617
|
+
"not-installed",
|
|
30618
|
+
"refused",
|
|
30619
|
+
"failed",
|
|
30620
|
+
"pending-reconnect"
|
|
30621
|
+
]);
|
|
30622
|
+
var UninstallNodeResultSchema = object({
|
|
30623
|
+
nodeId: string(),
|
|
30624
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
30625
|
+
error: string().optional(),
|
|
30626
|
+
addonIds: array(string()).readonly(),
|
|
30627
|
+
runnersStopped: array(string()).readonly(),
|
|
30628
|
+
warnings: array(string()).readonly()
|
|
30629
|
+
});
|
|
30630
|
+
var UninstallPackageResultSchema = object({
|
|
30631
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
30632
|
+
success: boolean(),
|
|
30633
|
+
packageName: string(),
|
|
30634
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
30635
|
+
});
|
|
30636
|
+
/**
|
|
30637
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
30638
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
30639
|
+
*/
|
|
30640
|
+
var PackageInstallationsSchema = object({
|
|
30641
|
+
installations: array(object({
|
|
30642
|
+
packageName: string(),
|
|
30643
|
+
nodeId: string(),
|
|
30644
|
+
nodeName: string(),
|
|
30645
|
+
isHub: boolean(),
|
|
30646
|
+
isOnline: boolean(),
|
|
30647
|
+
version: string().nullable(),
|
|
30648
|
+
addonIds: array(string()).readonly(),
|
|
30649
|
+
source: _enum(["live", "recorded"]),
|
|
30650
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
30651
|
+
onHub: boolean()
|
|
30652
|
+
})).readonly(),
|
|
30653
|
+
unreachable: array(object({
|
|
30654
|
+
nodeId: string(),
|
|
30655
|
+
error: string()
|
|
30656
|
+
})).readonly()
|
|
30657
|
+
});
|
|
28561
30658
|
var BulkUpdateItemStatusSchema = _enum([
|
|
28562
30659
|
"queued",
|
|
28563
30660
|
"updating",
|
|
@@ -28640,10 +30737,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
28640
30737
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
28641
30738
|
kind: "mutation",
|
|
28642
30739
|
auth: "admin"
|
|
28643
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30740
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30741
|
+
packageName: string().min(1),
|
|
30742
|
+
nodeId: string().optional(),
|
|
30743
|
+
everywhere: boolean().optional()
|
|
30744
|
+
}), UninstallPackageResultSchema, {
|
|
28644
30745
|
kind: "mutation",
|
|
28645
30746
|
auth: "admin"
|
|
28646
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
30747
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
28647
30748
|
kind: "mutation",
|
|
28648
30749
|
auth: "admin"
|
|
28649
30750
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -31716,6 +33817,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
31716
33817
|
enabled: boolean().optional(),
|
|
31717
33818
|
info: record(string(), unknown()).optional(),
|
|
31718
33819
|
settings: record(string(), unknown()).optional(),
|
|
33820
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
33821
|
+
* the keychain, not the table (D787). */
|
|
33822
|
+
secretKeys: array(string()).optional(),
|
|
31719
33823
|
skipRestart: boolean().optional()
|
|
31720
33824
|
});
|
|
31721
33825
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -31739,7 +33843,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
31739
33843
|
auth: "admin"
|
|
31740
33844
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
31741
33845
|
id: string(),
|
|
31742
|
-
settings: record(string(), unknown())
|
|
33846
|
+
settings: record(string(), unknown()),
|
|
33847
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
33848
|
+
secretKeys: array(string()).optional()
|
|
31743
33849
|
}), object({ success: boolean() }), {
|
|
31744
33850
|
kind: "mutation",
|
|
31745
33851
|
auth: "admin"
|
|
@@ -32138,7 +34244,8 @@ var ConnectionEndpointSchema = object({
|
|
|
32138
34244
|
"lan-ipv6",
|
|
32139
34245
|
"public",
|
|
32140
34246
|
"loopback",
|
|
32141
|
-
"app-link"
|
|
34247
|
+
"app-link",
|
|
34248
|
+
"custom"
|
|
32142
34249
|
]),
|
|
32143
34250
|
/**
|
|
32144
34251
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -32207,7 +34314,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
32207
34314
|
localPort: AdvertisedLocalPortSchema
|
|
32208
34315
|
});
|
|
32209
34316
|
/**
|
|
32210
|
-
* The address flagged for notification
|
|
34317
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
32211
34318
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
32212
34319
|
* so the UI can show it either way.
|
|
32213
34320
|
*/
|
|
@@ -32240,6 +34347,72 @@ var ViewerEndpointsSchema = object({
|
|
|
32240
34347
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
32241
34348
|
resolved: array(string()).readonly()
|
|
32242
34349
|
});
|
|
34350
|
+
/**
|
|
34351
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
34352
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
34353
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
34354
|
+
*/
|
|
34355
|
+
var HubAddressSnapshotSchema = object({
|
|
34356
|
+
override: string().nullable(),
|
|
34357
|
+
resolved: string().nullable(),
|
|
34358
|
+
source: _enum([
|
|
34359
|
+
"override",
|
|
34360
|
+
"auto",
|
|
34361
|
+
"none"
|
|
34362
|
+
])
|
|
34363
|
+
});
|
|
34364
|
+
var HubAddressesSchema = object({
|
|
34365
|
+
cluster: HubAddressSnapshotSchema,
|
|
34366
|
+
browser: HubAddressSnapshotSchema
|
|
34367
|
+
});
|
|
34368
|
+
/**
|
|
34369
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
34370
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
34371
|
+
* by at most one address.
|
|
34372
|
+
*/
|
|
34373
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
34374
|
+
var RoleSourceSchema = _enum([
|
|
34375
|
+
"flagged",
|
|
34376
|
+
"auto",
|
|
34377
|
+
"none"
|
|
34378
|
+
]);
|
|
34379
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
34380
|
+
var HubAddressRoleResolutionSchema = object({
|
|
34381
|
+
/** The address carrying the flag, or null = automatic. */
|
|
34382
|
+
flagged: string().nullable(),
|
|
34383
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
34384
|
+
resolved: string().nullable(),
|
|
34385
|
+
source: RoleSourceSchema
|
|
34386
|
+
});
|
|
34387
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
34388
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
34389
|
+
flagged: array(string()).readonly(),
|
|
34390
|
+
/** What the apps race right now. */
|
|
34391
|
+
resolved: array(string()).readonly(),
|
|
34392
|
+
source: RoleSourceSchema
|
|
34393
|
+
});
|
|
34394
|
+
var HubAddressBookSchema = object({
|
|
34395
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
34396
|
+
/** In the hub's detected palette right now. */
|
|
34397
|
+
detected: boolean(),
|
|
34398
|
+
/** Entered by the operator (removable). */
|
|
34399
|
+
custom: boolean(),
|
|
34400
|
+
/** The roles explicitly flagged on this address. */
|
|
34401
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
34402
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
34403
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
34404
|
+
/** The roles this address may be flagged with. */
|
|
34405
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
34406
|
+
})).readonly(),
|
|
34407
|
+
roles: object({
|
|
34408
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
34409
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
34410
|
+
internal: HubAddressRoleResolutionSchema,
|
|
34411
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
34412
|
+
}),
|
|
34413
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
34414
|
+
appLinkHub: string().nullable()
|
|
34415
|
+
});
|
|
32243
34416
|
var AllowedAddressesSchema = object({
|
|
32244
34417
|
/**
|
|
32245
34418
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -32283,10 +34456,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
32283
34456
|
* tunnel always emits `https://` regardless. */
|
|
32284
34457
|
scheme: _enum(["http", "https"]).optional(),
|
|
32285
34458
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
32286
|
-
* an address notification
|
|
34459
|
+
* an address notification taps can be flagged with, not a hub
|
|
32287
34460
|
* route. Default `false`: racers and rankers never see it. */
|
|
32288
34461
|
includeAppLink: boolean().optional()
|
|
32289
|
-
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(
|
|
34462
|
+
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
|
|
34463
|
+
baseUrl: string(),
|
|
34464
|
+
label: string().max(80)
|
|
34465
|
+
}), HubAddressBookSchema, {
|
|
34466
|
+
kind: "mutation",
|
|
34467
|
+
auth: "admin"
|
|
34468
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
34469
|
+
kind: "mutation",
|
|
34470
|
+
auth: "admin"
|
|
34471
|
+
}), method(object({
|
|
34472
|
+
role: HubAddressRoleSchema,
|
|
34473
|
+
baseUrl: string().nullable(),
|
|
34474
|
+
enabled: boolean(),
|
|
34475
|
+
acceptInsecureHttp: boolean().optional()
|
|
34476
|
+
}), HubAddressBookSchema, {
|
|
34477
|
+
kind: "mutation",
|
|
34478
|
+
auth: "admin"
|
|
34479
|
+
}), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
|
|
32290
34480
|
kind: "mutation",
|
|
32291
34481
|
auth: "admin"
|
|
32292
34482
|
}), method(object({
|
|
@@ -32744,7 +34934,8 @@ var MotionStatusSchema = object({
|
|
|
32744
34934
|
* writes this slice (not even a boot seed), and neither does the runner's
|
|
32745
34935
|
* phase machine: its phase is "a session is attached" for every on-motion
|
|
32746
34936
|
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
32747
|
-
* A provider's `isDetected`
|
|
34937
|
+
* A provider's `isDetected` and `getStatus` answer from the hub's slice
|
|
34938
|
+
* (`hubMotionNativeProvider`).
|
|
32748
34939
|
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
32749
34940
|
* imports) — the provider pushes both edges itself, from the upstream
|
|
32750
34941
|
* system's own state change. That is the sensor's own fact.
|
|
@@ -38476,6 +40667,32 @@ var TotpStatusSchema = object({
|
|
|
38476
40667
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
38477
40668
|
confirmedAt: number().nullable()
|
|
38478
40669
|
});
|
|
40670
|
+
/**
|
|
40671
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
40672
|
+
* and scoped tokens.
|
|
40673
|
+
*
|
|
40674
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
40675
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
40676
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
40677
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
40678
|
+
* provider.
|
|
40679
|
+
*/
|
|
40680
|
+
var ExternalIdentitySchema = object({
|
|
40681
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
40682
|
+
provider: string(),
|
|
40683
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
40684
|
+
subject: string(),
|
|
40685
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
40686
|
+
issuer: string(),
|
|
40687
|
+
userId: string(),
|
|
40688
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
40689
|
+
label: string().optional(),
|
|
40690
|
+
linkedAt: number()
|
|
40691
|
+
});
|
|
40692
|
+
var ExternalIdentityKeySchema = object({
|
|
40693
|
+
provider: string().min(1),
|
|
40694
|
+
subject: string().min(1)
|
|
40695
|
+
});
|
|
38479
40696
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
38480
40697
|
kind: "mutation",
|
|
38481
40698
|
auth: "admin",
|
|
@@ -38589,7 +40806,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
38589
40806
|
userId: string(),
|
|
38590
40807
|
username: string(),
|
|
38591
40808
|
scopes: array(TokenScopeSchema)
|
|
38592
|
-
}).nullable(), { access: "view" }), method(
|
|
40809
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
40810
|
+
userId: string(),
|
|
40811
|
+
issuer: string()
|
|
40812
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
40813
|
+
userId: string(),
|
|
40814
|
+
issuer: string().min(1),
|
|
40815
|
+
label: string().optional()
|
|
40816
|
+
}), object({ success: literal(true) }), {
|
|
40817
|
+
kind: "mutation",
|
|
40818
|
+
auth: "admin",
|
|
40819
|
+
access: "create"
|
|
40820
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
40821
|
+
kind: "mutation",
|
|
40822
|
+
auth: "admin",
|
|
40823
|
+
access: "delete"
|
|
40824
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
38593
40825
|
kind: "mutation",
|
|
38594
40826
|
auth: "admin",
|
|
38595
40827
|
access: "delete"
|
|
@@ -39291,6 +41523,16 @@ var zoneRulesCapability = {
|
|
|
39291
41523
|
durability: "restored"
|
|
39292
41524
|
};
|
|
39293
41525
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
41526
|
+
Object.freeze({
|
|
41527
|
+
person: .5,
|
|
41528
|
+
vehicle: .5,
|
|
41529
|
+
animal: .5
|
|
41530
|
+
});
|
|
41531
|
+
Object.freeze({
|
|
41532
|
+
person: .65,
|
|
41533
|
+
vehicle: .65,
|
|
41534
|
+
animal: .65
|
|
41535
|
+
});
|
|
39294
41536
|
/**
|
|
39295
41537
|
* Accessory device helpers — shared across drivers.
|
|
39296
41538
|
*
|
|
@@ -39766,7 +42008,8 @@ var BaseDevice = class {
|
|
|
39766
42008
|
this.role = options.role;
|
|
39767
42009
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
39768
42010
|
const seedData = ctx.persistedConfig ?? {};
|
|
39769
|
-
|
|
42011
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
42012
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
39770
42013
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
39771
42014
|
tags: {
|
|
39772
42015
|
deviceId: ctx.id,
|
|
@@ -40989,6 +43232,12 @@ Object.freeze({
|
|
|
40989
43232
|
addonId: null,
|
|
40990
43233
|
access: "view"
|
|
40991
43234
|
},
|
|
43235
|
+
"addons.listInstallations": {
|
|
43236
|
+
capName: "addons",
|
|
43237
|
+
capScope: "system",
|
|
43238
|
+
addonId: null,
|
|
43239
|
+
access: "view"
|
|
43240
|
+
},
|
|
40992
43241
|
"addons.listJobs": {
|
|
40993
43242
|
capName: "addons",
|
|
40994
43243
|
capScope: "system",
|
|
@@ -42171,90 +44420,18 @@ Object.freeze({
|
|
|
42171
44420
|
addonId: null,
|
|
42172
44421
|
access: "create"
|
|
42173
44422
|
},
|
|
42174
|
-
"decoder.createSession": {
|
|
42175
|
-
capName: "decoder",
|
|
42176
|
-
capScope: "system",
|
|
42177
|
-
addonId: null,
|
|
42178
|
-
access: "view"
|
|
42179
|
-
},
|
|
42180
|
-
"decoder.destroySession": {
|
|
42181
|
-
capName: "decoder",
|
|
42182
|
-
capScope: "system",
|
|
42183
|
-
addonId: null,
|
|
42184
|
-
access: "delete"
|
|
42185
|
-
},
|
|
42186
|
-
"decoder.getFrame": {
|
|
42187
|
-
capName: "decoder",
|
|
42188
|
-
capScope: "system",
|
|
42189
|
-
addonId: null,
|
|
42190
|
-
access: "view"
|
|
42191
|
-
},
|
|
42192
44423
|
"decoder.getInfo": {
|
|
42193
44424
|
capName: "decoder",
|
|
42194
44425
|
capScope: "system",
|
|
42195
44426
|
addonId: null,
|
|
42196
44427
|
access: "view"
|
|
42197
44428
|
},
|
|
42198
|
-
"decoder.getShmStats": {
|
|
42199
|
-
capName: "decoder",
|
|
42200
|
-
capScope: "system",
|
|
42201
|
-
addonId: null,
|
|
42202
|
-
access: "view"
|
|
42203
|
-
},
|
|
42204
|
-
"decoder.getStats": {
|
|
42205
|
-
capName: "decoder",
|
|
42206
|
-
capScope: "system",
|
|
42207
|
-
addonId: null,
|
|
42208
|
-
access: "view"
|
|
42209
|
-
},
|
|
42210
|
-
"decoder.listActiveSessions": {
|
|
42211
|
-
capName: "decoder",
|
|
42212
|
-
capScope: "system",
|
|
42213
|
-
addonId: null,
|
|
42214
|
-
access: "view"
|
|
42215
|
-
},
|
|
42216
|
-
"decoder.openStream": {
|
|
42217
|
-
capName: "decoder",
|
|
42218
|
-
capScope: "system",
|
|
42219
|
-
addonId: null,
|
|
42220
|
-
access: "view"
|
|
42221
|
-
},
|
|
42222
|
-
"decoder.pullFrames": {
|
|
42223
|
-
capName: "decoder",
|
|
42224
|
-
capScope: "system",
|
|
42225
|
-
addonId: null,
|
|
42226
|
-
access: "view"
|
|
42227
|
-
},
|
|
42228
|
-
"decoder.pullHandles": {
|
|
42229
|
-
capName: "decoder",
|
|
42230
|
-
capScope: "system",
|
|
42231
|
-
addonId: null,
|
|
42232
|
-
access: "view"
|
|
42233
|
-
},
|
|
42234
|
-
"decoder.pushPacket": {
|
|
42235
|
-
capName: "decoder",
|
|
42236
|
-
capScope: "system",
|
|
42237
|
-
addonId: null,
|
|
42238
|
-
access: "view"
|
|
42239
|
-
},
|
|
42240
44429
|
"decoder.reprobeHwaccel": {
|
|
42241
44430
|
capName: "decoder",
|
|
42242
44431
|
capScope: "system",
|
|
42243
44432
|
addonId: null,
|
|
42244
44433
|
access: "create"
|
|
42245
44434
|
},
|
|
42246
|
-
"decoder.supportsCodec": {
|
|
42247
|
-
capName: "decoder",
|
|
42248
|
-
capScope: "system",
|
|
42249
|
-
addonId: null,
|
|
42250
|
-
access: "view"
|
|
42251
|
-
},
|
|
42252
|
-
"decoder.updateConfig": {
|
|
42253
|
-
capName: "decoder",
|
|
42254
|
-
capScope: "system",
|
|
42255
|
-
addonId: null,
|
|
42256
|
-
access: "view"
|
|
42257
|
-
},
|
|
42258
44435
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
42259
44436
|
capName: "detection-pipeline",
|
|
42260
44437
|
capScope: "device",
|
|
@@ -43521,6 +45698,90 @@ Object.freeze({
|
|
|
43521
45698
|
addonId: null,
|
|
43522
45699
|
access: "create"
|
|
43523
45700
|
},
|
|
45701
|
+
"keychain.delete": {
|
|
45702
|
+
capName: "keychain",
|
|
45703
|
+
capScope: "system",
|
|
45704
|
+
addonId: null,
|
|
45705
|
+
access: "delete"
|
|
45706
|
+
},
|
|
45707
|
+
"keychain.getState": {
|
|
45708
|
+
capName: "keychain",
|
|
45709
|
+
capScope: "system",
|
|
45710
|
+
addonId: null,
|
|
45711
|
+
access: "view"
|
|
45712
|
+
},
|
|
45713
|
+
"keychain.listMeta": {
|
|
45714
|
+
capName: "keychain",
|
|
45715
|
+
capScope: "system",
|
|
45716
|
+
addonId: null,
|
|
45717
|
+
access: "view"
|
|
45718
|
+
},
|
|
45719
|
+
"keychain.put": {
|
|
45720
|
+
capName: "keychain",
|
|
45721
|
+
capScope: "system",
|
|
45722
|
+
addonId: null,
|
|
45723
|
+
access: "create"
|
|
45724
|
+
},
|
|
45725
|
+
"keychain.resolve": {
|
|
45726
|
+
capName: "keychain",
|
|
45727
|
+
capScope: "system",
|
|
45728
|
+
addonId: null,
|
|
45729
|
+
access: "view"
|
|
45730
|
+
},
|
|
45731
|
+
"keychainAdmin.deleteOrphans": {
|
|
45732
|
+
capName: "keychain-admin",
|
|
45733
|
+
capScope: "system",
|
|
45734
|
+
addonId: null,
|
|
45735
|
+
access: "delete"
|
|
45736
|
+
},
|
|
45737
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
45738
|
+
capName: "keychain-admin",
|
|
45739
|
+
capScope: "system",
|
|
45740
|
+
addonId: null,
|
|
45741
|
+
access: "create"
|
|
45742
|
+
},
|
|
45743
|
+
"keychainAdmin.listAudit": {
|
|
45744
|
+
capName: "keychain-admin",
|
|
45745
|
+
capScope: "system",
|
|
45746
|
+
addonId: null,
|
|
45747
|
+
access: "view"
|
|
45748
|
+
},
|
|
45749
|
+
"keychainAdmin.listSecrets": {
|
|
45750
|
+
capName: "keychain-admin",
|
|
45751
|
+
capScope: "system",
|
|
45752
|
+
addonId: null,
|
|
45753
|
+
access: "view"
|
|
45754
|
+
},
|
|
45755
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
45756
|
+
capName: "keychain-admin",
|
|
45757
|
+
capScope: "system",
|
|
45758
|
+
addonId: null,
|
|
45759
|
+
access: "delete"
|
|
45760
|
+
},
|
|
45761
|
+
"keychainAdmin.resetKeychain": {
|
|
45762
|
+
capName: "keychain-admin",
|
|
45763
|
+
capScope: "system",
|
|
45764
|
+
addonId: null,
|
|
45765
|
+
access: "delete"
|
|
45766
|
+
},
|
|
45767
|
+
"keychainAdmin.reveal": {
|
|
45768
|
+
capName: "keychain-admin",
|
|
45769
|
+
capScope: "system",
|
|
45770
|
+
addonId: null,
|
|
45771
|
+
access: "create"
|
|
45772
|
+
},
|
|
45773
|
+
"keychainAdmin.rotateMasterKey": {
|
|
45774
|
+
capName: "keychain-admin",
|
|
45775
|
+
capScope: "system",
|
|
45776
|
+
addonId: null,
|
|
45777
|
+
access: "create"
|
|
45778
|
+
},
|
|
45779
|
+
"keychainAdmin.status": {
|
|
45780
|
+
capName: "keychain-admin",
|
|
45781
|
+
capScope: "system",
|
|
45782
|
+
addonId: null,
|
|
45783
|
+
access: "view"
|
|
45784
|
+
},
|
|
43524
45785
|
"lawnMowerControl.dock": {
|
|
43525
45786
|
capName: "lawn-mower-control",
|
|
43526
45787
|
capScope: "device",
|
|
@@ -43743,12 +46004,24 @@ Object.freeze({
|
|
|
43743
46004
|
addonId: null,
|
|
43744
46005
|
access: "view"
|
|
43745
46006
|
},
|
|
46007
|
+
"localNetwork.addCustomAddress": {
|
|
46008
|
+
capName: "local-network",
|
|
46009
|
+
capScope: "system",
|
|
46010
|
+
addonId: null,
|
|
46011
|
+
access: "create"
|
|
46012
|
+
},
|
|
43746
46013
|
"localNetwork.downloadCa": {
|
|
43747
46014
|
capName: "local-network",
|
|
43748
46015
|
capScope: "system",
|
|
43749
46016
|
addonId: null,
|
|
43750
46017
|
access: "view"
|
|
43751
46018
|
},
|
|
46019
|
+
"localNetwork.getAddresses": {
|
|
46020
|
+
capName: "local-network",
|
|
46021
|
+
capScope: "system",
|
|
46022
|
+
addonId: null,
|
|
46023
|
+
access: "view"
|
|
46024
|
+
},
|
|
43752
46025
|
"localNetwork.getAllowedAddresses": {
|
|
43753
46026
|
capName: "local-network",
|
|
43754
46027
|
capScope: "system",
|
|
@@ -43761,6 +46034,12 @@ Object.freeze({
|
|
|
43761
46034
|
addonId: null,
|
|
43762
46035
|
access: "view"
|
|
43763
46036
|
},
|
|
46037
|
+
"localNetwork.getHubAddresses": {
|
|
46038
|
+
capName: "local-network",
|
|
46039
|
+
capScope: "system",
|
|
46040
|
+
addonId: null,
|
|
46041
|
+
access: "view"
|
|
46042
|
+
},
|
|
43764
46043
|
"localNetwork.getNotificationEndpoint": {
|
|
43765
46044
|
capName: "local-network",
|
|
43766
46045
|
capScope: "system",
|
|
@@ -43797,6 +46076,12 @@ Object.freeze({
|
|
|
43797
46076
|
addonId: null,
|
|
43798
46077
|
access: "create"
|
|
43799
46078
|
},
|
|
46079
|
+
"localNetwork.removeCustomAddress": {
|
|
46080
|
+
capName: "local-network",
|
|
46081
|
+
capScope: "system",
|
|
46082
|
+
addonId: null,
|
|
46083
|
+
access: "delete"
|
|
46084
|
+
},
|
|
43800
46085
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
43801
46086
|
capName: "local-network",
|
|
43802
46087
|
capScope: "system",
|
|
@@ -43809,6 +46094,12 @@ Object.freeze({
|
|
|
43809
46094
|
addonId: null,
|
|
43810
46095
|
access: "create"
|
|
43811
46096
|
},
|
|
46097
|
+
"localNetwork.setAddressRole": {
|
|
46098
|
+
capName: "local-network",
|
|
46099
|
+
capScope: "system",
|
|
46100
|
+
addonId: null,
|
|
46101
|
+
access: "create"
|
|
46102
|
+
},
|
|
43812
46103
|
"localNetwork.setAllowedAddresses": {
|
|
43813
46104
|
capName: "local-network",
|
|
43814
46105
|
capScope: "system",
|
|
@@ -44865,6 +47156,18 @@ Object.freeze({
|
|
|
44865
47156
|
addonId: null,
|
|
44866
47157
|
access: "create"
|
|
44867
47158
|
},
|
|
47159
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
47160
|
+
capName: "pipeline-analytics",
|
|
47161
|
+
capScope: "device",
|
|
47162
|
+
addonId: null,
|
|
47163
|
+
access: "create"
|
|
47164
|
+
},
|
|
47165
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
47166
|
+
capName: "pipeline-analytics",
|
|
47167
|
+
capScope: "device",
|
|
47168
|
+
addonId: null,
|
|
47169
|
+
access: "create"
|
|
47170
|
+
},
|
|
44868
47171
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
44869
47172
|
capName: "pipeline-analytics",
|
|
44870
47173
|
capScope: "device",
|
|
@@ -44913,12 +47216,24 @@ Object.freeze({
|
|
|
44913
47216
|
addonId: null,
|
|
44914
47217
|
access: "view"
|
|
44915
47218
|
},
|
|
47219
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
47220
|
+
capName: "pipeline-analytics",
|
|
47221
|
+
capScope: "device",
|
|
47222
|
+
addonId: null,
|
|
47223
|
+
access: "create"
|
|
47224
|
+
},
|
|
44916
47225
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
44917
47226
|
capName: "pipeline-analytics",
|
|
44918
47227
|
capScope: "device",
|
|
44919
47228
|
addonId: null,
|
|
44920
47229
|
access: "delete"
|
|
44921
47230
|
},
|
|
47231
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
47232
|
+
capName: "pipeline-analytics",
|
|
47233
|
+
capScope: "device",
|
|
47234
|
+
addonId: null,
|
|
47235
|
+
access: "delete"
|
|
47236
|
+
},
|
|
44922
47237
|
"pipelineAnalytics.deleteTracks": {
|
|
44923
47238
|
capName: "pipeline-analytics",
|
|
44924
47239
|
capScope: "device",
|
|
@@ -45123,6 +47438,24 @@ Object.freeze({
|
|
|
45123
47438
|
addonId: null,
|
|
45124
47439
|
access: "view"
|
|
45125
47440
|
},
|
|
47441
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
47442
|
+
capName: "pipeline-analytics",
|
|
47443
|
+
capScope: "device",
|
|
47444
|
+
addonId: null,
|
|
47445
|
+
access: "view"
|
|
47446
|
+
},
|
|
47447
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
47448
|
+
capName: "pipeline-analytics",
|
|
47449
|
+
capScope: "device",
|
|
47450
|
+
addonId: null,
|
|
47451
|
+
access: "view"
|
|
47452
|
+
},
|
|
47453
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
47454
|
+
capName: "pipeline-analytics",
|
|
47455
|
+
capScope: "device",
|
|
47456
|
+
addonId: null,
|
|
47457
|
+
access: "view"
|
|
47458
|
+
},
|
|
45126
47459
|
"pipelineAnalytics.listRetrainFrames": {
|
|
45127
47460
|
capName: "pipeline-analytics",
|
|
45128
47461
|
capScope: "device",
|
|
@@ -45171,6 +47504,12 @@ Object.freeze({
|
|
|
45171
47504
|
addonId: null,
|
|
45172
47505
|
access: "create"
|
|
45173
47506
|
},
|
|
47507
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
47508
|
+
capName: "pipeline-analytics",
|
|
47509
|
+
capScope: "device",
|
|
47510
|
+
addonId: null,
|
|
47511
|
+
access: "create"
|
|
47512
|
+
},
|
|
45174
47513
|
"pipelineAnalytics.pruneEvents": {
|
|
45175
47514
|
capName: "pipeline-analytics",
|
|
45176
47515
|
capScope: "device",
|
|
@@ -45225,6 +47564,18 @@ Object.freeze({
|
|
|
45225
47564
|
addonId: null,
|
|
45226
47565
|
access: "create"
|
|
45227
47566
|
},
|
|
47567
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
47568
|
+
capName: "pipeline-analytics",
|
|
47569
|
+
capScope: "device",
|
|
47570
|
+
addonId: null,
|
|
47571
|
+
access: "delete"
|
|
47572
|
+
},
|
|
47573
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
47574
|
+
capName: "pipeline-analytics",
|
|
47575
|
+
capScope: "device",
|
|
47576
|
+
addonId: null,
|
|
47577
|
+
access: "create"
|
|
47578
|
+
},
|
|
45228
47579
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
45229
47580
|
capName: "pipeline-analytics",
|
|
45230
47581
|
capScope: "device",
|
|
@@ -45255,6 +47606,12 @@ Object.freeze({
|
|
|
45255
47606
|
addonId: null,
|
|
45256
47607
|
access: "create"
|
|
45257
47608
|
},
|
|
47609
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
47610
|
+
capName: "pipeline-analytics",
|
|
47611
|
+
capScope: "device",
|
|
47612
|
+
addonId: null,
|
|
47613
|
+
access: "create"
|
|
47614
|
+
},
|
|
45258
47615
|
"pipelineAnalytics.setTrackFlags": {
|
|
45259
47616
|
capName: "pipeline-analytics",
|
|
45260
47617
|
capScope: "device",
|
|
@@ -45291,6 +47648,12 @@ Object.freeze({
|
|
|
45291
47648
|
addonId: null,
|
|
45292
47649
|
access: "delete"
|
|
45293
47650
|
},
|
|
47651
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
47652
|
+
capName: "pipeline-analytics",
|
|
47653
|
+
capScope: "device",
|
|
47654
|
+
addonId: null,
|
|
47655
|
+
access: "create"
|
|
47656
|
+
},
|
|
45294
47657
|
"pipelineExecutor.cacheFrameInPool": {
|
|
45295
47658
|
capName: "pipeline-executor",
|
|
45296
47659
|
capScope: "system",
|
|
@@ -45303,13 +47666,13 @@ Object.freeze({
|
|
|
45303
47666
|
addonId: null,
|
|
45304
47667
|
access: "delete"
|
|
45305
47668
|
},
|
|
45306
|
-
"pipelineExecutor.
|
|
47669
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
45307
47670
|
capName: "pipeline-executor",
|
|
45308
47671
|
capScope: "system",
|
|
45309
47672
|
addonId: null,
|
|
45310
47673
|
access: "delete"
|
|
45311
47674
|
},
|
|
45312
|
-
"pipelineExecutor.
|
|
47675
|
+
"pipelineExecutor.deleteModel": {
|
|
45313
47676
|
capName: "pipeline-executor",
|
|
45314
47677
|
capScope: "system",
|
|
45315
47678
|
addonId: null,
|
|
@@ -45453,12 +47816,6 @@ Object.freeze({
|
|
|
45453
47816
|
addonId: null,
|
|
45454
47817
|
access: "view"
|
|
45455
47818
|
},
|
|
45456
|
-
"pipelineExecutor.listTemplates": {
|
|
45457
|
-
capName: "pipeline-executor",
|
|
45458
|
-
capScope: "system",
|
|
45459
|
-
addonId: null,
|
|
45460
|
-
access: "view"
|
|
45461
|
-
},
|
|
45462
47819
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
45463
47820
|
capName: "pipeline-executor",
|
|
45464
47821
|
capScope: "system",
|
|
@@ -45483,12 +47840,6 @@ Object.freeze({
|
|
|
45483
47840
|
addonId: null,
|
|
45484
47841
|
access: "create"
|
|
45485
47842
|
},
|
|
45486
|
-
"pipelineExecutor.saveTemplate": {
|
|
45487
|
-
capName: "pipeline-executor",
|
|
45488
|
-
capScope: "system",
|
|
45489
|
-
addonId: null,
|
|
45490
|
-
access: "create"
|
|
45491
|
-
},
|
|
45492
47843
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
45493
47844
|
capName: "pipeline-executor",
|
|
45494
47845
|
capScope: "system",
|
|
@@ -45507,17 +47858,23 @@ Object.freeze({
|
|
|
45507
47858
|
addonId: null,
|
|
45508
47859
|
access: "create"
|
|
45509
47860
|
},
|
|
45510
|
-
"pipelineExecutor.
|
|
47861
|
+
"pipelineExecutor.validatePipeline": {
|
|
45511
47862
|
capName: "pipeline-executor",
|
|
45512
47863
|
capScope: "system",
|
|
45513
47864
|
addonId: null,
|
|
47865
|
+
access: "view"
|
|
47866
|
+
},
|
|
47867
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
47868
|
+
capName: "pipeline-orchestrator",
|
|
47869
|
+
capScope: "system",
|
|
47870
|
+
addonId: null,
|
|
45514
47871
|
access: "create"
|
|
45515
47872
|
},
|
|
45516
|
-
"
|
|
45517
|
-
capName: "pipeline-
|
|
47873
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
47874
|
+
capName: "pipeline-orchestrator",
|
|
45518
47875
|
capScope: "system",
|
|
45519
47876
|
addonId: null,
|
|
45520
|
-
access: "
|
|
47877
|
+
access: "create"
|
|
45521
47878
|
},
|
|
45522
47879
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
45523
47880
|
capName: "pipeline-orchestrator",
|
|
@@ -45537,7 +47894,7 @@ Object.freeze({
|
|
|
45537
47894
|
addonId: null,
|
|
45538
47895
|
access: "create"
|
|
45539
47896
|
},
|
|
45540
|
-
"pipelineOrchestrator.
|
|
47897
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
45541
47898
|
capName: "pipeline-orchestrator",
|
|
45542
47899
|
capScope: "system",
|
|
45543
47900
|
addonId: null,
|
|
@@ -45633,6 +47990,12 @@ Object.freeze({
|
|
|
45633
47990
|
addonId: null,
|
|
45634
47991
|
access: "view"
|
|
45635
47992
|
},
|
|
47993
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
47994
|
+
capName: "pipeline-orchestrator",
|
|
47995
|
+
capScope: "system",
|
|
47996
|
+
addonId: null,
|
|
47997
|
+
access: "view"
|
|
47998
|
+
},
|
|
45636
47999
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
45637
48000
|
capName: "pipeline-orchestrator",
|
|
45638
48001
|
capScope: "system",
|
|
@@ -45645,6 +48008,24 @@ Object.freeze({
|
|
|
45645
48008
|
addonId: null,
|
|
45646
48009
|
access: "view"
|
|
45647
48010
|
},
|
|
48011
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
48012
|
+
capName: "pipeline-orchestrator",
|
|
48013
|
+
capScope: "system",
|
|
48014
|
+
addonId: null,
|
|
48015
|
+
access: "view"
|
|
48016
|
+
},
|
|
48017
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
48018
|
+
capName: "pipeline-orchestrator",
|
|
48019
|
+
capScope: "system",
|
|
48020
|
+
addonId: null,
|
|
48021
|
+
access: "view"
|
|
48022
|
+
},
|
|
48023
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
48024
|
+
capName: "pipeline-orchestrator",
|
|
48025
|
+
capScope: "system",
|
|
48026
|
+
addonId: null,
|
|
48027
|
+
access: "view"
|
|
48028
|
+
},
|
|
45648
48029
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
45649
48030
|
capName: "pipeline-orchestrator",
|
|
45650
48031
|
capScope: "system",
|
|
@@ -45669,6 +48050,12 @@ Object.freeze({
|
|
|
45669
48050
|
addonId: null,
|
|
45670
48051
|
access: "view"
|
|
45671
48052
|
},
|
|
48053
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
48054
|
+
capName: "pipeline-orchestrator",
|
|
48055
|
+
capScope: "system",
|
|
48056
|
+
addonId: null,
|
|
48057
|
+
access: "view"
|
|
48058
|
+
},
|
|
45672
48059
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
45673
48060
|
capName: "pipeline-orchestrator",
|
|
45674
48061
|
capScope: "system",
|
|
@@ -45681,7 +48068,7 @@ Object.freeze({
|
|
|
45681
48068
|
addonId: null,
|
|
45682
48069
|
access: "view"
|
|
45683
48070
|
},
|
|
45684
|
-
"pipelineOrchestrator.
|
|
48071
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
45685
48072
|
capName: "pipeline-orchestrator",
|
|
45686
48073
|
capScope: "system",
|
|
45687
48074
|
addonId: null,
|
|
@@ -45693,6 +48080,12 @@ Object.freeze({
|
|
|
45693
48080
|
addonId: null,
|
|
45694
48081
|
access: "create"
|
|
45695
48082
|
},
|
|
48083
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
48084
|
+
capName: "pipeline-orchestrator",
|
|
48085
|
+
capScope: "system",
|
|
48086
|
+
addonId: null,
|
|
48087
|
+
access: "view"
|
|
48088
|
+
},
|
|
45696
48089
|
"pipelineOrchestrator.rebalance": {
|
|
45697
48090
|
capName: "pipeline-orchestrator",
|
|
45698
48091
|
capScope: "system",
|
|
@@ -45735,12 +48128,6 @@ Object.freeze({
|
|
|
45735
48128
|
addonId: null,
|
|
45736
48129
|
access: "create"
|
|
45737
48130
|
},
|
|
45738
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
45739
|
-
capName: "pipeline-orchestrator",
|
|
45740
|
-
capScope: "system",
|
|
45741
|
-
addonId: null,
|
|
45742
|
-
access: "create"
|
|
45743
|
-
},
|
|
45744
48131
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
45745
48132
|
capName: "pipeline-orchestrator",
|
|
45746
48133
|
capScope: "system",
|
|
@@ -45753,12 +48140,6 @@ Object.freeze({
|
|
|
45753
48140
|
addonId: null,
|
|
45754
48141
|
access: "create"
|
|
45755
48142
|
},
|
|
45756
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
45757
|
-
capName: "pipeline-orchestrator",
|
|
45758
|
-
capScope: "system",
|
|
45759
|
-
addonId: null,
|
|
45760
|
-
access: "create"
|
|
45761
|
-
},
|
|
45762
48143
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
45763
48144
|
capName: "pipeline-orchestrator",
|
|
45764
48145
|
capScope: "system",
|
|
@@ -45795,6 +48176,12 @@ Object.freeze({
|
|
|
45795
48176
|
addonId: null,
|
|
45796
48177
|
access: "create"
|
|
45797
48178
|
},
|
|
48179
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
48180
|
+
capName: "pipeline-orchestrator",
|
|
48181
|
+
capScope: "system",
|
|
48182
|
+
addonId: null,
|
|
48183
|
+
access: "create"
|
|
48184
|
+
},
|
|
45798
48185
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
45799
48186
|
capName: "pipeline-orchestrator",
|
|
45800
48187
|
capScope: "system",
|
|
@@ -45813,12 +48200,36 @@ Object.freeze({
|
|
|
45813
48200
|
addonId: null,
|
|
45814
48201
|
access: "create"
|
|
45815
48202
|
},
|
|
48203
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
48204
|
+
capName: "pipeline-orchestrator",
|
|
48205
|
+
capScope: "system",
|
|
48206
|
+
addonId: null,
|
|
48207
|
+
access: "create"
|
|
48208
|
+
},
|
|
45816
48209
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
45817
48210
|
capName: "pipeline-orchestrator",
|
|
45818
48211
|
capScope: "system",
|
|
45819
48212
|
addonId: null,
|
|
45820
48213
|
access: "create"
|
|
45821
48214
|
},
|
|
48215
|
+
"pipelineOrchestrator.setShareSource": {
|
|
48216
|
+
capName: "pipeline-orchestrator",
|
|
48217
|
+
capScope: "system",
|
|
48218
|
+
addonId: null,
|
|
48219
|
+
access: "create"
|
|
48220
|
+
},
|
|
48221
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
48222
|
+
capName: "pipeline-orchestrator",
|
|
48223
|
+
capScope: "system",
|
|
48224
|
+
addonId: null,
|
|
48225
|
+
access: "create"
|
|
48226
|
+
},
|
|
48227
|
+
"pipelineOrchestrator.suggestShares": {
|
|
48228
|
+
capName: "pipeline-orchestrator",
|
|
48229
|
+
capScope: "system",
|
|
48230
|
+
addonId: null,
|
|
48231
|
+
access: "view"
|
|
48232
|
+
},
|
|
45822
48233
|
"pipelineOrchestrator.unassignAudio": {
|
|
45823
48234
|
capName: "pipeline-orchestrator",
|
|
45824
48235
|
capScope: "system",
|
|
@@ -45831,8 +48242,8 @@ Object.freeze({
|
|
|
45831
48242
|
addonId: null,
|
|
45832
48243
|
access: "create"
|
|
45833
48244
|
},
|
|
45834
|
-
"
|
|
45835
|
-
capName: "pipeline-
|
|
48245
|
+
"pipelineRunner.abortNodeBench": {
|
|
48246
|
+
capName: "pipeline-runner",
|
|
45836
48247
|
capScope: "system",
|
|
45837
48248
|
addonId: null,
|
|
45838
48249
|
access: "create"
|
|
@@ -45885,6 +48296,12 @@ Object.freeze({
|
|
|
45885
48296
|
addonId: null,
|
|
45886
48297
|
access: "view"
|
|
45887
48298
|
},
|
|
48299
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
48300
|
+
capName: "pipeline-runner",
|
|
48301
|
+
capScope: "system",
|
|
48302
|
+
addonId: null,
|
|
48303
|
+
access: "view"
|
|
48304
|
+
},
|
|
45888
48305
|
"pipelineRunner.getParkedTrackFrame": {
|
|
45889
48306
|
capName: "pipeline-runner",
|
|
45890
48307
|
capScope: "system",
|
|
@@ -45927,6 +48344,12 @@ Object.freeze({
|
|
|
45927
48344
|
addonId: null,
|
|
45928
48345
|
access: "create"
|
|
45929
48346
|
},
|
|
48347
|
+
"pipelineRunner.startNodeBench": {
|
|
48348
|
+
capName: "pipeline-runner",
|
|
48349
|
+
capScope: "system",
|
|
48350
|
+
addonId: null,
|
|
48351
|
+
access: "create"
|
|
48352
|
+
},
|
|
45930
48353
|
"plateGallery.assignPlate": {
|
|
45931
48354
|
capName: "plate-gallery",
|
|
45932
48355
|
capScope: "system",
|
|
@@ -47271,12 +49694,6 @@ Object.freeze({
|
|
|
47271
49694
|
addonId: null,
|
|
47272
49695
|
access: "view"
|
|
47273
49696
|
},
|
|
47274
|
-
"streamBroker.pullFrameHandles": {
|
|
47275
|
-
capName: "stream-broker",
|
|
47276
|
-
capScope: "system",
|
|
47277
|
-
addonId: null,
|
|
47278
|
-
access: "view"
|
|
47279
|
-
},
|
|
47280
49697
|
"streamBroker.regenerateRtspToken": {
|
|
47281
49698
|
capName: "stream-broker",
|
|
47282
49699
|
capScope: "system",
|
|
@@ -47343,12 +49760,6 @@ Object.freeze({
|
|
|
47343
49760
|
addonId: null,
|
|
47344
49761
|
access: "create"
|
|
47345
49762
|
},
|
|
47346
|
-
"streamBroker.subscribeFrames": {
|
|
47347
|
-
capName: "stream-broker",
|
|
47348
|
-
capScope: "system",
|
|
47349
|
-
addonId: null,
|
|
47350
|
-
access: "create"
|
|
47351
|
-
},
|
|
47352
49763
|
"streamBroker.unassignProfile": {
|
|
47353
49764
|
capName: "stream-broker",
|
|
47354
49765
|
capScope: "system",
|
|
@@ -47361,12 +49772,6 @@ Object.freeze({
|
|
|
47361
49772
|
addonId: null,
|
|
47362
49773
|
access: "create"
|
|
47363
49774
|
},
|
|
47364
|
-
"streamBroker.unsubscribeFrames": {
|
|
47365
|
-
capName: "stream-broker",
|
|
47366
|
-
capScope: "system",
|
|
47367
|
-
addonId: null,
|
|
47368
|
-
access: "create"
|
|
47369
|
-
},
|
|
47370
49775
|
"streamCatalog.getCatalog": {
|
|
47371
49776
|
capName: "stream-catalog",
|
|
47372
49777
|
capScope: "device",
|
|
@@ -47661,18 +50066,36 @@ Object.freeze({
|
|
|
47661
50066
|
addonId: null,
|
|
47662
50067
|
access: "delete"
|
|
47663
50068
|
},
|
|
50069
|
+
"userManagement.findUserByExternalIdentity": {
|
|
50070
|
+
capName: "user-management",
|
|
50071
|
+
capScope: "system",
|
|
50072
|
+
addonId: null,
|
|
50073
|
+
access: "view"
|
|
50074
|
+
},
|
|
47664
50075
|
"userManagement.getTotpStatus": {
|
|
47665
50076
|
capName: "user-management",
|
|
47666
50077
|
capScope: "system",
|
|
47667
50078
|
addonId: null,
|
|
47668
50079
|
access: "view"
|
|
47669
50080
|
},
|
|
50081
|
+
"userManagement.linkExternalIdentity": {
|
|
50082
|
+
capName: "user-management",
|
|
50083
|
+
capScope: "system",
|
|
50084
|
+
addonId: null,
|
|
50085
|
+
access: "create"
|
|
50086
|
+
},
|
|
47670
50087
|
"userManagement.listApiKeys": {
|
|
47671
50088
|
capName: "user-management",
|
|
47672
50089
|
capScope: "system",
|
|
47673
50090
|
addonId: null,
|
|
47674
50091
|
access: "view"
|
|
47675
50092
|
},
|
|
50093
|
+
"userManagement.listExternalIdentities": {
|
|
50094
|
+
capName: "user-management",
|
|
50095
|
+
capScope: "system",
|
|
50096
|
+
addonId: null,
|
|
50097
|
+
access: "view"
|
|
50098
|
+
},
|
|
47676
50099
|
"userManagement.listOauthSessions": {
|
|
47677
50100
|
capName: "user-management",
|
|
47678
50101
|
capScope: "system",
|
|
@@ -47751,6 +50174,12 @@ Object.freeze({
|
|
|
47751
50174
|
addonId: null,
|
|
47752
50175
|
access: "create"
|
|
47753
50176
|
},
|
|
50177
|
+
"userManagement.unlinkExternalIdentity": {
|
|
50178
|
+
capName: "user-management",
|
|
50179
|
+
capScope: "system",
|
|
50180
|
+
addonId: null,
|
|
50181
|
+
access: "delete"
|
|
50182
|
+
},
|
|
47754
50183
|
"userManagement.updateUser": {
|
|
47755
50184
|
capName: "user-management",
|
|
47756
50185
|
capScope: "system",
|
|
@@ -48063,6 +50492,12 @@ Object.freeze({
|
|
|
48063
50492
|
addonId: null,
|
|
48064
50493
|
access: "create"
|
|
48065
50494
|
},
|
|
50495
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
50496
|
+
capName: "webrtc-session",
|
|
50497
|
+
capScope: "device",
|
|
50498
|
+
addonId: null,
|
|
50499
|
+
access: "create"
|
|
50500
|
+
},
|
|
48066
50501
|
"webrtcSession.closeSession": {
|
|
48067
50502
|
capName: "webrtc-session",
|
|
48068
50503
|
capScope: "device",
|
|
@@ -49940,11 +52375,6 @@ Object.freeze({
|
|
|
49940
52375
|
form: "single",
|
|
49941
52376
|
optional: false
|
|
49942
52377
|
}],
|
|
49943
|
-
"decoder.createSession": [{
|
|
49944
|
-
name: "deviceId",
|
|
49945
|
-
form: "single",
|
|
49946
|
-
optional: true
|
|
49947
|
-
}],
|
|
49948
52378
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
49949
52379
|
name: "deviceId",
|
|
49950
52380
|
form: "single",
|
|
@@ -50915,6 +53345,11 @@ Object.freeze({
|
|
|
50915
53345
|
form: "single",
|
|
50916
53346
|
optional: false
|
|
50917
53347
|
}],
|
|
53348
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
53349
|
+
name: "deviceId",
|
|
53350
|
+
form: "single",
|
|
53351
|
+
optional: false
|
|
53352
|
+
}],
|
|
50918
53353
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
50919
53354
|
name: "deviceId",
|
|
50920
53355
|
form: "single",
|
|
@@ -51105,6 +53540,11 @@ Object.freeze({
|
|
|
51105
53540
|
form: "single",
|
|
51106
53541
|
optional: false
|
|
51107
53542
|
}],
|
|
53543
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
53544
|
+
name: "deviceId",
|
|
53545
|
+
form: "single",
|
|
53546
|
+
optional: false
|
|
53547
|
+
}],
|
|
51108
53548
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
51109
53549
|
name: "deviceId",
|
|
51110
53550
|
form: "single",
|
|
@@ -51155,6 +53595,11 @@ Object.freeze({
|
|
|
51155
53595
|
form: "single",
|
|
51156
53596
|
optional: false
|
|
51157
53597
|
}],
|
|
53598
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
53599
|
+
name: "deviceId",
|
|
53600
|
+
form: "single",
|
|
53601
|
+
optional: false
|
|
53602
|
+
}],
|
|
51158
53603
|
"pipelineAnalytics.setTrackFlags": [{
|
|
51159
53604
|
name: "deviceId",
|
|
51160
53605
|
form: "single",
|
|
@@ -51175,6 +53620,11 @@ Object.freeze({
|
|
|
51175
53620
|
form: "single",
|
|
51176
53621
|
optional: false
|
|
51177
53622
|
}],
|
|
53623
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
53624
|
+
name: "deviceIds",
|
|
53625
|
+
form: "array",
|
|
53626
|
+
optional: true
|
|
53627
|
+
}],
|
|
51178
53628
|
"pipelineExecutor.runPipeline": [{
|
|
51179
53629
|
name: "deviceId",
|
|
51180
53630
|
form: "single",
|
|
@@ -51280,6 +53730,11 @@ Object.freeze({
|
|
|
51280
53730
|
form: "single",
|
|
51281
53731
|
optional: false
|
|
51282
53732
|
}],
|
|
53733
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
53734
|
+
name: "deviceId",
|
|
53735
|
+
form: "single",
|
|
53736
|
+
optional: false
|
|
53737
|
+
}],
|
|
51283
53738
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
51284
53739
|
name: "deviceId",
|
|
51285
53740
|
form: "single",
|
|
@@ -52051,6 +54506,11 @@ Object.freeze({
|
|
|
52051
54506
|
form: "single",
|
|
52052
54507
|
optional: false
|
|
52053
54508
|
}],
|
|
54509
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
54510
|
+
name: "deviceId",
|
|
54511
|
+
form: "single",
|
|
54512
|
+
optional: false
|
|
54513
|
+
}],
|
|
52054
54514
|
"webrtcSession.closeSession": [{
|
|
52055
54515
|
name: "deviceId",
|
|
52056
54516
|
form: "single",
|
|
@@ -52280,6 +54740,8 @@ new Map(Object.entries({
|
|
|
52280
54740
|
"detection-blind": "device-events",
|
|
52281
54741
|
"node-online": "system",
|
|
52282
54742
|
"node-offline": "system",
|
|
54743
|
+
"node-restarting": "system",
|
|
54744
|
+
"node-updating": "system",
|
|
52283
54745
|
"node-inference-unavailable": "system",
|
|
52284
54746
|
"addon-crash-loop": "system",
|
|
52285
54747
|
"addon-update-available": "system",
|
|
@@ -52357,6 +54819,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
52357
54819
|
kinds: [
|
|
52358
54820
|
"node-offline",
|
|
52359
54821
|
"node-online",
|
|
54822
|
+
"node-restarting",
|
|
52360
54823
|
"node-inference-unavailable"
|
|
52361
54824
|
]
|
|
52362
54825
|
},
|
|
@@ -52378,6 +54841,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
52378
54841
|
label: "Server & container updates",
|
|
52379
54842
|
kinds: [
|
|
52380
54843
|
"server-update-available",
|
|
54844
|
+
"node-updating",
|
|
52381
54845
|
"server-updated",
|
|
52382
54846
|
"wrapper-update-available"
|
|
52383
54847
|
]
|
|
@@ -52525,6 +54989,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
52525
54989
|
kinds: [
|
|
52526
54990
|
"node-offline",
|
|
52527
54991
|
"node-online",
|
|
54992
|
+
"node-restarting",
|
|
52528
54993
|
"node-inference-unavailable"
|
|
52529
54994
|
]
|
|
52530
54995
|
},
|
|
@@ -52546,6 +55011,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
52546
55011
|
example: "server 1.2.377 → 1.2.378",
|
|
52547
55012
|
kinds: [
|
|
52548
55013
|
"server-update-available",
|
|
55014
|
+
"node-updating",
|
|
52549
55015
|
"server-updated",
|
|
52550
55016
|
"wrapper-update-available"
|
|
52551
55017
|
]
|
|
@@ -52578,7 +55044,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
52578
55044
|
{
|
|
52579
55045
|
name: "summarySection",
|
|
52580
55046
|
label: "Summary: this section",
|
|
52581
|
-
description: "The section a per-section summary row is about
|
|
55047
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
52582
55048
|
example: "Batterie scariche",
|
|
52583
55049
|
group: "system",
|
|
52584
55050
|
families: ["rule"],
|
|
@@ -53339,7 +55805,7 @@ var rtspCameraSchema = object({
|
|
|
53339
55805
|
})).min(1)).describe("Published RTSP streams"),
|
|
53340
55806
|
snapshotUrl: string().default("").describe("Snapshot URL (optional)"),
|
|
53341
55807
|
username: string().default("").describe("Username"),
|
|
53342
|
-
password: string().default("").describe("Password")
|
|
55808
|
+
password: string().default("").describe("Password").meta({ secret: true })
|
|
53343
55809
|
});
|
|
53344
55810
|
/**
|
|
53345
55811
|
* Legacy storage shape: `[{ label: 'high'|'mid'|'low', url }]`.
|