@camstack/addon-auth 1.2.130 → 1.2.132
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/{hub-browser-origin-B1o5vmQX.mjs → dist-DbaYwR-N.mjs} +2664 -525
- package/dist/{hub-browser-origin-C-u2l9VC.js → dist-DjCeMP9o.js} +2665 -526
- package/dist/hub-browser-origin-DohQUFPz.js +16 -0
- package/dist/hub-browser-origin-LBBO5r05.mjs +11 -0
- package/dist/magic-link/auth-magic-link.addon.js +132 -33
- package/dist/magic-link/auth-magic-link.addon.mjs +124 -25
- package/dist/oidc/auth-oidc.addon.js +213 -44
- package/dist/oidc/auth-oidc.addon.mjs +205 -36
- package/dist/webauthn/_stub.js +1 -1
- package/dist/webauthn/{_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-v7lvfZM3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Cy2WCjhX.mjs} +3 -3
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DBsbNmPW.mjs +26 -0
- package/dist/webauthn/auth-webauthn.addon.js +13 -12
- package/dist/webauthn/auth-webauthn.addon.mjs +2 -1
- package/dist/webauthn/{hostInit-DEFeGgRf.mjs → hostInit-3W0iPRJ_.mjs} +3 -3
- package/dist/webauthn/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bifweq9M.mjs +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("node:crypto");
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -78,6 +78,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
78
78
|
*/
|
|
79
79
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
80
80
|
/**
|
|
81
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
82
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
83
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
84
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
85
|
+
*/
|
|
86
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
87
|
+
/**
|
|
81
88
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
82
89
|
* transitions from `failed` back to `healthy` (typically via the
|
|
83
90
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -500,15 +507,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
500
507
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
501
508
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
502
509
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
503
|
-
/**
|
|
504
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
505
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
506
|
-
* `createSession`, so running sessions keep their current backend until
|
|
507
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
508
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
509
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
510
|
-
*/
|
|
511
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
512
510
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
513
511
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
514
512
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5379,7 +5377,7 @@ var ZodIssueCode = {
|
|
|
5379
5377
|
var ZodFirstPartyTypeKind;
|
|
5380
5378
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5381
5379
|
//#endregion
|
|
5382
|
-
//#region ../types/dist/sleep-
|
|
5380
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5383
5381
|
/**
|
|
5384
5382
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5385
5383
|
* window to float samples (D455).
|
|
@@ -5458,6 +5456,97 @@ function buildAlawTable() {
|
|
|
5458
5456
|
}
|
|
5459
5457
|
buildUlawTable();
|
|
5460
5458
|
buildAlawTable();
|
|
5459
|
+
/** Is this field's stored value a credential? */
|
|
5460
|
+
function isSecretConfigField(field) {
|
|
5461
|
+
if (field.type === "password") return true;
|
|
5462
|
+
return "secret" in field && field.secret === true;
|
|
5463
|
+
}
|
|
5464
|
+
/**
|
|
5465
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5466
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5467
|
+
*/
|
|
5468
|
+
function isKeychainStoredField(field) {
|
|
5469
|
+
if (!isSecretConfigField(field)) return false;
|
|
5470
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5471
|
+
return !("storage" in field && field.storage === "inline");
|
|
5472
|
+
}
|
|
5473
|
+
/**
|
|
5474
|
+
* What a settings blob holds where a secret used to be.
|
|
5475
|
+
*
|
|
5476
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5477
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5478
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5479
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5480
|
+
*
|
|
5481
|
+
* The same shapes travel to and from the admin UI:
|
|
5482
|
+
*
|
|
5483
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5484
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5485
|
+
* value is set, never the value.
|
|
5486
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5487
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5488
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5489
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5490
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5491
|
+
*
|
|
5492
|
+
* Pure and browser-safe.
|
|
5493
|
+
*/
|
|
5494
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5495
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5496
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5497
|
+
function isRecord$1(value) {
|
|
5498
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5499
|
+
}
|
|
5500
|
+
function makeSecretMarker(ref) {
|
|
5501
|
+
return {
|
|
5502
|
+
$secret: ref,
|
|
5503
|
+
v: 1
|
|
5504
|
+
};
|
|
5505
|
+
}
|
|
5506
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5507
|
+
function isSecretMarker(value) {
|
|
5508
|
+
if (!isRecord$1(value)) return false;
|
|
5509
|
+
const ref = value["$secret"];
|
|
5510
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5511
|
+
}
|
|
5512
|
+
function isSecretClear(value) {
|
|
5513
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5514
|
+
}
|
|
5515
|
+
/**
|
|
5516
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5517
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5518
|
+
* survives this function.
|
|
5519
|
+
*/
|
|
5520
|
+
function toSecretFieldView(stored) {
|
|
5521
|
+
if (isSecretMarker(stored)) return {
|
|
5522
|
+
$secret: stored.$secret,
|
|
5523
|
+
v: 1,
|
|
5524
|
+
set: true
|
|
5525
|
+
};
|
|
5526
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5527
|
+
$secret: null,
|
|
5528
|
+
v: 1,
|
|
5529
|
+
set: true,
|
|
5530
|
+
inline: true
|
|
5531
|
+
};
|
|
5532
|
+
return null;
|
|
5533
|
+
}
|
|
5534
|
+
/**
|
|
5535
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5536
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5537
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5538
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5539
|
+
*/
|
|
5540
|
+
function classifySecretWrite(incoming) {
|
|
5541
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5542
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5543
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5544
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5545
|
+
return {
|
|
5546
|
+
kind: "set",
|
|
5547
|
+
value: incoming
|
|
5548
|
+
};
|
|
5549
|
+
}
|
|
5461
5550
|
Object.fromEntries([
|
|
5462
5551
|
{
|
|
5463
5552
|
id: "overview",
|
|
@@ -5629,33 +5718,19 @@ Object.fromEntries([
|
|
|
5629
5718
|
function isValuelessField(field) {
|
|
5630
5719
|
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";
|
|
5631
5720
|
}
|
|
5632
|
-
|
|
5633
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5634
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5635
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5636
|
-
*
|
|
5637
|
-
* For each leaf field:
|
|
5638
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5639
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5640
|
-
*
|
|
5641
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5642
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5643
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5644
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5645
|
-
*/
|
|
5646
|
-
function hydrateSchema(schema, values) {
|
|
5721
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5647
5722
|
return {
|
|
5648
5723
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5649
5724
|
sections: schema.sections.map((section) => ({
|
|
5650
5725
|
...section,
|
|
5651
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5726
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5652
5727
|
}))
|
|
5653
5728
|
};
|
|
5654
5729
|
}
|
|
5655
|
-
function hydrateField(field, values) {
|
|
5730
|
+
function hydrateField(field, values, options) {
|
|
5656
5731
|
if (isValuelessField(field)) return field;
|
|
5657
5732
|
if (field.type === "group") {
|
|
5658
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5733
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5659
5734
|
return {
|
|
5660
5735
|
...field,
|
|
5661
5736
|
fields: hydratedChildren
|
|
@@ -5664,7 +5739,7 @@ function hydrateField(field, values) {
|
|
|
5664
5739
|
if (field.type === "sub-tabs") {
|
|
5665
5740
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5666
5741
|
...tab,
|
|
5667
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5742
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5668
5743
|
}));
|
|
5669
5744
|
return {
|
|
5670
5745
|
...field,
|
|
@@ -5674,6 +5749,33 @@ function hydrateField(field, values) {
|
|
|
5674
5749
|
const key = field.key;
|
|
5675
5750
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5676
5751
|
const defaultValue = field.default;
|
|
5752
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5753
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5754
|
+
...field,
|
|
5755
|
+
value: toSecretFieldView(storedValue)
|
|
5756
|
+
};
|
|
5757
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5758
|
+
...field,
|
|
5759
|
+
value: null
|
|
5760
|
+
};
|
|
5761
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5762
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5763
|
+
if (secretItemKeys.length > 0) {
|
|
5764
|
+
const rows = storedValue.map((row) => {
|
|
5765
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5766
|
+
const out = { ...row };
|
|
5767
|
+
for (const k of secretItemKeys) {
|
|
5768
|
+
const v = Reflect.get(row, k);
|
|
5769
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5770
|
+
}
|
|
5771
|
+
return out;
|
|
5772
|
+
});
|
|
5773
|
+
return {
|
|
5774
|
+
...field,
|
|
5775
|
+
value: rows
|
|
5776
|
+
};
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
5677
5779
|
if (field.multiple) {
|
|
5678
5780
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5679
5781
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5916,6 +6018,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5916
6018
|
}
|
|
5917
6019
|
return out;
|
|
5918
6020
|
}
|
|
6021
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6022
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6023
|
+
function globalSecretScope() {
|
|
6024
|
+
return GLOBAL_SCOPE;
|
|
6025
|
+
}
|
|
6026
|
+
function encodeSegment(value) {
|
|
6027
|
+
return encodeURIComponent(value);
|
|
6028
|
+
}
|
|
6029
|
+
/**
|
|
6030
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6031
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6032
|
+
* `providers[authentik].clientSecret`.
|
|
6033
|
+
*/
|
|
6034
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6035
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6036
|
+
}
|
|
6037
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6038
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6039
|
+
fieldPath;
|
|
6040
|
+
constructor(fieldPath, cause) {
|
|
6041
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6042
|
+
this.fieldPath = fieldPath;
|
|
6043
|
+
this.name = "KeychainWriteRefusedError";
|
|
6044
|
+
}
|
|
6045
|
+
};
|
|
6046
|
+
var KEEP = { kind: "keep" };
|
|
6047
|
+
function isRecord(value) {
|
|
6048
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6049
|
+
}
|
|
6050
|
+
function defaultMintId() {
|
|
6051
|
+
return globalThis.crypto.randomUUID();
|
|
6052
|
+
}
|
|
6053
|
+
/** Every marker ref anywhere under `value`. */
|
|
6054
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6055
|
+
if (isSecretMarker(value)) {
|
|
6056
|
+
out.push(value.$secret);
|
|
6057
|
+
return out;
|
|
6058
|
+
}
|
|
6059
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6060
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6061
|
+
return out;
|
|
6062
|
+
}
|
|
6063
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6064
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6065
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6066
|
+
}
|
|
6067
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6068
|
+
const intent = classifySecretWrite(incoming);
|
|
6069
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6070
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6071
|
+
if (intent.kind === "keep") return KEEP;
|
|
6072
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6073
|
+
if (intent.kind === "clear") {
|
|
6074
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6075
|
+
return {
|
|
6076
|
+
kind: "value",
|
|
6077
|
+
value: null
|
|
6078
|
+
};
|
|
6079
|
+
}
|
|
6080
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6081
|
+
kind: "value",
|
|
6082
|
+
value: stored
|
|
6083
|
+
};
|
|
6084
|
+
try {
|
|
6085
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6086
|
+
} catch (err) {
|
|
6087
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6088
|
+
}
|
|
6089
|
+
return {
|
|
6090
|
+
kind: "value",
|
|
6091
|
+
value: makeSecretMarker(ref)
|
|
6092
|
+
};
|
|
6093
|
+
}
|
|
6094
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6095
|
+
function applyMember(out, key, result, storedParent) {
|
|
6096
|
+
if (result.kind === "value") {
|
|
6097
|
+
out[key] = result.value;
|
|
6098
|
+
return;
|
|
6099
|
+
}
|
|
6100
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6101
|
+
else delete out[key];
|
|
6102
|
+
}
|
|
6103
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6104
|
+
const out = { ...incoming };
|
|
6105
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6106
|
+
return out;
|
|
6107
|
+
}
|
|
6108
|
+
function rowId(row, idKey) {
|
|
6109
|
+
const raw = row[idKey];
|
|
6110
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6111
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6112
|
+
return null;
|
|
6113
|
+
}
|
|
6114
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6115
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6116
|
+
if (!Array.isArray(incoming)) {
|
|
6117
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6118
|
+
return {
|
|
6119
|
+
kind: "value",
|
|
6120
|
+
value: incoming
|
|
6121
|
+
};
|
|
6122
|
+
}
|
|
6123
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6124
|
+
for (const row of storedRows) {
|
|
6125
|
+
const id = rowId(row, node.idKey);
|
|
6126
|
+
if (id !== null) storedById.set(id, row);
|
|
6127
|
+
}
|
|
6128
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6129
|
+
const rows = [];
|
|
6130
|
+
for (const row of incoming) {
|
|
6131
|
+
if (!isRecord(row)) {
|
|
6132
|
+
rows.push(row);
|
|
6133
|
+
continue;
|
|
6134
|
+
}
|
|
6135
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6136
|
+
kept.add(id);
|
|
6137
|
+
const withId = {
|
|
6138
|
+
...row,
|
|
6139
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6140
|
+
};
|
|
6141
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6142
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6143
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6144
|
+
}
|
|
6145
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6146
|
+
return {
|
|
6147
|
+
kind: "value",
|
|
6148
|
+
value: rows
|
|
6149
|
+
};
|
|
6150
|
+
}
|
|
6151
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6152
|
+
switch (node.kind) {
|
|
6153
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6154
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6155
|
+
case "object": {
|
|
6156
|
+
if (!isRecord(incoming)) {
|
|
6157
|
+
if (incoming === void 0) return KEEP;
|
|
6158
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6159
|
+
return {
|
|
6160
|
+
kind: "value",
|
|
6161
|
+
value: incoming
|
|
6162
|
+
};
|
|
6163
|
+
}
|
|
6164
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6165
|
+
return {
|
|
6166
|
+
kind: "value",
|
|
6167
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6168
|
+
};
|
|
6169
|
+
}
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6173
|
+
function splitNodeKey(key) {
|
|
6174
|
+
const at = key.indexOf("@");
|
|
6175
|
+
return at <= 0 ? {
|
|
6176
|
+
base: key,
|
|
6177
|
+
nodeId: null
|
|
6178
|
+
} : {
|
|
6179
|
+
base: key.slice(0, at),
|
|
6180
|
+
nodeId: key.slice(at + 1)
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6184
|
+
async function transformSecretWrite(input) {
|
|
6185
|
+
const deletes = [];
|
|
6186
|
+
const base = {
|
|
6187
|
+
secrets: input.secrets,
|
|
6188
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6189
|
+
deletes,
|
|
6190
|
+
operatorWrite: input.operatorWrite === true
|
|
6191
|
+
};
|
|
6192
|
+
const out = {};
|
|
6193
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6194
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6195
|
+
const node = input.tree.get(baseKey);
|
|
6196
|
+
if (node === void 0) {
|
|
6197
|
+
out[key] = incoming;
|
|
6198
|
+
continue;
|
|
6199
|
+
}
|
|
6200
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6201
|
+
kind: "node",
|
|
6202
|
+
nodeId
|
|
6203
|
+
} : input.scope ?? globalSecretScope();
|
|
6204
|
+
const result = await writeNode({
|
|
6205
|
+
...base,
|
|
6206
|
+
scope
|
|
6207
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6208
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6209
|
+
}
|
|
6210
|
+
return {
|
|
6211
|
+
patch: out,
|
|
6212
|
+
afterWrite: async () => {
|
|
6213
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6214
|
+
try {
|
|
6215
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6216
|
+
return { orphaned: [] };
|
|
6217
|
+
} catch {
|
|
6218
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
};
|
|
6222
|
+
}
|
|
6223
|
+
/**
|
|
6224
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6225
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6226
|
+
*/
|
|
6227
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6228
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6229
|
+
if (refs.length === 0) return {
|
|
6230
|
+
value,
|
|
6231
|
+
unresolved: []
|
|
6232
|
+
};
|
|
6233
|
+
const answers = await secrets.resolve(refs);
|
|
6234
|
+
const unresolved = [];
|
|
6235
|
+
for (const ref of new Set(refs)) {
|
|
6236
|
+
const answer = answers[ref];
|
|
6237
|
+
if (answer === void 0) unresolved.push({
|
|
6238
|
+
ref,
|
|
6239
|
+
reason: "not-initialized"
|
|
6240
|
+
});
|
|
6241
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6242
|
+
ref,
|
|
6243
|
+
reason: answer.reason
|
|
6244
|
+
});
|
|
6245
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6246
|
+
ref,
|
|
6247
|
+
reason: answer.kind
|
|
6248
|
+
});
|
|
6249
|
+
}
|
|
6250
|
+
const substitute = (v) => {
|
|
6251
|
+
if (isSecretMarker(v)) {
|
|
6252
|
+
const answer = answers[v.$secret];
|
|
6253
|
+
return answer?.kind === "value" ? {
|
|
6254
|
+
keep: true,
|
|
6255
|
+
value: answer.value
|
|
6256
|
+
} : {
|
|
6257
|
+
keep: false,
|
|
6258
|
+
value: void 0
|
|
6259
|
+
};
|
|
6260
|
+
}
|
|
6261
|
+
if (Array.isArray(v)) {
|
|
6262
|
+
const items = [];
|
|
6263
|
+
for (const item of v) {
|
|
6264
|
+
const s = substitute(item);
|
|
6265
|
+
if (s.keep) items.push(s.value);
|
|
6266
|
+
}
|
|
6267
|
+
return {
|
|
6268
|
+
keep: true,
|
|
6269
|
+
value: items
|
|
6270
|
+
};
|
|
6271
|
+
}
|
|
6272
|
+
if (isRecord(v)) {
|
|
6273
|
+
const out = {};
|
|
6274
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6275
|
+
const s = substitute(child);
|
|
6276
|
+
if (s.keep) out[k] = s.value;
|
|
6277
|
+
}
|
|
6278
|
+
return {
|
|
6279
|
+
keep: true,
|
|
6280
|
+
value: out
|
|
6281
|
+
};
|
|
6282
|
+
}
|
|
6283
|
+
return {
|
|
6284
|
+
keep: true,
|
|
6285
|
+
value: v
|
|
6286
|
+
};
|
|
6287
|
+
};
|
|
6288
|
+
return {
|
|
6289
|
+
value: substitute(value).value,
|
|
6290
|
+
unresolved
|
|
6291
|
+
};
|
|
6292
|
+
}
|
|
6293
|
+
function touchesTree(tree, patch) {
|
|
6294
|
+
if (tree.size === 0) return false;
|
|
6295
|
+
for (const key of Object.keys(patch)) {
|
|
6296
|
+
const at = key.indexOf("@");
|
|
6297
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6298
|
+
}
|
|
6299
|
+
return false;
|
|
6300
|
+
}
|
|
6301
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6302
|
+
async function readStoredAddonBlob(raw) {
|
|
6303
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6304
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6305
|
+
const result = await threeWay.call(raw);
|
|
6306
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6307
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6308
|
+
}
|
|
6309
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6310
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6311
|
+
const serialize = (key, fn) => {
|
|
6312
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6313
|
+
const tail = next.catch(() => void 0);
|
|
6314
|
+
chains.set(key, tail);
|
|
6315
|
+
tail.then(() => {
|
|
6316
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6317
|
+
});
|
|
6318
|
+
return next;
|
|
6319
|
+
};
|
|
6320
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6321
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6322
|
+
return serialize(chainKey, async () => {
|
|
6323
|
+
const stored = await readStored();
|
|
6324
|
+
const result = await transformSecretWrite({
|
|
6325
|
+
tree,
|
|
6326
|
+
secrets: opts.secrets,
|
|
6327
|
+
patch,
|
|
6328
|
+
stored,
|
|
6329
|
+
...scope !== void 0 ? { scope } : {},
|
|
6330
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6331
|
+
});
|
|
6332
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6333
|
+
const { orphaned } = await result.afterWrite();
|
|
6334
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6335
|
+
});
|
|
6336
|
+
};
|
|
6337
|
+
const wrapped = {
|
|
6338
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6339
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6340
|
+
kind: "device",
|
|
6341
|
+
deviceId
|
|
6342
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6343
|
+
};
|
|
6344
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6345
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6346
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6347
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6348
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6349
|
+
} });
|
|
6350
|
+
}
|
|
6351
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6352
|
+
function withSecretAwareSettings(context, opts) {
|
|
6353
|
+
const raw = context.settings;
|
|
6354
|
+
if (raw === void 0) return context;
|
|
6355
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6356
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6357
|
+
if (prop === "settings") return settings;
|
|
6358
|
+
return Reflect.get(target, prop, receiver);
|
|
6359
|
+
} });
|
|
6360
|
+
}
|
|
6361
|
+
var LEAF = { kind: "leaf" };
|
|
6362
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6363
|
+
function collectFields(fields, out) {
|
|
6364
|
+
for (const field of fields) {
|
|
6365
|
+
if (field.type === "group") {
|
|
6366
|
+
collectFields(field.fields, out);
|
|
6367
|
+
continue;
|
|
6368
|
+
}
|
|
6369
|
+
if (field.type === "sub-tabs") {
|
|
6370
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6371
|
+
continue;
|
|
6372
|
+
}
|
|
6373
|
+
if (field.type === "editable-array") {
|
|
6374
|
+
const item = /* @__PURE__ */ new Map();
|
|
6375
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6376
|
+
if (item.size > 0) out.set(field.key, {
|
|
6377
|
+
kind: "array",
|
|
6378
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6379
|
+
item
|
|
6380
|
+
});
|
|
6381
|
+
continue;
|
|
6382
|
+
}
|
|
6383
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6384
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6385
|
+
}
|
|
6386
|
+
}
|
|
6387
|
+
/** The secret tree a settings schema declares. */
|
|
6388
|
+
function secretTreeFromSchema(schema) {
|
|
6389
|
+
const out = /* @__PURE__ */ new Map();
|
|
6390
|
+
if (schema === null) return out;
|
|
6391
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6392
|
+
return out;
|
|
6393
|
+
}
|
|
6394
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6395
|
+
function parseSecretStatePath(path) {
|
|
6396
|
+
const segments = [];
|
|
6397
|
+
for (const raw of path.split(".")) {
|
|
6398
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6399
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6400
|
+
segments.push(m[2] !== void 0 ? {
|
|
6401
|
+
key: m[1],
|
|
6402
|
+
idKey: m[2]
|
|
6403
|
+
} : { key: m[1] });
|
|
6404
|
+
}
|
|
6405
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6406
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6407
|
+
return segments;
|
|
6408
|
+
}
|
|
6409
|
+
function insert(into, segments) {
|
|
6410
|
+
const [head, ...rest] = segments;
|
|
6411
|
+
if (head === void 0) return;
|
|
6412
|
+
if (rest.length === 0) {
|
|
6413
|
+
into.set(head.key, LEAF);
|
|
6414
|
+
return;
|
|
6415
|
+
}
|
|
6416
|
+
const existing = into.get(head.key);
|
|
6417
|
+
if (head.idKey !== void 0) {
|
|
6418
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6419
|
+
insert(item, rest);
|
|
6420
|
+
into.set(head.key, {
|
|
6421
|
+
kind: "array",
|
|
6422
|
+
idKey: head.idKey,
|
|
6423
|
+
item
|
|
6424
|
+
});
|
|
6425
|
+
return;
|
|
6426
|
+
}
|
|
6427
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6428
|
+
insert(children, rest);
|
|
6429
|
+
into.set(head.key, {
|
|
6430
|
+
kind: "object",
|
|
6431
|
+
children
|
|
6432
|
+
});
|
|
6433
|
+
}
|
|
6434
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6435
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6436
|
+
if (paths.length === 0) return tree;
|
|
6437
|
+
const out = new Map(tree);
|
|
6438
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6439
|
+
return out;
|
|
6440
|
+
}
|
|
6441
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6442
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6443
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6444
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6445
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5919
6446
|
/**
|
|
5920
6447
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5921
6448
|
*
|
|
@@ -5985,6 +6512,25 @@ var BaseAddon = class {
|
|
|
5985
6512
|
settingsStoreReady = false;
|
|
5986
6513
|
/** Default config values. Provided via constructor. */
|
|
5987
6514
|
defaults;
|
|
6515
|
+
/**
|
|
6516
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6517
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6518
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6519
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6520
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6521
|
+
*/
|
|
6522
|
+
secretStatePaths = [];
|
|
6523
|
+
_addonSecretTree = null;
|
|
6524
|
+
_deviceSecretTree = null;
|
|
6525
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6526
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6527
|
+
_unresolvedSecrets = [];
|
|
6528
|
+
_secretRetryTimer = null;
|
|
6529
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6530
|
+
_secretChangeTimer = null;
|
|
6531
|
+
_secretChangeUnsub = null;
|
|
6532
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6533
|
+
_operatorWriteDepth = 0;
|
|
5988
6534
|
constructor(defaults) {
|
|
5989
6535
|
this.defaults = defaults;
|
|
5990
6536
|
this._config = { ...defaults };
|
|
@@ -6020,8 +6566,18 @@ var BaseAddon = class {
|
|
|
6020
6566
|
return this._config;
|
|
6021
6567
|
}
|
|
6022
6568
|
async initialize(context) {
|
|
6023
|
-
|
|
6569
|
+
const secrets = context.secrets;
|
|
6570
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6571
|
+
secrets,
|
|
6572
|
+
addonTree: () => this.addonSecretTree(),
|
|
6573
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6574
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6575
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6576
|
+
}) : context;
|
|
6024
6577
|
await this.resolveConfig();
|
|
6578
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6579
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6580
|
+
});
|
|
6025
6581
|
const result = await this.onInitialize();
|
|
6026
6582
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6027
6583
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6054,6 +6610,12 @@ var BaseAddon = class {
|
|
|
6054
6610
|
*/
|
|
6055
6611
|
async onHubReachable() {}
|
|
6056
6612
|
async shutdown() {
|
|
6613
|
+
this._secretChangeUnsub?.();
|
|
6614
|
+
this._secretChangeUnsub = null;
|
|
6615
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6616
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6617
|
+
this._secretRetryTimer = null;
|
|
6618
|
+
this._secretChangeTimer = null;
|
|
6057
6619
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6058
6620
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6059
6621
|
await this.onShutdown();
|
|
@@ -6132,7 +6694,7 @@ var BaseAddon = class {
|
|
|
6132
6694
|
return hydrateSchema(schema, overlay ? {
|
|
6133
6695
|
...projected,
|
|
6134
6696
|
...overlay
|
|
6135
|
-
} : projected);
|
|
6697
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6136
6698
|
}
|
|
6137
6699
|
/**
|
|
6138
6700
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6181,7 +6743,7 @@ var BaseAddon = class {
|
|
|
6181
6743
|
return hydrateSchema({
|
|
6182
6744
|
...schema,
|
|
6183
6745
|
sections
|
|
6184
|
-
}, projected);
|
|
6746
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6185
6747
|
}
|
|
6186
6748
|
/**
|
|
6187
6749
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6235,18 +6797,50 @@ var BaseAddon = class {
|
|
|
6235
6797
|
value: result.value[key]
|
|
6236
6798
|
};
|
|
6237
6799
|
}
|
|
6800
|
+
/**
|
|
6801
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6802
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6803
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6804
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6805
|
+
* writing back what it read is not (D787).
|
|
6806
|
+
*/
|
|
6807
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6808
|
+
this._operatorWriteDepth++;
|
|
6809
|
+
try {
|
|
6810
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6811
|
+
} finally {
|
|
6812
|
+
this._operatorWriteDepth--;
|
|
6813
|
+
}
|
|
6814
|
+
}
|
|
6238
6815
|
async updateGlobalSettings(patch, nodeId) {
|
|
6816
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6817
|
+
}
|
|
6818
|
+
/**
|
|
6819
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6820
|
+
*
|
|
6821
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6822
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6823
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6824
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6825
|
+
*/
|
|
6826
|
+
async clearSecrets(keys, nodeId) {
|
|
6827
|
+
const tree = this.addonSecretTree();
|
|
6828
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6829
|
+
const patch = {};
|
|
6830
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6831
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6832
|
+
}
|
|
6833
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6239
6834
|
const keys = this.perNodeKeys();
|
|
6240
6835
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6241
6836
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6242
|
-
const barePatch = patch;
|
|
6243
6837
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6244
6838
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6245
6839
|
if (target !== localNode) return;
|
|
6246
6840
|
await this.resolveConfig();
|
|
6247
6841
|
await this.onConfigChanged();
|
|
6248
6842
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6249
|
-
this.maybeAutoRestart(
|
|
6843
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6250
6844
|
}
|
|
6251
6845
|
/**
|
|
6252
6846
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6271,7 +6865,7 @@ var BaseAddon = class {
|
|
|
6271
6865
|
* time to return its response before the addon is torn down and
|
|
6272
6866
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6273
6867
|
*/
|
|
6274
|
-
maybeAutoRestart(
|
|
6868
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6275
6869
|
if (!schema) return;
|
|
6276
6870
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6277
6871
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6279,13 +6873,13 @@ var BaseAddon = class {
|
|
|
6279
6873
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6280
6874
|
}
|
|
6281
6875
|
if (restartKeys.size === 0) return;
|
|
6282
|
-
if (!
|
|
6876
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6283
6877
|
const ctx = this._ctx;
|
|
6284
6878
|
if (!ctx) return;
|
|
6285
6879
|
const addonId = ctx.id;
|
|
6286
6880
|
setImmediate(() => {
|
|
6287
6881
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6288
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6882
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6289
6883
|
}).catch((err) => {
|
|
6290
6884
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6291
6885
|
});
|
|
@@ -6294,7 +6888,7 @@ var BaseAddon = class {
|
|
|
6294
6888
|
async getDeviceSettings(deviceId) {
|
|
6295
6889
|
const schema = this.deviceSettingsSchema();
|
|
6296
6890
|
if (!schema) return { sections: [] };
|
|
6297
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6891
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6298
6892
|
}
|
|
6299
6893
|
async updateDeviceSettings(deviceId, patch) {
|
|
6300
6894
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6424,7 +7018,7 @@ var BaseAddon = class {
|
|
|
6424
7018
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6425
7019
|
*/
|
|
6426
7020
|
async resolveConfig() {
|
|
6427
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7021
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6428
7022
|
const perNode = this.perNodeKeys();
|
|
6429
7023
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6430
7024
|
const resolved = { ...this.defaults };
|
|
@@ -6449,7 +7043,7 @@ var BaseAddon = class {
|
|
|
6449
7043
|
key,
|
|
6450
7044
|
schema,
|
|
6451
7045
|
fallback,
|
|
6452
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7046
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6453
7047
|
write: async (patch) => {
|
|
6454
7048
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6455
7049
|
},
|
|
@@ -6466,7 +7060,7 @@ var BaseAddon = class {
|
|
|
6466
7060
|
key,
|
|
6467
7061
|
schema,
|
|
6468
7062
|
fallback,
|
|
6469
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7063
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6470
7064
|
write: async (patch) => {
|
|
6471
7065
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6472
7066
|
},
|
|
@@ -6478,6 +7072,70 @@ var BaseAddon = class {
|
|
|
6478
7072
|
} })
|
|
6479
7073
|
});
|
|
6480
7074
|
}
|
|
7075
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7076
|
+
addonSecretTree() {
|
|
7077
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7078
|
+
return this._addonSecretTree;
|
|
7079
|
+
}
|
|
7080
|
+
deviceSecretTree() {
|
|
7081
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7082
|
+
return this._deviceSecretTree;
|
|
7083
|
+
}
|
|
7084
|
+
/**
|
|
7085
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7086
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7087
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7088
|
+
* than start on an empty credential.
|
|
7089
|
+
*/
|
|
7090
|
+
get unresolvedSecrets() {
|
|
7091
|
+
return this._unresolvedSecrets;
|
|
7092
|
+
}
|
|
7093
|
+
/**
|
|
7094
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7095
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7096
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7097
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7098
|
+
* ever written back from here.
|
|
7099
|
+
*/
|
|
7100
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7101
|
+
const secrets = this._ctx?.secrets;
|
|
7102
|
+
if (secrets === void 0) return blob;
|
|
7103
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7104
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7105
|
+
if (refs.length === 0) {
|
|
7106
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7107
|
+
return blob;
|
|
7108
|
+
}
|
|
7109
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7110
|
+
if (trackForConfig) {
|
|
7111
|
+
this._unresolvedSecrets = unresolved;
|
|
7112
|
+
if (unresolved.length > 0) {
|
|
7113
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7114
|
+
ref: u.ref,
|
|
7115
|
+
reason: u.reason
|
|
7116
|
+
})) } });
|
|
7117
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7118
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7119
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7120
|
+
}
|
|
7121
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7122
|
+
}
|
|
7123
|
+
return value;
|
|
7124
|
+
}
|
|
7125
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7126
|
+
scheduleSecretReresolve(delayMs) {
|
|
7127
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7128
|
+
if (this[timerOf] !== null) return;
|
|
7129
|
+
const timer = setTimeout(() => {
|
|
7130
|
+
this[timerOf] = null;
|
|
7131
|
+
if (this._ctx === null) return;
|
|
7132
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7133
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7134
|
+
});
|
|
7135
|
+
}, delayMs);
|
|
7136
|
+
timer.unref?.();
|
|
7137
|
+
this[timerOf] = timer;
|
|
7138
|
+
}
|
|
6481
7139
|
/**
|
|
6482
7140
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6483
7141
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6745,32 +7403,12 @@ object({
|
|
|
6745
7403
|
audioCodec: string().optional(),
|
|
6746
7404
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6747
7405
|
});
|
|
6748
|
-
var EncodedPacketSchema = object({
|
|
6749
|
-
type: _enum(["video", "audio"]),
|
|
6750
|
-
data: _instanceof(Uint8Array),
|
|
6751
|
-
pts: number(),
|
|
6752
|
-
dts: number(),
|
|
6753
|
-
keyframe: boolean(),
|
|
6754
|
-
codec: string()
|
|
6755
|
-
});
|
|
6756
|
-
var DecodedFrameSchema = object({
|
|
6757
|
-
data: _instanceof(Uint8Array),
|
|
6758
|
-
width: number(),
|
|
6759
|
-
height: number(),
|
|
6760
|
-
format: _enum([
|
|
6761
|
-
"jpeg",
|
|
6762
|
-
"rgb",
|
|
6763
|
-
"bgr",
|
|
6764
|
-
"yuv420",
|
|
6765
|
-
"gray"
|
|
6766
|
-
]),
|
|
6767
|
-
timestamp: number()
|
|
6768
|
-
});
|
|
6769
7406
|
/**
|
|
6770
7407
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6771
7408
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6772
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6773
|
-
*
|
|
7409
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7410
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7411
|
+
* over tRPC / Moleculer.
|
|
6774
7412
|
*
|
|
6775
7413
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6776
7414
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6796,50 +7434,6 @@ var FrameHandleSchema = object({
|
|
|
6796
7434
|
slotCount: number().int().positive()
|
|
6797
7435
|
});
|
|
6798
7436
|
/**
|
|
6799
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6800
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6801
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6802
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6803
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6804
|
-
*/
|
|
6805
|
-
var FrameHandleFormatSchema = _enum([
|
|
6806
|
-
"rgb",
|
|
6807
|
-
"bgr",
|
|
6808
|
-
"yuv420",
|
|
6809
|
-
"gray"
|
|
6810
|
-
]);
|
|
6811
|
-
/**
|
|
6812
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6813
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6814
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6815
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6816
|
-
* they asked for with no broker-side conversion.
|
|
6817
|
-
*/
|
|
6818
|
-
var SubscribeFramesInputSchema = object({
|
|
6819
|
-
brokerId: string(),
|
|
6820
|
-
format: FrameHandleFormatSchema,
|
|
6821
|
-
/**
|
|
6822
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6823
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6824
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6825
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6826
|
-
*/
|
|
6827
|
-
maxFps: number().positive().optional(),
|
|
6828
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6829
|
-
tag: string().optional()
|
|
6830
|
-
});
|
|
6831
|
-
/**
|
|
6832
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6833
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6834
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6835
|
-
*/
|
|
6836
|
-
var SubscribeFramesResultSchema = object({
|
|
6837
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6838
|
-
subscriptionId: string(),
|
|
6839
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6840
|
-
maxFps: number().nonnegative()
|
|
6841
|
-
});
|
|
6842
|
-
/**
|
|
6843
7437
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6844
7438
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6845
7439
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6847,8 +7441,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6847
7441
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6848
7442
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6849
7443
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6850
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6851
|
-
*
|
|
7444
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7445
|
+
* it.
|
|
6852
7446
|
*/
|
|
6853
7447
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6854
7448
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6866,11 +7460,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6866
7460
|
format: AudioChunkFormatSchema.optional()
|
|
6867
7461
|
});
|
|
6868
7462
|
/**
|
|
6869
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6870
|
-
*
|
|
6871
|
-
*
|
|
6872
|
-
*
|
|
6873
|
-
* `pullAudioChunks`.
|
|
7463
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7464
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7465
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7466
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6874
7467
|
*/
|
|
6875
7468
|
var SubscribeAudioChunksInputSchema = object({
|
|
6876
7469
|
brokerId: string(),
|
|
@@ -6901,9 +7494,7 @@ var BrokerStatsSchema = object({
|
|
|
6901
7494
|
"stopped"
|
|
6902
7495
|
]),
|
|
6903
7496
|
inputFps: number(),
|
|
6904
|
-
decodeFps: number(),
|
|
6905
7497
|
encodedSubscribers: number(),
|
|
6906
|
-
decodedSubscribers: number(),
|
|
6907
7498
|
uptimeMs: number(),
|
|
6908
7499
|
bitrateKbps: number(),
|
|
6909
7500
|
idrIntervalMs: number(),
|
|
@@ -6916,14 +7507,6 @@ var BrokerStatsSchema = object({
|
|
|
6916
7507
|
preBufferMs: number(),
|
|
6917
7508
|
preBufferPackets: number(),
|
|
6918
7509
|
/**
|
|
6919
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6920
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6921
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6922
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6923
|
-
* a separate cap call per broker.
|
|
6924
|
-
*/
|
|
6925
|
-
decoderNodeId: string().nullable(),
|
|
6926
|
-
/**
|
|
6927
7510
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6928
7511
|
* when the stream has no audio track or the broker is in cold start.
|
|
6929
7512
|
* `supported = false` means the codec was detected but the local
|
|
@@ -8389,8 +8972,8 @@ function buildAddonRouteProvider(id, routes) {
|
|
|
8389
8972
|
const reply = buildCapturingReply(envelope);
|
|
8390
8973
|
const request = {
|
|
8391
8974
|
params: {
|
|
8392
|
-
...
|
|
8393
|
-
...
|
|
8975
|
+
...match.params,
|
|
8976
|
+
...input.params
|
|
8394
8977
|
},
|
|
8395
8978
|
query: input.query,
|
|
8396
8979
|
body: input.body,
|
|
@@ -10372,70 +10955,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10372
10955
|
"backup"
|
|
10373
10956
|
]).optional()
|
|
10374
10957
|
});
|
|
10375
|
-
var DecoderStatsSchema = object({
|
|
10376
|
-
inputFps: number(),
|
|
10377
|
-
outputFps: number(),
|
|
10378
|
-
avgDecodeTimeMs: number(),
|
|
10379
|
-
droppedFrames: number(),
|
|
10380
|
-
/**
|
|
10381
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10382
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10383
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10384
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10385
|
-
*/
|
|
10386
|
-
lagMs: number().optional(),
|
|
10387
|
-
effectiveFps: number().optional(),
|
|
10388
|
-
adaptiveFps: number().optional()
|
|
10389
|
-
});
|
|
10390
|
-
var DecoderSessionConfigSchema = object({
|
|
10391
|
-
codec: string(),
|
|
10392
|
-
maxFps: number().default(0),
|
|
10393
|
-
outputFormat: _enum([
|
|
10394
|
-
"jpeg",
|
|
10395
|
-
"rgb",
|
|
10396
|
-
"bgr",
|
|
10397
|
-
"yuv420",
|
|
10398
|
-
"gray"
|
|
10399
|
-
]).default("jpeg"),
|
|
10400
|
-
scale: number().default(1),
|
|
10401
|
-
width: number().optional(),
|
|
10402
|
-
height: number().optional(),
|
|
10403
|
-
/**
|
|
10404
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10405
|
-
* because the cap is generic (any caller could request decode), but
|
|
10406
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10407
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10408
|
-
* sendPacket errors on a single hung camera).
|
|
10409
|
-
*/
|
|
10410
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10411
|
-
/**
|
|
10412
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10413
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10414
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10415
|
-
* profile cleanly.
|
|
10416
|
-
*/
|
|
10417
|
-
tag: string().optional(),
|
|
10418
|
-
/**
|
|
10419
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10420
|
-
*
|
|
10421
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10422
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10423
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10424
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10425
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10426
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10427
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10428
|
-
*/
|
|
10429
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10430
|
-
/**
|
|
10431
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10432
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10433
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10434
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10435
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10436
|
-
*/
|
|
10437
|
-
debug: boolean().optional()
|
|
10438
|
-
});
|
|
10439
10958
|
/**
|
|
10440
10959
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10441
10960
|
* an addon declares its channels in.
|
|
@@ -10586,7 +11105,18 @@ var LABEL_SUPPLY_STEP_IDS = [
|
|
|
10586
11105
|
];
|
|
10587
11106
|
/** Steps whose box a root detection can BE. */
|
|
10588
11107
|
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
10589
|
-
|
|
11108
|
+
/**
|
|
11109
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11110
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11111
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11112
|
+
* no camera tree carries.)
|
|
11113
|
+
*/
|
|
11114
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11115
|
+
[
|
|
11116
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11117
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11118
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11119
|
+
];
|
|
10590
11120
|
var MODEL_FORMATS = [
|
|
10591
11121
|
"onnx",
|
|
10592
11122
|
"coreml",
|
|
@@ -10615,7 +11145,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10615
11145
|
/** Multi-file payload (directory members or sibling files). */
|
|
10616
11146
|
files: array(string()).readonly().optional(),
|
|
10617
11147
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10618
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11148
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11149
|
+
/**
|
|
11150
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11151
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11152
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11153
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11154
|
+
* node records the revision it downloaded next to the file
|
|
11155
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11156
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11157
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11158
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11159
|
+
*/
|
|
11160
|
+
revision: string().min(1).optional()
|
|
11161
|
+
});
|
|
11162
|
+
/**
|
|
11163
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11164
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11165
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11166
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11167
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11168
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11169
|
+
*/
|
|
11170
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11171
|
+
"current",
|
|
11172
|
+
"stale",
|
|
11173
|
+
"missing"
|
|
11174
|
+
]);
|
|
11175
|
+
/**
|
|
11176
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11177
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11178
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11179
|
+
*/
|
|
11180
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11181
|
+
"fp32",
|
|
11182
|
+
"fp16",
|
|
11183
|
+
"int8"
|
|
11184
|
+
]);
|
|
11185
|
+
/**
|
|
11186
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11187
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11188
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11189
|
+
*/
|
|
11190
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11191
|
+
downloaded: boolean(),
|
|
11192
|
+
sizeMB: number(),
|
|
11193
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11194
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10619
11195
|
});
|
|
10620
11196
|
/**
|
|
10621
11197
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10729,25 +11305,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10729
11305
|
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
10730
11306
|
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
10731
11307
|
* child of the `parentMacro` detection that contains it — never a track.
|
|
11308
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11309
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11310
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11311
|
+
* postprocessor on read, never stored by an import.
|
|
10732
11312
|
*/
|
|
10733
|
-
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
11313
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11314
|
+
object({
|
|
11315
|
+
kind: literal("label"),
|
|
11316
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11317
|
+
labelToEffect: record(string(), string()),
|
|
11318
|
+
uncovered: array(string()).readonly()
|
|
11319
|
+
}),
|
|
11320
|
+
object({
|
|
11321
|
+
kind: literal("crop"),
|
|
11322
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11323
|
+
rootLabels: array(string()).readonly(),
|
|
11324
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11325
|
+
childClass: _enum(["plate", "face"]),
|
|
11326
|
+
/**
|
|
11327
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11328
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11329
|
+
* stored by an import.
|
|
11330
|
+
*/
|
|
11331
|
+
rootInputPx: number().int().positive().optional()
|
|
11332
|
+
}),
|
|
11333
|
+
object({
|
|
11334
|
+
kind: literal("mask"),
|
|
11335
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11336
|
+
})
|
|
11337
|
+
]);
|
|
10751
11338
|
var ModelCatalogEntrySchema = object({
|
|
10752
11339
|
id: string(),
|
|
10753
11340
|
name: string(),
|
|
@@ -10813,6 +11400,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10813
11400
|
*/
|
|
10814
11401
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10815
11402
|
/**
|
|
11403
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11404
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11405
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11406
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11407
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11408
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11409
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11410
|
+
*/
|
|
11411
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11412
|
+
/**
|
|
11413
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11414
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11415
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11416
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11417
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11418
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11419
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11420
|
+
*/
|
|
11421
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11422
|
+
/**
|
|
11423
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11424
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11425
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11426
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11427
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11428
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11429
|
+
*/
|
|
11430
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11431
|
+
/**
|
|
10816
11432
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10817
11433
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10818
11434
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -12536,13 +13152,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12536
13152
|
lastRtpAt: number(),
|
|
12537
13153
|
bytesSent: number()
|
|
12538
13154
|
});
|
|
12539
|
-
var BrokerDecodedClientSchema = object({
|
|
12540
|
-
tag: string(),
|
|
12541
|
-
subscribedAt: number(),
|
|
12542
|
-
maxFps: number(),
|
|
12543
|
-
framesDelivered: number(),
|
|
12544
|
-
framesDropped: number()
|
|
12545
|
-
});
|
|
12546
13155
|
var BrokerAudioClientSchema = object({
|
|
12547
13156
|
tag: string(),
|
|
12548
13157
|
subscribedAt: number(),
|
|
@@ -12634,7 +13243,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12634
13243
|
});
|
|
12635
13244
|
var BrokerClientsSchema = object({
|
|
12636
13245
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12637
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12638
13246
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12639
13247
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12640
13248
|
pipeClients: number(),
|
|
@@ -13003,11 +13611,7 @@ method(object({
|
|
|
13003
13611
|
auth: "admin"
|
|
13004
13612
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
13005
13613
|
brokerId: string(),
|
|
13006
|
-
channel: _enum([
|
|
13007
|
-
"rtsp",
|
|
13008
|
-
"decoded",
|
|
13009
|
-
"audio"
|
|
13010
|
-
]),
|
|
13614
|
+
channel: _enum(["rtsp", "audio"]),
|
|
13011
13615
|
handle: string()
|
|
13012
13616
|
}), object({ killed: boolean() }), {
|
|
13013
13617
|
kind: "mutation",
|
|
@@ -13042,10 +13646,7 @@ method(object({
|
|
|
13042
13646
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
13043
13647
|
subscriptionId: string(),
|
|
13044
13648
|
maxCount: number().int().positive().default(8)
|
|
13045
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
13046
|
-
subscriptionId: string(),
|
|
13047
|
-
maxCount: number().int().positive().default(4)
|
|
13048
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13649
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13049
13650
|
brokerId: string(),
|
|
13050
13651
|
seconds: number().min(0).max(30)
|
|
13051
13652
|
}), _void(), {
|
|
@@ -14203,53 +14804,201 @@ id: union([string(), number()]) }), {
|
|
|
14203
14804
|
auth: "admin"
|
|
14204
14805
|
});
|
|
14205
14806
|
/**
|
|
14206
|
-
*
|
|
14207
|
-
*
|
|
14208
|
-
*
|
|
14807
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14808
|
+
*
|
|
14809
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14810
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14811
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14812
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14813
|
+
* against the CALLER, never against anything the caller claims.
|
|
14814
|
+
*
|
|
14815
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14816
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14817
|
+
* connection, the agent from its child's connection carried in
|
|
14818
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14819
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14820
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14821
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14822
|
+
* runner is the same OS user): see the threat model in
|
|
14823
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14824
|
+
*
|
|
14825
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14826
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14827
|
+
* floors every method to admin anyway (D240).
|
|
14828
|
+
*
|
|
14829
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14209
14830
|
*/
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
})
|
|
14220
|
-
|
|
14831
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14832
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14833
|
+
"key-missing",
|
|
14834
|
+
"wrong-key",
|
|
14835
|
+
"key-file-unreadable",
|
|
14836
|
+
"store-unavailable",
|
|
14837
|
+
"not-initialized",
|
|
14838
|
+
"decrypt-failed"
|
|
14839
|
+
]);
|
|
14840
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14841
|
+
state: literal("locked"),
|
|
14842
|
+
reason: KeychainUnavailableReasonSchema
|
|
14843
|
+
})]);
|
|
14844
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14845
|
+
object({
|
|
14846
|
+
kind: literal("value"),
|
|
14847
|
+
value: string(),
|
|
14848
|
+
version: number().int()
|
|
14849
|
+
}),
|
|
14850
|
+
object({ kind: literal("missing") }),
|
|
14851
|
+
object({
|
|
14852
|
+
kind: literal("unavailable"),
|
|
14853
|
+
reason: KeychainUnavailableReasonSchema
|
|
14854
|
+
}),
|
|
14855
|
+
object({ kind: literal("forbidden") })
|
|
14856
|
+
]);
|
|
14857
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14858
|
+
/** Metadata of one stored value — never the value. */
|
|
14859
|
+
var KeychainSecretMetaSchema = object({
|
|
14860
|
+
ref: string(),
|
|
14861
|
+
owner: string(),
|
|
14862
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14863
|
+
scope: string(),
|
|
14864
|
+
fieldPath: string(),
|
|
14865
|
+
version: number().int(),
|
|
14866
|
+
createdAt: number(),
|
|
14867
|
+
updatedAt: number(),
|
|
14868
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14869
|
+
updatedBy: string(),
|
|
14870
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14871
|
+
lastReadAt: number().nullable()
|
|
14872
|
+
});
|
|
14873
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14874
|
+
method(object({
|
|
14875
|
+
ref: string().min(1),
|
|
14876
|
+
value: string().min(1)
|
|
14877
|
+
}), object({
|
|
14878
|
+
ref: string(),
|
|
14879
|
+
version: number().int()
|
|
14880
|
+
}), {
|
|
14881
|
+
kind: "mutation",
|
|
14882
|
+
auth: "admin"
|
|
14883
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14884
|
+
kind: "mutation",
|
|
14885
|
+
auth: "admin"
|
|
14886
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14887
|
+
var KeychainKeySourceSchema = object({
|
|
14888
|
+
kind: _enum([
|
|
14889
|
+
"config-file",
|
|
14890
|
+
"previous-config-file",
|
|
14891
|
+
"platform",
|
|
14892
|
+
"default-file"
|
|
14893
|
+
]),
|
|
14894
|
+
/** File sources only — a path is not a secret. */
|
|
14895
|
+
path: string().optional(),
|
|
14896
|
+
/**
|
|
14897
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14898
|
+
* next to the database it protects (the default file). The page warns.
|
|
14899
|
+
*/
|
|
14900
|
+
sharesBackupWithDatabase: boolean()
|
|
14901
|
+
});
|
|
14902
|
+
var KeychainStatusSchema = object({
|
|
14903
|
+
keychain: KeychainStateSchema,
|
|
14904
|
+
/** The source of the master key in use; `null` while locked. */
|
|
14905
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
14906
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
14907
|
+
configuredSource: KeychainKeySourceSchema,
|
|
14908
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
14909
|
+
fingerprint: string().nullable(),
|
|
14910
|
+
activeKeyId: string().nullable(),
|
|
14911
|
+
/**
|
|
14912
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
14913
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
14914
|
+
*/
|
|
14915
|
+
rotationPending: boolean(),
|
|
14916
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14917
|
+
retiredWraps: number().int(),
|
|
14918
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
14919
|
+
secretCount: number().int()
|
|
14920
|
+
});
|
|
14921
|
+
/**
|
|
14922
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
14923
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
14924
|
+
* never reported as an orphan (and never deleted as one).
|
|
14925
|
+
*/
|
|
14926
|
+
var KeychainSecretUsageSchema = _enum([
|
|
14927
|
+
"in-use",
|
|
14928
|
+
"orphan",
|
|
14929
|
+
"unknown"
|
|
14930
|
+
]);
|
|
14931
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
14932
|
+
var KeychainAuditActionSchema = _enum([
|
|
14933
|
+
"put",
|
|
14934
|
+
"delete",
|
|
14935
|
+
"reveal",
|
|
14936
|
+
"rotate-master-key",
|
|
14937
|
+
"purge-retired-keys",
|
|
14938
|
+
"download-recovery-key",
|
|
14939
|
+
"delete-orphans",
|
|
14940
|
+
"reset",
|
|
14941
|
+
"initialize"
|
|
14942
|
+
]);
|
|
14943
|
+
var KeychainAuditEntrySchema = object({
|
|
14944
|
+
id: string(),
|
|
14945
|
+
at: number(),
|
|
14946
|
+
action: KeychainAuditActionSchema,
|
|
14947
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14948
|
+
actor: string(),
|
|
14949
|
+
ref: string().nullable(),
|
|
14950
|
+
detail: string().nullable()
|
|
14951
|
+
});
|
|
14952
|
+
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({
|
|
14953
|
+
value: string(),
|
|
14954
|
+
version: number().int()
|
|
14955
|
+
}), {
|
|
14956
|
+
kind: "mutation",
|
|
14957
|
+
auth: "admin",
|
|
14958
|
+
caller: "required"
|
|
14959
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
14960
|
+
deleted: array(string()).readonly(),
|
|
14961
|
+
kept: array(object({
|
|
14962
|
+
ref: string(),
|
|
14963
|
+
usage: KeychainSecretUsageSchema
|
|
14964
|
+
})).readonly()
|
|
14965
|
+
}), {
|
|
14966
|
+
kind: "mutation",
|
|
14967
|
+
auth: "admin",
|
|
14968
|
+
caller: "required"
|
|
14969
|
+
}), method(object({}), object({
|
|
14970
|
+
fingerprint: string(),
|
|
14971
|
+
keySource: KeychainKeySourceSchema
|
|
14972
|
+
}), {
|
|
14973
|
+
kind: "mutation",
|
|
14974
|
+
auth: "admin",
|
|
14975
|
+
caller: "required"
|
|
14976
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
14977
|
+
kind: "mutation",
|
|
14978
|
+
auth: "admin",
|
|
14979
|
+
caller: "required"
|
|
14980
|
+
}), method(object({}), object({
|
|
14981
|
+
key: string(),
|
|
14982
|
+
fingerprint: string(),
|
|
14983
|
+
keySource: KeychainKeySourceSchema
|
|
14984
|
+
}), {
|
|
14985
|
+
kind: "mutation",
|
|
14986
|
+
auth: "admin",
|
|
14987
|
+
caller: "required"
|
|
14988
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
14989
|
+
archivedCollection: string().nullable(),
|
|
14990
|
+
archived: number().int()
|
|
14991
|
+
}), {
|
|
14992
|
+
kind: "mutation",
|
|
14993
|
+
auth: "admin",
|
|
14994
|
+
caller: "required"
|
|
14995
|
+
});
|
|
14996
|
+
method(_void(), object({
|
|
14221
14997
|
id: string(),
|
|
14222
14998
|
name: string(),
|
|
14223
|
-
isPullMode: boolean().optional(),
|
|
14224
|
-
priority: number().optional(),
|
|
14225
14999
|
hwaccel: string().optional(),
|
|
14226
15000
|
probedBestHwaccel: string().optional()
|
|
14227
|
-
})), method(
|
|
14228
|
-
sessionId: string(),
|
|
14229
|
-
nodeId: string()
|
|
14230
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14231
|
-
sessionId: string(),
|
|
14232
|
-
packet: EncodedPacketSchema
|
|
14233
|
-
}), _void()), method(object({
|
|
14234
|
-
sessionId: string(),
|
|
14235
|
-
url: string()
|
|
14236
|
-
}), _void()), method(object({
|
|
14237
|
-
sessionId: string(),
|
|
14238
|
-
maxCount: number().default(1),
|
|
14239
|
-
waitMs: number().optional()
|
|
14240
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14241
|
-
sessionId: string(),
|
|
14242
|
-
maxCount: number().default(1),
|
|
14243
|
-
waitMs: number().optional()
|
|
14244
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14245
|
-
sessionId: string(),
|
|
14246
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14247
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14248
|
-
sessionId: string(),
|
|
14249
|
-
codec: string(),
|
|
14250
|
-
outputFormat: string(),
|
|
14251
|
-
createdAtMs: number()
|
|
14252
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
15001
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14253
15002
|
kind: "mutation",
|
|
14254
15003
|
auth: "admin"
|
|
14255
15004
|
});
|
|
@@ -15061,6 +15810,10 @@ var DeviceInfoSchema = object({
|
|
|
15061
15810
|
isCamera: boolean(),
|
|
15062
15811
|
/** Current config values — serializable snapshot */
|
|
15063
15812
|
config: record(string(), unknown()),
|
|
15813
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
15814
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
15815
|
+
* when the owning runner has not reported them. */
|
|
15816
|
+
secretConfigPaths: array(string()).optional(),
|
|
15064
15817
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15065
15818
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15066
15819
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15266,12 +16019,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15266
16019
|
* call (workers re-register on init), so probe-driven updates
|
|
15267
16020
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15268
16021
|
features: array(string()).optional(),
|
|
15269
|
-
config: record(string(), unknown())
|
|
16022
|
+
config: record(string(), unknown()),
|
|
16023
|
+
/** Config paths the device's own schema DECLARES secret
|
|
16024
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
16025
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
16026
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
16027
|
+
* omits it and the keyword backstop applies. */
|
|
16028
|
+
secretConfigPaths: array(string()).optional()
|
|
15270
16029
|
});
|
|
15271
16030
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15272
16031
|
var DevicePersistConfigPayloadSchema = object({
|
|
15273
16032
|
deviceId: number(),
|
|
15274
|
-
data: record(string(), unknown())
|
|
16033
|
+
data: record(string(), unknown()),
|
|
16034
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16035
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16036
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16037
|
+
secretConfigPaths: array(string()).optional()
|
|
15275
16038
|
});
|
|
15276
16039
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15277
16040
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -16925,7 +17688,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
16925
17688
|
icon: string().optional(),
|
|
16926
17689
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
16927
17690
|
startUrl: string(),
|
|
16928
|
-
stage: LoginStageEnum
|
|
17691
|
+
stage: LoginStageEnum,
|
|
17692
|
+
/**
|
|
17693
|
+
* The provider names an external identity a signed-in user can link to
|
|
17694
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17695
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17696
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17697
|
+
*/
|
|
17698
|
+
linkable: boolean().optional()
|
|
16929
17699
|
}),
|
|
16930
17700
|
object({
|
|
16931
17701
|
kind: literal("widget"),
|
|
@@ -21277,8 +22047,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21277
22047
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21278
22048
|
stepId: "face-embedding",
|
|
21279
22049
|
key: "minLandmarkFaceSize",
|
|
21280
|
-
label: "Min face size
|
|
21281
|
-
description: "
|
|
22050
|
+
label: "Min face size to embed (detection-frame px)",
|
|
22051
|
+
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.",
|
|
21282
22052
|
type: "slider",
|
|
21283
22053
|
min: 0,
|
|
21284
22054
|
max: 64,
|
|
@@ -22251,8 +23021,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22251
23021
|
]);
|
|
22252
23022
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22253
23023
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22254
|
-
/**
|
|
22255
|
-
|
|
23024
|
+
/**
|
|
23025
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23026
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23027
|
+
*
|
|
23028
|
+
* - `operator` — drawn by hand.
|
|
23029
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23030
|
+
* model, or a larger teacher model).
|
|
23031
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23032
|
+
* back from the track store (never a re-run).
|
|
23033
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23034
|
+
*/
|
|
23035
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23036
|
+
"operator",
|
|
23037
|
+
"assist",
|
|
23038
|
+
"pipeline",
|
|
23039
|
+
"llm"
|
|
23040
|
+
]);
|
|
22256
23041
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22257
23042
|
var RetrainBboxSchema = object({
|
|
22258
23043
|
x: number(),
|
|
@@ -22270,7 +23055,8 @@ var RetrainBboxSchema = object({
|
|
|
22270
23055
|
*/
|
|
22271
23056
|
var RetrainAnnotationSchema = object({
|
|
22272
23057
|
id: string(),
|
|
22273
|
-
|
|
23058
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23059
|
+
trackId: string().optional(),
|
|
22274
23060
|
deviceId: number(),
|
|
22275
23061
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22276
23062
|
mediaKey: string(),
|
|
@@ -22319,18 +23105,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22319
23105
|
* fail, whatever became of the original. */
|
|
22320
23106
|
copied: boolean()
|
|
22321
23107
|
});
|
|
23108
|
+
/**
|
|
23109
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23110
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23111
|
+
* box recorded on the source media row when there is one, else the track
|
|
23112
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23113
|
+
* until the operator confirms it.
|
|
23114
|
+
*/
|
|
23115
|
+
var RetrainPipelineBoxSchema = object({
|
|
23116
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23117
|
+
bbox: RetrainBboxSchema,
|
|
23118
|
+
macroClass: RetrainMacroClassSchema,
|
|
23119
|
+
label: string().optional(),
|
|
23120
|
+
subLabel: string().optional(),
|
|
23121
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23122
|
+
score: number().optional(),
|
|
23123
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23124
|
+
modelId: string().optional(),
|
|
23125
|
+
trackId: string(),
|
|
23126
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23127
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23128
|
+
basis: _enum(["subject-box", "position"]),
|
|
23129
|
+
deltaMs: number()
|
|
23130
|
+
});
|
|
23131
|
+
/**
|
|
23132
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23133
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23134
|
+
* track at all.
|
|
23135
|
+
*/
|
|
23136
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22322
23137
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22323
23138
|
var RetrainFrameSchema = object({
|
|
22324
23139
|
frameId: string(),
|
|
22325
23140
|
deviceId: number(),
|
|
22326
|
-
|
|
22327
|
-
/**
|
|
22328
|
-
|
|
23141
|
+
origin: RetrainFrameOriginSchema,
|
|
23142
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23143
|
+
trackId: string().optional(),
|
|
23144
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23145
|
+
* Absent on a recording still. */
|
|
23146
|
+
sourceMediaId: number().int().optional(),
|
|
23147
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23148
|
+
epochMs: number().optional(),
|
|
22329
23149
|
sourceKind: MediaFileKindEnum,
|
|
22330
23150
|
sizeBytes: number().int(),
|
|
22331
23151
|
width: number().int(),
|
|
22332
23152
|
height: number().int(),
|
|
22333
|
-
copiedAt: number()
|
|
23153
|
+
copiedAt: number(),
|
|
23154
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23155
|
+
capturedAt: number().optional(),
|
|
23156
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23157
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23158
|
+
* a false positive. */
|
|
23159
|
+
complete: boolean(),
|
|
23160
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23161
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23162
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23163
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23164
|
+
collectionIds: array(string()).readonly().optional()
|
|
22334
23165
|
});
|
|
22335
23166
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22336
23167
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22351,6 +23182,53 @@ var RetrainFrameListSchema = object({
|
|
|
22351
23182
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22352
23183
|
autoPickMediaId: number().int().optional()
|
|
22353
23184
|
});
|
|
23185
|
+
/**
|
|
23186
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23187
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23188
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23189
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23190
|
+
* export carried (`exportedInBatch`).
|
|
23191
|
+
*/
|
|
23192
|
+
var RetrainExportFilterSchema = object({
|
|
23193
|
+
deviceIds: array(number()).optional(),
|
|
23194
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23195
|
+
/** Only frames in at least one of these named collections. */
|
|
23196
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23197
|
+
batchId: string().optional(),
|
|
23198
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23199
|
+
completeOnly: boolean().optional()
|
|
23200
|
+
});
|
|
23201
|
+
/**
|
|
23202
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23203
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23204
|
+
* convention — the classifier layout.
|
|
23205
|
+
*/
|
|
23206
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23207
|
+
/**
|
|
23208
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23209
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23210
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23211
|
+
* logged.
|
|
23212
|
+
*/
|
|
23213
|
+
var RetrainArchiveTargetSchema = object({
|
|
23214
|
+
kind: literal("http"),
|
|
23215
|
+
method: _enum(["PUT", "POST"]),
|
|
23216
|
+
url: string().url(),
|
|
23217
|
+
headers: record(string(), string()).optional()
|
|
23218
|
+
});
|
|
23219
|
+
var RetrainArchiveResultSchema = object({
|
|
23220
|
+
batchId: string(),
|
|
23221
|
+
frames: number().int(),
|
|
23222
|
+
crops: number().int(),
|
|
23223
|
+
annotations: number().int(),
|
|
23224
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23225
|
+
missing: number().int(),
|
|
23226
|
+
bytes: number().int(),
|
|
23227
|
+
/** sha256 of the exact bytes sent. */
|
|
23228
|
+
sha256: string(),
|
|
23229
|
+
/** The target's HTTP status. */
|
|
23230
|
+
status: number().int()
|
|
23231
|
+
});
|
|
22354
23232
|
/** What the operator asked the assist to look for. */
|
|
22355
23233
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22356
23234
|
kind: literal("package"),
|
|
@@ -22380,6 +23258,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22380
23258
|
reason: string(),
|
|
22381
23259
|
detail: string().optional()
|
|
22382
23260
|
})]);
|
|
23261
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23262
|
+
var RetrainCollectionSchema = object({
|
|
23263
|
+
id: string(),
|
|
23264
|
+
name: string(),
|
|
23265
|
+
createdAt: number(),
|
|
23266
|
+
frameCount: number().int()
|
|
23267
|
+
});
|
|
23268
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23269
|
+
kind: literal("created"),
|
|
23270
|
+
collection: RetrainCollectionSchema
|
|
23271
|
+
}), object({
|
|
23272
|
+
kind: literal("refused"),
|
|
23273
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23274
|
+
})]);
|
|
23275
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23276
|
+
kind: literal("renamed"),
|
|
23277
|
+
collection: RetrainCollectionSchema
|
|
23278
|
+
}), object({
|
|
23279
|
+
kind: literal("refused"),
|
|
23280
|
+
reason: _enum([
|
|
23281
|
+
"empty-name",
|
|
23282
|
+
"duplicate-name",
|
|
23283
|
+
"unknown-collection"
|
|
23284
|
+
])
|
|
23285
|
+
})]);
|
|
23286
|
+
/**
|
|
23287
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23288
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23289
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23290
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23291
|
+
*/
|
|
23292
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23293
|
+
kind: literal("added"),
|
|
23294
|
+
collectionId: string(),
|
|
23295
|
+
frame: RetrainFrameSchema,
|
|
23296
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23297
|
+
reused: boolean()
|
|
23298
|
+
}), object({
|
|
23299
|
+
kind: literal("refused"),
|
|
23300
|
+
reason: _enum([
|
|
23301
|
+
"unknown-collection",
|
|
23302
|
+
"still-unavailable",
|
|
23303
|
+
"still-busy",
|
|
23304
|
+
"unreadable-image",
|
|
23305
|
+
"write-failed"
|
|
23306
|
+
]),
|
|
23307
|
+
detail: string().optional()
|
|
23308
|
+
})]);
|
|
23309
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23310
|
+
var RetrainAssistProfileSchema = object({
|
|
23311
|
+
id: string(),
|
|
23312
|
+
name: string(),
|
|
23313
|
+
model: string(),
|
|
23314
|
+
kind: string(),
|
|
23315
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23316
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23317
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23318
|
+
leavesHouse: boolean()
|
|
23319
|
+
});
|
|
23320
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23321
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23322
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23323
|
+
var RetrainLlmReviewSchema = object({
|
|
23324
|
+
/** The `ref` the page sent the box under. */
|
|
23325
|
+
ref: string(),
|
|
23326
|
+
verdict: _enum([
|
|
23327
|
+
"confirmed",
|
|
23328
|
+
"wrong-class",
|
|
23329
|
+
"not-an-object",
|
|
23330
|
+
"uncertain"
|
|
23331
|
+
]),
|
|
23332
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23333
|
+
reason: string()
|
|
23334
|
+
});
|
|
23335
|
+
/**
|
|
23336
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23337
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23338
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23339
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23340
|
+
*/
|
|
23341
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23342
|
+
kind: literal("proposed"),
|
|
23343
|
+
profileId: string(),
|
|
23344
|
+
model: string(),
|
|
23345
|
+
/** The frame was sent outside the house for this answer. */
|
|
23346
|
+
leftHouse: boolean(),
|
|
23347
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23348
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23349
|
+
rejected: number().int()
|
|
23350
|
+
}), object({
|
|
23351
|
+
kind: literal("refused"),
|
|
23352
|
+
reason: _enum([
|
|
23353
|
+
"unknown-frame",
|
|
23354
|
+
"unreadable-frame",
|
|
23355
|
+
"unknown-profile",
|
|
23356
|
+
"profile-disabled",
|
|
23357
|
+
"no-vision",
|
|
23358
|
+
"cloud-not-confirmed",
|
|
23359
|
+
"llm-error",
|
|
23360
|
+
"malformed-answer"
|
|
23361
|
+
]),
|
|
23362
|
+
detail: string().optional()
|
|
23363
|
+
})]);
|
|
22383
23364
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22384
23365
|
var RetrainTransitionResultSchema = object({
|
|
22385
23366
|
trackId: string(),
|
|
@@ -23097,7 +24078,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23097
24078
|
auth: "admin"
|
|
23098
24079
|
}), method(object({
|
|
23099
24080
|
deviceId: number(),
|
|
23100
|
-
trackId: string(),
|
|
24081
|
+
trackId: string().optional(),
|
|
23101
24082
|
frameId: string()
|
|
23102
24083
|
}), object({
|
|
23103
24084
|
removed: boolean(),
|
|
@@ -23114,7 +24095,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23114
24095
|
auth: "admin"
|
|
23115
24096
|
}), method(object({
|
|
23116
24097
|
deviceId: number(),
|
|
23117
|
-
|
|
24098
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24099
|
+
trackId: string().optional(),
|
|
23118
24100
|
frameId: string(),
|
|
23119
24101
|
subject: RetrainAssistSubjectSchema,
|
|
23120
24102
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23122,12 +24104,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23122
24104
|
}), RetrainAssistResultSchema, {
|
|
23123
24105
|
kind: "mutation",
|
|
23124
24106
|
auth: "admin"
|
|
23125
|
-
}), method(object({
|
|
24107
|
+
}), method(object({
|
|
24108
|
+
trackId: string().optional(),
|
|
24109
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24110
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23126
24111
|
kind: "query",
|
|
23127
24112
|
auth: "admin"
|
|
23128
24113
|
}), method(object({
|
|
23129
24114
|
deviceId: number(),
|
|
23130
|
-
|
|
24115
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24116
|
+
trackId: string().optional(),
|
|
23131
24117
|
frameId: string(),
|
|
23132
24118
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23133
24119
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23145,7 +24131,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23145
24131
|
}), RetrainTransitionResultSchema, {
|
|
23146
24132
|
kind: "mutation",
|
|
23147
24133
|
auth: "admin"
|
|
23148
|
-
}), method(
|
|
24134
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24135
|
+
kind: "query",
|
|
24136
|
+
auth: "admin"
|
|
24137
|
+
}), method(object({
|
|
24138
|
+
deviceId: number(),
|
|
24139
|
+
trackId: string().optional(),
|
|
24140
|
+
frameId: string(),
|
|
24141
|
+
complete: boolean()
|
|
24142
|
+
}), RetrainFrameSchema, {
|
|
24143
|
+
kind: "mutation",
|
|
24144
|
+
auth: "admin"
|
|
24145
|
+
}), method(object({
|
|
24146
|
+
filter: RetrainExportFilterSchema,
|
|
24147
|
+
layout: RetrainExportLayoutSchema,
|
|
24148
|
+
target: RetrainArchiveTargetSchema
|
|
24149
|
+
}), RetrainArchiveResultSchema, {
|
|
24150
|
+
kind: "mutation",
|
|
24151
|
+
auth: "admin",
|
|
24152
|
+
timeoutMs: 60 * 6e4
|
|
24153
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24154
|
+
kind: "query",
|
|
24155
|
+
auth: "admin"
|
|
24156
|
+
}), method(object({
|
|
24157
|
+
deviceId: number(),
|
|
24158
|
+
trackId: string().optional(),
|
|
24159
|
+
frameId: string(),
|
|
24160
|
+
profileId: string(),
|
|
24161
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24162
|
+
boxes: array(object({
|
|
24163
|
+
ref: string(),
|
|
24164
|
+
bbox: RetrainBboxSchema,
|
|
24165
|
+
macroClass: RetrainMacroClassSchema,
|
|
24166
|
+
label: string().optional()
|
|
24167
|
+
})).max(50),
|
|
24168
|
+
allowCloud: boolean()
|
|
24169
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24170
|
+
kind: "mutation",
|
|
24171
|
+
auth: "admin",
|
|
24172
|
+
timeoutMs: 18e4
|
|
24173
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24174
|
+
kind: "mutation",
|
|
24175
|
+
auth: "admin"
|
|
24176
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24177
|
+
kind: "query",
|
|
24178
|
+
auth: "admin"
|
|
24179
|
+
}), method(object({
|
|
24180
|
+
id: string(),
|
|
24181
|
+
name: string().max(120)
|
|
24182
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24183
|
+
kind: "mutation",
|
|
24184
|
+
auth: "admin"
|
|
24185
|
+
}), method(object({ id: string() }), object({
|
|
24186
|
+
deleted: boolean(),
|
|
24187
|
+
removedFrames: number().int()
|
|
24188
|
+
}), {
|
|
24189
|
+
kind: "mutation",
|
|
24190
|
+
auth: "admin"
|
|
24191
|
+
}), method(object({
|
|
24192
|
+
collectionId: string(),
|
|
24193
|
+
deviceId: number(),
|
|
24194
|
+
epochMs: number()
|
|
24195
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24196
|
+
kind: "mutation",
|
|
24197
|
+
auth: "admin",
|
|
24198
|
+
timeoutMs: 6e4
|
|
24199
|
+
}), method(object({
|
|
24200
|
+
collectionId: string(),
|
|
24201
|
+
frameIds: array(string()).min(1).max(500)
|
|
24202
|
+
}), object({
|
|
24203
|
+
added: number().int(),
|
|
24204
|
+
alreadyMember: number().int(),
|
|
24205
|
+
unknownFrameIds: array(string()).readonly()
|
|
24206
|
+
}), {
|
|
24207
|
+
kind: "mutation",
|
|
24208
|
+
auth: "admin"
|
|
24209
|
+
}), method(object({
|
|
24210
|
+
collectionId: string(),
|
|
24211
|
+
frameId: string()
|
|
24212
|
+
}), object({
|
|
24213
|
+
removed: boolean(),
|
|
24214
|
+
deletedFrame: boolean()
|
|
24215
|
+
}), {
|
|
24216
|
+
kind: "mutation",
|
|
24217
|
+
auth: "admin"
|
|
24218
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
23149
24219
|
kind: "query",
|
|
23150
24220
|
auth: "admin"
|
|
23151
24221
|
}), method(object({
|
|
@@ -23273,7 +24343,7 @@ var FrameRefSchema = object({
|
|
|
23273
24343
|
timestamp: number(),
|
|
23274
24344
|
capturedAt: number().optional()
|
|
23275
24345
|
});
|
|
23276
|
-
var ModelFormatSchema$
|
|
24346
|
+
var ModelFormatSchema$2 = _enum([
|
|
23277
24347
|
"onnx",
|
|
23278
24348
|
"coreml",
|
|
23279
24349
|
"openvino",
|
|
@@ -23291,7 +24361,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23291
24361
|
var PipelineEngineChoiceSchema = object({
|
|
23292
24362
|
runtime: literal("python"),
|
|
23293
24363
|
backend: string(),
|
|
23294
|
-
format: ModelFormatSchema$
|
|
24364
|
+
format: ModelFormatSchema$2,
|
|
23295
24365
|
device: string().optional()
|
|
23296
24366
|
});
|
|
23297
24367
|
/**
|
|
@@ -23330,28 +24400,10 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23330
24400
|
group: string().optional(),
|
|
23331
24401
|
settings: record(string(), unknown()).optional()
|
|
23332
24402
|
}));
|
|
23333
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23334
|
-
addonId: string(),
|
|
23335
|
-
enabled: boolean(),
|
|
23336
|
-
modelId: string(),
|
|
23337
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23338
|
-
settings: record(string(), unknown()).optional()
|
|
23339
|
-
}));
|
|
23340
|
-
var PipelineTemplateSchema$1 = object({
|
|
23341
|
-
id: string(),
|
|
23342
|
-
name: string(),
|
|
23343
|
-
createdAt: string(),
|
|
23344
|
-
updatedAt: string(),
|
|
23345
|
-
engine: PipelineEngineChoiceSchema,
|
|
23346
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23347
|
-
});
|
|
23348
24403
|
var PipelineModelOptionSchema = object({
|
|
23349
24404
|
id: string(),
|
|
23350
24405
|
name: string(),
|
|
23351
|
-
formats: record(string(),
|
|
23352
|
-
downloaded: boolean(),
|
|
23353
|
-
sizeMB: number()
|
|
23354
|
-
})),
|
|
24406
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23355
24407
|
group: ModelVariantGroupSchema.optional(),
|
|
23356
24408
|
legacy: boolean().optional(),
|
|
23357
24409
|
provider: ModelProviderIdSchema.optional(),
|
|
@@ -23518,6 +24570,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23518
24570
|
}), {
|
|
23519
24571
|
kind: "mutation",
|
|
23520
24572
|
auth: "admin"
|
|
24573
|
+
}), method(object({
|
|
24574
|
+
nodeId: string(),
|
|
24575
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24576
|
+
dryRun: boolean()
|
|
24577
|
+
}), object({
|
|
24578
|
+
entries: array(object({
|
|
24579
|
+
deviceId: number(),
|
|
24580
|
+
keys: array(string()).readonly()
|
|
24581
|
+
})).readonly(),
|
|
24582
|
+
refused: array(object({
|
|
24583
|
+
deviceId: number(),
|
|
24584
|
+
reason: string()
|
|
24585
|
+
})).readonly()
|
|
24586
|
+
}), {
|
|
24587
|
+
kind: "mutation",
|
|
24588
|
+
auth: "admin"
|
|
23521
24589
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23522
24590
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23523
24591
|
deviceKey: string(),
|
|
@@ -23543,22 +24611,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23543
24611
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23544
24612
|
steps: array(PipelineStepInputSchema),
|
|
23545
24613
|
deviceKey: string().optional()
|
|
23546
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23547
|
-
name: string(),
|
|
23548
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23549
|
-
engine: PipelineEngineChoiceSchema
|
|
23550
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23551
|
-
id: string(),
|
|
23552
|
-
name: string().optional(),
|
|
23553
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23554
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24614
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23555
24615
|
addonId: string(),
|
|
23556
24616
|
modelId: string(),
|
|
23557
|
-
format: ModelFormatSchema$
|
|
24617
|
+
format: ModelFormatSchema$2
|
|
23558
24618
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23559
24619
|
addonId: string(),
|
|
23560
24620
|
modelId: string(),
|
|
23561
|
-
format: ModelFormatSchema$
|
|
24621
|
+
format: ModelFormatSchema$2
|
|
23562
24622
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23563
24623
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23564
24624
|
frame: FrameInputSchema.optional(),
|
|
@@ -23715,6 +24775,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23715
24775
|
filename: string().optional(),
|
|
23716
24776
|
settings: record(string(), unknown()).optional()
|
|
23717
24777
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
24778
|
+
/**
|
|
24779
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
24780
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
24781
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
24782
|
+
* schemas are what crosses the cap boundary.
|
|
24783
|
+
*/
|
|
24784
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
24785
|
+
/** The operator's range for it. */
|
|
24786
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
24787
|
+
min: 1,
|
|
24788
|
+
max: 8
|
|
24789
|
+
};
|
|
24790
|
+
var HardwareClassIdSchema = _enum([
|
|
24791
|
+
"intel-core-ultra",
|
|
24792
|
+
"intel-n-series",
|
|
24793
|
+
"apple-m-base",
|
|
24794
|
+
"apple-m-pro",
|
|
24795
|
+
"unknown"
|
|
24796
|
+
]);
|
|
24797
|
+
var AcceleratorKindSchema = _enum([
|
|
24798
|
+
"intel-npu",
|
|
24799
|
+
"intel-igpu",
|
|
24800
|
+
"x86-cpu",
|
|
24801
|
+
"arm-cpu",
|
|
24802
|
+
"apple-ane",
|
|
24803
|
+
"coral"
|
|
24804
|
+
]);
|
|
24805
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
24806
|
+
object({
|
|
24807
|
+
kind: literal("capacity"),
|
|
24808
|
+
sessions: number(),
|
|
24809
|
+
minSessions: number()
|
|
24810
|
+
}),
|
|
24811
|
+
object({
|
|
24812
|
+
kind: literal("tie-faster"),
|
|
24813
|
+
over: string(),
|
|
24814
|
+
recallDelta: number()
|
|
24815
|
+
}),
|
|
24816
|
+
object({
|
|
24817
|
+
kind: literal("stepped-down"),
|
|
24818
|
+
from: string(),
|
|
24819
|
+
to: string(),
|
|
24820
|
+
limitedBy: string()
|
|
24821
|
+
}),
|
|
24822
|
+
object({
|
|
24823
|
+
kind: literal("no-fit-lightest"),
|
|
24824
|
+
sessions: number(),
|
|
24825
|
+
minSessions: number()
|
|
24826
|
+
}),
|
|
24827
|
+
object({
|
|
24828
|
+
kind: literal("derived-latency"),
|
|
24829
|
+
modelId: string()
|
|
24830
|
+
}),
|
|
24831
|
+
object({ kind: literal("cpu-device") }),
|
|
24832
|
+
object({ kind: literal("coral-untouched") }),
|
|
24833
|
+
object({ kind: literal("device-disabled") }),
|
|
24834
|
+
object({ kind: literal("device-unavailable") }),
|
|
24835
|
+
object({ kind: literal("node-offline") }),
|
|
24836
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
24837
|
+
object({
|
|
24838
|
+
kind: literal("no-measured-data"),
|
|
24839
|
+
hardwareClass: HardwareClassIdSchema
|
|
24840
|
+
}),
|
|
24841
|
+
object({
|
|
24842
|
+
kind: literal("no-family-build"),
|
|
24843
|
+
format: ModelFormatSchema$1
|
|
24844
|
+
}),
|
|
24845
|
+
object({
|
|
24846
|
+
kind: literal("kept-custom-pin"),
|
|
24847
|
+
modelId: string(),
|
|
24848
|
+
deviceKey: string()
|
|
24849
|
+
})
|
|
24850
|
+
]);
|
|
24851
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
24852
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
24853
|
+
/**
|
|
24854
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
24855
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
24856
|
+
*/
|
|
24857
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
24858
|
+
kind: literal("node-benchmark"),
|
|
24859
|
+
resultId: string(),
|
|
24860
|
+
measuredAtMs: number()
|
|
24861
|
+
})]);
|
|
24862
|
+
var DeviceModelChoiceSchema = object({
|
|
24863
|
+
modelId: string(),
|
|
24864
|
+
p50Ms: number(),
|
|
24865
|
+
fps: number(),
|
|
24866
|
+
measured: boolean(),
|
|
24867
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
24868
|
+
source: LatencySourceSchema.optional(),
|
|
24869
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
24870
|
+
capacitySessions: number(),
|
|
24871
|
+
personRecall: number()
|
|
24872
|
+
});
|
|
24873
|
+
var DeviceRecommendationSchema = object({
|
|
24874
|
+
deviceKey: string(),
|
|
24875
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
24876
|
+
enabled: boolean(),
|
|
24877
|
+
available: boolean(),
|
|
24878
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
24879
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
24880
|
+
kept: KeptReasonSchema.optional(),
|
|
24881
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24882
|
+
});
|
|
24883
|
+
var NodeRecommendationSchema = object({
|
|
24884
|
+
nodeId: string(),
|
|
24885
|
+
reachable: boolean(),
|
|
24886
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
24887
|
+
cpuModel: string().nullable(),
|
|
24888
|
+
skipped: boolean(),
|
|
24889
|
+
acceleratorModelId: string().nullable(),
|
|
24890
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
24891
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24892
|
+
});
|
|
24893
|
+
var ModelPinChangeSchema = object({
|
|
24894
|
+
stepId: string(),
|
|
24895
|
+
before: string().nullable(),
|
|
24896
|
+
after: string().nullable()
|
|
24897
|
+
});
|
|
24898
|
+
var NodeDeviceChangeSchema = object({
|
|
24899
|
+
nodeId: string(),
|
|
24900
|
+
deviceKey: string(),
|
|
24901
|
+
madeExplicit: boolean(),
|
|
24902
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
24903
|
+
thresholds: array(object({
|
|
24904
|
+
stepId: string(),
|
|
24905
|
+
keys: array(string()).readonly()
|
|
24906
|
+
})).readonly()
|
|
24907
|
+
});
|
|
24908
|
+
var CameraOverrideClearSchema = object({
|
|
24909
|
+
deviceId: number(),
|
|
24910
|
+
source: _enum(["step-override", "wholesale"]),
|
|
24911
|
+
nodeId: string(),
|
|
24912
|
+
deviceKey: string().nullable(),
|
|
24913
|
+
stepId: string(),
|
|
24914
|
+
modelIdBefore: string().nullable(),
|
|
24915
|
+
keys: array(string()).readonly()
|
|
24916
|
+
});
|
|
24917
|
+
var DetectorStoreClearSchema = object({
|
|
24918
|
+
deviceId: number(),
|
|
24919
|
+
keys: array(string()).readonly()
|
|
24920
|
+
});
|
|
24921
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
24922
|
+
object({
|
|
24923
|
+
kind: literal("detector-store-cluster-wide"),
|
|
24924
|
+
skippedNodes: array(string()).readonly()
|
|
24925
|
+
}),
|
|
24926
|
+
object({
|
|
24927
|
+
kind: literal("detector-store-unreadable"),
|
|
24928
|
+
error: string()
|
|
24929
|
+
}),
|
|
24930
|
+
object({
|
|
24931
|
+
kind: literal("coral-enabled"),
|
|
24932
|
+
nodeId: string(),
|
|
24933
|
+
deviceKey: string()
|
|
24934
|
+
}),
|
|
24935
|
+
object({
|
|
24936
|
+
kind: literal("custom-pin-kept"),
|
|
24937
|
+
nodeId: string(),
|
|
24938
|
+
deviceKey: string().nullable(),
|
|
24939
|
+
deviceId: number().nullable(),
|
|
24940
|
+
modelId: string()
|
|
24941
|
+
}),
|
|
24942
|
+
object({
|
|
24943
|
+
kind: literal("custom-registry-unreadable"),
|
|
24944
|
+
error: string()
|
|
24945
|
+
})
|
|
24946
|
+
]);
|
|
24947
|
+
var AutoTuneOptionsSchema = object({
|
|
24948
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
24949
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24950
|
+
/**
|
|
24951
|
+
* The least number of parallel sessions every device must sustain at the
|
|
24952
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
24953
|
+
* that reaches it wins.
|
|
24954
|
+
*/
|
|
24955
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24956
|
+
});
|
|
24957
|
+
var AutoTunePlanSchema = object({
|
|
24958
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
24959
|
+
planHash: string(),
|
|
24960
|
+
family: literal("yolov9"),
|
|
24961
|
+
headroom: number(),
|
|
24962
|
+
minSessionsPerDevice: number(),
|
|
24963
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
24964
|
+
cameraFps: number(),
|
|
24965
|
+
generatedAt: number(),
|
|
24966
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
24967
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
24968
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
24969
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
24970
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
24971
|
+
});
|
|
24972
|
+
var AutoTuneApplyInputSchema = object({
|
|
24973
|
+
planHash: string(),
|
|
24974
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24975
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24976
|
+
});
|
|
24977
|
+
var AutoTunePhaseResultSchema = object({
|
|
24978
|
+
phase: _enum([
|
|
24979
|
+
"download",
|
|
24980
|
+
"camera-overrides",
|
|
24981
|
+
"detector-thresholds",
|
|
24982
|
+
"node-models",
|
|
24983
|
+
"redispatch"
|
|
24984
|
+
]),
|
|
24985
|
+
ok: boolean(),
|
|
24986
|
+
detail: string()
|
|
24987
|
+
});
|
|
24988
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
24989
|
+
object({
|
|
24990
|
+
kind: literal("applied"),
|
|
24991
|
+
planHash: string(),
|
|
24992
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24993
|
+
}),
|
|
24994
|
+
object({
|
|
24995
|
+
kind: literal("aborted"),
|
|
24996
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24997
|
+
}),
|
|
24998
|
+
object({
|
|
24999
|
+
kind: literal("stale"),
|
|
25000
|
+
plan: AutoTunePlanSchema
|
|
25001
|
+
}),
|
|
25002
|
+
object({
|
|
25003
|
+
kind: literal("refused"),
|
|
25004
|
+
reason: _enum(["apply-in-progress"])
|
|
25005
|
+
})
|
|
25006
|
+
]);
|
|
25007
|
+
/**
|
|
25008
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
25009
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
25010
|
+
* hardware share suggestion and the stale device pins.
|
|
25011
|
+
*/
|
|
25012
|
+
/**
|
|
25013
|
+
* How a new detection session picks its node and device.
|
|
25014
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
25015
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
25016
|
+
* weight only bites once a node already holds a session.
|
|
25017
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
25018
|
+
* full or drowning node yields to a free one (D748).
|
|
25019
|
+
*/
|
|
25020
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
25021
|
+
var LoadBalancingSharesInputSchema = object({
|
|
25022
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
25023
|
+
nodes: record(string(), number().positive()).default({}),
|
|
25024
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
25025
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
25026
|
+
});
|
|
25027
|
+
var PlacementStatsInputSchema = object({
|
|
25028
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
25029
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
25030
|
+
var PlacementDeviceStatsSchema = object({
|
|
25031
|
+
deviceKey: string(),
|
|
25032
|
+
/** Sessions running on this device now. */
|
|
25033
|
+
sessionsNow: number(),
|
|
25034
|
+
/** Sessions started on this device inside the window. */
|
|
25035
|
+
sessionsStarted: number(),
|
|
25036
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
25037
|
+
observedShare: number().nullable()
|
|
25038
|
+
});
|
|
25039
|
+
var PlacementNodeStatsSchema = object({
|
|
25040
|
+
nodeId: string(),
|
|
25041
|
+
sessionsNow: number(),
|
|
25042
|
+
sessionsStarted: number(),
|
|
25043
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
25044
|
+
observedShare: number().nullable(),
|
|
25045
|
+
/** Most sessions this node ran at once inside the window. */
|
|
25046
|
+
peakSessions: number(),
|
|
25047
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
25048
|
+
yieldsAway: number(),
|
|
25049
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
25050
|
+
});
|
|
25051
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
25052
|
+
var StaleDevicePinSchema = object({
|
|
25053
|
+
deviceId: number(),
|
|
25054
|
+
deviceKey: string(),
|
|
25055
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
25056
|
+
reason: _enum(["disabled", "absent"])
|
|
25057
|
+
});
|
|
25058
|
+
var PlacementStatsSchema = object({
|
|
25059
|
+
policy: SessionPlacementPolicySchema,
|
|
25060
|
+
windowMs: number(),
|
|
25061
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
25062
|
+
observedForMs: number(),
|
|
25063
|
+
sessionsNow: number(),
|
|
25064
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
25065
|
+
clusterPeakSessions: number(),
|
|
25066
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
25067
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
25068
|
+
});
|
|
25069
|
+
/**
|
|
25070
|
+
* Where an automatic share's capacity comes from (D755).
|
|
25071
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
25072
|
+
* the measured latency table for the node's hardware class.
|
|
25073
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
25074
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
25075
|
+
*/
|
|
25076
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
25077
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
25078
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
25079
|
+
var SuggestSharesInputSchema = object({
|
|
25080
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
25081
|
+
/** Default `hardware`. */
|
|
25082
|
+
source: CapacitySourceSchema.default("hardware")
|
|
25083
|
+
});
|
|
25084
|
+
var SuggestedDeviceShareSchema = object({
|
|
25085
|
+
deviceKey: string(),
|
|
25086
|
+
/** Share of the node (0–100, rounded). */
|
|
25087
|
+
share: number(),
|
|
25088
|
+
modelId: string().nullable(),
|
|
25089
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
25090
|
+
fps: number().nullable(),
|
|
25091
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
25092
|
+
measured: boolean(),
|
|
25093
|
+
/**
|
|
25094
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
25095
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
25096
|
+
*/
|
|
25097
|
+
suggestedMaxSessions: number().nullable()
|
|
25098
|
+
});
|
|
25099
|
+
var SuggestedNodeShareSchema = object({
|
|
25100
|
+
nodeId: string(),
|
|
25101
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
25102
|
+
share: number().nullable(),
|
|
25103
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
25104
|
+
capacitySessions: number(),
|
|
25105
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
25106
|
+
skippedReason: string().nullable(),
|
|
25107
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25108
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25109
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25110
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25111
|
+
});
|
|
25112
|
+
var SuggestSharesResultSchema = object({
|
|
25113
|
+
headroom: number(),
|
|
25114
|
+
/** The source asked for; each node says what it actually used. */
|
|
25115
|
+
source: CapacitySourceSchema,
|
|
25116
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25117
|
+
cameraFps: number(),
|
|
25118
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25119
|
+
minSessionsPerDevice: number(),
|
|
25120
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25121
|
+
});
|
|
25122
|
+
/**
|
|
25123
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25124
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25125
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25126
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25127
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25128
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25129
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25130
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25131
|
+
* - `manual` — the operator's stored sliders.
|
|
25132
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25133
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25134
|
+
*/
|
|
25135
|
+
var ShareSourceSchema = _enum([
|
|
25136
|
+
"hardware",
|
|
25137
|
+
"benchmark",
|
|
25138
|
+
"manual"
|
|
25139
|
+
]);
|
|
25140
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25141
|
+
object({
|
|
25142
|
+
nodes: record(string(), number()),
|
|
25143
|
+
devices: record(string(), record(string(), number()))
|
|
25144
|
+
});
|
|
25145
|
+
var EffectiveDeviceShareSchema = object({
|
|
25146
|
+
deviceKey: string(),
|
|
25147
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25148
|
+
eligible: boolean(),
|
|
25149
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25150
|
+
configuredPct: number(),
|
|
25151
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25152
|
+
effectivePct: number()
|
|
25153
|
+
});
|
|
25154
|
+
var EffectiveNodeShareSchema = object({
|
|
25155
|
+
nodeId: string(),
|
|
25156
|
+
eligible: boolean(),
|
|
25157
|
+
configuredPct: number(),
|
|
25158
|
+
effectivePct: number(),
|
|
25159
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25160
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25161
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25162
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25163
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25164
|
+
});
|
|
25165
|
+
var EffectiveSharesSchema = object({
|
|
25166
|
+
source: ShareSourceSchema,
|
|
25167
|
+
policy: SessionPlacementPolicySchema,
|
|
25168
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25169
|
+
autoPending: boolean(),
|
|
25170
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25171
|
+
computedAt: number().nullable(),
|
|
25172
|
+
/** What made the system recompute them last. */
|
|
25173
|
+
trigger: string().nullable(),
|
|
25174
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25175
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25176
|
+
nodeWeights: record(string(), number()),
|
|
25177
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25178
|
+
});
|
|
25179
|
+
/**
|
|
25180
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25181
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25182
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25183
|
+
* shares read.
|
|
25184
|
+
*
|
|
25185
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25186
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25187
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25188
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25189
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25190
|
+
*
|
|
25191
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25192
|
+
* cross a process at frame rate, D9):
|
|
25193
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25194
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25195
|
+
* interval;
|
|
25196
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25197
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25198
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25199
|
+
* CPU, RAM or the event loop give out.
|
|
25200
|
+
*/
|
|
25201
|
+
/** Defaults and bounds, one place. */
|
|
25202
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25203
|
+
fpsPerStream: 10,
|
|
25204
|
+
budgetMinutes: 45,
|
|
25205
|
+
minBudgetMinutes: 10,
|
|
25206
|
+
maxBudgetMinutes: 120,
|
|
25207
|
+
/** A result older than this no longer beats the table. */
|
|
25208
|
+
staleAfterDays: 30,
|
|
25209
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25210
|
+
settleSec: 5,
|
|
25211
|
+
/** Accounted window per ramp step. */
|
|
25212
|
+
measureSec: 20,
|
|
25213
|
+
/** Longest the drain may take before the run is refused. */
|
|
25214
|
+
drainTimeoutSec: 120,
|
|
25215
|
+
/** Candidate models per device in one run. */
|
|
25216
|
+
maxModelsPerDevice: 6
|
|
25217
|
+
};
|
|
25218
|
+
/** The two measurements a run can make. */
|
|
25219
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25220
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25221
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25222
|
+
deviceKey: string().min(1),
|
|
25223
|
+
/**
|
|
25224
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25225
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25226
|
+
*/
|
|
25227
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25228
|
+
});
|
|
25229
|
+
/** What the operator confirmed. */
|
|
25230
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25231
|
+
nodeId: string().min(1),
|
|
25232
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25233
|
+
/** Which measurements run. At least one. */
|
|
25234
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25235
|
+
/**
|
|
25236
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25237
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25238
|
+
* detector always runs.
|
|
25239
|
+
*/
|
|
25240
|
+
steps: array(string().min(1)).default([]),
|
|
25241
|
+
/** Offered rate of one stream / session. */
|
|
25242
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25243
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25244
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25245
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25246
|
+
keepDownloadedModels: boolean().default(false),
|
|
25247
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25248
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25249
|
+
});
|
|
25250
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25251
|
+
kind: _enum([
|
|
25252
|
+
"benchmark-active",
|
|
25253
|
+
"node-offline",
|
|
25254
|
+
"unknown-device",
|
|
25255
|
+
"no-phase",
|
|
25256
|
+
"insufficient-headroom"
|
|
25257
|
+
]),
|
|
25258
|
+
detail: string(),
|
|
25259
|
+
overridable: boolean()
|
|
25260
|
+
});
|
|
25261
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25262
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25263
|
+
deviceId: number(),
|
|
25264
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25265
|
+
placedOnNode: boolean(),
|
|
25266
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25267
|
+
pinnedToNode: boolean()
|
|
25268
|
+
});
|
|
25269
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25270
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25271
|
+
deviceId: number(),
|
|
25272
|
+
reason: literal("only-frame-source")
|
|
25273
|
+
});
|
|
25274
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25275
|
+
nodeId: string(),
|
|
25276
|
+
online: boolean(),
|
|
25277
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25278
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25279
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25280
|
+
estimatedDurationMs: number(),
|
|
25281
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25282
|
+
budgetMs: number(),
|
|
25283
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25284
|
+
steps: array(string()).readonly(),
|
|
25285
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25286
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25287
|
+
headroom: object({
|
|
25288
|
+
sessionsNow: number(),
|
|
25289
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25290
|
+
}),
|
|
25291
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25292
|
+
canStart: boolean()
|
|
25293
|
+
});
|
|
25294
|
+
/** Where the measuring runner is. */
|
|
25295
|
+
var NodeBenchProgressSchema = object({
|
|
25296
|
+
phase: _enum([
|
|
25297
|
+
"preparing",
|
|
25298
|
+
"device",
|
|
25299
|
+
"pipeline",
|
|
25300
|
+
"cleanup"
|
|
25301
|
+
]),
|
|
25302
|
+
deviceKey: string().nullable(),
|
|
25303
|
+
modelId: string().nullable(),
|
|
25304
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25305
|
+
load: number().nullable(),
|
|
25306
|
+
cellsDone: number(),
|
|
25307
|
+
cellsTotal: number(),
|
|
25308
|
+
message: string()
|
|
25309
|
+
});
|
|
25310
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25311
|
+
var NodeBenchLimitSchema = _enum([
|
|
25312
|
+
"p95",
|
|
25313
|
+
"drops",
|
|
25314
|
+
"errors",
|
|
25315
|
+
"stall",
|
|
25316
|
+
"cpu",
|
|
25317
|
+
"ram",
|
|
25318
|
+
"none"
|
|
25319
|
+
]);
|
|
25320
|
+
var NodeBenchRampStepSchema = object({
|
|
25321
|
+
load: number(),
|
|
25322
|
+
pass: boolean(),
|
|
25323
|
+
p95Ms: number(),
|
|
25324
|
+
dropRatio: number(),
|
|
25325
|
+
/** Completed frames per second over the accounted window. */
|
|
25326
|
+
fps: number(),
|
|
25327
|
+
cpuPct: number().nullable(),
|
|
25328
|
+
ramFreePct: number().nullable(),
|
|
25329
|
+
failReasons: array(string()).readonly()
|
|
25330
|
+
});
|
|
25331
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25332
|
+
phase: literal("device"),
|
|
25333
|
+
deviceKey: string(),
|
|
25334
|
+
modelId: string(),
|
|
25335
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25336
|
+
p50Ms: number(),
|
|
25337
|
+
p95Ms: number(),
|
|
25338
|
+
p99Ms: number(),
|
|
25339
|
+
/** Frames per second sustained at the last passing step. */
|
|
25340
|
+
fps: number(),
|
|
25341
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25342
|
+
kMax: number(),
|
|
25343
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25344
|
+
/** First call (model load + warm-up). */
|
|
25345
|
+
warmupMs: number(),
|
|
25346
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25347
|
+
}), object({
|
|
25348
|
+
phase: literal("pipeline"),
|
|
25349
|
+
deviceKey: string(),
|
|
25350
|
+
modelId: string(),
|
|
25351
|
+
steps: array(string()).readonly(),
|
|
25352
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25353
|
+
maxSessions: number(),
|
|
25354
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25355
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25356
|
+
stepsFired: array(string()).readonly(),
|
|
25357
|
+
warmupMs: number(),
|
|
25358
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25359
|
+
})]);
|
|
25360
|
+
/**
|
|
25361
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25362
|
+
* the node no longer beats the table.
|
|
25363
|
+
*/
|
|
25364
|
+
var NodeBenchFingerprintSchema = object({
|
|
25365
|
+
pipelineVersion: string().nullable(),
|
|
25366
|
+
cpuModel: string().nullable(),
|
|
25367
|
+
ramGb: number().nullable(),
|
|
25368
|
+
os: string().nullable(),
|
|
25369
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25370
|
+
pools: record(string(), object({
|
|
25371
|
+
runtime: string(),
|
|
25372
|
+
numWorkers: number(),
|
|
25373
|
+
concurrency: number(),
|
|
25374
|
+
batchMode: string()
|
|
25375
|
+
})).default({})
|
|
25376
|
+
});
|
|
25377
|
+
/** The frames the run used. */
|
|
25378
|
+
var NodeBenchClipSchema = object({
|
|
25379
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25380
|
+
id: string(),
|
|
25381
|
+
revision: string().nullable(),
|
|
25382
|
+
frames: number(),
|
|
25383
|
+
width: number(),
|
|
25384
|
+
height: number()
|
|
25385
|
+
});
|
|
25386
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25387
|
+
runId: string().min(1),
|
|
25388
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25389
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25390
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25391
|
+
steps: array(string()).default([]),
|
|
25392
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25393
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25394
|
+
deadlineAtMs: number(),
|
|
25395
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25396
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25397
|
+
keepDownloadedModels: boolean().default(false)
|
|
25398
|
+
});
|
|
25399
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25400
|
+
"running",
|
|
25401
|
+
"done",
|
|
25402
|
+
"failed",
|
|
25403
|
+
"aborted"
|
|
25404
|
+
]);
|
|
25405
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25406
|
+
runId: string(),
|
|
25407
|
+
nodeId: string(),
|
|
25408
|
+
state: NodeBenchRunnerStateSchema,
|
|
25409
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25410
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25411
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25412
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25413
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25414
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25415
|
+
activeCameraIds: array(number()).readonly(),
|
|
25416
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25417
|
+
deletedModels: array(string()).readonly(),
|
|
25418
|
+
error: string().nullable(),
|
|
25419
|
+
startedAtMs: number(),
|
|
25420
|
+
finishedAtMs: number().nullable()
|
|
25421
|
+
});
|
|
25422
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25423
|
+
"draining",
|
|
25424
|
+
"measuring",
|
|
25425
|
+
"restoring",
|
|
25426
|
+
"done",
|
|
25427
|
+
"failed",
|
|
25428
|
+
"aborted"
|
|
25429
|
+
]);
|
|
25430
|
+
/** Why a run ended. */
|
|
25431
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25432
|
+
"completed",
|
|
25433
|
+
"operator-abort",
|
|
25434
|
+
"deadline",
|
|
25435
|
+
"node-lost",
|
|
25436
|
+
"runner-lost",
|
|
25437
|
+
"hub-restart",
|
|
25438
|
+
"drain-timeout",
|
|
25439
|
+
"failed"
|
|
25440
|
+
]);
|
|
25441
|
+
var NodeBenchmarkRunSchema = object({
|
|
25442
|
+
runId: string(),
|
|
25443
|
+
nodeId: string(),
|
|
25444
|
+
state: NodeBenchmarkStateSchema,
|
|
25445
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25446
|
+
startedAtMs: number(),
|
|
25447
|
+
deadlineAtMs: number(),
|
|
25448
|
+
finishedAtMs: number().nullable(),
|
|
25449
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25450
|
+
error: string().nullable(),
|
|
25451
|
+
/** Cameras moved off the node for the run. */
|
|
25452
|
+
moved: array(number()).readonly(),
|
|
25453
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25454
|
+
staying: array(number()).readonly(),
|
|
25455
|
+
/** Something else ran on the node's pools during the run. */
|
|
25456
|
+
contaminated: boolean(),
|
|
25457
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25458
|
+
resultIds: array(string()).readonly()
|
|
25459
|
+
});
|
|
25460
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25461
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25462
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25463
|
+
modeNodeId: string().nullable(),
|
|
25464
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25465
|
+
});
|
|
25466
|
+
/**
|
|
25467
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25468
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25469
|
+
* ends, never by anyone else.
|
|
25470
|
+
*/
|
|
25471
|
+
var NodeBenchmarkResultSchema = object({
|
|
25472
|
+
id: string(),
|
|
25473
|
+
runId: string(),
|
|
25474
|
+
nodeId: string(),
|
|
25475
|
+
cell: NodeBenchCellSchema,
|
|
25476
|
+
fpsPerStream: number(),
|
|
25477
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25478
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25479
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25480
|
+
contaminated: boolean(),
|
|
25481
|
+
stayingCameras: array(number()).readonly(),
|
|
25482
|
+
/** The run ended early; the cell itself completed. */
|
|
25483
|
+
partialRun: boolean(),
|
|
25484
|
+
measuredAtMs: number()
|
|
25485
|
+
});
|
|
25486
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25487
|
+
nodeId: string().optional(),
|
|
25488
|
+
deviceKey: string().optional()
|
|
25489
|
+
});
|
|
25490
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25491
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25492
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25493
|
+
standing: _enum([
|
|
25494
|
+
"fresh",
|
|
25495
|
+
"stale",
|
|
25496
|
+
"superseded"
|
|
25497
|
+
]),
|
|
25498
|
+
staleWhy: _enum([
|
|
25499
|
+
"age",
|
|
25500
|
+
"runtime",
|
|
25501
|
+
"pool-tuning"
|
|
25502
|
+
]).nullable()
|
|
25503
|
+
});
|
|
25504
|
+
object({
|
|
25505
|
+
runId: string(),
|
|
25506
|
+
nodeId: string(),
|
|
25507
|
+
startedAtMs: number(),
|
|
25508
|
+
deadlineAtMs: number(),
|
|
25509
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25510
|
+
moved: array(number()).readonly(),
|
|
25511
|
+
staying: array(number()).readonly()
|
|
25512
|
+
});
|
|
25513
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25514
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25515
|
+
nodeId: string(),
|
|
25516
|
+
reachable: boolean(),
|
|
25517
|
+
devices: array(object({
|
|
25518
|
+
deviceKey: string(),
|
|
25519
|
+
enabled: boolean(),
|
|
25520
|
+
available: boolean(),
|
|
25521
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25522
|
+
suggested: array(string()).readonly(),
|
|
25523
|
+
/** Every root detector the device has a build for. */
|
|
25524
|
+
all: array(string()).readonly(),
|
|
25525
|
+
/** The model the device runs now, when pinned. */
|
|
25526
|
+
currentModelId: string().nullable()
|
|
25527
|
+
})).readonly(),
|
|
25528
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25529
|
+
steps: array(object({
|
|
25530
|
+
id: string(),
|
|
25531
|
+
name: string(),
|
|
25532
|
+
slot: string()
|
|
25533
|
+
})).readonly()
|
|
25534
|
+
});
|
|
23718
25535
|
object({
|
|
23719
25536
|
activeCameras: number(),
|
|
23720
25537
|
throttledCameras: number(),
|
|
@@ -24592,14 +26409,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24592
26409
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24593
26410
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24594
26411
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24595
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24596
|
-
* per
|
|
26412
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26413
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26414
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26415
|
+
* (D762).
|
|
24597
26416
|
*/
|
|
24598
26417
|
devices: array(object({
|
|
24599
26418
|
deviceKey: string(),
|
|
24600
26419
|
backend: string(),
|
|
24601
|
-
attachedCameras: number()
|
|
24602
|
-
queueDepthTotal: number()
|
|
26420
|
+
attachedCameras: number()
|
|
24603
26421
|
})).default([]),
|
|
24604
26422
|
/** Hardware capability flags reported by this node. */
|
|
24605
26423
|
hardware: object({
|
|
@@ -24802,7 +26620,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24802
26620
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
24803
26621
|
deviceId: number(),
|
|
24804
26622
|
trackId: string()
|
|
24805
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
26623
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
26624
|
+
accepted: literal(true),
|
|
26625
|
+
runId: string()
|
|
26626
|
+
}), {
|
|
26627
|
+
kind: "mutation",
|
|
26628
|
+
auth: "admin"
|
|
26629
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
26630
|
+
kind: "mutation",
|
|
26631
|
+
auth: "admin"
|
|
26632
|
+
});
|
|
24806
26633
|
var CameraPipelineConfigSchema = object({
|
|
24807
26634
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
24808
26635
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24813,14 +26640,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
24813
26640
|
settings: record(string(), unknown()).readonly().optional()
|
|
24814
26641
|
}).nullable().optional()
|
|
24815
26642
|
});
|
|
24816
|
-
var PipelineTemplateSchema = object({
|
|
24817
|
-
id: string(),
|
|
24818
|
-
name: string(),
|
|
24819
|
-
description: string().optional(),
|
|
24820
|
-
config: CameraPipelineConfigSchema,
|
|
24821
|
-
createdAt: string(),
|
|
24822
|
-
updatedAt: string()
|
|
24823
|
-
});
|
|
24824
26643
|
var DeviceStepConfigSchema = object({
|
|
24825
26644
|
modelId: string().optional(),
|
|
24826
26645
|
settings: record(string(), unknown()).optional(),
|
|
@@ -24894,9 +26713,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
24894
26713
|
modelId: string().optional(),
|
|
24895
26714
|
settings: record(string(), unknown()).readonly().optional()
|
|
24896
26715
|
});
|
|
26716
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
24897
26717
|
var CameraPipelineSettingsSchema = object({
|
|
24898
|
-
pinnedAgentNodeId: string().optional(),
|
|
24899
26718
|
stepToggles: record(string(), boolean()).optional(),
|
|
26719
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
24900
26720
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
24901
26721
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
24902
26722
|
});
|
|
@@ -24929,7 +26749,10 @@ var PipelineAssignmentSchema = object({
|
|
|
24929
26749
|
});
|
|
24930
26750
|
/**
|
|
24931
26751
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
24932
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
26752
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
26753
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
26754
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
26755
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
24933
26756
|
*/
|
|
24934
26757
|
var AgentLoadSummarySchema = object({
|
|
24935
26758
|
nodeId: string(),
|
|
@@ -25018,26 +26841,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
25018
26841
|
width: number(),
|
|
25019
26842
|
height: number(),
|
|
25020
26843
|
subscribers: number(),
|
|
25021
|
-
|
|
25022
|
-
|
|
26844
|
+
/**
|
|
26845
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
26846
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
26847
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
26848
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
26849
|
+
* camera and is not served (D758).
|
|
26850
|
+
*/
|
|
26851
|
+
inFps: number().nullable()
|
|
25023
26852
|
})).readonly(),
|
|
25024
26853
|
webrtcSessions: number(),
|
|
25025
26854
|
rtspRestream: boolean()
|
|
25026
26855
|
});
|
|
25027
|
-
/**
|
|
25028
|
-
|
|
25029
|
-
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
|
|
25033
|
-
|
|
25034
|
-
|
|
25035
|
-
var CameraDecoderStatusSchema = object({
|
|
25036
|
-
nodeId: string(),
|
|
25037
|
-
formats: array(string()).readonly(),
|
|
25038
|
-
sessionCount: number(),
|
|
25039
|
-
shm: CameraDecoderShmSchema
|
|
25040
|
-
});
|
|
26856
|
+
/**
|
|
26857
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
26858
|
+
* construction); null when the camera has no detection node. It carries no
|
|
26859
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
26860
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
26861
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
26862
|
+
* detector), never from a counter nothing feeds.
|
|
26863
|
+
*/
|
|
26864
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
25041
26865
|
/** Motion block — null when motion detection is not active for this device. */
|
|
25042
26866
|
var CameraMotionStatusSchema = object({
|
|
25043
26867
|
enabled: boolean(),
|
|
@@ -25394,12 +27218,6 @@ method(object({
|
|
|
25394
27218
|
}), object({ success: literal(true) }), {
|
|
25395
27219
|
kind: "mutation",
|
|
25396
27220
|
auth: "admin"
|
|
25397
|
-
}), method(object({
|
|
25398
|
-
agentNodeId: string(),
|
|
25399
|
-
detectWeight: number().positive().nullable()
|
|
25400
|
-
}), object({ success: literal(true) }), {
|
|
25401
|
-
kind: "mutation",
|
|
25402
|
-
auth: "admin"
|
|
25403
27221
|
}), method(object({
|
|
25404
27222
|
agentNodeId: string(),
|
|
25405
27223
|
detect: boolean().nullable().optional(),
|
|
@@ -25441,6 +27259,30 @@ method(object({
|
|
|
25441
27259
|
}), {
|
|
25442
27260
|
kind: "mutation",
|
|
25443
27261
|
auth: "admin"
|
|
27262
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27263
|
+
kind: "mutation",
|
|
27264
|
+
auth: "admin"
|
|
27265
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27266
|
+
kind: "mutation",
|
|
27267
|
+
auth: "admin"
|
|
27268
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27269
|
+
kind: "mutation",
|
|
27270
|
+
auth: "admin"
|
|
27271
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27272
|
+
kind: literal("started"),
|
|
27273
|
+
runId: string()
|
|
27274
|
+
}), object({
|
|
27275
|
+
kind: literal("refused"),
|
|
27276
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27277
|
+
})]), {
|
|
27278
|
+
kind: "mutation",
|
|
27279
|
+
auth: "admin"
|
|
27280
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27281
|
+
kind: "mutation",
|
|
27282
|
+
auth: "admin"
|
|
27283
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27284
|
+
kind: "mutation",
|
|
27285
|
+
auth: "admin"
|
|
25444
27286
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25445
27287
|
deviceId: number(),
|
|
25446
27288
|
addonId: string(),
|
|
@@ -25457,6 +27299,13 @@ method(object({
|
|
|
25457
27299
|
}), object({ success: literal(true) }), {
|
|
25458
27300
|
kind: "mutation",
|
|
25459
27301
|
auth: "admin"
|
|
27302
|
+
}), method(object({
|
|
27303
|
+
deviceId: number(),
|
|
27304
|
+
addonId: string(),
|
|
27305
|
+
settings: record(string(), unknown()).nullable()
|
|
27306
|
+
}), object({ success: literal(true) }), {
|
|
27307
|
+
kind: "mutation",
|
|
27308
|
+
auth: "admin"
|
|
25460
27309
|
}), method(object({
|
|
25461
27310
|
deviceId: number(),
|
|
25462
27311
|
agentNodeId: string(),
|
|
@@ -25480,25 +27329,7 @@ method(object({
|
|
|
25480
27329
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25481
27330
|
kind: "mutation",
|
|
25482
27331
|
auth: "admin"
|
|
25483
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25484
|
-
name: string(),
|
|
25485
|
-
description: string().optional(),
|
|
25486
|
-
config: CameraPipelineConfigSchema
|
|
25487
|
-
}), PipelineTemplateSchema, {
|
|
25488
|
-
kind: "mutation",
|
|
25489
|
-
auth: "admin"
|
|
25490
|
-
}), method(object({
|
|
25491
|
-
id: string(),
|
|
25492
|
-
name: string().optional(),
|
|
25493
|
-
description: string().optional(),
|
|
25494
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25495
|
-
}), PipelineTemplateSchema, {
|
|
25496
|
-
kind: "mutation",
|
|
25497
|
-
auth: "admin"
|
|
25498
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25499
|
-
kind: "mutation",
|
|
25500
|
-
auth: "admin"
|
|
25501
|
-
});
|
|
27332
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25502
27333
|
/**
|
|
25503
27334
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25504
27335
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -26088,7 +27919,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26088
27919
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26089
27920
|
* operator already consented to.
|
|
26090
27921
|
*/
|
|
26091
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
27922
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
27923
|
+
/**
|
|
27924
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
27925
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
27926
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
27927
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
27928
|
+
*/
|
|
27929
|
+
linkIntent: string().optional(),
|
|
27930
|
+
/**
|
|
27931
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
27932
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
27933
|
+
*/
|
|
27934
|
+
issuer: string().optional()
|
|
26092
27935
|
});
|
|
26093
27936
|
method(object({
|
|
26094
27937
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -27753,8 +29596,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
27753
29596
|
]).nullable(),
|
|
27754
29597
|
/** Input FPS from the camera (null for adaptive). */
|
|
27755
29598
|
inputFps: number().nullable(),
|
|
27756
|
-
/** Decoded FPS (null for adaptive). */
|
|
27757
|
-
decodeFps: number().nullable(),
|
|
27758
29599
|
/** Bitrate in kbps (null for adaptive). */
|
|
27759
29600
|
bitrateKbps: number().nullable()
|
|
27760
29601
|
});
|
|
@@ -28031,7 +29872,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28031
29872
|
* field their hints were silently stripped by the schema and the
|
|
28032
29873
|
* adaptive ladder started blind on the client's display size.
|
|
28033
29874
|
*/
|
|
28034
|
-
hints: webrtcClientHintsSchema.optional()
|
|
29875
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
29876
|
+
/**
|
|
29877
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
29878
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
29879
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
29880
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
29881
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
29882
|
+
*
|
|
29883
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
29884
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
29885
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
29886
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
29887
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
29888
|
+
* flag must not become a second door to the camera's speaker.
|
|
29889
|
+
*/
|
|
29890
|
+
talkback: boolean().optional()
|
|
28035
29891
|
}), object({
|
|
28036
29892
|
sessionId: string(),
|
|
28037
29893
|
sdpAnswer: string()
|
|
@@ -28333,6 +30189,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
28333
30189
|
var RestartAddonResultSchema = unknown();
|
|
28334
30190
|
var InstallPackageResultSchema = unknown();
|
|
28335
30191
|
var ReloadPackagesResultSchema = unknown();
|
|
30192
|
+
/**
|
|
30193
|
+
* What an uninstall did on ONE node.
|
|
30194
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
30195
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
30196
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
30197
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
30198
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
30199
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
30200
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
30201
|
+
*/
|
|
30202
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
30203
|
+
"uninstalled",
|
|
30204
|
+
"not-installed",
|
|
30205
|
+
"refused",
|
|
30206
|
+
"failed",
|
|
30207
|
+
"pending-reconnect"
|
|
30208
|
+
]);
|
|
30209
|
+
var UninstallNodeResultSchema = object({
|
|
30210
|
+
nodeId: string(),
|
|
30211
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
30212
|
+
error: string().optional(),
|
|
30213
|
+
addonIds: array(string()).readonly(),
|
|
30214
|
+
runnersStopped: array(string()).readonly(),
|
|
30215
|
+
warnings: array(string()).readonly()
|
|
30216
|
+
});
|
|
30217
|
+
var UninstallPackageResultSchema = object({
|
|
30218
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
30219
|
+
success: boolean(),
|
|
30220
|
+
packageName: string(),
|
|
30221
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
30222
|
+
});
|
|
30223
|
+
/**
|
|
30224
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
30225
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
30226
|
+
*/
|
|
30227
|
+
var PackageInstallationsSchema = object({
|
|
30228
|
+
installations: array(object({
|
|
30229
|
+
packageName: string(),
|
|
30230
|
+
nodeId: string(),
|
|
30231
|
+
nodeName: string(),
|
|
30232
|
+
isHub: boolean(),
|
|
30233
|
+
isOnline: boolean(),
|
|
30234
|
+
version: string().nullable(),
|
|
30235
|
+
addonIds: array(string()).readonly(),
|
|
30236
|
+
source: _enum(["live", "recorded"]),
|
|
30237
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
30238
|
+
onHub: boolean()
|
|
30239
|
+
})).readonly(),
|
|
30240
|
+
unreachable: array(object({
|
|
30241
|
+
nodeId: string(),
|
|
30242
|
+
error: string()
|
|
30243
|
+
})).readonly()
|
|
30244
|
+
});
|
|
28336
30245
|
var BulkUpdateItemStatusSchema = _enum([
|
|
28337
30246
|
"queued",
|
|
28338
30247
|
"updating",
|
|
@@ -28415,10 +30324,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
28415
30324
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
28416
30325
|
kind: "mutation",
|
|
28417
30326
|
auth: "admin"
|
|
28418
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30327
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30328
|
+
packageName: string().min(1),
|
|
30329
|
+
nodeId: string().optional(),
|
|
30330
|
+
everywhere: boolean().optional()
|
|
30331
|
+
}), UninstallPackageResultSchema, {
|
|
28419
30332
|
kind: "mutation",
|
|
28420
30333
|
auth: "admin"
|
|
28421
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
30334
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
28422
30335
|
kind: "mutation",
|
|
28423
30336
|
auth: "admin"
|
|
28424
30337
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -30486,6 +32399,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
30486
32399
|
enabled: boolean().optional(),
|
|
30487
32400
|
info: record(string(), unknown()).optional(),
|
|
30488
32401
|
settings: record(string(), unknown()).optional(),
|
|
32402
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
32403
|
+
* the keychain, not the table (D787). */
|
|
32404
|
+
secretKeys: array(string()).optional(),
|
|
30489
32405
|
skipRestart: boolean().optional()
|
|
30490
32406
|
});
|
|
30491
32407
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -30509,7 +32425,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
30509
32425
|
auth: "admin"
|
|
30510
32426
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
30511
32427
|
id: string(),
|
|
30512
|
-
settings: record(string(), unknown())
|
|
32428
|
+
settings: record(string(), unknown()),
|
|
32429
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
32430
|
+
secretKeys: array(string()).optional()
|
|
30513
32431
|
}), object({ success: boolean() }), {
|
|
30514
32432
|
kind: "mutation",
|
|
30515
32433
|
auth: "admin"
|
|
@@ -36018,6 +37936,32 @@ var TotpStatusSchema = object({
|
|
|
36018
37936
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
36019
37937
|
confirmedAt: number().nullable()
|
|
36020
37938
|
});
|
|
37939
|
+
/**
|
|
37940
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
37941
|
+
* and scoped tokens.
|
|
37942
|
+
*
|
|
37943
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
37944
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
37945
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
37946
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
37947
|
+
* provider.
|
|
37948
|
+
*/
|
|
37949
|
+
var ExternalIdentitySchema = object({
|
|
37950
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
37951
|
+
provider: string(),
|
|
37952
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
37953
|
+
subject: string(),
|
|
37954
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
37955
|
+
issuer: string(),
|
|
37956
|
+
userId: string(),
|
|
37957
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
37958
|
+
label: string().optional(),
|
|
37959
|
+
linkedAt: number()
|
|
37960
|
+
});
|
|
37961
|
+
var ExternalIdentityKeySchema = object({
|
|
37962
|
+
provider: string().min(1),
|
|
37963
|
+
subject: string().min(1)
|
|
37964
|
+
});
|
|
36021
37965
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
36022
37966
|
kind: "mutation",
|
|
36023
37967
|
auth: "admin",
|
|
@@ -36131,7 +38075,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
36131
38075
|
userId: string(),
|
|
36132
38076
|
username: string(),
|
|
36133
38077
|
scopes: array(TokenScopeSchema)
|
|
36134
|
-
}).nullable(), { access: "view" }), method(
|
|
38078
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
38079
|
+
userId: string(),
|
|
38080
|
+
issuer: string()
|
|
38081
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
38082
|
+
userId: string(),
|
|
38083
|
+
issuer: string().min(1),
|
|
38084
|
+
label: string().optional()
|
|
38085
|
+
}), object({ success: literal(true) }), {
|
|
38086
|
+
kind: "mutation",
|
|
38087
|
+
auth: "admin",
|
|
38088
|
+
access: "create"
|
|
38089
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
38090
|
+
kind: "mutation",
|
|
38091
|
+
auth: "admin",
|
|
38092
|
+
access: "delete"
|
|
38093
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
36135
38094
|
kind: "mutation",
|
|
36136
38095
|
auth: "admin",
|
|
36137
38096
|
access: "delete"
|
|
@@ -36523,6 +38482,16 @@ DeviceType.Camera, method(object({
|
|
|
36523
38482
|
package: array(ZoneRuleSchema).readonly()
|
|
36524
38483
|
});
|
|
36525
38484
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
38485
|
+
Object.freeze({
|
|
38486
|
+
person: .5,
|
|
38487
|
+
vehicle: .5,
|
|
38488
|
+
animal: .5
|
|
38489
|
+
});
|
|
38490
|
+
Object.freeze({
|
|
38491
|
+
person: .65,
|
|
38492
|
+
vehicle: .65,
|
|
38493
|
+
animal: .65
|
|
38494
|
+
});
|
|
36526
38495
|
/**
|
|
36527
38496
|
* Accessory device helpers — shared across drivers.
|
|
36528
38497
|
*
|
|
@@ -36697,6 +38666,12 @@ Object.freeze({
|
|
|
36697
38666
|
addonId: null,
|
|
36698
38667
|
access: "view"
|
|
36699
38668
|
},
|
|
38669
|
+
"addons.listInstallations": {
|
|
38670
|
+
capName: "addons",
|
|
38671
|
+
capScope: "system",
|
|
38672
|
+
addonId: null,
|
|
38673
|
+
access: "view"
|
|
38674
|
+
},
|
|
36700
38675
|
"addons.listJobs": {
|
|
36701
38676
|
capName: "addons",
|
|
36702
38677
|
capScope: "system",
|
|
@@ -37879,90 +39854,18 @@ Object.freeze({
|
|
|
37879
39854
|
addonId: null,
|
|
37880
39855
|
access: "create"
|
|
37881
39856
|
},
|
|
37882
|
-
"decoder.createSession": {
|
|
37883
|
-
capName: "decoder",
|
|
37884
|
-
capScope: "system",
|
|
37885
|
-
addonId: null,
|
|
37886
|
-
access: "view"
|
|
37887
|
-
},
|
|
37888
|
-
"decoder.destroySession": {
|
|
37889
|
-
capName: "decoder",
|
|
37890
|
-
capScope: "system",
|
|
37891
|
-
addonId: null,
|
|
37892
|
-
access: "delete"
|
|
37893
|
-
},
|
|
37894
|
-
"decoder.getFrame": {
|
|
37895
|
-
capName: "decoder",
|
|
37896
|
-
capScope: "system",
|
|
37897
|
-
addonId: null,
|
|
37898
|
-
access: "view"
|
|
37899
|
-
},
|
|
37900
39857
|
"decoder.getInfo": {
|
|
37901
39858
|
capName: "decoder",
|
|
37902
39859
|
capScope: "system",
|
|
37903
39860
|
addonId: null,
|
|
37904
39861
|
access: "view"
|
|
37905
39862
|
},
|
|
37906
|
-
"decoder.getShmStats": {
|
|
37907
|
-
capName: "decoder",
|
|
37908
|
-
capScope: "system",
|
|
37909
|
-
addonId: null,
|
|
37910
|
-
access: "view"
|
|
37911
|
-
},
|
|
37912
|
-
"decoder.getStats": {
|
|
37913
|
-
capName: "decoder",
|
|
37914
|
-
capScope: "system",
|
|
37915
|
-
addonId: null,
|
|
37916
|
-
access: "view"
|
|
37917
|
-
},
|
|
37918
|
-
"decoder.listActiveSessions": {
|
|
37919
|
-
capName: "decoder",
|
|
37920
|
-
capScope: "system",
|
|
37921
|
-
addonId: null,
|
|
37922
|
-
access: "view"
|
|
37923
|
-
},
|
|
37924
|
-
"decoder.openStream": {
|
|
37925
|
-
capName: "decoder",
|
|
37926
|
-
capScope: "system",
|
|
37927
|
-
addonId: null,
|
|
37928
|
-
access: "view"
|
|
37929
|
-
},
|
|
37930
|
-
"decoder.pullFrames": {
|
|
37931
|
-
capName: "decoder",
|
|
37932
|
-
capScope: "system",
|
|
37933
|
-
addonId: null,
|
|
37934
|
-
access: "view"
|
|
37935
|
-
},
|
|
37936
|
-
"decoder.pullHandles": {
|
|
37937
|
-
capName: "decoder",
|
|
37938
|
-
capScope: "system",
|
|
37939
|
-
addonId: null,
|
|
37940
|
-
access: "view"
|
|
37941
|
-
},
|
|
37942
|
-
"decoder.pushPacket": {
|
|
37943
|
-
capName: "decoder",
|
|
37944
|
-
capScope: "system",
|
|
37945
|
-
addonId: null,
|
|
37946
|
-
access: "view"
|
|
37947
|
-
},
|
|
37948
39863
|
"decoder.reprobeHwaccel": {
|
|
37949
39864
|
capName: "decoder",
|
|
37950
39865
|
capScope: "system",
|
|
37951
39866
|
addonId: null,
|
|
37952
39867
|
access: "create"
|
|
37953
39868
|
},
|
|
37954
|
-
"decoder.supportsCodec": {
|
|
37955
|
-
capName: "decoder",
|
|
37956
|
-
capScope: "system",
|
|
37957
|
-
addonId: null,
|
|
37958
|
-
access: "view"
|
|
37959
|
-
},
|
|
37960
|
-
"decoder.updateConfig": {
|
|
37961
|
-
capName: "decoder",
|
|
37962
|
-
capScope: "system",
|
|
37963
|
-
addonId: null,
|
|
37964
|
-
access: "view"
|
|
37965
|
-
},
|
|
37966
39869
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
37967
39870
|
capName: "detection-pipeline",
|
|
37968
39871
|
capScope: "device",
|
|
@@ -39229,6 +41132,90 @@ Object.freeze({
|
|
|
39229
41132
|
addonId: null,
|
|
39230
41133
|
access: "create"
|
|
39231
41134
|
},
|
|
41135
|
+
"keychain.delete": {
|
|
41136
|
+
capName: "keychain",
|
|
41137
|
+
capScope: "system",
|
|
41138
|
+
addonId: null,
|
|
41139
|
+
access: "delete"
|
|
41140
|
+
},
|
|
41141
|
+
"keychain.getState": {
|
|
41142
|
+
capName: "keychain",
|
|
41143
|
+
capScope: "system",
|
|
41144
|
+
addonId: null,
|
|
41145
|
+
access: "view"
|
|
41146
|
+
},
|
|
41147
|
+
"keychain.listMeta": {
|
|
41148
|
+
capName: "keychain",
|
|
41149
|
+
capScope: "system",
|
|
41150
|
+
addonId: null,
|
|
41151
|
+
access: "view"
|
|
41152
|
+
},
|
|
41153
|
+
"keychain.put": {
|
|
41154
|
+
capName: "keychain",
|
|
41155
|
+
capScope: "system",
|
|
41156
|
+
addonId: null,
|
|
41157
|
+
access: "create"
|
|
41158
|
+
},
|
|
41159
|
+
"keychain.resolve": {
|
|
41160
|
+
capName: "keychain",
|
|
41161
|
+
capScope: "system",
|
|
41162
|
+
addonId: null,
|
|
41163
|
+
access: "view"
|
|
41164
|
+
},
|
|
41165
|
+
"keychainAdmin.deleteOrphans": {
|
|
41166
|
+
capName: "keychain-admin",
|
|
41167
|
+
capScope: "system",
|
|
41168
|
+
addonId: null,
|
|
41169
|
+
access: "delete"
|
|
41170
|
+
},
|
|
41171
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
41172
|
+
capName: "keychain-admin",
|
|
41173
|
+
capScope: "system",
|
|
41174
|
+
addonId: null,
|
|
41175
|
+
access: "create"
|
|
41176
|
+
},
|
|
41177
|
+
"keychainAdmin.listAudit": {
|
|
41178
|
+
capName: "keychain-admin",
|
|
41179
|
+
capScope: "system",
|
|
41180
|
+
addonId: null,
|
|
41181
|
+
access: "view"
|
|
41182
|
+
},
|
|
41183
|
+
"keychainAdmin.listSecrets": {
|
|
41184
|
+
capName: "keychain-admin",
|
|
41185
|
+
capScope: "system",
|
|
41186
|
+
addonId: null,
|
|
41187
|
+
access: "view"
|
|
41188
|
+
},
|
|
41189
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
41190
|
+
capName: "keychain-admin",
|
|
41191
|
+
capScope: "system",
|
|
41192
|
+
addonId: null,
|
|
41193
|
+
access: "delete"
|
|
41194
|
+
},
|
|
41195
|
+
"keychainAdmin.resetKeychain": {
|
|
41196
|
+
capName: "keychain-admin",
|
|
41197
|
+
capScope: "system",
|
|
41198
|
+
addonId: null,
|
|
41199
|
+
access: "delete"
|
|
41200
|
+
},
|
|
41201
|
+
"keychainAdmin.reveal": {
|
|
41202
|
+
capName: "keychain-admin",
|
|
41203
|
+
capScope: "system",
|
|
41204
|
+
addonId: null,
|
|
41205
|
+
access: "create"
|
|
41206
|
+
},
|
|
41207
|
+
"keychainAdmin.rotateMasterKey": {
|
|
41208
|
+
capName: "keychain-admin",
|
|
41209
|
+
capScope: "system",
|
|
41210
|
+
addonId: null,
|
|
41211
|
+
access: "create"
|
|
41212
|
+
},
|
|
41213
|
+
"keychainAdmin.status": {
|
|
41214
|
+
capName: "keychain-admin",
|
|
41215
|
+
capScope: "system",
|
|
41216
|
+
addonId: null,
|
|
41217
|
+
access: "view"
|
|
41218
|
+
},
|
|
39232
41219
|
"lawnMowerControl.dock": {
|
|
39233
41220
|
capName: "lawn-mower-control",
|
|
39234
41221
|
capScope: "device",
|
|
@@ -40603,6 +42590,18 @@ Object.freeze({
|
|
|
40603
42590
|
addonId: null,
|
|
40604
42591
|
access: "create"
|
|
40605
42592
|
},
|
|
42593
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
42594
|
+
capName: "pipeline-analytics",
|
|
42595
|
+
capScope: "device",
|
|
42596
|
+
addonId: null,
|
|
42597
|
+
access: "create"
|
|
42598
|
+
},
|
|
42599
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
42600
|
+
capName: "pipeline-analytics",
|
|
42601
|
+
capScope: "device",
|
|
42602
|
+
addonId: null,
|
|
42603
|
+
access: "create"
|
|
42604
|
+
},
|
|
40606
42605
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
40607
42606
|
capName: "pipeline-analytics",
|
|
40608
42607
|
capScope: "device",
|
|
@@ -40651,12 +42650,24 @@ Object.freeze({
|
|
|
40651
42650
|
addonId: null,
|
|
40652
42651
|
access: "view"
|
|
40653
42652
|
},
|
|
42653
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
42654
|
+
capName: "pipeline-analytics",
|
|
42655
|
+
capScope: "device",
|
|
42656
|
+
addonId: null,
|
|
42657
|
+
access: "create"
|
|
42658
|
+
},
|
|
40654
42659
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
40655
42660
|
capName: "pipeline-analytics",
|
|
40656
42661
|
capScope: "device",
|
|
40657
42662
|
addonId: null,
|
|
40658
42663
|
access: "delete"
|
|
40659
42664
|
},
|
|
42665
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
42666
|
+
capName: "pipeline-analytics",
|
|
42667
|
+
capScope: "device",
|
|
42668
|
+
addonId: null,
|
|
42669
|
+
access: "delete"
|
|
42670
|
+
},
|
|
40660
42671
|
"pipelineAnalytics.deleteTracks": {
|
|
40661
42672
|
capName: "pipeline-analytics",
|
|
40662
42673
|
capScope: "device",
|
|
@@ -40861,6 +42872,24 @@ Object.freeze({
|
|
|
40861
42872
|
addonId: null,
|
|
40862
42873
|
access: "view"
|
|
40863
42874
|
},
|
|
42875
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
42876
|
+
capName: "pipeline-analytics",
|
|
42877
|
+
capScope: "device",
|
|
42878
|
+
addonId: null,
|
|
42879
|
+
access: "view"
|
|
42880
|
+
},
|
|
42881
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
42882
|
+
capName: "pipeline-analytics",
|
|
42883
|
+
capScope: "device",
|
|
42884
|
+
addonId: null,
|
|
42885
|
+
access: "view"
|
|
42886
|
+
},
|
|
42887
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
42888
|
+
capName: "pipeline-analytics",
|
|
42889
|
+
capScope: "device",
|
|
42890
|
+
addonId: null,
|
|
42891
|
+
access: "view"
|
|
42892
|
+
},
|
|
40864
42893
|
"pipelineAnalytics.listRetrainFrames": {
|
|
40865
42894
|
capName: "pipeline-analytics",
|
|
40866
42895
|
capScope: "device",
|
|
@@ -40909,6 +42938,12 @@ Object.freeze({
|
|
|
40909
42938
|
addonId: null,
|
|
40910
42939
|
access: "create"
|
|
40911
42940
|
},
|
|
42941
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
42942
|
+
capName: "pipeline-analytics",
|
|
42943
|
+
capScope: "device",
|
|
42944
|
+
addonId: null,
|
|
42945
|
+
access: "create"
|
|
42946
|
+
},
|
|
40912
42947
|
"pipelineAnalytics.pruneEvents": {
|
|
40913
42948
|
capName: "pipeline-analytics",
|
|
40914
42949
|
capScope: "device",
|
|
@@ -40963,6 +42998,18 @@ Object.freeze({
|
|
|
40963
42998
|
addonId: null,
|
|
40964
42999
|
access: "create"
|
|
40965
43000
|
},
|
|
43001
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
43002
|
+
capName: "pipeline-analytics",
|
|
43003
|
+
capScope: "device",
|
|
43004
|
+
addonId: null,
|
|
43005
|
+
access: "delete"
|
|
43006
|
+
},
|
|
43007
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
43008
|
+
capName: "pipeline-analytics",
|
|
43009
|
+
capScope: "device",
|
|
43010
|
+
addonId: null,
|
|
43011
|
+
access: "create"
|
|
43012
|
+
},
|
|
40966
43013
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
40967
43014
|
capName: "pipeline-analytics",
|
|
40968
43015
|
capScope: "device",
|
|
@@ -40993,6 +43040,12 @@ Object.freeze({
|
|
|
40993
43040
|
addonId: null,
|
|
40994
43041
|
access: "create"
|
|
40995
43042
|
},
|
|
43043
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
43044
|
+
capName: "pipeline-analytics",
|
|
43045
|
+
capScope: "device",
|
|
43046
|
+
addonId: null,
|
|
43047
|
+
access: "create"
|
|
43048
|
+
},
|
|
40996
43049
|
"pipelineAnalytics.setTrackFlags": {
|
|
40997
43050
|
capName: "pipeline-analytics",
|
|
40998
43051
|
capScope: "device",
|
|
@@ -41029,6 +43082,12 @@ Object.freeze({
|
|
|
41029
43082
|
addonId: null,
|
|
41030
43083
|
access: "delete"
|
|
41031
43084
|
},
|
|
43085
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
43086
|
+
capName: "pipeline-analytics",
|
|
43087
|
+
capScope: "device",
|
|
43088
|
+
addonId: null,
|
|
43089
|
+
access: "create"
|
|
43090
|
+
},
|
|
41032
43091
|
"pipelineExecutor.cacheFrameInPool": {
|
|
41033
43092
|
capName: "pipeline-executor",
|
|
41034
43093
|
capScope: "system",
|
|
@@ -41041,13 +43100,13 @@ Object.freeze({
|
|
|
41041
43100
|
addonId: null,
|
|
41042
43101
|
access: "delete"
|
|
41043
43102
|
},
|
|
41044
|
-
"pipelineExecutor.
|
|
43103
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
41045
43104
|
capName: "pipeline-executor",
|
|
41046
43105
|
capScope: "system",
|
|
41047
43106
|
addonId: null,
|
|
41048
43107
|
access: "delete"
|
|
41049
43108
|
},
|
|
41050
|
-
"pipelineExecutor.
|
|
43109
|
+
"pipelineExecutor.deleteModel": {
|
|
41051
43110
|
capName: "pipeline-executor",
|
|
41052
43111
|
capScope: "system",
|
|
41053
43112
|
addonId: null,
|
|
@@ -41191,12 +43250,6 @@ Object.freeze({
|
|
|
41191
43250
|
addonId: null,
|
|
41192
43251
|
access: "view"
|
|
41193
43252
|
},
|
|
41194
|
-
"pipelineExecutor.listTemplates": {
|
|
41195
|
-
capName: "pipeline-executor",
|
|
41196
|
-
capScope: "system",
|
|
41197
|
-
addonId: null,
|
|
41198
|
-
access: "view"
|
|
41199
|
-
},
|
|
41200
43253
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
41201
43254
|
capName: "pipeline-executor",
|
|
41202
43255
|
capScope: "system",
|
|
@@ -41221,12 +43274,6 @@ Object.freeze({
|
|
|
41221
43274
|
addonId: null,
|
|
41222
43275
|
access: "create"
|
|
41223
43276
|
},
|
|
41224
|
-
"pipelineExecutor.saveTemplate": {
|
|
41225
|
-
capName: "pipeline-executor",
|
|
41226
|
-
capScope: "system",
|
|
41227
|
-
addonId: null,
|
|
41228
|
-
access: "create"
|
|
41229
|
-
},
|
|
41230
43277
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
41231
43278
|
capName: "pipeline-executor",
|
|
41232
43279
|
capScope: "system",
|
|
@@ -41245,17 +43292,23 @@ Object.freeze({
|
|
|
41245
43292
|
addonId: null,
|
|
41246
43293
|
access: "create"
|
|
41247
43294
|
},
|
|
41248
|
-
"pipelineExecutor.
|
|
43295
|
+
"pipelineExecutor.validatePipeline": {
|
|
41249
43296
|
capName: "pipeline-executor",
|
|
41250
43297
|
capScope: "system",
|
|
41251
43298
|
addonId: null,
|
|
43299
|
+
access: "view"
|
|
43300
|
+
},
|
|
43301
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
43302
|
+
capName: "pipeline-orchestrator",
|
|
43303
|
+
capScope: "system",
|
|
43304
|
+
addonId: null,
|
|
41252
43305
|
access: "create"
|
|
41253
43306
|
},
|
|
41254
|
-
"
|
|
41255
|
-
capName: "pipeline-
|
|
43307
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
43308
|
+
capName: "pipeline-orchestrator",
|
|
41256
43309
|
capScope: "system",
|
|
41257
43310
|
addonId: null,
|
|
41258
|
-
access: "
|
|
43311
|
+
access: "create"
|
|
41259
43312
|
},
|
|
41260
43313
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
41261
43314
|
capName: "pipeline-orchestrator",
|
|
@@ -41275,7 +43328,7 @@ Object.freeze({
|
|
|
41275
43328
|
addonId: null,
|
|
41276
43329
|
access: "create"
|
|
41277
43330
|
},
|
|
41278
|
-
"pipelineOrchestrator.
|
|
43331
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
41279
43332
|
capName: "pipeline-orchestrator",
|
|
41280
43333
|
capScope: "system",
|
|
41281
43334
|
addonId: null,
|
|
@@ -41371,6 +43424,12 @@ Object.freeze({
|
|
|
41371
43424
|
addonId: null,
|
|
41372
43425
|
access: "view"
|
|
41373
43426
|
},
|
|
43427
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
43428
|
+
capName: "pipeline-orchestrator",
|
|
43429
|
+
capScope: "system",
|
|
43430
|
+
addonId: null,
|
|
43431
|
+
access: "view"
|
|
43432
|
+
},
|
|
41374
43433
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
41375
43434
|
capName: "pipeline-orchestrator",
|
|
41376
43435
|
capScope: "system",
|
|
@@ -41383,6 +43442,24 @@ Object.freeze({
|
|
|
41383
43442
|
addonId: null,
|
|
41384
43443
|
access: "view"
|
|
41385
43444
|
},
|
|
43445
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
43446
|
+
capName: "pipeline-orchestrator",
|
|
43447
|
+
capScope: "system",
|
|
43448
|
+
addonId: null,
|
|
43449
|
+
access: "view"
|
|
43450
|
+
},
|
|
43451
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
43452
|
+
capName: "pipeline-orchestrator",
|
|
43453
|
+
capScope: "system",
|
|
43454
|
+
addonId: null,
|
|
43455
|
+
access: "view"
|
|
43456
|
+
},
|
|
43457
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
43458
|
+
capName: "pipeline-orchestrator",
|
|
43459
|
+
capScope: "system",
|
|
43460
|
+
addonId: null,
|
|
43461
|
+
access: "view"
|
|
43462
|
+
},
|
|
41386
43463
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
41387
43464
|
capName: "pipeline-orchestrator",
|
|
41388
43465
|
capScope: "system",
|
|
@@ -41407,6 +43484,12 @@ Object.freeze({
|
|
|
41407
43484
|
addonId: null,
|
|
41408
43485
|
access: "view"
|
|
41409
43486
|
},
|
|
43487
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
43488
|
+
capName: "pipeline-orchestrator",
|
|
43489
|
+
capScope: "system",
|
|
43490
|
+
addonId: null,
|
|
43491
|
+
access: "view"
|
|
43492
|
+
},
|
|
41410
43493
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
41411
43494
|
capName: "pipeline-orchestrator",
|
|
41412
43495
|
capScope: "system",
|
|
@@ -41419,7 +43502,7 @@ Object.freeze({
|
|
|
41419
43502
|
addonId: null,
|
|
41420
43503
|
access: "view"
|
|
41421
43504
|
},
|
|
41422
|
-
"pipelineOrchestrator.
|
|
43505
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
41423
43506
|
capName: "pipeline-orchestrator",
|
|
41424
43507
|
capScope: "system",
|
|
41425
43508
|
addonId: null,
|
|
@@ -41431,6 +43514,12 @@ Object.freeze({
|
|
|
41431
43514
|
addonId: null,
|
|
41432
43515
|
access: "create"
|
|
41433
43516
|
},
|
|
43517
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
43518
|
+
capName: "pipeline-orchestrator",
|
|
43519
|
+
capScope: "system",
|
|
43520
|
+
addonId: null,
|
|
43521
|
+
access: "view"
|
|
43522
|
+
},
|
|
41434
43523
|
"pipelineOrchestrator.rebalance": {
|
|
41435
43524
|
capName: "pipeline-orchestrator",
|
|
41436
43525
|
capScope: "system",
|
|
@@ -41473,12 +43562,6 @@ Object.freeze({
|
|
|
41473
43562
|
addonId: null,
|
|
41474
43563
|
access: "create"
|
|
41475
43564
|
},
|
|
41476
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
41477
|
-
capName: "pipeline-orchestrator",
|
|
41478
|
-
capScope: "system",
|
|
41479
|
-
addonId: null,
|
|
41480
|
-
access: "create"
|
|
41481
|
-
},
|
|
41482
43565
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
41483
43566
|
capName: "pipeline-orchestrator",
|
|
41484
43567
|
capScope: "system",
|
|
@@ -41491,12 +43574,6 @@ Object.freeze({
|
|
|
41491
43574
|
addonId: null,
|
|
41492
43575
|
access: "create"
|
|
41493
43576
|
},
|
|
41494
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
41495
|
-
capName: "pipeline-orchestrator",
|
|
41496
|
-
capScope: "system",
|
|
41497
|
-
addonId: null,
|
|
41498
|
-
access: "create"
|
|
41499
|
-
},
|
|
41500
43577
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
41501
43578
|
capName: "pipeline-orchestrator",
|
|
41502
43579
|
capScope: "system",
|
|
@@ -41533,6 +43610,12 @@ Object.freeze({
|
|
|
41533
43610
|
addonId: null,
|
|
41534
43611
|
access: "create"
|
|
41535
43612
|
},
|
|
43613
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
43614
|
+
capName: "pipeline-orchestrator",
|
|
43615
|
+
capScope: "system",
|
|
43616
|
+
addonId: null,
|
|
43617
|
+
access: "create"
|
|
43618
|
+
},
|
|
41536
43619
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
41537
43620
|
capName: "pipeline-orchestrator",
|
|
41538
43621
|
capScope: "system",
|
|
@@ -41551,12 +43634,36 @@ Object.freeze({
|
|
|
41551
43634
|
addonId: null,
|
|
41552
43635
|
access: "create"
|
|
41553
43636
|
},
|
|
43637
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
43638
|
+
capName: "pipeline-orchestrator",
|
|
43639
|
+
capScope: "system",
|
|
43640
|
+
addonId: null,
|
|
43641
|
+
access: "create"
|
|
43642
|
+
},
|
|
41554
43643
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
41555
43644
|
capName: "pipeline-orchestrator",
|
|
41556
43645
|
capScope: "system",
|
|
41557
43646
|
addonId: null,
|
|
41558
43647
|
access: "create"
|
|
41559
43648
|
},
|
|
43649
|
+
"pipelineOrchestrator.setShareSource": {
|
|
43650
|
+
capName: "pipeline-orchestrator",
|
|
43651
|
+
capScope: "system",
|
|
43652
|
+
addonId: null,
|
|
43653
|
+
access: "create"
|
|
43654
|
+
},
|
|
43655
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
43656
|
+
capName: "pipeline-orchestrator",
|
|
43657
|
+
capScope: "system",
|
|
43658
|
+
addonId: null,
|
|
43659
|
+
access: "create"
|
|
43660
|
+
},
|
|
43661
|
+
"pipelineOrchestrator.suggestShares": {
|
|
43662
|
+
capName: "pipeline-orchestrator",
|
|
43663
|
+
capScope: "system",
|
|
43664
|
+
addonId: null,
|
|
43665
|
+
access: "view"
|
|
43666
|
+
},
|
|
41560
43667
|
"pipelineOrchestrator.unassignAudio": {
|
|
41561
43668
|
capName: "pipeline-orchestrator",
|
|
41562
43669
|
capScope: "system",
|
|
@@ -41569,8 +43676,8 @@ Object.freeze({
|
|
|
41569
43676
|
addonId: null,
|
|
41570
43677
|
access: "create"
|
|
41571
43678
|
},
|
|
41572
|
-
"
|
|
41573
|
-
capName: "pipeline-
|
|
43679
|
+
"pipelineRunner.abortNodeBench": {
|
|
43680
|
+
capName: "pipeline-runner",
|
|
41574
43681
|
capScope: "system",
|
|
41575
43682
|
addonId: null,
|
|
41576
43683
|
access: "create"
|
|
@@ -41623,6 +43730,12 @@ Object.freeze({
|
|
|
41623
43730
|
addonId: null,
|
|
41624
43731
|
access: "view"
|
|
41625
43732
|
},
|
|
43733
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
43734
|
+
capName: "pipeline-runner",
|
|
43735
|
+
capScope: "system",
|
|
43736
|
+
addonId: null,
|
|
43737
|
+
access: "view"
|
|
43738
|
+
},
|
|
41626
43739
|
"pipelineRunner.getParkedTrackFrame": {
|
|
41627
43740
|
capName: "pipeline-runner",
|
|
41628
43741
|
capScope: "system",
|
|
@@ -41665,6 +43778,12 @@ Object.freeze({
|
|
|
41665
43778
|
addonId: null,
|
|
41666
43779
|
access: "create"
|
|
41667
43780
|
},
|
|
43781
|
+
"pipelineRunner.startNodeBench": {
|
|
43782
|
+
capName: "pipeline-runner",
|
|
43783
|
+
capScope: "system",
|
|
43784
|
+
addonId: null,
|
|
43785
|
+
access: "create"
|
|
43786
|
+
},
|
|
41668
43787
|
"plateGallery.assignPlate": {
|
|
41669
43788
|
capName: "plate-gallery",
|
|
41670
43789
|
capScope: "system",
|
|
@@ -43009,12 +45128,6 @@ Object.freeze({
|
|
|
43009
45128
|
addonId: null,
|
|
43010
45129
|
access: "view"
|
|
43011
45130
|
},
|
|
43012
|
-
"streamBroker.pullFrameHandles": {
|
|
43013
|
-
capName: "stream-broker",
|
|
43014
|
-
capScope: "system",
|
|
43015
|
-
addonId: null,
|
|
43016
|
-
access: "view"
|
|
43017
|
-
},
|
|
43018
45131
|
"streamBroker.regenerateRtspToken": {
|
|
43019
45132
|
capName: "stream-broker",
|
|
43020
45133
|
capScope: "system",
|
|
@@ -43081,12 +45194,6 @@ Object.freeze({
|
|
|
43081
45194
|
addonId: null,
|
|
43082
45195
|
access: "create"
|
|
43083
45196
|
},
|
|
43084
|
-
"streamBroker.subscribeFrames": {
|
|
43085
|
-
capName: "stream-broker",
|
|
43086
|
-
capScope: "system",
|
|
43087
|
-
addonId: null,
|
|
43088
|
-
access: "create"
|
|
43089
|
-
},
|
|
43090
45197
|
"streamBroker.unassignProfile": {
|
|
43091
45198
|
capName: "stream-broker",
|
|
43092
45199
|
capScope: "system",
|
|
@@ -43099,12 +45206,6 @@ Object.freeze({
|
|
|
43099
45206
|
addonId: null,
|
|
43100
45207
|
access: "create"
|
|
43101
45208
|
},
|
|
43102
|
-
"streamBroker.unsubscribeFrames": {
|
|
43103
|
-
capName: "stream-broker",
|
|
43104
|
-
capScope: "system",
|
|
43105
|
-
addonId: null,
|
|
43106
|
-
access: "create"
|
|
43107
|
-
},
|
|
43108
45209
|
"streamCatalog.getCatalog": {
|
|
43109
45210
|
capName: "stream-catalog",
|
|
43110
45211
|
capScope: "device",
|
|
@@ -43399,18 +45500,36 @@ Object.freeze({
|
|
|
43399
45500
|
addonId: null,
|
|
43400
45501
|
access: "delete"
|
|
43401
45502
|
},
|
|
45503
|
+
"userManagement.findUserByExternalIdentity": {
|
|
45504
|
+
capName: "user-management",
|
|
45505
|
+
capScope: "system",
|
|
45506
|
+
addonId: null,
|
|
45507
|
+
access: "view"
|
|
45508
|
+
},
|
|
43402
45509
|
"userManagement.getTotpStatus": {
|
|
43403
45510
|
capName: "user-management",
|
|
43404
45511
|
capScope: "system",
|
|
43405
45512
|
addonId: null,
|
|
43406
45513
|
access: "view"
|
|
43407
45514
|
},
|
|
45515
|
+
"userManagement.linkExternalIdentity": {
|
|
45516
|
+
capName: "user-management",
|
|
45517
|
+
capScope: "system",
|
|
45518
|
+
addonId: null,
|
|
45519
|
+
access: "create"
|
|
45520
|
+
},
|
|
43408
45521
|
"userManagement.listApiKeys": {
|
|
43409
45522
|
capName: "user-management",
|
|
43410
45523
|
capScope: "system",
|
|
43411
45524
|
addonId: null,
|
|
43412
45525
|
access: "view"
|
|
43413
45526
|
},
|
|
45527
|
+
"userManagement.listExternalIdentities": {
|
|
45528
|
+
capName: "user-management",
|
|
45529
|
+
capScope: "system",
|
|
45530
|
+
addonId: null,
|
|
45531
|
+
access: "view"
|
|
45532
|
+
},
|
|
43414
45533
|
"userManagement.listOauthSessions": {
|
|
43415
45534
|
capName: "user-management",
|
|
43416
45535
|
capScope: "system",
|
|
@@ -43489,6 +45608,12 @@ Object.freeze({
|
|
|
43489
45608
|
addonId: null,
|
|
43490
45609
|
access: "create"
|
|
43491
45610
|
},
|
|
45611
|
+
"userManagement.unlinkExternalIdentity": {
|
|
45612
|
+
capName: "user-management",
|
|
45613
|
+
capScope: "system",
|
|
45614
|
+
addonId: null,
|
|
45615
|
+
access: "delete"
|
|
45616
|
+
},
|
|
43492
45617
|
"userManagement.updateUser": {
|
|
43493
45618
|
capName: "user-management",
|
|
43494
45619
|
capScope: "system",
|
|
@@ -45252,7 +47377,11 @@ var DISPLAY_ICON_VOCABULARY = [
|
|
|
45252
47377
|
];
|
|
45253
47378
|
DISPLAY_ICON_VOCABULARY.map((e) => e.key);
|
|
45254
47379
|
DISPLAY_ICON_VOCABULARY.filter((e) => e.aliasOf === void 0).map((e) => e.key);
|
|
45255
|
-
new Map(DISPLAY_ICON_VOCABULARY.map((e) => [e.key, e]));
|
|
47380
|
+
var ENTRY_BY_KEY = new Map(DISPLAY_ICON_VOCABULARY.map((e) => [e.key, e]));
|
|
47381
|
+
/** Is this a key of the shared vocabulary? */
|
|
47382
|
+
function isDisplayIconKey(value) {
|
|
47383
|
+
return typeof value === "string" && ENTRY_BY_KEY.has(value);
|
|
47384
|
+
}
|
|
45256
47385
|
Object.freeze({
|
|
45257
47386
|
"accessories.getStatus": [{
|
|
45258
47387
|
name: "deviceId",
|
|
@@ -45618,11 +47747,6 @@ Object.freeze({
|
|
|
45618
47747
|
form: "single",
|
|
45619
47748
|
optional: false
|
|
45620
47749
|
}],
|
|
45621
|
-
"decoder.createSession": [{
|
|
45622
|
-
name: "deviceId",
|
|
45623
|
-
form: "single",
|
|
45624
|
-
optional: true
|
|
45625
|
-
}],
|
|
45626
47750
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
45627
47751
|
name: "deviceId",
|
|
45628
47752
|
form: "single",
|
|
@@ -46593,6 +48717,11 @@ Object.freeze({
|
|
|
46593
48717
|
form: "single",
|
|
46594
48718
|
optional: false
|
|
46595
48719
|
}],
|
|
48720
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
48721
|
+
name: "deviceId",
|
|
48722
|
+
form: "single",
|
|
48723
|
+
optional: false
|
|
48724
|
+
}],
|
|
46596
48725
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
46597
48726
|
name: "deviceId",
|
|
46598
48727
|
form: "single",
|
|
@@ -46783,6 +48912,11 @@ Object.freeze({
|
|
|
46783
48912
|
form: "single",
|
|
46784
48913
|
optional: false
|
|
46785
48914
|
}],
|
|
48915
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
48916
|
+
name: "deviceId",
|
|
48917
|
+
form: "single",
|
|
48918
|
+
optional: false
|
|
48919
|
+
}],
|
|
46786
48920
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
46787
48921
|
name: "deviceId",
|
|
46788
48922
|
form: "single",
|
|
@@ -46833,6 +48967,11 @@ Object.freeze({
|
|
|
46833
48967
|
form: "single",
|
|
46834
48968
|
optional: false
|
|
46835
48969
|
}],
|
|
48970
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
48971
|
+
name: "deviceId",
|
|
48972
|
+
form: "single",
|
|
48973
|
+
optional: false
|
|
48974
|
+
}],
|
|
46836
48975
|
"pipelineAnalytics.setTrackFlags": [{
|
|
46837
48976
|
name: "deviceId",
|
|
46838
48977
|
form: "single",
|
|
@@ -46853,6 +48992,11 @@ Object.freeze({
|
|
|
46853
48992
|
form: "single",
|
|
46854
48993
|
optional: false
|
|
46855
48994
|
}],
|
|
48995
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
48996
|
+
name: "deviceIds",
|
|
48997
|
+
form: "array",
|
|
48998
|
+
optional: true
|
|
48999
|
+
}],
|
|
46856
49000
|
"pipelineExecutor.runPipeline": [{
|
|
46857
49001
|
name: "deviceId",
|
|
46858
49002
|
form: "single",
|
|
@@ -46958,6 +49102,11 @@ Object.freeze({
|
|
|
46958
49102
|
form: "single",
|
|
46959
49103
|
optional: false
|
|
46960
49104
|
}],
|
|
49105
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
49106
|
+
name: "deviceId",
|
|
49107
|
+
form: "single",
|
|
49108
|
+
optional: false
|
|
49109
|
+
}],
|
|
46961
49110
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
46962
49111
|
name: "deviceId",
|
|
46963
49112
|
form: "single",
|
|
@@ -48874,16 +51023,6 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
|
48874
51023
|
var MB = 1024 * 1024;
|
|
48875
51024
|
1024 * MB, 3072 * MB;
|
|
48876
51025
|
//#endregion
|
|
48877
|
-
//#region src/hub-browser-origin.ts
|
|
48878
|
-
async function hubBrowserOrigin(localNetwork, logger) {
|
|
48879
|
-
try {
|
|
48880
|
-
return (await localNetwork.getAddresses.query()).roles.publicEndpoint.resolved;
|
|
48881
|
-
} catch (err) {
|
|
48882
|
-
logger.warn("hub address unavailable from local-network — using the localhost default", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
48883
|
-
return null;
|
|
48884
|
-
}
|
|
48885
|
-
}
|
|
48886
|
-
//#endregion
|
|
48887
51026
|
Object.defineProperty(exports, "BaseAddon", {
|
|
48888
51027
|
enumerable: true,
|
|
48889
51028
|
get: function() {
|
|
@@ -48932,10 +51071,10 @@ Object.defineProperty(exports, "errMsg", {
|
|
|
48932
51071
|
return errMsg;
|
|
48933
51072
|
}
|
|
48934
51073
|
});
|
|
48935
|
-
Object.defineProperty(exports, "
|
|
51074
|
+
Object.defineProperty(exports, "isDisplayIconKey", {
|
|
48936
51075
|
enumerable: true,
|
|
48937
51076
|
get: function() {
|
|
48938
|
-
return
|
|
51077
|
+
return isDisplayIconKey;
|
|
48939
51078
|
}
|
|
48940
51079
|
});
|
|
48941
51080
|
Object.defineProperty(exports, "loginMethodCapability", {
|