@camstack/types 1.2.596 → 1.2.598

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.
@@ -8099,6 +8099,34 @@ export type AppRouter = TrpcCoreRouter<{
8099
8099
  output: z.infer<typeof pipelineOrchestratorCapability.methods.setNodeStepSettings.output>;
8100
8100
  meta: object;
8101
8101
  }>;
8102
+ setClusterStepMode: TRPCMutationProcedure<{
8103
+ input: {
8104
+ [x: string]: unknown;
8105
+ } & z.input<typeof pipelineOrchestratorCapability.methods.setClusterStepMode.input>;
8106
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.setClusterStepMode.output>;
8107
+ meta: object;
8108
+ }>;
8109
+ setNodeStepEnabled: TRPCMutationProcedure<{
8110
+ input: {
8111
+ [x: string]: unknown;
8112
+ } & z.input<typeof pipelineOrchestratorCapability.methods.setNodeStepEnabled.input>;
8113
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.setNodeStepEnabled.output>;
8114
+ meta: object;
8115
+ }>;
8116
+ setDeviceStepEnabled: TRPCMutationProcedure<{
8117
+ input: {
8118
+ [x: string]: unknown;
8119
+ } & z.input<typeof pipelineOrchestratorCapability.methods.setDeviceStepEnabled.input>;
8120
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.setDeviceStepEnabled.output>;
8121
+ meta: object;
8122
+ }>;
8123
+ getStepSwitches: TRPCQueryProcedure<{
8124
+ input: {
8125
+ nodeId?: string | undefined;
8126
+ } | undefined;
8127
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.getStepSwitches.output>;
8128
+ meta: object;
8129
+ }>;
8102
8130
  getNodeInferenceDevices: TRPCQueryProcedure<{
8103
8131
  input: {
8104
8132
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1529 method paths across 214 capabilities.
9
+ * Coverage: 1533 method paths across 214 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -116,7 +116,7 @@ export interface SystemProxy {
116
116
  readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'listRuleTags' | 'setRuleTags' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
117
117
  readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration' | 'listTemplates' | 'upsertTemplate' | 'deleteTemplate'>;
118
118
  readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
119
- readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'setNodeStepSettings' | 'getNodeInferenceDevices' | 'forgetInferenceDevice' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'getHealthDigest' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getNodeBenchmarkPreflight' | 'startNodeBenchmark' | 'getNodeBenchmarkStatus' | 'abortNodeBenchmark' | 'getNodeBenchmarkCandidates' | 'listNodeBenchmarkResults' | 'deleteNodeBenchmarkResult' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus'>;
119
+ readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'setNodeStepSettings' | 'setClusterStepMode' | 'setNodeStepEnabled' | 'setDeviceStepEnabled' | 'getStepSwitches' | 'getNodeInferenceDevices' | 'forgetInferenceDevice' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'getHealthDigest' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getNodeBenchmarkPreflight' | 'startNodeBenchmark' | 'getNodeBenchmarkStatus' | 'abortNodeBenchmark' | 'getNodeBenchmarkCandidates' | 'listNodeBenchmarkResults' | 'deleteNodeBenchmarkResult' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus'>;
120
120
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep' | 'startNodeBench' | 'getNodeBenchStatus' | 'abortNodeBench'>;
121
121
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'moveVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
122
122
  readonly platformProbe: Pick<InferProvider<typeof platformProbeCapability>, 'getCapabilities' | 'getHardware' | 'resolveInferenceConfig' | 'resolveHwAccel' | 'rescanAccelerators'>;
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { buildSessionLostAlert, DEFAULT_SESSION_LOST_DEBOUNCE_MS, IntegrationSes
20
20
  export type { InstanceChange, RecordIntegrationInstancesHooks, ResolvedInstance, ResolvedSecretsState, } from './addon/record-integration-instances.js';
21
21
  export { CONNECTION_TEST_TIMEOUT_MS } from './addon/connection-probe.js';
22
22
  export type { ConnectionTestOutcome, IConnectionProbe } from './addon/connection-probe.js';
23
- export { RecordIntegrationInstances, isInstanceEnabled, } from './addon/record-integration-instances.js';
23
+ export { RecordIntegrationInstances, defaultAddDeviceMode, isInstanceEnabled, } from './addon/record-integration-instances.js';
24
24
  export { composeInstanceKinds, UnknownInstanceError, UnknownInstanceKindError, } from './addon/compose-instance-kinds.js';
25
25
  export type { InstanceKindPart } from './addon/compose-instance-kinds.js';
26
26
  export * from './addon/notification-targets.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_runtime_capabilities = require("./runtime-capabilities-wOKNm9iz.js");
2
+ const require_runtime_capabilities = require("./runtime-capabilities-DWgr8hrq.js");
3
3
  const require_event_category = require("./event-category-CMA0-jGW.js");
4
4
  const require_composed_stable_id = require("./composed-stable-id-DkF5-kuf.js");
5
5
  const require_implemented_methods = require("./implemented-methods-DnfgAfI6.js");
@@ -67265,6 +67265,16 @@ var IntegrationInstanceStatusSchema = zod.z.object({
67265
67265
  /** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
67266
67266
  label: zod.z.string().optional()
67267
67267
  });
67268
+ /**
67269
+ * What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
67270
+ * LAN scan finds devices this instance holds; `children`: only the instance's own children, via
67271
+ * adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
67272
+ */
67273
+ var IntegrationInstanceAddDeviceSchema = zod.z.enum([
67274
+ "scan",
67275
+ "children",
67276
+ "none"
67277
+ ]);
67268
67278
  var IntegrationInstanceSchema = zod.z.object({
67269
67279
  id: IntegrationInstanceIdSchema,
67270
67280
  name: zod.z.string(),
@@ -67282,7 +67292,9 @@ var IntegrationInstanceSchema = zod.z.object({
67282
67292
  formValues: zod.z.record(zod.z.string(), zod.z.unknown()),
67283
67293
  status: IntegrationInstanceStatusSchema.optional(),
67284
67294
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
67285
- lastCheckedAt: zod.z.number().optional()
67295
+ lastCheckedAt: zod.z.number().optional(),
67296
+ /** What "Add device" inside this instance offers; see {@link IntegrationInstanceAddDeviceSchema}. Absent means the caller derives it from `describe().discovery` with `defaultAddDeviceMode` (lan → scan, account → children, else none). */
67297
+ addDevice: IntegrationInstanceAddDeviceSchema.optional()
67286
67298
  });
67287
67299
  var IntegrationInstancePatchSchema = zod.z.object({
67288
67300
  id: IntegrationInstanceIdSchema,
@@ -76947,7 +76959,13 @@ var pipelineExecutorCapability = {
76947
76959
  /** Pool deaths inside the current window. */
76948
76960
  deaths: zod.z.number(),
76949
76961
  /** The last death's message. */
76950
- lastError: zod.z.string()
76962
+ lastError: zod.z.string(),
76963
+ /**
76964
+ * Present when the device is ABSENT rather than dead: the runtime
76965
+ * itself enumerates no such device (`no-gpu-device` — OpenVINO sees
76966
+ * no supported GPU; driver/runtime does not support this iGPU).
76967
+ */
76968
+ absentReason: zod.z.enum(["no-gpu-device"]).optional()
76951
76969
  })).readonly() })),
76952
76970
  /**
76953
76971
  * Re-arm a terminally `failed` inference device on `nodeId`: forget its
@@ -78284,7 +78302,15 @@ var RunnerInferenceDeviceSchema = zod.z.object({
78284
78302
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
78285
78303
  * the elected device's provisioning, as before.
78286
78304
  */
78287
- steps: zod.z.record(zod.z.string(), RunnerJumpStepProvisioningSchema).optional()
78305
+ steps: zod.z.record(zod.z.string(), RunnerJumpStepProvisioningSchema).optional(),
78306
+ /**
78307
+ * Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
78308
+ * .enabled === false`). The runner never runs a subtree containing one of
78309
+ * them here: it auto-jumps it to an allowed device, and when none can take
78310
+ * it the subtree is skipped (`disabled-on-device`), never run here anyway.
78311
+ * Absent ⇒ none (an orchestrator that predates D1065).
78312
+ */
78313
+ disabledSteps: zod.z.array(zod.z.string()).readonly().optional()
78288
78314
  });
78289
78315
  /**
78290
78316
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -87143,7 +87169,15 @@ var DeviceStepConfigSchema = zod.z.object({
87143
87169
  * at a disabled/absent device on that node at save time. Absent ⇒ the runner
87144
87170
  * auto-jumps only when the effective device's format cannot run the step.
87145
87171
  */
87146
- jumpDeviceKey: zod.z.string().optional()
87172
+ jumpDeviceKey: zod.z.string().optional(),
87173
+ /**
87174
+ * DEVICE switch for this step (D1065). `false` = the step is never
87175
+ * provisioned on this accelerator: a detail step jumps to another enabled
87176
+ * device of the node where it is allowed, else it is skipped with reason
87177
+ * `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
87178
+ * `setDeviceStepEnabled`.
87179
+ */
87180
+ enabled: zod.z.boolean().optional()
87147
87181
  });
87148
87182
  var AgentPipelineSettingsSchema = zod.z.object({
87149
87183
  maxCameras: zod.z.number().int().nonnegative().nullable().default(null),
@@ -87187,6 +87221,12 @@ var AgentPipelineSettingsSchema = zod.z.object({
87187
87221
  */
87188
87222
  stepSettings: zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown()).readonly()).optional(),
87189
87223
  /**
87224
+ * NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
87225
+ * runs on a camera whose pipeline runs on this node (skip reason
87226
+ * `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
87227
+ */
87228
+ stepEnabled: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
87229
+ /**
87190
87230
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
87191
87231
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
87192
87232
  * accelerator (safe default); two+ enabled ⇒ the dispatcher balances
@@ -87549,7 +87589,9 @@ var INFERENCE_DEVICE_EXCLUSION_REASONS = [
87549
87589
  "disabled",
87550
87590
  "unavailable",
87551
87591
  "cannot-host-camera-root",
87552
- "accelerator-preferred"
87592
+ "accelerator-preferred",
87593
+ "root-switched-off",
87594
+ "no-gpu-device"
87553
87595
  ];
87554
87596
  var InferenceDeviceExclusionReasonSchema = zod.z.enum(INFERENCE_DEVICE_EXCLUSION_REASONS);
87555
87597
  var NodeInferenceDeviceSchema = zod.z.object({
@@ -87636,6 +87678,76 @@ var NodeInferenceDevicesSchema = zod.z.object({
87636
87678
  devices: zod.z.array(NodeInferenceDeviceSchema).readonly()
87637
87679
  });
87638
87680
  /**
87681
+ * The CLUSTER switch of one pipeline step (D1065):
87682
+ * - `off` — hard off: no camera, node or device can turn it on;
87683
+ * - `on` — on by default; a camera may turn it off (`stepToggles`);
87684
+ * - `opt-in` — off by default; a camera turns it on (`stepToggles`).
87685
+ * Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
87686
+ */
87687
+ var StepClusterModeSchema = zod.z.enum([
87688
+ "off",
87689
+ "on",
87690
+ "opt-in"
87691
+ ]);
87692
+ /**
87693
+ * What one step does on one (node, device) — computed by the orchestrator with
87694
+ * the SAME placement function the attach path runs (`pipeline-resolver.ts`),
87695
+ * so a client never re-derives it. Precedence: cluster off > camera toggle
87696
+ * (else the cluster default) > node off > device off / jump.
87697
+ */
87698
+ var StepSwitchCellSchema = zod.z.discriminatedUnion("kind", [
87699
+ zod.z.object({ kind: zod.z.literal("on") }),
87700
+ zod.z.object({ kind: zod.z.literal("off-cluster") }),
87701
+ zod.z.object({ kind: zod.z.literal("off-node") }),
87702
+ zod.z.object({ kind: zod.z.literal("off-device") }),
87703
+ zod.z.object({
87704
+ kind: zod.z.literal("jump"),
87705
+ toDeviceKey: zod.z.string()
87706
+ }),
87707
+ zod.z.object({
87708
+ kind: zod.z.literal("skip"),
87709
+ reason: zod.z.enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
87710
+ }),
87711
+ zod.z.object({ kind: zod.z.literal("zone-driven") }),
87712
+ zod.z.object({
87713
+ kind: zod.z.literal("supplied-by-root"),
87714
+ rootModelId: zod.z.string()
87715
+ }),
87716
+ zod.z.object({ kind: zod.z.literal("opt-in-unused") })
87717
+ ]);
87718
+ var StepSwitchDeviceSchema = zod.z.object({
87719
+ deviceKey: zod.z.string(),
87720
+ format: zod.z.enum(require_runtime_capabilities.MODEL_FORMATS),
87721
+ /** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
87722
+ stepEnabled: zod.z.boolean().nullable(),
87723
+ /** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
87724
+ eligible: zod.z.boolean(),
87725
+ cell: StepSwitchCellSchema
87726
+ });
87727
+ var StepSwitchNodeSchema = zod.z.object({
87728
+ nodeId: zod.z.string(),
87729
+ /** False when the node's catalog or device probe did not answer — no cells are claimed. */
87730
+ reachable: zod.z.boolean(),
87731
+ /** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
87732
+ stepEnabled: zod.z.boolean().nullable(),
87733
+ devices: zod.z.array(StepSwitchDeviceSchema).readonly()
87734
+ });
87735
+ var StepSwitchRowSchema = zod.z.object({
87736
+ stepId: zod.z.string(),
87737
+ name: zod.z.string(),
87738
+ slot: zod.z.string(),
87739
+ /** The stored cluster mode; `null` = the catalog default applies. */
87740
+ clusterMode: StepClusterModeSchema.nullable(),
87741
+ /** The mode in force (stored, else derived from `enabledByDefault`). */
87742
+ effectiveMode: StepClusterModeSchema,
87743
+ /** Cameras whose `stepToggles[step]` is `true`. */
87744
+ camerasEnabling: zod.z.number().int().nonnegative(),
87745
+ /** Cameras whose `stepToggles[step]` is `false`. */
87746
+ camerasDisabling: zod.z.number().int().nonnegative(),
87747
+ nodes: zod.z.array(StepSwitchNodeSchema).readonly()
87748
+ });
87749
+ var StepSwitchMatrixSchema = zod.z.object({ steps: zod.z.array(StepSwitchRowSchema).readonly() });
87750
+ /**
87639
87751
  * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
87640
87752
  *
87641
87753
  * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
@@ -88012,6 +88124,51 @@ var pipelineOrchestratorCapability = {
88012
88124
  auth: "admin"
88013
88125
  }),
88014
88126
  /**
88127
+ * Set one step's CLUSTER switch (D1065): `off` | `on` | `opt-in`, or
88128
+ * `null` to return to the catalog default. Re-resolves every placed
88129
+ * camera's pipeline.
88130
+ */
88131
+ setClusterStepMode: require_runtime_capabilities.method(zod.z.object({
88132
+ stepId: zod.z.string(),
88133
+ mode: StepClusterModeSchema.nullable()
88134
+ }), zod.z.object({ success: zod.z.literal(true) }), {
88135
+ kind: "mutation",
88136
+ auth: "admin"
88137
+ }),
88138
+ /**
88139
+ * Set one step's NODE switch (D1065): `false` = the step never runs on a
88140
+ * camera whose pipeline runs on that node; `null` = inherit.
88141
+ */
88142
+ setNodeStepEnabled: require_runtime_capabilities.method(zod.z.object({
88143
+ agentNodeId: zod.z.string(),
88144
+ stepId: zod.z.string(),
88145
+ enabled: zod.z.boolean().nullable()
88146
+ }), zod.z.object({ success: zod.z.literal(true) }), {
88147
+ kind: "mutation",
88148
+ auth: "admin"
88149
+ }),
88150
+ /**
88151
+ * Set one step's DEVICE switch (D1065) on `(node, deviceKey)`: `false` =
88152
+ * the step is not provisioned there (a detail step jumps to an allowed
88153
+ * sibling, else is skipped); `null` = inherit.
88154
+ */
88155
+ setDeviceStepEnabled: require_runtime_capabilities.method(zod.z.object({
88156
+ agentNodeId: zod.z.string(),
88157
+ deviceKey: zod.z.string(),
88158
+ stepId: zod.z.string(),
88159
+ enabled: zod.z.boolean().nullable()
88160
+ }), zod.z.object({ success: zod.z.literal(true) }), {
88161
+ kind: "mutation",
88162
+ auth: "admin"
88163
+ }),
88164
+ /**
88165
+ * The step switch matrix (D1065): per step, the cluster mode, how many
88166
+ * cameras turn it on / off, and per node and device the effective cell —
88167
+ * computed by the same placement function the attach path runs. The
88168
+ * inspector renders this; it never derives a cell itself.
88169
+ */
88170
+ getStepSwitches: require_runtime_capabilities.method(zod.z.void(), StepSwitchMatrixSchema),
88171
+ /**
88015
88172
  * DEVICE-AWARE merged view of ONE node's inference accelerators. Joins each
88016
88173
  * physical device the node HAS — probed live via a node-pinned
88017
88174
  * `platformProbe.getCapabilities` (the platform-probe singleton is targeted
@@ -117173,23 +117330,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
117173
117330
  };
117174
117331
  });
117175
117332
  var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
117333
+ var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
117334
+ const enabled = slice?.enabled ?? null;
117335
+ const cycle = slice?.onTime != null && slice.offTime != null ? require_runtime_capabilities.t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
117336
+ return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([require_runtime_capabilities.t("Cycling", "A cicli"), cycle]) : require_runtime_capabilities.t("Runs continuously", "Sempre attiva"), [{
117337
+ kind: "toggle",
117338
+ id: "pump-cycle.enabled",
117339
+ label: require_runtime_capabilities.t("Pump cycle", "Ciclo pompa"),
117340
+ on: enabled,
117341
+ turnOn: action("pump-cycle.on", require_runtime_capabilities.t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
117342
+ turnOff: action("pump-cycle.off", require_runtime_capabilities.t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
117343
+ }])] };
117344
+ });
117345
+ var WORKLOAD_WORDS = {
117346
+ running: {
117347
+ state: "on",
117348
+ title: require_runtime_capabilities.t("Running", "In esecuzione")
117349
+ },
117350
+ paused: {
117351
+ state: "standby",
117352
+ title: require_runtime_capabilities.t("Paused", "In pausa")
117353
+ },
117354
+ stopped: {
117355
+ state: "off",
117356
+ title: require_runtime_capabilities.t("Stopped", "Fermo")
117357
+ },
117358
+ starting: {
117359
+ state: "running",
117360
+ title: require_runtime_capabilities.t("Starting", "In avvio")
117361
+ },
117362
+ stopping: {
117363
+ state: "running",
117364
+ title: require_runtime_capabilities.t("Stopping", "In arresto")
117365
+ },
117366
+ crashed: {
117367
+ state: "alert",
117368
+ title: require_runtime_capabilities.t("Crashed", "Andato in errore")
117369
+ }
117370
+ };
117176
117371
  var DEVICES_FAMILY_CONTRIBUTIONS = {
117177
117372
  "fan-control": fanContribution,
117178
117373
  "vacuum-control": vacuumContribution,
117179
117374
  "lawn-mower-control": mowerContribution,
117180
117375
  "pet-feeder": feederContribution,
117181
117376
  "pet-fountain": fountainContribution,
117182
- "pump-cycle": contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
117183
- const enabled = slice?.enabled ?? null;
117184
- const cycle = slice?.onTime != null && slice.offTime != null ? require_runtime_capabilities.t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
117185
- return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([require_runtime_capabilities.t("Cycling", "A cicli"), cycle]) : require_runtime_capabilities.t("Runs continuously", "Sempre attiva"), [{
117186
- kind: "toggle",
117187
- id: "pump-cycle.enabled",
117188
- label: require_runtime_capabilities.t("Pump cycle", "Ciclo pompa"),
117189
- on: enabled,
117190
- turnOn: action("pump-cycle.on", require_runtime_capabilities.t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
117191
- turnOff: action("pump-cycle.off", require_runtime_capabilities.t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
117192
- }])] };
117377
+ "pump-cycle": pumpCycleContribution,
117378
+ workload: contribution("workload", WorkloadStatusSchema, (slice) => {
117379
+ const state = slice?.state ?? null;
117380
+ if (state === null) return { reading: reading("workload", "unknown") };
117381
+ const words = WORKLOAD_WORDS[state];
117382
+ return { reading: reading("workload", words.state, false, words.title) };
117193
117383
  })
117194
117384
  };
117195
117385
  //#endregion
@@ -120316,6 +120506,7 @@ var STATE_SOURCE_ORDER = [
120316
120506
  "script-runner",
120317
120507
  "event-emitter",
120318
120508
  "running-state",
120509
+ "workload",
120319
120510
  "switch",
120320
120511
  "contact",
120321
120512
  "group-active",
@@ -120673,7 +120864,7 @@ var HERO_CAP_COVERAGE = {
120673
120864
  weather: "contributes",
120674
120865
  "weather-station": "contributes",
120675
120866
  "webrtc-session": { none: NOT_A_HERO_FACT },
120676
- workload: { none: "drawn by the workload device card (state, the controls getOptions declares, resources), which replaces the hero on the device page; its on / off is the switch its power hint registers" },
120867
+ workload: "contributes",
120677
120868
  "zone-analytics": { none: NOT_A_HERO_FACT },
120678
120869
  "zone-rules": { none: NOT_A_HERO_FACT },
120679
120870
  zones: { none: NOT_A_HERO_FACT }
@@ -127696,6 +127887,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
127696
127887
  access: "view",
127697
127888
  role: "admin"
127698
127889
  },
127890
+ "pipelineOrchestrator.getStepSwitches": {
127891
+ capName: "pipeline-orchestrator",
127892
+ capScope: "system",
127893
+ addonId: null,
127894
+ access: "view",
127895
+ role: "admin"
127896
+ },
127699
127897
  "pipelineOrchestrator.listAgentSettings": {
127700
127898
  capName: "pipeline-orchestrator",
127701
127899
  capScope: "system",
@@ -127850,6 +128048,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
127850
128048
  access: "create",
127851
128049
  role: "admin"
127852
128050
  },
128051
+ "pipelineOrchestrator.setClusterStepMode": {
128052
+ capName: "pipeline-orchestrator",
128053
+ capScope: "system",
128054
+ addonId: null,
128055
+ access: "create",
128056
+ role: "admin"
128057
+ },
128058
+ "pipelineOrchestrator.setDeviceStepEnabled": {
128059
+ capName: "pipeline-orchestrator",
128060
+ capScope: "system",
128061
+ addonId: null,
128062
+ access: "create",
128063
+ role: "admin"
128064
+ },
127853
128065
  "pipelineOrchestrator.setLoadBalancingShares": {
127854
128066
  capName: "pipeline-orchestrator",
127855
128067
  capScope: "system",
@@ -127857,6 +128069,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
127857
128069
  access: "create",
127858
128070
  role: "admin"
127859
128071
  },
128072
+ "pipelineOrchestrator.setNodeStepEnabled": {
128073
+ capName: "pipeline-orchestrator",
128074
+ capScope: "system",
128075
+ addonId: null,
128076
+ access: "create",
128077
+ role: "admin"
128078
+ },
127860
128079
  "pipelineOrchestrator.setNodeStepSettings": {
127861
128080
  capName: "pipeline-orchestrator",
127862
128081
  capScope: "system",
@@ -138950,6 +139169,10 @@ function createSystemProxy(api) {
138950
139169
  setAgentReachableHost: (input) => dispatch("pipelineOrchestrator", "setAgentReachableHost", "mutation", input),
138951
139170
  setAgentInferenceDevices: (input) => dispatch("pipelineOrchestrator", "setAgentInferenceDevices", "mutation", input),
138952
139171
  setNodeStepSettings: (input) => dispatch("pipelineOrchestrator", "setNodeStepSettings", "mutation", input),
139172
+ setClusterStepMode: (input) => dispatch("pipelineOrchestrator", "setClusterStepMode", "mutation", input),
139173
+ setNodeStepEnabled: (input) => dispatch("pipelineOrchestrator", "setNodeStepEnabled", "mutation", input),
139174
+ setDeviceStepEnabled: (input) => dispatch("pipelineOrchestrator", "setDeviceStepEnabled", "mutation", input),
139175
+ getStepSwitches: (input) => dispatch("pipelineOrchestrator", "getStepSwitches", "query", input),
138953
139176
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
138954
139177
  forgetInferenceDevice: (input) => dispatch("pipelineOrchestrator", "forgetInferenceDevice", "mutation", input),
138955
139178
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
@@ -152319,6 +152542,7 @@ exports.InstallDesktopUpdateResultSchema = InstallDesktopUpdateResultSchema;
152319
152542
  exports.InstalledPackageSchema = InstalledPackageSchema;
152320
152543
  exports.InstanceInUseError = InstanceInUseError;
152321
152544
  exports.IntegralHelperSpecSchema = require_implemented_methods.IntegralHelperSpecSchema;
152545
+ exports.IntegrationInstanceAddDeviceSchema = IntegrationInstanceAddDeviceSchema;
152322
152546
  exports.IntegrationInstanceDescriptionSchema = IntegrationInstanceDescriptionSchema;
152323
152547
  exports.IntegrationInstanceDiscoverySchema = IntegrationInstanceDiscoverySchema;
152324
152548
  exports.IntegrationInstanceIdSchema = IntegrationInstanceIdSchema;
@@ -153567,7 +153791,10 @@ exports.StationaryObjectSchema = StationaryObjectSchema;
153567
153791
  exports.StationarySubjectSchema = StationarySubjectSchema;
153568
153792
  exports.StatisticHelperSpecSchema = require_implemented_methods.StatisticHelperSpecSchema;
153569
153793
  exports.StatisticWindowSchema = require_implemented_methods.StatisticWindowSchema;
153794
+ exports.StepClusterModeSchema = StepClusterModeSchema;
153570
153795
  exports.StepDeviceTraceSchema = StepDeviceTraceSchema;
153796
+ exports.StepSwitchCellSchema = StepSwitchCellSchema;
153797
+ exports.StepSwitchMatrixSchema = StepSwitchMatrixSchema;
153571
153798
  exports.StepTemplateError = StepTemplateError;
153572
153799
  exports.StorageAbortUploadInputSchema = AbortUploadInputSchema;
153573
153800
  exports.StorageAccessSchema = StorageAccessSchema;
@@ -154249,6 +154476,7 @@ exports.decodeScalarOverride = decodeScalarOverride;
154249
154476
  exports.decodeTuya = decodeTuya;
154250
154477
  exports.decodeVectorBase64 = decodeVectorBase64;
154251
154478
  exports.decoderCapability = decoderCapability;
154479
+ exports.defaultAddDeviceMode = require_runtime_capabilities.defaultAddDeviceMode;
154252
154480
  exports.defaultDeliveryForSection = defaultDeliveryForSection;
154253
154481
  exports.defaultDeviceFor = require_runtime_capabilities.defaultDeviceFor;
154254
154482
  exports.defaultIntegrationApiOver = defaultIntegrationApiOver;