@camstack/addon-agent-ui 1.2.48 → 1.2.49

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 +73 -1
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -18756,6 +18756,50 @@ var EventStoreFootprintSchema = object({
18756
18756
  totalBytes: number().int(),
18757
18757
  devices: array(EventStoreDeviceFootprintSchema).readonly()
18758
18758
  });
18759
+ /** Event-media footprint for one {@link MediaFileKind}. */
18760
+ var EventMediaKindFootprintSchema = object({
18761
+ kind: MediaFileKindEnum,
18762
+ /** Media rows of this kind. */
18763
+ rows: number().int(),
18764
+ /** Bytes on disk held by those rows. */
18765
+ bytes: number().int()
18766
+ });
18767
+ /**
18768
+ * The media footprint broken down by KIND — the axis a deletion decision
18769
+ * actually turns on.
18770
+ *
18771
+ * A byte total says how much there is; it cannot say what is safe to remove.
18772
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
18773
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
18774
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
18775
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
18776
+ * nothing else, so sizing a deletion means summing per kind.
18777
+ *
18778
+ * ## Why `unaccounted*` exists
18779
+ *
18780
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
18781
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
18782
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
18783
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
18784
+ * retired code path, or by a version that knew a kind this one does not) would
18785
+ * otherwise vanish from the total silently, and an operator would delete
18786
+ * against a denominator smaller than the disk.
18787
+ *
18788
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
18789
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
18790
+ */
18791
+ var EventMediaKindBreakdownSchema = object({
18792
+ /** Every media row in scope, from one unfiltered aggregate. */
18793
+ totalRows: number().int(),
18794
+ /** Every media byte in scope, from that same aggregate. */
18795
+ totalBytes: number().int(),
18796
+ /** Per-kind footprint, ordered by bytes descending. */
18797
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
18798
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
18799
+ unaccountedRows: number().int(),
18800
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
18801
+ unaccountedBytes: number().int()
18802
+ });
18759
18803
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
18760
18804
  var EventPruneCountsSchema = object({
18761
18805
  motion: number().int(),
@@ -18959,6 +19003,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18959
19003
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
18960
19004
  kind: "query",
18961
19005
  auth: "admin"
19006
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19007
+ kind: "query",
19008
+ auth: "admin"
18962
19009
  }), method(object({
18963
19010
  olderThanMs: number(),
18964
19011
  reason: OpsLogReasonSchema.optional()
@@ -20910,6 +20957,20 @@ method(object({
20910
20957
  error: string().optional()
20911
20958
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
20912
20959
  providerId: string(),
20960
+ /**
20961
+ * The location this config is an UNSAVED edit of, when there is one.
20962
+ *
20963
+ * `listLocations` replaces every declared secret with the redaction
20964
+ * sentinel, so the edit modal's form state holds the sentinel for any
20965
+ * credential the operator did not retype — and posting that here
20966
+ * without a way to resolve it makes the provider try to authenticate
20967
+ * as `__camstack_redacted__` and report the operator's own working
20968
+ * password as wrong. Given this id, the orchestrator restores each
20969
+ * sentinel from the stored config (same rule as `upsertLocation`)
20970
+ * before dispatching. Omitted by the "Add location" wizard, where
20971
+ * every value was typed just now and nothing is stored yet.
20972
+ */
20973
+ locationId: string().optional(),
20913
20974
  config: record(string(), unknown())
20914
20975
  }), object({
20915
20976
  ok: boolean(),
@@ -31564,6 +31625,12 @@ Object.freeze({
31564
31625
  addonId: null,
31565
31626
  access: "view"
31566
31627
  },
31628
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
31629
+ capName: "pipeline-analytics",
31630
+ capScope: "device",
31631
+ addonId: null,
31632
+ access: "view"
31633
+ },
31567
31634
  "pipelineAnalytics.getEventStoreFootprint": {
31568
31635
  capName: "pipeline-analytics",
31569
31636
  capScope: "device",
@@ -35229,6 +35296,11 @@ Object.freeze({
35229
35296
  form: "single",
35230
35297
  optional: false
35231
35298
  }],
35299
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
35300
+ name: "deviceId",
35301
+ form: "single",
35302
+ optional: true
35303
+ }],
35232
35304
  "pipelineAnalytics.getGroup": [{
35233
35305
  name: "deviceId",
35234
35306
  form: "single",
@@ -36558,7 +36630,7 @@ var AgentUIAddon = class extends BaseAddon {
36558
36630
  capability: adminUiCapability,
36559
36631
  provider: {
36560
36632
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
36561
- getVersion: async () => ({ version: "1.2.48" })
36633
+ getVersion: async () => ({ version: "1.2.49" })
36562
36634
  }
36563
36635
  }];
36564
36636
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.48",
3
+ "version": "1.2.49",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",