@camstack/addon-pipeline-orchestrator 1.2.19 → 1.2.21

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 (16) hide show
  1. package/assets/viewer/.viewer-version +1 -1
  2. package/assets/viewer/_expo/static/js/web/{Clipboard-bcaf1ab91b93fca55d9a5b7a5a43d491.js → Clipboard-f30792cd6631161f7b69784f7a861c6e.js} +8 -8
  3. package/assets/viewer/_expo/static/js/web/{Haptics-8bb2df81026b74be7167f490de57c48c.js → Haptics-ff8df38049eeafbac3020383c188bf0e.js} +3 -3
  4. package/assets/viewer/_expo/static/js/web/{index-828e970048ddd656c522e4d3464f529b.js → index-0e0e3d0f67eb12ed33316a2b1b89fe45.js} +62 -60
  5. package/assets/viewer/index.html +2 -2
  6. package/assets/viewer/manifest.json +1 -1
  7. package/dist/_stub.js +203 -203
  8. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BFHkpm_S.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BaL54Kt2.mjs} +2 -2
  9. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bsi65Q9q.mjs +26 -0
  10. package/dist/{_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BtNndoLO.mjs → _virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-sgTNGmJ3.mjs} +2 -2
  11. package/dist/{hostInit-C7gaLg0N.mjs → hostInit-CXzbY50s.mjs} +2 -2
  12. package/dist/index.js +244 -11
  13. package/dist/index.mjs +244 -11
  14. package/dist/remoteEntry.js +1 -1
  15. package/package.json +1 -1
  16. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BkBC1i4O.mjs +0 -26
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ node_fs = __toESM(node_fs);
29
29
  let node_path = require("node:path");
30
30
  node_path = __toESM(node_path);
31
31
  let node_url = require("node:url");
32
- //#region ../types/dist/event-category-Bz24uP1U.mjs
32
+ //#region ../types/dist/event-category-41fKf-q9.mjs
33
33
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
34
34
  EventCategory["SystemBoot"] = "system.boot";
35
35
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -89,6 +89,26 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
89
89
  */
90
90
  EventCategory["AddonRetryScheduled"] = "addon.retry-scheduled";
91
91
  /**
92
+ * A liveness invariant of this node is false — it has no devices, every
93
+ * camera is offline, or a camera that was recording has stopped producing
94
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
95
+ * `findingId` is stable across ticks), only after its boot grace period.
96
+ * AlertCenter raises a persistent operator-visible alert.
97
+ *
98
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
99
+ * and zero recordings while every surface stayed quiet.
100
+ *
101
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
102
+ */
103
+ EventCategory["SystemLivenessFailed"] = "system.liveness-failed";
104
+ /**
105
+ * A previously reported liveness fault is true again. AlertCenter dismisses
106
+ * the matching `SystemLivenessFailed` alert.
107
+ *
108
+ * Payload: `{ findingId }`.
109
+ */
110
+ EventCategory["SystemLivenessRecovered"] = "system.liveness-recovered";
111
+ /**
92
112
  * Monitor is attempting to reload a failed addon NOW. UI uses this
93
113
  * to show a spinner during the retry attempt. Same transient nature
94
114
  * as AddonRetryScheduled.
@@ -9712,11 +9732,13 @@ var NcZoneConditionSchema = object({
9712
9732
  /** Quantifier over `ids` — at least one / every one visited. */
9713
9733
  match: _enum(["any", "all"]).default("any")
9714
9734
  });
9715
- /**
9716
- * The P1 condition set — a flat AND of groups; absent group = pass;
9717
- * membership lists are OR within the list (spec §2.3).
9718
- */
9719
9735
  var NcConditionsSchema = object({
9736
+ /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
9737
+ deviceState: object({
9738
+ deviceId: number().int(),
9739
+ /** Any of these matches. */
9740
+ states: array(string().min(1)).min(1)
9741
+ }).optional(),
9720
9742
  /** Device scope — absent = all devices. */
9721
9743
  devices: array(number()).optional(),
9722
9744
  /** Detector class names (any overlap with the record's class set). */
@@ -9917,6 +9939,14 @@ var NcMediaPolicySchema = object({
9917
9939
  clipPreRollSec: number().int().min(0).max(30).optional(),
9918
9940
  clipPostRollSec: number().int().min(0).max(30).optional(),
9919
9941
  /**
9942
+ * Playback rate of the attached gif / clip. Absent = 2x.
9943
+ *
9944
+ * A notification clip is GLANCED at on a lock screen, not watched: at real
9945
+ * time an eight-second passage is eight seconds of the recipient's attention
9946
+ * and twice the bytes. 1 is real time for the operator who wants it.
9947
+ */
9948
+ clipSpeed: number().min(1).max(8).optional(),
9949
+ /**
9920
9950
  * Which stream profile the footage is cut from. Absent = the CHEAPEST
9921
9951
  * assigned profile: a notification is watched on a phone, so the 4K
9922
9952
  * rendition would burn CPU to produce a file the client downscales anyway.
@@ -9988,7 +10018,21 @@ var NcRuleInputSchema = object({
9988
10018
  * behaviour, visible to all, read-only in the viewer). Present = personal
9989
10019
  * rule owned by this userId. Server-stamped; never trusted from a client.
9990
10020
  */
9991
- ownerUserId: string().optional()
10021
+ ownerUserId: string().optional(),
10022
+ /**
10023
+ * May a non-admin snooze this rule for EVERYONE, not just themselves?
10024
+ *
10025
+ * A snooze is personal by default — it silences the person who set it. This
10026
+ * opts THIS rule into the "the gardener is here all afternoon" case, where
10027
+ * silencing the camera for the whole household is legitimate. It silences
10028
+ * other people, so it is off unless a rule deliberately allows it.
10029
+ *
10030
+ * `.optional()`, deliberately NOT `.default()`: a Zod default does not run on
10031
+ * the addon cap path (three production failures in one day), so absent is
10032
+ * read as `false` by {@link canSetGlobal} in the engine. Admins are not bound
10033
+ * by this flag — see the scope rules on that function.
10034
+ */
10035
+ snoozeAllowGlobal: boolean().optional()
9992
10036
  });
9993
10037
  /**
9994
10038
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -10059,7 +10103,8 @@ var NcConditionDescriptorSchema = object({
10059
10103
  "packagePhase",
10060
10104
  "crossingSelect",
10061
10105
  "polygonDraw",
10062
- "occupancy"
10106
+ "occupancy",
10107
+ "deviceState"
10063
10108
  ]),
10064
10109
  operator: _enum([
10065
10110
  "in",
@@ -10073,7 +10118,28 @@ var NcConditionDescriptorSchema = object({
10073
10118
  /** Which delivery kinds the condition applies to. */
10074
10119
  appliesTo: array(NcDeliverySchema),
10075
10120
  phase: string(),
10076
- description: string().optional()
10121
+ description: string().optional(),
10122
+ /**
10123
+ * The CHOICES for a single-choice widget (`sourceSelect`, `crossingSelect`,
10124
+ * `packagePhase`, …), served with the descriptor.
10125
+ *
10126
+ * Before this the descriptor said which widget to render and not what to put
10127
+ * in it, so every option list lived in three places: this file's enums, the
10128
+ * admin's `NC_*_OPTIONS` and the viewer's `NC_*_VALUES`. That triple mirror
10129
+ * is the drift that emptied the viewer's rule editor on 2026-08-04 — the app
10130
+ * mirrors the cap by hand, so it is only ever as current as its last build.
10131
+ *
10132
+ * With the options on the wire, a condition of an EXISTING `valueType` costs
10133
+ * zero client changes. Clients keep a local fallback for an older hub that
10134
+ * does not send them; absent here is "use your own list", not "no choices".
10135
+ */
10136
+ options: array(object({
10137
+ /** Written to the rule verbatim. `''` means the ABSENT state. */
10138
+ value: string(),
10139
+ label: string(),
10140
+ /** What THIS choice matches — shown one at a time, under the control. */
10141
+ hint: string().optional()
10142
+ })).readonly().optional()
10077
10143
  });
10078
10144
  /**
10079
10145
  * The delivery lifecycle status of a history row — a straight read of the
@@ -10158,6 +10224,74 @@ var NcHistoryFilterSchema = object({
10158
10224
  until: number().optional(),
10159
10225
  limit: number().int().min(1).max(500).default(100)
10160
10226
  });
10227
+ /**
10228
+ * What a snooze covers. Broader scopes win when several overlap, so one window
10229
+ * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
10230
+ * summarising the same silence.
10231
+ */
10232
+ var NcSnoozeScopeSchema = _enum([
10233
+ "rule",
10234
+ "device",
10235
+ "all"
10236
+ ]);
10237
+ /**
10238
+ * Client-authored snooze. The server stamps `userId`, `startedAt` and
10239
+ * `expiresAt` — a DURATION is sent rather than an instant so a client with a
10240
+ * skewed clock cannot author a window that is already over, or never ends.
10241
+ */
10242
+ var NcSnoozeInputSchema = object({
10243
+ scope: NcSnoozeScopeSchema,
10244
+ /** Required when `scope: 'rule'` — a scoped snooze with no id matches
10245
+ * NOTHING rather than degrading to "everything". */
10246
+ ruleId: string().optional(),
10247
+ /** Required when `scope: 'device'`. */
10248
+ deviceId: number().int().optional(),
10249
+ durationMinutes: number().int().min(1).max(1440),
10250
+ /**
10251
+ * Silence this for EVERY recipient, not just the caller. Permission is
10252
+ * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
10253
+ * broader scopes). Absent = personal.
10254
+ */
10255
+ global: boolean().optional(),
10256
+ /**
10257
+ * Deliver a summary of what was suppressed when the window ends. Absent =
10258
+ * ON: someone silencing a nuisance camera wants it off, someone silencing a
10259
+ * SECURITY camera wants to know what they missed, and choosing "off" for
10260
+ * everybody is how a snooze becomes an outage. Resolved to a concrete
10261
+ * boolean by the server at create time — never left to a Zod default, which
10262
+ * does not run on the addon cap path.
10263
+ */
10264
+ summary: boolean().optional()
10265
+ });
10266
+ /** A persisted snooze window. */
10267
+ var NcSnoozeSchema = object({
10268
+ id: string(),
10269
+ /** Who set it. Also who it silences, unless `global`. */
10270
+ userId: string(),
10271
+ scope: NcSnoozeScopeSchema,
10272
+ ruleId: string().optional(),
10273
+ deviceId: number().int().optional(),
10274
+ startedAt: number(),
10275
+ /** Exclusive: at exactly this instant the snooze is over. Expiry is a
10276
+ * COMPARISON, not a job — no sweeper can leave the operator silenced. */
10277
+ expiresAt: number(),
10278
+ global: boolean(),
10279
+ summary: boolean(),
10280
+ /** When the end-of-window digest went out. Absent = not sent (yet, or the
10281
+ * window has not closed, or `summary` is false). */
10282
+ digestSentAt: number().optional()
10283
+ });
10284
+ object({
10285
+ snoozeId: string(),
10286
+ targetId: string(),
10287
+ ruleId: string(),
10288
+ ruleName: string(),
10289
+ deviceId: number().int(),
10290
+ /** How many notifications this snooze hid for that pair. */
10291
+ count: number().int(),
10292
+ firstAt: number(),
10293
+ lastAt: number()
10294
+ });
10161
10295
  method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
10162
10296
  kind: "mutation",
10163
10297
  auth: "admin",
@@ -10187,7 +10321,13 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
10187
10321
  }), method(object({}), object({
10188
10322
  catalog: array(NcConditionDescriptorSchema),
10189
10323
  taxonomy: NcTaxonomySchema.optional()
10190
- })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
10324
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
10325
+ kind: "mutation",
10326
+ caller: "required"
10327
+ }), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
10328
+ kind: "mutation",
10329
+ caller: "required"
10330
+ });
10191
10331
  /**
10192
10332
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
10193
10333
  *
@@ -10935,7 +11075,15 @@ method(object({
10935
11075
  format: _enum(["gif", "mp4"]).default("gif"),
10936
11076
  maxWidth: number().int().min(120).max(1920).default(480),
10937
11077
  /** GIF only — MP4 keeps the source cadence. */
10938
- fps: number().int().min(1).max(15).default(5)
11078
+ fps: number().int().min(1).max(15).default(5),
11079
+ /**
11080
+ * Playback rate. A notification clip is GLANCED at on a lock screen,
11081
+ * not watched, so 2x is the default: the recipient sees the whole
11082
+ * passage in half the time and the GIF is half the bytes. `1` is real
11083
+ * time. Applies to MP4 as well — the operator set a speed, not a GIF
11084
+ * speed.
11085
+ */
11086
+ speed: number().min(1).max(8).default(2)
10939
11087
  }), object({
10940
11088
  base64: string(),
10941
11089
  mime: string(),
@@ -16133,6 +16281,20 @@ var QueryFilterSchema = object({
16133
16281
  limit: number().optional(),
16134
16282
  offset: number().optional()
16135
16283
  });
16284
+ /**
16285
+ * The predicate half of a filter, for BULK MUTATIONS.
16286
+ *
16287
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
16288
+ * meaning for a statement that rewrites a set, and accepting them would invite
16289
+ * a caller to believe `limit` bounds the damage. Every field is optional here
16290
+ * only so the shape stays composable — the implementation REJECTS a filter
16291
+ * that compiles to no predicate, because that is the whole collection.
16292
+ */
16293
+ var MutationFilterSchema = object({
16294
+ where: record(string(), unknown()).optional(),
16295
+ whereIn: record(string(), array(unknown())).optional(),
16296
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
16297
+ });
16136
16298
  /** A single stored record: `{ id, data }`. */
16137
16299
  var SettingsRecordSchema = object({
16138
16300
  id: string(),
@@ -16158,7 +16320,18 @@ var CollectionColumnSchema = object({
16158
16320
  ]),
16159
16321
  primaryKey: boolean().optional(),
16160
16322
  notNull: boolean().optional(),
16161
- unique: boolean().optional()
16323
+ unique: boolean().optional(),
16324
+ /**
16325
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
16326
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
16327
+ * collection surface simply cannot express their existing tables — which is
16328
+ * why they were still on the uncapped `table*` API.
16329
+ */
16330
+ defaultValue: union([
16331
+ string(),
16332
+ number(),
16333
+ boolean()
16334
+ ]).optional()
16162
16335
  });
16163
16336
  var CollectionIndexSchema = object({
16164
16337
  name: string(),
@@ -16192,6 +16365,15 @@ method(object({
16192
16365
  collection: string(),
16193
16366
  key: string()
16194
16367
  }), _void(), { kind: "mutation" }), method(object({
16368
+ namespace: string().optional(),
16369
+ collection: string(),
16370
+ filter: MutationFilterSchema
16371
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
16372
+ namespace: string().optional(),
16373
+ collection: string(),
16374
+ filter: MutationFilterSchema,
16375
+ data: record(string(), unknown())
16376
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
16195
16377
  namespace: string().optional(),
16196
16378
  collection: string(),
16197
16379
  filter: QueryFilterSchema.optional()
@@ -16258,6 +16440,15 @@ method(_void(), EngineInfoSchema), method(object({
16258
16440
  collection: string(),
16259
16441
  key: string()
16260
16442
  }), _void(), { kind: "mutation" }), method(object({
16443
+ namespace: string().optional(),
16444
+ collection: string(),
16445
+ filter: MutationFilterSchema
16446
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
16447
+ namespace: string().optional(),
16448
+ collection: string(),
16449
+ filter: MutationFilterSchema,
16450
+ data: record(string(), unknown())
16451
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
16261
16452
  namespace: string().optional(),
16262
16453
  collection: string(),
16263
16454
  filter: QueryFilterSchema.optional()
@@ -23788,6 +23979,12 @@ Object.freeze({
23788
23979
  addonId: null,
23789
23980
  access: "delete"
23790
23981
  },
23982
+ "dataStoreProvider.deleteWhere": {
23983
+ capName: "data-store-provider",
23984
+ capScope: "system",
23985
+ addonId: null,
23986
+ access: "delete"
23987
+ },
23791
23988
  "dataStoreProvider.get": {
23792
23989
  capName: "data-store-provider",
23793
23990
  capScope: "system",
@@ -23836,6 +24033,12 @@ Object.freeze({
23836
24033
  addonId: null,
23837
24034
  access: "create"
23838
24035
  },
24036
+ "dataStoreProvider.updateWhere": {
24037
+ capName: "data-store-provider",
24038
+ capScope: "system",
24039
+ addonId: null,
24040
+ access: "create"
24041
+ },
23839
24042
  "dayNight.getOptions": {
23840
24043
  capName: "day-night",
23841
24044
  capScope: "device",
@@ -25630,12 +25833,24 @@ Object.freeze({
25630
25833
  addonId: null,
25631
25834
  access: "create"
25632
25835
  },
25836
+ "notificationRules.cancelSnooze": {
25837
+ capName: "notification-rules",
25838
+ capScope: "system",
25839
+ addonId: null,
25840
+ access: "create"
25841
+ },
25633
25842
  "notificationRules.createRule": {
25634
25843
  capName: "notification-rules",
25635
25844
  capScope: "system",
25636
25845
  addonId: null,
25637
25846
  access: "create"
25638
25847
  },
25848
+ "notificationRules.createSnooze": {
25849
+ capName: "notification-rules",
25850
+ capScope: "system",
25851
+ addonId: null,
25852
+ access: "create"
25853
+ },
25639
25854
  "notificationRules.deleteRule": {
25640
25855
  capName: "notification-rules",
25641
25856
  capScope: "system",
@@ -25666,6 +25881,12 @@ Object.freeze({
25666
25881
  addonId: null,
25667
25882
  access: "view"
25668
25883
  },
25884
+ "notificationRules.listSnoozes": {
25885
+ capName: "notification-rules",
25886
+ capScope: "system",
25887
+ addonId: null,
25888
+ access: "view"
25889
+ },
25669
25890
  "notificationRules.setRuleEnabled": {
25670
25891
  capName: "notification-rules",
25671
25892
  capScope: "system",
@@ -26914,6 +27135,12 @@ Object.freeze({
26914
27135
  addonId: null,
26915
27136
  access: "delete"
26916
27137
  },
27138
+ "settingsStore.deleteWhere": {
27139
+ capName: "settings-store",
27140
+ capScope: "system",
27141
+ addonId: null,
27142
+ access: "delete"
27143
+ },
26917
27144
  "settingsStore.get": {
26918
27145
  capName: "settings-store",
26919
27146
  capScope: "system",
@@ -26956,6 +27183,12 @@ Object.freeze({
26956
27183
  addonId: null,
26957
27184
  access: "create"
26958
27185
  },
27186
+ "settingsStore.updateWhere": {
27187
+ capName: "settings-store",
27188
+ capScope: "system",
27189
+ addonId: null,
27190
+ access: "create"
27191
+ },
26959
27192
  "smtpProvider.getStatus": {
26960
27193
  capName: "smtp-provider",
26961
27194
  capScope: "system",