@camstack/addon-ai 0.4.43 → 0.4.44

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
@@ -19050,6 +19050,50 @@ var EventStoreFootprintSchema = object({
19050
19050
  totalBytes: number$1().int(),
19051
19051
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19052
19052
  });
19053
+ /** Event-media footprint for one {@link MediaFileKind}. */
19054
+ var EventMediaKindFootprintSchema = object({
19055
+ kind: MediaFileKindEnum,
19056
+ /** Media rows of this kind. */
19057
+ rows: number$1().int(),
19058
+ /** Bytes on disk held by those rows. */
19059
+ bytes: number$1().int()
19060
+ });
19061
+ /**
19062
+ * The media footprint broken down by KIND — the axis a deletion decision
19063
+ * actually turns on.
19064
+ *
19065
+ * A byte total says how much there is; it cannot say what is safe to remove.
19066
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19067
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19068
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19069
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19070
+ * nothing else, so sizing a deletion means summing per kind.
19071
+ *
19072
+ * ## Why `unaccounted*` exists
19073
+ *
19074
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19075
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19076
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19077
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19078
+ * retired code path, or by a version that knew a kind this one does not) would
19079
+ * otherwise vanish from the total silently, and an operator would delete
19080
+ * against a denominator smaller than the disk.
19081
+ *
19082
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19083
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19084
+ */
19085
+ var EventMediaKindBreakdownSchema = object({
19086
+ /** Every media row in scope, from one unfiltered aggregate. */
19087
+ totalRows: number$1().int(),
19088
+ /** Every media byte in scope, from that same aggregate. */
19089
+ totalBytes: number$1().int(),
19090
+ /** Per-kind footprint, ordered by bytes descending. */
19091
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19092
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19093
+ unaccountedRows: number$1().int(),
19094
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19095
+ unaccountedBytes: number$1().int()
19096
+ });
19053
19097
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19054
19098
  var EventPruneCountsSchema = object({
19055
19099
  motion: number$1().int(),
@@ -19253,6 +19297,9 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
19253
19297
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19254
19298
  kind: "query",
19255
19299
  auth: "admin"
19300
+ }), method(object({ deviceId: number$1().int().optional() }), EventMediaKindBreakdownSchema, {
19301
+ kind: "query",
19302
+ auth: "admin"
19256
19303
  }), method(object({
19257
19304
  olderThanMs: number$1(),
19258
19305
  reason: OpsLogReasonSchema.optional()
@@ -21204,6 +21251,20 @@ method(object({
21204
21251
  error: string().optional()
21205
21252
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21206
21253
  providerId: string(),
21254
+ /**
21255
+ * The location this config is an UNSAVED edit of, when there is one.
21256
+ *
21257
+ * `listLocations` replaces every declared secret with the redaction
21258
+ * sentinel, so the edit modal's form state holds the sentinel for any
21259
+ * credential the operator did not retype — and posting that here
21260
+ * without a way to resolve it makes the provider try to authenticate
21261
+ * as `__camstack_redacted__` and report the operator's own working
21262
+ * password as wrong. Given this id, the orchestrator restores each
21263
+ * sentinel from the stored config (same rule as `upsertLocation`)
21264
+ * before dispatching. Omitted by the "Add location" wizard, where
21265
+ * every value was typed just now and nothing is stored yet.
21266
+ */
21267
+ locationId: string().optional(),
21207
21268
  config: record(string(), unknown())
21208
21269
  }), object({
21209
21270
  ok: boolean(),
@@ -31858,6 +31919,12 @@ Object.freeze({
31858
31919
  addonId: null,
31859
31920
  access: "view"
31860
31921
  },
31922
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
31923
+ capName: "pipeline-analytics",
31924
+ capScope: "device",
31925
+ addonId: null,
31926
+ access: "view"
31927
+ },
31861
31928
  "pipelineAnalytics.getEventStoreFootprint": {
31862
31929
  capName: "pipeline-analytics",
31863
31930
  capScope: "device",
@@ -35523,6 +35590,11 @@ Object.freeze({
35523
35590
  form: "single",
35524
35591
  optional: false
35525
35592
  }],
35593
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
35594
+ name: "deviceId",
35595
+ form: "single",
35596
+ optional: true
35597
+ }],
35526
35598
  "pipelineAnalytics.getGroup": [{
35527
35599
  name: "deviceId",
35528
35600
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19077,6 +19077,50 @@ var EventStoreFootprintSchema = object({
19077
19077
  totalBytes: number$1().int(),
19078
19078
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19079
19079
  });
19080
+ /** Event-media footprint for one {@link MediaFileKind}. */
19081
+ var EventMediaKindFootprintSchema = object({
19082
+ kind: MediaFileKindEnum,
19083
+ /** Media rows of this kind. */
19084
+ rows: number$1().int(),
19085
+ /** Bytes on disk held by those rows. */
19086
+ bytes: number$1().int()
19087
+ });
19088
+ /**
19089
+ * The media footprint broken down by KIND — the axis a deletion decision
19090
+ * actually turns on.
19091
+ *
19092
+ * A byte total says how much there is; it cannot say what is safe to remove.
19093
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19094
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19095
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19096
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19097
+ * nothing else, so sizing a deletion means summing per kind.
19098
+ *
19099
+ * ## Why `unaccounted*` exists
19100
+ *
19101
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19102
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19103
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19104
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19105
+ * retired code path, or by a version that knew a kind this one does not) would
19106
+ * otherwise vanish from the total silently, and an operator would delete
19107
+ * against a denominator smaller than the disk.
19108
+ *
19109
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19110
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19111
+ */
19112
+ var EventMediaKindBreakdownSchema = object({
19113
+ /** Every media row in scope, from one unfiltered aggregate. */
19114
+ totalRows: number$1().int(),
19115
+ /** Every media byte in scope, from that same aggregate. */
19116
+ totalBytes: number$1().int(),
19117
+ /** Per-kind footprint, ordered by bytes descending. */
19118
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19119
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19120
+ unaccountedRows: number$1().int(),
19121
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19122
+ unaccountedBytes: number$1().int()
19123
+ });
19080
19124
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19081
19125
  var EventPruneCountsSchema = object({
19082
19126
  motion: number$1().int(),
@@ -19280,6 +19324,9 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
19280
19324
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19281
19325
  kind: "query",
19282
19326
  auth: "admin"
19327
+ }), method(object({ deviceId: number$1().int().optional() }), EventMediaKindBreakdownSchema, {
19328
+ kind: "query",
19329
+ auth: "admin"
19283
19330
  }), method(object({
19284
19331
  olderThanMs: number$1(),
19285
19332
  reason: OpsLogReasonSchema.optional()
@@ -21231,6 +21278,20 @@ method(object({
21231
21278
  error: string().optional()
21232
21279
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21233
21280
  providerId: string(),
21281
+ /**
21282
+ * The location this config is an UNSAVED edit of, when there is one.
21283
+ *
21284
+ * `listLocations` replaces every declared secret with the redaction
21285
+ * sentinel, so the edit modal's form state holds the sentinel for any
21286
+ * credential the operator did not retype — and posting that here
21287
+ * without a way to resolve it makes the provider try to authenticate
21288
+ * as `__camstack_redacted__` and report the operator's own working
21289
+ * password as wrong. Given this id, the orchestrator restores each
21290
+ * sentinel from the stored config (same rule as `upsertLocation`)
21291
+ * before dispatching. Omitted by the "Add location" wizard, where
21292
+ * every value was typed just now and nothing is stored yet.
21293
+ */
21294
+ locationId: string().optional(),
21234
21295
  config: record(string(), unknown())
21235
21296
  }), object({
21236
21297
  ok: boolean(),
@@ -31885,6 +31946,12 @@ Object.freeze({
31885
31946
  addonId: null,
31886
31947
  access: "view"
31887
31948
  },
31949
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
31950
+ capName: "pipeline-analytics",
31951
+ capScope: "device",
31952
+ addonId: null,
31953
+ access: "view"
31954
+ },
31888
31955
  "pipelineAnalytics.getEventStoreFootprint": {
31889
31956
  capName: "pipeline-analytics",
31890
31957
  capScope: "device",
@@ -35550,6 +35617,11 @@ Object.freeze({
35550
35617
  form: "single",
35551
35618
  optional: false
35552
35619
  }],
35620
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
35621
+ name: "deviceId",
35622
+ form: "single",
35623
+ optional: true
35624
+ }],
35553
35625
  "pipelineAnalytics.getGroup": [{
35554
35626
  name: "deviceId",
35555
35627
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",