@camstack/types 1.1.50 → 1.1.52
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/capabilities/addons.cap.d.ts +1 -40
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +59 -0
- package/dist/capabilities/sensor-event-kinds.d.ts +32 -15
- package/dist/catalogs/event-taxonomy.d.ts +44 -0
- package/dist/catalogs/index.d.ts +2 -0
- package/dist/generated/addon-api.d.ts +18 -32
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +268 -122
- package/dist/index.mjs +261 -120
- package/dist/interfaces/addon.d.ts +2 -2
- package/dist/interfaces/config-ui.d.ts +47 -1
- package/dist/interfaces/event-bus.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +0 -1
- package/dist/types/pipeline-step.d.ts +4 -0
- package/package.json +1 -1
- package/dist/lifecycle/framework-swap.d.ts +0 -36
|
@@ -127,21 +127,6 @@ declare const AddonAutoUpdateSchema: z.ZodEnum<{
|
|
|
127
127
|
beta: "beta";
|
|
128
128
|
inherit: "inherit";
|
|
129
129
|
}>;
|
|
130
|
-
/**
|
|
131
|
-
* Result of `updateFrameworkPackage`. The cap method returns BEFORE the
|
|
132
|
-
* server restarts so the admin UI can react to the `restartingAt`
|
|
133
|
-
* timestamp (shows reconnect overlay). The transition from
|
|
134
|
-
* `fromVersion` to `toVersion` will be confirmed by a subsequent
|
|
135
|
-
* `system.restart-completed` event after the new process boots.
|
|
136
|
-
*
|
|
137
|
-
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
138
|
-
*/
|
|
139
|
-
declare const UpdateFrameworkPackageResultSchema: z.ZodObject<{
|
|
140
|
-
packageName: z.ZodString;
|
|
141
|
-
fromVersion: z.ZodString;
|
|
142
|
-
toVersion: z.ZodString;
|
|
143
|
-
restartingAt: z.ZodNumber;
|
|
144
|
-
}, z.core.$strip>;
|
|
145
130
|
declare const BulkUpdateItemStatusSchema: z.ZodEnum<{
|
|
146
131
|
failed: "failed";
|
|
147
132
|
queued: "queued";
|
|
@@ -487,30 +472,6 @@ export declare const addonsCapability: {
|
|
|
487
472
|
}, z.core.$strip>, z.ZodObject<{
|
|
488
473
|
success: z.ZodLiteral<true>;
|
|
489
474
|
}, z.core.$strip>, "mutation">;
|
|
490
|
-
/**
|
|
491
|
-
* Live-update one of the framework packages marked
|
|
492
|
-
* `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
|
|
493
|
-
* Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
|
|
494
|
-
* writes a `.restart-pending` marker, emits `system.restarting`
|
|
495
|
-
* and schedules a graceful process exit. The supervisor (Docker /
|
|
496
|
-
* Electron / systemd) brings the hub back up; on first boot after
|
|
497
|
-
* the restart the marker fires `system.restart-completed`.
|
|
498
|
-
*
|
|
499
|
-
* `version` defaults to `'latest'`. The allow-list of valid
|
|
500
|
-
* `packageName` values is enforced server-side.
|
|
501
|
-
*
|
|
502
|
-
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
503
|
-
*/
|
|
504
|
-
readonly updateFrameworkPackage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
505
|
-
packageName: z.ZodString;
|
|
506
|
-
version: z.ZodOptional<z.ZodString>;
|
|
507
|
-
deferRestart: z.ZodOptional<z.ZodBoolean>;
|
|
508
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
509
|
-
packageName: z.ZodString;
|
|
510
|
-
fromVersion: z.ZodString;
|
|
511
|
-
toVersion: z.ZodString;
|
|
512
|
-
restartingAt: z.ZodNumber;
|
|
513
|
-
}, z.core.$strip>, "mutation">;
|
|
514
475
|
readonly getVersions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
515
476
|
name: z.ZodString;
|
|
516
477
|
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -788,4 +749,4 @@ export declare const addonsCapability: {
|
|
|
788
749
|
};
|
|
789
750
|
};
|
|
790
751
|
export type IAddonsProvider = InferProvider<typeof addonsCapability>;
|
|
791
|
-
export { AddonListItemSchema, InstalledPackageSchema, PackageUpdateSchema, PackageVersionInfoSchema, SearchResultSchema, AutoUpdateSettingsSchema, AddonAutoUpdateSchema, LogStreamEntrySchema, CustomActionInputSchema, LogLevelSchema, ChannelSchema, ChannelWithInheritSchema,
|
|
752
|
+
export { AddonListItemSchema, InstalledPackageSchema, PackageUpdateSchema, PackageVersionInfoSchema, SearchResultSchema, AutoUpdateSettingsSchema, AddonAutoUpdateSchema, LogStreamEntrySchema, CustomActionInputSchema, LogLevelSchema, ChannelSchema, ChannelWithInheritSchema, FrameworkPackageStatusSchema, BulkUpdateItemStatusSchema, BulkUpdateItemSchema, BulkUpdatePhaseSchema, BulkUpdateStateSchema, };
|
|
@@ -78,7 +78,7 @@ export { type ILlmRuntimeProvider, llmRuntimeCapability, type LlmNodeModel, LlmN
|
|
|
78
78
|
export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
|
|
79
79
|
export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
|
|
80
80
|
export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, TrackedDetectionSchema, type TrackEnvelope, TrackEnvelopeSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, } from './pipeline-analytics.cap.js';
|
|
81
|
-
export { EVENT_KIND_BY_CAP, type SensorEventKindDescriptor } from './sensor-event-kinds.js';
|
|
81
|
+
export { EVENT_KIND_BY_CAP, EVENTFUL_CAP_NAMES, buildEventKindDescriptor, type SensorEventKindDescriptor, } from './sensor-event-kinds.js';
|
|
82
82
|
export type { PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
|
|
83
83
|
export { ModelSubstitutionSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
|
|
84
84
|
export type { CameraAssignmentStatus, CameraAudioStatus, CameraBrokerProfile, CameraBrokerStatus, CameraDecoderShm, CameraDecoderStatus, CameraDetectionPhase, CameraDetectionProvisioning, CameraDetectionProvisioningState, CameraDetectionStatus, CameraMotionStatus, CameraRecordingMode, CameraRecordingStatus, CameraSourceStatus, CameraSourceStream, CameraStatus, IngestOwner, } from './pipeline-orchestrator.cap.js';
|
|
@@ -76,6 +76,7 @@ export declare const EventKindIconSchema: z.ZodEnum<{
|
|
|
76
76
|
export type EventKindIcon = z.infer<typeof EventKindIconSchema>;
|
|
77
77
|
export declare const EventKindCategorySchema: z.ZodEnum<{
|
|
78
78
|
sensor: "sensor";
|
|
79
|
+
control: "control";
|
|
79
80
|
audio: "audio";
|
|
80
81
|
custom: "custom";
|
|
81
82
|
motion: "motion";
|
|
@@ -83,10 +84,18 @@ export declare const EventKindCategorySchema: z.ZodEnum<{
|
|
|
83
84
|
detection: "detection";
|
|
84
85
|
}>;
|
|
85
86
|
export type EventKindCategory = z.infer<typeof EventKindCategorySchema>;
|
|
87
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
88
|
+
export declare const EventKindLevelSchema: z.ZodEnum<{
|
|
89
|
+
sub: "sub";
|
|
90
|
+
macro: "macro";
|
|
91
|
+
}>;
|
|
92
|
+
export type EventKindLevel = z.infer<typeof EventKindLevelSchema>;
|
|
86
93
|
declare const EventKindDescriptorSchema: z.ZodObject<{
|
|
87
94
|
kind: z.ZodString;
|
|
95
|
+
labelKey: z.ZodString;
|
|
88
96
|
label: z.ZodString;
|
|
89
97
|
color: z.ZodString;
|
|
98
|
+
iconId: z.ZodString;
|
|
90
99
|
icon: z.ZodEnum<{
|
|
91
100
|
button: "button";
|
|
92
101
|
generic: "generic";
|
|
@@ -103,12 +112,18 @@ declare const EventKindDescriptorSchema: z.ZodObject<{
|
|
|
103
112
|
}>;
|
|
104
113
|
category: z.ZodEnum<{
|
|
105
114
|
sensor: "sensor";
|
|
115
|
+
control: "control";
|
|
106
116
|
audio: "audio";
|
|
107
117
|
custom: "custom";
|
|
108
118
|
motion: "motion";
|
|
109
119
|
package: "package";
|
|
110
120
|
detection: "detection";
|
|
111
121
|
}>;
|
|
122
|
+
parentKind: z.ZodNullable<z.ZodString>;
|
|
123
|
+
level: z.ZodEnum<{
|
|
124
|
+
sub: "sub";
|
|
125
|
+
macro: "macro";
|
|
126
|
+
}>;
|
|
112
127
|
source: z.ZodObject<{
|
|
113
128
|
capName: z.ZodString;
|
|
114
129
|
deviceId: z.ZodNumber;
|
|
@@ -168,11 +183,27 @@ declare const TrackAudioLabelSchema: z.ZodObject<{
|
|
|
168
183
|
lastAt: z.ZodNumber;
|
|
169
184
|
}, z.core.$strip>;
|
|
170
185
|
export type TrackAudioLabel = z.infer<typeof TrackAudioLabelSchema>;
|
|
186
|
+
/**
|
|
187
|
+
* How a track was produced. `pipeline` (default / absent) = the spatial
|
|
188
|
+
* detection+tracking pipeline. `sensor` = a SYNTHETIC track projected from a
|
|
189
|
+
* linked sensor/control state change (no positions; carries a snapshot). The
|
|
190
|
+
* spatial subsystems (tracker association, occupancy count, re-id/embedding,
|
|
191
|
+
* resurrection) MUST skip `sensor` tracks — they have no bbox trajectory.
|
|
192
|
+
*/
|
|
193
|
+
export declare const TrackSourceSchema: z.ZodEnum<{
|
|
194
|
+
sensor: "sensor";
|
|
195
|
+
pipeline: "pipeline";
|
|
196
|
+
}>;
|
|
197
|
+
export type TrackSource = z.infer<typeof TrackSourceSchema>;
|
|
171
198
|
declare const TrackSchema: z.ZodObject<{
|
|
172
199
|
trackId: z.ZodString;
|
|
173
200
|
deviceId: z.ZodNumber;
|
|
174
201
|
className: z.ZodString;
|
|
175
202
|
label: z.ZodOptional<z.ZodString>;
|
|
203
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
204
|
+
sensor: "sensor";
|
|
205
|
+
pipeline: "pipeline";
|
|
206
|
+
}>>;
|
|
176
207
|
firstSeen: z.ZodNumber;
|
|
177
208
|
lastSeen: z.ZodNumber;
|
|
178
209
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -365,6 +396,10 @@ declare const RecentTracksPageSchema: z.ZodObject<{
|
|
|
365
396
|
deviceId: z.ZodNumber;
|
|
366
397
|
className: z.ZodString;
|
|
367
398
|
label: z.ZodOptional<z.ZodString>;
|
|
399
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
400
|
+
sensor: "sensor";
|
|
401
|
+
pipeline: "pipeline";
|
|
402
|
+
}>>;
|
|
368
403
|
firstSeen: z.ZodNumber;
|
|
369
404
|
lastSeen: z.ZodNumber;
|
|
370
405
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -541,6 +576,10 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
541
576
|
deviceId: z.ZodNumber;
|
|
542
577
|
className: z.ZodString;
|
|
543
578
|
label: z.ZodOptional<z.ZodString>;
|
|
579
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
580
|
+
sensor: "sensor";
|
|
581
|
+
pipeline: "pipeline";
|
|
582
|
+
}>>;
|
|
544
583
|
firstSeen: z.ZodNumber;
|
|
545
584
|
lastSeen: z.ZodNumber;
|
|
546
585
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -605,6 +644,10 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
605
644
|
deviceId: z.ZodNumber;
|
|
606
645
|
className: z.ZodString;
|
|
607
646
|
label: z.ZodOptional<z.ZodString>;
|
|
647
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
648
|
+
sensor: "sensor";
|
|
649
|
+
pipeline: "pipeline";
|
|
650
|
+
}>>;
|
|
608
651
|
firstSeen: z.ZodNumber;
|
|
609
652
|
lastSeen: z.ZodNumber;
|
|
610
653
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -691,6 +734,10 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
691
734
|
deviceId: z.ZodNumber;
|
|
692
735
|
className: z.ZodString;
|
|
693
736
|
label: z.ZodOptional<z.ZodString>;
|
|
737
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
738
|
+
sensor: "sensor";
|
|
739
|
+
pipeline: "pipeline";
|
|
740
|
+
}>>;
|
|
694
741
|
firstSeen: z.ZodNumber;
|
|
695
742
|
lastSeen: z.ZodNumber;
|
|
696
743
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -773,6 +820,10 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
773
820
|
deviceId: z.ZodNumber;
|
|
774
821
|
className: z.ZodString;
|
|
775
822
|
label: z.ZodOptional<z.ZodString>;
|
|
823
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
824
|
+
sensor: "sensor";
|
|
825
|
+
pipeline: "pipeline";
|
|
826
|
+
}>>;
|
|
776
827
|
firstSeen: z.ZodNumber;
|
|
777
828
|
lastSeen: z.ZodNumber;
|
|
778
829
|
positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -941,8 +992,10 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
941
992
|
deviceId: z.ZodNumber;
|
|
942
993
|
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
943
994
|
kind: z.ZodString;
|
|
995
|
+
labelKey: z.ZodString;
|
|
944
996
|
label: z.ZodString;
|
|
945
997
|
color: z.ZodString;
|
|
998
|
+
iconId: z.ZodString;
|
|
946
999
|
icon: z.ZodEnum<{
|
|
947
1000
|
button: "button";
|
|
948
1001
|
generic: "generic";
|
|
@@ -959,12 +1012,18 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
959
1012
|
}>;
|
|
960
1013
|
category: z.ZodEnum<{
|
|
961
1014
|
sensor: "sensor";
|
|
1015
|
+
control: "control";
|
|
962
1016
|
audio: "audio";
|
|
963
1017
|
custom: "custom";
|
|
964
1018
|
motion: "motion";
|
|
965
1019
|
package: "package";
|
|
966
1020
|
detection: "detection";
|
|
967
1021
|
}>;
|
|
1022
|
+
parentKind: z.ZodNullable<z.ZodString>;
|
|
1023
|
+
level: z.ZodEnum<{
|
|
1024
|
+
sub: "sub";
|
|
1025
|
+
macro: "macro";
|
|
1026
|
+
}>;
|
|
968
1027
|
source: z.ZodObject<{
|
|
969
1028
|
capName: z.ZodString;
|
|
970
1029
|
deviceId: z.ZodNumber;
|
|
@@ -1,25 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
3
3
|
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
4
|
-
*
|
|
5
|
-
* event-emitter) into per-camera event-kind entries.
|
|
4
|
+
* caps into per-camera event-kind descriptors.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
10
|
-
*
|
|
6
|
+
* The descriptor DATA (color / iconId / labelKey / parentKind / category)
|
|
7
|
+
* is NOT duplicated here — every entry is derived from the single
|
|
8
|
+
* `EVENT_TAXONOMY` dictionary (`catalogs/event-taxonomy.ts`). This file owns
|
|
9
|
+
* ONLY the cap-name → taxonomy-kind mapping. Adding a new eventful sensor /
|
|
10
|
+
* control cap means adding one line here (and a taxonomy entry); the anti-
|
|
11
|
+
* drift guard `scripts/check-event-kind-coverage.ts` fails the build if an
|
|
12
|
+
* eventful cap is missing.
|
|
11
13
|
*/
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
import { type EventTaxonomyEntry } from '../catalogs/event-taxonomy.js';
|
|
15
|
+
import type { EventKindDescriptor, EventKindIcon } from './pipeline-analytics.cap.js';
|
|
16
|
+
/**
|
|
17
|
+
* The static half of an `EventKindDescriptor` (no per-device `source`).
|
|
18
|
+
* Extends the taxonomy entry with the legacy closed-enum `icon` glyph kept
|
|
19
|
+
* as a fallback for clients that predate `iconId`.
|
|
20
|
+
*/
|
|
21
|
+
export interface SensorEventKindDescriptor extends EventTaxonomyEntry {
|
|
22
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
18
23
|
readonly icon: EventKindIcon;
|
|
19
|
-
readonly category: EventKindCategory;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
|
-
* Sensor cap name → static event-kind descriptor. A linked device
|
|
26
|
+
* Sensor / control cap name → static event-kind descriptor. A linked device
|
|
23
27
|
* contributes one entry per bound cap present in this map.
|
|
24
28
|
*/
|
|
25
29
|
export declare const EVENT_KIND_BY_CAP: Readonly<Record<string, SensorEventKindDescriptor>>;
|
|
30
|
+
/** The cap names covered by the taxonomy (for the anti-drift guard). */
|
|
31
|
+
export declare const EVENTFUL_CAP_NAMES: readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* Build a full `EventKindDescriptor` for a taxonomy `kind`, stamping the
|
|
34
|
+
* per-device `source`. Returns null when `kind` is not in the taxonomy.
|
|
35
|
+
* This is THE bridge from the serializable taxonomy dictionary to the cap
|
|
36
|
+
* wire shape — every event-kind descriptor the server emits goes through it,
|
|
37
|
+
* so color/iconId/labelKey are never re-declared at a call site.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildEventKindDescriptor(kind: string, source: {
|
|
40
|
+
readonly capName: string;
|
|
41
|
+
readonly deviceId: number;
|
|
42
|
+
}): EventKindDescriptor | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type EventTaxonomyCategory = 'motion' | 'audio' | 'detection' | 'sensor' | 'control' | 'package' | 'custom';
|
|
2
|
+
export type EventTaxonomyLevel = 'macro' | 'sub';
|
|
3
|
+
/**
|
|
4
|
+
* The static, serializable half of an event kind. Descriptors surfaced by
|
|
5
|
+
* `listEventKinds` extend this with a per-device `source`.
|
|
6
|
+
*/
|
|
7
|
+
export interface EventTaxonomyEntry {
|
|
8
|
+
/** Unique kind id ('vehicle', 'car', 'lock', 'audio-dog', …). */
|
|
9
|
+
readonly kind: string;
|
|
10
|
+
/** Macro parent ('car' → 'vehicle'); null for a macro. */
|
|
11
|
+
readonly parentKind: string | null;
|
|
12
|
+
/** Derived from `parentKind` — explicit for the UI. */
|
|
13
|
+
readonly level: EventTaxonomyLevel;
|
|
14
|
+
readonly category: EventTaxonomyCategory;
|
|
15
|
+
/** Hex color for timeline/legend rendering. */
|
|
16
|
+
readonly color: string;
|
|
17
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
18
|
+
readonly iconId: string;
|
|
19
|
+
/** i18n key; `label` is the English fallback. */
|
|
20
|
+
readonly labelKey: string;
|
|
21
|
+
/** English fallback label (UI translates `labelKey` when it can). */
|
|
22
|
+
readonly label: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const TAXONOMY_COLORS: {
|
|
25
|
+
readonly motion: "#f59e0b";
|
|
26
|
+
readonly audio: "#06b6d4";
|
|
27
|
+
readonly person: "#22c55e";
|
|
28
|
+
readonly vehicle: "#3b82f6";
|
|
29
|
+
readonly animal: "#f97316";
|
|
30
|
+
readonly package: "#a855f7";
|
|
31
|
+
readonly sensor: "#8b5cf6";
|
|
32
|
+
readonly control: "#10b981";
|
|
33
|
+
readonly genericDetection: "#64748b";
|
|
34
|
+
};
|
|
35
|
+
/** Global default color when a kind is unknown (matches legacy box-drawer). */
|
|
36
|
+
export declare const DEFAULT_EVENT_COLOR = "#22ff55";
|
|
37
|
+
/** The complete taxonomy dictionary, keyed by kind. */
|
|
38
|
+
export declare const EVENT_TAXONOMY: Readonly<Record<string, EventTaxonomyEntry>>;
|
|
39
|
+
/** Taxonomy entry for a kind, or undefined when unknown. */
|
|
40
|
+
export declare function getTaxonomyEntry(kind: string): EventTaxonomyEntry | undefined;
|
|
41
|
+
/** Color for a kind — dictionary value, else the global default. */
|
|
42
|
+
export declare function colorForKind(kind: string): string;
|
|
43
|
+
/** The sub kinds whose `parentKind` is `macro` (empty for a leaf macro). */
|
|
44
|
+
export declare function subKindsOf(macro: string): readonly EventTaxonomyEntry[];
|
package/dist/catalogs/index.d.ts
CHANGED
|
@@ -1436,21 +1436,6 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
1436
1436
|
};
|
|
1437
1437
|
meta: object;
|
|
1438
1438
|
}>;
|
|
1439
|
-
updateFrameworkPackage: import("@trpc/server").TRPCMutationProcedure<{
|
|
1440
|
-
input: {
|
|
1441
|
-
[x: string]: unknown;
|
|
1442
|
-
packageName: string;
|
|
1443
|
-
version?: string | undefined;
|
|
1444
|
-
deferRestart?: boolean | undefined;
|
|
1445
|
-
};
|
|
1446
|
-
output: {
|
|
1447
|
-
packageName: string;
|
|
1448
|
-
fromVersion: string;
|
|
1449
|
-
toVersion: string;
|
|
1450
|
-
restartingAt: number;
|
|
1451
|
-
};
|
|
1452
|
-
meta: object;
|
|
1453
|
-
}>;
|
|
1454
1439
|
getVersions: import("@trpc/server").TRPCQueryProcedure<{
|
|
1455
1440
|
input: {
|
|
1456
1441
|
[x: string]: unknown;
|
|
@@ -9671,6 +9656,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9671
9656
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
9672
9657
|
active: boolean;
|
|
9673
9658
|
label?: string | undefined;
|
|
9659
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
9674
9660
|
classes?: readonly string[] | undefined;
|
|
9675
9661
|
importance?: number | undefined;
|
|
9676
9662
|
bestEventId?: string | undefined;
|
|
@@ -9734,6 +9720,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9734
9720
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
9735
9721
|
active: boolean;
|
|
9736
9722
|
label?: string | undefined;
|
|
9723
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
9737
9724
|
classes?: readonly string[] | undefined;
|
|
9738
9725
|
importance?: number | undefined;
|
|
9739
9726
|
bestEventId?: string | undefined;
|
|
@@ -9813,6 +9800,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9813
9800
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
9814
9801
|
active: boolean;
|
|
9815
9802
|
label?: string | undefined;
|
|
9803
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
9816
9804
|
classes?: readonly string[] | undefined;
|
|
9817
9805
|
importance?: number | undefined;
|
|
9818
9806
|
bestEventId?: string | undefined;
|
|
@@ -9881,6 +9869,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9881
9869
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
9882
9870
|
active: boolean;
|
|
9883
9871
|
label?: string | undefined;
|
|
9872
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
9884
9873
|
classes?: readonly string[] | undefined;
|
|
9885
9874
|
importance?: number | undefined;
|
|
9886
9875
|
bestEventId?: string | undefined;
|
|
@@ -10012,10 +10001,14 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
10012
10001
|
};
|
|
10013
10002
|
output: readonly {
|
|
10014
10003
|
kind: string;
|
|
10004
|
+
labelKey: string;
|
|
10015
10005
|
label: string;
|
|
10016
10006
|
color: string;
|
|
10007
|
+
iconId: string;
|
|
10017
10008
|
icon: "motion" | "smoke" | "button" | "audio" | "person" | "vehicle" | "animal" | "package" | "generic" | "door" | "pir" | "water";
|
|
10018
|
-
category: "custom" | "motion" | "audio" | "package" | "sensor" | "detection";
|
|
10009
|
+
category: "custom" | "motion" | "control" | "audio" | "package" | "sensor" | "detection";
|
|
10010
|
+
parentKind: string | null;
|
|
10011
|
+
level: "sub" | "macro";
|
|
10019
10012
|
source: {
|
|
10020
10013
|
capName: string;
|
|
10021
10014
|
deviceId: number;
|
|
@@ -18174,21 +18167,6 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18174
18167
|
};
|
|
18175
18168
|
meta: object;
|
|
18176
18169
|
}>;
|
|
18177
|
-
updateFrameworkPackage: import("@trpc/server").TRPCMutationProcedure<{
|
|
18178
|
-
input: {
|
|
18179
|
-
[x: string]: unknown;
|
|
18180
|
-
packageName: string;
|
|
18181
|
-
version?: string | undefined;
|
|
18182
|
-
deferRestart?: boolean | undefined;
|
|
18183
|
-
};
|
|
18184
|
-
output: {
|
|
18185
|
-
packageName: string;
|
|
18186
|
-
fromVersion: string;
|
|
18187
|
-
toVersion: string;
|
|
18188
|
-
restartingAt: number;
|
|
18189
|
-
};
|
|
18190
|
-
meta: object;
|
|
18191
|
-
}>;
|
|
18192
18170
|
getVersions: import("@trpc/server").TRPCQueryProcedure<{
|
|
18193
18171
|
input: {
|
|
18194
18172
|
[x: string]: unknown;
|
|
@@ -26409,6 +26387,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26409
26387
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
26410
26388
|
active: boolean;
|
|
26411
26389
|
label?: string | undefined;
|
|
26390
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
26412
26391
|
classes?: readonly string[] | undefined;
|
|
26413
26392
|
importance?: number | undefined;
|
|
26414
26393
|
bestEventId?: string | undefined;
|
|
@@ -26472,6 +26451,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26472
26451
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
26473
26452
|
active: boolean;
|
|
26474
26453
|
label?: string | undefined;
|
|
26454
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
26475
26455
|
classes?: readonly string[] | undefined;
|
|
26476
26456
|
importance?: number | undefined;
|
|
26477
26457
|
bestEventId?: string | undefined;
|
|
@@ -26551,6 +26531,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26551
26531
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
26552
26532
|
active: boolean;
|
|
26553
26533
|
label?: string | undefined;
|
|
26534
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
26554
26535
|
classes?: readonly string[] | undefined;
|
|
26555
26536
|
importance?: number | undefined;
|
|
26556
26537
|
bestEventId?: string | undefined;
|
|
@@ -26619,6 +26600,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26619
26600
|
state: "idle" | "left" | "moving" | "new" | "entered";
|
|
26620
26601
|
active: boolean;
|
|
26621
26602
|
label?: string | undefined;
|
|
26603
|
+
source?: "pipeline" | "sensor" | undefined;
|
|
26622
26604
|
classes?: readonly string[] | undefined;
|
|
26623
26605
|
importance?: number | undefined;
|
|
26624
26606
|
bestEventId?: string | undefined;
|
|
@@ -26750,10 +26732,14 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26750
26732
|
};
|
|
26751
26733
|
output: readonly {
|
|
26752
26734
|
kind: string;
|
|
26735
|
+
labelKey: string;
|
|
26753
26736
|
label: string;
|
|
26754
26737
|
color: string;
|
|
26738
|
+
iconId: string;
|
|
26755
26739
|
icon: "motion" | "smoke" | "button" | "audio" | "person" | "vehicle" | "animal" | "package" | "generic" | "door" | "pir" | "water";
|
|
26756
|
-
category: "custom" | "motion" | "audio" | "package" | "sensor" | "detection";
|
|
26740
|
+
category: "custom" | "motion" | "control" | "audio" | "package" | "sensor" | "detection";
|
|
26741
|
+
parentKind: string | null;
|
|
26742
|
+
level: "sub" | "macro";
|
|
26757
26743
|
source: {
|
|
26758
26744
|
capName: string;
|
|
26759
26745
|
deviceId: number;
|
|
@@ -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:
|
|
9
|
+
* Coverage: 800 method paths across 116 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -50,7 +50,7 @@ import type { userManagementCapability } from '../capabilities/user-management.c
|
|
|
50
50
|
*/
|
|
51
51
|
export interface SystemProxy {
|
|
52
52
|
readonly addonPages: Pick<InferProvider<typeof addonPagesCapability>, 'listPages'>;
|
|
53
|
-
readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | '
|
|
53
|
+
readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | 'getVersions' | 'restartAddon' | 'retryLoad' | 'getAutoUpdateSettings' | 'setAutoUpdateSettings' | 'getAddonAutoUpdate' | 'setAddonAutoUpdate' | 'applyAutoUpdateToAll' | 'custom' | 'startJob' | 'getJob' | 'listJobs' | 'cancelJob' | 'onAddonLogs'>;
|
|
54
54
|
readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings'>;
|
|
55
55
|
readonly addonWidgets: Pick<InferProvider<typeof addonWidgetsCapability>, 'listWidgets'>;
|
|
56
56
|
readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export { runInferenceStep } from './utils/run-inference-step.js';
|
|
|
119
119
|
export type { InferenceStepResult } from './utils/run-inference-step.js';
|
|
120
120
|
export { COCO_80_LABELS, COCO_TO_MACRO, MACRO_LABELS, } from './catalogs/coco-classmap.js';
|
|
121
121
|
export { AUDIO_MACRO_LABELS, YAMNET_TO_MACRO, APPLE_SA_TO_MACRO, mapAudioLabelToMacro, getAudioMacroClassIds, } from './catalogs/audio-classmap.js';
|
|
122
|
+
export { EVENT_TAXONOMY, TAXONOMY_COLORS, DEFAULT_EVENT_COLOR, getTaxonomyEntry, colorForKind, subKindsOf, type EventTaxonomyEntry, type EventTaxonomyCategory, type EventTaxonomyLevel, } from './catalogs/event-taxonomy.js';
|
|
122
123
|
export type { CameraMotionConfig, CameraNativeDetectionConfig, CameraDetectionCapabilities, } from './types/camera-detection.js';
|
|
123
124
|
export { type DeviceTypeInfo, DEVICE_TYPE_INFO } from './types/device-type.js';
|
|
124
125
|
export type { DeviceBinding, DeviceBindingEntry } from './device/device-binding.js';
|