@camstack/addon-provider-hikvision 1.1.19 → 1.1.21
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/addon.js +579 -297
- package/dist/addon.mjs +579 -297
- package/package.json +4 -1
package/dist/addon.js
CHANGED
|
@@ -4635,7 +4635,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4635
4635
|
return inst;
|
|
4636
4636
|
}
|
|
4637
4637
|
//#endregion
|
|
4638
|
-
//#region ../types/dist/sleep-
|
|
4638
|
+
//#region ../types/dist/sleep-DJaTV2D7.mjs
|
|
4639
4639
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4640
4640
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4641
4641
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -4821,6 +4821,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
4821
4821
|
*/
|
|
4822
4822
|
EventCategory["PipelineCameraUpdated"] = "pipeline.camera-updated";
|
|
4823
4823
|
/**
|
|
4824
|
+
* The cluster camera-source OWNER changed (`clusterRoles.ingestNode`).
|
|
4825
|
+
* Emitted by addon-pipeline-orchestrator whenever it (re)derives node
|
|
4826
|
+
* capabilities — at boot, on agent online/offline, and on an ingest-node
|
|
4827
|
+
* flip. Carries the resolved `ownerNodeId`. The stream-broker consumes it to
|
|
4828
|
+
* keep its ingest-owner-gate decision current WITHOUT a per-`ensureBroker`
|
|
4829
|
+
* cross-process `getIngestOwner` query (push the authority's decision instead
|
|
4830
|
+
* of polling it on the hot path). Idempotent state — re-emitted on every
|
|
4831
|
+
* topology change, so a dropped event self-heals on the next one (plus the
|
|
4832
|
+
* broker's long backstop reconcile query).
|
|
4833
|
+
*/
|
|
4834
|
+
EventCategory["PipelineIngestOwnerChanged"] = "pipeline.ingest-owner-changed";
|
|
4835
|
+
/**
|
|
4824
4836
|
* Periodic snapshot of per-node pipeline-runner load
|
|
4825
4837
|
* (`RunnerLocalLoad`). Emitted ~1Hz by every runner so UI dashboards
|
|
4826
4838
|
* subscribe instead of polling `pipelineRunner.getLocalLoad`.
|
|
@@ -5344,10 +5356,6 @@ function hydrateField(field, values) {
|
|
|
5344
5356
|
};
|
|
5345
5357
|
}
|
|
5346
5358
|
const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
|
|
5347
|
-
if (field.type === "password") return {
|
|
5348
|
-
...field,
|
|
5349
|
-
value: ""
|
|
5350
|
-
};
|
|
5351
5359
|
const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
|
|
5352
5360
|
return {
|
|
5353
5361
|
...field,
|
|
@@ -6735,6 +6743,9 @@ function method(input, output, options) {
|
|
|
6735
6743
|
function event(data) {
|
|
6736
6744
|
return { data };
|
|
6737
6745
|
}
|
|
6746
|
+
var StaticDirOutputSchema$1 = object({ staticDir: string() });
|
|
6747
|
+
var VersionOutputSchema$1 = object({ version: string() });
|
|
6748
|
+
method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
|
|
6738
6749
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6739
6750
|
var VersionOutputSchema = object({ version: string() });
|
|
6740
6751
|
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
@@ -6904,6 +6915,36 @@ var ModelFormatsSchema = object({
|
|
|
6904
6915
|
tflite: ModelFormatEntrySchema.optional(),
|
|
6905
6916
|
pt: ModelFormatEntrySchema.optional()
|
|
6906
6917
|
});
|
|
6918
|
+
/**
|
|
6919
|
+
* Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
|
|
6920
|
+
* the reduced `PipelineModelOption` returned in `pipeline.getSchema()` so the
|
|
6921
|
+
* grouped Family→Tier→Variant picker renders identically in the config UI and
|
|
6922
|
+
* in the pipeline/device steppers. The flat `id` stays the source of truth for
|
|
6923
|
+
* resolution/download/persistence; this is a presentation overlay resolved back
|
|
6924
|
+
* to an `id`.
|
|
6925
|
+
*/
|
|
6926
|
+
var ModelVariantGroupSchema = object({
|
|
6927
|
+
/** Top-level family, e.g. `yolo26` (later `d-fine`, `rf-detr`). */
|
|
6928
|
+
family: string(),
|
|
6929
|
+
/** Size within the family, e.g. `n` | `s` | `m` | `l`. */
|
|
6930
|
+
tier: string(),
|
|
6931
|
+
/** Quantization axis. Omit ⇒ the fp32 base build. */
|
|
6932
|
+
precision: _enum(["fp32", "int8"]).optional(),
|
|
6933
|
+
/**
|
|
6934
|
+
* Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
|
|
6935
|
+
* latency-optimized export (e.g. ReLU-activation variant) — the slot the
|
|
6936
|
+
* future performance variants plug into.
|
|
6937
|
+
*/
|
|
6938
|
+
optimization: _enum(["standard", "fast"]).optional(),
|
|
6939
|
+
/**
|
|
6940
|
+
* Input-resolution axis (square input side, px). Omit ⇒ the family's native
|
|
6941
|
+
* resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
|
|
6942
|
+
* cheap latency lever — especially on Apple ANE and the Intel N100 — at a
|
|
6943
|
+
* small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
|
|
6944
|
+
* the group so the selector can offer it as a variant axis.
|
|
6945
|
+
*/
|
|
6946
|
+
resolution: number().int().positive().optional()
|
|
6947
|
+
});
|
|
6907
6948
|
var ModelCatalogEntrySchema = object({
|
|
6908
6949
|
id: string(),
|
|
6909
6950
|
name: string(),
|
|
@@ -6933,7 +6974,43 @@ var ModelCatalogEntrySchema = object({
|
|
|
6933
6974
|
* Auxiliary files required at runtime (labels JSON, charset dict, etc.).
|
|
6934
6975
|
* Downloaded into the same modelsDir alongside the model file.
|
|
6935
6976
|
*/
|
|
6936
|
-
extraFiles: array(ModelExtraFileSchema).readonly().optional()
|
|
6977
|
+
extraFiles: array(ModelExtraFileSchema).readonly().optional(),
|
|
6978
|
+
/**
|
|
6979
|
+
* LEGACY entry — retained in the catalog so a persisted operator selection
|
|
6980
|
+
* still RESOLVES (and can be re-activated), but hidden from the selectable
|
|
6981
|
+
* model list and excluded from the auto format-default pick. Set on the
|
|
6982
|
+
* superseded / consolidated models (older lineages, redundant fp16 IRs) so
|
|
6983
|
+
* the active lineup stays the coherent curated ladder without deleting a
|
|
6984
|
+
* model anyone may still be pinned to. `resolveModelForFormat` keeps honoring
|
|
6985
|
+
* an explicit legacy id that has a build for the node's format.
|
|
6986
|
+
*/
|
|
6987
|
+
legacy: boolean().optional(),
|
|
6988
|
+
/**
|
|
6989
|
+
* Measured quality/latency metadata — populated from the benchmark addon on
|
|
6990
|
+
* the real node classes. Absent = not yet measured (most entries today; the
|
|
6991
|
+
* catalog historically carried only `sizeMB`, a poor cross-architecture
|
|
6992
|
+
* speed proxy). `p95LatencyMs` is keyed by node class (e.g. `n100`, `mac`).
|
|
6993
|
+
*/
|
|
6994
|
+
metrics: object({
|
|
6995
|
+
map50: number().optional(),
|
|
6996
|
+
p95LatencyMs: record(string(), number()).optional()
|
|
6997
|
+
}).optional(),
|
|
6998
|
+
/**
|
|
6999
|
+
* SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
|
|
7000
|
+
* YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
|
|
7001
|
+
* the retraining addon and any future commercial distribution.
|
|
7002
|
+
*/
|
|
7003
|
+
license: string().optional(),
|
|
7004
|
+
/**
|
|
7005
|
+
* Variant-selector grouping. The UI groups models by `family` + `tier` and
|
|
7006
|
+
* offers `precision` / `optimization` as variant axes WITHIN a tier — so all
|
|
7007
|
+
* of a family's sizes and quantizations collapse into one grouped picker
|
|
7008
|
+
* instead of a flat list of `yolo26s`, `yolo26s-int8`, … Absent ⇒ ungrouped
|
|
7009
|
+
* (legacy / custom models) — never shown in the grouped selector. The flat
|
|
7010
|
+
* `id` stays the source of truth for resolution/download/persistence; grouping
|
|
7011
|
+
* is a presentation overlay resolved back to an `id`.
|
|
7012
|
+
*/
|
|
7013
|
+
group: ModelVariantGroupSchema.optional()
|
|
6937
7014
|
});
|
|
6938
7015
|
var ConvertTargetSchema = discriminatedUnion("format", [object({
|
|
6939
7016
|
format: literal("openvino"),
|
|
@@ -7169,8 +7246,8 @@ var RecordingModeSchema = _enum([
|
|
|
7169
7246
|
"onAudioThreshold"
|
|
7170
7247
|
]);
|
|
7171
7248
|
/**
|
|
7172
|
-
* First-class, authoritative per-camera storage mode — the
|
|
7173
|
-
* reads directly (never inferred from `rules`):
|
|
7249
|
+
* First-class, authoritative per-camera storage mode — the explicit choice the
|
|
7250
|
+
* UI reads directly (never inferred from `rules`):
|
|
7174
7251
|
* - `off` — not recording.
|
|
7175
7252
|
* - `events` — record only around triggers (motion / audio threshold),
|
|
7176
7253
|
* with pre/post-buffer.
|
|
@@ -8709,6 +8786,72 @@ function createRuntimeStateBridge(params) {
|
|
|
8709
8786
|
getStatus
|
|
8710
8787
|
};
|
|
8711
8788
|
}
|
|
8789
|
+
/** Reject after `ms`; always clears its own timer. */
|
|
8790
|
+
async function withTimeout$1(promise, ms, label) {
|
|
8791
|
+
let timer;
|
|
8792
|
+
const timeout = new Promise((_resolve, reject) => {
|
|
8793
|
+
timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`${label} timed out after ${String(ms)}ms`)), ms);
|
|
8794
|
+
});
|
|
8795
|
+
try {
|
|
8796
|
+
return await Promise.race([promise, timeout]);
|
|
8797
|
+
} finally {
|
|
8798
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
/**
|
|
8802
|
+
* Start the reachability poll loop. Returns a handle whose `stop()` clears the
|
|
8803
|
+
* timer and prevents any further ticks. Start on device activation, stop on
|
|
8804
|
+
* device teardown (`removeDevice`) so no timer leaks.
|
|
8805
|
+
*/
|
|
8806
|
+
function startReachabilityPoll(options) {
|
|
8807
|
+
const intervalMs = options.intervalMs ?? 3e4;
|
|
8808
|
+
const failuresToOffline = options.failuresToOffline ?? 3;
|
|
8809
|
+
const probeTimeoutMs = options.probeTimeoutMs ?? 1e4;
|
|
8810
|
+
const runImmediately = options.runImmediately ?? true;
|
|
8811
|
+
let stopped = false;
|
|
8812
|
+
let running = false;
|
|
8813
|
+
let consecutiveFailures = 0;
|
|
8814
|
+
let timer;
|
|
8815
|
+
const tick = async () => {
|
|
8816
|
+
if (stopped) return;
|
|
8817
|
+
if (running) return;
|
|
8818
|
+
if (options.isEnabled && !options.isEnabled()) return;
|
|
8819
|
+
running = true;
|
|
8820
|
+
try {
|
|
8821
|
+
const reachable = await withTimeout$1(Promise.resolve().then(options.probe), probeTimeoutMs, "reachability probe");
|
|
8822
|
+
if (stopped) return;
|
|
8823
|
+
if (reachable) {
|
|
8824
|
+
consecutiveFailures = 0;
|
|
8825
|
+
options.setOnline(true);
|
|
8826
|
+
} else registerFailure("probe resolved unreachable");
|
|
8827
|
+
} catch (error) {
|
|
8828
|
+
if (stopped) return;
|
|
8829
|
+
registerFailure(error instanceof Error ? error.message : "probe threw");
|
|
8830
|
+
} finally {
|
|
8831
|
+
running = false;
|
|
8832
|
+
}
|
|
8833
|
+
};
|
|
8834
|
+
const registerFailure = (reason) => {
|
|
8835
|
+
consecutiveFailures += 1;
|
|
8836
|
+
options.logger?.debug("reachability probe failed", {
|
|
8837
|
+
reason,
|
|
8838
|
+
consecutiveFailures,
|
|
8839
|
+
failuresToOffline
|
|
8840
|
+
});
|
|
8841
|
+
if (consecutiveFailures >= failuresToOffline) options.setOnline(false);
|
|
8842
|
+
};
|
|
8843
|
+
timer = setInterval(() => {
|
|
8844
|
+
tick();
|
|
8845
|
+
}, intervalMs);
|
|
8846
|
+
if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
|
|
8847
|
+
if (runImmediately) tick();
|
|
8848
|
+
return { stop: () => {
|
|
8849
|
+
if (stopped) return;
|
|
8850
|
+
stopped = true;
|
|
8851
|
+
if (timer !== void 0) clearInterval(timer);
|
|
8852
|
+
timer = void 0;
|
|
8853
|
+
} };
|
|
8854
|
+
}
|
|
8712
8855
|
/**
|
|
8713
8856
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
8714
8857
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
@@ -9372,26 +9515,13 @@ onBrightnessChanged: { data: object({
|
|
|
9372
9515
|
*/
|
|
9373
9516
|
runtimeState: BrightnessStatusSchema
|
|
9374
9517
|
};
|
|
9518
|
+
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
9375
9519
|
var StreamFormatSchema = _enum([
|
|
9376
9520
|
"webrtc",
|
|
9377
9521
|
"hls",
|
|
9378
9522
|
"mjpeg",
|
|
9379
9523
|
"rtsp"
|
|
9380
9524
|
]);
|
|
9381
|
-
var StreamInfoSchema = object({
|
|
9382
|
-
streamId: string(),
|
|
9383
|
-
format: StreamFormatSchema,
|
|
9384
|
-
url: string().nullable(),
|
|
9385
|
-
active: boolean()
|
|
9386
|
-
});
|
|
9387
|
-
method(object({
|
|
9388
|
-
streamId: string(),
|
|
9389
|
-
sourceUrl: string(),
|
|
9390
|
-
codec: string().optional()
|
|
9391
|
-
}), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
|
|
9392
|
-
streamId: string(),
|
|
9393
|
-
format: StreamFormatSchema
|
|
9394
|
-
}), string().nullable()), method(_void(), array(StreamInfoSchema));
|
|
9395
9525
|
var RtspRestreamEntrySchema = object({
|
|
9396
9526
|
brokerId: string(),
|
|
9397
9527
|
url: string(),
|
|
@@ -10259,37 +10389,7 @@ var consumablesCapability = {
|
|
|
10259
10389
|
scope: "device",
|
|
10260
10390
|
deviceNative: true,
|
|
10261
10391
|
mode: "singleton",
|
|
10262
|
-
deviceTypes:
|
|
10263
|
-
DeviceType.Camera,
|
|
10264
|
-
DeviceType.Hub,
|
|
10265
|
-
DeviceType.Light,
|
|
10266
|
-
DeviceType.Siren,
|
|
10267
|
-
DeviceType.Switch,
|
|
10268
|
-
DeviceType.Sensor,
|
|
10269
|
-
DeviceType.Thermostat,
|
|
10270
|
-
DeviceType.Button,
|
|
10271
|
-
DeviceType.EventEmitter,
|
|
10272
|
-
DeviceType.Update,
|
|
10273
|
-
DeviceType.Generic,
|
|
10274
|
-
DeviceType.Notifier,
|
|
10275
|
-
DeviceType.Script,
|
|
10276
|
-
DeviceType.Automation,
|
|
10277
|
-
DeviceType.Lock,
|
|
10278
|
-
DeviceType.Cover,
|
|
10279
|
-
DeviceType.Valve,
|
|
10280
|
-
DeviceType.Humidifier,
|
|
10281
|
-
DeviceType.WaterHeater,
|
|
10282
|
-
DeviceType.Fan,
|
|
10283
|
-
DeviceType.MediaPlayer,
|
|
10284
|
-
DeviceType.AlarmPanel,
|
|
10285
|
-
DeviceType.Control,
|
|
10286
|
-
DeviceType.Presence,
|
|
10287
|
-
DeviceType.Weather,
|
|
10288
|
-
DeviceType.Vacuum,
|
|
10289
|
-
DeviceType.LawnMower,
|
|
10290
|
-
DeviceType.Container,
|
|
10291
|
-
DeviceType.Image
|
|
10292
|
-
],
|
|
10392
|
+
deviceTypes: Object.values(DeviceType),
|
|
10293
10393
|
deviceConfig: { ui: {
|
|
10294
10394
|
kind: "widget",
|
|
10295
10395
|
widgetId: "host/consumables-panel",
|
|
@@ -11747,7 +11847,7 @@ var BoundingBoxSchema = object({
|
|
|
11747
11847
|
w: number(),
|
|
11748
11848
|
h: number()
|
|
11749
11849
|
});
|
|
11750
|
-
|
|
11850
|
+
object({
|
|
11751
11851
|
class: string(),
|
|
11752
11852
|
originalClass: string(),
|
|
11753
11853
|
score: number(),
|
|
@@ -11882,7 +11982,6 @@ var PipelineDefaultStepSchema = lazy(() => object({
|
|
|
11882
11982
|
enabled: boolean(),
|
|
11883
11983
|
modelId: string(),
|
|
11884
11984
|
children: array(PipelineDefaultStepSchema).readonly(),
|
|
11885
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
11886
11985
|
group: string().optional(),
|
|
11887
11986
|
settings: record(string(), unknown()).optional()
|
|
11888
11987
|
}));
|
|
@@ -11907,7 +12006,9 @@ var PipelineModelOptionSchema = object({
|
|
|
11907
12006
|
formats: record(string(), object({
|
|
11908
12007
|
downloaded: boolean(),
|
|
11909
12008
|
sizeMB: number()
|
|
11910
|
-
}))
|
|
12009
|
+
})),
|
|
12010
|
+
group: ModelVariantGroupSchema.optional(),
|
|
12011
|
+
legacy: boolean().optional()
|
|
11911
12012
|
});
|
|
11912
12013
|
var ConfigFieldBridge = custom();
|
|
11913
12014
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -11937,11 +12038,6 @@ var PipelineSchemaSchema = object({
|
|
|
11937
12038
|
selectedEngine: PipelineEngineChoiceSchema,
|
|
11938
12039
|
slots: array(PipelineSlotSchemaSchema).readonly()
|
|
11939
12040
|
});
|
|
11940
|
-
var DetectorOutputSchema = object({
|
|
11941
|
-
detections: array(SpatialDetectionSchema).readonly(),
|
|
11942
|
-
inferenceMs: number(),
|
|
11943
|
-
modelId: string()
|
|
11944
|
-
});
|
|
11945
12041
|
var EngineProvisioningSchema = object({
|
|
11946
12042
|
runtimeId: _enum([
|
|
11947
12043
|
"onnx",
|
|
@@ -11958,15 +12054,42 @@ var EngineProvisioningSchema = object({
|
|
|
11958
12054
|
]),
|
|
11959
12055
|
progress: number().optional(),
|
|
11960
12056
|
error: string().optional(),
|
|
11961
|
-
nextRetryAt: number().optional()
|
|
12057
|
+
nextRetryAt: number().optional(),
|
|
12058
|
+
/**
|
|
12059
|
+
* Gate A (config-correctness gate at engine change): human-readable
|
|
12060
|
+
* config issues surfaced EAGERLY when the node's engine changes — model
|
|
12061
|
+
* substitutions ("chose X, running Y") and zero-build steps ("no model
|
|
12062
|
+
* has a <format> build"). Additive/optional: informational only, never
|
|
12063
|
+
* enforced here — `assertEngineReady` (readiness) still gates inference.
|
|
12064
|
+
* Absent/empty when the node-default tree resolves cleanly.
|
|
12065
|
+
*/
|
|
12066
|
+
configIssues: array(string()).optional()
|
|
11962
12067
|
});
|
|
11963
12068
|
var PipelineStepInputSchema = lazy(() => object({
|
|
11964
12069
|
addonId: string(),
|
|
11965
|
-
modelId: string(),
|
|
12070
|
+
modelId: string().optional(),
|
|
11966
12071
|
enabled: boolean().default(true),
|
|
11967
12072
|
children: array(PipelineStepInputSchema).optional(),
|
|
11968
12073
|
settings: record(string(), unknown()).optional()
|
|
11969
12074
|
}));
|
|
12075
|
+
var ModelSubstitutionSchema = object({
|
|
12076
|
+
addonId: string(),
|
|
12077
|
+
chosen: string(),
|
|
12078
|
+
running: string(),
|
|
12079
|
+
format: string()
|
|
12080
|
+
});
|
|
12081
|
+
var PipelineValidationIssueSchema = object({
|
|
12082
|
+
addonId: string(),
|
|
12083
|
+
kind: _enum(["unknown-addon", "no-format-build"]),
|
|
12084
|
+
detail: string()
|
|
12085
|
+
});
|
|
12086
|
+
var PipelineValidationResultSchema = object({
|
|
12087
|
+
ok: boolean(),
|
|
12088
|
+
issues: array(PipelineValidationIssueSchema).readonly(),
|
|
12089
|
+
substitutions: array(ModelSubstitutionSchema).readonly(),
|
|
12090
|
+
/** The node's `currentEngine.format` this validation ran against. */
|
|
12091
|
+
format: string()
|
|
12092
|
+
});
|
|
11970
12093
|
var ReferenceImageEntrySchema = object({
|
|
11971
12094
|
filename: string(),
|
|
11972
12095
|
stepIds: array(string()).readonly().optional()
|
|
@@ -12037,7 +12160,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
12037
12160
|
})) }), object({ success: literal(true) }), {
|
|
12038
12161
|
kind: "mutation",
|
|
12039
12162
|
auth: "admin"
|
|
12040
|
-
}), method(
|
|
12163
|
+
}), method(object({ nodeId: string() }), object({
|
|
12164
|
+
success: literal(true),
|
|
12165
|
+
clearedDevices: number()
|
|
12166
|
+
}), {
|
|
12167
|
+
kind: "mutation",
|
|
12168
|
+
auth: "admin"
|
|
12169
|
+
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({ steps: array(PipelineStepInputSchema) }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
|
|
12041
12170
|
name: string(),
|
|
12042
12171
|
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
12043
12172
|
engine: PipelineEngineChoiceSchema
|
|
@@ -12054,10 +12183,6 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
12054
12183
|
modelId: string(),
|
|
12055
12184
|
format: ModelFormatSchema$1
|
|
12056
12185
|
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
12057
|
-
addonId: string(),
|
|
12058
|
-
frame: FrameInputSchema,
|
|
12059
|
-
config: record(string(), unknown()).optional()
|
|
12060
|
-
}), DetectorOutputSchema), method(object({
|
|
12061
12186
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
12062
12187
|
steps: array(PipelineStepInputSchema).min(1),
|
|
12063
12188
|
frame: FrameInputSchema.optional(),
|
|
@@ -12330,6 +12455,13 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
12330
12455
|
kind: literal("remote-restream"),
|
|
12331
12456
|
/** The camera's source-owner node (slice 1: always the hub). */
|
|
12332
12457
|
ownerNodeId: string(),
|
|
12458
|
+
/**
|
|
12459
|
+
* The owner's LAN-reachable host, resolved by the orchestrator from the
|
|
12460
|
+
* per-node `reachableHost` override (Cluster UI). When present the runner
|
|
12461
|
+
* dials THIS host for the owner's restream, in preference to the
|
|
12462
|
+
* `CAMSTACK_HUB_URL`-derived default. Absent → auto-detect fallback.
|
|
12463
|
+
*/
|
|
12464
|
+
ownerReachableHost: string().optional(),
|
|
12333
12465
|
/** Operator override for the owner host the runner dials. */
|
|
12334
12466
|
hubHostnameOverride: string().optional()
|
|
12335
12467
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
@@ -12338,13 +12470,11 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
12338
12470
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
12339
12471
|
* runner needs to subscribe to the local broker and execute inference.
|
|
12340
12472
|
*
|
|
12341
|
-
* Stateless-pipeline model: the
|
|
12342
|
-
*
|
|
12343
|
-
*
|
|
12344
|
-
*
|
|
12345
|
-
*
|
|
12346
|
-
* `engine`/`steps`/`audio` are optional during the additive migration
|
|
12347
|
-
* window; once orchestrator + UI are migrated they become required.
|
|
12473
|
+
* Stateless-pipeline model: the pipeline content (`steps`, optional
|
|
12474
|
+
* `audio`) travels with the attach payload. The runner keeps it in RAM
|
|
12475
|
+
* for the lifetime of the attach — on rebalance, edit, or restart the
|
|
12476
|
+
* orchestrator re-sends the latest snapshot. Engine is NOT carried: it is
|
|
12477
|
+
* node-local, resolved by the executing runner at dispatch time.
|
|
12348
12478
|
*/
|
|
12349
12479
|
var RunnerCameraConfigSchema = object({
|
|
12350
12480
|
deviceId: number(),
|
|
@@ -12395,14 +12525,11 @@ var RunnerCameraConfigSchema = object({
|
|
|
12395
12525
|
*/
|
|
12396
12526
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
12397
12527
|
pipelineEnabled: boolean().default(true),
|
|
12398
|
-
/** Engine choice for video steps (runtime+backend+format). */
|
|
12399
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
12400
12528
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
12401
12529
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
12402
12530
|
/** Audio classification branch. `enabled:false` disables, null skips. */
|
|
12403
12531
|
audio: object({
|
|
12404
|
-
|
|
12405
|
-
modelId: string(),
|
|
12532
|
+
modelId: string().optional(),
|
|
12406
12533
|
enabled: boolean()
|
|
12407
12534
|
}).nullable().optional(),
|
|
12408
12535
|
/**
|
|
@@ -15420,7 +15547,9 @@ var AddonPageDeclarationSchema$1 = object({
|
|
|
15420
15547
|
icon: string(),
|
|
15421
15548
|
path: string(),
|
|
15422
15549
|
remoteName: string(),
|
|
15423
|
-
bundle: string()
|
|
15550
|
+
bundle: string(),
|
|
15551
|
+
section: string().optional(),
|
|
15552
|
+
sectionLabel: string().optional()
|
|
15424
15553
|
});
|
|
15425
15554
|
var AddonPageInfoSchema = object({
|
|
15426
15555
|
addonId: string(),
|
|
@@ -15460,7 +15589,18 @@ var AddonPageDeclarationSchema = object({
|
|
|
15460
15589
|
* the static-file route can compute an mtime-based cache-buster URL
|
|
15461
15590
|
* without a separate filesystem stat.
|
|
15462
15591
|
*/
|
|
15463
|
-
bundle: string()
|
|
15592
|
+
bundle: string(),
|
|
15593
|
+
/**
|
|
15594
|
+
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
15595
|
+
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
15596
|
+
* Any OTHER string creates (or joins) a custom section rendered after
|
|
15597
|
+
* the built-in groups; its label comes from `sectionLabel` (first
|
|
15598
|
+
* declaration wins), falling back to the id. Absent → the legacy
|
|
15599
|
+
* "Addon Pages" group.
|
|
15600
|
+
*/
|
|
15601
|
+
section: string().optional(),
|
|
15602
|
+
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
15603
|
+
sectionLabel: string().optional()
|
|
15464
15604
|
});
|
|
15465
15605
|
method(_void(), array(AddonPageDeclarationSchema).readonly());
|
|
15466
15606
|
var AddonHttpRouteSchema = object({
|
|
@@ -15676,6 +15816,17 @@ var WidgetMetadataSchema = object({
|
|
|
15676
15816
|
deviceContext: boolean().default(false),
|
|
15677
15817
|
integrationContext: boolean().default(false)
|
|
15678
15818
|
}),
|
|
15819
|
+
/**
|
|
15820
|
+
* Loadable BEFORE authentication. The normal widget registry listing
|
|
15821
|
+
* (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
|
|
15822
|
+
* (the login page) cannot discover a widget through it. A widget that
|
|
15823
|
+
* declares `preAuth: true` marks itself as safe to mount on a pre-auth
|
|
15824
|
+
* screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
|
|
15825
|
+
* login-method contribution channel (see `login-method.cap.ts`) rather
|
|
15826
|
+
* than the authenticated registry, and its bundle is served by the
|
|
15827
|
+
* public `/api/addon-widgets/:addonId/*` static route. Defaults false.
|
|
15828
|
+
*/
|
|
15829
|
+
preAuth: boolean().optional().default(false),
|
|
15679
15830
|
/** Dashboard placement HINTS (operator can override per instance). */
|
|
15680
15831
|
defaultSize: WidgetSizeEnum.default("md"),
|
|
15681
15832
|
allowedSizes: array(WidgetSizeEnum).readonly().default([
|
|
@@ -15977,6 +16128,66 @@ method(object({
|
|
|
15977
16128
|
password: string()
|
|
15978
16129
|
}), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
|
|
15979
16130
|
/**
|
|
16131
|
+
* `login-method` — collection cap through which auth addons contribute
|
|
16132
|
+
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
16133
|
+
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
16134
|
+
* every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
|
|
16135
|
+
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
16136
|
+
* procedure aggregates them for the unauthenticated login page.
|
|
16137
|
+
*
|
|
16138
|
+
* A contribution is a discriminated union on `kind`:
|
|
16139
|
+
*
|
|
16140
|
+
* - `redirect` — a declarative button. The login page renders a generic
|
|
16141
|
+
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
16142
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
|
|
16143
|
+
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
16144
|
+
* login page needs NO change.
|
|
16145
|
+
*
|
|
16146
|
+
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
16147
|
+
* `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
|
|
16148
|
+
* login ceremony, which must run `@simplewebauthn/browser` INSIDE the
|
|
16149
|
+
* addon bundle. The referenced widget also declares `preAuth: true` in
|
|
16150
|
+
* its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
|
|
16151
|
+
* stamps a public `bundleUrl` from `addonId` + `bundle`.
|
|
16152
|
+
*
|
|
16153
|
+
* Every contribution carries a `stage`:
|
|
16154
|
+
* - `primary` — shown on the first credentials screen (OIDC /
|
|
16155
|
+
* magic-link buttons; a future usernameless passkey).
|
|
16156
|
+
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
16157
|
+
* returned `factors` (passkey-as-2FA today).
|
|
16158
|
+
*
|
|
16159
|
+
* `mount: skip` — the cap is read server-side by the core auth router
|
|
16160
|
+
* (`registry.getCollection('login-method')`), never mounted as its own
|
|
16161
|
+
* tRPC router.
|
|
16162
|
+
*/
|
|
16163
|
+
/** When a login method renders in the two-phase login flow. */
|
|
16164
|
+
var LoginStageEnum = _enum(["primary", "second-factor"]);
|
|
16165
|
+
/** One login-method contribution — redirect button OR pre-auth widget. */
|
|
16166
|
+
var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
|
|
16167
|
+
kind: literal("redirect"),
|
|
16168
|
+
/** Stable id within the login-method set (e.g. `auth-oidc/google`). */
|
|
16169
|
+
id: string(),
|
|
16170
|
+
/** Operator-facing button label. */
|
|
16171
|
+
label: string(),
|
|
16172
|
+
/** lucide-react icon name. */
|
|
16173
|
+
icon: string().optional(),
|
|
16174
|
+
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
16175
|
+
startUrl: string(),
|
|
16176
|
+
stage: LoginStageEnum
|
|
16177
|
+
}), object({
|
|
16178
|
+
kind: literal("widget"),
|
|
16179
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
|
|
16180
|
+
id: string(),
|
|
16181
|
+
/** Owning addon id — drives the public bundle URL + the MF namespace. */
|
|
16182
|
+
addonId: string(),
|
|
16183
|
+
/** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
|
|
16184
|
+
bundle: string(),
|
|
16185
|
+
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
16186
|
+
remote: WidgetRemoteSchema,
|
|
16187
|
+
stage: LoginStageEnum
|
|
16188
|
+
})]);
|
|
16189
|
+
method(_void(), array(LoginMethodContributionSchema).readonly());
|
|
16190
|
+
/**
|
|
15980
16191
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
15981
16192
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
15982
16193
|
* (admin UI, restore flow) see one canonical key.
|
|
@@ -18277,11 +18488,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18277
18488
|
timestamp: number()
|
|
18278
18489
|
});
|
|
18279
18490
|
var CameraPipelineConfigSchema = object({
|
|
18280
|
-
engine: PipelineEngineChoiceSchema,
|
|
18491
|
+
engine: PipelineEngineChoiceSchema.optional(),
|
|
18281
18492
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
18282
18493
|
audio: object({
|
|
18283
|
-
engine: PipelineEngineChoiceSchema,
|
|
18284
|
-
modelId: string(),
|
|
18494
|
+
engine: PipelineEngineChoiceSchema.optional(),
|
|
18495
|
+
modelId: string().optional(),
|
|
18285
18496
|
enabled: boolean(),
|
|
18286
18497
|
settings: record(string(), unknown()).readonly().optional()
|
|
18287
18498
|
}).nullable().optional()
|
|
@@ -18296,7 +18507,7 @@ var PipelineTemplateSchema = object({
|
|
|
18296
18507
|
});
|
|
18297
18508
|
var AgentAddonConfigSchema = object({
|
|
18298
18509
|
enabled: boolean(),
|
|
18299
|
-
modelId: string(),
|
|
18510
|
+
modelId: string().optional(),
|
|
18300
18511
|
settings: record(string(), unknown()).readonly()
|
|
18301
18512
|
});
|
|
18302
18513
|
var AgentPipelineSettingsSchema = object({
|
|
@@ -18306,12 +18517,25 @@ var AgentPipelineSettingsSchema = object({
|
|
|
18306
18517
|
detectWeight: number().positive().optional(),
|
|
18307
18518
|
/** Node is eligible to run the detection pipeline (decode + inference). */
|
|
18308
18519
|
detect: boolean().optional(),
|
|
18309
|
-
/**
|
|
18520
|
+
/**
|
|
18521
|
+
* DEPRECATED AND IGNORED. Decode is always co-located with its frame
|
|
18522
|
+
* consumer, so decode eligibility IS detect eligibility. Kept optional in
|
|
18523
|
+
* the schema ONLY so persisted stores written before the removal still
|
|
18524
|
+
* parse — no code reads it and no write path emits it.
|
|
18525
|
+
*/
|
|
18310
18526
|
decode: boolean().optional(),
|
|
18311
18527
|
/** Node is eligible to run audio-analyzer sessions. */
|
|
18312
18528
|
audio: boolean().optional(),
|
|
18313
18529
|
/** Node is eligible to be the ingest / source-owner (serve the restream). */
|
|
18314
|
-
ingest: boolean().optional()
|
|
18530
|
+
ingest: boolean().optional(),
|
|
18531
|
+
/**
|
|
18532
|
+
* Operator override for the LAN host a cross-node decoder dials to reach
|
|
18533
|
+
* THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
|
|
18534
|
+
* falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
|
|
18535
|
+
* it already uses to reach the hub). Set this only when the auto-detected
|
|
18536
|
+
* address is wrong (multi-homed host, NAT, custom interface).
|
|
18537
|
+
*/
|
|
18538
|
+
reachableHost: string().optional()
|
|
18315
18539
|
});
|
|
18316
18540
|
var CameraPipelineForAgentSchema = object({
|
|
18317
18541
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -18359,25 +18583,6 @@ var PipelineAssignmentSchema = object({
|
|
|
18359
18583
|
assignedAt: number()
|
|
18360
18584
|
});
|
|
18361
18585
|
/**
|
|
18362
|
-
* Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
|
|
18363
|
-
* the decoder-node placement domain (`balanceDecoder` decision: manual pin
|
|
18364
|
-
* → co-located with pipeline → capacity).
|
|
18365
|
-
*/
|
|
18366
|
-
var DecoderAssignmentSchema = object({
|
|
18367
|
-
deviceId: number(),
|
|
18368
|
-
/** Moleculer node id of the decoder provider currently responsible for this camera. */
|
|
18369
|
-
decoderNodeId: string(),
|
|
18370
|
-
/** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
|
|
18371
|
-
pinned: boolean(),
|
|
18372
|
-
/** Why this assignment was made — useful for debugging the decoder balancer. */
|
|
18373
|
-
reason: _enum([
|
|
18374
|
-
"manual",
|
|
18375
|
-
"co-located",
|
|
18376
|
-
"capacity",
|
|
18377
|
-
"hardware-affinity"
|
|
18378
|
-
])
|
|
18379
|
-
});
|
|
18380
|
-
/**
|
|
18381
18586
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
18382
18587
|
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
18383
18588
|
*/
|
|
@@ -18417,6 +18622,15 @@ var GlobalMetricsSchema = object({
|
|
|
18417
18622
|
* capability providers.
|
|
18418
18623
|
*/
|
|
18419
18624
|
var CapabilityBindingsSchema = record(string(), string());
|
|
18625
|
+
/**
|
|
18626
|
+
* The cluster's single camera-source owner (`clusterRoles.ingestNode`) plus
|
|
18627
|
+
* its LAN-reachable host, if one is registered. See `getIngestOwner`.
|
|
18628
|
+
*/
|
|
18629
|
+
var IngestOwnerSchema = object({
|
|
18630
|
+
ownerNodeId: string(),
|
|
18631
|
+
reachableHost: string().optional(),
|
|
18632
|
+
configIssue: string().optional()
|
|
18633
|
+
});
|
|
18420
18634
|
/** Source block — always present; derives from the stream catalog. */
|
|
18421
18635
|
var CameraSourceStatusSchema = object({ streams: array(object({
|
|
18422
18636
|
camStreamId: string(),
|
|
@@ -18431,6 +18645,14 @@ var CameraAssignmentStatusSchema = object({
|
|
|
18431
18645
|
detectionNodeId: string().nullable(),
|
|
18432
18646
|
decoderNodeId: string().nullable(),
|
|
18433
18647
|
audioNodeId: string().nullable(),
|
|
18648
|
+
/**
|
|
18649
|
+
* The node that OWNS this camera's physical source pull (dials the RTSP and
|
|
18650
|
+
* hosts the broker/restream) — the cluster ingest owner today
|
|
18651
|
+
* (`clusterRoles.ingestNode`), per-camera once source assignment lands. Lets
|
|
18652
|
+
* the UI show WHERE a camera is sourced without SSH/logs, and is the node the
|
|
18653
|
+
* broker block below was read from (pinned). Nullable only pre-wiring.
|
|
18654
|
+
*/
|
|
18655
|
+
sourceNodeId: string().nullable(),
|
|
18434
18656
|
pinned: object({
|
|
18435
18657
|
detection: boolean(),
|
|
18436
18658
|
decoder: boolean(),
|
|
@@ -18563,16 +18785,7 @@ method(object({
|
|
|
18563
18785
|
}), object({ success: literal(true) }), {
|
|
18564
18786
|
kind: "mutation",
|
|
18565
18787
|
auth: "admin"
|
|
18566
|
-
}), method(object({
|
|
18567
|
-
deviceId: number(),
|
|
18568
|
-
nodeId: string()
|
|
18569
|
-
}), _void(), {
|
|
18570
|
-
kind: "mutation",
|
|
18571
|
-
auth: "admin"
|
|
18572
|
-
}), method(object({ deviceId: number() }), _void(), {
|
|
18573
|
-
kind: "mutation",
|
|
18574
|
-
auth: "admin"
|
|
18575
|
-
}), method(_void(), array(DecoderAssignmentSchema).readonly()), method(object({
|
|
18788
|
+
}), method(_void(), IngestOwnerSchema), method(object({
|
|
18576
18789
|
deviceId: number(),
|
|
18577
18790
|
nodeId: string()
|
|
18578
18791
|
}), object({ success: literal(true) }), {
|
|
@@ -18593,10 +18806,7 @@ method(object({
|
|
|
18593
18806
|
nodeId: string(),
|
|
18594
18807
|
pinned: boolean(),
|
|
18595
18808
|
assignedAt: number()
|
|
18596
|
-
}))), method(object({
|
|
18597
|
-
deviceId: number(),
|
|
18598
|
-
pipelineNodeId: string().optional()
|
|
18599
|
-
}), DecoderAssignmentSchema), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
|
|
18809
|
+
}))), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
|
|
18600
18810
|
nodeId: string(),
|
|
18601
18811
|
settings: AgentPipelineSettingsSchema
|
|
18602
18812
|
})).readonly()), method(object({
|
|
@@ -18626,12 +18836,26 @@ method(object({
|
|
|
18626
18836
|
}), method(object({
|
|
18627
18837
|
agentNodeId: string(),
|
|
18628
18838
|
detect: boolean().nullable().optional(),
|
|
18629
|
-
decode: boolean().nullable().optional(),
|
|
18630
18839
|
audio: boolean().nullable().optional(),
|
|
18631
18840
|
ingest: boolean().nullable().optional()
|
|
18632
18841
|
}), object({ success: literal(true) }), {
|
|
18633
18842
|
kind: "mutation",
|
|
18634
18843
|
auth: "admin"
|
|
18844
|
+
}), method(object({
|
|
18845
|
+
agentNodeId: string(),
|
|
18846
|
+
reachableHost: string().nullable()
|
|
18847
|
+
}), object({ success: literal(true) }), {
|
|
18848
|
+
kind: "mutation",
|
|
18849
|
+
auth: "admin"
|
|
18850
|
+
}), method(object({ agentNodeId: string() }), object({
|
|
18851
|
+
success: literal(true),
|
|
18852
|
+
/** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
|
|
18853
|
+
effectiveModelId: string().nullable(),
|
|
18854
|
+
/** Number of cameras whose node-scoped overrides were cleared. */
|
|
18855
|
+
clearedCameraOverrides: number()
|
|
18856
|
+
}), {
|
|
18857
|
+
kind: "mutation",
|
|
18858
|
+
auth: "admin"
|
|
18635
18859
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
18636
18860
|
deviceId: number(),
|
|
18637
18861
|
addonId: string(),
|
|
@@ -18676,22 +18900,131 @@ method(object({
|
|
|
18676
18900
|
kind: "mutation",
|
|
18677
18901
|
auth: "admin"
|
|
18678
18902
|
});
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18903
|
+
/**
|
|
18904
|
+
* server-management — per-NODE singleton capability for a node's ROOT
|
|
18905
|
+
* package lifecycle (runtime-updatable node packages, phase 2: hub + docker
|
|
18906
|
+
* agents).
|
|
18907
|
+
*
|
|
18908
|
+
* Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
|
|
18909
|
+
* on agents) carries the whole software stack in its npm dep tree, so ONE
|
|
18910
|
+
* version describes the node. Updates install into
|
|
18911
|
+
* `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
|
|
18912
|
+
* starter (probation boot + auto-rollback to N-1).
|
|
18913
|
+
*
|
|
18914
|
+
* Providers:
|
|
18915
|
+
* - HUB: `ServerUpdateService` behind the `server-provided` mount
|
|
18916
|
+
* (`buildServerProviders` in trpc.router.ts) — the default target for
|
|
18917
|
+
* unpinned calls.
|
|
18918
|
+
* - AGENT: `AgentUpdateService` registered by the agent bootstrap under
|
|
18919
|
+
* the synthetic `agent-runtime` addonId and declared in the agent's
|
|
18920
|
+
* `$hub.registerNode` manifest.
|
|
18921
|
+
*
|
|
18922
|
+
* Node routing: singleton caps get the codegen/runtime-builder `nodeId`
|
|
18923
|
+
* injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
|
|
18924
|
+
* SDK) routes the call to that node's provider via the standard remote
|
|
18925
|
+
* proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
|
|
18926
|
+
* in-process provider lookup). No `nodeId` → the hub's own provider.
|
|
18927
|
+
*
|
|
18928
|
+
* Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
|
|
18929
|
+
*/
|
|
18930
|
+
/**
|
|
18931
|
+
* Where the running hub's code was loaded from:
|
|
18932
|
+
* - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
|
|
18933
|
+
* plain resolution and runtime updates are refused.
|
|
18934
|
+
* - `baked` — the immutable image seed closure (no data-dir root active).
|
|
18935
|
+
* - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
|
|
18936
|
+
*/
|
|
18937
|
+
var ServerBootModeSchema = _enum([
|
|
18938
|
+
"workspace",
|
|
18939
|
+
"baked",
|
|
18940
|
+
"data-root"
|
|
18941
|
+
]);
|
|
18942
|
+
/**
|
|
18943
|
+
* Update lifecycle state:
|
|
18944
|
+
* - `idle` / `checking` / `staging` — steady / in-flight registry work.
|
|
18945
|
+
* - `pending-restart` — a version is staged and the node has NOT yet
|
|
18946
|
+
* restarted onto it (still running the OLD version).
|
|
18947
|
+
* - `awaiting-confirmation` — the node HAS restarted onto the staged version
|
|
18948
|
+
* (it is the active probation boot) and is waiting to confirm boot-health.
|
|
18949
|
+
* Apply/rollback are refused in this state and the node must NOT be
|
|
18950
|
+
* manually restarted, or the probation boot auto-rolls-back.
|
|
18951
|
+
*/
|
|
18952
|
+
var ServerUpdateStateSchema = _enum([
|
|
18953
|
+
"idle",
|
|
18954
|
+
"checking",
|
|
18955
|
+
"staging",
|
|
18956
|
+
"pending-restart",
|
|
18957
|
+
"awaiting-confirmation"
|
|
18958
|
+
]);
|
|
18959
|
+
var ServerRollbackInfoSchema = object({
|
|
18960
|
+
/** The version that failed (or was manually rolled back). */
|
|
18961
|
+
fromVersion: string(),
|
|
18962
|
+
/** The version rolled back to; null = the baked seed. */
|
|
18963
|
+
toVersion: string().nullable(),
|
|
18964
|
+
atMs: number(),
|
|
18965
|
+
reason: string()
|
|
18685
18966
|
});
|
|
18686
|
-
var
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18967
|
+
var ServerPackageStatusSchema = object({
|
|
18968
|
+
/** Root package name (`@camstack/server` on the hub). */
|
|
18969
|
+
packageName: string(),
|
|
18970
|
+
/** Version of the code the running process ACTUALLY loaded. */
|
|
18971
|
+
runningVersion: string().nullable(),
|
|
18972
|
+
/** Node.js runtime version the node's process runs on (`process.versions.node`). */
|
|
18973
|
+
nodeRuntimeVersion: string().nullable(),
|
|
18974
|
+
/** Active data-dir root version; null when booted from seed/workspace. */
|
|
18975
|
+
activeVersion: string().nullable(),
|
|
18976
|
+
/** N-1 version kept for rollback; null when no previous version exists. */
|
|
18977
|
+
previousVersion: string().nullable(),
|
|
18978
|
+
/** Version of the immutable baked seed closure (image fallback). */
|
|
18979
|
+
seedVersion: string().nullable(),
|
|
18980
|
+
/** Latest registry version from the most recent check (null = never checked). */
|
|
18981
|
+
latestVersion: string().nullable(),
|
|
18982
|
+
updateAvailable: boolean(),
|
|
18983
|
+
bootMode: ServerBootModeSchema,
|
|
18984
|
+
updateState: ServerUpdateStateSchema,
|
|
18985
|
+
/** Version staged + awaiting its probation boot, when one is pending. */
|
|
18986
|
+
pendingVersion: string().nullable(),
|
|
18987
|
+
/** Set when the last freshly-activated version failed its boot health-check. */
|
|
18988
|
+
rolledBack: ServerRollbackInfoSchema.nullable(),
|
|
18989
|
+
/**
|
|
18990
|
+
* True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
|
|
18991
|
+
* hub is running from the baked seed (or workspace) while installed data-dir
|
|
18992
|
+
* versions are being IGNORED. Surfaced as a warning in the UI.
|
|
18993
|
+
*/
|
|
18994
|
+
stateFileCorrupt: boolean(),
|
|
18995
|
+
lastCheckedAtMs: number().nullable()
|
|
18996
|
+
});
|
|
18997
|
+
var ServerUpdateCheckResultSchema = object({
|
|
18998
|
+
packageName: string(),
|
|
18999
|
+
runningVersion: string().nullable(),
|
|
19000
|
+
latestVersion: string().nullable(),
|
|
19001
|
+
updateAvailable: boolean(),
|
|
19002
|
+
checkedAtMs: number(),
|
|
19003
|
+
/** Non-null when the registry lookup failed (offline, bad registry, …). */
|
|
19004
|
+
error: string().nullable()
|
|
19005
|
+
});
|
|
19006
|
+
var ServerUpdateActionResultSchema = object({
|
|
19007
|
+
accepted: boolean(),
|
|
19008
|
+
targetVersion: string().nullable(),
|
|
19009
|
+
/** True when a graceful restart was scheduled to apply the change. */
|
|
19010
|
+
restarting: boolean(),
|
|
19011
|
+
message: string()
|
|
19012
|
+
});
|
|
19013
|
+
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
19014
|
+
kind: "mutation",
|
|
19015
|
+
auth: "admin"
|
|
19016
|
+
}), method(object({
|
|
19017
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
19018
|
+
version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
19019
|
+
kind: "mutation",
|
|
19020
|
+
auth: "admin"
|
|
19021
|
+
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
19022
|
+
kind: "mutation",
|
|
19023
|
+
auth: "admin"
|
|
19024
|
+
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
19025
|
+
kind: "mutation",
|
|
19026
|
+
auth: "admin"
|
|
18690
19027
|
});
|
|
18691
|
-
method(object({
|
|
18692
|
-
deviceId: number(),
|
|
18693
|
-
streams: array(RegisteredStreamSchema).readonly()
|
|
18694
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(ExposedResourceSchema).readonly());
|
|
18695
19028
|
/**
|
|
18696
19029
|
* Query filter for settings-store collections.
|
|
18697
19030
|
*/
|
|
@@ -18844,9 +19177,9 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
18844
19177
|
/**
|
|
18845
19178
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
18846
19179
|
*
|
|
18847
|
-
*
|
|
18848
|
-
*
|
|
18849
|
-
*
|
|
19180
|
+
* The `SnapshotAddon` wrapper returns this shape whether the frame came from
|
|
19181
|
+
* the device-native provider (onboard capture) or from the stream-broker
|
|
19182
|
+
* prebuffer fallback.
|
|
18850
19183
|
*/
|
|
18851
19184
|
var SnapshotImageSchema = object({
|
|
18852
19185
|
base64: string(),
|
|
@@ -18921,10 +19254,6 @@ var snapshotCapability = {
|
|
|
18921
19254
|
kind: "poll"
|
|
18922
19255
|
}
|
|
18923
19256
|
};
|
|
18924
|
-
method(object({ deviceId: number() }), boolean()), method(object({
|
|
18925
|
-
deviceId: number(),
|
|
18926
|
-
streamId: string().optional()
|
|
18927
|
-
}), SnapshotImageSchema.nullable());
|
|
18928
19257
|
/**
|
|
18929
19258
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
18930
19259
|
* providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
|
|
@@ -19285,9 +19614,10 @@ method(object({
|
|
|
19285
19614
|
auth: "admin"
|
|
19286
19615
|
});
|
|
19287
19616
|
/**
|
|
19288
|
-
* Optional client-side hints sent at session creation to help the
|
|
19289
|
-
*
|
|
19290
|
-
*
|
|
19617
|
+
* Optional client-side hints sent at session creation to help the provider
|
|
19618
|
+
* pick the best native source. All fields optional — a viewer that knows
|
|
19619
|
+
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
19620
|
+
* collection cap; this `webrtc-session` cap is the live signaling surface.)
|
|
19291
19621
|
*/
|
|
19292
19622
|
var webrtcClientHintsSchema = object({
|
|
19293
19623
|
viewportWidth: number().int().positive().optional(),
|
|
@@ -19298,22 +19628,6 @@ var webrtcClientHintsSchema = object({
|
|
|
19298
19628
|
/** Hard tier override; takes precedence over scoring when registered. */
|
|
19299
19629
|
prefersTier: string().optional()
|
|
19300
19630
|
}).partial();
|
|
19301
|
-
method(object({
|
|
19302
|
-
streamId: string(),
|
|
19303
|
-
sdpOffer: string()
|
|
19304
|
-
}), string(), { kind: "mutation" }), method(object({ streamId: string() }), boolean()), method(object({
|
|
19305
|
-
streamId: string(),
|
|
19306
|
-
codec: string()
|
|
19307
|
-
}), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
|
|
19308
|
-
streamId: string(),
|
|
19309
|
-
hints: webrtcClientHintsSchema.optional()
|
|
19310
|
-
}), object({
|
|
19311
|
-
sessionId: string(),
|
|
19312
|
-
sdpOffer: string()
|
|
19313
|
-
}), { kind: "mutation" }), method(object({
|
|
19314
|
-
sessionId: string(),
|
|
19315
|
-
sdpAnswer: string()
|
|
19316
|
-
}), _void(), { kind: "mutation" }), method(object({ sessionId: string() }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), boolean());
|
|
19317
19631
|
/**
|
|
19318
19632
|
* Discriminated target for a WebRTC session. The client sends this
|
|
19319
19633
|
* structured object instead of building / parsing brokerId strings;
|
|
@@ -20792,6 +21106,16 @@ var TopologyCategorySchema = object({
|
|
|
20792
21106
|
healthy: number(),
|
|
20793
21107
|
addons: array(TopologyCategoryAddonSchema).readonly()
|
|
20794
21108
|
});
|
|
21109
|
+
/**
|
|
21110
|
+
* The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
|
|
21111
|
+
* `@camstack/agent` on agents) as reported by its `registerNode` manifest —
|
|
21112
|
+
* version visibility for the Server management surface. Nullable: offline
|
|
21113
|
+
* rows and pre-phase-2 nodes report none.
|
|
21114
|
+
*/
|
|
21115
|
+
var TopologyRootPackageSchema = object({
|
|
21116
|
+
name: string(),
|
|
21117
|
+
version: string()
|
|
21118
|
+
});
|
|
20795
21119
|
var TopologyNodeSchema = object({
|
|
20796
21120
|
id: string(),
|
|
20797
21121
|
name: string(),
|
|
@@ -20815,7 +21139,8 @@ var TopologyNodeSchema = object({
|
|
|
20815
21139
|
status: string()
|
|
20816
21140
|
})).readonly(),
|
|
20817
21141
|
processes: array(TopologyProcessSchema).readonly(),
|
|
20818
|
-
categories: array(TopologyCategorySchema).readonly()
|
|
21142
|
+
categories: array(TopologyCategorySchema).readonly(),
|
|
21143
|
+
rootPackage: TopologyRootPackageSchema.nullable()
|
|
20819
21144
|
});
|
|
20820
21145
|
var CapUsageEdgeSchema = object({
|
|
20821
21146
|
callerAddonId: string(),
|
|
@@ -23939,6 +24264,12 @@ Object.freeze({
|
|
|
23939
24264
|
addonId: null,
|
|
23940
24265
|
access: "create"
|
|
23941
24266
|
},
|
|
24267
|
+
"loginMethod.getLoginMethods": {
|
|
24268
|
+
capName: "login-method",
|
|
24269
|
+
capScope: "system",
|
|
24270
|
+
addonId: null,
|
|
24271
|
+
access: "view"
|
|
24272
|
+
},
|
|
23942
24273
|
"mediaPlayer.next": {
|
|
23943
24274
|
capName: "media-player",
|
|
23944
24275
|
capScope: "device",
|
|
@@ -24569,23 +24900,23 @@ Object.freeze({
|
|
|
24569
24900
|
addonId: null,
|
|
24570
24901
|
access: "create"
|
|
24571
24902
|
},
|
|
24572
|
-
"pipelineExecutor.
|
|
24903
|
+
"pipelineExecutor.clearDeviceOverrides": {
|
|
24573
24904
|
capName: "pipeline-executor",
|
|
24574
24905
|
capScope: "system",
|
|
24575
24906
|
addonId: null,
|
|
24576
24907
|
access: "delete"
|
|
24577
24908
|
},
|
|
24578
|
-
"pipelineExecutor.
|
|
24909
|
+
"pipelineExecutor.deleteModel": {
|
|
24579
24910
|
capName: "pipeline-executor",
|
|
24580
24911
|
capScope: "system",
|
|
24581
24912
|
addonId: null,
|
|
24582
24913
|
access: "delete"
|
|
24583
24914
|
},
|
|
24584
|
-
"pipelineExecutor.
|
|
24915
|
+
"pipelineExecutor.deleteTemplate": {
|
|
24585
24916
|
capName: "pipeline-executor",
|
|
24586
24917
|
capScope: "system",
|
|
24587
24918
|
addonId: null,
|
|
24588
|
-
access: "
|
|
24919
|
+
access: "delete"
|
|
24589
24920
|
},
|
|
24590
24921
|
"pipelineExecutor.downloadModel": {
|
|
24591
24922
|
capName: "pipeline-executor",
|
|
@@ -24779,13 +25110,13 @@ Object.freeze({
|
|
|
24779
25110
|
addonId: null,
|
|
24780
25111
|
access: "create"
|
|
24781
25112
|
},
|
|
24782
|
-
"
|
|
24783
|
-
capName: "pipeline-
|
|
25113
|
+
"pipelineExecutor.validatePipeline": {
|
|
25114
|
+
capName: "pipeline-executor",
|
|
24784
25115
|
capScope: "system",
|
|
24785
25116
|
addonId: null,
|
|
24786
|
-
access: "
|
|
25117
|
+
access: "view"
|
|
24787
25118
|
},
|
|
24788
|
-
"pipelineOrchestrator.
|
|
25119
|
+
"pipelineOrchestrator.assignAudio": {
|
|
24789
25120
|
capName: "pipeline-orchestrator",
|
|
24790
25121
|
capScope: "system",
|
|
24791
25122
|
addonId: null,
|
|
@@ -24869,19 +25200,13 @@ Object.freeze({
|
|
|
24869
25200
|
addonId: null,
|
|
24870
25201
|
access: "view"
|
|
24871
25202
|
},
|
|
24872
|
-
"pipelineOrchestrator.
|
|
24873
|
-
capName: "pipeline-orchestrator",
|
|
24874
|
-
capScope: "system",
|
|
24875
|
-
addonId: null,
|
|
24876
|
-
access: "view"
|
|
24877
|
-
},
|
|
24878
|
-
"pipelineOrchestrator.getDecoderAssignments": {
|
|
25203
|
+
"pipelineOrchestrator.getGlobalMetrics": {
|
|
24879
25204
|
capName: "pipeline-orchestrator",
|
|
24880
25205
|
capScope: "system",
|
|
24881
25206
|
addonId: null,
|
|
24882
25207
|
access: "view"
|
|
24883
25208
|
},
|
|
24884
|
-
"pipelineOrchestrator.
|
|
25209
|
+
"pipelineOrchestrator.getIngestOwner": {
|
|
24885
25210
|
capName: "pipeline-orchestrator",
|
|
24886
25211
|
capScope: "system",
|
|
24887
25212
|
addonId: null,
|
|
@@ -24923,6 +25248,12 @@ Object.freeze({
|
|
|
24923
25248
|
addonId: null,
|
|
24924
25249
|
access: "delete"
|
|
24925
25250
|
},
|
|
25251
|
+
"pipelineOrchestrator.resetNodePipelineDefaults": {
|
|
25252
|
+
capName: "pipeline-orchestrator",
|
|
25253
|
+
capScope: "system",
|
|
25254
|
+
addonId: null,
|
|
25255
|
+
access: "delete"
|
|
25256
|
+
},
|
|
24926
25257
|
"pipelineOrchestrator.resolvePipeline": {
|
|
24927
25258
|
capName: "pipeline-orchestrator",
|
|
24928
25259
|
capScope: "system",
|
|
@@ -24959,37 +25290,37 @@ Object.freeze({
|
|
|
24959
25290
|
addonId: null,
|
|
24960
25291
|
access: "create"
|
|
24961
25292
|
},
|
|
24962
|
-
"pipelineOrchestrator.
|
|
25293
|
+
"pipelineOrchestrator.setAgentReachableHost": {
|
|
24963
25294
|
capName: "pipeline-orchestrator",
|
|
24964
25295
|
capScope: "system",
|
|
24965
25296
|
addonId: null,
|
|
24966
25297
|
access: "create"
|
|
24967
25298
|
},
|
|
24968
|
-
"pipelineOrchestrator.
|
|
25299
|
+
"pipelineOrchestrator.setCameraPipelineForAgent": {
|
|
24969
25300
|
capName: "pipeline-orchestrator",
|
|
24970
25301
|
capScope: "system",
|
|
24971
25302
|
addonId: null,
|
|
24972
25303
|
access: "create"
|
|
24973
25304
|
},
|
|
24974
|
-
"pipelineOrchestrator.
|
|
25305
|
+
"pipelineOrchestrator.setCameraStepOverride": {
|
|
24975
25306
|
capName: "pipeline-orchestrator",
|
|
24976
25307
|
capScope: "system",
|
|
24977
25308
|
addonId: null,
|
|
24978
25309
|
access: "create"
|
|
24979
25310
|
},
|
|
24980
|
-
"pipelineOrchestrator.
|
|
25311
|
+
"pipelineOrchestrator.setCameraStepToggle": {
|
|
24981
25312
|
capName: "pipeline-orchestrator",
|
|
24982
25313
|
capScope: "system",
|
|
24983
25314
|
addonId: null,
|
|
24984
25315
|
access: "create"
|
|
24985
25316
|
},
|
|
24986
|
-
"pipelineOrchestrator.
|
|
25317
|
+
"pipelineOrchestrator.setCapabilityBinding": {
|
|
24987
25318
|
capName: "pipeline-orchestrator",
|
|
24988
25319
|
capScope: "system",
|
|
24989
25320
|
addonId: null,
|
|
24990
25321
|
access: "create"
|
|
24991
25322
|
},
|
|
24992
|
-
"pipelineOrchestrator.
|
|
25323
|
+
"pipelineOrchestrator.unassignAudio": {
|
|
24993
25324
|
capName: "pipeline-orchestrator",
|
|
24994
25325
|
capScope: "system",
|
|
24995
25326
|
addonId: null,
|
|
@@ -25289,33 +25620,45 @@ Object.freeze({
|
|
|
25289
25620
|
addonId: null,
|
|
25290
25621
|
access: "create"
|
|
25291
25622
|
},
|
|
25292
|
-
"
|
|
25293
|
-
capName: "
|
|
25623
|
+
"scriptRunner.run": {
|
|
25624
|
+
capName: "script-runner",
|
|
25625
|
+
capScope: "device",
|
|
25626
|
+
addonId: null,
|
|
25627
|
+
access: "create"
|
|
25628
|
+
},
|
|
25629
|
+
"scriptRunner.stop": {
|
|
25630
|
+
capName: "script-runner",
|
|
25631
|
+
capScope: "device",
|
|
25632
|
+
addonId: null,
|
|
25633
|
+
access: "create"
|
|
25634
|
+
},
|
|
25635
|
+
"serverManagement.applyServerUpdate": {
|
|
25636
|
+
capName: "server-management",
|
|
25294
25637
|
capScope: "system",
|
|
25295
25638
|
addonId: null,
|
|
25296
|
-
access: "
|
|
25639
|
+
access: "create"
|
|
25297
25640
|
},
|
|
25298
|
-
"
|
|
25299
|
-
capName: "
|
|
25641
|
+
"serverManagement.checkServerUpdate": {
|
|
25642
|
+
capName: "server-management",
|
|
25300
25643
|
capScope: "system",
|
|
25301
25644
|
addonId: null,
|
|
25302
25645
|
access: "create"
|
|
25303
25646
|
},
|
|
25304
|
-
"
|
|
25305
|
-
capName: "
|
|
25647
|
+
"serverManagement.getServerPackageStatus": {
|
|
25648
|
+
capName: "server-management",
|
|
25306
25649
|
capScope: "system",
|
|
25307
25650
|
addonId: null,
|
|
25308
|
-
access: "
|
|
25651
|
+
access: "view"
|
|
25309
25652
|
},
|
|
25310
|
-
"
|
|
25311
|
-
capName: "
|
|
25312
|
-
capScope: "
|
|
25653
|
+
"serverManagement.restartServer": {
|
|
25654
|
+
capName: "server-management",
|
|
25655
|
+
capScope: "system",
|
|
25313
25656
|
addonId: null,
|
|
25314
25657
|
access: "create"
|
|
25315
25658
|
},
|
|
25316
|
-
"
|
|
25317
|
-
capName: "
|
|
25318
|
-
capScope: "
|
|
25659
|
+
"serverManagement.rollbackServerUpdate": {
|
|
25660
|
+
capName: "server-management",
|
|
25661
|
+
capScope: "system",
|
|
25319
25662
|
addonId: null,
|
|
25320
25663
|
access: "create"
|
|
25321
25664
|
},
|
|
@@ -25409,18 +25752,6 @@ Object.freeze({
|
|
|
25409
25752
|
addonId: null,
|
|
25410
25753
|
access: "create"
|
|
25411
25754
|
},
|
|
25412
|
-
"snapshotProvider.getSnapshot": {
|
|
25413
|
-
capName: "snapshot-provider",
|
|
25414
|
-
capScope: "system",
|
|
25415
|
-
addonId: null,
|
|
25416
|
-
access: "view"
|
|
25417
|
-
},
|
|
25418
|
-
"snapshotProvider.supportsDevice": {
|
|
25419
|
-
capName: "snapshot-provider",
|
|
25420
|
-
capScope: "system",
|
|
25421
|
-
addonId: null,
|
|
25422
|
-
access: "view"
|
|
25423
|
-
},
|
|
25424
25755
|
"ssoBridge.signBridgeToken": {
|
|
25425
25756
|
capName: "sso-bridge",
|
|
25426
25757
|
capScope: "system",
|
|
@@ -25847,30 +26178,6 @@ Object.freeze({
|
|
|
25847
26178
|
addonId: null,
|
|
25848
26179
|
access: "view"
|
|
25849
26180
|
},
|
|
25850
|
-
"streamingEngine.getStreamUrl": {
|
|
25851
|
-
capName: "streaming-engine",
|
|
25852
|
-
capScope: "system",
|
|
25853
|
-
addonId: null,
|
|
25854
|
-
access: "view"
|
|
25855
|
-
},
|
|
25856
|
-
"streamingEngine.listStreams": {
|
|
25857
|
-
capName: "streaming-engine",
|
|
25858
|
-
capScope: "system",
|
|
25859
|
-
addonId: null,
|
|
25860
|
-
access: "view"
|
|
25861
|
-
},
|
|
25862
|
-
"streamingEngine.registerStream": {
|
|
25863
|
-
capName: "streaming-engine",
|
|
25864
|
-
capScope: "system",
|
|
25865
|
-
addonId: null,
|
|
25866
|
-
access: "create"
|
|
25867
|
-
},
|
|
25868
|
-
"streamingEngine.unregisterStream": {
|
|
25869
|
-
capName: "streaming-engine",
|
|
25870
|
-
capScope: "system",
|
|
25871
|
-
addonId: null,
|
|
25872
|
-
access: "delete"
|
|
25873
|
-
},
|
|
25874
26181
|
"streamParams.getConfigSchema": {
|
|
25875
26182
|
capName: "stream-params",
|
|
25876
26183
|
capScope: "device",
|
|
@@ -26219,6 +26526,18 @@ Object.freeze({
|
|
|
26219
26526
|
addonId: null,
|
|
26220
26527
|
access: "view"
|
|
26221
26528
|
},
|
|
26529
|
+
"viewerUi.getStaticDir": {
|
|
26530
|
+
capName: "viewer-ui",
|
|
26531
|
+
capScope: "system",
|
|
26532
|
+
addonId: null,
|
|
26533
|
+
access: "view"
|
|
26534
|
+
},
|
|
26535
|
+
"viewerUi.getVersion": {
|
|
26536
|
+
capName: "viewer-ui",
|
|
26537
|
+
capScope: "system",
|
|
26538
|
+
addonId: null,
|
|
26539
|
+
access: "view"
|
|
26540
|
+
},
|
|
26222
26541
|
"waterHeater.setAway": {
|
|
26223
26542
|
capName: "water-heater",
|
|
26224
26543
|
capScope: "device",
|
|
@@ -26237,54 +26556,6 @@ Object.freeze({
|
|
|
26237
26556
|
addonId: null,
|
|
26238
26557
|
access: "create"
|
|
26239
26558
|
},
|
|
26240
|
-
"webrtc.closeSession": {
|
|
26241
|
-
capName: "webrtc",
|
|
26242
|
-
capScope: "system",
|
|
26243
|
-
addonId: null,
|
|
26244
|
-
access: "create"
|
|
26245
|
-
},
|
|
26246
|
-
"webrtc.createSession": {
|
|
26247
|
-
capName: "webrtc",
|
|
26248
|
-
capScope: "system",
|
|
26249
|
-
addonId: null,
|
|
26250
|
-
access: "create"
|
|
26251
|
-
},
|
|
26252
|
-
"webrtc.handleAnswer": {
|
|
26253
|
-
capName: "webrtc",
|
|
26254
|
-
capScope: "system",
|
|
26255
|
-
addonId: null,
|
|
26256
|
-
access: "create"
|
|
26257
|
-
},
|
|
26258
|
-
"webrtc.handleOffer": {
|
|
26259
|
-
capName: "webrtc",
|
|
26260
|
-
capScope: "system",
|
|
26261
|
-
addonId: null,
|
|
26262
|
-
access: "create"
|
|
26263
|
-
},
|
|
26264
|
-
"webrtc.hasAdaptiveBitrate": {
|
|
26265
|
-
capName: "webrtc",
|
|
26266
|
-
capScope: "system",
|
|
26267
|
-
addonId: null,
|
|
26268
|
-
access: "view"
|
|
26269
|
-
},
|
|
26270
|
-
"webrtc.registerStream": {
|
|
26271
|
-
capName: "webrtc",
|
|
26272
|
-
capScope: "system",
|
|
26273
|
-
addonId: null,
|
|
26274
|
-
access: "create"
|
|
26275
|
-
},
|
|
26276
|
-
"webrtc.supportsStream": {
|
|
26277
|
-
capName: "webrtc",
|
|
26278
|
-
capScope: "system",
|
|
26279
|
-
addonId: null,
|
|
26280
|
-
access: "view"
|
|
26281
|
-
},
|
|
26282
|
-
"webrtc.unregisterStream": {
|
|
26283
|
-
capName: "webrtc",
|
|
26284
|
-
capScope: "system",
|
|
26285
|
-
addonId: null,
|
|
26286
|
-
access: "delete"
|
|
26287
|
-
},
|
|
26288
26559
|
"webrtcSession.addIceCandidate": {
|
|
26289
26560
|
capName: "webrtc-session",
|
|
26290
26561
|
capScope: "device",
|
|
@@ -30350,6 +30621,10 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
|
|
|
30350
30621
|
* universal overlay UI. */
|
|
30351
30622
|
osdPollTimer = null;
|
|
30352
30623
|
static OSD_POLL_INTERVAL_MS = 3e5;
|
|
30624
|
+
/** Control-plane reachability poll — drives `device.online` from ISAPI
|
|
30625
|
+
* `getDeviceInfo` liveness, decoupled from stream-broker video health.
|
|
30626
|
+
* Started in `onActivate`, stopped in `removeDevice`. */
|
|
30627
|
+
reachabilityPoll = null;
|
|
30353
30628
|
constructor(ctx) {
|
|
30354
30629
|
super(ctx, hikvisionCameraSchema, { type: DeviceType.Camera });
|
|
30355
30630
|
this.registerNativeCapabilities();
|
|
@@ -30834,6 +31109,25 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
|
|
|
30834
31109
|
if (this.osdPollTimer === null) this.osdPollTimer = setInterval(() => {
|
|
30835
31110
|
this.refreshOsdSnapshot();
|
|
30836
31111
|
}, HikvisionCamera.OSD_POLL_INTERVAL_MS);
|
|
31112
|
+
this.startReachabilityPolling();
|
|
31113
|
+
}
|
|
31114
|
+
/** Start the control-plane reachability poll: an ISAPI `getDeviceInfo`
|
|
31115
|
+
* round-trip every 30s drives `device.online`, with hysteresis. This
|
|
31116
|
+
* replaces the old stream-health→online mirror so an on-demand (idle)
|
|
31117
|
+
* camera that is reachable still reports ONLINE. Idempotent. */
|
|
31118
|
+
startReachabilityPolling() {
|
|
31119
|
+
if (this.reachabilityPoll) return;
|
|
31120
|
+
this.reachabilityPoll = startReachabilityPoll({
|
|
31121
|
+
probe: async () => {
|
|
31122
|
+
await this.ensureClient().getDeviceInfo();
|
|
31123
|
+
return true;
|
|
31124
|
+
},
|
|
31125
|
+
setOnline: (online) => {
|
|
31126
|
+
this.markOnline(online);
|
|
31127
|
+
},
|
|
31128
|
+
isEnabled: () => !this.disabled,
|
|
31129
|
+
logger: this.ctx.logger
|
|
31130
|
+
});
|
|
30837
31131
|
}
|
|
30838
31132
|
/** Single-flight OSD config fetch; updates the in-memory snapshot
|
|
30839
31133
|
* consumed by the readonly OSD section in `getSettingsUISchema`. */
|
|
@@ -33226,6 +33520,8 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
|
|
|
33226
33520
|
clearInterval(this.osdPollTimer);
|
|
33227
33521
|
this.osdPollTimer = null;
|
|
33228
33522
|
}
|
|
33523
|
+
this.reachabilityPoll?.stop();
|
|
33524
|
+
this.reachabilityPoll = null;
|
|
33229
33525
|
await this.disconnectAll();
|
|
33230
33526
|
for (const camStreamId of this.published.keys()) try {
|
|
33231
33527
|
await this.ctx.api.streamBroker.retractCameraStream.mutate({
|
|
@@ -42588,21 +42884,7 @@ var HikvisionProviderAddon = class extends BaseDeviceProvider {
|
|
|
42588
42884
|
throw new Error(`Hikvision: ${reason}`);
|
|
42589
42885
|
}
|
|
42590
42886
|
async onInitialize() {
|
|
42591
|
-
|
|
42592
|
-
this.subscribe({ category: EventCategory.DeviceStateChanged }, (event) => {
|
|
42593
|
-
const data = event.data;
|
|
42594
|
-
if (data.capName !== "camera-streams") return;
|
|
42595
|
-
const deviceId = data.deviceId;
|
|
42596
|
-
if (typeof deviceId !== "number") return;
|
|
42597
|
-
const registry = this.ctx.kernel.deviceRegistry;
|
|
42598
|
-
if (!registry) return;
|
|
42599
|
-
if (registry.getAddonId(deviceId) !== this.addonId) return;
|
|
42600
|
-
const device = registry.getById(deviceId);
|
|
42601
|
-
if (!device) return;
|
|
42602
|
-
const online = data.slice?.online === true;
|
|
42603
|
-
if (device.online !== online) device.online = online;
|
|
42604
|
-
});
|
|
42605
|
-
return regs;
|
|
42887
|
+
return await super.onInitialize();
|
|
42606
42888
|
}
|
|
42607
42889
|
async supportsDiscovery() {
|
|
42608
42890
|
return true;
|