@camstack/types 1.2.193 → 1.2.195
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.d.ts +1 -0
- package/dist/addon.js +2 -1
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/addons.cap.d.ts +23 -23
- package/dist/capabilities/backup.cap.d.ts +6 -6
- package/dist/capabilities/core-blocks.cap.d.ts +16 -16
- package/dist/capabilities/custom-model-registry.cap.d.ts +2 -2
- package/dist/capabilities/decoder.cap.d.ts +13 -13
- package/dist/capabilities/device-manager.cap.d.ts +6 -6
- package/dist/capabilities/image-settings.cap.d.ts +16 -16
- package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
- package/dist/capabilities/llm.cap.d.ts +4 -4
- package/dist/capabilities/load-contribution.cap.d.ts +4 -4
- package/dist/capabilities/mask-shape.d.ts +2 -2
- package/dist/capabilities/media-player.cap.d.ts +4 -4
- package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
- package/dist/capabilities/model-convert.cap.d.ts +5 -5
- package/dist/capabilities/model-distributor.cap.d.ts +2 -2
- package/dist/capabilities/motion-detection.cap.d.ts +4 -4
- package/dist/capabilities/motion-zones.cap.d.ts +4 -4
- package/dist/capabilities/navigation.cap.d.ts +7 -7
- package/dist/capabilities/notification-output.cap.d.ts +13 -13
- package/dist/capabilities/notification-rules.cap.d.ts +17 -17
- package/dist/capabilities/notifier.cap.d.ts +3 -3
- package/dist/capabilities/osd-manager.cap.d.ts +14 -14
- package/dist/capabilities/pipeline-analytics.cap.d.ts +73 -73
- package/dist/capabilities/pipeline-executor.cap.d.ts +16 -16
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +39 -39
- package/dist/capabilities/pipeline-runner.cap.d.ts +6 -6
- package/dist/capabilities/privacy-mask.cap.d.ts +4 -4
- package/dist/capabilities/recording-export.cap.d.ts +14 -14
- package/dist/capabilities/recording.cap.d.ts +12 -12
- package/dist/capabilities/schemas/detection-shared.d.ts +4 -4
- package/dist/capabilities/schemas/streaming-shared.d.ts +7 -7
- package/dist/capabilities/storage-migration.cap.d.ts +13 -13
- package/dist/capabilities/storage.cap.d.ts +6 -6
- package/dist/capabilities/stream-broker.cap.d.ts +59 -59
- package/dist/capabilities/stream-signals.cap.d.ts +15 -0
- package/dist/capabilities/system.cap.d.ts +4 -4
- package/dist/capabilities/videoclips.cap.d.ts +2 -2
- package/dist/capabilities/webrtc-session.cap.d.ts +8 -8
- package/dist/index.js +20 -52
- package/dist/index.mjs +16 -48
- package/dist/interfaces/adoption-job.d.ts +2 -2
- package/dist/interfaces/camera-switches.d.ts +3 -3
- package/dist/interfaces/event-bus.d.ts +21 -0
- package/dist/interfaces/ops-log.d.ts +2 -2
- package/dist/interfaces/recording-config.d.ts +2 -2
- package/dist/interfaces/relocate.d.ts +18 -18
- package/dist/interfaces/storage-location-declaration.d.ts +1 -1
- package/dist/interfaces/stream-broker.d.ts +2 -2
- package/dist/lifecycle/job.d.ts +24 -24
- package/dist/{sleep-B8nfmQ8a.js → sleep-9Ix5MtX4.js} +71 -0
- package/dist/{sleep-BEyvfshj.mjs → sleep-B9qx0cEV.mjs} +48 -1
- package/dist/types/detection.d.ts +24 -3
- package/dist/types/models.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2792,6 +2792,53 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
2792
2792
|
return DeviceRole;
|
|
2793
2793
|
}({});
|
|
2794
2794
|
//#endregion
|
|
2795
|
+
//#region src/capabilities/custom-actions.ts
|
|
2796
|
+
/**
|
|
2797
|
+
* Identity — preserves literal types for downstream inference.
|
|
2798
|
+
*
|
|
2799
|
+
* The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
|
|
2800
|
+
* TypeScript does not widen each entry's literal `kind`/`auth` fields to
|
|
2801
|
+
* the broader unions declared on `CustomActionSpec`'s default generics.
|
|
2802
|
+
* Shape validity is enforced separately by the `customAction(...)` helper
|
|
2803
|
+
* whose return type is already a `CustomActionSpec<...>`.
|
|
2804
|
+
*/
|
|
2805
|
+
function defineCustomActions(spec) {
|
|
2806
|
+
return spec;
|
|
2807
|
+
}
|
|
2808
|
+
function customAction(input, output, options) {
|
|
2809
|
+
return {
|
|
2810
|
+
input,
|
|
2811
|
+
output,
|
|
2812
|
+
kind: options?.kind ?? "query",
|
|
2813
|
+
auth: options?.auth ?? "protected",
|
|
2814
|
+
scope: options?.scope ?? { kind: "system" },
|
|
2815
|
+
...options?.caller ? { caller: "required" } : {}
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
function deviceCustomAction(input, output, options) {
|
|
2819
|
+
return {
|
|
2820
|
+
input,
|
|
2821
|
+
output,
|
|
2822
|
+
kind: options?.kind ?? "query",
|
|
2823
|
+
auth: options?.auth ?? "protected",
|
|
2824
|
+
scope: {
|
|
2825
|
+
kind: "device",
|
|
2826
|
+
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2829
|
+
}
|
|
2830
|
+
/** Strip a catalog to what crosses the wire. Pure; the schemas are not touched. */
|
|
2831
|
+
function describeCustomActions(catalog) {
|
|
2832
|
+
const out = {};
|
|
2833
|
+
for (const [name, spec] of Object.entries(catalog)) out[name] = {
|
|
2834
|
+
kind: spec.kind,
|
|
2835
|
+
auth: spec.auth,
|
|
2836
|
+
scope: spec.scope,
|
|
2837
|
+
...spec.caller === "required" ? { caller: "required" } : {}
|
|
2838
|
+
};
|
|
2839
|
+
return out;
|
|
2840
|
+
}
|
|
2841
|
+
//#endregion
|
|
2795
2842
|
//#region src/device/children-batch-max.ts
|
|
2796
2843
|
/**
|
|
2797
2844
|
* Most parents one `getChildrenBatch` may name.
|
|
@@ -4611,6 +4658,30 @@ Object.defineProperty(exports, "createSliceHandle", {
|
|
|
4611
4658
|
return createSliceHandle;
|
|
4612
4659
|
}
|
|
4613
4660
|
});
|
|
4661
|
+
Object.defineProperty(exports, "customAction", {
|
|
4662
|
+
enumerable: true,
|
|
4663
|
+
get: function() {
|
|
4664
|
+
return customAction;
|
|
4665
|
+
}
|
|
4666
|
+
});
|
|
4667
|
+
Object.defineProperty(exports, "defineCustomActions", {
|
|
4668
|
+
enumerable: true,
|
|
4669
|
+
get: function() {
|
|
4670
|
+
return defineCustomActions;
|
|
4671
|
+
}
|
|
4672
|
+
});
|
|
4673
|
+
Object.defineProperty(exports, "describeCustomActions", {
|
|
4674
|
+
enumerable: true,
|
|
4675
|
+
get: function() {
|
|
4676
|
+
return describeCustomActions;
|
|
4677
|
+
}
|
|
4678
|
+
});
|
|
4679
|
+
Object.defineProperty(exports, "deviceCustomAction", {
|
|
4680
|
+
enumerable: true,
|
|
4681
|
+
get: function() {
|
|
4682
|
+
return deviceCustomAction;
|
|
4683
|
+
}
|
|
4684
|
+
});
|
|
4614
4685
|
Object.defineProperty(exports, "deviceOpsCapability", {
|
|
4615
4686
|
enumerable: true,
|
|
4616
4687
|
get: function() {
|
|
@@ -2792,6 +2792,53 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
2792
2792
|
return DeviceRole;
|
|
2793
2793
|
}({});
|
|
2794
2794
|
//#endregion
|
|
2795
|
+
//#region src/capabilities/custom-actions.ts
|
|
2796
|
+
/**
|
|
2797
|
+
* Identity — preserves literal types for downstream inference.
|
|
2798
|
+
*
|
|
2799
|
+
* The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
|
|
2800
|
+
* TypeScript does not widen each entry's literal `kind`/`auth` fields to
|
|
2801
|
+
* the broader unions declared on `CustomActionSpec`'s default generics.
|
|
2802
|
+
* Shape validity is enforced separately by the `customAction(...)` helper
|
|
2803
|
+
* whose return type is already a `CustomActionSpec<...>`.
|
|
2804
|
+
*/
|
|
2805
|
+
function defineCustomActions(spec) {
|
|
2806
|
+
return spec;
|
|
2807
|
+
}
|
|
2808
|
+
function customAction(input, output, options) {
|
|
2809
|
+
return {
|
|
2810
|
+
input,
|
|
2811
|
+
output,
|
|
2812
|
+
kind: options?.kind ?? "query",
|
|
2813
|
+
auth: options?.auth ?? "protected",
|
|
2814
|
+
scope: options?.scope ?? { kind: "system" },
|
|
2815
|
+
...options?.caller ? { caller: "required" } : {}
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
function deviceCustomAction(input, output, options) {
|
|
2819
|
+
return {
|
|
2820
|
+
input,
|
|
2821
|
+
output,
|
|
2822
|
+
kind: options?.kind ?? "query",
|
|
2823
|
+
auth: options?.auth ?? "protected",
|
|
2824
|
+
scope: {
|
|
2825
|
+
kind: "device",
|
|
2826
|
+
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2829
|
+
}
|
|
2830
|
+
/** Strip a catalog to what crosses the wire. Pure; the schemas are not touched. */
|
|
2831
|
+
function describeCustomActions(catalog) {
|
|
2832
|
+
const out = {};
|
|
2833
|
+
for (const [name, spec] of Object.entries(catalog)) out[name] = {
|
|
2834
|
+
kind: spec.kind,
|
|
2835
|
+
auth: spec.auth,
|
|
2836
|
+
scope: spec.scope,
|
|
2837
|
+
...spec.caller === "required" ? { caller: "required" } : {}
|
|
2838
|
+
};
|
|
2839
|
+
return out;
|
|
2840
|
+
}
|
|
2841
|
+
//#endregion
|
|
2795
2842
|
//#region src/device/children-batch-max.ts
|
|
2796
2843
|
/**
|
|
2797
2844
|
* Most parents one `getChildrenBatch` may name.
|
|
@@ -4257,4 +4304,4 @@ function sleepCancellable(ms, signal) {
|
|
|
4257
4304
|
});
|
|
4258
4305
|
}
|
|
4259
4306
|
//#endregion
|
|
4260
|
-
export {
|
|
4307
|
+
export { CAM_PROFILE_ORDER as $, DeviceType as A, isEvent as At, systemMethod as B, isAudioChunkFormat as Bt, customAction as C, SHARE_VIEW_KINDS as Ct, ChargingStatus as D, createDurableState as Dt, deviceCustomAction as E, normalizeAddonInitResult as Et, event as F, hydrateSchema as Ft, ReadinessRegistry as G, nodePin as H, expandCapMethods as I, resolveHydratedFieldValue as It, readinessKey as J, ReadinessTimeoutError as K, isDeviceConfigCap as L, AUDIO_CHUNK_FORMATS as Lt, DEFAULT_RUNTIME_STATE_DURABILITY as M, WELL_KNOWN_TAB_MAP as Mt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as N, collectHydratedFieldEntries as Nt, DeviceFeature as O, createEvent as Ot, DEVICE_STATUS_METHOD as P, collectHydratedFieldValues as Pt, BrokerStatusSchema as Q, method as R, audioChunkBytesPerSample as Rt, DEVICE_CHILDREN_BATCH_MAX as S, DATAPLANE_SECRET_HEADER as St, describeCustomActions as T, BaseAddon as Tt, readNodePin as U, CAP_NODE_PIN_CONTEXT_KEY as V, toNodeId as W, AudioChunkFormatSchema as X, scopeKey as Y, BrokerStatsSchema as Z, createMirrorSource as _, SubscribeFramesResultSchema as _t, asJsonObject as a, DecodedFrameSchema as at, deviceOpsCapability as b, parseProfileBrokerId as bt, parseJsonArray as c, FrameHandleSchema as ct, BOOT_RECOVERY_BACKOFF_MS as d, ProfileSlotStatusSchema as dt, CamProfileSchema as et, DEVICE_SCOPED_CAPS as f, StreamSourceEntrySchema$1 as ft, createLazyTrpcSource as g, SubscribeFramesInputSchema as gt, createEventBusSliceSource as h, SubscribeAudioChunksResultSchema as ht, asJsonArray as i, DecodedAudioChunkSchema as it, adminUiCapability as j, WELL_KNOWN_TABS as jt, DeviceRole as k, emitReadiness as kt, parseJsonObject as l, ProfileRtspEntrySchema as lt, createDeviceProxy as m, SubscribeAudioChunksInputSchema as mt, sleepCancellable as n, CamStreamResolutionSchema as nt, asNumber as o, EncodedPacketSchema as ot, isDeviceScopedCap as p, StreamSourceSchema as pt, emitDownForOwnedCaps as q, asBoolean as r, CameraStreamSchema as rt, asString as s, FrameHandleFormatSchema as st, sleep as t, CamStreamKindSchema as tt, parseJsonUnknown as u, ProfileSlotSchema as ut, createSliceHandle as v, makeProfileBrokerId as vt, defineCustomActions as w, DisposerChain as wt, viewerUiCapability as x, selectAssignedProfileSlots as xt, RawStateResultSchema as y, makeSourceBrokerId as yt, resolveCapMount as z, expandAudioChunkToF32le as zt };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FirstLevelMacroClass } from './labels.js';
|
|
2
|
+
import type { TrackState } from '../capabilities/pipeline-analytics.cap.js';
|
|
2
3
|
import type { BoundingBox as EngineBoundingBox, FrameInput, Landmark } from './io.js';
|
|
3
4
|
export interface SpatialDetection {
|
|
4
5
|
readonly class: string;
|
|
@@ -126,9 +127,29 @@ export type MacroClass = FirstLevelMacro | DetailMacro | 'audio' | string;
|
|
|
126
127
|
/** Tracker-enriched info attached to first-level detections only. */
|
|
127
128
|
export interface TrackInfo {
|
|
128
129
|
readonly trackId: string;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
/**
|
|
131
|
+
* What the tracker says this subject is DOING, as of this frame.
|
|
132
|
+
*
|
|
133
|
+
* Computed for every track on every frame by `StateAnalyzer` (10 s to
|
|
134
|
+
* `stationary`) and carried here so a consumer can draw a parked car
|
|
135
|
+
* differently from one that is moving — which is the whole reason the
|
|
136
|
+
* verdict is computed.
|
|
137
|
+
*
|
|
138
|
+
* It replaces an unused `moving?: boolean` (and a `speedPx?: number`) that
|
|
139
|
+
* sat here declared and NEVER assigned anywhere in the repo, while the live
|
|
140
|
+
* overlay drew a person standing still exactly like one walking. A boolean
|
|
141
|
+
* would also have been lossy: `stationary` and `loitering` are different
|
|
142
|
+
* things to show.
|
|
143
|
+
*
|
|
144
|
+
* ABSENT means the tracker has not classified this track yet — not "moving".
|
|
145
|
+
* A fresh track must not flash as stationary for its first frames.
|
|
146
|
+
*
|
|
147
|
+
* The CANONICAL `TrackState`, the same enum tracks and events already carry
|
|
148
|
+
* (`idle` is the still one — `stationary` and `loitering` both map into it).
|
|
149
|
+
* Deliberately not `ObjectState`, the analyzer's internal spelling: one fact
|
|
150
|
+
* with two vocabularies on the wire is how two readers start disagreeing.
|
|
151
|
+
*/
|
|
152
|
+
readonly movementState?: TrackState;
|
|
132
153
|
/** IDs of zones the bbox overlaps at this frame. */
|
|
133
154
|
readonly zones?: readonly string[];
|
|
134
155
|
/** Wall-clock timestamp (ms) when the track was first seen. */
|
package/dist/types/models.d.ts
CHANGED
|
@@ -236,9 +236,9 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
236
236
|
nhwc: "nhwc";
|
|
237
237
|
}>>;
|
|
238
238
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
239
|
+
none: "none";
|
|
239
240
|
"zero-one": "zero-one";
|
|
240
241
|
imagenet: "imagenet";
|
|
241
|
-
none: "none";
|
|
242
242
|
}>>;
|
|
243
243
|
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
244
244
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -351,19 +351,19 @@ export declare const ModelConvertMetadataSchema: z.ZodObject<{
|
|
|
351
351
|
nhwc: "nhwc";
|
|
352
352
|
}>>;
|
|
353
353
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
354
|
+
none: "none";
|
|
354
355
|
"zero-one": "zero-one";
|
|
355
356
|
imagenet: "imagenet";
|
|
356
|
-
none: "none";
|
|
357
357
|
}>>;
|
|
358
358
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
359
359
|
letterbox: "letterbox";
|
|
360
360
|
resize: "resize";
|
|
361
361
|
}>>;
|
|
362
362
|
outputFormat: z.ZodEnum<{
|
|
363
|
+
classification: "classification";
|
|
363
364
|
yolo: "yolo";
|
|
364
365
|
ssd: "ssd";
|
|
365
366
|
embedding: "embedding";
|
|
366
|
-
classification: "classification";
|
|
367
367
|
ocr: "ocr";
|
|
368
368
|
segmentation: "segmentation";
|
|
369
369
|
}>;
|
|
@@ -481,9 +481,9 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
481
481
|
nhwc: "nhwc";
|
|
482
482
|
}>>;
|
|
483
483
|
inputNormalization: z.ZodOptional<z.ZodEnum<{
|
|
484
|
+
none: "none";
|
|
484
485
|
"zero-one": "zero-one";
|
|
485
486
|
imagenet: "imagenet";
|
|
486
|
-
none: "none";
|
|
487
487
|
}>>;
|
|
488
488
|
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
489
489
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|