@camstack/addon-agent-ui 1.2.154 → 1.2.155

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 (2) hide show
  1. package/dist/addon.js +138 -49
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5371,7 +5371,7 @@ var ZodIssueCode = {
5371
5371
  var ZodFirstPartyTypeKind;
5372
5372
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5373
5373
  //#endregion
5374
- //#region ../types/dist/sleep-jkRQgtSc.mjs
5374
+ //#region ../types/dist/sleep-DlrgY4Qb.mjs
5375
5375
  /**
5376
5376
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5377
5377
  * window to float samples (D455).
@@ -6927,6 +6927,10 @@ var ProfileRtspEntrySchema = object({
6927
6927
  codec: string().optional(),
6928
6928
  resolution: CamStreamResolutionSchema.optional()
6929
6929
  });
6930
+ object({
6931
+ field: string().min(1),
6932
+ on: literal("advance")
6933
+ });
6930
6934
  /**
6931
6935
  * Output schema shared by the contribution + live methods.
6932
6936
  *
@@ -7414,7 +7418,43 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7414
7418
  return DeviceRole;
7415
7419
  }({});
7416
7420
  //#endregion
7417
- //#region ../types/dist/composition-CPFIlFfw.mjs
7421
+ //#region ../types/dist/composition-BK-GTFYb.mjs
7422
+ /**
7423
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7424
+ * valutatore puro del suo FRONTE.
7425
+ *
7426
+ * Viveva dentro il builtin virtual-doorbell
7427
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7428
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7429
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7430
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7431
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7432
+ * SPOSTA qui e il doorbell la ri-esporta.
7433
+ *
7434
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7435
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7436
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7437
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7438
+ */
7439
+ /**
7440
+ * Known binary / switch source caps → the boolean slice field whose
7441
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
7442
+ * Sensors whose "active" reading is not a plain boolean (presence's string
7443
+ * state, connectivity's connected flag) are deliberately excluded — a
7444
+ * reconnect is not a doorbell press, and it is not a recording either.
7445
+ */
7446
+ var SOURCE_CAP_ACTIVE_FIELD = {
7447
+ contact: "entryOpen",
7448
+ binary: "on",
7449
+ switch: "on",
7450
+ motion: "detected",
7451
+ flood: "flooded",
7452
+ gas: "detected",
7453
+ smoke: "detected",
7454
+ "carbon-monoxide": "detected",
7455
+ vibration: "detected",
7456
+ tamper: "tampered"
7457
+ };
7418
7458
  /**
7419
7459
  * Error types for the safe expression engine. Two distinct classes so callers
7420
7460
  * can tell a compile-time (grammar) failure from a runtime (evaluation)
@@ -7612,6 +7652,20 @@ var table = {
7612
7652
  const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
7613
7653
  return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
7614
7654
  }
7655
+ },
7656
+ rose: {
7657
+ minArgs: 2,
7658
+ maxArgs: 3,
7659
+ apply: () => {
7660
+ throw new ExpressionEvalError("rose: stateful evaluation context is required");
7661
+ }
7662
+ },
7663
+ count: {
7664
+ minArgs: 1,
7665
+ maxArgs: 1,
7666
+ apply: () => {
7667
+ throw new ExpressionEvalError("count: stateful evaluation context is required");
7668
+ }
7615
7669
  }
7616
7670
  };
7617
7671
  Object.freeze(Object.assign(Object.create(null), table));
@@ -8126,6 +8180,7 @@ var CompositionItemEntrySchema = object({
8126
8180
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
8127
8181
  kind: literal("fields"),
8128
8182
  cap: string().min(1),
8183
+ enabled: boolean().optional(),
8129
8184
  fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
8130
8185
  /**
8131
8186
  * Items of the cap's item array, keyed by item key (D663). Naming `items`
@@ -8137,6 +8192,7 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
8137
8192
  }), object({
8138
8193
  kind: literal("passthrough"),
8139
8194
  cap: string().min(1),
8195
+ enabled: boolean().optional(),
8140
8196
  source: CompositionSourceRefSchema
8141
8197
  })]);
8142
8198
  var CompositionSchema = object({
@@ -12770,6 +12826,15 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
12770
12826
  }),
12771
12827
  lastChangedAt: number()
12772
12828
  });
12829
+ EventCategory.DoorbellOnPressed;
12830
+ var CompositionEventPlanSchema = object({
12831
+ featureIndex: number().int().nonnegative(),
12832
+ cap: string(),
12833
+ eventName: string(),
12834
+ category: _enum(EventCategory),
12835
+ stateField: string(),
12836
+ fieldKey: string()
12837
+ });
12773
12838
  /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
12774
12839
  var CompositionProblemSchema = object({
12775
12840
  code: _enum([
@@ -12819,12 +12884,14 @@ var CompositionUnavailableModeSchema = _enum([
12819
12884
  ]);
12820
12885
  /**
12821
12886
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
12822
- * field of its cap changes value · `constant` reads nothing, computed once.
12887
+ * field of its cap changes value · `constant` reads nothing, computed once ·
12888
+ * `accumulator` advances from the target's seed/current output.
12823
12889
  */
12824
12890
  var CompositionFieldRoleSchema = _enum([
12825
12891
  "derived",
12826
12892
  "clock",
12827
- "constant"
12893
+ "constant",
12894
+ "accumulator"
12828
12895
  ]);
12829
12896
  /** The item a planned field belongs to; its `path` is then the dotted path INSIDE the item. */
12830
12897
  var CompositionFieldItemSchema = object({
@@ -12860,6 +12927,7 @@ var CompositionFeatureModeSchema = _enum([
12860
12927
  "replace"
12861
12928
  ]);
12862
12929
  var CompositionFeaturePlanSchema = object({
12930
+ /** Index in the stored feature array; disabled features are omitted rather than re-indexed. */
12863
12931
  featureIndex: number().int().nonnegative(),
12864
12932
  cap: string(),
12865
12933
  mode: CompositionFeatureModeSchema
@@ -12868,7 +12936,8 @@ var CompositionValidationSchema = object({
12868
12936
  ok: boolean(),
12869
12937
  problems: array(CompositionProblemSchema),
12870
12938
  fields: array(CompositionFieldPlanSchema),
12871
- features: array(CompositionFeaturePlanSchema)
12939
+ features: array(CompositionFeaturePlanSchema),
12940
+ events: array(CompositionEventPlanSchema)
12872
12941
  });
12873
12942
  /**
12874
12943
  * Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts`. `degraded`:
@@ -14463,6 +14532,34 @@ var DeviceBindingsForDeviceSchema = object({
14463
14532
  nativeAddonId: string()
14464
14533
  }))
14465
14534
  });
14535
+ /**
14536
+ * The STORED wrapper activation for one `(device, capability)` pair — the row
14537
+ * `setWrapperActive` writes, read back three-way (D675):
14538
+ *
14539
+ * - `value` — the store answered and holds an activation: the bound wrapper's
14540
+ * addon id, or `null`, the operator's explicit "off" marker (D62);
14541
+ * - `missing` — the store answered, its activation map exists, and it holds
14542
+ * nothing for this pair: the operator never activated or deactivated a
14543
+ * wrapper here;
14544
+ * - `failed` — the store could not be read, holds no activation map at all
14545
+ * (an empty or unready snapshot, D44), or holds something that is not an
14546
+ * activation. It carries NO information: a consumer must never read it as
14547
+ * `missing` (D315, D393).
14548
+ *
14549
+ * This is the persisted INPUT, not the derived `getBindings` view — no registry
14550
+ * resolution, no `defaultActive` auto-binding, no cluster native-cap folding.
14551
+ */
14552
+ var WrapperActivationReadSchema = discriminatedUnion("kind", [
14553
+ object({
14554
+ kind: literal("value"),
14555
+ wrapperAddonId: string().nullable()
14556
+ }),
14557
+ object({ kind: literal("missing") }),
14558
+ object({
14559
+ kind: literal("failed"),
14560
+ error: string()
14561
+ })
14562
+ ]);
14466
14563
  var SavedDeviceRowSchema = object({
14467
14564
  /** Numeric id reserved at allocateDeviceId time. */
14468
14565
  id: number(),
@@ -14813,7 +14910,10 @@ method(object({
14813
14910
  }), _void(), {
14814
14911
  kind: "mutation",
14815
14912
  auth: "admin"
14816
- }), method(object({ capName: string() }), array(string())), method(object({ deviceType: string() }), array(object({
14913
+ }), method(object({
14914
+ deviceId: number(),
14915
+ capName: string().min(1)
14916
+ }), WrapperActivationReadSchema), method(object({ capName: string() }), array(string())), method(object({ deviceType: string() }), array(object({
14817
14917
  capName: string(),
14818
14918
  wrappers: array(string())
14819
14919
  }))), method(object({ deviceId: number() }), SettingsSchemaWithValuesSchema.nullable()), method(object({ deviceId: number() }), SettingsSchemaWithValuesSchema.nullable()), method(object({ deviceId: number() }), object({
@@ -26323,42 +26423,6 @@ DeviceType.Camera, method(object({
26323
26423
  kind: "query",
26324
26424
  auth: "protected"
26325
26425
  });
26326
- /**
26327
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
26328
- * valutatore puro del suo FRONTE.
26329
- *
26330
- * Viveva dentro il builtin virtual-doorbell
26331
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
26332
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
26333
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
26334
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
26335
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
26336
- * SPOSTA qui e il doorbell la ri-esporta.
26337
- *
26338
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
26339
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
26340
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
26341
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
26342
- */
26343
- /**
26344
- * Known binary / switch source caps → the boolean slice field whose
26345
- * false→true rise counts as ACTIVE. Every entry is "fire on active".
26346
- * Sensors whose "active" reading is not a plain boolean (presence's string
26347
- * state, connectivity's connected flag) are deliberately excluded — a
26348
- * reconnect is not a doorbell press, and it is not a recording either.
26349
- */
26350
- var SOURCE_CAP_ACTIVE_FIELD = {
26351
- contact: "entryOpen",
26352
- binary: "on",
26353
- switch: "on",
26354
- motion: "detected",
26355
- flood: "flooded",
26356
- gas: "detected",
26357
- smoke: "detected",
26358
- "carbon-monoxide": "detected",
26359
- vibration: "detected",
26360
- tamper: "tampered"
26361
- };
26362
26426
  object({
26363
26427
  /** Ms epoch of the last press. null = never observed since this provider started. */
26364
26428
  lastPressedAt: number().nullable(),
@@ -32330,12 +32394,21 @@ var RecordingStorageUsageSchema = object({
32330
32394
  */
32331
32395
  devicesRead: _enum(["archive", "unavailable"]).optional(),
32332
32396
  /**
32397
+ * Is the `archive` answer WHOLE (D674): the hour ledger loaded without
32398
+ * hitting its row cap, and at least one location resolved? Only then may a
32399
+ * camera ABSENT from `devices[]` be read as "no footage" — and only then is a
32400
+ * row's `oldestMs` the archive's oldest rather than the oldest of a fraction.
32401
+ * OPTIONAL: a recorder predating D674 omits it, and a consumer must read the
32402
+ * absence as `false`. A retention floor is a delete; it never guesses.
32403
+ */
32404
+ complete: boolean().optional(),
32405
+ /**
32333
32406
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
32334
- * of the payload without it: the hub serves this method through a BAKED
32335
- * router, so a hub whose framework train predates a change to this array
32336
- * strips it out of an answer a newer recorder happily produced. A UI that
32337
- * dereferences it unconditionally crashes the whole Storage page over a
32338
- * missing disk bar.
32407
+ * of the payload without it: a recorder that could not build it omits it. A
32408
+ * UI that dereferences it unconditionally crashes the whole Storage page over
32409
+ * a missing disk bar. (The hub's cap routers pass output through unvalidated
32410
+ * since 2026-07-11 — `cap-router-builder.ts` — so a newer recorder's fields
32411
+ * are not stripped by an older hub.)
32339
32412
  */
32340
32413
  locations: array(RecordingLocationUsageSchema).optional()
32341
32414
  });
@@ -35106,7 +35179,12 @@ Object.freeze({
35106
35179
  number: {
35107
35180
  kind: "fixed",
35108
35181
  result: ["number", "null"]
35109
- }
35182
+ },
35183
+ rose: {
35184
+ kind: "fixed",
35185
+ result: ["number", "null"]
35186
+ },
35187
+ count: NUMBER
35110
35188
  });
35111
35189
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
35112
35190
  /**
@@ -38221,6 +38299,12 @@ Object.freeze({
38221
38299
  addonId: null,
38222
38300
  access: "view"
38223
38301
  },
38302
+ "deviceManager.getWrapperActivation": {
38303
+ capName: "device-manager",
38304
+ capScope: "system",
38305
+ addonId: null,
38306
+ access: "view"
38307
+ },
38224
38308
  "deviceManager.listAll": {
38225
38309
  capName: "device-manager",
38226
38310
  capScope: "system",
@@ -44030,6 +44114,11 @@ Object.freeze({
44030
44114
  form: "single",
44031
44115
  optional: false
44032
44116
  }],
44117
+ "deviceManager.getWrapperActivation": [{
44118
+ name: "deviceId",
44119
+ form: "single",
44120
+ optional: false
44121
+ }],
44033
44122
  "deviceManager.listAll": [{
44034
44123
  name: "deviceIds",
44035
44124
  form: "array",
@@ -46598,7 +46687,7 @@ var AgentUIAddon = class extends BaseAddon {
46598
46687
  capability: adminUiCapability,
46599
46688
  provider: {
46600
46689
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
46601
- getVersion: async () => ({ version: "1.2.154" })
46690
+ getVersion: async () => ({ version: "1.2.155" })
46602
46691
  }
46603
46692
  }];
46604
46693
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.154",
3
+ "version": "1.2.155",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",