@camstack/types 1.1.49 → 1.1.51
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/pipeline-analytics.cap.d.ts +162 -0
- package/dist/capabilities/recording.cap.d.ts +55 -1
- package/dist/capabilities/sensor-event-kinds.d.ts +32 -15
- package/dist/capabilities/zone-rules.cap.d.ts +4 -3
- package/dist/catalogs/event-taxonomy.d.ts +44 -0
- package/dist/catalogs/index.d.ts +2 -0
- package/dist/generated/addon-api.d.ts +210 -2
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +475 -53
- package/dist/index.mjs +461 -54
- package/dist/interfaces/config-ui.d.ts +47 -1
- package/dist/interfaces/ops-log.d.ts +75 -0
- package/dist/{sleep-BfvNtyu8.js → sleep-CF-UWPp0.js} +5 -0
- package/dist/{sleep-DOq2moJx.mjs → sleep-D8ZkNoYz.mjs} +5 -0
- package/dist/types/pipeline-step.d.ts +16 -2
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export interface ConfigSection {
|
|
|
80
80
|
readonly immediate?: boolean;
|
|
81
81
|
readonly fields: readonly ConfigField[];
|
|
82
82
|
}
|
|
83
|
-
export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
83
|
+
export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigDeviceSelectField | ConfigDeviceMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
84
84
|
export interface ConfigFieldBase {
|
|
85
85
|
readonly key: string;
|
|
86
86
|
readonly label: string;
|
|
@@ -319,6 +319,48 @@ export interface ConfigNodeMultiSelectField extends ConfigFieldBase {
|
|
|
319
319
|
showOffline?: boolean;
|
|
320
320
|
maxItems?: number;
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Declarative, client-evaluated filter for `device-select` /
|
|
324
|
+
* `device-multiselect`. The field carries ONLY this filter — the renderer
|
|
325
|
+
* lists every system device (`deviceManager.listAll`) and narrows the
|
|
326
|
+
* options CLIENT-SIDE. There is deliberately NO server-computed option
|
|
327
|
+
* list (that path depended on `deviceManager.getAllBindings`, which returns
|
|
328
|
+
* an empty set on the live cluster and left pickers blank).
|
|
329
|
+
*
|
|
330
|
+
* Match rule (union — a device is kept when ANY provided clause matches;
|
|
331
|
+
* an absent/empty filter matches every device):
|
|
332
|
+
* - `caps` → the device's advertised `features` intersect this list.
|
|
333
|
+
* - `types` → the device's `type` is one of these.
|
|
334
|
+
* `excludeDeviceId` is always subtracted last (typically the device whose
|
|
335
|
+
* settings host the field — e.g. a camera must not list itself as a source).
|
|
336
|
+
*/
|
|
337
|
+
export interface DeviceSelectFilter {
|
|
338
|
+
/** Keep devices whose `features` intersect ANY of these capability names. */
|
|
339
|
+
readonly caps?: readonly string[];
|
|
340
|
+
/** Keep devices whose `type` is one of these `DeviceType` strings. */
|
|
341
|
+
readonly types?: readonly string[];
|
|
342
|
+
/** Always drop this device id from the options (e.g. the host device). */
|
|
343
|
+
readonly excludeDeviceId?: number;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Pick a SINGLE device from the live device catalogue. Options are the
|
|
347
|
+
* result of `deviceManager.listAll` filtered client-side by `deviceFilter`.
|
|
348
|
+
* Stored value is the chosen device id as a string.
|
|
349
|
+
*/
|
|
350
|
+
export interface ConfigDeviceSelectField extends ConfigFieldBase {
|
|
351
|
+
type: 'device-select';
|
|
352
|
+
deviceFilter?: DeviceSelectFilter;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Pick MULTIPLE devices from the live device catalogue — the searchable
|
|
356
|
+
* sibling of `device-select` (same client-side `deviceFilter`). Stored
|
|
357
|
+
* value is a `string[]` of device ids.
|
|
358
|
+
*/
|
|
359
|
+
export interface ConfigDeviceMultiSelectField extends ConfigFieldBase {
|
|
360
|
+
type: 'device-multiselect';
|
|
361
|
+
deviceFilter?: DeviceSelectFilter;
|
|
362
|
+
maxItems?: number;
|
|
363
|
+
}
|
|
322
364
|
export interface ConfigPasswordField extends ConfigFieldBase {
|
|
323
365
|
type: 'password';
|
|
324
366
|
showToggle?: boolean;
|
|
@@ -801,6 +843,10 @@ export type ConfigFieldWithValue = (ConfigTextField & {
|
|
|
801
843
|
readonly value: unknown;
|
|
802
844
|
}) | (ConfigNodeMultiSelectField & {
|
|
803
845
|
readonly value: unknown;
|
|
846
|
+
}) | (ConfigDeviceSelectField & {
|
|
847
|
+
readonly value: unknown;
|
|
848
|
+
}) | (ConfigDeviceMultiSelectField & {
|
|
849
|
+
readonly value: unknown;
|
|
804
850
|
}) | ConfigWidgetField | (ConfigAddonActionSelectField & {
|
|
805
851
|
readonly value: unknown;
|
|
806
852
|
}) | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
3
|
+
* recordings and events management surfaces.
|
|
4
|
+
*
|
|
5
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
6
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
7
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
8
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
9
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
10
|
+
* never fail the operation it records.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
/** Which management domain the operation belongs to. */
|
|
14
|
+
export declare const OpsLogDomainSchema: z.ZodEnum<{
|
|
15
|
+
events: "events";
|
|
16
|
+
recording: "recording";
|
|
17
|
+
}>;
|
|
18
|
+
export type OpsLogDomain = z.infer<typeof OpsLogDomainSchema>;
|
|
19
|
+
/** The kind of management operation performed. */
|
|
20
|
+
export declare const OpsLogOpSchema: z.ZodEnum<{
|
|
21
|
+
prune: "prune";
|
|
22
|
+
"manual-delete": "manual-delete";
|
|
23
|
+
rescan: "rescan";
|
|
24
|
+
"retention-run": "retention-run";
|
|
25
|
+
}>;
|
|
26
|
+
export type OpsLogOp = z.infer<typeof OpsLogOpSchema>;
|
|
27
|
+
/** Why the operation ran. */
|
|
28
|
+
export declare const OpsLogReasonSchema: z.ZodEnum<{
|
|
29
|
+
manual: "manual";
|
|
30
|
+
retention: "retention";
|
|
31
|
+
quota: "quota";
|
|
32
|
+
operator: "operator";
|
|
33
|
+
}>;
|
|
34
|
+
export type OpsLogReason = z.infer<typeof OpsLogReasonSchema>;
|
|
35
|
+
/** One audit row, shared verbatim by both domains. */
|
|
36
|
+
export declare const OpsLogEntrySchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
at: z.ZodNumber;
|
|
39
|
+
domain: z.ZodEnum<{
|
|
40
|
+
events: "events";
|
|
41
|
+
recording: "recording";
|
|
42
|
+
}>;
|
|
43
|
+
op: z.ZodEnum<{
|
|
44
|
+
prune: "prune";
|
|
45
|
+
"manual-delete": "manual-delete";
|
|
46
|
+
rescan: "rescan";
|
|
47
|
+
"retention-run": "retention-run";
|
|
48
|
+
}>;
|
|
49
|
+
reason: z.ZodEnum<{
|
|
50
|
+
manual: "manual";
|
|
51
|
+
retention: "retention";
|
|
52
|
+
quota: "quota";
|
|
53
|
+
operator: "operator";
|
|
54
|
+
}>;
|
|
55
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
nodeId: z.ZodString;
|
|
57
|
+
itemsAffected: z.ZodNumber;
|
|
58
|
+
bytesReclaimed: z.ZodNumber;
|
|
59
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
60
|
+
actor: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type OpsLogEntry = z.infer<typeof OpsLogEntrySchema>;
|
|
63
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
64
|
+
export declare const OpsLogQueryInputSchema: z.ZodObject<{
|
|
65
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type OpsLogQueryInput = z.infer<typeof OpsLogQueryInputSchema>;
|
|
69
|
+
/**
|
|
70
|
+
* Default cap on the recorder's DurableState ops-log ring — the newest N rows
|
|
71
|
+
* survive; older ones are evicted on append.
|
|
72
|
+
*/
|
|
73
|
+
export declare const OPS_LOG_RING_DEFAULT_MAX = 500;
|
|
74
|
+
/** Default page size for a `listOpsLog` query when the caller omits `limit`. */
|
|
75
|
+
export declare const OPS_LOG_DEFAULT_LIMIT = 200;
|
|
@@ -2975,6 +2975,10 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
2975
2975
|
pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
|
|
2976
2976
|
wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
|
|
2977
2977
|
deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
|
|
2978
|
+
getEventStoreFootprint: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventStoreFootprint", "query", input),
|
|
2979
|
+
pruneEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEvents", "mutation", input),
|
|
2980
|
+
deleteDeviceEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteDeviceEvents", "mutation", input),
|
|
2981
|
+
listOpsLog: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listOpsLog", "query", input),
|
|
2978
2982
|
getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
|
|
2979
2983
|
getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
|
|
2980
2984
|
searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
|
|
@@ -3221,6 +3225,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3221
3225
|
setDeviceConfig: (input) => dispatchSystem("recording", "setDeviceConfig", "mutation", input),
|
|
3222
3226
|
rescanStorage: (input) => dispatchSystem("recording", "rescanStorage", "mutation", input),
|
|
3223
3227
|
pruneFootage: (input) => dispatchSystem("recording", "pruneFootage", "mutation", input),
|
|
3228
|
+
deleteFootprint: (input) => dispatchSystem("recording", "deleteFootprint", "mutation", input),
|
|
3224
3229
|
getStatus: (input) => dispatchSystem("recording", "getStatus", "query", input),
|
|
3225
3230
|
getDeviceSettingsContribution: (input) => dispatchSystem("recording", "getDeviceSettingsContribution", "query", input),
|
|
3226
3231
|
getDeviceLiveContribution: (input) => dispatchSystem("recording", "getDeviceLiveContribution", "query", input),
|
|
@@ -2975,6 +2975,10 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
2975
2975
|
pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
|
|
2976
2976
|
wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
|
|
2977
2977
|
deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
|
|
2978
|
+
getEventStoreFootprint: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventStoreFootprint", "query", input),
|
|
2979
|
+
pruneEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEvents", "mutation", input),
|
|
2980
|
+
deleteDeviceEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteDeviceEvents", "mutation", input),
|
|
2981
|
+
listOpsLog: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listOpsLog", "query", input),
|
|
2978
2982
|
getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
|
|
2979
2983
|
getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
|
|
2980
2984
|
searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
|
|
@@ -3221,6 +3225,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3221
3225
|
setDeviceConfig: (input) => dispatchSystem("recording", "setDeviceConfig", "mutation", input),
|
|
3222
3226
|
rescanStorage: (input) => dispatchSystem("recording", "rescanStorage", "mutation", input),
|
|
3223
3227
|
pruneFootage: (input) => dispatchSystem("recording", "pruneFootage", "mutation", input),
|
|
3228
|
+
deleteFootprint: (input) => dispatchSystem("recording", "deleteFootprint", "mutation", input),
|
|
3224
3229
|
getStatus: (input) => dispatchSystem("recording", "getStatus", "query", input),
|
|
3225
3230
|
getDeviceSettingsContribution: (input) => dispatchSystem("recording", "getDeviceSettingsContribution", "query", input),
|
|
3226
3231
|
getDeviceLiveContribution: (input) => dispatchSystem("recording", "getDeviceLiveContribution", "query", input),
|
|
@@ -22,8 +22,22 @@ export interface StepDefinition {
|
|
|
22
22
|
readonly slot: PipelineSlot;
|
|
23
23
|
/** Which postprocessor to apply to raw model output */
|
|
24
24
|
readonly postprocessor: PostprocessorType;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* How this step receives its input:
|
|
27
|
+
* - `full-frame` — the whole frame (root detectors like object-detection).
|
|
28
|
+
* - `crop-roi` — a crop of a PARENT detection's bbox (child steps like
|
|
29
|
+
* face-detection, plate-detection, classifiers).
|
|
30
|
+
* - `crop-zone` — a crop of the device's own `package`-stage zone-rules
|
|
31
|
+
* polygons (+ upscale for small-parcel recall), NOT a parent detection.
|
|
32
|
+
* A ROOT-plane detector (`inputClasses === null`) that makes the drawn
|
|
33
|
+
* package zones its inference input instead of the full frame. Used by the
|
|
34
|
+
* `package-detection` step (design ADDENDUM). NOTE: the frame-preparation
|
|
35
|
+
* for `crop-zone` (zone-bbox crop + upscale + bbox re-projection back to
|
|
36
|
+
* full-frame coords) is a pipeline-runner concern that is NOT yet
|
|
37
|
+
* implemented — a `crop-zone` root currently runs full-frame until that
|
|
38
|
+
* plumbing lands (see step-definitions.ts STEP_PACKAGE_DETECTION).
|
|
39
|
+
*/
|
|
40
|
+
readonly extractMode: 'full-frame' | 'crop-roi' | 'crop-zone';
|
|
27
41
|
/** Classes this step accepts from a parent detector (null = root, accepts full frame) */
|
|
28
42
|
readonly inputClasses: readonly string[] | null;
|
|
29
43
|
/** Classes this step outputs (e.g., ['person','vehicle','animal'] for YOLO) */
|