@camstack/addon-terminal 0.1.63 → 0.1.65

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
@@ -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(), array(BackupEntrySchema).readonly(), {
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
@@ -12808,7 +12902,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12808
12902
  id: string(),
12809
12903
  name: string(),
12810
12904
  type: string()
12811
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12905
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
12906
+ kind: "mutation",
12907
+ timeoutMs: 3 * 6e4
12908
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12812
12909
  kind: "mutation",
12813
12910
  auth: "admin"
12814
12911
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -13089,7 +13186,8 @@ method(object({
13089
13186
  targetId: number()
13090
13187
  }), MigrateDeviceResultSchema, {
13091
13188
  kind: "mutation",
13092
- auth: "admin"
13189
+ auth: "admin",
13190
+ timeoutMs: 12 * 6e4
13093
13191
  }), 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({
13094
13192
  deviceId: number(),
13095
13193
  name: string()
@@ -33332,6 +33430,12 @@ Object.freeze({
33332
33430
  addonId: null,
33333
33431
  access: "create"
33334
33432
  },
33433
+ "backup.cancel": {
33434
+ capName: "backup",
33435
+ capScope: "system",
33436
+ addonId: null,
33437
+ access: "create"
33438
+ },
33335
33439
  "backup.delete": {
33336
33440
  capName: "backup",
33337
33441
  capScope: "system",
@@ -33374,6 +33478,12 @@ Object.freeze({
33374
33478
  addonId: null,
33375
33479
  access: "view"
33376
33480
  },
33481
+ "backup.listRuns": {
33482
+ capName: "backup",
33483
+ capScope: "system",
33484
+ addonId: null,
33485
+ access: "view"
33486
+ },
33377
33487
  "backup.listSchedules": {
33378
33488
  capName: "backup",
33379
33489
  capScope: "system",
@@ -34574,6 +34684,12 @@ Object.freeze({
34574
34684
  addonId: null,
34575
34685
  access: "view"
34576
34686
  },
34687
+ "deviceProvider.reloadDevice": {
34688
+ capName: "device-provider",
34689
+ capScope: "system",
34690
+ addonId: null,
34691
+ access: "create"
34692
+ },
34577
34693
  "deviceProvider.start": {
34578
34694
  capName: "device-provider",
34579
34695
  capScope: "system",
@@ -37940,6 +38056,12 @@ Object.freeze({
37940
38056
  addonId: null,
37941
38057
  access: "create"
37942
38058
  },
38059
+ "streamBroker.forgetDeviceHardware": {
38060
+ capName: "stream-broker",
38061
+ capScope: "system",
38062
+ addonId: null,
38063
+ access: "delete"
38064
+ },
37943
38065
  "streamBroker.getAllRtspEntries": {
37944
38066
  capName: "stream-broker",
37945
38067
  capScope: "system",
@@ -40398,6 +40520,11 @@ Object.freeze({
40398
40520
  form: "single",
40399
40521
  optional: false
40400
40522
  }],
40523
+ "streamBroker.forgetDeviceHardware": [{
40524
+ name: "deviceId",
40525
+ form: "single",
40526
+ optional: false
40527
+ }],
40401
40528
  "streamBroker.getDeviceAudioMute": [{
40402
40529
  name: "deviceId",
40403
40530
  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(), array(BackupEntrySchema).readonly(), {
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
@@ -12785,7 +12879,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12785
12879
  id: string(),
12786
12880
  name: string(),
12787
12881
  type: string()
12788
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12882
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
12883
+ kind: "mutation",
12884
+ timeoutMs: 3 * 6e4
12885
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12789
12886
  kind: "mutation",
12790
12887
  auth: "admin"
12791
12888
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -13066,7 +13163,8 @@ method(object({
13066
13163
  targetId: number()
13067
13164
  }), MigrateDeviceResultSchema, {
13068
13165
  kind: "mutation",
13069
- auth: "admin"
13166
+ auth: "admin",
13167
+ timeoutMs: 12 * 6e4
13070
13168
  }), 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({
13071
13169
  deviceId: number(),
13072
13170
  name: string()
@@ -33309,6 +33407,12 @@ Object.freeze({
33309
33407
  addonId: null,
33310
33408
  access: "create"
33311
33409
  },
33410
+ "backup.cancel": {
33411
+ capName: "backup",
33412
+ capScope: "system",
33413
+ addonId: null,
33414
+ access: "create"
33415
+ },
33312
33416
  "backup.delete": {
33313
33417
  capName: "backup",
33314
33418
  capScope: "system",
@@ -33351,6 +33455,12 @@ Object.freeze({
33351
33455
  addonId: null,
33352
33456
  access: "view"
33353
33457
  },
33458
+ "backup.listRuns": {
33459
+ capName: "backup",
33460
+ capScope: "system",
33461
+ addonId: null,
33462
+ access: "view"
33463
+ },
33354
33464
  "backup.listSchedules": {
33355
33465
  capName: "backup",
33356
33466
  capScope: "system",
@@ -34551,6 +34661,12 @@ Object.freeze({
34551
34661
  addonId: null,
34552
34662
  access: "view"
34553
34663
  },
34664
+ "deviceProvider.reloadDevice": {
34665
+ capName: "device-provider",
34666
+ capScope: "system",
34667
+ addonId: null,
34668
+ access: "create"
34669
+ },
34554
34670
  "deviceProvider.start": {
34555
34671
  capName: "device-provider",
34556
34672
  capScope: "system",
@@ -37917,6 +38033,12 @@ Object.freeze({
37917
38033
  addonId: null,
37918
38034
  access: "create"
37919
38035
  },
38036
+ "streamBroker.forgetDeviceHardware": {
38037
+ capName: "stream-broker",
38038
+ capScope: "system",
38039
+ addonId: null,
38040
+ access: "delete"
38041
+ },
37920
38042
  "streamBroker.getAllRtspEntries": {
37921
38043
  capName: "stream-broker",
37922
38044
  capScope: "system",
@@ -40375,6 +40497,11 @@ Object.freeze({
40375
40497
  form: "single",
40376
40498
  optional: false
40377
40499
  }],
40500
+ "streamBroker.forgetDeviceHardware": [{
40501
+ name: "deviceId",
40502
+ form: "single",
40503
+ optional: false
40504
+ }],
40378
40505
  "streamBroker.getDeviceAudioMute": [{
40379
40506
  name: "deviceId",
40380
40507
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",