@camstack/addon-agent-ui 1.2.235 → 1.2.237

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
@@ -5388,7 +5388,7 @@ var ZodIssueCode = {
5388
5388
  var ZodFirstPartyTypeKind;
5389
5389
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5390
5390
  //#endregion
5391
- //#region ../types/dist/sleep-DAX0-2v9.mjs
5391
+ //#region ../types/dist/sleep-DRqxtc0C.mjs
5392
5392
  /**
5393
5393
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5394
5394
  * window to float samples (D455).
@@ -8174,8 +8174,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8174
8174
  kind: "mutation",
8175
8175
  auth: "admin"
8176
8176
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8177
+ object({
8178
+ code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8179
+ params: record(string(), union([string(), number()])).optional()
8180
+ });
8177
8181
  //#endregion
8178
- //#region ../types/dist/err-msg-DX6i_MY4.mjs
8182
+ //#region ../types/dist/err-msg-DLerKiVO.mjs
8179
8183
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8180
8184
  DeviceType["Camera"] = "camera";
8181
8185
  DeviceType["Hub"] = "hub";
@@ -8425,6 +8429,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8425
8429
  DeviceRole["Nightvision"] = "nightvision";
8426
8430
  DeviceRole["PrivacyMask"] = "privacy-mask";
8427
8431
  DeviceRole["Doorbell"] = "doorbell";
8432
+ /** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
8433
+ DeviceRole["CoverBlind"] = "cover-blind";
8434
+ /** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
8435
+ DeviceRole["CoverShutter"] = "cover-shutter";
8436
+ /** Exterior awning. HA `device_class: awning`. */
8437
+ DeviceRole["CoverAwning"] = "cover-awning";
8438
+ /** Curtain / drape. HA `device_class: curtain`. */
8439
+ DeviceRole["CoverCurtain"] = "cover-curtain";
8440
+ /** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
8441
+ DeviceRole["CoverGarage"] = "cover-garage";
8442
+ /** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
8443
+ DeviceRole["CoverGate"] = "cover-gate";
8444
+ /** Door. HA `device_class: door`. A security actuator: exports gate it. */
8445
+ DeviceRole["CoverDoor"] = "cover-door";
8446
+ /** Window. HA `device_class: window`. */
8447
+ DeviceRole["CoverWindow"] = "cover-window";
8428
8448
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8429
8449
  * real Switch device for UI rendering / export adapters. */
8430
8450
  DeviceRole["BinaryHelper"] = "binary-helper";
@@ -8495,7 +8515,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8495
8515
  return DeviceRole;
8496
8516
  }({});
8497
8517
  //#endregion
8498
- //#region ../types/dist/composition-C-WpVYTX.mjs
8518
+ //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8499
8519
  /**
8500
8520
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8501
8521
  *
@@ -11699,11 +11719,10 @@ var ClipModelMetaSchema = object({
11699
11719
  /**
11700
11720
  * The `vector-store` index this model's vectors live in. ONE feature space
11701
11721
  * per index: two models share an index only when their vectors are ranked
11702
- * against each other, which for CLIP means never across families. MobileCLIP
11703
- * S1 and S2 share `object-clip` for history (separated by the row's
11704
- * `modelId`); any other model gets its own.
11722
+ * against each other, which for CLIP means never across families. Every
11723
+ * model gets its own.
11705
11724
  */
11706
- vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
11725
+ vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
11707
11726
  /**
11708
11727
  * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
11709
11728
  * must be unique per tokenizer: every model's siblings land in ONE flat
@@ -12172,7 +12191,8 @@ var ConvertResultSchema = object({
12172
12191
  })).readonly()
12173
12192
  });
12174
12193
  _enum(["new-session", "step-up"]);
12175
- _enum(["en", "it"]);
12194
+ /** The languages the hub's app landing pages are written in (D858). */
12195
+ var AppPageLangSchema = _enum(["en", "it"]);
12176
12196
  /** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
12177
12197
  var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
12178
12198
  kind: literal("browser"),
@@ -12669,7 +12689,9 @@ var ConfigTabDeclarationSchema = object({
12669
12689
  var ConfigSectionWithValuesSchema = object({
12670
12690
  id: string(),
12671
12691
  title: string(),
12692
+ titleKey: string().optional(),
12672
12693
  description: string().optional(),
12694
+ descriptionKey: string().optional(),
12673
12695
  style: _enum(["card", "accordion"]).optional(),
12674
12696
  defaultCollapsed: boolean().optional(),
12675
12697
  columns: union([
@@ -15895,6 +15917,9 @@ method(object({
15895
15917
  }), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
15896
15918
  kind: "mutation",
15897
15919
  auth: "admin"
15920
+ }), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
15921
+ kind: "mutation",
15922
+ auth: "admin"
15898
15923
  }), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
15899
15924
  /**
15900
15925
  * device-history — the ONE mechanism for numeric history (D850).
@@ -37298,6 +37323,38 @@ var DeviceRegisterPayloadSchema = object({
37298
37323
  * omits it and the keyword backstop applies. */
37299
37324
  secretConfigPaths: array(string()).optional()
37300
37325
  });
37326
+ /** One deleted device, kept by device-manager so an addon that missed the
37327
+ * deletion can still learn of it (D865). Written by the delete path ONLY. */
37328
+ var DeviceTombstoneSchema = object({
37329
+ deviceId: number().int().positive(),
37330
+ /** Epoch ms the device was deleted. */
37331
+ deletedAt: number(),
37332
+ /** The addon that owned the device when it was deleted. */
37333
+ providerAddonId: string()
37334
+ });
37335
+ /** Data held for one device that device-manager no longer knows. */
37336
+ var OrphanDeviceDataSchema = object({
37337
+ deviceId: number().int().positive(),
37338
+ /** Rows/files per store (`<addonId>:<store>`). */
37339
+ stores: record(string(), number().int().nonnegative())
37340
+ });
37341
+ var CleanupDeletedDevicesResultSchema = object({
37342
+ /**
37343
+ * `skipped` — the absence check could not be trusted (a device-list read
37344
+ * failed or the two reads disagreed); nothing was listed or deleted.
37345
+ * `dry-run` — `devices` is what a confirmed run would delete.
37346
+ * `cleaned` — `devices` is what was deleted.
37347
+ */
37348
+ status: _enum([
37349
+ "skipped",
37350
+ "dry-run",
37351
+ "cleaned"
37352
+ ]),
37353
+ reason: string().nullable(),
37354
+ devices: array(OrphanDeviceDataSchema),
37355
+ /** Implementers that could not be asked (their stores are not in `devices`). */
37356
+ unreachable: array(string())
37357
+ });
37301
37358
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
37302
37359
  var DevicePersistConfigPayloadSchema = object({
37303
37360
  deviceId: number(),
@@ -37536,6 +37593,9 @@ method(object({
37536
37593
  }), method(object({ deviceId: number() }), object({ success: literal(true) }), {
37537
37594
  kind: "mutation",
37538
37595
  auth: "admin"
37596
+ }), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
37597
+ kind: "mutation",
37598
+ auth: "admin"
37539
37599
  }), method(object({ integrationId: string() }), object({ removed: number() }), {
37540
37600
  kind: "mutation",
37541
37601
  auth: "admin"
@@ -37998,6 +38058,72 @@ method(object({
37998
38058
  auth: "admin"
37999
38059
  });
38000
38060
  /**
38061
+ * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
38062
+ * so it can delete what it keeps for that device (D865).
38063
+ *
38064
+ * ## Why an event was not enough
38065
+ *
38066
+ * `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
38067
+ * hung its per-device clean-up on it left durable garbage whenever the event was
38068
+ * lost, the addon was down, or it was restarting at that moment — footage,
38069
+ * analytics rows and settings of device 4483 outlived the device. Loss of this
38070
+ * signal corrupts durable state, so it travels by RPC with a recorded fact
38071
+ * behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
38072
+ *
38073
+ * ## The three pieces
38074
+ *
38075
+ * 1. device-manager records a TOMBSTONE per deleted device
38076
+ * (`deviceManager.listDeletedSince`). The tombstone is written by the delete
38077
+ * path only — a device that is unregistered, offline or whose provider is
38078
+ * restarting is NOT deleted and gets none.
38079
+ * 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
38080
+ * this collection, one by one, with bounded retries, logged.
38081
+ * 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
38082
+ * (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
38083
+ * may have missed. Reconcile is driven by tombstones, never by "the device is
38084
+ * not in the current list": a failed or partial list read must not destroy data.
38085
+ *
38086
+ * ## Contract for an implementer
38087
+ *
38088
+ * - **Idempotent.** It is called again by a retry, by a reconcile and by the
38089
+ * admin cleanup of data that predates tombstones. A device with nothing left
38090
+ * answers zero counts.
38091
+ * - **One key per store** in `counts`, deleted rows/files per store, so the log
38092
+ * line and the admin dry run can say where the data was.
38093
+ * - **Training datasets are NOT device data** and are never deleted by a hook.
38094
+ * - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
38095
+ * per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
38096
+ * for every addon centrally at delete time. This hook is for device DATA
38097
+ * that is not settings: footage, event media, analytics rows, history.
38098
+ * - A provider that cannot tell is allowed to throw; the caller retries it.
38099
+ *
38100
+ * `listDeviceData` is the read side of the admin "Clean data of deleted devices"
38101
+ * action: which device ids this addon holds data for, and how much per store. It
38102
+ * never deletes. device-manager decides which of those ids are absent from the
38103
+ * fleet, from TWO consistent reads of the device list (D49).
38104
+ */
38105
+ /** What a hook is told about the deletion. */
38106
+ var DeviceRemovedInputSchema = object({
38107
+ deviceId: number().int().positive(),
38108
+ /** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
38109
+ deletedAt: number(),
38110
+ /** The addon that owned the device, as device-manager last knew it. */
38111
+ providerAddonId: string()
38112
+ });
38113
+ /** Rows/files/refs deleted, per store this implementer owns. */
38114
+ var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
38115
+ /** One (store, device) pair an implementer holds data for. */
38116
+ var DeviceDataEntrySchema = object({
38117
+ store: string(),
38118
+ deviceId: number().int().positive(),
38119
+ /** Rows (or files) held for the device in the store. */
38120
+ count: number().int().nonnegative()
38121
+ });
38122
+ method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
38123
+ kind: "mutation",
38124
+ auth: "admin"
38125
+ }), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
38126
+ /**
38001
38127
  * `failure-contribution` — the capability an addon reports its OWN losses
38002
38128
  * through, per camera, with the denominator attached. It stores nothing.
38003
38129
  *
@@ -54517,7 +54643,19 @@ var TlsStatusSchema = object({
54517
54643
  sans: array(string()),
54518
54644
  caCertPem: string().nullable(),
54519
54645
  reissueError: string().nullable(),
54520
- restartRequired: boolean()
54646
+ restartRequired: boolean(),
54647
+ /** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
54648
+ caMissing: boolean(),
54649
+ /** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
54650
+ localCaConstrained: boolean().nullable(),
54651
+ /** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
54652
+ caReplacedAt: string().nullable(),
54653
+ /** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
54654
+ storedUpload: object({
54655
+ leafFingerprintSha256: string(),
54656
+ validTo: string(),
54657
+ hasCa: boolean()
54658
+ }).nullable()
54521
54659
  });
54522
54660
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
54523
54661
  /**
@@ -54573,6 +54711,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
54573
54711
  }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
54574
54712
  kind: "mutation",
54575
54713
  auth: "admin"
54714
+ }), method(_void(), TlsStatusSchema, {
54715
+ kind: "mutation",
54716
+ auth: "admin"
54576
54717
  });
54577
54718
  object({
54578
54719
  /** Lifecycle state of the lock. `jammed` means the motor reported
@@ -62497,6 +62638,12 @@ Object.freeze({
62497
62638
  addonId: null,
62498
62639
  access: "create"
62499
62640
  },
62641
+ "deviceManager.cleanupDeletedDevicesData": {
62642
+ capName: "device-manager",
62643
+ capScope: "system",
62644
+ addonId: null,
62645
+ access: "create"
62646
+ },
62500
62647
  "deviceManager.createDevice": {
62501
62648
  capName: "device-manager",
62502
62649
  capScope: "system",
@@ -62677,6 +62824,12 @@ Object.freeze({
62677
62824
  addonId: null,
62678
62825
  access: "view"
62679
62826
  },
62827
+ "deviceManager.listDeletedSince": {
62828
+ capName: "device-manager",
62829
+ capScope: "system",
62830
+ addonId: null,
62831
+ access: "view"
62832
+ },
62680
62833
  "deviceManager.listDeviceIdsByCaps": {
62681
62834
  capName: "device-manager",
62682
62835
  capScope: "system",
@@ -63085,6 +63238,18 @@ Object.freeze({
63085
63238
  addonId: null,
63086
63239
  access: "create"
63087
63240
  },
63241
+ "deviceRemovalHook.listDeviceData": {
63242
+ capName: "device-removal-hook",
63243
+ capScope: "system",
63244
+ addonId: null,
63245
+ access: "view"
63246
+ },
63247
+ "deviceRemovalHook.onDeviceRemoved": {
63248
+ capName: "device-removal-hook",
63249
+ capScope: "system",
63250
+ addonId: null,
63251
+ access: "create"
63252
+ },
63088
63253
  "deviceState.claimFields": {
63089
63254
  capName: "device-state",
63090
63255
  capScope: "system",
@@ -63517,6 +63682,12 @@ Object.freeze({
63517
63682
  addonId: null,
63518
63683
  access: "delete"
63519
63684
  },
63685
+ "keychain.deleteDeviceScope": {
63686
+ capName: "keychain",
63687
+ capScope: "system",
63688
+ addonId: null,
63689
+ access: "delete"
63690
+ },
63520
63691
  "keychain.getState": {
63521
63692
  capName: "keychain",
63522
63693
  capScope: "system",
@@ -63955,6 +64126,12 @@ Object.freeze({
63955
64126
  addonId: null,
63956
64127
  access: "create"
63957
64128
  },
64129
+ "localNetwork.useStoredUploadedCertificate": {
64130
+ capName: "local-network",
64131
+ capScope: "system",
64132
+ addonId: null,
64133
+ access: "create"
64134
+ },
63958
64135
  "lockControl.getStatus": {
63959
64136
  capName: "lock-control",
63960
64137
  capScope: "device",
@@ -69529,6 +69706,11 @@ Object.freeze({
69529
69706
  form: "single",
69530
69707
  optional: false
69531
69708
  }],
69709
+ "deviceRemovalHook.onDeviceRemoved": [{
69710
+ name: "deviceId",
69711
+ form: "single",
69712
+ optional: false
69713
+ }],
69532
69714
  "deviceState.claimFields": [{
69533
69715
  name: "deviceId",
69534
69716
  form: "single",
@@ -69718,6 +69900,11 @@ Object.freeze({
69718
69900
  form: "single",
69719
69901
  optional: false
69720
69902
  }],
69903
+ "keychain.deleteDeviceScope": [{
69904
+ name: "deviceId",
69905
+ form: "single",
69906
+ optional: false
69907
+ }],
69721
69908
  "lawnMowerControl.dock": [{
69722
69909
  name: "deviceId",
69723
69910
  form: "single",
@@ -72066,6 +72253,8 @@ new Set([
72066
72253
  "audio-tools",
72067
72254
  "audio-silence"
72068
72255
  ]);
72256
+ AppPageLangSchema.options;
72257
+ record(string().min(1), string());
72069
72258
  /**
72070
72259
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
72071
72260
  *
@@ -72501,7 +72690,7 @@ var AgentUIAddon = class extends BaseAddon {
72501
72690
  capability: adminUiCapability,
72502
72691
  provider: {
72503
72692
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
72504
- getVersion: async () => ({ version: "1.2.235" })
72693
+ getVersion: async () => ({ version: "1.2.237" })
72505
72694
  }
72506
72695
  }];
72507
72696
  }