@camstack/addon-pipeline 1.2.340 → 1.2.341
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/audio-analyzer/index.js +3 -3
- package/dist/audio-analyzer/index.mjs +3 -3
- package/dist/{custom-model-catalog-Cjbll1Sf.js → custom-model-catalog-CoJEC8nz.js} +2 -2
- package/dist/{custom-model-catalog-BOnN63HU.mjs → custom-model-catalog-DNSmyZTT.mjs} +2 -2
- package/dist/detection-pipeline/index.js +9 -9
- package/dist/detection-pipeline/index.mjs +9 -9
- package/dist/{dist-CsA6fY6I.mjs → dist-B8oPeJDI.mjs} +203 -32
- package/dist/{dist-BWigCRRN.js → dist-PiNPe8uQ.js} +203 -32
- package/dist/{model-catalogs-BFBf8sHb.js → model-catalogs-CEphd9Va.js} +1 -1
- package/dist/{model-catalogs-D7JXV0_i.mjs → model-catalogs-RM3pkuZm.mjs} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-D52HHrVZ.js → node-CMTBIa3-.js} +1 -1
- package/dist/{node-BZ29vHq2.mjs → node-DFUmMJ_f.mjs} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-DOEeg2pL.mjs → process-memory-C4v8DBKn.mjs} +1 -1
- package/dist/{process-memory-C9U6dKxS.js → process-memory-CzAfDP9P.js} +1 -1
- package/dist/recorder/index.js +10 -4
- package/dist/recorder/index.mjs +10 -4
- package/dist/{segment-demux-js-CMZSmwMp.js → segment-demux-js-C-n_ZsMK.js} +1 -1
- package/dist/{segment-demux-js-DDgwrz-e.mjs → segment-demux-js-CIpCdbx4.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-6JIjr_ur.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CIDS0Tr9.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvfT5BVP.mjs +26 -0
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B-hhg2sP.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-LU_e-xJm.mjs} +1 -1
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-Ck1wQfKk.mjs → hostInit-CW_cmeNQ.mjs} +2 -2
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js--yC-aoPc.mjs +0 -26
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_model_catalogs = require("../model-catalogs-
|
|
8
|
-
const require_process_memory = require("../process-memory-
|
|
6
|
+
const require_dist = require("../dist-PiNPe8uQ.js");
|
|
7
|
+
const require_model_catalogs = require("../model-catalogs-CEphd9Va.js");
|
|
8
|
+
const require_process_memory = require("../process-memory-CzAfDP9P.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
node_fs = require_chunk.__toESM(node_fs);
|
|
11
11
|
let node_path = require("node:path");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Dn as errMsg, In as expandAudioChunkToF32le, Ln as hydrateSchema, Mn as audioChunkBytesPerSample, N as PoolMemoryWatchdog, Nt as mapAudioLabelToMacro, Vn as nodePin, X as audioAnalyzerCapability, Y as audioAnalysisCapability, an as resolvePoolMemoryPolicy, h as DEFAULT_AUDIO_ANALYZER_CONFIG, ir as EventCategory, kn as BaseAddon, r as AUDIO_BACKEND_CHOICES } from "../dist-
|
|
3
|
-
import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-
|
|
4
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { Dn as errMsg, In as expandAudioChunkToF32le, Ln as hydrateSchema, Mn as audioChunkBytesPerSample, N as PoolMemoryWatchdog, Nt as mapAudioLabelToMacro, Vn as nodePin, X as audioAnalyzerCapability, Y as audioAnalysisCapability, an as resolvePoolMemoryPolicy, h as DEFAULT_AUDIO_ANALYZER_CONFIG, ir as EventCategory, kn as BaseAddon, r as AUDIO_BACKEND_CHOICES } from "../dist-B8oPeJDI.mjs";
|
|
3
|
+
import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-RM3pkuZm.mjs";
|
|
4
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-C4v8DBKn.mjs";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import { ensureModel } from "@camstack/system/addon-utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
2
|
-
const require_model_catalogs = require("./model-catalogs-
|
|
1
|
+
const require_dist = require("./dist-PiNPe8uQ.js");
|
|
2
|
+
const require_model_catalogs = require("./model-catalogs-CEphd9Va.js");
|
|
3
3
|
const require_worker_protocol = require("./worker-protocol-C-G8qmye.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dt as inferModelProvider, Z as audioKindId, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, k as LABEL_SUPPLY_VOCABULARIES, p as COCO_TO_MACRO, un as stepModelRunsOnFormat } from "./dist-
|
|
2
|
-
import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-
|
|
1
|
+
import { Dt as inferModelProvider, Z as audioKindId, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, k as LABEL_SUPPLY_VOCABULARIES, p as COCO_TO_MACRO, un as stepModelRunsOnFormat } from "./dist-B8oPeJDI.mjs";
|
|
2
|
+
import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-RM3pkuZm.mjs";
|
|
3
3
|
import { t as isWorkerReply } from "./worker-protocol-D_NzPcnh.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_custom_model_catalog = require("../custom-model-catalog-
|
|
6
|
+
const require_dist = require("../dist-PiNPe8uQ.js");
|
|
7
|
+
const require_node = require("../node-CMTBIa3-.js");
|
|
8
|
+
const require_custom_model_catalog = require("../custom-model-catalog-CoJEC8nz.js");
|
|
9
9
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-CzAfDP9P.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -348,7 +348,7 @@ function normalizeEngineNodeId(rawNodeId) {
|
|
|
348
348
|
//#endregion
|
|
349
349
|
//#region src/detection-pipeline/model-bound-device-overrides.ts
|
|
350
350
|
/**
|
|
351
|
-
*
|
|
351
|
+
* Auto tune (D745), the executor leg: list — and optionally remove — the
|
|
352
352
|
* MODEL-BOUND thresholds stored in this addon's per-camera settings (the
|
|
353
353
|
* object-detection root's `bindsToModel` keys and their binding keys, D738).
|
|
354
354
|
* Every other key of a camera's store is kept.
|
|
@@ -8554,7 +8554,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
8554
8554
|
readDeviceStore;
|
|
8555
8555
|
/** Delete all per-device settings for a device (used by `clearDeviceOverrides`). */
|
|
8556
8556
|
clearDeviceStore;
|
|
8557
|
-
/** Merge a patch into one device's settings (
|
|
8557
|
+
/** Merge a patch into one device's settings (Auto tune' keep-the-rest rewrite, D745). */
|
|
8558
8558
|
writeDeviceStore;
|
|
8559
8559
|
/**
|
|
8560
8560
|
* The per-device overrides the FRAME path reads, kept fresh off that path.
|
|
@@ -11155,7 +11155,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
11155
11155
|
};
|
|
11156
11156
|
}
|
|
11157
11157
|
/**
|
|
11158
|
-
*
|
|
11158
|
+
* Auto tune (D745): list — or, unless `dryRun`, remove — the model-bound
|
|
11159
11159
|
* thresholds of the per-camera detector store. See
|
|
11160
11160
|
* `model-bound-device-overrides.ts`.
|
|
11161
11161
|
*/
|
|
@@ -11172,14 +11172,14 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
11172
11172
|
invalidate: (deviceId) => this.deviceOverrides.invalidate(deviceId),
|
|
11173
11173
|
boundKeys: require_dist.collectModelBoundKeys(require_custom_model_catalog.getStep("object-detection").getConfigSchema())
|
|
11174
11174
|
}, input);
|
|
11175
|
-
if (!input.dryRun) for (const entry of result.entries) this.log.info("
|
|
11175
|
+
if (!input.dryRun) for (const entry of result.entries) this.log.info("auto tune: per-camera detector thresholds cleared", {
|
|
11176
11176
|
tags: { deviceId: entry.deviceId },
|
|
11177
11177
|
meta: {
|
|
11178
11178
|
deviceId: entry.deviceId,
|
|
11179
11179
|
keys: entry.keys
|
|
11180
11180
|
}
|
|
11181
11181
|
});
|
|
11182
|
-
for (const r of result.refused) this.log.warn("
|
|
11182
|
+
for (const r of result.refused) this.log.warn("auto tune: per-camera detector thresholds not cleared", {
|
|
11183
11183
|
tags: { deviceId: r.deviceId },
|
|
11184
11184
|
meta: {
|
|
11185
11185
|
deviceId: r.deviceId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $n as object, Bt as modelBindingKey, Dn as errMsg$1, Et as hfModelUrl, G as YAMNET_TO_MACRO, Gn as sleep, Hn as parseJsonUnknown, Ht as overlayClusterStepSettings, J as applyModelBoundSettings, Ln as hydrateSchema, N as PoolMemoryWatchdog, Nn as createEvent, O as LABEL_SUPPLY_MACRO, Vn as nodePin, Wt as pickClusterStepSettings, _t as evaluateZoneRules, an as resolvePoolMemoryPolicy, cn as rootSuppliesOf, ct as defaultDeviceFor$1, d as CLUSTER_MODEL_SCOPED_STEPS, en as resolveClusterStepModelId, g as DEFAULT_CLUSTER_STEP_SETTINGS, gt as enumerateInferenceDevices, hn as supportedRuntimes$1, ir as EventCategory, it as containingParentIndex, jt as loadContributionCapability, kn as BaseAddon, kt as linkedLabelStepId, ln as runtimeDevices$1, n as APPLE_SA_TO_MACRO, nr as string, pt as detectionPipelineCapability, qn as array, qt as pipelineExecutorCapability, rr as union, rt as collectModelBoundKeys, un as stepModelRunsOnFormat } from "../dist-
|
|
3
|
-
import { s as readProcessCost } from "../node-
|
|
4
|
-
import { C as resolveModelDefaultConfidence, S as landmarkPrecisionVerdict, _ as ALL_STEPS, b as getStepDefinition, f as localFrameRegistry, g as ALL_PIPELINE_STEPS, l as resolveDefaultDetectionModel, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, v as getDefaultModelForFormat, x as resolveModelForFormat, y as getStep } from "../custom-model-catalog-
|
|
2
|
+
import { $n as object, Bt as modelBindingKey, Dn as errMsg$1, Et as hfModelUrl, G as YAMNET_TO_MACRO, Gn as sleep, Hn as parseJsonUnknown, Ht as overlayClusterStepSettings, J as applyModelBoundSettings, Ln as hydrateSchema, N as PoolMemoryWatchdog, Nn as createEvent, O as LABEL_SUPPLY_MACRO, Vn as nodePin, Wt as pickClusterStepSettings, _t as evaluateZoneRules, an as resolvePoolMemoryPolicy, cn as rootSuppliesOf, ct as defaultDeviceFor$1, d as CLUSTER_MODEL_SCOPED_STEPS, en as resolveClusterStepModelId, g as DEFAULT_CLUSTER_STEP_SETTINGS, gt as enumerateInferenceDevices, hn as supportedRuntimes$1, ir as EventCategory, it as containingParentIndex, jt as loadContributionCapability, kn as BaseAddon, kt as linkedLabelStepId, ln as runtimeDevices$1, n as APPLE_SA_TO_MACRO, nr as string, pt as detectionPipelineCapability, qn as array, qt as pipelineExecutorCapability, rr as union, rt as collectModelBoundKeys, un as stepModelRunsOnFormat } from "../dist-B8oPeJDI.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-DFUmMJ_f.mjs";
|
|
4
|
+
import { C as resolveModelDefaultConfidence, S as landmarkPrecisionVerdict, _ as ALL_STEPS, b as getStepDefinition, f as localFrameRegistry, g as ALL_PIPELINE_STEPS, l as resolveDefaultDetectionModel, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, v as getDefaultModelForFormat, x as resolveModelForFormat, y as getStep } from "../custom-model-catalog-DNSmyZTT.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-C4v8DBKn.mjs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
@@ -341,7 +341,7 @@ function normalizeEngineNodeId(rawNodeId) {
|
|
|
341
341
|
//#endregion
|
|
342
342
|
//#region src/detection-pipeline/model-bound-device-overrides.ts
|
|
343
343
|
/**
|
|
344
|
-
*
|
|
344
|
+
* Auto tune (D745), the executor leg: list — and optionally remove — the
|
|
345
345
|
* MODEL-BOUND thresholds stored in this addon's per-camera settings (the
|
|
346
346
|
* object-detection root's `bindsToModel` keys and their binding keys, D738).
|
|
347
347
|
* Every other key of a camera's store is kept.
|
|
@@ -8547,7 +8547,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
8547
8547
|
readDeviceStore;
|
|
8548
8548
|
/** Delete all per-device settings for a device (used by `clearDeviceOverrides`). */
|
|
8549
8549
|
clearDeviceStore;
|
|
8550
|
-
/** Merge a patch into one device's settings (
|
|
8550
|
+
/** Merge a patch into one device's settings (Auto tune' keep-the-rest rewrite, D745). */
|
|
8551
8551
|
writeDeviceStore;
|
|
8552
8552
|
/**
|
|
8553
8553
|
* The per-device overrides the FRAME path reads, kept fresh off that path.
|
|
@@ -11148,7 +11148,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
11148
11148
|
};
|
|
11149
11149
|
}
|
|
11150
11150
|
/**
|
|
11151
|
-
*
|
|
11151
|
+
* Auto tune (D745): list — or, unless `dryRun`, remove — the model-bound
|
|
11152
11152
|
* thresholds of the per-camera detector store. See
|
|
11153
11153
|
* `model-bound-device-overrides.ts`.
|
|
11154
11154
|
*/
|
|
@@ -11165,14 +11165,14 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
11165
11165
|
invalidate: (deviceId) => this.deviceOverrides.invalidate(deviceId),
|
|
11166
11166
|
boundKeys: collectModelBoundKeys(getStep("object-detection").getConfigSchema())
|
|
11167
11167
|
}, input);
|
|
11168
|
-
if (!input.dryRun) for (const entry of result.entries) this.log.info("
|
|
11168
|
+
if (!input.dryRun) for (const entry of result.entries) this.log.info("auto tune: per-camera detector thresholds cleared", {
|
|
11169
11169
|
tags: { deviceId: entry.deviceId },
|
|
11170
11170
|
meta: {
|
|
11171
11171
|
deviceId: entry.deviceId,
|
|
11172
11172
|
keys: entry.keys
|
|
11173
11173
|
}
|
|
11174
11174
|
});
|
|
11175
|
-
for (const r of result.refused) this.log.warn("
|
|
11175
|
+
for (const r of result.refused) this.log.warn("auto tune: per-camera detector thresholds not cleared", {
|
|
11176
11176
|
tags: { deviceId: r.deviceId },
|
|
11177
11177
|
meta: {
|
|
11178
11178
|
deviceId: r.deviceId,
|
|
@@ -26863,7 +26863,7 @@ var pipelineExecutorCapability = {
|
|
|
26863
26863
|
auth: "admin"
|
|
26864
26864
|
}),
|
|
26865
26865
|
/**
|
|
26866
|
-
*
|
|
26866
|
+
* Auto tune (D745): the MODEL-BOUND thresholds (`bindsToModel` keys of
|
|
26867
26867
|
* the object-detection root, and their binding keys) stored in THIS node's
|
|
26868
26868
|
* per-camera detector settings — and, unless `dryRun`, remove them so the
|
|
26869
26869
|
* running model's own defaults apply. Every other key of a camera's store
|
|
@@ -27235,7 +27235,143 @@ var pipelineExecutorCapability = {
|
|
|
27235
27235
|
}
|
|
27236
27236
|
};
|
|
27237
27237
|
/**
|
|
27238
|
-
*
|
|
27238
|
+
* Wire shapes of the Load balancing surface (D748): the session placement
|
|
27239
|
+
* policy, the atomic share write, the observed placement statistics, the
|
|
27240
|
+
* hardware share suggestion and the stale device pins.
|
|
27241
|
+
*/
|
|
27242
|
+
/**
|
|
27243
|
+
* How a new detection session picks its node and device.
|
|
27244
|
+
* - `least-loaded` — the historical rule: lowest `attached / weight`, a
|
|
27245
|
+
* constant node order at a tie (D37). An idle node always ties at 0, so a
|
|
27246
|
+
* weight only bites once a node already holds a session.
|
|
27247
|
+
* - `share` — the share of PARALLEL sessions is held to the weights, and a
|
|
27248
|
+
* full or drowning node yields to a free one (D748).
|
|
27249
|
+
*/
|
|
27250
|
+
var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
|
|
27251
|
+
var LoadBalancingSharesInputSchema = object({
|
|
27252
|
+
/** nodeId → share (> 0). A node left out keeps its weight. */
|
|
27253
|
+
nodes: record(string(), number().positive()).default({}),
|
|
27254
|
+
/** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
|
|
27255
|
+
devices: record(string(), record(string(), number().positive())).default({})
|
|
27256
|
+
});
|
|
27257
|
+
var PlacementStatsInputSchema = object({
|
|
27258
|
+
/** Window the observed shares are averaged over (default 1 h, max 24 h). */
|
|
27259
|
+
windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
|
|
27260
|
+
var PlacementDeviceStatsSchema = object({
|
|
27261
|
+
deviceKey: string(),
|
|
27262
|
+
/** Sessions running on this device now. */
|
|
27263
|
+
sessionsNow: number(),
|
|
27264
|
+
/** Sessions started on this device inside the window. */
|
|
27265
|
+
sessionsStarted: number(),
|
|
27266
|
+
/** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
|
|
27267
|
+
observedShare: number().nullable()
|
|
27268
|
+
});
|
|
27269
|
+
var PlacementNodeStatsSchema = object({
|
|
27270
|
+
nodeId: string(),
|
|
27271
|
+
sessionsNow: number(),
|
|
27272
|
+
sessionsStarted: number(),
|
|
27273
|
+
/** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
|
|
27274
|
+
observedShare: number().nullable(),
|
|
27275
|
+
/** Most sessions this node ran at once inside the window. */
|
|
27276
|
+
peakSessions: number(),
|
|
27277
|
+
/** Sessions a share election handed elsewhere because this node was full or drowning. */
|
|
27278
|
+
yieldsAway: number(),
|
|
27279
|
+
devices: array(PlacementDeviceStatsSchema).readonly()
|
|
27280
|
+
});
|
|
27281
|
+
/** A camera's device pin that the session path cannot honour. */
|
|
27282
|
+
var StaleDevicePinSchema = object({
|
|
27283
|
+
deviceId: number(),
|
|
27284
|
+
deviceKey: string(),
|
|
27285
|
+
/** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
|
|
27286
|
+
reason: _enum(["disabled", "absent"])
|
|
27287
|
+
});
|
|
27288
|
+
var PlacementStatsSchema = object({
|
|
27289
|
+
policy: SessionPlacementPolicySchema,
|
|
27290
|
+
windowMs: number(),
|
|
27291
|
+
/** How much of the window was actually observed (the hub keeps it in memory). */
|
|
27292
|
+
observedForMs: number(),
|
|
27293
|
+
sessionsNow: number(),
|
|
27294
|
+
/** Most parallel sessions across the cluster inside the window. */
|
|
27295
|
+
clusterPeakSessions: number(),
|
|
27296
|
+
nodes: array(PlacementNodeStatsSchema).readonly(),
|
|
27297
|
+
stalePins: array(StaleDevicePinSchema).readonly()
|
|
27298
|
+
});
|
|
27299
|
+
var SuggestSharesInputSchema = object({ headroom: number().min(.3).max(.5).default(.4) });
|
|
27300
|
+
var SuggestedDeviceShareSchema = object({
|
|
27301
|
+
deviceKey: string(),
|
|
27302
|
+
/** Share of the node (0–100, rounded). */
|
|
27303
|
+
share: number(),
|
|
27304
|
+
modelId: string().nullable(),
|
|
27305
|
+
/** Inferences per second at that model, from the measured table. */
|
|
27306
|
+
fps: number().nullable(),
|
|
27307
|
+
measured: boolean(),
|
|
27308
|
+
/** Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋. Never enforced. */
|
|
27309
|
+
suggestedMaxSessions: number().nullable()
|
|
27310
|
+
});
|
|
27311
|
+
var SuggestedNodeShareSchema = object({
|
|
27312
|
+
nodeId: string(),
|
|
27313
|
+
/** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
|
|
27314
|
+
share: number().nullable(),
|
|
27315
|
+
/** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
|
|
27316
|
+
capacitySessions: number(),
|
|
27317
|
+
devices: array(SuggestedDeviceShareSchema).readonly(),
|
|
27318
|
+
skippedReason: string().nullable()
|
|
27319
|
+
});
|
|
27320
|
+
var SuggestSharesResultSchema = object({
|
|
27321
|
+
headroom: number(),
|
|
27322
|
+
/** Camera detection rate the capacity is counted in (the fastest camera's fps). */
|
|
27323
|
+
cameraFps: number(),
|
|
27324
|
+
/** How many share → model → capacity rounds ran before the shares stopped moving (≤ 3). */
|
|
27325
|
+
iterations: number(),
|
|
27326
|
+
nodes: array(SuggestedNodeShareSchema).readonly()
|
|
27327
|
+
});
|
|
27328
|
+
/**
|
|
27329
|
+
* Where the node and device shares come from (D750).
|
|
27330
|
+
* - `auto` — computed by the system from the cluster's measured capacity at
|
|
27331
|
+
* the Auto tune models, and recomputed whenever a node or device joins,
|
|
27332
|
+
* leaves, is switched on or off, or changes model.
|
|
27333
|
+
* - `manual` — the operator's stored sliders. A node or device that cannot
|
|
27334
|
+
* take sessions gives its share to the others in proportion; the stored
|
|
27335
|
+
* values are never rewritten for that.
|
|
27336
|
+
*/
|
|
27337
|
+
var ShareSourceSchema = _enum(["auto", "manual"]);
|
|
27338
|
+
var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
|
|
27339
|
+
object({
|
|
27340
|
+
nodes: record(string(), number()),
|
|
27341
|
+
devices: record(string(), record(string(), number()))
|
|
27342
|
+
});
|
|
27343
|
+
var EffectiveDeviceShareSchema = object({
|
|
27344
|
+
deviceKey: string(),
|
|
27345
|
+
/** Can take sessions now (enabled, available, can run the root). */
|
|
27346
|
+
eligible: boolean(),
|
|
27347
|
+
/** The share the source assigns, as a percentage of the node's devices. */
|
|
27348
|
+
configuredPct: number(),
|
|
27349
|
+
/** The share actually used, after an ineligible device's share went to the others. */
|
|
27350
|
+
effectivePct: number()
|
|
27351
|
+
});
|
|
27352
|
+
var EffectiveNodeShareSchema = object({
|
|
27353
|
+
nodeId: string(),
|
|
27354
|
+
eligible: boolean(),
|
|
27355
|
+
configuredPct: number(),
|
|
27356
|
+
effectivePct: number(),
|
|
27357
|
+
devices: array(EffectiveDeviceShareSchema).readonly()
|
|
27358
|
+
});
|
|
27359
|
+
var EffectiveSharesSchema = object({
|
|
27360
|
+
source: ShareSourceSchema,
|
|
27361
|
+
policy: SessionPlacementPolicySchema,
|
|
27362
|
+
/** `auto` with no computed answer yet: the stored sliders are used meanwhile. */
|
|
27363
|
+
autoPending: boolean(),
|
|
27364
|
+
/** When the automatic shares were last computed (ms epoch); null = never. */
|
|
27365
|
+
computedAt: number().nullable(),
|
|
27366
|
+
/** What made the system recompute them last. */
|
|
27367
|
+
trigger: string().nullable(),
|
|
27368
|
+
nodes: array(EffectiveNodeShareSchema).readonly(),
|
|
27369
|
+
/** The relative weights the election reads (before eligibility). */
|
|
27370
|
+
nodeWeights: record(string(), number()),
|
|
27371
|
+
deviceWeights: record(string(), record(string(), number()))
|
|
27372
|
+
});
|
|
27373
|
+
/**
|
|
27374
|
+
* The wire shapes of the Auto tune plan and apply (D745), used by the
|
|
27239
27375
|
* `pipeline-orchestrator` cap. The recommender's own types
|
|
27240
27376
|
* (`recommend.ts`, `demand.ts`) are the TS face of the same data; these
|
|
27241
27377
|
* schemas are what crosses the cap boundary.
|
|
@@ -27311,7 +27447,9 @@ var DeviceDemandSchema = object({
|
|
|
27311
27447
|
"estimate",
|
|
27312
27448
|
"none"
|
|
27313
27449
|
]),
|
|
27314
|
-
observedForMs: number().nullable()
|
|
27450
|
+
observedForMs: number().nullable(),
|
|
27451
|
+
/** How on-motion sessions were charged: per-device observation, or split by share (D748). */
|
|
27452
|
+
placement: SessionPlacementPolicySchema
|
|
27315
27453
|
});
|
|
27316
27454
|
var DeviceModelChoiceSchema = object({
|
|
27317
27455
|
modelId: string(),
|
|
@@ -27368,7 +27506,7 @@ var DetectorStoreClearSchema = object({
|
|
|
27368
27506
|
deviceId: number(),
|
|
27369
27507
|
keys: array(string()).readonly()
|
|
27370
27508
|
});
|
|
27371
|
-
var
|
|
27509
|
+
var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
27372
27510
|
object({
|
|
27373
27511
|
kind: literal("detector-store-cluster-wide"),
|
|
27374
27512
|
skippedNodes: array(string()).readonly()
|
|
@@ -27383,26 +27521,36 @@ var BestSettingsWarningSchema = discriminatedUnion("kind", [
|
|
|
27383
27521
|
deviceKey: string()
|
|
27384
27522
|
})
|
|
27385
27523
|
]);
|
|
27386
|
-
var
|
|
27387
|
-
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
27388
|
-
headroom: number().min(.3).max(.5).default(.4)
|
|
27389
|
-
|
|
27524
|
+
var AutoTuneOptionsSchema = object({
|
|
27525
|
+
/** Share of each accelerator's throughput kept free (0.3–0.5). */
|
|
27526
|
+
headroom: number().min(.3).max(.5).default(.4),
|
|
27527
|
+
/**
|
|
27528
|
+
* What-if shares (D748): plan as if these node/device shares were stored
|
|
27529
|
+
* and the policy were `share`. Absent = the stored shares under the stored
|
|
27530
|
+
* policy. A what-if plan is for display; apply always re-plans from what
|
|
27531
|
+
* is stored.
|
|
27532
|
+
*/
|
|
27533
|
+
shares: LoadBalancingSharesInputSchema.optional()
|
|
27534
|
+
});
|
|
27535
|
+
var AutoTunePlanSchema = object({
|
|
27390
27536
|
/** Hash of everything the apply will write — the apply refuses a different one. */
|
|
27391
27537
|
planHash: string(),
|
|
27392
27538
|
family: literal("yolov9"),
|
|
27393
27539
|
headroom: number(),
|
|
27540
|
+
/** Planned under what-if shares (D748): for display — apply refuses it as stale. */
|
|
27541
|
+
whatIf: boolean(),
|
|
27394
27542
|
generatedAt: number(),
|
|
27395
27543
|
nodes: array(NodeRecommendationSchema).readonly(),
|
|
27396
27544
|
nodeChanges: array(NodeDeviceChangeSchema).readonly(),
|
|
27397
27545
|
cameraClears: array(CameraOverrideClearSchema).readonly(),
|
|
27398
27546
|
detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
|
|
27399
|
-
warnings: array(
|
|
27547
|
+
warnings: array(AutoTuneWarningSchema).readonly()
|
|
27400
27548
|
});
|
|
27401
|
-
var
|
|
27549
|
+
var AutoTuneApplyInputSchema = object({
|
|
27402
27550
|
planHash: string(),
|
|
27403
27551
|
headroom: number().min(.3).max(.5).default(.4)
|
|
27404
27552
|
});
|
|
27405
|
-
var
|
|
27553
|
+
var AutoTunePhaseResultSchema = object({
|
|
27406
27554
|
phase: _enum([
|
|
27407
27555
|
"download",
|
|
27408
27556
|
"camera-overrides",
|
|
@@ -27413,19 +27561,19 @@ var BestSettingsPhaseResultSchema = object({
|
|
|
27413
27561
|
ok: boolean(),
|
|
27414
27562
|
detail: string()
|
|
27415
27563
|
});
|
|
27416
|
-
var
|
|
27564
|
+
var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
|
|
27417
27565
|
object({
|
|
27418
27566
|
kind: literal("applied"),
|
|
27419
27567
|
planHash: string(),
|
|
27420
|
-
phases: array(
|
|
27568
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
27421
27569
|
}),
|
|
27422
27570
|
object({
|
|
27423
27571
|
kind: literal("aborted"),
|
|
27424
|
-
phases: array(
|
|
27572
|
+
phases: array(AutoTunePhaseResultSchema).readonly()
|
|
27425
27573
|
}),
|
|
27426
27574
|
object({
|
|
27427
27575
|
kind: literal("stale"),
|
|
27428
|
-
plan:
|
|
27576
|
+
plan: AutoTunePlanSchema
|
|
27429
27577
|
}),
|
|
27430
27578
|
object({
|
|
27431
27579
|
kind: literal("refused"),
|
|
@@ -28804,7 +28952,6 @@ var CameraStepOverridePatchSchema = object({
|
|
|
28804
28952
|
settings: record(string(), unknown()).readonly().optional()
|
|
28805
28953
|
});
|
|
28806
28954
|
var CameraPipelineSettingsSchema = object({
|
|
28807
|
-
pinnedAgentNodeId: string().optional(),
|
|
28808
28955
|
stepToggles: record(string(), boolean()).optional(),
|
|
28809
28956
|
stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
|
|
28810
28957
|
pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
|
|
@@ -29303,12 +29450,6 @@ method(object({
|
|
|
29303
29450
|
}), object({ success: literal(true) }), {
|
|
29304
29451
|
kind: "mutation",
|
|
29305
29452
|
auth: "admin"
|
|
29306
|
-
}), method(object({
|
|
29307
|
-
agentNodeId: string(),
|
|
29308
|
-
detectWeight: number().positive().nullable()
|
|
29309
|
-
}), object({ success: literal(true) }), {
|
|
29310
|
-
kind: "mutation",
|
|
29311
|
-
auth: "admin"
|
|
29312
29453
|
}), method(object({
|
|
29313
29454
|
agentNodeId: string(),
|
|
29314
29455
|
detect: boolean().nullable().optional(),
|
|
@@ -29350,7 +29491,13 @@ method(object({
|
|
|
29350
29491
|
}), {
|
|
29351
29492
|
kind: "mutation",
|
|
29352
29493
|
auth: "admin"
|
|
29353
|
-
}), method(
|
|
29494
|
+
}), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
|
|
29495
|
+
kind: "mutation",
|
|
29496
|
+
auth: "admin"
|
|
29497
|
+
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
29498
|
+
kind: "mutation",
|
|
29499
|
+
auth: "admin"
|
|
29500
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
29354
29501
|
kind: "mutation",
|
|
29355
29502
|
auth: "admin"
|
|
29356
29503
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
@@ -46186,7 +46333,7 @@ Object.freeze({
|
|
|
46186
46333
|
addonId: null,
|
|
46187
46334
|
access: "view"
|
|
46188
46335
|
},
|
|
46189
|
-
"pipelineOrchestrator.
|
|
46336
|
+
"pipelineOrchestrator.applyAutoTune": {
|
|
46190
46337
|
capName: "pipeline-orchestrator",
|
|
46191
46338
|
capScope: "system",
|
|
46192
46339
|
addonId: null,
|
|
@@ -46306,6 +46453,12 @@ Object.freeze({
|
|
|
46306
46453
|
addonId: null,
|
|
46307
46454
|
access: "view"
|
|
46308
46455
|
},
|
|
46456
|
+
"pipelineOrchestrator.getEffectiveShares": {
|
|
46457
|
+
capName: "pipeline-orchestrator",
|
|
46458
|
+
capScope: "system",
|
|
46459
|
+
addonId: null,
|
|
46460
|
+
access: "view"
|
|
46461
|
+
},
|
|
46309
46462
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
46310
46463
|
capName: "pipeline-orchestrator",
|
|
46311
46464
|
capScope: "system",
|
|
@@ -46342,6 +46495,12 @@ Object.freeze({
|
|
|
46342
46495
|
addonId: null,
|
|
46343
46496
|
access: "view"
|
|
46344
46497
|
},
|
|
46498
|
+
"pipelineOrchestrator.getPlacementStats": {
|
|
46499
|
+
capName: "pipeline-orchestrator",
|
|
46500
|
+
capScope: "system",
|
|
46501
|
+
addonId: null,
|
|
46502
|
+
access: "view"
|
|
46503
|
+
},
|
|
46345
46504
|
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
46346
46505
|
capName: "pipeline-orchestrator",
|
|
46347
46506
|
capScope: "system",
|
|
@@ -46366,7 +46525,7 @@ Object.freeze({
|
|
|
46366
46525
|
addonId: null,
|
|
46367
46526
|
access: "create"
|
|
46368
46527
|
},
|
|
46369
|
-
"pipelineOrchestrator.
|
|
46528
|
+
"pipelineOrchestrator.planAutoTune": {
|
|
46370
46529
|
capName: "pipeline-orchestrator",
|
|
46371
46530
|
capScope: "system",
|
|
46372
46531
|
addonId: null,
|
|
@@ -46432,12 +46591,6 @@ Object.freeze({
|
|
|
46432
46591
|
addonId: null,
|
|
46433
46592
|
access: "create"
|
|
46434
46593
|
},
|
|
46435
|
-
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
46436
|
-
capName: "pipeline-orchestrator",
|
|
46437
|
-
capScope: "system",
|
|
46438
|
-
addonId: null,
|
|
46439
|
-
access: "create"
|
|
46440
|
-
},
|
|
46441
46594
|
"pipelineOrchestrator.setAgentInferenceDevices": {
|
|
46442
46595
|
capName: "pipeline-orchestrator",
|
|
46443
46596
|
capScope: "system",
|
|
@@ -46492,12 +46645,30 @@ Object.freeze({
|
|
|
46492
46645
|
addonId: null,
|
|
46493
46646
|
access: "create"
|
|
46494
46647
|
},
|
|
46648
|
+
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
46649
|
+
capName: "pipeline-orchestrator",
|
|
46650
|
+
capScope: "system",
|
|
46651
|
+
addonId: null,
|
|
46652
|
+
access: "create"
|
|
46653
|
+
},
|
|
46495
46654
|
"pipelineOrchestrator.setPipelineDevicePin": {
|
|
46496
46655
|
capName: "pipeline-orchestrator",
|
|
46497
46656
|
capScope: "system",
|
|
46498
46657
|
addonId: null,
|
|
46499
46658
|
access: "create"
|
|
46500
46659
|
},
|
|
46660
|
+
"pipelineOrchestrator.setShareSource": {
|
|
46661
|
+
capName: "pipeline-orchestrator",
|
|
46662
|
+
capScope: "system",
|
|
46663
|
+
addonId: null,
|
|
46664
|
+
access: "create"
|
|
46665
|
+
},
|
|
46666
|
+
"pipelineOrchestrator.suggestShares": {
|
|
46667
|
+
capName: "pipeline-orchestrator",
|
|
46668
|
+
capScope: "system",
|
|
46669
|
+
addonId: null,
|
|
46670
|
+
access: "view"
|
|
46671
|
+
},
|
|
46501
46672
|
"pipelineOrchestrator.unassignAudio": {
|
|
46502
46673
|
capName: "pipeline-orchestrator",
|
|
46503
46674
|
capScope: "system",
|
|
@@ -53767,7 +53938,7 @@ function applyModelBoundSettings(settings, boundKeys, runningModelId) {
|
|
|
53767
53938
|
/**
|
|
53768
53939
|
* The keys of every `bindsToModel` field of a step's config schema, groups
|
|
53769
53940
|
* flattened (D738). One definition for the runner (which applies the binding)
|
|
53770
|
-
* and the orchestrator's
|
|
53941
|
+
* and the orchestrator's Auto tune (which clears those overrides, D745).
|
|
53771
53942
|
*/
|
|
53772
53943
|
function collectModelBoundKeys(fields) {
|
|
53773
53944
|
return fields.flatMap((field) => {
|