@camstack/addon-tailscale 1.2.118 → 1.2.120
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/{dist-B5khvoZj.js → auth-key-file-Cuw3mylb.mjs} +2940 -533
- package/dist/{dist-CnsQ7vyF.mjs → auth-key-file-nqbw3U3H.js} +3013 -504
- package/dist/client/tailscale.addon.js +24 -48
- package/dist/client/tailscale.addon.mjs +17 -19
- package/dist/ingress/tailscale-ingress.addon.js +19 -18
- package/dist/ingress/tailscale-ingress.addon.mjs +15 -14
- package/package.json +3 -2
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
require("node:crypto");
|
|
23
|
+
let node_fs_promises = require("node:fs/promises");
|
|
24
|
+
node_fs_promises = __toESM(node_fs_promises);
|
|
25
|
+
let node_os = require("node:os");
|
|
26
|
+
node_os = __toESM(node_os);
|
|
27
|
+
let node_path = require("node:path");
|
|
28
|
+
node_path = __toESM(node_path);
|
|
29
|
+
//#region ../types/dist/event-category-DaIZi00R.mjs
|
|
2
30
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
31
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
32
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -77,6 +105,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
77
105
|
*/
|
|
78
106
|
EventCategory["AddonLoadFailed"] = "addon.load-failed";
|
|
79
107
|
/**
|
|
108
|
+
* A keychain value was stored or removed (D787). Carries the ref, its
|
|
109
|
+
* owner and the new version — NEVER the value. A process holding the ref
|
|
110
|
+
* drops its cached copy and the owning `BaseAddon` re-resolves its config.
|
|
111
|
+
* Telemetry (D8): a process that misses it still revalidates by version.
|
|
112
|
+
*/
|
|
113
|
+
EventCategory["KeychainChanged"] = "keychain.changed";
|
|
114
|
+
/**
|
|
80
115
|
* Addon recovered from a previous failure. Emitted when an addon
|
|
81
116
|
* transitions from `failed` back to `healthy` (typically via the
|
|
82
117
|
* monitor's auto-retry loop, or after manual `addons.retryLoad`).
|
|
@@ -499,15 +534,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
499
534
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
500
535
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
501
536
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
502
|
-
/**
|
|
503
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
504
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
505
|
-
* `createSession`, so running sessions keep their current backend until
|
|
506
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
507
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
508
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
509
|
-
*/
|
|
510
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
511
537
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
512
538
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
513
539
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -5378,7 +5404,7 @@ var ZodIssueCode = {
|
|
|
5378
5404
|
var ZodFirstPartyTypeKind;
|
|
5379
5405
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5380
5406
|
//#endregion
|
|
5381
|
-
//#region ../types/dist/sleep-
|
|
5407
|
+
//#region ../types/dist/sleep-Cr5YOk3m.mjs
|
|
5382
5408
|
/**
|
|
5383
5409
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5384
5410
|
* window to float samples (D455).
|
|
@@ -5457,6 +5483,97 @@ function buildAlawTable() {
|
|
|
5457
5483
|
}
|
|
5458
5484
|
buildUlawTable();
|
|
5459
5485
|
buildAlawTable();
|
|
5486
|
+
/** Is this field's stored value a credential? */
|
|
5487
|
+
function isSecretConfigField(field) {
|
|
5488
|
+
if (field.type === "password") return true;
|
|
5489
|
+
return "secret" in field && field.secret === true;
|
|
5490
|
+
}
|
|
5491
|
+
/**
|
|
5492
|
+
* Is this field's value stored in the KEYCHAIN (D787)? Every secret field is,
|
|
5493
|
+
* by its TYPE, unless it opts out with `storage: 'inline'` — never by its name.
|
|
5494
|
+
*/
|
|
5495
|
+
function isKeychainStoredField(field) {
|
|
5496
|
+
if (!isSecretConfigField(field)) return false;
|
|
5497
|
+
if (field.type === "textarea" && field.isJson === true) return false;
|
|
5498
|
+
return !("storage" in field && field.storage === "inline");
|
|
5499
|
+
}
|
|
5500
|
+
/**
|
|
5501
|
+
* What a settings blob holds where a secret used to be.
|
|
5502
|
+
*
|
|
5503
|
+
* A keychain-stored field never holds its value. It holds a self-describing
|
|
5504
|
+
* MARKER, `{"$secret":"secret://…","v":1}` — an object, never a string, so no
|
|
5505
|
+
* code can mistake it for a credential and no form can send it to a camera as
|
|
5506
|
+
* a password. The empty state is `null` / absent, never `''`.
|
|
5507
|
+
*
|
|
5508
|
+
* The same shapes travel to and from the admin UI:
|
|
5509
|
+
*
|
|
5510
|
+
* - read: `hydrateSchema` hands a secret field a {@link SecretFieldView}
|
|
5511
|
+
* (`{ $secret, v, set: true }`) or `null` — the browser learns whether a
|
|
5512
|
+
* value is set, never the value.
|
|
5513
|
+
* - write: an untouched field submits the view back unchanged (KEEP); a typed
|
|
5514
|
+
* value is a plain non-empty string (CHANGE); the Clear button submits
|
|
5515
|
+
* {@link SECRET_CLEAR} (CLEAR). `''`, `null` and the legacy redaction tokens
|
|
5516
|
+
* are KEEP — an empty string is what a defaults-fallback pushes back, and
|
|
5517
|
+
* treating it as "clear" is how a save destroyed a stored credential before.
|
|
5518
|
+
*
|
|
5519
|
+
* Pure and browser-safe.
|
|
5520
|
+
*/
|
|
5521
|
+
var SECRET_CLEAR = { $secretClear: true };
|
|
5522
|
+
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5523
|
+
var LEGACY_DEVICE_REDACTION = "***";
|
|
5524
|
+
function isRecord$1(value) {
|
|
5525
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5526
|
+
}
|
|
5527
|
+
function makeSecretMarker(ref) {
|
|
5528
|
+
return {
|
|
5529
|
+
$secret: ref,
|
|
5530
|
+
v: 1
|
|
5531
|
+
};
|
|
5532
|
+
}
|
|
5533
|
+
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5534
|
+
function isSecretMarker(value) {
|
|
5535
|
+
if (!isRecord$1(value)) return false;
|
|
5536
|
+
const ref = value["$secret"];
|
|
5537
|
+
return typeof ref === "string" && ref.length > 0;
|
|
5538
|
+
}
|
|
5539
|
+
function isSecretClear(value) {
|
|
5540
|
+
return isRecord$1(value) && value["$secretClear"] === true;
|
|
5541
|
+
}
|
|
5542
|
+
/**
|
|
5543
|
+
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
5544
|
+
* plaintext becomes "set (inline)", nothing becomes `null`. A value never
|
|
5545
|
+
* survives this function.
|
|
5546
|
+
*/
|
|
5547
|
+
function toSecretFieldView(stored) {
|
|
5548
|
+
if (isSecretMarker(stored)) return {
|
|
5549
|
+
$secret: stored.$secret,
|
|
5550
|
+
v: 1,
|
|
5551
|
+
set: true
|
|
5552
|
+
};
|
|
5553
|
+
if (typeof stored === "string" && stored.length > 0) return {
|
|
5554
|
+
$secret: null,
|
|
5555
|
+
v: 1,
|
|
5556
|
+
set: true,
|
|
5557
|
+
inline: true
|
|
5558
|
+
};
|
|
5559
|
+
return null;
|
|
5560
|
+
}
|
|
5561
|
+
/**
|
|
5562
|
+
* Classify an incoming value for a secret path. Only a non-empty string that is
|
|
5563
|
+
* not a redaction token sets a value; only {@link SECRET_CLEAR} clears.
|
|
5564
|
+
* Everything else — a marker (ours or anyone's), a UI view, `''`, `null`,
|
|
5565
|
+
* `undefined`, a redaction token, a non-string — keeps what is stored.
|
|
5566
|
+
*/
|
|
5567
|
+
function classifySecretWrite(incoming) {
|
|
5568
|
+
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5569
|
+
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5570
|
+
if (incoming.length === 0) return { kind: "keep" };
|
|
5571
|
+
if (incoming === "__camstack_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5572
|
+
return {
|
|
5573
|
+
kind: "set",
|
|
5574
|
+
value: incoming
|
|
5575
|
+
};
|
|
5576
|
+
}
|
|
5460
5577
|
Object.fromEntries([
|
|
5461
5578
|
{
|
|
5462
5579
|
id: "overview",
|
|
@@ -5628,33 +5745,19 @@ Object.fromEntries([
|
|
|
5628
5745
|
function isValuelessField(field) {
|
|
5629
5746
|
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";
|
|
5630
5747
|
}
|
|
5631
|
-
|
|
5632
|
-
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
5633
|
-
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
5634
|
-
* before returning to the admin UI. Groups are walked recursively.
|
|
5635
|
-
*
|
|
5636
|
-
* For each leaf field:
|
|
5637
|
-
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
5638
|
-
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
5639
|
-
*
|
|
5640
|
-
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
5641
|
-
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
5642
|
-
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
5643
|
-
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
5644
|
-
*/
|
|
5645
|
-
function hydrateSchema(schema, values) {
|
|
5748
|
+
function hydrateSchema(schema, values, options = {}) {
|
|
5646
5749
|
return {
|
|
5647
5750
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
5648
5751
|
sections: schema.sections.map((section) => ({
|
|
5649
5752
|
...section,
|
|
5650
|
-
fields: section.fields.map((field) => hydrateField(field, values))
|
|
5753
|
+
fields: section.fields.map((field) => hydrateField(field, values, options))
|
|
5651
5754
|
}))
|
|
5652
5755
|
};
|
|
5653
5756
|
}
|
|
5654
|
-
function hydrateField(field, values) {
|
|
5757
|
+
function hydrateField(field, values, options) {
|
|
5655
5758
|
if (isValuelessField(field)) return field;
|
|
5656
5759
|
if (field.type === "group") {
|
|
5657
|
-
const hydratedChildren = field.fields.map((child) => hydrateField(child, values));
|
|
5760
|
+
const hydratedChildren = field.fields.map((child) => hydrateField(child, values, options));
|
|
5658
5761
|
return {
|
|
5659
5762
|
...field,
|
|
5660
5763
|
fields: hydratedChildren
|
|
@@ -5663,7 +5766,7 @@ function hydrateField(field, values) {
|
|
|
5663
5766
|
if (field.type === "sub-tabs") {
|
|
5664
5767
|
const hydratedTabs = field.tabs.map((tab) => ({
|
|
5665
5768
|
...tab,
|
|
5666
|
-
fields: tab.fields.map((child) => hydrateField(child, values))
|
|
5769
|
+
fields: tab.fields.map((child) => hydrateField(child, values, options))
|
|
5667
5770
|
}));
|
|
5668
5771
|
return {
|
|
5669
5772
|
...field,
|
|
@@ -5673,6 +5776,33 @@ function hydrateField(field, values) {
|
|
|
5673
5776
|
const key = field.key;
|
|
5674
5777
|
const storedValue = Object.prototype.hasOwnProperty.call(values, key) ? values[key] : void 0;
|
|
5675
5778
|
const defaultValue = field.default;
|
|
5779
|
+
const asView = (v) => isSecretMarker(v) || options.inlineSecretsAsViews === true && v !== void 0;
|
|
5780
|
+
if (isKeychainStoredField(field) && asView(storedValue)) return {
|
|
5781
|
+
...field,
|
|
5782
|
+
value: toSecretFieldView(storedValue)
|
|
5783
|
+
};
|
|
5784
|
+
if (isKeychainStoredField(field) && options.inlineSecretsAsViews === true) return {
|
|
5785
|
+
...field,
|
|
5786
|
+
value: null
|
|
5787
|
+
};
|
|
5788
|
+
if (field.type === "editable-array" && Array.isArray(storedValue)) {
|
|
5789
|
+
const secretItemKeys = field.itemFields.filter((item) => "key" in item && isKeychainStoredField(item)).map((item) => "key" in item ? item.key : "");
|
|
5790
|
+
if (secretItemKeys.length > 0) {
|
|
5791
|
+
const rows = storedValue.map((row) => {
|
|
5792
|
+
if (row === null || typeof row !== "object" || Array.isArray(row)) return row;
|
|
5793
|
+
const out = { ...row };
|
|
5794
|
+
for (const k of secretItemKeys) {
|
|
5795
|
+
const v = Reflect.get(row, k);
|
|
5796
|
+
if (asView(v)) out[k] = toSecretFieldView(v);
|
|
5797
|
+
}
|
|
5798
|
+
return out;
|
|
5799
|
+
});
|
|
5800
|
+
return {
|
|
5801
|
+
...field,
|
|
5802
|
+
value: rows
|
|
5803
|
+
};
|
|
5804
|
+
}
|
|
5805
|
+
}
|
|
5676
5806
|
if (field.multiple) {
|
|
5677
5807
|
const stored = Array.isArray(storedValue) ? storedValue : storedValue !== void 0 && storedValue !== null ? [storedValue] : [];
|
|
5678
5808
|
const itemFallback = field.multiple.itemDefault !== void 0 ? field.multiple.itemDefault : defaultValue !== void 0 ? defaultValue : typeOf(field) === "string" ? "" : null;
|
|
@@ -5915,6 +6045,431 @@ function projectStore(store, perNodeKeys, nodeId) {
|
|
|
5915
6045
|
}
|
|
5916
6046
|
return out;
|
|
5917
6047
|
}
|
|
6048
|
+
var GLOBAL_SCOPE = { kind: "global" };
|
|
6049
|
+
/** The scope every addon-wide (not per-node, not per-device) setting lives in. */
|
|
6050
|
+
function globalSecretScope() {
|
|
6051
|
+
return GLOBAL_SCOPE;
|
|
6052
|
+
}
|
|
6053
|
+
function encodeSegment(value) {
|
|
6054
|
+
return encodeURIComponent(value);
|
|
6055
|
+
}
|
|
6056
|
+
/**
|
|
6057
|
+
* The field path of a value inside an array item, addressed by the item's id:
|
|
6058
|
+
* `arrayItemFieldPath('providers', 'authentik', 'clientSecret')` →
|
|
6059
|
+
* `providers[authentik].clientSecret`.
|
|
6060
|
+
*/
|
|
6061
|
+
function arrayItemFieldPath(arrayKey, itemId, fieldKey) {
|
|
6062
|
+
return `${arrayKey}[${encodeSegment(itemId)}].${fieldKey}`;
|
|
6063
|
+
}
|
|
6064
|
+
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6065
|
+
var KeychainWriteRefusedError = class extends Error {
|
|
6066
|
+
fieldPath;
|
|
6067
|
+
constructor(fieldPath, cause) {
|
|
6068
|
+
super(`secret "${fieldPath}" was not saved: the keychain could not store it (${cause instanceof Error ? cause.message : String(cause)}). Nothing was written.`);
|
|
6069
|
+
this.fieldPath = fieldPath;
|
|
6070
|
+
this.name = "KeychainWriteRefusedError";
|
|
6071
|
+
}
|
|
6072
|
+
};
|
|
6073
|
+
var KEEP = { kind: "keep" };
|
|
6074
|
+
function isRecord(value) {
|
|
6075
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6076
|
+
}
|
|
6077
|
+
function defaultMintId() {
|
|
6078
|
+
return globalThis.crypto.randomUUID();
|
|
6079
|
+
}
|
|
6080
|
+
/** Every marker ref anywhere under `value`. */
|
|
6081
|
+
function collectSecretMarkerRefs(value, out = []) {
|
|
6082
|
+
if (isSecretMarker(value)) {
|
|
6083
|
+
out.push(value.$secret);
|
|
6084
|
+
return out;
|
|
6085
|
+
}
|
|
6086
|
+
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6087
|
+
else if (isRecord(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6088
|
+
return out;
|
|
6089
|
+
}
|
|
6090
|
+
async function storedValueEquals(secrets, marker, candidate) {
|
|
6091
|
+
const resolved = (await secrets.resolve([marker.$secret]))[marker.$secret];
|
|
6092
|
+
return resolved?.kind === "value" && resolved.value === candidate;
|
|
6093
|
+
}
|
|
6094
|
+
async function writeLeaf(ctx, incoming, stored, fieldPath) {
|
|
6095
|
+
const intent = classifySecretWrite(incoming);
|
|
6096
|
+
const ref = ctx.secrets.ref(ctx.scope, fieldPath);
|
|
6097
|
+
const storedIsOurs = isSecretMarker(stored) && stored.$secret === ref;
|
|
6098
|
+
if (intent.kind === "keep") return KEEP;
|
|
6099
|
+
if (intent.kind === "set" && !ctx.operatorWrite && typeof stored === "string" && stored === intent.value) return KEEP;
|
|
6100
|
+
if (intent.kind === "clear") {
|
|
6101
|
+
if (storedIsOurs) ctx.deletes.push(ref);
|
|
6102
|
+
return {
|
|
6103
|
+
kind: "value",
|
|
6104
|
+
value: null
|
|
6105
|
+
};
|
|
6106
|
+
}
|
|
6107
|
+
if (storedIsOurs && await storedValueEquals(ctx.secrets, stored, intent.value)) return {
|
|
6108
|
+
kind: "value",
|
|
6109
|
+
value: stored
|
|
6110
|
+
};
|
|
6111
|
+
try {
|
|
6112
|
+
await ctx.secrets.put(ref, intent.value);
|
|
6113
|
+
} catch (err) {
|
|
6114
|
+
throw new KeychainWriteRefusedError(fieldPath, err);
|
|
6115
|
+
}
|
|
6116
|
+
return {
|
|
6117
|
+
kind: "value",
|
|
6118
|
+
value: makeSecretMarker(ref)
|
|
6119
|
+
};
|
|
6120
|
+
}
|
|
6121
|
+
/** Apply a member result onto `out`: KEEP restores the stored member, or removes it. */
|
|
6122
|
+
function applyMember(out, key, result, storedParent) {
|
|
6123
|
+
if (result.kind === "value") {
|
|
6124
|
+
out[key] = result.value;
|
|
6125
|
+
return;
|
|
6126
|
+
}
|
|
6127
|
+
if (Object.prototype.hasOwnProperty.call(storedParent, key)) out[key] = storedParent[key];
|
|
6128
|
+
else delete out[key];
|
|
6129
|
+
}
|
|
6130
|
+
async function writeMembers(ctx, children, incoming, stored, pathOf) {
|
|
6131
|
+
const out = { ...incoming };
|
|
6132
|
+
for (const [member, node] of children) applyMember(out, member, await writeNode(ctx, node, incoming[member], stored[member], pathOf(member)), stored);
|
|
6133
|
+
return out;
|
|
6134
|
+
}
|
|
6135
|
+
function rowId(row, idKey) {
|
|
6136
|
+
const raw = row[idKey];
|
|
6137
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
6138
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return String(raw);
|
|
6139
|
+
return null;
|
|
6140
|
+
}
|
|
6141
|
+
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6142
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord) : [];
|
|
6143
|
+
if (!Array.isArray(incoming)) {
|
|
6144
|
+
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6145
|
+
return {
|
|
6146
|
+
kind: "value",
|
|
6147
|
+
value: incoming
|
|
6148
|
+
};
|
|
6149
|
+
}
|
|
6150
|
+
const storedById = /* @__PURE__ */ new Map();
|
|
6151
|
+
for (const row of storedRows) {
|
|
6152
|
+
const id = rowId(row, node.idKey);
|
|
6153
|
+
if (id !== null) storedById.set(id, row);
|
|
6154
|
+
}
|
|
6155
|
+
const kept = /* @__PURE__ */ new Set();
|
|
6156
|
+
const rows = [];
|
|
6157
|
+
for (const row of incoming) {
|
|
6158
|
+
if (!isRecord(row)) {
|
|
6159
|
+
rows.push(row);
|
|
6160
|
+
continue;
|
|
6161
|
+
}
|
|
6162
|
+
const id = rowId(row, node.idKey) ?? ctx.mintId();
|
|
6163
|
+
kept.add(id);
|
|
6164
|
+
const withId = {
|
|
6165
|
+
...row,
|
|
6166
|
+
[node.idKey]: row[node.idKey] ?? id
|
|
6167
|
+
};
|
|
6168
|
+
if (rowId(withId, node.idKey) === null) withId[node.idKey] = id;
|
|
6169
|
+
const storedRow = storedById.get(id) ?? {};
|
|
6170
|
+
rows.push(await writeMembers(ctx, node.item, withId, storedRow, (member) => arrayItemFieldPath(fieldPath, id, member)));
|
|
6171
|
+
}
|
|
6172
|
+
for (const [id, row] of storedById) if (!kept.has(id)) ctx.deletes.push(...collectSecretMarkerRefs(row));
|
|
6173
|
+
return {
|
|
6174
|
+
kind: "value",
|
|
6175
|
+
value: rows
|
|
6176
|
+
};
|
|
6177
|
+
}
|
|
6178
|
+
async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
6179
|
+
switch (node.kind) {
|
|
6180
|
+
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6181
|
+
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6182
|
+
case "object": {
|
|
6183
|
+
if (!isRecord(incoming)) {
|
|
6184
|
+
if (incoming === void 0) return KEEP;
|
|
6185
|
+
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6186
|
+
return {
|
|
6187
|
+
kind: "value",
|
|
6188
|
+
value: incoming
|
|
6189
|
+
};
|
|
6190
|
+
}
|
|
6191
|
+
const storedObj = isRecord(stored) ? stored : {};
|
|
6192
|
+
return {
|
|
6193
|
+
kind: "value",
|
|
6194
|
+
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
6195
|
+
};
|
|
6196
|
+
}
|
|
6197
|
+
}
|
|
6198
|
+
}
|
|
6199
|
+
/** Split a perNode-scoped key (`key@nodeId`). */
|
|
6200
|
+
function splitNodeKey(key) {
|
|
6201
|
+
const at = key.indexOf("@");
|
|
6202
|
+
return at <= 0 ? {
|
|
6203
|
+
base: key,
|
|
6204
|
+
nodeId: null
|
|
6205
|
+
} : {
|
|
6206
|
+
base: key.slice(0, at),
|
|
6207
|
+
nodeId: key.slice(at + 1)
|
|
6208
|
+
};
|
|
6209
|
+
}
|
|
6210
|
+
/** Rewrite a settings patch so no secret value reaches the blob. See the file doc. */
|
|
6211
|
+
async function transformSecretWrite(input) {
|
|
6212
|
+
const deletes = [];
|
|
6213
|
+
const base = {
|
|
6214
|
+
secrets: input.secrets,
|
|
6215
|
+
mintId: input.mintId ?? defaultMintId,
|
|
6216
|
+
deletes,
|
|
6217
|
+
operatorWrite: input.operatorWrite === true
|
|
6218
|
+
};
|
|
6219
|
+
const out = {};
|
|
6220
|
+
for (const [key, incoming] of Object.entries(input.patch)) {
|
|
6221
|
+
const { base: baseKey, nodeId } = splitNodeKey(key);
|
|
6222
|
+
const node = input.tree.get(baseKey);
|
|
6223
|
+
if (node === void 0) {
|
|
6224
|
+
out[key] = incoming;
|
|
6225
|
+
continue;
|
|
6226
|
+
}
|
|
6227
|
+
const scope = nodeId !== null && nodeId.length > 0 ? {
|
|
6228
|
+
kind: "node",
|
|
6229
|
+
nodeId
|
|
6230
|
+
} : input.scope ?? globalSecretScope();
|
|
6231
|
+
const result = await writeNode({
|
|
6232
|
+
...base,
|
|
6233
|
+
scope
|
|
6234
|
+
}, node, incoming, input.stored[key], baseKey);
|
|
6235
|
+
if (result.kind === "value") out[key] = result.value;
|
|
6236
|
+
}
|
|
6237
|
+
return {
|
|
6238
|
+
patch: out,
|
|
6239
|
+
afterWrite: async () => {
|
|
6240
|
+
if (deletes.length === 0) return { orphaned: [] };
|
|
6241
|
+
try {
|
|
6242
|
+
await input.secrets.delete([...new Set(deletes)]);
|
|
6243
|
+
return { orphaned: [] };
|
|
6244
|
+
} catch {
|
|
6245
|
+
return { orphaned: [...new Set(deletes)] };
|
|
6246
|
+
}
|
|
6247
|
+
}
|
|
6248
|
+
};
|
|
6249
|
+
}
|
|
6250
|
+
/**
|
|
6251
|
+
* Replace every marker in `value` with its keychain value. Returns the SAME
|
|
6252
|
+
* reference when there is no marker (no allocation, no keychain call).
|
|
6253
|
+
*/
|
|
6254
|
+
async function resolveSecretMarkers(value, secrets) {
|
|
6255
|
+
const refs = collectSecretMarkerRefs(value);
|
|
6256
|
+
if (refs.length === 0) return {
|
|
6257
|
+
value,
|
|
6258
|
+
unresolved: []
|
|
6259
|
+
};
|
|
6260
|
+
const answers = await secrets.resolve(refs);
|
|
6261
|
+
const unresolved = [];
|
|
6262
|
+
for (const ref of new Set(refs)) {
|
|
6263
|
+
const answer = answers[ref];
|
|
6264
|
+
if (answer === void 0) unresolved.push({
|
|
6265
|
+
ref,
|
|
6266
|
+
reason: "not-initialized"
|
|
6267
|
+
});
|
|
6268
|
+
else if (answer.kind === "unavailable") unresolved.push({
|
|
6269
|
+
ref,
|
|
6270
|
+
reason: answer.reason
|
|
6271
|
+
});
|
|
6272
|
+
else if (answer.kind === "missing" || answer.kind === "forbidden") unresolved.push({
|
|
6273
|
+
ref,
|
|
6274
|
+
reason: answer.kind
|
|
6275
|
+
});
|
|
6276
|
+
}
|
|
6277
|
+
const substitute = (v) => {
|
|
6278
|
+
if (isSecretMarker(v)) {
|
|
6279
|
+
const answer = answers[v.$secret];
|
|
6280
|
+
return answer?.kind === "value" ? {
|
|
6281
|
+
keep: true,
|
|
6282
|
+
value: answer.value
|
|
6283
|
+
} : {
|
|
6284
|
+
keep: false,
|
|
6285
|
+
value: void 0
|
|
6286
|
+
};
|
|
6287
|
+
}
|
|
6288
|
+
if (Array.isArray(v)) {
|
|
6289
|
+
const items = [];
|
|
6290
|
+
for (const item of v) {
|
|
6291
|
+
const s = substitute(item);
|
|
6292
|
+
if (s.keep) items.push(s.value);
|
|
6293
|
+
}
|
|
6294
|
+
return {
|
|
6295
|
+
keep: true,
|
|
6296
|
+
value: items
|
|
6297
|
+
};
|
|
6298
|
+
}
|
|
6299
|
+
if (isRecord(v)) {
|
|
6300
|
+
const out = {};
|
|
6301
|
+
for (const [k, child] of Object.entries(v)) {
|
|
6302
|
+
const s = substitute(child);
|
|
6303
|
+
if (s.keep) out[k] = s.value;
|
|
6304
|
+
}
|
|
6305
|
+
return {
|
|
6306
|
+
keep: true,
|
|
6307
|
+
value: out
|
|
6308
|
+
};
|
|
6309
|
+
}
|
|
6310
|
+
return {
|
|
6311
|
+
keep: true,
|
|
6312
|
+
value: v
|
|
6313
|
+
};
|
|
6314
|
+
};
|
|
6315
|
+
return {
|
|
6316
|
+
value: substitute(value).value,
|
|
6317
|
+
unresolved
|
|
6318
|
+
};
|
|
6319
|
+
}
|
|
6320
|
+
function touchesTree(tree, patch) {
|
|
6321
|
+
if (tree.size === 0) return false;
|
|
6322
|
+
for (const key of Object.keys(patch)) {
|
|
6323
|
+
const at = key.indexOf("@");
|
|
6324
|
+
if (tree.has(at > 0 ? key.slice(0, at) : key)) return true;
|
|
6325
|
+
}
|
|
6326
|
+
return false;
|
|
6327
|
+
}
|
|
6328
|
+
/** The blob as stored now; a failed read REFUSES the write instead of guessing. */
|
|
6329
|
+
async function readStoredAddonBlob(raw) {
|
|
6330
|
+
const threeWay = raw.readAddonStoreResult;
|
|
6331
|
+
if (threeWay === void 0) return raw.readAddonStore();
|
|
6332
|
+
const result = await threeWay.call(raw);
|
|
6333
|
+
if (result.kind === "failed") throw new Error(`settings write refused: the stored blob could not be read (${result.error})`);
|
|
6334
|
+
return result.kind === "missing" ? {} : result.value;
|
|
6335
|
+
}
|
|
6336
|
+
function createSecretAwareSettings(raw, opts) {
|
|
6337
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6338
|
+
const serialize = (key, fn) => {
|
|
6339
|
+
const next = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
6340
|
+
const tail = next.catch(() => void 0);
|
|
6341
|
+
chains.set(key, tail);
|
|
6342
|
+
tail.then(() => {
|
|
6343
|
+
if (chains.get(key) === tail) chains.delete(key);
|
|
6344
|
+
});
|
|
6345
|
+
return next;
|
|
6346
|
+
};
|
|
6347
|
+
const write = async (chainKey, tree, scope, patch, readStored, rawWrite) => {
|
|
6348
|
+
if (!touchesTree(tree, patch)) return rawWrite(patch);
|
|
6349
|
+
return serialize(chainKey, async () => {
|
|
6350
|
+
const stored = await readStored();
|
|
6351
|
+
const result = await transformSecretWrite({
|
|
6352
|
+
tree,
|
|
6353
|
+
secrets: opts.secrets,
|
|
6354
|
+
patch,
|
|
6355
|
+
stored,
|
|
6356
|
+
...scope !== void 0 ? { scope } : {},
|
|
6357
|
+
operatorWrite: opts.isOperatorWrite?.() === true
|
|
6358
|
+
});
|
|
6359
|
+
if (Object.keys(result.patch).length > 0) await rawWrite(result.patch);
|
|
6360
|
+
const { orphaned } = await result.afterWrite();
|
|
6361
|
+
if (orphaned.length > 0) opts.onOrphaned(orphaned);
|
|
6362
|
+
});
|
|
6363
|
+
};
|
|
6364
|
+
const wrapped = {
|
|
6365
|
+
writeAddonStore: (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p)),
|
|
6366
|
+
writeDeviceStore: (deviceId, patch) => write(`device:${deviceId}`, opts.deviceTree(), {
|
|
6367
|
+
kind: "device",
|
|
6368
|
+
deviceId
|
|
6369
|
+
}, patch, () => raw.readDeviceStore(deviceId), (p) => raw.writeDeviceStore(deviceId, p))
|
|
6370
|
+
};
|
|
6371
|
+
return new Proxy(raw, { get(target, prop, receiver) {
|
|
6372
|
+
if (prop === "writeAddonStore") return wrapped.writeAddonStore;
|
|
6373
|
+
if (prop === "writeDeviceStore") return wrapped.writeDeviceStore;
|
|
6374
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6375
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
6376
|
+
} });
|
|
6377
|
+
}
|
|
6378
|
+
/** The context the addon sees: identical, except that its settings writes are secret-aware. */
|
|
6379
|
+
function withSecretAwareSettings(context, opts) {
|
|
6380
|
+
const raw = context.settings;
|
|
6381
|
+
if (raw === void 0) return context;
|
|
6382
|
+
const settings = createSecretAwareSettings(raw, opts);
|
|
6383
|
+
return new Proxy(context, { get(target, prop, receiver) {
|
|
6384
|
+
if (prop === "settings") return settings;
|
|
6385
|
+
return Reflect.get(target, prop, receiver);
|
|
6386
|
+
} });
|
|
6387
|
+
}
|
|
6388
|
+
var LEAF = { kind: "leaf" };
|
|
6389
|
+
var DEFAULT_ITEM_ID_KEY = "id";
|
|
6390
|
+
function collectFields(fields, out) {
|
|
6391
|
+
for (const field of fields) {
|
|
6392
|
+
if (field.type === "group") {
|
|
6393
|
+
collectFields(field.fields, out);
|
|
6394
|
+
continue;
|
|
6395
|
+
}
|
|
6396
|
+
if (field.type === "sub-tabs") {
|
|
6397
|
+
for (const tab of field.tabs) collectFields(tab.fields, out);
|
|
6398
|
+
continue;
|
|
6399
|
+
}
|
|
6400
|
+
if (field.type === "editable-array") {
|
|
6401
|
+
const item = /* @__PURE__ */ new Map();
|
|
6402
|
+
for (const itemField of field.itemFields) if ("key" in itemField && isKeychainStoredField(itemField)) item.set(itemField.key, LEAF);
|
|
6403
|
+
if (item.size > 0) out.set(field.key, {
|
|
6404
|
+
kind: "array",
|
|
6405
|
+
idKey: field.itemIdKey ?? DEFAULT_ITEM_ID_KEY,
|
|
6406
|
+
item
|
|
6407
|
+
});
|
|
6408
|
+
continue;
|
|
6409
|
+
}
|
|
6410
|
+
if (!("key" in field) || typeof field.key !== "string") continue;
|
|
6411
|
+
if (isKeychainStoredField(field)) out.set(field.key, LEAF);
|
|
6412
|
+
}
|
|
6413
|
+
}
|
|
6414
|
+
/** The secret tree a settings schema declares. */
|
|
6415
|
+
function secretTreeFromSchema(schema) {
|
|
6416
|
+
const out = /* @__PURE__ */ new Map();
|
|
6417
|
+
if (schema === null) return out;
|
|
6418
|
+
for (const section of schema.sections) collectFields(section.fields, out);
|
|
6419
|
+
return out;
|
|
6420
|
+
}
|
|
6421
|
+
/** Parse `a.b[id].c` into segments; throws on a malformed path (a declaration bug). */
|
|
6422
|
+
function parseSecretStatePath(path) {
|
|
6423
|
+
const segments = [];
|
|
6424
|
+
for (const raw of path.split(".")) {
|
|
6425
|
+
const m = /^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(raw);
|
|
6426
|
+
if (m === null || m[1] === void 0) throw new Error(`secretStatePaths: malformed path "${path}"`);
|
|
6427
|
+
segments.push(m[2] !== void 0 ? {
|
|
6428
|
+
key: m[1],
|
|
6429
|
+
idKey: m[2]
|
|
6430
|
+
} : { key: m[1] });
|
|
6431
|
+
}
|
|
6432
|
+
if (segments.length === 0) throw new Error(`secretStatePaths: empty path`);
|
|
6433
|
+
if (segments[segments.length - 1]?.idKey !== void 0) throw new Error(`secretStatePaths: "${path}" ends on an array — name the member that is secret`);
|
|
6434
|
+
return segments;
|
|
6435
|
+
}
|
|
6436
|
+
function insert(into, segments) {
|
|
6437
|
+
const [head, ...rest] = segments;
|
|
6438
|
+
if (head === void 0) return;
|
|
6439
|
+
if (rest.length === 0) {
|
|
6440
|
+
into.set(head.key, LEAF);
|
|
6441
|
+
return;
|
|
6442
|
+
}
|
|
6443
|
+
const existing = into.get(head.key);
|
|
6444
|
+
if (head.idKey !== void 0) {
|
|
6445
|
+
const item = new Map(existing?.kind === "array" ? existing.item : []);
|
|
6446
|
+
insert(item, rest);
|
|
6447
|
+
into.set(head.key, {
|
|
6448
|
+
kind: "array",
|
|
6449
|
+
idKey: head.idKey,
|
|
6450
|
+
item
|
|
6451
|
+
});
|
|
6452
|
+
return;
|
|
6453
|
+
}
|
|
6454
|
+
const children = new Map(existing?.kind === "object" ? existing.children : []);
|
|
6455
|
+
insert(children, rest);
|
|
6456
|
+
into.set(head.key, {
|
|
6457
|
+
kind: "object",
|
|
6458
|
+
children
|
|
6459
|
+
});
|
|
6460
|
+
}
|
|
6461
|
+
/** Add hidden-state paths (`secretStatePaths`) to a schema-derived tree. */
|
|
6462
|
+
function mergeSecretStatePaths(tree, paths) {
|
|
6463
|
+
if (paths.length === 0) return tree;
|
|
6464
|
+
const out = new Map(tree);
|
|
6465
|
+
for (const path of paths) insert(out, parseSecretStatePath(path));
|
|
6466
|
+
return out;
|
|
6467
|
+
}
|
|
6468
|
+
/** First retry of a secret the keychain could not serve; doubles to {@link SECRET_RETRY_MAX_MS}. */
|
|
6469
|
+
var SECRET_RETRY_FIRST_MS = 5e3;
|
|
6470
|
+
var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
6471
|
+
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
6472
|
+
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
5918
6473
|
/**
|
|
5919
6474
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
5920
6475
|
*
|
|
@@ -5984,6 +6539,25 @@ var BaseAddon = class {
|
|
|
5984
6539
|
settingsStoreReady = false;
|
|
5985
6540
|
/** Default config values. Provided via constructor. */
|
|
5986
6541
|
defaults;
|
|
6542
|
+
/**
|
|
6543
|
+
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
6544
|
+
* itself (`updateGlobalSettings`, `state()`) that no form field declares.
|
|
6545
|
+
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
6546
|
+
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
6547
|
+
* (`key[<id field>]` addresses array items by id, never by index).
|
|
6548
|
+
*/
|
|
6549
|
+
secretStatePaths = [];
|
|
6550
|
+
_addonSecretTree = null;
|
|
6551
|
+
_deviceSecretTree = null;
|
|
6552
|
+
/** Refs the last resolved config pointed at — a change to one re-resolves. */
|
|
6553
|
+
_configSecretRefs = /* @__PURE__ */ new Set();
|
|
6554
|
+
_unresolvedSecrets = [];
|
|
6555
|
+
_secretRetryTimer = null;
|
|
6556
|
+
_secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
6557
|
+
_secretChangeTimer = null;
|
|
6558
|
+
_secretChangeUnsub = null;
|
|
6559
|
+
/** >0 while an OPERATOR's settings write is being applied. */
|
|
6560
|
+
_operatorWriteDepth = 0;
|
|
5987
6561
|
constructor(defaults) {
|
|
5988
6562
|
this.defaults = defaults;
|
|
5989
6563
|
this._config = { ...defaults };
|
|
@@ -6019,8 +6593,18 @@ var BaseAddon = class {
|
|
|
6019
6593
|
return this._config;
|
|
6020
6594
|
}
|
|
6021
6595
|
async initialize(context) {
|
|
6022
|
-
|
|
6596
|
+
const secrets = context.secrets;
|
|
6597
|
+
this._ctx = secrets !== void 0 ? withSecretAwareSettings(context, {
|
|
6598
|
+
secrets,
|
|
6599
|
+
addonTree: () => this.addonSecretTree(),
|
|
6600
|
+
deviceTree: () => this.deviceSecretTree(),
|
|
6601
|
+
onOrphaned: (refs) => context.logger.warn("keychain refs dropped by a settings write could not be deleted", { meta: { refs: [...refs] } }),
|
|
6602
|
+
isOperatorWrite: () => this._operatorWriteDepth > 0
|
|
6603
|
+
}) : context;
|
|
6023
6604
|
await this.resolveConfig();
|
|
6605
|
+
if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
|
|
6606
|
+
if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
|
|
6607
|
+
});
|
|
6024
6608
|
const result = await this.onInitialize();
|
|
6025
6609
|
this.emitLifecycle(EventCategory.AddonStarted);
|
|
6026
6610
|
const normalized = normalizeAddonInitResult(result);
|
|
@@ -6053,6 +6637,12 @@ var BaseAddon = class {
|
|
|
6053
6637
|
*/
|
|
6054
6638
|
async onHubReachable() {}
|
|
6055
6639
|
async shutdown() {
|
|
6640
|
+
this._secretChangeUnsub?.();
|
|
6641
|
+
this._secretChangeUnsub = null;
|
|
6642
|
+
if (this._secretRetryTimer !== null) clearTimeout(this._secretRetryTimer);
|
|
6643
|
+
if (this._secretChangeTimer !== null) clearTimeout(this._secretChangeTimer);
|
|
6644
|
+
this._secretRetryTimer = null;
|
|
6645
|
+
this._secretChangeTimer = null;
|
|
6056
6646
|
this.emitLifecycle(EventCategory.AddonStopped);
|
|
6057
6647
|
if (this.autoEmitReadiness) this.emitReadinessForProviders("down");
|
|
6058
6648
|
await this.onShutdown();
|
|
@@ -6131,7 +6721,7 @@ var BaseAddon = class {
|
|
|
6131
6721
|
return hydrateSchema(schema, overlay ? {
|
|
6132
6722
|
...projected,
|
|
6133
6723
|
...overlay
|
|
6134
|
-
} : projected);
|
|
6724
|
+
} : projected, { inlineSecretsAsViews: true });
|
|
6135
6725
|
}
|
|
6136
6726
|
/**
|
|
6137
6727
|
* The integration-level view of this addon's settings: exactly the sections
|
|
@@ -6180,7 +6770,7 @@ var BaseAddon = class {
|
|
|
6180
6770
|
return hydrateSchema({
|
|
6181
6771
|
...schema,
|
|
6182
6772
|
sections
|
|
6183
|
-
}, projected);
|
|
6773
|
+
}, projected, { inlineSecretsAsViews: true });
|
|
6184
6774
|
}
|
|
6185
6775
|
/**
|
|
6186
6776
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -6234,18 +6824,50 @@ var BaseAddon = class {
|
|
|
6234
6824
|
value: result.value[key]
|
|
6235
6825
|
};
|
|
6236
6826
|
}
|
|
6827
|
+
/**
|
|
6828
|
+
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
6829
|
+
* the kernel. Identical to {@link updateGlobalSettings}, except that a secret
|
|
6830
|
+
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
6831
|
+
* inline value: the operator re-entering a password is a change, an addon
|
|
6832
|
+
* writing back what it read is not (D787).
|
|
6833
|
+
*/
|
|
6834
|
+
async updateGlobalSettingsAsOperator(patch, nodeId) {
|
|
6835
|
+
this._operatorWriteDepth++;
|
|
6836
|
+
try {
|
|
6837
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6838
|
+
} finally {
|
|
6839
|
+
this._operatorWriteDepth--;
|
|
6840
|
+
}
|
|
6841
|
+
}
|
|
6237
6842
|
async updateGlobalSettings(patch, nodeId) {
|
|
6843
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6844
|
+
}
|
|
6845
|
+
/**
|
|
6846
|
+
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
6847
|
+
*
|
|
6848
|
+
* Writing `''` to a secret field KEEPS what is stored (an empty string is
|
|
6849
|
+
* what a defaults fallback writes back, and it must never destroy a
|
|
6850
|
+
* credential), so code that means "forget this token" says so here. Without
|
|
6851
|
+
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
6852
|
+
*/
|
|
6853
|
+
async clearSecrets(keys, nodeId) {
|
|
6854
|
+
const tree = this.addonSecretTree();
|
|
6855
|
+
const keychain = this._ctx?.secrets !== void 0;
|
|
6856
|
+
const patch = {};
|
|
6857
|
+
for (const key of keys) patch[key] = keychain && tree.has(key) ? SECRET_CLEAR : "";
|
|
6858
|
+
await this.applyGlobalPatch(patch, nodeId);
|
|
6859
|
+
}
|
|
6860
|
+
async applyGlobalPatch(barePatch, nodeId) {
|
|
6238
6861
|
const keys = this.perNodeKeys();
|
|
6239
6862
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6240
6863
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6241
|
-
const barePatch = patch;
|
|
6242
6864
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
6243
6865
|
await this._ctx?.settings?.writeAddonStore(scoped);
|
|
6244
6866
|
if (target !== localNode) return;
|
|
6245
6867
|
await this.resolveConfig();
|
|
6246
6868
|
await this.onConfigChanged();
|
|
6247
6869
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
6248
|
-
this.maybeAutoRestart(
|
|
6870
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.globalSettingsSchema());
|
|
6249
6871
|
}
|
|
6250
6872
|
/**
|
|
6251
6873
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -6270,7 +6892,7 @@ var BaseAddon = class {
|
|
|
6270
6892
|
* time to return its response before the addon is torn down and
|
|
6271
6893
|
* re-initialised by `AddonRegistryService.restartAddon`.
|
|
6272
6894
|
*/
|
|
6273
|
-
maybeAutoRestart(
|
|
6895
|
+
maybeAutoRestart(patchKeys, schema) {
|
|
6274
6896
|
if (!schema) return;
|
|
6275
6897
|
const restartKeys = /* @__PURE__ */ new Set();
|
|
6276
6898
|
for (const section of schema.sections) for (const field of section.fields) {
|
|
@@ -6278,13 +6900,13 @@ var BaseAddon = class {
|
|
|
6278
6900
|
if (field.requiresRestart) restartKeys.add(field.key);
|
|
6279
6901
|
}
|
|
6280
6902
|
if (restartKeys.size === 0) return;
|
|
6281
|
-
if (!
|
|
6903
|
+
if (!patchKeys.some((k) => restartKeys.has(k))) return;
|
|
6282
6904
|
const ctx = this._ctx;
|
|
6283
6905
|
if (!ctx) return;
|
|
6284
6906
|
const addonId = ctx.id;
|
|
6285
6907
|
setImmediate(() => {
|
|
6286
6908
|
ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
|
|
6287
|
-
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields:
|
|
6909
|
+
ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
|
|
6288
6910
|
}).catch((err) => {
|
|
6289
6911
|
ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
6290
6912
|
});
|
|
@@ -6293,7 +6915,7 @@ var BaseAddon = class {
|
|
|
6293
6915
|
async getDeviceSettings(deviceId) {
|
|
6294
6916
|
const schema = this.deviceSettingsSchema();
|
|
6295
6917
|
if (!schema) return { sections: [] };
|
|
6296
|
-
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {});
|
|
6918
|
+
return hydrateSchema(schema, await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, { inlineSecretsAsViews: true });
|
|
6297
6919
|
}
|
|
6298
6920
|
async updateDeviceSettings(deviceId, patch) {
|
|
6299
6921
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
@@ -6423,7 +7045,7 @@ var BaseAddon = class {
|
|
|
6423
7045
|
* selection at boot (absent scoped key ⇒ the constructor default wins).
|
|
6424
7046
|
*/
|
|
6425
7047
|
async resolveConfig() {
|
|
6426
|
-
const stored = await this.readAddonStoreWithRetry();
|
|
7048
|
+
const stored = await this.resolveStoredSecrets(await this.readAddonStoreWithRetry());
|
|
6427
7049
|
const perNode = this.perNodeKeys();
|
|
6428
7050
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
6429
7051
|
const resolved = { ...this.defaults };
|
|
@@ -6448,7 +7070,7 @@ var BaseAddon = class {
|
|
|
6448
7070
|
key,
|
|
6449
7071
|
schema,
|
|
6450
7072
|
fallback,
|
|
6451
|
-
read: () => this.readAddonStoreWithRetry(),
|
|
7073
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
6452
7074
|
write: async (patch) => {
|
|
6453
7075
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
6454
7076
|
},
|
|
@@ -6465,7 +7087,7 @@ var BaseAddon = class {
|
|
|
6465
7087
|
key,
|
|
6466
7088
|
schema,
|
|
6467
7089
|
fallback,
|
|
6468
|
-
read: async () => await this._ctx?.settings?.readDeviceStore(deviceId) ?? {},
|
|
7090
|
+
read: async () => this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(deviceId) ?? {}, false),
|
|
6469
7091
|
write: async (patch) => {
|
|
6470
7092
|
await this._ctx?.settings?.writeDeviceStore(deviceId, patch);
|
|
6471
7093
|
},
|
|
@@ -6477,6 +7099,70 @@ var BaseAddon = class {
|
|
|
6477
7099
|
} })
|
|
6478
7100
|
});
|
|
6479
7101
|
}
|
|
7102
|
+
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
7103
|
+
addonSecretTree() {
|
|
7104
|
+
this._addonSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.globalSettingsSchema()), this.secretStatePaths);
|
|
7105
|
+
return this._addonSecretTree;
|
|
7106
|
+
}
|
|
7107
|
+
deviceSecretTree() {
|
|
7108
|
+
this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
|
|
7109
|
+
return this._deviceSecretTree;
|
|
7110
|
+
}
|
|
7111
|
+
/**
|
|
7112
|
+
* Secrets of this addon's stored config that could not be resolved on the
|
|
7113
|
+
* last read, with why. Non-empty means the addon is running WITHOUT them —
|
|
7114
|
+
* an addon whose function needs one should report itself degraded rather
|
|
7115
|
+
* than start on an empty credential.
|
|
7116
|
+
*/
|
|
7117
|
+
get unresolvedSecrets() {
|
|
7118
|
+
return this._unresolvedSecrets;
|
|
7119
|
+
}
|
|
7120
|
+
/**
|
|
7121
|
+
* Substitute every keychain marker in a stored blob with its value. With no
|
|
7122
|
+
* keychain (no `ctx.secrets`) or no marker, the blob comes back unchanged.
|
|
7123
|
+
* An unresolvable value is LEFT OUT (never `''`), logged by ref — never by
|
|
7124
|
+
* value — and, when the cause can pass, retried with backoff. Nothing is
|
|
7125
|
+
* ever written back from here.
|
|
7126
|
+
*/
|
|
7127
|
+
async resolveStoredSecrets(blob, trackForConfig = true) {
|
|
7128
|
+
const secrets = this._ctx?.secrets;
|
|
7129
|
+
if (secrets === void 0) return blob;
|
|
7130
|
+
const refs = collectSecretMarkerRefs(blob);
|
|
7131
|
+
if (trackForConfig) this._configSecretRefs = new Set(refs);
|
|
7132
|
+
if (refs.length === 0) {
|
|
7133
|
+
if (trackForConfig) this._unresolvedSecrets = [];
|
|
7134
|
+
return blob;
|
|
7135
|
+
}
|
|
7136
|
+
const { value, unresolved } = await resolveSecretMarkers(blob, secrets);
|
|
7137
|
+
if (trackForConfig) {
|
|
7138
|
+
this._unresolvedSecrets = unresolved;
|
|
7139
|
+
if (unresolved.length > 0) {
|
|
7140
|
+
this._ctx?.logger?.error?.("secret unavailable — running without it, will retry", { meta: { secrets: unresolved.map((u) => ({
|
|
7141
|
+
ref: u.ref,
|
|
7142
|
+
reason: u.reason
|
|
7143
|
+
})) } });
|
|
7144
|
+
if (unresolved.some((u) => u.reason !== "missing" && u.reason !== "forbidden")) {
|
|
7145
|
+
this.scheduleSecretReresolve(this._secretRetryDelayMs);
|
|
7146
|
+
this._secretRetryDelayMs = Math.min(this._secretRetryDelayMs * 2, SECRET_RETRY_MAX_MS);
|
|
7147
|
+
}
|
|
7148
|
+
} else this._secretRetryDelayMs = SECRET_RETRY_FIRST_MS;
|
|
7149
|
+
}
|
|
7150
|
+
return value;
|
|
7151
|
+
}
|
|
7152
|
+
/** Re-resolve the config (a keychain-only change, or a retry) and apply it. */
|
|
7153
|
+
scheduleSecretReresolve(delayMs) {
|
|
7154
|
+
const timerOf = delayMs === SECRET_CHANGE_DEBOUNCE_MS ? "_secretChangeTimer" : "_secretRetryTimer";
|
|
7155
|
+
if (this[timerOf] !== null) return;
|
|
7156
|
+
const timer = setTimeout(() => {
|
|
7157
|
+
this[timerOf] = null;
|
|
7158
|
+
if (this._ctx === null) return;
|
|
7159
|
+
this.resolveConfig().then(() => this.onConfigChanged()).catch((err) => {
|
|
7160
|
+
this._ctx?.logger?.error?.("re-resolving secrets failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7161
|
+
});
|
|
7162
|
+
}, delayMs);
|
|
7163
|
+
timer.unref?.();
|
|
7164
|
+
this[timerOf] = timer;
|
|
7165
|
+
}
|
|
6480
7166
|
/**
|
|
6481
7167
|
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
6482
7168
|
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
@@ -6744,32 +7430,12 @@ object({
|
|
|
6744
7430
|
audioCodec: string().optional(),
|
|
6745
7431
|
metadata: record(string(), unknown()).readonly().optional()
|
|
6746
7432
|
});
|
|
6747
|
-
var EncodedPacketSchema = object({
|
|
6748
|
-
type: _enum(["video", "audio"]),
|
|
6749
|
-
data: _instanceof(Uint8Array),
|
|
6750
|
-
pts: number(),
|
|
6751
|
-
dts: number(),
|
|
6752
|
-
keyframe: boolean(),
|
|
6753
|
-
codec: string()
|
|
6754
|
-
});
|
|
6755
|
-
var DecodedFrameSchema = object({
|
|
6756
|
-
data: _instanceof(Uint8Array),
|
|
6757
|
-
width: number(),
|
|
6758
|
-
height: number(),
|
|
6759
|
-
format: _enum([
|
|
6760
|
-
"jpeg",
|
|
6761
|
-
"rgb",
|
|
6762
|
-
"bgr",
|
|
6763
|
-
"yuv420",
|
|
6764
|
-
"gray"
|
|
6765
|
-
]),
|
|
6766
|
-
timestamp: number()
|
|
6767
|
-
});
|
|
6768
7433
|
/**
|
|
6769
7434
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
6770
7435
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
6771
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
6772
|
-
*
|
|
7436
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
7437
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
7438
|
+
* over tRPC / Moleculer.
|
|
6773
7439
|
*
|
|
6774
7440
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
6775
7441
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -6795,50 +7461,6 @@ var FrameHandleSchema = object({
|
|
|
6795
7461
|
slotCount: number().int().positive()
|
|
6796
7462
|
});
|
|
6797
7463
|
/**
|
|
6798
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
6799
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
6800
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
6801
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
6802
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
6803
|
-
*/
|
|
6804
|
-
var FrameHandleFormatSchema = _enum([
|
|
6805
|
-
"rgb",
|
|
6806
|
-
"bgr",
|
|
6807
|
-
"yuv420",
|
|
6808
|
-
"gray"
|
|
6809
|
-
]);
|
|
6810
|
-
/**
|
|
6811
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
6812
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
6813
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
6814
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
6815
|
-
* they asked for with no broker-side conversion.
|
|
6816
|
-
*/
|
|
6817
|
-
var SubscribeFramesInputSchema = object({
|
|
6818
|
-
brokerId: string(),
|
|
6819
|
-
format: FrameHandleFormatSchema,
|
|
6820
|
-
/**
|
|
6821
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
6822
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
6823
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
6824
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
6825
|
-
*/
|
|
6826
|
-
maxFps: number().positive().optional(),
|
|
6827
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
6828
|
-
tag: string().optional()
|
|
6829
|
-
});
|
|
6830
|
-
/**
|
|
6831
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
6832
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
6833
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
6834
|
-
*/
|
|
6835
|
-
var SubscribeFramesResultSchema = object({
|
|
6836
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
6837
|
-
subscriptionId: string(),
|
|
6838
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
6839
|
-
maxFps: number().nonnegative()
|
|
6840
|
-
});
|
|
6841
|
-
/**
|
|
6842
7464
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
6843
7465
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
6844
7466
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -6846,8 +7468,8 @@ var SubscribeFramesResultSchema = object({
|
|
|
6846
7468
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
6847
7469
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
6848
7470
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
6849
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
6850
|
-
*
|
|
7471
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
7472
|
+
* it.
|
|
6851
7473
|
*/
|
|
6852
7474
|
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6853
7475
|
var DecodedAudioChunkSchema = object({
|
|
@@ -6865,11 +7487,10 @@ var DecodedAudioChunkSchema = object({
|
|
|
6865
7487
|
format: AudioChunkFormatSchema.optional()
|
|
6866
7488
|
});
|
|
6867
7489
|
/**
|
|
6868
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
6869
|
-
*
|
|
6870
|
-
*
|
|
6871
|
-
*
|
|
6872
|
-
* `pullAudioChunks`.
|
|
7490
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
7491
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
7492
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
7493
|
+
* the consumer drains via `pullAudioChunks`.
|
|
6873
7494
|
*/
|
|
6874
7495
|
var SubscribeAudioChunksInputSchema = object({
|
|
6875
7496
|
brokerId: string(),
|
|
@@ -6900,9 +7521,7 @@ var BrokerStatsSchema = object({
|
|
|
6900
7521
|
"stopped"
|
|
6901
7522
|
]),
|
|
6902
7523
|
inputFps: number(),
|
|
6903
|
-
decodeFps: number(),
|
|
6904
7524
|
encodedSubscribers: number(),
|
|
6905
|
-
decodedSubscribers: number(),
|
|
6906
7525
|
uptimeMs: number(),
|
|
6907
7526
|
bitrateKbps: number(),
|
|
6908
7527
|
idrIntervalMs: number(),
|
|
@@ -6915,14 +7534,6 @@ var BrokerStatsSchema = object({
|
|
|
6915
7534
|
preBufferMs: number(),
|
|
6916
7535
|
preBufferPackets: number(),
|
|
6917
7536
|
/**
|
|
6918
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
6919
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
6920
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
6921
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
6922
|
-
* a separate cap call per broker.
|
|
6923
|
-
*/
|
|
6924
|
-
decoderNodeId: string().nullable(),
|
|
6925
|
-
/**
|
|
6926
7537
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
6927
7538
|
* when the stream has no audio track or the broker is in cold start.
|
|
6928
7539
|
* `supported = false` means the codec was detected but the local
|
|
@@ -10278,70 +10889,6 @@ var StorageLocationDeclarationSchema = object({
|
|
|
10278
10889
|
"backup"
|
|
10279
10890
|
]).optional()
|
|
10280
10891
|
});
|
|
10281
|
-
var DecoderStatsSchema = object({
|
|
10282
|
-
inputFps: number(),
|
|
10283
|
-
outputFps: number(),
|
|
10284
|
-
avgDecodeTimeMs: number(),
|
|
10285
|
-
droppedFrames: number(),
|
|
10286
|
-
/**
|
|
10287
|
-
* Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
|
|
10288
|
-
* lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
|
|
10289
|
-
* the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
|
|
10290
|
-
* is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
|
|
10291
|
-
*/
|
|
10292
|
-
lagMs: number().optional(),
|
|
10293
|
-
effectiveFps: number().optional(),
|
|
10294
|
-
adaptiveFps: number().optional()
|
|
10295
|
-
});
|
|
10296
|
-
var DecoderSessionConfigSchema = object({
|
|
10297
|
-
codec: string(),
|
|
10298
|
-
maxFps: number().default(0),
|
|
10299
|
-
outputFormat: _enum([
|
|
10300
|
-
"jpeg",
|
|
10301
|
-
"rgb",
|
|
10302
|
-
"bgr",
|
|
10303
|
-
"yuv420",
|
|
10304
|
-
"gray"
|
|
10305
|
-
]).default("jpeg"),
|
|
10306
|
-
scale: number().default(1),
|
|
10307
|
-
width: number().optional(),
|
|
10308
|
-
height: number().optional(),
|
|
10309
|
-
/**
|
|
10310
|
-
* Identifier of the camera this decoder session serves. Optional
|
|
10311
|
-
* because the cap is generic (any caller could request decode), but
|
|
10312
|
-
* stream-broker passes it so decoder logs include `deviceId` for
|
|
10313
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
10314
|
-
* sendPacket errors on a single hung camera).
|
|
10315
|
-
*/
|
|
10316
|
-
deviceId: number().int().nonnegative().optional(),
|
|
10317
|
-
/**
|
|
10318
|
-
* Free-form tag for log scoping. Stream-broker uses
|
|
10319
|
-
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
10320
|
-
* on every line so `grep tag=broker:5/high` filters one camera
|
|
10321
|
-
* profile cleanly.
|
|
10322
|
-
*/
|
|
10323
|
-
tag: string().optional(),
|
|
10324
|
-
/**
|
|
10325
|
-
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
10326
|
-
*
|
|
10327
|
-
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
10328
|
-
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
10329
|
-
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
10330
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
10331
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
10332
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
10333
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
10334
|
-
*/
|
|
10335
|
-
frameSink: _enum(["callback", "shm"]).default("callback"),
|
|
10336
|
-
/**
|
|
10337
|
-
* Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
|
|
10338
|
-
* a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
|
|
10339
|
-
* real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
|
|
10340
|
-
* stream-broker's `streamingDebug` gate — off by default so production logs
|
|
10341
|
-
* stay quiet and the emit path pays zero per-frame cost when disabled.
|
|
10342
|
-
*/
|
|
10343
|
-
debug: boolean().optional()
|
|
10344
|
-
});
|
|
10345
10892
|
/**
|
|
10346
10893
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
10347
10894
|
* an addon declares its channels in.
|
|
@@ -10484,6 +11031,26 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10484
11031
|
"balanced",
|
|
10485
11032
|
"strict"
|
|
10486
11033
|
]);
|
|
11034
|
+
/** Steps whose effect a root label can BE. */
|
|
11035
|
+
var LABEL_SUPPLY_STEP_IDS = [
|
|
11036
|
+
"animal-classifier",
|
|
11037
|
+
"vehicle-classifier",
|
|
11038
|
+
"package-detection"
|
|
11039
|
+
];
|
|
11040
|
+
/** Steps whose box a root detection can BE. */
|
|
11041
|
+
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
11042
|
+
/**
|
|
11043
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
11044
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
11045
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
11046
|
+
* no camera tree carries.)
|
|
11047
|
+
*/
|
|
11048
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
11049
|
+
[
|
|
11050
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
11051
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
11052
|
+
...MASK_SUPPLY_STEP_IDS
|
|
11053
|
+
];
|
|
10487
11054
|
var MODEL_FORMATS = [
|
|
10488
11055
|
"onnx",
|
|
10489
11056
|
"coreml",
|
|
@@ -10512,7 +11079,53 @@ var ModelFormatEntrySchema = object({
|
|
|
10512
11079
|
/** Multi-file payload (directory members or sibling files). */
|
|
10513
11080
|
files: array(string()).readonly().optional(),
|
|
10514
11081
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
10515
|
-
runtimes: array(_enum(["python"])).readonly().optional()
|
|
11082
|
+
runtimes: array(_enum(["python"])).readonly().optional(),
|
|
11083
|
+
/**
|
|
11084
|
+
* Content revision of the artefact, for one hosted OFF the CamStack mirror.
|
|
11085
|
+
* A format on the mirror leaves it unset: its revision (the sha256 of its
|
|
11086
|
+
* weight file) comes from the downloader's generated table, kept in step
|
|
11087
|
+
* with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
|
|
11088
|
+
* node records the revision it downloaded next to the file
|
|
11089
|
+
* (`<file>.revision`); a copy with no record or a different one is stale
|
|
11090
|
+
* unless its weight file hashes to the revision, and a stale copy is
|
|
11091
|
+
* downloaded again, the old one serving until the new one is complete. No
|
|
11092
|
+
* revision at all ⇒ a file on disk is current, whatever it holds (D743).
|
|
11093
|
+
*/
|
|
11094
|
+
revision: string().min(1).optional()
|
|
11095
|
+
});
|
|
11096
|
+
/**
|
|
11097
|
+
* What a node holds for one (model, format) (D746). `current` is a complete
|
|
11098
|
+
* copy at its catalog revision — exactly what `downloaded: true` means.
|
|
11099
|
+
* `stale` is bytes on disk that are not (yet) proven current under D743/D744:
|
|
11100
|
+
* no or a different revision record, or a missing sibling. `missing` is no
|
|
11101
|
+
* copy. `downloaded` alone folds `stale` into "not downloaded", which hid
|
|
11102
|
+
* reclaimable bytes and a copy about to be replaced.
|
|
11103
|
+
*/
|
|
11104
|
+
var ModelOnDiskStateSchema = _enum([
|
|
11105
|
+
"current",
|
|
11106
|
+
"stale",
|
|
11107
|
+
"missing"
|
|
11108
|
+
]);
|
|
11109
|
+
/**
|
|
11110
|
+
* The numeric precision of one format's BUILD (D746) — reported only when the
|
|
11111
|
+
* build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
|
|
11112
|
+
* CamStack Core ML export). Absent means "not stated", never "fp32".
|
|
11113
|
+
*/
|
|
11114
|
+
var ModelFormatPrecisionSchema = _enum([
|
|
11115
|
+
"fp32",
|
|
11116
|
+
"fp16",
|
|
11117
|
+
"int8"
|
|
11118
|
+
]);
|
|
11119
|
+
/**
|
|
11120
|
+
* One format of one model as a node's `pipelineExecutor.getSchema` reports it.
|
|
11121
|
+
* `onDisk` / `precision` are optional for version skew: a runner that predates
|
|
11122
|
+
* them omits them, and a reader falls back to `downloaded`.
|
|
11123
|
+
*/
|
|
11124
|
+
var PipelineModelFormatStatusSchema = object({
|
|
11125
|
+
downloaded: boolean(),
|
|
11126
|
+
sizeMB: number(),
|
|
11127
|
+
onDisk: ModelOnDiskStateSchema.optional(),
|
|
11128
|
+
precision: ModelFormatPrecisionSchema.optional()
|
|
10516
11129
|
});
|
|
10517
11130
|
/**
|
|
10518
11131
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -10616,6 +11229,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
10616
11229
|
/** True when the weights or their data forbid commercial use. */
|
|
10617
11230
|
nonCommercial: boolean().optional()
|
|
10618
11231
|
}));
|
|
11232
|
+
/**
|
|
11233
|
+
* One step a ROOT detector can supply from its own output (D730) — see
|
|
11234
|
+
* `ModelCatalogEntry.suppliesSteps`.
|
|
11235
|
+
*
|
|
11236
|
+
* - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
|
|
11237
|
+
* the root's label to the step's vocabulary; `uncovered` is the vocabulary
|
|
11238
|
+
* the root cannot produce (shown as unavailable, never a blocker).
|
|
11239
|
+
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
11240
|
+
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
11241
|
+
* child of the `parentMacro` detection that contains it — never a track.
|
|
11242
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
11243
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
11244
|
+
* detection in the shape that step produces. Derived from the model's
|
|
11245
|
+
* postprocessor on read, never stored by an import.
|
|
11246
|
+
*/
|
|
11247
|
+
var RootStepSupplySchema = discriminatedUnion("kind", [
|
|
11248
|
+
object({
|
|
11249
|
+
kind: literal("label"),
|
|
11250
|
+
stepId: _enum(LABEL_SUPPLY_STEP_IDS),
|
|
11251
|
+
labelToEffect: record(string(), string()),
|
|
11252
|
+
uncovered: array(string()).readonly()
|
|
11253
|
+
}),
|
|
11254
|
+
object({
|
|
11255
|
+
kind: literal("crop"),
|
|
11256
|
+
stepId: _enum(CROP_SUPPLY_STEP_IDS),
|
|
11257
|
+
rootLabels: array(string()).readonly(),
|
|
11258
|
+
parentMacro: _enum(["vehicle", "person"]),
|
|
11259
|
+
childClass: _enum(["plate", "face"]),
|
|
11260
|
+
/**
|
|
11261
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
11262
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
11263
|
+
* stored by an import.
|
|
11264
|
+
*/
|
|
11265
|
+
rootInputPx: number().int().positive().optional()
|
|
11266
|
+
}),
|
|
11267
|
+
object({
|
|
11268
|
+
kind: literal("mask"),
|
|
11269
|
+
stepId: _enum(MASK_SUPPLY_STEP_IDS)
|
|
11270
|
+
})
|
|
11271
|
+
]);
|
|
10619
11272
|
var ModelCatalogEntrySchema = object({
|
|
10620
11273
|
id: string(),
|
|
10621
11274
|
name: string(),
|
|
@@ -10681,6 +11334,35 @@ var ModelCatalogEntrySchema = object({
|
|
|
10681
11334
|
*/
|
|
10682
11335
|
defaultConfidence: number().min(0).max(1).optional(),
|
|
10683
11336
|
/**
|
|
11337
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
11338
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
11339
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
11340
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
11341
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
11342
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
11343
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
11344
|
+
*/
|
|
11345
|
+
defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11346
|
+
/**
|
|
11347
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
11348
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
11349
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
11350
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
11351
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
11352
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
11353
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
11354
|
+
*/
|
|
11355
|
+
gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
|
|
11356
|
+
/**
|
|
11357
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
11358
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
11359
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
11360
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
11361
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
11362
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
11363
|
+
*/
|
|
11364
|
+
suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
|
|
11365
|
+
/**
|
|
10684
11366
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10685
11367
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10686
11368
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10742,6 +11424,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10742
11424
|
*/
|
|
10743
11425
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10744
11426
|
/**
|
|
11427
|
+
* The pipeline steps this ROOT detector can supply from its own output
|
|
11428
|
+
* (D730): its labels name a step's effect (`deer` for `animal-classifier`)
|
|
11429
|
+
* or draw a step's box (`license_plate` for `plate-detection`). Computed at
|
|
11430
|
+
* import from THIS model's labelmap by `deriveRootSupplies`, never written
|
|
11431
|
+
* by hand and never assumed per family; a row without it is derived on read
|
|
11432
|
+
* (`rootSuppliesOf`). Whether a camera uses it is the step's own
|
|
11433
|
+
* `useRootModel` flag (`resolveRootSupply`).
|
|
11434
|
+
*/
|
|
11435
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
|
|
11436
|
+
/**
|
|
10745
11437
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10746
11438
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
10747
11439
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -12343,13 +13035,6 @@ var BrokerRtspClientSchema = object({
|
|
|
12343
13035
|
lastRtpAt: number(),
|
|
12344
13036
|
bytesSent: number()
|
|
12345
13037
|
});
|
|
12346
|
-
var BrokerDecodedClientSchema = object({
|
|
12347
|
-
tag: string(),
|
|
12348
|
-
subscribedAt: number(),
|
|
12349
|
-
maxFps: number(),
|
|
12350
|
-
framesDelivered: number(),
|
|
12351
|
-
framesDropped: number()
|
|
12352
|
-
});
|
|
12353
13038
|
var BrokerAudioClientSchema = object({
|
|
12354
13039
|
tag: string(),
|
|
12355
13040
|
subscribedAt: number(),
|
|
@@ -12441,7 +13126,6 @@ var BrokerEncodedClientSchema = object({
|
|
|
12441
13126
|
});
|
|
12442
13127
|
var BrokerClientsSchema = object({
|
|
12443
13128
|
rtsp: array(BrokerRtspClientSchema).readonly(),
|
|
12444
|
-
decoded: array(BrokerDecodedClientSchema).readonly(),
|
|
12445
13129
|
audio: array(BrokerAudioClientSchema).readonly(),
|
|
12446
13130
|
encoded: array(BrokerEncodedClientSchema).readonly(),
|
|
12447
13131
|
pipeClients: number(),
|
|
@@ -12810,11 +13494,7 @@ method(object({
|
|
|
12810
13494
|
auth: "admin"
|
|
12811
13495
|
}), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
|
|
12812
13496
|
brokerId: string(),
|
|
12813
|
-
channel: _enum([
|
|
12814
|
-
"rtsp",
|
|
12815
|
-
"decoded",
|
|
12816
|
-
"audio"
|
|
12817
|
-
]),
|
|
13497
|
+
channel: _enum(["rtsp", "audio"]),
|
|
12818
13498
|
handle: string()
|
|
12819
13499
|
}), object({ killed: boolean() }), {
|
|
12820
13500
|
kind: "mutation",
|
|
@@ -12849,10 +13529,7 @@ method(object({
|
|
|
12849
13529
|
}), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
|
|
12850
13530
|
subscriptionId: string(),
|
|
12851
13531
|
maxCount: number().int().positive().default(8)
|
|
12852
|
-
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(
|
|
12853
|
-
subscriptionId: string(),
|
|
12854
|
-
maxCount: number().int().positive().default(4)
|
|
12855
|
-
}), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
13532
|
+
}), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
|
|
12856
13533
|
brokerId: string(),
|
|
12857
13534
|
seconds: number().min(0).max(30)
|
|
12858
13535
|
}), _void(), {
|
|
@@ -14010,53 +14687,201 @@ id: union([string(), number()]) }), {
|
|
|
14010
14687
|
auth: "admin"
|
|
14011
14688
|
});
|
|
14012
14689
|
/**
|
|
14013
|
-
*
|
|
14014
|
-
*
|
|
14015
|
-
*
|
|
14690
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
14691
|
+
*
|
|
14692
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
14693
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
14694
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
14695
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
14696
|
+
* against the CALLER, never against anything the caller claims.
|
|
14697
|
+
*
|
|
14698
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
14699
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14700
|
+
* connection, the agent from its child's connection carried in
|
|
14701
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
14702
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
14703
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
14704
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
14705
|
+
* runner is the same OS user): see the threat model in
|
|
14706
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
14707
|
+
*
|
|
14708
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
14709
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
14710
|
+
* floors every method to admin anyway (D240).
|
|
14711
|
+
*
|
|
14712
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
14016
14713
|
*/
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
})
|
|
14027
|
-
|
|
14714
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
14715
|
+
var KeychainUnavailableReasonSchema = _enum([
|
|
14716
|
+
"key-missing",
|
|
14717
|
+
"wrong-key",
|
|
14718
|
+
"key-file-unreadable",
|
|
14719
|
+
"store-unavailable",
|
|
14720
|
+
"not-initialized",
|
|
14721
|
+
"decrypt-failed"
|
|
14722
|
+
]);
|
|
14723
|
+
var KeychainStateSchema = discriminatedUnion("state", [object({ state: literal("ready") }), object({
|
|
14724
|
+
state: literal("locked"),
|
|
14725
|
+
reason: KeychainUnavailableReasonSchema
|
|
14726
|
+
})]);
|
|
14727
|
+
var KeychainResolveEntrySchema = discriminatedUnion("kind", [
|
|
14728
|
+
object({
|
|
14729
|
+
kind: literal("value"),
|
|
14730
|
+
value: string(),
|
|
14731
|
+
version: number().int()
|
|
14732
|
+
}),
|
|
14733
|
+
object({ kind: literal("missing") }),
|
|
14734
|
+
object({
|
|
14735
|
+
kind: literal("unavailable"),
|
|
14736
|
+
reason: KeychainUnavailableReasonSchema
|
|
14737
|
+
}),
|
|
14738
|
+
object({ kind: literal("forbidden") })
|
|
14739
|
+
]);
|
|
14740
|
+
var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
|
|
14741
|
+
/** Metadata of one stored value — never the value. */
|
|
14742
|
+
var KeychainSecretMetaSchema = object({
|
|
14743
|
+
ref: string(),
|
|
14744
|
+
owner: string(),
|
|
14745
|
+
/** Formatted scope (`global`, `node/<id>`, `device/<id>`, …). */
|
|
14746
|
+
scope: string(),
|
|
14747
|
+
fieldPath: string(),
|
|
14748
|
+
version: number().int(),
|
|
14749
|
+
createdAt: number(),
|
|
14750
|
+
updatedAt: number(),
|
|
14751
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14752
|
+
updatedBy: string(),
|
|
14753
|
+
/** Coarse — written at most once an hour per ref. `null` = never read. */
|
|
14754
|
+
lastReadAt: number().nullable()
|
|
14755
|
+
});
|
|
14756
|
+
var RefListSchema = array(string().min(1)).max(512);
|
|
14757
|
+
method(object({
|
|
14758
|
+
ref: string().min(1),
|
|
14759
|
+
value: string().min(1)
|
|
14760
|
+
}), object({
|
|
14761
|
+
ref: string(),
|
|
14762
|
+
version: number().int()
|
|
14763
|
+
}), {
|
|
14764
|
+
kind: "mutation",
|
|
14765
|
+
auth: "admin"
|
|
14766
|
+
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
14767
|
+
kind: "mutation",
|
|
14768
|
+
auth: "admin"
|
|
14769
|
+
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
14770
|
+
var KeychainKeySourceSchema = object({
|
|
14771
|
+
kind: _enum([
|
|
14772
|
+
"config-file",
|
|
14773
|
+
"previous-config-file",
|
|
14774
|
+
"platform",
|
|
14775
|
+
"default-file"
|
|
14776
|
+
]),
|
|
14777
|
+
/** File sources only — a path is not a secret. */
|
|
14778
|
+
path: string().optional(),
|
|
14779
|
+
/**
|
|
14780
|
+
* True when a whole-volume backup of the data directory carries this key
|
|
14781
|
+
* next to the database it protects (the default file). The page warns.
|
|
14782
|
+
*/
|
|
14783
|
+
sharesBackupWithDatabase: boolean()
|
|
14784
|
+
});
|
|
14785
|
+
var KeychainStatusSchema = object({
|
|
14786
|
+
keychain: KeychainStateSchema,
|
|
14787
|
+
/** The source of the master key in use; `null` while locked. */
|
|
14788
|
+
keySource: KeychainKeySourceSchema.nullable(),
|
|
14789
|
+
/** The source configured to be primary — differs from `keySource` while a rotation is pending. */
|
|
14790
|
+
configuredSource: KeychainKeySourceSchema,
|
|
14791
|
+
/** Short fingerprint of the master key in use (`HMAC(KEK, label)`, 16 hex). */
|
|
14792
|
+
fingerprint: string().nullable(),
|
|
14793
|
+
activeKeyId: string().nullable(),
|
|
14794
|
+
/**
|
|
14795
|
+
* The keychain unlocked with a NON-primary source: the configured primary
|
|
14796
|
+
* key is not the one that wraps the data key yet. `rotateMasterKey` moves it.
|
|
14797
|
+
*/
|
|
14798
|
+
rotationPending: boolean(),
|
|
14799
|
+
/** Wrapped copies of the data key under a previous master key, kept until purged. */
|
|
14800
|
+
retiredWraps: number().int(),
|
|
14801
|
+
recoveryKeyDownloadedAt: number().nullable(),
|
|
14802
|
+
secretCount: number().int()
|
|
14803
|
+
});
|
|
14804
|
+
/**
|
|
14805
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
14806
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
14807
|
+
* never reported as an orphan (and never deleted as one).
|
|
14808
|
+
*/
|
|
14809
|
+
var KeychainSecretUsageSchema = _enum([
|
|
14810
|
+
"in-use",
|
|
14811
|
+
"orphan",
|
|
14812
|
+
"unknown"
|
|
14813
|
+
]);
|
|
14814
|
+
var KeychainAdminSecretSchema = KeychainSecretMetaSchema.extend({ usage: KeychainSecretUsageSchema });
|
|
14815
|
+
var KeychainAuditActionSchema = _enum([
|
|
14816
|
+
"put",
|
|
14817
|
+
"delete",
|
|
14818
|
+
"reveal",
|
|
14819
|
+
"rotate-master-key",
|
|
14820
|
+
"purge-retired-keys",
|
|
14821
|
+
"download-recovery-key",
|
|
14822
|
+
"delete-orphans",
|
|
14823
|
+
"reset",
|
|
14824
|
+
"initialize"
|
|
14825
|
+
]);
|
|
14826
|
+
var KeychainAuditEntrySchema = object({
|
|
14827
|
+
id: string(),
|
|
14828
|
+
at: number(),
|
|
14829
|
+
action: KeychainAuditActionSchema,
|
|
14830
|
+
/** `addon:<id>` | `user:<id>` | `system`. */
|
|
14831
|
+
actor: string(),
|
|
14832
|
+
ref: string().nullable(),
|
|
14833
|
+
detail: string().nullable()
|
|
14834
|
+
});
|
|
14835
|
+
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({
|
|
14836
|
+
value: string(),
|
|
14837
|
+
version: number().int()
|
|
14838
|
+
}), {
|
|
14839
|
+
kind: "mutation",
|
|
14840
|
+
auth: "admin",
|
|
14841
|
+
caller: "required"
|
|
14842
|
+
}), method(object({ refs: array(string().min(1)).max(1e3) }), object({
|
|
14843
|
+
deleted: array(string()).readonly(),
|
|
14844
|
+
kept: array(object({
|
|
14845
|
+
ref: string(),
|
|
14846
|
+
usage: KeychainSecretUsageSchema
|
|
14847
|
+
})).readonly()
|
|
14848
|
+
}), {
|
|
14849
|
+
kind: "mutation",
|
|
14850
|
+
auth: "admin",
|
|
14851
|
+
caller: "required"
|
|
14852
|
+
}), method(object({}), object({
|
|
14853
|
+
fingerprint: string(),
|
|
14854
|
+
keySource: KeychainKeySourceSchema
|
|
14855
|
+
}), {
|
|
14856
|
+
kind: "mutation",
|
|
14857
|
+
auth: "admin",
|
|
14858
|
+
caller: "required"
|
|
14859
|
+
}), method(object({}), object({ purged: number().int() }), {
|
|
14860
|
+
kind: "mutation",
|
|
14861
|
+
auth: "admin",
|
|
14862
|
+
caller: "required"
|
|
14863
|
+
}), method(object({}), object({
|
|
14864
|
+
key: string(),
|
|
14865
|
+
fingerprint: string(),
|
|
14866
|
+
keySource: KeychainKeySourceSchema
|
|
14867
|
+
}), {
|
|
14868
|
+
kind: "mutation",
|
|
14869
|
+
auth: "admin",
|
|
14870
|
+
caller: "required"
|
|
14871
|
+
}), method(object({ confirm: literal("RESET KEYCHAIN") }), object({
|
|
14872
|
+
archivedCollection: string().nullable(),
|
|
14873
|
+
archived: number().int()
|
|
14874
|
+
}), {
|
|
14875
|
+
kind: "mutation",
|
|
14876
|
+
auth: "admin",
|
|
14877
|
+
caller: "required"
|
|
14878
|
+
});
|
|
14879
|
+
method(_void(), object({
|
|
14028
14880
|
id: string(),
|
|
14029
14881
|
name: string(),
|
|
14030
|
-
isPullMode: boolean().optional(),
|
|
14031
|
-
priority: number().optional(),
|
|
14032
14882
|
hwaccel: string().optional(),
|
|
14033
14883
|
probedBestHwaccel: string().optional()
|
|
14034
|
-
})), method(
|
|
14035
|
-
sessionId: string(),
|
|
14036
|
-
nodeId: string()
|
|
14037
|
-
})), method(object({ sessionId: string() }), _void()), method(object({
|
|
14038
|
-
sessionId: string(),
|
|
14039
|
-
packet: EncodedPacketSchema
|
|
14040
|
-
}), _void()), method(object({
|
|
14041
|
-
sessionId: string(),
|
|
14042
|
-
url: string()
|
|
14043
|
-
}), _void()), method(object({
|
|
14044
|
-
sessionId: string(),
|
|
14045
|
-
maxCount: number().default(1),
|
|
14046
|
-
waitMs: number().optional()
|
|
14047
|
-
}), array(DecodedFrameSchema)), method(object({
|
|
14048
|
-
sessionId: string(),
|
|
14049
|
-
maxCount: number().default(1),
|
|
14050
|
-
waitMs: number().optional()
|
|
14051
|
-
}), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
|
|
14052
|
-
sessionId: string(),
|
|
14053
|
-
config: DecoderSessionConfigSchema.partial()
|
|
14054
|
-
}), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
|
|
14055
|
-
sessionId: string(),
|
|
14056
|
-
codec: string(),
|
|
14057
|
-
outputFormat: string(),
|
|
14058
|
-
createdAtMs: number()
|
|
14059
|
-
})).readonly()), method(_void(), object({ backend: string() }), {
|
|
14884
|
+
})), method(_void(), object({ backend: string() }), {
|
|
14060
14885
|
kind: "mutation",
|
|
14061
14886
|
auth: "admin"
|
|
14062
14887
|
});
|
|
@@ -14868,6 +15693,10 @@ var DeviceInfoSchema = object({
|
|
|
14868
15693
|
isCamera: boolean(),
|
|
14869
15694
|
/** Current config values — serializable snapshot */
|
|
14870
15695
|
config: record(string(), unknown()),
|
|
15696
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
15697
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
15698
|
+
* when the owning runner has not reported them. */
|
|
15699
|
+
secretConfigPaths: array(string()).optional(),
|
|
14871
15700
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
14872
15701
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
14873
15702
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15073,12 +15902,22 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15073
15902
|
* call (workers re-register on init), so probe-driven updates
|
|
15074
15903
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15075
15904
|
features: array(string()).optional(),
|
|
15076
|
-
config: record(string(), unknown())
|
|
15905
|
+
config: record(string(), unknown()),
|
|
15906
|
+
/** Config paths the device's own schema DECLARES secret
|
|
15907
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
15908
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
15909
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
15910
|
+
* omits it and the keyword backstop applies. */
|
|
15911
|
+
secretConfigPaths: array(string()).optional()
|
|
15077
15912
|
});
|
|
15078
15913
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15079
15914
|
var DevicePersistConfigPayloadSchema = object({
|
|
15080
15915
|
deviceId: number(),
|
|
15081
|
-
data: record(string(), unknown())
|
|
15916
|
+
data: record(string(), unknown()),
|
|
15917
|
+
/** The paths the device's schema declares secret (D783), when the caller
|
|
15918
|
+
* knows them — those values are kept in the keychain, not the blob (D787).
|
|
15919
|
+
* Absent: the paths the device last reported at `registerDevice` apply. */
|
|
15920
|
+
secretConfigPaths: array(string()).optional()
|
|
15082
15921
|
});
|
|
15083
15922
|
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
15084
15923
|
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
@@ -15900,6 +16739,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
15900
16739
|
kind: "mutation",
|
|
15901
16740
|
auth: "admin"
|
|
15902
16741
|
});
|
|
16742
|
+
var HUB_ADDRESS_ROLES = [
|
|
16743
|
+
"appConnections",
|
|
16744
|
+
"notificationTaps",
|
|
16745
|
+
"internal",
|
|
16746
|
+
"publicEndpoint"
|
|
16747
|
+
];
|
|
15903
16748
|
/**
|
|
15904
16749
|
* Transport bounds for AI capability methods.
|
|
15905
16750
|
*
|
|
@@ -16726,7 +17571,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
16726
17571
|
icon: string().optional(),
|
|
16727
17572
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
16728
17573
|
startUrl: string(),
|
|
16729
|
-
stage: LoginStageEnum
|
|
17574
|
+
stage: LoginStageEnum,
|
|
17575
|
+
/**
|
|
17576
|
+
* The provider names an external identity a signed-in user can link to
|
|
17577
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17578
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17579
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17580
|
+
*/
|
|
17581
|
+
linkable: boolean().optional()
|
|
16730
17582
|
}),
|
|
16731
17583
|
object({
|
|
16732
17584
|
kind: literal("widget"),
|
|
@@ -18481,6 +19333,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18481
19333
|
"stream-offline",
|
|
18482
19334
|
"node-online",
|
|
18483
19335
|
"node-offline",
|
|
19336
|
+
"node-restarting",
|
|
19337
|
+
"node-updating",
|
|
18484
19338
|
"node-inference-unavailable",
|
|
18485
19339
|
"detection-blind",
|
|
18486
19340
|
"addon-crash-loop",
|
|
@@ -20086,7 +20940,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
20086
20940
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
20087
20941
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
20088
20942
|
*/
|
|
20089
|
-
notifySensorRewatched: boolean().optional()
|
|
20943
|
+
notifySensorRewatched: boolean().optional(),
|
|
20944
|
+
/**
|
|
20945
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
20946
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
20947
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
20948
|
+
*/
|
|
20949
|
+
notifySensorIgnored: boolean().optional()
|
|
20090
20950
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20091
20951
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20092
20952
|
mode: AlarmArmModeSchema,
|
|
@@ -20099,7 +20959,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
20099
20959
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20100
20960
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
20101
20961
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
20102
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
20962
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
20963
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
20964
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
20103
20965
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20104
20966
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20105
20967
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -21077,8 +21939,8 @@ Object.freeze(Object.fromEntries([{
|
|
|
21077
21939
|
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
21078
21940
|
stepId: "face-embedding",
|
|
21079
21941
|
key: "minLandmarkFaceSize",
|
|
21080
|
-
label: "Min face size
|
|
21081
|
-
description: "
|
|
21942
|
+
label: "Min face size to embed (detection-frame px)",
|
|
21943
|
+
description: "Faces smaller than this in the small frame the detector sees are not embedded, so they can never be recognised. Below it the face cannot be aligned reliably and a bad embedding matches everyone. Same value on every node. 0 = no limit.",
|
|
21082
21944
|
type: "slider",
|
|
21083
21945
|
min: 0,
|
|
21084
21946
|
max: 64,
|
|
@@ -22051,8 +22913,23 @@ var RetrainMacroClassSchema = _enum([
|
|
|
22051
22913
|
]);
|
|
22052
22914
|
/** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
|
|
22053
22915
|
var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
|
|
22054
|
-
/**
|
|
22055
|
-
|
|
22916
|
+
/**
|
|
22917
|
+
* Where a box came from. A machine-sourced box is a DRAFT on the page until
|
|
22918
|
+
* the operator confirms it; once saved it keeps its source as provenance.
|
|
22919
|
+
*
|
|
22920
|
+
* - `operator` — drawn by hand.
|
|
22921
|
+
* - `assist` — proposed by a detector run on the copy (the camera's own
|
|
22922
|
+
* model, or a larger teacher model).
|
|
22923
|
+
* - `pipeline` — the box the live pipeline actually drew on that frame, read
|
|
22924
|
+
* back from the track store (never a re-run).
|
|
22925
|
+
* - `llm` — proposed by a vision-capable LLM profile.
|
|
22926
|
+
*/
|
|
22927
|
+
var RetrainAnnotationSourceSchema = _enum([
|
|
22928
|
+
"operator",
|
|
22929
|
+
"assist",
|
|
22930
|
+
"pipeline",
|
|
22931
|
+
"llm"
|
|
22932
|
+
]);
|
|
22056
22933
|
/** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
|
|
22057
22934
|
var RetrainBboxSchema = object({
|
|
22058
22935
|
x: number(),
|
|
@@ -22070,7 +22947,8 @@ var RetrainBboxSchema = object({
|
|
|
22070
22947
|
*/
|
|
22071
22948
|
var RetrainAnnotationSchema = object({
|
|
22072
22949
|
id: string(),
|
|
22073
|
-
|
|
22950
|
+
/** The frame's track. Absent on a recording still, which has none. */
|
|
22951
|
+
trackId: string().optional(),
|
|
22074
22952
|
deviceId: number(),
|
|
22075
22953
|
/** The COPY in retrain storage — never the source track's media key. */
|
|
22076
22954
|
mediaKey: string(),
|
|
@@ -22119,18 +22997,63 @@ var RetrainFrameCandidateSchema = object({
|
|
|
22119
22997
|
* fail, whatever became of the original. */
|
|
22120
22998
|
copied: boolean()
|
|
22121
22999
|
});
|
|
23000
|
+
/**
|
|
23001
|
+
* One box the live pipeline drew on a copied frame — what a correction starts
|
|
23002
|
+
* from. Derived when the frame is listed, from the track store: the subject
|
|
23003
|
+
* box recorded on the source media row when there is one, else the track
|
|
23004
|
+
* position nearest the frame's capture time. Never stored as an annotation
|
|
23005
|
+
* until the operator confirms it.
|
|
23006
|
+
*/
|
|
23007
|
+
var RetrainPipelineBoxSchema = object({
|
|
23008
|
+
/** Normalised `[0,1]` against the full frame. */
|
|
23009
|
+
bbox: RetrainBboxSchema,
|
|
23010
|
+
macroClass: RetrainMacroClassSchema,
|
|
23011
|
+
label: string().optional(),
|
|
23012
|
+
subLabel: string().optional(),
|
|
23013
|
+
/** The detection score of the position used, when it was recorded. */
|
|
23014
|
+
score: number().optional(),
|
|
23015
|
+
/** The root model that produced the track, when it was recorded. */
|
|
23016
|
+
modelId: string().optional(),
|
|
23017
|
+
trackId: string(),
|
|
23018
|
+
/** `subject-box`: recorded on this very frame. `position`: the track's
|
|
23019
|
+
* position nearest the capture time, `deltaMs` away. */
|
|
23020
|
+
basis: _enum(["subject-box", "position"]),
|
|
23021
|
+
deltaMs: number()
|
|
23022
|
+
});
|
|
23023
|
+
/**
|
|
23024
|
+
* Where a retrain frame came from: a TRACK's stored media (copy-on-select),
|
|
23025
|
+
* or the RECORDING at an instant — the frame a model saw nothing in has no
|
|
23026
|
+
* track at all.
|
|
23027
|
+
*/
|
|
23028
|
+
var RetrainFrameOriginSchema = _enum(["track", "recording"]);
|
|
22122
23029
|
/** A frame the dataset OWNS: bytes copied at selection time. */
|
|
22123
23030
|
var RetrainFrameSchema = object({
|
|
22124
23031
|
frameId: string(),
|
|
22125
23032
|
deviceId: number(),
|
|
22126
|
-
|
|
22127
|
-
/**
|
|
22128
|
-
|
|
23033
|
+
origin: RetrainFrameOriginSchema,
|
|
23034
|
+
/** The track it was copied from. Absent on a recording still. */
|
|
23035
|
+
trackId: string().optional(),
|
|
23036
|
+
/** Provenance only. It may already point at nothing — that is expected.
|
|
23037
|
+
* Absent on a recording still. */
|
|
23038
|
+
sourceMediaId: number().int().optional(),
|
|
23039
|
+
/** A recording still: the playhead instant it was taken at. */
|
|
23040
|
+
epochMs: number().optional(),
|
|
22129
23041
|
sourceKind: MediaFileKindEnum,
|
|
22130
23042
|
sizeBytes: number().int(),
|
|
22131
23043
|
width: number().int(),
|
|
22132
23044
|
height: number().int(),
|
|
22133
|
-
copiedAt: number()
|
|
23045
|
+
copiedAt: number(),
|
|
23046
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
23047
|
+
capturedAt: number().optional(),
|
|
23048
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
23049
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
23050
|
+
* a false positive. */
|
|
23051
|
+
complete: boolean(),
|
|
23052
|
+
/** The boxes the pipeline drew on this frame. Present on list answers;
|
|
23053
|
+
* empty when nothing the track store holds can be placed on it. */
|
|
23054
|
+
pipelineBoxes: array(RetrainPipelineBoxSchema).readonly().optional(),
|
|
23055
|
+
/** The named collections this frame belongs to. Present on list answers. */
|
|
23056
|
+
collectionIds: array(string()).readonly().optional()
|
|
22134
23057
|
});
|
|
22135
23058
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22136
23059
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22151,6 +23074,53 @@ var RetrainFrameListSchema = object({
|
|
|
22151
23074
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22152
23075
|
autoPickMediaId: number().int().optional()
|
|
22153
23076
|
});
|
|
23077
|
+
/**
|
|
23078
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
23079
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
23080
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
23081
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
23082
|
+
* export carried (`exportedInBatch`).
|
|
23083
|
+
*/
|
|
23084
|
+
var RetrainExportFilterSchema = object({
|
|
23085
|
+
deviceIds: array(number()).optional(),
|
|
23086
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
23087
|
+
/** Only frames in at least one of these named collections. */
|
|
23088
|
+
collectionIds: array(string()).max(200).optional(),
|
|
23089
|
+
batchId: string().optional(),
|
|
23090
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
23091
|
+
completeOnly: boolean().optional()
|
|
23092
|
+
});
|
|
23093
|
+
/**
|
|
23094
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
23095
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
23096
|
+
* convention — the classifier layout.
|
|
23097
|
+
*/
|
|
23098
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
23099
|
+
/**
|
|
23100
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
23101
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
23102
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
23103
|
+
* logged.
|
|
23104
|
+
*/
|
|
23105
|
+
var RetrainArchiveTargetSchema = object({
|
|
23106
|
+
kind: literal("http"),
|
|
23107
|
+
method: _enum(["PUT", "POST"]),
|
|
23108
|
+
url: string().url(),
|
|
23109
|
+
headers: record(string(), string()).optional()
|
|
23110
|
+
});
|
|
23111
|
+
var RetrainArchiveResultSchema = object({
|
|
23112
|
+
batchId: string(),
|
|
23113
|
+
frames: number().int(),
|
|
23114
|
+
crops: number().int(),
|
|
23115
|
+
annotations: number().int(),
|
|
23116
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
23117
|
+
missing: number().int(),
|
|
23118
|
+
bytes: number().int(),
|
|
23119
|
+
/** sha256 of the exact bytes sent. */
|
|
23120
|
+
sha256: string(),
|
|
23121
|
+
/** The target's HTTP status. */
|
|
23122
|
+
status: number().int()
|
|
23123
|
+
});
|
|
22154
23124
|
/** What the operator asked the assist to look for. */
|
|
22155
23125
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22156
23126
|
kind: literal("package"),
|
|
@@ -22180,6 +23150,109 @@ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
|
|
|
22180
23150
|
reason: string(),
|
|
22181
23151
|
detail: string().optional()
|
|
22182
23152
|
})]);
|
|
23153
|
+
/** A named set over the retrain corpus — membership only, it owns no pixels. */
|
|
23154
|
+
var RetrainCollectionSchema = object({
|
|
23155
|
+
id: string(),
|
|
23156
|
+
name: string(),
|
|
23157
|
+
createdAt: number(),
|
|
23158
|
+
frameCount: number().int()
|
|
23159
|
+
});
|
|
23160
|
+
var RetrainCollectionCreateResultSchema = discriminatedUnion("kind", [object({
|
|
23161
|
+
kind: literal("created"),
|
|
23162
|
+
collection: RetrainCollectionSchema
|
|
23163
|
+
}), object({
|
|
23164
|
+
kind: literal("refused"),
|
|
23165
|
+
reason: _enum(["empty-name", "duplicate-name"])
|
|
23166
|
+
})]);
|
|
23167
|
+
var RetrainCollectionRenameResultSchema = discriminatedUnion("kind", [object({
|
|
23168
|
+
kind: literal("renamed"),
|
|
23169
|
+
collection: RetrainCollectionSchema
|
|
23170
|
+
}), object({
|
|
23171
|
+
kind: literal("refused"),
|
|
23172
|
+
reason: _enum([
|
|
23173
|
+
"empty-name",
|
|
23174
|
+
"duplicate-name",
|
|
23175
|
+
"unknown-collection"
|
|
23176
|
+
])
|
|
23177
|
+
})]);
|
|
23178
|
+
/**
|
|
23179
|
+
* The outcome of adding the frame at a recording instant. Every refusal is
|
|
23180
|
+
* named: `still-unavailable` (not recording, a gap, or an undecodable frame —
|
|
23181
|
+
* `detail` says which), `still-busy` (the recorder is at its decode bound; try
|
|
23182
|
+
* again), `unreadable-image`, `write-failed`, `unknown-collection`.
|
|
23183
|
+
*/
|
|
23184
|
+
var AddRetrainFrameFromRecordingResultSchema = discriminatedUnion("kind", [object({
|
|
23185
|
+
kind: literal("added"),
|
|
23186
|
+
collectionId: string(),
|
|
23187
|
+
frame: RetrainFrameSchema,
|
|
23188
|
+
/** The moment was already in the dataset; nothing was decoded. */
|
|
23189
|
+
reused: boolean()
|
|
23190
|
+
}), object({
|
|
23191
|
+
kind: literal("refused"),
|
|
23192
|
+
reason: _enum([
|
|
23193
|
+
"unknown-collection",
|
|
23194
|
+
"still-unavailable",
|
|
23195
|
+
"still-busy",
|
|
23196
|
+
"unreadable-image",
|
|
23197
|
+
"write-failed"
|
|
23198
|
+
]),
|
|
23199
|
+
detail: string().optional()
|
|
23200
|
+
})]);
|
|
23201
|
+
/** A vision LLM profile the AI assist may use, and where it sends the frame. */
|
|
23202
|
+
var RetrainAssistProfileSchema = object({
|
|
23203
|
+
id: string(),
|
|
23204
|
+
name: string(),
|
|
23205
|
+
model: string(),
|
|
23206
|
+
kind: string(),
|
|
23207
|
+
/** `true` when the frame would leave the house (a cloud vendor, or an
|
|
23208
|
+
* endpoint that is not on the local network). The page confirms each such
|
|
23209
|
+
* run, and the provider refuses one without `allowCloud`. */
|
|
23210
|
+
leavesHouse: boolean()
|
|
23211
|
+
});
|
|
23212
|
+
/** A box the AI assist proposed: a draft, plus the model's own reason. */
|
|
23213
|
+
var RetrainLlmProposalSchema = RetrainAnnotationDraftSchema.extend({ reason: string() });
|
|
23214
|
+
/** What the AI assist said about a box that was already on the canvas. */
|
|
23215
|
+
var RetrainLlmReviewSchema = object({
|
|
23216
|
+
/** The `ref` the page sent the box under. */
|
|
23217
|
+
ref: string(),
|
|
23218
|
+
verdict: _enum([
|
|
23219
|
+
"confirmed",
|
|
23220
|
+
"wrong-class",
|
|
23221
|
+
"not-an-object",
|
|
23222
|
+
"uncertain"
|
|
23223
|
+
]),
|
|
23224
|
+
suggestedClass: RetrainMacroClassSchema.optional(),
|
|
23225
|
+
reason: string()
|
|
23226
|
+
});
|
|
23227
|
+
/**
|
|
23228
|
+
* The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
|
|
23229
|
+
* model and its confidence) and reviews; items the model got wrong (a box off
|
|
23230
|
+
* the frame, an unasked class, an unknown ref) are dropped and counted in
|
|
23231
|
+
* `rejected`. A whole answer that is not the schema is `malformed-answer`.
|
|
23232
|
+
*/
|
|
23233
|
+
var RetrainLlmAssistResultSchema = discriminatedUnion("kind", [object({
|
|
23234
|
+
kind: literal("proposed"),
|
|
23235
|
+
profileId: string(),
|
|
23236
|
+
model: string(),
|
|
23237
|
+
/** The frame was sent outside the house for this answer. */
|
|
23238
|
+
leftHouse: boolean(),
|
|
23239
|
+
proposals: array(RetrainLlmProposalSchema).readonly(),
|
|
23240
|
+
reviews: array(RetrainLlmReviewSchema).readonly(),
|
|
23241
|
+
rejected: number().int()
|
|
23242
|
+
}), object({
|
|
23243
|
+
kind: literal("refused"),
|
|
23244
|
+
reason: _enum([
|
|
23245
|
+
"unknown-frame",
|
|
23246
|
+
"unreadable-frame",
|
|
23247
|
+
"unknown-profile",
|
|
23248
|
+
"profile-disabled",
|
|
23249
|
+
"no-vision",
|
|
23250
|
+
"cloud-not-confirmed",
|
|
23251
|
+
"llm-error",
|
|
23252
|
+
"malformed-answer"
|
|
23253
|
+
]),
|
|
23254
|
+
detail: string().optional()
|
|
23255
|
+
})]);
|
|
22183
23256
|
/** The outcome of a lifecycle move owned by the retrain page. */
|
|
22184
23257
|
var RetrainTransitionResultSchema = object({
|
|
22185
23258
|
trackId: string(),
|
|
@@ -22897,7 +23970,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22897
23970
|
auth: "admin"
|
|
22898
23971
|
}), method(object({
|
|
22899
23972
|
deviceId: number(),
|
|
22900
|
-
trackId: string(),
|
|
23973
|
+
trackId: string().optional(),
|
|
22901
23974
|
frameId: string()
|
|
22902
23975
|
}), object({
|
|
22903
23976
|
removed: boolean(),
|
|
@@ -22914,7 +23987,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22914
23987
|
auth: "admin"
|
|
22915
23988
|
}), method(object({
|
|
22916
23989
|
deviceId: number(),
|
|
22917
|
-
|
|
23990
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
23991
|
+
trackId: string().optional(),
|
|
22918
23992
|
frameId: string(),
|
|
22919
23993
|
subject: RetrainAssistSubjectSchema,
|
|
22920
23994
|
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
@@ -22922,12 +23996,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22922
23996
|
}), RetrainAssistResultSchema, {
|
|
22923
23997
|
kind: "mutation",
|
|
22924
23998
|
auth: "admin"
|
|
22925
|
-
}), method(object({
|
|
23999
|
+
}), method(object({
|
|
24000
|
+
trackId: string().optional(),
|
|
24001
|
+
frameIds: array(string()).max(2e3).optional()
|
|
24002
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
22926
24003
|
kind: "query",
|
|
22927
24004
|
auth: "admin"
|
|
22928
24005
|
}), method(object({
|
|
22929
24006
|
deviceId: number(),
|
|
22930
|
-
|
|
24007
|
+
/** The frame's track, when it has one — checked against the frame. */
|
|
24008
|
+
trackId: string().optional(),
|
|
22931
24009
|
frameId: string(),
|
|
22932
24010
|
annotations: array(RetrainAnnotationDraftSchema)
|
|
22933
24011
|
}), array(RetrainAnnotationSchema).readonly(), {
|
|
@@ -22945,7 +24023,91 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22945
24023
|
}), RetrainTransitionResultSchema, {
|
|
22946
24024
|
kind: "mutation",
|
|
22947
24025
|
auth: "admin"
|
|
22948
|
-
}), method(
|
|
24026
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
24027
|
+
kind: "query",
|
|
24028
|
+
auth: "admin"
|
|
24029
|
+
}), method(object({
|
|
24030
|
+
deviceId: number(),
|
|
24031
|
+
trackId: string().optional(),
|
|
24032
|
+
frameId: string(),
|
|
24033
|
+
complete: boolean()
|
|
24034
|
+
}), RetrainFrameSchema, {
|
|
24035
|
+
kind: "mutation",
|
|
24036
|
+
auth: "admin"
|
|
24037
|
+
}), method(object({
|
|
24038
|
+
filter: RetrainExportFilterSchema,
|
|
24039
|
+
layout: RetrainExportLayoutSchema,
|
|
24040
|
+
target: RetrainArchiveTargetSchema
|
|
24041
|
+
}), RetrainArchiveResultSchema, {
|
|
24042
|
+
kind: "mutation",
|
|
24043
|
+
auth: "admin",
|
|
24044
|
+
timeoutMs: 60 * 6e4
|
|
24045
|
+
}), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
|
|
24046
|
+
kind: "query",
|
|
24047
|
+
auth: "admin"
|
|
24048
|
+
}), method(object({
|
|
24049
|
+
deviceId: number(),
|
|
24050
|
+
trackId: string().optional(),
|
|
24051
|
+
frameId: string(),
|
|
24052
|
+
profileId: string(),
|
|
24053
|
+
classes: array(RetrainMacroClassSchema).min(1),
|
|
24054
|
+
boxes: array(object({
|
|
24055
|
+
ref: string(),
|
|
24056
|
+
bbox: RetrainBboxSchema,
|
|
24057
|
+
macroClass: RetrainMacroClassSchema,
|
|
24058
|
+
label: string().optional()
|
|
24059
|
+
})).max(50),
|
|
24060
|
+
allowCloud: boolean()
|
|
24061
|
+
}), RetrainLlmAssistResultSchema, {
|
|
24062
|
+
kind: "mutation",
|
|
24063
|
+
auth: "admin",
|
|
24064
|
+
timeoutMs: 18e4
|
|
24065
|
+
}), method(object({ name: string().max(120) }), RetrainCollectionCreateResultSchema, {
|
|
24066
|
+
kind: "mutation",
|
|
24067
|
+
auth: "admin"
|
|
24068
|
+
}), method(object({}), array(RetrainCollectionSchema).readonly(), {
|
|
24069
|
+
kind: "query",
|
|
24070
|
+
auth: "admin"
|
|
24071
|
+
}), method(object({
|
|
24072
|
+
id: string(),
|
|
24073
|
+
name: string().max(120)
|
|
24074
|
+
}), RetrainCollectionRenameResultSchema, {
|
|
24075
|
+
kind: "mutation",
|
|
24076
|
+
auth: "admin"
|
|
24077
|
+
}), method(object({ id: string() }), object({
|
|
24078
|
+
deleted: boolean(),
|
|
24079
|
+
removedFrames: number().int()
|
|
24080
|
+
}), {
|
|
24081
|
+
kind: "mutation",
|
|
24082
|
+
auth: "admin"
|
|
24083
|
+
}), method(object({
|
|
24084
|
+
collectionId: string(),
|
|
24085
|
+
deviceId: number(),
|
|
24086
|
+
epochMs: number()
|
|
24087
|
+
}), AddRetrainFrameFromRecordingResultSchema, {
|
|
24088
|
+
kind: "mutation",
|
|
24089
|
+
auth: "admin",
|
|
24090
|
+
timeoutMs: 6e4
|
|
24091
|
+
}), method(object({
|
|
24092
|
+
collectionId: string(),
|
|
24093
|
+
frameIds: array(string()).min(1).max(500)
|
|
24094
|
+
}), object({
|
|
24095
|
+
added: number().int(),
|
|
24096
|
+
alreadyMember: number().int(),
|
|
24097
|
+
unknownFrameIds: array(string()).readonly()
|
|
24098
|
+
}), {
|
|
24099
|
+
kind: "mutation",
|
|
24100
|
+
auth: "admin"
|
|
24101
|
+
}), method(object({
|
|
24102
|
+
collectionId: string(),
|
|
24103
|
+
frameId: string()
|
|
24104
|
+
}), object({
|
|
24105
|
+
removed: boolean(),
|
|
24106
|
+
deletedFrame: boolean()
|
|
24107
|
+
}), {
|
|
24108
|
+
kind: "mutation",
|
|
24109
|
+
auth: "admin"
|
|
24110
|
+
}), method(object({ collectionId: string() }), array(RetrainFrameSchema).readonly(), {
|
|
22949
24111
|
kind: "query",
|
|
22950
24112
|
auth: "admin"
|
|
22951
24113
|
}), method(object({
|
|
@@ -22998,6 +24160,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22998
24160
|
timestamp: number()
|
|
22999
24161
|
});
|
|
23000
24162
|
/**
|
|
24163
|
+
* A root model's boxes standing in for one crop-kind step's own inference
|
|
24164
|
+
* (D730) — see `runPipeline.suppliedRoot`.
|
|
24165
|
+
*/
|
|
24166
|
+
var SuppliedRootOutputSchema = object({
|
|
24167
|
+
stepId: string(),
|
|
24168
|
+
/** The root model that drew the boxes — stamped on the result. */
|
|
24169
|
+
modelId: string(),
|
|
24170
|
+
detections: array(object({
|
|
24171
|
+
/** `[x1, y1, x2, y2]` in the pixels of the call's image. */
|
|
24172
|
+
bbox: tuple([
|
|
24173
|
+
number(),
|
|
24174
|
+
number(),
|
|
24175
|
+
number(),
|
|
24176
|
+
number()
|
|
24177
|
+
]),
|
|
24178
|
+
score: number(),
|
|
24179
|
+
/**
|
|
24180
|
+
* Five facial landmarks in the same pixels — a face the step's own
|
|
24181
|
+
* detector already re-found inside a root face box (D730), so its
|
|
24182
|
+
* embedder child aligns it exactly as it aligns any detected face.
|
|
24183
|
+
*/
|
|
24184
|
+
landmarks: array(object({
|
|
24185
|
+
x: number(),
|
|
24186
|
+
y: number()
|
|
24187
|
+
})).optional()
|
|
24188
|
+
})).min(1)
|
|
24189
|
+
});
|
|
24190
|
+
/**
|
|
23001
24191
|
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
23002
24192
|
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
23003
24193
|
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
@@ -23045,7 +24235,7 @@ var FrameRefSchema = object({
|
|
|
23045
24235
|
timestamp: number(),
|
|
23046
24236
|
capturedAt: number().optional()
|
|
23047
24237
|
});
|
|
23048
|
-
var ModelFormatSchema$
|
|
24238
|
+
var ModelFormatSchema$2 = _enum([
|
|
23049
24239
|
"onnx",
|
|
23050
24240
|
"coreml",
|
|
23051
24241
|
"openvino",
|
|
@@ -23063,7 +24253,7 @@ var PipelineSlotSchema = _enum([
|
|
|
23063
24253
|
var PipelineEngineChoiceSchema = object({
|
|
23064
24254
|
runtime: literal("python"),
|
|
23065
24255
|
backend: string(),
|
|
23066
|
-
format: ModelFormatSchema$
|
|
24256
|
+
format: ModelFormatSchema$2,
|
|
23067
24257
|
device: string().optional()
|
|
23068
24258
|
});
|
|
23069
24259
|
/**
|
|
@@ -23102,32 +24292,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
23102
24292
|
group: string().optional(),
|
|
23103
24293
|
settings: record(string(), unknown()).optional()
|
|
23104
24294
|
}));
|
|
23105
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
23106
|
-
addonId: string(),
|
|
23107
|
-
enabled: boolean(),
|
|
23108
|
-
modelId: string(),
|
|
23109
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
23110
|
-
settings: record(string(), unknown()).optional()
|
|
23111
|
-
}));
|
|
23112
|
-
var PipelineTemplateSchema$1 = object({
|
|
23113
|
-
id: string(),
|
|
23114
|
-
name: string(),
|
|
23115
|
-
createdAt: string(),
|
|
23116
|
-
updatedAt: string(),
|
|
23117
|
-
engine: PipelineEngineChoiceSchema,
|
|
23118
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
23119
|
-
});
|
|
23120
24295
|
var PipelineModelOptionSchema = object({
|
|
23121
24296
|
id: string(),
|
|
23122
24297
|
name: string(),
|
|
23123
|
-
formats: record(string(),
|
|
23124
|
-
downloaded: boolean(),
|
|
23125
|
-
sizeMB: number()
|
|
23126
|
-
})),
|
|
24298
|
+
formats: record(string(), PipelineModelFormatStatusSchema),
|
|
23127
24299
|
group: ModelVariantGroupSchema.optional(),
|
|
23128
24300
|
legacy: boolean().optional(),
|
|
23129
24301
|
provider: ModelProviderIdSchema.optional(),
|
|
23130
|
-
defaultConfidence: number().optional()
|
|
24302
|
+
defaultConfidence: number().optional(),
|
|
24303
|
+
suppliesSteps: array(RootStepSupplySchema).readonly().optional()
|
|
23131
24304
|
});
|
|
23132
24305
|
var ConfigFieldBridge = custom();
|
|
23133
24306
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -23289,6 +24462,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23289
24462
|
}), {
|
|
23290
24463
|
kind: "mutation",
|
|
23291
24464
|
auth: "admin"
|
|
24465
|
+
}), method(object({
|
|
24466
|
+
nodeId: string(),
|
|
24467
|
+
deviceIds: array(number()).readonly().optional(),
|
|
24468
|
+
dryRun: boolean()
|
|
24469
|
+
}), object({
|
|
24470
|
+
entries: array(object({
|
|
24471
|
+
deviceId: number(),
|
|
24472
|
+
keys: array(string()).readonly()
|
|
24473
|
+
})).readonly(),
|
|
24474
|
+
refused: array(object({
|
|
24475
|
+
deviceId: number(),
|
|
24476
|
+
reason: string()
|
|
24477
|
+
})).readonly()
|
|
24478
|
+
}), {
|
|
24479
|
+
kind: "mutation",
|
|
24480
|
+
auth: "admin"
|
|
23292
24481
|
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
23293
24482
|
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
23294
24483
|
deviceKey: string(),
|
|
@@ -23314,22 +24503,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23314
24503
|
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
23315
24504
|
steps: array(PipelineStepInputSchema),
|
|
23316
24505
|
deviceKey: string().optional()
|
|
23317
|
-
}), PipelineValidationResultSchema), method(_void(),
|
|
23318
|
-
name: string(),
|
|
23319
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
23320
|
-
engine: PipelineEngineChoiceSchema
|
|
23321
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
23322
|
-
id: string(),
|
|
23323
|
-
name: string().optional(),
|
|
23324
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
23325
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
24506
|
+
}), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
23326
24507
|
addonId: string(),
|
|
23327
24508
|
modelId: string(),
|
|
23328
|
-
format: ModelFormatSchema$
|
|
24509
|
+
format: ModelFormatSchema$2
|
|
23329
24510
|
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
23330
24511
|
addonId: string(),
|
|
23331
24512
|
modelId: string(),
|
|
23332
|
-
format: ModelFormatSchema$
|
|
24513
|
+
format: ModelFormatSchema$2
|
|
23333
24514
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
23334
24515
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23335
24516
|
frame: FrameInputSchema.optional(),
|
|
@@ -23395,7 +24576,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23395
24576
|
* `device-not-servable`), and nothing reaches the camera's live
|
|
23396
24577
|
* trace stream. Absent ⇒ unchanged behaviour.
|
|
23397
24578
|
*/
|
|
23398
|
-
replay: literal(true).optional()
|
|
24579
|
+
replay: literal(true).optional(),
|
|
24580
|
+
/**
|
|
24581
|
+
* Root-supplied detections for the tree's ROOT step (D730). Set by
|
|
24582
|
+
* `runDetailSubtree` when the camera's root model supplies a crop-kind
|
|
24583
|
+
* step (a Frigate+ `license_plate` for `plate-detection`): the step is
|
|
24584
|
+
* NOT inferred, these boxes are its output, and its children (the plate
|
|
24585
|
+
* reader) run on them through their own crop policy. Boxes are in the
|
|
24586
|
+
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
24587
|
+
*/
|
|
24588
|
+
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
23399
24589
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
23400
24590
|
steps: array(PipelineStepInputSchema).min(1),
|
|
23401
24591
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -23477,6 +24667,763 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
23477
24667
|
filename: string().optional(),
|
|
23478
24668
|
settings: record(string(), unknown()).optional()
|
|
23479
24669
|
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
24670
|
+
/**
|
|
24671
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
24672
|
+
* `pipeline-orchestrator` cap. The recommender's own types
|
|
24673
|
+
* (`recommend.ts`) are the TS face of the same data; these
|
|
24674
|
+
* schemas are what crosses the cap boundary.
|
|
24675
|
+
*/
|
|
24676
|
+
var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
|
|
24677
|
+
/** The operator's range for it. */
|
|
24678
|
+
var MIN_SESSIONS_PER_DEVICE_RANGE = {
|
|
24679
|
+
min: 1,
|
|
24680
|
+
max: 8
|
|
24681
|
+
};
|
|
24682
|
+
var HardwareClassIdSchema = _enum([
|
|
24683
|
+
"intel-core-ultra",
|
|
24684
|
+
"intel-n-series",
|
|
24685
|
+
"apple-m-base",
|
|
24686
|
+
"apple-m-pro",
|
|
24687
|
+
"unknown"
|
|
24688
|
+
]);
|
|
24689
|
+
var AcceleratorKindSchema = _enum([
|
|
24690
|
+
"intel-npu",
|
|
24691
|
+
"intel-igpu",
|
|
24692
|
+
"x86-cpu",
|
|
24693
|
+
"arm-cpu",
|
|
24694
|
+
"apple-ane",
|
|
24695
|
+
"coral"
|
|
24696
|
+
]);
|
|
24697
|
+
var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
24698
|
+
object({
|
|
24699
|
+
kind: literal("capacity"),
|
|
24700
|
+
sessions: number(),
|
|
24701
|
+
minSessions: number()
|
|
24702
|
+
}),
|
|
24703
|
+
object({
|
|
24704
|
+
kind: literal("tie-faster"),
|
|
24705
|
+
over: string(),
|
|
24706
|
+
recallDelta: number()
|
|
24707
|
+
}),
|
|
24708
|
+
object({
|
|
24709
|
+
kind: literal("stepped-down"),
|
|
24710
|
+
from: string(),
|
|
24711
|
+
to: string(),
|
|
24712
|
+
limitedBy: string()
|
|
24713
|
+
}),
|
|
24714
|
+
object({
|
|
24715
|
+
kind: literal("no-fit-lightest"),
|
|
24716
|
+
sessions: number(),
|
|
24717
|
+
minSessions: number()
|
|
24718
|
+
}),
|
|
24719
|
+
object({
|
|
24720
|
+
kind: literal("derived-latency"),
|
|
24721
|
+
modelId: string()
|
|
24722
|
+
}),
|
|
24723
|
+
object({ kind: literal("cpu-device") }),
|
|
24724
|
+
object({ kind: literal("coral-untouched") }),
|
|
24725
|
+
object({ kind: literal("device-disabled") }),
|
|
24726
|
+
object({ kind: literal("device-unavailable") }),
|
|
24727
|
+
object({ kind: literal("node-offline") }),
|
|
24728
|
+
object({ kind: literal("no-hardware-facts") }),
|
|
24729
|
+
object({
|
|
24730
|
+
kind: literal("no-measured-data"),
|
|
24731
|
+
hardwareClass: HardwareClassIdSchema
|
|
24732
|
+
}),
|
|
24733
|
+
object({
|
|
24734
|
+
kind: literal("no-family-build"),
|
|
24735
|
+
format: ModelFormatSchema$1
|
|
24736
|
+
}),
|
|
24737
|
+
object({
|
|
24738
|
+
kind: literal("kept-custom-pin"),
|
|
24739
|
+
modelId: string(),
|
|
24740
|
+
deviceKey: string()
|
|
24741
|
+
})
|
|
24742
|
+
]);
|
|
24743
|
+
/** Why a device is left exactly as it is, whatever the plan would pick (D786). */
|
|
24744
|
+
var KeptReasonSchema = _enum(["custom-pin"]);
|
|
24745
|
+
/**
|
|
24746
|
+
* Where a choice's latency came from (D791): this node's own benchmark
|
|
24747
|
+
* result, or the hardware-class table. Measured on the node beats the table.
|
|
24748
|
+
*/
|
|
24749
|
+
var LatencySourceSchema = discriminatedUnion("kind", [object({ kind: literal("table") }), object({
|
|
24750
|
+
kind: literal("node-benchmark"),
|
|
24751
|
+
resultId: string(),
|
|
24752
|
+
measuredAtMs: number()
|
|
24753
|
+
})]);
|
|
24754
|
+
var DeviceModelChoiceSchema = object({
|
|
24755
|
+
modelId: string(),
|
|
24756
|
+
p50Ms: number(),
|
|
24757
|
+
fps: number(),
|
|
24758
|
+
measured: boolean(),
|
|
24759
|
+
/** Absent on a plan from before D791 — read as the table. */
|
|
24760
|
+
source: LatencySourceSchema.optional(),
|
|
24761
|
+
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
24762
|
+
capacitySessions: number(),
|
|
24763
|
+
personRecall: number()
|
|
24764
|
+
});
|
|
24765
|
+
var DeviceRecommendationSchema = object({
|
|
24766
|
+
deviceKey: string(),
|
|
24767
|
+
accelerator: AcceleratorKindSchema.nullable(),
|
|
24768
|
+
enabled: boolean(),
|
|
24769
|
+
available: boolean(),
|
|
24770
|
+
chosen: DeviceModelChoiceSchema.nullable(),
|
|
24771
|
+
/** Present when the device is kept as is: Apply writes nothing on it. */
|
|
24772
|
+
kept: KeptReasonSchema.optional(),
|
|
24773
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24774
|
+
});
|
|
24775
|
+
var NodeRecommendationSchema = object({
|
|
24776
|
+
nodeId: string(),
|
|
24777
|
+
reachable: boolean(),
|
|
24778
|
+
hardwareClass: HardwareClassIdSchema.nullable(),
|
|
24779
|
+
cpuModel: string().nullable(),
|
|
24780
|
+
skipped: boolean(),
|
|
24781
|
+
acceleratorModelId: string().nullable(),
|
|
24782
|
+
devices: array(DeviceRecommendationSchema).readonly(),
|
|
24783
|
+
reasons: array(RecommendationReasonSchema).readonly()
|
|
24784
|
+
});
|
|
24785
|
+
var ModelPinChangeSchema = object({
|
|
24786
|
+
stepId: string(),
|
|
24787
|
+
before: string().nullable(),
|
|
24788
|
+
after: string().nullable()
|
|
24789
|
+
});
|
|
24790
|
+
var NodeDeviceChangeSchema = object({
|
|
24791
|
+
nodeId: string(),
|
|
24792
|
+
deviceKey: string(),
|
|
24793
|
+
madeExplicit: boolean(),
|
|
24794
|
+
modelPins: array(ModelPinChangeSchema).readonly(),
|
|
24795
|
+
thresholds: array(object({
|
|
24796
|
+
stepId: string(),
|
|
24797
|
+
keys: array(string()).readonly()
|
|
24798
|
+
})).readonly()
|
|
24799
|
+
});
|
|
24800
|
+
var CameraOverrideClearSchema = object({
|
|
24801
|
+
deviceId: number(),
|
|
24802
|
+
source: _enum(["step-override", "wholesale"]),
|
|
24803
|
+
nodeId: string(),
|
|
24804
|
+
deviceKey: string().nullable(),
|
|
24805
|
+
stepId: string(),
|
|
24806
|
+
modelIdBefore: string().nullable(),
|
|
24807
|
+
keys: array(string()).readonly()
|
|
24808
|
+
});
|
|
24809
|
+
var DetectorStoreClearSchema = object({
|
|
24810
|
+
deviceId: number(),
|
|
24811
|
+
keys: array(string()).readonly()
|
|
24812
|
+
});
|
|
24813
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
24814
|
+
object({
|
|
24815
|
+
kind: literal("detector-store-cluster-wide"),
|
|
24816
|
+
skippedNodes: array(string()).readonly()
|
|
24817
|
+
}),
|
|
24818
|
+
object({
|
|
24819
|
+
kind: literal("detector-store-unreadable"),
|
|
24820
|
+
error: string()
|
|
24821
|
+
}),
|
|
24822
|
+
object({
|
|
24823
|
+
kind: literal("coral-enabled"),
|
|
24824
|
+
nodeId: string(),
|
|
24825
|
+
deviceKey: string()
|
|
24826
|
+
}),
|
|
24827
|
+
object({
|
|
24828
|
+
kind: literal("custom-pin-kept"),
|
|
24829
|
+
nodeId: string(),
|
|
24830
|
+
deviceKey: string().nullable(),
|
|
24831
|
+
deviceId: number().nullable(),
|
|
24832
|
+
modelId: string()
|
|
24833
|
+
}),
|
|
24834
|
+
object({
|
|
24835
|
+
kind: literal("custom-registry-unreadable"),
|
|
24836
|
+
error: string()
|
|
24837
|
+
})
|
|
24838
|
+
]);
|
|
24839
|
+
var AutoTuneOptionsSchema = object({
|
|
24840
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
24841
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24842
|
+
/**
|
|
24843
|
+
* The least number of parallel sessions every device must sustain at the
|
|
24844
|
+
* camera rate with the headroom kept free (D755). The most accurate model
|
|
24845
|
+
* that reaches it wins.
|
|
24846
|
+
*/
|
|
24847
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24848
|
+
});
|
|
24849
|
+
var AutoTunePlanSchema = object({
|
|
24850
|
+
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
24851
|
+
planHash: string(),
|
|
24852
|
+
family: literal("yolov9"),
|
|
24853
|
+
headroom: number(),
|
|
24854
|
+
minSessionsPerDevice: number(),
|
|
24855
|
+
/** The detection rate a session is counted at (the fastest camera running the pipeline root). */
|
|
24856
|
+
cameraFps: number(),
|
|
24857
|
+
generatedAt: number(),
|
|
24858
|
+
nodes: array(NodeRecommendationSchema).readonly(),
|
|
24859
|
+
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
24860
|
+
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
24861
|
+
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
24862
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
24863
|
+
});
|
|
24864
|
+
var AutoTuneApplyInputSchema = object({
|
|
24865
|
+
planHash: string(),
|
|
24866
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24867
|
+
minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
|
|
24868
|
+
});
|
|
24869
|
+
var AutoTunePhaseResultSchema = object({
|
|
24870
|
+
phase: _enum([
|
|
24871
|
+
"download",
|
|
24872
|
+
"camera-overrides",
|
|
24873
|
+
"detector-thresholds",
|
|
24874
|
+
"node-models",
|
|
24875
|
+
"redispatch"
|
|
24876
|
+
]),
|
|
24877
|
+
ok: boolean(),
|
|
24878
|
+
detail: string()
|
|
24879
|
+
});
|
|
24880
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
24881
|
+
object({
|
|
24882
|
+
kind: literal("applied"),
|
|
24883
|
+
planHash: string(),
|
|
24884
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24885
|
+
}),
|
|
24886
|
+
object({
|
|
24887
|
+
kind: literal("aborted"),
|
|
24888
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
24889
|
+
}),
|
|
24890
|
+
object({
|
|
24891
|
+
kind: literal("stale"),
|
|
24892
|
+
plan: AutoTunePlanSchema
|
|
24893
|
+
}),
|
|
24894
|
+
object({
|
|
24895
|
+
kind: literal("refused"),
|
|
24896
|
+
reason: _enum(["apply-in-progress"])
|
|
24897
|
+
})
|
|
24898
|
+
]);
|
|
24899
|
+
/**
|
|
24900
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
24901
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
24902
|
+
* hardware share suggestion and the stale device pins.
|
|
24903
|
+
*/
|
|
24904
|
+
/**
|
|
24905
|
+
* How a new detection session picks its node and device.
|
|
24906
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
24907
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
24908
|
+
* weight only bites once a node already holds a session.
|
|
24909
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
24910
|
+
* full or drowning node yields to a free one (D748).
|
|
24911
|
+
*/
|
|
24912
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
24913
|
+
var LoadBalancingSharesInputSchema = object({
|
|
24914
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
24915
|
+
nodes: record(string(), number().positive()).default({}),
|
|
24916
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
24917
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
24918
|
+
});
|
|
24919
|
+
var PlacementStatsInputSchema = object({
|
|
24920
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
24921
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
24922
|
+
var PlacementDeviceStatsSchema = object({
|
|
24923
|
+
deviceKey: string(),
|
|
24924
|
+
/** Sessions running on this device now. */
|
|
24925
|
+
sessionsNow: number(),
|
|
24926
|
+
/** Sessions started on this device inside the window. */
|
|
24927
|
+
sessionsStarted: number(),
|
|
24928
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
24929
|
+
observedShare: number().nullable()
|
|
24930
|
+
});
|
|
24931
|
+
var PlacementNodeStatsSchema = object({
|
|
24932
|
+
nodeId: string(),
|
|
24933
|
+
sessionsNow: number(),
|
|
24934
|
+
sessionsStarted: number(),
|
|
24935
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
24936
|
+
observedShare: number().nullable(),
|
|
24937
|
+
/** Most sessions this node ran at once inside the window. */
|
|
24938
|
+
peakSessions: number(),
|
|
24939
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
24940
|
+
yieldsAway: number(),
|
|
24941
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
24942
|
+
});
|
|
24943
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
24944
|
+
var StaleDevicePinSchema = object({
|
|
24945
|
+
deviceId: number(),
|
|
24946
|
+
deviceKey: string(),
|
|
24947
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
24948
|
+
reason: _enum(["disabled", "absent"])
|
|
24949
|
+
});
|
|
24950
|
+
var PlacementStatsSchema = object({
|
|
24951
|
+
policy: SessionPlacementPolicySchema,
|
|
24952
|
+
windowMs: number(),
|
|
24953
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
24954
|
+
observedForMs: number(),
|
|
24955
|
+
sessionsNow: number(),
|
|
24956
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
24957
|
+
clusterPeakSessions: number(),
|
|
24958
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
24959
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
24960
|
+
});
|
|
24961
|
+
/**
|
|
24962
|
+
* Where an automatic share's capacity comes from (D755).
|
|
24963
|
+
* - `hardware` — the static capacity of each device at its Auto tune model:
|
|
24964
|
+
* the measured latency table for the node's hardware class.
|
|
24965
|
+
* - `benchmark` — the node's own measured capacity (node benchmark results).
|
|
24966
|
+
* A node with no results falls back to `hardware`, and says so.
|
|
24967
|
+
*/
|
|
24968
|
+
var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
|
|
24969
|
+
/** Why a node under the `benchmark` source was sized from hardware instead. */
|
|
24970
|
+
var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
|
|
24971
|
+
var SuggestSharesInputSchema = object({
|
|
24972
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
24973
|
+
/** Default `hardware`. */
|
|
24974
|
+
source: CapacitySourceSchema.default("hardware")
|
|
24975
|
+
});
|
|
24976
|
+
var SuggestedDeviceShareSchema = object({
|
|
24977
|
+
deviceKey: string(),
|
|
24978
|
+
/** Share of the node (0–100, rounded). */
|
|
24979
|
+
share: number(),
|
|
24980
|
+
modelId: string().nullable(),
|
|
24981
|
+
/** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
|
|
24982
|
+
fps: number().nullable(),
|
|
24983
|
+
/** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
|
|
24984
|
+
measured: boolean(),
|
|
24985
|
+
/**
|
|
24986
|
+
* Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
|
|
24987
|
+
* or the benchmark's measured max sessions. Never enforced.
|
|
24988
|
+
*/
|
|
24989
|
+
suggestedMaxSessions: number().nullable()
|
|
24990
|
+
});
|
|
24991
|
+
var SuggestedNodeShareSchema = object({
|
|
24992
|
+
nodeId: string(),
|
|
24993
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
24994
|
+
share: number().nullable(),
|
|
24995
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
24996
|
+
capacitySessions: number(),
|
|
24997
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
24998
|
+
skippedReason: string().nullable(),
|
|
24999
|
+
/** What this node's capacity was read from; null when the node is skipped. */
|
|
25000
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25001
|
+
/** Set when the `benchmark` source was asked for and this node used `hardware`. */
|
|
25002
|
+
capacityFallback: CapacityFallbackSchema.nullable()
|
|
25003
|
+
});
|
|
25004
|
+
var SuggestSharesResultSchema = object({
|
|
25005
|
+
headroom: number(),
|
|
25006
|
+
/** The source asked for; each node says what it actually used. */
|
|
25007
|
+
source: CapacitySourceSchema,
|
|
25008
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
25009
|
+
cameraFps: number(),
|
|
25010
|
+
/** The Auto tune capacity floor the models were picked at. */
|
|
25011
|
+
minSessionsPerDevice: number(),
|
|
25012
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
25013
|
+
});
|
|
25014
|
+
/**
|
|
25015
|
+
* Where the node and device shares come from (D750, D755, D791).
|
|
25016
|
+
* - `benchmark` (default since D791) — each node's capacity as its own node
|
|
25017
|
+
* benchmark measured it; a node without fresh results is sized from
|
|
25018
|
+
* `hardware` and says so. Measured on the node beats the table.
|
|
25019
|
+
* - `hardware` — computed from each node's static capacity only (its
|
|
25020
|
+
* accelerators at their Auto tune models, from the latency table).
|
|
25021
|
+
* Both are recomputed whenever a node or device joins, leaves, is switched
|
|
25022
|
+
* on or off, changes model, or a benchmark result is written. No load input.
|
|
25023
|
+
* - `manual` — the operator's stored sliders.
|
|
25024
|
+
* Either way a node or device that cannot take sessions gives its share to
|
|
25025
|
+
* the others in proportion; the stored values are never rewritten for that.
|
|
25026
|
+
*/
|
|
25027
|
+
var ShareSourceSchema = _enum([
|
|
25028
|
+
"hardware",
|
|
25029
|
+
"benchmark",
|
|
25030
|
+
"manual"
|
|
25031
|
+
]);
|
|
25032
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
25033
|
+
object({
|
|
25034
|
+
nodes: record(string(), number()),
|
|
25035
|
+
devices: record(string(), record(string(), number()))
|
|
25036
|
+
});
|
|
25037
|
+
var EffectiveDeviceShareSchema = object({
|
|
25038
|
+
deviceKey: string(),
|
|
25039
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
25040
|
+
eligible: boolean(),
|
|
25041
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
25042
|
+
configuredPct: number(),
|
|
25043
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
25044
|
+
effectivePct: number()
|
|
25045
|
+
});
|
|
25046
|
+
var EffectiveNodeShareSchema = object({
|
|
25047
|
+
nodeId: string(),
|
|
25048
|
+
eligible: boolean(),
|
|
25049
|
+
configuredPct: number(),
|
|
25050
|
+
effectivePct: number(),
|
|
25051
|
+
/** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
|
|
25052
|
+
capacitySource: CapacitySourceSchema.nullable(),
|
|
25053
|
+
/** Automatic `benchmark`: why this node used `hardware` instead. */
|
|
25054
|
+
capacityFallback: CapacityFallbackSchema.nullable(),
|
|
25055
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
25056
|
+
});
|
|
25057
|
+
var EffectiveSharesSchema = object({
|
|
25058
|
+
source: ShareSourceSchema,
|
|
25059
|
+
policy: SessionPlacementPolicySchema,
|
|
25060
|
+
/** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
|
|
25061
|
+
autoPending: boolean(),
|
|
25062
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
25063
|
+
computedAt: number().nullable(),
|
|
25064
|
+
/** What made the system recompute them last. */
|
|
25065
|
+
trigger: string().nullable(),
|
|
25066
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
25067
|
+
/** The relative weights the election reads (before eligibility). */
|
|
25068
|
+
nodeWeights: record(string(), number()),
|
|
25069
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
25070
|
+
});
|
|
25071
|
+
/**
|
|
25072
|
+
* Wire shapes of the node benchmark (D791): the operator's plan, the
|
|
25073
|
+
* preflight the confirmation shows, the run the orchestrator owns, what the
|
|
25074
|
+
* measuring runner reports, and the result rows Auto tune and the automatic
|
|
25075
|
+
* shares read.
|
|
25076
|
+
*
|
|
25077
|
+
* ONE node at a time, owned by the pipeline orchestrator. While a run is
|
|
25078
|
+
* active the cluster is in BENCHMARK MODE for that node: it is not a
|
|
25079
|
+
* detection candidate, camera pins naming it are ignored so its sessions move
|
|
25080
|
+
* elsewhere, and both come back when the mode ends — after a crash or a hub
|
|
25081
|
+
* restart too (a persisted manifest, reconciled against the registry).
|
|
25082
|
+
*
|
|
25083
|
+
* Two measurements, both on the node, driven by its own runner (frames never
|
|
25084
|
+
* cross a process at frame rate, D9):
|
|
25085
|
+
* - `device` — one accelerator × one candidate detector, root only, open
|
|
25086
|
+
* loop: how many streams at the camera rate it carries inside the frame
|
|
25087
|
+
* interval;
|
|
25088
|
+
* - `pipeline` — the chosen detector plus the operator's detail steps
|
|
25089
|
+
* (faces, plates, classifiers, CLIP…), on varied frames from the bench
|
|
25090
|
+
* clip: how many parallel sessions the node carries before latency, drops,
|
|
25091
|
+
* CPU, RAM or the event loop give out.
|
|
25092
|
+
*/
|
|
25093
|
+
/** Defaults and bounds, one place. */
|
|
25094
|
+
var NODE_BENCHMARK_DEFAULTS = {
|
|
25095
|
+
fpsPerStream: 10,
|
|
25096
|
+
budgetMinutes: 45,
|
|
25097
|
+
minBudgetMinutes: 10,
|
|
25098
|
+
maxBudgetMinutes: 120,
|
|
25099
|
+
/** A result older than this no longer beats the table. */
|
|
25100
|
+
staleAfterDays: 30,
|
|
25101
|
+
/** Warm-in per ramp step (not accounted). */
|
|
25102
|
+
settleSec: 5,
|
|
25103
|
+
/** Accounted window per ramp step. */
|
|
25104
|
+
measureSec: 20,
|
|
25105
|
+
/** Longest the drain may take before the run is refused. */
|
|
25106
|
+
drainTimeoutSec: 120,
|
|
25107
|
+
/** Candidate models per device in one run. */
|
|
25108
|
+
maxModelsPerDevice: 6
|
|
25109
|
+
};
|
|
25110
|
+
/** The two measurements a run can make. */
|
|
25111
|
+
var NodeBenchmarkPhaseSchema = _enum(["device", "pipeline"]);
|
|
25112
|
+
var NodeBenchmarkDevicePlanSchema = object({
|
|
25113
|
+
/** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
|
|
25114
|
+
deviceKey: string().min(1),
|
|
25115
|
+
/**
|
|
25116
|
+
* Root detector candidates for the `device` measurement, in the order
|
|
25117
|
+
* measured. The FIRST is the one the `pipeline` measurement runs.
|
|
25118
|
+
*/
|
|
25119
|
+
modelIds: array(string().min(1)).min(1).max(NODE_BENCHMARK_DEFAULTS.maxModelsPerDevice)
|
|
25120
|
+
});
|
|
25121
|
+
/** What the operator confirmed. */
|
|
25122
|
+
var NodeBenchmarkPlanSchema = object({
|
|
25123
|
+
nodeId: string().min(1),
|
|
25124
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25125
|
+
/** Which measurements run. At least one. */
|
|
25126
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
|
|
25127
|
+
/**
|
|
25128
|
+
* Detail steps (catalog step ids under the root: faces, plates,
|
|
25129
|
+
* classifiers, CLIP…) the `pipeline` measurement enables. The root
|
|
25130
|
+
* detector always runs.
|
|
25131
|
+
*/
|
|
25132
|
+
steps: array(string().min(1)).default([]),
|
|
25133
|
+
/** Offered rate of one stream / session. */
|
|
25134
|
+
fpsPerStream: number().int().min(1).max(30).default(NODE_BENCHMARK_DEFAULTS.fpsPerStream),
|
|
25135
|
+
/** Hard deadline: the mode ends and the cluster is restored when it passes. */
|
|
25136
|
+
budgetMinutes: number().int().min(NODE_BENCHMARK_DEFAULTS.minBudgetMinutes).max(NODE_BENCHMARK_DEFAULTS.maxBudgetMinutes).default(NODE_BENCHMARK_DEFAULTS.budgetMinutes),
|
|
25137
|
+
/** Keep the models the run downloaded (default: delete what was not installed before). */
|
|
25138
|
+
keepDownloadedModels: boolean().default(false),
|
|
25139
|
+
/** Start although the other nodes' capacity does not cover the sessions running now. */
|
|
25140
|
+
acceptInsufficientHeadroom: boolean().default(false)
|
|
25141
|
+
});
|
|
25142
|
+
var NodeBenchmarkRefusalSchema = object({
|
|
25143
|
+
kind: _enum([
|
|
25144
|
+
"benchmark-active",
|
|
25145
|
+
"node-offline",
|
|
25146
|
+
"unknown-device",
|
|
25147
|
+
"no-phase",
|
|
25148
|
+
"insufficient-headroom"
|
|
25149
|
+
]),
|
|
25150
|
+
detail: string(),
|
|
25151
|
+
overridable: boolean()
|
|
25152
|
+
});
|
|
25153
|
+
/** A camera whose detection leaves the node for the run. */
|
|
25154
|
+
var NodeBenchmarkMovingCameraSchema = object({
|
|
25155
|
+
deviceId: number(),
|
|
25156
|
+
/** Placed on the node now (a standing attach or a running session). */
|
|
25157
|
+
placedOnNode: boolean(),
|
|
25158
|
+
/** A node pin naming this node, ignored for the run. */
|
|
25159
|
+
pinnedToNode: boolean()
|
|
25160
|
+
});
|
|
25161
|
+
/** A camera that cannot leave: no other node can obtain its frames. */
|
|
25162
|
+
var NodeBenchmarkStayingCameraSchema = object({
|
|
25163
|
+
deviceId: number(),
|
|
25164
|
+
reason: literal("only-frame-source")
|
|
25165
|
+
});
|
|
25166
|
+
var NodeBenchmarkPreflightSchema = object({
|
|
25167
|
+
nodeId: string(),
|
|
25168
|
+
online: boolean(),
|
|
25169
|
+
moving: array(NodeBenchmarkMovingCameraSchema).readonly(),
|
|
25170
|
+
/** Keep running on the node during the run; the result is flagged contaminated. */
|
|
25171
|
+
staying: array(NodeBenchmarkStayingCameraSchema).readonly(),
|
|
25172
|
+
estimatedDurationMs: number(),
|
|
25173
|
+
/** The run ends and the cluster is restored at the latest after this long. */
|
|
25174
|
+
budgetMs: number(),
|
|
25175
|
+
phases: array(NodeBenchmarkPhaseSchema).readonly(),
|
|
25176
|
+
steps: array(string()).readonly(),
|
|
25177
|
+
devices: array(NodeBenchmarkDevicePlanSchema).readonly(),
|
|
25178
|
+
/** Parallel sessions the cluster runs now, and what the other nodes can carry. */
|
|
25179
|
+
headroom: object({
|
|
25180
|
+
sessionsNow: number(),
|
|
25181
|
+
otherNodesCapacitySessions: number().nullable()
|
|
25182
|
+
}),
|
|
25183
|
+
refusals: array(NodeBenchmarkRefusalSchema).readonly(),
|
|
25184
|
+
canStart: boolean()
|
|
25185
|
+
});
|
|
25186
|
+
/** Where the measuring runner is. */
|
|
25187
|
+
var NodeBenchProgressSchema = object({
|
|
25188
|
+
phase: _enum([
|
|
25189
|
+
"preparing",
|
|
25190
|
+
"device",
|
|
25191
|
+
"pipeline",
|
|
25192
|
+
"cleanup"
|
|
25193
|
+
]),
|
|
25194
|
+
deviceKey: string().nullable(),
|
|
25195
|
+
modelId: string().nullable(),
|
|
25196
|
+
/** Streams (device) or sessions (pipeline) of the step running now. */
|
|
25197
|
+
load: number().nullable(),
|
|
25198
|
+
cellsDone: number(),
|
|
25199
|
+
cellsTotal: number(),
|
|
25200
|
+
message: string()
|
|
25201
|
+
});
|
|
25202
|
+
/** What limited a ramp. `none` = the ramp ran out of steps still passing. */
|
|
25203
|
+
var NodeBenchLimitSchema = _enum([
|
|
25204
|
+
"p95",
|
|
25205
|
+
"drops",
|
|
25206
|
+
"errors",
|
|
25207
|
+
"stall",
|
|
25208
|
+
"cpu",
|
|
25209
|
+
"ram",
|
|
25210
|
+
"none"
|
|
25211
|
+
]);
|
|
25212
|
+
var NodeBenchRampStepSchema = object({
|
|
25213
|
+
load: number(),
|
|
25214
|
+
pass: boolean(),
|
|
25215
|
+
p95Ms: number(),
|
|
25216
|
+
dropRatio: number(),
|
|
25217
|
+
/** Completed frames per second over the accounted window. */
|
|
25218
|
+
fps: number(),
|
|
25219
|
+
cpuPct: number().nullable(),
|
|
25220
|
+
ramFreePct: number().nullable(),
|
|
25221
|
+
failReasons: array(string()).readonly()
|
|
25222
|
+
});
|
|
25223
|
+
var NodeBenchCellSchema = discriminatedUnion("phase", [object({
|
|
25224
|
+
phase: literal("device"),
|
|
25225
|
+
deviceKey: string(),
|
|
25226
|
+
modelId: string(),
|
|
25227
|
+
/** Single-stream latency (the K = 1 step). */
|
|
25228
|
+
p50Ms: number(),
|
|
25229
|
+
p95Ms: number(),
|
|
25230
|
+
p99Ms: number(),
|
|
25231
|
+
/** Frames per second sustained at the last passing step. */
|
|
25232
|
+
fps: number(),
|
|
25233
|
+
/** Streams at the camera rate the device carried inside the frame interval; 0 = not even one. */
|
|
25234
|
+
kMax: number(),
|
|
25235
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25236
|
+
/** First call (model load + warm-up). */
|
|
25237
|
+
warmupMs: number(),
|
|
25238
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25239
|
+
}), object({
|
|
25240
|
+
phase: literal("pipeline"),
|
|
25241
|
+
deviceKey: string(),
|
|
25242
|
+
modelId: string(),
|
|
25243
|
+
steps: array(string()).readonly(),
|
|
25244
|
+
/** Parallel sessions at the camera rate the node carried; 0 = not even one. */
|
|
25245
|
+
maxSessions: number(),
|
|
25246
|
+
limitedBy: NodeBenchLimitSchema,
|
|
25247
|
+
/** Detail steps that produced at least one result on the clip — a step that never fired measured nothing. */
|
|
25248
|
+
stepsFired: array(string()).readonly(),
|
|
25249
|
+
warmupMs: number(),
|
|
25250
|
+
ramp: array(NodeBenchRampStepSchema).readonly()
|
|
25251
|
+
})]);
|
|
25252
|
+
/**
|
|
25253
|
+
* What a result was measured ON. A result whose fingerprint no longer matches
|
|
25254
|
+
* the node no longer beats the table.
|
|
25255
|
+
*/
|
|
25256
|
+
var NodeBenchFingerprintSchema = object({
|
|
25257
|
+
pipelineVersion: string().nullable(),
|
|
25258
|
+
cpuModel: string().nullable(),
|
|
25259
|
+
ramGb: number().nullable(),
|
|
25260
|
+
os: string().nullable(),
|
|
25261
|
+
/** Per device: the pool the cells ran on (runtime + tuning). */
|
|
25262
|
+
pools: record(string(), object({
|
|
25263
|
+
runtime: string(),
|
|
25264
|
+
numWorkers: number(),
|
|
25265
|
+
concurrency: number(),
|
|
25266
|
+
batchMode: string()
|
|
25267
|
+
})).default({})
|
|
25268
|
+
});
|
|
25269
|
+
/** The frames the run used. */
|
|
25270
|
+
var NodeBenchClipSchema = object({
|
|
25271
|
+
/** `camstack-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
25272
|
+
id: string(),
|
|
25273
|
+
revision: string().nullable(),
|
|
25274
|
+
frames: number(),
|
|
25275
|
+
width: number(),
|
|
25276
|
+
height: number()
|
|
25277
|
+
});
|
|
25278
|
+
var NodeBenchRunnerInputSchema = object({
|
|
25279
|
+
runId: string().min(1),
|
|
25280
|
+
devices: array(NodeBenchmarkDevicePlanSchema).min(1),
|
|
25281
|
+
phases: array(NodeBenchmarkPhaseSchema).min(1),
|
|
25282
|
+
/** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
|
|
25283
|
+
steps: array(string()).default([]),
|
|
25284
|
+
fpsPerStream: number().int().min(1).max(30),
|
|
25285
|
+
/** The runner stops on its own past this instant, whatever the hub does. */
|
|
25286
|
+
deadlineAtMs: number(),
|
|
25287
|
+
settleSec: number().min(0).max(60).default(NODE_BENCHMARK_DEFAULTS.settleSec),
|
|
25288
|
+
measureSec: number().min(2).max(300).default(NODE_BENCHMARK_DEFAULTS.measureSec),
|
|
25289
|
+
keepDownloadedModels: boolean().default(false)
|
|
25290
|
+
});
|
|
25291
|
+
var NodeBenchRunnerStateSchema = _enum([
|
|
25292
|
+
"running",
|
|
25293
|
+
"done",
|
|
25294
|
+
"failed",
|
|
25295
|
+
"aborted"
|
|
25296
|
+
]);
|
|
25297
|
+
var NodeBenchRunnerStatusSchema = object({
|
|
25298
|
+
runId: string(),
|
|
25299
|
+
nodeId: string(),
|
|
25300
|
+
state: NodeBenchRunnerStateSchema,
|
|
25301
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25302
|
+
/** Every finished cell so far — a run stopped half way keeps what it measured. */
|
|
25303
|
+
cells: array(NodeBenchCellSchema).readonly(),
|
|
25304
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25305
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25306
|
+
/** Cameras seen running on the node during the run (they share its pools). */
|
|
25307
|
+
activeCameraIds: array(number()).readonly(),
|
|
25308
|
+
/** Models the run downloaded and then deleted (not installed before). */
|
|
25309
|
+
deletedModels: array(string()).readonly(),
|
|
25310
|
+
error: string().nullable(),
|
|
25311
|
+
startedAtMs: number(),
|
|
25312
|
+
finishedAtMs: number().nullable()
|
|
25313
|
+
});
|
|
25314
|
+
var NodeBenchmarkStateSchema = _enum([
|
|
25315
|
+
"draining",
|
|
25316
|
+
"measuring",
|
|
25317
|
+
"restoring",
|
|
25318
|
+
"done",
|
|
25319
|
+
"failed",
|
|
25320
|
+
"aborted"
|
|
25321
|
+
]);
|
|
25322
|
+
/** Why a run ended. */
|
|
25323
|
+
var NodeBenchmarkEndReasonSchema = _enum([
|
|
25324
|
+
"completed",
|
|
25325
|
+
"operator-abort",
|
|
25326
|
+
"deadline",
|
|
25327
|
+
"node-lost",
|
|
25328
|
+
"runner-lost",
|
|
25329
|
+
"hub-restart",
|
|
25330
|
+
"drain-timeout",
|
|
25331
|
+
"failed"
|
|
25332
|
+
]);
|
|
25333
|
+
var NodeBenchmarkRunSchema = object({
|
|
25334
|
+
runId: string(),
|
|
25335
|
+
nodeId: string(),
|
|
25336
|
+
state: NodeBenchmarkStateSchema,
|
|
25337
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25338
|
+
startedAtMs: number(),
|
|
25339
|
+
deadlineAtMs: number(),
|
|
25340
|
+
finishedAtMs: number().nullable(),
|
|
25341
|
+
endReason: NodeBenchmarkEndReasonSchema.nullable(),
|
|
25342
|
+
error: string().nullable(),
|
|
25343
|
+
/** Cameras moved off the node for the run. */
|
|
25344
|
+
moved: array(number()).readonly(),
|
|
25345
|
+
/** Cameras that stayed (their only frame source is the node). */
|
|
25346
|
+
staying: array(number()).readonly(),
|
|
25347
|
+
/** Something else ran on the node's pools during the run. */
|
|
25348
|
+
contaminated: boolean(),
|
|
25349
|
+
progress: NodeBenchProgressSchema.nullable(),
|
|
25350
|
+
resultIds: array(string()).readonly()
|
|
25351
|
+
});
|
|
25352
|
+
/** `getNodeBenchmarkStatus`: the active run (or the last one), and whether benchmark mode is on. */
|
|
25353
|
+
var NodeBenchmarkStatusSchema = object({
|
|
25354
|
+
/** The node the cluster is in benchmark mode for; null = none. */
|
|
25355
|
+
modeNodeId: string().nullable(),
|
|
25356
|
+
run: NodeBenchmarkRunSchema.nullable()
|
|
25357
|
+
});
|
|
25358
|
+
/**
|
|
25359
|
+
* One stored measurement — the only authority Auto tune and the automatic
|
|
25360
|
+
* shares read measured capacity from. Written by the orchestrator when a run
|
|
25361
|
+
* ends, never by anyone else.
|
|
25362
|
+
*/
|
|
25363
|
+
var NodeBenchmarkResultSchema = object({
|
|
25364
|
+
id: string(),
|
|
25365
|
+
runId: string(),
|
|
25366
|
+
nodeId: string(),
|
|
25367
|
+
cell: NodeBenchCellSchema,
|
|
25368
|
+
fpsPerStream: number(),
|
|
25369
|
+
fingerprint: NodeBenchFingerprintSchema.nullable(),
|
|
25370
|
+
clip: NodeBenchClipSchema.nullable(),
|
|
25371
|
+
/** Other work shared the node's pools (a camera that could not move, or the hub's own duties). */
|
|
25372
|
+
contaminated: boolean(),
|
|
25373
|
+
stayingCameras: array(number()).readonly(),
|
|
25374
|
+
/** The run ended early; the cell itself completed. */
|
|
25375
|
+
partialRun: boolean(),
|
|
25376
|
+
measuredAtMs: number()
|
|
25377
|
+
});
|
|
25378
|
+
var ListNodeBenchmarkResultsInputSchema = object({
|
|
25379
|
+
nodeId: string().optional(),
|
|
25380
|
+
deviceKey: string().optional()
|
|
25381
|
+
});
|
|
25382
|
+
/** A result with its standing today: does it still beat the table? */
|
|
25383
|
+
var NodeBenchmarkResultViewSchema = NodeBenchmarkResultSchema.extend({
|
|
25384
|
+
/** `fresh` beats the table; `stale` falls back to it; `superseded` = a newer row covers the same cell. */
|
|
25385
|
+
standing: _enum([
|
|
25386
|
+
"fresh",
|
|
25387
|
+
"stale",
|
|
25388
|
+
"superseded"
|
|
25389
|
+
]),
|
|
25390
|
+
staleWhy: _enum([
|
|
25391
|
+
"age",
|
|
25392
|
+
"runtime",
|
|
25393
|
+
"pool-tuning"
|
|
25394
|
+
]).nullable()
|
|
25395
|
+
});
|
|
25396
|
+
object({
|
|
25397
|
+
runId: string(),
|
|
25398
|
+
nodeId: string(),
|
|
25399
|
+
startedAtMs: number(),
|
|
25400
|
+
deadlineAtMs: number(),
|
|
25401
|
+
plan: NodeBenchmarkPlanSchema,
|
|
25402
|
+
moved: array(number()).readonly(),
|
|
25403
|
+
staying: array(number()).readonly()
|
|
25404
|
+
});
|
|
25405
|
+
/** Candidate detectors per device, for the plan editor. */
|
|
25406
|
+
var NodeBenchmarkCandidatesSchema = object({
|
|
25407
|
+
nodeId: string(),
|
|
25408
|
+
reachable: boolean(),
|
|
25409
|
+
devices: array(object({
|
|
25410
|
+
deviceKey: string(),
|
|
25411
|
+
enabled: boolean(),
|
|
25412
|
+
available: boolean(),
|
|
25413
|
+
/** Ordered: what Auto tune would pick first, then the rest of the family by accuracy. */
|
|
25414
|
+
suggested: array(string()).readonly(),
|
|
25415
|
+
/** Every root detector the device has a build for. */
|
|
25416
|
+
all: array(string()).readonly(),
|
|
25417
|
+
/** The model the device runs now, when pinned. */
|
|
25418
|
+
currentModelId: string().nullable()
|
|
25419
|
+
})).readonly(),
|
|
25420
|
+
/** Detail steps the node's catalog offers under the root (for the `pipeline` measurement). */
|
|
25421
|
+
steps: array(object({
|
|
25422
|
+
id: string(),
|
|
25423
|
+
name: string(),
|
|
25424
|
+
slot: string()
|
|
25425
|
+
})).readonly()
|
|
25426
|
+
});
|
|
23480
25427
|
object({
|
|
23481
25428
|
activeCameras: number(),
|
|
23482
25429
|
throttledCameras: number(),
|
|
@@ -24354,14 +26301,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24354
26301
|
* Per-inference-device live load (multi-device C4). One entry per deviceKey
|
|
24355
26302
|
* this runner currently has attached cameras on, so the orchestrator's second
|
|
24356
26303
|
* `balance()` pass (over a node's devices) weights on real per-pool session
|
|
24357
|
-
* counts. Empty on single-device / pre-multi-device runners.
|
|
24358
|
-
* per
|
|
26304
|
+
* counts. Empty on single-device / pre-multi-device runners. There is no
|
|
26305
|
+
* per-device queue depth: the inference pool's backlog has no accessor, and
|
|
26306
|
+
* a field that always read 0 was removed rather than shown as a measurement
|
|
26307
|
+
* (D762).
|
|
24359
26308
|
*/
|
|
24360
26309
|
devices: array(object({
|
|
24361
26310
|
deviceKey: string(),
|
|
24362
26311
|
backend: string(),
|
|
24363
|
-
attachedCameras: number()
|
|
24364
|
-
queueDepthTotal: number()
|
|
26312
|
+
attachedCameras: number()
|
|
24365
26313
|
})).default([]),
|
|
24366
26314
|
/** Hardware capability flags reported by this node. */
|
|
24367
26315
|
hardware: object({
|
|
@@ -24497,7 +26445,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24497
26445
|
*/
|
|
24498
26446
|
cropJpeg: string().optional(),
|
|
24499
26447
|
parent: DetailParentSchema,
|
|
24500
|
-
steps: array(string()).optional()
|
|
26448
|
+
steps: array(string()).optional(),
|
|
26449
|
+
/**
|
|
26450
|
+
* The camera's root model already drew this step's boxes (D730): a
|
|
26451
|
+
* `license_plate` inside the parent vehicle. The named step is NOT
|
|
26452
|
+
* inferred — these FRAME-space boxes are its output — and its
|
|
26453
|
+
* requested children (the plate reader) run on them. Absent ⇒ every
|
|
26454
|
+
* requested step infers as before.
|
|
26455
|
+
*/
|
|
26456
|
+
supplied: object({
|
|
26457
|
+
stepId: string(),
|
|
26458
|
+
modelId: string(),
|
|
26459
|
+
boxes: array(object({
|
|
26460
|
+
bbox: NativeCropBboxSchema,
|
|
26461
|
+
score: number()
|
|
26462
|
+
})).min(1)
|
|
26463
|
+
}).optional()
|
|
24501
26464
|
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
|
|
24502
26465
|
/** Catalog step id, e.g. `clip-embedding`. */
|
|
24503
26466
|
stepId: string(),
|
|
@@ -24549,7 +26512,16 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
24549
26512
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
24550
26513
|
deviceId: number(),
|
|
24551
26514
|
trackId: string()
|
|
24552
|
-
}), object({ released: number().int().nonnegative() }), { kind: "mutation" })
|
|
26515
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" }), method(NodeBenchRunnerInputSchema, object({
|
|
26516
|
+
accepted: literal(true),
|
|
26517
|
+
runId: string()
|
|
26518
|
+
}), {
|
|
26519
|
+
kind: "mutation",
|
|
26520
|
+
auth: "admin"
|
|
26521
|
+
}), method(object({ runId: string() }), NodeBenchRunnerStatusSchema.nullable(), { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
26522
|
+
kind: "mutation",
|
|
26523
|
+
auth: "admin"
|
|
26524
|
+
});
|
|
24553
26525
|
var CameraPipelineConfigSchema = object({
|
|
24554
26526
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
24555
26527
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24560,14 +26532,6 @@ var CameraPipelineConfigSchema = object({
|
|
|
24560
26532
|
settings: record(string(), unknown()).readonly().optional()
|
|
24561
26533
|
}).nullable().optional()
|
|
24562
26534
|
});
|
|
24563
|
-
var PipelineTemplateSchema = object({
|
|
24564
|
-
id: string(),
|
|
24565
|
-
name: string(),
|
|
24566
|
-
description: string().optional(),
|
|
24567
|
-
config: CameraPipelineConfigSchema,
|
|
24568
|
-
createdAt: string(),
|
|
24569
|
-
updatedAt: string()
|
|
24570
|
-
});
|
|
24571
26535
|
var DeviceStepConfigSchema = object({
|
|
24572
26536
|
modelId: string().optional(),
|
|
24573
26537
|
settings: record(string(), unknown()).optional(),
|
|
@@ -24641,9 +26605,10 @@ var CameraStepOverridePatchSchema = object({
|
|
|
24641
26605
|
modelId: string().optional(),
|
|
24642
26606
|
settings: record(string(), unknown()).readonly().optional()
|
|
24643
26607
|
});
|
|
26608
|
+
var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
|
|
24644
26609
|
var CameraPipelineSettingsSchema = object({
|
|
24645
|
-
pinnedAgentNodeId: string().optional(),
|
|
24646
26610
|
stepToggles: record(string(), boolean()).optional(),
|
|
26611
|
+
stepSettings: CameraStepSettingsSchema.optional(),
|
|
24647
26612
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
24648
26613
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
24649
26614
|
});
|
|
@@ -24676,7 +26641,10 @@ var PipelineAssignmentSchema = object({
|
|
|
24676
26641
|
});
|
|
24677
26642
|
/**
|
|
24678
26643
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
24679
|
-
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
26644
|
+
* Aggregated from each runner's `getLocalLoad` cap call. In the
|
|
26645
|
+
* `getAgentLoad` report, a single-device node's default-pool sessions (no
|
|
26646
|
+
* `deviceKey`) are credited to its one eligible device in `load.devices` —
|
|
26647
|
+
* the default pool IS that device (D745); the balancer's census stays raw.
|
|
24680
26648
|
*/
|
|
24681
26649
|
var AgentLoadSummarySchema = object({
|
|
24682
26650
|
nodeId: string(),
|
|
@@ -24765,26 +26733,27 @@ var CameraBrokerStatusSchema = object({
|
|
|
24765
26733
|
width: number(),
|
|
24766
26734
|
height: number(),
|
|
24767
26735
|
subscribers: number(),
|
|
24768
|
-
|
|
24769
|
-
|
|
26736
|
+
/**
|
|
26737
|
+
* Encoded packets/s the broker receives from the camera. null when the
|
|
26738
|
+
* broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
|
|
26739
|
+
* There is no output rate: decoding runs in the session decode workers, not
|
|
26740
|
+
* in the broker, so the broker's own decoded-frame rate is 0 on every live
|
|
26741
|
+
* camera and is not served (D758).
|
|
26742
|
+
*/
|
|
26743
|
+
inFps: number().nullable()
|
|
24770
26744
|
})).readonly(),
|
|
24771
26745
|
webrtcSessions: number(),
|
|
24772
26746
|
rtspRestream: boolean()
|
|
24773
26747
|
});
|
|
24774
|
-
/**
|
|
24775
|
-
|
|
24776
|
-
|
|
24777
|
-
|
|
24778
|
-
|
|
24779
|
-
|
|
24780
|
-
|
|
24781
|
-
|
|
24782
|
-
var CameraDecoderStatusSchema = object({
|
|
24783
|
-
nodeId: string(),
|
|
24784
|
-
formats: array(string()).readonly(),
|
|
24785
|
-
sessionCount: number(),
|
|
24786
|
-
shm: CameraDecoderShmSchema
|
|
24787
|
-
});
|
|
26748
|
+
/**
|
|
26749
|
+
* Decoder block — WHERE decode runs (co-located with the detection node by
|
|
26750
|
+
* construction); null when the camera has no detection node. It carries no
|
|
26751
|
+
* frame counter: the shared-memory plane whose counters it used to serve is
|
|
26752
|
+
* gone, and those fields read 0 forever. Whether frames actually flow is read
|
|
26753
|
+
* from `detection.actualFps` (frames delivered to and processed by the
|
|
26754
|
+
* detector), never from a counter nothing feeds.
|
|
26755
|
+
*/
|
|
26756
|
+
var CameraDecoderStatusSchema = object({ nodeId: string() });
|
|
24788
26757
|
/** Motion block — null when motion detection is not active for this device. */
|
|
24789
26758
|
var CameraMotionStatusSchema = object({
|
|
24790
26759
|
enabled: boolean(),
|
|
@@ -25141,12 +27110,6 @@ method(object({
|
|
|
25141
27110
|
}), object({ success: literal(true) }), {
|
|
25142
27111
|
kind: "mutation",
|
|
25143
27112
|
auth: "admin"
|
|
25144
|
-
}), method(object({
|
|
25145
|
-
agentNodeId: string(),
|
|
25146
|
-
detectWeight: number().positive().nullable()
|
|
25147
|
-
}), object({ success: literal(true) }), {
|
|
25148
|
-
kind: "mutation",
|
|
25149
|
-
auth: "admin"
|
|
25150
27113
|
}), method(object({
|
|
25151
27114
|
agentNodeId: string(),
|
|
25152
27115
|
detect: boolean().nullable().optional(),
|
|
@@ -25188,6 +27151,30 @@ method(object({
|
|
|
25188
27151
|
}), {
|
|
25189
27152
|
kind: "mutation",
|
|
25190
27153
|
auth: "admin"
|
|
27154
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
27155
|
+
kind: "mutation",
|
|
27156
|
+
auth: "admin"
|
|
27157
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
27158
|
+
kind: "mutation",
|
|
27159
|
+
auth: "admin"
|
|
27160
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
27161
|
+
kind: "mutation",
|
|
27162
|
+
auth: "admin"
|
|
27163
|
+
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
27164
|
+
kind: literal("started"),
|
|
27165
|
+
runId: string()
|
|
27166
|
+
}), object({
|
|
27167
|
+
kind: literal("refused"),
|
|
27168
|
+
preflight: NodeBenchmarkPreflightSchema
|
|
27169
|
+
})]), {
|
|
27170
|
+
kind: "mutation",
|
|
27171
|
+
auth: "admin"
|
|
27172
|
+
}), method(_void(), NodeBenchmarkStatusSchema, { auth: "admin" }), method(object({ runId: string() }), object({ aborted: boolean() }), {
|
|
27173
|
+
kind: "mutation",
|
|
27174
|
+
auth: "admin"
|
|
27175
|
+
}), method(object({ nodeId: string() }), NodeBenchmarkCandidatesSchema, { auth: "admin" }), method(ListNodeBenchmarkResultsInputSchema, array(NodeBenchmarkResultViewSchema).readonly(), { auth: "admin" }), method(object({ id: string() }), object({ deleted: boolean() }), {
|
|
27176
|
+
kind: "mutation",
|
|
27177
|
+
auth: "admin"
|
|
25191
27178
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
25192
27179
|
deviceId: number(),
|
|
25193
27180
|
addonId: string(),
|
|
@@ -25204,6 +27191,13 @@ method(object({
|
|
|
25204
27191
|
}), object({ success: literal(true) }), {
|
|
25205
27192
|
kind: "mutation",
|
|
25206
27193
|
auth: "admin"
|
|
27194
|
+
}), method(object({
|
|
27195
|
+
deviceId: number(),
|
|
27196
|
+
addonId: string(),
|
|
27197
|
+
settings: record(string(), unknown()).nullable()
|
|
27198
|
+
}), object({ success: literal(true) }), {
|
|
27199
|
+
kind: "mutation",
|
|
27200
|
+
auth: "admin"
|
|
25207
27201
|
}), method(object({
|
|
25208
27202
|
deviceId: number(),
|
|
25209
27203
|
agentNodeId: string(),
|
|
@@ -25227,25 +27221,7 @@ method(object({
|
|
|
25227
27221
|
}), method(_void(), DiskReconcileJobSchema, {
|
|
25228
27222
|
kind: "mutation",
|
|
25229
27223
|
auth: "admin"
|
|
25230
|
-
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" })
|
|
25231
|
-
name: string(),
|
|
25232
|
-
description: string().optional(),
|
|
25233
|
-
config: CameraPipelineConfigSchema
|
|
25234
|
-
}), PipelineTemplateSchema, {
|
|
25235
|
-
kind: "mutation",
|
|
25236
|
-
auth: "admin"
|
|
25237
|
-
}), method(object({
|
|
25238
|
-
id: string(),
|
|
25239
|
-
name: string().optional(),
|
|
25240
|
-
description: string().optional(),
|
|
25241
|
-
config: CameraPipelineConfigSchema.optional()
|
|
25242
|
-
}), PipelineTemplateSchema, {
|
|
25243
|
-
kind: "mutation",
|
|
25244
|
-
auth: "admin"
|
|
25245
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
25246
|
-
kind: "mutation",
|
|
25247
|
-
auth: "admin"
|
|
25248
|
-
});
|
|
27224
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
|
|
25249
27225
|
/**
|
|
25250
27226
|
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
25251
27227
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
@@ -25835,7 +27811,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
25835
27811
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
25836
27812
|
* operator already consented to.
|
|
25837
27813
|
*/
|
|
25838
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
27814
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
27815
|
+
/**
|
|
27816
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
27817
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
27818
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
27819
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
27820
|
+
*/
|
|
27821
|
+
linkIntent: string().optional(),
|
|
27822
|
+
/**
|
|
27823
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
27824
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
27825
|
+
*/
|
|
27826
|
+
issuer: string().optional()
|
|
25839
27827
|
});
|
|
25840
27828
|
method(object({
|
|
25841
27829
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -27465,8 +29453,6 @@ var WebrtcStreamChoiceSchema = object({
|
|
|
27465
29453
|
]).nullable(),
|
|
27466
29454
|
/** Input FPS from the camera (null for adaptive). */
|
|
27467
29455
|
inputFps: number().nullable(),
|
|
27468
|
-
/** Decoded FPS (null for adaptive). */
|
|
27469
|
-
decodeFps: number().nullable(),
|
|
27470
29456
|
/** Bitrate in kbps (null for adaptive). */
|
|
27471
29457
|
bitrateKbps: number().nullable()
|
|
27472
29458
|
});
|
|
@@ -27743,7 +29729,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
27743
29729
|
* field their hints were silently stripped by the schema and the
|
|
27744
29730
|
* adaptive ladder started blind on the client's display size.
|
|
27745
29731
|
*/
|
|
27746
|
-
hints: webrtcClientHintsSchema.optional()
|
|
29732
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
29733
|
+
/**
|
|
29734
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
29735
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
29736
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
29737
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
29738
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
29739
|
+
*
|
|
29740
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
29741
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
29742
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
29743
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
29744
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
29745
|
+
* flag must not become a second door to the camera's speaker.
|
|
29746
|
+
*/
|
|
29747
|
+
talkback: boolean().optional()
|
|
27747
29748
|
}), object({
|
|
27748
29749
|
sessionId: string(),
|
|
27749
29750
|
sdpAnswer: string()
|
|
@@ -27798,6 +29799,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
27798
29799
|
*/
|
|
27799
29800
|
alive: boolean()
|
|
27800
29801
|
})), method(object({
|
|
29802
|
+
deviceId: number().int().nonnegative(),
|
|
29803
|
+
sessionId: string(),
|
|
29804
|
+
downlinkMbps: number().nonnegative()
|
|
29805
|
+
}), object({
|
|
29806
|
+
outcome: _enum(["switching", "held"]),
|
|
29807
|
+
tier: CamProfileSchema.nullable(),
|
|
29808
|
+
reason: string()
|
|
29809
|
+
}), { kind: "mutation" }), method(object({
|
|
27801
29810
|
deviceId: number().int().nonnegative(),
|
|
27802
29811
|
sessionId: string()
|
|
27803
29812
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
@@ -28037,6 +30046,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
28037
30046
|
var RestartAddonResultSchema = unknown();
|
|
28038
30047
|
var InstallPackageResultSchema = unknown();
|
|
28039
30048
|
var ReloadPackagesResultSchema = unknown();
|
|
30049
|
+
/**
|
|
30050
|
+
* What an uninstall did on ONE node.
|
|
30051
|
+
* - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
|
|
30052
|
+
* - `not-installed` — the node did not have it (nothing to do).
|
|
30053
|
+
* - `refused` — protected / bootstrap package; nothing touched.
|
|
30054
|
+
* - `failed` — attempted and did not complete; `error` says why.
|
|
30055
|
+
* - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
|
|
30056
|
+
* back-fill never returns the package, and the stale-addon sweep removes the
|
|
30057
|
+
* copy when the node registers again (only once the hub no longer has it).
|
|
30058
|
+
*/
|
|
30059
|
+
var UninstallNodeOutcomeSchema = _enum([
|
|
30060
|
+
"uninstalled",
|
|
30061
|
+
"not-installed",
|
|
30062
|
+
"refused",
|
|
30063
|
+
"failed",
|
|
30064
|
+
"pending-reconnect"
|
|
30065
|
+
]);
|
|
30066
|
+
var UninstallNodeResultSchema = object({
|
|
30067
|
+
nodeId: string(),
|
|
30068
|
+
outcome: UninstallNodeOutcomeSchema,
|
|
30069
|
+
error: string().optional(),
|
|
30070
|
+
addonIds: array(string()).readonly(),
|
|
30071
|
+
runnersStopped: array(string()).readonly(),
|
|
30072
|
+
warnings: array(string()).readonly()
|
|
30073
|
+
});
|
|
30074
|
+
var UninstallPackageResultSchema = object({
|
|
30075
|
+
/** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
|
|
30076
|
+
success: boolean(),
|
|
30077
|
+
packageName: string(),
|
|
30078
|
+
results: array(UninstallNodeResultSchema).readonly()
|
|
30079
|
+
});
|
|
30080
|
+
/**
|
|
30081
|
+
* `unreachable` lists online agents whose status read FAILED — absence from
|
|
30082
|
+
* `installations` is only "not installed" for a node that answered (D315).
|
|
30083
|
+
*/
|
|
30084
|
+
var PackageInstallationsSchema = object({
|
|
30085
|
+
installations: array(object({
|
|
30086
|
+
packageName: string(),
|
|
30087
|
+
nodeId: string(),
|
|
30088
|
+
nodeName: string(),
|
|
30089
|
+
isHub: boolean(),
|
|
30090
|
+
isOnline: boolean(),
|
|
30091
|
+
version: string().nullable(),
|
|
30092
|
+
addonIds: array(string()).readonly(),
|
|
30093
|
+
source: _enum(["live", "recorded"]),
|
|
30094
|
+
/** The hub installs this package too. `false` on an agent row = an orphan. */
|
|
30095
|
+
onHub: boolean()
|
|
30096
|
+
})).readonly(),
|
|
30097
|
+
unreachable: array(object({
|
|
30098
|
+
nodeId: string(),
|
|
30099
|
+
error: string()
|
|
30100
|
+
})).readonly()
|
|
30101
|
+
});
|
|
28040
30102
|
var BulkUpdateItemStatusSchema = _enum([
|
|
28041
30103
|
"queued",
|
|
28042
30104
|
"updating",
|
|
@@ -28119,10 +30181,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
28119
30181
|
}), method(object({ packageName: string() }), InstallPackageResultSchema, {
|
|
28120
30182
|
kind: "mutation",
|
|
28121
30183
|
auth: "admin"
|
|
28122
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30184
|
+
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
30185
|
+
packageName: string().min(1),
|
|
30186
|
+
nodeId: string().optional(),
|
|
30187
|
+
everywhere: boolean().optional()
|
|
30188
|
+
}), UninstallPackageResultSchema, {
|
|
28123
30189
|
kind: "mutation",
|
|
28124
30190
|
auth: "admin"
|
|
28125
|
-
}), method(_void(), ReloadPackagesResultSchema, {
|
|
30191
|
+
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
28126
30192
|
kind: "mutation",
|
|
28127
30193
|
auth: "admin"
|
|
28128
30194
|
}), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -30190,6 +32256,9 @@ var CreateIntegrationInputSchema = object({
|
|
|
30190
32256
|
enabled: boolean().optional(),
|
|
30191
32257
|
info: record(string(), unknown()).optional(),
|
|
30192
32258
|
settings: record(string(), unknown()).optional(),
|
|
32259
|
+
/** Keys of `settings` the form's schema declares secret (by type) — kept in
|
|
32260
|
+
* the keychain, not the table (D787). */
|
|
32261
|
+
secretKeys: array(string()).optional(),
|
|
30193
32262
|
skipRestart: boolean().optional()
|
|
30194
32263
|
});
|
|
30195
32264
|
var UpdateIntegrationInputSchema = object({
|
|
@@ -30213,7 +32282,9 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
30213
32282
|
auth: "admin"
|
|
30214
32283
|
}), method(object({ id: string() }), record(string(), unknown()), { auth: "admin" }), method(object({
|
|
30215
32284
|
id: string(),
|
|
30216
|
-
settings: record(string(), unknown())
|
|
32285
|
+
settings: record(string(), unknown()),
|
|
32286
|
+
/** Keys the form's schema declares secret (by type) — keychain-stored (D787). */
|
|
32287
|
+
secretKeys: array(string()).optional()
|
|
30217
32288
|
}), object({ success: boolean() }), {
|
|
30218
32289
|
kind: "mutation",
|
|
30219
32290
|
auth: "admin"
|
|
@@ -30473,7 +32544,8 @@ var ConnectionEndpointSchema = object({
|
|
|
30473
32544
|
"lan-ipv6",
|
|
30474
32545
|
"public",
|
|
30475
32546
|
"loopback",
|
|
30476
|
-
"app-link"
|
|
32547
|
+
"app-link",
|
|
32548
|
+
"custom"
|
|
30477
32549
|
]),
|
|
30478
32550
|
/**
|
|
30479
32551
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -30542,7 +32614,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
30542
32614
|
localPort: AdvertisedLocalPortSchema
|
|
30543
32615
|
});
|
|
30544
32616
|
/**
|
|
30545
|
-
* The address flagged for notification
|
|
32617
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
30546
32618
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
30547
32619
|
* so the UI can show it either way.
|
|
30548
32620
|
*/
|
|
@@ -30575,6 +32647,72 @@ var ViewerEndpointsSchema = object({
|
|
|
30575
32647
|
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
30576
32648
|
resolved: array(string()).readonly()
|
|
30577
32649
|
});
|
|
32650
|
+
/**
|
|
32651
|
+
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
32652
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
32653
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
32654
|
+
*/
|
|
32655
|
+
var HubAddressSnapshotSchema = object({
|
|
32656
|
+
override: string().nullable(),
|
|
32657
|
+
resolved: string().nullable(),
|
|
32658
|
+
source: _enum([
|
|
32659
|
+
"override",
|
|
32660
|
+
"auto",
|
|
32661
|
+
"none"
|
|
32662
|
+
])
|
|
32663
|
+
});
|
|
32664
|
+
var HubAddressesSchema = object({
|
|
32665
|
+
cluster: HubAddressSnapshotSchema,
|
|
32666
|
+
browser: HubAddressSnapshotSchema
|
|
32667
|
+
});
|
|
32668
|
+
/**
|
|
32669
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
32670
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
32671
|
+
* by at most one address.
|
|
32672
|
+
*/
|
|
32673
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
32674
|
+
var RoleSourceSchema = _enum([
|
|
32675
|
+
"flagged",
|
|
32676
|
+
"auto",
|
|
32677
|
+
"none"
|
|
32678
|
+
]);
|
|
32679
|
+
/** One single-valued role: the flagged address, the one in use, and why. */
|
|
32680
|
+
var HubAddressRoleResolutionSchema = object({
|
|
32681
|
+
/** The address carrying the flag, or null = automatic. */
|
|
32682
|
+
flagged: string().nullable(),
|
|
32683
|
+
/** The address in use, or null when nothing qualifies (never loopback). */
|
|
32684
|
+
resolved: string().nullable(),
|
|
32685
|
+
source: RoleSourceSchema
|
|
32686
|
+
});
|
|
32687
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
32688
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
32689
|
+
flagged: array(string()).readonly(),
|
|
32690
|
+
/** What the apps race right now. */
|
|
32691
|
+
resolved: array(string()).readonly(),
|
|
32692
|
+
source: RoleSourceSchema
|
|
32693
|
+
});
|
|
32694
|
+
var HubAddressBookSchema = object({
|
|
32695
|
+
rows: array(ConnectionEndpointSchema.extend({
|
|
32696
|
+
/** In the hub's detected palette right now. */
|
|
32697
|
+
detected: boolean(),
|
|
32698
|
+
/** Entered by the operator (removable). */
|
|
32699
|
+
custom: boolean(),
|
|
32700
|
+
/** The roles explicitly flagged on this address. */
|
|
32701
|
+
flags: array(HubAddressRoleSchema).readonly(),
|
|
32702
|
+
/** The roles this address serves right now — flagged or automatic. */
|
|
32703
|
+
inUse: array(HubAddressRoleSchema).readonly(),
|
|
32704
|
+
/** The roles this address may be flagged with. */
|
|
32705
|
+
eligible: array(HubAddressRoleSchema).readonly()
|
|
32706
|
+
})).readonly(),
|
|
32707
|
+
roles: object({
|
|
32708
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
32709
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
32710
|
+
internal: HubAddressRoleResolutionSchema,
|
|
32711
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
32712
|
+
}),
|
|
32713
|
+
/** The `hub=` an app link carries (D709), or null. */
|
|
32714
|
+
appLinkHub: string().nullable()
|
|
32715
|
+
});
|
|
30578
32716
|
var AllowedAddressesSchema = object({
|
|
30579
32717
|
/**
|
|
30580
32718
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -30618,10 +32756,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
30618
32756
|
* tunnel always emits `https://` regardless. */
|
|
30619
32757
|
scheme: _enum(["http", "https"]).optional(),
|
|
30620
32758
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
30621
|
-
* an address notification
|
|
32759
|
+
* an address notification taps can be flagged with, not a hub
|
|
30622
32760
|
* route. Default `false`: racers and rankers never see it. */
|
|
30623
32761
|
includeAppLink: boolean().optional()
|
|
30624
|
-
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(
|
|
32762
|
+
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
|
|
32763
|
+
baseUrl: string(),
|
|
32764
|
+
label: string().max(80)
|
|
32765
|
+
}), HubAddressBookSchema, {
|
|
32766
|
+
kind: "mutation",
|
|
32767
|
+
auth: "admin"
|
|
32768
|
+
}), method(object({ baseUrl: string() }), HubAddressBookSchema, {
|
|
32769
|
+
kind: "mutation",
|
|
32770
|
+
auth: "admin"
|
|
32771
|
+
}), method(object({
|
|
32772
|
+
role: HubAddressRoleSchema,
|
|
32773
|
+
baseUrl: string().nullable(),
|
|
32774
|
+
enabled: boolean(),
|
|
32775
|
+
acceptInsecureHttp: boolean().optional()
|
|
32776
|
+
}), HubAddressBookSchema, {
|
|
32777
|
+
kind: "mutation",
|
|
32778
|
+
auth: "admin"
|
|
32779
|
+
}), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
|
|
30625
32780
|
kind: "mutation",
|
|
30626
32781
|
auth: "admin"
|
|
30627
32782
|
}), method(object({
|
|
@@ -31072,7 +33227,8 @@ object({
|
|
|
31072
33227
|
* writes this slice (not even a boot seed), and neither does the runner's
|
|
31073
33228
|
* phase machine: its phase is "a session is attached" for every on-motion
|
|
31074
33229
|
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
31075
|
-
* A provider's `isDetected`
|
|
33230
|
+
* A provider's `isDetected` and `getStatus` answer from the hub's slice
|
|
33231
|
+
* (`hubMotionNativeProvider`).
|
|
31076
33232
|
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
31077
33233
|
* imports) — the provider pushes both edges itself, from the upstream
|
|
31078
33234
|
* system's own state change. That is the sensor's own fact.
|
|
@@ -35698,6 +37854,32 @@ var TotpStatusSchema = object({
|
|
|
35698
37854
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
35699
37855
|
confirmedAt: number().nullable()
|
|
35700
37856
|
});
|
|
37857
|
+
/**
|
|
37858
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
37859
|
+
* and scoped tokens.
|
|
37860
|
+
*
|
|
37861
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
37862
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
37863
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
37864
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
37865
|
+
* provider.
|
|
37866
|
+
*/
|
|
37867
|
+
var ExternalIdentitySchema = object({
|
|
37868
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
37869
|
+
provider: string(),
|
|
37870
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
37871
|
+
subject: string(),
|
|
37872
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
37873
|
+
issuer: string(),
|
|
37874
|
+
userId: string(),
|
|
37875
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
37876
|
+
label: string().optional(),
|
|
37877
|
+
linkedAt: number()
|
|
37878
|
+
});
|
|
37879
|
+
var ExternalIdentityKeySchema = object({
|
|
37880
|
+
provider: string().min(1),
|
|
37881
|
+
subject: string().min(1)
|
|
37882
|
+
});
|
|
35701
37883
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
35702
37884
|
kind: "mutation",
|
|
35703
37885
|
auth: "admin",
|
|
@@ -35811,7 +37993,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
35811
37993
|
userId: string(),
|
|
35812
37994
|
username: string(),
|
|
35813
37995
|
scopes: array(TokenScopeSchema)
|
|
35814
|
-
}).nullable(), { access: "view" }), method(
|
|
37996
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
37997
|
+
userId: string(),
|
|
37998
|
+
issuer: string()
|
|
37999
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
38000
|
+
userId: string(),
|
|
38001
|
+
issuer: string().min(1),
|
|
38002
|
+
label: string().optional()
|
|
38003
|
+
}), object({ success: literal(true) }), {
|
|
38004
|
+
kind: "mutation",
|
|
38005
|
+
auth: "admin",
|
|
38006
|
+
access: "create"
|
|
38007
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
38008
|
+
kind: "mutation",
|
|
38009
|
+
auth: "admin",
|
|
38010
|
+
access: "delete"
|
|
38011
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
35815
38012
|
kind: "mutation",
|
|
35816
38013
|
auth: "admin",
|
|
35817
38014
|
access: "delete"
|
|
@@ -36203,6 +38400,16 @@ DeviceType.Camera, method(object({
|
|
|
36203
38400
|
package: array(ZoneRuleSchema).readonly()
|
|
36204
38401
|
});
|
|
36205
38402
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
38403
|
+
Object.freeze({
|
|
38404
|
+
person: .5,
|
|
38405
|
+
vehicle: .5,
|
|
38406
|
+
animal: .5
|
|
38407
|
+
});
|
|
38408
|
+
Object.freeze({
|
|
38409
|
+
person: .65,
|
|
38410
|
+
vehicle: .65,
|
|
38411
|
+
animal: .65
|
|
38412
|
+
});
|
|
36206
38413
|
/**
|
|
36207
38414
|
* Accessory device helpers — shared across drivers.
|
|
36208
38415
|
*
|
|
@@ -36377,6 +38584,12 @@ Object.freeze({
|
|
|
36377
38584
|
addonId: null,
|
|
36378
38585
|
access: "view"
|
|
36379
38586
|
},
|
|
38587
|
+
"addons.listInstallations": {
|
|
38588
|
+
capName: "addons",
|
|
38589
|
+
capScope: "system",
|
|
38590
|
+
addonId: null,
|
|
38591
|
+
access: "view"
|
|
38592
|
+
},
|
|
36380
38593
|
"addons.listJobs": {
|
|
36381
38594
|
capName: "addons",
|
|
36382
38595
|
capScope: "system",
|
|
@@ -37559,90 +39772,18 @@ Object.freeze({
|
|
|
37559
39772
|
addonId: null,
|
|
37560
39773
|
access: "create"
|
|
37561
39774
|
},
|
|
37562
|
-
"decoder.createSession": {
|
|
37563
|
-
capName: "decoder",
|
|
37564
|
-
capScope: "system",
|
|
37565
|
-
addonId: null,
|
|
37566
|
-
access: "view"
|
|
37567
|
-
},
|
|
37568
|
-
"decoder.destroySession": {
|
|
37569
|
-
capName: "decoder",
|
|
37570
|
-
capScope: "system",
|
|
37571
|
-
addonId: null,
|
|
37572
|
-
access: "delete"
|
|
37573
|
-
},
|
|
37574
|
-
"decoder.getFrame": {
|
|
37575
|
-
capName: "decoder",
|
|
37576
|
-
capScope: "system",
|
|
37577
|
-
addonId: null,
|
|
37578
|
-
access: "view"
|
|
37579
|
-
},
|
|
37580
39775
|
"decoder.getInfo": {
|
|
37581
39776
|
capName: "decoder",
|
|
37582
39777
|
capScope: "system",
|
|
37583
39778
|
addonId: null,
|
|
37584
39779
|
access: "view"
|
|
37585
39780
|
},
|
|
37586
|
-
"decoder.getShmStats": {
|
|
37587
|
-
capName: "decoder",
|
|
37588
|
-
capScope: "system",
|
|
37589
|
-
addonId: null,
|
|
37590
|
-
access: "view"
|
|
37591
|
-
},
|
|
37592
|
-
"decoder.getStats": {
|
|
37593
|
-
capName: "decoder",
|
|
37594
|
-
capScope: "system",
|
|
37595
|
-
addonId: null,
|
|
37596
|
-
access: "view"
|
|
37597
|
-
},
|
|
37598
|
-
"decoder.listActiveSessions": {
|
|
37599
|
-
capName: "decoder",
|
|
37600
|
-
capScope: "system",
|
|
37601
|
-
addonId: null,
|
|
37602
|
-
access: "view"
|
|
37603
|
-
},
|
|
37604
|
-
"decoder.openStream": {
|
|
37605
|
-
capName: "decoder",
|
|
37606
|
-
capScope: "system",
|
|
37607
|
-
addonId: null,
|
|
37608
|
-
access: "view"
|
|
37609
|
-
},
|
|
37610
|
-
"decoder.pullFrames": {
|
|
37611
|
-
capName: "decoder",
|
|
37612
|
-
capScope: "system",
|
|
37613
|
-
addonId: null,
|
|
37614
|
-
access: "view"
|
|
37615
|
-
},
|
|
37616
|
-
"decoder.pullHandles": {
|
|
37617
|
-
capName: "decoder",
|
|
37618
|
-
capScope: "system",
|
|
37619
|
-
addonId: null,
|
|
37620
|
-
access: "view"
|
|
37621
|
-
},
|
|
37622
|
-
"decoder.pushPacket": {
|
|
37623
|
-
capName: "decoder",
|
|
37624
|
-
capScope: "system",
|
|
37625
|
-
addonId: null,
|
|
37626
|
-
access: "view"
|
|
37627
|
-
},
|
|
37628
39781
|
"decoder.reprobeHwaccel": {
|
|
37629
39782
|
capName: "decoder",
|
|
37630
39783
|
capScope: "system",
|
|
37631
39784
|
addonId: null,
|
|
37632
39785
|
access: "create"
|
|
37633
39786
|
},
|
|
37634
|
-
"decoder.supportsCodec": {
|
|
37635
|
-
capName: "decoder",
|
|
37636
|
-
capScope: "system",
|
|
37637
|
-
addonId: null,
|
|
37638
|
-
access: "view"
|
|
37639
|
-
},
|
|
37640
|
-
"decoder.updateConfig": {
|
|
37641
|
-
capName: "decoder",
|
|
37642
|
-
capScope: "system",
|
|
37643
|
-
addonId: null,
|
|
37644
|
-
access: "view"
|
|
37645
|
-
},
|
|
37646
39787
|
"detectionPipeline.applyDeviceSettingsPatch": {
|
|
37647
39788
|
capName: "detection-pipeline",
|
|
37648
39789
|
capScope: "device",
|
|
@@ -38909,6 +41050,90 @@ Object.freeze({
|
|
|
38909
41050
|
addonId: null,
|
|
38910
41051
|
access: "create"
|
|
38911
41052
|
},
|
|
41053
|
+
"keychain.delete": {
|
|
41054
|
+
capName: "keychain",
|
|
41055
|
+
capScope: "system",
|
|
41056
|
+
addonId: null,
|
|
41057
|
+
access: "delete"
|
|
41058
|
+
},
|
|
41059
|
+
"keychain.getState": {
|
|
41060
|
+
capName: "keychain",
|
|
41061
|
+
capScope: "system",
|
|
41062
|
+
addonId: null,
|
|
41063
|
+
access: "view"
|
|
41064
|
+
},
|
|
41065
|
+
"keychain.listMeta": {
|
|
41066
|
+
capName: "keychain",
|
|
41067
|
+
capScope: "system",
|
|
41068
|
+
addonId: null,
|
|
41069
|
+
access: "view"
|
|
41070
|
+
},
|
|
41071
|
+
"keychain.put": {
|
|
41072
|
+
capName: "keychain",
|
|
41073
|
+
capScope: "system",
|
|
41074
|
+
addonId: null,
|
|
41075
|
+
access: "create"
|
|
41076
|
+
},
|
|
41077
|
+
"keychain.resolve": {
|
|
41078
|
+
capName: "keychain",
|
|
41079
|
+
capScope: "system",
|
|
41080
|
+
addonId: null,
|
|
41081
|
+
access: "view"
|
|
41082
|
+
},
|
|
41083
|
+
"keychainAdmin.deleteOrphans": {
|
|
41084
|
+
capName: "keychain-admin",
|
|
41085
|
+
capScope: "system",
|
|
41086
|
+
addonId: null,
|
|
41087
|
+
access: "delete"
|
|
41088
|
+
},
|
|
41089
|
+
"keychainAdmin.downloadRecoveryKey": {
|
|
41090
|
+
capName: "keychain-admin",
|
|
41091
|
+
capScope: "system",
|
|
41092
|
+
addonId: null,
|
|
41093
|
+
access: "create"
|
|
41094
|
+
},
|
|
41095
|
+
"keychainAdmin.listAudit": {
|
|
41096
|
+
capName: "keychain-admin",
|
|
41097
|
+
capScope: "system",
|
|
41098
|
+
addonId: null,
|
|
41099
|
+
access: "view"
|
|
41100
|
+
},
|
|
41101
|
+
"keychainAdmin.listSecrets": {
|
|
41102
|
+
capName: "keychain-admin",
|
|
41103
|
+
capScope: "system",
|
|
41104
|
+
addonId: null,
|
|
41105
|
+
access: "view"
|
|
41106
|
+
},
|
|
41107
|
+
"keychainAdmin.purgeRetiredKeys": {
|
|
41108
|
+
capName: "keychain-admin",
|
|
41109
|
+
capScope: "system",
|
|
41110
|
+
addonId: null,
|
|
41111
|
+
access: "delete"
|
|
41112
|
+
},
|
|
41113
|
+
"keychainAdmin.resetKeychain": {
|
|
41114
|
+
capName: "keychain-admin",
|
|
41115
|
+
capScope: "system",
|
|
41116
|
+
addonId: null,
|
|
41117
|
+
access: "delete"
|
|
41118
|
+
},
|
|
41119
|
+
"keychainAdmin.reveal": {
|
|
41120
|
+
capName: "keychain-admin",
|
|
41121
|
+
capScope: "system",
|
|
41122
|
+
addonId: null,
|
|
41123
|
+
access: "create"
|
|
41124
|
+
},
|
|
41125
|
+
"keychainAdmin.rotateMasterKey": {
|
|
41126
|
+
capName: "keychain-admin",
|
|
41127
|
+
capScope: "system",
|
|
41128
|
+
addonId: null,
|
|
41129
|
+
access: "create"
|
|
41130
|
+
},
|
|
41131
|
+
"keychainAdmin.status": {
|
|
41132
|
+
capName: "keychain-admin",
|
|
41133
|
+
capScope: "system",
|
|
41134
|
+
addonId: null,
|
|
41135
|
+
access: "view"
|
|
41136
|
+
},
|
|
38912
41137
|
"lawnMowerControl.dock": {
|
|
38913
41138
|
capName: "lawn-mower-control",
|
|
38914
41139
|
capScope: "device",
|
|
@@ -39131,12 +41356,24 @@ Object.freeze({
|
|
|
39131
41356
|
addonId: null,
|
|
39132
41357
|
access: "view"
|
|
39133
41358
|
},
|
|
41359
|
+
"localNetwork.addCustomAddress": {
|
|
41360
|
+
capName: "local-network",
|
|
41361
|
+
capScope: "system",
|
|
41362
|
+
addonId: null,
|
|
41363
|
+
access: "create"
|
|
41364
|
+
},
|
|
39134
41365
|
"localNetwork.downloadCa": {
|
|
39135
41366
|
capName: "local-network",
|
|
39136
41367
|
capScope: "system",
|
|
39137
41368
|
addonId: null,
|
|
39138
41369
|
access: "view"
|
|
39139
41370
|
},
|
|
41371
|
+
"localNetwork.getAddresses": {
|
|
41372
|
+
capName: "local-network",
|
|
41373
|
+
capScope: "system",
|
|
41374
|
+
addonId: null,
|
|
41375
|
+
access: "view"
|
|
41376
|
+
},
|
|
39140
41377
|
"localNetwork.getAllowedAddresses": {
|
|
39141
41378
|
capName: "local-network",
|
|
39142
41379
|
capScope: "system",
|
|
@@ -39149,6 +41386,12 @@ Object.freeze({
|
|
|
39149
41386
|
addonId: null,
|
|
39150
41387
|
access: "view"
|
|
39151
41388
|
},
|
|
41389
|
+
"localNetwork.getHubAddresses": {
|
|
41390
|
+
capName: "local-network",
|
|
41391
|
+
capScope: "system",
|
|
41392
|
+
addonId: null,
|
|
41393
|
+
access: "view"
|
|
41394
|
+
},
|
|
39152
41395
|
"localNetwork.getNotificationEndpoint": {
|
|
39153
41396
|
capName: "local-network",
|
|
39154
41397
|
capScope: "system",
|
|
@@ -39185,6 +41428,12 @@ Object.freeze({
|
|
|
39185
41428
|
addonId: null,
|
|
39186
41429
|
access: "create"
|
|
39187
41430
|
},
|
|
41431
|
+
"localNetwork.removeCustomAddress": {
|
|
41432
|
+
capName: "local-network",
|
|
41433
|
+
capScope: "system",
|
|
41434
|
+
addonId: null,
|
|
41435
|
+
access: "delete"
|
|
41436
|
+
},
|
|
39188
41437
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
39189
41438
|
capName: "local-network",
|
|
39190
41439
|
capScope: "system",
|
|
@@ -39197,6 +41446,12 @@ Object.freeze({
|
|
|
39197
41446
|
addonId: null,
|
|
39198
41447
|
access: "create"
|
|
39199
41448
|
},
|
|
41449
|
+
"localNetwork.setAddressRole": {
|
|
41450
|
+
capName: "local-network",
|
|
41451
|
+
capScope: "system",
|
|
41452
|
+
addonId: null,
|
|
41453
|
+
access: "create"
|
|
41454
|
+
},
|
|
39200
41455
|
"localNetwork.setAllowedAddresses": {
|
|
39201
41456
|
capName: "local-network",
|
|
39202
41457
|
capScope: "system",
|
|
@@ -40253,6 +42508,18 @@ Object.freeze({
|
|
|
40253
42508
|
addonId: null,
|
|
40254
42509
|
access: "create"
|
|
40255
42510
|
},
|
|
42511
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
42512
|
+
capName: "pipeline-analytics",
|
|
42513
|
+
capScope: "device",
|
|
42514
|
+
addonId: null,
|
|
42515
|
+
access: "create"
|
|
42516
|
+
},
|
|
42517
|
+
"pipelineAnalytics.addRetrainFramesToCollection": {
|
|
42518
|
+
capName: "pipeline-analytics",
|
|
42519
|
+
capScope: "device",
|
|
42520
|
+
addonId: null,
|
|
42521
|
+
access: "create"
|
|
42522
|
+
},
|
|
40256
42523
|
"pipelineAnalytics.applyDeviceSettingsPatch": {
|
|
40257
42524
|
capName: "pipeline-analytics",
|
|
40258
42525
|
capScope: "device",
|
|
@@ -40301,12 +42568,24 @@ Object.freeze({
|
|
|
40301
42568
|
addonId: null,
|
|
40302
42569
|
access: "view"
|
|
40303
42570
|
},
|
|
42571
|
+
"pipelineAnalytics.createRetrainCollection": {
|
|
42572
|
+
capName: "pipeline-analytics",
|
|
42573
|
+
capScope: "device",
|
|
42574
|
+
addonId: null,
|
|
42575
|
+
access: "create"
|
|
42576
|
+
},
|
|
40304
42577
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
40305
42578
|
capName: "pipeline-analytics",
|
|
40306
42579
|
capScope: "device",
|
|
40307
42580
|
addonId: null,
|
|
40308
42581
|
access: "delete"
|
|
40309
42582
|
},
|
|
42583
|
+
"pipelineAnalytics.deleteRetrainCollection": {
|
|
42584
|
+
capName: "pipeline-analytics",
|
|
42585
|
+
capScope: "device",
|
|
42586
|
+
addonId: null,
|
|
42587
|
+
access: "delete"
|
|
42588
|
+
},
|
|
40310
42589
|
"pipelineAnalytics.deleteTracks": {
|
|
40311
42590
|
capName: "pipeline-analytics",
|
|
40312
42591
|
capScope: "device",
|
|
@@ -40511,6 +42790,24 @@ Object.freeze({
|
|
|
40511
42790
|
addonId: null,
|
|
40512
42791
|
access: "view"
|
|
40513
42792
|
},
|
|
42793
|
+
"pipelineAnalytics.listRetrainAssistProfiles": {
|
|
42794
|
+
capName: "pipeline-analytics",
|
|
42795
|
+
capScope: "device",
|
|
42796
|
+
addonId: null,
|
|
42797
|
+
access: "view"
|
|
42798
|
+
},
|
|
42799
|
+
"pipelineAnalytics.listRetrainCollectionFrames": {
|
|
42800
|
+
capName: "pipeline-analytics",
|
|
42801
|
+
capScope: "device",
|
|
42802
|
+
addonId: null,
|
|
42803
|
+
access: "view"
|
|
42804
|
+
},
|
|
42805
|
+
"pipelineAnalytics.listRetrainCollections": {
|
|
42806
|
+
capName: "pipeline-analytics",
|
|
42807
|
+
capScope: "device",
|
|
42808
|
+
addonId: null,
|
|
42809
|
+
access: "view"
|
|
42810
|
+
},
|
|
40514
42811
|
"pipelineAnalytics.listRetrainFrames": {
|
|
40515
42812
|
capName: "pipeline-analytics",
|
|
40516
42813
|
capScope: "device",
|
|
@@ -40559,6 +42856,12 @@ Object.freeze({
|
|
|
40559
42856
|
addonId: null,
|
|
40560
42857
|
access: "create"
|
|
40561
42858
|
},
|
|
42859
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": {
|
|
42860
|
+
capName: "pipeline-analytics",
|
|
42861
|
+
capScope: "device",
|
|
42862
|
+
addonId: null,
|
|
42863
|
+
access: "create"
|
|
42864
|
+
},
|
|
40562
42865
|
"pipelineAnalytics.pruneEvents": {
|
|
40563
42866
|
capName: "pipeline-analytics",
|
|
40564
42867
|
capScope: "device",
|
|
@@ -40613,6 +42916,18 @@ Object.freeze({
|
|
|
40613
42916
|
addonId: null,
|
|
40614
42917
|
access: "create"
|
|
40615
42918
|
},
|
|
42919
|
+
"pipelineAnalytics.removeRetrainFrameFromCollection": {
|
|
42920
|
+
capName: "pipeline-analytics",
|
|
42921
|
+
capScope: "device",
|
|
42922
|
+
addonId: null,
|
|
42923
|
+
access: "delete"
|
|
42924
|
+
},
|
|
42925
|
+
"pipelineAnalytics.renameRetrainCollection": {
|
|
42926
|
+
capName: "pipeline-analytics",
|
|
42927
|
+
capScope: "device",
|
|
42928
|
+
addonId: null,
|
|
42929
|
+
access: "create"
|
|
42930
|
+
},
|
|
40616
42931
|
"pipelineAnalytics.restageRetrainTrack": {
|
|
40617
42932
|
capName: "pipeline-analytics",
|
|
40618
42933
|
capScope: "device",
|
|
@@ -40643,6 +42958,12 @@ Object.freeze({
|
|
|
40643
42958
|
addonId: null,
|
|
40644
42959
|
access: "create"
|
|
40645
42960
|
},
|
|
42961
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
42962
|
+
capName: "pipeline-analytics",
|
|
42963
|
+
capScope: "device",
|
|
42964
|
+
addonId: null,
|
|
42965
|
+
access: "create"
|
|
42966
|
+
},
|
|
40646
42967
|
"pipelineAnalytics.setTrackFlags": {
|
|
40647
42968
|
capName: "pipeline-analytics",
|
|
40648
42969
|
capScope: "device",
|
|
@@ -40679,6 +43000,12 @@ Object.freeze({
|
|
|
40679
43000
|
addonId: null,
|
|
40680
43001
|
access: "delete"
|
|
40681
43002
|
},
|
|
43003
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
43004
|
+
capName: "pipeline-analytics",
|
|
43005
|
+
capScope: "device",
|
|
43006
|
+
addonId: null,
|
|
43007
|
+
access: "create"
|
|
43008
|
+
},
|
|
40682
43009
|
"pipelineExecutor.cacheFrameInPool": {
|
|
40683
43010
|
capName: "pipeline-executor",
|
|
40684
43011
|
capScope: "system",
|
|
@@ -40691,13 +43018,13 @@ Object.freeze({
|
|
|
40691
43018
|
addonId: null,
|
|
40692
43019
|
access: "delete"
|
|
40693
43020
|
},
|
|
40694
|
-
"pipelineExecutor.
|
|
43021
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": {
|
|
40695
43022
|
capName: "pipeline-executor",
|
|
40696
43023
|
capScope: "system",
|
|
40697
43024
|
addonId: null,
|
|
40698
43025
|
access: "delete"
|
|
40699
43026
|
},
|
|
40700
|
-
"pipelineExecutor.
|
|
43027
|
+
"pipelineExecutor.deleteModel": {
|
|
40701
43028
|
capName: "pipeline-executor",
|
|
40702
43029
|
capScope: "system",
|
|
40703
43030
|
addonId: null,
|
|
@@ -40841,12 +43168,6 @@ Object.freeze({
|
|
|
40841
43168
|
addonId: null,
|
|
40842
43169
|
access: "view"
|
|
40843
43170
|
},
|
|
40844
|
-
"pipelineExecutor.listTemplates": {
|
|
40845
|
-
capName: "pipeline-executor",
|
|
40846
|
-
capScope: "system",
|
|
40847
|
-
addonId: null,
|
|
40848
|
-
access: "view"
|
|
40849
|
-
},
|
|
40850
43171
|
"pipelineExecutor.rearmInferenceDevice": {
|
|
40851
43172
|
capName: "pipeline-executor",
|
|
40852
43173
|
capScope: "system",
|
|
@@ -40871,12 +43192,6 @@ Object.freeze({
|
|
|
40871
43192
|
addonId: null,
|
|
40872
43193
|
access: "create"
|
|
40873
43194
|
},
|
|
40874
|
-
"pipelineExecutor.saveTemplate": {
|
|
40875
|
-
capName: "pipeline-executor",
|
|
40876
|
-
capScope: "system",
|
|
40877
|
-
addonId: null,
|
|
40878
|
-
access: "create"
|
|
40879
|
-
},
|
|
40880
43195
|
"pipelineExecutor.setVideoPipelineSteps": {
|
|
40881
43196
|
capName: "pipeline-executor",
|
|
40882
43197
|
capScope: "system",
|
|
@@ -40895,17 +43210,23 @@ Object.freeze({
|
|
|
40895
43210
|
addonId: null,
|
|
40896
43211
|
access: "create"
|
|
40897
43212
|
},
|
|
40898
|
-
"pipelineExecutor.
|
|
43213
|
+
"pipelineExecutor.validatePipeline": {
|
|
40899
43214
|
capName: "pipeline-executor",
|
|
40900
43215
|
capScope: "system",
|
|
40901
43216
|
addonId: null,
|
|
43217
|
+
access: "view"
|
|
43218
|
+
},
|
|
43219
|
+
"pipelineOrchestrator.abortNodeBenchmark": {
|
|
43220
|
+
capName: "pipeline-orchestrator",
|
|
43221
|
+
capScope: "system",
|
|
43222
|
+
addonId: null,
|
|
40902
43223
|
access: "create"
|
|
40903
43224
|
},
|
|
40904
|
-
"
|
|
40905
|
-
capName: "pipeline-
|
|
43225
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
43226
|
+
capName: "pipeline-orchestrator",
|
|
40906
43227
|
capScope: "system",
|
|
40907
43228
|
addonId: null,
|
|
40908
|
-
access: "
|
|
43229
|
+
access: "create"
|
|
40909
43230
|
},
|
|
40910
43231
|
"pipelineOrchestrator.applyDeviceSettingsPatch": {
|
|
40911
43232
|
capName: "pipeline-orchestrator",
|
|
@@ -40925,7 +43246,7 @@ Object.freeze({
|
|
|
40925
43246
|
addonId: null,
|
|
40926
43247
|
access: "create"
|
|
40927
43248
|
},
|
|
40928
|
-
"pipelineOrchestrator.
|
|
43249
|
+
"pipelineOrchestrator.deleteNodeBenchmarkResult": {
|
|
40929
43250
|
capName: "pipeline-orchestrator",
|
|
40930
43251
|
capScope: "system",
|
|
40931
43252
|
addonId: null,
|
|
@@ -41021,6 +43342,12 @@ Object.freeze({
|
|
|
41021
43342
|
addonId: null,
|
|
41022
43343
|
access: "view"
|
|
41023
43344
|
},
|
|
43345
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
43346
|
+
capName: "pipeline-orchestrator",
|
|
43347
|
+
capScope: "system",
|
|
43348
|
+
addonId: null,
|
|
43349
|
+
access: "view"
|
|
43350
|
+
},
|
|
41024
43351
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
41025
43352
|
capName: "pipeline-orchestrator",
|
|
41026
43353
|
capScope: "system",
|
|
@@ -41033,6 +43360,24 @@ Object.freeze({
|
|
|
41033
43360
|
addonId: null,
|
|
41034
43361
|
access: "view"
|
|
41035
43362
|
},
|
|
43363
|
+
"pipelineOrchestrator.getNodeBenchmarkCandidates": {
|
|
43364
|
+
capName: "pipeline-orchestrator",
|
|
43365
|
+
capScope: "system",
|
|
43366
|
+
addonId: null,
|
|
43367
|
+
access: "view"
|
|
43368
|
+
},
|
|
43369
|
+
"pipelineOrchestrator.getNodeBenchmarkPreflight": {
|
|
43370
|
+
capName: "pipeline-orchestrator",
|
|
43371
|
+
capScope: "system",
|
|
43372
|
+
addonId: null,
|
|
43373
|
+
access: "view"
|
|
43374
|
+
},
|
|
43375
|
+
"pipelineOrchestrator.getNodeBenchmarkStatus": {
|
|
43376
|
+
capName: "pipeline-orchestrator",
|
|
43377
|
+
capScope: "system",
|
|
43378
|
+
addonId: null,
|
|
43379
|
+
access: "view"
|
|
43380
|
+
},
|
|
41036
43381
|
"pipelineOrchestrator.getNodeInferenceDevices": {
|
|
41037
43382
|
capName: "pipeline-orchestrator",
|
|
41038
43383
|
capScope: "system",
|
|
@@ -41057,6 +43402,12 @@ Object.freeze({
|
|
|
41057
43402
|
addonId: null,
|
|
41058
43403
|
access: "view"
|
|
41059
43404
|
},
|
|
43405
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
43406
|
+
capName: "pipeline-orchestrator",
|
|
43407
|
+
capScope: "system",
|
|
43408
|
+
addonId: null,
|
|
43409
|
+
access: "view"
|
|
43410
|
+
},
|
|
41060
43411
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
41061
43412
|
capName: "pipeline-orchestrator",
|
|
41062
43413
|
capScope: "system",
|
|
@@ -41069,7 +43420,7 @@ Object.freeze({
|
|
|
41069
43420
|
addonId: null,
|
|
41070
43421
|
access: "view"
|
|
41071
43422
|
},
|
|
41072
|
-
"pipelineOrchestrator.
|
|
43423
|
+
"pipelineOrchestrator.listNodeBenchmarkResults": {
|
|
41073
43424
|
capName: "pipeline-orchestrator",
|
|
41074
43425
|
capScope: "system",
|
|
41075
43426
|
addonId: null,
|
|
@@ -41081,6 +43432,12 @@ Object.freeze({
|
|
|
41081
43432
|
addonId: null,
|
|
41082
43433
|
access: "create"
|
|
41083
43434
|
},
|
|
43435
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
43436
|
+
capName: "pipeline-orchestrator",
|
|
43437
|
+
capScope: "system",
|
|
43438
|
+
addonId: null,
|
|
43439
|
+
access: "view"
|
|
43440
|
+
},
|
|
41084
43441
|
"pipelineOrchestrator.rebalance": {
|
|
41085
43442
|
capName: "pipeline-orchestrator",
|
|
41086
43443
|
capScope: "system",
|
|
@@ -41123,12 +43480,6 @@ Object.freeze({
|
|
|
41123
43480
|
addonId: null,
|
|
41124
43481
|
access: "create"
|
|
41125
43482
|
},
|
|
41126
|
-
"pipelineOrchestrator.saveTemplate": {
|
|
41127
|
-
capName: "pipeline-orchestrator",
|
|
41128
|
-
capScope: "system",
|
|
41129
|
-
addonId: null,
|
|
41130
|
-
access: "create"
|
|
41131
|
-
},
|
|
41132
43483
|
"pipelineOrchestrator.setAgentCapabilities": {
|
|
41133
43484
|
capName: "pipeline-orchestrator",
|
|
41134
43485
|
capScope: "system",
|
|
@@ -41141,12 +43492,6 @@ Object.freeze({
|
|
|
41141
43492
|
addonId: null,
|
|
41142
43493
|
access: "create"
|
|
41143
43494
|
},
|
|
41144
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
41145
|
-
capName: "pipeline-orchestrator",
|
|
41146
|
-
capScope: "system",
|
|
41147
|
-
addonId: null,
|
|
41148
|
-
access: "create"
|
|
41149
|
-
},
|
|
41150
43495
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
41151
43496
|
capName: "pipeline-orchestrator",
|
|
41152
43497
|
capScope: "system",
|
|
@@ -41183,6 +43528,12 @@ Object.freeze({
|
|
|
41183
43528
|
addonId: null,
|
|
41184
43529
|
access: "create"
|
|
41185
43530
|
},
|
|
43531
|
+
"pipelineOrchestrator.setCameraStepSettings": {
|
|
43532
|
+
capName: "pipeline-orchestrator",
|
|
43533
|
+
capScope: "system",
|
|
43534
|
+
addonId: null,
|
|
43535
|
+
access: "create"
|
|
43536
|
+
},
|
|
41186
43537
|
"pipelineOrchestrator.setCameraStepToggle": {
|
|
41187
43538
|
capName: "pipeline-orchestrator",
|
|
41188
43539
|
capScope: "system",
|
|
@@ -41201,12 +43552,36 @@ Object.freeze({
|
|
|
41201
43552
|
addonId: null,
|
|
41202
43553
|
access: "create"
|
|
41203
43554
|
},
|
|
43555
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
43556
|
+
capName: "pipeline-orchestrator",
|
|
43557
|
+
capScope: "system",
|
|
43558
|
+
addonId: null,
|
|
43559
|
+
access: "create"
|
|
43560
|
+
},
|
|
41204
43561
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
41205
43562
|
capName: "pipeline-orchestrator",
|
|
41206
43563
|
capScope: "system",
|
|
41207
43564
|
addonId: null,
|
|
41208
43565
|
access: "create"
|
|
41209
43566
|
},
|
|
43567
|
+
"pipelineOrchestrator.setShareSource": {
|
|
43568
|
+
capName: "pipeline-orchestrator",
|
|
43569
|
+
capScope: "system",
|
|
43570
|
+
addonId: null,
|
|
43571
|
+
access: "create"
|
|
43572
|
+
},
|
|
43573
|
+
"pipelineOrchestrator.startNodeBenchmark": {
|
|
43574
|
+
capName: "pipeline-orchestrator",
|
|
43575
|
+
capScope: "system",
|
|
43576
|
+
addonId: null,
|
|
43577
|
+
access: "create"
|
|
43578
|
+
},
|
|
43579
|
+
"pipelineOrchestrator.suggestShares": {
|
|
43580
|
+
capName: "pipeline-orchestrator",
|
|
43581
|
+
capScope: "system",
|
|
43582
|
+
addonId: null,
|
|
43583
|
+
access: "view"
|
|
43584
|
+
},
|
|
41210
43585
|
"pipelineOrchestrator.unassignAudio": {
|
|
41211
43586
|
capName: "pipeline-orchestrator",
|
|
41212
43587
|
capScope: "system",
|
|
@@ -41219,8 +43594,8 @@ Object.freeze({
|
|
|
41219
43594
|
addonId: null,
|
|
41220
43595
|
access: "create"
|
|
41221
43596
|
},
|
|
41222
|
-
"
|
|
41223
|
-
capName: "pipeline-
|
|
43597
|
+
"pipelineRunner.abortNodeBench": {
|
|
43598
|
+
capName: "pipeline-runner",
|
|
41224
43599
|
capScope: "system",
|
|
41225
43600
|
addonId: null,
|
|
41226
43601
|
access: "create"
|
|
@@ -41273,6 +43648,12 @@ Object.freeze({
|
|
|
41273
43648
|
addonId: null,
|
|
41274
43649
|
access: "view"
|
|
41275
43650
|
},
|
|
43651
|
+
"pipelineRunner.getNodeBenchStatus": {
|
|
43652
|
+
capName: "pipeline-runner",
|
|
43653
|
+
capScope: "system",
|
|
43654
|
+
addonId: null,
|
|
43655
|
+
access: "view"
|
|
43656
|
+
},
|
|
41276
43657
|
"pipelineRunner.getParkedTrackFrame": {
|
|
41277
43658
|
capName: "pipeline-runner",
|
|
41278
43659
|
capScope: "system",
|
|
@@ -41315,6 +43696,12 @@ Object.freeze({
|
|
|
41315
43696
|
addonId: null,
|
|
41316
43697
|
access: "create"
|
|
41317
43698
|
},
|
|
43699
|
+
"pipelineRunner.startNodeBench": {
|
|
43700
|
+
capName: "pipeline-runner",
|
|
43701
|
+
capScope: "system",
|
|
43702
|
+
addonId: null,
|
|
43703
|
+
access: "create"
|
|
43704
|
+
},
|
|
41318
43705
|
"plateGallery.assignPlate": {
|
|
41319
43706
|
capName: "plate-gallery",
|
|
41320
43707
|
capScope: "system",
|
|
@@ -42659,12 +45046,6 @@ Object.freeze({
|
|
|
42659
45046
|
addonId: null,
|
|
42660
45047
|
access: "view"
|
|
42661
45048
|
},
|
|
42662
|
-
"streamBroker.pullFrameHandles": {
|
|
42663
|
-
capName: "stream-broker",
|
|
42664
|
-
capScope: "system",
|
|
42665
|
-
addonId: null,
|
|
42666
|
-
access: "view"
|
|
42667
|
-
},
|
|
42668
45049
|
"streamBroker.regenerateRtspToken": {
|
|
42669
45050
|
capName: "stream-broker",
|
|
42670
45051
|
capScope: "system",
|
|
@@ -42731,12 +45112,6 @@ Object.freeze({
|
|
|
42731
45112
|
addonId: null,
|
|
42732
45113
|
access: "create"
|
|
42733
45114
|
},
|
|
42734
|
-
"streamBroker.subscribeFrames": {
|
|
42735
|
-
capName: "stream-broker",
|
|
42736
|
-
capScope: "system",
|
|
42737
|
-
addonId: null,
|
|
42738
|
-
access: "create"
|
|
42739
|
-
},
|
|
42740
45115
|
"streamBroker.unassignProfile": {
|
|
42741
45116
|
capName: "stream-broker",
|
|
42742
45117
|
capScope: "system",
|
|
@@ -42749,12 +45124,6 @@ Object.freeze({
|
|
|
42749
45124
|
addonId: null,
|
|
42750
45125
|
access: "create"
|
|
42751
45126
|
},
|
|
42752
|
-
"streamBroker.unsubscribeFrames": {
|
|
42753
|
-
capName: "stream-broker",
|
|
42754
|
-
capScope: "system",
|
|
42755
|
-
addonId: null,
|
|
42756
|
-
access: "create"
|
|
42757
|
-
},
|
|
42758
45127
|
"streamCatalog.getCatalog": {
|
|
42759
45128
|
capName: "stream-catalog",
|
|
42760
45129
|
capScope: "device",
|
|
@@ -43049,18 +45418,36 @@ Object.freeze({
|
|
|
43049
45418
|
addonId: null,
|
|
43050
45419
|
access: "delete"
|
|
43051
45420
|
},
|
|
45421
|
+
"userManagement.findUserByExternalIdentity": {
|
|
45422
|
+
capName: "user-management",
|
|
45423
|
+
capScope: "system",
|
|
45424
|
+
addonId: null,
|
|
45425
|
+
access: "view"
|
|
45426
|
+
},
|
|
43052
45427
|
"userManagement.getTotpStatus": {
|
|
43053
45428
|
capName: "user-management",
|
|
43054
45429
|
capScope: "system",
|
|
43055
45430
|
addonId: null,
|
|
43056
45431
|
access: "view"
|
|
43057
45432
|
},
|
|
45433
|
+
"userManagement.linkExternalIdentity": {
|
|
45434
|
+
capName: "user-management",
|
|
45435
|
+
capScope: "system",
|
|
45436
|
+
addonId: null,
|
|
45437
|
+
access: "create"
|
|
45438
|
+
},
|
|
43058
45439
|
"userManagement.listApiKeys": {
|
|
43059
45440
|
capName: "user-management",
|
|
43060
45441
|
capScope: "system",
|
|
43061
45442
|
addonId: null,
|
|
43062
45443
|
access: "view"
|
|
43063
45444
|
},
|
|
45445
|
+
"userManagement.listExternalIdentities": {
|
|
45446
|
+
capName: "user-management",
|
|
45447
|
+
capScope: "system",
|
|
45448
|
+
addonId: null,
|
|
45449
|
+
access: "view"
|
|
45450
|
+
},
|
|
43064
45451
|
"userManagement.listOauthSessions": {
|
|
43065
45452
|
capName: "user-management",
|
|
43066
45453
|
capScope: "system",
|
|
@@ -43139,6 +45526,12 @@ Object.freeze({
|
|
|
43139
45526
|
addonId: null,
|
|
43140
45527
|
access: "create"
|
|
43141
45528
|
},
|
|
45529
|
+
"userManagement.unlinkExternalIdentity": {
|
|
45530
|
+
capName: "user-management",
|
|
45531
|
+
capScope: "system",
|
|
45532
|
+
addonId: null,
|
|
45533
|
+
access: "delete"
|
|
45534
|
+
},
|
|
43142
45535
|
"userManagement.updateUser": {
|
|
43143
45536
|
capName: "user-management",
|
|
43144
45537
|
capScope: "system",
|
|
@@ -43451,6 +45844,12 @@ Object.freeze({
|
|
|
43451
45844
|
addonId: null,
|
|
43452
45845
|
access: "create"
|
|
43453
45846
|
},
|
|
45847
|
+
"webrtcSession.applyDownlinkProbe": {
|
|
45848
|
+
capName: "webrtc-session",
|
|
45849
|
+
capScope: "device",
|
|
45850
|
+
addonId: null,
|
|
45851
|
+
access: "create"
|
|
45852
|
+
},
|
|
43454
45853
|
"webrtcSession.closeSession": {
|
|
43455
45854
|
capName: "webrtc-session",
|
|
43456
45855
|
capScope: "device",
|
|
@@ -45262,11 +47661,6 @@ Object.freeze({
|
|
|
45262
47661
|
form: "single",
|
|
45263
47662
|
optional: false
|
|
45264
47663
|
}],
|
|
45265
|
-
"decoder.createSession": [{
|
|
45266
|
-
name: "deviceId",
|
|
45267
|
-
form: "single",
|
|
45268
|
-
optional: true
|
|
45269
|
-
}],
|
|
45270
47664
|
"detectionPipeline.applyDeviceSettingsPatch": [{
|
|
45271
47665
|
name: "deviceId",
|
|
45272
47666
|
form: "single",
|
|
@@ -46237,6 +48631,11 @@ Object.freeze({
|
|
|
46237
48631
|
form: "single",
|
|
46238
48632
|
optional: false
|
|
46239
48633
|
}],
|
|
48634
|
+
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
48635
|
+
name: "deviceId",
|
|
48636
|
+
form: "single",
|
|
48637
|
+
optional: false
|
|
48638
|
+
}],
|
|
46240
48639
|
"pipelineAnalytics.applyDeviceSettingsPatch": [{
|
|
46241
48640
|
name: "deviceId",
|
|
46242
48641
|
form: "single",
|
|
@@ -46427,6 +48826,11 @@ Object.freeze({
|
|
|
46427
48826
|
form: "single",
|
|
46428
48827
|
optional: false
|
|
46429
48828
|
}],
|
|
48829
|
+
"pipelineAnalytics.proposeRetrainAnnotationsWithLlm": [{
|
|
48830
|
+
name: "deviceId",
|
|
48831
|
+
form: "single",
|
|
48832
|
+
optional: false
|
|
48833
|
+
}],
|
|
46430
48834
|
"pipelineAnalytics.pruneEventsBefore": [{
|
|
46431
48835
|
name: "deviceId",
|
|
46432
48836
|
form: "single",
|
|
@@ -46477,6 +48881,11 @@ Object.freeze({
|
|
|
46477
48881
|
form: "single",
|
|
46478
48882
|
optional: false
|
|
46479
48883
|
}],
|
|
48884
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
48885
|
+
name: "deviceId",
|
|
48886
|
+
form: "single",
|
|
48887
|
+
optional: false
|
|
48888
|
+
}],
|
|
46480
48889
|
"pipelineAnalytics.setTrackFlags": [{
|
|
46481
48890
|
name: "deviceId",
|
|
46482
48891
|
form: "single",
|
|
@@ -46497,6 +48906,11 @@ Object.freeze({
|
|
|
46497
48906
|
form: "single",
|
|
46498
48907
|
optional: false
|
|
46499
48908
|
}],
|
|
48909
|
+
"pipelineExecutor.clearModelBoundDeviceOverrides": [{
|
|
48910
|
+
name: "deviceIds",
|
|
48911
|
+
form: "array",
|
|
48912
|
+
optional: true
|
|
48913
|
+
}],
|
|
46500
48914
|
"pipelineExecutor.runPipeline": [{
|
|
46501
48915
|
name: "deviceId",
|
|
46502
48916
|
form: "single",
|
|
@@ -46602,6 +49016,11 @@ Object.freeze({
|
|
|
46602
49016
|
form: "single",
|
|
46603
49017
|
optional: false
|
|
46604
49018
|
}],
|
|
49019
|
+
"pipelineOrchestrator.setCameraStepSettings": [{
|
|
49020
|
+
name: "deviceId",
|
|
49021
|
+
form: "single",
|
|
49022
|
+
optional: false
|
|
49023
|
+
}],
|
|
46605
49024
|
"pipelineOrchestrator.setCameraStepToggle": [{
|
|
46606
49025
|
name: "deviceId",
|
|
46607
49026
|
form: "single",
|
|
@@ -47373,6 +49792,11 @@ Object.freeze({
|
|
|
47373
49792
|
form: "single",
|
|
47374
49793
|
optional: false
|
|
47375
49794
|
}],
|
|
49795
|
+
"webrtcSession.applyDownlinkProbe": [{
|
|
49796
|
+
name: "deviceId",
|
|
49797
|
+
form: "single",
|
|
49798
|
+
optional: false
|
|
49799
|
+
}],
|
|
47376
49800
|
"webrtcSession.closeSession": [{
|
|
47377
49801
|
name: "deviceId",
|
|
47378
49802
|
form: "single",
|
|
@@ -47602,6 +50026,8 @@ new Map(Object.entries({
|
|
|
47602
50026
|
"detection-blind": "device-events",
|
|
47603
50027
|
"node-online": "system",
|
|
47604
50028
|
"node-offline": "system",
|
|
50029
|
+
"node-restarting": "system",
|
|
50030
|
+
"node-updating": "system",
|
|
47605
50031
|
"node-inference-unavailable": "system",
|
|
47606
50032
|
"addon-crash-loop": "system",
|
|
47607
50033
|
"addon-update-available": "system",
|
|
@@ -47679,6 +50105,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
47679
50105
|
kinds: [
|
|
47680
50106
|
"node-offline",
|
|
47681
50107
|
"node-online",
|
|
50108
|
+
"node-restarting",
|
|
47682
50109
|
"node-inference-unavailable"
|
|
47683
50110
|
]
|
|
47684
50111
|
},
|
|
@@ -47700,6 +50127,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
47700
50127
|
label: "Server & container updates",
|
|
47701
50128
|
kinds: [
|
|
47702
50129
|
"server-update-available",
|
|
50130
|
+
"node-updating",
|
|
47703
50131
|
"server-updated",
|
|
47704
50132
|
"wrapper-update-available"
|
|
47705
50133
|
]
|
|
@@ -47847,6 +50275,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
47847
50275
|
kinds: [
|
|
47848
50276
|
"node-offline",
|
|
47849
50277
|
"node-online",
|
|
50278
|
+
"node-restarting",
|
|
47850
50279
|
"node-inference-unavailable"
|
|
47851
50280
|
]
|
|
47852
50281
|
},
|
|
@@ -47868,6 +50297,7 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
47868
50297
|
example: "server 1.2.377 → 1.2.378",
|
|
47869
50298
|
kinds: [
|
|
47870
50299
|
"server-update-available",
|
|
50300
|
+
"node-updating",
|
|
47871
50301
|
"server-updated",
|
|
47872
50302
|
"wrapper-update-available"
|
|
47873
50303
|
]
|
|
@@ -47900,7 +50330,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
47900
50330
|
{
|
|
47901
50331
|
name: "summarySection",
|
|
47902
50332
|
label: "Summary: this section",
|
|
47903
|
-
description: "The section a per-section summary row is about
|
|
50333
|
+
description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
|
|
47904
50334
|
example: "Batterie scariche",
|
|
47905
50335
|
group: "system",
|
|
47906
50336
|
families: ["rule"],
|
|
@@ -48507,4 +50937,83 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
|
48507
50937
|
var MB = 1024 * 1024;
|
|
48508
50938
|
1024 * MB, 3072 * MB;
|
|
48509
50939
|
//#endregion
|
|
48510
|
-
|
|
50940
|
+
//#region src/auth-key-file.ts
|
|
50941
|
+
/**
|
|
50942
|
+
* Hand the Tailscale auth key to `tailscale up` without putting it on argv
|
|
50943
|
+
* or in the environment (D783).
|
|
50944
|
+
*
|
|
50945
|
+
* The CLI accepts `--auth-key=file:<path>` and reads the key from that file.
|
|
50946
|
+
* The key is written owner-only (0600) into a fresh owner-only (0700) temp
|
|
50947
|
+
* dir, the flag is handed to `run`, and the dir is removed when `run`
|
|
50948
|
+
* settles — success or failure. Error text is passed through
|
|
50949
|
+
* {@link scrubSecret} so a `Command failed: …` message can never carry it.
|
|
50950
|
+
*/
|
|
50951
|
+
var REDACTED = "‹redacted›";
|
|
50952
|
+
async function withAuthKeyFile(authKey, run) {
|
|
50953
|
+
const dir = await node_fs_promises.mkdtemp(node_path.join(node_os.tmpdir(), "camstack-ts-"));
|
|
50954
|
+
try {
|
|
50955
|
+
await node_fs_promises.chmod(dir, 448);
|
|
50956
|
+
const file = node_path.join(dir, "authkey");
|
|
50957
|
+
await node_fs_promises.writeFile(file, authKey, { mode: 384 });
|
|
50958
|
+
return await run(`--auth-key=file:${file}`);
|
|
50959
|
+
} finally {
|
|
50960
|
+
await node_fs_promises.rm(dir, {
|
|
50961
|
+
recursive: true,
|
|
50962
|
+
force: true
|
|
50963
|
+
});
|
|
50964
|
+
}
|
|
50965
|
+
}
|
|
50966
|
+
/** Replace every occurrence of `secret` in `text`. Empty secrets are a no-op. */
|
|
50967
|
+
function scrubSecret(text, secret) {
|
|
50968
|
+
if (!secret) return text;
|
|
50969
|
+
return text.split(secret).join(REDACTED);
|
|
50970
|
+
}
|
|
50971
|
+
//#endregion
|
|
50972
|
+
Object.defineProperty(exports, "BOOT_RECOVERY_BACKOFF_MS", {
|
|
50973
|
+
enumerable: true,
|
|
50974
|
+
get: function() {
|
|
50975
|
+
return BOOT_RECOVERY_BACKOFF_MS;
|
|
50976
|
+
}
|
|
50977
|
+
});
|
|
50978
|
+
Object.defineProperty(exports, "BaseAddon", {
|
|
50979
|
+
enumerable: true,
|
|
50980
|
+
get: function() {
|
|
50981
|
+
return BaseAddon;
|
|
50982
|
+
}
|
|
50983
|
+
});
|
|
50984
|
+
Object.defineProperty(exports, "EventCategory", {
|
|
50985
|
+
enumerable: true,
|
|
50986
|
+
get: function() {
|
|
50987
|
+
return EventCategory;
|
|
50988
|
+
}
|
|
50989
|
+
});
|
|
50990
|
+
Object.defineProperty(exports, "__toESM", {
|
|
50991
|
+
enumerable: true,
|
|
50992
|
+
get: function() {
|
|
50993
|
+
return __toESM;
|
|
50994
|
+
}
|
|
50995
|
+
});
|
|
50996
|
+
Object.defineProperty(exports, "meshNetworkCapability", {
|
|
50997
|
+
enumerable: true,
|
|
50998
|
+
get: function() {
|
|
50999
|
+
return meshNetworkCapability;
|
|
51000
|
+
}
|
|
51001
|
+
});
|
|
51002
|
+
Object.defineProperty(exports, "networkAccessCapability", {
|
|
51003
|
+
enumerable: true,
|
|
51004
|
+
get: function() {
|
|
51005
|
+
return networkAccessCapability;
|
|
51006
|
+
}
|
|
51007
|
+
});
|
|
51008
|
+
Object.defineProperty(exports, "scrubSecret", {
|
|
51009
|
+
enumerable: true,
|
|
51010
|
+
get: function() {
|
|
51011
|
+
return scrubSecret;
|
|
51012
|
+
}
|
|
51013
|
+
});
|
|
51014
|
+
Object.defineProperty(exports, "withAuthKeyFile", {
|
|
51015
|
+
enumerable: true,
|
|
51016
|
+
get: function() {
|
|
51017
|
+
return withAuthKeyFile;
|
|
51018
|
+
}
|
|
51019
|
+
});
|