@camstack/addon-tailscale 1.1.26 → 1.1.27

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-AxWhb5Uh.js");
27
+ const require_dist = require("../dist-DVZX81-I.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-D7Ao4Euk.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-FdwqBAVi.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -7327,6 +7327,62 @@ var RecordingConfigSchema = object({
7327
7327
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7328
7328
  });
7329
7329
  /**
7330
+ * Ops-log — the durable, append-only operations audit shared by the
7331
+ * recordings and events management surfaces.
7332
+ *
7333
+ * ONE row shape is reused for both domains so a single "Activity" view can
7334
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7335
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7336
+ * management operation, WHY it ran (reason), and its measurable effect
7337
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7338
+ * never fail the operation it records.
7339
+ */
7340
+ /** Which management domain the operation belongs to. */
7341
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7342
+ /** The kind of management operation performed. */
7343
+ var OpsLogOpSchema = _enum([
7344
+ "prune",
7345
+ "manual-delete",
7346
+ "rescan",
7347
+ "retention-run"
7348
+ ]);
7349
+ /** Why the operation ran. */
7350
+ var OpsLogReasonSchema = _enum([
7351
+ "retention",
7352
+ "quota",
7353
+ "manual",
7354
+ "operator"
7355
+ ]);
7356
+ /** One audit row, shared verbatim by both domains. */
7357
+ var OpsLogEntrySchema = object({
7358
+ /** Unique row id. */
7359
+ id: string(),
7360
+ /** Epoch ms the operation completed. */
7361
+ at: number(),
7362
+ domain: OpsLogDomainSchema,
7363
+ op: OpsLogOpSchema,
7364
+ reason: OpsLogReasonSchema,
7365
+ /** The camera the op targeted; null for a cluster/global op. */
7366
+ deviceId: number().nullable(),
7367
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7368
+ nodeId: string(),
7369
+ /** Buckets / rows deleted (op-specific unit). */
7370
+ itemsAffected: number(),
7371
+ /** Bytes reclaimed by the op (0 when not measurable). */
7372
+ bytesReclaimed: number(),
7373
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7374
+ detail: string().nullable(),
7375
+ /** Who/what triggered the op. */
7376
+ actor: string()
7377
+ });
7378
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7379
+ var OpsLogQueryInputSchema = object({
7380
+ /** Restrict to a single camera; omit for every row. */
7381
+ deviceId: number().optional(),
7382
+ /** Max rows returned, newest-first. */
7383
+ limit: number().int().min(1).max(1e3).optional()
7384
+ });
7385
+ /**
7330
7386
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7331
7387
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7332
7388
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16144,6 +16200,26 @@ var TrackCascadeCountsSchema = object({
16144
16200
  /** Per-track CLIP search vectors removed (best-effort). */
16145
16201
  embeddings: number().int()
16146
16202
  });
16203
+ /** Event-store footprint for one camera. */
16204
+ var EventStoreDeviceFootprintSchema = object({
16205
+ deviceId: number(),
16206
+ /** Persisted event rows (motion + object + audio) for the camera. */
16207
+ rows: number().int(),
16208
+ /** Event-owned media bytes on disk for the camera. */
16209
+ bytes: number().int()
16210
+ });
16211
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16212
+ var EventStoreFootprintSchema = object({
16213
+ totalRows: number().int(),
16214
+ totalBytes: number().int(),
16215
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16216
+ });
16217
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16218
+ var EventPruneCountsSchema = object({
16219
+ motion: number().int(),
16220
+ object: number().int(),
16221
+ audio: number().int()
16222
+ });
16147
16223
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16148
16224
  deviceId: number(),
16149
16225
  trackId: string()
@@ -16207,6 +16283,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16207
16283
  }), {
16208
16284
  kind: "mutation",
16209
16285
  auth: "admin"
16286
+ }), method(object({}), EventStoreFootprintSchema, {
16287
+ kind: "query",
16288
+ auth: "admin"
16289
+ }), method(object({
16290
+ olderThanMs: number(),
16291
+ reason: OpsLogReasonSchema.optional()
16292
+ }), EventPruneCountsSchema, {
16293
+ kind: "mutation",
16294
+ auth: "admin"
16295
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16296
+ kind: "mutation",
16297
+ auth: "admin"
16298
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16299
+ kind: "query",
16300
+ auth: "admin"
16210
16301
  }), method(object({
16211
16302
  eventId: string(),
16212
16303
  kind: MediaFileKindEnum.optional()
@@ -19501,13 +19592,29 @@ method(object({
19501
19592
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19502
19593
  kind: "mutation",
19503
19594
  auth: "admin"
19504
- }), method(object({ deviceId: number() }), object({
19595
+ }), method(object({
19596
+ deviceId: number(),
19597
+ reason: OpsLogReasonSchema.optional()
19598
+ }), object({
19505
19599
  floorMs: number().nullable(),
19506
19600
  deletedBuckets: number().int(),
19507
19601
  reclaimedBytes: number().int()
19508
19602
  }), {
19509
19603
  kind: "mutation",
19510
19604
  auth: "admin"
19605
+ }), method(object({
19606
+ deviceId: number(),
19607
+ fromMs: number().optional(),
19608
+ toMs: number().optional()
19609
+ }), object({
19610
+ deletedBuckets: number().int(),
19611
+ reclaimedBytes: number().int()
19612
+ }), {
19613
+ kind: "mutation",
19614
+ auth: "admin"
19615
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19616
+ kind: "query",
19617
+ auth: "admin"
19511
19618
  });
19512
19619
  /**
19513
19620
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22629,6 +22736,12 @@ Object.freeze({
22629
22736
  addonId: null,
22630
22737
  access: "delete"
22631
22738
  },
22739
+ "pipelineAnalytics.deleteDeviceEvents": {
22740
+ capName: "pipeline-analytics",
22741
+ capScope: "device",
22742
+ addonId: null,
22743
+ access: "delete"
22744
+ },
22632
22745
  "pipelineAnalytics.deleteTracks": {
22633
22746
  capName: "pipeline-analytics",
22634
22747
  capScope: "device",
@@ -22659,6 +22772,12 @@ Object.freeze({
22659
22772
  addonId: null,
22660
22773
  access: "view"
22661
22774
  },
22775
+ "pipelineAnalytics.getEventStoreFootprint": {
22776
+ capName: "pipeline-analytics",
22777
+ capScope: "device",
22778
+ addonId: null,
22779
+ access: "view"
22780
+ },
22662
22781
  "pipelineAnalytics.getKeyEvents": {
22663
22782
  capName: "pipeline-analytics",
22664
22783
  capScope: "device",
@@ -22701,6 +22820,12 @@ Object.freeze({
22701
22820
  addonId: null,
22702
22821
  access: "view"
22703
22822
  },
22823
+ "pipelineAnalytics.listOpsLog": {
22824
+ capName: "pipeline-analytics",
22825
+ capScope: "device",
22826
+ addonId: null,
22827
+ access: "view"
22828
+ },
22704
22829
  "pipelineAnalytics.listRecentTracks": {
22705
22830
  capName: "pipeline-analytics",
22706
22831
  capScope: "device",
@@ -22713,6 +22838,12 @@ Object.freeze({
22713
22838
  addonId: null,
22714
22839
  access: "view"
22715
22840
  },
22841
+ "pipelineAnalytics.pruneEvents": {
22842
+ capName: "pipeline-analytics",
22843
+ capScope: "device",
22844
+ addonId: null,
22845
+ access: "create"
22846
+ },
22716
22847
  "pipelineAnalytics.pruneEventsBefore": {
22717
22848
  capName: "pipeline-analytics",
22718
22849
  capScope: "device",
@@ -23475,6 +23606,12 @@ Object.freeze({
23475
23606
  addonId: null,
23476
23607
  access: "create"
23477
23608
  },
23609
+ "recording.deleteFootprint": {
23610
+ capName: "recording",
23611
+ capScope: "system",
23612
+ addonId: null,
23613
+ access: "delete"
23614
+ },
23478
23615
  "recording.getAvailability": {
23479
23616
  capName: "recording",
23480
23617
  capScope: "system",
@@ -23505,6 +23642,12 @@ Object.freeze({
23505
23642
  addonId: null,
23506
23643
  access: "view"
23507
23644
  },
23645
+ "recording.listOpsLog": {
23646
+ capName: "recording",
23647
+ capScope: "system",
23648
+ addonId: null,
23649
+ access: "view"
23650
+ },
23508
23651
  "recording.locateSegment": {
23509
23652
  capName: "recording",
23510
23653
  capScope: "system",
@@ -7327,6 +7327,62 @@ var RecordingConfigSchema = object({
7327
7327
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7328
7328
  });
7329
7329
  /**
7330
+ * Ops-log — the durable, append-only operations audit shared by the
7331
+ * recordings and events management surfaces.
7332
+ *
7333
+ * ONE row shape is reused for both domains so a single "Activity" view can
7334
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7335
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7336
+ * management operation, WHY it ran (reason), and its measurable effect
7337
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7338
+ * never fail the operation it records.
7339
+ */
7340
+ /** Which management domain the operation belongs to. */
7341
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7342
+ /** The kind of management operation performed. */
7343
+ var OpsLogOpSchema = _enum([
7344
+ "prune",
7345
+ "manual-delete",
7346
+ "rescan",
7347
+ "retention-run"
7348
+ ]);
7349
+ /** Why the operation ran. */
7350
+ var OpsLogReasonSchema = _enum([
7351
+ "retention",
7352
+ "quota",
7353
+ "manual",
7354
+ "operator"
7355
+ ]);
7356
+ /** One audit row, shared verbatim by both domains. */
7357
+ var OpsLogEntrySchema = object({
7358
+ /** Unique row id. */
7359
+ id: string(),
7360
+ /** Epoch ms the operation completed. */
7361
+ at: number(),
7362
+ domain: OpsLogDomainSchema,
7363
+ op: OpsLogOpSchema,
7364
+ reason: OpsLogReasonSchema,
7365
+ /** The camera the op targeted; null for a cluster/global op. */
7366
+ deviceId: number().nullable(),
7367
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7368
+ nodeId: string(),
7369
+ /** Buckets / rows deleted (op-specific unit). */
7370
+ itemsAffected: number(),
7371
+ /** Bytes reclaimed by the op (0 when not measurable). */
7372
+ bytesReclaimed: number(),
7373
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7374
+ detail: string().nullable(),
7375
+ /** Who/what triggered the op. */
7376
+ actor: string()
7377
+ });
7378
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7379
+ var OpsLogQueryInputSchema = object({
7380
+ /** Restrict to a single camera; omit for every row. */
7381
+ deviceId: number().optional(),
7382
+ /** Max rows returned, newest-first. */
7383
+ limit: number().int().min(1).max(1e3).optional()
7384
+ });
7385
+ /**
7330
7386
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7331
7387
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7332
7388
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16144,6 +16200,26 @@ var TrackCascadeCountsSchema = object({
16144
16200
  /** Per-track CLIP search vectors removed (best-effort). */
16145
16201
  embeddings: number().int()
16146
16202
  });
16203
+ /** Event-store footprint for one camera. */
16204
+ var EventStoreDeviceFootprintSchema = object({
16205
+ deviceId: number(),
16206
+ /** Persisted event rows (motion + object + audio) for the camera. */
16207
+ rows: number().int(),
16208
+ /** Event-owned media bytes on disk for the camera. */
16209
+ bytes: number().int()
16210
+ });
16211
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16212
+ var EventStoreFootprintSchema = object({
16213
+ totalRows: number().int(),
16214
+ totalBytes: number().int(),
16215
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16216
+ });
16217
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16218
+ var EventPruneCountsSchema = object({
16219
+ motion: number().int(),
16220
+ object: number().int(),
16221
+ audio: number().int()
16222
+ });
16147
16223
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16148
16224
  deviceId: number(),
16149
16225
  trackId: string()
@@ -16207,6 +16283,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16207
16283
  }), {
16208
16284
  kind: "mutation",
16209
16285
  auth: "admin"
16286
+ }), method(object({}), EventStoreFootprintSchema, {
16287
+ kind: "query",
16288
+ auth: "admin"
16289
+ }), method(object({
16290
+ olderThanMs: number(),
16291
+ reason: OpsLogReasonSchema.optional()
16292
+ }), EventPruneCountsSchema, {
16293
+ kind: "mutation",
16294
+ auth: "admin"
16295
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16296
+ kind: "mutation",
16297
+ auth: "admin"
16298
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16299
+ kind: "query",
16300
+ auth: "admin"
16210
16301
  }), method(object({
16211
16302
  eventId: string(),
16212
16303
  kind: MediaFileKindEnum.optional()
@@ -19501,13 +19592,29 @@ method(object({
19501
19592
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19502
19593
  kind: "mutation",
19503
19594
  auth: "admin"
19504
- }), method(object({ deviceId: number() }), object({
19595
+ }), method(object({
19596
+ deviceId: number(),
19597
+ reason: OpsLogReasonSchema.optional()
19598
+ }), object({
19505
19599
  floorMs: number().nullable(),
19506
19600
  deletedBuckets: number().int(),
19507
19601
  reclaimedBytes: number().int()
19508
19602
  }), {
19509
19603
  kind: "mutation",
19510
19604
  auth: "admin"
19605
+ }), method(object({
19606
+ deviceId: number(),
19607
+ fromMs: number().optional(),
19608
+ toMs: number().optional()
19609
+ }), object({
19610
+ deletedBuckets: number().int(),
19611
+ reclaimedBytes: number().int()
19612
+ }), {
19613
+ kind: "mutation",
19614
+ auth: "admin"
19615
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19616
+ kind: "query",
19617
+ auth: "admin"
19511
19618
  });
19512
19619
  /**
19513
19620
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22629,6 +22736,12 @@ Object.freeze({
22629
22736
  addonId: null,
22630
22737
  access: "delete"
22631
22738
  },
22739
+ "pipelineAnalytics.deleteDeviceEvents": {
22740
+ capName: "pipeline-analytics",
22741
+ capScope: "device",
22742
+ addonId: null,
22743
+ access: "delete"
22744
+ },
22632
22745
  "pipelineAnalytics.deleteTracks": {
22633
22746
  capName: "pipeline-analytics",
22634
22747
  capScope: "device",
@@ -22659,6 +22772,12 @@ Object.freeze({
22659
22772
  addonId: null,
22660
22773
  access: "view"
22661
22774
  },
22775
+ "pipelineAnalytics.getEventStoreFootprint": {
22776
+ capName: "pipeline-analytics",
22777
+ capScope: "device",
22778
+ addonId: null,
22779
+ access: "view"
22780
+ },
22662
22781
  "pipelineAnalytics.getKeyEvents": {
22663
22782
  capName: "pipeline-analytics",
22664
22783
  capScope: "device",
@@ -22701,6 +22820,12 @@ Object.freeze({
22701
22820
  addonId: null,
22702
22821
  access: "view"
22703
22822
  },
22823
+ "pipelineAnalytics.listOpsLog": {
22824
+ capName: "pipeline-analytics",
22825
+ capScope: "device",
22826
+ addonId: null,
22827
+ access: "view"
22828
+ },
22704
22829
  "pipelineAnalytics.listRecentTracks": {
22705
22830
  capName: "pipeline-analytics",
22706
22831
  capScope: "device",
@@ -22713,6 +22838,12 @@ Object.freeze({
22713
22838
  addonId: null,
22714
22839
  access: "view"
22715
22840
  },
22841
+ "pipelineAnalytics.pruneEvents": {
22842
+ capName: "pipeline-analytics",
22843
+ capScope: "device",
22844
+ addonId: null,
22845
+ access: "create"
22846
+ },
22716
22847
  "pipelineAnalytics.pruneEventsBefore": {
22717
22848
  capName: "pipeline-analytics",
22718
22849
  capScope: "device",
@@ -23475,6 +23606,12 @@ Object.freeze({
23475
23606
  addonId: null,
23476
23607
  access: "create"
23477
23608
  },
23609
+ "recording.deleteFootprint": {
23610
+ capName: "recording",
23611
+ capScope: "system",
23612
+ addonId: null,
23613
+ access: "delete"
23614
+ },
23478
23615
  "recording.getAvailability": {
23479
23616
  capName: "recording",
23480
23617
  capScope: "system",
@@ -23505,6 +23642,12 @@ Object.freeze({
23505
23642
  addonId: null,
23506
23643
  access: "view"
23507
23644
  },
23645
+ "recording.listOpsLog": {
23646
+ capName: "recording",
23647
+ capScope: "system",
23648
+ addonId: null,
23649
+ access: "view"
23650
+ },
23508
23651
  "recording.locateSegment": {
23509
23652
  capName: "recording",
23510
23653
  capScope: "system",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-AxWhb5Uh.js");
5
+ const require_dist = require("../dist-DVZX81-I.js");
6
6
  let node_child_process = require("node:child_process");
7
7
  let node_util = require("node:util");
8
8
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-D7Ao4Euk.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-FdwqBAVi.mjs";
2
2
  import { execFile } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import { randomUUID } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",