@camstack/addon-provider-amcrest 0.2.131 → 0.2.133
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 +3000 -566
- package/dist/addon.mjs +3000 -566
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -34,7 +34,7 @@ let node_stream = require("node:stream");
|
|
|
34
34
|
let node_stream_promises = require("node:stream/promises");
|
|
35
35
|
let node_child_process = require("node:child_process");
|
|
36
36
|
let node_os = require("node:os");
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -113,6 +113,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
113
113
|
*/
|
|
114
114
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
115
115
|
/**
|
|
116
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
117
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
118
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
119
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
120
|
+
*/
|
|
121
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
122
|
+
/**
|
|
116
123
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
117
124
|
* transitions from `failed` back to `healthy` (typically via the
|
|
118
125
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -535,15 +542,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
535
542
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
536
543
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
537
544
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
538
|
-
/**
|
|
539
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
540
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
541
|
-
* `createSession`, so running sessions keep their current backend until
|
|
542
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
543
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
544
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
545
|
-
*/
|
|
546
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
547
545
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
548
546
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
549
547
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5414,7 +5412,7 @@ var ZodIssueCode = {
|
|
|
5414
5412
|
var ZodFirstPartyTypeKind;
|
|
5415
5413
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5416
5414
|
//#endregion
|
|
5417
|
-
//#region ../types/dist/sleep-
|
|
5415
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5418
5416
|
/**
|
|
5419
5417
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5420
5418
|
* window to float samples (D455).
|
|
@@ -5493,6 +5491,97 @@ function buildAlawTable() {
|
|
|
5493
5491
|
}
|
|
5494
5492
|
buildUlawTable();
|
|
5495
5493
|
buildAlawTable();
|
|
5494
|
+
/** Is this field's stored value a credential? */
|
|
5495
|
+
function isSecretConfigField(field) {
|
|
5496
|
+
if (field.type === "password") return true;
|
|
5497
|
+
return "secret" in field && field.secret === true;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5501
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5502
|
+
*/
|
|
5503
|
+
function isKeychainStoredField(field) {
|
|
5504
|
+
if (!isSecretConfigField(field)) return false;
|
|
5505
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5506
|
+
return !("storage" in field && field.storage === "inline");
|
|
5507
|
+
}
|
|
5508
|
+
/**
|
|
5509
|
+
* What a settings blob holds where a secret used to be.
|
|
5510
|
+
*
|
|
5511
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5512
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5513
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5514
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5515
|
+
*
|
|
5516
|
+
* The same shapes travel to and from the admin UI:
|
|
5517
|
+
*
|
|
5518
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5519
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5520
|
+
* value is set, never the value.
|
|
5521
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5522
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5523
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5524
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5525
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5526
|
+
*
|
|
5527
|
+
* Pure and browser-safe.
|
|
5528
|
+
*/
|
|
5529
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5530
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5531
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5532
|
+
function isRecord$1$1(value) {
|
|
5533
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5534
|
+
}
|
|
5535
|
+
function makeSecretMarker(ref) {
|
|
5536
|
+
return {
|
|
5537
|
+
$secret: ref,
|
|
5538
|
+
v: 1
|
|
5539
|
+
};
|
|
5540
|
+
}
|
|
5541
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5542
|
+
function isSecretMarker(value) {
|
|
5543
|
+
if (!isRecord$1$1(value)) return false;
|
|
5544
|
+
const ref = value["$secret"];
|
|
5545
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5546
|
+
}
|
|
5547
|
+
function isSecretClear(value) {
|
|
5548
|
+
return isRecord$1$1(value) && value["$secretClear"] === true;
|
|
5549
|
+
}
|
|
5550
|
+
/**
|
|
5551
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5552
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5553
|
+
* survives this function.
|
|
5554
|
+
*/
|
|
5555
|
+
function toSecretFieldView(stored) {
|
|
5556
|
+
if (isSecretMarker(stored)) return {
|
|
5557
|
+
$secret: stored.$secret,
|
|
5558
|
+
v: 1,
|
|
5559
|
+
set: true
|
|
5560
|
+
};
|
|
5561
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5562
|
+
$secret: null,
|
|
5563
|
+
v: 1,
|
|
5564
|
+
set: true,
|
|
5565
|
+
inline: true
|
|
5566
|
+
};
|
|
5567
|
+
return null;
|
|
5568
|
+
}
|
|
5569
|
+
/**
|
|
5570
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5571
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5572
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5573
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5574
|
+
*/
|
|
5575
|
+
function classifySecretWrite(incoming) {
|
|
5576
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5577
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5578
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5579
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5580
|
+
return {
|
|
5581
|
+
kind: "set",
|
|
5582
|
+
value: incoming
|
|
5583
|
+
};
|
|
5584
|
+
}
|
|
5496
5585
|
Object.fromEntries([
|
|
5497
5586
|
{
|
|
5498
5587
|
id: "overview",
|
|
@@ -5664,33 +5753,19 @@ Object.fromEntries([
|
|
|
5664
5753
|
function isValuelessField(field) {
|
|
5665
5754
|
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";
|
|
5666
5755
|
}
|
|
5667
|
-
|
|
5668
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5669
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5670
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5671
|
-
*
|
|
5672
|
-
* For each leaf field:
|
|
5673
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5674
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5675
|
-
*
|
|
5676
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5677
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5678
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5679
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5680
|
-
*/
|
|
5681
|
-
function hydrateSchema(schema, values) {
|
|
5756
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5682
5757
|
return {
|
|
5683
5758
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5684
5759
|
sections: schema.sections.map((section) => ({
|
|
5685
5760
|
...section,
|
|
5686
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5761
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5687
5762
|
}))
|
|
5688
5763
|
};
|
|
5689
5764
|
}
|
|
5690
|
-
function hydrateField(field, values) {
|
|
5765
|
+
function hydrateField(field, values, options) {
|
|
5691
5766
|
if (isValuelessField(field)) return field;
|
|
5692
5767
|
if (field.type === "group") {
|
|
5693
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5768
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5694
5769
|
return {
|
|
5695
5770
|
...field,
|
|
5696
5771
|
fields: hydratedChildren
|
|
@@ -5699,7 +5774,7 @@ function hydrateField(field, values) {
|
|
|
5699
5774
|
if (field.type === "sub-tabs") {
|
|
5700
5775
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5701
5776
|
...tab,
|
|
5702
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5777
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5703
5778
|
}));
|
|
5704
5779
|
return {
|
|
5705
5780
|
...field,
|
|
@@ -5709,6 +5784,33 @@ function hydrateField(field, values) {
|
|
|
5709
5784
|
const key = field.key;
|
|
5710
5785
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5711
5786
|
const defaultValue = field.default;
|
|
5787
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5788
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5789
|
+
...field,
|
|
5790
|
+
value: toSecretFieldView(storedValue)
|
|
5791
|
+
};
|
|
5792
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5793
|
+
...field,
|
|
5794
|
+
value: null
|
|
5795
|
+
};
|
|
5796
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5797
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5798
|
+
if (secretItemKeys.length > 0) {
|
|
5799
|
+
const rows = storedValue.map((row) => {
|
|
5800
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5801
|
+
const out = { ...row };
|
|
5802
|
+
for (const k of secretItemKeys) {
|
|
5803
|
+
const v = Reflect.get(row, k);
|
|
5804
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5805
|
+
}
|
|
5806
|
+
return out;
|
|
5807
|
+
});
|
|
5808
|
+
return {
|
|
5809
|
+
...field,
|
|
5810
|
+
value: rows
|
|
5811
|
+
};
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5712
5814
|
if (field.multiple) {
|
|
5713
5815
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5714
5816
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5951,6 +6053,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5951
6053
|
}
|
|
5952
6054
|
return out;
|
|
5953
6055
|
}
|
|
6056
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6057
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6058
|
+
function globalSecretScope() {
|
|
6059
|
+
return GLOBAL_SCOPE;
|
|
6060
|
+
}
|
|
6061
|
+
function encodeSegment(value) {
|
|
6062
|
+
return encodeURIComponent(value);
|
|
6063
|
+
}
|
|
6064
|
+
/**
|
|
6065
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6066
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6067
|
+
* `providers[authentik].clientSecret`.
|
|
6068
|
+
*/
|
|
6069
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6070
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6071
|
+
}
|
|
6072
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6073
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6074
|
+
fieldPath;
|
|
6075
|
+
constructor(fieldPath, cause) {
|
|
6076
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6077
|
+
this.fieldPath = fieldPath;
|
|
6078
|
+
this.name = "KeychainWriteRefusedError";
|
|
6079
|
+
}
|
|
6080
|
+
};
|
|
6081
|
+
var KEEP = { kind: "keep" };
|
|
6082
|
+
function isRecord$2(value) {
|
|
6083
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6084
|
+
}
|
|
6085
|
+
function defaultMintId() {
|
|
6086
|
+
return globalThis.crypto.randomUUID();
|
|
6087
|
+
}
|
|
6088
|
+
/** Every marker ref anywhere under `value`. */
|
|
6089
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6090
|
+
if (isSecretMarker(value)) {
|
|
6091
|
+
out.push(value.$secret);
|
|
6092
|
+
return out;
|
|
6093
|
+
}
|
|
6094
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6095
|
+
else if (isRecord$2(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6096
|
+
return out;
|
|
6097
|
+
}
|
|
6098
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6099
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6100
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6101
|
+
}
|
|
6102
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6103
|
+
const intent = classifySecretWrite(incoming);
|
|
6104
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6105
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6106
|
+
if (intent.kind === "keep") return KEEP;
|
|
6107
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6108
|
+
if (intent.kind === "clear") {
|
|
6109
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6110
|
+
return {
|
|
6111
|
+
kind: "value",
|
|
6112
|
+
value: null
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6116
|
+
kind: "value",
|
|
6117
|
+
value: stored
|
|
6118
|
+
};
|
|
6119
|
+
try {
|
|
6120
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6121
|
+
} catch (err) {
|
|
6122
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6123
|
+
}
|
|
6124
|
+
return {
|
|
6125
|
+
kind: "value",
|
|
6126
|
+
value: makeSecretMarker(ref)
|
|
6127
|
+
};
|
|
6128
|
+
}
|
|
6129
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6130
|
+
function applyMember(out, key, result, storedParent) {
|
|
6131
|
+
if (result.kind === "value") {
|
|
6132
|
+
out[key] = result.value;
|
|
6133
|
+
return;
|
|
6134
|
+
}
|
|
6135
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6136
|
+
else delete out[key];
|
|
6137
|
+
}
|
|
6138
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6139
|
+
const out = { ...incoming };
|
|
6140
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6141
|
+
return out;
|
|
6142
|
+
}
|
|
6143
|
+
function rowId(row, idKey) {
|
|
6144
|
+
const raw = row[idKey];
|
|
6145
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6146
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6147
|
+
return null;
|
|
6148
|
+
}
|
|
6149
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6150
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$2) : [];
|
|
6151
|
+
if (!Array.isArray(incoming)) {
|
|
6152
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6153
|
+
return {
|
|
6154
|
+
kind: "value",
|
|
6155
|
+
value: incoming
|
|
6156
|
+
};
|
|
6157
|
+
}
|
|
6158
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6159
|
+
for (const row of storedRows) {
|
|
6160
|
+
const id = rowId(row, node.idKey);
|
|
6161
|
+
if (id !== null) storedById.set(id, row);
|
|
6162
|
+
}
|
|
6163
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6164
|
+
const rows = [];
|
|
6165
|
+
for (const row of incoming) {
|
|
6166
|
+
if (!isRecord$2(row)) {
|
|
6167
|
+
rows.push(row);
|
|
6168
|
+
continue;
|
|
6169
|
+
}
|
|
6170
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6171
|
+
kept.add(id);
|
|
6172
|
+
const withId = {
|
|
6173
|
+
...row,
|
|
6174
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6175
|
+
};
|
|
6176
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6177
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6178
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6179
|
+
}
|
|
6180
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6181
|
+
return {
|
|
6182
|
+
kind: "value",
|
|
6183
|
+
value: rows
|
|
6184
|
+
};
|
|
6185
|
+
}
|
|
6186
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6187
|
+
switch (node.kind) {
|
|
6188
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6189
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6190
|
+
case "object": {
|
|
6191
|
+
if (!isRecord$2(incoming)) {
|
|
6192
|
+
if (incoming === void 0) return KEEP;
|
|
6193
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6194
|
+
return {
|
|
6195
|
+
kind: "value",
|
|
6196
|
+
value: incoming
|
|
6197
|
+
};
|
|
6198
|
+
}
|
|
6199
|
+
const storedObj = isRecord$2(stored) ? stored : {};
|
|
6200
|
+
return {
|
|
6201
|
+
kind: "value",
|
|
6202
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6203
|
+
};
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6208
|
+
function splitNodeKey(key) {
|
|
6209
|
+
const at = key.indexOf("@");
|
|
6210
|
+
return at <= 0 ? {
|
|
6211
|
+
base: key,
|
|
6212
|
+
nodeId: null
|
|
6213
|
+
} : {
|
|
6214
|
+
base: key.slice(0, at),
|
|
6215
|
+
nodeId: key.slice(at + 1)
|
|
6216
|
+
};
|
|
6217
|
+
}
|
|
6218
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6219
|
+
async function transformSecretWrite(input) {
|
|
6220
|
+
const deletes = [];
|
|
6221
|
+
const base = {
|
|
6222
|
+
secrets: input.secrets,
|
|
6223
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6224
|
+
deletes,
|
|
6225
|
+
operatorWrite: input.operatorWrite === true
|
|
6226
|
+
};
|
|
6227
|
+
const out = {};
|
|
6228
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6229
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6230
|
+
const node = input.tree.get(baseKey);
|
|
6231
|
+
if (node === void 0) {
|
|
6232
|
+
out[key] = incoming;
|
|
6233
|
+
continue;
|
|
6234
|
+
}
|
|
6235
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6236
|
+
kind: "node",
|
|
6237
|
+
nodeId
|
|
6238
|
+
} : input.scope ?? globalSecretScope();
|
|
6239
|
+
const result = await writeNode({
|
|
6240
|
+
...base,
|
|
6241
|
+
scope
|
|
6242
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6243
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6244
|
+
}
|
|
6245
|
+
return {
|
|
6246
|
+
patch: out,
|
|
6247
|
+
afterWrite: async () => {
|
|
6248
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6249
|
+
try {
|
|
6250
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6251
|
+
return { orphaned: [] };
|
|
6252
|
+
} catch {
|
|
6253
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6256
|
+
};
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6260
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6261
|
+
*/
|
|
6262
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6263
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6264
|
+
if (refs.length === 0) return {
|
|
6265
|
+
value,
|
|
6266
|
+
unresolved: []
|
|
6267
|
+
};
|
|
6268
|
+
const answers = await secrets.resolve(refs);
|
|
6269
|
+
const unresolved = [];
|
|
6270
|
+
for (const ref of new Set(refs)) {
|
|
6271
|
+
const answer = answers[ref];
|
|
6272
|
+
if (answer === void 0) unresolved.push({
|
|
6273
|
+
ref,
|
|
6274
|
+
reason: "not-initialized"
|
|
6275
|
+
});
|
|
6276
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6277
|
+
ref,
|
|
6278
|
+
reason: answer.reason
|
|
6279
|
+
});
|
|
6280
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6281
|
+
ref,
|
|
6282
|
+
reason: answer.kind
|
|
6283
|
+
});
|
|
6284
|
+
}
|
|
6285
|
+
const substitute = (v) => {
|
|
6286
|
+
if (isSecretMarker(v)) {
|
|
6287
|
+
const answer = answers[v.$secret];
|
|
6288
|
+
return answer?.kind === "value" ? {
|
|
6289
|
+
keep: true,
|
|
6290
|
+
value: answer.value
|
|
6291
|
+
} : {
|
|
6292
|
+
keep: false,
|
|
6293
|
+
value: void 0
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
if (Array.isArray(v)) {
|
|
6297
|
+
const items = [];
|
|
6298
|
+
for (const item of v) {
|
|
6299
|
+
const s = substitute(item);
|
|
6300
|
+
if (s.keep) items.push(s.value);
|
|
6301
|
+
}
|
|
6302
|
+
return {
|
|
6303
|
+
keep: true,
|
|
6304
|
+
value: items
|
|
6305
|
+
};
|
|
6306
|
+
}
|
|
6307
|
+
if (isRecord$2(v)) {
|
|
6308
|
+
const out = {};
|
|
6309
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6310
|
+
const s = substitute(child);
|
|
6311
|
+
if (s.keep) out[k] = s.value;
|
|
6312
|
+
}
|
|
6313
|
+
return {
|
|
6314
|
+
keep: true,
|
|
6315
|
+
value: out
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
return {
|
|
6319
|
+
keep: true,
|
|
6320
|
+
value: v
|
|
6321
|
+
};
|
|
6322
|
+
};
|
|
6323
|
+
return {
|
|
6324
|
+
value: substitute(value).value,
|
|
6325
|
+
unresolved
|
|
6326
|
+
};
|
|
6327
|
+
}
|
|
6328
|
+
function touchesTree(tree, patch) {
|
|
6329
|
+
if (tree.size === 0) return false;
|
|
6330
|
+
for (const key of Object.keys(patch)) {
|
|
6331
|
+
const at = key.indexOf("@");
|
|
6332
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6333
|
+
}
|
|
6334
|
+
return false;
|
|
6335
|
+
}
|
|
6336
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6337
|
+
async function readStoredAddonBlob(raw) {
|
|
6338
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6339
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6340
|
+
const result = await threeWay.call(raw);
|
|
6341
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6342
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6343
|
+
}
|
|
6344
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6345
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6346
|
+
const serialize = (key, fn) => {
|
|
6347
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6348
|
+
const tail = next.catch(() => void 0);
|
|
6349
|
+
chains.set(key, tail);
|
|
6350
|
+
tail.then(() => {
|
|
6351
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6352
|
+
});
|
|
6353
|
+
return next;
|
|
6354
|
+
};
|
|
6355
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6356
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6357
|
+
return serialize(chainKey, async () => {
|
|
6358
|
+
const stored = await readStored();
|
|
6359
|
+
const result = await transformSecretWrite({
|
|
6360
|
+
tree,
|
|
6361
|
+
secrets: opts.secrets,
|
|
6362
|
+
patch,
|
|
6363
|
+
stored,
|
|
6364
|
+
...scope !== void 0 ? { scope } : {},
|
|
6365
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6366
|
+
});
|
|
6367
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6368
|
+
const { orphaned } = await result.afterWrite();
|
|
6369
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6370
|
+
});
|
|
6371
|
+
};
|
|
6372
|
+
const wrapped = {
|
|
6373
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6374
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6375
|
+
kind: "device",
|
|
6376
|
+
deviceId
|
|
6377
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6378
|
+
};
|
|
6379
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6380
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6381
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6382
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6383
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6384
|
+
} });
|
|
6385
|
+
}
|
|
6386
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6387
|
+
function withSecretAwareSettings(context, opts) {
|
|
6388
|
+
const raw = context.settings;
|
|
6389
|
+
if (raw === void 0) return context;
|
|
6390
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6391
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6392
|
+
if (prop === "settings") return settings;
|
|
6393
|
+
return Reflect.get(target, prop, receiver);
|
|
6394
|
+
} });
|
|
6395
|
+
}
|
|
6396
|
+
var LEAF = { kind: "leaf" };
|
|
6397
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6398
|
+
function collectFields(fields, out) {
|
|
6399
|
+
for (const field of fields) {
|
|
6400
|
+
if (field.type === "group") {
|
|
6401
|
+
collectFields(field.fields, out);
|
|
6402
|
+
continue;
|
|
6403
|
+
}
|
|
6404
|
+
if (field.type === "sub-tabs") {
|
|
6405
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6406
|
+
continue;
|
|
6407
|
+
}
|
|
6408
|
+
if (field.type === "editable-array") {
|
|
6409
|
+
const item = /* @__PURE__ */ new Map();
|
|
6410
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6411
|
+
if (item.size > 0) out.set(field.key, {
|
|
6412
|
+
kind: "array",
|
|
6413
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6414
|
+
item
|
|
6415
|
+
});
|
|
6416
|
+
continue;
|
|
6417
|
+
}
|
|
6418
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6419
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6422
|
+
/** The secret tree a settings schema declares. */
|
|
6423
|
+
function secretTreeFromSchema(schema) {
|
|
6424
|
+
const out = /* @__PURE__ */ new Map();
|
|
6425
|
+
if (schema === null) return out;
|
|
6426
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6427
|
+
return out;
|
|
6428
|
+
}
|
|
6429
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6430
|
+
function parseSecretStatePath(path) {
|
|
6431
|
+
const segments = [];
|
|
6432
|
+
for (const raw of path.split(".")) {
|
|
6433
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6434
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6435
|
+
segments.push(m[2] !== void 0 ? {
|
|
6436
|
+
key: m[1],
|
|
6437
|
+
idKey: m[2]
|
|
6438
|
+
} : { key: m[1] });
|
|
6439
|
+
}
|
|
6440
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6441
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6442
|
+
return segments;
|
|
6443
|
+
}
|
|
6444
|
+
function insert(into, segments) {
|
|
6445
|
+
const [head, ...rest] = segments;
|
|
6446
|
+
if (head === void 0) return;
|
|
6447
|
+
if (rest.length === 0) {
|
|
6448
|
+
into.set(head.key, LEAF);
|
|
6449
|
+
return;
|
|
6450
|
+
}
|
|
6451
|
+
const existing = into.get(head.key);
|
|
6452
|
+
if (head.idKey !== void 0) {
|
|
6453
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6454
|
+
insert(item, rest);
|
|
6455
|
+
into.set(head.key, {
|
|
6456
|
+
kind: "array",
|
|
6457
|
+
idKey: head.idKey,
|
|
6458
|
+
item
|
|
6459
|
+
});
|
|
6460
|
+
return;
|
|
6461
|
+
}
|
|
6462
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6463
|
+
insert(children, rest);
|
|
6464
|
+
into.set(head.key, {
|
|
6465
|
+
kind: "object",
|
|
6466
|
+
children
|
|
6467
|
+
});
|
|
6468
|
+
}
|
|
6469
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6470
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6471
|
+
if (paths.length === 0) return tree;
|
|
6472
|
+
const out = new Map(tree);
|
|
6473
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6474
|
+
return out;
|
|
6475
|
+
}
|
|
6476
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6477
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6478
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6479
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6480
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5954
6481
|
/**
|
|
5955
6482
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5956
6483
|
*
|
|
@@ -6020,6 +6547,25 @@ var BaseAddon = class {
|
|
|
6020
6547
|
settingsStoreReady = false;
|
|
6021
6548
|
/** Default config values. Provided via constructor. */
|
|
6022
6549
|
defaults;
|
|
6550
|
+
/**
|
|
6551
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6552
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6553
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6554
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6555
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6556
|
+
*/
|
|
6557
|
+
secretStatePaths = [];
|
|
6558
|
+
_addonSecretTree = null;
|
|
6559
|
+
_deviceSecretTree = null;
|
|
6560
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6561
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6562
|
+
_unresolvedSecrets = [];
|
|
6563
|
+
_secretRetryTimer = null;
|
|
6564
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6565
|
+
_secretChangeTimer = null;
|
|
6566
|
+
_secretChangeUnsub = null;
|
|
6567
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6568
|
+
_operatorWriteDepth = 0;
|
|
6023
6569
|
constructor(defaults) {
|
|
6024
6570
|
this.defaults = defaults;
|
|
6025
6571
|
this._config = { ...defaults };
|
|
@@ -6055,8 +6601,18 @@ var BaseAddon = class {
|
|
|
6055
6601
|
return this._config;
|
|
6056
6602
|
}
|
|
6057
6603
|
async initialize(context) {
|
|
6058
|
-
|
|
6604
|
+
const secrets = context.secrets;
|
|
6605
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6606
|
+
secrets,
|
|
6607
|
+
addonTree: () => this.addonSecretTree(),
|
|
6608
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6609
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6610
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6611
|
+
}) : context;
|
|
6059
6612
|
await this.resolveConfig();
|
|
6613
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6614
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6615
|
+
});
|
|
6060
6616
|
const result = await this.onInitialize();
|
|
6061
6617
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6062
6618
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6089,6 +6645,12 @@ var BaseAddon = class {
|
|
|
6089
6645
|
*/
|
|
6090
6646
|
async onHubReachable() {}
|
|
6091
6647
|
async shutdown() {
|
|
6648
|
+
this._secretChangeUnsub?.();
|
|
6649
|
+
this._secretChangeUnsub = null;
|
|
6650
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6651
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6652
|
+
this._secretRetryTimer = null;
|
|
6653
|
+
this._secretChangeTimer = null;
|
|
6092
6654
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6093
6655
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6094
6656
|
await this.onShutdown();
|
|
@@ -6167,7 +6729,7 @@ var BaseAddon = class {
|
|
|
6167
6729
|
return hydrateSchema(schema, overlay ? {
|
|
6168
6730
|
...projected,
|
|
6169
6731
|
...overlay
|
|
6170
|
-
} : projected);
|
|
6732
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6171
6733
|
}
|
|
6172
6734
|
/**
|
|
6173
6735
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6216,7 +6778,7 @@ var BaseAddon = class {
|
|
|
6216
6778
|
return hydrateSchema({
|
|
6217
6779
|
...schema,
|
|
6218
6780
|
sections
|
|
6219
|
-
}, projected);
|
|
6781
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6220
6782
|
}
|
|
6221
6783
|
/**
|
|
6222
6784
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6270,18 +6832,50 @@ var BaseAddon = class {
|
|
|
6270
6832
|
value: result.value[key]
|
|
6271
6833
|
};
|
|
6272
6834
|
}
|
|
6835
|
+
/**
|
|
6836
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6837
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6838
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6839
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6840
|
+
* writing back what it read is not (D787).
|
|
6841
|
+
*/
|
|
6842
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6843
|
+
this._operatorWriteDepth++;
|
|
6844
|
+
try {
|
|
6845
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6846
|
+
} finally {
|
|
6847
|
+
this._operatorWriteDepth--;
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6273
6850
|
async updateGlobalSettings(patch, nodeId) {
|
|
6851
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6852
|
+
}
|
|
6853
|
+
/**
|
|
6854
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6855
|
+
*
|
|
6856
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6857
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6858
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6859
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6860
|
+
*/
|
|
6861
|
+
async clearSecrets(keys, nodeId) {
|
|
6862
|
+
const tree = this.addonSecretTree();
|
|
6863
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6864
|
+
const patch = {};
|
|
6865
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6866
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6867
|
+
}
|
|
6868
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6274
6869
|
const keys = this.perNodeKeys();
|
|
6275
6870
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6276
6871
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6277
|
-
const barePatch = patch;
|
|
6278
6872
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6279
6873
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6280
6874
|
if (target !== localNode) return;
|
|
6281
6875
|
await this.resolveConfig();
|
|
6282
6876
|
await this.onConfigChanged();
|
|
6283
6877
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6284
|
-
this.maybeAutoRestart(
|
|
6878
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6285
6879
|
}
|
|
6286
6880
|
/**
|
|
6287
6881
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6306,7 +6900,7 @@ var BaseAddon = class {
|
|
|
6306
6900
|
* time to return its response before the addon is torn down and
|
|
6307
6901
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6308
6902
|
*/
|
|
6309
|
-
maybeAutoRestart(
|
|
6903
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6310
6904
|
if (!schema) return;
|
|
6311
6905
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6312
6906
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6314,13 +6908,13 @@ var BaseAddon = class {
|
|
|
6314
6908
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6315
6909
|
}
|
|
6316
6910
|
if (restartKeys.size === 0) return;
|
|
6317
|
-
if (!
|
|
6911
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6318
6912
|
const ctx = this._ctx;
|
|
6319
6913
|
if (!ctx) return;
|
|
6320
6914
|
const addonId = ctx.id;
|
|
6321
6915
|
setImmediate(() => {
|
|
6322
6916
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6323
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6917
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6324
6918
|
}).catch((err) => {
|
|
6325
6919
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6326
6920
|
});
|
|
@@ -6329,7 +6923,7 @@ var BaseAddon = class {
|
|
|
6329
6923
|
async getDeviceSettings(deviceId) {
|
|
6330
6924
|
const schema = this.deviceSettingsSchema();
|
|
6331
6925
|
if (!schema) return { sections: [] };
|
|
6332
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6926
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6333
6927
|
}
|
|
6334
6928
|
async updateDeviceSettings(deviceId, patch) {
|
|
6335
6929
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6459,7 +7053,7 @@ var BaseAddon = class {
|
|
|
6459
7053
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6460
7054
|
*/
|
|
6461
7055
|
async resolveConfig() {
|
|
6462
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7056
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6463
7057
|
const perNode = this.perNodeKeys();
|
|
6464
7058
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6465
7059
|
const resolved = { ...this.defaults };
|
|
@@ -6484,7 +7078,7 @@ var BaseAddon = class {
|
|
|
6484
7078
|
key,
|
|
6485
7079
|
schema,
|
|
6486
7080
|
fallback,
|
|
6487
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7081
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6488
7082
|
write: async (patch) => {
|
|
6489
7083
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6490
7084
|
},
|
|
@@ -6501,7 +7095,7 @@ var BaseAddon = class {
|
|
|
6501
7095
|
key,
|
|
6502
7096
|
schema,
|
|
6503
7097
|
fallback,
|
|
6504
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7098
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6505
7099
|
write: async (patch) => {
|
|
6506
7100
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6507
7101
|
},
|
|
@@ -6513,6 +7107,70 @@ var BaseAddon = class {
|
|
|
6513
7107
|
} })
|
|
6514
7108
|
});
|
|
6515
7109
|
}
|
|
7110
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7111
|
+
addonSecretTree() {
|
|
7112
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7113
|
+
return this._addonSecretTree;
|
|
7114
|
+
}
|
|
7115
|
+
deviceSecretTree() {
|
|
7116
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7117
|
+
return this._deviceSecretTree;
|
|
7118
|
+
}
|
|
7119
|
+
/**
|
|
7120
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7121
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7122
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7123
|
+
* than start on an empty credential.
|
|
7124
|
+
*/
|
|
7125
|
+
get unresolvedSecrets() {
|
|
7126
|
+
return this._unresolvedSecrets;
|
|
7127
|
+
}
|
|
7128
|
+
/**
|
|
7129
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7130
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7131
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7132
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7133
|
+
* ever written back from here.
|
|
7134
|
+
*/
|
|
7135
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7136
|
+
const secrets = this._ctx?.secrets;
|
|
7137
|
+
if (secrets === void 0) return blob;
|
|
7138
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7139
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7140
|
+
if (refs.length === 0) {
|
|
7141
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7142
|
+
return blob;
|
|
7143
|
+
}
|
|
7144
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7145
|
+
if (trackForConfig) {
|
|
7146
|
+
this._unresolvedSecrets = unresolved;
|
|
7147
|
+
if (unresolved.length > 0) {
|
|
7148
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7149
|
+
ref: u.ref,
|
|
7150
|
+
reason: u.reason
|
|
7151
|
+
})) } });
|
|
7152
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7153
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7154
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7155
|
+
}
|
|
7156
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7157
|
+
}
|
|
7158
|
+
return value;
|
|
7159
|
+
}
|
|
7160
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7161
|
+
scheduleSecretReresolve(delayMs) {
|
|
7162
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7163
|
+
if (this[timerOf] !== null) return;
|
|
7164
|
+
const timer = setTimeout(() => {
|
|
7165
|
+
this[timerOf] = null;
|
|
7166
|
+
if (this._ctx === null) return;
|
|
7167
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7168
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7169
|
+
});
|
|
7170
|
+
}, delayMs);
|
|
7171
|
+
timer.unref?.();
|
|
7172
|
+
this[timerOf] = timer;
|
|
7173
|
+
}
|
|
6516
7174
|
/**
|
|
6517
7175
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6518
7176
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6780,32 +7438,12 @@ object({
|
|
|
6780
7438
|
audioCodec: string().optional(),
|
|
6781
7439
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6782
7440
|
});
|
|
6783
|
-
var EncodedPacketSchema = object({
|
|
6784
|
-
type: _enum(["video", "audio"]),
|
|
6785
|
-
data: _instanceof(Uint8Array),
|
|
6786
|
-
pts: number(),
|
|
6787
|
-
dts: number(),
|
|
6788
|
-
keyframe: boolean(),
|
|
6789
|
-
codec: string()
|
|
6790
|
-
});
|
|
6791
|
-
var DecodedFrameSchema = object({
|
|
6792
|
-
data: _instanceof(Uint8Array),
|
|
6793
|
-
width: number(),
|
|
6794
|
-
height: number(),
|
|
6795
|
-
format: _enum([
|
|
6796
|
-
"jpeg",
|
|
6797
|
-
"rgb",
|
|
6798
|
-
"bgr",
|
|
6799
|
-
"yuv420",
|
|
6800
|
-
"gray"
|
|
6801
|
-
]),
|
|
6802
|
-
timestamp: number()
|
|
6803
|
-
});
|
|
6804
7441
|
/**
|
|
6805
7442
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6806
7443
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6807
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6808
|
-
*
|
|
7444
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7445
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7446
|
+
* over tRPC / Moleculer.
|
|
6809
7447
|
*
|
|
6810
7448
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6811
7449
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6831,50 +7469,6 @@ var FrameHandleSchema = object({
|
|
|
6831
7469
|
slotCount: number().int().positive()
|
|
6832
7470
|
});
|
|
6833
7471
|
/**
|
|
6834
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6835
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6836
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6837
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6838
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6839
|
-
*/
|
|
6840
|
-
var FrameHandleFormatSchema = _enum([
|
|
6841
|
-
"rgb",
|
|
6842
|
-
"bgr",
|
|
6843
|
-
"yuv420",
|
|
6844
|
-
"gray"
|
|
6845
|
-
]);
|
|
6846
|
-
/**
|
|
6847
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6848
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6849
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6850
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6851
|
-
* they asked for with no broker-side conversion.
|
|
6852
|
-
*/
|
|
6853
|
-
var SubscribeFramesInputSchema = object({
|
|
6854
|
-
brokerId: string(),
|
|
6855
|
-
format: FrameHandleFormatSchema,
|
|
6856
|
-
/**
|
|
6857
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6858
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6859
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6860
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6861
|
-
*/
|
|
6862
|
-
maxFps: number().positive().optional(),
|
|
6863
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6864
|
-
tag: string().optional()
|
|
6865
|
-
});
|
|
6866
|
-
/**
|
|
6867
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6868
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6869
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6870
|
-
*/
|
|
6871
|
-
var SubscribeFramesResultSchema = object({
|
|
6872
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6873
|
-
subscriptionId: string(),
|
|
6874
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6875
|
-
maxFps: number().nonnegative()
|
|
6876
|
-
});
|
|
6877
|
-
/**
|
|
6878
7472
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6879
7473
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6880
7474
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6882,8 +7476,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6882
7476
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6883
7477
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6884
7478
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6885
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6886
|
-
*
|
|
7479
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7480
|
+
* it.
|
|
6887
7481
|
*/
|
|
6888
7482
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6889
7483
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6901,11 +7495,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6901
7495
|
format: AudioChunkFormatSchema.optional()
|
|
6902
7496
|
});
|
|
6903
7497
|
/**
|
|
6904
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6905
|
-
*
|
|
6906
|
-
*
|
|
6907
|
-
*
|
|
6908
|
-
* `pullAudioChunks`.
|
|
7498
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7499
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7500
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7501
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6909
7502
|
*/
|
|
6910
7503
|
var SubscribeAudioChunksInputSchema = object({
|
|
6911
7504
|
brokerId: string(),
|
|
@@ -6936,9 +7529,7 @@ var BrokerStatsSchema = object({
|
|
|
6936
7529
|
"stopped"
|
|
6937
7530
|
]),
|
|
6938
7531
|
inputFps: number(),
|
|
6939
|
-
decodeFps: number(),
|
|
6940
7532
|
encodedSubscribers: number(),
|
|
6941
|
-
decodedSubscribers: number(),
|
|
6942
7533
|
uptimeMs: number(),
|
|
6943
7534
|
bitrateKbps: number(),
|
|
6944
7535
|
idrIntervalMs: number(),
|
|
@@ -6951,14 +7542,6 @@ var BrokerStatsSchema = object({
|
|
|
6951
7542
|
preBufferMs: number(),
|
|
6952
7543
|
preBufferPackets: number(),
|
|
6953
7544
|
/**
|
|
6954
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6955
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6956
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6957
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6958
|
-
* a separate cap call per broker.
|
|
6959
|
-
*/
|
|
6960
|
-
decoderNodeId: string().nullable(),
|
|
6961
|
-
/**
|
|
6962
7545
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6963
7546
|
* when the stream has no audio track or the broker is in cold start.
|
|
6964
7547
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7163,6 +7746,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7163
7746
|
kind: "mutation",
|
|
7164
7747
|
auth: "admin"
|
|
7165
7748
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7749
|
+
function defOf(schema) {
|
|
7750
|
+
return schema._zod?.def ?? {};
|
|
7751
|
+
}
|
|
7752
|
+
function declaredHere(schema) {
|
|
7753
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7754
|
+
}
|
|
7755
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7756
|
+
var WRAPPERS = new Set([
|
|
7757
|
+
"optional",
|
|
7758
|
+
"nullable",
|
|
7759
|
+
"default",
|
|
7760
|
+
"prefault",
|
|
7761
|
+
"catch",
|
|
7762
|
+
"readonly",
|
|
7763
|
+
"nonoptional"
|
|
7764
|
+
]);
|
|
7765
|
+
/**
|
|
7766
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7767
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7768
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7769
|
+
* `.transform` on `in`).
|
|
7770
|
+
*/
|
|
7771
|
+
function layersOf(schema) {
|
|
7772
|
+
const out = [];
|
|
7773
|
+
const queue = [schema];
|
|
7774
|
+
while (queue.length > 0) {
|
|
7775
|
+
const s = queue.shift();
|
|
7776
|
+
if (!s || out.includes(s)) continue;
|
|
7777
|
+
out.push(s);
|
|
7778
|
+
const def = defOf(s);
|
|
7779
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7780
|
+
if (def.type === "pipe") {
|
|
7781
|
+
if (def.in) queue.push(def.in);
|
|
7782
|
+
if (def.out) queue.push(def.out);
|
|
7783
|
+
}
|
|
7784
|
+
}
|
|
7785
|
+
return out;
|
|
7786
|
+
}
|
|
7787
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7788
|
+
function isZodSecret(schema) {
|
|
7789
|
+
return layersOf(schema).some(declaredHere);
|
|
7790
|
+
}
|
|
7791
|
+
/**
|
|
7792
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7793
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7794
|
+
* object or array is reported as one path and not descended into — everything
|
|
7795
|
+
* under it is secret.
|
|
7796
|
+
*/
|
|
7797
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7798
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7799
|
+
const paths = [];
|
|
7800
|
+
for (const layer of layersOf(schema)) {
|
|
7801
|
+
const def = defOf(layer);
|
|
7802
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7803
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7804
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7805
|
+
else if (def.type === "intersection") {
|
|
7806
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7807
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7808
|
+
}
|
|
7809
|
+
}
|
|
7810
|
+
return [...new Set(paths)];
|
|
7811
|
+
}
|
|
7166
7812
|
//#endregion
|
|
7167
7813
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7168
7814
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -10304,70 +10950,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10304
10950
|
"backup"
|
|
10305
10951
|
]).optional()
|
|
10306
10952
|
});
|
|
10307
|
-
var DecoderStatsSchema = object({
|
|
10308
|
-
inputFps: number(),
|
|
10309
|
-
outputFps: number(),
|
|
10310
|
-
avgDecodeTimeMs: number(),
|
|
10311
|
-
droppedFrames: number(),
|
|
10312
|
-
/**
|
|
10313
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10314
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10315
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10316
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10317
|
-
*/
|
|
10318
|
-
lagMs: number().optional(),
|
|
10319
|
-
effectiveFps: number().optional(),
|
|
10320
|
-
adaptiveFps: number().optional()
|
|
10321
|
-
});
|
|
10322
|
-
var DecoderSessionConfigSchema = object({
|
|
10323
|
-
codec: string(),
|
|
10324
|
-
maxFps: number().default(0),
|
|
10325
|
-
outputFormat: _enum([
|
|
10326
|
-
"jpeg",
|
|
10327
|
-
"rgb",
|
|
10328
|
-
"bgr",
|
|
10329
|
-
"yuv420",
|
|
10330
|
-
"gray"
|
|
10331
|
-
]).default("jpeg"),
|
|
10332
|
-
scale: number().default(1),
|
|
10333
|
-
width: number().optional(),
|
|
10334
|
-
height: number().optional(),
|
|
10335
|
-
/**
|
|
10336
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10337
|
-
* because the cap is generic (any caller could request decode), but
|
|
10338
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10339
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10340
|
-
* sendPacket errors on a single hung camera).
|
|
10341
|
-
*/
|
|
10342
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10343
|
-
/**
|
|
10344
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10345
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10346
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10347
|
-
* profile cleanly.
|
|
10348
|
-
*/
|
|
10349
|
-
tag: string().optional(),
|
|
10350
|
-
/**
|
|
10351
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10352
|
-
*
|
|
10353
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10354
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10355
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10356
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10357
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10358
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10359
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10360
|
-
*/
|
|
10361
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10362
|
-
/**
|
|
10363
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10364
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10365
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10366
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10367
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10368
|
-
*/
|
|
10369
|
-
debug: boolean().optional()
|
|
10370
|
-
});
|
|
10371
10953
|
/**
|
|
10372
10954
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10373
10955
|
* an addon declares its channels in.
|
|
@@ -10510,57 +11092,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10510
11092
|
"balanced",
|
|
10511
11093
|
"strict"
|
|
10512
11094
|
]);
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
id: "person",
|
|
10516
|
-
name: "Person"
|
|
10517
|
-
},
|
|
10518
|
-
{
|
|
10519
|
-
id: "vehicle",
|
|
10520
|
-
name: "Vehicle"
|
|
10521
|
-
},
|
|
10522
|
-
{
|
|
10523
|
-
id: "animal",
|
|
10524
|
-
name: "Animal"
|
|
10525
|
-
},
|
|
10526
|
-
{
|
|
10527
|
-
id: "package",
|
|
10528
|
-
name: "Package"
|
|
10529
|
-
}
|
|
10530
|
-
].map((l) => l.id));
|
|
10531
|
-
var COCO_TO_MACRO = {
|
|
10532
|
-
mapping: {
|
|
10533
|
-
person: "person",
|
|
10534
|
-
bicycle: "vehicle",
|
|
10535
|
-
car: "vehicle",
|
|
10536
|
-
motorcycle: "vehicle",
|
|
10537
|
-
airplane: "vehicle",
|
|
10538
|
-
bus: "vehicle",
|
|
10539
|
-
train: "vehicle",
|
|
10540
|
-
truck: "vehicle",
|
|
10541
|
-
boat: "vehicle",
|
|
10542
|
-
bird: "animal",
|
|
10543
|
-
cat: "animal",
|
|
10544
|
-
dog: "animal",
|
|
10545
|
-
horse: "animal",
|
|
10546
|
-
sheep: "animal",
|
|
10547
|
-
cow: "animal",
|
|
10548
|
-
elephant: "animal",
|
|
10549
|
-
bear: "animal",
|
|
10550
|
-
zebra: "animal",
|
|
10551
|
-
giraffe: "animal",
|
|
10552
|
-
suitcase: "package",
|
|
10553
|
-
backpack: "package",
|
|
10554
|
-
handbag: "package"
|
|
10555
|
-
},
|
|
10556
|
-
preserveOriginal: false
|
|
10557
|
-
};
|
|
10558
|
-
/** Steps a root detector may declare it fills. */
|
|
10559
|
-
var FILLABLE_STEP_IDS = [
|
|
11095
|
+
/** Steps whose effect a root label can BE. */
|
|
11096
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
10560
11097
|
"animal-classifier",
|
|
10561
11098
|
"vehicle-classifier",
|
|
10562
11099
|
"package-detection"
|
|
10563
11100
|
];
|
|
11101
|
+
/** Steps whose box a root detection can BE. */
|
|
11102
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11103
|
+
/**
|
|
11104
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11105
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11106
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11107
|
+
* no camera tree carries.)
|
|
11108
|
+
*/
|
|
11109
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11110
|
+
[
|
|
11111
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11112
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11113
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11114
|
+
];
|
|
10564
11115
|
var MODEL_FORMATS = [
|
|
10565
11116
|
"onnx",
|
|
10566
11117
|
"coreml",
|
|
@@ -10589,7 +11140,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10589
11140
|
/** Multi-file payload (directory members or sibling files). */
|
|
10590
11141
|
files: array(string()).readonly().optional(),
|
|
10591
11142
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10592
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11143
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11144
|
+
/**
|
|
11145
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11146
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11147
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11148
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11149
|
+
* node records the revision it downloaded next to the file
|
|
11150
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11151
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11152
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11153
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11154
|
+
*/
|
|
11155
|
+
revision: string().min(1).optional()
|
|
11156
|
+
});
|
|
11157
|
+
/**
|
|
11158
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11159
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11160
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11161
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11162
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11163
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11164
|
+
*/
|
|
11165
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11166
|
+
"current",
|
|
11167
|
+
"stale",
|
|
11168
|
+
"missing"
|
|
11169
|
+
]);
|
|
11170
|
+
/**
|
|
11171
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11172
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11173
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11174
|
+
*/
|
|
11175
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11176
|
+
"fp32",
|
|
11177
|
+
"fp16",
|
|
11178
|
+
"int8"
|
|
11179
|
+
]);
|
|
11180
|
+
/**
|
|
11181
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11182
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11183
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11184
|
+
*/
|
|
11185
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11186
|
+
downloaded: boolean(),
|
|
11187
|
+
sizeMB: number(),
|
|
11188
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11189
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10593
11190
|
});
|
|
10594
11191
|
/**
|
|
10595
11192
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10693,12 +11290,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10693
11290
|
/** True when the weights or their data forbid commercial use. */
|
|
10694
11291
|
nonCommercial: boolean().optional()
|
|
10695
11292
|
}));
|
|
10696
|
-
/**
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
11293
|
+
/**
|
|
11294
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
11295
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
11296
|
+
*
|
|
11297
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
11298
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
11299
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
11300
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
11301
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
11302
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
11303
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11304
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11305
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11306
|
+
* postprocessor on read, never stored by an import.
|
|
11307
|
+
*/
|
|
11308
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11309
|
+
object({
|
|
11310
|
+
kind: literal("label"),
|
|
11311
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11312
|
+
labelToEffect: record(string(), string()),
|
|
11313
|
+
uncovered: array(string()).readonly()
|
|
11314
|
+
}),
|
|
11315
|
+
object({
|
|
11316
|
+
kind: literal("crop"),
|
|
11317
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11318
|
+
rootLabels: array(string()).readonly(),
|
|
11319
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11320
|
+
childClass: _enum(["plate", "face"]),
|
|
11321
|
+
/**
|
|
11322
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11323
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11324
|
+
* stored by an import.
|
|
11325
|
+
*/
|
|
11326
|
+
rootInputPx: number().int().positive().optional()
|
|
11327
|
+
}),
|
|
11328
|
+
object({
|
|
11329
|
+
kind: literal("mask"),
|
|
11330
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11331
|
+
})
|
|
11332
|
+
]);
|
|
10702
11333
|
var ModelCatalogEntrySchema = object({
|
|
10703
11334
|
id: string(),
|
|
10704
11335
|
name: string(),
|
|
@@ -10764,6 +11395,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10764
11395
|
*/
|
|
10765
11396
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10766
11397
|
/**
|
|
11398
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11399
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11400
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11401
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11402
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11403
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11404
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11405
|
+
*/
|
|
11406
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11407
|
+
/**
|
|
11408
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11409
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11410
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11411
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11412
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11413
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11414
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11415
|
+
*/
|
|
11416
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11417
|
+
/**
|
|
11418
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11419
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11420
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11421
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11422
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11423
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11424
|
+
*/
|
|
11425
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11426
|
+
/**
|
|
10767
11427
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10768
11428
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10769
11429
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10825,15 +11485,15 @@ var ModelCatalogEntrySchema = object({
|
|
|
10825
11485
|
*/
|
|
10826
11486
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10827
11487
|
/**
|
|
10828
|
-
* The pipeline steps this ROOT detector
|
|
10829
|
-
* its labels name
|
|
10830
|
-
*
|
|
10831
|
-
* labelmap by `
|
|
10832
|
-
*
|
|
10833
|
-
*
|
|
10834
|
-
* `
|
|
11488
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
11489
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
11490
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
11491
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
11492
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
11493
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
11494
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
10835
11495
|
*/
|
|
10836
|
-
|
|
11496
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
10837
11497
|
/**
|
|
10838
11498
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10839
11499
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
@@ -12436,13 +13096,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12436
13096
|
lastRtpAt: number(),
|
|
12437
13097
|
bytesSent: number()
|
|
12438
13098
|
});
|
|
12439
|
-
var BrokerDecodedClientSchema = object({
|
|
12440
|
-
tag: string(),
|
|
12441
|
-
subscribedAt: number(),
|
|
12442
|
-
maxFps: number(),
|
|
12443
|
-
framesDelivered: number(),
|
|
12444
|
-
framesDropped: number()
|
|
12445
|
-
});
|
|
12446
13099
|
var BrokerAudioClientSchema = object({
|
|
12447
13100
|
tag: string(),
|
|
12448
13101
|
subscribedAt: number(),
|
|
@@ -12534,7 +13187,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12534
13187
|
});
|
|
12535
13188
|
var BrokerClientsSchema = object({
|
|
12536
13189
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12537
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12538
13190
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12539
13191
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12540
13192
|
pipeClients: number(),
|
|
@@ -12903,11 +13555,7 @@ method(object({
|
|
|
12903
13555
|
auth: "admin"
|
|
12904
13556
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
12905
13557
|
brokerId: string(),
|
|
12906
|
-
channel: _enum([
|
|
12907
|
-
"rtsp",
|
|
12908
|
-
"decoded",
|
|
12909
|
-
"audio"
|
|
12910
|
-
]),
|
|
13558
|
+
channel: _enum(["rtsp", "audio"]),
|
|
12911
13559
|
handle: string()
|
|
12912
13560
|
}), object({ killed: boolean() }), {
|
|
12913
13561
|
kind: "mutation",
|
|
@@ -12942,10 +13590,7 @@ method(object({
|
|
|
12942
13590
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
12943
13591
|
subscriptionId: string(),
|
|
12944
13592
|
maxCount: number().int().positive().default(8)
|
|
12945
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
12946
|
-
subscriptionId: string(),
|
|
12947
|
-
maxCount: number().int().positive().default(4)
|
|
12948
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13593
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
12949
13594
|
brokerId: string(),
|
|
12950
13595
|
seconds: number().min(0).max(30)
|
|
12951
13596
|
}), _void(), {
|
|
@@ -14205,53 +14850,201 @@ id: union([string(), number()]) }), {
|
|
|
14205
14850
|
auth: "admin"
|
|
14206
14851
|
});
|
|
14207
14852
|
/**
|
|
14208
|
-
*
|
|
14209
|
-
*
|
|
14210
|
-
*
|
|
14853
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14854
|
+
*
|
|
14855
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14856
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14857
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14858
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14859
|
+
* against the CALLER, never against anything the caller claims.
|
|
14860
|
+
*
|
|
14861
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14862
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14863
|
+
* connection, the agent from its child's connection carried in
|
|
14864
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14865
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14866
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14867
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14868
|
+
* runner is the same OS user): see the threat model in
|
|
14869
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14870
|
+
*
|
|
14871
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14872
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14873
|
+
* floors every method to admin anyway (D240).
|
|
14874
|
+
*
|
|
14875
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14876
|
+
*/
|
|
14877
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14878
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14879
|
+
"key-missing",
|
|
14880
|
+
"wrong-key",
|
|
14881
|
+
"key-file-unreadable",
|
|
14882
|
+
"store-unavailable",
|
|
14883
|
+
"not-initialized",
|
|
14884
|
+
"decrypt-failed"
|
|
14885
|
+
]);
|
|
14886
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14887
|
+
state: literal("locked"),
|
|
14888
|
+
reason: KeychainUnavailableReasonSchema
|
|
14889
|
+
})]);
|
|
14890
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14891
|
+
object({
|
|
14892
|
+
kind: literal("value"),
|
|
14893
|
+
value: string(),
|
|
14894
|
+
version: number().int()
|
|
14895
|
+
}),
|
|
14896
|
+
object({ kind: literal("missing") }),
|
|
14897
|
+
object({
|
|
14898
|
+
kind: literal("unavailable"),
|
|
14899
|
+
reason: KeychainUnavailableReasonSchema
|
|
14900
|
+
}),
|
|
14901
|
+
object({ kind: literal("forbidden") })
|
|
14902
|
+
]);
|
|
14903
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14904
|
+
/** Metadata of one stored value — never the value. */
|
|
14905
|
+
var KeychainSecretMetaSchema = object({
|
|
14906
|
+
ref: string(),
|
|
14907
|
+
owner: string(),
|
|
14908
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14909
|
+
scope: string(),
|
|
14910
|
+
fieldPath: string(),
|
|
14911
|
+
version: number().int(),
|
|
14912
|
+
createdAt: number(),
|
|
14913
|
+
updatedAt: number(),
|
|
14914
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14915
|
+
updatedBy: string(),
|
|
14916
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14917
|
+
lastReadAt: number().nullable()
|
|
14918
|
+
});
|
|
14919
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14920
|
+
method(object({
|
|
14921
|
+
ref: string().min(1),
|
|
14922
|
+
value: string().min(1)
|
|
14923
|
+
}), object({
|
|
14924
|
+
ref: string(),
|
|
14925
|
+
version: number().int()
|
|
14926
|
+
}), {
|
|
14927
|
+
kind: "mutation",
|
|
14928
|
+
auth: "admin"
|
|
14929
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14930
|
+
kind: "mutation",
|
|
14931
|
+
auth: "admin"
|
|
14932
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14933
|
+
var KeychainKeySourceSchema = object({
|
|
14934
|
+
kind: _enum([
|
|
14935
|
+
"config-file",
|
|
14936
|
+
"previous-config-file",
|
|
14937
|
+
"platform",
|
|
14938
|
+
"default-file"
|
|
14939
|
+
]),
|
|
14940
|
+
/** File sources only — a path is not a secret. */
|
|
14941
|
+
path: string().optional(),
|
|
14942
|
+
/**
|
|
14943
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14944
|
+
* next to the database it protects (the default file). The page warns.
|
|
14945
|
+
*/
|
|
14946
|
+
sharesBackupWithDatabase: boolean()
|
|
14947
|
+
});
|
|
14948
|
+
var KeychainStatusSchema = object({
|
|
14949
|
+
keychain: KeychainStateSchema,
|
|
14950
|
+
/** The source of the master key in use; `null` while locked. */
|
|
14951
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
14952
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
14953
|
+
configuredSource: KeychainKeySourceSchema,
|
|
14954
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
14955
|
+
fingerprint: string().nullable(),
|
|
14956
|
+
activeKeyId: string().nullable(),
|
|
14957
|
+
/**
|
|
14958
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
14959
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
14960
|
+
*/
|
|
14961
|
+
rotationPending: boolean(),
|
|
14962
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14963
|
+
retiredWraps: number().int(),
|
|
14964
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
14965
|
+
secretCount: number().int()
|
|
14966
|
+
});
|
|
14967
|
+
/**
|
|
14968
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
14969
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
14970
|
+
* never reported as an orphan (and never deleted as one).
|
|
14211
14971
|
*/
|
|
14212
|
-
var
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14972
|
+
var KeychainSecretUsageSchema = _enum([
|
|
14973
|
+
"in-use",
|
|
14974
|
+
"orphan",
|
|
14975
|
+
"unknown"
|
|
14976
|
+
]);
|
|
14977
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
14978
|
+
var KeychainAuditActionSchema = _enum([
|
|
14979
|
+
"put",
|
|
14980
|
+
"delete",
|
|
14981
|
+
"reveal",
|
|
14982
|
+
"rotate-master-key",
|
|
14983
|
+
"purge-retired-keys",
|
|
14984
|
+
"download-recovery-key",
|
|
14985
|
+
"delete-orphans",
|
|
14986
|
+
"reset",
|
|
14987
|
+
"initialize"
|
|
14988
|
+
]);
|
|
14989
|
+
var KeychainAuditEntrySchema = object({
|
|
14990
|
+
id: string(),
|
|
14991
|
+
at: number(),
|
|
14992
|
+
action: KeychainAuditActionSchema,
|
|
14993
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14994
|
+
actor: string(),
|
|
14995
|
+
ref: string().nullable(),
|
|
14996
|
+
detail: string().nullable()
|
|
14997
|
+
});
|
|
14998
|
+
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({
|
|
14999
|
+
value: string(),
|
|
15000
|
+
version: number().int()
|
|
15001
|
+
}), {
|
|
15002
|
+
kind: "mutation",
|
|
15003
|
+
auth: "admin",
|
|
15004
|
+
caller: "required"
|
|
15005
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15006
|
+
deleted: array(string()).readonly(),
|
|
15007
|
+
kept: array(object({
|
|
15008
|
+
ref: string(),
|
|
15009
|
+
usage: KeychainSecretUsageSchema
|
|
15010
|
+
})).readonly()
|
|
15011
|
+
}), {
|
|
15012
|
+
kind: "mutation",
|
|
15013
|
+
auth: "admin",
|
|
15014
|
+
caller: "required"
|
|
15015
|
+
}), method(object({}), object({
|
|
15016
|
+
fingerprint: string(),
|
|
15017
|
+
keySource: KeychainKeySourceSchema
|
|
15018
|
+
}), {
|
|
15019
|
+
kind: "mutation",
|
|
15020
|
+
auth: "admin",
|
|
15021
|
+
caller: "required"
|
|
15022
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15023
|
+
kind: "mutation",
|
|
15024
|
+
auth: "admin",
|
|
15025
|
+
caller: "required"
|
|
15026
|
+
}), method(object({}), object({
|
|
15027
|
+
key: string(),
|
|
15028
|
+
fingerprint: string(),
|
|
15029
|
+
keySource: KeychainKeySourceSchema
|
|
15030
|
+
}), {
|
|
15031
|
+
kind: "mutation",
|
|
15032
|
+
auth: "admin",
|
|
15033
|
+
caller: "required"
|
|
15034
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15035
|
+
archivedCollection: string().nullable(),
|
|
15036
|
+
archived: number().int()
|
|
15037
|
+
}), {
|
|
15038
|
+
kind: "mutation",
|
|
15039
|
+
auth: "admin",
|
|
15040
|
+
caller: "required"
|
|
15041
|
+
});
|
|
15042
|
+
method(_void(), object({
|
|
14223
15043
|
id: string(),
|
|
14224
15044
|
name: string(),
|
|
14225
|
-
isPullMode: boolean().optional(),
|
|
14226
|
-
priority: number().optional(),
|
|
14227
15045
|
hwaccel: string().optional(),
|
|
14228
15046
|
probedBestHwaccel: string().optional()
|
|
14229
|
-
})), method(
|
|
14230
|
-
sessionId: string(),
|
|
14231
|
-
nodeId: string()
|
|
14232
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14233
|
-
sessionId: string(),
|
|
14234
|
-
packet: EncodedPacketSchema
|
|
14235
|
-
}), _void()), method(object({
|
|
14236
|
-
sessionId: string(),
|
|
14237
|
-
url: string()
|
|
14238
|
-
}), _void()), method(object({
|
|
14239
|
-
sessionId: string(),
|
|
14240
|
-
maxCount: number().default(1),
|
|
14241
|
-
waitMs: number().optional()
|
|
14242
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14243
|
-
sessionId: string(),
|
|
14244
|
-
maxCount: number().default(1),
|
|
14245
|
-
waitMs: number().optional()
|
|
14246
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14247
|
-
sessionId: string(),
|
|
14248
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14249
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14250
|
-
sessionId: string(),
|
|
14251
|
-
codec: string(),
|
|
14252
|
-
outputFormat: string(),
|
|
14253
|
-
createdAtMs: number()
|
|
14254
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15047
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14255
15048
|
kind: "mutation",
|
|
14256
15049
|
auth: "admin"
|
|
14257
15050
|
});
|
|
@@ -15364,6 +16157,10 @@ var DeviceInfoSchema = object({
|
|
|
15364
16157
|
isCamera: boolean(),
|
|
15365
16158
|
/** Current config values — serializable snapshot */
|
|
15366
16159
|
config: record(string(), unknown()),
|
|
16160
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16161
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16162
|
+
* when the owning runner has not reported them. */
|
|
16163
|
+
secretConfigPaths: array(string()).optional(),
|
|
15367
16164
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15368
16165
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15369
16166
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15569,12 +16366,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15569
16366
|
* call (workers re-register on init), so probe-driven updates
|
|
15570
16367
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15571
16368
|
features: array(string()).optional(),
|
|
15572
|
-
config: record(string(), unknown())
|
|
16369
|
+
config: record(string(), unknown()),
|
|
16370
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16371
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16372
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16373
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16374
|
+
* omits it and the keyword backstop applies. */
|
|
16375
|
+
secretConfigPaths: array(string()).optional()
|
|
15573
16376
|
});
|
|
15574
16377
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15575
16378
|
var DevicePersistConfigPayloadSchema = object({
|
|
15576
16379
|
deviceId: number(),
|
|
15577
|
-
data: record(string(), unknown())
|
|
16380
|
+
data: record(string(), unknown()),
|
|
16381
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16382
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16383
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16384
|
+
secretConfigPaths: array(string()).optional()
|
|
15578
16385
|
});
|
|
15579
16386
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15580
16387
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -16396,6 +17203,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
16396
17203
|
kind: "mutation",
|
|
16397
17204
|
auth: "admin"
|
|
16398
17205
|
});
|
|
17206
|
+
var HUB_ADDRESS_ROLES = [
|
|
17207
|
+
"appConnections",
|
|
17208
|
+
"notificationTaps",
|
|
17209
|
+
"internal",
|
|
17210
|
+
"publicEndpoint"
|
|
17211
|
+
];
|
|
16399
17212
|
/**
|
|
16400
17213
|
* Transport bounds for AI capability methods.
|
|
16401
17214
|
*
|
|
@@ -17222,7 +18035,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17222
18035
|
icon: string().optional(),
|
|
17223
18036
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17224
18037
|
startUrl: string(),
|
|
17225
|
-
stage: LoginStageEnum
|
|
18038
|
+
stage: LoginStageEnum,
|
|
18039
|
+
/**
|
|
18040
|
+
* The provider names an external identity a signed-in user can link to
|
|
18041
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
18042
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
18043
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
18044
|
+
*/
|
|
18045
|
+
linkable: boolean().optional()
|
|
17226
18046
|
}),
|
|
17227
18047
|
object({
|
|
17228
18048
|
kind: literal("widget"),
|
|
@@ -18158,6 +18978,51 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
18158
18978
|
kind: "mutation",
|
|
18159
18979
|
auth: "admin"
|
|
18160
18980
|
});
|
|
18981
|
+
new Set([
|
|
18982
|
+
{
|
|
18983
|
+
id: "person",
|
|
18984
|
+
name: "Person"
|
|
18985
|
+
},
|
|
18986
|
+
{
|
|
18987
|
+
id: "vehicle",
|
|
18988
|
+
name: "Vehicle"
|
|
18989
|
+
},
|
|
18990
|
+
{
|
|
18991
|
+
id: "animal",
|
|
18992
|
+
name: "Animal"
|
|
18993
|
+
},
|
|
18994
|
+
{
|
|
18995
|
+
id: "package",
|
|
18996
|
+
name: "Package"
|
|
18997
|
+
}
|
|
18998
|
+
].map((l) => l.id));
|
|
18999
|
+
var COCO_TO_MACRO = {
|
|
19000
|
+
mapping: {
|
|
19001
|
+
person: "person",
|
|
19002
|
+
bicycle: "vehicle",
|
|
19003
|
+
car: "vehicle",
|
|
19004
|
+
motorcycle: "vehicle",
|
|
19005
|
+
airplane: "vehicle",
|
|
19006
|
+
bus: "vehicle",
|
|
19007
|
+
train: "vehicle",
|
|
19008
|
+
truck: "vehicle",
|
|
19009
|
+
boat: "vehicle",
|
|
19010
|
+
bird: "animal",
|
|
19011
|
+
cat: "animal",
|
|
19012
|
+
dog: "animal",
|
|
19013
|
+
horse: "animal",
|
|
19014
|
+
sheep: "animal",
|
|
19015
|
+
cow: "animal",
|
|
19016
|
+
elephant: "animal",
|
|
19017
|
+
bear: "animal",
|
|
19018
|
+
zebra: "animal",
|
|
19019
|
+
giraffe: "animal",
|
|
19020
|
+
suitcase: "package",
|
|
19021
|
+
backpack: "package",
|
|
19022
|
+
handbag: "package"
|
|
19023
|
+
},
|
|
19024
|
+
preserveOriginal: false
|
|
19025
|
+
};
|
|
18161
19026
|
var AUDIO_MACRO_LABELS = [
|
|
18162
19027
|
{
|
|
18163
19028
|
id: "speech",
|
|
@@ -20560,7 +21425,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
20560
21425
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
20561
21426
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
20562
21427
|
*/
|
|
20563
|
-
notifySensorRewatched: boolean().optional()
|
|
21428
|
+
notifySensorRewatched: boolean().optional(),
|
|
21429
|
+
/**
|
|
21430
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
21431
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
21432
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
21433
|
+
*/
|
|
21434
|
+
notifySensorIgnored: boolean().optional()
|
|
20564
21435
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20565
21436
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20566
21437
|
mode: AlarmArmModeSchema,
|
|
@@ -20573,7 +21444,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
20573
21444
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20574
21445
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
20575
21446
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20576
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
21447
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
21448
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
21449
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
20577
21450
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20578
21451
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20579
21452
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -21551,8 +22424,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21551
22424
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21552
22425
|
stepId: "face-embedding",
|
|
21553
22426
|
key: "minLandmarkFaceSize",
|
|
21554
|
-
label: "Min face size
|
|
21555
|
-
description: "
|
|
22427
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22428
|
+
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.",
|
|
21556
22429
|
type: "slider",
|
|
21557
22430
|
min: 0,
|
|
21558
22431
|
max: 64,
|
|
@@ -22525,8 +23398,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22525
23398
|
]);
|
|
22526
23399
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22527
23400
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22528
|
-
/**
|
|
22529
|
-
|
|
23401
|
+
/**
|
|
23402
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23403
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23404
|
+
*
|
|
23405
|
+
* - `operator` — drawn by hand.
|
|
23406
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23407
|
+
* model, or a larger teacher model).
|
|
23408
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23409
|
+
* back from the track store (never a re-run).
|
|
23410
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23411
|
+
*/
|
|
23412
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23413
|
+
"operator",
|
|
23414
|
+
"assist",
|
|
23415
|
+
"pipeline",
|
|
23416
|
+
"llm"
|
|
23417
|
+
]);
|
|
22530
23418
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22531
23419
|
var RetrainBboxSchema = object({
|
|
22532
23420
|
x: number(),
|
|
@@ -22544,7 +23432,8 @@ var RetrainBboxSchema = object({
|
|
|
22544
23432
|
*/
|
|
22545
23433
|
var RetrainAnnotationSchema = object({
|
|
22546
23434
|
id: string(),
|
|
22547
|
-
|
|
23435
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23436
|
+
trackId: string().optional(),
|
|
22548
23437
|
deviceId: number(),
|
|
22549
23438
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22550
23439
|
mediaKey: string(),
|
|
@@ -22593,18 +23482,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22593
23482
|
* fail, whatever became of the original. */
|
|
22594
23483
|
copied: boolean()
|
|
22595
23484
|
});
|
|
23485
|
+
/**
|
|
23486
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23487
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23488
|
+
* box recorded on the source media row when there is one, else the track
|
|
23489
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23490
|
+
* until the operator confirms it.
|
|
23491
|
+
*/
|
|
23492
|
+
var RetrainPipelineBoxSchema = object({
|
|
23493
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23494
|
+
bbox: RetrainBboxSchema,
|
|
23495
|
+
macroClass: RetrainMacroClassSchema,
|
|
23496
|
+
label: string().optional(),
|
|
23497
|
+
subLabel: string().optional(),
|
|
23498
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23499
|
+
score: number().optional(),
|
|
23500
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23501
|
+
modelId: string().optional(),
|
|
23502
|
+
trackId: string(),
|
|
23503
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23504
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23505
|
+
basis: _enum(["subject-box", "position"]),
|
|
23506
|
+
deltaMs: number()
|
|
23507
|
+
});
|
|
23508
|
+
/**
|
|
23509
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23510
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23511
|
+
* track at all.
|
|
23512
|
+
*/
|
|
23513
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22596
23514
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22597
23515
|
var RetrainFrameSchema = object({
|
|
22598
23516
|
frameId: string(),
|
|
22599
23517
|
deviceId: number(),
|
|
22600
|
-
|
|
22601
|
-
/**
|
|
22602
|
-
|
|
23518
|
+
origin: RetrainFrameOriginSchema,
|
|
23519
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23520
|
+
trackId: string().optional(),
|
|
23521
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23522
|
+
* Absent on a recording still. */
|
|
23523
|
+
sourceMediaId: number().int().optional(),
|
|
23524
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23525
|
+
epochMs: number().optional(),
|
|
22603
23526
|
sourceKind: MediaFileKindEnum,
|
|
22604
23527
|
sizeBytes: number().int(),
|
|
22605
23528
|
width: number().int(),
|
|
22606
23529
|
height: number().int(),
|
|
22607
|
-
copiedAt: number()
|
|
23530
|
+
copiedAt: number(),
|
|
23531
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23532
|
+
capturedAt: number().optional(),
|
|
23533
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23534
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23535
|
+
* a false positive. */
|
|
23536
|
+
complete: boolean(),
|
|
23537
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23538
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23539
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23540
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23541
|
+
collectionIds: array(string()).readonly().optional()
|
|
22608
23542
|
});
|
|
22609
23543
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22610
23544
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22625,6 +23559,53 @@ var RetrainFrameListSchema = object({
|
|
|
22625
23559
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22626
23560
|
autoPickMediaId: number().int().optional()
|
|
22627
23561
|
});
|
|
23562
|
+
/**
|
|
23563
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23564
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23565
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23566
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23567
|
+
* export carried (`exportedInBatch`).
|
|
23568
|
+
*/
|
|
23569
|
+
var RetrainExportFilterSchema = object({
|
|
23570
|
+
deviceIds: array(number()).optional(),
|
|
23571
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23572
|
+
/** Only frames in at least one of these named collections. */
|
|
23573
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23574
|
+
batchId: string().optional(),
|
|
23575
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23576
|
+
completeOnly: boolean().optional()
|
|
23577
|
+
});
|
|
23578
|
+
/**
|
|
23579
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23580
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23581
|
+
* convention — the classifier layout.
|
|
23582
|
+
*/
|
|
23583
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23584
|
+
/**
|
|
23585
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23586
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23587
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23588
|
+
* logged.
|
|
23589
|
+
*/
|
|
23590
|
+
var RetrainArchiveTargetSchema = object({
|
|
23591
|
+
kind: literal("http"),
|
|
23592
|
+
method: _enum(["PUT", "POST"]),
|
|
23593
|
+
url: string().url(),
|
|
23594
|
+
headers: record(string(), string()).optional()
|
|
23595
|
+
});
|
|
23596
|
+
var RetrainArchiveResultSchema = object({
|
|
23597
|
+
batchId: string(),
|
|
23598
|
+
frames: number().int(),
|
|
23599
|
+
crops: number().int(),
|
|
23600
|
+
annotations: number().int(),
|
|
23601
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23602
|
+
missing: number().int(),
|
|
23603
|
+
bytes: number().int(),
|
|
23604
|
+
/** sha256 of the exact bytes sent. */
|
|
23605
|
+
sha256: string(),
|
|
23606
|
+
/** The target's HTTP status. */
|
|
23607
|
+
status: number().int()
|
|
23608
|
+
});
|
|
22628
23609
|
/** What the operator asked the assist to look for. */
|
|
22629
23610
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22630
23611
|
kind: literal("package"),
|
|
@@ -22654,6 +23635,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22654
23635
|
reason: string(),
|
|
22655
23636
|
detail: string().optional()
|
|
22656
23637
|
})]);
|
|
23638
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23639
|
+
var RetrainCollectionSchema = object({
|
|
23640
|
+
id: string(),
|
|
23641
|
+
name: string(),
|
|
23642
|
+
createdAt: number(),
|
|
23643
|
+
frameCount: number().int()
|
|
23644
|
+
});
|
|
23645
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23646
|
+
kind: literal("created"),
|
|
23647
|
+
collection: RetrainCollectionSchema
|
|
23648
|
+
}), object({
|
|
23649
|
+
kind: literal("refused"),
|
|
23650
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23651
|
+
})]);
|
|
23652
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23653
|
+
kind: literal("renamed"),
|
|
23654
|
+
collection: RetrainCollectionSchema
|
|
23655
|
+
}), object({
|
|
23656
|
+
kind: literal("refused"),
|
|
23657
|
+
reason: _enum([
|
|
23658
|
+
"empty-name",
|
|
23659
|
+
"duplicate-name",
|
|
23660
|
+
"unknown-collection"
|
|
23661
|
+
])
|
|
23662
|
+
})]);
|
|
23663
|
+
/**
|
|
23664
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23665
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23666
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23667
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23668
|
+
*/
|
|
23669
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23670
|
+
kind: literal("added"),
|
|
23671
|
+
collectionId: string(),
|
|
23672
|
+
frame: RetrainFrameSchema,
|
|
23673
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23674
|
+
reused: boolean()
|
|
23675
|
+
}), object({
|
|
23676
|
+
kind: literal("refused"),
|
|
23677
|
+
reason: _enum([
|
|
23678
|
+
"unknown-collection",
|
|
23679
|
+
"still-unavailable",
|
|
23680
|
+
"still-busy",
|
|
23681
|
+
"unreadable-image",
|
|
23682
|
+
"write-failed"
|
|
23683
|
+
]),
|
|
23684
|
+
detail: string().optional()
|
|
23685
|
+
})]);
|
|
23686
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23687
|
+
var RetrainAssistProfileSchema = object({
|
|
23688
|
+
id: string(),
|
|
23689
|
+
name: string(),
|
|
23690
|
+
model: string(),
|
|
23691
|
+
kind: string(),
|
|
23692
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23693
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23694
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23695
|
+
leavesHouse: boolean()
|
|
23696
|
+
});
|
|
23697
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23698
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23699
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23700
|
+
var RetrainLlmReviewSchema = object({
|
|
23701
|
+
/** The `ref` the page sent the box under. */
|
|
23702
|
+
ref: string(),
|
|
23703
|
+
verdict: _enum([
|
|
23704
|
+
"confirmed",
|
|
23705
|
+
"wrong-class",
|
|
23706
|
+
"not-an-object",
|
|
23707
|
+
"uncertain"
|
|
23708
|
+
]),
|
|
23709
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23710
|
+
reason: string()
|
|
23711
|
+
});
|
|
23712
|
+
/**
|
|
23713
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23714
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23715
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23716
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23717
|
+
*/
|
|
23718
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23719
|
+
kind: literal("proposed"),
|
|
23720
|
+
profileId: string(),
|
|
23721
|
+
model: string(),
|
|
23722
|
+
/** The frame was sent outside the house for this answer. */
|
|
23723
|
+
leftHouse: boolean(),
|
|
23724
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23725
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23726
|
+
rejected: number().int()
|
|
23727
|
+
}), object({
|
|
23728
|
+
kind: literal("refused"),
|
|
23729
|
+
reason: _enum([
|
|
23730
|
+
"unknown-frame",
|
|
23731
|
+
"unreadable-frame",
|
|
23732
|
+
"unknown-profile",
|
|
23733
|
+
"profile-disabled",
|
|
23734
|
+
"no-vision",
|
|
23735
|
+
"cloud-not-confirmed",
|
|
23736
|
+
"llm-error",
|
|
23737
|
+
"malformed-answer"
|
|
23738
|
+
]),
|
|
23739
|
+
detail: string().optional()
|
|
23740
|
+
})]);
|
|
22657
23741
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22658
23742
|
var RetrainTransitionResultSchema = object({
|
|
22659
23743
|
trackId: string(),
|
|
@@ -23371,7 +24455,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23371
24455
|
auth: "admin"
|
|
23372
24456
|
}), method(object({
|
|
23373
24457
|
deviceId: number(),
|
|
23374
|
-
trackId: string(),
|
|
24458
|
+
trackId: string().optional(),
|
|
23375
24459
|
frameId: string()
|
|
23376
24460
|
}), object({
|
|
23377
24461
|
removed: boolean(),
|
|
@@ -23388,7 +24472,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23388
24472
|
auth: "admin"
|
|
23389
24473
|
}), method(object({
|
|
23390
24474
|
deviceId: number(),
|
|
23391
|
-
|
|
24475
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24476
|
+
trackId: string().optional(),
|
|
23392
24477
|
frameId: string(),
|
|
23393
24478
|
subject: RetrainAssistSubjectSchema,
|
|
23394
24479
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23396,12 +24481,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23396
24481
|
}), RetrainAssistResultSchema, {
|
|
23397
24482
|
kind: "mutation",
|
|
23398
24483
|
auth: "admin"
|
|
23399
|
-
}), method(object({
|
|
24484
|
+
}), method(object({
|
|
24485
|
+
trackId: string().optional(),
|
|
24486
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24487
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23400
24488
|
kind: "query",
|
|
23401
24489
|
auth: "admin"
|
|
23402
24490
|
}), method(object({
|
|
23403
24491
|
deviceId: number(),
|
|
23404
|
-
|
|
24492
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24493
|
+
trackId: string().optional(),
|
|
23405
24494
|
frameId: string(),
|
|
23406
24495
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23407
24496
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23419,7 +24508,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23419
24508
|
}), RetrainTransitionResultSchema, {
|
|
23420
24509
|
kind: "mutation",
|
|
23421
24510
|
auth: "admin"
|
|
23422
|
-
}), method(
|
|
24511
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24512
|
+
kind: "query",
|
|
24513
|
+
auth: "admin"
|
|
24514
|
+
}), method(object({
|
|
24515
|
+
deviceId: number(),
|
|
24516
|
+
trackId: string().optional(),
|
|
24517
|
+
frameId: string(),
|
|
24518
|
+
complete: boolean()
|
|
24519
|
+
}), RetrainFrameSchema, {
|
|
24520
|
+
kind: "mutation",
|
|
24521
|
+
auth: "admin"
|
|
24522
|
+
}), method(object({
|
|
24523
|
+
filter: RetrainExportFilterSchema,
|
|
24524
|
+
layout: RetrainExportLayoutSchema,
|
|
24525
|
+
target: RetrainArchiveTargetSchema
|
|
24526
|
+
}), RetrainArchiveResultSchema, {
|
|
24527
|
+
kind: "mutation",
|
|
24528
|
+
auth: "admin",
|
|
24529
|
+
timeoutMs: 60 * 6e4
|
|
24530
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24531
|
+
kind: "query",
|
|
24532
|
+
auth: "admin"
|
|
24533
|
+
}), method(object({
|
|
24534
|
+
deviceId: number(),
|
|
24535
|
+
trackId: string().optional(),
|
|
24536
|
+
frameId: string(),
|
|
24537
|
+
profileId: string(),
|
|
24538
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24539
|
+
boxes: array(object({
|
|
24540
|
+
ref: string(),
|
|
24541
|
+
bbox: RetrainBboxSchema,
|
|
24542
|
+
macroClass: RetrainMacroClassSchema,
|
|
24543
|
+
label: string().optional()
|
|
24544
|
+
})).max(50),
|
|
24545
|
+
allowCloud: boolean()
|
|
24546
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24547
|
+
kind: "mutation",
|
|
24548
|
+
auth: "admin",
|
|
24549
|
+
timeoutMs: 18e4
|
|
24550
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24551
|
+
kind: "mutation",
|
|
24552
|
+
auth: "admin"
|
|
24553
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24554
|
+
kind: "query",
|
|
24555
|
+
auth: "admin"
|
|
24556
|
+
}), method(object({
|
|
24557
|
+
id: string(),
|
|
24558
|
+
name: string().max(120)
|
|
24559
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24560
|
+
kind: "mutation",
|
|
24561
|
+
auth: "admin"
|
|
24562
|
+
}), method(object({ id: string() }), object({
|
|
24563
|
+
deleted: boolean(),
|
|
24564
|
+
removedFrames: number().int()
|
|
24565
|
+
}), {
|
|
24566
|
+
kind: "mutation",
|
|
24567
|
+
auth: "admin"
|
|
24568
|
+
}), method(object({
|
|
24569
|
+
collectionId: string(),
|
|
24570
|
+
deviceId: number(),
|
|
24571
|
+
epochMs: number()
|
|
24572
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24573
|
+
kind: "mutation",
|
|
24574
|
+
auth: "admin",
|
|
24575
|
+
timeoutMs: 6e4
|
|
24576
|
+
}), method(object({
|
|
24577
|
+
collectionId: string(),
|
|
24578
|
+
frameIds: array(string()).min(1).max(500)
|
|
24579
|
+
}), object({
|
|
24580
|
+
added: number().int(),
|
|
24581
|
+
alreadyMember: number().int(),
|
|
24582
|
+
unknownFrameIds: array(string()).readonly()
|
|
24583
|
+
}), {
|
|
24584
|
+
kind: "mutation",
|
|
24585
|
+
auth: "admin"
|
|
24586
|
+
}), method(object({
|
|
24587
|
+
collectionId: string(),
|
|
24588
|
+
frameId: string()
|
|
24589
|
+
}), object({
|
|
24590
|
+
removed: boolean(),
|
|
24591
|
+
deletedFrame: boolean()
|
|
24592
|
+
}), {
|
|
24593
|
+
kind: "mutation",
|
|
24594
|
+
auth: "admin"
|
|
24595
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23423
24596
|
kind: "query",
|
|
23424
24597
|
auth: "admin"
|
|
23425
24598
|
}), method(object({
|
|
@@ -23472,6 +24645,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23472
24645
|
timestamp: number()
|
|
23473
24646
|
});
|
|
23474
24647
|
/**
|
|
24648
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
24649
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
24650
|
+
*/
|
|
24651
|
+
var SuppliedRootOutputSchema = object({
|
|
24652
|
+
stepId: string(),
|
|
24653
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
24654
|
+
modelId: string(),
|
|
24655
|
+
detections: array(object({
|
|
24656
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
24657
|
+
bbox: tuple([
|
|
24658
|
+
number(),
|
|
24659
|
+
number(),
|
|
24660
|
+
number(),
|
|
24661
|
+
number()
|
|
24662
|
+
]),
|
|
24663
|
+
score: number(),
|
|
24664
|
+
/**
|
|
24665
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
24666
|
+
* detector already re-found inside a root face box (D730), so its
|
|
24667
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
24668
|
+
*/
|
|
24669
|
+
landmarks: array(object({
|
|
24670
|
+
x: number(),
|
|
24671
|
+
y: number()
|
|
24672
|
+
})).optional()
|
|
24673
|
+
})).min(1)
|
|
24674
|
+
});
|
|
24675
|
+
/**
|
|
23475
24676
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
23476
24677
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
23477
24678
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -23519,7 +24720,7 @@ var FrameRefSchema = object({
|
|
|
23519
24720
|
timestamp: number(),
|
|
23520
24721
|
capturedAt: number().optional()
|
|
23521
24722
|
});
|
|
23522
|
-
var ModelFormatSchema$
|
|
24723
|
+
var ModelFormatSchema$2 = _enum([
|
|
23523
24724
|
"onnx",
|
|
23524
24725
|
"coreml",
|
|
23525
24726
|
"openvino",
|
|
@@ -23537,7 +24738,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23537
24738
|
var PipelineEngineChoiceSchema = object({
|
|
23538
24739
|
runtime: literal("python"),
|
|
23539
24740
|
backend: string(),
|
|
23540
|
-
format: ModelFormatSchema$
|
|
24741
|
+
format: ModelFormatSchema$2,
|
|
23541
24742
|
device: string().optional()
|
|
23542
24743
|
});
|
|
23543
24744
|
/**
|
|
@@ -23576,33 +24777,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23576
24777
|
group: string().optional(),
|
|
23577
24778
|
settings: record(string(), unknown()).optional()
|
|
23578
24779
|
}));
|
|
23579
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23580
|
-
addonId: string(),
|
|
23581
|
-
enabled: boolean(),
|
|
23582
|
-
modelId: string(),
|
|
23583
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23584
|
-
settings: record(string(), unknown()).optional()
|
|
23585
|
-
}));
|
|
23586
|
-
var PipelineTemplateSchema$1 = object({
|
|
23587
|
-
id: string(),
|
|
23588
|
-
name: string(),
|
|
23589
|
-
createdAt: string(),
|
|
23590
|
-
updatedAt: string(),
|
|
23591
|
-
engine: PipelineEngineChoiceSchema,
|
|
23592
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23593
|
-
});
|
|
23594
24780
|
var PipelineModelOptionSchema = object({
|
|
23595
24781
|
id: string(),
|
|
23596
24782
|
name: string(),
|
|
23597
|
-
formats: record(string(),
|
|
23598
|
-
downloaded: boolean(),
|
|
23599
|
-
sizeMB: number()
|
|
23600
|
-
})),
|
|
24783
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23601
24784
|
group: ModelVariantGroupSchema.optional(),
|
|
23602
24785
|
legacy: boolean().optional(),
|
|
23603
24786
|
provider: ModelProviderIdSchema.optional(),
|
|
23604
24787
|
defaultConfidence: number().optional(),
|
|
23605
|
-
|
|
24788
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
23606
24789
|
});
|
|
23607
24790
|
var ConfigFieldBridge = custom();
|
|
23608
24791
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -23764,6 +24947,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23764
24947
|
}), {
|
|
23765
24948
|
kind: "mutation",
|
|
23766
24949
|
auth: "admin"
|
|
24950
|
+
}), method(object({
|
|
24951
|
+
nodeId: string(),
|
|
24952
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24953
|
+
dryRun: boolean()
|
|
24954
|
+
}), object({
|
|
24955
|
+
entries: array(object({
|
|
24956
|
+
deviceId: number(),
|
|
24957
|
+
keys: array(string()).readonly()
|
|
24958
|
+
})).readonly(),
|
|
24959
|
+
refused: array(object({
|
|
24960
|
+
deviceId: number(),
|
|
24961
|
+
reason: string()
|
|
24962
|
+
})).readonly()
|
|
24963
|
+
}), {
|
|
24964
|
+
kind: "mutation",
|
|
24965
|
+
auth: "admin"
|
|
23767
24966
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23768
24967
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23769
24968
|
deviceKey: string(),
|
|
@@ -23789,22 +24988,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23789
24988
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23790
24989
|
steps: array(PipelineStepInputSchema),
|
|
23791
24990
|
deviceKey: string().optional()
|
|
23792
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23793
|
-
name: string(),
|
|
23794
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23795
|
-
engine: PipelineEngineChoiceSchema
|
|
23796
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23797
|
-
id: string(),
|
|
23798
|
-
name: string().optional(),
|
|
23799
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23800
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24991
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23801
24992
|
addonId: string(),
|
|
23802
24993
|
modelId: string(),
|
|
23803
|
-
format: ModelFormatSchema$
|
|
24994
|
+
format: ModelFormatSchema$2
|
|
23804
24995
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23805
24996
|
addonId: string(),
|
|
23806
24997
|
modelId: string(),
|
|
23807
|
-
format: ModelFormatSchema$
|
|
24998
|
+
format: ModelFormatSchema$2
|
|
23808
24999
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23809
25000
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23810
25001
|
frame: FrameInputSchema.optional(),
|
|
@@ -23870,7 +25061,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23870
25061
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
23871
25062
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
23872
25063
|
*/
|
|
23873
|
-
replay: literal(true).optional()
|
|
25064
|
+
replay: literal(true).optional(),
|
|
25065
|
+
/**
|
|
25066
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
25067
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
25068
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
25069
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
25070
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
25071
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
25072
|
+
*/
|
|
25073
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
23874
25074
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
23875
25075
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23876
25076
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -23952,6 +25152,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23952
25152
|
filename: string().optional(),
|
|
23953
25153
|
settings: record(string(), unknown()).optional()
|
|
23954
25154
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25155
|
+
/**
|
|
25156
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25157
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25158
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25159
|
+
* schemas are what crosses the cap boundary.
|
|
25160
|
+
*/
|
|
25161
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25162
|
+
/** The operator's range for it. */
|
|
25163
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25164
|
+
min: 1,
|
|
25165
|
+
max: 8
|
|
25166
|
+
};
|
|
25167
|
+
var HardwareClassIdSchema = _enum([
|
|
25168
|
+
"intel-core-ultra",
|
|
25169
|
+
"intel-n-series",
|
|
25170
|
+
"apple-m-base",
|
|
25171
|
+
"apple-m-pro",
|
|
25172
|
+
"unknown"
|
|
25173
|
+
]);
|
|
25174
|
+
var AcceleratorKindSchema = _enum([
|
|
25175
|
+
"intel-npu",
|
|
25176
|
+
"intel-igpu",
|
|
25177
|
+
"x86-cpu",
|
|
25178
|
+
"arm-cpu",
|
|
25179
|
+
"apple-ane",
|
|
25180
|
+
"coral"
|
|
25181
|
+
]);
|
|
25182
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25183
|
+
object({
|
|
25184
|
+
kind: literal("capacity"),
|
|
25185
|
+
sessions: number(),
|
|
25186
|
+
minSessions: number()
|
|
25187
|
+
}),
|
|
25188
|
+
object({
|
|
25189
|
+
kind: literal("tie-faster"),
|
|
25190
|
+
over: string(),
|
|
25191
|
+
recallDelta: number()
|
|
25192
|
+
}),
|
|
25193
|
+
object({
|
|
25194
|
+
kind: literal("stepped-down"),
|
|
25195
|
+
from: string(),
|
|
25196
|
+
to: string(),
|
|
25197
|
+
limitedBy: string()
|
|
25198
|
+
}),
|
|
25199
|
+
object({
|
|
25200
|
+
kind: literal("no-fit-lightest"),
|
|
25201
|
+
sessions: number(),
|
|
25202
|
+
minSessions: number()
|
|
25203
|
+
}),
|
|
25204
|
+
object({
|
|
25205
|
+
kind: literal("derived-latency"),
|
|
25206
|
+
modelId: string()
|
|
25207
|
+
}),
|
|
25208
|
+
object({ kind: literal("cpu-device") }),
|
|
25209
|
+
object({ kind: literal("coral-untouched") }),
|
|
25210
|
+
object({ kind: literal("device-disabled") }),
|
|
25211
|
+
object({ kind: literal("device-unavailable") }),
|
|
25212
|
+
object({ kind: literal("node-offline") }),
|
|
25213
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25214
|
+
object({
|
|
25215
|
+
kind: literal("no-measured-data"),
|
|
25216
|
+
hardwareClass: HardwareClassIdSchema
|
|
25217
|
+
}),
|
|
25218
|
+
object({
|
|
25219
|
+
kind: literal("no-family-build"),
|
|
25220
|
+
format: ModelFormatSchema$1
|
|
25221
|
+
}),
|
|
25222
|
+
object({
|
|
25223
|
+
kind: literal("kept-custom-pin"),
|
|
25224
|
+
modelId: string(),
|
|
25225
|
+
deviceKey: string()
|
|
25226
|
+
})
|
|
25227
|
+
]);
|
|
25228
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25229
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25230
|
+
/**
|
|
25231
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25232
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25233
|
+
*/
|
|
25234
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25235
|
+
kind: literal("node-benchmark"),
|
|
25236
|
+
resultId: string(),
|
|
25237
|
+
measuredAtMs: number()
|
|
25238
|
+
})]);
|
|
25239
|
+
var DeviceModelChoiceSchema = object({
|
|
25240
|
+
modelId: string(),
|
|
25241
|
+
p50Ms: number(),
|
|
25242
|
+
fps: number(),
|
|
25243
|
+
measured: boolean(),
|
|
25244
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25245
|
+
source: LatencySourceSchema.optional(),
|
|
25246
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25247
|
+
capacitySessions: number(),
|
|
25248
|
+
personRecall: number()
|
|
25249
|
+
});
|
|
25250
|
+
var DeviceRecommendationSchema = object({
|
|
25251
|
+
deviceKey: string(),
|
|
25252
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25253
|
+
enabled: boolean(),
|
|
25254
|
+
available: boolean(),
|
|
25255
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25256
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25257
|
+
kept: KeptReasonSchema.optional(),
|
|
25258
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25259
|
+
});
|
|
25260
|
+
var NodeRecommendationSchema = object({
|
|
25261
|
+
nodeId: string(),
|
|
25262
|
+
reachable: boolean(),
|
|
25263
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25264
|
+
cpuModel: string().nullable(),
|
|
25265
|
+
skipped: boolean(),
|
|
25266
|
+
acceleratorModelId: string().nullable(),
|
|
25267
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25268
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25269
|
+
});
|
|
25270
|
+
var ModelPinChangeSchema = object({
|
|
25271
|
+
stepId: string(),
|
|
25272
|
+
before: string().nullable(),
|
|
25273
|
+
after: string().nullable()
|
|
25274
|
+
});
|
|
25275
|
+
var NodeDeviceChangeSchema = object({
|
|
25276
|
+
nodeId: string(),
|
|
25277
|
+
deviceKey: string(),
|
|
25278
|
+
madeExplicit: boolean(),
|
|
25279
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25280
|
+
thresholds: array(object({
|
|
25281
|
+
stepId: string(),
|
|
25282
|
+
keys: array(string()).readonly()
|
|
25283
|
+
})).readonly()
|
|
25284
|
+
});
|
|
25285
|
+
var CameraOverrideClearSchema = object({
|
|
25286
|
+
deviceId: number(),
|
|
25287
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25288
|
+
nodeId: string(),
|
|
25289
|
+
deviceKey: string().nullable(),
|
|
25290
|
+
stepId: string(),
|
|
25291
|
+
modelIdBefore: string().nullable(),
|
|
25292
|
+
keys: array(string()).readonly()
|
|
25293
|
+
});
|
|
25294
|
+
var DetectorStoreClearSchema = object({
|
|
25295
|
+
deviceId: number(),
|
|
25296
|
+
keys: array(string()).readonly()
|
|
25297
|
+
});
|
|
25298
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25299
|
+
object({
|
|
25300
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25301
|
+
skippedNodes: array(string()).readonly()
|
|
25302
|
+
}),
|
|
25303
|
+
object({
|
|
25304
|
+
kind: literal("detector-store-unreadable"),
|
|
25305
|
+
error: string()
|
|
25306
|
+
}),
|
|
25307
|
+
object({
|
|
25308
|
+
kind: literal("coral-enabled"),
|
|
25309
|
+
nodeId: string(),
|
|
25310
|
+
deviceKey: string()
|
|
25311
|
+
}),
|
|
25312
|
+
object({
|
|
25313
|
+
kind: literal("custom-pin-kept"),
|
|
25314
|
+
nodeId: string(),
|
|
25315
|
+
deviceKey: string().nullable(),
|
|
25316
|
+
deviceId: number().nullable(),
|
|
25317
|
+
modelId: string()
|
|
25318
|
+
}),
|
|
25319
|
+
object({
|
|
25320
|
+
kind: literal("custom-registry-unreadable"),
|
|
25321
|
+
error: string()
|
|
25322
|
+
})
|
|
25323
|
+
]);
|
|
25324
|
+
var AutoTuneOptionsSchema = object({
|
|
25325
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
25326
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25327
|
+
/**
|
|
25328
|
+
* The least number of parallel sessions every device must sustain at the
|
|
25329
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
25330
|
+
* that reaches it wins.
|
|
25331
|
+
*/
|
|
25332
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25333
|
+
});
|
|
25334
|
+
var AutoTunePlanSchema = object({
|
|
25335
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
25336
|
+
planHash: string(),
|
|
25337
|
+
family: literal("yolov9"),
|
|
25338
|
+
headroom: number(),
|
|
25339
|
+
minSessionsPerDevice: number(),
|
|
25340
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
25341
|
+
cameraFps: number(),
|
|
25342
|
+
generatedAt: number(),
|
|
25343
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
25344
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
25345
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
25346
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
25347
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
25348
|
+
});
|
|
25349
|
+
var AutoTuneApplyInputSchema = object({
|
|
25350
|
+
planHash: string(),
|
|
25351
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25352
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25353
|
+
});
|
|
25354
|
+
var AutoTunePhaseResultSchema = object({
|
|
25355
|
+
phase: _enum([
|
|
25356
|
+
"download",
|
|
25357
|
+
"camera-overrides",
|
|
25358
|
+
"detector-thresholds",
|
|
25359
|
+
"node-models",
|
|
25360
|
+
"redispatch"
|
|
25361
|
+
]),
|
|
25362
|
+
ok: boolean(),
|
|
25363
|
+
detail: string()
|
|
25364
|
+
});
|
|
25365
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
25366
|
+
object({
|
|
25367
|
+
kind: literal("applied"),
|
|
25368
|
+
planHash: string(),
|
|
25369
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25370
|
+
}),
|
|
25371
|
+
object({
|
|
25372
|
+
kind: literal("aborted"),
|
|
25373
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25374
|
+
}),
|
|
25375
|
+
object({
|
|
25376
|
+
kind: literal("stale"),
|
|
25377
|
+
plan: AutoTunePlanSchema
|
|
25378
|
+
}),
|
|
25379
|
+
object({
|
|
25380
|
+
kind: literal("refused"),
|
|
25381
|
+
reason: _enum(["apply-in-progress"])
|
|
25382
|
+
})
|
|
25383
|
+
]);
|
|
25384
|
+
/**
|
|
25385
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25386
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25387
|
+
* hardware share suggestion and the stale device pins.
|
|
25388
|
+
*/
|
|
25389
|
+
/**
|
|
25390
|
+
* How a new detection session picks its node and device.
|
|
25391
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25392
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25393
|
+
* weight only bites once a node already holds a session.
|
|
25394
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25395
|
+
* full or drowning node yields to a free one (D748).
|
|
25396
|
+
*/
|
|
25397
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25398
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25399
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25400
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25401
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25402
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25403
|
+
});
|
|
25404
|
+
var PlacementStatsInputSchema = object({
|
|
25405
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25406
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25407
|
+
var PlacementDeviceStatsSchema = object({
|
|
25408
|
+
deviceKey: string(),
|
|
25409
|
+
/** Sessions running on this device now. */
|
|
25410
|
+
sessionsNow: number(),
|
|
25411
|
+
/** Sessions started on this device inside the window. */
|
|
25412
|
+
sessionsStarted: number(),
|
|
25413
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25414
|
+
observedShare: number().nullable()
|
|
25415
|
+
});
|
|
25416
|
+
var PlacementNodeStatsSchema = object({
|
|
25417
|
+
nodeId: string(),
|
|
25418
|
+
sessionsNow: number(),
|
|
25419
|
+
sessionsStarted: number(),
|
|
25420
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25421
|
+
observedShare: number().nullable(),
|
|
25422
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25423
|
+
peakSessions: number(),
|
|
25424
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25425
|
+
yieldsAway: number(),
|
|
25426
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25427
|
+
});
|
|
25428
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25429
|
+
var StaleDevicePinSchema = object({
|
|
25430
|
+
deviceId: number(),
|
|
25431
|
+
deviceKey: string(),
|
|
25432
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25433
|
+
reason: _enum(["disabled", "absent"])
|
|
25434
|
+
});
|
|
25435
|
+
var PlacementStatsSchema = object({
|
|
25436
|
+
policy: SessionPlacementPolicySchema,
|
|
25437
|
+
windowMs: number(),
|
|
25438
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25439
|
+
observedForMs: number(),
|
|
25440
|
+
sessionsNow: number(),
|
|
25441
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25442
|
+
clusterPeakSessions: number(),
|
|
25443
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25444
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25445
|
+
});
|
|
25446
|
+
/**
|
|
25447
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25448
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25449
|
+
* the measured latency table for the node's hardware class.
|
|
25450
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25451
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25452
|
+
*/
|
|
25453
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25454
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25455
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25456
|
+
var SuggestSharesInputSchema = object({
|
|
25457
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25458
|
+
/** Default `hardware`. */
|
|
25459
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25460
|
+
});
|
|
25461
|
+
var SuggestedDeviceShareSchema = object({
|
|
25462
|
+
deviceKey: string(),
|
|
25463
|
+
/** Share of the node (0–100, rounded). */
|
|
25464
|
+
share: number(),
|
|
25465
|
+
modelId: string().nullable(),
|
|
25466
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25467
|
+
fps: number().nullable(),
|
|
25468
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25469
|
+
measured: boolean(),
|
|
25470
|
+
/**
|
|
25471
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25472
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25473
|
+
*/
|
|
25474
|
+
suggestedMaxSessions: number().nullable()
|
|
25475
|
+
});
|
|
25476
|
+
var SuggestedNodeShareSchema = object({
|
|
25477
|
+
nodeId: string(),
|
|
25478
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25479
|
+
share: number().nullable(),
|
|
25480
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25481
|
+
capacitySessions: number(),
|
|
25482
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25483
|
+
skippedReason: string().nullable(),
|
|
25484
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25485
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25486
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25487
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25488
|
+
});
|
|
25489
|
+
var SuggestSharesResultSchema = object({
|
|
25490
|
+
headroom: number(),
|
|
25491
|
+
/** The source asked for; each node says what it actually used. */
|
|
25492
|
+
source: CapacitySourceSchema,
|
|
25493
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25494
|
+
cameraFps: number(),
|
|
25495
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25496
|
+
minSessionsPerDevice: number(),
|
|
25497
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25498
|
+
});
|
|
25499
|
+
/**
|
|
25500
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25501
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25502
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25503
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25504
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25505
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25506
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25507
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25508
|
+
* - `manual` — the operator's stored sliders.
|
|
25509
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25510
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25511
|
+
*/
|
|
25512
|
+
var ShareSourceSchema = _enum([
|
|
25513
|
+
"hardware",
|
|
25514
|
+
"benchmark",
|
|
25515
|
+
"manual"
|
|
25516
|
+
]);
|
|
25517
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25518
|
+
object({
|
|
25519
|
+
nodes: record(string(), number()),
|
|
25520
|
+
devices: record(string(), record(string(), number()))
|
|
25521
|
+
});
|
|
25522
|
+
var EffectiveDeviceShareSchema = object({
|
|
25523
|
+
deviceKey: string(),
|
|
25524
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25525
|
+
eligible: boolean(),
|
|
25526
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25527
|
+
configuredPct: number(),
|
|
25528
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25529
|
+
effectivePct: number()
|
|
25530
|
+
});
|
|
25531
|
+
var EffectiveNodeShareSchema = object({
|
|
25532
|
+
nodeId: string(),
|
|
25533
|
+
eligible: boolean(),
|
|
25534
|
+
configuredPct: number(),
|
|
25535
|
+
effectivePct: number(),
|
|
25536
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25537
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25538
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25539
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25540
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25541
|
+
});
|
|
25542
|
+
var EffectiveSharesSchema = object({
|
|
25543
|
+
source: ShareSourceSchema,
|
|
25544
|
+
policy: SessionPlacementPolicySchema,
|
|
25545
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25546
|
+
autoPending: boolean(),
|
|
25547
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25548
|
+
computedAt: number().nullable(),
|
|
25549
|
+
/** What made the system recompute them last. */
|
|
25550
|
+
trigger: string().nullable(),
|
|
25551
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25552
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25553
|
+
nodeWeights: record(string(), number()),
|
|
25554
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25555
|
+
});
|
|
25556
|
+
/**
|
|
25557
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25558
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25559
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25560
|
+
* shares read.
|
|
25561
|
+
*
|
|
25562
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25563
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25564
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25565
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25566
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25567
|
+
*
|
|
25568
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25569
|
+
* cross a process at frame rate, D9):
|
|
25570
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25571
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25572
|
+
* interval;
|
|
25573
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25574
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25575
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25576
|
+
* CPU, RAM or the event loop give out.
|
|
25577
|
+
*/
|
|
25578
|
+
/** Defaults and bounds, one place. */
|
|
25579
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25580
|
+
fpsPerStream: 10,
|
|
25581
|
+
budgetMinutes: 45,
|
|
25582
|
+
minBudgetMinutes: 10,
|
|
25583
|
+
maxBudgetMinutes: 120,
|
|
25584
|
+
/** A result older than this no longer beats the table. */
|
|
25585
|
+
staleAfterDays: 30,
|
|
25586
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25587
|
+
settleSec: 5,
|
|
25588
|
+
/** Accounted window per ramp step. */
|
|
25589
|
+
measureSec: 20,
|
|
25590
|
+
/** Longest the drain may take before the run is refused. */
|
|
25591
|
+
drainTimeoutSec: 120,
|
|
25592
|
+
/** Candidate models per device in one run. */
|
|
25593
|
+
maxModelsPerDevice: 6
|
|
25594
|
+
};
|
|
25595
|
+
/** The two measurements a run can make. */
|
|
25596
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25597
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25598
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25599
|
+
deviceKey: string().min(1),
|
|
25600
|
+
/**
|
|
25601
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25602
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25603
|
+
*/
|
|
25604
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25605
|
+
});
|
|
25606
|
+
/** What the operator confirmed. */
|
|
25607
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25608
|
+
nodeId: string().min(1),
|
|
25609
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25610
|
+
/** Which measurements run. At least one. */
|
|
25611
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25612
|
+
/**
|
|
25613
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25614
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25615
|
+
* detector always runs.
|
|
25616
|
+
*/
|
|
25617
|
+
steps: array(string().min(1)).default([]),
|
|
25618
|
+
/** Offered rate of one stream / session. */
|
|
25619
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25620
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25621
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25622
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25623
|
+
keepDownloadedModels: boolean().default(false),
|
|
25624
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25625
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25626
|
+
});
|
|
25627
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25628
|
+
kind: _enum([
|
|
25629
|
+
"benchmark-active",
|
|
25630
|
+
"node-offline",
|
|
25631
|
+
"unknown-device",
|
|
25632
|
+
"no-phase",
|
|
25633
|
+
"insufficient-headroom"
|
|
25634
|
+
]),
|
|
25635
|
+
detail: string(),
|
|
25636
|
+
overridable: boolean()
|
|
25637
|
+
});
|
|
25638
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25639
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25640
|
+
deviceId: number(),
|
|
25641
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25642
|
+
placedOnNode: boolean(),
|
|
25643
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25644
|
+
pinnedToNode: boolean()
|
|
25645
|
+
});
|
|
25646
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25647
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25648
|
+
deviceId: number(),
|
|
25649
|
+
reason: literal("only-frame-source")
|
|
25650
|
+
});
|
|
25651
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25652
|
+
nodeId: string(),
|
|
25653
|
+
online: boolean(),
|
|
25654
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25655
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25656
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25657
|
+
estimatedDurationMs: number(),
|
|
25658
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25659
|
+
budgetMs: number(),
|
|
25660
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25661
|
+
steps: array(string()).readonly(),
|
|
25662
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25663
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25664
|
+
headroom: object({
|
|
25665
|
+
sessionsNow: number(),
|
|
25666
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25667
|
+
}),
|
|
25668
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25669
|
+
canStart: boolean()
|
|
25670
|
+
});
|
|
25671
|
+
/** Where the measuring runner is. */
|
|
25672
|
+
var NodeBenchProgressSchema = object({
|
|
25673
|
+
phase: _enum([
|
|
25674
|
+
"preparing",
|
|
25675
|
+
"device",
|
|
25676
|
+
"pipeline",
|
|
25677
|
+
"cleanup"
|
|
25678
|
+
]),
|
|
25679
|
+
deviceKey: string().nullable(),
|
|
25680
|
+
modelId: string().nullable(),
|
|
25681
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25682
|
+
load: number().nullable(),
|
|
25683
|
+
cellsDone: number(),
|
|
25684
|
+
cellsTotal: number(),
|
|
25685
|
+
message: string()
|
|
25686
|
+
});
|
|
25687
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25688
|
+
var NodeBenchLimitSchema = _enum([
|
|
25689
|
+
"p95",
|
|
25690
|
+
"drops",
|
|
25691
|
+
"errors",
|
|
25692
|
+
"stall",
|
|
25693
|
+
"cpu",
|
|
25694
|
+
"ram",
|
|
25695
|
+
"none"
|
|
25696
|
+
]);
|
|
25697
|
+
var NodeBenchRampStepSchema = object({
|
|
25698
|
+
load: number(),
|
|
25699
|
+
pass: boolean(),
|
|
25700
|
+
p95Ms: number(),
|
|
25701
|
+
dropRatio: number(),
|
|
25702
|
+
/** Completed frames per second over the accounted window. */
|
|
25703
|
+
fps: number(),
|
|
25704
|
+
cpuPct: number().nullable(),
|
|
25705
|
+
ramFreePct: number().nullable(),
|
|
25706
|
+
failReasons: array(string()).readonly()
|
|
25707
|
+
});
|
|
25708
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25709
|
+
phase: literal("device"),
|
|
25710
|
+
deviceKey: string(),
|
|
25711
|
+
modelId: string(),
|
|
25712
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25713
|
+
p50Ms: number(),
|
|
25714
|
+
p95Ms: number(),
|
|
25715
|
+
p99Ms: number(),
|
|
25716
|
+
/** Frames per second sustained at the last passing step. */
|
|
25717
|
+
fps: number(),
|
|
25718
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25719
|
+
kMax: number(),
|
|
25720
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25721
|
+
/** First call (model load + warm-up). */
|
|
25722
|
+
warmupMs: number(),
|
|
25723
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25724
|
+
}), object({
|
|
25725
|
+
phase: literal("pipeline"),
|
|
25726
|
+
deviceKey: string(),
|
|
25727
|
+
modelId: string(),
|
|
25728
|
+
steps: array(string()).readonly(),
|
|
25729
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25730
|
+
maxSessions: number(),
|
|
25731
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25732
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25733
|
+
stepsFired: array(string()).readonly(),
|
|
25734
|
+
warmupMs: number(),
|
|
25735
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25736
|
+
})]);
|
|
25737
|
+
/**
|
|
25738
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25739
|
+
* the node no longer beats the table.
|
|
25740
|
+
*/
|
|
25741
|
+
var NodeBenchFingerprintSchema = object({
|
|
25742
|
+
pipelineVersion: string().nullable(),
|
|
25743
|
+
cpuModel: string().nullable(),
|
|
25744
|
+
ramGb: number().nullable(),
|
|
25745
|
+
os: string().nullable(),
|
|
25746
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25747
|
+
pools: record(string(), object({
|
|
25748
|
+
runtime: string(),
|
|
25749
|
+
numWorkers: number(),
|
|
25750
|
+
concurrency: number(),
|
|
25751
|
+
batchMode: string()
|
|
25752
|
+
})).default({})
|
|
25753
|
+
});
|
|
25754
|
+
/** The frames the run used. */
|
|
25755
|
+
var NodeBenchClipSchema = object({
|
|
25756
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25757
|
+
id: string(),
|
|
25758
|
+
revision: string().nullable(),
|
|
25759
|
+
frames: number(),
|
|
25760
|
+
width: number(),
|
|
25761
|
+
height: number()
|
|
25762
|
+
});
|
|
25763
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25764
|
+
runId: string().min(1),
|
|
25765
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25766
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25767
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25768
|
+
steps: array(string()).default([]),
|
|
25769
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25770
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25771
|
+
deadlineAtMs: number(),
|
|
25772
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25773
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25774
|
+
keepDownloadedModels: boolean().default(false)
|
|
25775
|
+
});
|
|
25776
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25777
|
+
"running",
|
|
25778
|
+
"done",
|
|
25779
|
+
"failed",
|
|
25780
|
+
"aborted"
|
|
25781
|
+
]);
|
|
25782
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25783
|
+
runId: string(),
|
|
25784
|
+
nodeId: string(),
|
|
25785
|
+
state: NodeBenchRunnerStateSchema,
|
|
25786
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25787
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25788
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25789
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25790
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25791
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25792
|
+
activeCameraIds: array(number()).readonly(),
|
|
25793
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25794
|
+
deletedModels: array(string()).readonly(),
|
|
25795
|
+
error: string().nullable(),
|
|
25796
|
+
startedAtMs: number(),
|
|
25797
|
+
finishedAtMs: number().nullable()
|
|
25798
|
+
});
|
|
25799
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25800
|
+
"draining",
|
|
25801
|
+
"measuring",
|
|
25802
|
+
"restoring",
|
|
25803
|
+
"done",
|
|
25804
|
+
"failed",
|
|
25805
|
+
"aborted"
|
|
25806
|
+
]);
|
|
25807
|
+
/** Why a run ended. */
|
|
25808
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25809
|
+
"completed",
|
|
25810
|
+
"operator-abort",
|
|
25811
|
+
"deadline",
|
|
25812
|
+
"node-lost",
|
|
25813
|
+
"runner-lost",
|
|
25814
|
+
"hub-restart",
|
|
25815
|
+
"drain-timeout",
|
|
25816
|
+
"failed"
|
|
25817
|
+
]);
|
|
25818
|
+
var NodeBenchmarkRunSchema = object({
|
|
25819
|
+
runId: string(),
|
|
25820
|
+
nodeId: string(),
|
|
25821
|
+
state: NodeBenchmarkStateSchema,
|
|
25822
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25823
|
+
startedAtMs: number(),
|
|
25824
|
+
deadlineAtMs: number(),
|
|
25825
|
+
finishedAtMs: number().nullable(),
|
|
25826
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25827
|
+
error: string().nullable(),
|
|
25828
|
+
/** Cameras moved off the node for the run. */
|
|
25829
|
+
moved: array(number()).readonly(),
|
|
25830
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25831
|
+
staying: array(number()).readonly(),
|
|
25832
|
+
/** Something else ran on the node's pools during the run. */
|
|
25833
|
+
contaminated: boolean(),
|
|
25834
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25835
|
+
resultIds: array(string()).readonly()
|
|
25836
|
+
});
|
|
25837
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25838
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25839
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25840
|
+
modeNodeId: string().nullable(),
|
|
25841
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25842
|
+
});
|
|
25843
|
+
/**
|
|
25844
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25845
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25846
|
+
* ends, never by anyone else.
|
|
25847
|
+
*/
|
|
25848
|
+
var NodeBenchmarkResultSchema = object({
|
|
25849
|
+
id: string(),
|
|
25850
|
+
runId: string(),
|
|
25851
|
+
nodeId: string(),
|
|
25852
|
+
cell: NodeBenchCellSchema,
|
|
25853
|
+
fpsPerStream: number(),
|
|
25854
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25855
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25856
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25857
|
+
contaminated: boolean(),
|
|
25858
|
+
stayingCameras: array(number()).readonly(),
|
|
25859
|
+
/** The run ended early; the cell itself completed. */
|
|
25860
|
+
partialRun: boolean(),
|
|
25861
|
+
measuredAtMs: number()
|
|
25862
|
+
});
|
|
25863
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25864
|
+
nodeId: string().optional(),
|
|
25865
|
+
deviceKey: string().optional()
|
|
25866
|
+
});
|
|
25867
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25868
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25869
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25870
|
+
standing: _enum([
|
|
25871
|
+
"fresh",
|
|
25872
|
+
"stale",
|
|
25873
|
+
"superseded"
|
|
25874
|
+
]),
|
|
25875
|
+
staleWhy: _enum([
|
|
25876
|
+
"age",
|
|
25877
|
+
"runtime",
|
|
25878
|
+
"pool-tuning"
|
|
25879
|
+
]).nullable()
|
|
25880
|
+
});
|
|
25881
|
+
object({
|
|
25882
|
+
runId: string(),
|
|
25883
|
+
nodeId: string(),
|
|
25884
|
+
startedAtMs: number(),
|
|
25885
|
+
deadlineAtMs: number(),
|
|
25886
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25887
|
+
moved: array(number()).readonly(),
|
|
25888
|
+
staying: array(number()).readonly()
|
|
25889
|
+
});
|
|
25890
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25891
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25892
|
+
nodeId: string(),
|
|
25893
|
+
reachable: boolean(),
|
|
25894
|
+
devices: array(object({
|
|
25895
|
+
deviceKey: string(),
|
|
25896
|
+
enabled: boolean(),
|
|
25897
|
+
available: boolean(),
|
|
25898
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25899
|
+
suggested: array(string()).readonly(),
|
|
25900
|
+
/** Every root detector the device has a build for. */
|
|
25901
|
+
all: array(string()).readonly(),
|
|
25902
|
+
/** The model the device runs now, when pinned. */
|
|
25903
|
+
currentModelId: string().nullable()
|
|
25904
|
+
})).readonly(),
|
|
25905
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25906
|
+
steps: array(object({
|
|
25907
|
+
id: string(),
|
|
25908
|
+
name: string(),
|
|
25909
|
+
slot: string()
|
|
25910
|
+
})).readonly()
|
|
25911
|
+
});
|
|
23955
25912
|
object({
|
|
23956
25913
|
activeCameras: number(),
|
|
23957
25914
|
throttledCameras: number(),
|
|
@@ -24869,14 +26826,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24869
26826
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24870
26827
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24871
26828
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24872
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24873
|
-
* per
|
|
26829
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26830
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26831
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26832
|
+
* (D762).
|
|
24874
26833
|
*/
|
|
24875
26834
|
devices: array(object({
|
|
24876
26835
|
deviceKey: string(),
|
|
24877
26836
|
backend: string(),
|
|
24878
|
-
attachedCameras: number()
|
|
24879
|
-
queueDepthTotal: number()
|
|
26837
|
+
attachedCameras: number()
|
|
24880
26838
|
})).default([]),
|
|
24881
26839
|
/** Hardware capability flags reported by this node. */
|
|
24882
26840
|
hardware: object({
|
|
@@ -25012,7 +26970,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25012
26970
|
*/
|
|
25013
26971
|
cropJpeg: string().optional(),
|
|
25014
26972
|
parent: DetailParentSchema,
|
|
25015
|
-
steps: array(string()).optional()
|
|
26973
|
+
steps: array(string()).optional(),
|
|
26974
|
+
/**
|
|
26975
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
26976
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
26977
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
26978
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
26979
|
+
* requested step infers as before.
|
|
26980
|
+
*/
|
|
26981
|
+
supplied: object({
|
|
26982
|
+
stepId: string(),
|
|
26983
|
+
modelId: string(),
|
|
26984
|
+
boxes: array(object({
|
|
26985
|
+
bbox: NativeCropBboxSchema,
|
|
26986
|
+
score: number()
|
|
26987
|
+
})).min(1)
|
|
26988
|
+
}).optional()
|
|
25016
26989
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
25017
26990
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
25018
26991
|
stepId: string(),
|
|
@@ -25064,7 +27037,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25064
27037
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
25065
27038
|
deviceId: number(),
|
|
25066
27039
|
trackId: string()
|
|
25067
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27040
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27041
|
+
accepted: literal(true),
|
|
27042
|
+
runId: string()
|
|
27043
|
+
}), {
|
|
27044
|
+
kind: "mutation",
|
|
27045
|
+
auth: "admin"
|
|
27046
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27047
|
+
kind: "mutation",
|
|
27048
|
+
auth: "admin"
|
|
27049
|
+
});
|
|
25068
27050
|
var CameraPipelineConfigSchema = object({
|
|
25069
27051
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
25070
27052
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -25075,14 +27057,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
25075
27057
|
settings: record(string(), unknown()).readonly().optional()
|
|
25076
27058
|
}).nullable().optional()
|
|
25077
27059
|
});
|
|
25078
|
-
var PipelineTemplateSchema = object({
|
|
25079
|
-
id: string(),
|
|
25080
|
-
name: string(),
|
|
25081
|
-
description: string().optional(),
|
|
25082
|
-
config: CameraPipelineConfigSchema,
|
|
25083
|
-
createdAt: string(),
|
|
25084
|
-
updatedAt: string()
|
|
25085
|
-
});
|
|
25086
27060
|
var DeviceStepConfigSchema = object({
|
|
25087
27061
|
modelId: string().optional(),
|
|
25088
27062
|
settings: record(string(), unknown()).optional(),
|
|
@@ -25156,9 +27130,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
25156
27130
|
modelId: string().optional(),
|
|
25157
27131
|
settings: record(string(), unknown()).readonly().optional()
|
|
25158
27132
|
});
|
|
27133
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
25159
27134
|
var CameraPipelineSettingsSchema = object({
|
|
25160
|
-
pinnedAgentNodeId: string().optional(),
|
|
25161
27135
|
stepToggles: record(string(), boolean()).optional(),
|
|
27136
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
25162
27137
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
25163
27138
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25164
27139
|
});
|
|
@@ -25191,7 +27166,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25191
27166
|
});
|
|
25192
27167
|
/**
|
|
25193
27168
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25194
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27169
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27170
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27171
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27172
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25195
27173
|
*/
|
|
25196
27174
|
var AgentLoadSummarySchema = object({
|
|
25197
27175
|
nodeId: string(),
|
|
@@ -25280,26 +27258,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25280
27258
|
width: number(),
|
|
25281
27259
|
height: number(),
|
|
25282
27260
|
subscribers: number(),
|
|
25283
|
-
|
|
25284
|
-
|
|
27261
|
+
/**
|
|
27262
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27263
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27264
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27265
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27266
|
+
* camera and is not served (D758).
|
|
27267
|
+
*/
|
|
27268
|
+
inFps: number().nullable()
|
|
25285
27269
|
})).readonly(),
|
|
25286
27270
|
webrtcSessions: number(),
|
|
25287
27271
|
rtspRestream: boolean()
|
|
25288
27272
|
});
|
|
25289
|
-
/**
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
var CameraDecoderStatusSchema = object({
|
|
25298
|
-
nodeId: string(),
|
|
25299
|
-
formats: array(string()).readonly(),
|
|
25300
|
-
sessionCount: number(),
|
|
25301
|
-
shm: CameraDecoderShmSchema
|
|
25302
|
-
});
|
|
27273
|
+
/**
|
|
27274
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27275
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27276
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27277
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27278
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27279
|
+
* detector), never from a counter nothing feeds.
|
|
27280
|
+
*/
|
|
27281
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25303
27282
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25304
27283
|
var CameraMotionStatusSchema = object({
|
|
25305
27284
|
enabled: boolean(),
|
|
@@ -25656,12 +27635,6 @@ method(object({
|
|
|
25656
27635
|
}), object({ success: literal(true) }), {
|
|
25657
27636
|
kind: "mutation",
|
|
25658
27637
|
auth: "admin"
|
|
25659
|
-
}), method(object({
|
|
25660
|
-
agentNodeId: string(),
|
|
25661
|
-
detectWeight: number().positive().nullable()
|
|
25662
|
-
}), object({ success: literal(true) }), {
|
|
25663
|
-
kind: "mutation",
|
|
25664
|
-
auth: "admin"
|
|
25665
27638
|
}), method(object({
|
|
25666
27639
|
agentNodeId: string(),
|
|
25667
27640
|
detect: boolean().nullable().optional(),
|
|
@@ -25703,6 +27676,30 @@ method(object({
|
|
|
25703
27676
|
}), {
|
|
25704
27677
|
kind: "mutation",
|
|
25705
27678
|
auth: "admin"
|
|
27679
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27680
|
+
kind: "mutation",
|
|
27681
|
+
auth: "admin"
|
|
27682
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27683
|
+
kind: "mutation",
|
|
27684
|
+
auth: "admin"
|
|
27685
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27686
|
+
kind: "mutation",
|
|
27687
|
+
auth: "admin"
|
|
27688
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27689
|
+
kind: literal("started"),
|
|
27690
|
+
runId: string()
|
|
27691
|
+
}), object({
|
|
27692
|
+
kind: literal("refused"),
|
|
27693
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27694
|
+
})]), {
|
|
27695
|
+
kind: "mutation",
|
|
27696
|
+
auth: "admin"
|
|
27697
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27698
|
+
kind: "mutation",
|
|
27699
|
+
auth: "admin"
|
|
27700
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27701
|
+
kind: "mutation",
|
|
27702
|
+
auth: "admin"
|
|
25706
27703
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25707
27704
|
deviceId: number(),
|
|
25708
27705
|
addonId: string(),
|
|
@@ -25719,6 +27716,13 @@ method(object({
|
|
|
25719
27716
|
}), object({ success: literal(true) }), {
|
|
25720
27717
|
kind: "mutation",
|
|
25721
27718
|
auth: "admin"
|
|
27719
|
+
}), method(object({
|
|
27720
|
+
deviceId: number(),
|
|
27721
|
+
addonId: string(),
|
|
27722
|
+
settings: record(string(), unknown()).nullable()
|
|
27723
|
+
}), object({ success: literal(true) }), {
|
|
27724
|
+
kind: "mutation",
|
|
27725
|
+
auth: "admin"
|
|
25722
27726
|
}), method(object({
|
|
25723
27727
|
deviceId: number(),
|
|
25724
27728
|
agentNodeId: string(),
|
|
@@ -25742,25 +27746,7 @@ method(object({
|
|
|
25742
27746
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25743
27747
|
kind: "mutation",
|
|
25744
27748
|
auth: "admin"
|
|
25745
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25746
|
-
name: string(),
|
|
25747
|
-
description: string().optional(),
|
|
25748
|
-
config: CameraPipelineConfigSchema
|
|
25749
|
-
}), PipelineTemplateSchema, {
|
|
25750
|
-
kind: "mutation",
|
|
25751
|
-
auth: "admin"
|
|
25752
|
-
}), method(object({
|
|
25753
|
-
id: string(),
|
|
25754
|
-
name: string().optional(),
|
|
25755
|
-
description: string().optional(),
|
|
25756
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25757
|
-
}), PipelineTemplateSchema, {
|
|
25758
|
-
kind: "mutation",
|
|
25759
|
-
auth: "admin"
|
|
25760
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25761
|
-
kind: "mutation",
|
|
25762
|
-
auth: "admin"
|
|
25763
|
-
});
|
|
27749
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25764
27750
|
/**
|
|
25765
27751
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25766
27752
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26454,7 +28440,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26454
28440
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26455
28441
|
* operator already consented to.
|
|
26456
28442
|
*/
|
|
26457
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
28443
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
28444
|
+
/**
|
|
28445
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
28446
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
28447
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
28448
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
28449
|
+
*/
|
|
28450
|
+
linkIntent: string().optional(),
|
|
28451
|
+
/**
|
|
28452
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28453
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
28454
|
+
*/
|
|
28455
|
+
issuer: string().optional()
|
|
26458
28456
|
});
|
|
26459
28457
|
method(object({
|
|
26460
28458
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28522,8 +30520,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
28522
30520
|
]).nullable(),
|
|
28523
30521
|
/** Input FPS from the camera (null for adaptive). */
|
|
28524
30522
|
inputFps: number().nullable(),
|
|
28525
|
-
/** Decoded FPS (null for adaptive). */
|
|
28526
|
-
decodeFps: number().nullable(),
|
|
28527
30523
|
/** Bitrate in kbps (null for adaptive). */
|
|
28528
30524
|
bitrateKbps: number().nullable()
|
|
28529
30525
|
});
|
|
@@ -28800,7 +30796,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28800
30796
|
* field their hints were silently stripped by the schema and the
|
|
28801
30797
|
* adaptive ladder started blind on the client's display size.
|
|
28802
30798
|
*/
|
|
28803
|
-
hints: webrtcClientHintsSchema.optional()
|
|
30799
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
30800
|
+
/**
|
|
30801
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
30802
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
30803
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
30804
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
30805
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
30806
|
+
*
|
|
30807
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
30808
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
30809
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
30810
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
30811
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
30812
|
+
* flag must not become a second door to the camera's speaker.
|
|
30813
|
+
*/
|
|
30814
|
+
talkback: boolean().optional()
|
|
28804
30815
|
}), object({
|
|
28805
30816
|
sessionId: string(),
|
|
28806
30817
|
sdpAnswer: string()
|
|
@@ -28855,6 +30866,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28855
30866
|
*/
|
|
28856
30867
|
alive: boolean()
|
|
28857
30868
|
})), method(object({
|
|
30869
|
+
deviceId: number().int().nonnegative(),
|
|
30870
|
+
sessionId: string(),
|
|
30871
|
+
downlinkMbps: number().nonnegative()
|
|
30872
|
+
}), object({
|
|
30873
|
+
outcome: _enum(["switching", "held"]),
|
|
30874
|
+
tier: CamProfileSchema.nullable(),
|
|
30875
|
+
reason: string()
|
|
30876
|
+
}), { kind: "mutation" }), method(object({
|
|
28858
30877
|
deviceId: number().int().nonnegative(),
|
|
28859
30878
|
sessionId: string()
|
|
28860
30879
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -29094,6 +31113,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
29094
31113
|
var RestartAddonResultSchema = unknown();
|
|
29095
31114
|
var InstallPackageResultSchema = unknown();
|
|
29096
31115
|
var ReloadPackagesResultSchema = unknown();
|
|
31116
|
+
/**
|
|
31117
|
+
* What an uninstall did on ONE node.
|
|
31118
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
31119
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
31120
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
31121
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
31122
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
31123
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
31124
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
31125
|
+
*/
|
|
31126
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
31127
|
+
"uninstalled",
|
|
31128
|
+
"not-installed",
|
|
31129
|
+
"refused",
|
|
31130
|
+
"failed",
|
|
31131
|
+
"pending-reconnect"
|
|
31132
|
+
]);
|
|
31133
|
+
var UninstallNodeResultSchema = object({
|
|
31134
|
+
nodeId: string(),
|
|
31135
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
31136
|
+
error: string().optional(),
|
|
31137
|
+
addonIds: array(string()).readonly(),
|
|
31138
|
+
runnersStopped: array(string()).readonly(),
|
|
31139
|
+
warnings: array(string()).readonly()
|
|
31140
|
+
});
|
|
31141
|
+
var UninstallPackageResultSchema = object({
|
|
31142
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
31143
|
+
success: boolean(),
|
|
31144
|
+
packageName: string(),
|
|
31145
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
31146
|
+
});
|
|
31147
|
+
/**
|
|
31148
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
31149
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
31150
|
+
*/
|
|
31151
|
+
var PackageInstallationsSchema = object({
|
|
31152
|
+
installations: array(object({
|
|
31153
|
+
packageName: string(),
|
|
31154
|
+
nodeId: string(),
|
|
31155
|
+
nodeName: string(),
|
|
31156
|
+
isHub: boolean(),
|
|
31157
|
+
isOnline: boolean(),
|
|
31158
|
+
version: string().nullable(),
|
|
31159
|
+
addonIds: array(string()).readonly(),
|
|
31160
|
+
source: _enum(["live", "recorded"]),
|
|
31161
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
31162
|
+
onHub: boolean()
|
|
31163
|
+
})).readonly(),
|
|
31164
|
+
unreachable: array(object({
|
|
31165
|
+
nodeId: string(),
|
|
31166
|
+
error: string()
|
|
31167
|
+
})).readonly()
|
|
31168
|
+
});
|
|
29097
31169
|
var BulkUpdateItemStatusSchema = _enum([
|
|
29098
31170
|
"queued",
|
|
29099
31171
|
"updating",
|
|
@@ -29176,10 +31248,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
29176
31248
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
29177
31249
|
kind: "mutation",
|
|
29178
31250
|
auth: "admin"
|
|
29179
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31251
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
31252
|
+
packageName: string().min(1),
|
|
31253
|
+
nodeId: string().optional(),
|
|
31254
|
+
everywhere: boolean().optional()
|
|
31255
|
+
}), UninstallPackageResultSchema, {
|
|
29180
31256
|
kind: "mutation",
|
|
29181
31257
|
auth: "admin"
|
|
29182
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
31258
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
29183
31259
|
kind: "mutation",
|
|
29184
31260
|
auth: "admin"
|
|
29185
31261
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -32244,6 +34320,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
32244
34320
|
enabled: boolean().optional(),
|
|
32245
34321
|
info: record(string(), unknown()).optional(),
|
|
32246
34322
|
settings: record(string(), unknown()).optional(),
|
|
34323
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
34324
|
+
* the keychain, not the table (D787). */
|
|
34325
|
+
secretKeys: array(string()).optional(),
|
|
32247
34326
|
skipRestart: boolean().optional()
|
|
32248
34327
|
});
|
|
32249
34328
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -32267,7 +34346,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
32267
34346
|
auth: "admin"
|
|
32268
34347
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
32269
34348
|
id: string(),
|
|
32270
|
-
settings: record(string(), unknown())
|
|
34349
|
+
settings: record(string(), unknown()),
|
|
34350
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
34351
|
+
secretKeys: array(string()).optional()
|
|
32271
34352
|
}), object({ success: boolean() }), {
|
|
32272
34353
|
kind: "mutation",
|
|
32273
34354
|
auth: "admin"
|
|
@@ -32666,7 +34747,8 @@ var ConnectionEndpointSchema = object({
|
|
|
32666
34747
|
"lan-ipv6",
|
|
32667
34748
|
"public",
|
|
32668
34749
|
"loopback",
|
|
32669
|
-
"app-link"
|
|
34750
|
+
"app-link",
|
|
34751
|
+
"custom"
|
|
32670
34752
|
]),
|
|
32671
34753
|
/**
|
|
32672
34754
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -32735,7 +34817,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
32735
34817
|
localPort: AdvertisedLocalPortSchema
|
|
32736
34818
|
});
|
|
32737
34819
|
/**
|
|
32738
|
-
* The address flagged for notification
|
|
34820
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
32739
34821
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
32740
34822
|
* so the UI can show it either way.
|
|
32741
34823
|
*/
|
|
@@ -32768,6 +34850,72 @@ var ViewerEndpointsSchema = object({
|
|
|
32768
34850
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
32769
34851
|
resolved: array(string()).readonly()
|
|
32770
34852
|
});
|
|
34853
|
+
/**
|
|
34854
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
34855
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
34856
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
34857
|
+
*/
|
|
34858
|
+
var HubAddressSnapshotSchema = object({
|
|
34859
|
+
override: string().nullable(),
|
|
34860
|
+
resolved: string().nullable(),
|
|
34861
|
+
source: _enum([
|
|
34862
|
+
"override",
|
|
34863
|
+
"auto",
|
|
34864
|
+
"none"
|
|
34865
|
+
])
|
|
34866
|
+
});
|
|
34867
|
+
var HubAddressesSchema = object({
|
|
34868
|
+
cluster: HubAddressSnapshotSchema,
|
|
34869
|
+
browser: HubAddressSnapshotSchema
|
|
34870
|
+
});
|
|
34871
|
+
/**
|
|
34872
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
34873
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
34874
|
+
* by at most one address.
|
|
34875
|
+
*/
|
|
34876
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
34877
|
+
var RoleSourceSchema = _enum([
|
|
34878
|
+
"flagged",
|
|
34879
|
+
"auto",
|
|
34880
|
+
"none"
|
|
34881
|
+
]);
|
|
34882
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
34883
|
+
var HubAddressRoleResolutionSchema = object({
|
|
34884
|
+
/** The address carrying the flag, or null = automatic. */
|
|
34885
|
+
flagged: string().nullable(),
|
|
34886
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
34887
|
+
resolved: string().nullable(),
|
|
34888
|
+
source: RoleSourceSchema
|
|
34889
|
+
});
|
|
34890
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
34891
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
34892
|
+
flagged: array(string()).readonly(),
|
|
34893
|
+
/** What the apps race right now. */
|
|
34894
|
+
resolved: array(string()).readonly(),
|
|
34895
|
+
source: RoleSourceSchema
|
|
34896
|
+
});
|
|
34897
|
+
var HubAddressBookSchema = object({
|
|
34898
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
34899
|
+
/** In the hub's detected palette right now. */
|
|
34900
|
+
detected: boolean(),
|
|
34901
|
+
/** Entered by the operator (removable). */
|
|
34902
|
+
custom: boolean(),
|
|
34903
|
+
/** The roles explicitly flagged on this address. */
|
|
34904
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
34905
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
34906
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
34907
|
+
/** The roles this address may be flagged with. */
|
|
34908
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
34909
|
+
})).readonly(),
|
|
34910
|
+
roles: object({
|
|
34911
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
34912
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
34913
|
+
internal: HubAddressRoleResolutionSchema,
|
|
34914
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
34915
|
+
}),
|
|
34916
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
34917
|
+
appLinkHub: string().nullable()
|
|
34918
|
+
});
|
|
32771
34919
|
var AllowedAddressesSchema = object({
|
|
32772
34920
|
/**
|
|
32773
34921
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -32811,10 +34959,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
32811
34959
|
* tunnel always emits `https://` regardless. */
|
|
32812
34960
|
scheme: _enum(["http", "https"]).optional(),
|
|
32813
34961
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
32814
|
-
* an address notification
|
|
34962
|
+
* an address notification taps can be flagged with, not a hub
|
|
32815
34963
|
* route. Default `false`: racers and rankers never see it. */
|
|
32816
34964
|
includeAppLink: boolean().optional()
|
|
32817
|
-
}), 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(
|
|
34965
|
+
}), 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({
|
|
34966
|
+
baseUrl: string(),
|
|
34967
|
+
label: string().max(80)
|
|
34968
|
+
}), HubAddressBookSchema, {
|
|
34969
|
+
kind: "mutation",
|
|
34970
|
+
auth: "admin"
|
|
34971
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
34972
|
+
kind: "mutation",
|
|
34973
|
+
auth: "admin"
|
|
34974
|
+
}), method(object({
|
|
34975
|
+
role: HubAddressRoleSchema,
|
|
34976
|
+
baseUrl: string().nullable(),
|
|
34977
|
+
enabled: boolean(),
|
|
34978
|
+
acceptInsecureHttp: boolean().optional()
|
|
34979
|
+
}), HubAddressBookSchema, {
|
|
34980
|
+
kind: "mutation",
|
|
34981
|
+
auth: "admin"
|
|
34982
|
+
}), 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, {
|
|
32818
34983
|
kind: "mutation",
|
|
32819
34984
|
auth: "admin"
|
|
32820
34985
|
}), method(object({
|
|
@@ -39467,6 +41632,32 @@ var TotpStatusSchema = object({
|
|
|
39467
41632
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
39468
41633
|
confirmedAt: number().nullable()
|
|
39469
41634
|
});
|
|
41635
|
+
/**
|
|
41636
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
41637
|
+
* and scoped tokens.
|
|
41638
|
+
*
|
|
41639
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
41640
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
41641
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
41642
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
41643
|
+
* provider.
|
|
41644
|
+
*/
|
|
41645
|
+
var ExternalIdentitySchema = object({
|
|
41646
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
41647
|
+
provider: string(),
|
|
41648
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
41649
|
+
subject: string(),
|
|
41650
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
41651
|
+
issuer: string(),
|
|
41652
|
+
userId: string(),
|
|
41653
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
41654
|
+
label: string().optional(),
|
|
41655
|
+
linkedAt: number()
|
|
41656
|
+
});
|
|
41657
|
+
var ExternalIdentityKeySchema = object({
|
|
41658
|
+
provider: string().min(1),
|
|
41659
|
+
subject: string().min(1)
|
|
41660
|
+
});
|
|
39470
41661
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
39471
41662
|
kind: "mutation",
|
|
39472
41663
|
auth: "admin",
|
|
@@ -39580,7 +41771,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
39580
41771
|
userId: string(),
|
|
39581
41772
|
username: string(),
|
|
39582
41773
|
scopes: array(TokenScopeSchema)
|
|
39583
|
-
}).nullable(), { access: "view" }), method(
|
|
41774
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
41775
|
+
userId: string(),
|
|
41776
|
+
issuer: string()
|
|
41777
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
41778
|
+
userId: string(),
|
|
41779
|
+
issuer: string().min(1),
|
|
41780
|
+
label: string().optional()
|
|
41781
|
+
}), object({ success: literal(true) }), {
|
|
41782
|
+
kind: "mutation",
|
|
41783
|
+
auth: "admin",
|
|
41784
|
+
access: "create"
|
|
41785
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
41786
|
+
kind: "mutation",
|
|
41787
|
+
auth: "admin",
|
|
41788
|
+
access: "delete"
|
|
41789
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
39584
41790
|
kind: "mutation",
|
|
39585
41791
|
auth: "admin",
|
|
39586
41792
|
access: "delete"
|
|
@@ -40282,6 +42488,16 @@ var zoneRulesCapability = {
|
|
|
40282
42488
|
durability: "restored"
|
|
40283
42489
|
};
|
|
40284
42490
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
42491
|
+
Object.freeze({
|
|
42492
|
+
person: .5,
|
|
42493
|
+
vehicle: .5,
|
|
42494
|
+
animal: .5
|
|
42495
|
+
});
|
|
42496
|
+
Object.freeze({
|
|
42497
|
+
person: .65,
|
|
42498
|
+
vehicle: .65,
|
|
42499
|
+
animal: .65
|
|
42500
|
+
});
|
|
40285
42501
|
/**
|
|
40286
42502
|
* Accessory device helpers — shared across drivers.
|
|
40287
42503
|
*
|
|
@@ -40757,7 +42973,8 @@ var BaseDevice = class {
|
|
|
40757
42973
|
this.role = options.role;
|
|
40758
42974
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
40759
42975
|
const seedData = ctx.persistedConfig ?? {};
|
|
40760
|
-
|
|
42976
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
42977
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
40761
42978
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
40762
42979
|
tags: {
|
|
40763
42980
|
deviceId: ctx.id,
|
|
@@ -41980,6 +44197,12 @@ Object.freeze({
|
|
|
41980
44197
|
addonId: null,
|
|
41981
44198
|
access: "view"
|
|
41982
44199
|
},
|
|
44200
|
+
"addons.listInstallations": {
|
|
44201
|
+
capName: "addons",
|
|
44202
|
+
capScope: "system",
|
|
44203
|
+
addonId: null,
|
|
44204
|
+
access: "view"
|
|
44205
|
+
},
|
|
41983
44206
|
"addons.listJobs": {
|
|
41984
44207
|
capName: "addons",
|
|
41985
44208
|
capScope: "system",
|
|
@@ -43162,90 +45385,18 @@ Object.freeze({
|
|
|
43162
45385
|
addonId: null,
|
|
43163
45386
|
access: "create"
|
|
43164
45387
|
},
|
|
43165
|
-
"decoder.createSession": {
|
|
43166
|
-
capName: "decoder",
|
|
43167
|
-
capScope: "system",
|
|
43168
|
-
addonId: null,
|
|
43169
|
-
access: "view"
|
|
43170
|
-
},
|
|
43171
|
-
"decoder.destroySession": {
|
|
43172
|
-
capName: "decoder",
|
|
43173
|
-
capScope: "system",
|
|
43174
|
-
addonId: null,
|
|
43175
|
-
access: "delete"
|
|
43176
|
-
},
|
|
43177
|
-
"decoder.getFrame": {
|
|
43178
|
-
capName: "decoder",
|
|
43179
|
-
capScope: "system",
|
|
43180
|
-
addonId: null,
|
|
43181
|
-
access: "view"
|
|
43182
|
-
},
|
|
43183
45388
|
"decoder.getInfo": {
|
|
43184
45389
|
capName: "decoder",
|
|
43185
45390
|
capScope: "system",
|
|
43186
45391
|
addonId: null,
|
|
43187
45392
|
access: "view"
|
|
43188
45393
|
},
|
|
43189
|
-
"decoder.getShmStats": {
|
|
43190
|
-
capName: "decoder",
|
|
43191
|
-
capScope: "system",
|
|
43192
|
-
addonId: null,
|
|
43193
|
-
access: "view"
|
|
43194
|
-
},
|
|
43195
|
-
"decoder.getStats": {
|
|
43196
|
-
capName: "decoder",
|
|
43197
|
-
capScope: "system",
|
|
43198
|
-
addonId: null,
|
|
43199
|
-
access: "view"
|
|
43200
|
-
},
|
|
43201
|
-
"decoder.listActiveSessions": {
|
|
43202
|
-
capName: "decoder",
|
|
43203
|
-
capScope: "system",
|
|
43204
|
-
addonId: null,
|
|
43205
|
-
access: "view"
|
|
43206
|
-
},
|
|
43207
|
-
"decoder.openStream": {
|
|
43208
|
-
capName: "decoder",
|
|
43209
|
-
capScope: "system",
|
|
43210
|
-
addonId: null,
|
|
43211
|
-
access: "view"
|
|
43212
|
-
},
|
|
43213
|
-
"decoder.pullFrames": {
|
|
43214
|
-
capName: "decoder",
|
|
43215
|
-
capScope: "system",
|
|
43216
|
-
addonId: null,
|
|
43217
|
-
access: "view"
|
|
43218
|
-
},
|
|
43219
|
-
"decoder.pullHandles": {
|
|
43220
|
-
capName: "decoder",
|
|
43221
|
-
capScope: "system",
|
|
43222
|
-
addonId: null,
|
|
43223
|
-
access: "view"
|
|
43224
|
-
},
|
|
43225
|
-
"decoder.pushPacket": {
|
|
43226
|
-
capName: "decoder",
|
|
43227
|
-
capScope: "system",
|
|
43228
|
-
addonId: null,
|
|
43229
|
-
access: "view"
|
|
43230
|
-
},
|
|
43231
45394
|
"decoder.reprobeHwaccel": {
|
|
43232
45395
|
capName: "decoder",
|
|
43233
45396
|
capScope: "system",
|
|
43234
45397
|
addonId: null,
|
|
43235
45398
|
access: "create"
|
|
43236
45399
|
},
|
|
43237
|
-
"decoder.supportsCodec": {
|
|
43238
|
-
capName: "decoder",
|
|
43239
|
-
capScope: "system",
|
|
43240
|
-
addonId: null,
|
|
43241
|
-
access: "view"
|
|
43242
|
-
},
|
|
43243
|
-
"decoder.updateConfig": {
|
|
43244
|
-
capName: "decoder",
|
|
43245
|
-
capScope: "system",
|
|
43246
|
-
addonId: null,
|
|
43247
|
-
access: "view"
|
|
43248
|
-
},
|
|
43249
45400
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
43250
45401
|
capName: "detection-pipeline",
|
|
43251
45402
|
capScope: "device",
|
|
@@ -44512,6 +46663,90 @@ Object.freeze({
|
|
|
44512
46663
|
addonId: null,
|
|
44513
46664
|
access: "create"
|
|
44514
46665
|
},
|
|
46666
|
+
"keychain.delete": {
|
|
46667
|
+
capName: "keychain",
|
|
46668
|
+
capScope: "system",
|
|
46669
|
+
addonId: null,
|
|
46670
|
+
access: "delete"
|
|
46671
|
+
},
|
|
46672
|
+
"keychain.getState": {
|
|
46673
|
+
capName: "keychain",
|
|
46674
|
+
capScope: "system",
|
|
46675
|
+
addonId: null,
|
|
46676
|
+
access: "view"
|
|
46677
|
+
},
|
|
46678
|
+
"keychain.listMeta": {
|
|
46679
|
+
capName: "keychain",
|
|
46680
|
+
capScope: "system",
|
|
46681
|
+
addonId: null,
|
|
46682
|
+
access: "view"
|
|
46683
|
+
},
|
|
46684
|
+
"keychain.put": {
|
|
46685
|
+
capName: "keychain",
|
|
46686
|
+
capScope: "system",
|
|
46687
|
+
addonId: null,
|
|
46688
|
+
access: "create"
|
|
46689
|
+
},
|
|
46690
|
+
"keychain.resolve": {
|
|
46691
|
+
capName: "keychain",
|
|
46692
|
+
capScope: "system",
|
|
46693
|
+
addonId: null,
|
|
46694
|
+
access: "view"
|
|
46695
|
+
},
|
|
46696
|
+
"keychainAdmin.deleteOrphans": {
|
|
46697
|
+
capName: "keychain-admin",
|
|
46698
|
+
capScope: "system",
|
|
46699
|
+
addonId: null,
|
|
46700
|
+
access: "delete"
|
|
46701
|
+
},
|
|
46702
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
46703
|
+
capName: "keychain-admin",
|
|
46704
|
+
capScope: "system",
|
|
46705
|
+
addonId: null,
|
|
46706
|
+
access: "create"
|
|
46707
|
+
},
|
|
46708
|
+
"keychainAdmin.listAudit": {
|
|
46709
|
+
capName: "keychain-admin",
|
|
46710
|
+
capScope: "system",
|
|
46711
|
+
addonId: null,
|
|
46712
|
+
access: "view"
|
|
46713
|
+
},
|
|
46714
|
+
"keychainAdmin.listSecrets": {
|
|
46715
|
+
capName: "keychain-admin",
|
|
46716
|
+
capScope: "system",
|
|
46717
|
+
addonId: null,
|
|
46718
|
+
access: "view"
|
|
46719
|
+
},
|
|
46720
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
46721
|
+
capName: "keychain-admin",
|
|
46722
|
+
capScope: "system",
|
|
46723
|
+
addonId: null,
|
|
46724
|
+
access: "delete"
|
|
46725
|
+
},
|
|
46726
|
+
"keychainAdmin.resetKeychain": {
|
|
46727
|
+
capName: "keychain-admin",
|
|
46728
|
+
capScope: "system",
|
|
46729
|
+
addonId: null,
|
|
46730
|
+
access: "delete"
|
|
46731
|
+
},
|
|
46732
|
+
"keychainAdmin.reveal": {
|
|
46733
|
+
capName: "keychain-admin",
|
|
46734
|
+
capScope: "system",
|
|
46735
|
+
addonId: null,
|
|
46736
|
+
access: "create"
|
|
46737
|
+
},
|
|
46738
|
+
"keychainAdmin.rotateMasterKey": {
|
|
46739
|
+
capName: "keychain-admin",
|
|
46740
|
+
capScope: "system",
|
|
46741
|
+
addonId: null,
|
|
46742
|
+
access: "create"
|
|
46743
|
+
},
|
|
46744
|
+
"keychainAdmin.status": {
|
|
46745
|
+
capName: "keychain-admin",
|
|
46746
|
+
capScope: "system",
|
|
46747
|
+
addonId: null,
|
|
46748
|
+
access: "view"
|
|
46749
|
+
},
|
|
44515
46750
|
"lawnMowerControl.dock": {
|
|
44516
46751
|
capName: "lawn-mower-control",
|
|
44517
46752
|
capScope: "device",
|
|
@@ -44734,12 +46969,24 @@ Object.freeze({
|
|
|
44734
46969
|
addonId: null,
|
|
44735
46970
|
access: "view"
|
|
44736
46971
|
},
|
|
46972
|
+
"localNetwork.addCustomAddress": {
|
|
46973
|
+
capName: "local-network",
|
|
46974
|
+
capScope: "system",
|
|
46975
|
+
addonId: null,
|
|
46976
|
+
access: "create"
|
|
46977
|
+
},
|
|
44737
46978
|
"localNetwork.downloadCa": {
|
|
44738
46979
|
capName: "local-network",
|
|
44739
46980
|
capScope: "system",
|
|
44740
46981
|
addonId: null,
|
|
44741
46982
|
access: "view"
|
|
44742
46983
|
},
|
|
46984
|
+
"localNetwork.getAddresses": {
|
|
46985
|
+
capName: "local-network",
|
|
46986
|
+
capScope: "system",
|
|
46987
|
+
addonId: null,
|
|
46988
|
+
access: "view"
|
|
46989
|
+
},
|
|
44743
46990
|
"localNetwork.getAllowedAddresses": {
|
|
44744
46991
|
capName: "local-network",
|
|
44745
46992
|
capScope: "system",
|
|
@@ -44752,6 +46999,12 @@ Object.freeze({
|
|
|
44752
46999
|
addonId: null,
|
|
44753
47000
|
access: "view"
|
|
44754
47001
|
},
|
|
47002
|
+
"localNetwork.getHubAddresses": {
|
|
47003
|
+
capName: "local-network",
|
|
47004
|
+
capScope: "system",
|
|
47005
|
+
addonId: null,
|
|
47006
|
+
access: "view"
|
|
47007
|
+
},
|
|
44755
47008
|
"localNetwork.getNotificationEndpoint": {
|
|
44756
47009
|
capName: "local-network",
|
|
44757
47010
|
capScope: "system",
|
|
@@ -44788,6 +47041,12 @@ Object.freeze({
|
|
|
44788
47041
|
addonId: null,
|
|
44789
47042
|
access: "create"
|
|
44790
47043
|
},
|
|
47044
|
+
"localNetwork.removeCustomAddress": {
|
|
47045
|
+
capName: "local-network",
|
|
47046
|
+
capScope: "system",
|
|
47047
|
+
addonId: null,
|
|
47048
|
+
access: "delete"
|
|
47049
|
+
},
|
|
44791
47050
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
44792
47051
|
capName: "local-network",
|
|
44793
47052
|
capScope: "system",
|
|
@@ -44800,6 +47059,12 @@ Object.freeze({
|
|
|
44800
47059
|
addonId: null,
|
|
44801
47060
|
access: "create"
|
|
44802
47061
|
},
|
|
47062
|
+
"localNetwork.setAddressRole": {
|
|
47063
|
+
capName: "local-network",
|
|
47064
|
+
capScope: "system",
|
|
47065
|
+
addonId: null,
|
|
47066
|
+
access: "create"
|
|
47067
|
+
},
|
|
44803
47068
|
"localNetwork.setAllowedAddresses": {
|
|
44804
47069
|
capName: "local-network",
|
|
44805
47070
|
capScope: "system",
|
|
@@ -45856,6 +48121,18 @@ Object.freeze({
|
|
|
45856
48121
|
addonId: null,
|
|
45857
48122
|
access: "create"
|
|
45858
48123
|
},
|
|
48124
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
48125
|
+
capName: "pipeline-analytics",
|
|
48126
|
+
capScope: "device",
|
|
48127
|
+
addonId: null,
|
|
48128
|
+
access: "create"
|
|
48129
|
+
},
|
|
48130
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
48131
|
+
capName: "pipeline-analytics",
|
|
48132
|
+
capScope: "device",
|
|
48133
|
+
addonId: null,
|
|
48134
|
+
access: "create"
|
|
48135
|
+
},
|
|
45859
48136
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
45860
48137
|
capName: "pipeline-analytics",
|
|
45861
48138
|
capScope: "device",
|
|
@@ -45904,12 +48181,24 @@ Object.freeze({
|
|
|
45904
48181
|
addonId: null,
|
|
45905
48182
|
access: "view"
|
|
45906
48183
|
},
|
|
48184
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
48185
|
+
capName: "pipeline-analytics",
|
|
48186
|
+
capScope: "device",
|
|
48187
|
+
addonId: null,
|
|
48188
|
+
access: "create"
|
|
48189
|
+
},
|
|
45907
48190
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
45908
48191
|
capName: "pipeline-analytics",
|
|
45909
48192
|
capScope: "device",
|
|
45910
48193
|
addonId: null,
|
|
45911
48194
|
access: "delete"
|
|
45912
48195
|
},
|
|
48196
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
48197
|
+
capName: "pipeline-analytics",
|
|
48198
|
+
capScope: "device",
|
|
48199
|
+
addonId: null,
|
|
48200
|
+
access: "delete"
|
|
48201
|
+
},
|
|
45913
48202
|
"pipelineAnalytics.deleteTracks": {
|
|
45914
48203
|
capName: "pipeline-analytics",
|
|
45915
48204
|
capScope: "device",
|
|
@@ -46114,6 +48403,24 @@ Object.freeze({
|
|
|
46114
48403
|
addonId: null,
|
|
46115
48404
|
access: "view"
|
|
46116
48405
|
},
|
|
48406
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
48407
|
+
capName: "pipeline-analytics",
|
|
48408
|
+
capScope: "device",
|
|
48409
|
+
addonId: null,
|
|
48410
|
+
access: "view"
|
|
48411
|
+
},
|
|
48412
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
48413
|
+
capName: "pipeline-analytics",
|
|
48414
|
+
capScope: "device",
|
|
48415
|
+
addonId: null,
|
|
48416
|
+
access: "view"
|
|
48417
|
+
},
|
|
48418
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
48419
|
+
capName: "pipeline-analytics",
|
|
48420
|
+
capScope: "device",
|
|
48421
|
+
addonId: null,
|
|
48422
|
+
access: "view"
|
|
48423
|
+
},
|
|
46117
48424
|
"pipelineAnalytics.listRetrainFrames": {
|
|
46118
48425
|
capName: "pipeline-analytics",
|
|
46119
48426
|
capScope: "device",
|
|
@@ -46162,6 +48469,12 @@ Object.freeze({
|
|
|
46162
48469
|
addonId: null,
|
|
46163
48470
|
access: "create"
|
|
46164
48471
|
},
|
|
48472
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
48473
|
+
capName: "pipeline-analytics",
|
|
48474
|
+
capScope: "device",
|
|
48475
|
+
addonId: null,
|
|
48476
|
+
access: "create"
|
|
48477
|
+
},
|
|
46165
48478
|
"pipelineAnalytics.pruneEvents": {
|
|
46166
48479
|
capName: "pipeline-analytics",
|
|
46167
48480
|
capScope: "device",
|
|
@@ -46216,6 +48529,18 @@ Object.freeze({
|
|
|
46216
48529
|
addonId: null,
|
|
46217
48530
|
access: "create"
|
|
46218
48531
|
},
|
|
48532
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
48533
|
+
capName: "pipeline-analytics",
|
|
48534
|
+
capScope: "device",
|
|
48535
|
+
addonId: null,
|
|
48536
|
+
access: "delete"
|
|
48537
|
+
},
|
|
48538
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
48539
|
+
capName: "pipeline-analytics",
|
|
48540
|
+
capScope: "device",
|
|
48541
|
+
addonId: null,
|
|
48542
|
+
access: "create"
|
|
48543
|
+
},
|
|
46219
48544
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
46220
48545
|
capName: "pipeline-analytics",
|
|
46221
48546
|
capScope: "device",
|
|
@@ -46246,6 +48571,12 @@ Object.freeze({
|
|
|
46246
48571
|
addonId: null,
|
|
46247
48572
|
access: "create"
|
|
46248
48573
|
},
|
|
48574
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
48575
|
+
capName: "pipeline-analytics",
|
|
48576
|
+
capScope: "device",
|
|
48577
|
+
addonId: null,
|
|
48578
|
+
access: "create"
|
|
48579
|
+
},
|
|
46249
48580
|
"pipelineAnalytics.setTrackFlags": {
|
|
46250
48581
|
capName: "pipeline-analytics",
|
|
46251
48582
|
capScope: "device",
|
|
@@ -46282,6 +48613,12 @@ Object.freeze({
|
|
|
46282
48613
|
addonId: null,
|
|
46283
48614
|
access: "delete"
|
|
46284
48615
|
},
|
|
48616
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
48617
|
+
capName: "pipeline-analytics",
|
|
48618
|
+
capScope: "device",
|
|
48619
|
+
addonId: null,
|
|
48620
|
+
access: "create"
|
|
48621
|
+
},
|
|
46285
48622
|
"pipelineExecutor.cacheFrameInPool": {
|
|
46286
48623
|
capName: "pipeline-executor",
|
|
46287
48624
|
capScope: "system",
|
|
@@ -46294,13 +48631,13 @@ Object.freeze({
|
|
|
46294
48631
|
addonId: null,
|
|
46295
48632
|
access: "delete"
|
|
46296
48633
|
},
|
|
46297
|
-
"pipelineExecutor.
|
|
48634
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
46298
48635
|
capName: "pipeline-executor",
|
|
46299
48636
|
capScope: "system",
|
|
46300
48637
|
addonId: null,
|
|
46301
48638
|
access: "delete"
|
|
46302
48639
|
},
|
|
46303
|
-
"pipelineExecutor.
|
|
48640
|
+
"pipelineExecutor.deleteModel": {
|
|
46304
48641
|
capName: "pipeline-executor",
|
|
46305
48642
|
capScope: "system",
|
|
46306
48643
|
addonId: null,
|
|
@@ -46444,12 +48781,6 @@ Object.freeze({
|
|
|
46444
48781
|
addonId: null,
|
|
46445
48782
|
access: "view"
|
|
46446
48783
|
},
|
|
46447
|
-
"pipelineExecutor.listTemplates": {
|
|
46448
|
-
capName: "pipeline-executor",
|
|
46449
|
-
capScope: "system",
|
|
46450
|
-
addonId: null,
|
|
46451
|
-
access: "view"
|
|
46452
|
-
},
|
|
46453
48784
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
46454
48785
|
capName: "pipeline-executor",
|
|
46455
48786
|
capScope: "system",
|
|
@@ -46474,12 +48805,6 @@ Object.freeze({
|
|
|
46474
48805
|
addonId: null,
|
|
46475
48806
|
access: "create"
|
|
46476
48807
|
},
|
|
46477
|
-
"pipelineExecutor.saveTemplate": {
|
|
46478
|
-
capName: "pipeline-executor",
|
|
46479
|
-
capScope: "system",
|
|
46480
|
-
addonId: null,
|
|
46481
|
-
access: "create"
|
|
46482
|
-
},
|
|
46483
48808
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
46484
48809
|
capName: "pipeline-executor",
|
|
46485
48810
|
capScope: "system",
|
|
@@ -46498,17 +48823,23 @@ Object.freeze({
|
|
|
46498
48823
|
addonId: null,
|
|
46499
48824
|
access: "create"
|
|
46500
48825
|
},
|
|
46501
|
-
"pipelineExecutor.
|
|
48826
|
+
"pipelineExecutor.validatePipeline": {
|
|
46502
48827
|
capName: "pipeline-executor",
|
|
46503
48828
|
capScope: "system",
|
|
46504
48829
|
addonId: null,
|
|
48830
|
+
access: "view"
|
|
48831
|
+
},
|
|
48832
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
48833
|
+
capName: "pipeline-orchestrator",
|
|
48834
|
+
capScope: "system",
|
|
48835
|
+
addonId: null,
|
|
46505
48836
|
access: "create"
|
|
46506
48837
|
},
|
|
46507
|
-
"
|
|
46508
|
-
capName: "pipeline-
|
|
48838
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
48839
|
+
capName: "pipeline-orchestrator",
|
|
46509
48840
|
capScope: "system",
|
|
46510
48841
|
addonId: null,
|
|
46511
|
-
access: "
|
|
48842
|
+
access: "create"
|
|
46512
48843
|
},
|
|
46513
48844
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
46514
48845
|
capName: "pipeline-orchestrator",
|
|
@@ -46528,7 +48859,7 @@ Object.freeze({
|
|
|
46528
48859
|
addonId: null,
|
|
46529
48860
|
access: "create"
|
|
46530
48861
|
},
|
|
46531
|
-
"pipelineOrchestrator.
|
|
48862
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
46532
48863
|
capName: "pipeline-orchestrator",
|
|
46533
48864
|
capScope: "system",
|
|
46534
48865
|
addonId: null,
|
|
@@ -46624,6 +48955,12 @@ Object.freeze({
|
|
|
46624
48955
|
addonId: null,
|
|
46625
48956
|
access: "view"
|
|
46626
48957
|
},
|
|
48958
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
48959
|
+
capName: "pipeline-orchestrator",
|
|
48960
|
+
capScope: "system",
|
|
48961
|
+
addonId: null,
|
|
48962
|
+
access: "view"
|
|
48963
|
+
},
|
|
46627
48964
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
46628
48965
|
capName: "pipeline-orchestrator",
|
|
46629
48966
|
capScope: "system",
|
|
@@ -46636,6 +48973,24 @@ Object.freeze({
|
|
|
46636
48973
|
addonId: null,
|
|
46637
48974
|
access: "view"
|
|
46638
48975
|
},
|
|
48976
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
48977
|
+
capName: "pipeline-orchestrator",
|
|
48978
|
+
capScope: "system",
|
|
48979
|
+
addonId: null,
|
|
48980
|
+
access: "view"
|
|
48981
|
+
},
|
|
48982
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
48983
|
+
capName: "pipeline-orchestrator",
|
|
48984
|
+
capScope: "system",
|
|
48985
|
+
addonId: null,
|
|
48986
|
+
access: "view"
|
|
48987
|
+
},
|
|
48988
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
48989
|
+
capName: "pipeline-orchestrator",
|
|
48990
|
+
capScope: "system",
|
|
48991
|
+
addonId: null,
|
|
48992
|
+
access: "view"
|
|
48993
|
+
},
|
|
46639
48994
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
46640
48995
|
capName: "pipeline-orchestrator",
|
|
46641
48996
|
capScope: "system",
|
|
@@ -46660,6 +49015,12 @@ Object.freeze({
|
|
|
46660
49015
|
addonId: null,
|
|
46661
49016
|
access: "view"
|
|
46662
49017
|
},
|
|
49018
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
49019
|
+
capName: "pipeline-orchestrator",
|
|
49020
|
+
capScope: "system",
|
|
49021
|
+
addonId: null,
|
|
49022
|
+
access: "view"
|
|
49023
|
+
},
|
|
46663
49024
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
46664
49025
|
capName: "pipeline-orchestrator",
|
|
46665
49026
|
capScope: "system",
|
|
@@ -46672,7 +49033,7 @@ Object.freeze({
|
|
|
46672
49033
|
addonId: null,
|
|
46673
49034
|
access: "view"
|
|
46674
49035
|
},
|
|
46675
|
-
"pipelineOrchestrator.
|
|
49036
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
46676
49037
|
capName: "pipeline-orchestrator",
|
|
46677
49038
|
capScope: "system",
|
|
46678
49039
|
addonId: null,
|
|
@@ -46684,6 +49045,12 @@ Object.freeze({
|
|
|
46684
49045
|
addonId: null,
|
|
46685
49046
|
access: "create"
|
|
46686
49047
|
},
|
|
49048
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
49049
|
+
capName: "pipeline-orchestrator",
|
|
49050
|
+
capScope: "system",
|
|
49051
|
+
addonId: null,
|
|
49052
|
+
access: "view"
|
|
49053
|
+
},
|
|
46687
49054
|
"pipelineOrchestrator.rebalance": {
|
|
46688
49055
|
capName: "pipeline-orchestrator",
|
|
46689
49056
|
capScope: "system",
|
|
@@ -46726,12 +49093,6 @@ Object.freeze({
|
|
|
46726
49093
|
addonId: null,
|
|
46727
49094
|
access: "create"
|
|
46728
49095
|
},
|
|
46729
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
46730
|
-
capName: "pipeline-orchestrator",
|
|
46731
|
-
capScope: "system",
|
|
46732
|
-
addonId: null,
|
|
46733
|
-
access: "create"
|
|
46734
|
-
},
|
|
46735
49096
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
46736
49097
|
capName: "pipeline-orchestrator",
|
|
46737
49098
|
capScope: "system",
|
|
@@ -46744,12 +49105,6 @@ Object.freeze({
|
|
|
46744
49105
|
addonId: null,
|
|
46745
49106
|
access: "create"
|
|
46746
49107
|
},
|
|
46747
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
46748
|
-
capName: "pipeline-orchestrator",
|
|
46749
|
-
capScope: "system",
|
|
46750
|
-
addonId: null,
|
|
46751
|
-
access: "create"
|
|
46752
|
-
},
|
|
46753
49108
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
46754
49109
|
capName: "pipeline-orchestrator",
|
|
46755
49110
|
capScope: "system",
|
|
@@ -46786,6 +49141,12 @@ Object.freeze({
|
|
|
46786
49141
|
addonId: null,
|
|
46787
49142
|
access: "create"
|
|
46788
49143
|
},
|
|
49144
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
49145
|
+
capName: "pipeline-orchestrator",
|
|
49146
|
+
capScope: "system",
|
|
49147
|
+
addonId: null,
|
|
49148
|
+
access: "create"
|
|
49149
|
+
},
|
|
46789
49150
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
46790
49151
|
capName: "pipeline-orchestrator",
|
|
46791
49152
|
capScope: "system",
|
|
@@ -46804,12 +49165,36 @@ Object.freeze({
|
|
|
46804
49165
|
addonId: null,
|
|
46805
49166
|
access: "create"
|
|
46806
49167
|
},
|
|
49168
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
49169
|
+
capName: "pipeline-orchestrator",
|
|
49170
|
+
capScope: "system",
|
|
49171
|
+
addonId: null,
|
|
49172
|
+
access: "create"
|
|
49173
|
+
},
|
|
46807
49174
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
46808
49175
|
capName: "pipeline-orchestrator",
|
|
46809
49176
|
capScope: "system",
|
|
46810
49177
|
addonId: null,
|
|
46811
49178
|
access: "create"
|
|
46812
49179
|
},
|
|
49180
|
+
"pipelineOrchestrator.setShareSource": {
|
|
49181
|
+
capName: "pipeline-orchestrator",
|
|
49182
|
+
capScope: "system",
|
|
49183
|
+
addonId: null,
|
|
49184
|
+
access: "create"
|
|
49185
|
+
},
|
|
49186
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
49187
|
+
capName: "pipeline-orchestrator",
|
|
49188
|
+
capScope: "system",
|
|
49189
|
+
addonId: null,
|
|
49190
|
+
access: "create"
|
|
49191
|
+
},
|
|
49192
|
+
"pipelineOrchestrator.suggestShares": {
|
|
49193
|
+
capName: "pipeline-orchestrator",
|
|
49194
|
+
capScope: "system",
|
|
49195
|
+
addonId: null,
|
|
49196
|
+
access: "view"
|
|
49197
|
+
},
|
|
46813
49198
|
"pipelineOrchestrator.unassignAudio": {
|
|
46814
49199
|
capName: "pipeline-orchestrator",
|
|
46815
49200
|
capScope: "system",
|
|
@@ -46822,8 +49207,8 @@ Object.freeze({
|
|
|
46822
49207
|
addonId: null,
|
|
46823
49208
|
access: "create"
|
|
46824
49209
|
},
|
|
46825
|
-
"
|
|
46826
|
-
capName: "pipeline-
|
|
49210
|
+
"pipelineRunner.abortNodeBench": {
|
|
49211
|
+
capName: "pipeline-runner",
|
|
46827
49212
|
capScope: "system",
|
|
46828
49213
|
addonId: null,
|
|
46829
49214
|
access: "create"
|
|
@@ -46876,6 +49261,12 @@ Object.freeze({
|
|
|
46876
49261
|
addonId: null,
|
|
46877
49262
|
access: "view"
|
|
46878
49263
|
},
|
|
49264
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
49265
|
+
capName: "pipeline-runner",
|
|
49266
|
+
capScope: "system",
|
|
49267
|
+
addonId: null,
|
|
49268
|
+
access: "view"
|
|
49269
|
+
},
|
|
46879
49270
|
"pipelineRunner.getParkedTrackFrame": {
|
|
46880
49271
|
capName: "pipeline-runner",
|
|
46881
49272
|
capScope: "system",
|
|
@@ -46918,6 +49309,12 @@ Object.freeze({
|
|
|
46918
49309
|
addonId: null,
|
|
46919
49310
|
access: "create"
|
|
46920
49311
|
},
|
|
49312
|
+
"pipelineRunner.startNodeBench": {
|
|
49313
|
+
capName: "pipeline-runner",
|
|
49314
|
+
capScope: "system",
|
|
49315
|
+
addonId: null,
|
|
49316
|
+
access: "create"
|
|
49317
|
+
},
|
|
46921
49318
|
"plateGallery.assignPlate": {
|
|
46922
49319
|
capName: "plate-gallery",
|
|
46923
49320
|
capScope: "system",
|
|
@@ -48262,12 +50659,6 @@ Object.freeze({
|
|
|
48262
50659
|
addonId: null,
|
|
48263
50660
|
access: "view"
|
|
48264
50661
|
},
|
|
48265
|
-
"streamBroker.pullFrameHandles": {
|
|
48266
|
-
capName: "stream-broker",
|
|
48267
|
-
capScope: "system",
|
|
48268
|
-
addonId: null,
|
|
48269
|
-
access: "view"
|
|
48270
|
-
},
|
|
48271
50662
|
"streamBroker.regenerateRtspToken": {
|
|
48272
50663
|
capName: "stream-broker",
|
|
48273
50664
|
capScope: "system",
|
|
@@ -48334,12 +50725,6 @@ Object.freeze({
|
|
|
48334
50725
|
addonId: null,
|
|
48335
50726
|
access: "create"
|
|
48336
50727
|
},
|
|
48337
|
-
"streamBroker.subscribeFrames": {
|
|
48338
|
-
capName: "stream-broker",
|
|
48339
|
-
capScope: "system",
|
|
48340
|
-
addonId: null,
|
|
48341
|
-
access: "create"
|
|
48342
|
-
},
|
|
48343
50728
|
"streamBroker.unassignProfile": {
|
|
48344
50729
|
capName: "stream-broker",
|
|
48345
50730
|
capScope: "system",
|
|
@@ -48352,12 +50737,6 @@ Object.freeze({
|
|
|
48352
50737
|
addonId: null,
|
|
48353
50738
|
access: "create"
|
|
48354
50739
|
},
|
|
48355
|
-
"streamBroker.unsubscribeFrames": {
|
|
48356
|
-
capName: "stream-broker",
|
|
48357
|
-
capScope: "system",
|
|
48358
|
-
addonId: null,
|
|
48359
|
-
access: "create"
|
|
48360
|
-
},
|
|
48361
50740
|
"streamCatalog.getCatalog": {
|
|
48362
50741
|
capName: "stream-catalog",
|
|
48363
50742
|
capScope: "device",
|
|
@@ -48652,18 +51031,36 @@ Object.freeze({
|
|
|
48652
51031
|
addonId: null,
|
|
48653
51032
|
access: "delete"
|
|
48654
51033
|
},
|
|
51034
|
+
"userManagement.findUserByExternalIdentity": {
|
|
51035
|
+
capName: "user-management",
|
|
51036
|
+
capScope: "system",
|
|
51037
|
+
addonId: null,
|
|
51038
|
+
access: "view"
|
|
51039
|
+
},
|
|
48655
51040
|
"userManagement.getTotpStatus": {
|
|
48656
51041
|
capName: "user-management",
|
|
48657
51042
|
capScope: "system",
|
|
48658
51043
|
addonId: null,
|
|
48659
51044
|
access: "view"
|
|
48660
51045
|
},
|
|
51046
|
+
"userManagement.linkExternalIdentity": {
|
|
51047
|
+
capName: "user-management",
|
|
51048
|
+
capScope: "system",
|
|
51049
|
+
addonId: null,
|
|
51050
|
+
access: "create"
|
|
51051
|
+
},
|
|
48661
51052
|
"userManagement.listApiKeys": {
|
|
48662
51053
|
capName: "user-management",
|
|
48663
51054
|
capScope: "system",
|
|
48664
51055
|
addonId: null,
|
|
48665
51056
|
access: "view"
|
|
48666
51057
|
},
|
|
51058
|
+
"userManagement.listExternalIdentities": {
|
|
51059
|
+
capName: "user-management",
|
|
51060
|
+
capScope: "system",
|
|
51061
|
+
addonId: null,
|
|
51062
|
+
access: "view"
|
|
51063
|
+
},
|
|
48667
51064
|
"userManagement.listOauthSessions": {
|
|
48668
51065
|
capName: "user-management",
|
|
48669
51066
|
capScope: "system",
|
|
@@ -48742,6 +51139,12 @@ Object.freeze({
|
|
|
48742
51139
|
addonId: null,
|
|
48743
51140
|
access: "create"
|
|
48744
51141
|
},
|
|
51142
|
+
"userManagement.unlinkExternalIdentity": {
|
|
51143
|
+
capName: "user-management",
|
|
51144
|
+
capScope: "system",
|
|
51145
|
+
addonId: null,
|
|
51146
|
+
access: "delete"
|
|
51147
|
+
},
|
|
48745
51148
|
"userManagement.updateUser": {
|
|
48746
51149
|
capName: "user-management",
|
|
48747
51150
|
capScope: "system",
|
|
@@ -49054,6 +51457,12 @@ Object.freeze({
|
|
|
49054
51457
|
addonId: null,
|
|
49055
51458
|
access: "create"
|
|
49056
51459
|
},
|
|
51460
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
51461
|
+
capName: "webrtc-session",
|
|
51462
|
+
capScope: "device",
|
|
51463
|
+
addonId: null,
|
|
51464
|
+
access: "create"
|
|
51465
|
+
},
|
|
49057
51466
|
"webrtcSession.closeSession": {
|
|
49058
51467
|
capName: "webrtc-session",
|
|
49059
51468
|
capScope: "device",
|
|
@@ -51071,11 +53480,6 @@ Object.freeze({
|
|
|
51071
53480
|
form: "single",
|
|
51072
53481
|
optional: false
|
|
51073
53482
|
}],
|
|
51074
|
-
"decoder.createSession": [{
|
|
51075
|
-
name: "deviceId",
|
|
51076
|
-
form: "single",
|
|
51077
|
-
optional: true
|
|
51078
|
-
}],
|
|
51079
53483
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
51080
53484
|
name: "deviceId",
|
|
51081
53485
|
form: "single",
|
|
@@ -52046,6 +54450,11 @@ Object.freeze({
|
|
|
52046
54450
|
form: "single",
|
|
52047
54451
|
optional: false
|
|
52048
54452
|
}],
|
|
54453
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
54454
|
+
name: "deviceId",
|
|
54455
|
+
form: "single",
|
|
54456
|
+
optional: false
|
|
54457
|
+
}],
|
|
52049
54458
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
52050
54459
|
name: "deviceId",
|
|
52051
54460
|
form: "single",
|
|
@@ -52236,6 +54645,11 @@ Object.freeze({
|
|
|
52236
54645
|
form: "single",
|
|
52237
54646
|
optional: false
|
|
52238
54647
|
}],
|
|
54648
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
54649
|
+
name: "deviceId",
|
|
54650
|
+
form: "single",
|
|
54651
|
+
optional: false
|
|
54652
|
+
}],
|
|
52239
54653
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
52240
54654
|
name: "deviceId",
|
|
52241
54655
|
form: "single",
|
|
@@ -52286,6 +54700,11 @@ Object.freeze({
|
|
|
52286
54700
|
form: "single",
|
|
52287
54701
|
optional: false
|
|
52288
54702
|
}],
|
|
54703
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
54704
|
+
name: "deviceId",
|
|
54705
|
+
form: "single",
|
|
54706
|
+
optional: false
|
|
54707
|
+
}],
|
|
52289
54708
|
"pipelineAnalytics.setTrackFlags": [{
|
|
52290
54709
|
name: "deviceId",
|
|
52291
54710
|
form: "single",
|
|
@@ -52306,6 +54725,11 @@ Object.freeze({
|
|
|
52306
54725
|
form: "single",
|
|
52307
54726
|
optional: false
|
|
52308
54727
|
}],
|
|
54728
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
54729
|
+
name: "deviceIds",
|
|
54730
|
+
form: "array",
|
|
54731
|
+
optional: true
|
|
54732
|
+
}],
|
|
52309
54733
|
"pipelineExecutor.runPipeline": [{
|
|
52310
54734
|
name: "deviceId",
|
|
52311
54735
|
form: "single",
|
|
@@ -52411,6 +54835,11 @@ Object.freeze({
|
|
|
52411
54835
|
form: "single",
|
|
52412
54836
|
optional: false
|
|
52413
54837
|
}],
|
|
54838
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
54839
|
+
name: "deviceId",
|
|
54840
|
+
form: "single",
|
|
54841
|
+
optional: false
|
|
54842
|
+
}],
|
|
52414
54843
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
52415
54844
|
name: "deviceId",
|
|
52416
54845
|
form: "single",
|
|
@@ -53182,6 +55611,11 @@ Object.freeze({
|
|
|
53182
55611
|
form: "single",
|
|
53183
55612
|
optional: false
|
|
53184
55613
|
}],
|
|
55614
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
55615
|
+
name: "deviceId",
|
|
55616
|
+
form: "single",
|
|
55617
|
+
optional: false
|
|
55618
|
+
}],
|
|
53185
55619
|
"webrtcSession.closeSession": [{
|
|
53186
55620
|
name: "deviceId",
|
|
53187
55621
|
form: "single",
|
|
@@ -53715,7 +56149,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
53715
56149
|
{
|
|
53716
56150
|
name: "summarySection",
|
|
53717
56151
|
label: "Summary: this section",
|
|
53718
|
-
description: "The section a per-section summary row is about
|
|
56152
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
53719
56153
|
example: "Batterie scariche",
|
|
53720
56154
|
group: "system",
|
|
53721
56155
|
families: ["rule"],
|
|
@@ -56313,7 +58747,7 @@ var amcrestCameraSchema = object({
|
|
|
56313
58747
|
port: number().int().min(1).max(65535).default(80).describe("HTTP CGI port"),
|
|
56314
58748
|
https: boolean().default(false).describe("Use HTTPS for CGI"),
|
|
56315
58749
|
username: string().default("admin").describe("Username"),
|
|
56316
|
-
password: string().default("").describe("Password"),
|
|
58750
|
+
password: string().default("").describe("Password").meta({ secret: true }),
|
|
56317
58751
|
channel: number().int().min(1).default(1).describe("Camera channel (1-based)"),
|
|
56318
58752
|
deviceCache: amcrestDeviceCacheSchema.optional()
|
|
56319
58753
|
});
|
|
@@ -59485,7 +61919,7 @@ function writeJpeg(res, bytes, headOnly) {
|
|
|
59485
61919
|
* Node-only (`node:child_process`), so it lives under `@camstack/types/node`.
|
|
59486
61920
|
*/
|
|
59487
61921
|
/** The detail a site refusing for want of a binary puts in its refusal. */
|
|
59488
|
-
var NO_PINNED_FFMPEG_DETAIL = "no pinned ffmpeg on this node
|
|
61922
|
+
var NO_PINNED_FFMPEG_DETAIL = "no pinned ffmpeg on this node";
|
|
59489
61923
|
/**
|
|
59490
61924
|
* {@link pinnedFfmpegSpawner}, asked at the point of use through the node's
|
|
59491
61925
|
* resolver (`memoizePinnedFfmpeg`). A site that keeps the RESOLVER rather than
|