@camstack/addon-ai 0.4.58 → 0.4.59
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 +118 -1
- package/dist/addon.mjs +118 -1
- package/package.json +1 -1
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(),
|
|
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
|
|
@@ -29683,6 +29777,12 @@ Object.freeze({
|
|
|
29683
29777
|
addonId: null,
|
|
29684
29778
|
access: "create"
|
|
29685
29779
|
},
|
|
29780
|
+
"backup.cancel": {
|
|
29781
|
+
capName: "backup",
|
|
29782
|
+
capScope: "system",
|
|
29783
|
+
addonId: null,
|
|
29784
|
+
access: "create"
|
|
29785
|
+
},
|
|
29686
29786
|
"backup.delete": {
|
|
29687
29787
|
capName: "backup",
|
|
29688
29788
|
capScope: "system",
|
|
@@ -29725,6 +29825,12 @@ Object.freeze({
|
|
|
29725
29825
|
addonId: null,
|
|
29726
29826
|
access: "view"
|
|
29727
29827
|
},
|
|
29828
|
+
"backup.listRuns": {
|
|
29829
|
+
capName: "backup",
|
|
29830
|
+
capScope: "system",
|
|
29831
|
+
addonId: null,
|
|
29832
|
+
access: "view"
|
|
29833
|
+
},
|
|
29728
29834
|
"backup.listSchedules": {
|
|
29729
29835
|
capName: "backup",
|
|
29730
29836
|
capScope: "system",
|
|
@@ -34291,6 +34397,12 @@ Object.freeze({
|
|
|
34291
34397
|
addonId: null,
|
|
34292
34398
|
access: "create"
|
|
34293
34399
|
},
|
|
34400
|
+
"streamBroker.forgetDeviceHardware": {
|
|
34401
|
+
capName: "stream-broker",
|
|
34402
|
+
capScope: "system",
|
|
34403
|
+
addonId: null,
|
|
34404
|
+
access: "delete"
|
|
34405
|
+
},
|
|
34294
34406
|
"streamBroker.getAllRtspEntries": {
|
|
34295
34407
|
capName: "stream-broker",
|
|
34296
34408
|
capScope: "system",
|
|
@@ -36749,6 +36861,11 @@ Object.freeze({
|
|
|
36749
36861
|
form: "single",
|
|
36750
36862
|
optional: false
|
|
36751
36863
|
}],
|
|
36864
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
36865
|
+
name: "deviceId",
|
|
36866
|
+
form: "single",
|
|
36867
|
+
optional: false
|
|
36868
|
+
}],
|
|
36752
36869
|
"streamBroker.getDeviceAudioMute": [{
|
|
36753
36870
|
name: "deviceId",
|
|
36754
36871
|
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(),
|
|
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
|
|
@@ -29710,6 +29804,12 @@ Object.freeze({
|
|
|
29710
29804
|
addonId: null,
|
|
29711
29805
|
access: "create"
|
|
29712
29806
|
},
|
|
29807
|
+
"backup.cancel": {
|
|
29808
|
+
capName: "backup",
|
|
29809
|
+
capScope: "system",
|
|
29810
|
+
addonId: null,
|
|
29811
|
+
access: "create"
|
|
29812
|
+
},
|
|
29713
29813
|
"backup.delete": {
|
|
29714
29814
|
capName: "backup",
|
|
29715
29815
|
capScope: "system",
|
|
@@ -29752,6 +29852,12 @@ Object.freeze({
|
|
|
29752
29852
|
addonId: null,
|
|
29753
29853
|
access: "view"
|
|
29754
29854
|
},
|
|
29855
|
+
"backup.listRuns": {
|
|
29856
|
+
capName: "backup",
|
|
29857
|
+
capScope: "system",
|
|
29858
|
+
addonId: null,
|
|
29859
|
+
access: "view"
|
|
29860
|
+
},
|
|
29755
29861
|
"backup.listSchedules": {
|
|
29756
29862
|
capName: "backup",
|
|
29757
29863
|
capScope: "system",
|
|
@@ -34318,6 +34424,12 @@ Object.freeze({
|
|
|
34318
34424
|
addonId: null,
|
|
34319
34425
|
access: "create"
|
|
34320
34426
|
},
|
|
34427
|
+
"streamBroker.forgetDeviceHardware": {
|
|
34428
|
+
capName: "stream-broker",
|
|
34429
|
+
capScope: "system",
|
|
34430
|
+
addonId: null,
|
|
34431
|
+
access: "delete"
|
|
34432
|
+
},
|
|
34321
34433
|
"streamBroker.getAllRtspEntries": {
|
|
34322
34434
|
capName: "stream-broker",
|
|
34323
34435
|
capScope: "system",
|
|
@@ -36776,6 +36888,11 @@ Object.freeze({
|
|
|
36776
36888
|
form: "single",
|
|
36777
36889
|
optional: false
|
|
36778
36890
|
}],
|
|
36891
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
36892
|
+
name: "deviceId",
|
|
36893
|
+
form: "single",
|
|
36894
|
+
optional: false
|
|
36895
|
+
}],
|
|
36779
36896
|
"streamBroker.getDeviceAudioMute": [{
|
|
36780
36897
|
name: "deviceId",
|
|
36781
36898
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-ai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.59",
|
|
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",
|