@camstack/addon-agent-ui 1.2.61 → 1.2.63

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 +131 -4
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -10530,6 +10530,89 @@ var LocationStatSchema = object({
10530
10530
  fileCount: number(),
10531
10531
  present: boolean()
10532
10532
  });
10533
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10534
+ var BackupRunStateSchema = _enum([
10535
+ "queued",
10536
+ "running",
10537
+ "succeeded",
10538
+ "failed",
10539
+ "cancelled"
10540
+ ]);
10541
+ /**
10542
+ * Where a running backup currently is. `queued` before it starts,
10543
+ * `building` while the tar.gz is being staged, `uploading` during the
10544
+ * per-destination fan-out, `done` once terminal.
10545
+ */
10546
+ var BackupRunPhaseSchema = _enum([
10547
+ "queued",
10548
+ "building",
10549
+ "uploading",
10550
+ "done"
10551
+ ]);
10552
+ /**
10553
+ * Observable state of one backup run — readable WHILE it runs via
10554
+ * `backup.listRuns`. This is what makes the execution queue and
10555
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10556
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10557
+ * diagnosable with `du` because nothing reported that runs existed or
10558
+ * how large the staged archive had grown.
10559
+ */
10560
+ var BackupRunSchema = object({
10561
+ /** Stable run id — the handle `backup.cancel` takes. */
10562
+ id: string(),
10563
+ state: BackupRunStateSchema,
10564
+ phase: BackupRunPhaseSchema,
10565
+ /**
10566
+ * Resolved destination location ids. Empty while queued (targets are
10567
+ * resolved when the run starts, against the then-current policies).
10568
+ */
10569
+ destinationIds: array(string()).readonly(),
10570
+ label: string().optional(),
10571
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10572
+ requestedAt: number(),
10573
+ /** ms-epoch when the run left the queue and started building. */
10574
+ startedAt: number().optional(),
10575
+ /** ms-epoch when the run reached a terminal state. */
10576
+ finishedAt: number().optional(),
10577
+ /** Compressed bytes of the staging archive written so far. */
10578
+ stagedBytes: number(),
10579
+ /** Final staged archive size, once the build phase completes. */
10580
+ archiveSizeBytes: number().optional(),
10581
+ /** Bytes pushed to the destination currently uploading. */
10582
+ uploadedBytes: number(),
10583
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10584
+ completedDestinationIds: array(string()).readonly(),
10585
+ /** Destinations that failed during the fan-out. */
10586
+ failedDestinationIds: array(string()).readonly(),
10587
+ /** Failure message when `state === 'failed'`. */
10588
+ error: string().optional(),
10589
+ /**
10590
+ * 1-based place in the execution queue — 1 = runs next. Present only
10591
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10592
+ * queue's OWN pending order, never derived from timestamps, so the
10593
+ * UI cannot show an order the executor will not honour.
10594
+ */
10595
+ queuePosition: number().int().min(1).optional()
10596
+ });
10597
+ /**
10598
+ * Result of `backup.trigger`. The call still resolves when the run
10599
+ * terminates (compat with schedule-driven runs and the admin UI), but
10600
+ * it now names the run and says whether it had to WAIT: a trigger that
10601
+ * arrives while another run is in flight is enqueued (or joined onto
10602
+ * an identical already-queued run), never started concurrently.
10603
+ */
10604
+ var BackupTriggerResultSchema = object({
10605
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10606
+ runId: string(),
10607
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10608
+ queued: boolean(),
10609
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10610
+ joined: boolean(),
10611
+ /** True when the run was cancelled before completing every destination. */
10612
+ cancelled: boolean(),
10613
+ /** One entry per destination the archive landed at (partial on cancel). */
10614
+ entries: array(BackupEntrySchema).readonly()
10615
+ });
10533
10616
  /**
10534
10617
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10535
10618
  * SET of destination locations. Supersedes the per-location cron on
@@ -10577,7 +10660,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10577
10660
  * retention (manual runs).
10578
10661
  */
10579
10662
  retentionCount: number().int().min(1).max(1e3).optional()
10580
- }).optional(), array(BackupEntrySchema).readonly(), {
10663
+ }).optional(), BackupTriggerResultSchema, {
10664
+ kind: "mutation",
10665
+ auth: "admin"
10666
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10581
10667
  kind: "mutation",
10582
10668
  auth: "admin"
10583
10669
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11294,6 +11380,14 @@ method(object({
11294
11380
  }), object({ success: literal(true) }), {
11295
11381
  kind: "mutation",
11296
11382
  auth: "admin"
11383
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11384
+ derivedStreamsDeleted: array(string()).readonly(),
11385
+ assignmentsPurged: boolean(),
11386
+ probeSnapshotsDropped: number().int().nonnegative(),
11387
+ rtspTokenRowsDeleted: number().int().nonnegative()
11388
+ }), {
11389
+ kind: "mutation",
11390
+ auth: "admin"
11297
11391
  }), method(object({
11298
11392
  deviceId: number(),
11299
11393
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -12503,7 +12597,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12503
12597
  id: string(),
12504
12598
  name: string(),
12505
12599
  type: string()
12506
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12600
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
12601
+ kind: "mutation",
12602
+ timeoutMs: 3 * 6e4
12603
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12507
12604
  kind: "mutation",
12508
12605
  auth: "admin"
12509
12606
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -12784,7 +12881,8 @@ method(object({
12784
12881
  targetId: number()
12785
12882
  }), MigrateDeviceResultSchema, {
12786
12883
  kind: "mutation",
12787
- auth: "admin"
12884
+ auth: "admin",
12885
+ timeoutMs: 12 * 6e4
12788
12886
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12789
12887
  deviceId: number(),
12790
12888
  name: string()
@@ -29389,6 +29487,12 @@ Object.freeze({
29389
29487
  addonId: null,
29390
29488
  access: "create"
29391
29489
  },
29490
+ "backup.cancel": {
29491
+ capName: "backup",
29492
+ capScope: "system",
29493
+ addonId: null,
29494
+ access: "create"
29495
+ },
29392
29496
  "backup.delete": {
29393
29497
  capName: "backup",
29394
29498
  capScope: "system",
@@ -29431,6 +29535,12 @@ Object.freeze({
29431
29535
  addonId: null,
29432
29536
  access: "view"
29433
29537
  },
29538
+ "backup.listRuns": {
29539
+ capName: "backup",
29540
+ capScope: "system",
29541
+ addonId: null,
29542
+ access: "view"
29543
+ },
29434
29544
  "backup.listSchedules": {
29435
29545
  capName: "backup",
29436
29546
  capScope: "system",
@@ -30631,6 +30741,12 @@ Object.freeze({
30631
30741
  addonId: null,
30632
30742
  access: "view"
30633
30743
  },
30744
+ "deviceProvider.reloadDevice": {
30745
+ capName: "device-provider",
30746
+ capScope: "system",
30747
+ addonId: null,
30748
+ access: "create"
30749
+ },
30634
30750
  "deviceProvider.start": {
30635
30751
  capName: "device-provider",
30636
30752
  capScope: "system",
@@ -33997,6 +34113,12 @@ Object.freeze({
33997
34113
  addonId: null,
33998
34114
  access: "create"
33999
34115
  },
34116
+ "streamBroker.forgetDeviceHardware": {
34117
+ capName: "stream-broker",
34118
+ capScope: "system",
34119
+ addonId: null,
34120
+ access: "delete"
34121
+ },
34000
34122
  "streamBroker.getAllRtspEntries": {
34001
34123
  capName: "stream-broker",
34002
34124
  capScope: "system",
@@ -36455,6 +36577,11 @@ Object.freeze({
36455
36577
  form: "single",
36456
36578
  optional: false
36457
36579
  }],
36580
+ "streamBroker.forgetDeviceHardware": [{
36581
+ name: "deviceId",
36582
+ form: "single",
36583
+ optional: false
36584
+ }],
36458
36585
  "streamBroker.getDeviceAudioMute": [{
36459
36586
  name: "deviceId",
36460
36587
  form: "single",
@@ -37213,7 +37340,7 @@ var AgentUIAddon = class extends BaseAddon {
37213
37340
  capability: adminUiCapability,
37214
37341
  provider: {
37215
37342
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
37216
- getVersion: async () => ({ version: "1.2.61" })
37343
+ getVersion: async () => ({ version: "1.2.63" })
37217
37344
  }
37218
37345
  }];
37219
37346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.61",
3
+ "version": "1.2.63",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",