@camstack/addon-terminal 0.1.126 → 0.1.128
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/assets/icon.svg +1 -1
- package/dist/addon.js +3118 -504
- package/dist/addon.mjs +3118 -504
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createServer } from "node:http";
|
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -87,6 +87,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
87
87
|
*/
|
|
88
88
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
89
89
|
/**
|
|
90
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
91
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
92
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
93
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
94
|
+
*/
|
|
95
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
96
|
+
/**
|
|
90
97
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
91
98
|
* transitions from `failed` back to `healthy` (typically via the
|
|
92
99
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -509,15 +516,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
509
516
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
510
517
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
511
518
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
512
|
-
/**
|
|
513
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
514
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
515
|
-
* `createSession`, so running sessions keep their current backend until
|
|
516
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
517
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
518
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
519
|
-
*/
|
|
520
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
521
519
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
522
520
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
523
521
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5388,7 +5386,7 @@ var ZodIssueCode = {
|
|
|
5388
5386
|
var ZodFirstPartyTypeKind;
|
|
5389
5387
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5390
5388
|
//#endregion
|
|
5391
|
-
//#region ../types/dist/sleep-
|
|
5389
|
+
//#region ../types/dist/sleep-DujUvOcb.mjs
|
|
5392
5390
|
/**
|
|
5393
5391
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5394
5392
|
* window to float samples (D455).
|
|
@@ -5467,6 +5465,97 @@ function buildAlawTable() {
|
|
|
5467
5465
|
}
|
|
5468
5466
|
buildUlawTable();
|
|
5469
5467
|
buildAlawTable();
|
|
5468
|
+
/** Is this field's stored value a credential? */
|
|
5469
|
+
function isSecretConfigField(field) {
|
|
5470
|
+
if (field.type === "password") return true;
|
|
5471
|
+
return "secret" in field && field.secret === true;
|
|
5472
|
+
}
|
|
5473
|
+
/**
|
|
5474
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5475
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5476
|
+
*/
|
|
5477
|
+
function isKeychainStoredField(field) {
|
|
5478
|
+
if (!isSecretConfigField(field)) return false;
|
|
5479
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5480
|
+
return !("storage" in field && field.storage === "inline");
|
|
5481
|
+
}
|
|
5482
|
+
/**
|
|
5483
|
+
* What a settings blob holds where a secret used to be.
|
|
5484
|
+
*
|
|
5485
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5486
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5487
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5488
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5489
|
+
*
|
|
5490
|
+
* The same shapes travel to and from the admin UI:
|
|
5491
|
+
*
|
|
5492
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5493
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5494
|
+
* value is set, never the value.
|
|
5495
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5496
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5497
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5498
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5499
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5500
|
+
*
|
|
5501
|
+
* Pure and browser-safe.
|
|
5502
|
+
*/
|
|
5503
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5504
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5505
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5506
|
+
function isRecord$1(value) {
|
|
5507
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5508
|
+
}
|
|
5509
|
+
function makeSecretMarker(ref) {
|
|
5510
|
+
return {
|
|
5511
|
+
$secret: ref,
|
|
5512
|
+
v: 1
|
|
5513
|
+
};
|
|
5514
|
+
}
|
|
5515
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5516
|
+
function isSecretMarker(value) {
|
|
5517
|
+
if (!isRecord$1(value)) return false;
|
|
5518
|
+
const ref = value["$secret"];
|
|
5519
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5520
|
+
}
|
|
5521
|
+
function isSecretClear(value) {
|
|
5522
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5523
|
+
}
|
|
5524
|
+
/**
|
|
5525
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5526
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5527
|
+
* survives this function.
|
|
5528
|
+
*/
|
|
5529
|
+
function toSecretFieldView(stored) {
|
|
5530
|
+
if (isSecretMarker(stored)) return {
|
|
5531
|
+
$secret: stored.$secret,
|
|
5532
|
+
v: 1,
|
|
5533
|
+
set: true
|
|
5534
|
+
};
|
|
5535
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5536
|
+
$secret: null,
|
|
5537
|
+
v: 1,
|
|
5538
|
+
set: true,
|
|
5539
|
+
inline: true
|
|
5540
|
+
};
|
|
5541
|
+
return null;
|
|
5542
|
+
}
|
|
5543
|
+
/**
|
|
5544
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5545
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5546
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5547
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5548
|
+
*/
|
|
5549
|
+
function classifySecretWrite(incoming) {
|
|
5550
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5551
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5552
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5553
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5554
|
+
return {
|
|
5555
|
+
kind: "set",
|
|
5556
|
+
value: incoming
|
|
5557
|
+
};
|
|
5558
|
+
}
|
|
5470
5559
|
Object.fromEntries([
|
|
5471
5560
|
{
|
|
5472
5561
|
id: "overview",
|
|
@@ -5638,33 +5727,19 @@ Object.fromEntries([
|
|
|
5638
5727
|
function isValuelessField(field) {
|
|
5639
5728
|
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";
|
|
5640
5729
|
}
|
|
5641
|
-
|
|
5642
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5643
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5644
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5645
|
-
*
|
|
5646
|
-
* For each leaf field:
|
|
5647
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5648
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5649
|
-
*
|
|
5650
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5651
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5652
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5653
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5654
|
-
*/
|
|
5655
|
-
function hydrateSchema(schema, values) {
|
|
5730
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5656
5731
|
return {
|
|
5657
5732
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5658
5733
|
sections: schema.sections.map((section) => ({
|
|
5659
5734
|
...section,
|
|
5660
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5735
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5661
5736
|
}))
|
|
5662
5737
|
};
|
|
5663
5738
|
}
|
|
5664
|
-
function hydrateField(field, values) {
|
|
5739
|
+
function hydrateField(field, values, options) {
|
|
5665
5740
|
if (isValuelessField(field)) return field;
|
|
5666
5741
|
if (field.type === "group") {
|
|
5667
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5742
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5668
5743
|
return {
|
|
5669
5744
|
...field,
|
|
5670
5745
|
fields: hydratedChildren
|
|
@@ -5673,7 +5748,7 @@ function hydrateField(field, values) {
|
|
|
5673
5748
|
if (field.type === "sub-tabs") {
|
|
5674
5749
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5675
5750
|
...tab,
|
|
5676
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5751
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5677
5752
|
}));
|
|
5678
5753
|
return {
|
|
5679
5754
|
...field,
|
|
@@ -5683,6 +5758,33 @@ function hydrateField(field, values) {
|
|
|
5683
5758
|
const key = field.key;
|
|
5684
5759
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5685
5760
|
const defaultValue = field.default;
|
|
5761
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5762
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5763
|
+
...field,
|
|
5764
|
+
value: toSecretFieldView(storedValue)
|
|
5765
|
+
};
|
|
5766
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5767
|
+
...field,
|
|
5768
|
+
value: null
|
|
5769
|
+
};
|
|
5770
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5771
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5772
|
+
if (secretItemKeys.length > 0) {
|
|
5773
|
+
const rows = storedValue.map((row) => {
|
|
5774
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5775
|
+
const out = { ...row };
|
|
5776
|
+
for (const k of secretItemKeys) {
|
|
5777
|
+
const v = Reflect.get(row, k);
|
|
5778
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5779
|
+
}
|
|
5780
|
+
return out;
|
|
5781
|
+
});
|
|
5782
|
+
return {
|
|
5783
|
+
...field,
|
|
5784
|
+
value: rows
|
|
5785
|
+
};
|
|
5786
|
+
}
|
|
5787
|
+
}
|
|
5686
5788
|
if (field.multiple) {
|
|
5687
5789
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5688
5790
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5925,6 +6027,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5925
6027
|
}
|
|
5926
6028
|
return out;
|
|
5927
6029
|
}
|
|
6030
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6031
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6032
|
+
function globalSecretScope() {
|
|
6033
|
+
return GLOBAL_SCOPE;
|
|
6034
|
+
}
|
|
6035
|
+
function encodeSegment(value) {
|
|
6036
|
+
return encodeURIComponent(value);
|
|
6037
|
+
}
|
|
6038
|
+
/**
|
|
6039
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6040
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6041
|
+
* `providers[authentik].clientSecret`.
|
|
6042
|
+
*/
|
|
6043
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6044
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6045
|
+
}
|
|
6046
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6047
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6048
|
+
fieldPath;
|
|
6049
|
+
constructor(fieldPath, cause) {
|
|
6050
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6051
|
+
this.fieldPath = fieldPath;
|
|
6052
|
+
this.name = "KeychainWriteRefusedError";
|
|
6053
|
+
}
|
|
6054
|
+
};
|
|
6055
|
+
var KEEP = { kind: "keep" };
|
|
6056
|
+
function isRecord(value) {
|
|
6057
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6058
|
+
}
|
|
6059
|
+
function defaultMintId() {
|
|
6060
|
+
return globalThis.crypto.randomUUID();
|
|
6061
|
+
}
|
|
6062
|
+
/** Every marker ref anywhere under `value`. */
|
|
6063
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6064
|
+
if (isSecretMarker(value)) {
|
|
6065
|
+
out.push(value.$secret);
|
|
6066
|
+
return out;
|
|
6067
|
+
}
|
|
6068
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6069
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6070
|
+
return out;
|
|
6071
|
+
}
|
|
6072
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6073
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6074
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6075
|
+
}
|
|
6076
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6077
|
+
const intent = classifySecretWrite(incoming);
|
|
6078
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6079
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6080
|
+
if (intent.kind === "keep") return KEEP;
|
|
6081
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6082
|
+
if (intent.kind === "clear") {
|
|
6083
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6084
|
+
return {
|
|
6085
|
+
kind: "value",
|
|
6086
|
+
value: null
|
|
6087
|
+
};
|
|
6088
|
+
}
|
|
6089
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6090
|
+
kind: "value",
|
|
6091
|
+
value: stored
|
|
6092
|
+
};
|
|
6093
|
+
try {
|
|
6094
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6095
|
+
} catch (err) {
|
|
6096
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6097
|
+
}
|
|
6098
|
+
return {
|
|
6099
|
+
kind: "value",
|
|
6100
|
+
value: makeSecretMarker(ref)
|
|
6101
|
+
};
|
|
6102
|
+
}
|
|
6103
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6104
|
+
function applyMember(out, key, result, storedParent) {
|
|
6105
|
+
if (result.kind === "value") {
|
|
6106
|
+
out[key] = result.value;
|
|
6107
|
+
return;
|
|
6108
|
+
}
|
|
6109
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6110
|
+
else delete out[key];
|
|
6111
|
+
}
|
|
6112
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6113
|
+
const out = { ...incoming };
|
|
6114
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6115
|
+
return out;
|
|
6116
|
+
}
|
|
6117
|
+
function rowId(row, idKey) {
|
|
6118
|
+
const raw = row[idKey];
|
|
6119
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6120
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6121
|
+
return null;
|
|
6122
|
+
}
|
|
6123
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6124
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6125
|
+
if (!Array.isArray(incoming)) {
|
|
6126
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6127
|
+
return {
|
|
6128
|
+
kind: "value",
|
|
6129
|
+
value: incoming
|
|
6130
|
+
};
|
|
6131
|
+
}
|
|
6132
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6133
|
+
for (const row of storedRows) {
|
|
6134
|
+
const id = rowId(row, node.idKey);
|
|
6135
|
+
if (id !== null) storedById.set(id, row);
|
|
6136
|
+
}
|
|
6137
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6138
|
+
const rows = [];
|
|
6139
|
+
for (const row of incoming) {
|
|
6140
|
+
if (!isRecord(row)) {
|
|
6141
|
+
rows.push(row);
|
|
6142
|
+
continue;
|
|
6143
|
+
}
|
|
6144
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6145
|
+
kept.add(id);
|
|
6146
|
+
const withId = {
|
|
6147
|
+
...row,
|
|
6148
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6149
|
+
};
|
|
6150
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6151
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6152
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6153
|
+
}
|
|
6154
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6155
|
+
return {
|
|
6156
|
+
kind: "value",
|
|
6157
|
+
value: rows
|
|
6158
|
+
};
|
|
6159
|
+
}
|
|
6160
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6161
|
+
switch (node.kind) {
|
|
6162
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6163
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6164
|
+
case "object": {
|
|
6165
|
+
if (!isRecord(incoming)) {
|
|
6166
|
+
if (incoming === void 0) return KEEP;
|
|
6167
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6168
|
+
return {
|
|
6169
|
+
kind: "value",
|
|
6170
|
+
value: incoming
|
|
6171
|
+
};
|
|
6172
|
+
}
|
|
6173
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6174
|
+
return {
|
|
6175
|
+
kind: "value",
|
|
6176
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6177
|
+
};
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
}
|
|
6181
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6182
|
+
function splitNodeKey(key) {
|
|
6183
|
+
const at = key.indexOf("@");
|
|
6184
|
+
return at <= 0 ? {
|
|
6185
|
+
base: key,
|
|
6186
|
+
nodeId: null
|
|
6187
|
+
} : {
|
|
6188
|
+
base: key.slice(0, at),
|
|
6189
|
+
nodeId: key.slice(at + 1)
|
|
6190
|
+
};
|
|
6191
|
+
}
|
|
6192
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6193
|
+
async function transformSecretWrite(input) {
|
|
6194
|
+
const deletes = [];
|
|
6195
|
+
const base = {
|
|
6196
|
+
secrets: input.secrets,
|
|
6197
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6198
|
+
deletes,
|
|
6199
|
+
operatorWrite: input.operatorWrite === true
|
|
6200
|
+
};
|
|
6201
|
+
const out = {};
|
|
6202
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6203
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6204
|
+
const node = input.tree.get(baseKey);
|
|
6205
|
+
if (node === void 0) {
|
|
6206
|
+
out[key] = incoming;
|
|
6207
|
+
continue;
|
|
6208
|
+
}
|
|
6209
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6210
|
+
kind: "node",
|
|
6211
|
+
nodeId
|
|
6212
|
+
} : input.scope ?? globalSecretScope();
|
|
6213
|
+
const result = await writeNode({
|
|
6214
|
+
...base,
|
|
6215
|
+
scope
|
|
6216
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6217
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6218
|
+
}
|
|
6219
|
+
return {
|
|
6220
|
+
patch: out,
|
|
6221
|
+
afterWrite: async () => {
|
|
6222
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6223
|
+
try {
|
|
6224
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6225
|
+
return { orphaned: [] };
|
|
6226
|
+
} catch {
|
|
6227
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
};
|
|
6231
|
+
}
|
|
6232
|
+
/**
|
|
6233
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6234
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6235
|
+
*/
|
|
6236
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6237
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6238
|
+
if (refs.length === 0) return {
|
|
6239
|
+
value,
|
|
6240
|
+
unresolved: []
|
|
6241
|
+
};
|
|
6242
|
+
const answers = await secrets.resolve(refs);
|
|
6243
|
+
const unresolved = [];
|
|
6244
|
+
for (const ref of new Set(refs)) {
|
|
6245
|
+
const answer = answers[ref];
|
|
6246
|
+
if (answer === void 0) unresolved.push({
|
|
6247
|
+
ref,
|
|
6248
|
+
reason: "not-initialized"
|
|
6249
|
+
});
|
|
6250
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6251
|
+
ref,
|
|
6252
|
+
reason: answer.reason
|
|
6253
|
+
});
|
|
6254
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6255
|
+
ref,
|
|
6256
|
+
reason: answer.kind
|
|
6257
|
+
});
|
|
6258
|
+
}
|
|
6259
|
+
const substitute = (v) => {
|
|
6260
|
+
if (isSecretMarker(v)) {
|
|
6261
|
+
const answer = answers[v.$secret];
|
|
6262
|
+
return answer?.kind === "value" ? {
|
|
6263
|
+
keep: true,
|
|
6264
|
+
value: answer.value
|
|
6265
|
+
} : {
|
|
6266
|
+
keep: false,
|
|
6267
|
+
value: void 0
|
|
6268
|
+
};
|
|
6269
|
+
}
|
|
6270
|
+
if (Array.isArray(v)) {
|
|
6271
|
+
const items = [];
|
|
6272
|
+
for (const item of v) {
|
|
6273
|
+
const s = substitute(item);
|
|
6274
|
+
if (s.keep) items.push(s.value);
|
|
6275
|
+
}
|
|
6276
|
+
return {
|
|
6277
|
+
keep: true,
|
|
6278
|
+
value: items
|
|
6279
|
+
};
|
|
6280
|
+
}
|
|
6281
|
+
if (isRecord(v)) {
|
|
6282
|
+
const out = {};
|
|
6283
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6284
|
+
const s = substitute(child);
|
|
6285
|
+
if (s.keep) out[k] = s.value;
|
|
6286
|
+
}
|
|
6287
|
+
return {
|
|
6288
|
+
keep: true,
|
|
6289
|
+
value: out
|
|
6290
|
+
};
|
|
6291
|
+
}
|
|
6292
|
+
return {
|
|
6293
|
+
keep: true,
|
|
6294
|
+
value: v
|
|
6295
|
+
};
|
|
6296
|
+
};
|
|
6297
|
+
return {
|
|
6298
|
+
value: substitute(value).value,
|
|
6299
|
+
unresolved
|
|
6300
|
+
};
|
|
6301
|
+
}
|
|
6302
|
+
function touchesTree(tree, patch) {
|
|
6303
|
+
if (tree.size === 0) return false;
|
|
6304
|
+
for (const key of Object.keys(patch)) {
|
|
6305
|
+
const at = key.indexOf("@");
|
|
6306
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6307
|
+
}
|
|
6308
|
+
return false;
|
|
6309
|
+
}
|
|
6310
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6311
|
+
async function readStoredAddonBlob(raw) {
|
|
6312
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6313
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6314
|
+
const result = await threeWay.call(raw);
|
|
6315
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6316
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6317
|
+
}
|
|
6318
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6319
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6320
|
+
const serialize = (key, fn) => {
|
|
6321
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6322
|
+
const tail = next.catch(() => void 0);
|
|
6323
|
+
chains.set(key, tail);
|
|
6324
|
+
tail.then(() => {
|
|
6325
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6326
|
+
});
|
|
6327
|
+
return next;
|
|
6328
|
+
};
|
|
6329
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6330
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6331
|
+
return serialize(chainKey, async () => {
|
|
6332
|
+
const stored = await readStored();
|
|
6333
|
+
const result = await transformSecretWrite({
|
|
6334
|
+
tree,
|
|
6335
|
+
secrets: opts.secrets,
|
|
6336
|
+
patch,
|
|
6337
|
+
stored,
|
|
6338
|
+
...scope !== void 0 ? { scope } : {},
|
|
6339
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6340
|
+
});
|
|
6341
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6342
|
+
const { orphaned } = await result.afterWrite();
|
|
6343
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6344
|
+
});
|
|
6345
|
+
};
|
|
6346
|
+
const wrapped = {
|
|
6347
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6348
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6349
|
+
kind: "device",
|
|
6350
|
+
deviceId
|
|
6351
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6352
|
+
};
|
|
6353
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6354
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6355
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6356
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6357
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6358
|
+
} });
|
|
6359
|
+
}
|
|
6360
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6361
|
+
function withSecretAwareSettings(context, opts) {
|
|
6362
|
+
const raw = context.settings;
|
|
6363
|
+
if (raw === void 0) return context;
|
|
6364
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6365
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6366
|
+
if (prop === "settings") return settings;
|
|
6367
|
+
return Reflect.get(target, prop, receiver);
|
|
6368
|
+
} });
|
|
6369
|
+
}
|
|
6370
|
+
var LEAF = { kind: "leaf" };
|
|
6371
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6372
|
+
function collectFields(fields, out) {
|
|
6373
|
+
for (const field of fields) {
|
|
6374
|
+
if (field.type === "group") {
|
|
6375
|
+
collectFields(field.fields, out);
|
|
6376
|
+
continue;
|
|
6377
|
+
}
|
|
6378
|
+
if (field.type === "sub-tabs") {
|
|
6379
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6380
|
+
continue;
|
|
6381
|
+
}
|
|
6382
|
+
if (field.type === "editable-array") {
|
|
6383
|
+
const item = /* @__PURE__ */ new Map();
|
|
6384
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6385
|
+
if (item.size > 0) out.set(field.key, {
|
|
6386
|
+
kind: "array",
|
|
6387
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6388
|
+
item
|
|
6389
|
+
});
|
|
6390
|
+
continue;
|
|
6391
|
+
}
|
|
6392
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6393
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6394
|
+
}
|
|
6395
|
+
}
|
|
6396
|
+
/** The secret tree a settings schema declares. */
|
|
6397
|
+
function secretTreeFromSchema(schema) {
|
|
6398
|
+
const out = /* @__PURE__ */ new Map();
|
|
6399
|
+
if (schema === null) return out;
|
|
6400
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6401
|
+
return out;
|
|
6402
|
+
}
|
|
6403
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6404
|
+
function parseSecretStatePath(path) {
|
|
6405
|
+
const segments = [];
|
|
6406
|
+
for (const raw of path.split(".")) {
|
|
6407
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6408
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6409
|
+
segments.push(m[2] !== void 0 ? {
|
|
6410
|
+
key: m[1],
|
|
6411
|
+
idKey: m[2]
|
|
6412
|
+
} : { key: m[1] });
|
|
6413
|
+
}
|
|
6414
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6415
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6416
|
+
return segments;
|
|
6417
|
+
}
|
|
6418
|
+
function insert(into, segments) {
|
|
6419
|
+
const [head, ...rest] = segments;
|
|
6420
|
+
if (head === void 0) return;
|
|
6421
|
+
if (rest.length === 0) {
|
|
6422
|
+
into.set(head.key, LEAF);
|
|
6423
|
+
return;
|
|
6424
|
+
}
|
|
6425
|
+
const existing = into.get(head.key);
|
|
6426
|
+
if (head.idKey !== void 0) {
|
|
6427
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6428
|
+
insert(item, rest);
|
|
6429
|
+
into.set(head.key, {
|
|
6430
|
+
kind: "array",
|
|
6431
|
+
idKey: head.idKey,
|
|
6432
|
+
item
|
|
6433
|
+
});
|
|
6434
|
+
return;
|
|
6435
|
+
}
|
|
6436
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6437
|
+
insert(children, rest);
|
|
6438
|
+
into.set(head.key, {
|
|
6439
|
+
kind: "object",
|
|
6440
|
+
children
|
|
6441
|
+
});
|
|
6442
|
+
}
|
|
6443
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6444
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6445
|
+
if (paths.length === 0) return tree;
|
|
6446
|
+
const out = new Map(tree);
|
|
6447
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6448
|
+
return out;
|
|
6449
|
+
}
|
|
6450
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6451
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6452
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6453
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6454
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5928
6455
|
/**
|
|
5929
6456
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5930
6457
|
*
|
|
@@ -5994,6 +6521,25 @@ var BaseAddon = class {
|
|
|
5994
6521
|
settingsStoreReady = false;
|
|
5995
6522
|
/** Default config values. Provided via constructor. */
|
|
5996
6523
|
defaults;
|
|
6524
|
+
/**
|
|
6525
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6526
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6527
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6528
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6529
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6530
|
+
*/
|
|
6531
|
+
secretStatePaths = [];
|
|
6532
|
+
_addonSecretTree = null;
|
|
6533
|
+
_deviceSecretTree = null;
|
|
6534
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6535
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6536
|
+
_unresolvedSecrets = [];
|
|
6537
|
+
_secretRetryTimer = null;
|
|
6538
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6539
|
+
_secretChangeTimer = null;
|
|
6540
|
+
_secretChangeUnsub = null;
|
|
6541
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6542
|
+
_operatorWriteDepth = 0;
|
|
5997
6543
|
constructor(defaults) {
|
|
5998
6544
|
this.defaults = defaults;
|
|
5999
6545
|
this._config = { ...defaults };
|
|
@@ -6029,8 +6575,18 @@ var BaseAddon = class {
|
|
|
6029
6575
|
return this._config;
|
|
6030
6576
|
}
|
|
6031
6577
|
async initialize(context) {
|
|
6032
|
-
|
|
6578
|
+
const secrets = context.secrets;
|
|
6579
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6580
|
+
secrets,
|
|
6581
|
+
addonTree: () => this.addonSecretTree(),
|
|
6582
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6583
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6584
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6585
|
+
}) : context;
|
|
6033
6586
|
await this.resolveConfig();
|
|
6587
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6588
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6589
|
+
});
|
|
6034
6590
|
const result = await this.onInitialize();
|
|
6035
6591
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6036
6592
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6063,6 +6619,12 @@ var BaseAddon = class {
|
|
|
6063
6619
|
*/
|
|
6064
6620
|
async onHubReachable() {}
|
|
6065
6621
|
async shutdown() {
|
|
6622
|
+
this._secretChangeUnsub?.();
|
|
6623
|
+
this._secretChangeUnsub = null;
|
|
6624
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6625
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6626
|
+
this._secretRetryTimer = null;
|
|
6627
|
+
this._secretChangeTimer = null;
|
|
6066
6628
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6067
6629
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6068
6630
|
await this.onShutdown();
|
|
@@ -6141,7 +6703,7 @@ var BaseAddon = class {
|
|
|
6141
6703
|
return hydrateSchema(schema, overlay ? {
|
|
6142
6704
|
...projected,
|
|
6143
6705
|
...overlay
|
|
6144
|
-
} : projected);
|
|
6706
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6145
6707
|
}
|
|
6146
6708
|
/**
|
|
6147
6709
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6190,7 +6752,7 @@ var BaseAddon = class {
|
|
|
6190
6752
|
return hydrateSchema({
|
|
6191
6753
|
...schema,
|
|
6192
6754
|
sections
|
|
6193
|
-
}, projected);
|
|
6755
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6194
6756
|
}
|
|
6195
6757
|
/**
|
|
6196
6758
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6244,18 +6806,50 @@ var BaseAddon = class {
|
|
|
6244
6806
|
value: result.value[key]
|
|
6245
6807
|
};
|
|
6246
6808
|
}
|
|
6809
|
+
/**
|
|
6810
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6811
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6812
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6813
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6814
|
+
* writing back what it read is not (D787).
|
|
6815
|
+
*/
|
|
6816
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6817
|
+
this._operatorWriteDepth++;
|
|
6818
|
+
try {
|
|
6819
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6820
|
+
} finally {
|
|
6821
|
+
this._operatorWriteDepth--;
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6247
6824
|
async updateGlobalSettings(patch, nodeId) {
|
|
6825
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6826
|
+
}
|
|
6827
|
+
/**
|
|
6828
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6829
|
+
*
|
|
6830
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6831
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6832
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6833
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6834
|
+
*/
|
|
6835
|
+
async clearSecrets(keys, nodeId) {
|
|
6836
|
+
const tree = this.addonSecretTree();
|
|
6837
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6838
|
+
const patch = {};
|
|
6839
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6840
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6841
|
+
}
|
|
6842
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6248
6843
|
const keys = this.perNodeKeys();
|
|
6249
6844
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6250
6845
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6251
|
-
const barePatch = patch;
|
|
6252
6846
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6253
6847
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6254
6848
|
if (target !== localNode) return;
|
|
6255
6849
|
await this.resolveConfig();
|
|
6256
6850
|
await this.onConfigChanged();
|
|
6257
6851
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6258
|
-
this.maybeAutoRestart(
|
|
6852
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6259
6853
|
}
|
|
6260
6854
|
/**
|
|
6261
6855
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6280,7 +6874,7 @@ var BaseAddon = class {
|
|
|
6280
6874
|
* time to return its response before the addon is torn down and
|
|
6281
6875
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6282
6876
|
*/
|
|
6283
|
-
maybeAutoRestart(
|
|
6877
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6284
6878
|
if (!schema) return;
|
|
6285
6879
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6286
6880
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6288,13 +6882,13 @@ var BaseAddon = class {
|
|
|
6288
6882
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6289
6883
|
}
|
|
6290
6884
|
if (restartKeys.size === 0) return;
|
|
6291
|
-
if (!
|
|
6885
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6292
6886
|
const ctx = this._ctx;
|
|
6293
6887
|
if (!ctx) return;
|
|
6294
6888
|
const addonId = ctx.id;
|
|
6295
6889
|
setImmediate(() => {
|
|
6296
6890
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6297
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6891
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6298
6892
|
}).catch((err) => {
|
|
6299
6893
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6300
6894
|
});
|
|
@@ -6303,7 +6897,7 @@ var BaseAddon = class {
|
|
|
6303
6897
|
async getDeviceSettings(deviceId) {
|
|
6304
6898
|
const schema = this.deviceSettingsSchema();
|
|
6305
6899
|
if (!schema) return { sections: [] };
|
|
6306
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6900
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6307
6901
|
}
|
|
6308
6902
|
async updateDeviceSettings(deviceId, patch) {
|
|
6309
6903
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6433,7 +7027,7 @@ var BaseAddon = class {
|
|
|
6433
7027
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6434
7028
|
*/
|
|
6435
7029
|
async resolveConfig() {
|
|
6436
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7030
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6437
7031
|
const perNode = this.perNodeKeys();
|
|
6438
7032
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6439
7033
|
const resolved = { ...this.defaults };
|
|
@@ -6458,7 +7052,7 @@ var BaseAddon = class {
|
|
|
6458
7052
|
key,
|
|
6459
7053
|
schema,
|
|
6460
7054
|
fallback,
|
|
6461
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7055
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6462
7056
|
write: async (patch) => {
|
|
6463
7057
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6464
7058
|
},
|
|
@@ -6475,7 +7069,7 @@ var BaseAddon = class {
|
|
|
6475
7069
|
key,
|
|
6476
7070
|
schema,
|
|
6477
7071
|
fallback,
|
|
6478
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7072
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6479
7073
|
write: async (patch) => {
|
|
6480
7074
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6481
7075
|
},
|
|
@@ -6487,6 +7081,70 @@ var BaseAddon = class {
|
|
|
6487
7081
|
} })
|
|
6488
7082
|
});
|
|
6489
7083
|
}
|
|
7084
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7085
|
+
addonSecretTree() {
|
|
7086
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7087
|
+
return this._addonSecretTree;
|
|
7088
|
+
}
|
|
7089
|
+
deviceSecretTree() {
|
|
7090
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7091
|
+
return this._deviceSecretTree;
|
|
7092
|
+
}
|
|
7093
|
+
/**
|
|
7094
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7095
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7096
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7097
|
+
* than start on an empty credential.
|
|
7098
|
+
*/
|
|
7099
|
+
get unresolvedSecrets() {
|
|
7100
|
+
return this._unresolvedSecrets;
|
|
7101
|
+
}
|
|
7102
|
+
/**
|
|
7103
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7104
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7105
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7106
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7107
|
+
* ever written back from here.
|
|
7108
|
+
*/
|
|
7109
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7110
|
+
const secrets = this._ctx?.secrets;
|
|
7111
|
+
if (secrets === void 0) return blob;
|
|
7112
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7113
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7114
|
+
if (refs.length === 0) {
|
|
7115
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7116
|
+
return blob;
|
|
7117
|
+
}
|
|
7118
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7119
|
+
if (trackForConfig) {
|
|
7120
|
+
this._unresolvedSecrets = unresolved;
|
|
7121
|
+
if (unresolved.length > 0) {
|
|
7122
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7123
|
+
ref: u.ref,
|
|
7124
|
+
reason: u.reason
|
|
7125
|
+
})) } });
|
|
7126
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7127
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7128
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7129
|
+
}
|
|
7130
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7131
|
+
}
|
|
7132
|
+
return value;
|
|
7133
|
+
}
|
|
7134
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7135
|
+
scheduleSecretReresolve(delayMs) {
|
|
7136
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7137
|
+
if (this[timerOf] !== null) return;
|
|
7138
|
+
const timer = setTimeout(() => {
|
|
7139
|
+
this[timerOf] = null;
|
|
7140
|
+
if (this._ctx === null) return;
|
|
7141
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7142
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7143
|
+
});
|
|
7144
|
+
}, delayMs);
|
|
7145
|
+
timer.unref?.();
|
|
7146
|
+
this[timerOf] = timer;
|
|
7147
|
+
}
|
|
6490
7148
|
/**
|
|
6491
7149
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6492
7150
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6754,32 +7412,12 @@ object({
|
|
|
6754
7412
|
audioCodec: string().optional(),
|
|
6755
7413
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6756
7414
|
});
|
|
6757
|
-
var EncodedPacketSchema = object({
|
|
6758
|
-
type: _enum(["video", "audio"]),
|
|
6759
|
-
data: _instanceof(Uint8Array),
|
|
6760
|
-
pts: number(),
|
|
6761
|
-
dts: number(),
|
|
6762
|
-
keyframe: boolean(),
|
|
6763
|
-
codec: string()
|
|
6764
|
-
});
|
|
6765
|
-
var DecodedFrameSchema = object({
|
|
6766
|
-
data: _instanceof(Uint8Array),
|
|
6767
|
-
width: number(),
|
|
6768
|
-
height: number(),
|
|
6769
|
-
format: _enum([
|
|
6770
|
-
"jpeg",
|
|
6771
|
-
"rgb",
|
|
6772
|
-
"bgr",
|
|
6773
|
-
"yuv420",
|
|
6774
|
-
"gray"
|
|
6775
|
-
]),
|
|
6776
|
-
timestamp: number()
|
|
6777
|
-
});
|
|
6778
7415
|
/**
|
|
6779
7416
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6780
7417
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6781
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6782
|
-
*
|
|
7418
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7419
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7420
|
+
* over tRPC / Moleculer.
|
|
6783
7421
|
*
|
|
6784
7422
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6785
7423
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6805,50 +7443,6 @@ var FrameHandleSchema = object({
|
|
|
6805
7443
|
slotCount: number().int().positive()
|
|
6806
7444
|
});
|
|
6807
7445
|
/**
|
|
6808
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6809
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6810
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6811
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6812
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6813
|
-
*/
|
|
6814
|
-
var FrameHandleFormatSchema = _enum([
|
|
6815
|
-
"rgb",
|
|
6816
|
-
"bgr",
|
|
6817
|
-
"yuv420",
|
|
6818
|
-
"gray"
|
|
6819
|
-
]);
|
|
6820
|
-
/**
|
|
6821
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6822
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6823
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6824
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6825
|
-
* they asked for with no broker-side conversion.
|
|
6826
|
-
*/
|
|
6827
|
-
var SubscribeFramesInputSchema = object({
|
|
6828
|
-
brokerId: string(),
|
|
6829
|
-
format: FrameHandleFormatSchema,
|
|
6830
|
-
/**
|
|
6831
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6832
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6833
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6834
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6835
|
-
*/
|
|
6836
|
-
maxFps: number().positive().optional(),
|
|
6837
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6838
|
-
tag: string().optional()
|
|
6839
|
-
});
|
|
6840
|
-
/**
|
|
6841
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6842
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6843
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6844
|
-
*/
|
|
6845
|
-
var SubscribeFramesResultSchema = object({
|
|
6846
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6847
|
-
subscriptionId: string(),
|
|
6848
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6849
|
-
maxFps: number().nonnegative()
|
|
6850
|
-
});
|
|
6851
|
-
/**
|
|
6852
7446
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6853
7447
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6854
7448
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6856,8 +7450,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6856
7450
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6857
7451
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6858
7452
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6859
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6860
|
-
*
|
|
7453
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7454
|
+
* it.
|
|
6861
7455
|
*/
|
|
6862
7456
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6863
7457
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6875,11 +7469,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6875
7469
|
format: AudioChunkFormatSchema.optional()
|
|
6876
7470
|
});
|
|
6877
7471
|
/**
|
|
6878
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6879
|
-
*
|
|
6880
|
-
*
|
|
6881
|
-
*
|
|
6882
|
-
* `pullAudioChunks`.
|
|
7472
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7473
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7474
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7475
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6883
7476
|
*/
|
|
6884
7477
|
var SubscribeAudioChunksInputSchema = object({
|
|
6885
7478
|
brokerId: string(),
|
|
@@ -6910,9 +7503,7 @@ var BrokerStatsSchema = object({
|
|
|
6910
7503
|
"stopped"
|
|
6911
7504
|
]),
|
|
6912
7505
|
inputFps: number(),
|
|
6913
|
-
decodeFps: number(),
|
|
6914
7506
|
encodedSubscribers: number(),
|
|
6915
|
-
decodedSubscribers: number(),
|
|
6916
7507
|
uptimeMs: number(),
|
|
6917
7508
|
bitrateKbps: number(),
|
|
6918
7509
|
idrIntervalMs: number(),
|
|
@@ -6925,14 +7516,6 @@ var BrokerStatsSchema = object({
|
|
|
6925
7516
|
preBufferMs: number(),
|
|
6926
7517
|
preBufferPackets: number(),
|
|
6927
7518
|
/**
|
|
6928
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6929
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6930
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6931
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6932
|
-
* a separate cap call per broker.
|
|
6933
|
-
*/
|
|
6934
|
-
decoderNodeId: string().nullable(),
|
|
6935
|
-
/**
|
|
6936
7519
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6937
7520
|
* when the stream has no audio track or the broker is in cold start.
|
|
6938
7521
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7196,6 +7779,69 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7196
7779
|
kind: "mutation",
|
|
7197
7780
|
auth: "admin"
|
|
7198
7781
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7782
|
+
function defOf(schema) {
|
|
7783
|
+
return schema._zod?.def ?? {};
|
|
7784
|
+
}
|
|
7785
|
+
function declaredHere(schema) {
|
|
7786
|
+
return globalRegistry.get(schema)?.secret === true;
|
|
7787
|
+
}
|
|
7788
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
7789
|
+
var WRAPPERS = new Set([
|
|
7790
|
+
"optional",
|
|
7791
|
+
"nullable",
|
|
7792
|
+
"default",
|
|
7793
|
+
"prefault",
|
|
7794
|
+
"catch",
|
|
7795
|
+
"readonly",
|
|
7796
|
+
"nonoptional"
|
|
7797
|
+
]);
|
|
7798
|
+
/**
|
|
7799
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
7800
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
7801
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
7802
|
+
* `.transform` on `in`).
|
|
7803
|
+
*/
|
|
7804
|
+
function layersOf(schema) {
|
|
7805
|
+
const out = [];
|
|
7806
|
+
const queue = [schema];
|
|
7807
|
+
while (queue.length > 0) {
|
|
7808
|
+
const s = queue.shift();
|
|
7809
|
+
if (!s || out.includes(s)) continue;
|
|
7810
|
+
out.push(s);
|
|
7811
|
+
const def = defOf(s);
|
|
7812
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
7813
|
+
if (def.type === "pipe") {
|
|
7814
|
+
if (def.in) queue.push(def.in);
|
|
7815
|
+
if (def.out) queue.push(def.out);
|
|
7816
|
+
}
|
|
7817
|
+
}
|
|
7818
|
+
return out;
|
|
7819
|
+
}
|
|
7820
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
7821
|
+
function isZodSecret(schema) {
|
|
7822
|
+
return layersOf(schema).some(declaredHere);
|
|
7823
|
+
}
|
|
7824
|
+
/**
|
|
7825
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
7826
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
7827
|
+
* object or array is reported as one path and not descended into — everything
|
|
7828
|
+
* under it is secret.
|
|
7829
|
+
*/
|
|
7830
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
7831
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
7832
|
+
const paths = [];
|
|
7833
|
+
for (const layer of layersOf(schema)) {
|
|
7834
|
+
const def = defOf(layer);
|
|
7835
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
7836
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
7837
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
7838
|
+
else if (def.type === "intersection") {
|
|
7839
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
7840
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
7841
|
+
}
|
|
7842
|
+
}
|
|
7843
|
+
return [...new Set(paths)];
|
|
7844
|
+
}
|
|
7199
7845
|
//#endregion
|
|
7200
7846
|
//#region ../types/dist/err-msg-DX6i_MY4.mjs
|
|
7201
7847
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -10359,70 +11005,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10359
11005
|
"backup"
|
|
10360
11006
|
]).optional()
|
|
10361
11007
|
});
|
|
10362
|
-
var DecoderStatsSchema = object({
|
|
10363
|
-
inputFps: number(),
|
|
10364
|
-
outputFps: number(),
|
|
10365
|
-
avgDecodeTimeMs: number(),
|
|
10366
|
-
droppedFrames: number(),
|
|
10367
|
-
/**
|
|
10368
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10369
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10370
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10371
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10372
|
-
*/
|
|
10373
|
-
lagMs: number().optional(),
|
|
10374
|
-
effectiveFps: number().optional(),
|
|
10375
|
-
adaptiveFps: number().optional()
|
|
10376
|
-
});
|
|
10377
|
-
var DecoderSessionConfigSchema = object({
|
|
10378
|
-
codec: string(),
|
|
10379
|
-
maxFps: number().default(0),
|
|
10380
|
-
outputFormat: _enum([
|
|
10381
|
-
"jpeg",
|
|
10382
|
-
"rgb",
|
|
10383
|
-
"bgr",
|
|
10384
|
-
"yuv420",
|
|
10385
|
-
"gray"
|
|
10386
|
-
]).default("jpeg"),
|
|
10387
|
-
scale: number().default(1),
|
|
10388
|
-
width: number().optional(),
|
|
10389
|
-
height: number().optional(),
|
|
10390
|
-
/**
|
|
10391
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10392
|
-
* because the cap is generic (any caller could request decode), but
|
|
10393
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10394
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10395
|
-
* sendPacket errors on a single hung camera).
|
|
10396
|
-
*/
|
|
10397
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10398
|
-
/**
|
|
10399
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10400
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10401
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10402
|
-
* profile cleanly.
|
|
10403
|
-
*/
|
|
10404
|
-
tag: string().optional(),
|
|
10405
|
-
/**
|
|
10406
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10407
|
-
*
|
|
10408
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10409
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10410
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10411
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10412
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10413
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10414
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10415
|
-
*/
|
|
10416
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10417
|
-
/**
|
|
10418
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10419
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10420
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10421
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10422
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10423
|
-
*/
|
|
10424
|
-
debug: boolean().optional()
|
|
10425
|
-
});
|
|
10426
11008
|
/**
|
|
10427
11009
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10428
11010
|
* an addon declares its channels in.
|
|
@@ -10565,6 +11147,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10565
11147
|
"balanced",
|
|
10566
11148
|
"strict"
|
|
10567
11149
|
]);
|
|
11150
|
+
/** Steps whose effect a root label can BE. */
|
|
11151
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
11152
|
+
"animal-classifier",
|
|
11153
|
+
"vehicle-classifier",
|
|
11154
|
+
"package-detection"
|
|
11155
|
+
];
|
|
11156
|
+
/** Steps whose box a root detection can BE. */
|
|
11157
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11158
|
+
/**
|
|
11159
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11160
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11161
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11162
|
+
* no camera tree carries.)
|
|
11163
|
+
*/
|
|
11164
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11165
|
+
[
|
|
11166
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11167
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11168
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11169
|
+
];
|
|
10568
11170
|
var MODEL_FORMATS = [
|
|
10569
11171
|
"onnx",
|
|
10570
11172
|
"coreml",
|
|
@@ -10593,7 +11195,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10593
11195
|
/** Multi-file payload (directory members or sibling files). */
|
|
10594
11196
|
files: array(string()).readonly().optional(),
|
|
10595
11197
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10596
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11198
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11199
|
+
/**
|
|
11200
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11201
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11202
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11203
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11204
|
+
* node records the revision it downloaded next to the file
|
|
11205
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11206
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11207
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11208
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11209
|
+
*/
|
|
11210
|
+
revision: string().min(1).optional()
|
|
11211
|
+
});
|
|
11212
|
+
/**
|
|
11213
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11214
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11215
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11216
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11217
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11218
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11219
|
+
*/
|
|
11220
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11221
|
+
"current",
|
|
11222
|
+
"stale",
|
|
11223
|
+
"missing"
|
|
11224
|
+
]);
|
|
11225
|
+
/**
|
|
11226
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11227
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11228
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11229
|
+
*/
|
|
11230
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11231
|
+
"fp32",
|
|
11232
|
+
"fp16",
|
|
11233
|
+
"int8"
|
|
11234
|
+
]);
|
|
11235
|
+
/**
|
|
11236
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11237
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11238
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11239
|
+
*/
|
|
11240
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11241
|
+
downloaded: boolean(),
|
|
11242
|
+
sizeMB: number(),
|
|
11243
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11244
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10597
11245
|
});
|
|
10598
11246
|
/**
|
|
10599
11247
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10697,6 +11345,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10697
11345
|
/** True when the weights or their data forbid commercial use. */
|
|
10698
11346
|
nonCommercial: boolean().optional()
|
|
10699
11347
|
}));
|
|
11348
|
+
/**
|
|
11349
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
11350
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
11351
|
+
*
|
|
11352
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
11353
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
11354
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
11355
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
11356
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
11357
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
11358
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11359
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11360
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11361
|
+
* postprocessor on read, never stored by an import.
|
|
11362
|
+
*/
|
|
11363
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11364
|
+
object({
|
|
11365
|
+
kind: literal("label"),
|
|
11366
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11367
|
+
labelToEffect: record(string(), string()),
|
|
11368
|
+
uncovered: array(string()).readonly()
|
|
11369
|
+
}),
|
|
11370
|
+
object({
|
|
11371
|
+
kind: literal("crop"),
|
|
11372
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11373
|
+
rootLabels: array(string()).readonly(),
|
|
11374
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11375
|
+
childClass: _enum(["plate", "face"]),
|
|
11376
|
+
/**
|
|
11377
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11378
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11379
|
+
* stored by an import.
|
|
11380
|
+
*/
|
|
11381
|
+
rootInputPx: number().int().positive().optional()
|
|
11382
|
+
}),
|
|
11383
|
+
object({
|
|
11384
|
+
kind: literal("mask"),
|
|
11385
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11386
|
+
})
|
|
11387
|
+
]);
|
|
10700
11388
|
var ModelCatalogEntrySchema = object({
|
|
10701
11389
|
id: string(),
|
|
10702
11390
|
name: string(),
|
|
@@ -10762,6 +11450,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10762
11450
|
*/
|
|
10763
11451
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10764
11452
|
/**
|
|
11453
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11454
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11455
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11456
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11457
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11458
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11459
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11460
|
+
*/
|
|
11461
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11462
|
+
/**
|
|
11463
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11464
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11465
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11466
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11467
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11468
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11469
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11470
|
+
*/
|
|
11471
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11472
|
+
/**
|
|
11473
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11474
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11475
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11476
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11477
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11478
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11479
|
+
*/
|
|
11480
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11481
|
+
/**
|
|
10765
11482
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10766
11483
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10767
11484
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10823,6 +11540,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10823
11540
|
*/
|
|
10824
11541
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10825
11542
|
/**
|
|
11543
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
11544
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
11545
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
11546
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
11547
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
11548
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
11549
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
11550
|
+
*/
|
|
11551
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
11552
|
+
/**
|
|
10826
11553
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10827
11554
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
10828
11555
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -12424,13 +13151,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12424
13151
|
lastRtpAt: number(),
|
|
12425
13152
|
bytesSent: number()
|
|
12426
13153
|
});
|
|
12427
|
-
var BrokerDecodedClientSchema = object({
|
|
12428
|
-
tag: string(),
|
|
12429
|
-
subscribedAt: number(),
|
|
12430
|
-
maxFps: number(),
|
|
12431
|
-
framesDelivered: number(),
|
|
12432
|
-
framesDropped: number()
|
|
12433
|
-
});
|
|
12434
13154
|
var BrokerAudioClientSchema = object({
|
|
12435
13155
|
tag: string(),
|
|
12436
13156
|
subscribedAt: number(),
|
|
@@ -12522,7 +13242,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12522
13242
|
});
|
|
12523
13243
|
var BrokerClientsSchema = object({
|
|
12524
13244
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12525
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12526
13245
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12527
13246
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12528
13247
|
pipeClients: number(),
|
|
@@ -12891,11 +13610,7 @@ method(object({
|
|
|
12891
13610
|
auth: "admin"
|
|
12892
13611
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
12893
13612
|
brokerId: string(),
|
|
12894
|
-
channel: _enum([
|
|
12895
|
-
"rtsp",
|
|
12896
|
-
"decoded",
|
|
12897
|
-
"audio"
|
|
12898
|
-
]),
|
|
13613
|
+
channel: _enum(["rtsp", "audio"]),
|
|
12899
13614
|
handle: string()
|
|
12900
13615
|
}), object({ killed: boolean() }), {
|
|
12901
13616
|
kind: "mutation",
|
|
@@ -12930,10 +13645,7 @@ method(object({
|
|
|
12930
13645
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
12931
13646
|
subscriptionId: string(),
|
|
12932
13647
|
maxCount: number().int().positive().default(8)
|
|
12933
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
12934
|
-
subscriptionId: string(),
|
|
12935
|
-
maxCount: number().int().positive().default(4)
|
|
12936
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13648
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
12937
13649
|
brokerId: string(),
|
|
12938
13650
|
seconds: number().min(0).max(30)
|
|
12939
13651
|
}), _void(), {
|
|
@@ -14193,53 +14905,219 @@ id: union([string(), number()]) }), {
|
|
|
14193
14905
|
auth: "admin"
|
|
14194
14906
|
});
|
|
14195
14907
|
/**
|
|
14196
|
-
*
|
|
14197
|
-
*
|
|
14198
|
-
*
|
|
14908
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14909
|
+
*
|
|
14910
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14911
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14912
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14913
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14914
|
+
* against the CALLER, never against anything the caller claims.
|
|
14915
|
+
*
|
|
14916
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14917
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14918
|
+
* connection, the agent from its child's connection carried in
|
|
14919
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14920
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14921
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14922
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14923
|
+
* runner is the same OS user): see the threat model in
|
|
14924
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14925
|
+
*
|
|
14926
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14927
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14928
|
+
* floors every method to admin anyway (D240).
|
|
14929
|
+
*
|
|
14930
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14199
14931
|
*/
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
|
|
14207
|
-
|
|
14208
|
-
|
|
14209
|
-
})
|
|
14210
|
-
|
|
14932
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14933
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14934
|
+
"key-missing",
|
|
14935
|
+
"wrong-key",
|
|
14936
|
+
"key-file-unreadable",
|
|
14937
|
+
"store-unavailable",
|
|
14938
|
+
"not-initialized",
|
|
14939
|
+
"decrypt-failed"
|
|
14940
|
+
]);
|
|
14941
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14942
|
+
state: literal("locked"),
|
|
14943
|
+
reason: KeychainUnavailableReasonSchema
|
|
14944
|
+
})]);
|
|
14945
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14946
|
+
object({
|
|
14947
|
+
kind: literal("value"),
|
|
14948
|
+
value: string(),
|
|
14949
|
+
version: number().int()
|
|
14950
|
+
}),
|
|
14951
|
+
object({ kind: literal("missing") }),
|
|
14952
|
+
object({
|
|
14953
|
+
kind: literal("unavailable"),
|
|
14954
|
+
reason: KeychainUnavailableReasonSchema
|
|
14955
|
+
}),
|
|
14956
|
+
object({ kind: literal("forbidden") })
|
|
14957
|
+
]);
|
|
14958
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14959
|
+
/** Metadata of one stored value — never the value. */
|
|
14960
|
+
var KeychainSecretMetaSchema = object({
|
|
14961
|
+
ref: string(),
|
|
14962
|
+
owner: string(),
|
|
14963
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14964
|
+
scope: string(),
|
|
14965
|
+
fieldPath: string(),
|
|
14966
|
+
version: number().int(),
|
|
14967
|
+
createdAt: number(),
|
|
14968
|
+
updatedAt: number(),
|
|
14969
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14970
|
+
updatedBy: string(),
|
|
14971
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14972
|
+
lastReadAt: number().nullable()
|
|
14973
|
+
});
|
|
14974
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14975
|
+
method(object({
|
|
14976
|
+
ref: string().min(1),
|
|
14977
|
+
value: string().min(1)
|
|
14978
|
+
}), object({
|
|
14979
|
+
ref: string(),
|
|
14980
|
+
version: number().int()
|
|
14981
|
+
}), {
|
|
14982
|
+
kind: "mutation",
|
|
14983
|
+
auth: "admin"
|
|
14984
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14985
|
+
kind: "mutation",
|
|
14986
|
+
auth: "admin"
|
|
14987
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14988
|
+
var KeychainKeySourceSchema = object({
|
|
14989
|
+
kind: _enum([
|
|
14990
|
+
"config-file",
|
|
14991
|
+
"previous-config-file",
|
|
14992
|
+
"platform",
|
|
14993
|
+
"default-file"
|
|
14994
|
+
]),
|
|
14995
|
+
/** File sources only — a path is not a secret. */
|
|
14996
|
+
path: string().optional(),
|
|
14997
|
+
/**
|
|
14998
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14999
|
+
* next to the database it protects (the default file). The page warns.
|
|
15000
|
+
*/
|
|
15001
|
+
sharesBackupWithDatabase: boolean()
|
|
15002
|
+
});
|
|
15003
|
+
var KeychainStatusSchema = object({
|
|
15004
|
+
keychain: KeychainStateSchema,
|
|
15005
|
+
/** The source of the master key in use; `null` while locked. */
|
|
15006
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
15007
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
15008
|
+
configuredSource: KeychainKeySourceSchema,
|
|
15009
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
15010
|
+
fingerprint: string().nullable(),
|
|
15011
|
+
activeKeyId: string().nullable(),
|
|
15012
|
+
/**
|
|
15013
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
15014
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
15015
|
+
*/
|
|
15016
|
+
rotationPending: boolean(),
|
|
15017
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15018
|
+
retiredWraps: number().int(),
|
|
15019
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
15020
|
+
secretCount: number().int()
|
|
15021
|
+
});
|
|
15022
|
+
/**
|
|
15023
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
15024
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
15025
|
+
* never reported as an orphan (and never deleted as one).
|
|
15026
|
+
*/
|
|
15027
|
+
var KeychainSecretUsageSchema = _enum([
|
|
15028
|
+
"in-use",
|
|
15029
|
+
"orphan",
|
|
15030
|
+
"unknown"
|
|
15031
|
+
]);
|
|
15032
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
15033
|
+
var KeychainAuditActionSchema = _enum([
|
|
15034
|
+
"put",
|
|
15035
|
+
"delete",
|
|
15036
|
+
"reveal",
|
|
15037
|
+
"rotate-master-key",
|
|
15038
|
+
"purge-retired-keys",
|
|
15039
|
+
"download-recovery-key",
|
|
15040
|
+
"delete-orphans",
|
|
15041
|
+
"reset",
|
|
15042
|
+
"initialize"
|
|
15043
|
+
]);
|
|
15044
|
+
var KeychainAuditEntrySchema = object({
|
|
15045
|
+
id: string(),
|
|
15046
|
+
at: number(),
|
|
15047
|
+
action: KeychainAuditActionSchema,
|
|
15048
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15049
|
+
actor: string(),
|
|
15050
|
+
ref: string().nullable(),
|
|
15051
|
+
detail: string().nullable()
|
|
15052
|
+
});
|
|
15053
|
+
var KEYCHAIN_RESET_CONFIRMATION = "RESET KEYCHAIN";
|
|
15054
|
+
/**
|
|
15055
|
+
* Secrets the HUB itself holds (owner `system`) that no settings form shows:
|
|
15056
|
+
* `jwt-signing-key` — the session signing key (D797). It is always "in use",
|
|
15057
|
+
* never an orphan; it is generated on a fresh hub and replaced only through
|
|
15058
|
+
* {@link keychainAdminCapability.methods.setSystemSecret}.
|
|
15059
|
+
*/
|
|
15060
|
+
var SystemHeldSecretNameSchema = _enum(["jwt-signing-key"]);
|
|
15061
|
+
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({
|
|
15062
|
+
value: string(),
|
|
15063
|
+
version: number().int()
|
|
15064
|
+
}), {
|
|
15065
|
+
kind: "mutation",
|
|
15066
|
+
auth: "admin",
|
|
15067
|
+
caller: "required"
|
|
15068
|
+
}), method(object({
|
|
15069
|
+
name: SystemHeldSecretNameSchema,
|
|
15070
|
+
value: string().min(16)
|
|
15071
|
+
}), object({
|
|
15072
|
+
ref: string(),
|
|
15073
|
+
version: number().int()
|
|
15074
|
+
}), {
|
|
15075
|
+
kind: "mutation",
|
|
15076
|
+
auth: "admin",
|
|
15077
|
+
caller: "required"
|
|
15078
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15079
|
+
deleted: array(string()).readonly(),
|
|
15080
|
+
kept: array(object({
|
|
15081
|
+
ref: string(),
|
|
15082
|
+
usage: KeychainSecretUsageSchema
|
|
15083
|
+
})).readonly()
|
|
15084
|
+
}), {
|
|
15085
|
+
kind: "mutation",
|
|
15086
|
+
auth: "admin",
|
|
15087
|
+
caller: "required"
|
|
15088
|
+
}), method(object({}), object({
|
|
15089
|
+
fingerprint: string(),
|
|
15090
|
+
keySource: KeychainKeySourceSchema
|
|
15091
|
+
}), {
|
|
15092
|
+
kind: "mutation",
|
|
15093
|
+
auth: "admin",
|
|
15094
|
+
caller: "required"
|
|
15095
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15096
|
+
kind: "mutation",
|
|
15097
|
+
auth: "admin",
|
|
15098
|
+
caller: "required"
|
|
15099
|
+
}), method(object({}), object({
|
|
15100
|
+
key: string(),
|
|
15101
|
+
fingerprint: string(),
|
|
15102
|
+
keySource: KeychainKeySourceSchema
|
|
15103
|
+
}), {
|
|
15104
|
+
kind: "mutation",
|
|
15105
|
+
auth: "admin",
|
|
15106
|
+
caller: "required"
|
|
15107
|
+
}), method(object({ confirm: literal(KEYCHAIN_RESET_CONFIRMATION) }), object({
|
|
15108
|
+
archivedCollection: string().nullable(),
|
|
15109
|
+
archived: number().int()
|
|
15110
|
+
}), {
|
|
15111
|
+
kind: "mutation",
|
|
15112
|
+
auth: "admin",
|
|
15113
|
+
caller: "required"
|
|
15114
|
+
});
|
|
15115
|
+
method(_void(), object({
|
|
14211
15116
|
id: string(),
|
|
14212
15117
|
name: string(),
|
|
14213
|
-
isPullMode: boolean().optional(),
|
|
14214
|
-
priority: number().optional(),
|
|
14215
15118
|
hwaccel: string().optional(),
|
|
14216
15119
|
probedBestHwaccel: string().optional()
|
|
14217
|
-
})), method(
|
|
14218
|
-
sessionId: string(),
|
|
14219
|
-
nodeId: string()
|
|
14220
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14221
|
-
sessionId: string(),
|
|
14222
|
-
packet: EncodedPacketSchema
|
|
14223
|
-
}), _void()), method(object({
|
|
14224
|
-
sessionId: string(),
|
|
14225
|
-
url: string()
|
|
14226
|
-
}), _void()), method(object({
|
|
14227
|
-
sessionId: string(),
|
|
14228
|
-
maxCount: number().default(1),
|
|
14229
|
-
waitMs: number().optional()
|
|
14230
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14231
|
-
sessionId: string(),
|
|
14232
|
-
maxCount: number().default(1),
|
|
14233
|
-
waitMs: number().optional()
|
|
14234
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14235
|
-
sessionId: string(),
|
|
14236
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14237
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14238
|
-
sessionId: string(),
|
|
14239
|
-
codec: string(),
|
|
14240
|
-
outputFormat: string(),
|
|
14241
|
-
createdAtMs: number()
|
|
14242
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15120
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14243
15121
|
kind: "mutation",
|
|
14244
15122
|
auth: "admin"
|
|
14245
15123
|
});
|
|
@@ -15158,6 +16036,10 @@ var DeviceInfoSchema = object({
|
|
|
15158
16036
|
isCamera: boolean(),
|
|
15159
16037
|
/** Current config values — serializable snapshot */
|
|
15160
16038
|
config: record(string(), unknown()),
|
|
16039
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
16040
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
16041
|
+
* when the owning runner has not reported them. */
|
|
16042
|
+
secretConfigPaths: array(string()).optional(),
|
|
15161
16043
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15162
16044
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15163
16045
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15363,12 +16245,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15363
16245
|
* call (workers re-register on init), so probe-driven updates
|
|
15364
16246
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15365
16247
|
features: array(string()).optional(),
|
|
15366
|
-
config: record(string(), unknown())
|
|
16248
|
+
config: record(string(), unknown()),
|
|
16249
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16250
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16251
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16252
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16253
|
+
* omits it and the keyword backstop applies. */
|
|
16254
|
+
secretConfigPaths: array(string()).optional()
|
|
15367
16255
|
});
|
|
15368
16256
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15369
16257
|
var DevicePersistConfigPayloadSchema = object({
|
|
15370
16258
|
deviceId: number(),
|
|
15371
|
-
data: record(string(), unknown())
|
|
16259
|
+
data: record(string(), unknown()),
|
|
16260
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16261
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16262
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16263
|
+
secretConfigPaths: array(string()).optional()
|
|
15372
16264
|
});
|
|
15373
16265
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15374
16266
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -16190,6 +17082,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
16190
17082
|
kind: "mutation",
|
|
16191
17083
|
auth: "admin"
|
|
16192
17084
|
});
|
|
17085
|
+
var HUB_ADDRESS_ROLES = [
|
|
17086
|
+
"appConnections",
|
|
17087
|
+
"notificationTaps",
|
|
17088
|
+
"internal",
|
|
17089
|
+
"publicEndpoint"
|
|
17090
|
+
];
|
|
16193
17091
|
/**
|
|
16194
17092
|
* Transport bounds for AI capability methods.
|
|
16195
17093
|
*
|
|
@@ -17016,7 +17914,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17016
17914
|
icon: string().optional(),
|
|
17017
17915
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17018
17916
|
startUrl: string(),
|
|
17019
|
-
stage: LoginStageEnum
|
|
17917
|
+
stage: LoginStageEnum,
|
|
17918
|
+
/**
|
|
17919
|
+
* The provider names an external identity a signed-in user can link to
|
|
17920
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17921
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17922
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17923
|
+
*/
|
|
17924
|
+
linkable: boolean().optional()
|
|
17020
17925
|
}),
|
|
17021
17926
|
object({
|
|
17022
17927
|
kind: literal("widget"),
|
|
@@ -18792,6 +19697,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18792
19697
|
"stream-offline",
|
|
18793
19698
|
"node-online",
|
|
18794
19699
|
"node-offline",
|
|
19700
|
+
"node-restarting",
|
|
19701
|
+
"node-updating",
|
|
18795
19702
|
"node-inference-unavailable",
|
|
18796
19703
|
"detection-blind",
|
|
18797
19704
|
"addon-crash-loop",
|
|
@@ -20397,7 +21304,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
20397
21304
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
20398
21305
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
20399
21306
|
*/
|
|
20400
|
-
notifySensorRewatched: boolean().optional()
|
|
21307
|
+
notifySensorRewatched: boolean().optional(),
|
|
21308
|
+
/**
|
|
21309
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
21310
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
21311
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
21312
|
+
*/
|
|
21313
|
+
notifySensorIgnored: boolean().optional()
|
|
20401
21314
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20402
21315
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20403
21316
|
mode: AlarmArmModeSchema,
|
|
@@ -20410,7 +21323,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
20410
21323
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20411
21324
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
20412
21325
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20413
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
21326
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
21327
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
21328
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
20414
21329
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20415
21330
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20416
21331
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -21388,8 +22303,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21388
22303
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21389
22304
|
stepId: "face-embedding",
|
|
21390
22305
|
key: "minLandmarkFaceSize",
|
|
21391
|
-
label: "Min face size
|
|
21392
|
-
description: "
|
|
22306
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22307
|
+
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.",
|
|
21393
22308
|
type: "slider",
|
|
21394
22309
|
min: 0,
|
|
21395
22310
|
max: 64,
|
|
@@ -22362,8 +23277,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22362
23277
|
]);
|
|
22363
23278
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22364
23279
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22365
|
-
/**
|
|
22366
|
-
|
|
23280
|
+
/**
|
|
23281
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23282
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23283
|
+
*
|
|
23284
|
+
* - `operator` — drawn by hand.
|
|
23285
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23286
|
+
* model, or a larger teacher model).
|
|
23287
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23288
|
+
* back from the track store (never a re-run).
|
|
23289
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23290
|
+
*/
|
|
23291
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23292
|
+
"operator",
|
|
23293
|
+
"assist",
|
|
23294
|
+
"pipeline",
|
|
23295
|
+
"llm"
|
|
23296
|
+
]);
|
|
22367
23297
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22368
23298
|
var RetrainBboxSchema = object({
|
|
22369
23299
|
x: number(),
|
|
@@ -22381,7 +23311,8 @@ var RetrainBboxSchema = object({
|
|
|
22381
23311
|
*/
|
|
22382
23312
|
var RetrainAnnotationSchema = object({
|
|
22383
23313
|
id: string(),
|
|
22384
|
-
|
|
23314
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23315
|
+
trackId: string().optional(),
|
|
22385
23316
|
deviceId: number(),
|
|
22386
23317
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22387
23318
|
mediaKey: string(),
|
|
@@ -22430,18 +23361,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22430
23361
|
* fail, whatever became of the original. */
|
|
22431
23362
|
copied: boolean()
|
|
22432
23363
|
});
|
|
23364
|
+
/**
|
|
23365
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23366
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23367
|
+
* box recorded on the source media row when there is one, else the track
|
|
23368
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23369
|
+
* until the operator confirms it.
|
|
23370
|
+
*/
|
|
23371
|
+
var RetrainPipelineBoxSchema = object({
|
|
23372
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23373
|
+
bbox: RetrainBboxSchema,
|
|
23374
|
+
macroClass: RetrainMacroClassSchema,
|
|
23375
|
+
label: string().optional(),
|
|
23376
|
+
subLabel: string().optional(),
|
|
23377
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23378
|
+
score: number().optional(),
|
|
23379
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23380
|
+
modelId: string().optional(),
|
|
23381
|
+
trackId: string(),
|
|
23382
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23383
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23384
|
+
basis: _enum(["subject-box", "position"]),
|
|
23385
|
+
deltaMs: number()
|
|
23386
|
+
});
|
|
23387
|
+
/**
|
|
23388
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23389
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23390
|
+
* track at all.
|
|
23391
|
+
*/
|
|
23392
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22433
23393
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22434
23394
|
var RetrainFrameSchema = object({
|
|
22435
23395
|
frameId: string(),
|
|
22436
23396
|
deviceId: number(),
|
|
22437
|
-
|
|
22438
|
-
/**
|
|
22439
|
-
|
|
23397
|
+
origin: RetrainFrameOriginSchema,
|
|
23398
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23399
|
+
trackId: string().optional(),
|
|
23400
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23401
|
+
* Absent on a recording still. */
|
|
23402
|
+
sourceMediaId: number().int().optional(),
|
|
23403
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23404
|
+
epochMs: number().optional(),
|
|
22440
23405
|
sourceKind: MediaFileKindEnum,
|
|
22441
23406
|
sizeBytes: number().int(),
|
|
22442
23407
|
width: number().int(),
|
|
22443
23408
|
height: number().int(),
|
|
22444
|
-
copiedAt: number()
|
|
23409
|
+
copiedAt: number(),
|
|
23410
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23411
|
+
capturedAt: number().optional(),
|
|
23412
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23413
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23414
|
+
* a false positive. */
|
|
23415
|
+
complete: boolean(),
|
|
23416
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23417
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23418
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23419
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23420
|
+
collectionIds: array(string()).readonly().optional()
|
|
22445
23421
|
});
|
|
22446
23422
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22447
23423
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22462,6 +23438,56 @@ var RetrainFrameListSchema = object({
|
|
|
22462
23438
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22463
23439
|
autoPickMediaId: number().int().optional()
|
|
22464
23440
|
});
|
|
23441
|
+
/**
|
|
23442
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23443
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23444
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23445
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23446
|
+
* export carried (`exportedInBatch`).
|
|
23447
|
+
*/
|
|
23448
|
+
var RetrainExportFilterSchema = object({
|
|
23449
|
+
deviceIds: array(number()).optional(),
|
|
23450
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23451
|
+
/** Only frames in at least one of these named collections. */
|
|
23452
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23453
|
+
/** Exactly the frames of this dataset version (and its completeOnly). An
|
|
23454
|
+
* unknown id selects nothing. */
|
|
23455
|
+
datasetVersionId: string().optional(),
|
|
23456
|
+
batchId: string().optional(),
|
|
23457
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23458
|
+
completeOnly: boolean().optional()
|
|
23459
|
+
});
|
|
23460
|
+
/**
|
|
23461
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23462
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23463
|
+
* convention — the classifier layout.
|
|
23464
|
+
*/
|
|
23465
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23466
|
+
/**
|
|
23467
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23468
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23469
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23470
|
+
* logged.
|
|
23471
|
+
*/
|
|
23472
|
+
var RetrainArchiveTargetSchema = object({
|
|
23473
|
+
kind: literal("http"),
|
|
23474
|
+
method: _enum(["PUT", "POST"]),
|
|
23475
|
+
url: string().url(),
|
|
23476
|
+
headers: record(string(), string()).optional()
|
|
23477
|
+
});
|
|
23478
|
+
var RetrainArchiveResultSchema = object({
|
|
23479
|
+
batchId: string(),
|
|
23480
|
+
frames: number().int(),
|
|
23481
|
+
crops: number().int(),
|
|
23482
|
+
annotations: number().int(),
|
|
23483
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23484
|
+
missing: number().int(),
|
|
23485
|
+
bytes: number().int(),
|
|
23486
|
+
/** sha256 of the exact bytes sent. */
|
|
23487
|
+
sha256: string(),
|
|
23488
|
+
/** The target's HTTP status. */
|
|
23489
|
+
status: number().int()
|
|
23490
|
+
});
|
|
22465
23491
|
/** What the operator asked the assist to look for. */
|
|
22466
23492
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22467
23493
|
kind: literal("package"),
|
|
@@ -22491,6 +23517,170 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22491
23517
|
reason: string(),
|
|
22492
23518
|
detail: string().optional()
|
|
22493
23519
|
})]);
|
|
23520
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23521
|
+
var RetrainCollectionSchema = object({
|
|
23522
|
+
id: string(),
|
|
23523
|
+
name: string(),
|
|
23524
|
+
createdAt: number(),
|
|
23525
|
+
frameCount: number().int()
|
|
23526
|
+
});
|
|
23527
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23528
|
+
kind: literal("created"),
|
|
23529
|
+
collection: RetrainCollectionSchema
|
|
23530
|
+
}), object({
|
|
23531
|
+
kind: literal("refused"),
|
|
23532
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23533
|
+
})]);
|
|
23534
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23535
|
+
kind: literal("renamed"),
|
|
23536
|
+
collection: RetrainCollectionSchema
|
|
23537
|
+
}), object({
|
|
23538
|
+
kind: literal("refused"),
|
|
23539
|
+
reason: _enum([
|
|
23540
|
+
"empty-name",
|
|
23541
|
+
"duplicate-name",
|
|
23542
|
+
"unknown-collection"
|
|
23543
|
+
])
|
|
23544
|
+
})]);
|
|
23545
|
+
/**
|
|
23546
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23547
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23548
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23549
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23550
|
+
*/
|
|
23551
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23552
|
+
kind: literal("added"),
|
|
23553
|
+
collectionId: string(),
|
|
23554
|
+
frame: RetrainFrameSchema,
|
|
23555
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23556
|
+
reused: boolean()
|
|
23557
|
+
}), object({
|
|
23558
|
+
kind: literal("refused"),
|
|
23559
|
+
reason: _enum([
|
|
23560
|
+
"unknown-collection",
|
|
23561
|
+
"still-unavailable",
|
|
23562
|
+
"still-busy",
|
|
23563
|
+
"unreadable-image",
|
|
23564
|
+
"write-failed"
|
|
23565
|
+
]),
|
|
23566
|
+
detail: string().optional()
|
|
23567
|
+
})]);
|
|
23568
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23569
|
+
var RetrainAssistProfileSchema = object({
|
|
23570
|
+
id: string(),
|
|
23571
|
+
name: string(),
|
|
23572
|
+
model: string(),
|
|
23573
|
+
kind: string(),
|
|
23574
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23575
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23576
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23577
|
+
leavesHouse: boolean()
|
|
23578
|
+
});
|
|
23579
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23580
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23581
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23582
|
+
var RetrainLlmReviewSchema = object({
|
|
23583
|
+
/** The `ref` the page sent the box under. */
|
|
23584
|
+
ref: string(),
|
|
23585
|
+
verdict: _enum([
|
|
23586
|
+
"confirmed",
|
|
23587
|
+
"wrong-class",
|
|
23588
|
+
"not-an-object",
|
|
23589
|
+
"uncertain"
|
|
23590
|
+
]),
|
|
23591
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23592
|
+
reason: string()
|
|
23593
|
+
});
|
|
23594
|
+
/**
|
|
23595
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23596
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23597
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23598
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23599
|
+
*/
|
|
23600
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23601
|
+
kind: literal("proposed"),
|
|
23602
|
+
profileId: string(),
|
|
23603
|
+
model: string(),
|
|
23604
|
+
/** The frame was sent outside the house for this answer. */
|
|
23605
|
+
leftHouse: boolean(),
|
|
23606
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23607
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23608
|
+
rejected: number().int()
|
|
23609
|
+
}), object({
|
|
23610
|
+
kind: literal("refused"),
|
|
23611
|
+
reason: _enum([
|
|
23612
|
+
"unknown-frame",
|
|
23613
|
+
"unreadable-frame",
|
|
23614
|
+
"unknown-profile",
|
|
23615
|
+
"profile-disabled",
|
|
23616
|
+
"no-vision",
|
|
23617
|
+
"cloud-not-confirmed",
|
|
23618
|
+
"llm-error",
|
|
23619
|
+
"malformed-answer"
|
|
23620
|
+
]),
|
|
23621
|
+
detail: string().optional()
|
|
23622
|
+
})]);
|
|
23623
|
+
/** What a dataset version is cut from. Every field narrows. */
|
|
23624
|
+
var RetrainDatasetSelectionSchema = object({
|
|
23625
|
+
deviceIds: array(number()).readonly().optional(),
|
|
23626
|
+
collectionIds: array(string()).max(200).readonly().optional(),
|
|
23627
|
+
frameIds: array(string()).max(2e4).readonly().optional()
|
|
23628
|
+
});
|
|
23629
|
+
/** The counts a dataset is judged by. */
|
|
23630
|
+
var RetrainDatasetStatsSchema = object({
|
|
23631
|
+
frames: number().int(),
|
|
23632
|
+
completeFrames: number().int(),
|
|
23633
|
+
/** `completeFrames / frames`, 0..1. */
|
|
23634
|
+
completeness: number(),
|
|
23635
|
+
/** Boxes to learn (model errors excluded). */
|
|
23636
|
+
subjects: number().int(),
|
|
23637
|
+
modelErrors: number().int(),
|
|
23638
|
+
/** Complete frames with no subject. */
|
|
23639
|
+
hardNegatives: number().int(),
|
|
23640
|
+
/** Subjects per class × camera × day/night. */
|
|
23641
|
+
cells: array(object({
|
|
23642
|
+
macroClass: string(),
|
|
23643
|
+
deviceId: number(),
|
|
23644
|
+
lighting: _enum([
|
|
23645
|
+
"day",
|
|
23646
|
+
"night",
|
|
23647
|
+
"unknown"
|
|
23648
|
+
]),
|
|
23649
|
+
subjects: number().int(),
|
|
23650
|
+
frames: number().int()
|
|
23651
|
+
})).readonly(),
|
|
23652
|
+
cameras: array(object({
|
|
23653
|
+
deviceId: number(),
|
|
23654
|
+
frames: number().int(),
|
|
23655
|
+
completeFrames: number().int()
|
|
23656
|
+
})).readonly()
|
|
23657
|
+
});
|
|
23658
|
+
/** An immutable dataset version, without its frame list. */
|
|
23659
|
+
var RetrainDatasetVersionSchema = object({
|
|
23660
|
+
id: string(),
|
|
23661
|
+
name: string(),
|
|
23662
|
+
createdAt: number(),
|
|
23663
|
+
selection: RetrainDatasetSelectionSchema,
|
|
23664
|
+
layout: RetrainExportLayoutSchema,
|
|
23665
|
+
completeOnly: boolean(),
|
|
23666
|
+
frameCount: number().int(),
|
|
23667
|
+
/** sha256 of what the frames taught when the version was frozen. */
|
|
23668
|
+
annotationHash: string(),
|
|
23669
|
+
/** The export manifest schema the version was cut under. */
|
|
23670
|
+
manifestSchema: string(),
|
|
23671
|
+
stats: RetrainDatasetStatsSchema
|
|
23672
|
+
});
|
|
23673
|
+
var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
|
|
23674
|
+
kind: literal("created"),
|
|
23675
|
+
version: RetrainDatasetVersionSchema
|
|
23676
|
+
}), object({
|
|
23677
|
+
kind: literal("refused"),
|
|
23678
|
+
reason: _enum([
|
|
23679
|
+
"empty-name",
|
|
23680
|
+
"duplicate-name",
|
|
23681
|
+
"no-frames"
|
|
23682
|
+
])
|
|
23683
|
+
})]);
|
|
22494
23684
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22495
23685
|
var RetrainTransitionResultSchema = object({
|
|
22496
23686
|
trackId: string(),
|
|
@@ -23208,7 +24398,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23208
24398
|
auth: "admin"
|
|
23209
24399
|
}), method(object({
|
|
23210
24400
|
deviceId: number(),
|
|
23211
|
-
trackId: string(),
|
|
24401
|
+
trackId: string().optional(),
|
|
23212
24402
|
frameId: string()
|
|
23213
24403
|
}), object({
|
|
23214
24404
|
removed: boolean(),
|
|
@@ -23225,7 +24415,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23225
24415
|
auth: "admin"
|
|
23226
24416
|
}), method(object({
|
|
23227
24417
|
deviceId: number(),
|
|
23228
|
-
|
|
24418
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24419
|
+
trackId: string().optional(),
|
|
23229
24420
|
frameId: string(),
|
|
23230
24421
|
subject: RetrainAssistSubjectSchema,
|
|
23231
24422
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23233,12 +24424,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23233
24424
|
}), RetrainAssistResultSchema, {
|
|
23234
24425
|
kind: "mutation",
|
|
23235
24426
|
auth: "admin"
|
|
23236
|
-
}), method(object({
|
|
24427
|
+
}), method(object({
|
|
24428
|
+
trackId: string().optional(),
|
|
24429
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24430
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23237
24431
|
kind: "query",
|
|
23238
24432
|
auth: "admin"
|
|
23239
24433
|
}), method(object({
|
|
23240
24434
|
deviceId: number(),
|
|
23241
|
-
|
|
24435
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24436
|
+
trackId: string().optional(),
|
|
23242
24437
|
frameId: string(),
|
|
23243
24438
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23244
24439
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23256,7 +24451,121 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23256
24451
|
}), RetrainTransitionResultSchema, {
|
|
23257
24452
|
kind: "mutation",
|
|
23258
24453
|
auth: "admin"
|
|
23259
|
-
}), method(
|
|
24454
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24455
|
+
kind: "query",
|
|
24456
|
+
auth: "admin"
|
|
24457
|
+
}), method(object({
|
|
24458
|
+
deviceId: number(),
|
|
24459
|
+
trackId: string().optional(),
|
|
24460
|
+
frameId: string(),
|
|
24461
|
+
complete: boolean()
|
|
24462
|
+
}), RetrainFrameSchema, {
|
|
24463
|
+
kind: "mutation",
|
|
24464
|
+
auth: "admin"
|
|
24465
|
+
}), method(object({
|
|
24466
|
+
filter: RetrainExportFilterSchema,
|
|
24467
|
+
layout: RetrainExportLayoutSchema,
|
|
24468
|
+
target: RetrainArchiveTargetSchema
|
|
24469
|
+
}), RetrainArchiveResultSchema, {
|
|
24470
|
+
kind: "mutation",
|
|
24471
|
+
auth: "admin",
|
|
24472
|
+
timeoutMs: 60 * 6e4
|
|
24473
|
+
}), method(object({
|
|
24474
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24475
|
+
completeOnly: boolean().optional()
|
|
24476
|
+
}), RetrainDatasetStatsSchema, {
|
|
24477
|
+
kind: "query",
|
|
24478
|
+
auth: "admin"
|
|
24479
|
+
}), method(object({
|
|
24480
|
+
name: string().max(120),
|
|
24481
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24482
|
+
layout: RetrainExportLayoutSchema,
|
|
24483
|
+
completeOnly: boolean()
|
|
24484
|
+
}), CreateRetrainDatasetVersionResultSchema, {
|
|
24485
|
+
kind: "mutation",
|
|
24486
|
+
auth: "admin",
|
|
24487
|
+
timeoutMs: 12e4
|
|
24488
|
+
}), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
|
|
24489
|
+
kind: "query",
|
|
24490
|
+
auth: "admin"
|
|
24491
|
+
}), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
24492
|
+
kind: "mutation",
|
|
24493
|
+
auth: "admin"
|
|
24494
|
+
}), method(object({ id: string() }), object({
|
|
24495
|
+
found: boolean(),
|
|
24496
|
+
annotationHash: string(),
|
|
24497
|
+
matches: boolean(),
|
|
24498
|
+
missingFrames: number().int()
|
|
24499
|
+
}), {
|
|
24500
|
+
kind: "query",
|
|
24501
|
+
auth: "admin",
|
|
24502
|
+
timeoutMs: 12e4
|
|
24503
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24504
|
+
kind: "query",
|
|
24505
|
+
auth: "admin"
|
|
24506
|
+
}), method(object({
|
|
24507
|
+
deviceId: number(),
|
|
24508
|
+
trackId: string().optional(),
|
|
24509
|
+
frameId: string(),
|
|
24510
|
+
profileId: string(),
|
|
24511
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24512
|
+
boxes: array(object({
|
|
24513
|
+
ref: string(),
|
|
24514
|
+
bbox: RetrainBboxSchema,
|
|
24515
|
+
macroClass: RetrainMacroClassSchema,
|
|
24516
|
+
label: string().optional()
|
|
24517
|
+
})).max(50),
|
|
24518
|
+
allowCloud: boolean()
|
|
24519
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24520
|
+
kind: "mutation",
|
|
24521
|
+
auth: "admin",
|
|
24522
|
+
timeoutMs: 18e4
|
|
24523
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24524
|
+
kind: "mutation",
|
|
24525
|
+
auth: "admin"
|
|
24526
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24527
|
+
kind: "query",
|
|
24528
|
+
auth: "admin"
|
|
24529
|
+
}), method(object({
|
|
24530
|
+
id: string(),
|
|
24531
|
+
name: string().max(120)
|
|
24532
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24533
|
+
kind: "mutation",
|
|
24534
|
+
auth: "admin"
|
|
24535
|
+
}), method(object({ id: string() }), object({
|
|
24536
|
+
deleted: boolean(),
|
|
24537
|
+
removedFrames: number().int()
|
|
24538
|
+
}), {
|
|
24539
|
+
kind: "mutation",
|
|
24540
|
+
auth: "admin"
|
|
24541
|
+
}), method(object({
|
|
24542
|
+
collectionId: string(),
|
|
24543
|
+
deviceId: number(),
|
|
24544
|
+
epochMs: number()
|
|
24545
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24546
|
+
kind: "mutation",
|
|
24547
|
+
auth: "admin",
|
|
24548
|
+
timeoutMs: 6e4
|
|
24549
|
+
}), method(object({
|
|
24550
|
+
collectionId: string(),
|
|
24551
|
+
frameIds: array(string()).min(1).max(500)
|
|
24552
|
+
}), object({
|
|
24553
|
+
added: number().int(),
|
|
24554
|
+
alreadyMember: number().int(),
|
|
24555
|
+
unknownFrameIds: array(string()).readonly()
|
|
24556
|
+
}), {
|
|
24557
|
+
kind: "mutation",
|
|
24558
|
+
auth: "admin"
|
|
24559
|
+
}), method(object({
|
|
24560
|
+
collectionId: string(),
|
|
24561
|
+
frameId: string()
|
|
24562
|
+
}), object({
|
|
24563
|
+
removed: boolean(),
|
|
24564
|
+
deletedFrame: boolean()
|
|
24565
|
+
}), {
|
|
24566
|
+
kind: "mutation",
|
|
24567
|
+
auth: "admin"
|
|
24568
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23260
24569
|
kind: "query",
|
|
23261
24570
|
auth: "admin"
|
|
23262
24571
|
}), method(object({
|
|
@@ -23309,6 +24618,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23309
24618
|
timestamp: number()
|
|
23310
24619
|
});
|
|
23311
24620
|
/**
|
|
24621
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
24622
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
24623
|
+
*/
|
|
24624
|
+
var SuppliedRootOutputSchema = object({
|
|
24625
|
+
stepId: string(),
|
|
24626
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
24627
|
+
modelId: string(),
|
|
24628
|
+
detections: array(object({
|
|
24629
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
24630
|
+
bbox: tuple([
|
|
24631
|
+
number(),
|
|
24632
|
+
number(),
|
|
24633
|
+
number(),
|
|
24634
|
+
number()
|
|
24635
|
+
]),
|
|
24636
|
+
score: number(),
|
|
24637
|
+
/**
|
|
24638
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
24639
|
+
* detector already re-found inside a root face box (D730), so its
|
|
24640
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
24641
|
+
*/
|
|
24642
|
+
landmarks: array(object({
|
|
24643
|
+
x: number(),
|
|
24644
|
+
y: number()
|
|
24645
|
+
})).optional()
|
|
24646
|
+
})).min(1)
|
|
24647
|
+
});
|
|
24648
|
+
/**
|
|
23312
24649
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
23313
24650
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
23314
24651
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -23356,7 +24693,7 @@ var FrameRefSchema = object({
|
|
|
23356
24693
|
timestamp: number(),
|
|
23357
24694
|
capturedAt: number().optional()
|
|
23358
24695
|
});
|
|
23359
|
-
var ModelFormatSchema$
|
|
24696
|
+
var ModelFormatSchema$2 = _enum([
|
|
23360
24697
|
"onnx",
|
|
23361
24698
|
"coreml",
|
|
23362
24699
|
"openvino",
|
|
@@ -23374,7 +24711,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23374
24711
|
var PipelineEngineChoiceSchema = object({
|
|
23375
24712
|
runtime: literal("python"),
|
|
23376
24713
|
backend: string(),
|
|
23377
|
-
format: ModelFormatSchema$
|
|
24714
|
+
format: ModelFormatSchema$2,
|
|
23378
24715
|
device: string().optional()
|
|
23379
24716
|
});
|
|
23380
24717
|
/**
|
|
@@ -23413,32 +24750,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23413
24750
|
group: string().optional(),
|
|
23414
24751
|
settings: record(string(), unknown()).optional()
|
|
23415
24752
|
}));
|
|
23416
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23417
|
-
addonId: string(),
|
|
23418
|
-
enabled: boolean(),
|
|
23419
|
-
modelId: string(),
|
|
23420
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23421
|
-
settings: record(string(), unknown()).optional()
|
|
23422
|
-
}));
|
|
23423
|
-
var PipelineTemplateSchema$1 = object({
|
|
23424
|
-
id: string(),
|
|
23425
|
-
name: string(),
|
|
23426
|
-
createdAt: string(),
|
|
23427
|
-
updatedAt: string(),
|
|
23428
|
-
engine: PipelineEngineChoiceSchema,
|
|
23429
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23430
|
-
});
|
|
23431
24753
|
var PipelineModelOptionSchema = object({
|
|
23432
24754
|
id: string(),
|
|
23433
24755
|
name: string(),
|
|
23434
|
-
formats: record(string(),
|
|
23435
|
-
downloaded: boolean(),
|
|
23436
|
-
sizeMB: number()
|
|
23437
|
-
})),
|
|
24756
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23438
24757
|
group: ModelVariantGroupSchema.optional(),
|
|
23439
24758
|
legacy: boolean().optional(),
|
|
23440
24759
|
provider: ModelProviderIdSchema.optional(),
|
|
23441
|
-
defaultConfidence: number().optional()
|
|
24760
|
+
defaultConfidence: number().optional(),
|
|
24761
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
23442
24762
|
});
|
|
23443
24763
|
var ConfigFieldBridge = custom();
|
|
23444
24764
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -23600,6 +24920,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23600
24920
|
}), {
|
|
23601
24921
|
kind: "mutation",
|
|
23602
24922
|
auth: "admin"
|
|
24923
|
+
}), method(object({
|
|
24924
|
+
nodeId: string(),
|
|
24925
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24926
|
+
dryRun: boolean()
|
|
24927
|
+
}), object({
|
|
24928
|
+
entries: array(object({
|
|
24929
|
+
deviceId: number(),
|
|
24930
|
+
keys: array(string()).readonly()
|
|
24931
|
+
})).readonly(),
|
|
24932
|
+
refused: array(object({
|
|
24933
|
+
deviceId: number(),
|
|
24934
|
+
reason: string()
|
|
24935
|
+
})).readonly()
|
|
24936
|
+
}), {
|
|
24937
|
+
kind: "mutation",
|
|
24938
|
+
auth: "admin"
|
|
23603
24939
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23604
24940
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23605
24941
|
deviceKey: string(),
|
|
@@ -23625,22 +24961,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23625
24961
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23626
24962
|
steps: array(PipelineStepInputSchema),
|
|
23627
24963
|
deviceKey: string().optional()
|
|
23628
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23629
|
-
name: string(),
|
|
23630
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23631
|
-
engine: PipelineEngineChoiceSchema
|
|
23632
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23633
|
-
id: string(),
|
|
23634
|
-
name: string().optional(),
|
|
23635
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23636
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24964
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23637
24965
|
addonId: string(),
|
|
23638
24966
|
modelId: string(),
|
|
23639
|
-
format: ModelFormatSchema$
|
|
24967
|
+
format: ModelFormatSchema$2
|
|
23640
24968
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23641
24969
|
addonId: string(),
|
|
23642
24970
|
modelId: string(),
|
|
23643
|
-
format: ModelFormatSchema$
|
|
24971
|
+
format: ModelFormatSchema$2
|
|
23644
24972
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23645
24973
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23646
24974
|
frame: FrameInputSchema.optional(),
|
|
@@ -23706,7 +25034,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23706
25034
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
23707
25035
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
23708
25036
|
*/
|
|
23709
|
-
replay: literal(true).optional()
|
|
25037
|
+
replay: literal(true).optional(),
|
|
25038
|
+
/**
|
|
25039
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
25040
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
25041
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
25042
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
25043
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
25044
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
25045
|
+
*/
|
|
25046
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
23710
25047
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
23711
25048
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23712
25049
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -23788,6 +25125,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23788
25125
|
filename: string().optional(),
|
|
23789
25126
|
settings: record(string(), unknown()).optional()
|
|
23790
25127
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
25128
|
+
/**
|
|
25129
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
25130
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
25131
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
25132
|
+
* schemas are what crosses the cap boundary.
|
|
25133
|
+
*/
|
|
25134
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
25135
|
+
/** The operator's range for it. */
|
|
25136
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
25137
|
+
min: 1,
|
|
25138
|
+
max: 8
|
|
25139
|
+
};
|
|
25140
|
+
var HardwareClassIdSchema = _enum([
|
|
25141
|
+
"intel-core-ultra",
|
|
25142
|
+
"intel-n-series",
|
|
25143
|
+
"apple-m-base",
|
|
25144
|
+
"apple-m-pro",
|
|
25145
|
+
"unknown"
|
|
25146
|
+
]);
|
|
25147
|
+
var AcceleratorKindSchema = _enum([
|
|
25148
|
+
"intel-npu",
|
|
25149
|
+
"intel-igpu",
|
|
25150
|
+
"x86-cpu",
|
|
25151
|
+
"arm-cpu",
|
|
25152
|
+
"apple-ane",
|
|
25153
|
+
"coral"
|
|
25154
|
+
]);
|
|
25155
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
25156
|
+
object({
|
|
25157
|
+
kind: literal("capacity"),
|
|
25158
|
+
sessions: number(),
|
|
25159
|
+
minSessions: number()
|
|
25160
|
+
}),
|
|
25161
|
+
object({
|
|
25162
|
+
kind: literal("tie-faster"),
|
|
25163
|
+
over: string(),
|
|
25164
|
+
recallDelta: number()
|
|
25165
|
+
}),
|
|
25166
|
+
object({
|
|
25167
|
+
kind: literal("stepped-down"),
|
|
25168
|
+
from: string(),
|
|
25169
|
+
to: string(),
|
|
25170
|
+
limitedBy: string()
|
|
25171
|
+
}),
|
|
25172
|
+
object({
|
|
25173
|
+
kind: literal("no-fit-lightest"),
|
|
25174
|
+
sessions: number(),
|
|
25175
|
+
minSessions: number()
|
|
25176
|
+
}),
|
|
25177
|
+
object({
|
|
25178
|
+
kind: literal("derived-latency"),
|
|
25179
|
+
modelId: string()
|
|
25180
|
+
}),
|
|
25181
|
+
object({ kind: literal("cpu-device") }),
|
|
25182
|
+
object({ kind: literal("coral-untouched") }),
|
|
25183
|
+
object({ kind: literal("device-disabled") }),
|
|
25184
|
+
object({ kind: literal("device-unavailable") }),
|
|
25185
|
+
object({ kind: literal("node-offline") }),
|
|
25186
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
25187
|
+
object({
|
|
25188
|
+
kind: literal("no-measured-data"),
|
|
25189
|
+
hardwareClass: HardwareClassIdSchema
|
|
25190
|
+
}),
|
|
25191
|
+
object({
|
|
25192
|
+
kind: literal("no-family-build"),
|
|
25193
|
+
format: ModelFormatSchema$1
|
|
25194
|
+
}),
|
|
25195
|
+
object({
|
|
25196
|
+
kind: literal("kept-custom-pin"),
|
|
25197
|
+
modelId: string(),
|
|
25198
|
+
deviceKey: string()
|
|
25199
|
+
})
|
|
25200
|
+
]);
|
|
25201
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25202
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25203
|
+
/**
|
|
25204
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25205
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25206
|
+
*/
|
|
25207
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25208
|
+
kind: literal("node-benchmark"),
|
|
25209
|
+
resultId: string(),
|
|
25210
|
+
measuredAtMs: number()
|
|
25211
|
+
})]);
|
|
25212
|
+
var DeviceModelChoiceSchema = object({
|
|
25213
|
+
modelId: string(),
|
|
25214
|
+
p50Ms: number(),
|
|
25215
|
+
fps: number(),
|
|
25216
|
+
measured: boolean(),
|
|
25217
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25218
|
+
source: LatencySourceSchema.optional(),
|
|
25219
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
25220
|
+
capacitySessions: number(),
|
|
25221
|
+
personRecall: number()
|
|
25222
|
+
});
|
|
25223
|
+
var DeviceRecommendationSchema = object({
|
|
25224
|
+
deviceKey: string(),
|
|
25225
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
25226
|
+
enabled: boolean(),
|
|
25227
|
+
available: boolean(),
|
|
25228
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25229
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25230
|
+
kept: KeptReasonSchema.optional(),
|
|
25231
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25232
|
+
});
|
|
25233
|
+
var NodeRecommendationSchema = object({
|
|
25234
|
+
nodeId: string(),
|
|
25235
|
+
reachable: boolean(),
|
|
25236
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
25237
|
+
cpuModel: string().nullable(),
|
|
25238
|
+
skipped: boolean(),
|
|
25239
|
+
acceleratorModelId: string().nullable(),
|
|
25240
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
25241
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
25242
|
+
});
|
|
25243
|
+
var ModelPinChangeSchema = object({
|
|
25244
|
+
stepId: string(),
|
|
25245
|
+
before: string().nullable(),
|
|
25246
|
+
after: string().nullable()
|
|
25247
|
+
});
|
|
25248
|
+
var NodeDeviceChangeSchema = object({
|
|
25249
|
+
nodeId: string(),
|
|
25250
|
+
deviceKey: string(),
|
|
25251
|
+
madeExplicit: boolean(),
|
|
25252
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
25253
|
+
thresholds: array(object({
|
|
25254
|
+
stepId: string(),
|
|
25255
|
+
keys: array(string()).readonly()
|
|
25256
|
+
})).readonly()
|
|
25257
|
+
});
|
|
25258
|
+
var CameraOverrideClearSchema = object({
|
|
25259
|
+
deviceId: number(),
|
|
25260
|
+
source: _enum(["step-override", "wholesale"]),
|
|
25261
|
+
nodeId: string(),
|
|
25262
|
+
deviceKey: string().nullable(),
|
|
25263
|
+
stepId: string(),
|
|
25264
|
+
modelIdBefore: string().nullable(),
|
|
25265
|
+
keys: array(string()).readonly()
|
|
25266
|
+
});
|
|
25267
|
+
var DetectorStoreClearSchema = object({
|
|
25268
|
+
deviceId: number(),
|
|
25269
|
+
keys: array(string()).readonly()
|
|
25270
|
+
});
|
|
25271
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
25272
|
+
object({
|
|
25273
|
+
kind: literal("detector-store-cluster-wide"),
|
|
25274
|
+
skippedNodes: array(string()).readonly()
|
|
25275
|
+
}),
|
|
25276
|
+
object({
|
|
25277
|
+
kind: literal("detector-store-unreadable"),
|
|
25278
|
+
error: string()
|
|
25279
|
+
}),
|
|
25280
|
+
object({
|
|
25281
|
+
kind: literal("coral-enabled"),
|
|
25282
|
+
nodeId: string(),
|
|
25283
|
+
deviceKey: string()
|
|
25284
|
+
}),
|
|
25285
|
+
object({
|
|
25286
|
+
kind: literal("custom-pin-kept"),
|
|
25287
|
+
nodeId: string(),
|
|
25288
|
+
deviceKey: string().nullable(),
|
|
25289
|
+
deviceId: number().nullable(),
|
|
25290
|
+
modelId: string()
|
|
25291
|
+
}),
|
|
25292
|
+
object({
|
|
25293
|
+
kind: literal("custom-registry-unreadable"),
|
|
25294
|
+
error: string()
|
|
25295
|
+
})
|
|
25296
|
+
]);
|
|
25297
|
+
var AutoTuneOptionsSchema = object({
|
|
25298
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
25299
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25300
|
+
/**
|
|
25301
|
+
* The least number of parallel sessions every device must sustain at the
|
|
25302
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
25303
|
+
* that reaches it wins.
|
|
25304
|
+
*/
|
|
25305
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25306
|
+
});
|
|
25307
|
+
var AutoTunePlanSchema = object({
|
|
25308
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
25309
|
+
planHash: string(),
|
|
25310
|
+
family: literal("yolov9"),
|
|
25311
|
+
headroom: number(),
|
|
25312
|
+
minSessionsPerDevice: number(),
|
|
25313
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
25314
|
+
cameraFps: number(),
|
|
25315
|
+
generatedAt: number(),
|
|
25316
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
25317
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
25318
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
25319
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
25320
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
25321
|
+
});
|
|
25322
|
+
var AutoTuneApplyInputSchema = object({
|
|
25323
|
+
planHash: string(),
|
|
25324
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25325
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
25326
|
+
});
|
|
25327
|
+
var AutoTunePhaseResultSchema = object({
|
|
25328
|
+
phase: _enum([
|
|
25329
|
+
"download",
|
|
25330
|
+
"camera-overrides",
|
|
25331
|
+
"detector-thresholds",
|
|
25332
|
+
"node-models",
|
|
25333
|
+
"redispatch"
|
|
25334
|
+
]),
|
|
25335
|
+
ok: boolean(),
|
|
25336
|
+
detail: string()
|
|
25337
|
+
});
|
|
25338
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
25339
|
+
object({
|
|
25340
|
+
kind: literal("applied"),
|
|
25341
|
+
planHash: string(),
|
|
25342
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25343
|
+
}),
|
|
25344
|
+
object({
|
|
25345
|
+
kind: literal("aborted"),
|
|
25346
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
25347
|
+
}),
|
|
25348
|
+
object({
|
|
25349
|
+
kind: literal("stale"),
|
|
25350
|
+
plan: AutoTunePlanSchema
|
|
25351
|
+
}),
|
|
25352
|
+
object({
|
|
25353
|
+
kind: literal("refused"),
|
|
25354
|
+
reason: _enum(["apply-in-progress"])
|
|
25355
|
+
})
|
|
25356
|
+
]);
|
|
25357
|
+
/**
|
|
25358
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25359
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25360
|
+
* hardware share suggestion and the stale device pins.
|
|
25361
|
+
*/
|
|
25362
|
+
/**
|
|
25363
|
+
* How a new detection session picks its node and device.
|
|
25364
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25365
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25366
|
+
* weight only bites once a node already holds a session.
|
|
25367
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25368
|
+
* full or drowning node yields to a free one (D748).
|
|
25369
|
+
*/
|
|
25370
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25371
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25372
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25373
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25374
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25375
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25376
|
+
});
|
|
25377
|
+
var PlacementStatsInputSchema = object({
|
|
25378
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25379
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25380
|
+
var PlacementDeviceStatsSchema = object({
|
|
25381
|
+
deviceKey: string(),
|
|
25382
|
+
/** Sessions running on this device now. */
|
|
25383
|
+
sessionsNow: number(),
|
|
25384
|
+
/** Sessions started on this device inside the window. */
|
|
25385
|
+
sessionsStarted: number(),
|
|
25386
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25387
|
+
observedShare: number().nullable()
|
|
25388
|
+
});
|
|
25389
|
+
var PlacementNodeStatsSchema = object({
|
|
25390
|
+
nodeId: string(),
|
|
25391
|
+
sessionsNow: number(),
|
|
25392
|
+
sessionsStarted: number(),
|
|
25393
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25394
|
+
observedShare: number().nullable(),
|
|
25395
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25396
|
+
peakSessions: number(),
|
|
25397
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25398
|
+
yieldsAway: number(),
|
|
25399
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25400
|
+
});
|
|
25401
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25402
|
+
var StaleDevicePinSchema = object({
|
|
25403
|
+
deviceId: number(),
|
|
25404
|
+
deviceKey: string(),
|
|
25405
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25406
|
+
reason: _enum(["disabled", "absent"])
|
|
25407
|
+
});
|
|
25408
|
+
var PlacementStatsSchema = object({
|
|
25409
|
+
policy: SessionPlacementPolicySchema,
|
|
25410
|
+
windowMs: number(),
|
|
25411
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25412
|
+
observedForMs: number(),
|
|
25413
|
+
sessionsNow: number(),
|
|
25414
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25415
|
+
clusterPeakSessions: number(),
|
|
25416
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25417
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25418
|
+
});
|
|
25419
|
+
/**
|
|
25420
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25421
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25422
|
+
* the measured latency table for the node's hardware class.
|
|
25423
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25424
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25425
|
+
*/
|
|
25426
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25427
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25428
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25429
|
+
var SuggestSharesInputSchema = object({
|
|
25430
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25431
|
+
/** Default `hardware`. */
|
|
25432
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25433
|
+
});
|
|
25434
|
+
var SuggestedDeviceShareSchema = object({
|
|
25435
|
+
deviceKey: string(),
|
|
25436
|
+
/** Share of the node (0–100, rounded). */
|
|
25437
|
+
share: number(),
|
|
25438
|
+
modelId: string().nullable(),
|
|
25439
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25440
|
+
fps: number().nullable(),
|
|
25441
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25442
|
+
measured: boolean(),
|
|
25443
|
+
/**
|
|
25444
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25445
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25446
|
+
*/
|
|
25447
|
+
suggestedMaxSessions: number().nullable()
|
|
25448
|
+
});
|
|
25449
|
+
var SuggestedNodeShareSchema = object({
|
|
25450
|
+
nodeId: string(),
|
|
25451
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25452
|
+
share: number().nullable(),
|
|
25453
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25454
|
+
capacitySessions: number(),
|
|
25455
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25456
|
+
skippedReason: string().nullable(),
|
|
25457
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25458
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25459
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25460
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25461
|
+
});
|
|
25462
|
+
var SuggestSharesResultSchema = object({
|
|
25463
|
+
headroom: number(),
|
|
25464
|
+
/** The source asked for; each node says what it actually used. */
|
|
25465
|
+
source: CapacitySourceSchema,
|
|
25466
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25467
|
+
cameraFps: number(),
|
|
25468
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25469
|
+
minSessionsPerDevice: number(),
|
|
25470
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25471
|
+
});
|
|
25472
|
+
/**
|
|
25473
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25474
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25475
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25476
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25477
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25478
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25479
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25480
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25481
|
+
* - `manual` — the operator's stored sliders.
|
|
25482
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25483
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25484
|
+
*/
|
|
25485
|
+
var ShareSourceSchema = _enum([
|
|
25486
|
+
"hardware",
|
|
25487
|
+
"benchmark",
|
|
25488
|
+
"manual"
|
|
25489
|
+
]);
|
|
25490
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25491
|
+
object({
|
|
25492
|
+
nodes: record(string(), number()),
|
|
25493
|
+
devices: record(string(), record(string(), number()))
|
|
25494
|
+
});
|
|
25495
|
+
var EffectiveDeviceShareSchema = object({
|
|
25496
|
+
deviceKey: string(),
|
|
25497
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25498
|
+
eligible: boolean(),
|
|
25499
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25500
|
+
configuredPct: number(),
|
|
25501
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25502
|
+
effectivePct: number()
|
|
25503
|
+
});
|
|
25504
|
+
var EffectiveNodeShareSchema = object({
|
|
25505
|
+
nodeId: string(),
|
|
25506
|
+
eligible: boolean(),
|
|
25507
|
+
configuredPct: number(),
|
|
25508
|
+
effectivePct: number(),
|
|
25509
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25510
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25511
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25512
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25513
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25514
|
+
});
|
|
25515
|
+
var EffectiveSharesSchema = object({
|
|
25516
|
+
source: ShareSourceSchema,
|
|
25517
|
+
policy: SessionPlacementPolicySchema,
|
|
25518
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25519
|
+
autoPending: boolean(),
|
|
25520
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25521
|
+
computedAt: number().nullable(),
|
|
25522
|
+
/** What made the system recompute them last. */
|
|
25523
|
+
trigger: string().nullable(),
|
|
25524
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25525
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25526
|
+
nodeWeights: record(string(), number()),
|
|
25527
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25528
|
+
});
|
|
25529
|
+
/**
|
|
25530
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25531
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25532
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25533
|
+
* shares read.
|
|
25534
|
+
*
|
|
25535
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25536
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25537
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25538
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25539
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25540
|
+
*
|
|
25541
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25542
|
+
* cross a process at frame rate, D9):
|
|
25543
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25544
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25545
|
+
* interval;
|
|
25546
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25547
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25548
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25549
|
+
* CPU, RAM or the event loop give out.
|
|
25550
|
+
*/
|
|
25551
|
+
/** Defaults and bounds, one place. */
|
|
25552
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25553
|
+
fpsPerStream: 10,
|
|
25554
|
+
budgetMinutes: 45,
|
|
25555
|
+
minBudgetMinutes: 10,
|
|
25556
|
+
maxBudgetMinutes: 120,
|
|
25557
|
+
/** A result older than this no longer beats the table. */
|
|
25558
|
+
staleAfterDays: 30,
|
|
25559
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25560
|
+
settleSec: 5,
|
|
25561
|
+
/** Accounted window per ramp step. */
|
|
25562
|
+
measureSec: 20,
|
|
25563
|
+
/** Longest the drain may take before the run is refused. */
|
|
25564
|
+
drainTimeoutSec: 120,
|
|
25565
|
+
/** Candidate models per device in one run. */
|
|
25566
|
+
maxModelsPerDevice: 6
|
|
25567
|
+
};
|
|
25568
|
+
/** The two measurements a run can make. */
|
|
25569
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25570
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25571
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25572
|
+
deviceKey: string().min(1),
|
|
25573
|
+
/**
|
|
25574
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25575
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25576
|
+
*/
|
|
25577
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25578
|
+
});
|
|
25579
|
+
/** What the operator confirmed. */
|
|
25580
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25581
|
+
nodeId: string().min(1),
|
|
25582
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25583
|
+
/** Which measurements run. At least one. */
|
|
25584
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25585
|
+
/**
|
|
25586
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25587
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25588
|
+
* detector always runs.
|
|
25589
|
+
*/
|
|
25590
|
+
steps: array(string().min(1)).default([]),
|
|
25591
|
+
/** Offered rate of one stream / session. */
|
|
25592
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25593
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25594
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25595
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25596
|
+
keepDownloadedModels: boolean().default(false),
|
|
25597
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25598
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25599
|
+
});
|
|
25600
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25601
|
+
kind: _enum([
|
|
25602
|
+
"benchmark-active",
|
|
25603
|
+
"node-offline",
|
|
25604
|
+
"unknown-device",
|
|
25605
|
+
"no-phase",
|
|
25606
|
+
"insufficient-headroom"
|
|
25607
|
+
]),
|
|
25608
|
+
detail: string(),
|
|
25609
|
+
overridable: boolean()
|
|
25610
|
+
});
|
|
25611
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25612
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25613
|
+
deviceId: number(),
|
|
25614
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25615
|
+
placedOnNode: boolean(),
|
|
25616
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25617
|
+
pinnedToNode: boolean()
|
|
25618
|
+
});
|
|
25619
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25620
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25621
|
+
deviceId: number(),
|
|
25622
|
+
reason: literal("only-frame-source")
|
|
25623
|
+
});
|
|
25624
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25625
|
+
nodeId: string(),
|
|
25626
|
+
online: boolean(),
|
|
25627
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25628
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25629
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25630
|
+
estimatedDurationMs: number(),
|
|
25631
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25632
|
+
budgetMs: number(),
|
|
25633
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25634
|
+
steps: array(string()).readonly(),
|
|
25635
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25636
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25637
|
+
headroom: object({
|
|
25638
|
+
sessionsNow: number(),
|
|
25639
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25640
|
+
}),
|
|
25641
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25642
|
+
canStart: boolean()
|
|
25643
|
+
});
|
|
25644
|
+
/** Where the measuring runner is. */
|
|
25645
|
+
var NodeBenchProgressSchema = object({
|
|
25646
|
+
phase: _enum([
|
|
25647
|
+
"preparing",
|
|
25648
|
+
"device",
|
|
25649
|
+
"pipeline",
|
|
25650
|
+
"cleanup"
|
|
25651
|
+
]),
|
|
25652
|
+
deviceKey: string().nullable(),
|
|
25653
|
+
modelId: string().nullable(),
|
|
25654
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25655
|
+
load: number().nullable(),
|
|
25656
|
+
cellsDone: number(),
|
|
25657
|
+
cellsTotal: number(),
|
|
25658
|
+
message: string()
|
|
25659
|
+
});
|
|
25660
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25661
|
+
var NodeBenchLimitSchema = _enum([
|
|
25662
|
+
"p95",
|
|
25663
|
+
"drops",
|
|
25664
|
+
"errors",
|
|
25665
|
+
"stall",
|
|
25666
|
+
"cpu",
|
|
25667
|
+
"ram",
|
|
25668
|
+
"none"
|
|
25669
|
+
]);
|
|
25670
|
+
var NodeBenchRampStepSchema = object({
|
|
25671
|
+
load: number(),
|
|
25672
|
+
pass: boolean(),
|
|
25673
|
+
p95Ms: number(),
|
|
25674
|
+
dropRatio: number(),
|
|
25675
|
+
/** Completed frames per second over the accounted window. */
|
|
25676
|
+
fps: number(),
|
|
25677
|
+
cpuPct: number().nullable(),
|
|
25678
|
+
ramFreePct: number().nullable(),
|
|
25679
|
+
failReasons: array(string()).readonly()
|
|
25680
|
+
});
|
|
25681
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25682
|
+
phase: literal("device"),
|
|
25683
|
+
deviceKey: string(),
|
|
25684
|
+
modelId: string(),
|
|
25685
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25686
|
+
p50Ms: number(),
|
|
25687
|
+
p95Ms: number(),
|
|
25688
|
+
p99Ms: number(),
|
|
25689
|
+
/** Frames per second sustained at the last passing step. */
|
|
25690
|
+
fps: number(),
|
|
25691
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25692
|
+
kMax: number(),
|
|
25693
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25694
|
+
/** First call (model load + warm-up). */
|
|
25695
|
+
warmupMs: number(),
|
|
25696
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25697
|
+
}), object({
|
|
25698
|
+
phase: literal("pipeline"),
|
|
25699
|
+
deviceKey: string(),
|
|
25700
|
+
modelId: string(),
|
|
25701
|
+
steps: array(string()).readonly(),
|
|
25702
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25703
|
+
maxSessions: number(),
|
|
25704
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25705
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25706
|
+
stepsFired: array(string()).readonly(),
|
|
25707
|
+
warmupMs: number(),
|
|
25708
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25709
|
+
})]);
|
|
25710
|
+
/**
|
|
25711
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25712
|
+
* the node no longer beats the table.
|
|
25713
|
+
*/
|
|
25714
|
+
var NodeBenchFingerprintSchema = object({
|
|
25715
|
+
pipelineVersion: string().nullable(),
|
|
25716
|
+
cpuModel: string().nullable(),
|
|
25717
|
+
ramGb: number().nullable(),
|
|
25718
|
+
os: string().nullable(),
|
|
25719
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25720
|
+
pools: record(string(), object({
|
|
25721
|
+
runtime: string(),
|
|
25722
|
+
numWorkers: number(),
|
|
25723
|
+
concurrency: number(),
|
|
25724
|
+
batchMode: string()
|
|
25725
|
+
})).default({})
|
|
25726
|
+
});
|
|
25727
|
+
/** The frames the run used. */
|
|
25728
|
+
var NodeBenchClipSchema = object({
|
|
25729
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25730
|
+
id: string(),
|
|
25731
|
+
revision: string().nullable(),
|
|
25732
|
+
frames: number(),
|
|
25733
|
+
width: number(),
|
|
25734
|
+
height: number()
|
|
25735
|
+
});
|
|
25736
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25737
|
+
runId: string().min(1),
|
|
25738
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25739
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25740
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25741
|
+
steps: array(string()).default([]),
|
|
25742
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25743
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25744
|
+
deadlineAtMs: number(),
|
|
25745
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25746
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25747
|
+
keepDownloadedModels: boolean().default(false)
|
|
25748
|
+
});
|
|
25749
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25750
|
+
"running",
|
|
25751
|
+
"done",
|
|
25752
|
+
"failed",
|
|
25753
|
+
"aborted"
|
|
25754
|
+
]);
|
|
25755
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25756
|
+
runId: string(),
|
|
25757
|
+
nodeId: string(),
|
|
25758
|
+
state: NodeBenchRunnerStateSchema,
|
|
25759
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25760
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25761
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25762
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25763
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25764
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25765
|
+
activeCameraIds: array(number()).readonly(),
|
|
25766
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25767
|
+
deletedModels: array(string()).readonly(),
|
|
25768
|
+
error: string().nullable(),
|
|
25769
|
+
startedAtMs: number(),
|
|
25770
|
+
finishedAtMs: number().nullable()
|
|
25771
|
+
});
|
|
25772
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25773
|
+
"draining",
|
|
25774
|
+
"measuring",
|
|
25775
|
+
"restoring",
|
|
25776
|
+
"done",
|
|
25777
|
+
"failed",
|
|
25778
|
+
"aborted"
|
|
25779
|
+
]);
|
|
25780
|
+
/** Why a run ended. */
|
|
25781
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25782
|
+
"completed",
|
|
25783
|
+
"operator-abort",
|
|
25784
|
+
"deadline",
|
|
25785
|
+
"node-lost",
|
|
25786
|
+
"runner-lost",
|
|
25787
|
+
"hub-restart",
|
|
25788
|
+
"drain-timeout",
|
|
25789
|
+
"failed"
|
|
25790
|
+
]);
|
|
25791
|
+
var NodeBenchmarkRunSchema = object({
|
|
25792
|
+
runId: string(),
|
|
25793
|
+
nodeId: string(),
|
|
25794
|
+
state: NodeBenchmarkStateSchema,
|
|
25795
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25796
|
+
startedAtMs: number(),
|
|
25797
|
+
deadlineAtMs: number(),
|
|
25798
|
+
finishedAtMs: number().nullable(),
|
|
25799
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25800
|
+
error: string().nullable(),
|
|
25801
|
+
/** Cameras moved off the node for the run. */
|
|
25802
|
+
moved: array(number()).readonly(),
|
|
25803
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25804
|
+
staying: array(number()).readonly(),
|
|
25805
|
+
/** Something else ran on the node's pools during the run. */
|
|
25806
|
+
contaminated: boolean(),
|
|
25807
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25808
|
+
resultIds: array(string()).readonly()
|
|
25809
|
+
});
|
|
25810
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25811
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25812
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25813
|
+
modeNodeId: string().nullable(),
|
|
25814
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25815
|
+
});
|
|
25816
|
+
/**
|
|
25817
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25818
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25819
|
+
* ends, never by anyone else.
|
|
25820
|
+
*/
|
|
25821
|
+
var NodeBenchmarkResultSchema = object({
|
|
25822
|
+
id: string(),
|
|
25823
|
+
runId: string(),
|
|
25824
|
+
nodeId: string(),
|
|
25825
|
+
cell: NodeBenchCellSchema,
|
|
25826
|
+
fpsPerStream: number(),
|
|
25827
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25828
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25829
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25830
|
+
contaminated: boolean(),
|
|
25831
|
+
stayingCameras: array(number()).readonly(),
|
|
25832
|
+
/** The run ended early; the cell itself completed. */
|
|
25833
|
+
partialRun: boolean(),
|
|
25834
|
+
measuredAtMs: number()
|
|
25835
|
+
});
|
|
25836
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25837
|
+
nodeId: string().optional(),
|
|
25838
|
+
deviceKey: string().optional()
|
|
25839
|
+
});
|
|
25840
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25841
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25842
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25843
|
+
standing: _enum([
|
|
25844
|
+
"fresh",
|
|
25845
|
+
"stale",
|
|
25846
|
+
"superseded"
|
|
25847
|
+
]),
|
|
25848
|
+
staleWhy: _enum([
|
|
25849
|
+
"age",
|
|
25850
|
+
"runtime",
|
|
25851
|
+
"pool-tuning"
|
|
25852
|
+
]).nullable()
|
|
25853
|
+
});
|
|
25854
|
+
object({
|
|
25855
|
+
runId: string(),
|
|
25856
|
+
nodeId: string(),
|
|
25857
|
+
startedAtMs: number(),
|
|
25858
|
+
deadlineAtMs: number(),
|
|
25859
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25860
|
+
moved: array(number()).readonly(),
|
|
25861
|
+
staying: array(number()).readonly()
|
|
25862
|
+
});
|
|
25863
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25864
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25865
|
+
nodeId: string(),
|
|
25866
|
+
reachable: boolean(),
|
|
25867
|
+
devices: array(object({
|
|
25868
|
+
deviceKey: string(),
|
|
25869
|
+
enabled: boolean(),
|
|
25870
|
+
available: boolean(),
|
|
25871
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25872
|
+
suggested: array(string()).readonly(),
|
|
25873
|
+
/** Every root detector the device has a build for. */
|
|
25874
|
+
all: array(string()).readonly(),
|
|
25875
|
+
/** The model the device runs now, when pinned. */
|
|
25876
|
+
currentModelId: string().nullable()
|
|
25877
|
+
})).readonly(),
|
|
25878
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25879
|
+
steps: array(object({
|
|
25880
|
+
id: string(),
|
|
25881
|
+
name: string(),
|
|
25882
|
+
slot: string()
|
|
25883
|
+
})).readonly()
|
|
25884
|
+
});
|
|
23791
25885
|
object({
|
|
23792
25886
|
activeCameras: number(),
|
|
23793
25887
|
throttledCameras: number(),
|
|
@@ -24705,14 +26799,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24705
26799
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24706
26800
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24707
26801
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24708
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24709
|
-
* per
|
|
26802
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26803
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26804
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26805
|
+
* (D762).
|
|
24710
26806
|
*/
|
|
24711
26807
|
devices: array(object({
|
|
24712
26808
|
deviceKey: string(),
|
|
24713
26809
|
backend: string(),
|
|
24714
|
-
attachedCameras: number()
|
|
24715
|
-
queueDepthTotal: number()
|
|
26810
|
+
attachedCameras: number()
|
|
24716
26811
|
})).default([]),
|
|
24717
26812
|
/** Hardware capability flags reported by this node. */
|
|
24718
26813
|
hardware: object({
|
|
@@ -24848,7 +26943,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24848
26943
|
*/
|
|
24849
26944
|
cropJpeg: string().optional(),
|
|
24850
26945
|
parent: DetailParentSchema,
|
|
24851
|
-
steps: array(string()).optional()
|
|
26946
|
+
steps: array(string()).optional(),
|
|
26947
|
+
/**
|
|
26948
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
26949
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
26950
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
26951
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
26952
|
+
* requested step infers as before.
|
|
26953
|
+
*/
|
|
26954
|
+
supplied: object({
|
|
26955
|
+
stepId: string(),
|
|
26956
|
+
modelId: string(),
|
|
26957
|
+
boxes: array(object({
|
|
26958
|
+
bbox: NativeCropBboxSchema,
|
|
26959
|
+
score: number()
|
|
26960
|
+
})).min(1)
|
|
26961
|
+
}).optional()
|
|
24852
26962
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
24853
26963
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
24854
26964
|
stepId: string(),
|
|
@@ -24900,7 +27010,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24900
27010
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
24901
27011
|
deviceId: number(),
|
|
24902
27012
|
trackId: string()
|
|
24903
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27013
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27014
|
+
accepted: literal(true),
|
|
27015
|
+
runId: string()
|
|
27016
|
+
}), {
|
|
27017
|
+
kind: "mutation",
|
|
27018
|
+
auth: "admin"
|
|
27019
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27020
|
+
kind: "mutation",
|
|
27021
|
+
auth: "admin"
|
|
27022
|
+
});
|
|
24904
27023
|
var CameraPipelineConfigSchema = object({
|
|
24905
27024
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
24906
27025
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24911,14 +27030,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
24911
27030
|
settings: record(string(), unknown()).readonly().optional()
|
|
24912
27031
|
}).nullable().optional()
|
|
24913
27032
|
});
|
|
24914
|
-
var PipelineTemplateSchema = object({
|
|
24915
|
-
id: string(),
|
|
24916
|
-
name: string(),
|
|
24917
|
-
description: string().optional(),
|
|
24918
|
-
config: CameraPipelineConfigSchema,
|
|
24919
|
-
createdAt: string(),
|
|
24920
|
-
updatedAt: string()
|
|
24921
|
-
});
|
|
24922
27033
|
var DeviceStepConfigSchema = object({
|
|
24923
27034
|
modelId: string().optional(),
|
|
24924
27035
|
settings: record(string(), unknown()).optional(),
|
|
@@ -24992,9 +27103,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
24992
27103
|
modelId: string().optional(),
|
|
24993
27104
|
settings: record(string(), unknown()).readonly().optional()
|
|
24994
27105
|
});
|
|
27106
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
24995
27107
|
var CameraPipelineSettingsSchema = object({
|
|
24996
|
-
pinnedAgentNodeId: string().optional(),
|
|
24997
27108
|
stepToggles: record(string(), boolean()).optional(),
|
|
27109
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
24998
27110
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
24999
27111
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
25000
27112
|
});
|
|
@@ -25027,7 +27139,10 @@ var PipelineAssignmentSchema = object({
|
|
|
25027
27139
|
});
|
|
25028
27140
|
/**
|
|
25029
27141
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
25030
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
27142
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
27143
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
27144
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
27145
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
25031
27146
|
*/
|
|
25032
27147
|
var AgentLoadSummarySchema = object({
|
|
25033
27148
|
nodeId: string(),
|
|
@@ -25116,26 +27231,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25116
27231
|
width: number(),
|
|
25117
27232
|
height: number(),
|
|
25118
27233
|
subscribers: number(),
|
|
25119
|
-
|
|
25120
|
-
|
|
27234
|
+
/**
|
|
27235
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
27236
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
27237
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
27238
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
27239
|
+
* camera and is not served (D758).
|
|
27240
|
+
*/
|
|
27241
|
+
inFps: number().nullable()
|
|
25121
27242
|
})).readonly(),
|
|
25122
27243
|
webrtcSessions: number(),
|
|
25123
27244
|
rtspRestream: boolean()
|
|
25124
27245
|
});
|
|
25125
|
-
/**
|
|
25126
|
-
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
|
|
25130
|
-
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
var CameraDecoderStatusSchema = object({
|
|
25134
|
-
nodeId: string(),
|
|
25135
|
-
formats: array(string()).readonly(),
|
|
25136
|
-
sessionCount: number(),
|
|
25137
|
-
shm: CameraDecoderShmSchema
|
|
25138
|
-
});
|
|
27246
|
+
/**
|
|
27247
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
27248
|
+
* construction); null when the camera has no detection node. It carries no
|
|
27249
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
27250
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
27251
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
27252
|
+
* detector), never from a counter nothing feeds.
|
|
27253
|
+
*/
|
|
27254
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25139
27255
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25140
27256
|
var CameraMotionStatusSchema = object({
|
|
25141
27257
|
enabled: boolean(),
|
|
@@ -25492,12 +27608,6 @@ method(object({
|
|
|
25492
27608
|
}), object({ success: literal(true) }), {
|
|
25493
27609
|
kind: "mutation",
|
|
25494
27610
|
auth: "admin"
|
|
25495
|
-
}), method(object({
|
|
25496
|
-
agentNodeId: string(),
|
|
25497
|
-
detectWeight: number().positive().nullable()
|
|
25498
|
-
}), object({ success: literal(true) }), {
|
|
25499
|
-
kind: "mutation",
|
|
25500
|
-
auth: "admin"
|
|
25501
27611
|
}), method(object({
|
|
25502
27612
|
agentNodeId: string(),
|
|
25503
27613
|
detect: boolean().nullable().optional(),
|
|
@@ -25539,6 +27649,30 @@ method(object({
|
|
|
25539
27649
|
}), {
|
|
25540
27650
|
kind: "mutation",
|
|
25541
27651
|
auth: "admin"
|
|
27652
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27653
|
+
kind: "mutation",
|
|
27654
|
+
auth: "admin"
|
|
27655
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27656
|
+
kind: "mutation",
|
|
27657
|
+
auth: "admin"
|
|
27658
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27659
|
+
kind: "mutation",
|
|
27660
|
+
auth: "admin"
|
|
27661
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27662
|
+
kind: literal("started"),
|
|
27663
|
+
runId: string()
|
|
27664
|
+
}), object({
|
|
27665
|
+
kind: literal("refused"),
|
|
27666
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27667
|
+
})]), {
|
|
27668
|
+
kind: "mutation",
|
|
27669
|
+
auth: "admin"
|
|
27670
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27671
|
+
kind: "mutation",
|
|
27672
|
+
auth: "admin"
|
|
27673
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27674
|
+
kind: "mutation",
|
|
27675
|
+
auth: "admin"
|
|
25542
27676
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25543
27677
|
deviceId: number(),
|
|
25544
27678
|
addonId: string(),
|
|
@@ -25555,6 +27689,13 @@ method(object({
|
|
|
25555
27689
|
}), object({ success: literal(true) }), {
|
|
25556
27690
|
kind: "mutation",
|
|
25557
27691
|
auth: "admin"
|
|
27692
|
+
}), method(object({
|
|
27693
|
+
deviceId: number(),
|
|
27694
|
+
addonId: string(),
|
|
27695
|
+
settings: record(string(), unknown()).nullable()
|
|
27696
|
+
}), object({ success: literal(true) }), {
|
|
27697
|
+
kind: "mutation",
|
|
27698
|
+
auth: "admin"
|
|
25558
27699
|
}), method(object({
|
|
25559
27700
|
deviceId: number(),
|
|
25560
27701
|
agentNodeId: string(),
|
|
@@ -25578,25 +27719,7 @@ method(object({
|
|
|
25578
27719
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25579
27720
|
kind: "mutation",
|
|
25580
27721
|
auth: "admin"
|
|
25581
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25582
|
-
name: string(),
|
|
25583
|
-
description: string().optional(),
|
|
25584
|
-
config: CameraPipelineConfigSchema
|
|
25585
|
-
}), PipelineTemplateSchema, {
|
|
25586
|
-
kind: "mutation",
|
|
25587
|
-
auth: "admin"
|
|
25588
|
-
}), method(object({
|
|
25589
|
-
id: string(),
|
|
25590
|
-
name: string().optional(),
|
|
25591
|
-
description: string().optional(),
|
|
25592
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25593
|
-
}), PipelineTemplateSchema, {
|
|
25594
|
-
kind: "mutation",
|
|
25595
|
-
auth: "admin"
|
|
25596
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25597
|
-
kind: "mutation",
|
|
25598
|
-
auth: "admin"
|
|
25599
|
-
});
|
|
27722
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25600
27723
|
/**
|
|
25601
27724
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25602
27725
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26290,7 +28413,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26290
28413
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26291
28414
|
* operator already consented to.
|
|
26292
28415
|
*/
|
|
26293
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
28416
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
28417
|
+
/**
|
|
28418
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
28419
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
28420
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
28421
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
28422
|
+
*/
|
|
28423
|
+
linkIntent: string().optional(),
|
|
28424
|
+
/**
|
|
28425
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
28426
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
28427
|
+
*/
|
|
28428
|
+
issuer: string().optional()
|
|
26294
28429
|
});
|
|
26295
28430
|
method(object({
|
|
26296
28431
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -27993,8 +30128,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
27993
30128
|
]).nullable(),
|
|
27994
30129
|
/** Input FPS from the camera (null for adaptive). */
|
|
27995
30130
|
inputFps: number().nullable(),
|
|
27996
|
-
/** Decoded FPS (null for adaptive). */
|
|
27997
|
-
decodeFps: number().nullable(),
|
|
27998
30131
|
/** Bitrate in kbps (null for adaptive). */
|
|
27999
30132
|
bitrateKbps: number().nullable()
|
|
28000
30133
|
});
|
|
@@ -28271,7 +30404,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28271
30404
|
* field their hints were silently stripped by the schema and the
|
|
28272
30405
|
* adaptive ladder started blind on the client's display size.
|
|
28273
30406
|
*/
|
|
28274
|
-
hints: webrtcClientHintsSchema.optional()
|
|
30407
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
30408
|
+
/**
|
|
30409
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
30410
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
30411
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
30412
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
30413
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
30414
|
+
*
|
|
30415
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
30416
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
30417
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
30418
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
30419
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
30420
|
+
* flag must not become a second door to the camera's speaker.
|
|
30421
|
+
*/
|
|
30422
|
+
talkback: boolean().optional()
|
|
28275
30423
|
}), object({
|
|
28276
30424
|
sessionId: string(),
|
|
28277
30425
|
sdpAnswer: string()
|
|
@@ -28326,6 +30474,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28326
30474
|
*/
|
|
28327
30475
|
alive: boolean()
|
|
28328
30476
|
})), method(object({
|
|
30477
|
+
deviceId: number().int().nonnegative(),
|
|
30478
|
+
sessionId: string(),
|
|
30479
|
+
downlinkMbps: number().nonnegative()
|
|
30480
|
+
}), object({
|
|
30481
|
+
outcome: _enum(["switching", "held"]),
|
|
30482
|
+
tier: CamProfileSchema.nullable(),
|
|
30483
|
+
reason: string()
|
|
30484
|
+
}), { kind: "mutation" }), method(object({
|
|
28329
30485
|
deviceId: number().int().nonnegative(),
|
|
28330
30486
|
sessionId: string()
|
|
28331
30487
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -28565,6 +30721,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
28565
30721
|
var RestartAddonResultSchema = unknown();
|
|
28566
30722
|
var InstallPackageResultSchema = unknown();
|
|
28567
30723
|
var ReloadPackagesResultSchema = unknown();
|
|
30724
|
+
/**
|
|
30725
|
+
* What an uninstall did on ONE node.
|
|
30726
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
30727
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
30728
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
30729
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
30730
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
30731
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
30732
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
30733
|
+
*/
|
|
30734
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
30735
|
+
"uninstalled",
|
|
30736
|
+
"not-installed",
|
|
30737
|
+
"refused",
|
|
30738
|
+
"failed",
|
|
30739
|
+
"pending-reconnect"
|
|
30740
|
+
]);
|
|
30741
|
+
var UninstallNodeResultSchema = object({
|
|
30742
|
+
nodeId: string(),
|
|
30743
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
30744
|
+
error: string().optional(),
|
|
30745
|
+
addonIds: array(string()).readonly(),
|
|
30746
|
+
runnersStopped: array(string()).readonly(),
|
|
30747
|
+
warnings: array(string()).readonly()
|
|
30748
|
+
});
|
|
30749
|
+
var UninstallPackageResultSchema = object({
|
|
30750
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
30751
|
+
success: boolean(),
|
|
30752
|
+
packageName: string(),
|
|
30753
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
30754
|
+
});
|
|
30755
|
+
/**
|
|
30756
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
30757
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
30758
|
+
*/
|
|
30759
|
+
var PackageInstallationsSchema = object({
|
|
30760
|
+
installations: array(object({
|
|
30761
|
+
packageName: string(),
|
|
30762
|
+
nodeId: string(),
|
|
30763
|
+
nodeName: string(),
|
|
30764
|
+
isHub: boolean(),
|
|
30765
|
+
isOnline: boolean(),
|
|
30766
|
+
version: string().nullable(),
|
|
30767
|
+
addonIds: array(string()).readonly(),
|
|
30768
|
+
source: _enum(["live", "recorded"]),
|
|
30769
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
30770
|
+
onHub: boolean()
|
|
30771
|
+
})).readonly(),
|
|
30772
|
+
unreachable: array(object({
|
|
30773
|
+
nodeId: string(),
|
|
30774
|
+
error: string()
|
|
30775
|
+
})).readonly()
|
|
30776
|
+
});
|
|
28568
30777
|
var BulkUpdateItemStatusSchema = _enum([
|
|
28569
30778
|
"queued",
|
|
28570
30779
|
"updating",
|
|
@@ -28647,10 +30856,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
28647
30856
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
28648
30857
|
kind: "mutation",
|
|
28649
30858
|
auth: "admin"
|
|
28650
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30859
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30860
|
+
packageName: string().min(1),
|
|
30861
|
+
nodeId: string().optional(),
|
|
30862
|
+
everywhere: boolean().optional()
|
|
30863
|
+
}), UninstallPackageResultSchema, {
|
|
28651
30864
|
kind: "mutation",
|
|
28652
30865
|
auth: "admin"
|
|
28653
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
30866
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
28654
30867
|
kind: "mutation",
|
|
28655
30868
|
auth: "admin"
|
|
28656
30869
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -31715,6 +33928,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
31715
33928
|
enabled: boolean().optional(),
|
|
31716
33929
|
info: record(string(), unknown()).optional(),
|
|
31717
33930
|
settings: record(string(), unknown()).optional(),
|
|
33931
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
33932
|
+
* the keychain, not the table (D787). */
|
|
33933
|
+
secretKeys: array(string()).optional(),
|
|
31718
33934
|
skipRestart: boolean().optional()
|
|
31719
33935
|
});
|
|
31720
33936
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -31738,7 +33954,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
31738
33954
|
auth: "admin"
|
|
31739
33955
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
31740
33956
|
id: string(),
|
|
31741
|
-
settings: record(string(), unknown())
|
|
33957
|
+
settings: record(string(), unknown()),
|
|
33958
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
33959
|
+
secretKeys: array(string()).optional()
|
|
31742
33960
|
}), object({ success: boolean() }), {
|
|
31743
33961
|
kind: "mutation",
|
|
31744
33962
|
auth: "admin"
|
|
@@ -32137,7 +34355,8 @@ var ConnectionEndpointSchema = object({
|
|
|
32137
34355
|
"lan-ipv6",
|
|
32138
34356
|
"public",
|
|
32139
34357
|
"loopback",
|
|
32140
|
-
"app-link"
|
|
34358
|
+
"app-link",
|
|
34359
|
+
"custom"
|
|
32141
34360
|
]),
|
|
32142
34361
|
/**
|
|
32143
34362
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -32206,7 +34425,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
32206
34425
|
localPort: AdvertisedLocalPortSchema
|
|
32207
34426
|
});
|
|
32208
34427
|
/**
|
|
32209
|
-
* The address flagged for notification
|
|
34428
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
32210
34429
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
32211
34430
|
* so the UI can show it either way.
|
|
32212
34431
|
*/
|
|
@@ -32239,6 +34458,72 @@ var ViewerEndpointsSchema = object({
|
|
|
32239
34458
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
32240
34459
|
resolved: array(string()).readonly()
|
|
32241
34460
|
});
|
|
34461
|
+
/**
|
|
34462
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
34463
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
34464
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
34465
|
+
*/
|
|
34466
|
+
var HubAddressSnapshotSchema = object({
|
|
34467
|
+
override: string().nullable(),
|
|
34468
|
+
resolved: string().nullable(),
|
|
34469
|
+
source: _enum([
|
|
34470
|
+
"override",
|
|
34471
|
+
"auto",
|
|
34472
|
+
"none"
|
|
34473
|
+
])
|
|
34474
|
+
});
|
|
34475
|
+
var HubAddressesSchema = object({
|
|
34476
|
+
cluster: HubAddressSnapshotSchema,
|
|
34477
|
+
browser: HubAddressSnapshotSchema
|
|
34478
|
+
});
|
|
34479
|
+
/**
|
|
34480
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
34481
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
34482
|
+
* by at most one address.
|
|
34483
|
+
*/
|
|
34484
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
34485
|
+
var RoleSourceSchema = _enum([
|
|
34486
|
+
"flagged",
|
|
34487
|
+
"auto",
|
|
34488
|
+
"none"
|
|
34489
|
+
]);
|
|
34490
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
34491
|
+
var HubAddressRoleResolutionSchema = object({
|
|
34492
|
+
/** The address carrying the flag, or null = automatic. */
|
|
34493
|
+
flagged: string().nullable(),
|
|
34494
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
34495
|
+
resolved: string().nullable(),
|
|
34496
|
+
source: RoleSourceSchema
|
|
34497
|
+
});
|
|
34498
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
34499
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
34500
|
+
flagged: array(string()).readonly(),
|
|
34501
|
+
/** What the apps race right now. */
|
|
34502
|
+
resolved: array(string()).readonly(),
|
|
34503
|
+
source: RoleSourceSchema
|
|
34504
|
+
});
|
|
34505
|
+
var HubAddressBookSchema = object({
|
|
34506
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
34507
|
+
/** In the hub's detected palette right now. */
|
|
34508
|
+
detected: boolean(),
|
|
34509
|
+
/** Entered by the operator (removable). */
|
|
34510
|
+
custom: boolean(),
|
|
34511
|
+
/** The roles explicitly flagged on this address. */
|
|
34512
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
34513
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
34514
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
34515
|
+
/** The roles this address may be flagged with. */
|
|
34516
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
34517
|
+
})).readonly(),
|
|
34518
|
+
roles: object({
|
|
34519
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
34520
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
34521
|
+
internal: HubAddressRoleResolutionSchema,
|
|
34522
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
34523
|
+
}),
|
|
34524
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
34525
|
+
appLinkHub: string().nullable()
|
|
34526
|
+
});
|
|
32242
34527
|
var AllowedAddressesSchema = object({
|
|
32243
34528
|
/**
|
|
32244
34529
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -32282,10 +34567,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
32282
34567
|
* tunnel always emits `https://` regardless. */
|
|
32283
34568
|
scheme: _enum(["http", "https"]).optional(),
|
|
32284
34569
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
32285
|
-
* an address notification
|
|
34570
|
+
* an address notification taps can be flagged with, not a hub
|
|
32286
34571
|
* route. Default `false`: racers and rankers never see it. */
|
|
32287
34572
|
includeAppLink: boolean().optional()
|
|
32288
|
-
}), 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(
|
|
34573
|
+
}), 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({
|
|
34574
|
+
baseUrl: string(),
|
|
34575
|
+
label: string().max(80)
|
|
34576
|
+
}), HubAddressBookSchema, {
|
|
34577
|
+
kind: "mutation",
|
|
34578
|
+
auth: "admin"
|
|
34579
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
34580
|
+
kind: "mutation",
|
|
34581
|
+
auth: "admin"
|
|
34582
|
+
}), method(object({
|
|
34583
|
+
role: HubAddressRoleSchema,
|
|
34584
|
+
baseUrl: string().nullable(),
|
|
34585
|
+
enabled: boolean(),
|
|
34586
|
+
acceptInsecureHttp: boolean().optional()
|
|
34587
|
+
}), HubAddressBookSchema, {
|
|
34588
|
+
kind: "mutation",
|
|
34589
|
+
auth: "admin"
|
|
34590
|
+
}), 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, {
|
|
32289
34591
|
kind: "mutation",
|
|
32290
34592
|
auth: "admin"
|
|
32291
34593
|
}), method(object({
|
|
@@ -32743,7 +35045,8 @@ var MotionStatusSchema = object({
|
|
|
32743
35045
|
* writes this slice (not even a boot seed), and neither does the runner's
|
|
32744
35046
|
* phase machine: its phase is "a session is attached" for every on-motion
|
|
32745
35047
|
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
32746
|
-
* A provider's `isDetected`
|
|
35048
|
+
* A provider's `isDetected` and `getStatus` answer from the hub's slice
|
|
35049
|
+
* (`hubMotionNativeProvider`).
|
|
32747
35050
|
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
32748
35051
|
* imports) — the provider pushes both edges itself, from the upstream
|
|
32749
35052
|
* system's own state change. That is the sensor's own fact.
|
|
@@ -38475,6 +40778,32 @@ var TotpStatusSchema = object({
|
|
|
38475
40778
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
38476
40779
|
confirmedAt: number().nullable()
|
|
38477
40780
|
});
|
|
40781
|
+
/**
|
|
40782
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
40783
|
+
* and scoped tokens.
|
|
40784
|
+
*
|
|
40785
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
40786
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
40787
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
40788
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
40789
|
+
* provider.
|
|
40790
|
+
*/
|
|
40791
|
+
var ExternalIdentitySchema = object({
|
|
40792
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
40793
|
+
provider: string(),
|
|
40794
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
40795
|
+
subject: string(),
|
|
40796
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
40797
|
+
issuer: string(),
|
|
40798
|
+
userId: string(),
|
|
40799
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
40800
|
+
label: string().optional(),
|
|
40801
|
+
linkedAt: number()
|
|
40802
|
+
});
|
|
40803
|
+
var ExternalIdentityKeySchema = object({
|
|
40804
|
+
provider: string().min(1),
|
|
40805
|
+
subject: string().min(1)
|
|
40806
|
+
});
|
|
38478
40807
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
38479
40808
|
kind: "mutation",
|
|
38480
40809
|
auth: "admin",
|
|
@@ -38588,7 +40917,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
38588
40917
|
userId: string(),
|
|
38589
40918
|
username: string(),
|
|
38590
40919
|
scopes: array(TokenScopeSchema)
|
|
38591
|
-
}).nullable(), { access: "view" }), method(
|
|
40920
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
40921
|
+
userId: string(),
|
|
40922
|
+
issuer: string()
|
|
40923
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
40924
|
+
userId: string(),
|
|
40925
|
+
issuer: string().min(1),
|
|
40926
|
+
label: string().optional()
|
|
40927
|
+
}), object({ success: literal(true) }), {
|
|
40928
|
+
kind: "mutation",
|
|
40929
|
+
auth: "admin",
|
|
40930
|
+
access: "create"
|
|
40931
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
40932
|
+
kind: "mutation",
|
|
40933
|
+
auth: "admin",
|
|
40934
|
+
access: "delete"
|
|
40935
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
38592
40936
|
kind: "mutation",
|
|
38593
40937
|
auth: "admin",
|
|
38594
40938
|
access: "delete"
|
|
@@ -39290,6 +41634,16 @@ var zoneRulesCapability = {
|
|
|
39290
41634
|
durability: "restored"
|
|
39291
41635
|
};
|
|
39292
41636
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
41637
|
+
Object.freeze({
|
|
41638
|
+
person: .5,
|
|
41639
|
+
vehicle: .5,
|
|
41640
|
+
animal: .5
|
|
41641
|
+
});
|
|
41642
|
+
Object.freeze({
|
|
41643
|
+
person: .65,
|
|
41644
|
+
vehicle: .65,
|
|
41645
|
+
animal: .65
|
|
41646
|
+
});
|
|
39293
41647
|
/**
|
|
39294
41648
|
* Accessory device helpers — shared across drivers.
|
|
39295
41649
|
*
|
|
@@ -39765,7 +42119,8 @@ var BaseDevice = class {
|
|
|
39765
42119
|
this.role = options.role;
|
|
39766
42120
|
this.parentDeviceId = ctx.parentDeviceId;
|
|
39767
42121
|
const seedData = ctx.persistedConfig ?? {};
|
|
39768
|
-
|
|
42122
|
+
const declaredSecretPaths = collectZodSecretPaths(schema);
|
|
42123
|
+
this.config = DeviceConfig.fromSchema(schema, (data) => ctx.persistConfig(data, { secretConfigPaths: declaredSecretPaths }), seedData, ({ droppedKeys, issues }) => {
|
|
39769
42124
|
ctx.logger.warn("Device config recovery: dropping invalid persisted fields", {
|
|
39770
42125
|
tags: {
|
|
39771
42126
|
deviceId: ctx.id,
|
|
@@ -40511,6 +42866,12 @@ Object.freeze({
|
|
|
40511
42866
|
addonId: null,
|
|
40512
42867
|
access: "view"
|
|
40513
42868
|
},
|
|
42869
|
+
"addons.listInstallations": {
|
|
42870
|
+
capName: "addons",
|
|
42871
|
+
capScope: "system",
|
|
42872
|
+
addonId: null,
|
|
42873
|
+
access: "view"
|
|
42874
|
+
},
|
|
40514
42875
|
"addons.listJobs": {
|
|
40515
42876
|
capName: "addons",
|
|
40516
42877
|
capScope: "system",
|
|
@@ -41693,90 +44054,18 @@ Object.freeze({
|
|
|
41693
44054
|
addonId: null,
|
|
41694
44055
|
access: "create"
|
|
41695
44056
|
},
|
|
41696
|
-
"decoder.createSession": {
|
|
41697
|
-
capName: "decoder",
|
|
41698
|
-
capScope: "system",
|
|
41699
|
-
addonId: null,
|
|
41700
|
-
access: "view"
|
|
41701
|
-
},
|
|
41702
|
-
"decoder.destroySession": {
|
|
41703
|
-
capName: "decoder",
|
|
41704
|
-
capScope: "system",
|
|
41705
|
-
addonId: null,
|
|
41706
|
-
access: "delete"
|
|
41707
|
-
},
|
|
41708
|
-
"decoder.getFrame": {
|
|
41709
|
-
capName: "decoder",
|
|
41710
|
-
capScope: "system",
|
|
41711
|
-
addonId: null,
|
|
41712
|
-
access: "view"
|
|
41713
|
-
},
|
|
41714
44057
|
"decoder.getInfo": {
|
|
41715
44058
|
capName: "decoder",
|
|
41716
44059
|
capScope: "system",
|
|
41717
44060
|
addonId: null,
|
|
41718
44061
|
access: "view"
|
|
41719
44062
|
},
|
|
41720
|
-
"decoder.getShmStats": {
|
|
41721
|
-
capName: "decoder",
|
|
41722
|
-
capScope: "system",
|
|
41723
|
-
addonId: null,
|
|
41724
|
-
access: "view"
|
|
41725
|
-
},
|
|
41726
|
-
"decoder.getStats": {
|
|
41727
|
-
capName: "decoder",
|
|
41728
|
-
capScope: "system",
|
|
41729
|
-
addonId: null,
|
|
41730
|
-
access: "view"
|
|
41731
|
-
},
|
|
41732
|
-
"decoder.listActiveSessions": {
|
|
41733
|
-
capName: "decoder",
|
|
41734
|
-
capScope: "system",
|
|
41735
|
-
addonId: null,
|
|
41736
|
-
access: "view"
|
|
41737
|
-
},
|
|
41738
|
-
"decoder.openStream": {
|
|
41739
|
-
capName: "decoder",
|
|
41740
|
-
capScope: "system",
|
|
41741
|
-
addonId: null,
|
|
41742
|
-
access: "view"
|
|
41743
|
-
},
|
|
41744
|
-
"decoder.pullFrames": {
|
|
41745
|
-
capName: "decoder",
|
|
41746
|
-
capScope: "system",
|
|
41747
|
-
addonId: null,
|
|
41748
|
-
access: "view"
|
|
41749
|
-
},
|
|
41750
|
-
"decoder.pullHandles": {
|
|
41751
|
-
capName: "decoder",
|
|
41752
|
-
capScope: "system",
|
|
41753
|
-
addonId: null,
|
|
41754
|
-
access: "view"
|
|
41755
|
-
},
|
|
41756
|
-
"decoder.pushPacket": {
|
|
41757
|
-
capName: "decoder",
|
|
41758
|
-
capScope: "system",
|
|
41759
|
-
addonId: null,
|
|
41760
|
-
access: "view"
|
|
41761
|
-
},
|
|
41762
44063
|
"decoder.reprobeHwaccel": {
|
|
41763
44064
|
capName: "decoder",
|
|
41764
44065
|
capScope: "system",
|
|
41765
44066
|
addonId: null,
|
|
41766
44067
|
access: "create"
|
|
41767
44068
|
},
|
|
41768
|
-
"decoder.supportsCodec": {
|
|
41769
|
-
capName: "decoder",
|
|
41770
|
-
capScope: "system",
|
|
41771
|
-
addonId: null,
|
|
41772
|
-
access: "view"
|
|
41773
|
-
},
|
|
41774
|
-
"decoder.updateConfig": {
|
|
41775
|
-
capName: "decoder",
|
|
41776
|
-
capScope: "system",
|
|
41777
|
-
addonId: null,
|
|
41778
|
-
access: "view"
|
|
41779
|
-
},
|
|
41780
44069
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
41781
44070
|
capName: "detection-pipeline",
|
|
41782
44071
|
capScope: "device",
|
|
@@ -43043,6 +45332,96 @@ Object.freeze({
|
|
|
43043
45332
|
addonId: null,
|
|
43044
45333
|
access: "create"
|
|
43045
45334
|
},
|
|
45335
|
+
"keychain.delete": {
|
|
45336
|
+
capName: "keychain",
|
|
45337
|
+
capScope: "system",
|
|
45338
|
+
addonId: null,
|
|
45339
|
+
access: "delete"
|
|
45340
|
+
},
|
|
45341
|
+
"keychain.getState": {
|
|
45342
|
+
capName: "keychain",
|
|
45343
|
+
capScope: "system",
|
|
45344
|
+
addonId: null,
|
|
45345
|
+
access: "view"
|
|
45346
|
+
},
|
|
45347
|
+
"keychain.listMeta": {
|
|
45348
|
+
capName: "keychain",
|
|
45349
|
+
capScope: "system",
|
|
45350
|
+
addonId: null,
|
|
45351
|
+
access: "view"
|
|
45352
|
+
},
|
|
45353
|
+
"keychain.put": {
|
|
45354
|
+
capName: "keychain",
|
|
45355
|
+
capScope: "system",
|
|
45356
|
+
addonId: null,
|
|
45357
|
+
access: "create"
|
|
45358
|
+
},
|
|
45359
|
+
"keychain.resolve": {
|
|
45360
|
+
capName: "keychain",
|
|
45361
|
+
capScope: "system",
|
|
45362
|
+
addonId: null,
|
|
45363
|
+
access: "view"
|
|
45364
|
+
},
|
|
45365
|
+
"keychainAdmin.deleteOrphans": {
|
|
45366
|
+
capName: "keychain-admin",
|
|
45367
|
+
capScope: "system",
|
|
45368
|
+
addonId: null,
|
|
45369
|
+
access: "delete"
|
|
45370
|
+
},
|
|
45371
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
45372
|
+
capName: "keychain-admin",
|
|
45373
|
+
capScope: "system",
|
|
45374
|
+
addonId: null,
|
|
45375
|
+
access: "create"
|
|
45376
|
+
},
|
|
45377
|
+
"keychainAdmin.listAudit": {
|
|
45378
|
+
capName: "keychain-admin",
|
|
45379
|
+
capScope: "system",
|
|
45380
|
+
addonId: null,
|
|
45381
|
+
access: "view"
|
|
45382
|
+
},
|
|
45383
|
+
"keychainAdmin.listSecrets": {
|
|
45384
|
+
capName: "keychain-admin",
|
|
45385
|
+
capScope: "system",
|
|
45386
|
+
addonId: null,
|
|
45387
|
+
access: "view"
|
|
45388
|
+
},
|
|
45389
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
45390
|
+
capName: "keychain-admin",
|
|
45391
|
+
capScope: "system",
|
|
45392
|
+
addonId: null,
|
|
45393
|
+
access: "delete"
|
|
45394
|
+
},
|
|
45395
|
+
"keychainAdmin.resetKeychain": {
|
|
45396
|
+
capName: "keychain-admin",
|
|
45397
|
+
capScope: "system",
|
|
45398
|
+
addonId: null,
|
|
45399
|
+
access: "delete"
|
|
45400
|
+
},
|
|
45401
|
+
"keychainAdmin.reveal": {
|
|
45402
|
+
capName: "keychain-admin",
|
|
45403
|
+
capScope: "system",
|
|
45404
|
+
addonId: null,
|
|
45405
|
+
access: "create"
|
|
45406
|
+
},
|
|
45407
|
+
"keychainAdmin.rotateMasterKey": {
|
|
45408
|
+
capName: "keychain-admin",
|
|
45409
|
+
capScope: "system",
|
|
45410
|
+
addonId: null,
|
|
45411
|
+
access: "create"
|
|
45412
|
+
},
|
|
45413
|
+
"keychainAdmin.setSystemSecret": {
|
|
45414
|
+
capName: "keychain-admin",
|
|
45415
|
+
capScope: "system",
|
|
45416
|
+
addonId: null,
|
|
45417
|
+
access: "create"
|
|
45418
|
+
},
|
|
45419
|
+
"keychainAdmin.status": {
|
|
45420
|
+
capName: "keychain-admin",
|
|
45421
|
+
capScope: "system",
|
|
45422
|
+
addonId: null,
|
|
45423
|
+
access: "view"
|
|
45424
|
+
},
|
|
43046
45425
|
"lawnMowerControl.dock": {
|
|
43047
45426
|
capName: "lawn-mower-control",
|
|
43048
45427
|
capScope: "device",
|
|
@@ -43265,12 +45644,24 @@ Object.freeze({
|
|
|
43265
45644
|
addonId: null,
|
|
43266
45645
|
access: "view"
|
|
43267
45646
|
},
|
|
45647
|
+
"localNetwork.addCustomAddress": {
|
|
45648
|
+
capName: "local-network",
|
|
45649
|
+
capScope: "system",
|
|
45650
|
+
addonId: null,
|
|
45651
|
+
access: "create"
|
|
45652
|
+
},
|
|
43268
45653
|
"localNetwork.downloadCa": {
|
|
43269
45654
|
capName: "local-network",
|
|
43270
45655
|
capScope: "system",
|
|
43271
45656
|
addonId: null,
|
|
43272
45657
|
access: "view"
|
|
43273
45658
|
},
|
|
45659
|
+
"localNetwork.getAddresses": {
|
|
45660
|
+
capName: "local-network",
|
|
45661
|
+
capScope: "system",
|
|
45662
|
+
addonId: null,
|
|
45663
|
+
access: "view"
|
|
45664
|
+
},
|
|
43274
45665
|
"localNetwork.getAllowedAddresses": {
|
|
43275
45666
|
capName: "local-network",
|
|
43276
45667
|
capScope: "system",
|
|
@@ -43283,6 +45674,12 @@ Object.freeze({
|
|
|
43283
45674
|
addonId: null,
|
|
43284
45675
|
access: "view"
|
|
43285
45676
|
},
|
|
45677
|
+
"localNetwork.getHubAddresses": {
|
|
45678
|
+
capName: "local-network",
|
|
45679
|
+
capScope: "system",
|
|
45680
|
+
addonId: null,
|
|
45681
|
+
access: "view"
|
|
45682
|
+
},
|
|
43286
45683
|
"localNetwork.getNotificationEndpoint": {
|
|
43287
45684
|
capName: "local-network",
|
|
43288
45685
|
capScope: "system",
|
|
@@ -43319,6 +45716,12 @@ Object.freeze({
|
|
|
43319
45716
|
addonId: null,
|
|
43320
45717
|
access: "create"
|
|
43321
45718
|
},
|
|
45719
|
+
"localNetwork.removeCustomAddress": {
|
|
45720
|
+
capName: "local-network",
|
|
45721
|
+
capScope: "system",
|
|
45722
|
+
addonId: null,
|
|
45723
|
+
access: "delete"
|
|
45724
|
+
},
|
|
43322
45725
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
43323
45726
|
capName: "local-network",
|
|
43324
45727
|
capScope: "system",
|
|
@@ -43331,6 +45734,12 @@ Object.freeze({
|
|
|
43331
45734
|
addonId: null,
|
|
43332
45735
|
access: "create"
|
|
43333
45736
|
},
|
|
45737
|
+
"localNetwork.setAddressRole": {
|
|
45738
|
+
capName: "local-network",
|
|
45739
|
+
capScope: "system",
|
|
45740
|
+
addonId: null,
|
|
45741
|
+
access: "create"
|
|
45742
|
+
},
|
|
43334
45743
|
"localNetwork.setAllowedAddresses": {
|
|
43335
45744
|
capName: "local-network",
|
|
43336
45745
|
capScope: "system",
|
|
@@ -44387,6 +46796,18 @@ Object.freeze({
|
|
|
44387
46796
|
addonId: null,
|
|
44388
46797
|
access: "create"
|
|
44389
46798
|
},
|
|
46799
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
46800
|
+
capName: "pipeline-analytics",
|
|
46801
|
+
capScope: "device",
|
|
46802
|
+
addonId: null,
|
|
46803
|
+
access: "create"
|
|
46804
|
+
},
|
|
46805
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
46806
|
+
capName: "pipeline-analytics",
|
|
46807
|
+
capScope: "device",
|
|
46808
|
+
addonId: null,
|
|
46809
|
+
access: "create"
|
|
46810
|
+
},
|
|
44390
46811
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
44391
46812
|
capName: "pipeline-analytics",
|
|
44392
46813
|
capScope: "device",
|
|
@@ -44435,12 +46856,36 @@ Object.freeze({
|
|
|
44435
46856
|
addonId: null,
|
|
44436
46857
|
access: "view"
|
|
44437
46858
|
},
|
|
46859
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
46860
|
+
capName: "pipeline-analytics",
|
|
46861
|
+
capScope: "device",
|
|
46862
|
+
addonId: null,
|
|
46863
|
+
access: "create"
|
|
46864
|
+
},
|
|
46865
|
+
"pipelineAnalytics.createRetrainDatasetVersion": {
|
|
46866
|
+
capName: "pipeline-analytics",
|
|
46867
|
+
capScope: "device",
|
|
46868
|
+
addonId: null,
|
|
46869
|
+
access: "create"
|
|
46870
|
+
},
|
|
44438
46871
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
44439
46872
|
capName: "pipeline-analytics",
|
|
44440
46873
|
capScope: "device",
|
|
44441
46874
|
addonId: null,
|
|
44442
46875
|
access: "delete"
|
|
44443
46876
|
},
|
|
46877
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
46878
|
+
capName: "pipeline-analytics",
|
|
46879
|
+
capScope: "device",
|
|
46880
|
+
addonId: null,
|
|
46881
|
+
access: "delete"
|
|
46882
|
+
},
|
|
46883
|
+
"pipelineAnalytics.deleteRetrainDatasetVersion": {
|
|
46884
|
+
capName: "pipeline-analytics",
|
|
46885
|
+
capScope: "device",
|
|
46886
|
+
addonId: null,
|
|
46887
|
+
access: "delete"
|
|
46888
|
+
},
|
|
44444
46889
|
"pipelineAnalytics.deleteTracks": {
|
|
44445
46890
|
capName: "pipeline-analytics",
|
|
44446
46891
|
capScope: "device",
|
|
@@ -44645,6 +47090,30 @@ Object.freeze({
|
|
|
44645
47090
|
addonId: null,
|
|
44646
47091
|
access: "view"
|
|
44647
47092
|
},
|
|
47093
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
47094
|
+
capName: "pipeline-analytics",
|
|
47095
|
+
capScope: "device",
|
|
47096
|
+
addonId: null,
|
|
47097
|
+
access: "view"
|
|
47098
|
+
},
|
|
47099
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
47100
|
+
capName: "pipeline-analytics",
|
|
47101
|
+
capScope: "device",
|
|
47102
|
+
addonId: null,
|
|
47103
|
+
access: "view"
|
|
47104
|
+
},
|
|
47105
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
47106
|
+
capName: "pipeline-analytics",
|
|
47107
|
+
capScope: "device",
|
|
47108
|
+
addonId: null,
|
|
47109
|
+
access: "view"
|
|
47110
|
+
},
|
|
47111
|
+
"pipelineAnalytics.listRetrainDatasetVersions": {
|
|
47112
|
+
capName: "pipeline-analytics",
|
|
47113
|
+
capScope: "device",
|
|
47114
|
+
addonId: null,
|
|
47115
|
+
access: "view"
|
|
47116
|
+
},
|
|
44648
47117
|
"pipelineAnalytics.listRetrainFrames": {
|
|
44649
47118
|
capName: "pipeline-analytics",
|
|
44650
47119
|
capScope: "device",
|
|
@@ -44687,12 +47156,24 @@ Object.freeze({
|
|
|
44687
47156
|
addonId: null,
|
|
44688
47157
|
access: "create"
|
|
44689
47158
|
},
|
|
47159
|
+
"pipelineAnalytics.previewRetrainDataset": {
|
|
47160
|
+
capName: "pipeline-analytics",
|
|
47161
|
+
capScope: "device",
|
|
47162
|
+
addonId: null,
|
|
47163
|
+
access: "view"
|
|
47164
|
+
},
|
|
44690
47165
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
44691
47166
|
capName: "pipeline-analytics",
|
|
44692
47167
|
capScope: "device",
|
|
44693
47168
|
addonId: null,
|
|
44694
47169
|
access: "create"
|
|
44695
47170
|
},
|
|
47171
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
47172
|
+
capName: "pipeline-analytics",
|
|
47173
|
+
capScope: "device",
|
|
47174
|
+
addonId: null,
|
|
47175
|
+
access: "create"
|
|
47176
|
+
},
|
|
44696
47177
|
"pipelineAnalytics.pruneEvents": {
|
|
44697
47178
|
capName: "pipeline-analytics",
|
|
44698
47179
|
capScope: "device",
|
|
@@ -44747,6 +47228,18 @@ Object.freeze({
|
|
|
44747
47228
|
addonId: null,
|
|
44748
47229
|
access: "create"
|
|
44749
47230
|
},
|
|
47231
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
47232
|
+
capName: "pipeline-analytics",
|
|
47233
|
+
capScope: "device",
|
|
47234
|
+
addonId: null,
|
|
47235
|
+
access: "delete"
|
|
47236
|
+
},
|
|
47237
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
47238
|
+
capName: "pipeline-analytics",
|
|
47239
|
+
capScope: "device",
|
|
47240
|
+
addonId: null,
|
|
47241
|
+
access: "create"
|
|
47242
|
+
},
|
|
44750
47243
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
44751
47244
|
capName: "pipeline-analytics",
|
|
44752
47245
|
capScope: "device",
|
|
@@ -44777,6 +47270,12 @@ Object.freeze({
|
|
|
44777
47270
|
addonId: null,
|
|
44778
47271
|
access: "create"
|
|
44779
47272
|
},
|
|
47273
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
47274
|
+
capName: "pipeline-analytics",
|
|
47275
|
+
capScope: "device",
|
|
47276
|
+
addonId: null,
|
|
47277
|
+
access: "create"
|
|
47278
|
+
},
|
|
44780
47279
|
"pipelineAnalytics.setTrackFlags": {
|
|
44781
47280
|
capName: "pipeline-analytics",
|
|
44782
47281
|
capScope: "device",
|
|
@@ -44801,6 +47300,12 @@ Object.freeze({
|
|
|
44801
47300
|
addonId: null,
|
|
44802
47301
|
access: "create"
|
|
44803
47302
|
},
|
|
47303
|
+
"pipelineAnalytics.verifyRetrainDatasetVersion": {
|
|
47304
|
+
capName: "pipeline-analytics",
|
|
47305
|
+
capScope: "device",
|
|
47306
|
+
addonId: null,
|
|
47307
|
+
access: "view"
|
|
47308
|
+
},
|
|
44804
47309
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
44805
47310
|
capName: "pipeline-analytics",
|
|
44806
47311
|
capScope: "device",
|
|
@@ -44813,6 +47318,12 @@ Object.freeze({
|
|
|
44813
47318
|
addonId: null,
|
|
44814
47319
|
access: "delete"
|
|
44815
47320
|
},
|
|
47321
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
47322
|
+
capName: "pipeline-analytics",
|
|
47323
|
+
capScope: "device",
|
|
47324
|
+
addonId: null,
|
|
47325
|
+
access: "create"
|
|
47326
|
+
},
|
|
44816
47327
|
"pipelineExecutor.cacheFrameInPool": {
|
|
44817
47328
|
capName: "pipeline-executor",
|
|
44818
47329
|
capScope: "system",
|
|
@@ -44825,13 +47336,13 @@ Object.freeze({
|
|
|
44825
47336
|
addonId: null,
|
|
44826
47337
|
access: "delete"
|
|
44827
47338
|
},
|
|
44828
|
-
"pipelineExecutor.
|
|
47339
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
44829
47340
|
capName: "pipeline-executor",
|
|
44830
47341
|
capScope: "system",
|
|
44831
47342
|
addonId: null,
|
|
44832
47343
|
access: "delete"
|
|
44833
47344
|
},
|
|
44834
|
-
"pipelineExecutor.
|
|
47345
|
+
"pipelineExecutor.deleteModel": {
|
|
44835
47346
|
capName: "pipeline-executor",
|
|
44836
47347
|
capScope: "system",
|
|
44837
47348
|
addonId: null,
|
|
@@ -44975,12 +47486,6 @@ Object.freeze({
|
|
|
44975
47486
|
addonId: null,
|
|
44976
47487
|
access: "view"
|
|
44977
47488
|
},
|
|
44978
|
-
"pipelineExecutor.listTemplates": {
|
|
44979
|
-
capName: "pipeline-executor",
|
|
44980
|
-
capScope: "system",
|
|
44981
|
-
addonId: null,
|
|
44982
|
-
access: "view"
|
|
44983
|
-
},
|
|
44984
47489
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
44985
47490
|
capName: "pipeline-executor",
|
|
44986
47491
|
capScope: "system",
|
|
@@ -45005,12 +47510,6 @@ Object.freeze({
|
|
|
45005
47510
|
addonId: null,
|
|
45006
47511
|
access: "create"
|
|
45007
47512
|
},
|
|
45008
|
-
"pipelineExecutor.saveTemplate": {
|
|
45009
|
-
capName: "pipeline-executor",
|
|
45010
|
-
capScope: "system",
|
|
45011
|
-
addonId: null,
|
|
45012
|
-
access: "create"
|
|
45013
|
-
},
|
|
45014
47513
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
45015
47514
|
capName: "pipeline-executor",
|
|
45016
47515
|
capScope: "system",
|
|
@@ -45029,17 +47528,23 @@ Object.freeze({
|
|
|
45029
47528
|
addonId: null,
|
|
45030
47529
|
access: "create"
|
|
45031
47530
|
},
|
|
45032
|
-
"pipelineExecutor.
|
|
47531
|
+
"pipelineExecutor.validatePipeline": {
|
|
45033
47532
|
capName: "pipeline-executor",
|
|
45034
47533
|
capScope: "system",
|
|
45035
47534
|
addonId: null,
|
|
47535
|
+
access: "view"
|
|
47536
|
+
},
|
|
47537
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
47538
|
+
capName: "pipeline-orchestrator",
|
|
47539
|
+
capScope: "system",
|
|
47540
|
+
addonId: null,
|
|
45036
47541
|
access: "create"
|
|
45037
47542
|
},
|
|
45038
|
-
"
|
|
45039
|
-
capName: "pipeline-
|
|
47543
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
47544
|
+
capName: "pipeline-orchestrator",
|
|
45040
47545
|
capScope: "system",
|
|
45041
47546
|
addonId: null,
|
|
45042
|
-
access: "
|
|
47547
|
+
access: "create"
|
|
45043
47548
|
},
|
|
45044
47549
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
45045
47550
|
capName: "pipeline-orchestrator",
|
|
@@ -45059,7 +47564,7 @@ Object.freeze({
|
|
|
45059
47564
|
addonId: null,
|
|
45060
47565
|
access: "create"
|
|
45061
47566
|
},
|
|
45062
|
-
"pipelineOrchestrator.
|
|
47567
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
45063
47568
|
capName: "pipeline-orchestrator",
|
|
45064
47569
|
capScope: "system",
|
|
45065
47570
|
addonId: null,
|
|
@@ -45155,6 +47660,12 @@ Object.freeze({
|
|
|
45155
47660
|
addonId: null,
|
|
45156
47661
|
access: "view"
|
|
45157
47662
|
},
|
|
47663
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
47664
|
+
capName: "pipeline-orchestrator",
|
|
47665
|
+
capScope: "system",
|
|
47666
|
+
addonId: null,
|
|
47667
|
+
access: "view"
|
|
47668
|
+
},
|
|
45158
47669
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
45159
47670
|
capName: "pipeline-orchestrator",
|
|
45160
47671
|
capScope: "system",
|
|
@@ -45167,6 +47678,24 @@ Object.freeze({
|
|
|
45167
47678
|
addonId: null,
|
|
45168
47679
|
access: "view"
|
|
45169
47680
|
},
|
|
47681
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
47682
|
+
capName: "pipeline-orchestrator",
|
|
47683
|
+
capScope: "system",
|
|
47684
|
+
addonId: null,
|
|
47685
|
+
access: "view"
|
|
47686
|
+
},
|
|
47687
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
47688
|
+
capName: "pipeline-orchestrator",
|
|
47689
|
+
capScope: "system",
|
|
47690
|
+
addonId: null,
|
|
47691
|
+
access: "view"
|
|
47692
|
+
},
|
|
47693
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
47694
|
+
capName: "pipeline-orchestrator",
|
|
47695
|
+
capScope: "system",
|
|
47696
|
+
addonId: null,
|
|
47697
|
+
access: "view"
|
|
47698
|
+
},
|
|
45170
47699
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
45171
47700
|
capName: "pipeline-orchestrator",
|
|
45172
47701
|
capScope: "system",
|
|
@@ -45191,6 +47720,12 @@ Object.freeze({
|
|
|
45191
47720
|
addonId: null,
|
|
45192
47721
|
access: "view"
|
|
45193
47722
|
},
|
|
47723
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
47724
|
+
capName: "pipeline-orchestrator",
|
|
47725
|
+
capScope: "system",
|
|
47726
|
+
addonId: null,
|
|
47727
|
+
access: "view"
|
|
47728
|
+
},
|
|
45194
47729
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
45195
47730
|
capName: "pipeline-orchestrator",
|
|
45196
47731
|
capScope: "system",
|
|
@@ -45203,7 +47738,7 @@ Object.freeze({
|
|
|
45203
47738
|
addonId: null,
|
|
45204
47739
|
access: "view"
|
|
45205
47740
|
},
|
|
45206
|
-
"pipelineOrchestrator.
|
|
47741
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
45207
47742
|
capName: "pipeline-orchestrator",
|
|
45208
47743
|
capScope: "system",
|
|
45209
47744
|
addonId: null,
|
|
@@ -45215,6 +47750,12 @@ Object.freeze({
|
|
|
45215
47750
|
addonId: null,
|
|
45216
47751
|
access: "create"
|
|
45217
47752
|
},
|
|
47753
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
47754
|
+
capName: "pipeline-orchestrator",
|
|
47755
|
+
capScope: "system",
|
|
47756
|
+
addonId: null,
|
|
47757
|
+
access: "view"
|
|
47758
|
+
},
|
|
45218
47759
|
"pipelineOrchestrator.rebalance": {
|
|
45219
47760
|
capName: "pipeline-orchestrator",
|
|
45220
47761
|
capScope: "system",
|
|
@@ -45257,12 +47798,6 @@ Object.freeze({
|
|
|
45257
47798
|
addonId: null,
|
|
45258
47799
|
access: "create"
|
|
45259
47800
|
},
|
|
45260
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
45261
|
-
capName: "pipeline-orchestrator",
|
|
45262
|
-
capScope: "system",
|
|
45263
|
-
addonId: null,
|
|
45264
|
-
access: "create"
|
|
45265
|
-
},
|
|
45266
47801
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
45267
47802
|
capName: "pipeline-orchestrator",
|
|
45268
47803
|
capScope: "system",
|
|
@@ -45275,12 +47810,6 @@ Object.freeze({
|
|
|
45275
47810
|
addonId: null,
|
|
45276
47811
|
access: "create"
|
|
45277
47812
|
},
|
|
45278
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
45279
|
-
capName: "pipeline-orchestrator",
|
|
45280
|
-
capScope: "system",
|
|
45281
|
-
addonId: null,
|
|
45282
|
-
access: "create"
|
|
45283
|
-
},
|
|
45284
47813
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
45285
47814
|
capName: "pipeline-orchestrator",
|
|
45286
47815
|
capScope: "system",
|
|
@@ -45317,6 +47846,12 @@ Object.freeze({
|
|
|
45317
47846
|
addonId: null,
|
|
45318
47847
|
access: "create"
|
|
45319
47848
|
},
|
|
47849
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
47850
|
+
capName: "pipeline-orchestrator",
|
|
47851
|
+
capScope: "system",
|
|
47852
|
+
addonId: null,
|
|
47853
|
+
access: "create"
|
|
47854
|
+
},
|
|
45320
47855
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
45321
47856
|
capName: "pipeline-orchestrator",
|
|
45322
47857
|
capScope: "system",
|
|
@@ -45335,12 +47870,36 @@ Object.freeze({
|
|
|
45335
47870
|
addonId: null,
|
|
45336
47871
|
access: "create"
|
|
45337
47872
|
},
|
|
47873
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
47874
|
+
capName: "pipeline-orchestrator",
|
|
47875
|
+
capScope: "system",
|
|
47876
|
+
addonId: null,
|
|
47877
|
+
access: "create"
|
|
47878
|
+
},
|
|
45338
47879
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
45339
47880
|
capName: "pipeline-orchestrator",
|
|
45340
47881
|
capScope: "system",
|
|
45341
47882
|
addonId: null,
|
|
45342
47883
|
access: "create"
|
|
45343
47884
|
},
|
|
47885
|
+
"pipelineOrchestrator.setShareSource": {
|
|
47886
|
+
capName: "pipeline-orchestrator",
|
|
47887
|
+
capScope: "system",
|
|
47888
|
+
addonId: null,
|
|
47889
|
+
access: "create"
|
|
47890
|
+
},
|
|
47891
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
47892
|
+
capName: "pipeline-orchestrator",
|
|
47893
|
+
capScope: "system",
|
|
47894
|
+
addonId: null,
|
|
47895
|
+
access: "create"
|
|
47896
|
+
},
|
|
47897
|
+
"pipelineOrchestrator.suggestShares": {
|
|
47898
|
+
capName: "pipeline-orchestrator",
|
|
47899
|
+
capScope: "system",
|
|
47900
|
+
addonId: null,
|
|
47901
|
+
access: "view"
|
|
47902
|
+
},
|
|
45344
47903
|
"pipelineOrchestrator.unassignAudio": {
|
|
45345
47904
|
capName: "pipeline-orchestrator",
|
|
45346
47905
|
capScope: "system",
|
|
@@ -45353,8 +47912,8 @@ Object.freeze({
|
|
|
45353
47912
|
addonId: null,
|
|
45354
47913
|
access: "create"
|
|
45355
47914
|
},
|
|
45356
|
-
"
|
|
45357
|
-
capName: "pipeline-
|
|
47915
|
+
"pipelineRunner.abortNodeBench": {
|
|
47916
|
+
capName: "pipeline-runner",
|
|
45358
47917
|
capScope: "system",
|
|
45359
47918
|
addonId: null,
|
|
45360
47919
|
access: "create"
|
|
@@ -45407,6 +47966,12 @@ Object.freeze({
|
|
|
45407
47966
|
addonId: null,
|
|
45408
47967
|
access: "view"
|
|
45409
47968
|
},
|
|
47969
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
47970
|
+
capName: "pipeline-runner",
|
|
47971
|
+
capScope: "system",
|
|
47972
|
+
addonId: null,
|
|
47973
|
+
access: "view"
|
|
47974
|
+
},
|
|
45410
47975
|
"pipelineRunner.getParkedTrackFrame": {
|
|
45411
47976
|
capName: "pipeline-runner",
|
|
45412
47977
|
capScope: "system",
|
|
@@ -45449,6 +48014,12 @@ Object.freeze({
|
|
|
45449
48014
|
addonId: null,
|
|
45450
48015
|
access: "create"
|
|
45451
48016
|
},
|
|
48017
|
+
"pipelineRunner.startNodeBench": {
|
|
48018
|
+
capName: "pipeline-runner",
|
|
48019
|
+
capScope: "system",
|
|
48020
|
+
addonId: null,
|
|
48021
|
+
access: "create"
|
|
48022
|
+
},
|
|
45452
48023
|
"plateGallery.assignPlate": {
|
|
45453
48024
|
capName: "plate-gallery",
|
|
45454
48025
|
capScope: "system",
|
|
@@ -46793,12 +49364,6 @@ Object.freeze({
|
|
|
46793
49364
|
addonId: null,
|
|
46794
49365
|
access: "view"
|
|
46795
49366
|
},
|
|
46796
|
-
"streamBroker.pullFrameHandles": {
|
|
46797
|
-
capName: "stream-broker",
|
|
46798
|
-
capScope: "system",
|
|
46799
|
-
addonId: null,
|
|
46800
|
-
access: "view"
|
|
46801
|
-
},
|
|
46802
49367
|
"streamBroker.regenerateRtspToken": {
|
|
46803
49368
|
capName: "stream-broker",
|
|
46804
49369
|
capScope: "system",
|
|
@@ -46865,12 +49430,6 @@ Object.freeze({
|
|
|
46865
49430
|
addonId: null,
|
|
46866
49431
|
access: "create"
|
|
46867
49432
|
},
|
|
46868
|
-
"streamBroker.subscribeFrames": {
|
|
46869
|
-
capName: "stream-broker",
|
|
46870
|
-
capScope: "system",
|
|
46871
|
-
addonId: null,
|
|
46872
|
-
access: "create"
|
|
46873
|
-
},
|
|
46874
49433
|
"streamBroker.unassignProfile": {
|
|
46875
49434
|
capName: "stream-broker",
|
|
46876
49435
|
capScope: "system",
|
|
@@ -46883,12 +49442,6 @@ Object.freeze({
|
|
|
46883
49442
|
addonId: null,
|
|
46884
49443
|
access: "create"
|
|
46885
49444
|
},
|
|
46886
|
-
"streamBroker.unsubscribeFrames": {
|
|
46887
|
-
capName: "stream-broker",
|
|
46888
|
-
capScope: "system",
|
|
46889
|
-
addonId: null,
|
|
46890
|
-
access: "create"
|
|
46891
|
-
},
|
|
46892
49445
|
"streamCatalog.getCatalog": {
|
|
46893
49446
|
capName: "stream-catalog",
|
|
46894
49447
|
capScope: "device",
|
|
@@ -47183,18 +49736,36 @@ Object.freeze({
|
|
|
47183
49736
|
addonId: null,
|
|
47184
49737
|
access: "delete"
|
|
47185
49738
|
},
|
|
49739
|
+
"userManagement.findUserByExternalIdentity": {
|
|
49740
|
+
capName: "user-management",
|
|
49741
|
+
capScope: "system",
|
|
49742
|
+
addonId: null,
|
|
49743
|
+
access: "view"
|
|
49744
|
+
},
|
|
47186
49745
|
"userManagement.getTotpStatus": {
|
|
47187
49746
|
capName: "user-management",
|
|
47188
49747
|
capScope: "system",
|
|
47189
49748
|
addonId: null,
|
|
47190
49749
|
access: "view"
|
|
47191
49750
|
},
|
|
49751
|
+
"userManagement.linkExternalIdentity": {
|
|
49752
|
+
capName: "user-management",
|
|
49753
|
+
capScope: "system",
|
|
49754
|
+
addonId: null,
|
|
49755
|
+
access: "create"
|
|
49756
|
+
},
|
|
47192
49757
|
"userManagement.listApiKeys": {
|
|
47193
49758
|
capName: "user-management",
|
|
47194
49759
|
capScope: "system",
|
|
47195
49760
|
addonId: null,
|
|
47196
49761
|
access: "view"
|
|
47197
49762
|
},
|
|
49763
|
+
"userManagement.listExternalIdentities": {
|
|
49764
|
+
capName: "user-management",
|
|
49765
|
+
capScope: "system",
|
|
49766
|
+
addonId: null,
|
|
49767
|
+
access: "view"
|
|
49768
|
+
},
|
|
47198
49769
|
"userManagement.listOauthSessions": {
|
|
47199
49770
|
capName: "user-management",
|
|
47200
49771
|
capScope: "system",
|
|
@@ -47273,6 +49844,12 @@ Object.freeze({
|
|
|
47273
49844
|
addonId: null,
|
|
47274
49845
|
access: "create"
|
|
47275
49846
|
},
|
|
49847
|
+
"userManagement.unlinkExternalIdentity": {
|
|
49848
|
+
capName: "user-management",
|
|
49849
|
+
capScope: "system",
|
|
49850
|
+
addonId: null,
|
|
49851
|
+
access: "delete"
|
|
49852
|
+
},
|
|
47276
49853
|
"userManagement.updateUser": {
|
|
47277
49854
|
capName: "user-management",
|
|
47278
49855
|
capScope: "system",
|
|
@@ -47585,6 +50162,12 @@ Object.freeze({
|
|
|
47585
50162
|
addonId: null,
|
|
47586
50163
|
access: "create"
|
|
47587
50164
|
},
|
|
50165
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
50166
|
+
capName: "webrtc-session",
|
|
50167
|
+
capScope: "device",
|
|
50168
|
+
addonId: null,
|
|
50169
|
+
access: "create"
|
|
50170
|
+
},
|
|
47588
50171
|
"webrtcSession.closeSession": {
|
|
47589
50172
|
capName: "webrtc-session",
|
|
47590
50173
|
capScope: "device",
|
|
@@ -49396,11 +51979,6 @@ Object.freeze({
|
|
|
49396
51979
|
form: "single",
|
|
49397
51980
|
optional: false
|
|
49398
51981
|
}],
|
|
49399
|
-
"decoder.createSession": [{
|
|
49400
|
-
name: "deviceId",
|
|
49401
|
-
form: "single",
|
|
49402
|
-
optional: true
|
|
49403
|
-
}],
|
|
49404
51982
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
49405
51983
|
name: "deviceId",
|
|
49406
51984
|
form: "single",
|
|
@@ -50371,6 +52949,11 @@ Object.freeze({
|
|
|
50371
52949
|
form: "single",
|
|
50372
52950
|
optional: false
|
|
50373
52951
|
}],
|
|
52952
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
52953
|
+
name: "deviceId",
|
|
52954
|
+
form: "single",
|
|
52955
|
+
optional: false
|
|
52956
|
+
}],
|
|
50374
52957
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
50375
52958
|
name: "deviceId",
|
|
50376
52959
|
form: "single",
|
|
@@ -50561,6 +53144,11 @@ Object.freeze({
|
|
|
50561
53144
|
form: "single",
|
|
50562
53145
|
optional: false
|
|
50563
53146
|
}],
|
|
53147
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
53148
|
+
name: "deviceId",
|
|
53149
|
+
form: "single",
|
|
53150
|
+
optional: false
|
|
53151
|
+
}],
|
|
50564
53152
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
50565
53153
|
name: "deviceId",
|
|
50566
53154
|
form: "single",
|
|
@@ -50611,6 +53199,11 @@ Object.freeze({
|
|
|
50611
53199
|
form: "single",
|
|
50612
53200
|
optional: false
|
|
50613
53201
|
}],
|
|
53202
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
53203
|
+
name: "deviceId",
|
|
53204
|
+
form: "single",
|
|
53205
|
+
optional: false
|
|
53206
|
+
}],
|
|
50614
53207
|
"pipelineAnalytics.setTrackFlags": [{
|
|
50615
53208
|
name: "deviceId",
|
|
50616
53209
|
form: "single",
|
|
@@ -50631,6 +53224,11 @@ Object.freeze({
|
|
|
50631
53224
|
form: "single",
|
|
50632
53225
|
optional: false
|
|
50633
53226
|
}],
|
|
53227
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
53228
|
+
name: "deviceIds",
|
|
53229
|
+
form: "array",
|
|
53230
|
+
optional: true
|
|
53231
|
+
}],
|
|
50634
53232
|
"pipelineExecutor.runPipeline": [{
|
|
50635
53233
|
name: "deviceId",
|
|
50636
53234
|
form: "single",
|
|
@@ -50736,6 +53334,11 @@ Object.freeze({
|
|
|
50736
53334
|
form: "single",
|
|
50737
53335
|
optional: false
|
|
50738
53336
|
}],
|
|
53337
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
53338
|
+
name: "deviceId",
|
|
53339
|
+
form: "single",
|
|
53340
|
+
optional: false
|
|
53341
|
+
}],
|
|
50739
53342
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
50740
53343
|
name: "deviceId",
|
|
50741
53344
|
form: "single",
|
|
@@ -51507,6 +54110,11 @@ Object.freeze({
|
|
|
51507
54110
|
form: "single",
|
|
51508
54111
|
optional: false
|
|
51509
54112
|
}],
|
|
54113
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
54114
|
+
name: "deviceId",
|
|
54115
|
+
form: "single",
|
|
54116
|
+
optional: false
|
|
54117
|
+
}],
|
|
51510
54118
|
"webrtcSession.closeSession": [{
|
|
51511
54119
|
name: "deviceId",
|
|
51512
54120
|
form: "single",
|
|
@@ -51736,6 +54344,8 @@ new Map(Object.entries({
|
|
|
51736
54344
|
"detection-blind": "device-events",
|
|
51737
54345
|
"node-online": "system",
|
|
51738
54346
|
"node-offline": "system",
|
|
54347
|
+
"node-restarting": "system",
|
|
54348
|
+
"node-updating": "system",
|
|
51739
54349
|
"node-inference-unavailable": "system",
|
|
51740
54350
|
"addon-crash-loop": "system",
|
|
51741
54351
|
"addon-update-available": "system",
|
|
@@ -51813,6 +54423,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
51813
54423
|
kinds: [
|
|
51814
54424
|
"node-offline",
|
|
51815
54425
|
"node-online",
|
|
54426
|
+
"node-restarting",
|
|
51816
54427
|
"node-inference-unavailable"
|
|
51817
54428
|
]
|
|
51818
54429
|
},
|
|
@@ -51834,6 +54445,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
51834
54445
|
label: "Server & container updates",
|
|
51835
54446
|
kinds: [
|
|
51836
54447
|
"server-update-available",
|
|
54448
|
+
"node-updating",
|
|
51837
54449
|
"server-updated",
|
|
51838
54450
|
"wrapper-update-available"
|
|
51839
54451
|
]
|
|
@@ -51981,6 +54593,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
51981
54593
|
kinds: [
|
|
51982
54594
|
"node-offline",
|
|
51983
54595
|
"node-online",
|
|
54596
|
+
"node-restarting",
|
|
51984
54597
|
"node-inference-unavailable"
|
|
51985
54598
|
]
|
|
51986
54599
|
},
|
|
@@ -52002,6 +54615,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
52002
54615
|
example: "server 1.2.377 → 1.2.378",
|
|
52003
54616
|
kinds: [
|
|
52004
54617
|
"server-update-available",
|
|
54618
|
+
"node-updating",
|
|
52005
54619
|
"server-updated",
|
|
52006
54620
|
"wrapper-update-available"
|
|
52007
54621
|
]
|
|
@@ -52034,7 +54648,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
52034
54648
|
{
|
|
52035
54649
|
name: "summarySection",
|
|
52036
54650
|
label: "Summary: this section",
|
|
52037
|
-
description: "The section a per-section summary row is about
|
|
54651
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
52038
54652
|
example: "Batterie scariche",
|
|
52039
54653
|
group: "system",
|
|
52040
54654
|
families: ["rule"],
|