@camstack/types 1.2.71 → 1.2.73
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 +18 -2
- package/dist/addon.mjs +18 -2
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/llm-runtime.cap.d.ts +106 -0
- package/dist/capabilities/llm-shared.d.ts +37 -0
- package/dist/capabilities/llm.cap.d.ts +167 -0
- package/dist/capabilities/notification-rules.cap.d.ts +27 -19
- package/dist/capabilities/scene-monitor.cap.d.ts +353 -15
- package/dist/capabilities/system.cap.d.ts +130 -1
- package/dist/generated/addon-api.d.ts +33 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +521 -50
- package/dist/index.mjs +503 -51
- package/dist/notification/audio-condition.d.ts +53 -1
- package/dist/{sleep-DbVrpKVz.js → sleep-B-mRsuDp.js} +1 -0
- package/dist/{sleep-CTgUmjYq.mjs → sleep-CQayd2Su.mjs} +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferNativeProvider } from './capability-definition.js';
|
|
3
2
|
import { DeviceType } from '../device/device-type.js';
|
|
3
|
+
import { type InferNativeProvider } from './capability-definition.js';
|
|
4
4
|
/**
|
|
5
5
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
6
6
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
@@ -9,14 +9,58 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
9
9
|
* thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
|
|
10
10
|
* vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
|
|
13
|
+
* which put a "Scenes" tab on one camera's detail page. That is the wrong shape
|
|
14
|
+
* for the thing: a scene is a standing question about the property ("is the bin
|
|
15
|
+
* still out"), and the operator's question is "which of my scenes have tripped",
|
|
16
|
+
* across every camera at once — not "what does camera 617 think". Buried one
|
|
17
|
+
* camera deep it also could not be found. The surface is now a top-level admin
|
|
18
|
+
* page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
|
|
19
|
+
* picks the camera inside the create flow, the same shape Events and Faces have.
|
|
20
|
+
*
|
|
21
|
+
* The consequence to keep in mind: `host/scene-monitor-editor` is gone from
|
|
22
|
+
* `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
|
|
23
|
+
* directions, so a registration nobody declares fails exactly as loudly as a
|
|
24
|
+
* declaration nobody registers. The editor is imported directly by the page.
|
|
25
|
+
*
|
|
26
|
+
* `status.kind:'push'` — the engine pushes on every hysteresis flip /
|
|
27
|
+
* availability change; consumers never poll.
|
|
16
28
|
*/
|
|
17
|
-
/** Extensible condition tag. Seeded 'day' | '
|
|
18
|
-
*
|
|
29
|
+
/** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
|
|
30
|
+
* captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
|
|
31
|
+
* Open by design so more can be added without a wire break.
|
|
32
|
+
*
|
|
33
|
+
* Matching does NOT fall back across conditions: cross-condition cosines are
|
|
34
|
+
* not comparable, so "I have never seen this scene in this light" is reported
|
|
35
|
+
* as `unknown`, never guessed. A day reference scored against an IR frame
|
|
36
|
+
* collapses the cosine and would latch a false alarm every single night. */
|
|
19
37
|
export declare const SceneConditionSchema: z.ZodString;
|
|
38
|
+
/** The conditions the resolver can produce. Seeds for the UI's coverage line;
|
|
39
|
+
* the wire type stays an open string. */
|
|
40
|
+
export declare const SCENE_CONDITIONS: readonly ["day", "ir", "night", "dawn", "dusk"];
|
|
41
|
+
/** Reserved, engine-owned state id standing for "the region no longer looks
|
|
42
|
+
* like ANY captured reference". Never authored by an operator, never stored in
|
|
43
|
+
* `states[]` — it is the synthetic candidate that makes divergence a
|
|
44
|
+
* first-class hysteresis input rather than a bare `return`. */
|
|
45
|
+
export declare const SCENE_DIVERGED = "__diverged__";
|
|
46
|
+
/** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
|
|
47
|
+
* `unknown` = we cannot judge (no reference for this condition, encoder model
|
|
48
|
+
* changed, view shifted, no snapshot). `unknown` is a real value, not a null,
|
|
49
|
+
* and never counts toward hysteresis in either direction. */
|
|
50
|
+
export declare const SceneVerdictSchema: z.ZodEnum<{
|
|
51
|
+
unknown: "unknown";
|
|
52
|
+
matched: "matched";
|
|
53
|
+
diverged: "diverged";
|
|
54
|
+
}>;
|
|
55
|
+
/** Why a scene cannot judge. Named, because this feature's failure mode is
|
|
56
|
+
* silence that reads as "nothing has happened". */
|
|
57
|
+
export declare const SceneUnavailableSchema: z.ZodEnum<{
|
|
58
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
59
|
+
"view-shifted": "view-shifted";
|
|
60
|
+
"no-vision-profile": "no-vision-profile";
|
|
61
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
62
|
+
"no-snapshot": "no-snapshot";
|
|
63
|
+
}>;
|
|
20
64
|
/** One captured reference — condition-tagged, model-version-gated. `embedding`
|
|
21
65
|
* is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
|
|
22
66
|
export declare const SceneReferenceSchema: z.ZodObject<{
|
|
@@ -25,6 +69,7 @@ export declare const SceneReferenceSchema: z.ZodObject<{
|
|
|
25
69
|
condition: z.ZodString;
|
|
26
70
|
capturedAt: z.ZodNumber;
|
|
27
71
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
72
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
28
73
|
}, z.core.$strip>;
|
|
29
74
|
export declare const SceneMonitorStateSchema: z.ZodObject<{
|
|
30
75
|
id: z.ZodString;
|
|
@@ -35,6 +80,7 @@ export declare const SceneMonitorStateSchema: z.ZodObject<{
|
|
|
35
80
|
condition: z.ZodString;
|
|
36
81
|
capturedAt: z.ZodNumber;
|
|
37
82
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
83
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
38
84
|
}, z.core.$strip>>;
|
|
39
85
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
86
|
referenceCount: z.ZodNumber;
|
|
@@ -52,6 +98,40 @@ export declare const SceneCheckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
52
98
|
profileId: z.ZodOptional<z.ZodString>;
|
|
53
99
|
hysteresisCount: z.ZodNumber;
|
|
54
100
|
}, z.core.$strip>], "mode">;
|
|
101
|
+
/** Defaults, as CONSTANTS rather than only as Zod `.default()`. A Zod default
|
|
102
|
+
* does NOT run on the addon→addon cap path, so every runtime seam reads these
|
|
103
|
+
* as absent-with-a-constant (the `NcConfirmSchema` lesson, three production
|
|
104
|
+
* failures in one day). The schema defaults and these values are the same
|
|
105
|
+
* numbers on purpose. */
|
|
106
|
+
export declare const SCENE_DEFAULT_QUIET_SECONDS = 60;
|
|
107
|
+
export declare const SCENE_DEFAULT_OBSERVATION_SPACING_SEC = 120;
|
|
108
|
+
export declare const SCENE_DEFAULT_CHECK_INTERVAL_SEC = 60;
|
|
109
|
+
export declare const SCENE_DEFAULT_ANCHOR_THRESHOLD = 0.85;
|
|
110
|
+
export declare const SCENE_CONFIRM_DEFAULT_TIMEOUT_MS = 8000;
|
|
111
|
+
export declare const SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
|
|
112
|
+
/** `resetScene({ recapture })` absent means TRUE — the operator decision. Read
|
|
113
|
+
* at the seam, because a Zod `.optional()` carries no default at all. */
|
|
114
|
+
export declare const SCENE_RESET_RECAPTURES = true;
|
|
115
|
+
/**
|
|
116
|
+
* Vision-model adjudication of a candidate flip. Field names deliberately
|
|
117
|
+
* mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
|
|
118
|
+
*
|
|
119
|
+
* `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
|
|
120
|
+
* fail-open: a notification suppressed is the worse error there, but a vision
|
|
121
|
+
* model that timed out has not told us the bin is gone, and a latch is a
|
|
122
|
+
* stateful claim that costs the operator a trip to reset.
|
|
123
|
+
*/
|
|
124
|
+
export declare const SceneConfirmSchema: z.ZodObject<{
|
|
125
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
126
|
+
prompt: z.ZodString;
|
|
127
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
128
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
129
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
130
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
131
|
+
flip: "flip";
|
|
132
|
+
hold: "hold";
|
|
133
|
+
}>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
55
135
|
export declare const SceneMonitorSchema: z.ZodObject<{
|
|
56
136
|
id: z.ZodString;
|
|
57
137
|
label: z.ZodString;
|
|
@@ -88,6 +168,7 @@ export declare const SceneMonitorSchema: z.ZodObject<{
|
|
|
88
168
|
condition: z.ZodString;
|
|
89
169
|
capturedAt: z.ZodNumber;
|
|
90
170
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
91
172
|
}, z.core.$strip>>;
|
|
92
173
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
174
|
referenceCount: z.ZodNumber;
|
|
@@ -102,6 +183,43 @@ export declare const SceneMonitorSchema: z.ZodObject<{
|
|
|
102
183
|
unavailable: "unavailable";
|
|
103
184
|
}>;
|
|
104
185
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
186
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
187
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
188
|
+
live: "live";
|
|
189
|
+
latched: "latched";
|
|
190
|
+
}>>;
|
|
191
|
+
verdict: z.ZodEnum<{
|
|
192
|
+
unknown: "unknown";
|
|
193
|
+
matched: "matched";
|
|
194
|
+
diverged: "diverged";
|
|
195
|
+
}>;
|
|
196
|
+
latched: z.ZodBoolean;
|
|
197
|
+
armedAt: z.ZodNumber;
|
|
198
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
200
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
201
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
202
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
prompt: z.ZodString;
|
|
205
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
206
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
207
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
208
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
209
|
+
flip: "flip";
|
|
210
|
+
hold: "hold";
|
|
211
|
+
}>>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
214
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
215
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
216
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
217
|
+
"view-shifted": "view-shifted";
|
|
218
|
+
"no-vision-profile": "no-vision-profile";
|
|
219
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
220
|
+
"no-snapshot": "no-snapshot";
|
|
221
|
+
}>>;
|
|
222
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
105
223
|
}, z.core.$strip>;
|
|
106
224
|
export declare const SceneMonitorStatusSchema: z.ZodObject<{
|
|
107
225
|
monitors: z.ZodArray<z.ZodObject<{
|
|
@@ -140,6 +258,7 @@ export declare const SceneMonitorStatusSchema: z.ZodObject<{
|
|
|
140
258
|
condition: z.ZodString;
|
|
141
259
|
capturedAt: z.ZodNumber;
|
|
142
260
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
261
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
143
262
|
}, z.core.$strip>>;
|
|
144
263
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
264
|
referenceCount: z.ZodNumber;
|
|
@@ -154,10 +273,50 @@ export declare const SceneMonitorStatusSchema: z.ZodObject<{
|
|
|
154
273
|
unavailable: "unavailable";
|
|
155
274
|
}>;
|
|
156
275
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
276
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
277
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
278
|
+
live: "live";
|
|
279
|
+
latched: "latched";
|
|
280
|
+
}>>;
|
|
281
|
+
verdict: z.ZodEnum<{
|
|
282
|
+
unknown: "unknown";
|
|
283
|
+
matched: "matched";
|
|
284
|
+
diverged: "diverged";
|
|
285
|
+
}>;
|
|
286
|
+
latched: z.ZodBoolean;
|
|
287
|
+
armedAt: z.ZodNumber;
|
|
288
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
289
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
290
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
291
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
292
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
294
|
+
prompt: z.ZodString;
|
|
295
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
296
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
297
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
298
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
299
|
+
flip: "flip";
|
|
300
|
+
hold: "hold";
|
|
301
|
+
}>>;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
304
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
305
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
306
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
307
|
+
"view-shifted": "view-shifted";
|
|
308
|
+
"no-vision-profile": "no-vision-profile";
|
|
309
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
310
|
+
"no-snapshot": "no-snapshot";
|
|
311
|
+
}>>;
|
|
312
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
157
313
|
}, z.core.$strip>>;
|
|
158
314
|
lastFetchedAt: z.ZodNumber;
|
|
159
315
|
}, z.core.$strip>;
|
|
160
316
|
export type SceneCondition = z.infer<typeof SceneConditionSchema>;
|
|
317
|
+
export type SceneVerdict = z.infer<typeof SceneVerdictSchema>;
|
|
318
|
+
export type SceneUnavailable = z.infer<typeof SceneUnavailableSchema>;
|
|
319
|
+
export type SceneConfirm = z.infer<typeof SceneConfirmSchema>;
|
|
161
320
|
export type SceneReference = z.infer<typeof SceneReferenceSchema>;
|
|
162
321
|
export type SceneMonitorState = z.infer<typeof SceneMonitorStateSchema>;
|
|
163
322
|
export type SceneCheck = z.infer<typeof SceneCheckSchema>;
|
|
@@ -170,14 +329,6 @@ export declare const sceneMonitorCapability: {
|
|
|
170
329
|
readonly kind: "wrapper";
|
|
171
330
|
readonly defaultActive: true;
|
|
172
331
|
readonly deviceTypes: readonly [DeviceType.Camera];
|
|
173
|
-
readonly deviceConfig: {
|
|
174
|
-
readonly ui: {
|
|
175
|
-
readonly kind: "widget";
|
|
176
|
-
readonly widgetId: "host/scene-monitor-editor";
|
|
177
|
-
readonly tab: "scenes";
|
|
178
|
-
readonly label: "Scenes";
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
332
|
readonly methods: {
|
|
182
333
|
readonly listScenes: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
183
334
|
deviceId: z.ZodNumber;
|
|
@@ -218,6 +369,7 @@ export declare const sceneMonitorCapability: {
|
|
|
218
369
|
condition: z.ZodString;
|
|
219
370
|
capturedAt: z.ZodNumber;
|
|
220
371
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
372
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
221
373
|
}, z.core.$strip>>;
|
|
222
374
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
223
375
|
referenceCount: z.ZodNumber;
|
|
@@ -232,6 +384,43 @@ export declare const sceneMonitorCapability: {
|
|
|
232
384
|
unavailable: "unavailable";
|
|
233
385
|
}>;
|
|
234
386
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
387
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
388
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
389
|
+
live: "live";
|
|
390
|
+
latched: "latched";
|
|
391
|
+
}>>;
|
|
392
|
+
verdict: z.ZodEnum<{
|
|
393
|
+
unknown: "unknown";
|
|
394
|
+
matched: "matched";
|
|
395
|
+
diverged: "diverged";
|
|
396
|
+
}>;
|
|
397
|
+
latched: z.ZodBoolean;
|
|
398
|
+
armedAt: z.ZodNumber;
|
|
399
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
400
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
401
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
402
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
403
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
404
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
405
|
+
prompt: z.ZodString;
|
|
406
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
407
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
408
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
409
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
410
|
+
flip: "flip";
|
|
411
|
+
hold: "hold";
|
|
412
|
+
}>>;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
415
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
416
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
417
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
418
|
+
"view-shifted": "view-shifted";
|
|
419
|
+
"no-vision-profile": "no-vision-profile";
|
|
420
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
421
|
+
"no-snapshot": "no-snapshot";
|
|
422
|
+
}>>;
|
|
423
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
235
424
|
}, z.core.$strip>>;
|
|
236
425
|
lastFetchedAt: z.ZodNumber;
|
|
237
426
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
@@ -297,6 +486,7 @@ export declare const sceneMonitorCapability: {
|
|
|
297
486
|
condition: z.ZodString;
|
|
298
487
|
capturedAt: z.ZodNumber;
|
|
299
488
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
489
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
300
490
|
}, z.core.$strip>>;
|
|
301
491
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
492
|
referenceCount: z.ZodNumber;
|
|
@@ -311,6 +501,43 @@ export declare const sceneMonitorCapability: {
|
|
|
311
501
|
unavailable: "unavailable";
|
|
312
502
|
}>;
|
|
313
503
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
504
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
505
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
506
|
+
live: "live";
|
|
507
|
+
latched: "latched";
|
|
508
|
+
}>>;
|
|
509
|
+
verdict: z.ZodEnum<{
|
|
510
|
+
unknown: "unknown";
|
|
511
|
+
matched: "matched";
|
|
512
|
+
diverged: "diverged";
|
|
513
|
+
}>;
|
|
514
|
+
latched: z.ZodBoolean;
|
|
515
|
+
armedAt: z.ZodNumber;
|
|
516
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
517
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
518
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
519
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
520
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
522
|
+
prompt: z.ZodString;
|
|
523
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
524
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
525
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
526
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
527
|
+
flip: "flip";
|
|
528
|
+
hold: "hold";
|
|
529
|
+
}>>;
|
|
530
|
+
}, z.core.$strip>>;
|
|
531
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
532
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
533
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
534
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
535
|
+
"view-shifted": "view-shifted";
|
|
536
|
+
"no-vision-profile": "no-vision-profile";
|
|
537
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
538
|
+
"no-snapshot": "no-snapshot";
|
|
539
|
+
}>>;
|
|
540
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
314
541
|
}, z.core.$strip>, "mutation">;
|
|
315
542
|
readonly updateScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
316
543
|
deviceId: z.ZodNumber;
|
|
@@ -341,6 +568,25 @@ export declare const sceneMonitorCapability: {
|
|
|
341
568
|
profileId: z.ZodOptional<z.ZodString>;
|
|
342
569
|
hysteresisCount: z.ZodNumber;
|
|
343
570
|
}, z.core.$strip>], "mode">>;
|
|
571
|
+
emit: z.ZodOptional<z.ZodEnum<{
|
|
572
|
+
live: "live";
|
|
573
|
+
latched: "latched";
|
|
574
|
+
}>>;
|
|
575
|
+
quietSeconds: z.ZodOptional<z.ZodNumber>;
|
|
576
|
+
minObservationSpacingSec: z.ZodOptional<z.ZodNumber>;
|
|
577
|
+
anchorThreshold: z.ZodOptional<z.ZodNumber>;
|
|
578
|
+
autoRestore: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
confirm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
580
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
581
|
+
prompt: z.ZodString;
|
|
582
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
583
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
584
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
585
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
586
|
+
flip: "flip";
|
|
587
|
+
hold: "hold";
|
|
588
|
+
}>>;
|
|
589
|
+
}, z.core.$strip>>>;
|
|
344
590
|
}, z.core.$strip>;
|
|
345
591
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
346
592
|
readonly deleteScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
@@ -367,6 +613,22 @@ export declare const sceneMonitorCapability: {
|
|
|
367
613
|
deviceId: z.ZodNumber;
|
|
368
614
|
monitorId: z.ZodString;
|
|
369
615
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
616
|
+
/**
|
|
617
|
+
* Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
|
|
618
|
+
* the CURRENT condition. The bin never goes back in exactly the same spot;
|
|
619
|
+
* "reset" in the operator's head means *this is the new normal*, and
|
|
620
|
+
* re-capture is what makes the feature self-healing against slow drift
|
|
621
|
+
* instead of failing silently weeks later.
|
|
622
|
+
*
|
|
623
|
+
* Reachable from three surfaces on this one mutation: the scene card, a
|
|
624
|
+
* notification button (an `onTrigger` sequence with a `kind:'cap'` step —
|
|
625
|
+
* no new Notification-Center code at all), and tRPC for scripts.
|
|
626
|
+
*/
|
|
627
|
+
readonly resetScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
628
|
+
deviceId: z.ZodNumber;
|
|
629
|
+
monitorId: z.ZodString;
|
|
630
|
+
recapture: z.ZodOptional<z.ZodBoolean>;
|
|
631
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
370
632
|
};
|
|
371
633
|
readonly status: {
|
|
372
634
|
readonly schema: z.ZodObject<{
|
|
@@ -406,6 +668,7 @@ export declare const sceneMonitorCapability: {
|
|
|
406
668
|
condition: z.ZodString;
|
|
407
669
|
capturedAt: z.ZodNumber;
|
|
408
670
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
671
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
409
672
|
}, z.core.$strip>>;
|
|
410
673
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
674
|
referenceCount: z.ZodNumber;
|
|
@@ -420,6 +683,43 @@ export declare const sceneMonitorCapability: {
|
|
|
420
683
|
unavailable: "unavailable";
|
|
421
684
|
}>;
|
|
422
685
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
686
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
687
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
688
|
+
live: "live";
|
|
689
|
+
latched: "latched";
|
|
690
|
+
}>>;
|
|
691
|
+
verdict: z.ZodEnum<{
|
|
692
|
+
unknown: "unknown";
|
|
693
|
+
matched: "matched";
|
|
694
|
+
diverged: "diverged";
|
|
695
|
+
}>;
|
|
696
|
+
latched: z.ZodBoolean;
|
|
697
|
+
armedAt: z.ZodNumber;
|
|
698
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
699
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
700
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
701
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
702
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
703
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
704
|
+
prompt: z.ZodString;
|
|
705
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
706
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
707
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
708
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
709
|
+
flip: "flip";
|
|
710
|
+
hold: "hold";
|
|
711
|
+
}>>;
|
|
712
|
+
}, z.core.$strip>>;
|
|
713
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
714
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
715
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
716
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
717
|
+
"view-shifted": "view-shifted";
|
|
718
|
+
"no-vision-profile": "no-vision-profile";
|
|
719
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
720
|
+
"no-snapshot": "no-snapshot";
|
|
721
|
+
}>>;
|
|
722
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
423
723
|
}, z.core.$strip>>;
|
|
424
724
|
lastFetchedAt: z.ZodNumber;
|
|
425
725
|
}, z.core.$strip>;
|
|
@@ -462,6 +762,7 @@ export declare const sceneMonitorCapability: {
|
|
|
462
762
|
condition: z.ZodString;
|
|
463
763
|
capturedAt: z.ZodNumber;
|
|
464
764
|
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
765
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
465
766
|
}, z.core.$strip>>;
|
|
466
767
|
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
467
768
|
referenceCount: z.ZodNumber;
|
|
@@ -476,6 +777,43 @@ export declare const sceneMonitorCapability: {
|
|
|
476
777
|
unavailable: "unavailable";
|
|
477
778
|
}>;
|
|
478
779
|
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
780
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
781
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
782
|
+
live: "live";
|
|
783
|
+
latched: "latched";
|
|
784
|
+
}>>;
|
|
785
|
+
verdict: z.ZodEnum<{
|
|
786
|
+
unknown: "unknown";
|
|
787
|
+
matched: "matched";
|
|
788
|
+
diverged: "diverged";
|
|
789
|
+
}>;
|
|
790
|
+
latched: z.ZodBoolean;
|
|
791
|
+
armedAt: z.ZodNumber;
|
|
792
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
793
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
794
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
795
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
796
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
797
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
798
|
+
prompt: z.ZodString;
|
|
799
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
800
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
801
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
802
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
803
|
+
flip: "flip";
|
|
804
|
+
hold: "hold";
|
|
805
|
+
}>>;
|
|
806
|
+
}, z.core.$strip>>;
|
|
807
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
808
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
809
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
810
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
811
|
+
"view-shifted": "view-shifted";
|
|
812
|
+
"no-vision-profile": "no-vision-profile";
|
|
813
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
814
|
+
"no-snapshot": "no-snapshot";
|
|
815
|
+
}>>;
|
|
816
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
479
817
|
}, z.core.$strip>>;
|
|
480
818
|
lastFetchedAt: z.ZodNumber;
|
|
481
819
|
}, z.core.$strip>;
|
|
@@ -39,6 +39,69 @@ declare const NetworkAddressSchema: z.ZodObject<{
|
|
|
39
39
|
family: z.ZodString;
|
|
40
40
|
internal: z.ZodBoolean;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
|
+
/**
|
|
43
|
+
* Provenance of the site coordinates, and the whole reason this is not just two
|
|
44
|
+
* numbers.
|
|
45
|
+
*
|
|
46
|
+
* - `operator-set` — a human typed it, or accepted a detection. Authoritative;
|
|
47
|
+
* nothing overwrites it.
|
|
48
|
+
* - `derived-from-ip` — the hub geolocated its own public IP once, because a
|
|
49
|
+
* default that is right to a few kilometres beats the coarse UTC clock split
|
|
50
|
+
* the sun-times consumers otherwise fall back to.
|
|
51
|
+
*
|
|
52
|
+
* The UI shows which one it is. An operator who cannot tell a guess from their
|
|
53
|
+
* own input will eventually trust the guess.
|
|
54
|
+
*/
|
|
55
|
+
declare const SiteLocationSourceSchema: z.ZodEnum<{
|
|
56
|
+
"operator-set": "operator-set";
|
|
57
|
+
"derived-from-ip": "derived-from-ip";
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Where the installation physically is — a fact of the SITE, not of any addon.
|
|
61
|
+
*
|
|
62
|
+
* It used to live in `pipeline-analytics`' global settings, which made a
|
|
63
|
+
* property of the building a property of one analytics addon. Anything that
|
|
64
|
+
* needs sun-times (scene condition variants today; anything solar tomorrow)
|
|
65
|
+
* reads it from here.
|
|
66
|
+
*/
|
|
67
|
+
declare const SiteLocationSchema: z.ZodObject<{
|
|
68
|
+
latitude: z.ZodNumber;
|
|
69
|
+
longitude: z.ZodNumber;
|
|
70
|
+
source: z.ZodEnum<{
|
|
71
|
+
"operator-set": "operator-set";
|
|
72
|
+
"derived-from-ip": "derived-from-ip";
|
|
73
|
+
}>;
|
|
74
|
+
updatedAt: z.ZodNumber;
|
|
75
|
+
label: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
/**
|
|
78
|
+
* The read shape: the location plus the honest state of the one-shot derivation.
|
|
79
|
+
*
|
|
80
|
+
* `derivationAttemptedAt` is what makes the "one call, ever" contract
|
|
81
|
+
* inspectable. When it is set and `location` is null, the geo-IP lookup ran and
|
|
82
|
+
* failed; the hub will NOT try again on its own — the fallback is declared
|
|
83
|
+
* (consumers degrade to their own last resort) and the operator either types the
|
|
84
|
+
* coordinates or presses detect.
|
|
85
|
+
*/
|
|
86
|
+
declare const SiteLocationStatusSchema: z.ZodObject<{
|
|
87
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
88
|
+
latitude: z.ZodNumber;
|
|
89
|
+
longitude: z.ZodNumber;
|
|
90
|
+
source: z.ZodEnum<{
|
|
91
|
+
"operator-set": "operator-set";
|
|
92
|
+
"derived-from-ip": "derived-from-ip";
|
|
93
|
+
}>;
|
|
94
|
+
updatedAt: z.ZodNumber;
|
|
95
|
+
label: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
derivationAttemptedAt: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
derivationError: z.ZodNullable<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
/** `null` clears the location and re-arms nothing — the derivation stays spent. */
|
|
101
|
+
declare const SetSiteLocationInputSchema: z.ZodNullable<z.ZodObject<{
|
|
102
|
+
latitude: z.ZodNumber;
|
|
103
|
+
longitude: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>>;
|
|
42
105
|
export declare const systemCapability: {
|
|
43
106
|
readonly name: "system";
|
|
44
107
|
readonly scope: "system";
|
|
@@ -79,6 +142,68 @@ export declare const systemCapability: {
|
|
|
79
142
|
readonly getRetentionConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodNullable<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
80
143
|
readonly setRetentionConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull, "mutation">;
|
|
81
144
|
readonly forceRetentionCleanup: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodVoid, "mutation">;
|
|
145
|
+
/**
|
|
146
|
+
* The site coordinates, deriving a default from the hub's public IP on the
|
|
147
|
+
* FIRST read that finds nothing stored.
|
|
148
|
+
*
|
|
149
|
+
* The derivation is one-shot and bounded: one outbound request, a few
|
|
150
|
+
* seconds, its outcome persisted either way. A hub with no internet pays it
|
|
151
|
+
* once and never again, and neither boot nor any consumer is blocked on it —
|
|
152
|
+
* the caller gets `location: null` and degrades exactly as it did before this
|
|
153
|
+
* method existed.
|
|
154
|
+
*/
|
|
155
|
+
readonly getSiteLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
156
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
157
|
+
latitude: z.ZodNumber;
|
|
158
|
+
longitude: z.ZodNumber;
|
|
159
|
+
source: z.ZodEnum<{
|
|
160
|
+
"operator-set": "operator-set";
|
|
161
|
+
"derived-from-ip": "derived-from-ip";
|
|
162
|
+
}>;
|
|
163
|
+
updatedAt: z.ZodNumber;
|
|
164
|
+
label: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
derivationAttemptedAt: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
derivationError: z.ZodNullable<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
169
|
+
/** Operator input. Always lands as `source: 'operator-set'`. */
|
|
170
|
+
readonly setSiteLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodNullable<z.ZodObject<{
|
|
171
|
+
latitude: z.ZodNumber;
|
|
172
|
+
longitude: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
174
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
175
|
+
latitude: z.ZodNumber;
|
|
176
|
+
longitude: z.ZodNumber;
|
|
177
|
+
source: z.ZodEnum<{
|
|
178
|
+
"operator-set": "operator-set";
|
|
179
|
+
"derived-from-ip": "derived-from-ip";
|
|
180
|
+
}>;
|
|
181
|
+
updatedAt: z.ZodNumber;
|
|
182
|
+
label: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
derivationAttemptedAt: z.ZodNullable<z.ZodNumber>;
|
|
185
|
+
derivationError: z.ZodNullable<z.ZodString>;
|
|
186
|
+
}, z.core.$strip>, "mutation">;
|
|
187
|
+
/**
|
|
188
|
+
* Re-run the geo-IP derivation now. The ONLY way a spent or failed
|
|
189
|
+
* derivation is retried — there is no timer, and no read path retries.
|
|
190
|
+
* Overwrites an existing `derived-from-ip` value; refuses to clobber an
|
|
191
|
+
* `operator-set` one.
|
|
192
|
+
*/
|
|
193
|
+
readonly detectSiteLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
194
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
195
|
+
latitude: z.ZodNumber;
|
|
196
|
+
longitude: z.ZodNumber;
|
|
197
|
+
source: z.ZodEnum<{
|
|
198
|
+
"operator-set": "operator-set";
|
|
199
|
+
"derived-from-ip": "derived-from-ip";
|
|
200
|
+
}>;
|
|
201
|
+
updatedAt: z.ZodNumber;
|
|
202
|
+
label: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
derivationAttemptedAt: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
derivationError: z.ZodNullable<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>, "mutation">;
|
|
82
207
|
};
|
|
83
208
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
84
209
|
readonly mount: {
|
|
@@ -86,4 +211,8 @@ export declare const systemCapability: {
|
|
|
86
211
|
};
|
|
87
212
|
};
|
|
88
213
|
export type ISystemProvider = InferProvider<typeof systemCapability>;
|
|
89
|
-
export
|
|
214
|
+
export type SiteLocation = z.infer<typeof SiteLocationSchema>;
|
|
215
|
+
export type SiteLocationSource = z.infer<typeof SiteLocationSourceSchema>;
|
|
216
|
+
export type SiteLocationStatus = z.infer<typeof SiteLocationStatusSchema>;
|
|
217
|
+
export type SetSiteLocationInput = z.infer<typeof SetSiteLocationInputSchema>;
|
|
218
|
+
export { FeatureManifestSchema, HealthStatusSchema, NetworkAddressSchema, SetSiteLocationInputSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, };
|