@camstack/addon-model-studio 1.1.218 → 1.1.220
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/{MotionZonesSettings-Capre9Um.mjs → MotionZonesSettings-RLi86Dlo.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-CTeuaW76.mjs → PrivacyMaskSettings-BLFXfOAe.mjs} +4 -4
- package/dist/{SceneMonitorEditor-B_wS3Aqg.mjs → SceneMonitorEditor-iPKa6teM.mjs} +3 -3
- package/dist/_stub.js +4228 -4228
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-WTUyarUL.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CTVSBRdm.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-TGkmHscN.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-N-aNmJfG.mjs → hostInit-_Xl3Xebm.mjs} +2 -2
- package/dist/model-studio.addon.js +1904 -55
- package/dist/model-studio.addon.mjs +1904 -55
- package/dist/{player-overlays-CYNFSDYV.mjs → player-overlays-DFRwweAg.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-oZzHP3lx.mjs → responsive-Bsh36MLy.mjs} +1 -1
- package/dist/{scene-monitor-copy-C2YKn7wo.mjs → scene-monitor-copy-DT36bTgI.mjs} +1 -1
- package/dist/{square-DUBjO0Wq.mjs → square-Bixsl2bJ.mjs} +1 -1
- package/dist/{trash-2-DpaexsRt.mjs → trash-2-dJ4x-ifm.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BA6FOYZy.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BHni-aXq.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CE6l15x5.mjs +0 -26
|
@@ -367,7 +367,7 @@ function buildScryptedRegistryDescriptor(entry) {
|
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
//#endregion
|
|
370
|
-
//#region ../types/dist/event-category-
|
|
370
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
371
371
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
372
372
|
EventCategory["SystemBoot"] = "system.boot";
|
|
373
373
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -446,6 +446,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
446
446
|
*/
|
|
447
447
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
448
448
|
/**
|
|
449
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
450
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
451
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
452
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
453
|
+
*/
|
|
454
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
455
|
+
/**
|
|
449
456
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
450
457
|
* transitions from `failed` back to `healthy` (typically via the
|
|
451
458
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -5738,7 +5745,7 @@ var ZodIssueCode = {
|
|
|
5738
5745
|
var ZodFirstPartyTypeKind;
|
|
5739
5746
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5740
5747
|
//#endregion
|
|
5741
|
-
//#region ../types/dist/sleep-
|
|
5748
|
+
//#region ../types/dist/sleep-DujUvOcb.mjs
|
|
5742
5749
|
/**
|
|
5743
5750
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5744
5751
|
* window to float samples (D455).
|
|
@@ -5817,6 +5824,97 @@ function buildAlawTable() {
|
|
|
5817
5824
|
}
|
|
5818
5825
|
buildUlawTable();
|
|
5819
5826
|
buildAlawTable();
|
|
5827
|
+
/** Is this field's stored value a credential? */
|
|
5828
|
+
function isSecretConfigField(field) {
|
|
5829
|
+
if (field.type === "password") return true;
|
|
5830
|
+
return "secret" in field && field.secret === true;
|
|
5831
|
+
}
|
|
5832
|
+
/**
|
|
5833
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5834
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5835
|
+
*/
|
|
5836
|
+
function isKeychainStoredField(field) {
|
|
5837
|
+
if (!isSecretConfigField(field)) return false;
|
|
5838
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5839
|
+
return !("storage" in field && field.storage === "inline");
|
|
5840
|
+
}
|
|
5841
|
+
/**
|
|
5842
|
+
* What a settings blob holds where a secret used to be.
|
|
5843
|
+
*
|
|
5844
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5845
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5846
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5847
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5848
|
+
*
|
|
5849
|
+
* The same shapes travel to and from the admin UI:
|
|
5850
|
+
*
|
|
5851
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5852
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5853
|
+
* value is set, never the value.
|
|
5854
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5855
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5856
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5857
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5858
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5859
|
+
*
|
|
5860
|
+
* Pure and browser-safe.
|
|
5861
|
+
*/
|
|
5862
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5863
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5864
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5865
|
+
function isRecord$1(value) {
|
|
5866
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5867
|
+
}
|
|
5868
|
+
function makeSecretMarker(ref) {
|
|
5869
|
+
return {
|
|
5870
|
+
$secret: ref,
|
|
5871
|
+
v: 1
|
|
5872
|
+
};
|
|
5873
|
+
}
|
|
5874
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5875
|
+
function isSecretMarker(value) {
|
|
5876
|
+
if (!isRecord$1(value)) return false;
|
|
5877
|
+
const ref = value["$secret"];
|
|
5878
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5879
|
+
}
|
|
5880
|
+
function isSecretClear(value) {
|
|
5881
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5882
|
+
}
|
|
5883
|
+
/**
|
|
5884
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5885
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5886
|
+
* survives this function.
|
|
5887
|
+
*/
|
|
5888
|
+
function toSecretFieldView(stored) {
|
|
5889
|
+
if (isSecretMarker(stored)) return {
|
|
5890
|
+
$secret: stored.$secret,
|
|
5891
|
+
v: 1,
|
|
5892
|
+
set: true
|
|
5893
|
+
};
|
|
5894
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5895
|
+
$secret: null,
|
|
5896
|
+
v: 1,
|
|
5897
|
+
set: true,
|
|
5898
|
+
inline: true
|
|
5899
|
+
};
|
|
5900
|
+
return null;
|
|
5901
|
+
}
|
|
5902
|
+
/**
|
|
5903
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5904
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5905
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5906
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5907
|
+
*/
|
|
5908
|
+
function classifySecretWrite(incoming) {
|
|
5909
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5910
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5911
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5912
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5913
|
+
return {
|
|
5914
|
+
kind: "set",
|
|
5915
|
+
value: incoming
|
|
5916
|
+
};
|
|
5917
|
+
}
|
|
5820
5918
|
Object.fromEntries([
|
|
5821
5919
|
{
|
|
5822
5920
|
id: "overview",
|
|
@@ -5988,33 +6086,19 @@ Object.fromEntries([
|
|
|
5988
6086
|
function isValuelessField(field) {
|
|
5989
6087
|
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";
|
|
5990
6088
|
}
|
|
5991
|
-
|
|
5992
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5993
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5994
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5995
|
-
*
|
|
5996
|
-
* For each leaf field:
|
|
5997
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5998
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5999
|
-
*
|
|
6000
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
6001
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
6002
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
6003
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
6004
|
-
*/
|
|
6005
|
-
function hydrateSchema(schema, values) {
|
|
6089
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
6006
6090
|
return {
|
|
6007
6091
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
6008
6092
|
sections: schema.sections.map((section) => ({
|
|
6009
6093
|
...section,
|
|
6010
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
6094
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
6011
6095
|
}))
|
|
6012
6096
|
};
|
|
6013
6097
|
}
|
|
6014
|
-
function hydrateField(field, values) {
|
|
6098
|
+
function hydrateField(field, values, options) {
|
|
6015
6099
|
if (isValuelessField(field)) return field;
|
|
6016
6100
|
if (field.type === "group") {
|
|
6017
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
6101
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
6018
6102
|
return {
|
|
6019
6103
|
...field,
|
|
6020
6104
|
fields: hydratedChildren
|
|
@@ -6023,7 +6107,7 @@ function hydrateField(field, values) {
|
|
|
6023
6107
|
if (field.type === "sub-tabs") {
|
|
6024
6108
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
6025
6109
|
...tab,
|
|
6026
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
6110
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
6027
6111
|
}));
|
|
6028
6112
|
return {
|
|
6029
6113
|
...field,
|
|
@@ -6033,6 +6117,33 @@ function hydrateField(field, values) {
|
|
|
6033
6117
|
const key = field.key;
|
|
6034
6118
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
6035
6119
|
const defaultValue = field.default;
|
|
6120
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
6121
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
6122
|
+
...field,
|
|
6123
|
+
value: toSecretFieldView(storedValue)
|
|
6124
|
+
};
|
|
6125
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
6126
|
+
...field,
|
|
6127
|
+
value: null
|
|
6128
|
+
};
|
|
6129
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
6130
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
6131
|
+
if (secretItemKeys.length > 0) {
|
|
6132
|
+
const rows = storedValue.map((row) => {
|
|
6133
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
6134
|
+
const out = { ...row };
|
|
6135
|
+
for (const k of secretItemKeys) {
|
|
6136
|
+
const v = Reflect.get(row, k);
|
|
6137
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
6138
|
+
}
|
|
6139
|
+
return out;
|
|
6140
|
+
});
|
|
6141
|
+
return {
|
|
6142
|
+
...field,
|
|
6143
|
+
value: rows
|
|
6144
|
+
};
|
|
6145
|
+
}
|
|
6146
|
+
}
|
|
6036
6147
|
if (field.multiple) {
|
|
6037
6148
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
6038
6149
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -6275,6 +6386,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
6275
6386
|
}
|
|
6276
6387
|
return out;
|
|
6277
6388
|
}
|
|
6389
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6390
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6391
|
+
function globalSecretScope() {
|
|
6392
|
+
return GLOBAL_SCOPE;
|
|
6393
|
+
}
|
|
6394
|
+
function encodeSegment(value) {
|
|
6395
|
+
return encodeURIComponent(value);
|
|
6396
|
+
}
|
|
6397
|
+
/**
|
|
6398
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6399
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6400
|
+
* `providers[authentik].clientSecret`.
|
|
6401
|
+
*/
|
|
6402
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6403
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6404
|
+
}
|
|
6405
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6406
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6407
|
+
fieldPath;
|
|
6408
|
+
constructor(fieldPath, cause) {
|
|
6409
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6410
|
+
this.fieldPath = fieldPath;
|
|
6411
|
+
this.name = "KeychainWriteRefusedError";
|
|
6412
|
+
}
|
|
6413
|
+
};
|
|
6414
|
+
var KEEP = { kind: "keep" };
|
|
6415
|
+
function isRecord$2(value) {
|
|
6416
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6417
|
+
}
|
|
6418
|
+
function defaultMintId() {
|
|
6419
|
+
return globalThis.crypto.randomUUID();
|
|
6420
|
+
}
|
|
6421
|
+
/** Every marker ref anywhere under `value`. */
|
|
6422
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6423
|
+
if (isSecretMarker(value)) {
|
|
6424
|
+
out.push(value.$secret);
|
|
6425
|
+
return out;
|
|
6426
|
+
}
|
|
6427
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6428
|
+
else if (isRecord$2(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6429
|
+
return out;
|
|
6430
|
+
}
|
|
6431
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6432
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6433
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6434
|
+
}
|
|
6435
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6436
|
+
const intent = classifySecretWrite(incoming);
|
|
6437
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6438
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6439
|
+
if (intent.kind === "keep") return KEEP;
|
|
6440
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6441
|
+
if (intent.kind === "clear") {
|
|
6442
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6443
|
+
return {
|
|
6444
|
+
kind: "value",
|
|
6445
|
+
value: null
|
|
6446
|
+
};
|
|
6447
|
+
}
|
|
6448
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6449
|
+
kind: "value",
|
|
6450
|
+
value: stored
|
|
6451
|
+
};
|
|
6452
|
+
try {
|
|
6453
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6454
|
+
} catch (err) {
|
|
6455
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6456
|
+
}
|
|
6457
|
+
return {
|
|
6458
|
+
kind: "value",
|
|
6459
|
+
value: makeSecretMarker(ref)
|
|
6460
|
+
};
|
|
6461
|
+
}
|
|
6462
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6463
|
+
function applyMember(out, key, result, storedParent) {
|
|
6464
|
+
if (result.kind === "value") {
|
|
6465
|
+
out[key] = result.value;
|
|
6466
|
+
return;
|
|
6467
|
+
}
|
|
6468
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6469
|
+
else delete out[key];
|
|
6470
|
+
}
|
|
6471
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6472
|
+
const out = { ...incoming };
|
|
6473
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6474
|
+
return out;
|
|
6475
|
+
}
|
|
6476
|
+
function rowId(row, idKey) {
|
|
6477
|
+
const raw = row[idKey];
|
|
6478
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6479
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6480
|
+
return null;
|
|
6481
|
+
}
|
|
6482
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6483
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$2) : [];
|
|
6484
|
+
if (!Array.isArray(incoming)) {
|
|
6485
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6486
|
+
return {
|
|
6487
|
+
kind: "value",
|
|
6488
|
+
value: incoming
|
|
6489
|
+
};
|
|
6490
|
+
}
|
|
6491
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6492
|
+
for (const row of storedRows) {
|
|
6493
|
+
const id = rowId(row, node.idKey);
|
|
6494
|
+
if (id !== null) storedById.set(id, row);
|
|
6495
|
+
}
|
|
6496
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6497
|
+
const rows = [];
|
|
6498
|
+
for (const row of incoming) {
|
|
6499
|
+
if (!isRecord$2(row)) {
|
|
6500
|
+
rows.push(row);
|
|
6501
|
+
continue;
|
|
6502
|
+
}
|
|
6503
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6504
|
+
kept.add(id);
|
|
6505
|
+
const withId = {
|
|
6506
|
+
...row,
|
|
6507
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6508
|
+
};
|
|
6509
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6510
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6511
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6512
|
+
}
|
|
6513
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6514
|
+
return {
|
|
6515
|
+
kind: "value",
|
|
6516
|
+
value: rows
|
|
6517
|
+
};
|
|
6518
|
+
}
|
|
6519
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6520
|
+
switch (node.kind) {
|
|
6521
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6522
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6523
|
+
case "object": {
|
|
6524
|
+
if (!isRecord$2(incoming)) {
|
|
6525
|
+
if (incoming === void 0) return KEEP;
|
|
6526
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6527
|
+
return {
|
|
6528
|
+
kind: "value",
|
|
6529
|
+
value: incoming
|
|
6530
|
+
};
|
|
6531
|
+
}
|
|
6532
|
+
const storedObj = isRecord$2(stored) ? stored : {};
|
|
6533
|
+
return {
|
|
6534
|
+
kind: "value",
|
|
6535
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6536
|
+
};
|
|
6537
|
+
}
|
|
6538
|
+
}
|
|
6539
|
+
}
|
|
6540
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6541
|
+
function splitNodeKey(key) {
|
|
6542
|
+
const at = key.indexOf("@");
|
|
6543
|
+
return at <= 0 ? {
|
|
6544
|
+
base: key,
|
|
6545
|
+
nodeId: null
|
|
6546
|
+
} : {
|
|
6547
|
+
base: key.slice(0, at),
|
|
6548
|
+
nodeId: key.slice(at + 1)
|
|
6549
|
+
};
|
|
6550
|
+
}
|
|
6551
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6552
|
+
async function transformSecretWrite(input) {
|
|
6553
|
+
const deletes = [];
|
|
6554
|
+
const base = {
|
|
6555
|
+
secrets: input.secrets,
|
|
6556
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6557
|
+
deletes,
|
|
6558
|
+
operatorWrite: input.operatorWrite === true
|
|
6559
|
+
};
|
|
6560
|
+
const out = {};
|
|
6561
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6562
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6563
|
+
const node = input.tree.get(baseKey);
|
|
6564
|
+
if (node === void 0) {
|
|
6565
|
+
out[key] = incoming;
|
|
6566
|
+
continue;
|
|
6567
|
+
}
|
|
6568
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6569
|
+
kind: "node",
|
|
6570
|
+
nodeId
|
|
6571
|
+
} : input.scope ?? globalSecretScope();
|
|
6572
|
+
const result = await writeNode({
|
|
6573
|
+
...base,
|
|
6574
|
+
scope
|
|
6575
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6576
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6577
|
+
}
|
|
6578
|
+
return {
|
|
6579
|
+
patch: out,
|
|
6580
|
+
afterWrite: async () => {
|
|
6581
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6582
|
+
try {
|
|
6583
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6584
|
+
return { orphaned: [] };
|
|
6585
|
+
} catch {
|
|
6586
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6587
|
+
}
|
|
6588
|
+
}
|
|
6589
|
+
};
|
|
6590
|
+
}
|
|
6591
|
+
/**
|
|
6592
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6593
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6594
|
+
*/
|
|
6595
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6596
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6597
|
+
if (refs.length === 0) return {
|
|
6598
|
+
value,
|
|
6599
|
+
unresolved: []
|
|
6600
|
+
};
|
|
6601
|
+
const answers = await secrets.resolve(refs);
|
|
6602
|
+
const unresolved = [];
|
|
6603
|
+
for (const ref of new Set(refs)) {
|
|
6604
|
+
const answer = answers[ref];
|
|
6605
|
+
if (answer === void 0) unresolved.push({
|
|
6606
|
+
ref,
|
|
6607
|
+
reason: "not-initialized"
|
|
6608
|
+
});
|
|
6609
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6610
|
+
ref,
|
|
6611
|
+
reason: answer.reason
|
|
6612
|
+
});
|
|
6613
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6614
|
+
ref,
|
|
6615
|
+
reason: answer.kind
|
|
6616
|
+
});
|
|
6617
|
+
}
|
|
6618
|
+
const substitute = (v) => {
|
|
6619
|
+
if (isSecretMarker(v)) {
|
|
6620
|
+
const answer = answers[v.$secret];
|
|
6621
|
+
return answer?.kind === "value" ? {
|
|
6622
|
+
keep: true,
|
|
6623
|
+
value: answer.value
|
|
6624
|
+
} : {
|
|
6625
|
+
keep: false,
|
|
6626
|
+
value: void 0
|
|
6627
|
+
};
|
|
6628
|
+
}
|
|
6629
|
+
if (Array.isArray(v)) {
|
|
6630
|
+
const items = [];
|
|
6631
|
+
for (const item of v) {
|
|
6632
|
+
const s = substitute(item);
|
|
6633
|
+
if (s.keep) items.push(s.value);
|
|
6634
|
+
}
|
|
6635
|
+
return {
|
|
6636
|
+
keep: true,
|
|
6637
|
+
value: items
|
|
6638
|
+
};
|
|
6639
|
+
}
|
|
6640
|
+
if (isRecord$2(v)) {
|
|
6641
|
+
const out = {};
|
|
6642
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6643
|
+
const s = substitute(child);
|
|
6644
|
+
if (s.keep) out[k] = s.value;
|
|
6645
|
+
}
|
|
6646
|
+
return {
|
|
6647
|
+
keep: true,
|
|
6648
|
+
value: out
|
|
6649
|
+
};
|
|
6650
|
+
}
|
|
6651
|
+
return {
|
|
6652
|
+
keep: true,
|
|
6653
|
+
value: v
|
|
6654
|
+
};
|
|
6655
|
+
};
|
|
6656
|
+
return {
|
|
6657
|
+
value: substitute(value).value,
|
|
6658
|
+
unresolved
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6661
|
+
function touchesTree(tree, patch) {
|
|
6662
|
+
if (tree.size === 0) return false;
|
|
6663
|
+
for (const key of Object.keys(patch)) {
|
|
6664
|
+
const at = key.indexOf("@");
|
|
6665
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6666
|
+
}
|
|
6667
|
+
return false;
|
|
6668
|
+
}
|
|
6669
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6670
|
+
async function readStoredAddonBlob(raw) {
|
|
6671
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6672
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6673
|
+
const result = await threeWay.call(raw);
|
|
6674
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6675
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6676
|
+
}
|
|
6677
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6678
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6679
|
+
const serialize = (key, fn) => {
|
|
6680
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6681
|
+
const tail = next.catch(() => void 0);
|
|
6682
|
+
chains.set(key, tail);
|
|
6683
|
+
tail.then(() => {
|
|
6684
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6685
|
+
});
|
|
6686
|
+
return next;
|
|
6687
|
+
};
|
|
6688
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6689
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6690
|
+
return serialize(chainKey, async () => {
|
|
6691
|
+
const stored = await readStored();
|
|
6692
|
+
const result = await transformSecretWrite({
|
|
6693
|
+
tree,
|
|
6694
|
+
secrets: opts.secrets,
|
|
6695
|
+
patch,
|
|
6696
|
+
stored,
|
|
6697
|
+
...scope !== void 0 ? { scope } : {},
|
|
6698
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6699
|
+
});
|
|
6700
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6701
|
+
const { orphaned } = await result.afterWrite();
|
|
6702
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6703
|
+
});
|
|
6704
|
+
};
|
|
6705
|
+
const wrapped = {
|
|
6706
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6707
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6708
|
+
kind: "device",
|
|
6709
|
+
deviceId
|
|
6710
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6711
|
+
};
|
|
6712
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6713
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6714
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6715
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6716
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6717
|
+
} });
|
|
6718
|
+
}
|
|
6719
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6720
|
+
function withSecretAwareSettings(context, opts) {
|
|
6721
|
+
const raw = context.settings;
|
|
6722
|
+
if (raw === void 0) return context;
|
|
6723
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6724
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6725
|
+
if (prop === "settings") return settings;
|
|
6726
|
+
return Reflect.get(target, prop, receiver);
|
|
6727
|
+
} });
|
|
6728
|
+
}
|
|
6729
|
+
var LEAF = { kind: "leaf" };
|
|
6730
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6731
|
+
function collectFields(fields, out) {
|
|
6732
|
+
for (const field of fields) {
|
|
6733
|
+
if (field.type === "group") {
|
|
6734
|
+
collectFields(field.fields, out);
|
|
6735
|
+
continue;
|
|
6736
|
+
}
|
|
6737
|
+
if (field.type === "sub-tabs") {
|
|
6738
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6739
|
+
continue;
|
|
6740
|
+
}
|
|
6741
|
+
if (field.type === "editable-array") {
|
|
6742
|
+
const item = /* @__PURE__ */ new Map();
|
|
6743
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6744
|
+
if (item.size > 0) out.set(field.key, {
|
|
6745
|
+
kind: "array",
|
|
6746
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6747
|
+
item
|
|
6748
|
+
});
|
|
6749
|
+
continue;
|
|
6750
|
+
}
|
|
6751
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6752
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6753
|
+
}
|
|
6754
|
+
}
|
|
6755
|
+
/** The secret tree a settings schema declares. */
|
|
6756
|
+
function secretTreeFromSchema(schema) {
|
|
6757
|
+
const out = /* @__PURE__ */ new Map();
|
|
6758
|
+
if (schema === null) return out;
|
|
6759
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6760
|
+
return out;
|
|
6761
|
+
}
|
|
6762
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6763
|
+
function parseSecretStatePath(path) {
|
|
6764
|
+
const segments = [];
|
|
6765
|
+
for (const raw of path.split(".")) {
|
|
6766
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6767
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6768
|
+
segments.push(m[2] !== void 0 ? {
|
|
6769
|
+
key: m[1],
|
|
6770
|
+
idKey: m[2]
|
|
6771
|
+
} : { key: m[1] });
|
|
6772
|
+
}
|
|
6773
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6774
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6775
|
+
return segments;
|
|
6776
|
+
}
|
|
6777
|
+
function insert(into, segments) {
|
|
6778
|
+
const [head, ...rest] = segments;
|
|
6779
|
+
if (head === void 0) return;
|
|
6780
|
+
if (rest.length === 0) {
|
|
6781
|
+
into.set(head.key, LEAF);
|
|
6782
|
+
return;
|
|
6783
|
+
}
|
|
6784
|
+
const existing = into.get(head.key);
|
|
6785
|
+
if (head.idKey !== void 0) {
|
|
6786
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6787
|
+
insert(item, rest);
|
|
6788
|
+
into.set(head.key, {
|
|
6789
|
+
kind: "array",
|
|
6790
|
+
idKey: head.idKey,
|
|
6791
|
+
item
|
|
6792
|
+
});
|
|
6793
|
+
return;
|
|
6794
|
+
}
|
|
6795
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6796
|
+
insert(children, rest);
|
|
6797
|
+
into.set(head.key, {
|
|
6798
|
+
kind: "object",
|
|
6799
|
+
children
|
|
6800
|
+
});
|
|
6801
|
+
}
|
|
6802
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6803
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6804
|
+
if (paths.length === 0) return tree;
|
|
6805
|
+
const out = new Map(tree);
|
|
6806
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6807
|
+
return out;
|
|
6808
|
+
}
|
|
6809
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6810
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6811
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6812
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6813
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
6278
6814
|
/**
|
|
6279
6815
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
6280
6816
|
*
|
|
@@ -6344,6 +6880,25 @@ var BaseAddon = class {
|
|
|
6344
6880
|
settingsStoreReady = false;
|
|
6345
6881
|
/** Default config values. Provided via constructor. */
|
|
6346
6882
|
defaults;
|
|
6883
|
+
/**
|
|
6884
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6885
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6886
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6887
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6888
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6889
|
+
*/
|
|
6890
|
+
secretStatePaths = [];
|
|
6891
|
+
_addonSecretTree = null;
|
|
6892
|
+
_deviceSecretTree = null;
|
|
6893
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6894
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6895
|
+
_unresolvedSecrets = [];
|
|
6896
|
+
_secretRetryTimer = null;
|
|
6897
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6898
|
+
_secretChangeTimer = null;
|
|
6899
|
+
_secretChangeUnsub = null;
|
|
6900
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6901
|
+
_operatorWriteDepth = 0;
|
|
6347
6902
|
constructor(defaults) {
|
|
6348
6903
|
this.defaults = defaults;
|
|
6349
6904
|
this._config = { ...defaults };
|
|
@@ -6379,8 +6934,18 @@ var BaseAddon = class {
|
|
|
6379
6934
|
return this._config;
|
|
6380
6935
|
}
|
|
6381
6936
|
async initialize(context) {
|
|
6382
|
-
|
|
6937
|
+
const secrets = context.secrets;
|
|
6938
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6939
|
+
secrets,
|
|
6940
|
+
addonTree: () => this.addonSecretTree(),
|
|
6941
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6942
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6943
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6944
|
+
}) : context;
|
|
6383
6945
|
await this.resolveConfig();
|
|
6946
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6947
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6948
|
+
});
|
|
6384
6949
|
const result = await this.onInitialize();
|
|
6385
6950
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6386
6951
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6413,6 +6978,12 @@ var BaseAddon = class {
|
|
|
6413
6978
|
*/
|
|
6414
6979
|
async onHubReachable() {}
|
|
6415
6980
|
async shutdown() {
|
|
6981
|
+
this._secretChangeUnsub?.();
|
|
6982
|
+
this._secretChangeUnsub = null;
|
|
6983
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6984
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6985
|
+
this._secretRetryTimer = null;
|
|
6986
|
+
this._secretChangeTimer = null;
|
|
6416
6987
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6417
6988
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6418
6989
|
await this.onShutdown();
|
|
@@ -6491,7 +7062,7 @@ var BaseAddon = class {
|
|
|
6491
7062
|
return hydrateSchema(schema, overlay ? {
|
|
6492
7063
|
...projected,
|
|
6493
7064
|
...overlay
|
|
6494
|
-
} : projected);
|
|
7065
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6495
7066
|
}
|
|
6496
7067
|
/**
|
|
6497
7068
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6540,7 +7111,7 @@ var BaseAddon = class {
|
|
|
6540
7111
|
return hydrateSchema({
|
|
6541
7112
|
...schema,
|
|
6542
7113
|
sections
|
|
6543
|
-
}, projected);
|
|
7114
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6544
7115
|
}
|
|
6545
7116
|
/**
|
|
6546
7117
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6594,18 +7165,50 @@ var BaseAddon = class {
|
|
|
6594
7165
|
value: result.value[key]
|
|
6595
7166
|
};
|
|
6596
7167
|
}
|
|
7168
|
+
/**
|
|
7169
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
7170
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
7171
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
7172
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
7173
|
+
* writing back what it read is not (D787).
|
|
7174
|
+
*/
|
|
7175
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
7176
|
+
this._operatorWriteDepth++;
|
|
7177
|
+
try {
|
|
7178
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7179
|
+
} finally {
|
|
7180
|
+
this._operatorWriteDepth--;
|
|
7181
|
+
}
|
|
7182
|
+
}
|
|
6597
7183
|
async updateGlobalSettings(patch, nodeId) {
|
|
7184
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7185
|
+
}
|
|
7186
|
+
/**
|
|
7187
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
7188
|
+
*
|
|
7189
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
7190
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
7191
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
7192
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
7193
|
+
*/
|
|
7194
|
+
async clearSecrets(keys, nodeId) {
|
|
7195
|
+
const tree = this.addonSecretTree();
|
|
7196
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
7197
|
+
const patch = {};
|
|
7198
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
7199
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
7200
|
+
}
|
|
7201
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6598
7202
|
const keys = this.perNodeKeys();
|
|
6599
7203
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6600
7204
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6601
|
-
const barePatch = patch;
|
|
6602
7205
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6603
7206
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6604
7207
|
if (target !== localNode) return;
|
|
6605
7208
|
await this.resolveConfig();
|
|
6606
7209
|
await this.onConfigChanged();
|
|
6607
7210
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6608
|
-
this.maybeAutoRestart(
|
|
7211
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6609
7212
|
}
|
|
6610
7213
|
/**
|
|
6611
7214
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6630,7 +7233,7 @@ var BaseAddon = class {
|
|
|
6630
7233
|
* time to return its response before the addon is torn down and
|
|
6631
7234
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6632
7235
|
*/
|
|
6633
|
-
maybeAutoRestart(
|
|
7236
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6634
7237
|
if (!schema) return;
|
|
6635
7238
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6636
7239
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6638,13 +7241,13 @@ var BaseAddon = class {
|
|
|
6638
7241
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6639
7242
|
}
|
|
6640
7243
|
if (restartKeys.size === 0) return;
|
|
6641
|
-
if (!
|
|
7244
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6642
7245
|
const ctx = this._ctx;
|
|
6643
7246
|
if (!ctx) return;
|
|
6644
7247
|
const addonId = ctx.id;
|
|
6645
7248
|
setImmediate(() => {
|
|
6646
7249
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6647
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
7250
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6648
7251
|
}).catch((err) => {
|
|
6649
7252
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6650
7253
|
});
|
|
@@ -6653,7 +7256,7 @@ var BaseAddon = class {
|
|
|
6653
7256
|
async getDeviceSettings(deviceId) {
|
|
6654
7257
|
const schema = this.deviceSettingsSchema();
|
|
6655
7258
|
if (!schema) return { sections: [] };
|
|
6656
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
7259
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6657
7260
|
}
|
|
6658
7261
|
async updateDeviceSettings(deviceId, patch) {
|
|
6659
7262
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6783,7 +7386,7 @@ var BaseAddon = class {
|
|
|
6783
7386
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6784
7387
|
*/
|
|
6785
7388
|
async resolveConfig() {
|
|
6786
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7389
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6787
7390
|
const perNode = this.perNodeKeys();
|
|
6788
7391
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6789
7392
|
const resolved = { ...this.defaults };
|
|
@@ -6808,7 +7411,7 @@ var BaseAddon = class {
|
|
|
6808
7411
|
key,
|
|
6809
7412
|
schema,
|
|
6810
7413
|
fallback,
|
|
6811
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7414
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6812
7415
|
write: async (patch) => {
|
|
6813
7416
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6814
7417
|
},
|
|
@@ -6825,7 +7428,7 @@ var BaseAddon = class {
|
|
|
6825
7428
|
key,
|
|
6826
7429
|
schema,
|
|
6827
7430
|
fallback,
|
|
6828
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7431
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6829
7432
|
write: async (patch) => {
|
|
6830
7433
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6831
7434
|
},
|
|
@@ -6837,6 +7440,70 @@ var BaseAddon = class {
|
|
|
6837
7440
|
} })
|
|
6838
7441
|
});
|
|
6839
7442
|
}
|
|
7443
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7444
|
+
addonSecretTree() {
|
|
7445
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7446
|
+
return this._addonSecretTree;
|
|
7447
|
+
}
|
|
7448
|
+
deviceSecretTree() {
|
|
7449
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7450
|
+
return this._deviceSecretTree;
|
|
7451
|
+
}
|
|
7452
|
+
/**
|
|
7453
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7454
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7455
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7456
|
+
* than start on an empty credential.
|
|
7457
|
+
*/
|
|
7458
|
+
get unresolvedSecrets() {
|
|
7459
|
+
return this._unresolvedSecrets;
|
|
7460
|
+
}
|
|
7461
|
+
/**
|
|
7462
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7463
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7464
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7465
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7466
|
+
* ever written back from here.
|
|
7467
|
+
*/
|
|
7468
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7469
|
+
const secrets = this._ctx?.secrets;
|
|
7470
|
+
if (secrets === void 0) return blob;
|
|
7471
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7472
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7473
|
+
if (refs.length === 0) {
|
|
7474
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7475
|
+
return blob;
|
|
7476
|
+
}
|
|
7477
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7478
|
+
if (trackForConfig) {
|
|
7479
|
+
this._unresolvedSecrets = unresolved;
|
|
7480
|
+
if (unresolved.length > 0) {
|
|
7481
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7482
|
+
ref: u.ref,
|
|
7483
|
+
reason: u.reason
|
|
7484
|
+
})) } });
|
|
7485
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7486
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7487
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7488
|
+
}
|
|
7489
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7490
|
+
}
|
|
7491
|
+
return value;
|
|
7492
|
+
}
|
|
7493
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7494
|
+
scheduleSecretReresolve(delayMs) {
|
|
7495
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7496
|
+
if (this[timerOf] !== null) return;
|
|
7497
|
+
const timer = setTimeout(() => {
|
|
7498
|
+
this[timerOf] = null;
|
|
7499
|
+
if (this._ctx === null) return;
|
|
7500
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7501
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7502
|
+
});
|
|
7503
|
+
}, delayMs);
|
|
7504
|
+
timer.unref?.();
|
|
7505
|
+
this[timerOf] = timer;
|
|
7506
|
+
}
|
|
6840
7507
|
/**
|
|
6841
7508
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6842
7509
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -14579,6 +15246,196 @@ id: union([string(), number()]) }), {
|
|
|
14579
15246
|
kind: "mutation",
|
|
14580
15247
|
auth: "admin"
|
|
14581
15248
|
});
|
|
15249
|
+
/**
|
|
15250
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
15251
|
+
*
|
|
15252
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
15253
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
15254
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
15255
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
15256
|
+
* against the CALLER, never against anything the caller claims.
|
|
15257
|
+
*
|
|
15258
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
15259
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
15260
|
+
* connection, the agent from its child's connection carried in
|
|
15261
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
15262
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
15263
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
15264
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
15265
|
+
* runner is the same OS user): see the threat model in
|
|
15266
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
15267
|
+
*
|
|
15268
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
15269
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
15270
|
+
* floors every method to admin anyway (D240).
|
|
15271
|
+
*
|
|
15272
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
15273
|
+
*/
|
|
15274
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
15275
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
15276
|
+
"key-missing",
|
|
15277
|
+
"wrong-key",
|
|
15278
|
+
"key-file-unreadable",
|
|
15279
|
+
"store-unavailable",
|
|
15280
|
+
"not-initialized",
|
|
15281
|
+
"decrypt-failed"
|
|
15282
|
+
]);
|
|
15283
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
15284
|
+
state: literal("locked"),
|
|
15285
|
+
reason: KeychainUnavailableReasonSchema
|
|
15286
|
+
})]);
|
|
15287
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
15288
|
+
object({
|
|
15289
|
+
kind: literal("value"),
|
|
15290
|
+
value: string(),
|
|
15291
|
+
version: number().int()
|
|
15292
|
+
}),
|
|
15293
|
+
object({ kind: literal("missing") }),
|
|
15294
|
+
object({
|
|
15295
|
+
kind: literal("unavailable"),
|
|
15296
|
+
reason: KeychainUnavailableReasonSchema
|
|
15297
|
+
}),
|
|
15298
|
+
object({ kind: literal("forbidden") })
|
|
15299
|
+
]);
|
|
15300
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
15301
|
+
/** Metadata of one stored value — never the value. */
|
|
15302
|
+
var KeychainSecretMetaSchema = object({
|
|
15303
|
+
ref: string(),
|
|
15304
|
+
owner: string(),
|
|
15305
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
15306
|
+
scope: string(),
|
|
15307
|
+
fieldPath: string(),
|
|
15308
|
+
version: number().int(),
|
|
15309
|
+
createdAt: number(),
|
|
15310
|
+
updatedAt: number(),
|
|
15311
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15312
|
+
updatedBy: string(),
|
|
15313
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
15314
|
+
lastReadAt: number().nullable()
|
|
15315
|
+
});
|
|
15316
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
15317
|
+
method(object({
|
|
15318
|
+
ref: string().min(1),
|
|
15319
|
+
value: string().min(1)
|
|
15320
|
+
}), object({
|
|
15321
|
+
ref: string(),
|
|
15322
|
+
version: number().int()
|
|
15323
|
+
}), {
|
|
15324
|
+
kind: "mutation",
|
|
15325
|
+
auth: "admin"
|
|
15326
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
15327
|
+
kind: "mutation",
|
|
15328
|
+
auth: "admin"
|
|
15329
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15330
|
+
var KeychainKeySourceSchema = object({
|
|
15331
|
+
kind: _enum([
|
|
15332
|
+
"config-file",
|
|
15333
|
+
"previous-config-file",
|
|
15334
|
+
"platform",
|
|
15335
|
+
"default-file"
|
|
15336
|
+
]),
|
|
15337
|
+
/** File sources only — a path is not a secret. */
|
|
15338
|
+
path: string().optional(),
|
|
15339
|
+
/**
|
|
15340
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
15341
|
+
* next to the database it protects (the default file). The page warns.
|
|
15342
|
+
*/
|
|
15343
|
+
sharesBackupWithDatabase: boolean()
|
|
15344
|
+
});
|
|
15345
|
+
var KeychainStatusSchema = object({
|
|
15346
|
+
keychain: KeychainStateSchema,
|
|
15347
|
+
/** The source of the master key in use; `null` while locked. */
|
|
15348
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
15349
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
15350
|
+
configuredSource: KeychainKeySourceSchema,
|
|
15351
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
15352
|
+
fingerprint: string().nullable(),
|
|
15353
|
+
activeKeyId: string().nullable(),
|
|
15354
|
+
/**
|
|
15355
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
15356
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
15357
|
+
*/
|
|
15358
|
+
rotationPending: boolean(),
|
|
15359
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
15360
|
+
retiredWraps: number().int(),
|
|
15361
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
15362
|
+
secretCount: number().int()
|
|
15363
|
+
});
|
|
15364
|
+
/**
|
|
15365
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
15366
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
15367
|
+
* never reported as an orphan (and never deleted as one).
|
|
15368
|
+
*/
|
|
15369
|
+
var KeychainSecretUsageSchema = _enum([
|
|
15370
|
+
"in-use",
|
|
15371
|
+
"orphan",
|
|
15372
|
+
"unknown"
|
|
15373
|
+
]);
|
|
15374
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
15375
|
+
var KeychainAuditActionSchema = _enum([
|
|
15376
|
+
"put",
|
|
15377
|
+
"delete",
|
|
15378
|
+
"reveal",
|
|
15379
|
+
"rotate-master-key",
|
|
15380
|
+
"purge-retired-keys",
|
|
15381
|
+
"download-recovery-key",
|
|
15382
|
+
"delete-orphans",
|
|
15383
|
+
"reset",
|
|
15384
|
+
"initialize"
|
|
15385
|
+
]);
|
|
15386
|
+
var KeychainAuditEntrySchema = object({
|
|
15387
|
+
id: string(),
|
|
15388
|
+
at: number(),
|
|
15389
|
+
action: KeychainAuditActionSchema,
|
|
15390
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
15391
|
+
actor: string(),
|
|
15392
|
+
ref: string().nullable(),
|
|
15393
|
+
detail: string().nullable()
|
|
15394
|
+
});
|
|
15395
|
+
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({
|
|
15396
|
+
value: string(),
|
|
15397
|
+
version: number().int()
|
|
15398
|
+
}), {
|
|
15399
|
+
kind: "mutation",
|
|
15400
|
+
auth: "admin",
|
|
15401
|
+
caller: "required"
|
|
15402
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
15403
|
+
deleted: array(string()).readonly(),
|
|
15404
|
+
kept: array(object({
|
|
15405
|
+
ref: string(),
|
|
15406
|
+
usage: KeychainSecretUsageSchema
|
|
15407
|
+
})).readonly()
|
|
15408
|
+
}), {
|
|
15409
|
+
kind: "mutation",
|
|
15410
|
+
auth: "admin",
|
|
15411
|
+
caller: "required"
|
|
15412
|
+
}), method(object({}), object({
|
|
15413
|
+
fingerprint: string(),
|
|
15414
|
+
keySource: KeychainKeySourceSchema
|
|
15415
|
+
}), {
|
|
15416
|
+
kind: "mutation",
|
|
15417
|
+
auth: "admin",
|
|
15418
|
+
caller: "required"
|
|
15419
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
15420
|
+
kind: "mutation",
|
|
15421
|
+
auth: "admin",
|
|
15422
|
+
caller: "required"
|
|
15423
|
+
}), method(object({}), object({
|
|
15424
|
+
key: string(),
|
|
15425
|
+
fingerprint: string(),
|
|
15426
|
+
keySource: KeychainKeySourceSchema
|
|
15427
|
+
}), {
|
|
15428
|
+
kind: "mutation",
|
|
15429
|
+
auth: "admin",
|
|
15430
|
+
caller: "required"
|
|
15431
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
15432
|
+
archivedCollection: string().nullable(),
|
|
15433
|
+
archived: number().int()
|
|
15434
|
+
}), {
|
|
15435
|
+
kind: "mutation",
|
|
15436
|
+
auth: "admin",
|
|
15437
|
+
caller: "required"
|
|
15438
|
+
});
|
|
14582
15439
|
method(_void(), object({
|
|
14583
15440
|
id: string(),
|
|
14584
15441
|
name: string(),
|
|
@@ -15616,7 +16473,11 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15616
16473
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15617
16474
|
var DevicePersistConfigPayloadSchema = object({
|
|
15618
16475
|
deviceId: number(),
|
|
15619
|
-
data: record(string(), unknown())
|
|
16476
|
+
data: record(string(), unknown()),
|
|
16477
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
16478
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
16479
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
16480
|
+
secretConfigPaths: array(string()).optional()
|
|
15620
16481
|
});
|
|
15621
16482
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15622
16483
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -22601,8 +23462,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22601
23462
|
]);
|
|
22602
23463
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22603
23464
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22604
|
-
/**
|
|
22605
|
-
|
|
23465
|
+
/**
|
|
23466
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
23467
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
23468
|
+
*
|
|
23469
|
+
* - `operator` — drawn by hand.
|
|
23470
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
23471
|
+
* model, or a larger teacher model).
|
|
23472
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
23473
|
+
* back from the track store (never a re-run).
|
|
23474
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
23475
|
+
*/
|
|
23476
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
23477
|
+
"operator",
|
|
23478
|
+
"assist",
|
|
23479
|
+
"pipeline",
|
|
23480
|
+
"llm"
|
|
23481
|
+
]);
|
|
22606
23482
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22607
23483
|
var RetrainBboxSchema = object({
|
|
22608
23484
|
x: number(),
|
|
@@ -22620,7 +23496,8 @@ var RetrainBboxSchema = object({
|
|
|
22620
23496
|
*/
|
|
22621
23497
|
var RetrainAnnotationSchema = object({
|
|
22622
23498
|
id: string(),
|
|
22623
|
-
|
|
23499
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
23500
|
+
trackId: string().optional(),
|
|
22624
23501
|
deviceId: number(),
|
|
22625
23502
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22626
23503
|
mediaKey: string(),
|
|
@@ -22669,13 +23546,47 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22669
23546
|
* fail, whatever became of the original. */
|
|
22670
23547
|
copied: boolean()
|
|
22671
23548
|
});
|
|
23549
|
+
/**
|
|
23550
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23551
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23552
|
+
* box recorded on the source media row when there is one, else the track
|
|
23553
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23554
|
+
* until the operator confirms it.
|
|
23555
|
+
*/
|
|
23556
|
+
var RetrainPipelineBoxSchema = object({
|
|
23557
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23558
|
+
bbox: RetrainBboxSchema,
|
|
23559
|
+
macroClass: RetrainMacroClassSchema,
|
|
23560
|
+
label: string().optional(),
|
|
23561
|
+
subLabel: string().optional(),
|
|
23562
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23563
|
+
score: number().optional(),
|
|
23564
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23565
|
+
modelId: string().optional(),
|
|
23566
|
+
trackId: string(),
|
|
23567
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23568
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23569
|
+
basis: _enum(["subject-box", "position"]),
|
|
23570
|
+
deltaMs: number()
|
|
23571
|
+
});
|
|
23572
|
+
/**
|
|
23573
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23574
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23575
|
+
* track at all.
|
|
23576
|
+
*/
|
|
23577
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22672
23578
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22673
23579
|
var RetrainFrameSchema = object({
|
|
22674
23580
|
frameId: string(),
|
|
22675
23581
|
deviceId: number(),
|
|
22676
|
-
|
|
22677
|
-
/**
|
|
22678
|
-
|
|
23582
|
+
origin: RetrainFrameOriginSchema,
|
|
23583
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23584
|
+
trackId: string().optional(),
|
|
23585
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23586
|
+
* Absent on a recording still. */
|
|
23587
|
+
sourceMediaId: number().int().optional(),
|
|
23588
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23589
|
+
epochMs: number().optional(),
|
|
22679
23590
|
sourceKind: MediaFileKindEnum,
|
|
22680
23591
|
sizeBytes: number().int(),
|
|
22681
23592
|
width: number().int(),
|
|
@@ -22686,7 +23597,12 @@ var RetrainFrameSchema = object({
|
|
|
22686
23597
|
/** The operator's "every subject in this frame is boxed". Detector
|
|
22687
23598
|
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
22688
23599
|
* a false positive. */
|
|
22689
|
-
complete: boolean()
|
|
23600
|
+
complete: boolean(),
|
|
23601
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23602
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23603
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23604
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23605
|
+
collectionIds: array(string()).readonly().optional()
|
|
22690
23606
|
});
|
|
22691
23607
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22692
23608
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22717,6 +23633,11 @@ var RetrainFrameListSchema = object({
|
|
|
22717
23633
|
var RetrainExportFilterSchema = object({
|
|
22718
23634
|
deviceIds: array(number()).optional(),
|
|
22719
23635
|
frameIds: array(string()).max(2e4).optional(),
|
|
23636
|
+
/** Only frames in at least one of these named collections. */
|
|
23637
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23638
|
+
/** Exactly the frames of this dataset version (and its completeOnly). An
|
|
23639
|
+
* unknown id selects nothing. */
|
|
23640
|
+
datasetVersionId: string().optional(),
|
|
22720
23641
|
batchId: string().optional(),
|
|
22721
23642
|
/** Only frames the operator marked complete (all subjects boxed). */
|
|
22722
23643
|
completeOnly: boolean().optional()
|
|
@@ -22781,6 +23702,170 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22781
23702
|
reason: string(),
|
|
22782
23703
|
detail: string().optional()
|
|
22783
23704
|
})]);
|
|
23705
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23706
|
+
var RetrainCollectionSchema = object({
|
|
23707
|
+
id: string(),
|
|
23708
|
+
name: string(),
|
|
23709
|
+
createdAt: number(),
|
|
23710
|
+
frameCount: number().int()
|
|
23711
|
+
});
|
|
23712
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23713
|
+
kind: literal("created"),
|
|
23714
|
+
collection: RetrainCollectionSchema
|
|
23715
|
+
}), object({
|
|
23716
|
+
kind: literal("refused"),
|
|
23717
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23718
|
+
})]);
|
|
23719
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23720
|
+
kind: literal("renamed"),
|
|
23721
|
+
collection: RetrainCollectionSchema
|
|
23722
|
+
}), object({
|
|
23723
|
+
kind: literal("refused"),
|
|
23724
|
+
reason: _enum([
|
|
23725
|
+
"empty-name",
|
|
23726
|
+
"duplicate-name",
|
|
23727
|
+
"unknown-collection"
|
|
23728
|
+
])
|
|
23729
|
+
})]);
|
|
23730
|
+
/**
|
|
23731
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23732
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23733
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23734
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23735
|
+
*/
|
|
23736
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23737
|
+
kind: literal("added"),
|
|
23738
|
+
collectionId: string(),
|
|
23739
|
+
frame: RetrainFrameSchema,
|
|
23740
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23741
|
+
reused: boolean()
|
|
23742
|
+
}), object({
|
|
23743
|
+
kind: literal("refused"),
|
|
23744
|
+
reason: _enum([
|
|
23745
|
+
"unknown-collection",
|
|
23746
|
+
"still-unavailable",
|
|
23747
|
+
"still-busy",
|
|
23748
|
+
"unreadable-image",
|
|
23749
|
+
"write-failed"
|
|
23750
|
+
]),
|
|
23751
|
+
detail: string().optional()
|
|
23752
|
+
})]);
|
|
23753
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23754
|
+
var RetrainAssistProfileSchema = object({
|
|
23755
|
+
id: string(),
|
|
23756
|
+
name: string(),
|
|
23757
|
+
model: string(),
|
|
23758
|
+
kind: string(),
|
|
23759
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23760
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23761
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23762
|
+
leavesHouse: boolean()
|
|
23763
|
+
});
|
|
23764
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23765
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23766
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23767
|
+
var RetrainLlmReviewSchema = object({
|
|
23768
|
+
/** The `ref` the page sent the box under. */
|
|
23769
|
+
ref: string(),
|
|
23770
|
+
verdict: _enum([
|
|
23771
|
+
"confirmed",
|
|
23772
|
+
"wrong-class",
|
|
23773
|
+
"not-an-object",
|
|
23774
|
+
"uncertain"
|
|
23775
|
+
]),
|
|
23776
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23777
|
+
reason: string()
|
|
23778
|
+
});
|
|
23779
|
+
/**
|
|
23780
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23781
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23782
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23783
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23784
|
+
*/
|
|
23785
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23786
|
+
kind: literal("proposed"),
|
|
23787
|
+
profileId: string(),
|
|
23788
|
+
model: string(),
|
|
23789
|
+
/** The frame was sent outside the house for this answer. */
|
|
23790
|
+
leftHouse: boolean(),
|
|
23791
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23792
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23793
|
+
rejected: number().int()
|
|
23794
|
+
}), object({
|
|
23795
|
+
kind: literal("refused"),
|
|
23796
|
+
reason: _enum([
|
|
23797
|
+
"unknown-frame",
|
|
23798
|
+
"unreadable-frame",
|
|
23799
|
+
"unknown-profile",
|
|
23800
|
+
"profile-disabled",
|
|
23801
|
+
"no-vision",
|
|
23802
|
+
"cloud-not-confirmed",
|
|
23803
|
+
"llm-error",
|
|
23804
|
+
"malformed-answer"
|
|
23805
|
+
]),
|
|
23806
|
+
detail: string().optional()
|
|
23807
|
+
})]);
|
|
23808
|
+
/** What a dataset version is cut from. Every field narrows. */
|
|
23809
|
+
var RetrainDatasetSelectionSchema = object({
|
|
23810
|
+
deviceIds: array(number()).readonly().optional(),
|
|
23811
|
+
collectionIds: array(string()).max(200).readonly().optional(),
|
|
23812
|
+
frameIds: array(string()).max(2e4).readonly().optional()
|
|
23813
|
+
});
|
|
23814
|
+
/** The counts a dataset is judged by. */
|
|
23815
|
+
var RetrainDatasetStatsSchema = object({
|
|
23816
|
+
frames: number().int(),
|
|
23817
|
+
completeFrames: number().int(),
|
|
23818
|
+
/** `completeFrames / frames`, 0..1. */
|
|
23819
|
+
completeness: number(),
|
|
23820
|
+
/** Boxes to learn (model errors excluded). */
|
|
23821
|
+
subjects: number().int(),
|
|
23822
|
+
modelErrors: number().int(),
|
|
23823
|
+
/** Complete frames with no subject. */
|
|
23824
|
+
hardNegatives: number().int(),
|
|
23825
|
+
/** Subjects per class × camera × day/night. */
|
|
23826
|
+
cells: array(object({
|
|
23827
|
+
macroClass: string(),
|
|
23828
|
+
deviceId: number(),
|
|
23829
|
+
lighting: _enum([
|
|
23830
|
+
"day",
|
|
23831
|
+
"night",
|
|
23832
|
+
"unknown"
|
|
23833
|
+
]),
|
|
23834
|
+
subjects: number().int(),
|
|
23835
|
+
frames: number().int()
|
|
23836
|
+
})).readonly(),
|
|
23837
|
+
cameras: array(object({
|
|
23838
|
+
deviceId: number(),
|
|
23839
|
+
frames: number().int(),
|
|
23840
|
+
completeFrames: number().int()
|
|
23841
|
+
})).readonly()
|
|
23842
|
+
});
|
|
23843
|
+
/** An immutable dataset version, without its frame list. */
|
|
23844
|
+
var RetrainDatasetVersionSchema = object({
|
|
23845
|
+
id: string(),
|
|
23846
|
+
name: string(),
|
|
23847
|
+
createdAt: number(),
|
|
23848
|
+
selection: RetrainDatasetSelectionSchema,
|
|
23849
|
+
layout: RetrainExportLayoutSchema,
|
|
23850
|
+
completeOnly: boolean(),
|
|
23851
|
+
frameCount: number().int(),
|
|
23852
|
+
/** sha256 of what the frames taught when the version was frozen. */
|
|
23853
|
+
annotationHash: string(),
|
|
23854
|
+
/** The export manifest schema the version was cut under. */
|
|
23855
|
+
manifestSchema: string(),
|
|
23856
|
+
stats: RetrainDatasetStatsSchema
|
|
23857
|
+
});
|
|
23858
|
+
var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
|
|
23859
|
+
kind: literal("created"),
|
|
23860
|
+
version: RetrainDatasetVersionSchema
|
|
23861
|
+
}), object({
|
|
23862
|
+
kind: literal("refused"),
|
|
23863
|
+
reason: _enum([
|
|
23864
|
+
"empty-name",
|
|
23865
|
+
"duplicate-name",
|
|
23866
|
+
"no-frames"
|
|
23867
|
+
])
|
|
23868
|
+
})]);
|
|
22784
23869
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22785
23870
|
var RetrainTransitionResultSchema = object({
|
|
22786
23871
|
trackId: string(),
|
|
@@ -23498,7 +24583,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23498
24583
|
auth: "admin"
|
|
23499
24584
|
}), method(object({
|
|
23500
24585
|
deviceId: number(),
|
|
23501
|
-
trackId: string(),
|
|
24586
|
+
trackId: string().optional(),
|
|
23502
24587
|
frameId: string()
|
|
23503
24588
|
}), object({
|
|
23504
24589
|
removed: boolean(),
|
|
@@ -23515,7 +24600,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23515
24600
|
auth: "admin"
|
|
23516
24601
|
}), method(object({
|
|
23517
24602
|
deviceId: number(),
|
|
23518
|
-
|
|
24603
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24604
|
+
trackId: string().optional(),
|
|
23519
24605
|
frameId: string(),
|
|
23520
24606
|
subject: RetrainAssistSubjectSchema,
|
|
23521
24607
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -23523,12 +24609,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23523
24609
|
}), RetrainAssistResultSchema, {
|
|
23524
24610
|
kind: "mutation",
|
|
23525
24611
|
auth: "admin"
|
|
23526
|
-
}), method(object({
|
|
24612
|
+
}), method(object({
|
|
24613
|
+
trackId: string().optional(),
|
|
24614
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24615
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
23527
24616
|
kind: "query",
|
|
23528
24617
|
auth: "admin"
|
|
23529
24618
|
}), method(object({
|
|
23530
24619
|
deviceId: number(),
|
|
23531
|
-
|
|
24620
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24621
|
+
trackId: string().optional(),
|
|
23532
24622
|
frameId: string(),
|
|
23533
24623
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
23534
24624
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -23551,7 +24641,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23551
24641
|
auth: "admin"
|
|
23552
24642
|
}), method(object({
|
|
23553
24643
|
deviceId: number(),
|
|
23554
|
-
trackId: string(),
|
|
24644
|
+
trackId: string().optional(),
|
|
23555
24645
|
frameId: string(),
|
|
23556
24646
|
complete: boolean()
|
|
23557
24647
|
}), RetrainFrameSchema, {
|
|
@@ -23565,6 +24655,104 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23565
24655
|
kind: "mutation",
|
|
23566
24656
|
auth: "admin",
|
|
23567
24657
|
timeoutMs: 60 * 6e4
|
|
24658
|
+
}), method(object({
|
|
24659
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24660
|
+
completeOnly: boolean().optional()
|
|
24661
|
+
}), RetrainDatasetStatsSchema, {
|
|
24662
|
+
kind: "query",
|
|
24663
|
+
auth: "admin"
|
|
24664
|
+
}), method(object({
|
|
24665
|
+
name: string().max(120),
|
|
24666
|
+
selection: RetrainDatasetSelectionSchema,
|
|
24667
|
+
layout: RetrainExportLayoutSchema,
|
|
24668
|
+
completeOnly: boolean()
|
|
24669
|
+
}), CreateRetrainDatasetVersionResultSchema, {
|
|
24670
|
+
kind: "mutation",
|
|
24671
|
+
auth: "admin",
|
|
24672
|
+
timeoutMs: 12e4
|
|
24673
|
+
}), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
|
|
24674
|
+
kind: "query",
|
|
24675
|
+
auth: "admin"
|
|
24676
|
+
}), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
24677
|
+
kind: "mutation",
|
|
24678
|
+
auth: "admin"
|
|
24679
|
+
}), method(object({ id: string() }), object({
|
|
24680
|
+
found: boolean(),
|
|
24681
|
+
annotationHash: string(),
|
|
24682
|
+
matches: boolean(),
|
|
24683
|
+
missingFrames: number().int()
|
|
24684
|
+
}), {
|
|
24685
|
+
kind: "query",
|
|
24686
|
+
auth: "admin",
|
|
24687
|
+
timeoutMs: 12e4
|
|
24688
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24689
|
+
kind: "query",
|
|
24690
|
+
auth: "admin"
|
|
24691
|
+
}), method(object({
|
|
24692
|
+
deviceId: number(),
|
|
24693
|
+
trackId: string().optional(),
|
|
24694
|
+
frameId: string(),
|
|
24695
|
+
profileId: string(),
|
|
24696
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24697
|
+
boxes: array(object({
|
|
24698
|
+
ref: string(),
|
|
24699
|
+
bbox: RetrainBboxSchema,
|
|
24700
|
+
macroClass: RetrainMacroClassSchema,
|
|
24701
|
+
label: string().optional()
|
|
24702
|
+
})).max(50),
|
|
24703
|
+
allowCloud: boolean()
|
|
24704
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24705
|
+
kind: "mutation",
|
|
24706
|
+
auth: "admin",
|
|
24707
|
+
timeoutMs: 18e4
|
|
24708
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24709
|
+
kind: "mutation",
|
|
24710
|
+
auth: "admin"
|
|
24711
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24712
|
+
kind: "query",
|
|
24713
|
+
auth: "admin"
|
|
24714
|
+
}), method(object({
|
|
24715
|
+
id: string(),
|
|
24716
|
+
name: string().max(120)
|
|
24717
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24718
|
+
kind: "mutation",
|
|
24719
|
+
auth: "admin"
|
|
24720
|
+
}), method(object({ id: string() }), object({
|
|
24721
|
+
deleted: boolean(),
|
|
24722
|
+
removedFrames: number().int()
|
|
24723
|
+
}), {
|
|
24724
|
+
kind: "mutation",
|
|
24725
|
+
auth: "admin"
|
|
24726
|
+
}), method(object({
|
|
24727
|
+
collectionId: string(),
|
|
24728
|
+
deviceId: number(),
|
|
24729
|
+
epochMs: number()
|
|
24730
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24731
|
+
kind: "mutation",
|
|
24732
|
+
auth: "admin",
|
|
24733
|
+
timeoutMs: 6e4
|
|
24734
|
+
}), method(object({
|
|
24735
|
+
collectionId: string(),
|
|
24736
|
+
frameIds: array(string()).min(1).max(500)
|
|
24737
|
+
}), object({
|
|
24738
|
+
added: number().int(),
|
|
24739
|
+
alreadyMember: number().int(),
|
|
24740
|
+
unknownFrameIds: array(string()).readonly()
|
|
24741
|
+
}), {
|
|
24742
|
+
kind: "mutation",
|
|
24743
|
+
auth: "admin"
|
|
24744
|
+
}), method(object({
|
|
24745
|
+
collectionId: string(),
|
|
24746
|
+
frameId: string()
|
|
24747
|
+
}), object({
|
|
24748
|
+
removed: boolean(),
|
|
24749
|
+
deletedFrame: boolean()
|
|
24750
|
+
}), {
|
|
24751
|
+
kind: "mutation",
|
|
24752
|
+
auth: "admin"
|
|
24753
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
24754
|
+
kind: "query",
|
|
24755
|
+
auth: "admin"
|
|
23568
24756
|
}), method(object({
|
|
23569
24757
|
/** Which of the three event tables owns the row. */
|
|
23570
24758
|
ownerType: EventOwnerTypeSchema,
|
|
@@ -24188,13 +25376,31 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
|
24188
25376
|
object({
|
|
24189
25377
|
kind: literal("no-family-build"),
|
|
24190
25378
|
format: ModelFormatSchema$1
|
|
25379
|
+
}),
|
|
25380
|
+
object({
|
|
25381
|
+
kind: literal("kept-custom-pin"),
|
|
25382
|
+
modelId: string(),
|
|
25383
|
+
deviceKey: string()
|
|
24191
25384
|
})
|
|
24192
25385
|
]);
|
|
25386
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
25387
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
25388
|
+
/**
|
|
25389
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
25390
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
25391
|
+
*/
|
|
25392
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
25393
|
+
kind: literal("node-benchmark"),
|
|
25394
|
+
resultId: string(),
|
|
25395
|
+
measuredAtMs: number()
|
|
25396
|
+
})]);
|
|
24193
25397
|
var DeviceModelChoiceSchema = object({
|
|
24194
25398
|
modelId: string(),
|
|
24195
25399
|
p50Ms: number(),
|
|
24196
25400
|
fps: number(),
|
|
24197
25401
|
measured: boolean(),
|
|
25402
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
25403
|
+
source: LatencySourceSchema.optional(),
|
|
24198
25404
|
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
24199
25405
|
capacitySessions: number(),
|
|
24200
25406
|
personRecall: number()
|
|
@@ -24205,6 +25411,8 @@ var DeviceRecommendationSchema = object({
|
|
|
24205
25411
|
enabled: boolean(),
|
|
24206
25412
|
available: boolean(),
|
|
24207
25413
|
chosen: DeviceModelChoiceSchema.nullable(),
|
|
25414
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
25415
|
+
kept: KeptReasonSchema.optional(),
|
|
24208
25416
|
reasons: array(RecommendationReasonSchema).readonly()
|
|
24209
25417
|
});
|
|
24210
25418
|
var NodeRecommendationSchema = object({
|
|
@@ -24258,6 +25466,17 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
|
24258
25466
|
kind: literal("coral-enabled"),
|
|
24259
25467
|
nodeId: string(),
|
|
24260
25468
|
deviceKey: string()
|
|
25469
|
+
}),
|
|
25470
|
+
object({
|
|
25471
|
+
kind: literal("custom-pin-kept"),
|
|
25472
|
+
nodeId: string(),
|
|
25473
|
+
deviceKey: string().nullable(),
|
|
25474
|
+
deviceId: number().nullable(),
|
|
25475
|
+
modelId: string()
|
|
25476
|
+
}),
|
|
25477
|
+
object({
|
|
25478
|
+
kind: literal("custom-registry-unreadable"),
|
|
25479
|
+
error: string()
|
|
24261
25480
|
})
|
|
24262
25481
|
]);
|
|
24263
25482
|
var AutoTuneOptionsSchema = object({
|
|
@@ -24436,13 +25655,14 @@ var SuggestSharesResultSchema = object({
|
|
|
24436
25655
|
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
24437
25656
|
});
|
|
24438
25657
|
/**
|
|
24439
|
-
* Where the node and device shares come from (D750, D755).
|
|
24440
|
-
* - `
|
|
24441
|
-
*
|
|
24442
|
-
*
|
|
24443
|
-
*
|
|
24444
|
-
*
|
|
24445
|
-
*
|
|
25658
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25659
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25660
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25661
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25662
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25663
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25664
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25665
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
24446
25666
|
* - `manual` — the operator's stored sliders.
|
|
24447
25667
|
* Either way a node or device that cannot take sessions gives its share to
|
|
24448
25668
|
* the others in proportion; the stored values are never rewritten for that.
|
|
@@ -24491,6 +25711,362 @@ var EffectiveSharesSchema = object({
|
|
|
24491
25711
|
nodeWeights: record(string(), number()),
|
|
24492
25712
|
deviceWeights: record(string(), record(string(), number()))
|
|
24493
25713
|
});
|
|
25714
|
+
/**
|
|
25715
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25716
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25717
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25718
|
+
* shares read.
|
|
25719
|
+
*
|
|
25720
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25721
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25722
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25723
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25724
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25725
|
+
*
|
|
25726
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25727
|
+
* cross a process at frame rate, D9):
|
|
25728
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25729
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25730
|
+
* interval;
|
|
25731
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25732
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25733
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25734
|
+
* CPU, RAM or the event loop give out.
|
|
25735
|
+
*/
|
|
25736
|
+
/** Defaults and bounds, one place. */
|
|
25737
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25738
|
+
fpsPerStream: 10,
|
|
25739
|
+
budgetMinutes: 45,
|
|
25740
|
+
minBudgetMinutes: 10,
|
|
25741
|
+
maxBudgetMinutes: 120,
|
|
25742
|
+
/** A result older than this no longer beats the table. */
|
|
25743
|
+
staleAfterDays: 30,
|
|
25744
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25745
|
+
settleSec: 5,
|
|
25746
|
+
/** Accounted window per ramp step. */
|
|
25747
|
+
measureSec: 20,
|
|
25748
|
+
/** Longest the drain may take before the run is refused. */
|
|
25749
|
+
drainTimeoutSec: 120,
|
|
25750
|
+
/** Candidate models per device in one run. */
|
|
25751
|
+
maxModelsPerDevice: 6
|
|
25752
|
+
};
|
|
25753
|
+
/** The two measurements a run can make. */
|
|
25754
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25755
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25756
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25757
|
+
deviceKey: string().min(1),
|
|
25758
|
+
/**
|
|
25759
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25760
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25761
|
+
*/
|
|
25762
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25763
|
+
});
|
|
25764
|
+
/** What the operator confirmed. */
|
|
25765
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25766
|
+
nodeId: string().min(1),
|
|
25767
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25768
|
+
/** Which measurements run. At least one. */
|
|
25769
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25770
|
+
/**
|
|
25771
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25772
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25773
|
+
* detector always runs.
|
|
25774
|
+
*/
|
|
25775
|
+
steps: array(string().min(1)).default([]),
|
|
25776
|
+
/** Offered rate of one stream / session. */
|
|
25777
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25778
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25779
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25780
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25781
|
+
keepDownloadedModels: boolean().default(false),
|
|
25782
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25783
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25784
|
+
});
|
|
25785
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25786
|
+
kind: _enum([
|
|
25787
|
+
"benchmark-active",
|
|
25788
|
+
"node-offline",
|
|
25789
|
+
"unknown-device",
|
|
25790
|
+
"no-phase",
|
|
25791
|
+
"insufficient-headroom"
|
|
25792
|
+
]),
|
|
25793
|
+
detail: string(),
|
|
25794
|
+
overridable: boolean()
|
|
25795
|
+
});
|
|
25796
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25797
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25798
|
+
deviceId: number(),
|
|
25799
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25800
|
+
placedOnNode: boolean(),
|
|
25801
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25802
|
+
pinnedToNode: boolean()
|
|
25803
|
+
});
|
|
25804
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25805
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25806
|
+
deviceId: number(),
|
|
25807
|
+
reason: literal("only-frame-source")
|
|
25808
|
+
});
|
|
25809
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25810
|
+
nodeId: string(),
|
|
25811
|
+
online: boolean(),
|
|
25812
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25813
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25814
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25815
|
+
estimatedDurationMs: number(),
|
|
25816
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25817
|
+
budgetMs: number(),
|
|
25818
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25819
|
+
steps: array(string()).readonly(),
|
|
25820
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25821
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25822
|
+
headroom: object({
|
|
25823
|
+
sessionsNow: number(),
|
|
25824
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25825
|
+
}),
|
|
25826
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25827
|
+
canStart: boolean()
|
|
25828
|
+
});
|
|
25829
|
+
/** Where the measuring runner is. */
|
|
25830
|
+
var NodeBenchProgressSchema = object({
|
|
25831
|
+
phase: _enum([
|
|
25832
|
+
"preparing",
|
|
25833
|
+
"device",
|
|
25834
|
+
"pipeline",
|
|
25835
|
+
"cleanup"
|
|
25836
|
+
]),
|
|
25837
|
+
deviceKey: string().nullable(),
|
|
25838
|
+
modelId: string().nullable(),
|
|
25839
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25840
|
+
load: number().nullable(),
|
|
25841
|
+
cellsDone: number(),
|
|
25842
|
+
cellsTotal: number(),
|
|
25843
|
+
message: string()
|
|
25844
|
+
});
|
|
25845
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25846
|
+
var NodeBenchLimitSchema = _enum([
|
|
25847
|
+
"p95",
|
|
25848
|
+
"drops",
|
|
25849
|
+
"errors",
|
|
25850
|
+
"stall",
|
|
25851
|
+
"cpu",
|
|
25852
|
+
"ram",
|
|
25853
|
+
"none"
|
|
25854
|
+
]);
|
|
25855
|
+
var NodeBenchRampStepSchema = object({
|
|
25856
|
+
load: number(),
|
|
25857
|
+
pass: boolean(),
|
|
25858
|
+
p95Ms: number(),
|
|
25859
|
+
dropRatio: number(),
|
|
25860
|
+
/** Completed frames per second over the accounted window. */
|
|
25861
|
+
fps: number(),
|
|
25862
|
+
cpuPct: number().nullable(),
|
|
25863
|
+
ramFreePct: number().nullable(),
|
|
25864
|
+
failReasons: array(string()).readonly()
|
|
25865
|
+
});
|
|
25866
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25867
|
+
phase: literal("device"),
|
|
25868
|
+
deviceKey: string(),
|
|
25869
|
+
modelId: string(),
|
|
25870
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25871
|
+
p50Ms: number(),
|
|
25872
|
+
p95Ms: number(),
|
|
25873
|
+
p99Ms: number(),
|
|
25874
|
+
/** Frames per second sustained at the last passing step. */
|
|
25875
|
+
fps: number(),
|
|
25876
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25877
|
+
kMax: number(),
|
|
25878
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25879
|
+
/** First call (model load + warm-up). */
|
|
25880
|
+
warmupMs: number(),
|
|
25881
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25882
|
+
}), object({
|
|
25883
|
+
phase: literal("pipeline"),
|
|
25884
|
+
deviceKey: string(),
|
|
25885
|
+
modelId: string(),
|
|
25886
|
+
steps: array(string()).readonly(),
|
|
25887
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25888
|
+
maxSessions: number(),
|
|
25889
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25890
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25891
|
+
stepsFired: array(string()).readonly(),
|
|
25892
|
+
warmupMs: number(),
|
|
25893
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25894
|
+
})]);
|
|
25895
|
+
/**
|
|
25896
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25897
|
+
* the node no longer beats the table.
|
|
25898
|
+
*/
|
|
25899
|
+
var NodeBenchFingerprintSchema = object({
|
|
25900
|
+
pipelineVersion: string().nullable(),
|
|
25901
|
+
cpuModel: string().nullable(),
|
|
25902
|
+
ramGb: number().nullable(),
|
|
25903
|
+
os: string().nullable(),
|
|
25904
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25905
|
+
pools: record(string(), object({
|
|
25906
|
+
runtime: string(),
|
|
25907
|
+
numWorkers: number(),
|
|
25908
|
+
concurrency: number(),
|
|
25909
|
+
batchMode: string()
|
|
25910
|
+
})).default({})
|
|
25911
|
+
});
|
|
25912
|
+
/** The frames the run used. */
|
|
25913
|
+
var NodeBenchClipSchema = object({
|
|
25914
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25915
|
+
id: string(),
|
|
25916
|
+
revision: string().nullable(),
|
|
25917
|
+
frames: number(),
|
|
25918
|
+
width: number(),
|
|
25919
|
+
height: number()
|
|
25920
|
+
});
|
|
25921
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25922
|
+
runId: string().min(1),
|
|
25923
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25924
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25925
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25926
|
+
steps: array(string()).default([]),
|
|
25927
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25928
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25929
|
+
deadlineAtMs: number(),
|
|
25930
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25931
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25932
|
+
keepDownloadedModels: boolean().default(false)
|
|
25933
|
+
});
|
|
25934
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25935
|
+
"running",
|
|
25936
|
+
"done",
|
|
25937
|
+
"failed",
|
|
25938
|
+
"aborted"
|
|
25939
|
+
]);
|
|
25940
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25941
|
+
runId: string(),
|
|
25942
|
+
nodeId: string(),
|
|
25943
|
+
state: NodeBenchRunnerStateSchema,
|
|
25944
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25945
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25946
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25947
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25948
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25949
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25950
|
+
activeCameraIds: array(number()).readonly(),
|
|
25951
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25952
|
+
deletedModels: array(string()).readonly(),
|
|
25953
|
+
error: string().nullable(),
|
|
25954
|
+
startedAtMs: number(),
|
|
25955
|
+
finishedAtMs: number().nullable()
|
|
25956
|
+
});
|
|
25957
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25958
|
+
"draining",
|
|
25959
|
+
"measuring",
|
|
25960
|
+
"restoring",
|
|
25961
|
+
"done",
|
|
25962
|
+
"failed",
|
|
25963
|
+
"aborted"
|
|
25964
|
+
]);
|
|
25965
|
+
/** Why a run ended. */
|
|
25966
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25967
|
+
"completed",
|
|
25968
|
+
"operator-abort",
|
|
25969
|
+
"deadline",
|
|
25970
|
+
"node-lost",
|
|
25971
|
+
"runner-lost",
|
|
25972
|
+
"hub-restart",
|
|
25973
|
+
"drain-timeout",
|
|
25974
|
+
"failed"
|
|
25975
|
+
]);
|
|
25976
|
+
var NodeBenchmarkRunSchema = object({
|
|
25977
|
+
runId: string(),
|
|
25978
|
+
nodeId: string(),
|
|
25979
|
+
state: NodeBenchmarkStateSchema,
|
|
25980
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25981
|
+
startedAtMs: number(),
|
|
25982
|
+
deadlineAtMs: number(),
|
|
25983
|
+
finishedAtMs: number().nullable(),
|
|
25984
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25985
|
+
error: string().nullable(),
|
|
25986
|
+
/** Cameras moved off the node for the run. */
|
|
25987
|
+
moved: array(number()).readonly(),
|
|
25988
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25989
|
+
staying: array(number()).readonly(),
|
|
25990
|
+
/** Something else ran on the node's pools during the run. */
|
|
25991
|
+
contaminated: boolean(),
|
|
25992
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25993
|
+
resultIds: array(string()).readonly()
|
|
25994
|
+
});
|
|
25995
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25996
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25997
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25998
|
+
modeNodeId: string().nullable(),
|
|
25999
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
26000
|
+
});
|
|
26001
|
+
/**
|
|
26002
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
26003
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
26004
|
+
* ends, never by anyone else.
|
|
26005
|
+
*/
|
|
26006
|
+
var NodeBenchmarkResultSchema = object({
|
|
26007
|
+
id: string(),
|
|
26008
|
+
runId: string(),
|
|
26009
|
+
nodeId: string(),
|
|
26010
|
+
cell: NodeBenchCellSchema,
|
|
26011
|
+
fpsPerStream: number(),
|
|
26012
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
26013
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
26014
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
26015
|
+
contaminated: boolean(),
|
|
26016
|
+
stayingCameras: array(number()).readonly(),
|
|
26017
|
+
/** The run ended early; the cell itself completed. */
|
|
26018
|
+
partialRun: boolean(),
|
|
26019
|
+
measuredAtMs: number()
|
|
26020
|
+
});
|
|
26021
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
26022
|
+
nodeId: string().optional(),
|
|
26023
|
+
deviceKey: string().optional()
|
|
26024
|
+
});
|
|
26025
|
+
/** A result with its standing today: does it still beat the table? */
|
|
26026
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
26027
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
26028
|
+
standing: _enum([
|
|
26029
|
+
"fresh",
|
|
26030
|
+
"stale",
|
|
26031
|
+
"superseded"
|
|
26032
|
+
]),
|
|
26033
|
+
staleWhy: _enum([
|
|
26034
|
+
"age",
|
|
26035
|
+
"runtime",
|
|
26036
|
+
"pool-tuning"
|
|
26037
|
+
]).nullable()
|
|
26038
|
+
});
|
|
26039
|
+
object({
|
|
26040
|
+
runId: string(),
|
|
26041
|
+
nodeId: string(),
|
|
26042
|
+
startedAtMs: number(),
|
|
26043
|
+
deadlineAtMs: number(),
|
|
26044
|
+
plan: NodeBenchmarkPlanSchema,
|
|
26045
|
+
moved: array(number()).readonly(),
|
|
26046
|
+
staying: array(number()).readonly()
|
|
26047
|
+
});
|
|
26048
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
26049
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
26050
|
+
nodeId: string(),
|
|
26051
|
+
reachable: boolean(),
|
|
26052
|
+
devices: array(object({
|
|
26053
|
+
deviceKey: string(),
|
|
26054
|
+
enabled: boolean(),
|
|
26055
|
+
available: boolean(),
|
|
26056
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
26057
|
+
suggested: array(string()).readonly(),
|
|
26058
|
+
/** Every root detector the device has a build for. */
|
|
26059
|
+
all: array(string()).readonly(),
|
|
26060
|
+
/** The model the device runs now, when pinned. */
|
|
26061
|
+
currentModelId: string().nullable()
|
|
26062
|
+
})).readonly(),
|
|
26063
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
26064
|
+
steps: array(object({
|
|
26065
|
+
id: string(),
|
|
26066
|
+
name: string(),
|
|
26067
|
+
slot: string()
|
|
26068
|
+
})).readonly()
|
|
26069
|
+
});
|
|
24494
26070
|
object({
|
|
24495
26071
|
activeCameras: number(),
|
|
24496
26072
|
throttledCameras: number(),
|
|
@@ -25579,7 +27155,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
25579
27155
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
25580
27156
|
deviceId: number(),
|
|
25581
27157
|
trackId: string()
|
|
25582
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
27158
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
27159
|
+
accepted: literal(true),
|
|
27160
|
+
runId: string()
|
|
27161
|
+
}), {
|
|
27162
|
+
kind: "mutation",
|
|
27163
|
+
auth: "admin"
|
|
27164
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27165
|
+
kind: "mutation",
|
|
27166
|
+
auth: "admin"
|
|
27167
|
+
});
|
|
25583
27168
|
var CameraPipelineConfigSchema = object({
|
|
25584
27169
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
25585
27170
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -26218,6 +27803,21 @@ method(object({
|
|
|
26218
27803
|
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
26219
27804
|
kind: "mutation",
|
|
26220
27805
|
auth: "admin"
|
|
27806
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27807
|
+
kind: literal("started"),
|
|
27808
|
+
runId: string()
|
|
27809
|
+
}), object({
|
|
27810
|
+
kind: literal("refused"),
|
|
27811
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27812
|
+
})]), {
|
|
27813
|
+
kind: "mutation",
|
|
27814
|
+
auth: "admin"
|
|
27815
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27816
|
+
kind: "mutation",
|
|
27817
|
+
auth: "admin"
|
|
27818
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27819
|
+
kind: "mutation",
|
|
27820
|
+
auth: "admin"
|
|
26221
27821
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
26222
27822
|
deviceId: number(),
|
|
26223
27823
|
addonId: string(),
|
|
@@ -31299,6 +32899,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
31299
32899
|
enabled: boolean().optional(),
|
|
31300
32900
|
info: record(string(), unknown()).optional(),
|
|
31301
32901
|
settings: record(string(), unknown()).optional(),
|
|
32902
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
32903
|
+
* the keychain, not the table (D787). */
|
|
32904
|
+
secretKeys: array(string()).optional(),
|
|
31302
32905
|
skipRestart: boolean().optional()
|
|
31303
32906
|
});
|
|
31304
32907
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -31322,7 +32925,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
31322
32925
|
auth: "admin"
|
|
31323
32926
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
31324
32927
|
id: string(),
|
|
31325
|
-
settings: record(string(), unknown())
|
|
32928
|
+
settings: record(string(), unknown()),
|
|
32929
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
32930
|
+
secretKeys: array(string()).optional()
|
|
31326
32931
|
}), object({ success: boolean() }), {
|
|
31327
32932
|
kind: "mutation",
|
|
31328
32933
|
auth: "admin"
|
|
@@ -40125,6 +41730,90 @@ Object.freeze({
|
|
|
40125
41730
|
addonId: null,
|
|
40126
41731
|
access: "create"
|
|
40127
41732
|
},
|
|
41733
|
+
"keychain.delete": {
|
|
41734
|
+
capName: "keychain",
|
|
41735
|
+
capScope: "system",
|
|
41736
|
+
addonId: null,
|
|
41737
|
+
access: "delete"
|
|
41738
|
+
},
|
|
41739
|
+
"keychain.getState": {
|
|
41740
|
+
capName: "keychain",
|
|
41741
|
+
capScope: "system",
|
|
41742
|
+
addonId: null,
|
|
41743
|
+
access: "view"
|
|
41744
|
+
},
|
|
41745
|
+
"keychain.listMeta": {
|
|
41746
|
+
capName: "keychain",
|
|
41747
|
+
capScope: "system",
|
|
41748
|
+
addonId: null,
|
|
41749
|
+
access: "view"
|
|
41750
|
+
},
|
|
41751
|
+
"keychain.put": {
|
|
41752
|
+
capName: "keychain",
|
|
41753
|
+
capScope: "system",
|
|
41754
|
+
addonId: null,
|
|
41755
|
+
access: "create"
|
|
41756
|
+
},
|
|
41757
|
+
"keychain.resolve": {
|
|
41758
|
+
capName: "keychain",
|
|
41759
|
+
capScope: "system",
|
|
41760
|
+
addonId: null,
|
|
41761
|
+
access: "view"
|
|
41762
|
+
},
|
|
41763
|
+
"keychainAdmin.deleteOrphans": {
|
|
41764
|
+
capName: "keychain-admin",
|
|
41765
|
+
capScope: "system",
|
|
41766
|
+
addonId: null,
|
|
41767
|
+
access: "delete"
|
|
41768
|
+
},
|
|
41769
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
41770
|
+
capName: "keychain-admin",
|
|
41771
|
+
capScope: "system",
|
|
41772
|
+
addonId: null,
|
|
41773
|
+
access: "create"
|
|
41774
|
+
},
|
|
41775
|
+
"keychainAdmin.listAudit": {
|
|
41776
|
+
capName: "keychain-admin",
|
|
41777
|
+
capScope: "system",
|
|
41778
|
+
addonId: null,
|
|
41779
|
+
access: "view"
|
|
41780
|
+
},
|
|
41781
|
+
"keychainAdmin.listSecrets": {
|
|
41782
|
+
capName: "keychain-admin",
|
|
41783
|
+
capScope: "system",
|
|
41784
|
+
addonId: null,
|
|
41785
|
+
access: "view"
|
|
41786
|
+
},
|
|
41787
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
41788
|
+
capName: "keychain-admin",
|
|
41789
|
+
capScope: "system",
|
|
41790
|
+
addonId: null,
|
|
41791
|
+
access: "delete"
|
|
41792
|
+
},
|
|
41793
|
+
"keychainAdmin.resetKeychain": {
|
|
41794
|
+
capName: "keychain-admin",
|
|
41795
|
+
capScope: "system",
|
|
41796
|
+
addonId: null,
|
|
41797
|
+
access: "delete"
|
|
41798
|
+
},
|
|
41799
|
+
"keychainAdmin.reveal": {
|
|
41800
|
+
capName: "keychain-admin",
|
|
41801
|
+
capScope: "system",
|
|
41802
|
+
addonId: null,
|
|
41803
|
+
access: "create"
|
|
41804
|
+
},
|
|
41805
|
+
"keychainAdmin.rotateMasterKey": {
|
|
41806
|
+
capName: "keychain-admin",
|
|
41807
|
+
capScope: "system",
|
|
41808
|
+
addonId: null,
|
|
41809
|
+
access: "create"
|
|
41810
|
+
},
|
|
41811
|
+
"keychainAdmin.status": {
|
|
41812
|
+
capName: "keychain-admin",
|
|
41813
|
+
capScope: "system",
|
|
41814
|
+
addonId: null,
|
|
41815
|
+
access: "view"
|
|
41816
|
+
},
|
|
40128
41817
|
"lawnMowerControl.dock": {
|
|
40129
41818
|
capName: "lawn-mower-control",
|
|
40130
41819
|
capScope: "device",
|
|
@@ -41499,6 +43188,18 @@ Object.freeze({
|
|
|
41499
43188
|
addonId: null,
|
|
41500
43189
|
access: "create"
|
|
41501
43190
|
},
|
|
43191
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
43192
|
+
capName: "pipeline-analytics",
|
|
43193
|
+
capScope: "device",
|
|
43194
|
+
addonId: null,
|
|
43195
|
+
access: "create"
|
|
43196
|
+
},
|
|
43197
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
43198
|
+
capName: "pipeline-analytics",
|
|
43199
|
+
capScope: "device",
|
|
43200
|
+
addonId: null,
|
|
43201
|
+
access: "create"
|
|
43202
|
+
},
|
|
41502
43203
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
41503
43204
|
capName: "pipeline-analytics",
|
|
41504
43205
|
capScope: "device",
|
|
@@ -41547,12 +43248,36 @@ Object.freeze({
|
|
|
41547
43248
|
addonId: null,
|
|
41548
43249
|
access: "view"
|
|
41549
43250
|
},
|
|
43251
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
43252
|
+
capName: "pipeline-analytics",
|
|
43253
|
+
capScope: "device",
|
|
43254
|
+
addonId: null,
|
|
43255
|
+
access: "create"
|
|
43256
|
+
},
|
|
43257
|
+
"pipelineAnalytics.createRetrainDatasetVersion": {
|
|
43258
|
+
capName: "pipeline-analytics",
|
|
43259
|
+
capScope: "device",
|
|
43260
|
+
addonId: null,
|
|
43261
|
+
access: "create"
|
|
43262
|
+
},
|
|
41550
43263
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
41551
43264
|
capName: "pipeline-analytics",
|
|
41552
43265
|
capScope: "device",
|
|
41553
43266
|
addonId: null,
|
|
41554
43267
|
access: "delete"
|
|
41555
43268
|
},
|
|
43269
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
43270
|
+
capName: "pipeline-analytics",
|
|
43271
|
+
capScope: "device",
|
|
43272
|
+
addonId: null,
|
|
43273
|
+
access: "delete"
|
|
43274
|
+
},
|
|
43275
|
+
"pipelineAnalytics.deleteRetrainDatasetVersion": {
|
|
43276
|
+
capName: "pipeline-analytics",
|
|
43277
|
+
capScope: "device",
|
|
43278
|
+
addonId: null,
|
|
43279
|
+
access: "delete"
|
|
43280
|
+
},
|
|
41556
43281
|
"pipelineAnalytics.deleteTracks": {
|
|
41557
43282
|
capName: "pipeline-analytics",
|
|
41558
43283
|
capScope: "device",
|
|
@@ -41757,6 +43482,30 @@ Object.freeze({
|
|
|
41757
43482
|
addonId: null,
|
|
41758
43483
|
access: "view"
|
|
41759
43484
|
},
|
|
43485
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
43486
|
+
capName: "pipeline-analytics",
|
|
43487
|
+
capScope: "device",
|
|
43488
|
+
addonId: null,
|
|
43489
|
+
access: "view"
|
|
43490
|
+
},
|
|
43491
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
43492
|
+
capName: "pipeline-analytics",
|
|
43493
|
+
capScope: "device",
|
|
43494
|
+
addonId: null,
|
|
43495
|
+
access: "view"
|
|
43496
|
+
},
|
|
43497
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
43498
|
+
capName: "pipeline-analytics",
|
|
43499
|
+
capScope: "device",
|
|
43500
|
+
addonId: null,
|
|
43501
|
+
access: "view"
|
|
43502
|
+
},
|
|
43503
|
+
"pipelineAnalytics.listRetrainDatasetVersions": {
|
|
43504
|
+
capName: "pipeline-analytics",
|
|
43505
|
+
capScope: "device",
|
|
43506
|
+
addonId: null,
|
|
43507
|
+
access: "view"
|
|
43508
|
+
},
|
|
41760
43509
|
"pipelineAnalytics.listRetrainFrames": {
|
|
41761
43510
|
capName: "pipeline-analytics",
|
|
41762
43511
|
capScope: "device",
|
|
@@ -41799,12 +43548,24 @@ Object.freeze({
|
|
|
41799
43548
|
addonId: null,
|
|
41800
43549
|
access: "create"
|
|
41801
43550
|
},
|
|
43551
|
+
"pipelineAnalytics.previewRetrainDataset": {
|
|
43552
|
+
capName: "pipeline-analytics",
|
|
43553
|
+
capScope: "device",
|
|
43554
|
+
addonId: null,
|
|
43555
|
+
access: "view"
|
|
43556
|
+
},
|
|
41802
43557
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
41803
43558
|
capName: "pipeline-analytics",
|
|
41804
43559
|
capScope: "device",
|
|
41805
43560
|
addonId: null,
|
|
41806
43561
|
access: "create"
|
|
41807
43562
|
},
|
|
43563
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
43564
|
+
capName: "pipeline-analytics",
|
|
43565
|
+
capScope: "device",
|
|
43566
|
+
addonId: null,
|
|
43567
|
+
access: "create"
|
|
43568
|
+
},
|
|
41808
43569
|
"pipelineAnalytics.pruneEvents": {
|
|
41809
43570
|
capName: "pipeline-analytics",
|
|
41810
43571
|
capScope: "device",
|
|
@@ -41859,6 +43620,18 @@ Object.freeze({
|
|
|
41859
43620
|
addonId: null,
|
|
41860
43621
|
access: "create"
|
|
41861
43622
|
},
|
|
43623
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
43624
|
+
capName: "pipeline-analytics",
|
|
43625
|
+
capScope: "device",
|
|
43626
|
+
addonId: null,
|
|
43627
|
+
access: "delete"
|
|
43628
|
+
},
|
|
43629
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
43630
|
+
capName: "pipeline-analytics",
|
|
43631
|
+
capScope: "device",
|
|
43632
|
+
addonId: null,
|
|
43633
|
+
access: "create"
|
|
43634
|
+
},
|
|
41862
43635
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
41863
43636
|
capName: "pipeline-analytics",
|
|
41864
43637
|
capScope: "device",
|
|
@@ -41919,6 +43692,12 @@ Object.freeze({
|
|
|
41919
43692
|
addonId: null,
|
|
41920
43693
|
access: "create"
|
|
41921
43694
|
},
|
|
43695
|
+
"pipelineAnalytics.verifyRetrainDatasetVersion": {
|
|
43696
|
+
capName: "pipeline-analytics",
|
|
43697
|
+
capScope: "device",
|
|
43698
|
+
addonId: null,
|
|
43699
|
+
access: "view"
|
|
43700
|
+
},
|
|
41922
43701
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
41923
43702
|
capName: "pipeline-analytics",
|
|
41924
43703
|
capScope: "device",
|
|
@@ -42147,6 +43926,12 @@ Object.freeze({
|
|
|
42147
43926
|
addonId: null,
|
|
42148
43927
|
access: "view"
|
|
42149
43928
|
},
|
|
43929
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
43930
|
+
capName: "pipeline-orchestrator",
|
|
43931
|
+
capScope: "system",
|
|
43932
|
+
addonId: null,
|
|
43933
|
+
access: "create"
|
|
43934
|
+
},
|
|
42150
43935
|
"pipelineOrchestrator.applyAutoTune": {
|
|
42151
43936
|
capName: "pipeline-orchestrator",
|
|
42152
43937
|
capScope: "system",
|
|
@@ -42171,6 +43956,12 @@ Object.freeze({
|
|
|
42171
43956
|
addonId: null,
|
|
42172
43957
|
access: "create"
|
|
42173
43958
|
},
|
|
43959
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
43960
|
+
capName: "pipeline-orchestrator",
|
|
43961
|
+
capScope: "system",
|
|
43962
|
+
addonId: null,
|
|
43963
|
+
access: "delete"
|
|
43964
|
+
},
|
|
42174
43965
|
"pipelineOrchestrator.getAgentLoad": {
|
|
42175
43966
|
capName: "pipeline-orchestrator",
|
|
42176
43967
|
capScope: "system",
|
|
@@ -42279,6 +44070,24 @@ Object.freeze({
|
|
|
42279
44070
|
addonId: null,
|
|
42280
44071
|
access: "view"
|
|
42281
44072
|
},
|
|
44073
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
44074
|
+
capName: "pipeline-orchestrator",
|
|
44075
|
+
capScope: "system",
|
|
44076
|
+
addonId: null,
|
|
44077
|
+
access: "view"
|
|
44078
|
+
},
|
|
44079
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
44080
|
+
capName: "pipeline-orchestrator",
|
|
44081
|
+
capScope: "system",
|
|
44082
|
+
addonId: null,
|
|
44083
|
+
access: "view"
|
|
44084
|
+
},
|
|
44085
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
44086
|
+
capName: "pipeline-orchestrator",
|
|
44087
|
+
capScope: "system",
|
|
44088
|
+
addonId: null,
|
|
44089
|
+
access: "view"
|
|
44090
|
+
},
|
|
42282
44091
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
42283
44092
|
capName: "pipeline-orchestrator",
|
|
42284
44093
|
capScope: "system",
|
|
@@ -42321,6 +44130,12 @@ Object.freeze({
|
|
|
42321
44130
|
addonId: null,
|
|
42322
44131
|
access: "view"
|
|
42323
44132
|
},
|
|
44133
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
44134
|
+
capName: "pipeline-orchestrator",
|
|
44135
|
+
capScope: "system",
|
|
44136
|
+
addonId: null,
|
|
44137
|
+
access: "view"
|
|
44138
|
+
},
|
|
42324
44139
|
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
42325
44140
|
capName: "pipeline-orchestrator",
|
|
42326
44141
|
capScope: "system",
|
|
@@ -42465,6 +44280,12 @@ Object.freeze({
|
|
|
42465
44280
|
addonId: null,
|
|
42466
44281
|
access: "create"
|
|
42467
44282
|
},
|
|
44283
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
44284
|
+
capName: "pipeline-orchestrator",
|
|
44285
|
+
capScope: "system",
|
|
44286
|
+
addonId: null,
|
|
44287
|
+
access: "create"
|
|
44288
|
+
},
|
|
42468
44289
|
"pipelineOrchestrator.suggestShares": {
|
|
42469
44290
|
capName: "pipeline-orchestrator",
|
|
42470
44291
|
capScope: "system",
|
|
@@ -42483,6 +44304,12 @@ Object.freeze({
|
|
|
42483
44304
|
addonId: null,
|
|
42484
44305
|
access: "create"
|
|
42485
44306
|
},
|
|
44307
|
+
"pipelineRunner.abortNodeBench": {
|
|
44308
|
+
capName: "pipeline-runner",
|
|
44309
|
+
capScope: "system",
|
|
44310
|
+
addonId: null,
|
|
44311
|
+
access: "create"
|
|
44312
|
+
},
|
|
42486
44313
|
"pipelineRunner.attachCamera": {
|
|
42487
44314
|
capName: "pipeline-runner",
|
|
42488
44315
|
capScope: "system",
|
|
@@ -42531,6 +44358,12 @@ Object.freeze({
|
|
|
42531
44358
|
addonId: null,
|
|
42532
44359
|
access: "view"
|
|
42533
44360
|
},
|
|
44361
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
44362
|
+
capName: "pipeline-runner",
|
|
44363
|
+
capScope: "system",
|
|
44364
|
+
addonId: null,
|
|
44365
|
+
access: "view"
|
|
44366
|
+
},
|
|
42534
44367
|
"pipelineRunner.getParkedTrackFrame": {
|
|
42535
44368
|
capName: "pipeline-runner",
|
|
42536
44369
|
capScope: "system",
|
|
@@ -42573,6 +44406,12 @@ Object.freeze({
|
|
|
42573
44406
|
addonId: null,
|
|
42574
44407
|
access: "create"
|
|
42575
44408
|
},
|
|
44409
|
+
"pipelineRunner.startNodeBench": {
|
|
44410
|
+
capName: "pipeline-runner",
|
|
44411
|
+
capScope: "system",
|
|
44412
|
+
addonId: null,
|
|
44413
|
+
access: "create"
|
|
44414
|
+
},
|
|
42576
44415
|
"plateGallery.assignPlate": {
|
|
42577
44416
|
capName: "plate-gallery",
|
|
42578
44417
|
capScope: "system",
|
|
@@ -47502,6 +49341,11 @@ Object.freeze({
|
|
|
47502
49341
|
form: "single",
|
|
47503
49342
|
optional: false
|
|
47504
49343
|
}],
|
|
49344
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
49345
|
+
name: "deviceId",
|
|
49346
|
+
form: "single",
|
|
49347
|
+
optional: false
|
|
49348
|
+
}],
|
|
47505
49349
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
47506
49350
|
name: "deviceId",
|
|
47507
49351
|
form: "single",
|
|
@@ -47692,6 +49536,11 @@ Object.freeze({
|
|
|
47692
49536
|
form: "single",
|
|
47693
49537
|
optional: false
|
|
47694
49538
|
}],
|
|
49539
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
49540
|
+
name: "deviceId",
|
|
49541
|
+
form: "single",
|
|
49542
|
+
optional: false
|
|
49543
|
+
}],
|
|
47695
49544
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
47696
49545
|
name: "deviceId",
|
|
47697
49546
|
form: "single",
|