@camstack/types 1.2.110 → 1.2.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-EY0GNjV9.js");
3
- const require_sleep = require("./sleep-DnbNfEhn.js");
3
+ const require_sleep = require("./sleep-BCRrMlni.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
2
- import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-swxwnJmL.mjs";
2
+ import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-DJlqY62B.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -1338,6 +1338,34 @@ declare const EventPruneCountsSchema: z.ZodObject<{
1338
1338
  audio: z.ZodNumber;
1339
1339
  }, z.core.$strip>;
1340
1340
  export type EventPruneCounts = z.infer<typeof EventPruneCountsSchema>;
1341
+ declare const ReplayTrackSchema: z.ZodObject<{
1342
+ className: z.ZodString;
1343
+ firstSeenMs: z.ZodNumber;
1344
+ lastSeenMs: z.ZodNumber;
1345
+ bbox: z.ZodObject<{
1346
+ x: z.ZodNumber;
1347
+ y: z.ZodNumber;
1348
+ w: z.ZodNumber;
1349
+ h: z.ZodNumber;
1350
+ }, z.core.$strip>;
1351
+ framesMatched: z.ZodNumber;
1352
+ }, z.core.$strip>;
1353
+ declare const RunReplayFrameProcessorResultSchema: z.ZodObject<{
1354
+ tracks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1355
+ className: z.ZodString;
1356
+ firstSeenMs: z.ZodNumber;
1357
+ lastSeenMs: z.ZodNumber;
1358
+ bbox: z.ZodObject<{
1359
+ x: z.ZodNumber;
1360
+ y: z.ZodNumber;
1361
+ w: z.ZodNumber;
1362
+ h: z.ZodNumber;
1363
+ }, z.core.$strip>;
1364
+ framesMatched: z.ZodNumber;
1365
+ }, z.core.$strip>>>;
1366
+ }, z.core.$strip>;
1367
+ export type ReplayTrack = z.infer<typeof ReplayTrackSchema>;
1368
+ export type RunReplayFrameProcessorResult = z.infer<typeof RunReplayFrameProcessorResultSchema>;
1341
1369
  export declare const pipelineAnalyticsCapability: {
1342
1370
  readonly name: "pipeline-analytics";
1343
1371
  readonly scope: "device";
@@ -2751,6 +2779,73 @@ export declare const pipelineAnalyticsCapability: {
2751
2779
  reason: z.ZodString;
2752
2780
  detail: z.ZodOptional<z.ZodString>;
2753
2781
  }, z.core.$strip>], "kind">, "mutation">;
2782
+ /**
2783
+ * The FrameProcessor pass of a replay run — see the `Replay` section
2784
+ * above this capability's definition for why this is not the
2785
+ * `processFrame` method this file's header says pipeline-analytics does
2786
+ * not have.
2787
+ *
2788
+ * Constructs a FRESH `FrameProcessor` for `(deviceId, source)`, feeds it
2789
+ * `frames` IN THE ORDER GIVEN (the caller is responsible for time
2790
+ * ordering — this method does not sort), and returns the tracks it
2791
+ * produced. Zero persistence: no `TrackStore`, no event bus, no media
2792
+ * capture. `zones` / `detectionRules` are the run's OWN zone set —
2793
+ * typically the camera's real zones plus an ephemeral overlay
2794
+ * (`addon-benchmark`'s `replay-plan.ts`), never read from or written to
2795
+ * the `zones` capability by this method itself.
2796
+ */
2797
+ readonly runReplayFrameProcessor: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2798
+ deviceId: z.ZodNumber;
2799
+ source: z.ZodEnum<{
2800
+ pipeline: "pipeline";
2801
+ onboard: "onboard";
2802
+ }>;
2803
+ zones: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
2804
+ id: z.ZodString;
2805
+ name: z.ZodString;
2806
+ kind: z.ZodDefault<z.ZodEnum<{
2807
+ polygon: "polygon";
2808
+ tripwire: "tripwire";
2809
+ }>>;
2810
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
2811
+ x: z.ZodNumber;
2812
+ y: z.ZodNumber;
2813
+ }, z.core.$strip>>>;
2814
+ color: z.ZodDefault<z.ZodString>;
2815
+ }, z.core.$strip>>>>;
2816
+ detectionRules: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
2817
+ id: z.ZodString;
2818
+ name: z.ZodOptional<z.ZodString>;
2819
+ zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
2820
+ mode: z.ZodEnum<{
2821
+ include: "include";
2822
+ exclude: "exclude";
2823
+ }>;
2824
+ classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
2825
+ overlapThreshold: z.ZodOptional<z.ZodNumber>;
2826
+ bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
2827
+ preferMask: z.ZodOptional<z.ZodBoolean>;
2828
+ enabled: z.ZodDefault<z.ZodBoolean>;
2829
+ }, z.core.$strip>>>>;
2830
+ zoneMembershipMinOverlap: z.ZodOptional<z.ZodNumber>;
2831
+ frames: z.ZodArray<z.ZodObject<{
2832
+ timestamp: z.ZodNumber;
2833
+ frame: z.ZodCustom<import("../index.js").FrameResult, import("../index.js").FrameResult>;
2834
+ }, z.core.$strip>>;
2835
+ }, z.core.$strip>, z.ZodObject<{
2836
+ tracks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
2837
+ className: z.ZodString;
2838
+ firstSeenMs: z.ZodNumber;
2839
+ lastSeenMs: z.ZodNumber;
2840
+ bbox: z.ZodObject<{
2841
+ x: z.ZodNumber;
2842
+ y: z.ZodNumber;
2843
+ w: z.ZodNumber;
2844
+ h: z.ZodNumber;
2845
+ }, z.core.$strip>;
2846
+ framesMatched: z.ZodNumber;
2847
+ }, z.core.$strip>>>;
2848
+ }, z.core.$strip>, "mutation">;
2754
2849
  /** Every annotation on a track, oldest first. */
2755
2850
  readonly listRetrainAnnotations: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2756
2851
  trackId: z.ZodString;
@@ -638,6 +638,56 @@ export declare const pipelineExecutorCapability: {
638
638
  success: z.ZodLiteral<true>;
639
639
  clearedDevices: z.ZodNumber;
640
640
  }, z.core.$strip>, "mutation">;
641
+ /**
642
+ * Which of THIS node's inference devices the executor currently refuses,
643
+ * and why. `nodeId` is the ROUTING key (stripped by the generated router).
644
+ *
645
+ * The channel that did not exist. Pool health was known only inside the
646
+ * detection addon and was an input to no routing decision anywhere: the
647
+ * per-dispatch capability gate is keyed on model FORMAT and so can never
648
+ * separate `openvino:gpu` from `openvino:npu`, and the orchestrator's live
649
+ * eligibility probe (`platformProbe.getCapabilities`) answers about
650
+ * HARDWARE — which was present throughout. So when the hub's `openvino:gpu`
651
+ * Python worker was SIGABRT'd by the Intel GPU plugin on 2026-08-25, the
652
+ * balancer went on handing that dead pool cameras by rotation for 31 hours:
653
+ * ~370 000 `PoolWorker[w0]: not initialized` lines, every frame lost.
654
+ *
655
+ * Read semantics the caller depends on, and which the provider guarantees:
656
+ * this is a synchronous read of in-memory state. It never probes hardware,
657
+ * never spawns a pool and never throws — an EMPTY `unhealthy` means "asked,
658
+ * nothing is refused", which is what re-admits a device. A read that FAILS
659
+ * (node offline, version skew) must therefore be distinguishable from an
660
+ * empty answer, and it is: it rejects.
661
+ */
662
+ readonly getInferenceDeviceHealth: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
663
+ nodeId: z.ZodString;
664
+ }, z.core.$strip>, z.ZodObject<{
665
+ unhealthy: z.ZodReadonly<z.ZodArray<z.ZodObject<{
666
+ deviceKey: z.ZodString;
667
+ state: z.ZodEnum<{
668
+ failed: "failed";
669
+ backoff: "backoff";
670
+ }>;
671
+ since: z.ZodNumber;
672
+ deaths: z.ZodNumber;
673
+ lastError: z.ZodString;
674
+ }, z.core.$strip>>>;
675
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
676
+ /**
677
+ * Re-arm a terminally `failed` inference device on `nodeId`: forget its
678
+ * restart budget so the next dispatch builds a fresh pool.
679
+ *
680
+ * The terminal state is deliberate (the abort it bounds is deterministic —
681
+ * an automatic probation would just respawn Python forever, more slowly),
682
+ * and a terminal state an operator cannot leave is a silent fault. This is
683
+ * the way out. `rearmed:false` means there was nothing to forget.
684
+ */
685
+ readonly rearmInferenceDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
686
+ nodeId: z.ZodString;
687
+ deviceKey: z.ZodString;
688
+ }, z.core.$strip>, z.ZodObject<{
689
+ rearmed: z.ZodBoolean;
690
+ }, z.core.$strip>, "mutation">;
641
691
  readonly getSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
642
692
  availableEngines: z.ZodReadonly<z.ZodArray<z.ZodObject<{
643
693
  engine: z.ZodObject<{
@@ -5108,6 +5108,13 @@ export type AppRouter = TrpcCoreRouter<{
5108
5108
  output: z.infer<typeof pipelineAnalyticsCapability.methods.proposeRetrainAnnotations.output>;
5109
5109
  meta: object;
5110
5110
  }>;
5111
+ runReplayFrameProcessor: TRPCMutationProcedure<{
5112
+ input: {
5113
+ [x: string]: unknown;
5114
+ } & z.input<typeof pipelineAnalyticsCapability.methods.runReplayFrameProcessor.input>;
5115
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.runReplayFrameProcessor.output>;
5116
+ meta: object;
5117
+ }>;
5111
5118
  listRetrainAnnotations: TRPCQueryProcedure<{
5112
5119
  input: {
5113
5120
  [x: string]: unknown;
@@ -5248,6 +5255,20 @@ export type AppRouter = TrpcCoreRouter<{
5248
5255
  output: z.infer<typeof pipelineExecutorCapability.methods.clearDeviceOverrides.output>;
5249
5256
  meta: object;
5250
5257
  }>;
5258
+ getInferenceDeviceHealth: TRPCQueryProcedure<{
5259
+ input: {
5260
+ [x: string]: unknown;
5261
+ } & z.input<typeof pipelineExecutorCapability.methods.getInferenceDeviceHealth.input>;
5262
+ output: z.infer<typeof pipelineExecutorCapability.methods.getInferenceDeviceHealth.output>;
5263
+ meta: object;
5264
+ }>;
5265
+ rearmInferenceDevice: TRPCMutationProcedure<{
5266
+ input: {
5267
+ [x: string]: unknown;
5268
+ } & z.input<typeof pipelineExecutorCapability.methods.rearmInferenceDevice.input>;
5269
+ output: z.infer<typeof pipelineExecutorCapability.methods.rearmInferenceDevice.output>;
5270
+ meta: object;
5271
+ }>;
5251
5272
  getSchema: TRPCQueryProcedure<{
5252
5273
  input: {
5253
5274
  nodeId?: string | undefined;
@@ -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: 958 method paths across 123 capabilities.
9
+ * Coverage: 961 method paths across 123 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,7 +6,7 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 342 methods carry a device reference, of which
9
+ * Coverage: 343 methods carry a device reference, of which
10
10
  * 127 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
@@ -83,7 +83,7 @@ export interface SystemProxy {
83
83
  readonly nodes: Pick<InferProvider<typeof nodesCapability>, 'topology' | 'deployAddon' | 'undeployAddon' | 'restartAddon' | 'restartProcess' | 'restartNode' | 'shutdownNode' | 'renameNode' | 'clusterAddonStatus' | 'getCapUsageGraph' | 'getNodeAddons' | 'setProcessLogLevel' | 'executeQuery'>;
84
84
  readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'listTargets' | 'discoverTargets' | 'send' | 'testTarget' | 'upsertTarget' | 'deleteTarget' | 'setTargetEnabled'>;
85
85
  readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration'>;
86
- readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'clearDeviceOverrides' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
86
+ readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'clearDeviceOverrides' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
87
87
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
88
88
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep'>;
89
89
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;