@camstack/addon-terminal 0.1.63 → 0.1.64
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
|
@@ -10626,6 +10626,89 @@ var LocationStatSchema = object({
|
|
|
10626
10626
|
fileCount: number(),
|
|
10627
10627
|
present: boolean()
|
|
10628
10628
|
});
|
|
10629
|
+
/** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
|
|
10630
|
+
var BackupRunStateSchema = _enum([
|
|
10631
|
+
"queued",
|
|
10632
|
+
"running",
|
|
10633
|
+
"succeeded",
|
|
10634
|
+
"failed",
|
|
10635
|
+
"cancelled"
|
|
10636
|
+
]);
|
|
10637
|
+
/**
|
|
10638
|
+
* Where a running backup currently is. `queued` before it starts,
|
|
10639
|
+
* `building` while the tar.gz is being staged, `uploading` during the
|
|
10640
|
+
* per-destination fan-out, `done` once terminal.
|
|
10641
|
+
*/
|
|
10642
|
+
var BackupRunPhaseSchema = _enum([
|
|
10643
|
+
"queued",
|
|
10644
|
+
"building",
|
|
10645
|
+
"uploading",
|
|
10646
|
+
"done"
|
|
10647
|
+
]);
|
|
10648
|
+
/**
|
|
10649
|
+
* Observable state of one backup run — readable WHILE it runs via
|
|
10650
|
+
* `backup.listRuns`. This is what makes the execution queue and
|
|
10651
|
+
* `backup.cancel` usable: the 2026-09-04 incident (two concurrent
|
|
10652
|
+
* multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
|
|
10653
|
+
* diagnosable with `du` because nothing reported that runs existed or
|
|
10654
|
+
* how large the staged archive had grown.
|
|
10655
|
+
*/
|
|
10656
|
+
var BackupRunSchema = object({
|
|
10657
|
+
/** Stable run id — the handle `backup.cancel` takes. */
|
|
10658
|
+
id: string(),
|
|
10659
|
+
state: BackupRunStateSchema,
|
|
10660
|
+
phase: BackupRunPhaseSchema,
|
|
10661
|
+
/**
|
|
10662
|
+
* Resolved destination location ids. Empty while queued (targets are
|
|
10663
|
+
* resolved when the run starts, against the then-current policies).
|
|
10664
|
+
*/
|
|
10665
|
+
destinationIds: array(string()).readonly(),
|
|
10666
|
+
label: string().optional(),
|
|
10667
|
+
/** ms-epoch when the run was submitted (trigger call / schedule fire). */
|
|
10668
|
+
requestedAt: number(),
|
|
10669
|
+
/** ms-epoch when the run left the queue and started building. */
|
|
10670
|
+
startedAt: number().optional(),
|
|
10671
|
+
/** ms-epoch when the run reached a terminal state. */
|
|
10672
|
+
finishedAt: number().optional(),
|
|
10673
|
+
/** Compressed bytes of the staging archive written so far. */
|
|
10674
|
+
stagedBytes: number(),
|
|
10675
|
+
/** Final staged archive size, once the build phase completes. */
|
|
10676
|
+
archiveSizeBytes: number().optional(),
|
|
10677
|
+
/** Bytes pushed to the destination currently uploading. */
|
|
10678
|
+
uploadedBytes: number(),
|
|
10679
|
+
/** Destinations where the archive fully landed (uploaded + indexed). */
|
|
10680
|
+
completedDestinationIds: array(string()).readonly(),
|
|
10681
|
+
/** Destinations that failed during the fan-out. */
|
|
10682
|
+
failedDestinationIds: array(string()).readonly(),
|
|
10683
|
+
/** Failure message when `state === 'failed'`. */
|
|
10684
|
+
error: string().optional(),
|
|
10685
|
+
/**
|
|
10686
|
+
* 1-based place in the execution queue — 1 = runs next. Present only
|
|
10687
|
+
* while `state === 'queued'`. Stamped by the orchestrator from the
|
|
10688
|
+
* queue's OWN pending order, never derived from timestamps, so the
|
|
10689
|
+
* UI cannot show an order the executor will not honour.
|
|
10690
|
+
*/
|
|
10691
|
+
queuePosition: number().int().min(1).optional()
|
|
10692
|
+
});
|
|
10693
|
+
/**
|
|
10694
|
+
* Result of `backup.trigger`. The call still resolves when the run
|
|
10695
|
+
* terminates (compat with schedule-driven runs and the admin UI), but
|
|
10696
|
+
* it now names the run and says whether it had to WAIT: a trigger that
|
|
10697
|
+
* arrives while another run is in flight is enqueued (or joined onto
|
|
10698
|
+
* an identical already-queued run), never started concurrently.
|
|
10699
|
+
*/
|
|
10700
|
+
var BackupTriggerResultSchema = object({
|
|
10701
|
+
/** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
|
|
10702
|
+
runId: string(),
|
|
10703
|
+
/** True when the run waited behind an in-flight run instead of starting immediately. */
|
|
10704
|
+
queued: boolean(),
|
|
10705
|
+
/** True when this trigger was coalesced onto an identical already-queued run. */
|
|
10706
|
+
joined: boolean(),
|
|
10707
|
+
/** True when the run was cancelled before completing every destination. */
|
|
10708
|
+
cancelled: boolean(),
|
|
10709
|
+
/** One entry per destination the archive landed at (partial on cancel). */
|
|
10710
|
+
entries: array(BackupEntrySchema).readonly()
|
|
10711
|
+
});
|
|
10629
10712
|
/**
|
|
10630
10713
|
* A backup schedule — the N:M "entry" that binds one cron cadence to a
|
|
10631
10714
|
* SET of destination locations. Supersedes the per-location cron on
|
|
@@ -10673,7 +10756,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
10673
10756
|
* retention (manual runs).
|
|
10674
10757
|
*/
|
|
10675
10758
|
retentionCount: number().int().min(1).max(1e3).optional()
|
|
10676
|
-
}).optional(),
|
|
10759
|
+
}).optional(), BackupTriggerResultSchema, {
|
|
10760
|
+
kind: "mutation",
|
|
10761
|
+
auth: "admin"
|
|
10762
|
+
}), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
|
|
10677
10763
|
kind: "mutation",
|
|
10678
10764
|
auth: "admin"
|
|
10679
10765
|
}), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -11390,6 +11476,14 @@ method(object({
|
|
|
11390
11476
|
}), object({ success: literal(true) }), {
|
|
11391
11477
|
kind: "mutation",
|
|
11392
11478
|
auth: "admin"
|
|
11479
|
+
}), method(object({ deviceId: number().int().nonnegative() }), object({
|
|
11480
|
+
derivedStreamsDeleted: array(string()).readonly(),
|
|
11481
|
+
assignmentsPurged: boolean(),
|
|
11482
|
+
probeSnapshotsDropped: number().int().nonnegative(),
|
|
11483
|
+
rtspTokenRowsDeleted: number().int().nonnegative()
|
|
11484
|
+
}), {
|
|
11485
|
+
kind: "mutation",
|
|
11486
|
+
auth: "admin"
|
|
11393
11487
|
}), method(object({
|
|
11394
11488
|
deviceId: number(),
|
|
11395
11489
|
/** Absent = the LOWEST assigned profile — a notification attachment is
|
|
@@ -33332,6 +33426,12 @@ Object.freeze({
|
|
|
33332
33426
|
addonId: null,
|
|
33333
33427
|
access: "create"
|
|
33334
33428
|
},
|
|
33429
|
+
"backup.cancel": {
|
|
33430
|
+
capName: "backup",
|
|
33431
|
+
capScope: "system",
|
|
33432
|
+
addonId: null,
|
|
33433
|
+
access: "create"
|
|
33434
|
+
},
|
|
33335
33435
|
"backup.delete": {
|
|
33336
33436
|
capName: "backup",
|
|
33337
33437
|
capScope: "system",
|
|
@@ -33374,6 +33474,12 @@ Object.freeze({
|
|
|
33374
33474
|
addonId: null,
|
|
33375
33475
|
access: "view"
|
|
33376
33476
|
},
|
|
33477
|
+
"backup.listRuns": {
|
|
33478
|
+
capName: "backup",
|
|
33479
|
+
capScope: "system",
|
|
33480
|
+
addonId: null,
|
|
33481
|
+
access: "view"
|
|
33482
|
+
},
|
|
33377
33483
|
"backup.listSchedules": {
|
|
33378
33484
|
capName: "backup",
|
|
33379
33485
|
capScope: "system",
|
|
@@ -37940,6 +38046,12 @@ Object.freeze({
|
|
|
37940
38046
|
addonId: null,
|
|
37941
38047
|
access: "create"
|
|
37942
38048
|
},
|
|
38049
|
+
"streamBroker.forgetDeviceHardware": {
|
|
38050
|
+
capName: "stream-broker",
|
|
38051
|
+
capScope: "system",
|
|
38052
|
+
addonId: null,
|
|
38053
|
+
access: "delete"
|
|
38054
|
+
},
|
|
37943
38055
|
"streamBroker.getAllRtspEntries": {
|
|
37944
38056
|
capName: "stream-broker",
|
|
37945
38057
|
capScope: "system",
|
|
@@ -40398,6 +40510,11 @@ Object.freeze({
|
|
|
40398
40510
|
form: "single",
|
|
40399
40511
|
optional: false
|
|
40400
40512
|
}],
|
|
40513
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
40514
|
+
name: "deviceId",
|
|
40515
|
+
form: "single",
|
|
40516
|
+
optional: false
|
|
40517
|
+
}],
|
|
40401
40518
|
"streamBroker.getDeviceAudioMute": [{
|
|
40402
40519
|
name: "deviceId",
|
|
40403
40520
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -10603,6 +10603,89 @@ var LocationStatSchema = object({
|
|
|
10603
10603
|
fileCount: number(),
|
|
10604
10604
|
present: boolean()
|
|
10605
10605
|
});
|
|
10606
|
+
/** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
|
|
10607
|
+
var BackupRunStateSchema = _enum([
|
|
10608
|
+
"queued",
|
|
10609
|
+
"running",
|
|
10610
|
+
"succeeded",
|
|
10611
|
+
"failed",
|
|
10612
|
+
"cancelled"
|
|
10613
|
+
]);
|
|
10614
|
+
/**
|
|
10615
|
+
* Where a running backup currently is. `queued` before it starts,
|
|
10616
|
+
* `building` while the tar.gz is being staged, `uploading` during the
|
|
10617
|
+
* per-destination fan-out, `done` once terminal.
|
|
10618
|
+
*/
|
|
10619
|
+
var BackupRunPhaseSchema = _enum([
|
|
10620
|
+
"queued",
|
|
10621
|
+
"building",
|
|
10622
|
+
"uploading",
|
|
10623
|
+
"done"
|
|
10624
|
+
]);
|
|
10625
|
+
/**
|
|
10626
|
+
* Observable state of one backup run — readable WHILE it runs via
|
|
10627
|
+
* `backup.listRuns`. This is what makes the execution queue and
|
|
10628
|
+
* `backup.cancel` usable: the 2026-09-04 incident (two concurrent
|
|
10629
|
+
* multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
|
|
10630
|
+
* diagnosable with `du` because nothing reported that runs existed or
|
|
10631
|
+
* how large the staged archive had grown.
|
|
10632
|
+
*/
|
|
10633
|
+
var BackupRunSchema = object({
|
|
10634
|
+
/** Stable run id — the handle `backup.cancel` takes. */
|
|
10635
|
+
id: string(),
|
|
10636
|
+
state: BackupRunStateSchema,
|
|
10637
|
+
phase: BackupRunPhaseSchema,
|
|
10638
|
+
/**
|
|
10639
|
+
* Resolved destination location ids. Empty while queued (targets are
|
|
10640
|
+
* resolved when the run starts, against the then-current policies).
|
|
10641
|
+
*/
|
|
10642
|
+
destinationIds: array(string()).readonly(),
|
|
10643
|
+
label: string().optional(),
|
|
10644
|
+
/** ms-epoch when the run was submitted (trigger call / schedule fire). */
|
|
10645
|
+
requestedAt: number(),
|
|
10646
|
+
/** ms-epoch when the run left the queue and started building. */
|
|
10647
|
+
startedAt: number().optional(),
|
|
10648
|
+
/** ms-epoch when the run reached a terminal state. */
|
|
10649
|
+
finishedAt: number().optional(),
|
|
10650
|
+
/** Compressed bytes of the staging archive written so far. */
|
|
10651
|
+
stagedBytes: number(),
|
|
10652
|
+
/** Final staged archive size, once the build phase completes. */
|
|
10653
|
+
archiveSizeBytes: number().optional(),
|
|
10654
|
+
/** Bytes pushed to the destination currently uploading. */
|
|
10655
|
+
uploadedBytes: number(),
|
|
10656
|
+
/** Destinations where the archive fully landed (uploaded + indexed). */
|
|
10657
|
+
completedDestinationIds: array(string()).readonly(),
|
|
10658
|
+
/** Destinations that failed during the fan-out. */
|
|
10659
|
+
failedDestinationIds: array(string()).readonly(),
|
|
10660
|
+
/** Failure message when `state === 'failed'`. */
|
|
10661
|
+
error: string().optional(),
|
|
10662
|
+
/**
|
|
10663
|
+
* 1-based place in the execution queue — 1 = runs next. Present only
|
|
10664
|
+
* while `state === 'queued'`. Stamped by the orchestrator from the
|
|
10665
|
+
* queue's OWN pending order, never derived from timestamps, so the
|
|
10666
|
+
* UI cannot show an order the executor will not honour.
|
|
10667
|
+
*/
|
|
10668
|
+
queuePosition: number().int().min(1).optional()
|
|
10669
|
+
});
|
|
10670
|
+
/**
|
|
10671
|
+
* Result of `backup.trigger`. The call still resolves when the run
|
|
10672
|
+
* terminates (compat with schedule-driven runs and the admin UI), but
|
|
10673
|
+
* it now names the run and says whether it had to WAIT: a trigger that
|
|
10674
|
+
* arrives while another run is in flight is enqueued (or joined onto
|
|
10675
|
+
* an identical already-queued run), never started concurrently.
|
|
10676
|
+
*/
|
|
10677
|
+
var BackupTriggerResultSchema = object({
|
|
10678
|
+
/** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
|
|
10679
|
+
runId: string(),
|
|
10680
|
+
/** True when the run waited behind an in-flight run instead of starting immediately. */
|
|
10681
|
+
queued: boolean(),
|
|
10682
|
+
/** True when this trigger was coalesced onto an identical already-queued run. */
|
|
10683
|
+
joined: boolean(),
|
|
10684
|
+
/** True when the run was cancelled before completing every destination. */
|
|
10685
|
+
cancelled: boolean(),
|
|
10686
|
+
/** One entry per destination the archive landed at (partial on cancel). */
|
|
10687
|
+
entries: array(BackupEntrySchema).readonly()
|
|
10688
|
+
});
|
|
10606
10689
|
/**
|
|
10607
10690
|
* A backup schedule — the N:M "entry" that binds one cron cadence to a
|
|
10608
10691
|
* SET of destination locations. Supersedes the per-location cron on
|
|
@@ -10650,7 +10733,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
10650
10733
|
* retention (manual runs).
|
|
10651
10734
|
*/
|
|
10652
10735
|
retentionCount: number().int().min(1).max(1e3).optional()
|
|
10653
|
-
}).optional(),
|
|
10736
|
+
}).optional(), BackupTriggerResultSchema, {
|
|
10737
|
+
kind: "mutation",
|
|
10738
|
+
auth: "admin"
|
|
10739
|
+
}), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
|
|
10654
10740
|
kind: "mutation",
|
|
10655
10741
|
auth: "admin"
|
|
10656
10742
|
}), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
|
|
@@ -11367,6 +11453,14 @@ method(object({
|
|
|
11367
11453
|
}), object({ success: literal(true) }), {
|
|
11368
11454
|
kind: "mutation",
|
|
11369
11455
|
auth: "admin"
|
|
11456
|
+
}), method(object({ deviceId: number().int().nonnegative() }), object({
|
|
11457
|
+
derivedStreamsDeleted: array(string()).readonly(),
|
|
11458
|
+
assignmentsPurged: boolean(),
|
|
11459
|
+
probeSnapshotsDropped: number().int().nonnegative(),
|
|
11460
|
+
rtspTokenRowsDeleted: number().int().nonnegative()
|
|
11461
|
+
}), {
|
|
11462
|
+
kind: "mutation",
|
|
11463
|
+
auth: "admin"
|
|
11370
11464
|
}), method(object({
|
|
11371
11465
|
deviceId: number(),
|
|
11372
11466
|
/** Absent = the LOWEST assigned profile — a notification attachment is
|
|
@@ -33309,6 +33403,12 @@ Object.freeze({
|
|
|
33309
33403
|
addonId: null,
|
|
33310
33404
|
access: "create"
|
|
33311
33405
|
},
|
|
33406
|
+
"backup.cancel": {
|
|
33407
|
+
capName: "backup",
|
|
33408
|
+
capScope: "system",
|
|
33409
|
+
addonId: null,
|
|
33410
|
+
access: "create"
|
|
33411
|
+
},
|
|
33312
33412
|
"backup.delete": {
|
|
33313
33413
|
capName: "backup",
|
|
33314
33414
|
capScope: "system",
|
|
@@ -33351,6 +33451,12 @@ Object.freeze({
|
|
|
33351
33451
|
addonId: null,
|
|
33352
33452
|
access: "view"
|
|
33353
33453
|
},
|
|
33454
|
+
"backup.listRuns": {
|
|
33455
|
+
capName: "backup",
|
|
33456
|
+
capScope: "system",
|
|
33457
|
+
addonId: null,
|
|
33458
|
+
access: "view"
|
|
33459
|
+
},
|
|
33354
33460
|
"backup.listSchedules": {
|
|
33355
33461
|
capName: "backup",
|
|
33356
33462
|
capScope: "system",
|
|
@@ -37917,6 +38023,12 @@ Object.freeze({
|
|
|
37917
38023
|
addonId: null,
|
|
37918
38024
|
access: "create"
|
|
37919
38025
|
},
|
|
38026
|
+
"streamBroker.forgetDeviceHardware": {
|
|
38027
|
+
capName: "stream-broker",
|
|
38028
|
+
capScope: "system",
|
|
38029
|
+
addonId: null,
|
|
38030
|
+
access: "delete"
|
|
38031
|
+
},
|
|
37920
38032
|
"streamBroker.getAllRtspEntries": {
|
|
37921
38033
|
capName: "stream-broker",
|
|
37922
38034
|
capScope: "system",
|
|
@@ -40375,6 +40487,11 @@ Object.freeze({
|
|
|
40375
40487
|
form: "single",
|
|
40376
40488
|
optional: false
|
|
40377
40489
|
}],
|
|
40490
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
40491
|
+
name: "deviceId",
|
|
40492
|
+
form: "single",
|
|
40493
|
+
optional: false
|
|
40494
|
+
}],
|
|
40378
40495
|
"streamBroker.getDeviceAudioMute": [{
|
|
40379
40496
|
name: "deviceId",
|
|
40380
40497
|
form: "single",
|