@camstack/addon-smtp-nodemailer 1.2.117 → 1.2.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/smtp.addon.js +3023 -575
- package/dist/smtp.addon.mjs +3023 -575
- package/package.json +1 -1
package/dist/smtp.addon.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -113,6 +113,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
113
113
|
*/
|
|
114
114
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
115
115
|
/**
|
|
116
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
117
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
118
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
119
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
120
|
+
*/
|
|
121
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
122
|
+
/**
|
|
116
123
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
117
124
|
* transitions from `failed` back to `healthy` (typically via the
|
|
118
125
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -535,15 +542,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
535
542
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
536
543
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
537
544
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
538
|
-
/**
|
|
539
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
540
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
541
|
-
* `createSession`, so running sessions keep their current backend until
|
|
542
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
543
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
544
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
545
|
-
*/
|
|
546
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
547
545
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
548
546
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
549
547
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5414,7 +5412,7 @@ var ZodIssueCode = {
|
|
|
5414
5412
|
var ZodFirstPartyTypeKind;
|
|
5415
5413
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5416
5414
|
//#endregion
|
|
5417
|
-
//#region ../types/dist/sleep-
|
|
5415
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5418
5416
|
/**
|
|
5419
5417
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5420
5418
|
* window to float samples (D455).
|
|
@@ -5493,6 +5491,97 @@ function buildAlawTable() {
|
|
|
5493
5491
|
}
|
|
5494
5492
|
buildUlawTable();
|
|
5495
5493
|
buildAlawTable();
|
|
5494
|
+
/** Is this field's stored value a credential? */
|
|
5495
|
+
function isSecretConfigField(field) {
|
|
5496
|
+
if (field.type === "password") return true;
|
|
5497
|
+
return "secret" in field && field.secret === true;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5501
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5502
|
+
*/
|
|
5503
|
+
function isKeychainStoredField(field) {
|
|
5504
|
+
if (!isSecretConfigField(field)) return false;
|
|
5505
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5506
|
+
return !("storage" in field && field.storage === "inline");
|
|
5507
|
+
}
|
|
5508
|
+
/**
|
|
5509
|
+
* What a settings blob holds where a secret used to be.
|
|
5510
|
+
*
|
|
5511
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5512
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5513
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5514
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5515
|
+
*
|
|
5516
|
+
* The same shapes travel to and from the admin UI:
|
|
5517
|
+
*
|
|
5518
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5519
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5520
|
+
* value is set, never the value.
|
|
5521
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5522
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5523
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5524
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5525
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5526
|
+
*
|
|
5527
|
+
* Pure and browser-safe.
|
|
5528
|
+
*/
|
|
5529
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5530
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5531
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5532
|
+
function isRecord$1(value) {
|
|
5533
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5534
|
+
}
|
|
5535
|
+
function makeSecretMarker(ref) {
|
|
5536
|
+
return {
|
|
5537
|
+
$secret: ref,
|
|
5538
|
+
v: 1
|
|
5539
|
+
};
|
|
5540
|
+
}
|
|
5541
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5542
|
+
function isSecretMarker(value) {
|
|
5543
|
+
if (!isRecord$1(value)) return false;
|
|
5544
|
+
const ref = value["$secret"];
|
|
5545
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5546
|
+
}
|
|
5547
|
+
function isSecretClear(value) {
|
|
5548
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5549
|
+
}
|
|
5550
|
+
/**
|
|
5551
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5552
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5553
|
+
* survives this function.
|
|
5554
|
+
*/
|
|
5555
|
+
function toSecretFieldView(stored) {
|
|
5556
|
+
if (isSecretMarker(stored)) return {
|
|
5557
|
+
$secret: stored.$secret,
|
|
5558
|
+
v: 1,
|
|
5559
|
+
set: true
|
|
5560
|
+
};
|
|
5561
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5562
|
+
$secret: null,
|
|
5563
|
+
v: 1,
|
|
5564
|
+
set: true,
|
|
5565
|
+
inline: true
|
|
5566
|
+
};
|
|
5567
|
+
return null;
|
|
5568
|
+
}
|
|
5569
|
+
/**
|
|
5570
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5571
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5572
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5573
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5574
|
+
*/
|
|
5575
|
+
function classifySecretWrite(incoming) {
|
|
5576
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5577
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5578
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5579
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5580
|
+
return {
|
|
5581
|
+
kind: "set",
|
|
5582
|
+
value: incoming
|
|
5583
|
+
};
|
|
5584
|
+
}
|
|
5496
5585
|
Object.fromEntries([
|
|
5497
5586
|
{
|
|
5498
5587
|
id: "overview",
|
|
@@ -5664,33 +5753,19 @@ Object.fromEntries([
|
|
|
5664
5753
|
function isValuelessField(field) {
|
|
5665
5754
|
return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button";
|
|
5666
5755
|
}
|
|
5667
|
-
|
|
5668
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5669
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5670
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5671
|
-
*
|
|
5672
|
-
* For each leaf field:
|
|
5673
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5674
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5675
|
-
*
|
|
5676
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5677
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5678
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5679
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5680
|
-
*/
|
|
5681
|
-
function hydrateSchema(schema, values) {
|
|
5756
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5682
5757
|
return {
|
|
5683
5758
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5684
5759
|
sections: schema.sections.map((section) => ({
|
|
5685
5760
|
...section,
|
|
5686
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5761
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5687
5762
|
}))
|
|
5688
5763
|
};
|
|
5689
5764
|
}
|
|
5690
|
-
function hydrateField(field, values) {
|
|
5765
|
+
function hydrateField(field, values, options) {
|
|
5691
5766
|
if (isValuelessField(field)) return field;
|
|
5692
5767
|
if (field.type === "group") {
|
|
5693
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5768
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5694
5769
|
return {
|
|
5695
5770
|
...field,
|
|
5696
5771
|
fields: hydratedChildren
|
|
@@ -5699,7 +5774,7 @@ function hydrateField(field, values) {
|
|
|
5699
5774
|
if (field.type === "sub-tabs") {
|
|
5700
5775
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5701
5776
|
...tab,
|
|
5702
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5777
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5703
5778
|
}));
|
|
5704
5779
|
return {
|
|
5705
5780
|
...field,
|
|
@@ -5709,6 +5784,33 @@ function hydrateField(field, values) {
|
|
|
5709
5784
|
const key = field.key;
|
|
5710
5785
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5711
5786
|
const defaultValue = field.default;
|
|
5787
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5788
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5789
|
+
...field,
|
|
5790
|
+
value: toSecretFieldView(storedValue)
|
|
5791
|
+
};
|
|
5792
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5793
|
+
...field,
|
|
5794
|
+
value: null
|
|
5795
|
+
};
|
|
5796
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5797
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5798
|
+
if (secretItemKeys.length > 0) {
|
|
5799
|
+
const rows = storedValue.map((row) => {
|
|
5800
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5801
|
+
const out = { ...row };
|
|
5802
|
+
for (const k of secretItemKeys) {
|
|
5803
|
+
const v = Reflect.get(row, k);
|
|
5804
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5805
|
+
}
|
|
5806
|
+
return out;
|
|
5807
|
+
});
|
|
5808
|
+
return {
|
|
5809
|
+
...field,
|
|
5810
|
+
value: rows
|
|
5811
|
+
};
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5712
5814
|
if (field.multiple) {
|
|
5713
5815
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5714
5816
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5951,6 +6053,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5951
6053
|
}
|
|
5952
6054
|
return out;
|
|
5953
6055
|
}
|
|
6056
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6057
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6058
|
+
function globalSecretScope() {
|
|
6059
|
+
return GLOBAL_SCOPE;
|
|
6060
|
+
}
|
|
6061
|
+
function encodeSegment(value) {
|
|
6062
|
+
return encodeURIComponent(value);
|
|
6063
|
+
}
|
|
6064
|
+
/**
|
|
6065
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6066
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6067
|
+
* `providers[authentik].clientSecret`.
|
|
6068
|
+
*/
|
|
6069
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6070
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6071
|
+
}
|
|
6072
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6073
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6074
|
+
fieldPath;
|
|
6075
|
+
constructor(fieldPath, cause) {
|
|
6076
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6077
|
+
this.fieldPath = fieldPath;
|
|
6078
|
+
this.name = "KeychainWriteRefusedError";
|
|
6079
|
+
}
|
|
6080
|
+
};
|
|
6081
|
+
var KEEP = { kind: "keep" };
|
|
6082
|
+
function isRecord(value) {
|
|
6083
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6084
|
+
}
|
|
6085
|
+
function defaultMintId() {
|
|
6086
|
+
return globalThis.crypto.randomUUID();
|
|
6087
|
+
}
|
|
6088
|
+
/** Every marker ref anywhere under `value`. */
|
|
6089
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6090
|
+
if (isSecretMarker(value)) {
|
|
6091
|
+
out.push(value.$secret);
|
|
6092
|
+
return out;
|
|
6093
|
+
}
|
|
6094
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6095
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6096
|
+
return out;
|
|
6097
|
+
}
|
|
6098
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6099
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6100
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6101
|
+
}
|
|
6102
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6103
|
+
const intent = classifySecretWrite(incoming);
|
|
6104
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6105
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6106
|
+
if (intent.kind === "keep") return KEEP;
|
|
6107
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6108
|
+
if (intent.kind === "clear") {
|
|
6109
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6110
|
+
return {
|
|
6111
|
+
kind: "value",
|
|
6112
|
+
value: null
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6116
|
+
kind: "value",
|
|
6117
|
+
value: stored
|
|
6118
|
+
};
|
|
6119
|
+
try {
|
|
6120
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6121
|
+
} catch (err) {
|
|
6122
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6123
|
+
}
|
|
6124
|
+
return {
|
|
6125
|
+
kind: "value",
|
|
6126
|
+
value: makeSecretMarker(ref)
|
|
6127
|
+
};
|
|
6128
|
+
}
|
|
6129
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6130
|
+
function applyMember(out, key, result, storedParent) {
|
|
6131
|
+
if (result.kind === "value") {
|
|
6132
|
+
out[key] = result.value;
|
|
6133
|
+
return;
|
|
6134
|
+
}
|
|
6135
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6136
|
+
else delete out[key];
|
|
6137
|
+
}
|
|
6138
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6139
|
+
const out = { ...incoming };
|
|
6140
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6141
|
+
return out;
|
|
6142
|
+
}
|
|
6143
|
+
function rowId(row, idKey) {
|
|
6144
|
+
const raw = row[idKey];
|
|
6145
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6146
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6147
|
+
return null;
|
|
6148
|
+
}
|
|
6149
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6150
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6151
|
+
if (!Array.isArray(incoming)) {
|
|
6152
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6153
|
+
return {
|
|
6154
|
+
kind: "value",
|
|
6155
|
+
value: incoming
|
|
6156
|
+
};
|
|
6157
|
+
}
|
|
6158
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6159
|
+
for (const row of storedRows) {
|
|
6160
|
+
const id = rowId(row, node.idKey);
|
|
6161
|
+
if (id !== null) storedById.set(id, row);
|
|
6162
|
+
}
|
|
6163
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6164
|
+
const rows = [];
|
|
6165
|
+
for (const row of incoming) {
|
|
6166
|
+
if (!isRecord(row)) {
|
|
6167
|
+
rows.push(row);
|
|
6168
|
+
continue;
|
|
6169
|
+
}
|
|
6170
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6171
|
+
kept.add(id);
|
|
6172
|
+
const withId = {
|
|
6173
|
+
...row,
|
|
6174
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6175
|
+
};
|
|
6176
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6177
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6178
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6179
|
+
}
|
|
6180
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6181
|
+
return {
|
|
6182
|
+
kind: "value",
|
|
6183
|
+
value: rows
|
|
6184
|
+
};
|
|
6185
|
+
}
|
|
6186
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6187
|
+
switch (node.kind) {
|
|
6188
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6189
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6190
|
+
case "object": {
|
|
6191
|
+
if (!isRecord(incoming)) {
|
|
6192
|
+
if (incoming === void 0) return KEEP;
|
|
6193
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6194
|
+
return {
|
|
6195
|
+
kind: "value",
|
|
6196
|
+
value: incoming
|
|
6197
|
+
};
|
|
6198
|
+
}
|
|
6199
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6200
|
+
return {
|
|
6201
|
+
kind: "value",
|
|
6202
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6203
|
+
};
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6208
|
+
function splitNodeKey(key) {
|
|
6209
|
+
const at = key.indexOf("@");
|
|
6210
|
+
return at <= 0 ? {
|
|
6211
|
+
base: key,
|
|
6212
|
+
nodeId: null
|
|
6213
|
+
} : {
|
|
6214
|
+
base: key.slice(0, at),
|
|
6215
|
+
nodeId: key.slice(at + 1)
|
|
6216
|
+
};
|
|
6217
|
+
}
|
|
6218
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6219
|
+
async function transformSecretWrite(input) {
|
|
6220
|
+
const deletes = [];
|
|
6221
|
+
const base = {
|
|
6222
|
+
secrets: input.secrets,
|
|
6223
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6224
|
+
deletes,
|
|
6225
|
+
operatorWrite: input.operatorWrite === true
|
|
6226
|
+
};
|
|
6227
|
+
const out = {};
|
|
6228
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6229
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6230
|
+
const node = input.tree.get(baseKey);
|
|
6231
|
+
if (node === void 0) {
|
|
6232
|
+
out[key] = incoming;
|
|
6233
|
+
continue;
|
|
6234
|
+
}
|
|
6235
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6236
|
+
kind: "node",
|
|
6237
|
+
nodeId
|
|
6238
|
+
} : input.scope ?? globalSecretScope();
|
|
6239
|
+
const result = await writeNode({
|
|
6240
|
+
...base,
|
|
6241
|
+
scope
|
|
6242
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6243
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6244
|
+
}
|
|
6245
|
+
return {
|
|
6246
|
+
patch: out,
|
|
6247
|
+
afterWrite: async () => {
|
|
6248
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6249
|
+
try {
|
|
6250
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6251
|
+
return { orphaned: [] };
|
|
6252
|
+
} catch {
|
|
6253
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6256
|
+
};
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6260
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6261
|
+
*/
|
|
6262
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6263
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6264
|
+
if (refs.length === 0) return {
|
|
6265
|
+
value,
|
|
6266
|
+
unresolved: []
|
|
6267
|
+
};
|
|
6268
|
+
const answers = await secrets.resolve(refs);
|
|
6269
|
+
const unresolved = [];
|
|
6270
|
+
for (const ref of new Set(refs)) {
|
|
6271
|
+
const answer = answers[ref];
|
|
6272
|
+
if (answer === void 0) unresolved.push({
|
|
6273
|
+
ref,
|
|
6274
|
+
reason: "not-initialized"
|
|
6275
|
+
});
|
|
6276
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6277
|
+
ref,
|
|
6278
|
+
reason: answer.reason
|
|
6279
|
+
});
|
|
6280
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6281
|
+
ref,
|
|
6282
|
+
reason: answer.kind
|
|
6283
|
+
});
|
|
6284
|
+
}
|
|
6285
|
+
const substitute = (v) => {
|
|
6286
|
+
if (isSecretMarker(v)) {
|
|
6287
|
+
const answer = answers[v.$secret];
|
|
6288
|
+
return answer?.kind === "value" ? {
|
|
6289
|
+
keep: true,
|
|
6290
|
+
value: answer.value
|
|
6291
|
+
} : {
|
|
6292
|
+
keep: false,
|
|
6293
|
+
value: void 0
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
if (Array.isArray(v)) {
|
|
6297
|
+
const items = [];
|
|
6298
|
+
for (const item of v) {
|
|
6299
|
+
const s = substitute(item);
|
|
6300
|
+
if (s.keep) items.push(s.value);
|
|
6301
|
+
}
|
|
6302
|
+
return {
|
|
6303
|
+
keep: true,
|
|
6304
|
+
value: items
|
|
6305
|
+
};
|
|
6306
|
+
}
|
|
6307
|
+
if (isRecord(v)) {
|
|
6308
|
+
const out = {};
|
|
6309
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6310
|
+
const s = substitute(child);
|
|
6311
|
+
if (s.keep) out[k] = s.value;
|
|
6312
|
+
}
|
|
6313
|
+
return {
|
|
6314
|
+
keep: true,
|
|
6315
|
+
value: out
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
return {
|
|
6319
|
+
keep: true,
|
|
6320
|
+
value: v
|
|
6321
|
+
};
|
|
6322
|
+
};
|
|
6323
|
+
return {
|
|
6324
|
+
value: substitute(value).value,
|
|
6325
|
+
unresolved
|
|
6326
|
+
};
|
|
6327
|
+
}
|
|
6328
|
+
function touchesTree(tree, patch) {
|
|
6329
|
+
if (tree.size === 0) return false;
|
|
6330
|
+
for (const key of Object.keys(patch)) {
|
|
6331
|
+
const at = key.indexOf("@");
|
|
6332
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6333
|
+
}
|
|
6334
|
+
return false;
|
|
6335
|
+
}
|
|
6336
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6337
|
+
async function readStoredAddonBlob(raw) {
|
|
6338
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6339
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6340
|
+
const result = await threeWay.call(raw);
|
|
6341
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6342
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6343
|
+
}
|
|
6344
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6345
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6346
|
+
const serialize = (key, fn) => {
|
|
6347
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6348
|
+
const tail = next.catch(() => void 0);
|
|
6349
|
+
chains.set(key, tail);
|
|
6350
|
+
tail.then(() => {
|
|
6351
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6352
|
+
});
|
|
6353
|
+
return next;
|
|
6354
|
+
};
|
|
6355
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6356
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6357
|
+
return serialize(chainKey, async () => {
|
|
6358
|
+
const stored = await readStored();
|
|
6359
|
+
const result = await transformSecretWrite({
|
|
6360
|
+
tree,
|
|
6361
|
+
secrets: opts.secrets,
|
|
6362
|
+
patch,
|
|
6363
|
+
stored,
|
|
6364
|
+
...scope !== void 0 ? { scope } : {},
|
|
6365
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6366
|
+
});
|
|
6367
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6368
|
+
const { orphaned } = await result.afterWrite();
|
|
6369
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6370
|
+
});
|
|
6371
|
+
};
|
|
6372
|
+
const wrapped = {
|
|
6373
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6374
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6375
|
+
kind: "device",
|
|
6376
|
+
deviceId
|
|
6377
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6378
|
+
};
|
|
6379
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6380
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6381
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6382
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6383
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6384
|
+
} });
|
|
6385
|
+
}
|
|
6386
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6387
|
+
function withSecretAwareSettings(context, opts) {
|
|
6388
|
+
const raw = context.settings;
|
|
6389
|
+
if (raw === void 0) return context;
|
|
6390
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6391
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6392
|
+
if (prop === "settings") return settings;
|
|
6393
|
+
return Reflect.get(target, prop, receiver);
|
|
6394
|
+
} });
|
|
6395
|
+
}
|
|
6396
|
+
var LEAF = { kind: "leaf" };
|
|
6397
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6398
|
+
function collectFields(fields, out) {
|
|
6399
|
+
for (const field of fields) {
|
|
6400
|
+
if (field.type === "group") {
|
|
6401
|
+
collectFields(field.fields, out);
|
|
6402
|
+
continue;
|
|
6403
|
+
}
|
|
6404
|
+
if (field.type === "sub-tabs") {
|
|
6405
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6406
|
+
continue;
|
|
6407
|
+
}
|
|
6408
|
+
if (field.type === "editable-array") {
|
|
6409
|
+
const item = /* @__PURE__ */ new Map();
|
|
6410
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6411
|
+
if (item.size > 0) out.set(field.key, {
|
|
6412
|
+
kind: "array",
|
|
6413
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6414
|
+
item
|
|
6415
|
+
});
|
|
6416
|
+
continue;
|
|
6417
|
+
}
|
|
6418
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6419
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6422
|
+
/** The secret tree a settings schema declares. */
|
|
6423
|
+
function secretTreeFromSchema(schema) {
|
|
6424
|
+
const out = /* @__PURE__ */ new Map();
|
|
6425
|
+
if (schema === null) return out;
|
|
6426
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6427
|
+
return out;
|
|
6428
|
+
}
|
|
6429
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6430
|
+
function parseSecretStatePath(path) {
|
|
6431
|
+
const segments = [];
|
|
6432
|
+
for (const raw of path.split(".")) {
|
|
6433
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6434
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6435
|
+
segments.push(m[2] !== void 0 ? {
|
|
6436
|
+
key: m[1],
|
|
6437
|
+
idKey: m[2]
|
|
6438
|
+
} : { key: m[1] });
|
|
6439
|
+
}
|
|
6440
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6441
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6442
|
+
return segments;
|
|
6443
|
+
}
|
|
6444
|
+
function insert(into, segments) {
|
|
6445
|
+
const [head, ...rest] = segments;
|
|
6446
|
+
if (head === void 0) return;
|
|
6447
|
+
if (rest.length === 0) {
|
|
6448
|
+
into.set(head.key, LEAF);
|
|
6449
|
+
return;
|
|
6450
|
+
}
|
|
6451
|
+
const existing = into.get(head.key);
|
|
6452
|
+
if (head.idKey !== void 0) {
|
|
6453
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6454
|
+
insert(item, rest);
|
|
6455
|
+
into.set(head.key, {
|
|
6456
|
+
kind: "array",
|
|
6457
|
+
idKey: head.idKey,
|
|
6458
|
+
item
|
|
6459
|
+
});
|
|
6460
|
+
return;
|
|
6461
|
+
}
|
|
6462
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6463
|
+
insert(children, rest);
|
|
6464
|
+
into.set(head.key, {
|
|
6465
|
+
kind: "object",
|
|
6466
|
+
children
|
|
6467
|
+
});
|
|
6468
|
+
}
|
|
6469
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6470
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6471
|
+
if (paths.length === 0) return tree;
|
|
6472
|
+
const out = new Map(tree);
|
|
6473
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6474
|
+
return out;
|
|
6475
|
+
}
|
|
6476
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6477
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6478
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6479
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6480
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5954
6481
|
/**
|
|
5955
6482
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5956
6483
|
*
|
|
@@ -6020,6 +6547,25 @@ var BaseAddon = class {
|
|
|
6020
6547
|
settingsStoreReady = false;
|
|
6021
6548
|
/** Default config values. Provided via constructor. */
|
|
6022
6549
|
defaults;
|
|
6550
|
+
/**
|
|
6551
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6552
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6553
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6554
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6555
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6556
|
+
*/
|
|
6557
|
+
secretStatePaths = [];
|
|
6558
|
+
_addonSecretTree = null;
|
|
6559
|
+
_deviceSecretTree = null;
|
|
6560
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6561
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6562
|
+
_unresolvedSecrets = [];
|
|
6563
|
+
_secretRetryTimer = null;
|
|
6564
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6565
|
+
_secretChangeTimer = null;
|
|
6566
|
+
_secretChangeUnsub = null;
|
|
6567
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6568
|
+
_operatorWriteDepth = 0;
|
|
6023
6569
|
constructor(defaults) {
|
|
6024
6570
|
this.defaults = defaults;
|
|
6025
6571
|
this._config = { ...defaults };
|
|
@@ -6055,8 +6601,18 @@ var BaseAddon = class {
|
|
|
6055
6601
|
return this._config;
|
|
6056
6602
|
}
|
|
6057
6603
|
async initialize(context) {
|
|
6058
|
-
|
|
6604
|
+
const secrets = context.secrets;
|
|
6605
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6606
|
+
secrets,
|
|
6607
|
+
addonTree: () => this.addonSecretTree(),
|
|
6608
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6609
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6610
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6611
|
+
}) : context;
|
|
6059
6612
|
await this.resolveConfig();
|
|
6613
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6614
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6615
|
+
});
|
|
6060
6616
|
const result = await this.onInitialize();
|
|
6061
6617
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6062
6618
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6089,6 +6645,12 @@ var BaseAddon = class {
|
|
|
6089
6645
|
*/
|
|
6090
6646
|
async onHubReachable() {}
|
|
6091
6647
|
async shutdown() {
|
|
6648
|
+
this._secretChangeUnsub?.();
|
|
6649
|
+
this._secretChangeUnsub = null;
|
|
6650
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6651
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6652
|
+
this._secretRetryTimer = null;
|
|
6653
|
+
this._secretChangeTimer = null;
|
|
6092
6654
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6093
6655
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6094
6656
|
await this.onShutdown();
|
|
@@ -6167,7 +6729,7 @@ var BaseAddon = class {
|
|
|
6167
6729
|
return hydrateSchema(schema, overlay ? {
|
|
6168
6730
|
...projected,
|
|
6169
6731
|
...overlay
|
|
6170
|
-
} : projected);
|
|
6732
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6171
6733
|
}
|
|
6172
6734
|
/**
|
|
6173
6735
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6216,7 +6778,7 @@ var BaseAddon = class {
|
|
|
6216
6778
|
return hydrateSchema({
|
|
6217
6779
|
...schema,
|
|
6218
6780
|
sections
|
|
6219
|
-
}, projected);
|
|
6781
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6220
6782
|
}
|
|
6221
6783
|
/**
|
|
6222
6784
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6270,18 +6832,50 @@ var BaseAddon = class {
|
|
|
6270
6832
|
value: result.value[key]
|
|
6271
6833
|
};
|
|
6272
6834
|
}
|
|
6835
|
+
/**
|
|
6836
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6837
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6838
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6839
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6840
|
+
* writing back what it read is not (D787).
|
|
6841
|
+
*/
|
|
6842
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6843
|
+
this._operatorWriteDepth++;
|
|
6844
|
+
try {
|
|
6845
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6846
|
+
} finally {
|
|
6847
|
+
this._operatorWriteDepth--;
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6273
6850
|
async updateGlobalSettings(patch, nodeId) {
|
|
6851
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6852
|
+
}
|
|
6853
|
+
/**
|
|
6854
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6855
|
+
*
|
|
6856
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6857
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6858
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6859
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6860
|
+
*/
|
|
6861
|
+
async clearSecrets(keys, nodeId) {
|
|
6862
|
+
const tree = this.addonSecretTree();
|
|
6863
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6864
|
+
const patch = {};
|
|
6865
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6866
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6867
|
+
}
|
|
6868
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6274
6869
|
const keys = this.perNodeKeys();
|
|
6275
6870
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6276
6871
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6277
|
-
const barePatch = patch;
|
|
6278
6872
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6279
6873
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6280
6874
|
if (target !== localNode) return;
|
|
6281
6875
|
await this.resolveConfig();
|
|
6282
6876
|
await this.onConfigChanged();
|
|
6283
6877
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6284
|
-
this.maybeAutoRestart(
|
|
6878
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6285
6879
|
}
|
|
6286
6880
|
/**
|
|
6287
6881
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6306,7 +6900,7 @@ var BaseAddon = class {
|
|
|
6306
6900
|
* time to return its response before the addon is torn down and
|
|
6307
6901
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6308
6902
|
*/
|
|
6309
|
-
maybeAutoRestart(
|
|
6903
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6310
6904
|
if (!schema) return;
|
|
6311
6905
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6312
6906
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6314,13 +6908,13 @@ var BaseAddon = class {
|
|
|
6314
6908
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6315
6909
|
}
|
|
6316
6910
|
if (restartKeys.size === 0) return;
|
|
6317
|
-
if (!
|
|
6911
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6318
6912
|
const ctx = this._ctx;
|
|
6319
6913
|
if (!ctx) return;
|
|
6320
6914
|
const addonId = ctx.id;
|
|
6321
6915
|
setImmediate(() => {
|
|
6322
6916
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6323
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6917
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6324
6918
|
}).catch((err) => {
|
|
6325
6919
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6326
6920
|
});
|
|
@@ -6329,7 +6923,7 @@ var BaseAddon = class {
|
|
|
6329
6923
|
async getDeviceSettings(deviceId) {
|
|
6330
6924
|
const schema = this.deviceSettingsSchema();
|
|
6331
6925
|
if (!schema) return { sections: [] };
|
|
6332
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6926
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6333
6927
|
}
|
|
6334
6928
|
async updateDeviceSettings(deviceId, patch) {
|
|
6335
6929
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6459,7 +7053,7 @@ var BaseAddon = class {
|
|
|
6459
7053
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6460
7054
|
*/
|
|
6461
7055
|
async resolveConfig() {
|
|
6462
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7056
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6463
7057
|
const perNode = this.perNodeKeys();
|
|
6464
7058
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6465
7059
|
const resolved = { ...this.defaults };
|
|
@@ -6484,7 +7078,7 @@ var BaseAddon = class {
|
|
|
6484
7078
|
key,
|
|
6485
7079
|
schema,
|
|
6486
7080
|
fallback,
|
|
6487
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7081
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6488
7082
|
write: async (patch) => {
|
|
6489
7083
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6490
7084
|
},
|
|
@@ -6501,7 +7095,7 @@ var BaseAddon = class {
|
|
|
6501
7095
|
key,
|
|
6502
7096
|
schema,
|
|
6503
7097
|
fallback,
|
|
6504
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7098
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6505
7099
|
write: async (patch) => {
|
|
6506
7100
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6507
7101
|
},
|
|
@@ -6513,6 +7107,70 @@ var BaseAddon = class {
|
|
|
6513
7107
|
} })
|
|
6514
7108
|
});
|
|
6515
7109
|
}
|
|
7110
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7111
|
+
addonSecretTree() {
|
|
7112
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7113
|
+
return this._addonSecretTree;
|
|
7114
|
+
}
|
|
7115
|
+
deviceSecretTree() {
|
|
7116
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7117
|
+
return this._deviceSecretTree;
|
|
7118
|
+
}
|
|
7119
|
+
/**
|
|
7120
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7121
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7122
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7123
|
+
* than start on an empty credential.
|
|
7124
|
+
*/
|
|
7125
|
+
get unresolvedSecrets() {
|
|
7126
|
+
return this._unresolvedSecrets;
|
|
7127
|
+
}
|
|
7128
|
+
/**
|
|
7129
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7130
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7131
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7132
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7133
|
+
* ever written back from here.
|
|
7134
|
+
*/
|
|
7135
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7136
|
+
const secrets = this._ctx?.secrets;
|
|
7137
|
+
if (secrets === void 0) return blob;
|
|
7138
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7139
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7140
|
+
if (refs.length === 0) {
|
|
7141
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7142
|
+
return blob;
|
|
7143
|
+
}
|
|
7144
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7145
|
+
if (trackForConfig) {
|
|
7146
|
+
this._unresolvedSecrets = unresolved;
|
|
7147
|
+
if (unresolved.length > 0) {
|
|
7148
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7149
|
+
ref: u.ref,
|
|
7150
|
+
reason: u.reason
|
|
7151
|
+
})) } });
|
|
7152
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7153
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7154
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7155
|
+
}
|
|
7156
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7157
|
+
}
|
|
7158
|
+
return value;
|
|
7159
|
+
}
|
|
7160
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7161
|
+
scheduleSecretReresolve(delayMs) {
|
|
7162
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7163
|
+
if (this[timerOf] !== null) return;
|
|
7164
|
+
const timer = setTimeout(() => {
|
|
7165
|
+
this[timerOf] = null;
|
|
7166
|
+
if (this._ctx === null) return;
|
|
7167
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7168
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7169
|
+
});
|
|
7170
|
+
}, delayMs);
|
|
7171
|
+
timer.unref?.();
|
|
7172
|
+
this[timerOf] = timer;
|
|
7173
|
+
}
|
|
6516
7174
|
/**
|
|
6517
7175
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6518
7176
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6780,32 +7438,12 @@ object({
|
|
|
6780
7438
|
audioCodec: string().optional(),
|
|
6781
7439
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6782
7440
|
});
|
|
6783
|
-
var EncodedPacketSchema = object({
|
|
6784
|
-
type: _enum(["video", "audio"]),
|
|
6785
|
-
data: _instanceof(Uint8Array),
|
|
6786
|
-
pts: number(),
|
|
6787
|
-
dts: number(),
|
|
6788
|
-
keyframe: boolean(),
|
|
6789
|
-
codec: string()
|
|
6790
|
-
});
|
|
6791
|
-
var DecodedFrameSchema = object({
|
|
6792
|
-
data: _instanceof(Uint8Array),
|
|
6793
|
-
width: number(),
|
|
6794
|
-
height: number(),
|
|
6795
|
-
format: _enum([
|
|
6796
|
-
"jpeg",
|
|
6797
|
-
"rgb",
|
|
6798
|
-
"bgr",
|
|
6799
|
-
"yuv420",
|
|
6800
|
-
"gray"
|
|
6801
|
-
]),
|
|
6802
|
-
timestamp: number()
|
|
6803
|
-
});
|
|
6804
7441
|
/**
|
|
6805
7442
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6806
7443
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6807
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6808
|
-
*
|
|
7444
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7445
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7446
|
+
* over tRPC / Moleculer.
|
|
6809
7447
|
*
|
|
6810
7448
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6811
7449
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6831,50 +7469,6 @@ var FrameHandleSchema = object({
|
|
|
6831
7469
|
slotCount: number().int().positive()
|
|
6832
7470
|
});
|
|
6833
7471
|
/**
|
|
6834
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6835
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6836
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6837
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6838
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6839
|
-
*/
|
|
6840
|
-
var FrameHandleFormatSchema = _enum([
|
|
6841
|
-
"rgb",
|
|
6842
|
-
"bgr",
|
|
6843
|
-
"yuv420",
|
|
6844
|
-
"gray"
|
|
6845
|
-
]);
|
|
6846
|
-
/**
|
|
6847
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6848
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6849
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6850
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6851
|
-
* they asked for with no broker-side conversion.
|
|
6852
|
-
*/
|
|
6853
|
-
var SubscribeFramesInputSchema = object({
|
|
6854
|
-
brokerId: string(),
|
|
6855
|
-
format: FrameHandleFormatSchema,
|
|
6856
|
-
/**
|
|
6857
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6858
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6859
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6860
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6861
|
-
*/
|
|
6862
|
-
maxFps: number().positive().optional(),
|
|
6863
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6864
|
-
tag: string().optional()
|
|
6865
|
-
});
|
|
6866
|
-
/**
|
|
6867
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6868
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6869
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6870
|
-
*/
|
|
6871
|
-
var SubscribeFramesResultSchema = object({
|
|
6872
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6873
|
-
subscriptionId: string(),
|
|
6874
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6875
|
-
maxFps: number().nonnegative()
|
|
6876
|
-
});
|
|
6877
|
-
/**
|
|
6878
7472
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6879
7473
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6880
7474
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6882,8 +7476,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6882
7476
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6883
7477
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6884
7478
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6885
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6886
|
-
*
|
|
7479
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7480
|
+
* it.
|
|
6887
7481
|
*/
|
|
6888
7482
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6889
7483
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6901,11 +7495,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6901
7495
|
format: AudioChunkFormatSchema.optional()
|
|
6902
7496
|
});
|
|
6903
7497
|
/**
|
|
6904
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6905
|
-
*
|
|
6906
|
-
*
|
|
6907
|
-
*
|
|
6908
|
-
* `pullAudioChunks`.
|
|
7498
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7499
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7500
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7501
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6909
7502
|
*/
|
|
6910
7503
|
var SubscribeAudioChunksInputSchema = object({
|
|
6911
7504
|
brokerId: string(),
|
|
@@ -6936,9 +7529,7 @@ var BrokerStatsSchema = object({
|
|
|
6936
7529
|
"stopped"
|
|
6937
7530
|
]),
|
|
6938
7531
|
inputFps: number(),
|
|
6939
|
-
decodeFps: number(),
|
|
6940
7532
|
encodedSubscribers: number(),
|
|
6941
|
-
decodedSubscribers: number(),
|
|
6942
7533
|
uptimeMs: number(),
|
|
6943
7534
|
bitrateKbps: number(),
|
|
6944
7535
|
idrIntervalMs: number(),
|
|
@@ -6951,14 +7542,6 @@ var BrokerStatsSchema = object({
|
|
|
6951
7542
|
preBufferMs: number(),
|
|
6952
7543
|
preBufferPackets: number(),
|
|
6953
7544
|
/**
|
|
6954
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6955
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6956
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6957
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6958
|
-
* a separate cap call per broker.
|
|
6959
|
-
*/
|
|
6960
|
-
decoderNodeId: string().nullable(),
|
|
6961
|
-
/**
|
|
6962
7545
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6963
7546
|
* when the stream has no audio track or the broker is in cold start.
|
|
6964
7547
|
* `supported = false` means the codec was detected but the local
|
|
@@ -10280,70 +10863,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10280
10863
|
"backup"
|
|
10281
10864
|
]).optional()
|
|
10282
10865
|
});
|
|
10283
|
-
var DecoderStatsSchema = object({
|
|
10284
|
-
inputFps: number(),
|
|
10285
|
-
outputFps: number(),
|
|
10286
|
-
avgDecodeTimeMs: number(),
|
|
10287
|
-
droppedFrames: number(),
|
|
10288
|
-
/**
|
|
10289
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10290
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10291
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10292
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10293
|
-
*/
|
|
10294
|
-
lagMs: number().optional(),
|
|
10295
|
-
effectiveFps: number().optional(),
|
|
10296
|
-
adaptiveFps: number().optional()
|
|
10297
|
-
});
|
|
10298
|
-
var DecoderSessionConfigSchema = object({
|
|
10299
|
-
codec: string(),
|
|
10300
|
-
maxFps: number().default(0),
|
|
10301
|
-
outputFormat: _enum([
|
|
10302
|
-
"jpeg",
|
|
10303
|
-
"rgb",
|
|
10304
|
-
"bgr",
|
|
10305
|
-
"yuv420",
|
|
10306
|
-
"gray"
|
|
10307
|
-
]).default("jpeg"),
|
|
10308
|
-
scale: number().default(1),
|
|
10309
|
-
width: number().optional(),
|
|
10310
|
-
height: number().optional(),
|
|
10311
|
-
/**
|
|
10312
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10313
|
-
* because the cap is generic (any caller could request decode), but
|
|
10314
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10315
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10316
|
-
* sendPacket errors on a single hung camera).
|
|
10317
|
-
*/
|
|
10318
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10319
|
-
/**
|
|
10320
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10321
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10322
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10323
|
-
* profile cleanly.
|
|
10324
|
-
*/
|
|
10325
|
-
tag: string().optional(),
|
|
10326
|
-
/**
|
|
10327
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10328
|
-
*
|
|
10329
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10330
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10331
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10332
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10333
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10334
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10335
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10336
|
-
*/
|
|
10337
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10338
|
-
/**
|
|
10339
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10340
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10341
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10342
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10343
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10344
|
-
*/
|
|
10345
|
-
debug: boolean().optional()
|
|
10346
|
-
});
|
|
10347
10866
|
/**
|
|
10348
10867
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10349
10868
|
* an addon declares its channels in.
|
|
@@ -10486,6 +11005,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10486
11005
|
"balanced",
|
|
10487
11006
|
"strict"
|
|
10488
11007
|
]);
|
|
11008
|
+
/** Steps whose effect a root label can BE. */
|
|
11009
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
11010
|
+
"animal-classifier",
|
|
11011
|
+
"vehicle-classifier",
|
|
11012
|
+
"package-detection"
|
|
11013
|
+
];
|
|
11014
|
+
/** Steps whose box a root detection can BE. */
|
|
11015
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11016
|
+
/**
|
|
11017
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11018
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11019
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11020
|
+
* no camera tree carries.)
|
|
11021
|
+
*/
|
|
11022
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11023
|
+
[
|
|
11024
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11025
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11026
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11027
|
+
];
|
|
10489
11028
|
var MODEL_FORMATS = [
|
|
10490
11029
|
"onnx",
|
|
10491
11030
|
"coreml",
|
|
@@ -10514,7 +11053,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10514
11053
|
/** Multi-file payload (directory members or sibling files). */
|
|
10515
11054
|
files: array(string()).readonly().optional(),
|
|
10516
11055
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10517
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11056
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11057
|
+
/**
|
|
11058
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11059
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11060
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11061
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11062
|
+
* node records the revision it downloaded next to the file
|
|
11063
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11064
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11065
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11066
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11067
|
+
*/
|
|
11068
|
+
revision: string().min(1).optional()
|
|
11069
|
+
});
|
|
11070
|
+
/**
|
|
11071
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11072
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11073
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11074
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11075
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11076
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11077
|
+
*/
|
|
11078
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11079
|
+
"current",
|
|
11080
|
+
"stale",
|
|
11081
|
+
"missing"
|
|
11082
|
+
]);
|
|
11083
|
+
/**
|
|
11084
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11085
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11086
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11087
|
+
*/
|
|
11088
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11089
|
+
"fp32",
|
|
11090
|
+
"fp16",
|
|
11091
|
+
"int8"
|
|
11092
|
+
]);
|
|
11093
|
+
/**
|
|
11094
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11095
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11096
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11097
|
+
*/
|
|
11098
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11099
|
+
downloaded: boolean(),
|
|
11100
|
+
sizeMB: number(),
|
|
11101
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11102
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10518
11103
|
});
|
|
10519
11104
|
/**
|
|
10520
11105
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10555,11 +11140,11 @@ var ModelVariantGroupSchema = object({
|
|
|
10555
11140
|
/** Quantization axis. Omit ⇒ the fp32 base build. */
|
|
10556
11141
|
precision: _enum(["fp32", "int8"]).optional(),
|
|
10557
11142
|
/**
|
|
10558
|
-
*
|
|
10559
|
-
*
|
|
10560
|
-
*
|
|
11143
|
+
* Training / latency-variant axis. Omit ⇒ the standard build. `test` marks
|
|
11144
|
+
* an alternate training of the same family (Scrypted `relu_test`); chip
|
|
11145
|
+
* label is "Test".
|
|
10561
11146
|
*/
|
|
10562
|
-
optimization: _enum(["standard", "
|
|
11147
|
+
optimization: _enum(["standard", "test"]).optional(),
|
|
10563
11148
|
/**
|
|
10564
11149
|
* Input-resolution axis (square input side, px). Omit ⇒ the family's native
|
|
10565
11150
|
* resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
|
|
@@ -10582,9 +11167,10 @@ var ModelProviderIdSchema = _enum([
|
|
|
10582
11167
|
* are per upstream. A persisted custom-model row written when this field was a
|
|
10583
11168
|
* string still parses — the string is lifted into `{ weights }`.
|
|
10584
11169
|
*
|
|
10585
|
-
* Every licence surface (the
|
|
10586
|
-
*
|
|
10587
|
-
*
|
|
11170
|
+
* Every machine licence surface (`THIRD_PARTY_MODELS.md`, the Hugging Face
|
|
11171
|
+
* model table) is GENERATED from these records by
|
|
11172
|
+
* `scripts/gen-model-licenses.ts` (D661). Operator-facing docs live in
|
|
11173
|
+
* `camstack/docs` → `/docs/detection/models`.
|
|
10588
11174
|
*/
|
|
10589
11175
|
var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
|
|
10590
11176
|
/** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
|
|
@@ -10617,6 +11203,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10617
11203
|
/** True when the weights or their data forbid commercial use. */
|
|
10618
11204
|
nonCommercial: boolean().optional()
|
|
10619
11205
|
}));
|
|
11206
|
+
/**
|
|
11207
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
11208
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
11209
|
+
*
|
|
11210
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
11211
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
11212
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
11213
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
11214
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
11215
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
11216
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11217
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11218
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11219
|
+
* postprocessor on read, never stored by an import.
|
|
11220
|
+
*/
|
|
11221
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11222
|
+
object({
|
|
11223
|
+
kind: literal("label"),
|
|
11224
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11225
|
+
labelToEffect: record(string(), string()),
|
|
11226
|
+
uncovered: array(string()).readonly()
|
|
11227
|
+
}),
|
|
11228
|
+
object({
|
|
11229
|
+
kind: literal("crop"),
|
|
11230
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11231
|
+
rootLabels: array(string()).readonly(),
|
|
11232
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11233
|
+
childClass: _enum(["plate", "face"]),
|
|
11234
|
+
/**
|
|
11235
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11236
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11237
|
+
* stored by an import.
|
|
11238
|
+
*/
|
|
11239
|
+
rootInputPx: number().int().positive().optional()
|
|
11240
|
+
}),
|
|
11241
|
+
object({
|
|
11242
|
+
kind: literal("mask"),
|
|
11243
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11244
|
+
})
|
|
11245
|
+
]);
|
|
10620
11246
|
var ModelCatalogEntrySchema = object({
|
|
10621
11247
|
id: string(),
|
|
10622
11248
|
name: string(),
|
|
@@ -10682,6 +11308,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10682
11308
|
*/
|
|
10683
11309
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10684
11310
|
/**
|
|
11311
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11312
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11313
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11314
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11315
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11316
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11317
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11318
|
+
*/
|
|
11319
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11320
|
+
/**
|
|
11321
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11322
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11323
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11324
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11325
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11326
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11327
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11328
|
+
*/
|
|
11329
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11330
|
+
/**
|
|
11331
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11332
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11333
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11334
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11335
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11336
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11337
|
+
*/
|
|
11338
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11339
|
+
/**
|
|
10685
11340
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10686
11341
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10687
11342
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10743,6 +11398,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10743
11398
|
*/
|
|
10744
11399
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10745
11400
|
/**
|
|
11401
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
11402
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
11403
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
11404
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
11405
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
11406
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
11407
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
11408
|
+
*/
|
|
11409
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
11410
|
+
/**
|
|
10746
11411
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10747
11412
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
10748
11413
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -12344,13 +13009,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12344
13009
|
lastRtpAt: number(),
|
|
12345
13010
|
bytesSent: number()
|
|
12346
13011
|
});
|
|
12347
|
-
var BrokerDecodedClientSchema = object({
|
|
12348
|
-
tag: string(),
|
|
12349
|
-
subscribedAt: number(),
|
|
12350
|
-
maxFps: number(),
|
|
12351
|
-
framesDelivered: number(),
|
|
12352
|
-
framesDropped: number()
|
|
12353
|
-
});
|
|
12354
13012
|
var BrokerAudioClientSchema = object({
|
|
12355
13013
|
tag: string(),
|
|
12356
13014
|
subscribedAt: number(),
|
|
@@ -12442,7 +13100,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12442
13100
|
});
|
|
12443
13101
|
var BrokerClientsSchema = object({
|
|
12444
13102
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12445
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12446
13103
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12447
13104
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12448
13105
|
pipeClients: number(),
|
|
@@ -12811,11 +13468,7 @@ method(object({
|
|
|
12811
13468
|
auth: "admin"
|
|
12812
13469
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
12813
13470
|
brokerId: string(),
|
|
12814
|
-
channel: _enum([
|
|
12815
|
-
"rtsp",
|
|
12816
|
-
"decoded",
|
|
12817
|
-
"audio"
|
|
12818
|
-
]),
|
|
13471
|
+
channel: _enum(["rtsp", "audio"]),
|
|
12819
13472
|
handle: string()
|
|
12820
13473
|
}), object({ killed: boolean() }), {
|
|
12821
13474
|
kind: "mutation",
|
|
@@ -12850,10 +13503,7 @@ method(object({
|
|
|
12850
13503
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
12851
13504
|
subscriptionId: string(),
|
|
12852
13505
|
maxCount: number().int().positive().default(8)
|
|
12853
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
12854
|
-
subscriptionId: string(),
|
|
12855
|
-
maxCount: number().int().positive().default(4)
|
|
12856
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13506
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
12857
13507
|
brokerId: string(),
|
|
12858
13508
|
seconds: number().min(0).max(30)
|
|
12859
13509
|
}), _void(), {
|
|
@@ -14011,53 +14661,201 @@ id: union([string(), number()]) }), {
|
|
|
14011
14661
|
auth: "admin"
|
|
14012
14662
|
});
|
|
14013
14663
|
/**
|
|
14014
|
-
*
|
|
14015
|
-
*
|
|
14016
|
-
*
|
|
14664
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14665
|
+
*
|
|
14666
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14667
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14668
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14669
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14670
|
+
* against the CALLER, never against anything the caller claims.
|
|
14671
|
+
*
|
|
14672
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14673
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14674
|
+
* connection, the agent from its child's connection carried in
|
|
14675
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14676
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14677
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14678
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14679
|
+
* runner is the same OS user): see the threat model in
|
|
14680
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14681
|
+
*
|
|
14682
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14683
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14684
|
+
* floors every method to admin anyway (D240).
|
|
14685
|
+
*
|
|
14686
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14017
14687
|
*/
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
|
|
14027
|
-
})
|
|
14028
|
-
|
|
14688
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14689
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14690
|
+
"key-missing",
|
|
14691
|
+
"wrong-key",
|
|
14692
|
+
"key-file-unreadable",
|
|
14693
|
+
"store-unavailable",
|
|
14694
|
+
"not-initialized",
|
|
14695
|
+
"decrypt-failed"
|
|
14696
|
+
]);
|
|
14697
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14698
|
+
state: literal("locked"),
|
|
14699
|
+
reason: KeychainUnavailableReasonSchema
|
|
14700
|
+
})]);
|
|
14701
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14702
|
+
object({
|
|
14703
|
+
kind: literal("value"),
|
|
14704
|
+
value: string(),
|
|
14705
|
+
version: number().int()
|
|
14706
|
+
}),
|
|
14707
|
+
object({ kind: literal("missing") }),
|
|
14708
|
+
object({
|
|
14709
|
+
kind: literal("unavailable"),
|
|
14710
|
+
reason: KeychainUnavailableReasonSchema
|
|
14711
|
+
}),
|
|
14712
|
+
object({ kind: literal("forbidden") })
|
|
14713
|
+
]);
|
|
14714
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14715
|
+
/** Metadata of one stored value — never the value. */
|
|
14716
|
+
var KeychainSecretMetaSchema = object({
|
|
14717
|
+
ref: string(),
|
|
14718
|
+
owner: string(),
|
|
14719
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14720
|
+
scope: string(),
|
|
14721
|
+
fieldPath: string(),
|
|
14722
|
+
version: number().int(),
|
|
14723
|
+
createdAt: number(),
|
|
14724
|
+
updatedAt: number(),
|
|
14725
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14726
|
+
updatedBy: string(),
|
|
14727
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14728
|
+
lastReadAt: number().nullable()
|
|
14729
|
+
});
|
|
14730
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14731
|
+
method(object({
|
|
14732
|
+
ref: string().min(1),
|
|
14733
|
+
value: string().min(1)
|
|
14734
|
+
}), object({
|
|
14735
|
+
ref: string(),
|
|
14736
|
+
version: number().int()
|
|
14737
|
+
}), {
|
|
14738
|
+
kind: "mutation",
|
|
14739
|
+
auth: "admin"
|
|
14740
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14741
|
+
kind: "mutation",
|
|
14742
|
+
auth: "admin"
|
|
14743
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14744
|
+
var KeychainKeySourceSchema = object({
|
|
14745
|
+
kind: _enum([
|
|
14746
|
+
"config-file",
|
|
14747
|
+
"previous-config-file",
|
|
14748
|
+
"platform",
|
|
14749
|
+
"default-file"
|
|
14750
|
+
]),
|
|
14751
|
+
/** File sources only — a path is not a secret. */
|
|
14752
|
+
path: string().optional(),
|
|
14753
|
+
/**
|
|
14754
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14755
|
+
* next to the database it protects (the default file). The page warns.
|
|
14756
|
+
*/
|
|
14757
|
+
sharesBackupWithDatabase: boolean()
|
|
14758
|
+
});
|
|
14759
|
+
var KeychainStatusSchema = object({
|
|
14760
|
+
keychain: KeychainStateSchema,
|
|
14761
|
+
/** The source of the master key in use; `null` while locked. */
|
|
14762
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
14763
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
14764
|
+
configuredSource: KeychainKeySourceSchema,
|
|
14765
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
14766
|
+
fingerprint: string().nullable(),
|
|
14767
|
+
activeKeyId: string().nullable(),
|
|
14768
|
+
/**
|
|
14769
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
14770
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
14771
|
+
*/
|
|
14772
|
+
rotationPending: boolean(),
|
|
14773
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14774
|
+
retiredWraps: number().int(),
|
|
14775
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
14776
|
+
secretCount: number().int()
|
|
14777
|
+
});
|
|
14778
|
+
/**
|
|
14779
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
14780
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
14781
|
+
* never reported as an orphan (and never deleted as one).
|
|
14782
|
+
*/
|
|
14783
|
+
var KeychainSecretUsageSchema = _enum([
|
|
14784
|
+
"in-use",
|
|
14785
|
+
"orphan",
|
|
14786
|
+
"unknown"
|
|
14787
|
+
]);
|
|
14788
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
14789
|
+
var KeychainAuditActionSchema = _enum([
|
|
14790
|
+
"put",
|
|
14791
|
+
"delete",
|
|
14792
|
+
"reveal",
|
|
14793
|
+
"rotate-master-key",
|
|
14794
|
+
"purge-retired-keys",
|
|
14795
|
+
"download-recovery-key",
|
|
14796
|
+
"delete-orphans",
|
|
14797
|
+
"reset",
|
|
14798
|
+
"initialize"
|
|
14799
|
+
]);
|
|
14800
|
+
var KeychainAuditEntrySchema = object({
|
|
14801
|
+
id: string(),
|
|
14802
|
+
at: number(),
|
|
14803
|
+
action: KeychainAuditActionSchema,
|
|
14804
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14805
|
+
actor: string(),
|
|
14806
|
+
ref: string().nullable(),
|
|
14807
|
+
detail: string().nullable()
|
|
14808
|
+
});
|
|
14809
|
+
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({
|
|
14810
|
+
value: string(),
|
|
14811
|
+
version: number().int()
|
|
14812
|
+
}), {
|
|
14813
|
+
kind: "mutation",
|
|
14814
|
+
auth: "admin",
|
|
14815
|
+
caller: "required"
|
|
14816
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
14817
|
+
deleted: array(string()).readonly(),
|
|
14818
|
+
kept: array(object({
|
|
14819
|
+
ref: string(),
|
|
14820
|
+
usage: KeychainSecretUsageSchema
|
|
14821
|
+
})).readonly()
|
|
14822
|
+
}), {
|
|
14823
|
+
kind: "mutation",
|
|
14824
|
+
auth: "admin",
|
|
14825
|
+
caller: "required"
|
|
14826
|
+
}), method(object({}), object({
|
|
14827
|
+
fingerprint: string(),
|
|
14828
|
+
keySource: KeychainKeySourceSchema
|
|
14829
|
+
}), {
|
|
14830
|
+
kind: "mutation",
|
|
14831
|
+
auth: "admin",
|
|
14832
|
+
caller: "required"
|
|
14833
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
14834
|
+
kind: "mutation",
|
|
14835
|
+
auth: "admin",
|
|
14836
|
+
caller: "required"
|
|
14837
|
+
}), method(object({}), object({
|
|
14838
|
+
key: string(),
|
|
14839
|
+
fingerprint: string(),
|
|
14840
|
+
keySource: KeychainKeySourceSchema
|
|
14841
|
+
}), {
|
|
14842
|
+
kind: "mutation",
|
|
14843
|
+
auth: "admin",
|
|
14844
|
+
caller: "required"
|
|
14845
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
14846
|
+
archivedCollection: string().nullable(),
|
|
14847
|
+
archived: number().int()
|
|
14848
|
+
}), {
|
|
14849
|
+
kind: "mutation",
|
|
14850
|
+
auth: "admin",
|
|
14851
|
+
caller: "required"
|
|
14852
|
+
});
|
|
14853
|
+
method(_void(), object({
|
|
14029
14854
|
id: string(),
|
|
14030
14855
|
name: string(),
|
|
14031
|
-
isPullMode: boolean().optional(),
|
|
14032
|
-
priority: number().optional(),
|
|
14033
14856
|
hwaccel: string().optional(),
|
|
14034
14857
|
probedBestHwaccel: string().optional()
|
|
14035
|
-
})), method(
|
|
14036
|
-
sessionId: string(),
|
|
14037
|
-
nodeId: string()
|
|
14038
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14039
|
-
sessionId: string(),
|
|
14040
|
-
packet: EncodedPacketSchema
|
|
14041
|
-
}), _void()), method(object({
|
|
14042
|
-
sessionId: string(),
|
|
14043
|
-
url: string()
|
|
14044
|
-
}), _void()), method(object({
|
|
14045
|
-
sessionId: string(),
|
|
14046
|
-
maxCount: number().default(1),
|
|
14047
|
-
waitMs: number().optional()
|
|
14048
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14049
|
-
sessionId: string(),
|
|
14050
|
-
maxCount: number().default(1),
|
|
14051
|
-
waitMs: number().optional()
|
|
14052
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14053
|
-
sessionId: string(),
|
|
14054
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14055
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14056
|
-
sessionId: string(),
|
|
14057
|
-
codec: string(),
|
|
14058
|
-
outputFormat: string(),
|
|
14059
|
-
createdAtMs: number()
|
|
14060
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
14858
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14061
14859
|
kind: "mutation",
|
|
14062
14860
|
auth: "admin"
|
|
14063
14861
|
});
|
|
@@ -14113,7 +14911,7 @@ DeviceType.Camera;
|
|
|
14113
14911
|
* This matters here more than anywhere else in the repo, because every provider
|
|
14114
14912
|
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14115
14913
|
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14116
|
-
* and `http://admin:hunter2@192.168.
|
|
14914
|
+
* and `http://admin:hunter2@192.168.60.139/` is a URL a browser accepts. The
|
|
14117
14915
|
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14118
14916
|
* filling it is the operator's business, not ours.
|
|
14119
14917
|
*
|
|
@@ -14869,6 +15667,10 @@ var DeviceInfoSchema = object({
|
|
|
14869
15667
|
isCamera: boolean(),
|
|
14870
15668
|
/** Current config values — serializable snapshot */
|
|
14871
15669
|
config: record(string(), unknown()),
|
|
15670
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
15671
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
15672
|
+
* when the owning runner has not reported them. */
|
|
15673
|
+
secretConfigPaths: array(string()).optional(),
|
|
14872
15674
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
14873
15675
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
14874
15676
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15074,12 +15876,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15074
15876
|
* call (workers re-register on init), so probe-driven updates
|
|
15075
15877
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15076
15878
|
features: array(string()).optional(),
|
|
15077
|
-
config: record(string(), unknown())
|
|
15879
|
+
config: record(string(), unknown()),
|
|
15880
|
+
/** Config paths the device's own schema DECLARES secret
|
|
15881
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
15882
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
15883
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
15884
|
+
* omits it and the keyword backstop applies. */
|
|
15885
|
+
secretConfigPaths: array(string()).optional()
|
|
15078
15886
|
});
|
|
15079
15887
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15080
15888
|
var DevicePersistConfigPayloadSchema = object({
|
|
15081
15889
|
deviceId: number(),
|
|
15082
|
-
data: record(string(), unknown())
|
|
15890
|
+
data: record(string(), unknown()),
|
|
15891
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
15892
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
15893
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
15894
|
+
secretConfigPaths: array(string()).optional()
|
|
15083
15895
|
});
|
|
15084
15896
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15085
15897
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -15901,6 +16713,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
15901
16713
|
kind: "mutation",
|
|
15902
16714
|
auth: "admin"
|
|
15903
16715
|
});
|
|
16716
|
+
var HUB_ADDRESS_ROLES = [
|
|
16717
|
+
"appConnections",
|
|
16718
|
+
"notificationTaps",
|
|
16719
|
+
"internal",
|
|
16720
|
+
"publicEndpoint"
|
|
16721
|
+
];
|
|
15904
16722
|
/**
|
|
15905
16723
|
* Transport bounds for AI capability methods.
|
|
15906
16724
|
*
|
|
@@ -16727,7 +17545,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
16727
17545
|
icon: string().optional(),
|
|
16728
17546
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
16729
17547
|
startUrl: string(),
|
|
16730
|
-
stage: LoginStageEnum
|
|
17548
|
+
stage: LoginStageEnum,
|
|
17549
|
+
/**
|
|
17550
|
+
* The provider names an external identity a signed-in user can link to
|
|
17551
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17552
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17553
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17554
|
+
*/
|
|
17555
|
+
linkable: boolean().optional()
|
|
16731
17556
|
}),
|
|
16732
17557
|
object({
|
|
16733
17558
|
kind: literal("widget"),
|
|
@@ -17097,7 +17922,7 @@ method(object({
|
|
|
17097
17922
|
timeoutMs: 6e5
|
|
17098
17923
|
});
|
|
17099
17924
|
method(object({
|
|
17100
|
-
|
|
17925
|
+
targetNodeId: string(),
|
|
17101
17926
|
modelId: string(),
|
|
17102
17927
|
format: _enum(MODEL_FORMATS),
|
|
17103
17928
|
entry: ModelCatalogEntrySchema
|
|
@@ -18465,6 +19290,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18465
19290
|
"stream-offline",
|
|
18466
19291
|
"node-online",
|
|
18467
19292
|
"node-offline",
|
|
19293
|
+
"node-restarting",
|
|
19294
|
+
"node-updating",
|
|
18468
19295
|
"node-inference-unavailable",
|
|
18469
19296
|
"detection-blind",
|
|
18470
19297
|
"addon-crash-loop",
|
|
@@ -19563,8 +20390,9 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
19563
20390
|
disabledTargetIds: array(string()).default([])
|
|
19564
20391
|
});
|
|
19565
20392
|
/**
|
|
19566
|
-
* The state-summary SECTIONS (D647 / D698): the D637 kind groups that
|
|
19567
|
-
* still-true state. `
|
|
20393
|
+
* The state-summary SECTIONS (D647 / D698 / D708): the D637 kind groups that
|
|
20394
|
+
* report a still-true state. `addons` is the crash-looped addons only and
|
|
20395
|
+
* `addon-updates` the addons that are behind (D708 split them). `backups-exports` and `alarm` are not sections — a completed
|
|
19568
20396
|
* job is not an open state, and the alarm stays instant.
|
|
19569
20397
|
*/
|
|
19570
20398
|
var NcStateSummarySectionIdSchema = _enum([
|
|
@@ -19576,6 +20404,7 @@ var NcStateSummarySectionIdSchema = _enum([
|
|
|
19576
20404
|
"detection-blind",
|
|
19577
20405
|
"nodes",
|
|
19578
20406
|
"addons",
|
|
20407
|
+
"addon-updates",
|
|
19579
20408
|
"updates"
|
|
19580
20409
|
]);
|
|
19581
20410
|
/** One section of a previewed state summary. `unavailable` = its state could not be read. */
|
|
@@ -20056,7 +20885,25 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
20056
20885
|
* When this mode may be armed. Absent / null = always allowed (same as a
|
|
20057
20886
|
* rule with no `schedule`). Evaluated with {@link isScheduleActive}.
|
|
20058
20887
|
*/
|
|
20059
|
-
schedule: NcScheduleSchema.optional()
|
|
20888
|
+
schedule: NcScheduleSchema.optional(),
|
|
20889
|
+
/**
|
|
20890
|
+
* D706: while this mode's ENTRY DELAY runs, do the alarm rules' own pushes go out (as an
|
|
20891
|
+
* intrusion naming the locations)? Absent = false — the entry-delay notification is the
|
|
20892
|
+
* only one, and the matches ride the triggered notification's mosaic (D705).
|
|
20893
|
+
*/
|
|
20894
|
+
notifyDuringEntryDelay: boolean().optional(),
|
|
20895
|
+
/**
|
|
20896
|
+
* D706: notify "watched again" when a sensor this arm bypassed closes and opens again.
|
|
20897
|
+
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
20898
|
+
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
20899
|
+
*/
|
|
20900
|
+
notifySensorRewatched: boolean().optional(),
|
|
20901
|
+
/**
|
|
20902
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
20903
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
20904
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
20905
|
+
*/
|
|
20906
|
+
notifySensorIgnored: boolean().optional()
|
|
20060
20907
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20061
20908
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20062
20909
|
mode: AlarmArmModeSchema,
|
|
@@ -20065,7 +20912,13 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
20065
20912
|
triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional(),
|
|
20066
20913
|
postTriggeredAction: NcAlarmPostTriggeredActionSchema.nullable().optional(),
|
|
20067
20914
|
/** Set a schedule, or `null` to clear (mode always allowed again). */
|
|
20068
|
-
schedule: NcScheduleSchema.nullable().optional()
|
|
20915
|
+
schedule: NcScheduleSchema.nullable().optional(),
|
|
20916
|
+
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20917
|
+
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
20918
|
+
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20919
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
20920
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
20921
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
20069
20922
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20070
20923
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20071
20924
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -21026,45 +21879,25 @@ Object.freeze(Object.fromEntries([{
|
|
|
21026
21879
|
label: "Face recognition model",
|
|
21027
21880
|
defaultModelId: "auraface-r100",
|
|
21028
21881
|
indexName: "the enrolled face gallery",
|
|
21029
|
-
options: [
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
|
|
21033
|
-
},
|
|
21034
|
-
{
|
|
21035
|
-
id: "arcface-r100",
|
|
21036
|
-
label: "ArcFace (ResNet34)"
|
|
21037
|
-
},
|
|
21038
|
-
{
|
|
21039
|
-
id: "inception-resnet-v1",
|
|
21040
|
-
label: "Inception ResNet V1"
|
|
21041
|
-
}
|
|
21042
|
-
]
|
|
21882
|
+
options: [{
|
|
21883
|
+
id: "auraface-r100",
|
|
21884
|
+
label: "AuraFace R100"
|
|
21885
|
+
}]
|
|
21043
21886
|
}, {
|
|
21044
21887
|
stepId: "clip-embedding",
|
|
21045
21888
|
label: "Semantic search model",
|
|
21046
|
-
defaultModelId: "
|
|
21889
|
+
defaultModelId: "siglip2-b16-224",
|
|
21047
21890
|
indexName: "the object semantic-search index",
|
|
21048
|
-
options: [
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
},
|
|
21053
|
-
{
|
|
21054
|
-
id: "mobileclip-s2",
|
|
21055
|
-
label: "MobileCLIP S2"
|
|
21056
|
-
},
|
|
21057
|
-
{
|
|
21058
|
-
id: "siglip2-b16-224",
|
|
21059
|
-
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
21060
|
-
}
|
|
21061
|
-
]
|
|
21891
|
+
options: [{
|
|
21892
|
+
id: "siglip2-b16-224",
|
|
21893
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
21894
|
+
}]
|
|
21062
21895
|
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
21063
21896
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21064
21897
|
stepId: "face-embedding",
|
|
21065
21898
|
key: "minLandmarkFaceSize",
|
|
21066
|
-
label: "Min face size
|
|
21067
|
-
description: "
|
|
21899
|
+
label: "Min face size to embed (detection-frame px)",
|
|
21900
|
+
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.",
|
|
21068
21901
|
type: "slider",
|
|
21069
21902
|
min: 0,
|
|
21070
21903
|
max: 64,
|
|
@@ -22037,8 +22870,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22037
22870
|
]);
|
|
22038
22871
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22039
22872
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22040
|
-
/**
|
|
22041
|
-
|
|
22873
|
+
/**
|
|
22874
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
22875
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
22876
|
+
*
|
|
22877
|
+
* - `operator` — drawn by hand.
|
|
22878
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
22879
|
+
* model, or a larger teacher model).
|
|
22880
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
22881
|
+
* back from the track store (never a re-run).
|
|
22882
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
22883
|
+
*/
|
|
22884
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
22885
|
+
"operator",
|
|
22886
|
+
"assist",
|
|
22887
|
+
"pipeline",
|
|
22888
|
+
"llm"
|
|
22889
|
+
]);
|
|
22042
22890
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22043
22891
|
var RetrainBboxSchema = object({
|
|
22044
22892
|
x: number(),
|
|
@@ -22056,7 +22904,8 @@ var RetrainBboxSchema = object({
|
|
|
22056
22904
|
*/
|
|
22057
22905
|
var RetrainAnnotationSchema = object({
|
|
22058
22906
|
id: string(),
|
|
22059
|
-
|
|
22907
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
22908
|
+
trackId: string().optional(),
|
|
22060
22909
|
deviceId: number(),
|
|
22061
22910
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22062
22911
|
mediaKey: string(),
|
|
@@ -22105,18 +22954,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22105
22954
|
* fail, whatever became of the original. */
|
|
22106
22955
|
copied: boolean()
|
|
22107
22956
|
});
|
|
22957
|
+
/**
|
|
22958
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
22959
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
22960
|
+
* box recorded on the source media row when there is one, else the track
|
|
22961
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
22962
|
+
* until the operator confirms it.
|
|
22963
|
+
*/
|
|
22964
|
+
var RetrainPipelineBoxSchema = object({
|
|
22965
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
22966
|
+
bbox: RetrainBboxSchema,
|
|
22967
|
+
macroClass: RetrainMacroClassSchema,
|
|
22968
|
+
label: string().optional(),
|
|
22969
|
+
subLabel: string().optional(),
|
|
22970
|
+
/** The detection score of the position used, when it was recorded. */
|
|
22971
|
+
score: number().optional(),
|
|
22972
|
+
/** The root model that produced the track, when it was recorded. */
|
|
22973
|
+
modelId: string().optional(),
|
|
22974
|
+
trackId: string(),
|
|
22975
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
22976
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
22977
|
+
basis: _enum(["subject-box", "position"]),
|
|
22978
|
+
deltaMs: number()
|
|
22979
|
+
});
|
|
22980
|
+
/**
|
|
22981
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
22982
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
22983
|
+
* track at all.
|
|
22984
|
+
*/
|
|
22985
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22108
22986
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22109
22987
|
var RetrainFrameSchema = object({
|
|
22110
22988
|
frameId: string(),
|
|
22111
22989
|
deviceId: number(),
|
|
22112
|
-
|
|
22113
|
-
/**
|
|
22114
|
-
|
|
22990
|
+
origin: RetrainFrameOriginSchema,
|
|
22991
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
22992
|
+
trackId: string().optional(),
|
|
22993
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
22994
|
+
* Absent on a recording still. */
|
|
22995
|
+
sourceMediaId: number().int().optional(),
|
|
22996
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
22997
|
+
epochMs: number().optional(),
|
|
22115
22998
|
sourceKind: MediaFileKindEnum,
|
|
22116
22999
|
sizeBytes: number().int(),
|
|
22117
23000
|
width: number().int(),
|
|
22118
23001
|
height: number().int(),
|
|
22119
|
-
copiedAt: number()
|
|
23002
|
+
copiedAt: number(),
|
|
23003
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23004
|
+
capturedAt: number().optional(),
|
|
23005
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23006
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23007
|
+
* a false positive. */
|
|
23008
|
+
complete: boolean(),
|
|
23009
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23010
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23011
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23012
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23013
|
+
collectionIds: array(string()).readonly().optional()
|
|
22120
23014
|
});
|
|
22121
23015
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22122
23016
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22137,6 +23031,53 @@ var RetrainFrameListSchema = object({
|
|
|
22137
23031
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22138
23032
|
autoPickMediaId: number().int().optional()
|
|
22139
23033
|
});
|
|
23034
|
+
/**
|
|
23035
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23036
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23037
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23038
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23039
|
+
* export carried (`exportedInBatch`).
|
|
23040
|
+
*/
|
|
23041
|
+
var RetrainExportFilterSchema = object({
|
|
23042
|
+
deviceIds: array(number()).optional(),
|
|
23043
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23044
|
+
/** Only frames in at least one of these named collections. */
|
|
23045
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23046
|
+
batchId: string().optional(),
|
|
23047
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23048
|
+
completeOnly: boolean().optional()
|
|
23049
|
+
});
|
|
23050
|
+
/**
|
|
23051
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23052
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23053
|
+
* convention — the classifier layout.
|
|
23054
|
+
*/
|
|
23055
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23056
|
+
/**
|
|
23057
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23058
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23059
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23060
|
+
* logged.
|
|
23061
|
+
*/
|
|
23062
|
+
var RetrainArchiveTargetSchema = object({
|
|
23063
|
+
kind: literal("http"),
|
|
23064
|
+
method: _enum(["PUT", "POST"]),
|
|
23065
|
+
url: string().url(),
|
|
23066
|
+
headers: record(string(), string()).optional()
|
|
23067
|
+
});
|
|
23068
|
+
var RetrainArchiveResultSchema = object({
|
|
23069
|
+
batchId: string(),
|
|
23070
|
+
frames: number().int(),
|
|
23071
|
+
crops: number().int(),
|
|
23072
|
+
annotations: number().int(),
|
|
23073
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23074
|
+
missing: number().int(),
|
|
23075
|
+
bytes: number().int(),
|
|
23076
|
+
/** sha256 of the exact bytes sent. */
|
|
23077
|
+
sha256: string(),
|
|
23078
|
+
/** The target's HTTP status. */
|
|
23079
|
+
status: number().int()
|
|
23080
|
+
});
|
|
22140
23081
|
/** What the operator asked the assist to look for. */
|
|
22141
23082
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22142
23083
|
kind: literal("package"),
|
|
@@ -22166,6 +23107,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22166
23107
|
reason: string(),
|
|
22167
23108
|
detail: string().optional()
|
|
22168
23109
|
})]);
|
|
23110
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23111
|
+
var RetrainCollectionSchema = object({
|
|
23112
|
+
id: string(),
|
|
23113
|
+
name: string(),
|
|
23114
|
+
createdAt: number(),
|
|
23115
|
+
frameCount: number().int()
|
|
23116
|
+
});
|
|
23117
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23118
|
+
kind: literal("created"),
|
|
23119
|
+
collection: RetrainCollectionSchema
|
|
23120
|
+
}), object({
|
|
23121
|
+
kind: literal("refused"),
|
|
23122
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23123
|
+
})]);
|
|
23124
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23125
|
+
kind: literal("renamed"),
|
|
23126
|
+
collection: RetrainCollectionSchema
|
|
23127
|
+
}), object({
|
|
23128
|
+
kind: literal("refused"),
|
|
23129
|
+
reason: _enum([
|
|
23130
|
+
"empty-name",
|
|
23131
|
+
"duplicate-name",
|
|
23132
|
+
"unknown-collection"
|
|
23133
|
+
])
|
|
23134
|
+
})]);
|
|
23135
|
+
/**
|
|
23136
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23137
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23138
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23139
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23140
|
+
*/
|
|
23141
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23142
|
+
kind: literal("added"),
|
|
23143
|
+
collectionId: string(),
|
|
23144
|
+
frame: RetrainFrameSchema,
|
|
23145
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23146
|
+
reused: boolean()
|
|
23147
|
+
}), object({
|
|
23148
|
+
kind: literal("refused"),
|
|
23149
|
+
reason: _enum([
|
|
23150
|
+
"unknown-collection",
|
|
23151
|
+
"still-unavailable",
|
|
23152
|
+
"still-busy",
|
|
23153
|
+
"unreadable-image",
|
|
23154
|
+
"write-failed"
|
|
23155
|
+
]),
|
|
23156
|
+
detail: string().optional()
|
|
23157
|
+
})]);
|
|
23158
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23159
|
+
var RetrainAssistProfileSchema = object({
|
|
23160
|
+
id: string(),
|
|
23161
|
+
name: string(),
|
|
23162
|
+
model: string(),
|
|
23163
|
+
kind: string(),
|
|
23164
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23165
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23166
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23167
|
+
leavesHouse: boolean()
|
|
23168
|
+
});
|
|
23169
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23170
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23171
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23172
|
+
var RetrainLlmReviewSchema = object({
|
|
23173
|
+
/** The `ref` the page sent the box under. */
|
|
23174
|
+
ref: string(),
|
|
23175
|
+
verdict: _enum([
|
|
23176
|
+
"confirmed",
|
|
23177
|
+
"wrong-class",
|
|
23178
|
+
"not-an-object",
|
|
23179
|
+
"uncertain"
|
|
23180
|
+
]),
|
|
23181
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23182
|
+
reason: string()
|
|
23183
|
+
});
|
|
23184
|
+
/**
|
|
23185
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23186
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23187
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23188
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23189
|
+
*/
|
|
23190
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23191
|
+
kind: literal("proposed"),
|
|
23192
|
+
profileId: string(),
|
|
23193
|
+
model: string(),
|
|
23194
|
+
/** The frame was sent outside the house for this answer. */
|
|
23195
|
+
leftHouse: boolean(),
|
|
23196
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23197
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23198
|
+
rejected: number().int()
|
|
23199
|
+
}), object({
|
|
23200
|
+
kind: literal("refused"),
|
|
23201
|
+
reason: _enum([
|
|
23202
|
+
"unknown-frame",
|
|
23203
|
+
"unreadable-frame",
|
|
23204
|
+
"unknown-profile",
|
|
23205
|
+
"profile-disabled",
|
|
23206
|
+
"no-vision",
|
|
23207
|
+
"cloud-not-confirmed",
|
|
23208
|
+
"llm-error",
|
|
23209
|
+
"malformed-answer"
|
|
23210
|
+
]),
|
|
23211
|
+
detail: string().optional()
|
|
23212
|
+
})]);
|
|
22169
23213
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22170
23214
|
var RetrainTransitionResultSchema = object({
|
|
22171
23215
|
trackId: string(),
|
|
@@ -22883,7 +23927,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22883
23927
|
auth: "admin"
|
|
22884
23928
|
}), method(object({
|
|
22885
23929
|
deviceId: number(),
|
|
22886
|
-
trackId: string(),
|
|
23930
|
+
trackId: string().optional(),
|
|
22887
23931
|
frameId: string()
|
|
22888
23932
|
}), object({
|
|
22889
23933
|
removed: boolean(),
|
|
@@ -22900,7 +23944,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22900
23944
|
auth: "admin"
|
|
22901
23945
|
}), method(object({
|
|
22902
23946
|
deviceId: number(),
|
|
22903
|
-
|
|
23947
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
23948
|
+
trackId: string().optional(),
|
|
22904
23949
|
frameId: string(),
|
|
22905
23950
|
subject: RetrainAssistSubjectSchema,
|
|
22906
23951
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -22908,12 +23953,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22908
23953
|
}), RetrainAssistResultSchema, {
|
|
22909
23954
|
kind: "mutation",
|
|
22910
23955
|
auth: "admin"
|
|
22911
|
-
}), method(object({
|
|
23956
|
+
}), method(object({
|
|
23957
|
+
trackId: string().optional(),
|
|
23958
|
+
frameIds: array(string()).max(2e3).optional()
|
|
23959
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
22912
23960
|
kind: "query",
|
|
22913
23961
|
auth: "admin"
|
|
22914
23962
|
}), method(object({
|
|
22915
23963
|
deviceId: number(),
|
|
22916
|
-
|
|
23964
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
23965
|
+
trackId: string().optional(),
|
|
22917
23966
|
frameId: string(),
|
|
22918
23967
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
22919
23968
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -22931,7 +23980,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22931
23980
|
}), RetrainTransitionResultSchema, {
|
|
22932
23981
|
kind: "mutation",
|
|
22933
23982
|
auth: "admin"
|
|
22934
|
-
}), method(
|
|
23983
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
23984
|
+
kind: "query",
|
|
23985
|
+
auth: "admin"
|
|
23986
|
+
}), method(object({
|
|
23987
|
+
deviceId: number(),
|
|
23988
|
+
trackId: string().optional(),
|
|
23989
|
+
frameId: string(),
|
|
23990
|
+
complete: boolean()
|
|
23991
|
+
}), RetrainFrameSchema, {
|
|
23992
|
+
kind: "mutation",
|
|
23993
|
+
auth: "admin"
|
|
23994
|
+
}), method(object({
|
|
23995
|
+
filter: RetrainExportFilterSchema,
|
|
23996
|
+
layout: RetrainExportLayoutSchema,
|
|
23997
|
+
target: RetrainArchiveTargetSchema
|
|
23998
|
+
}), RetrainArchiveResultSchema, {
|
|
23999
|
+
kind: "mutation",
|
|
24000
|
+
auth: "admin",
|
|
24001
|
+
timeoutMs: 60 * 6e4
|
|
24002
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24003
|
+
kind: "query",
|
|
24004
|
+
auth: "admin"
|
|
24005
|
+
}), method(object({
|
|
24006
|
+
deviceId: number(),
|
|
24007
|
+
trackId: string().optional(),
|
|
24008
|
+
frameId: string(),
|
|
24009
|
+
profileId: string(),
|
|
24010
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24011
|
+
boxes: array(object({
|
|
24012
|
+
ref: string(),
|
|
24013
|
+
bbox: RetrainBboxSchema,
|
|
24014
|
+
macroClass: RetrainMacroClassSchema,
|
|
24015
|
+
label: string().optional()
|
|
24016
|
+
})).max(50),
|
|
24017
|
+
allowCloud: boolean()
|
|
24018
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24019
|
+
kind: "mutation",
|
|
24020
|
+
auth: "admin",
|
|
24021
|
+
timeoutMs: 18e4
|
|
24022
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24023
|
+
kind: "mutation",
|
|
24024
|
+
auth: "admin"
|
|
24025
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24026
|
+
kind: "query",
|
|
24027
|
+
auth: "admin"
|
|
24028
|
+
}), method(object({
|
|
24029
|
+
id: string(),
|
|
24030
|
+
name: string().max(120)
|
|
24031
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24032
|
+
kind: "mutation",
|
|
24033
|
+
auth: "admin"
|
|
24034
|
+
}), method(object({ id: string() }), object({
|
|
24035
|
+
deleted: boolean(),
|
|
24036
|
+
removedFrames: number().int()
|
|
24037
|
+
}), {
|
|
24038
|
+
kind: "mutation",
|
|
24039
|
+
auth: "admin"
|
|
24040
|
+
}), method(object({
|
|
24041
|
+
collectionId: string(),
|
|
24042
|
+
deviceId: number(),
|
|
24043
|
+
epochMs: number()
|
|
24044
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24045
|
+
kind: "mutation",
|
|
24046
|
+
auth: "admin",
|
|
24047
|
+
timeoutMs: 6e4
|
|
24048
|
+
}), method(object({
|
|
24049
|
+
collectionId: string(),
|
|
24050
|
+
frameIds: array(string()).min(1).max(500)
|
|
24051
|
+
}), object({
|
|
24052
|
+
added: number().int(),
|
|
24053
|
+
alreadyMember: number().int(),
|
|
24054
|
+
unknownFrameIds: array(string()).readonly()
|
|
24055
|
+
}), {
|
|
24056
|
+
kind: "mutation",
|
|
24057
|
+
auth: "admin"
|
|
24058
|
+
}), method(object({
|
|
24059
|
+
collectionId: string(),
|
|
24060
|
+
frameId: string()
|
|
24061
|
+
}), object({
|
|
24062
|
+
removed: boolean(),
|
|
24063
|
+
deletedFrame: boolean()
|
|
24064
|
+
}), {
|
|
24065
|
+
kind: "mutation",
|
|
24066
|
+
auth: "admin"
|
|
24067
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
22935
24068
|
kind: "query",
|
|
22936
24069
|
auth: "admin"
|
|
22937
24070
|
}), method(object({
|
|
@@ -22984,6 +24117,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22984
24117
|
timestamp: number()
|
|
22985
24118
|
});
|
|
22986
24119
|
/**
|
|
24120
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
24121
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
24122
|
+
*/
|
|
24123
|
+
var SuppliedRootOutputSchema = object({
|
|
24124
|
+
stepId: string(),
|
|
24125
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
24126
|
+
modelId: string(),
|
|
24127
|
+
detections: array(object({
|
|
24128
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
24129
|
+
bbox: tuple([
|
|
24130
|
+
number(),
|
|
24131
|
+
number(),
|
|
24132
|
+
number(),
|
|
24133
|
+
number()
|
|
24134
|
+
]),
|
|
24135
|
+
score: number(),
|
|
24136
|
+
/**
|
|
24137
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
24138
|
+
* detector already re-found inside a root face box (D730), so its
|
|
24139
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
24140
|
+
*/
|
|
24141
|
+
landmarks: array(object({
|
|
24142
|
+
x: number(),
|
|
24143
|
+
y: number()
|
|
24144
|
+
})).optional()
|
|
24145
|
+
})).min(1)
|
|
24146
|
+
});
|
|
24147
|
+
/**
|
|
22987
24148
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
22988
24149
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
22989
24150
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -23031,7 +24192,7 @@ var FrameRefSchema = object({
|
|
|
23031
24192
|
timestamp: number(),
|
|
23032
24193
|
capturedAt: number().optional()
|
|
23033
24194
|
});
|
|
23034
|
-
var ModelFormatSchema$
|
|
24195
|
+
var ModelFormatSchema$2 = _enum([
|
|
23035
24196
|
"onnx",
|
|
23036
24197
|
"coreml",
|
|
23037
24198
|
"openvino",
|
|
@@ -23049,7 +24210,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23049
24210
|
var PipelineEngineChoiceSchema = object({
|
|
23050
24211
|
runtime: literal("python"),
|
|
23051
24212
|
backend: string(),
|
|
23052
|
-
format: ModelFormatSchema$
|
|
24213
|
+
format: ModelFormatSchema$2,
|
|
23053
24214
|
device: string().optional()
|
|
23054
24215
|
});
|
|
23055
24216
|
/**
|
|
@@ -23088,32 +24249,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23088
24249
|
group: string().optional(),
|
|
23089
24250
|
settings: record(string(), unknown()).optional()
|
|
23090
24251
|
}));
|
|
23091
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23092
|
-
addonId: string(),
|
|
23093
|
-
enabled: boolean(),
|
|
23094
|
-
modelId: string(),
|
|
23095
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23096
|
-
settings: record(string(), unknown()).optional()
|
|
23097
|
-
}));
|
|
23098
|
-
var PipelineTemplateSchema$1 = object({
|
|
23099
|
-
id: string(),
|
|
23100
|
-
name: string(),
|
|
23101
|
-
createdAt: string(),
|
|
23102
|
-
updatedAt: string(),
|
|
23103
|
-
engine: PipelineEngineChoiceSchema,
|
|
23104
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23105
|
-
});
|
|
23106
24252
|
var PipelineModelOptionSchema = object({
|
|
23107
24253
|
id: string(),
|
|
23108
24254
|
name: string(),
|
|
23109
|
-
formats: record(string(),
|
|
23110
|
-
downloaded: boolean(),
|
|
23111
|
-
sizeMB: number()
|
|
23112
|
-
})),
|
|
24255
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23113
24256
|
group: ModelVariantGroupSchema.optional(),
|
|
23114
24257
|
legacy: boolean().optional(),
|
|
23115
24258
|
provider: ModelProviderIdSchema.optional(),
|
|
23116
|
-
defaultConfidence: number().optional()
|
|
24259
|
+
defaultConfidence: number().optional(),
|
|
24260
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
23117
24261
|
});
|
|
23118
24262
|
var ConfigFieldBridge = custom();
|
|
23119
24263
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -23275,6 +24419,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23275
24419
|
}), {
|
|
23276
24420
|
kind: "mutation",
|
|
23277
24421
|
auth: "admin"
|
|
24422
|
+
}), method(object({
|
|
24423
|
+
nodeId: string(),
|
|
24424
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24425
|
+
dryRun: boolean()
|
|
24426
|
+
}), object({
|
|
24427
|
+
entries: array(object({
|
|
24428
|
+
deviceId: number(),
|
|
24429
|
+
keys: array(string()).readonly()
|
|
24430
|
+
})).readonly(),
|
|
24431
|
+
refused: array(object({
|
|
24432
|
+
deviceId: number(),
|
|
24433
|
+
reason: string()
|
|
24434
|
+
})).readonly()
|
|
24435
|
+
}), {
|
|
24436
|
+
kind: "mutation",
|
|
24437
|
+
auth: "admin"
|
|
23278
24438
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23279
24439
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23280
24440
|
deviceKey: string(),
|
|
@@ -23300,22 +24460,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23300
24460
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23301
24461
|
steps: array(PipelineStepInputSchema),
|
|
23302
24462
|
deviceKey: string().optional()
|
|
23303
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23304
|
-
name: string(),
|
|
23305
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23306
|
-
engine: PipelineEngineChoiceSchema
|
|
23307
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23308
|
-
id: string(),
|
|
23309
|
-
name: string().optional(),
|
|
23310
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23311
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24463
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23312
24464
|
addonId: string(),
|
|
23313
24465
|
modelId: string(),
|
|
23314
|
-
format: ModelFormatSchema$
|
|
24466
|
+
format: ModelFormatSchema$2
|
|
23315
24467
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23316
24468
|
addonId: string(),
|
|
23317
24469
|
modelId: string(),
|
|
23318
|
-
format: ModelFormatSchema$
|
|
24470
|
+
format: ModelFormatSchema$2
|
|
23319
24471
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23320
24472
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23321
24473
|
frame: FrameInputSchema.optional(),
|
|
@@ -23381,7 +24533,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23381
24533
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
23382
24534
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
23383
24535
|
*/
|
|
23384
|
-
replay: literal(true).optional()
|
|
24536
|
+
replay: literal(true).optional(),
|
|
24537
|
+
/**
|
|
24538
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
24539
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
24540
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
24541
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
24542
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
24543
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
24544
|
+
*/
|
|
24545
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
23385
24546
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
23386
24547
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23387
24548
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -23463,6 +24624,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23463
24624
|
filename: string().optional(),
|
|
23464
24625
|
settings: record(string(), unknown()).optional()
|
|
23465
24626
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
24627
|
+
/**
|
|
24628
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
24629
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
24630
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
24631
|
+
* schemas are what crosses the cap boundary.
|
|
24632
|
+
*/
|
|
24633
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
24634
|
+
/** The operator's range for it. */
|
|
24635
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
24636
|
+
min: 1,
|
|
24637
|
+
max: 8
|
|
24638
|
+
};
|
|
24639
|
+
var HardwareClassIdSchema = _enum([
|
|
24640
|
+
"intel-core-ultra",
|
|
24641
|
+
"intel-n-series",
|
|
24642
|
+
"apple-m-base",
|
|
24643
|
+
"apple-m-pro",
|
|
24644
|
+
"unknown"
|
|
24645
|
+
]);
|
|
24646
|
+
var AcceleratorKindSchema = _enum([
|
|
24647
|
+
"intel-npu",
|
|
24648
|
+
"intel-igpu",
|
|
24649
|
+
"x86-cpu",
|
|
24650
|
+
"arm-cpu",
|
|
24651
|
+
"apple-ane",
|
|
24652
|
+
"coral"
|
|
24653
|
+
]);
|
|
24654
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
24655
|
+
object({
|
|
24656
|
+
kind: literal("capacity"),
|
|
24657
|
+
sessions: number(),
|
|
24658
|
+
minSessions: number()
|
|
24659
|
+
}),
|
|
24660
|
+
object({
|
|
24661
|
+
kind: literal("tie-faster"),
|
|
24662
|
+
over: string(),
|
|
24663
|
+
recallDelta: number()
|
|
24664
|
+
}),
|
|
24665
|
+
object({
|
|
24666
|
+
kind: literal("stepped-down"),
|
|
24667
|
+
from: string(),
|
|
24668
|
+
to: string(),
|
|
24669
|
+
limitedBy: string()
|
|
24670
|
+
}),
|
|
24671
|
+
object({
|
|
24672
|
+
kind: literal("no-fit-lightest"),
|
|
24673
|
+
sessions: number(),
|
|
24674
|
+
minSessions: number()
|
|
24675
|
+
}),
|
|
24676
|
+
object({
|
|
24677
|
+
kind: literal("derived-latency"),
|
|
24678
|
+
modelId: string()
|
|
24679
|
+
}),
|
|
24680
|
+
object({ kind: literal("cpu-device") }),
|
|
24681
|
+
object({ kind: literal("coral-untouched") }),
|
|
24682
|
+
object({ kind: literal("device-disabled") }),
|
|
24683
|
+
object({ kind: literal("device-unavailable") }),
|
|
24684
|
+
object({ kind: literal("node-offline") }),
|
|
24685
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
24686
|
+
object({
|
|
24687
|
+
kind: literal("no-measured-data"),
|
|
24688
|
+
hardwareClass: HardwareClassIdSchema
|
|
24689
|
+
}),
|
|
24690
|
+
object({
|
|
24691
|
+
kind: literal("no-family-build"),
|
|
24692
|
+
format: ModelFormatSchema$1
|
|
24693
|
+
}),
|
|
24694
|
+
object({
|
|
24695
|
+
kind: literal("kept-custom-pin"),
|
|
24696
|
+
modelId: string(),
|
|
24697
|
+
deviceKey: string()
|
|
24698
|
+
})
|
|
24699
|
+
]);
|
|
24700
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
24701
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
24702
|
+
/**
|
|
24703
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
24704
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
24705
|
+
*/
|
|
24706
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
24707
|
+
kind: literal("node-benchmark"),
|
|
24708
|
+
resultId: string(),
|
|
24709
|
+
measuredAtMs: number()
|
|
24710
|
+
})]);
|
|
24711
|
+
var DeviceModelChoiceSchema = object({
|
|
24712
|
+
modelId: string(),
|
|
24713
|
+
p50Ms: number(),
|
|
24714
|
+
fps: number(),
|
|
24715
|
+
measured: boolean(),
|
|
24716
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
24717
|
+
source: LatencySourceSchema.optional(),
|
|
24718
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
24719
|
+
capacitySessions: number(),
|
|
24720
|
+
personRecall: number()
|
|
24721
|
+
});
|
|
24722
|
+
var DeviceRecommendationSchema = object({
|
|
24723
|
+
deviceKey: string(),
|
|
24724
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
24725
|
+
enabled: boolean(),
|
|
24726
|
+
available: boolean(),
|
|
24727
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
24728
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
24729
|
+
kept: KeptReasonSchema.optional(),
|
|
24730
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24731
|
+
});
|
|
24732
|
+
var NodeRecommendationSchema = object({
|
|
24733
|
+
nodeId: string(),
|
|
24734
|
+
reachable: boolean(),
|
|
24735
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
24736
|
+
cpuModel: string().nullable(),
|
|
24737
|
+
skipped: boolean(),
|
|
24738
|
+
acceleratorModelId: string().nullable(),
|
|
24739
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
24740
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24741
|
+
});
|
|
24742
|
+
var ModelPinChangeSchema = object({
|
|
24743
|
+
stepId: string(),
|
|
24744
|
+
before: string().nullable(),
|
|
24745
|
+
after: string().nullable()
|
|
24746
|
+
});
|
|
24747
|
+
var NodeDeviceChangeSchema = object({
|
|
24748
|
+
nodeId: string(),
|
|
24749
|
+
deviceKey: string(),
|
|
24750
|
+
madeExplicit: boolean(),
|
|
24751
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
24752
|
+
thresholds: array(object({
|
|
24753
|
+
stepId: string(),
|
|
24754
|
+
keys: array(string()).readonly()
|
|
24755
|
+
})).readonly()
|
|
24756
|
+
});
|
|
24757
|
+
var CameraOverrideClearSchema = object({
|
|
24758
|
+
deviceId: number(),
|
|
24759
|
+
source: _enum(["step-override", "wholesale"]),
|
|
24760
|
+
nodeId: string(),
|
|
24761
|
+
deviceKey: string().nullable(),
|
|
24762
|
+
stepId: string(),
|
|
24763
|
+
modelIdBefore: string().nullable(),
|
|
24764
|
+
keys: array(string()).readonly()
|
|
24765
|
+
});
|
|
24766
|
+
var DetectorStoreClearSchema = object({
|
|
24767
|
+
deviceId: number(),
|
|
24768
|
+
keys: array(string()).readonly()
|
|
24769
|
+
});
|
|
24770
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
24771
|
+
object({
|
|
24772
|
+
kind: literal("detector-store-cluster-wide"),
|
|
24773
|
+
skippedNodes: array(string()).readonly()
|
|
24774
|
+
}),
|
|
24775
|
+
object({
|
|
24776
|
+
kind: literal("detector-store-unreadable"),
|
|
24777
|
+
error: string()
|
|
24778
|
+
}),
|
|
24779
|
+
object({
|
|
24780
|
+
kind: literal("coral-enabled"),
|
|
24781
|
+
nodeId: string(),
|
|
24782
|
+
deviceKey: string()
|
|
24783
|
+
}),
|
|
24784
|
+
object({
|
|
24785
|
+
kind: literal("custom-pin-kept"),
|
|
24786
|
+
nodeId: string(),
|
|
24787
|
+
deviceKey: string().nullable(),
|
|
24788
|
+
deviceId: number().nullable(),
|
|
24789
|
+
modelId: string()
|
|
24790
|
+
}),
|
|
24791
|
+
object({
|
|
24792
|
+
kind: literal("custom-registry-unreadable"),
|
|
24793
|
+
error: string()
|
|
24794
|
+
})
|
|
24795
|
+
]);
|
|
24796
|
+
var AutoTuneOptionsSchema = object({
|
|
24797
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
24798
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24799
|
+
/**
|
|
24800
|
+
* The least number of parallel sessions every device must sustain at the
|
|
24801
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
24802
|
+
* that reaches it wins.
|
|
24803
|
+
*/
|
|
24804
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24805
|
+
});
|
|
24806
|
+
var AutoTunePlanSchema = object({
|
|
24807
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
24808
|
+
planHash: string(),
|
|
24809
|
+
family: literal("yolov9"),
|
|
24810
|
+
headroom: number(),
|
|
24811
|
+
minSessionsPerDevice: number(),
|
|
24812
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
24813
|
+
cameraFps: number(),
|
|
24814
|
+
generatedAt: number(),
|
|
24815
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
24816
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
24817
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
24818
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
24819
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
24820
|
+
});
|
|
24821
|
+
var AutoTuneApplyInputSchema = object({
|
|
24822
|
+
planHash: string(),
|
|
24823
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24824
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24825
|
+
});
|
|
24826
|
+
var AutoTunePhaseResultSchema = object({
|
|
24827
|
+
phase: _enum([
|
|
24828
|
+
"download",
|
|
24829
|
+
"camera-overrides",
|
|
24830
|
+
"detector-thresholds",
|
|
24831
|
+
"node-models",
|
|
24832
|
+
"redispatch"
|
|
24833
|
+
]),
|
|
24834
|
+
ok: boolean(),
|
|
24835
|
+
detail: string()
|
|
24836
|
+
});
|
|
24837
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
24838
|
+
object({
|
|
24839
|
+
kind: literal("applied"),
|
|
24840
|
+
planHash: string(),
|
|
24841
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24842
|
+
}),
|
|
24843
|
+
object({
|
|
24844
|
+
kind: literal("aborted"),
|
|
24845
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24846
|
+
}),
|
|
24847
|
+
object({
|
|
24848
|
+
kind: literal("stale"),
|
|
24849
|
+
plan: AutoTunePlanSchema
|
|
24850
|
+
}),
|
|
24851
|
+
object({
|
|
24852
|
+
kind: literal("refused"),
|
|
24853
|
+
reason: _enum(["apply-in-progress"])
|
|
24854
|
+
})
|
|
24855
|
+
]);
|
|
24856
|
+
/**
|
|
24857
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
24858
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
24859
|
+
* hardware share suggestion and the stale device pins.
|
|
24860
|
+
*/
|
|
24861
|
+
/**
|
|
24862
|
+
* How a new detection session picks its node and device.
|
|
24863
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
24864
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
24865
|
+
* weight only bites once a node already holds a session.
|
|
24866
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
24867
|
+
* full or drowning node yields to a free one (D748).
|
|
24868
|
+
*/
|
|
24869
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
24870
|
+
var LoadBalancingSharesInputSchema = object({
|
|
24871
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
24872
|
+
nodes: record(string(), number().positive()).default({}),
|
|
24873
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
24874
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
24875
|
+
});
|
|
24876
|
+
var PlacementStatsInputSchema = object({
|
|
24877
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
24878
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
24879
|
+
var PlacementDeviceStatsSchema = object({
|
|
24880
|
+
deviceKey: string(),
|
|
24881
|
+
/** Sessions running on this device now. */
|
|
24882
|
+
sessionsNow: number(),
|
|
24883
|
+
/** Sessions started on this device inside the window. */
|
|
24884
|
+
sessionsStarted: number(),
|
|
24885
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
24886
|
+
observedShare: number().nullable()
|
|
24887
|
+
});
|
|
24888
|
+
var PlacementNodeStatsSchema = object({
|
|
24889
|
+
nodeId: string(),
|
|
24890
|
+
sessionsNow: number(),
|
|
24891
|
+
sessionsStarted: number(),
|
|
24892
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
24893
|
+
observedShare: number().nullable(),
|
|
24894
|
+
/** Most sessions this node ran at once inside the window. */
|
|
24895
|
+
peakSessions: number(),
|
|
24896
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
24897
|
+
yieldsAway: number(),
|
|
24898
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
24899
|
+
});
|
|
24900
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
24901
|
+
var StaleDevicePinSchema = object({
|
|
24902
|
+
deviceId: number(),
|
|
24903
|
+
deviceKey: string(),
|
|
24904
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
24905
|
+
reason: _enum(["disabled", "absent"])
|
|
24906
|
+
});
|
|
24907
|
+
var PlacementStatsSchema = object({
|
|
24908
|
+
policy: SessionPlacementPolicySchema,
|
|
24909
|
+
windowMs: number(),
|
|
24910
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
24911
|
+
observedForMs: number(),
|
|
24912
|
+
sessionsNow: number(),
|
|
24913
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
24914
|
+
clusterPeakSessions: number(),
|
|
24915
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
24916
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
24917
|
+
});
|
|
24918
|
+
/**
|
|
24919
|
+
* Where an automatic share's capacity comes from (D755).
|
|
24920
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
24921
|
+
* the measured latency table for the node's hardware class.
|
|
24922
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
24923
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
24924
|
+
*/
|
|
24925
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
24926
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
24927
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
24928
|
+
var SuggestSharesInputSchema = object({
|
|
24929
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24930
|
+
/** Default `hardware`. */
|
|
24931
|
+
source: CapacitySourceSchema.default("hardware")
|
|
24932
|
+
});
|
|
24933
|
+
var SuggestedDeviceShareSchema = object({
|
|
24934
|
+
deviceKey: string(),
|
|
24935
|
+
/** Share of the node (0–100, rounded). */
|
|
24936
|
+
share: number(),
|
|
24937
|
+
modelId: string().nullable(),
|
|
24938
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
24939
|
+
fps: number().nullable(),
|
|
24940
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
24941
|
+
measured: boolean(),
|
|
24942
|
+
/**
|
|
24943
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
24944
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
24945
|
+
*/
|
|
24946
|
+
suggestedMaxSessions: number().nullable()
|
|
24947
|
+
});
|
|
24948
|
+
var SuggestedNodeShareSchema = object({
|
|
24949
|
+
nodeId: string(),
|
|
24950
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
24951
|
+
share: number().nullable(),
|
|
24952
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
24953
|
+
capacitySessions: number(),
|
|
24954
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
24955
|
+
skippedReason: string().nullable(),
|
|
24956
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
24957
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
24958
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
24959
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
24960
|
+
});
|
|
24961
|
+
var SuggestSharesResultSchema = object({
|
|
24962
|
+
headroom: number(),
|
|
24963
|
+
/** The source asked for; each node says what it actually used. */
|
|
24964
|
+
source: CapacitySourceSchema,
|
|
24965
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
24966
|
+
cameraFps: number(),
|
|
24967
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
24968
|
+
minSessionsPerDevice: number(),
|
|
24969
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
24970
|
+
});
|
|
24971
|
+
/**
|
|
24972
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
24973
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
24974
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
24975
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
24976
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
24977
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
24978
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
24979
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
24980
|
+
* - `manual` — the operator's stored sliders.
|
|
24981
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
24982
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
24983
|
+
*/
|
|
24984
|
+
var ShareSourceSchema = _enum([
|
|
24985
|
+
"hardware",
|
|
24986
|
+
"benchmark",
|
|
24987
|
+
"manual"
|
|
24988
|
+
]);
|
|
24989
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
24990
|
+
object({
|
|
24991
|
+
nodes: record(string(), number()),
|
|
24992
|
+
devices: record(string(), record(string(), number()))
|
|
24993
|
+
});
|
|
24994
|
+
var EffectiveDeviceShareSchema = object({
|
|
24995
|
+
deviceKey: string(),
|
|
24996
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
24997
|
+
eligible: boolean(),
|
|
24998
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
24999
|
+
configuredPct: number(),
|
|
25000
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25001
|
+
effectivePct: number()
|
|
25002
|
+
});
|
|
25003
|
+
var EffectiveNodeShareSchema = object({
|
|
25004
|
+
nodeId: string(),
|
|
25005
|
+
eligible: boolean(),
|
|
25006
|
+
configuredPct: number(),
|
|
25007
|
+
effectivePct: number(),
|
|
25008
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25009
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25010
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25011
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25012
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25013
|
+
});
|
|
25014
|
+
var EffectiveSharesSchema = object({
|
|
25015
|
+
source: ShareSourceSchema,
|
|
25016
|
+
policy: SessionPlacementPolicySchema,
|
|
25017
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25018
|
+
autoPending: boolean(),
|
|
25019
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25020
|
+
computedAt: number().nullable(),
|
|
25021
|
+
/** What made the system recompute them last. */
|
|
25022
|
+
trigger: string().nullable(),
|
|
25023
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25024
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25025
|
+
nodeWeights: record(string(), number()),
|
|
25026
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25027
|
+
});
|
|
25028
|
+
/**
|
|
25029
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25030
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25031
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25032
|
+
* shares read.
|
|
25033
|
+
*
|
|
25034
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25035
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25036
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25037
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25038
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25039
|
+
*
|
|
25040
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25041
|
+
* cross a process at frame rate, D9):
|
|
25042
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25043
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25044
|
+
* interval;
|
|
25045
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25046
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25047
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25048
|
+
* CPU, RAM or the event loop give out.
|
|
25049
|
+
*/
|
|
25050
|
+
/** Defaults and bounds, one place. */
|
|
25051
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25052
|
+
fpsPerStream: 10,
|
|
25053
|
+
budgetMinutes: 45,
|
|
25054
|
+
minBudgetMinutes: 10,
|
|
25055
|
+
maxBudgetMinutes: 120,
|
|
25056
|
+
/** A result older than this no longer beats the table. */
|
|
25057
|
+
staleAfterDays: 30,
|
|
25058
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25059
|
+
settleSec: 5,
|
|
25060
|
+
/** Accounted window per ramp step. */
|
|
25061
|
+
measureSec: 20,
|
|
25062
|
+
/** Longest the drain may take before the run is refused. */
|
|
25063
|
+
drainTimeoutSec: 120,
|
|
25064
|
+
/** Candidate models per device in one run. */
|
|
25065
|
+
maxModelsPerDevice: 6
|
|
25066
|
+
};
|
|
25067
|
+
/** The two measurements a run can make. */
|
|
25068
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25069
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25070
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25071
|
+
deviceKey: string().min(1),
|
|
25072
|
+
/**
|
|
25073
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25074
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25075
|
+
*/
|
|
25076
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25077
|
+
});
|
|
25078
|
+
/** What the operator confirmed. */
|
|
25079
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25080
|
+
nodeId: string().min(1),
|
|
25081
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25082
|
+
/** Which measurements run. At least one. */
|
|
25083
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25084
|
+
/**
|
|
25085
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25086
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25087
|
+
* detector always runs.
|
|
25088
|
+
*/
|
|
25089
|
+
steps: array(string().min(1)).default([]),
|
|
25090
|
+
/** Offered rate of one stream / session. */
|
|
25091
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25092
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25093
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25094
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25095
|
+
keepDownloadedModels: boolean().default(false),
|
|
25096
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25097
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25098
|
+
});
|
|
25099
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25100
|
+
kind: _enum([
|
|
25101
|
+
"benchmark-active",
|
|
25102
|
+
"node-offline",
|
|
25103
|
+
"unknown-device",
|
|
25104
|
+
"no-phase",
|
|
25105
|
+
"insufficient-headroom"
|
|
25106
|
+
]),
|
|
25107
|
+
detail: string(),
|
|
25108
|
+
overridable: boolean()
|
|
25109
|
+
});
|
|
25110
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25111
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25112
|
+
deviceId: number(),
|
|
25113
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25114
|
+
placedOnNode: boolean(),
|
|
25115
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25116
|
+
pinnedToNode: boolean()
|
|
25117
|
+
});
|
|
25118
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25119
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25120
|
+
deviceId: number(),
|
|
25121
|
+
reason: literal("only-frame-source")
|
|
25122
|
+
});
|
|
25123
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25124
|
+
nodeId: string(),
|
|
25125
|
+
online: boolean(),
|
|
25126
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25127
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25128
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25129
|
+
estimatedDurationMs: number(),
|
|
25130
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25131
|
+
budgetMs: number(),
|
|
25132
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25133
|
+
steps: array(string()).readonly(),
|
|
25134
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25135
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25136
|
+
headroom: object({
|
|
25137
|
+
sessionsNow: number(),
|
|
25138
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25139
|
+
}),
|
|
25140
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25141
|
+
canStart: boolean()
|
|
25142
|
+
});
|
|
25143
|
+
/** Where the measuring runner is. */
|
|
25144
|
+
var NodeBenchProgressSchema = object({
|
|
25145
|
+
phase: _enum([
|
|
25146
|
+
"preparing",
|
|
25147
|
+
"device",
|
|
25148
|
+
"pipeline",
|
|
25149
|
+
"cleanup"
|
|
25150
|
+
]),
|
|
25151
|
+
deviceKey: string().nullable(),
|
|
25152
|
+
modelId: string().nullable(),
|
|
25153
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25154
|
+
load: number().nullable(),
|
|
25155
|
+
cellsDone: number(),
|
|
25156
|
+
cellsTotal: number(),
|
|
25157
|
+
message: string()
|
|
25158
|
+
});
|
|
25159
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25160
|
+
var NodeBenchLimitSchema = _enum([
|
|
25161
|
+
"p95",
|
|
25162
|
+
"drops",
|
|
25163
|
+
"errors",
|
|
25164
|
+
"stall",
|
|
25165
|
+
"cpu",
|
|
25166
|
+
"ram",
|
|
25167
|
+
"none"
|
|
25168
|
+
]);
|
|
25169
|
+
var NodeBenchRampStepSchema = object({
|
|
25170
|
+
load: number(),
|
|
25171
|
+
pass: boolean(),
|
|
25172
|
+
p95Ms: number(),
|
|
25173
|
+
dropRatio: number(),
|
|
25174
|
+
/** Completed frames per second over the accounted window. */
|
|
25175
|
+
fps: number(),
|
|
25176
|
+
cpuPct: number().nullable(),
|
|
25177
|
+
ramFreePct: number().nullable(),
|
|
25178
|
+
failReasons: array(string()).readonly()
|
|
25179
|
+
});
|
|
25180
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25181
|
+
phase: literal("device"),
|
|
25182
|
+
deviceKey: string(),
|
|
25183
|
+
modelId: string(),
|
|
25184
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25185
|
+
p50Ms: number(),
|
|
25186
|
+
p95Ms: number(),
|
|
25187
|
+
p99Ms: number(),
|
|
25188
|
+
/** Frames per second sustained at the last passing step. */
|
|
25189
|
+
fps: number(),
|
|
25190
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25191
|
+
kMax: number(),
|
|
25192
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25193
|
+
/** First call (model load + warm-up). */
|
|
25194
|
+
warmupMs: number(),
|
|
25195
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25196
|
+
}), object({
|
|
25197
|
+
phase: literal("pipeline"),
|
|
25198
|
+
deviceKey: string(),
|
|
25199
|
+
modelId: string(),
|
|
25200
|
+
steps: array(string()).readonly(),
|
|
25201
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25202
|
+
maxSessions: number(),
|
|
25203
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25204
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25205
|
+
stepsFired: array(string()).readonly(),
|
|
25206
|
+
warmupMs: number(),
|
|
25207
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25208
|
+
})]);
|
|
25209
|
+
/**
|
|
25210
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25211
|
+
* the node no longer beats the table.
|
|
25212
|
+
*/
|
|
25213
|
+
var NodeBenchFingerprintSchema = object({
|
|
25214
|
+
pipelineVersion: string().nullable(),
|
|
25215
|
+
cpuModel: string().nullable(),
|
|
25216
|
+
ramGb: number().nullable(),
|
|
25217
|
+
os: string().nullable(),
|
|
25218
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25219
|
+
pools: record(string(), object({
|
|
25220
|
+
runtime: string(),
|
|
25221
|
+
numWorkers: number(),
|
|
25222
|
+
concurrency: number(),
|
|
25223
|
+
batchMode: string()
|
|
25224
|
+
})).default({})
|
|
25225
|
+
});
|
|
25226
|
+
/** The frames the run used. */
|
|
25227
|
+
var NodeBenchClipSchema = object({
|
|
25228
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25229
|
+
id: string(),
|
|
25230
|
+
revision: string().nullable(),
|
|
25231
|
+
frames: number(),
|
|
25232
|
+
width: number(),
|
|
25233
|
+
height: number()
|
|
25234
|
+
});
|
|
25235
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25236
|
+
runId: string().min(1),
|
|
25237
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25238
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25239
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25240
|
+
steps: array(string()).default([]),
|
|
25241
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25242
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25243
|
+
deadlineAtMs: number(),
|
|
25244
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25245
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25246
|
+
keepDownloadedModels: boolean().default(false)
|
|
25247
|
+
});
|
|
25248
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25249
|
+
"running",
|
|
25250
|
+
"done",
|
|
25251
|
+
"failed",
|
|
25252
|
+
"aborted"
|
|
25253
|
+
]);
|
|
25254
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25255
|
+
runId: string(),
|
|
25256
|
+
nodeId: string(),
|
|
25257
|
+
state: NodeBenchRunnerStateSchema,
|
|
25258
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25259
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25260
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25261
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25262
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25263
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25264
|
+
activeCameraIds: array(number()).readonly(),
|
|
25265
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25266
|
+
deletedModels: array(string()).readonly(),
|
|
25267
|
+
error: string().nullable(),
|
|
25268
|
+
startedAtMs: number(),
|
|
25269
|
+
finishedAtMs: number().nullable()
|
|
25270
|
+
});
|
|
25271
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25272
|
+
"draining",
|
|
25273
|
+
"measuring",
|
|
25274
|
+
"restoring",
|
|
25275
|
+
"done",
|
|
25276
|
+
"failed",
|
|
25277
|
+
"aborted"
|
|
25278
|
+
]);
|
|
25279
|
+
/** Why a run ended. */
|
|
25280
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25281
|
+
"completed",
|
|
25282
|
+
"operator-abort",
|
|
25283
|
+
"deadline",
|
|
25284
|
+
"node-lost",
|
|
25285
|
+
"runner-lost",
|
|
25286
|
+
"hub-restart",
|
|
25287
|
+
"drain-timeout",
|
|
25288
|
+
"failed"
|
|
25289
|
+
]);
|
|
25290
|
+
var NodeBenchmarkRunSchema = object({
|
|
25291
|
+
runId: string(),
|
|
25292
|
+
nodeId: string(),
|
|
25293
|
+
state: NodeBenchmarkStateSchema,
|
|
25294
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25295
|
+
startedAtMs: number(),
|
|
25296
|
+
deadlineAtMs: number(),
|
|
25297
|
+
finishedAtMs: number().nullable(),
|
|
25298
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25299
|
+
error: string().nullable(),
|
|
25300
|
+
/** Cameras moved off the node for the run. */
|
|
25301
|
+
moved: array(number()).readonly(),
|
|
25302
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25303
|
+
staying: array(number()).readonly(),
|
|
25304
|
+
/** Something else ran on the node's pools during the run. */
|
|
25305
|
+
contaminated: boolean(),
|
|
25306
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25307
|
+
resultIds: array(string()).readonly()
|
|
25308
|
+
});
|
|
25309
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25310
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25311
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25312
|
+
modeNodeId: string().nullable(),
|
|
25313
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25314
|
+
});
|
|
25315
|
+
/**
|
|
25316
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25317
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25318
|
+
* ends, never by anyone else.
|
|
25319
|
+
*/
|
|
25320
|
+
var NodeBenchmarkResultSchema = object({
|
|
25321
|
+
id: string(),
|
|
25322
|
+
runId: string(),
|
|
25323
|
+
nodeId: string(),
|
|
25324
|
+
cell: NodeBenchCellSchema,
|
|
25325
|
+
fpsPerStream: number(),
|
|
25326
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25327
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25328
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25329
|
+
contaminated: boolean(),
|
|
25330
|
+
stayingCameras: array(number()).readonly(),
|
|
25331
|
+
/** The run ended early; the cell itself completed. */
|
|
25332
|
+
partialRun: boolean(),
|
|
25333
|
+
measuredAtMs: number()
|
|
25334
|
+
});
|
|
25335
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25336
|
+
nodeId: string().optional(),
|
|
25337
|
+
deviceKey: string().optional()
|
|
25338
|
+
});
|
|
25339
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25340
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25341
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25342
|
+
standing: _enum([
|
|
25343
|
+
"fresh",
|
|
25344
|
+
"stale",
|
|
25345
|
+
"superseded"
|
|
25346
|
+
]),
|
|
25347
|
+
staleWhy: _enum([
|
|
25348
|
+
"age",
|
|
25349
|
+
"runtime",
|
|
25350
|
+
"pool-tuning"
|
|
25351
|
+
]).nullable()
|
|
25352
|
+
});
|
|
25353
|
+
object({
|
|
25354
|
+
runId: string(),
|
|
25355
|
+
nodeId: string(),
|
|
25356
|
+
startedAtMs: number(),
|
|
25357
|
+
deadlineAtMs: number(),
|
|
25358
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25359
|
+
moved: array(number()).readonly(),
|
|
25360
|
+
staying: array(number()).readonly()
|
|
25361
|
+
});
|
|
25362
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25363
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25364
|
+
nodeId: string(),
|
|
25365
|
+
reachable: boolean(),
|
|
25366
|
+
devices: array(object({
|
|
25367
|
+
deviceKey: string(),
|
|
25368
|
+
enabled: boolean(),
|
|
25369
|
+
available: boolean(),
|
|
25370
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25371
|
+
suggested: array(string()).readonly(),
|
|
25372
|
+
/** Every root detector the device has a build for. */
|
|
25373
|
+
all: array(string()).readonly(),
|
|
25374
|
+
/** The model the device runs now, when pinned. */
|
|
25375
|
+
currentModelId: string().nullable()
|
|
25376
|
+
})).readonly(),
|
|
25377
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25378
|
+
steps: array(object({
|
|
25379
|
+
id: string(),
|
|
25380
|
+
name: string(),
|
|
25381
|
+
slot: string()
|
|
25382
|
+
})).readonly()
|
|
25383
|
+
});
|
|
23466
25384
|
object({
|
|
23467
25385
|
activeCameras: number(),
|
|
23468
25386
|
throttledCameras: number(),
|
|
@@ -23906,6 +25824,22 @@ var MotionSourceEnum = _enum([
|
|
|
23906
25824
|
"device-activity"
|
|
23907
25825
|
]);
|
|
23908
25826
|
/**
|
|
25827
|
+
* What opened an on-motion detection SESSION: the motion source that passed the
|
|
25828
|
+
* camera's `motionSources` gate, and what raised it (the camera itself, or a
|
|
25829
|
+
* sensor the operator attached — D672). `sensorName` is the attached sensor's
|
|
25830
|
+
* device name as the orchestrator's camera-sensors resolution last read it;
|
|
25831
|
+
* absent when unknown or when the camera itself triggered.
|
|
25832
|
+
*
|
|
25833
|
+
* Carried on the session attach ONLY so the runner's `DetectionPhaseTransition`
|
|
25834
|
+
* can say what started the session (D672 rule 11, amended 2026-10-06). The
|
|
25835
|
+
* runner never decides anything on it.
|
|
25836
|
+
*/
|
|
25837
|
+
var SessionTriggerSchema = object({
|
|
25838
|
+
source: MotionSourceEnum,
|
|
25839
|
+
triggeredBy: MotionTriggeredBySchema,
|
|
25840
|
+
sensorName: string().optional()
|
|
25841
|
+
});
|
|
25842
|
+
/**
|
|
23909
25843
|
* List of motion sources active on a camera. Empty array is valid:
|
|
23910
25844
|
* "no source" — happens for battery cams without firmware motion when
|
|
23911
25845
|
* the operator hasn't opted into the SW analyzer (would hold the
|
|
@@ -24157,6 +26091,14 @@ var RunnerCameraConfigSchema = object({
|
|
|
24157
26091
|
*/
|
|
24158
26092
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
24159
26093
|
/**
|
|
26094
|
+
* What opened this attach, on a SESSION attach only (see
|
|
26095
|
+
* {@link SessionTriggerSchema}). OPTIONAL with no default: absent on a
|
|
26096
|
+
* standing attach, an occupancy burst, a re-dispatch with no motion event
|
|
26097
|
+
* behind it, and every attach from an orchestrator older than the field — the
|
|
26098
|
+
* runner then names no source on the phase event.
|
|
26099
|
+
*/
|
|
26100
|
+
sessionTrigger: SessionTriggerSchema.optional(),
|
|
26101
|
+
/**
|
|
24160
26102
|
* WHICH root detector runs for this camera. The detection counterpart of
|
|
24161
26103
|
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
24162
26104
|
* of sources the system understands, vendor-agnostic, owned here.
|
|
@@ -24316,14 +26258,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24316
26258
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24317
26259
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24318
26260
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24319
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24320
|
-
* per
|
|
26261
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26262
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26263
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26264
|
+
* (D762).
|
|
24321
26265
|
*/
|
|
24322
26266
|
devices: array(object({
|
|
24323
26267
|
deviceKey: string(),
|
|
24324
26268
|
backend: string(),
|
|
24325
|
-
attachedCameras: number()
|
|
24326
|
-
queueDepthTotal: number()
|
|
26269
|
+
attachedCameras: number()
|
|
24327
26270
|
})).default([]),
|
|
24328
26271
|
/** Hardware capability flags reported by this node. */
|
|
24329
26272
|
hardware: object({
|
|
@@ -24459,7 +26402,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24459
26402
|
*/
|
|
24460
26403
|
cropJpeg: string().optional(),
|
|
24461
26404
|
parent: DetailParentSchema,
|
|
24462
|
-
steps: array(string()).optional()
|
|
26405
|
+
steps: array(string()).optional(),
|
|
26406
|
+
/**
|
|
26407
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
26408
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
26409
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
26410
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
26411
|
+
* requested step infers as before.
|
|
26412
|
+
*/
|
|
26413
|
+
supplied: object({
|
|
26414
|
+
stepId: string(),
|
|
26415
|
+
modelId: string(),
|
|
26416
|
+
boxes: array(object({
|
|
26417
|
+
bbox: NativeCropBboxSchema,
|
|
26418
|
+
score: number()
|
|
26419
|
+
})).min(1)
|
|
26420
|
+
}).optional()
|
|
24463
26421
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
24464
26422
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
24465
26423
|
stepId: string(),
|
|
@@ -24511,7 +26469,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24511
26469
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
24512
26470
|
deviceId: number(),
|
|
24513
26471
|
trackId: string()
|
|
24514
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
26472
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
26473
|
+
accepted: literal(true),
|
|
26474
|
+
runId: string()
|
|
26475
|
+
}), {
|
|
26476
|
+
kind: "mutation",
|
|
26477
|
+
auth: "admin"
|
|
26478
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
26479
|
+
kind: "mutation",
|
|
26480
|
+
auth: "admin"
|
|
26481
|
+
});
|
|
24515
26482
|
var CameraPipelineConfigSchema = object({
|
|
24516
26483
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
24517
26484
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24522,14 +26489,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
24522
26489
|
settings: record(string(), unknown()).readonly().optional()
|
|
24523
26490
|
}).nullable().optional()
|
|
24524
26491
|
});
|
|
24525
|
-
var PipelineTemplateSchema = object({
|
|
24526
|
-
id: string(),
|
|
24527
|
-
name: string(),
|
|
24528
|
-
description: string().optional(),
|
|
24529
|
-
config: CameraPipelineConfigSchema,
|
|
24530
|
-
createdAt: string(),
|
|
24531
|
-
updatedAt: string()
|
|
24532
|
-
});
|
|
24533
26492
|
var DeviceStepConfigSchema = object({
|
|
24534
26493
|
modelId: string().optional(),
|
|
24535
26494
|
settings: record(string(), unknown()).optional(),
|
|
@@ -24603,9 +26562,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
24603
26562
|
modelId: string().optional(),
|
|
24604
26563
|
settings: record(string(), unknown()).readonly().optional()
|
|
24605
26564
|
});
|
|
26565
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
24606
26566
|
var CameraPipelineSettingsSchema = object({
|
|
24607
|
-
pinnedAgentNodeId: string().optional(),
|
|
24608
26567
|
stepToggles: record(string(), boolean()).optional(),
|
|
26568
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
24609
26569
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
24610
26570
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
24611
26571
|
});
|
|
@@ -24638,7 +26598,10 @@ var PipelineAssignmentSchema = object({
|
|
|
24638
26598
|
});
|
|
24639
26599
|
/**
|
|
24640
26600
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
24641
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
26601
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
26602
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
26603
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
26604
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
24642
26605
|
*/
|
|
24643
26606
|
var AgentLoadSummarySchema = object({
|
|
24644
26607
|
nodeId: string(),
|
|
@@ -24727,26 +26690,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
24727
26690
|
width: number(),
|
|
24728
26691
|
height: number(),
|
|
24729
26692
|
subscribers: number(),
|
|
24730
|
-
|
|
24731
|
-
|
|
26693
|
+
/**
|
|
26694
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
26695
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
26696
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
26697
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
26698
|
+
* camera and is not served (D758).
|
|
26699
|
+
*/
|
|
26700
|
+
inFps: number().nullable()
|
|
24732
26701
|
})).readonly(),
|
|
24733
26702
|
webrtcSessions: number(),
|
|
24734
26703
|
rtspRestream: boolean()
|
|
24735
26704
|
});
|
|
24736
|
-
/**
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24740
|
-
|
|
24741
|
-
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
var CameraDecoderStatusSchema = object({
|
|
24745
|
-
nodeId: string(),
|
|
24746
|
-
formats: array(string()).readonly(),
|
|
24747
|
-
sessionCount: number(),
|
|
24748
|
-
shm: CameraDecoderShmSchema
|
|
24749
|
-
});
|
|
26705
|
+
/**
|
|
26706
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
26707
|
+
* construction); null when the camera has no detection node. It carries no
|
|
26708
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
26709
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
26710
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
26711
|
+
* detector), never from a counter nothing feeds.
|
|
26712
|
+
*/
|
|
26713
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
24750
26714
|
/** Motion block — null when motion detection is not active for this device. */
|
|
24751
26715
|
var CameraMotionStatusSchema = object({
|
|
24752
26716
|
enabled: boolean(),
|
|
@@ -25103,12 +27067,6 @@ method(object({
|
|
|
25103
27067
|
}), object({ success: literal(true) }), {
|
|
25104
27068
|
kind: "mutation",
|
|
25105
27069
|
auth: "admin"
|
|
25106
|
-
}), method(object({
|
|
25107
|
-
agentNodeId: string(),
|
|
25108
|
-
detectWeight: number().positive().nullable()
|
|
25109
|
-
}), object({ success: literal(true) }), {
|
|
25110
|
-
kind: "mutation",
|
|
25111
|
-
auth: "admin"
|
|
25112
27070
|
}), method(object({
|
|
25113
27071
|
agentNodeId: string(),
|
|
25114
27072
|
detect: boolean().nullable().optional(),
|
|
@@ -25150,6 +27108,30 @@ method(object({
|
|
|
25150
27108
|
}), {
|
|
25151
27109
|
kind: "mutation",
|
|
25152
27110
|
auth: "admin"
|
|
27111
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27112
|
+
kind: "mutation",
|
|
27113
|
+
auth: "admin"
|
|
27114
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27115
|
+
kind: "mutation",
|
|
27116
|
+
auth: "admin"
|
|
27117
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27118
|
+
kind: "mutation",
|
|
27119
|
+
auth: "admin"
|
|
27120
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27121
|
+
kind: literal("started"),
|
|
27122
|
+
runId: string()
|
|
27123
|
+
}), object({
|
|
27124
|
+
kind: literal("refused"),
|
|
27125
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27126
|
+
})]), {
|
|
27127
|
+
kind: "mutation",
|
|
27128
|
+
auth: "admin"
|
|
27129
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27130
|
+
kind: "mutation",
|
|
27131
|
+
auth: "admin"
|
|
27132
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27133
|
+
kind: "mutation",
|
|
27134
|
+
auth: "admin"
|
|
25153
27135
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25154
27136
|
deviceId: number(),
|
|
25155
27137
|
addonId: string(),
|
|
@@ -25166,6 +27148,13 @@ method(object({
|
|
|
25166
27148
|
}), object({ success: literal(true) }), {
|
|
25167
27149
|
kind: "mutation",
|
|
25168
27150
|
auth: "admin"
|
|
27151
|
+
}), method(object({
|
|
27152
|
+
deviceId: number(),
|
|
27153
|
+
addonId: string(),
|
|
27154
|
+
settings: record(string(), unknown()).nullable()
|
|
27155
|
+
}), object({ success: literal(true) }), {
|
|
27156
|
+
kind: "mutation",
|
|
27157
|
+
auth: "admin"
|
|
25169
27158
|
}), method(object({
|
|
25170
27159
|
deviceId: number(),
|
|
25171
27160
|
agentNodeId: string(),
|
|
@@ -25189,25 +27178,7 @@ method(object({
|
|
|
25189
27178
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25190
27179
|
kind: "mutation",
|
|
25191
27180
|
auth: "admin"
|
|
25192
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25193
|
-
name: string(),
|
|
25194
|
-
description: string().optional(),
|
|
25195
|
-
config: CameraPipelineConfigSchema
|
|
25196
|
-
}), PipelineTemplateSchema, {
|
|
25197
|
-
kind: "mutation",
|
|
25198
|
-
auth: "admin"
|
|
25199
|
-
}), method(object({
|
|
25200
|
-
id: string(),
|
|
25201
|
-
name: string().optional(),
|
|
25202
|
-
description: string().optional(),
|
|
25203
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25204
|
-
}), PipelineTemplateSchema, {
|
|
25205
|
-
kind: "mutation",
|
|
25206
|
-
auth: "admin"
|
|
25207
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25208
|
-
kind: "mutation",
|
|
25209
|
-
auth: "admin"
|
|
25210
|
-
});
|
|
27181
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25211
27182
|
/**
|
|
25212
27183
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25213
27184
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -25810,7 +27781,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
25810
27781
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
25811
27782
|
* operator already consented to.
|
|
25812
27783
|
*/
|
|
25813
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
27784
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
27785
|
+
/**
|
|
27786
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
27787
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
27788
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
27789
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
27790
|
+
*/
|
|
27791
|
+
linkIntent: string().optional(),
|
|
27792
|
+
/**
|
|
27793
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
27794
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
27795
|
+
*/
|
|
27796
|
+
issuer: string().optional()
|
|
25814
27797
|
});
|
|
25815
27798
|
method(object({
|
|
25816
27799
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -27440,8 +29423,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
27440
29423
|
]).nullable(),
|
|
27441
29424
|
/** Input FPS from the camera (null for adaptive). */
|
|
27442
29425
|
inputFps: number().nullable(),
|
|
27443
|
-
/** Decoded FPS (null for adaptive). */
|
|
27444
|
-
decodeFps: number().nullable(),
|
|
27445
29426
|
/** Bitrate in kbps (null for adaptive). */
|
|
27446
29427
|
bitrateKbps: number().nullable()
|
|
27447
29428
|
});
|
|
@@ -27718,7 +29699,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
27718
29699
|
* field their hints were silently stripped by the schema and the
|
|
27719
29700
|
* adaptive ladder started blind on the client's display size.
|
|
27720
29701
|
*/
|
|
27721
|
-
hints: webrtcClientHintsSchema.optional()
|
|
29702
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
29703
|
+
/**
|
|
29704
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
29705
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
29706
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
29707
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
29708
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
29709
|
+
*
|
|
29710
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
29711
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
29712
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
29713
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
29714
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
29715
|
+
* flag must not become a second door to the camera's speaker.
|
|
29716
|
+
*/
|
|
29717
|
+
talkback: boolean().optional()
|
|
27722
29718
|
}), object({
|
|
27723
29719
|
sessionId: string(),
|
|
27724
29720
|
sdpAnswer: string()
|
|
@@ -27773,6 +29769,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
27773
29769
|
*/
|
|
27774
29770
|
alive: boolean()
|
|
27775
29771
|
})), method(object({
|
|
29772
|
+
deviceId: number().int().nonnegative(),
|
|
29773
|
+
sessionId: string(),
|
|
29774
|
+
downlinkMbps: number().nonnegative()
|
|
29775
|
+
}), object({
|
|
29776
|
+
outcome: _enum(["switching", "held"]),
|
|
29777
|
+
tier: CamProfileSchema.nullable(),
|
|
29778
|
+
reason: string()
|
|
29779
|
+
}), { kind: "mutation" }), method(object({
|
|
27776
29780
|
deviceId: number().int().nonnegative(),
|
|
27777
29781
|
sessionId: string()
|
|
27778
29782
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -28012,6 +30016,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
28012
30016
|
var RestartAddonResultSchema = unknown();
|
|
28013
30017
|
var InstallPackageResultSchema = unknown();
|
|
28014
30018
|
var ReloadPackagesResultSchema = unknown();
|
|
30019
|
+
/**
|
|
30020
|
+
* What an uninstall did on ONE node.
|
|
30021
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
30022
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
30023
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
30024
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
30025
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
30026
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
30027
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
30028
|
+
*/
|
|
30029
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
30030
|
+
"uninstalled",
|
|
30031
|
+
"not-installed",
|
|
30032
|
+
"refused",
|
|
30033
|
+
"failed",
|
|
30034
|
+
"pending-reconnect"
|
|
30035
|
+
]);
|
|
30036
|
+
var UninstallNodeResultSchema = object({
|
|
30037
|
+
nodeId: string(),
|
|
30038
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
30039
|
+
error: string().optional(),
|
|
30040
|
+
addonIds: array(string()).readonly(),
|
|
30041
|
+
runnersStopped: array(string()).readonly(),
|
|
30042
|
+
warnings: array(string()).readonly()
|
|
30043
|
+
});
|
|
30044
|
+
var UninstallPackageResultSchema = object({
|
|
30045
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
30046
|
+
success: boolean(),
|
|
30047
|
+
packageName: string(),
|
|
30048
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
30049
|
+
});
|
|
30050
|
+
/**
|
|
30051
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
30052
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
30053
|
+
*/
|
|
30054
|
+
var PackageInstallationsSchema = object({
|
|
30055
|
+
installations: array(object({
|
|
30056
|
+
packageName: string(),
|
|
30057
|
+
nodeId: string(),
|
|
30058
|
+
nodeName: string(),
|
|
30059
|
+
isHub: boolean(),
|
|
30060
|
+
isOnline: boolean(),
|
|
30061
|
+
version: string().nullable(),
|
|
30062
|
+
addonIds: array(string()).readonly(),
|
|
30063
|
+
source: _enum(["live", "recorded"]),
|
|
30064
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
30065
|
+
onHub: boolean()
|
|
30066
|
+
})).readonly(),
|
|
30067
|
+
unreachable: array(object({
|
|
30068
|
+
nodeId: string(),
|
|
30069
|
+
error: string()
|
|
30070
|
+
})).readonly()
|
|
30071
|
+
});
|
|
28015
30072
|
var BulkUpdateItemStatusSchema = _enum([
|
|
28016
30073
|
"queued",
|
|
28017
30074
|
"updating",
|
|
@@ -28094,10 +30151,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
28094
30151
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
28095
30152
|
kind: "mutation",
|
|
28096
30153
|
auth: "admin"
|
|
28097
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30154
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30155
|
+
packageName: string().min(1),
|
|
30156
|
+
nodeId: string().optional(),
|
|
30157
|
+
everywhere: boolean().optional()
|
|
30158
|
+
}), UninstallPackageResultSchema, {
|
|
28098
30159
|
kind: "mutation",
|
|
28099
30160
|
auth: "admin"
|
|
28100
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
30161
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
28101
30162
|
kind: "mutation",
|
|
28102
30163
|
auth: "admin"
|
|
28103
30164
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -30165,6 +32226,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
30165
32226
|
enabled: boolean().optional(),
|
|
30166
32227
|
info: record(string(), unknown()).optional(),
|
|
30167
32228
|
settings: record(string(), unknown()).optional(),
|
|
32229
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
32230
|
+
* the keychain, not the table (D787). */
|
|
32231
|
+
secretKeys: array(string()).optional(),
|
|
30168
32232
|
skipRestart: boolean().optional()
|
|
30169
32233
|
});
|
|
30170
32234
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -30188,7 +32252,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
30188
32252
|
auth: "admin"
|
|
30189
32253
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
30190
32254
|
id: string(),
|
|
30191
|
-
settings: record(string(), unknown())
|
|
32255
|
+
settings: record(string(), unknown()),
|
|
32256
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
32257
|
+
secretKeys: array(string()).optional()
|
|
30192
32258
|
}), object({ success: boolean() }), {
|
|
30193
32259
|
kind: "mutation",
|
|
30194
32260
|
auth: "admin"
|
|
@@ -30393,7 +32459,7 @@ var LocalInterfaceSchema = object({
|
|
|
30393
32459
|
name: string(),
|
|
30394
32460
|
family: _enum(["IPv4", "IPv6"]),
|
|
30395
32461
|
address: string(),
|
|
30396
|
-
/** CIDR shorthand (e.g. `192.168.
|
|
32462
|
+
/** CIDR shorthand (e.g. `192.168.10.10/24`). Empty when OS doesn't expose. */
|
|
30397
32463
|
cidr: string(),
|
|
30398
32464
|
/** OS netmask. Stable across calls so the SDK can hash on it. */
|
|
30399
32465
|
netmask: string(),
|
|
@@ -30447,7 +32513,9 @@ var ConnectionEndpointSchema = object({
|
|
|
30447
32513
|
"lan-ipv4",
|
|
30448
32514
|
"lan-ipv6",
|
|
30449
32515
|
"public",
|
|
30450
|
-
"loopback"
|
|
32516
|
+
"loopback",
|
|
32517
|
+
"app-link",
|
|
32518
|
+
"custom"
|
|
30451
32519
|
]),
|
|
30452
32520
|
/**
|
|
30453
32521
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -30516,15 +32584,27 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
30516
32584
|
localPort: AdvertisedLocalPortSchema
|
|
30517
32585
|
});
|
|
30518
32586
|
/**
|
|
30519
|
-
* The
|
|
30520
|
-
*
|
|
30521
|
-
*
|
|
32587
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
32588
|
+
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
32589
|
+
* so the UI can show it either way.
|
|
30522
32590
|
*/
|
|
30523
32591
|
var NotificationEndpointSchema = object({
|
|
30524
32592
|
/** The operator's explicit choice, or null for AUTO. */
|
|
30525
32593
|
baseUrl: string().nullable(),
|
|
30526
|
-
/**
|
|
30527
|
-
|
|
32594
|
+
/**
|
|
32595
|
+
* The effective flagged address: the explicit choice, else (AUTO) the
|
|
32596
|
+
* CamStack app link `https://camstack.zentik.app` (D709). A pre-D709 hub
|
|
32597
|
+
* answered the public tunnel / mesh here, or null.
|
|
32598
|
+
*/
|
|
32599
|
+
resolved: string().nullable(),
|
|
32600
|
+
/**
|
|
32601
|
+
* The hub origin an app link carries as `hub=` (D709): the hub's best
|
|
32602
|
+
* public HTTPS address — the tunnel, then the mesh (Tailscale MagicDNS) —
|
|
32603
|
+
* picked from this cap's own palette by `pickAppLinkHub`. `null` when the
|
|
32604
|
+
* hub advertises neither; the app link is then minted without `hub=`.
|
|
32605
|
+
* Absent on a pre-D709 hub.
|
|
32606
|
+
*/
|
|
32607
|
+
appLinkHub: string().nullable()
|
|
30528
32608
|
});
|
|
30529
32609
|
/**
|
|
30530
32610
|
* The URLs the SDK / viewer should race for API access. `baseUrls` empty =
|
|
@@ -30537,6 +32617,72 @@ var ViewerEndpointsSchema = object({
|
|
|
30537
32617
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
30538
32618
|
resolved: array(string()).readonly()
|
|
30539
32619
|
});
|
|
32620
|
+
/**
|
|
32621
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
32622
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
32623
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
32624
|
+
*/
|
|
32625
|
+
var HubAddressSnapshotSchema = object({
|
|
32626
|
+
override: string().nullable(),
|
|
32627
|
+
resolved: string().nullable(),
|
|
32628
|
+
source: _enum([
|
|
32629
|
+
"override",
|
|
32630
|
+
"auto",
|
|
32631
|
+
"none"
|
|
32632
|
+
])
|
|
32633
|
+
});
|
|
32634
|
+
var HubAddressesSchema = object({
|
|
32635
|
+
cluster: HubAddressSnapshotSchema,
|
|
32636
|
+
browser: HubAddressSnapshotSchema
|
|
32637
|
+
});
|
|
32638
|
+
/**
|
|
32639
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
32640
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
32641
|
+
* by at most one address.
|
|
32642
|
+
*/
|
|
32643
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
32644
|
+
var RoleSourceSchema = _enum([
|
|
32645
|
+
"flagged",
|
|
32646
|
+
"auto",
|
|
32647
|
+
"none"
|
|
32648
|
+
]);
|
|
32649
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
32650
|
+
var HubAddressRoleResolutionSchema = object({
|
|
32651
|
+
/** The address carrying the flag, or null = automatic. */
|
|
32652
|
+
flagged: string().nullable(),
|
|
32653
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
32654
|
+
resolved: string().nullable(),
|
|
32655
|
+
source: RoleSourceSchema
|
|
32656
|
+
});
|
|
32657
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
32658
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
32659
|
+
flagged: array(string()).readonly(),
|
|
32660
|
+
/** What the apps race right now. */
|
|
32661
|
+
resolved: array(string()).readonly(),
|
|
32662
|
+
source: RoleSourceSchema
|
|
32663
|
+
});
|
|
32664
|
+
var HubAddressBookSchema = object({
|
|
32665
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
32666
|
+
/** In the hub's detected palette right now. */
|
|
32667
|
+
detected: boolean(),
|
|
32668
|
+
/** Entered by the operator (removable). */
|
|
32669
|
+
custom: boolean(),
|
|
32670
|
+
/** The roles explicitly flagged on this address. */
|
|
32671
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
32672
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
32673
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
32674
|
+
/** The roles this address may be flagged with. */
|
|
32675
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
32676
|
+
})).readonly(),
|
|
32677
|
+
roles: object({
|
|
32678
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
32679
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
32680
|
+
internal: HubAddressRoleResolutionSchema,
|
|
32681
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
32682
|
+
}),
|
|
32683
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
32684
|
+
appLinkHub: string().nullable()
|
|
32685
|
+
});
|
|
30540
32686
|
var AllowedAddressesSchema = object({
|
|
30541
32687
|
/**
|
|
30542
32688
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -30578,8 +32724,29 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
30578
32724
|
* Pass `'https'` when the caller is itself loaded over HTTPS
|
|
30579
32725
|
* to avoid mixed-content blocks in the browser. The public
|
|
30580
32726
|
* tunnel always emits `https://` regardless. */
|
|
30581
|
-
scheme: _enum(["http", "https"]).optional()
|
|
30582
|
-
|
|
32727
|
+
scheme: _enum(["http", "https"]).optional(),
|
|
32728
|
+
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
32729
|
+
* an address notification taps can be flagged with, not a hub
|
|
32730
|
+
* route. Default `false`: racers and rankers never see it. */
|
|
32731
|
+
includeAppLink: boolean().optional()
|
|
32732
|
+
}), 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({
|
|
32733
|
+
baseUrl: string(),
|
|
32734
|
+
label: string().max(80)
|
|
32735
|
+
}), HubAddressBookSchema, {
|
|
32736
|
+
kind: "mutation",
|
|
32737
|
+
auth: "admin"
|
|
32738
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
32739
|
+
kind: "mutation",
|
|
32740
|
+
auth: "admin"
|
|
32741
|
+
}), method(object({
|
|
32742
|
+
role: HubAddressRoleSchema,
|
|
32743
|
+
baseUrl: string().nullable(),
|
|
32744
|
+
enabled: boolean(),
|
|
32745
|
+
acceptInsecureHttp: boolean().optional()
|
|
32746
|
+
}), HubAddressBookSchema, {
|
|
32747
|
+
kind: "mutation",
|
|
32748
|
+
auth: "admin"
|
|
32749
|
+
}), 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, {
|
|
30583
32750
|
kind: "mutation",
|
|
30584
32751
|
auth: "admin"
|
|
30585
32752
|
}), method(object({
|
|
@@ -30839,7 +33006,7 @@ var MeshPeerSchema = object({
|
|
|
30839
33006
|
tags: array(string()).readonly(),
|
|
30840
33007
|
/** True when the peer advertises itself as an exit-node candidate. */
|
|
30841
33008
|
exitNodeOption: boolean(),
|
|
30842
|
-
/** Subnet routes the peer advertises (e.g. `["192.168.
|
|
33009
|
+
/** Subnet routes the peer advertises (e.g. `["192.168.10.0/24"]`). */
|
|
30843
33010
|
advertisedRoutes: array(string()).readonly(),
|
|
30844
33011
|
/** Owner account login (e.g. `foo@example.com`). Null for tagged peers. */
|
|
30845
33012
|
userLogin: string().nullable(),
|
|
@@ -30969,7 +33136,8 @@ object({
|
|
|
30969
33136
|
* writes this slice (not even a boot seed), and neither does the runner's
|
|
30970
33137
|
* phase machine: its phase is "a session is attached" for every on-motion
|
|
30971
33138
|
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
30972
|
-
* A provider's `isDetected`
|
|
33139
|
+
* A provider's `isDetected` and `getStatus` answer from the hub's slice
|
|
33140
|
+
* (`hubMotionNativeProvider`).
|
|
30973
33141
|
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
30974
33142
|
* imports) — the provider pushes both edges itself, from the upstream
|
|
30975
33143
|
* system's own state change. That is the sensor's own fact.
|
|
@@ -31783,7 +33951,13 @@ var OsdStatusSchema = object({ overlays: array(object({
|
|
|
31783
33951
|
*/
|
|
31784
33952
|
availablePositions: array(OsdPositionEnum).readonly(),
|
|
31785
33953
|
/** Firmware does not allow editing the `text` field (e.g. timestamp). */
|
|
31786
|
-
readOnly: boolean().optional()
|
|
33954
|
+
readOnly: boolean().optional(),
|
|
33955
|
+
/**
|
|
33956
|
+
* Firmware text ceiling for this overlay. Absent = no known limit.
|
|
33957
|
+
* The OSD manager truncates here on every write — never stores its own
|
|
33958
|
+
* copy on the binding.
|
|
33959
|
+
*/
|
|
33960
|
+
maxCharacters: number().int().positive().optional()
|
|
31787
33961
|
})).readonly() });
|
|
31788
33962
|
var OsdOverlayPatchSchema = object({
|
|
31789
33963
|
enabled: boolean().optional(),
|
|
@@ -31834,7 +34008,9 @@ var OsdTemplateBindingSchema = object({
|
|
|
31834
34008
|
valuePath: string().min(1).max(64),
|
|
31835
34009
|
/** Convert TO this unit at render (`tryConvertUnit`). Absent = source unit. */
|
|
31836
34010
|
displayUnit: string().max(16).optional(),
|
|
31837
|
-
maxDecimals: number().int().min(0).max(4).default(1)
|
|
34011
|
+
maxDecimals: number().int().min(0).max(4).default(1),
|
|
34012
|
+
/** Raw value → display text (same shape as slot binding). Empty string hides. */
|
|
34013
|
+
valueMap: record(string(), string()).optional()
|
|
31838
34014
|
});
|
|
31839
34015
|
/**
|
|
31840
34016
|
* A named template: bindings (alias → leaf field) + a parser that
|
|
@@ -31884,18 +34060,11 @@ var OsdSlotBindingSchema = object({
|
|
|
31884
34060
|
source: OsdSourceSchema,
|
|
31885
34061
|
/** `${value}` and `${unit}` are substituted; every occurrence. */
|
|
31886
34062
|
template: string().max(96).default("${value}"),
|
|
31887
|
-
/** Truncate with an ellipsis past this length. Absent = no limit. */
|
|
31888
|
-
maxCharacters: number().int().min(4).max(64).optional(),
|
|
31889
34063
|
/**
|
|
31890
34064
|
* Decimal places for a numeric value. `0` yields an integer — the
|
|
31891
34065
|
* documented workaround for firmwares that reject `.` in overlay text.
|
|
31892
34066
|
*/
|
|
31893
34067
|
maxDecimals: number().int().min(0).max(4).default(1),
|
|
31894
|
-
/**
|
|
31895
|
-
* Appended via `${unit}` when no unit conversion produces a label.
|
|
31896
|
-
* Prefer `source.displayUnit` for converted device-state values.
|
|
31897
|
-
*/
|
|
31898
|
-
unitLabel: string().max(8).optional(),
|
|
31899
34068
|
/** Raw value → display text, e.g. `{"true":"MOTION","false":""}`. */
|
|
31900
34069
|
valueMap: record(string(), string()).optional(),
|
|
31901
34070
|
/** Time windows in which the slot is shown. Absent = always. */
|
|
@@ -31904,9 +34073,7 @@ var OsdSlotBindingSchema = object({
|
|
|
31904
34073
|
* Display gate, in the notification centre's condition vocabulary.
|
|
31905
34074
|
* Only the keys reported by `getConditionSupport` are accepted.
|
|
31906
34075
|
*/
|
|
31907
|
-
conditions: NcConditionsSchema.optional()
|
|
31908
|
-
/** Rendered when the gate is closed or the value unreadable. Empty = hide. */
|
|
31909
|
-
fallbackText: string().max(64).default("")
|
|
34076
|
+
conditions: NcConditionsSchema.optional()
|
|
31910
34077
|
});
|
|
31911
34078
|
/** One camera slot, as the operator sees it: firmware truth + our binding. */
|
|
31912
34079
|
var OsdSlotViewSchema = object({
|
|
@@ -35596,6 +37763,32 @@ var TotpStatusSchema = object({
|
|
|
35596
37763
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
35597
37764
|
confirmedAt: number().nullable()
|
|
35598
37765
|
});
|
|
37766
|
+
/**
|
|
37767
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
37768
|
+
* and scoped tokens.
|
|
37769
|
+
*
|
|
37770
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
37771
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
37772
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
37773
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
37774
|
+
* provider.
|
|
37775
|
+
*/
|
|
37776
|
+
var ExternalIdentitySchema = object({
|
|
37777
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
37778
|
+
provider: string(),
|
|
37779
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
37780
|
+
subject: string(),
|
|
37781
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
37782
|
+
issuer: string(),
|
|
37783
|
+
userId: string(),
|
|
37784
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
37785
|
+
label: string().optional(),
|
|
37786
|
+
linkedAt: number()
|
|
37787
|
+
});
|
|
37788
|
+
var ExternalIdentityKeySchema = object({
|
|
37789
|
+
provider: string().min(1),
|
|
37790
|
+
subject: string().min(1)
|
|
37791
|
+
});
|
|
35599
37792
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
35600
37793
|
kind: "mutation",
|
|
35601
37794
|
auth: "admin",
|
|
@@ -35709,7 +37902,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
35709
37902
|
userId: string(),
|
|
35710
37903
|
username: string(),
|
|
35711
37904
|
scopes: array(TokenScopeSchema)
|
|
35712
|
-
}).nullable(), { access: "view" }), method(
|
|
37905
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
37906
|
+
userId: string(),
|
|
37907
|
+
issuer: string()
|
|
37908
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
37909
|
+
userId: string(),
|
|
37910
|
+
issuer: string().min(1),
|
|
37911
|
+
label: string().optional()
|
|
37912
|
+
}), object({ success: literal(true) }), {
|
|
37913
|
+
kind: "mutation",
|
|
37914
|
+
auth: "admin",
|
|
37915
|
+
access: "create"
|
|
37916
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
37917
|
+
kind: "mutation",
|
|
37918
|
+
auth: "admin",
|
|
37919
|
+
access: "delete"
|
|
37920
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
35713
37921
|
kind: "mutation",
|
|
35714
37922
|
auth: "admin",
|
|
35715
37923
|
access: "delete"
|
|
@@ -36101,6 +38309,16 @@ DeviceType.Camera, method(object({
|
|
|
36101
38309
|
package: array(ZoneRuleSchema).readonly()
|
|
36102
38310
|
});
|
|
36103
38311
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
38312
|
+
Object.freeze({
|
|
38313
|
+
person: .5,
|
|
38314
|
+
vehicle: .5,
|
|
38315
|
+
animal: .5
|
|
38316
|
+
});
|
|
38317
|
+
Object.freeze({
|
|
38318
|
+
person: .65,
|
|
38319
|
+
vehicle: .65,
|
|
38320
|
+
animal: .65
|
|
38321
|
+
});
|
|
36104
38322
|
/**
|
|
36105
38323
|
* Accessory device helpers — shared across drivers.
|
|
36106
38324
|
*
|
|
@@ -36275,6 +38493,12 @@ Object.freeze({
|
|
|
36275
38493
|
addonId: null,
|
|
36276
38494
|
access: "view"
|
|
36277
38495
|
},
|
|
38496
|
+
"addons.listInstallations": {
|
|
38497
|
+
capName: "addons",
|
|
38498
|
+
capScope: "system",
|
|
38499
|
+
addonId: null,
|
|
38500
|
+
access: "view"
|
|
38501
|
+
},
|
|
36278
38502
|
"addons.listJobs": {
|
|
36279
38503
|
capName: "addons",
|
|
36280
38504
|
capScope: "system",
|
|
@@ -37457,90 +39681,18 @@ Object.freeze({
|
|
|
37457
39681
|
addonId: null,
|
|
37458
39682
|
access: "create"
|
|
37459
39683
|
},
|
|
37460
|
-
"decoder.createSession": {
|
|
37461
|
-
capName: "decoder",
|
|
37462
|
-
capScope: "system",
|
|
37463
|
-
addonId: null,
|
|
37464
|
-
access: "view"
|
|
37465
|
-
},
|
|
37466
|
-
"decoder.destroySession": {
|
|
37467
|
-
capName: "decoder",
|
|
37468
|
-
capScope: "system",
|
|
37469
|
-
addonId: null,
|
|
37470
|
-
access: "delete"
|
|
37471
|
-
},
|
|
37472
|
-
"decoder.getFrame": {
|
|
37473
|
-
capName: "decoder",
|
|
37474
|
-
capScope: "system",
|
|
37475
|
-
addonId: null,
|
|
37476
|
-
access: "view"
|
|
37477
|
-
},
|
|
37478
39684
|
"decoder.getInfo": {
|
|
37479
39685
|
capName: "decoder",
|
|
37480
39686
|
capScope: "system",
|
|
37481
39687
|
addonId: null,
|
|
37482
39688
|
access: "view"
|
|
37483
39689
|
},
|
|
37484
|
-
"decoder.getShmStats": {
|
|
37485
|
-
capName: "decoder",
|
|
37486
|
-
capScope: "system",
|
|
37487
|
-
addonId: null,
|
|
37488
|
-
access: "view"
|
|
37489
|
-
},
|
|
37490
|
-
"decoder.getStats": {
|
|
37491
|
-
capName: "decoder",
|
|
37492
|
-
capScope: "system",
|
|
37493
|
-
addonId: null,
|
|
37494
|
-
access: "view"
|
|
37495
|
-
},
|
|
37496
|
-
"decoder.listActiveSessions": {
|
|
37497
|
-
capName: "decoder",
|
|
37498
|
-
capScope: "system",
|
|
37499
|
-
addonId: null,
|
|
37500
|
-
access: "view"
|
|
37501
|
-
},
|
|
37502
|
-
"decoder.openStream": {
|
|
37503
|
-
capName: "decoder",
|
|
37504
|
-
capScope: "system",
|
|
37505
|
-
addonId: null,
|
|
37506
|
-
access: "view"
|
|
37507
|
-
},
|
|
37508
|
-
"decoder.pullFrames": {
|
|
37509
|
-
capName: "decoder",
|
|
37510
|
-
capScope: "system",
|
|
37511
|
-
addonId: null,
|
|
37512
|
-
access: "view"
|
|
37513
|
-
},
|
|
37514
|
-
"decoder.pullHandles": {
|
|
37515
|
-
capName: "decoder",
|
|
37516
|
-
capScope: "system",
|
|
37517
|
-
addonId: null,
|
|
37518
|
-
access: "view"
|
|
37519
|
-
},
|
|
37520
|
-
"decoder.pushPacket": {
|
|
37521
|
-
capName: "decoder",
|
|
37522
|
-
capScope: "system",
|
|
37523
|
-
addonId: null,
|
|
37524
|
-
access: "view"
|
|
37525
|
-
},
|
|
37526
39690
|
"decoder.reprobeHwaccel": {
|
|
37527
39691
|
capName: "decoder",
|
|
37528
39692
|
capScope: "system",
|
|
37529
39693
|
addonId: null,
|
|
37530
39694
|
access: "create"
|
|
37531
39695
|
},
|
|
37532
|
-
"decoder.supportsCodec": {
|
|
37533
|
-
capName: "decoder",
|
|
37534
|
-
capScope: "system",
|
|
37535
|
-
addonId: null,
|
|
37536
|
-
access: "view"
|
|
37537
|
-
},
|
|
37538
|
-
"decoder.updateConfig": {
|
|
37539
|
-
capName: "decoder",
|
|
37540
|
-
capScope: "system",
|
|
37541
|
-
addonId: null,
|
|
37542
|
-
access: "view"
|
|
37543
|
-
},
|
|
37544
39696
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
37545
39697
|
capName: "detection-pipeline",
|
|
37546
39698
|
capScope: "device",
|
|
@@ -38807,6 +40959,90 @@ Object.freeze({
|
|
|
38807
40959
|
addonId: null,
|
|
38808
40960
|
access: "create"
|
|
38809
40961
|
},
|
|
40962
|
+
"keychain.delete": {
|
|
40963
|
+
capName: "keychain",
|
|
40964
|
+
capScope: "system",
|
|
40965
|
+
addonId: null,
|
|
40966
|
+
access: "delete"
|
|
40967
|
+
},
|
|
40968
|
+
"keychain.getState": {
|
|
40969
|
+
capName: "keychain",
|
|
40970
|
+
capScope: "system",
|
|
40971
|
+
addonId: null,
|
|
40972
|
+
access: "view"
|
|
40973
|
+
},
|
|
40974
|
+
"keychain.listMeta": {
|
|
40975
|
+
capName: "keychain",
|
|
40976
|
+
capScope: "system",
|
|
40977
|
+
addonId: null,
|
|
40978
|
+
access: "view"
|
|
40979
|
+
},
|
|
40980
|
+
"keychain.put": {
|
|
40981
|
+
capName: "keychain",
|
|
40982
|
+
capScope: "system",
|
|
40983
|
+
addonId: null,
|
|
40984
|
+
access: "create"
|
|
40985
|
+
},
|
|
40986
|
+
"keychain.resolve": {
|
|
40987
|
+
capName: "keychain",
|
|
40988
|
+
capScope: "system",
|
|
40989
|
+
addonId: null,
|
|
40990
|
+
access: "view"
|
|
40991
|
+
},
|
|
40992
|
+
"keychainAdmin.deleteOrphans": {
|
|
40993
|
+
capName: "keychain-admin",
|
|
40994
|
+
capScope: "system",
|
|
40995
|
+
addonId: null,
|
|
40996
|
+
access: "delete"
|
|
40997
|
+
},
|
|
40998
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
40999
|
+
capName: "keychain-admin",
|
|
41000
|
+
capScope: "system",
|
|
41001
|
+
addonId: null,
|
|
41002
|
+
access: "create"
|
|
41003
|
+
},
|
|
41004
|
+
"keychainAdmin.listAudit": {
|
|
41005
|
+
capName: "keychain-admin",
|
|
41006
|
+
capScope: "system",
|
|
41007
|
+
addonId: null,
|
|
41008
|
+
access: "view"
|
|
41009
|
+
},
|
|
41010
|
+
"keychainAdmin.listSecrets": {
|
|
41011
|
+
capName: "keychain-admin",
|
|
41012
|
+
capScope: "system",
|
|
41013
|
+
addonId: null,
|
|
41014
|
+
access: "view"
|
|
41015
|
+
},
|
|
41016
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
41017
|
+
capName: "keychain-admin",
|
|
41018
|
+
capScope: "system",
|
|
41019
|
+
addonId: null,
|
|
41020
|
+
access: "delete"
|
|
41021
|
+
},
|
|
41022
|
+
"keychainAdmin.resetKeychain": {
|
|
41023
|
+
capName: "keychain-admin",
|
|
41024
|
+
capScope: "system",
|
|
41025
|
+
addonId: null,
|
|
41026
|
+
access: "delete"
|
|
41027
|
+
},
|
|
41028
|
+
"keychainAdmin.reveal": {
|
|
41029
|
+
capName: "keychain-admin",
|
|
41030
|
+
capScope: "system",
|
|
41031
|
+
addonId: null,
|
|
41032
|
+
access: "create"
|
|
41033
|
+
},
|
|
41034
|
+
"keychainAdmin.rotateMasterKey": {
|
|
41035
|
+
capName: "keychain-admin",
|
|
41036
|
+
capScope: "system",
|
|
41037
|
+
addonId: null,
|
|
41038
|
+
access: "create"
|
|
41039
|
+
},
|
|
41040
|
+
"keychainAdmin.status": {
|
|
41041
|
+
capName: "keychain-admin",
|
|
41042
|
+
capScope: "system",
|
|
41043
|
+
addonId: null,
|
|
41044
|
+
access: "view"
|
|
41045
|
+
},
|
|
38810
41046
|
"lawnMowerControl.dock": {
|
|
38811
41047
|
capName: "lawn-mower-control",
|
|
38812
41048
|
capScope: "device",
|
|
@@ -39029,12 +41265,24 @@ Object.freeze({
|
|
|
39029
41265
|
addonId: null,
|
|
39030
41266
|
access: "view"
|
|
39031
41267
|
},
|
|
41268
|
+
"localNetwork.addCustomAddress": {
|
|
41269
|
+
capName: "local-network",
|
|
41270
|
+
capScope: "system",
|
|
41271
|
+
addonId: null,
|
|
41272
|
+
access: "create"
|
|
41273
|
+
},
|
|
39032
41274
|
"localNetwork.downloadCa": {
|
|
39033
41275
|
capName: "local-network",
|
|
39034
41276
|
capScope: "system",
|
|
39035
41277
|
addonId: null,
|
|
39036
41278
|
access: "view"
|
|
39037
41279
|
},
|
|
41280
|
+
"localNetwork.getAddresses": {
|
|
41281
|
+
capName: "local-network",
|
|
41282
|
+
capScope: "system",
|
|
41283
|
+
addonId: null,
|
|
41284
|
+
access: "view"
|
|
41285
|
+
},
|
|
39038
41286
|
"localNetwork.getAllowedAddresses": {
|
|
39039
41287
|
capName: "local-network",
|
|
39040
41288
|
capScope: "system",
|
|
@@ -39047,6 +41295,12 @@ Object.freeze({
|
|
|
39047
41295
|
addonId: null,
|
|
39048
41296
|
access: "view"
|
|
39049
41297
|
},
|
|
41298
|
+
"localNetwork.getHubAddresses": {
|
|
41299
|
+
capName: "local-network",
|
|
41300
|
+
capScope: "system",
|
|
41301
|
+
addonId: null,
|
|
41302
|
+
access: "view"
|
|
41303
|
+
},
|
|
39050
41304
|
"localNetwork.getNotificationEndpoint": {
|
|
39051
41305
|
capName: "local-network",
|
|
39052
41306
|
capScope: "system",
|
|
@@ -39083,6 +41337,12 @@ Object.freeze({
|
|
|
39083
41337
|
addonId: null,
|
|
39084
41338
|
access: "create"
|
|
39085
41339
|
},
|
|
41340
|
+
"localNetwork.removeCustomAddress": {
|
|
41341
|
+
capName: "local-network",
|
|
41342
|
+
capScope: "system",
|
|
41343
|
+
addonId: null,
|
|
41344
|
+
access: "delete"
|
|
41345
|
+
},
|
|
39086
41346
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
39087
41347
|
capName: "local-network",
|
|
39088
41348
|
capScope: "system",
|
|
@@ -39095,6 +41355,12 @@ Object.freeze({
|
|
|
39095
41355
|
addonId: null,
|
|
39096
41356
|
access: "create"
|
|
39097
41357
|
},
|
|
41358
|
+
"localNetwork.setAddressRole": {
|
|
41359
|
+
capName: "local-network",
|
|
41360
|
+
capScope: "system",
|
|
41361
|
+
addonId: null,
|
|
41362
|
+
access: "create"
|
|
41363
|
+
},
|
|
39098
41364
|
"localNetwork.setAllowedAddresses": {
|
|
39099
41365
|
capName: "local-network",
|
|
39100
41366
|
capScope: "system",
|
|
@@ -40151,6 +42417,18 @@ Object.freeze({
|
|
|
40151
42417
|
addonId: null,
|
|
40152
42418
|
access: "create"
|
|
40153
42419
|
},
|
|
42420
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
42421
|
+
capName: "pipeline-analytics",
|
|
42422
|
+
capScope: "device",
|
|
42423
|
+
addonId: null,
|
|
42424
|
+
access: "create"
|
|
42425
|
+
},
|
|
42426
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
42427
|
+
capName: "pipeline-analytics",
|
|
42428
|
+
capScope: "device",
|
|
42429
|
+
addonId: null,
|
|
42430
|
+
access: "create"
|
|
42431
|
+
},
|
|
40154
42432
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
40155
42433
|
capName: "pipeline-analytics",
|
|
40156
42434
|
capScope: "device",
|
|
@@ -40199,12 +42477,24 @@ Object.freeze({
|
|
|
40199
42477
|
addonId: null,
|
|
40200
42478
|
access: "view"
|
|
40201
42479
|
},
|
|
42480
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
42481
|
+
capName: "pipeline-analytics",
|
|
42482
|
+
capScope: "device",
|
|
42483
|
+
addonId: null,
|
|
42484
|
+
access: "create"
|
|
42485
|
+
},
|
|
40202
42486
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
40203
42487
|
capName: "pipeline-analytics",
|
|
40204
42488
|
capScope: "device",
|
|
40205
42489
|
addonId: null,
|
|
40206
42490
|
access: "delete"
|
|
40207
42491
|
},
|
|
42492
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
42493
|
+
capName: "pipeline-analytics",
|
|
42494
|
+
capScope: "device",
|
|
42495
|
+
addonId: null,
|
|
42496
|
+
access: "delete"
|
|
42497
|
+
},
|
|
40208
42498
|
"pipelineAnalytics.deleteTracks": {
|
|
40209
42499
|
capName: "pipeline-analytics",
|
|
40210
42500
|
capScope: "device",
|
|
@@ -40409,6 +42699,24 @@ Object.freeze({
|
|
|
40409
42699
|
addonId: null,
|
|
40410
42700
|
access: "view"
|
|
40411
42701
|
},
|
|
42702
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
42703
|
+
capName: "pipeline-analytics",
|
|
42704
|
+
capScope: "device",
|
|
42705
|
+
addonId: null,
|
|
42706
|
+
access: "view"
|
|
42707
|
+
},
|
|
42708
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
42709
|
+
capName: "pipeline-analytics",
|
|
42710
|
+
capScope: "device",
|
|
42711
|
+
addonId: null,
|
|
42712
|
+
access: "view"
|
|
42713
|
+
},
|
|
42714
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
42715
|
+
capName: "pipeline-analytics",
|
|
42716
|
+
capScope: "device",
|
|
42717
|
+
addonId: null,
|
|
42718
|
+
access: "view"
|
|
42719
|
+
},
|
|
40412
42720
|
"pipelineAnalytics.listRetrainFrames": {
|
|
40413
42721
|
capName: "pipeline-analytics",
|
|
40414
42722
|
capScope: "device",
|
|
@@ -40457,6 +42765,12 @@ Object.freeze({
|
|
|
40457
42765
|
addonId: null,
|
|
40458
42766
|
access: "create"
|
|
40459
42767
|
},
|
|
42768
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
42769
|
+
capName: "pipeline-analytics",
|
|
42770
|
+
capScope: "device",
|
|
42771
|
+
addonId: null,
|
|
42772
|
+
access: "create"
|
|
42773
|
+
},
|
|
40460
42774
|
"pipelineAnalytics.pruneEvents": {
|
|
40461
42775
|
capName: "pipeline-analytics",
|
|
40462
42776
|
capScope: "device",
|
|
@@ -40511,6 +42825,18 @@ Object.freeze({
|
|
|
40511
42825
|
addonId: null,
|
|
40512
42826
|
access: "create"
|
|
40513
42827
|
},
|
|
42828
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
42829
|
+
capName: "pipeline-analytics",
|
|
42830
|
+
capScope: "device",
|
|
42831
|
+
addonId: null,
|
|
42832
|
+
access: "delete"
|
|
42833
|
+
},
|
|
42834
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
42835
|
+
capName: "pipeline-analytics",
|
|
42836
|
+
capScope: "device",
|
|
42837
|
+
addonId: null,
|
|
42838
|
+
access: "create"
|
|
42839
|
+
},
|
|
40514
42840
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
40515
42841
|
capName: "pipeline-analytics",
|
|
40516
42842
|
capScope: "device",
|
|
@@ -40541,6 +42867,12 @@ Object.freeze({
|
|
|
40541
42867
|
addonId: null,
|
|
40542
42868
|
access: "create"
|
|
40543
42869
|
},
|
|
42870
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
42871
|
+
capName: "pipeline-analytics",
|
|
42872
|
+
capScope: "device",
|
|
42873
|
+
addonId: null,
|
|
42874
|
+
access: "create"
|
|
42875
|
+
},
|
|
40544
42876
|
"pipelineAnalytics.setTrackFlags": {
|
|
40545
42877
|
capName: "pipeline-analytics",
|
|
40546
42878
|
capScope: "device",
|
|
@@ -40577,6 +42909,12 @@ Object.freeze({
|
|
|
40577
42909
|
addonId: null,
|
|
40578
42910
|
access: "delete"
|
|
40579
42911
|
},
|
|
42912
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
42913
|
+
capName: "pipeline-analytics",
|
|
42914
|
+
capScope: "device",
|
|
42915
|
+
addonId: null,
|
|
42916
|
+
access: "create"
|
|
42917
|
+
},
|
|
40580
42918
|
"pipelineExecutor.cacheFrameInPool": {
|
|
40581
42919
|
capName: "pipeline-executor",
|
|
40582
42920
|
capScope: "system",
|
|
@@ -40589,13 +42927,13 @@ Object.freeze({
|
|
|
40589
42927
|
addonId: null,
|
|
40590
42928
|
access: "delete"
|
|
40591
42929
|
},
|
|
40592
|
-
"pipelineExecutor.
|
|
42930
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
40593
42931
|
capName: "pipeline-executor",
|
|
40594
42932
|
capScope: "system",
|
|
40595
42933
|
addonId: null,
|
|
40596
42934
|
access: "delete"
|
|
40597
42935
|
},
|
|
40598
|
-
"pipelineExecutor.
|
|
42936
|
+
"pipelineExecutor.deleteModel": {
|
|
40599
42937
|
capName: "pipeline-executor",
|
|
40600
42938
|
capScope: "system",
|
|
40601
42939
|
addonId: null,
|
|
@@ -40739,12 +43077,6 @@ Object.freeze({
|
|
|
40739
43077
|
addonId: null,
|
|
40740
43078
|
access: "view"
|
|
40741
43079
|
},
|
|
40742
|
-
"pipelineExecutor.listTemplates": {
|
|
40743
|
-
capName: "pipeline-executor",
|
|
40744
|
-
capScope: "system",
|
|
40745
|
-
addonId: null,
|
|
40746
|
-
access: "view"
|
|
40747
|
-
},
|
|
40748
43080
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
40749
43081
|
capName: "pipeline-executor",
|
|
40750
43082
|
capScope: "system",
|
|
@@ -40769,12 +43101,6 @@ Object.freeze({
|
|
|
40769
43101
|
addonId: null,
|
|
40770
43102
|
access: "create"
|
|
40771
43103
|
},
|
|
40772
|
-
"pipelineExecutor.saveTemplate": {
|
|
40773
|
-
capName: "pipeline-executor",
|
|
40774
|
-
capScope: "system",
|
|
40775
|
-
addonId: null,
|
|
40776
|
-
access: "create"
|
|
40777
|
-
},
|
|
40778
43104
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
40779
43105
|
capName: "pipeline-executor",
|
|
40780
43106
|
capScope: "system",
|
|
@@ -40793,17 +43119,23 @@ Object.freeze({
|
|
|
40793
43119
|
addonId: null,
|
|
40794
43120
|
access: "create"
|
|
40795
43121
|
},
|
|
40796
|
-
"pipelineExecutor.
|
|
43122
|
+
"pipelineExecutor.validatePipeline": {
|
|
40797
43123
|
capName: "pipeline-executor",
|
|
40798
43124
|
capScope: "system",
|
|
40799
43125
|
addonId: null,
|
|
43126
|
+
access: "view"
|
|
43127
|
+
},
|
|
43128
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
43129
|
+
capName: "pipeline-orchestrator",
|
|
43130
|
+
capScope: "system",
|
|
43131
|
+
addonId: null,
|
|
40800
43132
|
access: "create"
|
|
40801
43133
|
},
|
|
40802
|
-
"
|
|
40803
|
-
capName: "pipeline-
|
|
43134
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
43135
|
+
capName: "pipeline-orchestrator",
|
|
40804
43136
|
capScope: "system",
|
|
40805
43137
|
addonId: null,
|
|
40806
|
-
access: "
|
|
43138
|
+
access: "create"
|
|
40807
43139
|
},
|
|
40808
43140
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
40809
43141
|
capName: "pipeline-orchestrator",
|
|
@@ -40823,7 +43155,7 @@ Object.freeze({
|
|
|
40823
43155
|
addonId: null,
|
|
40824
43156
|
access: "create"
|
|
40825
43157
|
},
|
|
40826
|
-
"pipelineOrchestrator.
|
|
43158
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
40827
43159
|
capName: "pipeline-orchestrator",
|
|
40828
43160
|
capScope: "system",
|
|
40829
43161
|
addonId: null,
|
|
@@ -40919,6 +43251,12 @@ Object.freeze({
|
|
|
40919
43251
|
addonId: null,
|
|
40920
43252
|
access: "view"
|
|
40921
43253
|
},
|
|
43254
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
43255
|
+
capName: "pipeline-orchestrator",
|
|
43256
|
+
capScope: "system",
|
|
43257
|
+
addonId: null,
|
|
43258
|
+
access: "view"
|
|
43259
|
+
},
|
|
40922
43260
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
40923
43261
|
capName: "pipeline-orchestrator",
|
|
40924
43262
|
capScope: "system",
|
|
@@ -40931,6 +43269,24 @@ Object.freeze({
|
|
|
40931
43269
|
addonId: null,
|
|
40932
43270
|
access: "view"
|
|
40933
43271
|
},
|
|
43272
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
43273
|
+
capName: "pipeline-orchestrator",
|
|
43274
|
+
capScope: "system",
|
|
43275
|
+
addonId: null,
|
|
43276
|
+
access: "view"
|
|
43277
|
+
},
|
|
43278
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
43279
|
+
capName: "pipeline-orchestrator",
|
|
43280
|
+
capScope: "system",
|
|
43281
|
+
addonId: null,
|
|
43282
|
+
access: "view"
|
|
43283
|
+
},
|
|
43284
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
43285
|
+
capName: "pipeline-orchestrator",
|
|
43286
|
+
capScope: "system",
|
|
43287
|
+
addonId: null,
|
|
43288
|
+
access: "view"
|
|
43289
|
+
},
|
|
40934
43290
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
40935
43291
|
capName: "pipeline-orchestrator",
|
|
40936
43292
|
capScope: "system",
|
|
@@ -40955,6 +43311,12 @@ Object.freeze({
|
|
|
40955
43311
|
addonId: null,
|
|
40956
43312
|
access: "view"
|
|
40957
43313
|
},
|
|
43314
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
43315
|
+
capName: "pipeline-orchestrator",
|
|
43316
|
+
capScope: "system",
|
|
43317
|
+
addonId: null,
|
|
43318
|
+
access: "view"
|
|
43319
|
+
},
|
|
40958
43320
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
40959
43321
|
capName: "pipeline-orchestrator",
|
|
40960
43322
|
capScope: "system",
|
|
@@ -40967,7 +43329,7 @@ Object.freeze({
|
|
|
40967
43329
|
addonId: null,
|
|
40968
43330
|
access: "view"
|
|
40969
43331
|
},
|
|
40970
|
-
"pipelineOrchestrator.
|
|
43332
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
40971
43333
|
capName: "pipeline-orchestrator",
|
|
40972
43334
|
capScope: "system",
|
|
40973
43335
|
addonId: null,
|
|
@@ -40979,6 +43341,12 @@ Object.freeze({
|
|
|
40979
43341
|
addonId: null,
|
|
40980
43342
|
access: "create"
|
|
40981
43343
|
},
|
|
43344
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
43345
|
+
capName: "pipeline-orchestrator",
|
|
43346
|
+
capScope: "system",
|
|
43347
|
+
addonId: null,
|
|
43348
|
+
access: "view"
|
|
43349
|
+
},
|
|
40982
43350
|
"pipelineOrchestrator.rebalance": {
|
|
40983
43351
|
capName: "pipeline-orchestrator",
|
|
40984
43352
|
capScope: "system",
|
|
@@ -41021,12 +43389,6 @@ Object.freeze({
|
|
|
41021
43389
|
addonId: null,
|
|
41022
43390
|
access: "create"
|
|
41023
43391
|
},
|
|
41024
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
41025
|
-
capName: "pipeline-orchestrator",
|
|
41026
|
-
capScope: "system",
|
|
41027
|
-
addonId: null,
|
|
41028
|
-
access: "create"
|
|
41029
|
-
},
|
|
41030
43392
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
41031
43393
|
capName: "pipeline-orchestrator",
|
|
41032
43394
|
capScope: "system",
|
|
@@ -41039,12 +43401,6 @@ Object.freeze({
|
|
|
41039
43401
|
addonId: null,
|
|
41040
43402
|
access: "create"
|
|
41041
43403
|
},
|
|
41042
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
41043
|
-
capName: "pipeline-orchestrator",
|
|
41044
|
-
capScope: "system",
|
|
41045
|
-
addonId: null,
|
|
41046
|
-
access: "create"
|
|
41047
|
-
},
|
|
41048
43404
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
41049
43405
|
capName: "pipeline-orchestrator",
|
|
41050
43406
|
capScope: "system",
|
|
@@ -41081,6 +43437,12 @@ Object.freeze({
|
|
|
41081
43437
|
addonId: null,
|
|
41082
43438
|
access: "create"
|
|
41083
43439
|
},
|
|
43440
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
43441
|
+
capName: "pipeline-orchestrator",
|
|
43442
|
+
capScope: "system",
|
|
43443
|
+
addonId: null,
|
|
43444
|
+
access: "create"
|
|
43445
|
+
},
|
|
41084
43446
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
41085
43447
|
capName: "pipeline-orchestrator",
|
|
41086
43448
|
capScope: "system",
|
|
@@ -41099,12 +43461,36 @@ Object.freeze({
|
|
|
41099
43461
|
addonId: null,
|
|
41100
43462
|
access: "create"
|
|
41101
43463
|
},
|
|
43464
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
43465
|
+
capName: "pipeline-orchestrator",
|
|
43466
|
+
capScope: "system",
|
|
43467
|
+
addonId: null,
|
|
43468
|
+
access: "create"
|
|
43469
|
+
},
|
|
41102
43470
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
41103
43471
|
capName: "pipeline-orchestrator",
|
|
41104
43472
|
capScope: "system",
|
|
41105
43473
|
addonId: null,
|
|
41106
43474
|
access: "create"
|
|
41107
43475
|
},
|
|
43476
|
+
"pipelineOrchestrator.setShareSource": {
|
|
43477
|
+
capName: "pipeline-orchestrator",
|
|
43478
|
+
capScope: "system",
|
|
43479
|
+
addonId: null,
|
|
43480
|
+
access: "create"
|
|
43481
|
+
},
|
|
43482
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
43483
|
+
capName: "pipeline-orchestrator",
|
|
43484
|
+
capScope: "system",
|
|
43485
|
+
addonId: null,
|
|
43486
|
+
access: "create"
|
|
43487
|
+
},
|
|
43488
|
+
"pipelineOrchestrator.suggestShares": {
|
|
43489
|
+
capName: "pipeline-orchestrator",
|
|
43490
|
+
capScope: "system",
|
|
43491
|
+
addonId: null,
|
|
43492
|
+
access: "view"
|
|
43493
|
+
},
|
|
41108
43494
|
"pipelineOrchestrator.unassignAudio": {
|
|
41109
43495
|
capName: "pipeline-orchestrator",
|
|
41110
43496
|
capScope: "system",
|
|
@@ -41117,8 +43503,8 @@ Object.freeze({
|
|
|
41117
43503
|
addonId: null,
|
|
41118
43504
|
access: "create"
|
|
41119
43505
|
},
|
|
41120
|
-
"
|
|
41121
|
-
capName: "pipeline-
|
|
43506
|
+
"pipelineRunner.abortNodeBench": {
|
|
43507
|
+
capName: "pipeline-runner",
|
|
41122
43508
|
capScope: "system",
|
|
41123
43509
|
addonId: null,
|
|
41124
43510
|
access: "create"
|
|
@@ -41171,6 +43557,12 @@ Object.freeze({
|
|
|
41171
43557
|
addonId: null,
|
|
41172
43558
|
access: "view"
|
|
41173
43559
|
},
|
|
43560
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
43561
|
+
capName: "pipeline-runner",
|
|
43562
|
+
capScope: "system",
|
|
43563
|
+
addonId: null,
|
|
43564
|
+
access: "view"
|
|
43565
|
+
},
|
|
41174
43566
|
"pipelineRunner.getParkedTrackFrame": {
|
|
41175
43567
|
capName: "pipeline-runner",
|
|
41176
43568
|
capScope: "system",
|
|
@@ -41213,6 +43605,12 @@ Object.freeze({
|
|
|
41213
43605
|
addonId: null,
|
|
41214
43606
|
access: "create"
|
|
41215
43607
|
},
|
|
43608
|
+
"pipelineRunner.startNodeBench": {
|
|
43609
|
+
capName: "pipeline-runner",
|
|
43610
|
+
capScope: "system",
|
|
43611
|
+
addonId: null,
|
|
43612
|
+
access: "create"
|
|
43613
|
+
},
|
|
41216
43614
|
"plateGallery.assignPlate": {
|
|
41217
43615
|
capName: "plate-gallery",
|
|
41218
43616
|
capScope: "system",
|
|
@@ -42557,12 +44955,6 @@ Object.freeze({
|
|
|
42557
44955
|
addonId: null,
|
|
42558
44956
|
access: "view"
|
|
42559
44957
|
},
|
|
42560
|
-
"streamBroker.pullFrameHandles": {
|
|
42561
|
-
capName: "stream-broker",
|
|
42562
|
-
capScope: "system",
|
|
42563
|
-
addonId: null,
|
|
42564
|
-
access: "view"
|
|
42565
|
-
},
|
|
42566
44958
|
"streamBroker.regenerateRtspToken": {
|
|
42567
44959
|
capName: "stream-broker",
|
|
42568
44960
|
capScope: "system",
|
|
@@ -42629,12 +45021,6 @@ Object.freeze({
|
|
|
42629
45021
|
addonId: null,
|
|
42630
45022
|
access: "create"
|
|
42631
45023
|
},
|
|
42632
|
-
"streamBroker.subscribeFrames": {
|
|
42633
|
-
capName: "stream-broker",
|
|
42634
|
-
capScope: "system",
|
|
42635
|
-
addonId: null,
|
|
42636
|
-
access: "create"
|
|
42637
|
-
},
|
|
42638
45024
|
"streamBroker.unassignProfile": {
|
|
42639
45025
|
capName: "stream-broker",
|
|
42640
45026
|
capScope: "system",
|
|
@@ -42647,12 +45033,6 @@ Object.freeze({
|
|
|
42647
45033
|
addonId: null,
|
|
42648
45034
|
access: "create"
|
|
42649
45035
|
},
|
|
42650
|
-
"streamBroker.unsubscribeFrames": {
|
|
42651
|
-
capName: "stream-broker",
|
|
42652
|
-
capScope: "system",
|
|
42653
|
-
addonId: null,
|
|
42654
|
-
access: "create"
|
|
42655
|
-
},
|
|
42656
45036
|
"streamCatalog.getCatalog": {
|
|
42657
45037
|
capName: "stream-catalog",
|
|
42658
45038
|
capScope: "device",
|
|
@@ -42947,18 +45327,36 @@ Object.freeze({
|
|
|
42947
45327
|
addonId: null,
|
|
42948
45328
|
access: "delete"
|
|
42949
45329
|
},
|
|
45330
|
+
"userManagement.findUserByExternalIdentity": {
|
|
45331
|
+
capName: "user-management",
|
|
45332
|
+
capScope: "system",
|
|
45333
|
+
addonId: null,
|
|
45334
|
+
access: "view"
|
|
45335
|
+
},
|
|
42950
45336
|
"userManagement.getTotpStatus": {
|
|
42951
45337
|
capName: "user-management",
|
|
42952
45338
|
capScope: "system",
|
|
42953
45339
|
addonId: null,
|
|
42954
45340
|
access: "view"
|
|
42955
45341
|
},
|
|
45342
|
+
"userManagement.linkExternalIdentity": {
|
|
45343
|
+
capName: "user-management",
|
|
45344
|
+
capScope: "system",
|
|
45345
|
+
addonId: null,
|
|
45346
|
+
access: "create"
|
|
45347
|
+
},
|
|
42956
45348
|
"userManagement.listApiKeys": {
|
|
42957
45349
|
capName: "user-management",
|
|
42958
45350
|
capScope: "system",
|
|
42959
45351
|
addonId: null,
|
|
42960
45352
|
access: "view"
|
|
42961
45353
|
},
|
|
45354
|
+
"userManagement.listExternalIdentities": {
|
|
45355
|
+
capName: "user-management",
|
|
45356
|
+
capScope: "system",
|
|
45357
|
+
addonId: null,
|
|
45358
|
+
access: "view"
|
|
45359
|
+
},
|
|
42962
45360
|
"userManagement.listOauthSessions": {
|
|
42963
45361
|
capName: "user-management",
|
|
42964
45362
|
capScope: "system",
|
|
@@ -43037,6 +45435,12 @@ Object.freeze({
|
|
|
43037
45435
|
addonId: null,
|
|
43038
45436
|
access: "create"
|
|
43039
45437
|
},
|
|
45438
|
+
"userManagement.unlinkExternalIdentity": {
|
|
45439
|
+
capName: "user-management",
|
|
45440
|
+
capScope: "system",
|
|
45441
|
+
addonId: null,
|
|
45442
|
+
access: "delete"
|
|
45443
|
+
},
|
|
43040
45444
|
"userManagement.updateUser": {
|
|
43041
45445
|
capName: "user-management",
|
|
43042
45446
|
capScope: "system",
|
|
@@ -43349,6 +45753,12 @@ Object.freeze({
|
|
|
43349
45753
|
addonId: null,
|
|
43350
45754
|
access: "create"
|
|
43351
45755
|
},
|
|
45756
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
45757
|
+
capName: "webrtc-session",
|
|
45758
|
+
capScope: "device",
|
|
45759
|
+
addonId: null,
|
|
45760
|
+
access: "create"
|
|
45761
|
+
},
|
|
43352
45762
|
"webrtcSession.closeSession": {
|
|
43353
45763
|
capName: "webrtc-session",
|
|
43354
45764
|
capScope: "device",
|
|
@@ -45160,11 +47570,6 @@ Object.freeze({
|
|
|
45160
47570
|
form: "single",
|
|
45161
47571
|
optional: false
|
|
45162
47572
|
}],
|
|
45163
|
-
"decoder.createSession": [{
|
|
45164
|
-
name: "deviceId",
|
|
45165
|
-
form: "single",
|
|
45166
|
-
optional: true
|
|
45167
|
-
}],
|
|
45168
47573
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
45169
47574
|
name: "deviceId",
|
|
45170
47575
|
form: "single",
|
|
@@ -46135,6 +48540,11 @@ Object.freeze({
|
|
|
46135
48540
|
form: "single",
|
|
46136
48541
|
optional: false
|
|
46137
48542
|
}],
|
|
48543
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
48544
|
+
name: "deviceId",
|
|
48545
|
+
form: "single",
|
|
48546
|
+
optional: false
|
|
48547
|
+
}],
|
|
46138
48548
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
46139
48549
|
name: "deviceId",
|
|
46140
48550
|
form: "single",
|
|
@@ -46325,6 +48735,11 @@ Object.freeze({
|
|
|
46325
48735
|
form: "single",
|
|
46326
48736
|
optional: false
|
|
46327
48737
|
}],
|
|
48738
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
48739
|
+
name: "deviceId",
|
|
48740
|
+
form: "single",
|
|
48741
|
+
optional: false
|
|
48742
|
+
}],
|
|
46328
48743
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
46329
48744
|
name: "deviceId",
|
|
46330
48745
|
form: "single",
|
|
@@ -46375,6 +48790,11 @@ Object.freeze({
|
|
|
46375
48790
|
form: "single",
|
|
46376
48791
|
optional: false
|
|
46377
48792
|
}],
|
|
48793
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
48794
|
+
name: "deviceId",
|
|
48795
|
+
form: "single",
|
|
48796
|
+
optional: false
|
|
48797
|
+
}],
|
|
46378
48798
|
"pipelineAnalytics.setTrackFlags": [{
|
|
46379
48799
|
name: "deviceId",
|
|
46380
48800
|
form: "single",
|
|
@@ -46395,6 +48815,11 @@ Object.freeze({
|
|
|
46395
48815
|
form: "single",
|
|
46396
48816
|
optional: false
|
|
46397
48817
|
}],
|
|
48818
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
48819
|
+
name: "deviceIds",
|
|
48820
|
+
form: "array",
|
|
48821
|
+
optional: true
|
|
48822
|
+
}],
|
|
46398
48823
|
"pipelineExecutor.runPipeline": [{
|
|
46399
48824
|
name: "deviceId",
|
|
46400
48825
|
form: "single",
|
|
@@ -46500,6 +48925,11 @@ Object.freeze({
|
|
|
46500
48925
|
form: "single",
|
|
46501
48926
|
optional: false
|
|
46502
48927
|
}],
|
|
48928
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
48929
|
+
name: "deviceId",
|
|
48930
|
+
form: "single",
|
|
48931
|
+
optional: false
|
|
48932
|
+
}],
|
|
46503
48933
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
46504
48934
|
name: "deviceId",
|
|
46505
48935
|
form: "single",
|
|
@@ -47271,6 +49701,11 @@ Object.freeze({
|
|
|
47271
49701
|
form: "single",
|
|
47272
49702
|
optional: false
|
|
47273
49703
|
}],
|
|
49704
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
49705
|
+
name: "deviceId",
|
|
49706
|
+
form: "single",
|
|
49707
|
+
optional: false
|
|
49708
|
+
}],
|
|
47274
49709
|
"webrtcSession.closeSession": [{
|
|
47275
49710
|
name: "deviceId",
|
|
47276
49711
|
form: "single",
|
|
@@ -47500,6 +49935,8 @@ new Map(Object.entries({
|
|
|
47500
49935
|
"detection-blind": "device-events",
|
|
47501
49936
|
"node-online": "system",
|
|
47502
49937
|
"node-offline": "system",
|
|
49938
|
+
"node-restarting": "system",
|
|
49939
|
+
"node-updating": "system",
|
|
47503
49940
|
"node-inference-unavailable": "system",
|
|
47504
49941
|
"addon-crash-loop": "system",
|
|
47505
49942
|
"addon-update-available": "system",
|
|
@@ -47577,18 +50014,21 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
47577
50014
|
kinds: [
|
|
47578
50015
|
"node-offline",
|
|
47579
50016
|
"node-online",
|
|
50017
|
+
"node-restarting",
|
|
47580
50018
|
"node-inference-unavailable"
|
|
47581
50019
|
]
|
|
47582
50020
|
},
|
|
47583
50021
|
{
|
|
47584
50022
|
id: "addons",
|
|
47585
50023
|
family: "system",
|
|
47586
|
-
label: "Addons",
|
|
47587
|
-
kinds: [
|
|
47588
|
-
|
|
47589
|
-
|
|
47590
|
-
|
|
47591
|
-
|
|
50024
|
+
label: "Addons stopped",
|
|
50025
|
+
kinds: ["addon-crash-loop"]
|
|
50026
|
+
},
|
|
50027
|
+
{
|
|
50028
|
+
id: "addon-updates",
|
|
50029
|
+
family: "system",
|
|
50030
|
+
label: "Addon updates",
|
|
50031
|
+
kinds: ["addon-update-available", "addon-updated"]
|
|
47592
50032
|
},
|
|
47593
50033
|
{
|
|
47594
50034
|
id: "updates",
|
|
@@ -47596,6 +50036,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
47596
50036
|
label: "Server & container updates",
|
|
47597
50037
|
kinds: [
|
|
47598
50038
|
"server-update-available",
|
|
50039
|
+
"node-updating",
|
|
47599
50040
|
"server-updated",
|
|
47600
50041
|
"wrapper-update-available"
|
|
47601
50042
|
]
|
|
@@ -47743,18 +50184,21 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
47743
50184
|
kinds: [
|
|
47744
50185
|
"node-offline",
|
|
47745
50186
|
"node-online",
|
|
50187
|
+
"node-restarting",
|
|
47746
50188
|
"node-inference-unavailable"
|
|
47747
50189
|
]
|
|
47748
50190
|
},
|
|
47749
50191
|
{
|
|
47750
50192
|
name: "summaryAddons",
|
|
47751
|
-
label: "Summary: addons",
|
|
47752
|
-
example: "
|
|
47753
|
-
kinds: [
|
|
47754
|
-
|
|
47755
|
-
|
|
47756
|
-
|
|
47757
|
-
|
|
50193
|
+
label: "Summary: addons stopped",
|
|
50194
|
+
example: "hub — recorder stopped after repeated crashes",
|
|
50195
|
+
kinds: ["addon-crash-loop"]
|
|
50196
|
+
},
|
|
50197
|
+
{
|
|
50198
|
+
name: "summaryAddonUpdates",
|
|
50199
|
+
label: "Summary: addon updates",
|
|
50200
|
+
example: "hub:\n• @camstack/addon-recorder 1.2.3 → 1.2.4",
|
|
50201
|
+
kinds: ["addon-update-available", "addon-updated"]
|
|
47758
50202
|
},
|
|
47759
50203
|
{
|
|
47760
50204
|
name: "summaryUpdates",
|
|
@@ -47762,6 +50206,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
47762
50206
|
example: "server 1.2.377 → 1.2.378",
|
|
47763
50207
|
kinds: [
|
|
47764
50208
|
"server-update-available",
|
|
50209
|
+
"node-updating",
|
|
47765
50210
|
"server-updated",
|
|
47766
50211
|
"wrapper-update-available"
|
|
47767
50212
|
]
|
|
@@ -47794,7 +50239,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
47794
50239
|
{
|
|
47795
50240
|
name: "summarySection",
|
|
47796
50241
|
label: "Summary: this section",
|
|
47797
|
-
description: "The section a per-section summary row is about
|
|
50242
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
47798
50243
|
example: "Batterie scariche",
|
|
47799
50244
|
group: "system",
|
|
47800
50245
|
families: ["rule"],
|
|
@@ -47838,6 +50283,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
47838
50283
|
[...RULE_BODY_ONLY],
|
|
47839
50284
|
[...RULE_TEXT],
|
|
47840
50285
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
50286
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
47841
50287
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
47842
50288
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
47843
50289
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
@@ -47878,6 +50324,8 @@ var STATE_SUMMARY_VARS = [
|
|
|
47878
50324
|
[...RULE_TEXT],
|
|
47879
50325
|
[...RULE_TEXT],
|
|
47880
50326
|
[...RULE_TEXT],
|
|
50327
|
+
[...RULE_TEXT],
|
|
50328
|
+
[...RULE_TEXT],
|
|
47881
50329
|
...STATE_SUMMARY_VARS
|
|
47882
50330
|
];
|
|
47883
50331
|
new Set([
|
|
@@ -59422,7 +61870,7 @@ var DEFAULT_CONFIG = object({
|
|
|
59422
61870
|
* may still STARTTLS — nodemailer auto-detects. */
|
|
59423
61871
|
secure: boolean().default(false),
|
|
59424
61872
|
username: string().default(""),
|
|
59425
|
-
password: string().default(""),
|
|
61873
|
+
password: string().default("").meta({ secret: true }),
|
|
59426
61874
|
/** Default `From` address — used when the caller omits `from`. */
|
|
59427
61875
|
fromAddress: string().default(""),
|
|
59428
61876
|
/** Optional display name prefixing the `From` address. */
|