@camstack/types 1.2.65 → 1.2.66
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/air-quality-sensor.cap.d.ts +10 -0
- package/dist/capabilities/alarm-panel.cap.d.ts +10 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +10 -0
- package/dist/capabilities/audio-metrics.cap.d.ts +7 -0
- package/dist/capabilities/automation-control.cap.d.ts +7 -0
- package/dist/capabilities/battery.cap.d.ts +10 -0
- package/dist/capabilities/binary.cap.d.ts +10 -0
- package/dist/capabilities/brightness.cap.d.ts +7 -0
- package/dist/capabilities/camera-streams.cap.d.ts +7 -0
- package/dist/capabilities/capability-definition.d.ts +58 -0
- package/dist/capabilities/carbon-monoxide.cap.d.ts +10 -0
- package/dist/capabilities/climate-control.cap.d.ts +7 -0
- package/dist/capabilities/color.cap.d.ts +7 -0
- package/dist/capabilities/connectivity.cap.d.ts +10 -0
- package/dist/capabilities/consumables.cap.d.ts +7 -0
- package/dist/capabilities/contact.cap.d.ts +10 -0
- package/dist/capabilities/control.cap.d.ts +7 -0
- package/dist/capabilities/cover.cap.d.ts +10 -0
- package/dist/capabilities/day-night.cap.d.ts +10 -0
- package/dist/capabilities/device-discovery.cap.d.ts +7 -0
- package/dist/capabilities/device-status.cap.d.ts +10 -0
- package/dist/capabilities/doorbell.cap.d.ts +7 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +10 -0
- package/dist/capabilities/event-emitter.cap.d.ts +7 -0
- package/dist/capabilities/fan-control.cap.d.ts +7 -0
- package/dist/capabilities/feature-probe.cap.d.ts +7 -0
- package/dist/capabilities/flood.cap.d.ts +10 -0
- package/dist/capabilities/gas.cap.d.ts +10 -0
- package/dist/capabilities/humidifier.cap.d.ts +7 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +10 -0
- package/dist/capabilities/image-settings.cap.d.ts +10 -0
- package/dist/capabilities/image.cap.d.ts +7 -0
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/lawn-mower-control.cap.d.ts +7 -0
- package/dist/capabilities/lock-control.cap.d.ts +10 -0
- package/dist/capabilities/media-player.cap.d.ts +7 -0
- package/dist/capabilities/motion-trigger.cap.d.ts +7 -0
- package/dist/capabilities/motion-zones.cap.d.ts +10 -0
- package/dist/capabilities/motion.cap.d.ts +7 -0
- package/dist/capabilities/native-object-detection.cap.d.ts +10 -0
- package/dist/capabilities/notification-output.cap.d.ts +16 -0
- package/dist/capabilities/notification-rules.cap.d.ts +35 -3
- package/dist/capabilities/notifier.cap.d.ts +7 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts +10 -0
- package/dist/capabilities/osd-manager.cap.d.ts +2 -0
- package/dist/capabilities/pet-feeder.cap.d.ts +7 -0
- package/dist/capabilities/power-meter.cap.d.ts +10 -0
- package/dist/capabilities/presence.cap.d.ts +10 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts +10 -0
- package/dist/capabilities/privacy-mask.cap.d.ts +10 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts +7 -0
- package/dist/capabilities/scene-monitor.cap.d.ts +7 -0
- package/dist/capabilities/script-runner.cap.d.ts +7 -0
- package/dist/capabilities/smoke.cap.d.ts +10 -0
- package/dist/capabilities/stream-params.cap.d.ts +10 -0
- package/dist/capabilities/switch.cap.d.ts +10 -0
- package/dist/capabilities/tamper.cap.d.ts +10 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts +10 -0
- package/dist/capabilities/update.cap.d.ts +7 -0
- package/dist/capabilities/vacuum-control.cap.d.ts +7 -0
- package/dist/capabilities/valve.cap.d.ts +7 -0
- package/dist/capabilities/vibration.cap.d.ts +10 -0
- package/dist/capabilities/water-heater.cap.d.ts +7 -0
- package/dist/capabilities/weather.cap.d.ts +7 -0
- package/dist/capabilities/zone-analytics.cap.d.ts +7 -0
- package/dist/capabilities/zone-rules.cap.d.ts +7 -0
- package/dist/capabilities/zones.cap.d.ts +7 -0
- package/dist/generated/runtime-state-durability.d.ts +31 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1189 -72
- package/dist/index.mjs +1168 -73
- package/dist/notification/audio-condition.d.ts +118 -0
- package/dist/{sleep-BxjBLp3L.mjs → sleep-CSgK0rNX.mjs} +3 -1
- package/dist/{sleep-BszXLEvP.js → sleep-Dh1EJSqF.js} +8 -0
- package/package.json +1 -1
|
@@ -71,5 +71,12 @@ export declare const weatherCapability: {
|
|
|
71
71
|
windBearing: z.ZodNullable<z.ZodNumber>;
|
|
72
72
|
lastFetchedAt: z.ZodNumber;
|
|
73
73
|
}, z.core.$strip>;
|
|
74
|
+
/**
|
|
75
|
+
* Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
|
|
76
|
+
*
|
|
77
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
78
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
79
|
+
*/
|
|
80
|
+
readonly durability: "session";
|
|
74
81
|
};
|
|
75
82
|
export type IWeatherProvider = InferProvider<typeof weatherCapability>;
|
|
@@ -284,6 +284,13 @@ export declare const zoneAnalyticsCapability: {
|
|
|
284
284
|
keyFrameMediaKey: z.ZodOptional<z.ZodString>;
|
|
285
285
|
}, z.core.$strip>>>>;
|
|
286
286
|
}, z.core.$strip>;
|
|
287
|
+
/**
|
|
288
|
+
* Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
|
|
289
|
+
*
|
|
290
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
291
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
292
|
+
*/
|
|
293
|
+
readonly durability: "session";
|
|
287
294
|
};
|
|
288
295
|
export type IZoneAnalyticsProvider = InferProvider<typeof zoneAnalyticsCapability>;
|
|
289
296
|
export { CameraOccupancySnapshotSchema as _CameraOccupancySnapshotSchema, StationaryObjectSchema, HistoryResolutionEnum, HistoryPointSchema, HistoryRangeSchema, ZoneScopeBreakdownSchema, PerScopeBreakdownSchema, };
|
|
@@ -149,5 +149,12 @@ export declare const zoneRulesCapability: {
|
|
|
149
149
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
150
150
|
}, z.core.$strip>>>;
|
|
151
151
|
}, z.core.$strip>;
|
|
152
|
+
/**
|
|
153
|
+
* Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
|
|
154
|
+
*
|
|
155
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
156
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
157
|
+
*/
|
|
158
|
+
readonly durability: "restored";
|
|
152
159
|
};
|
|
153
160
|
export type IZoneRulesProvider = InferProvider<typeof zoneRulesCapability>;
|
|
@@ -146,5 +146,12 @@ export declare const zonesCapability: {
|
|
|
146
146
|
color: z.ZodDefault<z.ZodString>;
|
|
147
147
|
}, z.core.$strip>>>;
|
|
148
148
|
}, z.core.$strip>;
|
|
149
|
+
/**
|
|
150
|
+
* Runtime-state durability: **restored** — written only on operator mutation, so a camera that never had one has nothing to re-derive from. This is the slice `zone-mirror-hydration.ts` exists to paper over.
|
|
151
|
+
*
|
|
152
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
153
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
154
|
+
*/
|
|
155
|
+
readonly durability: "restored";
|
|
149
156
|
};
|
|
150
157
|
export type IZonesProvider = InferProvider<typeof zonesCapability>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RuntimeStateDurability } from '../capabilities/capability-definition.js';
|
|
2
|
+
/** The persistence policy one capability declares for its runtime-state slice. */
|
|
3
|
+
export interface RuntimeStatePolicy {
|
|
4
|
+
/** `'restored'` slices reach disk; `'session'` slices stay in the RAM mirror. */
|
|
5
|
+
readonly durability: RuntimeStateDurability;
|
|
6
|
+
/**
|
|
7
|
+
* Clock fields — persisted, but ignored by the equality test that decides
|
|
8
|
+
* whether a write is worth a SQLite commit. Declared by the cap.
|
|
9
|
+
*/
|
|
10
|
+
readonly volatileFields: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
14
|
+
* `runtimeState`. 62 caps: 33 `restored`, 29 `session`.
|
|
15
|
+
*
|
|
16
|
+
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
17
|
+
* with `durability: 'session'` has one and has decided not to keep it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RUNTIME_STATE_POLICY: Readonly<Record<string, RuntimeStatePolicy>>;
|
|
20
|
+
/**
|
|
21
|
+
* The policy for `capName`. An UNKNOWN cap resolves to `'session'` — an
|
|
22
|
+
* addon-private slice the codegen has never seen is not persisted until its
|
|
23
|
+
* capability says so, which is the safe direction: the cost of a lost session
|
|
24
|
+
* value is a cold window, the cost of an unasked-for persist is a commit per
|
|
25
|
+
* second on the fleet's busiest write path.
|
|
26
|
+
*/
|
|
27
|
+
export declare function runtimeStatePolicyFor(capName: string): RuntimeStatePolicy;
|
|
28
|
+
/** True when this cap's slice is written to disk. */
|
|
29
|
+
export declare function isRestoredCap(capName: string): boolean;
|
|
30
|
+
/** Cap names whose slice survives a restart, sorted. */
|
|
31
|
+
export declare const RESTORED_CAP_NAMES: readonly string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -176,6 +176,8 @@ export { DEVICE_SCOPED_CAPS, isDeviceScopedCap } from './generated/device-scoped
|
|
|
176
176
|
export type { MethodAccessRecord } from './generated/method-access-map.js';
|
|
177
177
|
export { DEVICE_CAP_NAMES, KNOWN_CAP_NAMES, METHOD_ACCESS_MAP, SYSTEM_CAP_NAMES, } from './generated/method-access-map.js';
|
|
178
178
|
export { CAP_PROVIDER_KIND_MAP, getCapsByProviderKind, PROVIDER_KIND_CAP_NAMES, } from './generated/provider-kind-map.js';
|
|
179
|
+
export type { RuntimeStatePolicy } from './generated/runtime-state-durability.js';
|
|
180
|
+
export { isRestoredCap, RESTORED_CAP_NAMES, RUNTIME_STATE_POLICY, runtimeStatePolicyFor, } from './generated/runtime-state-durability.js';
|
|
179
181
|
export type { ScopePresetId, ScopePresetSpec } from './generated/scope-presets.js';
|
|
180
182
|
export { SCOPE_PRESETS } from './generated/scope-presets.js';
|
|
181
183
|
export type { SystemProxy } from './generated/system-proxy.js';
|
|
@@ -184,6 +186,7 @@ export type { AudioCodecInfo, AudioDecodeSessionConfig, AudioEncodedChunk, Audio
|
|
|
184
186
|
export type { StreamQuality } from './interfaces/device-capabilities/camera.js';
|
|
185
187
|
export { STREAM_QUALITY_LABELS, streamQualityLabel, } from './interfaces/device-capabilities/camera.js';
|
|
186
188
|
export * from './lifecycle/index.js';
|
|
189
|
+
export { audioIsFailClosed, audioLabelChoices, audioOrDefaults, isAudioLabelSelected, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, type NcAudioLabelChoice, type NcAudioPatch, normalizeAudioLabel, patchAudio, toggleAudioLabel, } from './notification/audio-condition.js';
|
|
187
190
|
export { isBaseConditionKey, knownValues, NC_BASE_CONDITION_KEYS, type NcBaseConditionKey, pickerForCondition, type TaxonomyGroup, type TaxonomyOption, type TaxonomyPicker, } from './notification/condition-taxonomy.js';
|
|
188
191
|
export { type PreparedAction, type PreparedAttachment, type PreparedNotification, prepareNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
|
|
189
192
|
export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
|