@camstack/types 1.2.22 → 1.2.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-mkNQLVPE.js");
3
- const require_event_category = require("./event-category-39bpf1r_.js");
2
+ const require_sleep = require("./sleep-CI7DYokZ.js");
3
+ const require_event_category = require("./event-category-BE4PDZ_3.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/collection-array-methods.ts
6
6
  /**
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { A as parseJsonUnknown, Ct as DisposerChain, D as asString, F as ReadinessRegistry, I as ReadinessTimeoutError, M as nodePin, N as readNodePin, P as DATAPLANE_SECRET_HEADER, S as DeviceType, T as asJsonObject, a as viewerUiCapability, dt as BaseAddon, ft as normalizeAddonInitResult, ht as emitReadiness, i as deviceOpsCapability, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep, z as scopeKey } from "./sleep-BYyv9gUM.mjs";
2
- import { t as EventCategory } from "./event-category-Bz24uP1U.mjs";
1
+ import { A as parseJsonUnknown, Ct as DisposerChain, D as asString, F as ReadinessRegistry, I as ReadinessTimeoutError, M as nodePin, N as readNodePin, P as DATAPLANE_SECRET_HEADER, S as DeviceType, T as asJsonObject, a as viewerUiCapability, dt as BaseAddon, ft as normalizeAddonInitResult, ht as emitReadiness, i as deviceOpsCapability, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep, z as scopeKey } from "./sleep-D60ITzpD.mjs";
2
+ import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/collection-array-methods.ts
5
5
  /**
@@ -201,6 +201,7 @@ export declare const dataStoreProviderCapability: {
201
201
  primaryKey: z.ZodOptional<z.ZodBoolean>;
202
202
  notNull: z.ZodOptional<z.ZodBoolean>;
203
203
  unique: z.ZodOptional<z.ZodBoolean>;
204
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
204
205
  }, z.core.$strip>>>;
205
206
  indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
206
207
  name: z.ZodString;
@@ -57,6 +57,7 @@ declare const CollectionColumnSchema: z.ZodObject<{
57
57
  primaryKey: z.ZodOptional<z.ZodBoolean>;
58
58
  notNull: z.ZodOptional<z.ZodBoolean>;
59
59
  unique: z.ZodOptional<z.ZodBoolean>;
60
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
60
61
  }, z.core.$strip>;
61
62
  declare const CollectionIndexSchema: z.ZodObject<{
62
63
  name: z.ZodString;
@@ -276,6 +277,7 @@ export declare const settingsStoreCapability: {
276
277
  primaryKey: z.ZodOptional<z.ZodBoolean>;
277
278
  notNull: z.ZodOptional<z.ZodBoolean>;
278
279
  unique: z.ZodOptional<z.ZodBoolean>;
280
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
279
281
  }, z.core.$strip>>>;
280
282
  indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
281
283
  name: z.ZodString;
@@ -56,6 +56,26 @@ export declare enum EventCategory {
56
56
  * countdown on the Addons page row, NOT persisted as an alert.
57
57
  */
58
58
  AddonRetryScheduled = "addon.retry-scheduled",
59
+ /**
60
+ * A liveness invariant of this node is false — it has no devices, every
61
+ * camera is offline, or a camera that was recording has stopped producing
62
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
63
+ * `findingId` is stable across ticks), only after its boot grace period.
64
+ * AlertCenter raises a persistent operator-visible alert.
65
+ *
66
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
67
+ * and zero recordings while every surface stayed quiet.
68
+ *
69
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
70
+ */
71
+ SystemLivenessFailed = "system.liveness-failed",
72
+ /**
73
+ * A previously reported liveness fault is true again. AlertCenter dismisses
74
+ * the matching `SystemLivenessFailed` alert.
75
+ *
76
+ * Payload: `{ findingId }`.
77
+ */
78
+ SystemLivenessRecovered = "system.liveness-recovered",
59
79
  /**
60
80
  * Monitor is attempting to reload a failed addon NOW. UI uses this
61
81
  * to show a spinner during the retry attempt. Same transient nature
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-39bpf1r_.js");
2
+ const require_event_category = require("./event-category-BE4PDZ_3.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-Bz24uP1U.mjs";
1
+ import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -58,6 +58,26 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
58
58
  */
59
59
  EventCategory["AddonRetryScheduled"] = "addon.retry-scheduled";
60
60
  /**
61
+ * A liveness invariant of this node is false — it has no devices, every
62
+ * camera is offline, or a camera that was recording has stopped producing
63
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
64
+ * `findingId` is stable across ticks), only after its boot grace period.
65
+ * AlertCenter raises a persistent operator-visible alert.
66
+ *
67
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
68
+ * and zero recordings while every surface stayed quiet.
69
+ *
70
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
71
+ */
72
+ EventCategory["SystemLivenessFailed"] = "system.liveness-failed";
73
+ /**
74
+ * A previously reported liveness fault is true again. AlertCenter dismisses
75
+ * the matching `SystemLivenessFailed` alert.
76
+ *
77
+ * Payload: `{ findingId }`.
78
+ */
79
+ EventCategory["SystemLivenessRecovered"] = "system.liveness-recovered";
80
+ /**
61
81
  * Monitor is attempting to reload a failed addon NOW. UI uses this
62
82
  * to show a spinner during the retry attempt. Same transient nature
63
83
  * as AddonRetryScheduled.
@@ -58,6 +58,26 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
58
58
  */
59
59
  EventCategory["AddonRetryScheduled"] = "addon.retry-scheduled";
60
60
  /**
61
+ * A liveness invariant of this node is false — it has no devices, every
62
+ * camera is offline, or a camera that was recording has stopped producing
63
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
64
+ * `findingId` is stable across ticks), only after its boot grace period.
65
+ * AlertCenter raises a persistent operator-visible alert.
66
+ *
67
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
68
+ * and zero recordings while every surface stayed quiet.
69
+ *
70
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
71
+ */
72
+ EventCategory["SystemLivenessFailed"] = "system.liveness-failed";
73
+ /**
74
+ * A previously reported liveness fault is true again. AlertCenter dismisses
75
+ * the matching `SystemLivenessFailed` alert.
76
+ *
77
+ * Payload: `{ findingId }`.
78
+ */
79
+ EventCategory["SystemLivenessRecovered"] = "system.liveness-recovered";
80
+ /**
61
81
  * Monitor is attempting to reload a failed addon NOW. UI uses this
62
82
  * to show a spinner during the retry attempt. Same transient nature
63
83
  * as AddonRetryScheduled.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-mkNQLVPE.js");
3
- const require_event_category = require("./event-category-39bpf1r_.js");
2
+ const require_sleep = require("./sleep-CI7DYokZ.js");
3
+ const require_event_category = require("./event-category-BE4PDZ_3.js");
4
4
  const require_enums = require("./enums.js");
5
5
  const require_err_msg = require("./err-msg-COpsHMw2.js");
6
6
  let zod = require("zod");
@@ -17480,7 +17480,18 @@ var CollectionColumnSchema = zod.z.object({
17480
17480
  ]),
17481
17481
  primaryKey: zod.z.boolean().optional(),
17482
17482
  notNull: zod.z.boolean().optional(),
17483
- unique: zod.z.boolean().optional()
17483
+ unique: zod.z.boolean().optional(),
17484
+ /**
17485
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
17486
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
17487
+ * collection surface simply cannot express their existing tables — which is
17488
+ * why they were still on the uncapped `table*` API.
17489
+ */
17490
+ defaultValue: zod.z.union([
17491
+ zod.z.string(),
17492
+ zod.z.number(),
17493
+ zod.z.boolean()
17494
+ ]).optional()
17484
17495
  });
17485
17496
  var CollectionIndexSchema = zod.z.object({
17486
17497
  name: zod.z.string(),
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as ProfileSlotSchema, A as parseJsonUnknown, B as BrokerStatsSchema, C as asBoolean, Ct as DisposerChain, D as asString, E as asNumber, F as ReadinessRegistry, G as CamStreamResolutionSchema, H as CAM_PROFILE_ORDER, I as ReadinessTimeoutError, J as DecodedFrameSchema, K as CameraStreamSchema, L as emitDownForOwnedCaps, M as nodePin, N as readNodePin, O as parseJsonArray, P as DATAPLANE_SECRET_HEADER, Q as ProfileRtspEntrySchema, R as readinessKey, S as DeviceType, St as resolveHydratedFieldValue, T as asJsonObject, U as CamProfileSchema, V as BrokerStatusSchema, W as CamStreamKindSchema, X as FrameHandleFormatSchema, Y as EncodedPacketSchema, Z as FrameHandleSchema, _ as resolveCapMount, _t as WELL_KNOWN_TABS, a as viewerUiCapability, at as SubscribeFramesInputSchema, b as DeviceFeature, bt as collectHydratedFieldValues, c as createLazyTrpcSource, ct as makeSourceBrokerId, d as DEVICE_SETTINGS_CONTRIBUTION_METHODS, dt as BaseAddon, et as ProfileSlotStatusSchema, f as DEVICE_STATUS_METHOD, ft as normalizeAddonInitResult, g as method, gt as isEvent, h as isDeviceConfigCap, ht as emitReadiness, i as deviceOpsCapability, it as SubscribeAudioChunksResultSchema, j as CAP_NODE_PIN_CONTEXT_KEY, k as parseJsonObject, l as createMirrorSource, lt as parseProfileBrokerId, m as expandCapMethods, mt as createEvent, n as sleepCancellable, nt as StreamSourceSchema, o as adminUiCapability, ot as SubscribeFramesResultSchema, p as event, pt as createDurableState, q as DecodedAudioChunkSchema, r as RawStateResultSchema, rt as SubscribeAudioChunksInputSchema, s as createDeviceProxy, st as makeProfileBrokerId, t as sleep, tt as StreamSourceEntrySchema, u as createSliceHandle, ut as selectAssignedProfileSlots, v as systemMethod, vt as WELL_KNOWN_TAB_MAP, w as asJsonArray, x as DeviceRole, xt as hydrateSchema, y as ChargingStatus, yt as collectHydratedFieldEntries, z as scopeKey } from "./sleep-BYyv9gUM.mjs";
2
- import { t as EventCategory } from "./event-category-Bz24uP1U.mjs";
1
+ import { $ as ProfileSlotSchema, A as parseJsonUnknown, B as BrokerStatsSchema, C as asBoolean, Ct as DisposerChain, D as asString, E as asNumber, F as ReadinessRegistry, G as CamStreamResolutionSchema, H as CAM_PROFILE_ORDER, I as ReadinessTimeoutError, J as DecodedFrameSchema, K as CameraStreamSchema, L as emitDownForOwnedCaps, M as nodePin, N as readNodePin, O as parseJsonArray, P as DATAPLANE_SECRET_HEADER, Q as ProfileRtspEntrySchema, R as readinessKey, S as DeviceType, St as resolveHydratedFieldValue, T as asJsonObject, U as CamProfileSchema, V as BrokerStatusSchema, W as CamStreamKindSchema, X as FrameHandleFormatSchema, Y as EncodedPacketSchema, Z as FrameHandleSchema, _ as resolveCapMount, _t as WELL_KNOWN_TABS, a as viewerUiCapability, at as SubscribeFramesInputSchema, b as DeviceFeature, bt as collectHydratedFieldValues, c as createLazyTrpcSource, ct as makeSourceBrokerId, d as DEVICE_SETTINGS_CONTRIBUTION_METHODS, dt as BaseAddon, et as ProfileSlotStatusSchema, f as DEVICE_STATUS_METHOD, ft as normalizeAddonInitResult, g as method, gt as isEvent, h as isDeviceConfigCap, ht as emitReadiness, i as deviceOpsCapability, it as SubscribeAudioChunksResultSchema, j as CAP_NODE_PIN_CONTEXT_KEY, k as parseJsonObject, l as createMirrorSource, lt as parseProfileBrokerId, m as expandCapMethods, mt as createEvent, n as sleepCancellable, nt as StreamSourceSchema, o as adminUiCapability, ot as SubscribeFramesResultSchema, p as event, pt as createDurableState, q as DecodedAudioChunkSchema, r as RawStateResultSchema, rt as SubscribeAudioChunksInputSchema, s as createDeviceProxy, st as makeProfileBrokerId, t as sleep, tt as StreamSourceEntrySchema, u as createSliceHandle, ut as selectAssignedProfileSlots, v as systemMethod, vt as WELL_KNOWN_TAB_MAP, w as asJsonArray, x as DeviceRole, xt as hydrateSchema, y as ChargingStatus, yt as collectHydratedFieldEntries, z as scopeKey } from "./sleep-D60ITzpD.mjs";
2
+ import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
3
3
  import { EventSourceType } from "./enums.mjs";
4
4
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
5
5
  import { z } from "zod";
@@ -17479,7 +17479,18 @@ var CollectionColumnSchema = z.object({
17479
17479
  ]),
17480
17480
  primaryKey: z.boolean().optional(),
17481
17481
  notNull: z.boolean().optional(),
17482
- unique: z.boolean().optional()
17482
+ unique: z.boolean().optional(),
17483
+ /**
17484
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
17485
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
17486
+ * collection surface simply cannot express their existing tables — which is
17487
+ * why they were still on the uncapped `table*` API.
17488
+ */
17489
+ defaultValue: z.union([
17490
+ z.string(),
17491
+ z.number(),
17492
+ z.boolean()
17493
+ ]).optional()
17483
17494
  });
17484
17495
  var CollectionIndexSchema = z.object({
17485
17496
  name: z.string(),
@@ -537,6 +537,22 @@ export interface EventCatalog {
537
537
  'system.restarting': PendingRestartMarkerPayload;
538
538
  'system.restart-completed': PendingRestartMarkerPayload;
539
539
  'system.ready-state': SystemReadyStatePayload;
540
+ /**
541
+ * A liveness invariant of this node is false. `findingId` is stable across
542
+ * ticks, so AlertCenter keys one persistent alert on it rather than raising
543
+ * a new one every check. See the `liveness-monitor` builtin.
544
+ */
545
+ 'system.liveness-failed': {
546
+ findingId: string;
547
+ severity: 'error' | 'warning';
548
+ title: string;
549
+ message: string;
550
+ deviceId?: number;
551
+ };
552
+ /** The invariant behind `findingId` holds again; the alert is dismissed. */
553
+ 'system.liveness-recovered': {
554
+ findingId: string;
555
+ };
540
556
  'addon.started': {
541
557
  addonId: string;
542
558
  packageName?: string;
@@ -142,20 +142,6 @@ export interface ISettingsBackend {
142
142
  columns: readonly import('../capabilities/settings-store.cap.js').CollectionColumn[];
143
143
  indexes?: readonly import('../capabilities/settings-store.cap.js').CollectionIndex[];
144
144
  }): Promise<void>;
145
- /** Ensure a structured table exists (CREATE TABLE IF NOT EXISTS) */
146
- ensureTable?(table: string, schema: TableSchema): Promise<void>;
147
- /** Insert a row into a structured table */
148
- tableInsert?(table: string, row: Record<string, unknown>): Promise<void>;
149
- /** Update rows matching a filter */
150
- tableUpdate?(table: string, filter: Record<string, unknown>, updates: Record<string, unknown>): Promise<number>;
151
- /** Delete rows matching a filter. Returns count of deleted rows. */
152
- tableDelete?(table: string, filter: Record<string, unknown>): Promise<number>;
153
- /** Query rows from a structured table */
154
- tableQuery?(table: string, options?: TableQueryOptions): Promise<readonly Record<string, unknown>[]>;
155
- /** Get a single row by primary key or filter */
156
- tableGet?(table: string, filter: Record<string, unknown>): Promise<Record<string, unknown> | null>;
157
- /** Count rows matching a filter */
158
- tableCount?(table: string, filter?: Record<string, unknown>): Promise<number>;
159
145
  }
160
146
  export interface SettingsRecord<T extends object = Record<string, unknown>> {
161
147
  readonly id: string;
@@ -205,16 +191,6 @@ export interface TableIndexSchema {
205
191
  readonly columns: readonly string[];
206
192
  readonly unique?: boolean;
207
193
  }
208
- /** Query options for structured tables */
209
- export interface TableQueryOptions {
210
- readonly where?: Record<string, unknown>;
211
- readonly orderBy?: {
212
- field: string;
213
- direction: 'asc' | 'desc';
214
- };
215
- readonly limit?: number;
216
- readonly offset?: number;
217
- }
218
194
  /**
219
195
  * Embeddings backend — vector storage with approximate nearest neighbor search.
220
196
  * Used for CLIP frame search, face recognition, plate matching.
@@ -1,4 +1,4 @@
1
- const require_event_category = require("./event-category-39bpf1r_.js");
1
+ const require_event_category = require("./event-category-BE4PDZ_3.js");
2
2
  let zod = require("zod");
3
3
  //#region src/disposer-chain.ts
4
4
  var DisposerChain = class {
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-Bz24uP1U.mjs";
1
+ import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/disposer-chain.ts
4
4
  var DisposerChain = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.22",
3
+ "version": "1.2.24",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",