@camstack/types 1.2.270 → 1.2.272

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.
Files changed (52) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/capabilities/control.cap.d.ts +4 -4
  4. package/dist/capabilities/core-blocks.cap.d.ts +1 -1
  5. package/dist/capabilities/device-discovery.cap.d.ts +1 -1
  6. package/dist/capabilities/device-extension.cap.d.ts +8 -8
  7. package/dist/capabilities/device-manager.cap.d.ts +50 -0
  8. package/dist/capabilities/index.d.ts +2 -2
  9. package/dist/capabilities/integrations.cap.d.ts +3 -3
  10. package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
  11. package/dist/capabilities/llm.cap.d.ts +4 -4
  12. package/dist/capabilities/motion.cap.d.ts +12 -0
  13. package/dist/capabilities/notification-rules.cap.d.ts +9 -9
  14. package/dist/capabilities/osd-manager.cap.d.ts +10 -10
  15. package/dist/capabilities/pet-feeder.cap.d.ts +4 -4
  16. package/dist/capabilities/pipeline-analytics.cap.d.ts +22 -10
  17. package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
  18. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +156 -6
  19. package/dist/capabilities/pipeline-runner.cap.d.ts +9 -0
  20. package/dist/capabilities/recording-archive.cap.d.ts +4 -4
  21. package/dist/capabilities/recording-export.cap.d.ts +7 -7
  22. package/dist/capabilities/recording-onboard.cap.d.ts +5 -5
  23. package/dist/capabilities/recording.cap.d.ts +5 -5
  24. package/dist/capabilities/snapshot.cap.d.ts +2 -2
  25. package/dist/capabilities/storage-provider.cap.d.ts +11 -11
  26. package/dist/capabilities/storage.cap.d.ts +3 -3
  27. package/dist/capabilities/stream-broker.cap.d.ts +1 -1
  28. package/dist/capabilities/videoclips.cap.d.ts +3 -3
  29. package/dist/capabilities/zone-analytics.cap.d.ts +2 -2
  30. package/dist/composition/composition-report.d.ts +3 -3
  31. package/dist/{composition-D5BQywfe.mjs → composition-BK-GTFYb.mjs} +27 -3
  32. package/dist/{composition-BAH3n-zq.js → composition-BRxAnxtU.js} +27 -3
  33. package/dist/device/base-device-provider.d.ts +19 -1
  34. package/dist/device/device-context.d.ts +12 -0
  35. package/dist/expression/builtins.d.ts +18 -0
  36. package/dist/expression/expression-source.d.ts +2 -0
  37. package/dist/generated/addon-api.d.ts +7 -66
  38. package/dist/generated/device-proxy.d.ts +1 -1
  39. package/dist/generated/method-access-map.d.ts +1 -1
  40. package/dist/generated/method-device-selectors.d.ts +2 -2
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +299 -23
  43. package/dist/index.mjs +284 -24
  44. package/dist/interfaces/addon.d.ts +9 -0
  45. package/dist/interfaces/storage-location-mode.d.ts +1 -1
  46. package/dist/interfaces/storage-location.d.ts +1 -1
  47. package/dist/node.js +1 -1
  48. package/dist/node.mjs +1 -1
  49. package/dist/pipeline/camera-sensors.d.ts +146 -0
  50. package/dist/{sleep-Bg0IB7gg.js → sleep-DYGSsCgK.js} +1 -0
  51. package/dist/{sleep-E6eD4yQS.mjs → sleep-DlrgY4Qb.mjs} +1 -0
  52. package/package.json +1 -1
@@ -500,6 +500,15 @@ export interface AddonContext<TConfig = Record<string, unknown>> {
500
500
  * `BaseAddon.readStoredGlobalKey`.
501
501
  */
502
502
  readAddonStoreResult?(): Promise<AddonStoreRead>;
503
+ /**
504
+ * ONE key of the addon store, three-way — `present`, `absent` (the store
505
+ * answered, the key was never written) or `unreadable` — reading that key's
506
+ * row only, never the whole store (D675). Optional: only the in-process
507
+ * kernel view answers it; a caller must treat its absence as unreadable.
508
+ *
509
+ * @internal Same rule as `readAddonStore`.
510
+ */
511
+ readAddonStoreKeyResult?(key: string): Promise<StoredKeyRead>;
503
512
  /**
504
513
  * Write a patch into the addon store. Keys not in the patch are
505
514
  * preserved. Keys explicitly set to `null` are preserved as-is (they
@@ -34,9 +34,9 @@ export declare const STORAGE_LOCATION_MODES: readonly ["active", "readonly", "dr
34
34
  */
35
35
  export declare const StorageLocationModeSchema: z.ZodEnum<{
36
36
  readonly: "readonly";
37
+ disabled: "disabled";
37
38
  active: "active";
38
39
  drain: "drain";
39
- disabled: "disabled";
40
40
  }>;
41
41
  export type StorageLocationMode = z.infer<typeof StorageLocationModeSchema>;
42
42
  /**
@@ -53,9 +53,9 @@ export declare const StorageLocationSchema: z.ZodObject<{
53
53
  enabled: z.ZodOptional<z.ZodBoolean>;
54
54
  mode: z.ZodOptional<z.ZodEnum<{
55
55
  readonly: "readonly";
56
+ disabled: "disabled";
56
57
  active: "active";
57
58
  drain: "drain";
58
- disabled: "disabled";
59
59
  }>>;
60
60
  capacity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
61
61
  totalBytes: z.ZodNumber;
package/dist/node.js CHANGED
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_composition = require("./composition-BAH3n-zq.js");
24
+ const require_composition = require("./composition-BRxAnxtU.js");
25
25
  const require_err_msg = require("./err-msg-Dx2Kor0g.js");
26
26
  let node_crypto = require("node:crypto");
27
27
  let node_fs = require("node:fs");
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Ct as Fmp4BoxSplitter, Dt as buildFfmpegArgs, P as compositionSourceKey, St as canonicalHash, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, jt as isSoftwareDecode } from "./composition-D5BQywfe.mjs";
1
+ import { Ct as Fmp4BoxSplitter, Dt as buildFfmpegArgs, P as compositionSourceKey, St as canonicalHash, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, jt as isSoftwareDecode } from "./composition-BK-GTFYb.mjs";
2
2
  import { t as errMsg } from "./err-msg-DX6i_MY4.mjs";
3
3
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
4
4
  import * as fs from "node:fs";
@@ -0,0 +1,146 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * What started a camera's onboard motion (D672). `camera` is the camera's own
4
+ * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
5
+ * wire means the camera: only the camera-sensors bridge ever says `sensor`.
6
+ */
7
+ export declare const MotionTriggeredBySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
+ kind: z.ZodLiteral<"camera">;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ kind: z.ZodLiteral<"sensor">;
11
+ deviceId: z.ZodNumber;
12
+ }, z.core.$strip>], "kind">;
13
+ export type MotionTriggeredBy = z.infer<typeof MotionTriggeredBySchema>;
14
+ export declare const CAMERA_TRIGGER: MotionTriggeredBy;
15
+ export interface MotionTriggeredByReading {
16
+ readonly triggeredBy: MotionTriggeredBy;
17
+ /** True when a value was PRESENT and did not parse — the caller logs it. */
18
+ readonly malformed: boolean;
19
+ }
20
+ export declare function readMotionTriggeredBy(value: unknown): MotionTriggeredByReading;
21
+ /** The orchestrator device-store key, beside `motionSources`. */
22
+ export declare const CAMERA_SENSORS_SETTINGS_KEY = "cameraSensors";
23
+ /** More than this is a configuration error, not a camera. */
24
+ export declare const MAX_CAMERA_SENSORS = 8;
25
+ export declare const CameraSensorRefSchema: z.ZodObject<{
26
+ addonId: z.ZodString;
27
+ stableId: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type CameraSensorRef = z.infer<typeof CameraSensorRefSchema>;
30
+ export declare function cameraSensorRefKey(ref: CameraSensorRef): string;
31
+ /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
32
+ export declare const CameraSensorsModeSchema: z.ZodEnum<{
33
+ "in-addition": "in-addition";
34
+ }>;
35
+ export type CameraSensorsMode = z.infer<typeof CameraSensorsModeSchema>;
36
+ export declare const CameraSensorsConfigSchema: z.ZodObject<{
37
+ mode: z.ZodEnum<{
38
+ "in-addition": "in-addition";
39
+ }>;
40
+ sensors: z.ZodArray<z.ZodObject<{
41
+ addonId: z.ZodString;
42
+ stableId: z.ZodString;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type CameraSensorsConfig = z.infer<typeof CameraSensorsConfigSchema>;
46
+ export declare const CameraSensorAttachmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ state: z.ZodLiteral<"ready">;
48
+ deviceId: z.ZodNumber;
49
+ name: z.ZodString;
50
+ caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
51
+ addonId: z.ZodString;
52
+ stableId: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ state: z.ZodLiteral<"offline">;
55
+ deviceId: z.ZodNumber;
56
+ name: z.ZodString;
57
+ reason: z.ZodEnum<{
58
+ offline: "offline";
59
+ disabled: "disabled";
60
+ }>;
61
+ addonId: z.ZodString;
62
+ stableId: z.ZodString;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ state: z.ZodLiteral<"missing">;
65
+ reason: z.ZodString;
66
+ addonId: z.ZodString;
67
+ stableId: z.ZodString;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ state: z.ZodLiteral<"unsupported">;
70
+ deviceId: z.ZodNumber;
71
+ name: z.ZodString;
72
+ reason: z.ZodString;
73
+ addonId: z.ZodString;
74
+ stableId: z.ZodString;
75
+ }, z.core.$strip>, z.ZodObject<{
76
+ state: z.ZodLiteral<"unreadable">;
77
+ reason: z.ZodString;
78
+ addonId: z.ZodString;
79
+ stableId: z.ZodString;
80
+ }, z.core.$strip>], "state">;
81
+ export type CameraSensorAttachment = z.infer<typeof CameraSensorAttachmentSchema>;
82
+ /**
83
+ * Why a configured camera forwards NOTHING from its sensors, however ready they
84
+ * are (D672): it does not list `onboard` in `motionSources` (attaching a sensor
85
+ * does not add it), or it has no active detection config at all (the bridge
86
+ * reads the active config). Absent = forwarded, or an older node that does not
87
+ * say.
88
+ */
89
+ export declare const CameraSensorsNotForwardedSchema: z.ZodEnum<{
90
+ "onboard-not-listed": "onboard-not-listed";
91
+ "no-active-detection": "no-active-detection";
92
+ }>;
93
+ export type CameraSensorsNotForwarded = z.infer<typeof CameraSensorsNotForwardedSchema>;
94
+ export declare const CameraSensorsStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
95
+ state: z.ZodLiteral<"not-configured">;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ state: z.ZodLiteral<"unreadable">;
98
+ reason: z.ZodString;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ state: z.ZodLiteral<"configured">;
101
+ mode: z.ZodEnum<{
102
+ "in-addition": "in-addition";
103
+ }>;
104
+ sensors: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ state: z.ZodLiteral<"ready">;
106
+ deviceId: z.ZodNumber;
107
+ name: z.ZodString;
108
+ caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
109
+ addonId: z.ZodString;
110
+ stableId: z.ZodString;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ state: z.ZodLiteral<"offline">;
113
+ deviceId: z.ZodNumber;
114
+ name: z.ZodString;
115
+ reason: z.ZodEnum<{
116
+ offline: "offline";
117
+ disabled: "disabled";
118
+ }>;
119
+ addonId: z.ZodString;
120
+ stableId: z.ZodString;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ state: z.ZodLiteral<"missing">;
123
+ reason: z.ZodString;
124
+ addonId: z.ZodString;
125
+ stableId: z.ZodString;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ state: z.ZodLiteral<"unsupported">;
128
+ deviceId: z.ZodNumber;
129
+ name: z.ZodString;
130
+ reason: z.ZodString;
131
+ addonId: z.ZodString;
132
+ stableId: z.ZodString;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ state: z.ZodLiteral<"unreadable">;
135
+ reason: z.ZodString;
136
+ addonId: z.ZodString;
137
+ stableId: z.ZodString;
138
+ }, z.core.$strip>], "state">>>;
139
+ notForwarded: z.ZodOptional<z.ZodEnum<{
140
+ "onboard-not-listed": "onboard-not-listed";
141
+ "no-active-detection": "no-active-detection";
142
+ }>>;
143
+ }, z.core.$strip>], "state">;
144
+ export type CameraSensorsStatus = z.infer<typeof CameraSensorsStatusSchema>;
145
+ /** What a camera reads before its first settings read ANSWERED (D315). */
146
+ export declare const CAMERA_SENSORS_NOT_LOADED: CameraSensorsStatus;
@@ -3734,6 +3734,7 @@ function createDeviceProxy(api, binding, opts) {
3734
3734
  probeStreams: (input) => dispatchSystem("deviceManager", "probeStreams", "mutation", input),
3735
3735
  getBindings: (input) => dispatchSystem("deviceManager", "getBindings", "query", input),
3736
3736
  setWrapperActive: (input) => dispatchSystem("deviceManager", "setWrapperActive", "mutation", input),
3737
+ getWrapperActivation: (input) => dispatchSystem("deviceManager", "getWrapperActivation", "query", input),
3737
3738
  getDeviceSettingsAggregate: (input) => dispatchSystem("deviceManager", "getDeviceSettingsAggregate", "query", input),
3738
3739
  getDeviceLiveInfoAggregate: (input) => dispatchSystem("deviceManager", "getDeviceLiveInfoAggregate", "query", input),
3739
3740
  getDeviceAggregate: (input) => dispatchSystem("deviceManager", "getDeviceAggregate", "query", input),
@@ -3734,6 +3734,7 @@ function createDeviceProxy(api, binding, opts) {
3734
3734
  probeStreams: (input) => dispatchSystem("deviceManager", "probeStreams", "mutation", input),
3735
3735
  getBindings: (input) => dispatchSystem("deviceManager", "getBindings", "query", input),
3736
3736
  setWrapperActive: (input) => dispatchSystem("deviceManager", "setWrapperActive", "mutation", input),
3737
+ getWrapperActivation: (input) => dispatchSystem("deviceManager", "getWrapperActivation", "query", input),
3737
3738
  getDeviceSettingsAggregate: (input) => dispatchSystem("deviceManager", "getDeviceSettingsAggregate", "query", input),
3738
3739
  getDeviceLiveInfoAggregate: (input) => dispatchSystem("deviceManager", "getDeviceLiveInfoAggregate", "query", input),
3739
3740
  getDeviceAggregate: (input) => dispatchSystem("deviceManager", "getDeviceAggregate", "query", input),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.270",
3
+ "version": "1.2.272",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",