@camstack/addon-ai 0.4.58 → 0.4.60

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
@@ -10730,6 +10730,89 @@ var LocationStatSchema = object({
10730
10730
  fileCount: number$1(),
10731
10731
  present: boolean()
10732
10732
  });
10733
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10734
+ var BackupRunStateSchema = _enum([
10735
+ "queued",
10736
+ "running",
10737
+ "succeeded",
10738
+ "failed",
10739
+ "cancelled"
10740
+ ]);
10741
+ /**
10742
+ * Where a running backup currently is. `queued` before it starts,
10743
+ * `building` while the tar.gz is being staged, `uploading` during the
10744
+ * per-destination fan-out, `done` once terminal.
10745
+ */
10746
+ var BackupRunPhaseSchema = _enum([
10747
+ "queued",
10748
+ "building",
10749
+ "uploading",
10750
+ "done"
10751
+ ]);
10752
+ /**
10753
+ * Observable state of one backup run — readable WHILE it runs via
10754
+ * `backup.listRuns`. This is what makes the execution queue and
10755
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10756
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10757
+ * diagnosable with `du` because nothing reported that runs existed or
10758
+ * how large the staged archive had grown.
10759
+ */
10760
+ var BackupRunSchema = object({
10761
+ /** Stable run id — the handle `backup.cancel` takes. */
10762
+ id: string(),
10763
+ state: BackupRunStateSchema,
10764
+ phase: BackupRunPhaseSchema,
10765
+ /**
10766
+ * Resolved destination location ids. Empty while queued (targets are
10767
+ * resolved when the run starts, against the then-current policies).
10768
+ */
10769
+ destinationIds: array(string()).readonly(),
10770
+ label: string().optional(),
10771
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10772
+ requestedAt: number$1(),
10773
+ /** ms-epoch when the run left the queue and started building. */
10774
+ startedAt: number$1().optional(),
10775
+ /** ms-epoch when the run reached a terminal state. */
10776
+ finishedAt: number$1().optional(),
10777
+ /** Compressed bytes of the staging archive written so far. */
10778
+ stagedBytes: number$1(),
10779
+ /** Final staged archive size, once the build phase completes. */
10780
+ archiveSizeBytes: number$1().optional(),
10781
+ /** Bytes pushed to the destination currently uploading. */
10782
+ uploadedBytes: number$1(),
10783
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10784
+ completedDestinationIds: array(string()).readonly(),
10785
+ /** Destinations that failed during the fan-out. */
10786
+ failedDestinationIds: array(string()).readonly(),
10787
+ /** Failure message when `state === 'failed'`. */
10788
+ error: string().optional(),
10789
+ /**
10790
+ * 1-based place in the execution queue — 1 = runs next. Present only
10791
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10792
+ * queue's OWN pending order, never derived from timestamps, so the
10793
+ * UI cannot show an order the executor will not honour.
10794
+ */
10795
+ queuePosition: number$1().int().min(1).optional()
10796
+ });
10797
+ /**
10798
+ * Result of `backup.trigger`. The call still resolves when the run
10799
+ * terminates (compat with schedule-driven runs and the admin UI), but
10800
+ * it now names the run and says whether it had to WAIT: a trigger that
10801
+ * arrives while another run is in flight is enqueued (or joined onto
10802
+ * an identical already-queued run), never started concurrently.
10803
+ */
10804
+ var BackupTriggerResultSchema = object({
10805
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10806
+ runId: string(),
10807
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10808
+ queued: boolean(),
10809
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10810
+ joined: boolean(),
10811
+ /** True when the run was cancelled before completing every destination. */
10812
+ cancelled: boolean(),
10813
+ /** One entry per destination the archive landed at (partial on cancel). */
10814
+ entries: array(BackupEntrySchema).readonly()
10815
+ });
10733
10816
  /**
10734
10817
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10735
10818
  * SET of destination locations. Supersedes the per-location cron on
@@ -10777,7 +10860,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10777
10860
  * retention (manual runs).
10778
10861
  */
10779
10862
  retentionCount: number$1().int().min(1).max(1e3).optional()
10780
- }).optional(), array(BackupEntrySchema).readonly(), {
10863
+ }).optional(), BackupTriggerResultSchema, {
10864
+ kind: "mutation",
10865
+ auth: "admin"
10866
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10781
10867
  kind: "mutation",
10782
10868
  auth: "admin"
10783
10869
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11494,6 +11580,14 @@ method(object({
11494
11580
  }), object({ success: literal(true) }), {
11495
11581
  kind: "mutation",
11496
11582
  auth: "admin"
11583
+ }), method(object({ deviceId: number$1().int().nonnegative() }), object({
11584
+ derivedStreamsDeleted: array(string()).readonly(),
11585
+ assignmentsPurged: boolean(),
11586
+ probeSnapshotsDropped: number$1().int().nonnegative(),
11587
+ rtspTokenRowsDeleted: number$1().int().nonnegative()
11588
+ }), {
11589
+ kind: "mutation",
11590
+ auth: "admin"
11497
11591
  }), method(object({
11498
11592
  deviceId: number$1(),
11499
11593
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -12703,7 +12797,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12703
12797
  id: string(),
12704
12798
  name: string(),
12705
12799
  type: string()
12706
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12800
+ }))), method(object({ stableId: string() }), object({ deviceId: number$1() }), {
12801
+ kind: "mutation",
12802
+ timeoutMs: 3 * 6e4
12803
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12707
12804
  kind: "mutation",
12708
12805
  auth: "admin"
12709
12806
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -12984,7 +13081,8 @@ method(object({
12984
13081
  targetId: number$1()
12985
13082
  }), MigrateDeviceResultSchema, {
12986
13083
  kind: "mutation",
12987
- auth: "admin"
13084
+ auth: "admin",
13085
+ timeoutMs: 12 * 6e4
12988
13086
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), record(string(), unknown())), method(object({ deviceId: number$1() }), record(string(), unknown())), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
12989
13087
  deviceId: number$1(),
12990
13088
  name: string()
@@ -29683,6 +29781,12 @@ Object.freeze({
29683
29781
  addonId: null,
29684
29782
  access: "create"
29685
29783
  },
29784
+ "backup.cancel": {
29785
+ capName: "backup",
29786
+ capScope: "system",
29787
+ addonId: null,
29788
+ access: "create"
29789
+ },
29686
29790
  "backup.delete": {
29687
29791
  capName: "backup",
29688
29792
  capScope: "system",
@@ -29725,6 +29829,12 @@ Object.freeze({
29725
29829
  addonId: null,
29726
29830
  access: "view"
29727
29831
  },
29832
+ "backup.listRuns": {
29833
+ capName: "backup",
29834
+ capScope: "system",
29835
+ addonId: null,
29836
+ access: "view"
29837
+ },
29728
29838
  "backup.listSchedules": {
29729
29839
  capName: "backup",
29730
29840
  capScope: "system",
@@ -30925,6 +31035,12 @@ Object.freeze({
30925
31035
  addonId: null,
30926
31036
  access: "view"
30927
31037
  },
31038
+ "deviceProvider.reloadDevice": {
31039
+ capName: "device-provider",
31040
+ capScope: "system",
31041
+ addonId: null,
31042
+ access: "create"
31043
+ },
30928
31044
  "deviceProvider.start": {
30929
31045
  capName: "device-provider",
30930
31046
  capScope: "system",
@@ -34291,6 +34407,12 @@ Object.freeze({
34291
34407
  addonId: null,
34292
34408
  access: "create"
34293
34409
  },
34410
+ "streamBroker.forgetDeviceHardware": {
34411
+ capName: "stream-broker",
34412
+ capScope: "system",
34413
+ addonId: null,
34414
+ access: "delete"
34415
+ },
34294
34416
  "streamBroker.getAllRtspEntries": {
34295
34417
  capName: "stream-broker",
34296
34418
  capScope: "system",
@@ -36749,6 +36871,11 @@ Object.freeze({
36749
36871
  form: "single",
36750
36872
  optional: false
36751
36873
  }],
36874
+ "streamBroker.forgetDeviceHardware": [{
36875
+ name: "deviceId",
36876
+ form: "single",
36877
+ optional: false
36878
+ }],
36752
36879
  "streamBroker.getDeviceAudioMute": [{
36753
36880
  name: "deviceId",
36754
36881
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10757,6 +10757,89 @@ var LocationStatSchema = object({
10757
10757
  fileCount: number$1(),
10758
10758
  present: boolean()
10759
10759
  });
10760
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10761
+ var BackupRunStateSchema = _enum([
10762
+ "queued",
10763
+ "running",
10764
+ "succeeded",
10765
+ "failed",
10766
+ "cancelled"
10767
+ ]);
10768
+ /**
10769
+ * Where a running backup currently is. `queued` before it starts,
10770
+ * `building` while the tar.gz is being staged, `uploading` during the
10771
+ * per-destination fan-out, `done` once terminal.
10772
+ */
10773
+ var BackupRunPhaseSchema = _enum([
10774
+ "queued",
10775
+ "building",
10776
+ "uploading",
10777
+ "done"
10778
+ ]);
10779
+ /**
10780
+ * Observable state of one backup run — readable WHILE it runs via
10781
+ * `backup.listRuns`. This is what makes the execution queue and
10782
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10783
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10784
+ * diagnosable with `du` because nothing reported that runs existed or
10785
+ * how large the staged archive had grown.
10786
+ */
10787
+ var BackupRunSchema = object({
10788
+ /** Stable run id — the handle `backup.cancel` takes. */
10789
+ id: string(),
10790
+ state: BackupRunStateSchema,
10791
+ phase: BackupRunPhaseSchema,
10792
+ /**
10793
+ * Resolved destination location ids. Empty while queued (targets are
10794
+ * resolved when the run starts, against the then-current policies).
10795
+ */
10796
+ destinationIds: array(string()).readonly(),
10797
+ label: string().optional(),
10798
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10799
+ requestedAt: number$1(),
10800
+ /** ms-epoch when the run left the queue and started building. */
10801
+ startedAt: number$1().optional(),
10802
+ /** ms-epoch when the run reached a terminal state. */
10803
+ finishedAt: number$1().optional(),
10804
+ /** Compressed bytes of the staging archive written so far. */
10805
+ stagedBytes: number$1(),
10806
+ /** Final staged archive size, once the build phase completes. */
10807
+ archiveSizeBytes: number$1().optional(),
10808
+ /** Bytes pushed to the destination currently uploading. */
10809
+ uploadedBytes: number$1(),
10810
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10811
+ completedDestinationIds: array(string()).readonly(),
10812
+ /** Destinations that failed during the fan-out. */
10813
+ failedDestinationIds: array(string()).readonly(),
10814
+ /** Failure message when `state === 'failed'`. */
10815
+ error: string().optional(),
10816
+ /**
10817
+ * 1-based place in the execution queue — 1 = runs next. Present only
10818
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10819
+ * queue's OWN pending order, never derived from timestamps, so the
10820
+ * UI cannot show an order the executor will not honour.
10821
+ */
10822
+ queuePosition: number$1().int().min(1).optional()
10823
+ });
10824
+ /**
10825
+ * Result of `backup.trigger`. The call still resolves when the run
10826
+ * terminates (compat with schedule-driven runs and the admin UI), but
10827
+ * it now names the run and says whether it had to WAIT: a trigger that
10828
+ * arrives while another run is in flight is enqueued (or joined onto
10829
+ * an identical already-queued run), never started concurrently.
10830
+ */
10831
+ var BackupTriggerResultSchema = object({
10832
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10833
+ runId: string(),
10834
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10835
+ queued: boolean(),
10836
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10837
+ joined: boolean(),
10838
+ /** True when the run was cancelled before completing every destination. */
10839
+ cancelled: boolean(),
10840
+ /** One entry per destination the archive landed at (partial on cancel). */
10841
+ entries: array(BackupEntrySchema).readonly()
10842
+ });
10760
10843
  /**
10761
10844
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10762
10845
  * SET of destination locations. Supersedes the per-location cron on
@@ -10804,7 +10887,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10804
10887
  * retention (manual runs).
10805
10888
  */
10806
10889
  retentionCount: number$1().int().min(1).max(1e3).optional()
10807
- }).optional(), array(BackupEntrySchema).readonly(), {
10890
+ }).optional(), BackupTriggerResultSchema, {
10891
+ kind: "mutation",
10892
+ auth: "admin"
10893
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10808
10894
  kind: "mutation",
10809
10895
  auth: "admin"
10810
10896
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11521,6 +11607,14 @@ method(object({
11521
11607
  }), object({ success: literal(true) }), {
11522
11608
  kind: "mutation",
11523
11609
  auth: "admin"
11610
+ }), method(object({ deviceId: number$1().int().nonnegative() }), object({
11611
+ derivedStreamsDeleted: array(string()).readonly(),
11612
+ assignmentsPurged: boolean(),
11613
+ probeSnapshotsDropped: number$1().int().nonnegative(),
11614
+ rtspTokenRowsDeleted: number$1().int().nonnegative()
11615
+ }), {
11616
+ kind: "mutation",
11617
+ auth: "admin"
11524
11618
  }), method(object({
11525
11619
  deviceId: number$1(),
11526
11620
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -12730,7 +12824,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12730
12824
  id: string(),
12731
12825
  name: string(),
12732
12826
  type: string()
12733
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12827
+ }))), method(object({ stableId: string() }), object({ deviceId: number$1() }), {
12828
+ kind: "mutation",
12829
+ timeoutMs: 3 * 6e4
12830
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12734
12831
  kind: "mutation",
12735
12832
  auth: "admin"
12736
12833
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -13011,7 +13108,8 @@ method(object({
13011
13108
  targetId: number$1()
13012
13109
  }), MigrateDeviceResultSchema, {
13013
13110
  kind: "mutation",
13014
- auth: "admin"
13111
+ auth: "admin",
13112
+ timeoutMs: 12 * 6e4
13015
13113
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), record(string(), unknown())), method(object({ deviceId: number$1() }), record(string(), unknown())), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
13016
13114
  deviceId: number$1(),
13017
13115
  name: string()
@@ -29710,6 +29808,12 @@ Object.freeze({
29710
29808
  addonId: null,
29711
29809
  access: "create"
29712
29810
  },
29811
+ "backup.cancel": {
29812
+ capName: "backup",
29813
+ capScope: "system",
29814
+ addonId: null,
29815
+ access: "create"
29816
+ },
29713
29817
  "backup.delete": {
29714
29818
  capName: "backup",
29715
29819
  capScope: "system",
@@ -29752,6 +29856,12 @@ Object.freeze({
29752
29856
  addonId: null,
29753
29857
  access: "view"
29754
29858
  },
29859
+ "backup.listRuns": {
29860
+ capName: "backup",
29861
+ capScope: "system",
29862
+ addonId: null,
29863
+ access: "view"
29864
+ },
29755
29865
  "backup.listSchedules": {
29756
29866
  capName: "backup",
29757
29867
  capScope: "system",
@@ -30952,6 +31062,12 @@ Object.freeze({
30952
31062
  addonId: null,
30953
31063
  access: "view"
30954
31064
  },
31065
+ "deviceProvider.reloadDevice": {
31066
+ capName: "device-provider",
31067
+ capScope: "system",
31068
+ addonId: null,
31069
+ access: "create"
31070
+ },
30955
31071
  "deviceProvider.start": {
30956
31072
  capName: "device-provider",
30957
31073
  capScope: "system",
@@ -34318,6 +34434,12 @@ Object.freeze({
34318
34434
  addonId: null,
34319
34435
  access: "create"
34320
34436
  },
34437
+ "streamBroker.forgetDeviceHardware": {
34438
+ capName: "stream-broker",
34439
+ capScope: "system",
34440
+ addonId: null,
34441
+ access: "delete"
34442
+ },
34321
34443
  "streamBroker.getAllRtspEntries": {
34322
34444
  capName: "stream-broker",
34323
34445
  capScope: "system",
@@ -36776,6 +36898,11 @@ Object.freeze({
36776
36898
  form: "single",
36777
36899
  optional: false
36778
36900
  }],
36901
+ "streamBroker.forgetDeviceHardware": [{
36902
+ name: "deviceId",
36903
+ form: "single",
36904
+ optional: false
36905
+ }],
36779
36906
  "streamBroker.getDeviceAudioMute": [{
36780
36907
  name: "deviceId",
36781
36908
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.58",
3
+ "version": "0.4.60",
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",