@camstack/types 1.1.33 → 1.1.35

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-DmP-uxoe.js");
2
+ const require_sleep = require("./sleep-DuN1nc6O.js");
3
3
  const require_err_msg = require("./err-msg-COpsHMw2.js");
4
4
  let zod = require("zod");
5
5
  //#region src/health/wiring-health.ts
@@ -132,10 +132,18 @@ var ModelVariantGroupSchema = zod.z.object({
132
132
  precision: zod.z.enum(["fp32", "int8"]).optional(),
133
133
  /**
134
134
  * Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
135
- * latency-optimized export (e.g. ReLU-activation / reduced-input variant)
136
- * — the slot the future performance variants plug into.
135
+ * latency-optimized export (e.g. ReLU-activation variant) the slot the
136
+ * future performance variants plug into.
137
137
  */
138
- optimization: zod.z.enum(["standard", "fast"]).optional()
138
+ optimization: zod.z.enum(["standard", "fast"]).optional(),
139
+ /**
140
+ * Input-resolution axis (square input side, px). Omit ⇒ the family's native
141
+ * resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
142
+ * cheap latency lever — especially on Apple ANE and the Intel N100 — at a
143
+ * small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
144
+ * the group so the selector can offer it as a variant axis.
145
+ */
146
+ resolution: zod.z.number().int().positive().optional()
139
147
  });
140
148
  var ModelCatalogEntrySchema = zod.z.object({
141
149
  id: zod.z.string(),
@@ -310,15 +318,17 @@ function buildModelVariantGroups(models) {
310
318
  modelId: e.id,
311
319
  precision,
312
320
  optimization,
321
+ resolution: e.group?.resolution,
313
322
  label: variantLabel(precision, optimization),
314
323
  formats: entryFormats(e),
315
324
  sizeMB: smallestSizeMB(e)
316
325
  };
317
326
  }).toSorted((a, b) => {
327
+ if (a.resolution !== b.resolution) return (b.resolution ?? Infinity) - (a.resolution ?? Infinity);
318
328
  if (a.optimization !== b.optimization) return a.optimization === "fast" ? 1 : -1;
319
329
  return PRECISION_ORDER.indexOf(a.precision) - PRECISION_ORDER.indexOf(b.precision);
320
330
  });
321
- const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard") ?? options[0];
331
+ const base = options.find((o) => o.precision === "fp32" && o.optimization === "standard" && o.resolution === void 0) ?? options[0];
322
332
  if (base === void 0) continue;
323
333
  const baseEntry = entries.find((e) => e.id === base.modelId);
324
334
  tierList.push({
@@ -358,6 +368,7 @@ function resolveVariantModelId(models, selection) {
358
368
  if (m.group.family !== selection.family || m.group.tier !== selection.tier) continue;
359
369
  if ((m.group.precision ?? "fp32") !== precision) continue;
360
370
  if ((m.group.optimization ?? "standard") !== optimization) continue;
371
+ if (m.group.resolution !== selection.resolution) continue;
361
372
  return m.id;
362
373
  }
363
374
  return null;
@@ -370,7 +381,8 @@ function describeModelVariant(models, modelId) {
370
381
  family: entry.group.family,
371
382
  tier: entry.group.tier,
372
383
  precision: entry.group.precision ?? "fp32",
373
- optimization: entry.group.optimization ?? "standard"
384
+ optimization: entry.group.optimization ?? "standard",
385
+ resolution: entry.group.resolution
374
386
  };
375
387
  }
376
388
  //#endregion
@@ -1796,7 +1808,7 @@ async function runInferenceStep(fn, timeoutMs) {
1796
1808
  const t0 = performance.now();
1797
1809
  try {
1798
1810
  return {
1799
- output: timeoutMs !== void 0 ? await withTimeout(fn(), timeoutMs) : await fn(),
1811
+ output: timeoutMs !== void 0 ? await withTimeout$1(fn(), timeoutMs) : await fn(),
1800
1812
  durationMs: roundMs(performance.now() - t0),
1801
1813
  ok: true
1802
1814
  };
@@ -1814,7 +1826,7 @@ function roundMs(ms) {
1814
1826
  return Math.round(ms * 100) / 100;
1815
1827
  }
1816
1828
  /** Reject a promise if it exceeds the given timeout */
1817
- function withTimeout(promise, ms) {
1829
+ function withTimeout$1(promise, ms) {
1818
1830
  return new Promise((resolve, reject) => {
1819
1831
  const timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`Inference timeout after ${ms}ms`)), ms);
1820
1832
  promise.then((v) => {
@@ -3776,6 +3788,111 @@ function createRuntimeStateBridge(params) {
3776
3788
  };
3777
3789
  }
3778
3790
  //#endregion
3791
+ //#region src/device/reachability-poll.ts
3792
+ /**
3793
+ * Shared control-plane reachability poller for camera devices.
3794
+ *
3795
+ * `device.online` must reflect CONTROL-PLANE REACHABILITY — "can we talk to
3796
+ * the camera's management API right now" — NOT whether video happens to be
3797
+ * flowing through the stream broker. A camera that dials on-demand (no
3798
+ * consumer attached) is fully reachable yet has no active stream; driving
3799
+ * `online` from stream health falsely marks it OFFLINE.
3800
+ *
3801
+ * Every camera provider owns a cheap control-plane round-trip (Hikvision
3802
+ * ISAPI `getDeviceInfo`, Amcrest Dahua CGI `getDeviceInfo`, ONVIF
3803
+ * `getDeviceInformation`, RTSP `OPTIONS`/TCP-connect). Each provider passes
3804
+ * that round-trip as a `probe: () => Promise<boolean>` and this helper runs
3805
+ * the loop, applies hysteresis, and drives the device's `online` setter.
3806
+ *
3807
+ * Hysteresis rules (avoid flapping on a single dropped packet):
3808
+ * - mark ONLINE immediately on the first successful probe;
3809
+ * - mark OFFLINE only after {@link REACHABILITY_FAILURES_TO_OFFLINE}
3810
+ * CONSECUTIVE failures.
3811
+ *
3812
+ * Robustness rules:
3813
+ * - each probe is bounded by {@link REACHABILITY_PROBE_TIMEOUT_MS} so a hung
3814
+ * control channel can't wedge the loop;
3815
+ * - a single in-flight probe at a time — a slow probe never stacks up;
3816
+ * - the loop never throws (a rejected/thrown probe counts as a failure);
3817
+ * - `isEnabled()` gates each tick so a soft-disabled device isn't polled.
3818
+ */
3819
+ /** Poll cadence — probe every camera's control plane on this interval. */
3820
+ var REACHABILITY_POLL_INTERVAL_MS = 3e4;
3821
+ /**
3822
+ * Consecutive failures required before flipping `online` to `false`.
3823
+ * ONLINE is asserted on the first success; OFFLINE waits for N misses so a
3824
+ * single transient timeout doesn't flap the flag.
3825
+ */
3826
+ var REACHABILITY_FAILURES_TO_OFFLINE = 3;
3827
+ /** Per-probe timeout — an unreachable/hung control channel resolves as a miss. */
3828
+ var REACHABILITY_PROBE_TIMEOUT_MS = 1e4;
3829
+ /** Reject after `ms`; always clears its own timer. */
3830
+ async function withTimeout(promise, ms, label) {
3831
+ let timer;
3832
+ const timeout = new Promise((_resolve, reject) => {
3833
+ timer = setTimeout(() => reject(/* @__PURE__ */ new Error(`${label} timed out after ${String(ms)}ms`)), ms);
3834
+ });
3835
+ try {
3836
+ return await Promise.race([promise, timeout]);
3837
+ } finally {
3838
+ if (timer !== void 0) clearTimeout(timer);
3839
+ }
3840
+ }
3841
+ /**
3842
+ * Start the reachability poll loop. Returns a handle whose `stop()` clears the
3843
+ * timer and prevents any further ticks. Start on device activation, stop on
3844
+ * device teardown (`removeDevice`) so no timer leaks.
3845
+ */
3846
+ function startReachabilityPoll(options) {
3847
+ const intervalMs = options.intervalMs ?? 3e4;
3848
+ const failuresToOffline = options.failuresToOffline ?? 3;
3849
+ const probeTimeoutMs = options.probeTimeoutMs ?? 1e4;
3850
+ const runImmediately = options.runImmediately ?? true;
3851
+ let stopped = false;
3852
+ let running = false;
3853
+ let consecutiveFailures = 0;
3854
+ let timer;
3855
+ const tick = async () => {
3856
+ if (stopped) return;
3857
+ if (running) return;
3858
+ if (options.isEnabled && !options.isEnabled()) return;
3859
+ running = true;
3860
+ try {
3861
+ const reachable = await withTimeout(Promise.resolve().then(options.probe), probeTimeoutMs, "reachability probe");
3862
+ if (stopped) return;
3863
+ if (reachable) {
3864
+ consecutiveFailures = 0;
3865
+ options.setOnline(true);
3866
+ } else registerFailure("probe resolved unreachable");
3867
+ } catch (error) {
3868
+ if (stopped) return;
3869
+ registerFailure(error instanceof Error ? error.message : "probe threw");
3870
+ } finally {
3871
+ running = false;
3872
+ }
3873
+ };
3874
+ const registerFailure = (reason) => {
3875
+ consecutiveFailures += 1;
3876
+ options.logger?.debug("reachability probe failed", {
3877
+ reason,
3878
+ consecutiveFailures,
3879
+ failuresToOffline
3880
+ });
3881
+ if (consecutiveFailures >= failuresToOffline) options.setOnline(false);
3882
+ };
3883
+ timer = setInterval(() => {
3884
+ tick();
3885
+ }, intervalMs);
3886
+ if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
3887
+ if (runImmediately) tick();
3888
+ return { stop: () => {
3889
+ if (stopped) return;
3890
+ stopped = true;
3891
+ if (timer !== void 0) clearInterval(timer);
3892
+ timer = void 0;
3893
+ } };
3894
+ }
3895
+ //#endregion
3779
3896
  //#region src/notification/format-transcode.ts
3780
3897
  /** Strip a small, safe subset of Markdown down to plain text. */
3781
3898
  function markdownToText(md) {
@@ -7488,11 +7605,6 @@ var PipelineSchemaSchema = zod.z.object({
7488
7605
  selectedEngine: PipelineEngineChoiceSchema,
7489
7606
  slots: zod.z.array(PipelineSlotSchemaSchema).readonly()
7490
7607
  });
7491
- var DetectorOutputSchema = zod.z.object({
7492
- detections: zod.z.array(SpatialDetectionSchema).readonly(),
7493
- inferenceMs: zod.z.number(),
7494
- modelId: zod.z.string()
7495
- });
7496
7608
  var EngineProvisioningSchema = zod.z.object({
7497
7609
  runtimeId: zod.z.enum([
7498
7610
  "onnx",
@@ -7657,6 +7769,28 @@ var pipelineExecutorCapability = {
7657
7769
  kind: "mutation",
7658
7770
  auth: "admin"
7659
7771
  }),
7772
+ /**
7773
+ * Clear THIS node's executor-side PER-DEVICE settings stores (the
7774
+ * per-camera step overrides the object-detection root reads via
7775
+ * `applyDeviceOverridesToTree`). `nodeId` is the ROUTING key — the
7776
+ * generated cap-router strips it (default `nodeIdMode: 'routing'`) and
7777
+ * dispatches to that node, so the provider method runs ON the target
7778
+ * node and receives no `nodeId`.
7779
+ *
7780
+ * This is the slimmed executor leg of the orchestrator's
7781
+ * `resetNodePipelineDefaults` flow (which owns the real reset: node
7782
+ * addonDefaults pins + per-camera orchestrator overrides). The legacy
7783
+ * `resetToDefault` — which reset a persisted global step-tree seed
7784
+ * nothing in the live per-camera path read — was removed together with
7785
+ * that seed.
7786
+ */
7787
+ clearDeviceOverrides: require_sleep.method(zod.z.object({ nodeId: zod.z.string() }), zod.z.object({
7788
+ success: zod.z.literal(true),
7789
+ clearedDevices: zod.z.number()
7790
+ }), {
7791
+ kind: "mutation",
7792
+ auth: "admin"
7793
+ }),
7660
7794
  getSchema: require_sleep.method(zod.z.void(), PipelineSchemaSchema),
7661
7795
  getGlobalSteps: require_sleep.method(zod.z.void(), zod.z.array(PipelineDefaultStepSchema).readonly().nullable()),
7662
7796
  getGlobalPipelineConfig: require_sleep.method(zod.z.void(), PipelineConfigBridge),
@@ -7698,11 +7832,6 @@ var pipelineExecutorCapability = {
7698
7832
  modelId: zod.z.string(),
7699
7833
  format: ModelFormatSchema$1
7700
7834
  }), zod.z.object({ success: zod.z.literal(true) }), { kind: "mutation" }),
7701
- detect: require_sleep.method(zod.z.object({
7702
- addonId: zod.z.string(),
7703
- frame: FrameInputSchema,
7704
- config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
7705
- }), DetectorOutputSchema),
7706
7835
  /**
7707
7836
  * Stateless single-frame execution. Callers (runner, benchmark) pass
7708
7837
  * the complete `engine` + `steps` tree; the executor holds no state
@@ -12426,6 +12555,7 @@ function createSystemProxy(api) {
12426
12555
  getEngineProvisioning: (input) => dispatch("pipelineExecutor", "getEngineProvisioning", "query", input),
12427
12556
  getVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "getVideoPipelineSteps", "query", input),
12428
12557
  setVideoPipelineSteps: (input) => dispatch("pipelineExecutor", "setVideoPipelineSteps", "mutation", input),
12558
+ clearDeviceOverrides: (input) => dispatch("pipelineExecutor", "clearDeviceOverrides", "mutation", input),
12429
12559
  getSchema: (input) => dispatch("pipelineExecutor", "getSchema", "query", input),
12430
12560
  getGlobalSteps: (input) => dispatch("pipelineExecutor", "getGlobalSteps", "query", input),
12431
12561
  getGlobalPipelineConfig: (input) => dispatch("pipelineExecutor", "getGlobalPipelineConfig", "query", input),
@@ -12439,7 +12569,6 @@ function createSystemProxy(api) {
12439
12569
  getAddonModels: (input) => dispatch("pipelineExecutor", "getAddonModels", "query", input),
12440
12570
  downloadModel: (input) => dispatch("pipelineExecutor", "downloadModel", "mutation", input),
12441
12571
  deleteModel: (input) => dispatch("pipelineExecutor", "deleteModel", "mutation", input),
12442
- detect: (input) => dispatch("pipelineExecutor", "detect", "query", input),
12443
12572
  cacheFrameInPool: (input) => dispatch("pipelineExecutor", "cacheFrameInPool", "mutation", input),
12444
12573
  inferCached: (input) => dispatch("pipelineExecutor", "inferCached", "mutation", input),
12445
12574
  uncacheFrame: (input) => dispatch("pipelineExecutor", "uncacheFrame", "mutation", input),
@@ -12463,7 +12592,6 @@ function createSystemProxy(api) {
12463
12592
  getCapabilityBindings: (input) => dispatch("pipelineOrchestrator", "getCapabilityBindings", "query", input),
12464
12593
  setCapabilityBinding: (input) => dispatch("pipelineOrchestrator", "setCapabilityBinding", "mutation", input),
12465
12594
  getIngestOwner: (input) => dispatch("pipelineOrchestrator", "getIngestOwner", "query", input),
12466
- getDecoderAssignments: (input) => dispatch("pipelineOrchestrator", "getDecoderAssignments", "query", input),
12467
12595
  getAudioNodeLoad: (input) => dispatch("pipelineOrchestrator", "getAudioNodeLoad", "query", input),
12468
12596
  getAgentSettings: (input) => dispatch("pipelineOrchestrator", "getAgentSettings", "query", input),
12469
12597
  listAgentSettings: (input) => dispatch("pipelineOrchestrator", "listAgentSettings", "query", input),
@@ -12473,6 +12601,7 @@ function createSystemProxy(api) {
12473
12601
  setAgentDetectWeight: (input) => dispatch("pipelineOrchestrator", "setAgentDetectWeight", "mutation", input),
12474
12602
  setAgentCapabilities: (input) => dispatch("pipelineOrchestrator", "setAgentCapabilities", "mutation", input),
12475
12603
  setAgentReachableHost: (input) => dispatch("pipelineOrchestrator", "setAgentReachableHost", "mutation", input),
12604
+ resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
12476
12605
  getCameraStatuses: (input) => dispatch("pipelineOrchestrator", "getCameraStatuses", "query", input),
12477
12606
  listTemplates: (input) => dispatch("pipelineOrchestrator", "listTemplates", "query", input),
12478
12607
  saveTemplate: (input) => dispatch("pipelineOrchestrator", "saveTemplate", "mutation", input),
@@ -13258,7 +13387,9 @@ var AddonPageDeclarationSchema$1 = zod.z.object({
13258
13387
  icon: zod.z.string(),
13259
13388
  path: zod.z.string(),
13260
13389
  remoteName: zod.z.string(),
13261
- bundle: zod.z.string()
13390
+ bundle: zod.z.string(),
13391
+ section: zod.z.string().optional(),
13392
+ sectionLabel: zod.z.string().optional()
13262
13393
  });
13263
13394
  var AddonPageInfoSchema = zod.z.object({
13264
13395
  addonId: zod.z.string(),
@@ -13305,7 +13436,18 @@ var AddonPageDeclarationSchema = zod.z.object({
13305
13436
  * the static-file route can compute an mtime-based cache-buster URL
13306
13437
  * without a separate filesystem stat.
13307
13438
  */
13308
- bundle: zod.z.string()
13439
+ bundle: zod.z.string(),
13440
+ /**
13441
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
13442
+ * `'cluster'`, `'administration'` — the page renders inside that group.
13443
+ * Any OTHER string creates (or joins) a custom section rendered after
13444
+ * the built-in groups; its label comes from `sectionLabel` (first
13445
+ * declaration wins), falling back to the id. Absent → the legacy
13446
+ * "Addon Pages" group.
13447
+ */
13448
+ section: zod.z.string().optional(),
13449
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
13450
+ sectionLabel: zod.z.string().optional()
13309
13451
  });
13310
13452
  var addonPagesSourceCapability = {
13311
13453
  name: "addon-pages-source",
@@ -17461,7 +17603,12 @@ var AgentPipelineSettingsSchema = zod.z.object({
17461
17603
  detectWeight: zod.z.number().positive().optional(),
17462
17604
  /** Node is eligible to run the detection pipeline (decode + inference). */
17463
17605
  detect: zod.z.boolean().optional(),
17464
- /** Node is eligible to host decoder sessions. */
17606
+ /**
17607
+ * DEPRECATED AND IGNORED. Decode is always co-located with its frame
17608
+ * consumer, so decode eligibility IS detect eligibility. Kept optional in
17609
+ * the schema ONLY so persisted stores written before the removal still
17610
+ * parse — no code reads it and no write path emits it.
17611
+ */
17465
17612
  decode: zod.z.boolean().optional(),
17466
17613
  /** Node is eligible to run audio-analyzer sessions. */
17467
17614
  audio: zod.z.boolean().optional(),
@@ -17522,25 +17669,6 @@ var PipelineAssignmentSchema = zod.z.object({
17522
17669
  assignedAt: zod.z.number()
17523
17670
  });
17524
17671
  /**
17525
- * Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
17526
- * the decoder-node placement domain (`balanceDecoder` decision: manual pin
17527
- * → co-located with pipeline → capacity).
17528
- */
17529
- var DecoderAssignmentSchema = zod.z.object({
17530
- deviceId: zod.z.number(),
17531
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
17532
- decoderNodeId: zod.z.string(),
17533
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
17534
- pinned: zod.z.boolean(),
17535
- /** Why this assignment was made — useful for debugging the decoder balancer. */
17536
- reason: zod.z.enum([
17537
- "manual",
17538
- "co-located",
17539
- "capacity",
17540
- "hardware-affinity"
17541
- ])
17542
- });
17543
- /**
17544
17672
  * Per-agent load summary surfaced to the load balancer + dashboards.
17545
17673
  * Aggregated from each runner's `getLocalLoad` cap call.
17546
17674
  */
@@ -17827,21 +17955,6 @@ var pipelineOrchestratorCapability = {
17827
17955
  * present. Defaults to `{ ownerNodeId: 'hub' }`.
17828
17956
  */
17829
17957
  getIngestOwner: require_sleep.method(zod.z.void(), IngestOwnerSchema),
17830
- /** Pin a device's decoder to a specific node. */
17831
- assignDecoder: require_sleep.method(zod.z.object({
17832
- deviceId: zod.z.number(),
17833
- nodeId: zod.z.string()
17834
- }), zod.z.void(), {
17835
- kind: "mutation",
17836
- auth: "admin"
17837
- }),
17838
- /** Clear a device's decoder pin (revert to auto). */
17839
- unassignDecoder: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
17840
- kind: "mutation",
17841
- auth: "admin"
17842
- }),
17843
- /** Get every camera's decoder placement. */
17844
- getDecoderAssignments: require_sleep.method(zod.z.void(), zod.z.array(DecoderAssignmentSchema).readonly()),
17845
17958
  /** Pin a device's audio analysis to a specific cluster node. */
17846
17959
  assignAudio: require_sleep.method(zod.z.object({
17847
17960
  deviceId: zod.z.number(),
@@ -17873,23 +17986,6 @@ var pipelineOrchestratorCapability = {
17873
17986
  pinned: zod.z.boolean(),
17874
17987
  assignedAt: zod.z.number()
17875
17988
  }))),
17876
- /**
17877
- * Get one camera's decoder placement (computed if not yet pinned).
17878
- *
17879
- * ADVISORY today: reports the orchestrator's decoder preference only.
17880
- * Actual decode placement is broker-owned (local-node pin + frame-plane
17881
- * co-location guard). Reserved to become the binding source/decoder-owner
17882
- * control in the stream-LB epic (Phase 2).
17883
- *
17884
- * `pipelineNodeId` is the node already chosen to run inference for
17885
- * this camera. When provided, the balancer prefers co-location with
17886
- * it; omitted → falls back to the last known assignment in the
17887
- * `assignments` map and finally to 'hub'.
17888
- */
17889
- getDecoderAssignment: require_sleep.method(zod.z.object({
17890
- deviceId: zod.z.number(),
17891
- pipelineNodeId: zod.z.string().optional()
17892
- }), DecoderAssignmentSchema),
17893
17989
  /** Read one agent's settings. Null when not yet seeded. */
17894
17990
  getAgentSettings: require_sleep.method(zod.z.object({ agentNodeId: zod.z.string() }), AgentPipelineSettingsSchema.nullable()),
17895
17991
  /** Enumerate every agent's settings (hub + remote runners). */
@@ -17959,14 +18055,15 @@ var pipelineOrchestratorCapability = {
17959
18055
  * `enabledDecoderNodes`, `enabledAudioNodes`, `remoteSourcingNodes`).
17960
18056
  * Each flag is optional in the patch: omit a flag to leave it unchanged,
17961
18057
  * pass `null` to reset it to the node default (`hub` → capable, every
17962
- * other node → not). Detection/decode/audio eligibility is derived from
17963
- * these flags across the cluster; changing them re-derives the enabled
17964
- * sets and reconciles dispatch immediately.
18058
+ * other node → not). Detection/audio eligibility is derived from these
18059
+ * flags across the cluster; changing them re-derives the enabled sets
18060
+ * and reconciles dispatch immediately. There is NO separate decode flag:
18061
+ * decode is always co-located with its frame consumer, so decode
18062
+ * eligibility IS detect eligibility.
17965
18063
  */
17966
18064
  setAgentCapabilities: require_sleep.method(zod.z.object({
17967
18065
  agentNodeId: zod.z.string(),
17968
18066
  detect: zod.z.boolean().nullable().optional(),
17969
- decode: zod.z.boolean().nullable().optional(),
17970
18067
  audio: zod.z.boolean().nullable().optional(),
17971
18068
  ingest: zod.z.boolean().nullable().optional()
17972
18069
  }), zod.z.object({ success: zod.z.literal(true) }), {
@@ -17989,6 +18086,34 @@ var pipelineOrchestratorCapability = {
17989
18086
  kind: "mutation",
17990
18087
  auth: "admin"
17991
18088
  }),
18089
+ /**
18090
+ * Reset one node's pipeline to its hardware-aware defaults — the HONEST
18091
+ * reset (replaces the executor's legacy `resetToDefault`, which cleared a
18092
+ * dead persisted step-tree seed nothing in the live path read):
18093
+ * (a) strips every `modelId` pin from that node's
18094
+ * `agentSettings.addonDefaults` (cells revert to Auto — the node
18095
+ * resolves its own hardware-aware format default at runtime);
18096
+ * (b) clears per-camera step overrides scoped to that node
18097
+ * (`stepOverridesByAgent[node]` + the wholesale
18098
+ * `pipelineByAgent[node]` escape hatch);
18099
+ * (c) clears the executor-side per-device settings stores on that node
18100
+ * (`pipelineExecutor.clearDeviceOverrides`);
18101
+ * (d) hot-reloads every camera assigned to the node.
18102
+ *
18103
+ * Returns the EFFECTIVE post-reset object-detection model for the node
18104
+ * (the executor's pure hardware-aware default) so the UI can report what
18105
+ * will actually run — not a value that never reaches the live path.
18106
+ */
18107
+ resetNodePipelineDefaults: require_sleep.method(zod.z.object({ agentNodeId: zod.z.string() }), zod.z.object({
18108
+ success: zod.z.literal(true),
18109
+ /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
18110
+ effectiveModelId: zod.z.string().nullable(),
18111
+ /** Number of cameras whose node-scoped overrides were cleared. */
18112
+ clearedCameraOverrides: zod.z.number()
18113
+ }), {
18114
+ kind: "mutation",
18115
+ auth: "admin"
18116
+ }),
17992
18117
  /** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
17993
18118
  getCameraSettings: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), CameraPipelineSettingsSchema.nullable()),
17994
18119
  /** Set or clear the 3-state toggle for one (camera, addonId). Pass `enabled: null` to clear and revert to agent default. */
@@ -25960,23 +26085,23 @@ var METHOD_ACCESS_MAP = Object.freeze({
25960
26085
  addonId: null,
25961
26086
  access: "create"
25962
26087
  },
25963
- "pipelineExecutor.deleteModel": {
26088
+ "pipelineExecutor.clearDeviceOverrides": {
25964
26089
  capName: "pipeline-executor",
25965
26090
  capScope: "system",
25966
26091
  addonId: null,
25967
26092
  access: "delete"
25968
26093
  },
25969
- "pipelineExecutor.deleteTemplate": {
26094
+ "pipelineExecutor.deleteModel": {
25970
26095
  capName: "pipeline-executor",
25971
26096
  capScope: "system",
25972
26097
  addonId: null,
25973
26098
  access: "delete"
25974
26099
  },
25975
- "pipelineExecutor.detect": {
26100
+ "pipelineExecutor.deleteTemplate": {
25976
26101
  capName: "pipeline-executor",
25977
26102
  capScope: "system",
25978
26103
  addonId: null,
25979
- access: "view"
26104
+ access: "delete"
25980
26105
  },
25981
26106
  "pipelineExecutor.downloadModel": {
25982
26107
  capName: "pipeline-executor",
@@ -26182,12 +26307,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
26182
26307
  addonId: null,
26183
26308
  access: "create"
26184
26309
  },
26185
- "pipelineOrchestrator.assignDecoder": {
26186
- capName: "pipeline-orchestrator",
26187
- capScope: "system",
26188
- addonId: null,
26189
- access: "create"
26190
- },
26191
26310
  "pipelineOrchestrator.assignPipeline": {
26192
26311
  capName: "pipeline-orchestrator",
26193
26312
  capScope: "system",
@@ -26266,18 +26385,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
26266
26385
  addonId: null,
26267
26386
  access: "view"
26268
26387
  },
26269
- "pipelineOrchestrator.getDecoderAssignment": {
26270
- capName: "pipeline-orchestrator",
26271
- capScope: "system",
26272
- addonId: null,
26273
- access: "view"
26274
- },
26275
- "pipelineOrchestrator.getDecoderAssignments": {
26276
- capName: "pipeline-orchestrator",
26277
- capScope: "system",
26278
- addonId: null,
26279
- access: "view"
26280
- },
26281
26388
  "pipelineOrchestrator.getGlobalMetrics": {
26282
26389
  capName: "pipeline-orchestrator",
26283
26390
  capScope: "system",
@@ -26326,6 +26433,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
26326
26433
  addonId: null,
26327
26434
  access: "delete"
26328
26435
  },
26436
+ "pipelineOrchestrator.resetNodePipelineDefaults": {
26437
+ capName: "pipeline-orchestrator",
26438
+ capScope: "system",
26439
+ addonId: null,
26440
+ access: "delete"
26441
+ },
26329
26442
  "pipelineOrchestrator.resolvePipeline": {
26330
26443
  capName: "pipeline-orchestrator",
26331
26444
  capScope: "system",
@@ -26398,12 +26511,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
26398
26511
  addonId: null,
26399
26512
  access: "create"
26400
26513
  },
26401
- "pipelineOrchestrator.unassignDecoder": {
26402
- capName: "pipeline-orchestrator",
26403
- capScope: "system",
26404
- addonId: null,
26405
- access: "create"
26406
- },
26407
26514
  "pipelineOrchestrator.unassignPipeline": {
26408
26515
  capName: "pipeline-orchestrator",
26409
26516
  capScope: "system",
@@ -28665,12 +28772,10 @@ exports.DayNightSettingsPatchSchema = DayNightSettingsPatchSchema;
28665
28772
  exports.DayNightStatusSchema = DayNightStatusSchema;
28666
28773
  exports.DecodedAudioChunkSchema = require_sleep.DecodedAudioChunkSchema;
28667
28774
  exports.DecodedFrameSchema = require_sleep.DecodedFrameSchema;
28668
- exports.DecoderAssignmentSchema = DecoderAssignmentSchema;
28669
28775
  exports.DecoderSessionConfigSchema = DecoderSessionConfigSchema;
28670
28776
  exports.DecoderStatsSchema = DecoderStatsSchema;
28671
28777
  exports.DeleteIntegrationResultSchema = DeleteIntegrationResultSchema;
28672
28778
  exports.DetectionSourceSchema = DetectionSourceSchema;
28673
- exports.DetectorOutputSchema = DetectorOutputSchema;
28674
28779
  exports.DeviceCodeSeveritySchema = DeviceCodeSeveritySchema;
28675
28780
  exports.DeviceConfig = DeviceConfig;
28676
28781
  exports.DeviceDiscoveryStatusSchema = DeviceDiscoveryStatusSchema;
@@ -28874,6 +28979,9 @@ exports.PtzPositionSchema = PtzPositionSchema;
28874
28979
  exports.PtzPresetSchema = PtzPresetSchema;
28875
28980
  exports.PtzStatusSchema = PtzStatusSchema;
28876
28981
  exports.QueryFilterSchema = QueryFilterSchema;
28982
+ exports.REACHABILITY_FAILURES_TO_OFFLINE = REACHABILITY_FAILURES_TO_OFFLINE;
28983
+ exports.REACHABILITY_POLL_INTERVAL_MS = REACHABILITY_POLL_INTERVAL_MS;
28984
+ exports.REACHABILITY_PROBE_TIMEOUT_MS = REACHABILITY_PROBE_TIMEOUT_MS;
28877
28985
  exports.RECOGNITION_TYPES = RECOGNITION_TYPES;
28878
28986
  exports.RESERVED_BINDING_NAMES = RESERVED_BINDING_NAMES;
28879
28987
  exports.RUNTIME_DEFAULTS = RUNTIME_DEFAULTS;
@@ -29254,6 +29362,7 @@ exports.smokeCapability = smokeCapability;
29254
29362
  exports.smtpProviderCapability = smtpProviderCapability;
29255
29363
  exports.snapshotCapability = snapshotCapability;
29256
29364
  exports.ssoBridgeCapability = ssoBridgeCapability;
29365
+ exports.startReachabilityPoll = startReachabilityPoll;
29257
29366
  exports.storageCapability = storageCapability;
29258
29367
  exports.storageEvictableCapability = storageEvictableCapability;
29259
29368
  exports.storageProviderCapability = storageProviderCapability;