@camstack/addon-provider-tuya 0.2.76 → 0.2.78

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
@@ -8771,13 +8771,28 @@ var RecordingBandSchema = object({
8771
8771
  end: string().regex(HHMM),
8772
8772
  mode: RecordingBandModeSchema,
8773
8773
  triggers: RecordingBandTriggersSchema.optional(),
8774
+ /**
8775
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8776
+ *
8777
+ * It was the retroactive KEEP bound — which already-written segments survive
8778
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8779
+ * broker could serve, or the gate would delete the seconds the ring had just
8780
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8781
+ * expression of the broker's retention, in different units, in a different
8782
+ * addon, with an invariant the operator had to maintain by hand. The keep
8783
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8784
+ * left to configure here.
8785
+ *
8786
+ * The key survives in the SHAPE so a config written before that record still
8787
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8788
+ * strict, so simply deleting it would strip an operator's value in silence on
8789
+ * the next save (the failure D380 came one commit from shipping). Nothing
8790
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8791
+ */
8774
8792
  preBufferSec: number().min(0).optional(),
8775
8793
  postBufferSec: number().min(0).optional()
8776
8794
  });
8777
- ({
8778
- preBufferSec: 15,
8779
- postBufferSec: 30
8780
- }).postBufferSec * 1e3;
8795
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8781
8796
  /**
8782
8797
  * Per-device retention overrides. Every field is optional; an unset or `0`
8783
8798
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -11354,12 +11369,30 @@ var BackupDestinationInfoSchema = object({
11354
11369
  lastSuccessAt: number().optional(),
11355
11370
  /** Newest-archive size from `manifests.json`, or undefined. */
11356
11371
  lastSuccessSizeBytes: number().optional(),
11357
- /** Per-destination cron expression. Empty = manual-only (no schedule). */
11372
+ /**
11373
+ * Cron cadence(s) of the ENABLED schedules that fan out to this
11374
+ * destination, comma-joined. Absent when no enabled schedule targets it
11375
+ * — a destination nothing is scheduled to write to must not advertise a
11376
+ * cadence (D384). This is never the `backup_destination_policies.cron`
11377
+ * column: that per-location cron has scheduled nothing since 2026-07-28
11378
+ * and reading it made a destination with a DISABLED schedule claim a
11379
+ * nightly run.
11380
+ */
11358
11381
  cron: string().optional(),
11359
- /** ms-epoch of next computed firing for this destination's cron, if any. */
11382
+ /** ms-epoch of the next firing across those schedules (earliest), if any. */
11360
11383
  nextRunAt: number().optional(),
11361
- /** ms-epoch of last successful scheduled run (mirrors policy.lastRunAt). */
11362
- lastRunAt: number().optional()
11384
+ /**
11385
+ * ms-epoch of the last time a run ATTEMPTED to write here — success or
11386
+ * failure. Never a success stamp: pair it with `lastSuccessAt` (the
11387
+ * newest archive that actually landed) and `lastError`.
11388
+ */
11389
+ lastAttemptAt: number().optional(),
11390
+ /**
11391
+ * Why the last attempt failed, verbatim. Absent when the last attempt
11392
+ * landed the archive. A destination that has never been written to has
11393
+ * neither this nor `lastAttemptAt`.
11394
+ */
11395
+ lastError: string().optional()
11363
11396
  });
11364
11397
  /**
11365
11398
  * Per-archive entry returned by `backup.listArchives({ destinationId })`.
@@ -11522,8 +11555,16 @@ var BackupScheduleSchema = object({
11522
11555
  retentionCount: number().int().min(1).max(1e3),
11523
11556
  /** Optional subset of source locations to include; omitted = all. */
11524
11557
  dataSources: array(string()).readonly().optional(),
11525
- /** ms-epoch of last successful run. */
11526
- lastRunAt: number().optional(),
11558
+ /**
11559
+ * ms-epoch of the last tick that FIRED this schedule. Stamped before the
11560
+ * archive runs (it is the dedupe anchor), so it says "attempted", never
11561
+ * "succeeded" — a run refused by every destination stamps it too.
11562
+ */
11563
+ lastAttemptAt: number().optional(),
11564
+ /** ms-epoch of the last run of this schedule that landed at ≥1 destination. */
11565
+ lastSuccessAt: number().optional(),
11566
+ /** Why the last fired run failed, verbatim. Absent when it succeeded. */
11567
+ lastError: string().optional(),
11527
11568
  /** ms-epoch of next computed firing (read-only, filled on list). */
11528
11569
  nextRunAt: number().optional()
11529
11570
  });
@@ -11572,14 +11613,7 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
11572
11613
  locationId: string(),
11573
11614
  enabled: boolean(),
11574
11615
  retentionCount: number().int().min(1).max(1e3),
11575
- label: string().optional(),
11576
- /**
11577
- * Per-destination cron expression. Empty string clears the
11578
- * schedule (manual-only). Validated server-side via croner;
11579
- * malformed expressions reject the upsert with an actionable
11580
- * message.
11581
- */
11582
- cron: string().optional()
11616
+ label: string().optional()
11583
11617
  }), _void(), {
11584
11618
  kind: "mutation",
11585
11619
  auth: "admin"
package/dist/addon.mjs CHANGED
@@ -8770,13 +8770,28 @@ var RecordingBandSchema = object({
8770
8770
  end: string().regex(HHMM),
8771
8771
  mode: RecordingBandModeSchema,
8772
8772
  triggers: RecordingBandTriggersSchema.optional(),
8773
+ /**
8774
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8775
+ *
8776
+ * It was the retroactive KEEP bound — which already-written segments survive
8777
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8778
+ * broker could serve, or the gate would delete the seconds the ring had just
8779
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8780
+ * expression of the broker's retention, in different units, in a different
8781
+ * addon, with an invariant the operator had to maintain by hand. The keep
8782
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8783
+ * left to configure here.
8784
+ *
8785
+ * The key survives in the SHAPE so a config written before that record still
8786
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8787
+ * strict, so simply deleting it would strip an operator's value in silence on
8788
+ * the next save (the failure D380 came one commit from shipping). Nothing
8789
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8790
+ */
8773
8791
  preBufferSec: number().min(0).optional(),
8774
8792
  postBufferSec: number().min(0).optional()
8775
8793
  });
8776
- ({
8777
- preBufferSec: 15,
8778
- postBufferSec: 30
8779
- }).postBufferSec * 1e3;
8794
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8780
8795
  /**
8781
8796
  * Per-device retention overrides. Every field is optional; an unset or `0`
8782
8797
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -11353,12 +11368,30 @@ var BackupDestinationInfoSchema = object({
11353
11368
  lastSuccessAt: number().optional(),
11354
11369
  /** Newest-archive size from `manifests.json`, or undefined. */
11355
11370
  lastSuccessSizeBytes: number().optional(),
11356
- /** Per-destination cron expression. Empty = manual-only (no schedule). */
11371
+ /**
11372
+ * Cron cadence(s) of the ENABLED schedules that fan out to this
11373
+ * destination, comma-joined. Absent when no enabled schedule targets it
11374
+ * — a destination nothing is scheduled to write to must not advertise a
11375
+ * cadence (D384). This is never the `backup_destination_policies.cron`
11376
+ * column: that per-location cron has scheduled nothing since 2026-07-28
11377
+ * and reading it made a destination with a DISABLED schedule claim a
11378
+ * nightly run.
11379
+ */
11357
11380
  cron: string().optional(),
11358
- /** ms-epoch of next computed firing for this destination's cron, if any. */
11381
+ /** ms-epoch of the next firing across those schedules (earliest), if any. */
11359
11382
  nextRunAt: number().optional(),
11360
- /** ms-epoch of last successful scheduled run (mirrors policy.lastRunAt). */
11361
- lastRunAt: number().optional()
11383
+ /**
11384
+ * ms-epoch of the last time a run ATTEMPTED to write here — success or
11385
+ * failure. Never a success stamp: pair it with `lastSuccessAt` (the
11386
+ * newest archive that actually landed) and `lastError`.
11387
+ */
11388
+ lastAttemptAt: number().optional(),
11389
+ /**
11390
+ * Why the last attempt failed, verbatim. Absent when the last attempt
11391
+ * landed the archive. A destination that has never been written to has
11392
+ * neither this nor `lastAttemptAt`.
11393
+ */
11394
+ lastError: string().optional()
11362
11395
  });
11363
11396
  /**
11364
11397
  * Per-archive entry returned by `backup.listArchives({ destinationId })`.
@@ -11521,8 +11554,16 @@ var BackupScheduleSchema = object({
11521
11554
  retentionCount: number().int().min(1).max(1e3),
11522
11555
  /** Optional subset of source locations to include; omitted = all. */
11523
11556
  dataSources: array(string()).readonly().optional(),
11524
- /** ms-epoch of last successful run. */
11525
- lastRunAt: number().optional(),
11557
+ /**
11558
+ * ms-epoch of the last tick that FIRED this schedule. Stamped before the
11559
+ * archive runs (it is the dedupe anchor), so it says "attempted", never
11560
+ * "succeeded" — a run refused by every destination stamps it too.
11561
+ */
11562
+ lastAttemptAt: number().optional(),
11563
+ /** ms-epoch of the last run of this schedule that landed at ≥1 destination. */
11564
+ lastSuccessAt: number().optional(),
11565
+ /** Why the last fired run failed, verbatim. Absent when it succeeded. */
11566
+ lastError: string().optional(),
11526
11567
  /** ms-epoch of next computed firing (read-only, filled on list). */
11527
11568
  nextRunAt: number().optional()
11528
11569
  });
@@ -11571,14 +11612,7 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
11571
11612
  locationId: string(),
11572
11613
  enabled: boolean(),
11573
11614
  retentionCount: number().int().min(1).max(1e3),
11574
- label: string().optional(),
11575
- /**
11576
- * Per-destination cron expression. Empty string clears the
11577
- * schedule (manual-only). Validated server-side via croner;
11578
- * malformed expressions reject the upsert with an actionable
11579
- * message.
11580
- */
11581
- cron: string().optional()
11615
+ label: string().optional()
11582
11616
  }), _void(), {
11583
11617
  kind: "mutation",
11584
11618
  auth: "admin"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.76",
3
+ "version": "0.2.78",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",