@camstack/addon-pipeline-orchestrator 1.2.708 → 1.2.710

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/index.js CHANGED
@@ -6154,7 +6154,7 @@ var ZodIssueCode = {
6154
6154
  var ZodFirstPartyTypeKind;
6155
6155
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6156
6156
  //#endregion
6157
- //#region ../types/dist/runtime-capabilities-B36VcCR6.mjs
6157
+ //#region ../types/dist/runtime-capabilities-CK6y0W5U.mjs
6158
6158
  /**
6159
6159
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6160
6160
  * window to float samples (D455).
@@ -6249,6 +6249,57 @@ var AddonMigrationsBlockedError = class extends Error {
6249
6249
  this.migrationIds = migrationIds;
6250
6250
  }
6251
6251
  };
6252
+ var SWITCHES = /* @__PURE__ */ new Map();
6253
+ /** The ids the registry is known to hold a row for (hydrated, or told by the hub). */
6254
+ var ROWS = /* @__PURE__ */ new Set();
6255
+ /** The owner addon of an id, learned from its rows and from the helper that serves it. */
6256
+ var OWNER_OF = /* @__PURE__ */ new Map();
6257
+ /** The addons whose registry read answered at least once. */
6258
+ var ANSWERED = /* @__PURE__ */ new Set();
6259
+ /** The addons whose boot has begun reading the registry: only they can be held back. */
6260
+ var HYDRATING = /* @__PURE__ */ new Set();
6261
+ /**
6262
+ * The addons that serve an instance kind and have not been answered by the registry yet. Scoped
6263
+ * per owner: one addon's failed read never turns off another addon's instances, and an addon that
6264
+ * serves no instance kind never enters it.
6265
+ */
6266
+ var PENDING = /* @__PURE__ */ new Set();
6267
+ /**
6268
+ * An addon's boot is about to read the registry for its rows. From now on, until the registry
6269
+ * answers, its served instance kinds (already built or built later in its boot) fail closed. A
6270
+ * helper used with no addon boot around it (a spec, a tool) is never held back.
6271
+ */
6272
+ function beginHydration(ownerId) {
6273
+ if (ANSWERED.has(ownerId)) return;
6274
+ HYDRATING.add(ownerId);
6275
+ if (KINDS.has(ownerId)) PENDING.add(ownerId);
6276
+ }
6277
+ /** Whether `ownerId` still waits for the registry to answer (it serves a kind and has no rows yet). */
6278
+ function isHydrationPending(ownerId) {
6279
+ return PENDING.has(ownerId);
6280
+ }
6281
+ /** Record what the hub told: the registry holds a row of `id` in this state. */
6282
+ function recordRegistrySwitch(id, enabled) {
6283
+ SWITCHES.set(id, enabled);
6284
+ ROWS.add(id);
6285
+ }
6286
+ /** Seed the store from the registry rows of `ownerId`; the registry answered, so the owner is known. */
6287
+ function hydrateInstanceSwitches(ownerId, rows) {
6288
+ ANSWERED.add(ownerId);
6289
+ for (const row of rows) {
6290
+ recordRegistrySwitch(row.id, row.enabled);
6291
+ OWNER_OF.set(row.id, ownerId);
6292
+ }
6293
+ }
6294
+ /** The addon's boot has built every instance kind and read the registry: unknown ids now read on. */
6295
+ function settleHydration(ownerId) {
6296
+ PENDING.delete(ownerId);
6297
+ }
6298
+ var KINDS = /* @__PURE__ */ new Map();
6299
+ /** The instance kinds announced for `ownerId` so far. */
6300
+ function servedInstanceKindsOf(ownerId) {
6301
+ return [...KINDS.get(ownerId)?.values() ?? []];
6302
+ }
6252
6303
  /** Is this field's stored value a credential? */
6253
6304
  function isSecretConfigField(field) {
6254
6305
  if (field.type === "password") return true;
@@ -6938,6 +6989,32 @@ function switchRecordsOverMigrationApi(api) {
6938
6989
  };
6939
6990
  } };
6940
6991
  }
6992
+ /** The record calls the body-to-registry switch migration makes, over the migration API. */
6993
+ function bodySwitchRecordsOverMigrationApi(api) {
6994
+ return { kind: (definition) => {
6995
+ const handle = api.records.kind(definition);
6996
+ return {
6997
+ query: async () => {
6998
+ const rows = [];
6999
+ let cursor;
7000
+ do {
7001
+ const page = await handle.query({
7002
+ limit: 500,
7003
+ ...cursor === void 0 ? {} : { cursor }
7004
+ });
7005
+ rows.push(...page.records);
7006
+ cursor = page.nextCursor ?? void 0;
7007
+ } while (cursor !== void 0);
7008
+ return { records: rows };
7009
+ },
7010
+ get: (id) => handle.get({ id }),
7011
+ put: (input, opts) => handle.put({
7012
+ ...input,
7013
+ ...opts?.ifRev === void 0 ? {} : { ifRev: opts.ifRev }
7014
+ })
7015
+ };
7016
+ } };
7017
+ }
6941
7018
  function integrationRowsApiOver(api) {
6942
7019
  return {
6943
7020
  list: async () => (await api.integrations.list({})).integrations,
@@ -7150,7 +7227,10 @@ function secretArrayPrefixes(path) {
7150
7227
  }
7151
7228
  return prefixes;
7152
7229
  }
7153
- /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
7230
+ /**
7231
+ * The body key the switch USED to live under (D1007, D1015). Nothing writes or reads it any more;
7232
+ * the migrations that move it between the body and the registry name it.
7233
+ */
7154
7234
  var SWITCH_KEY = "enabled";
7155
7235
  /**
7156
7236
  * The one-switch migration (epic #440, step 3). An integration's on/off state used to live in the
@@ -7260,6 +7340,107 @@ function registrySwitchPortsOver(deps) {
7260
7340
  };
7261
7341
  }
7262
7342
  /**
7343
+ * The switch comes back to the registry (D1066), the reverse of {@link registrySwitchToBodyMigration}.
7344
+ * An instance's on/off state lived in its record body (`enabled`, D1007 superseded by D1015); the hub
7345
+ * registry row, keyed by (addon, integration id) like a device, is now the only stored switch.
7346
+ *
7347
+ * For every record of the addon's kind:
7348
+ * - the state is the body's `enabled` (absent means on). When the registry row of that id disagrees,
7349
+ * the BODY wins: it was the only live copy while the body held the switch, and the registry
7350
+ * column of a migrated row was never read;
7351
+ * - a record with no registry row gets one (a services instance, under its addon-minted id);
7352
+ * - the key is then removed from the body, so no second copy remains.
7353
+ * A rerun finds no body that states `enabled` and writes nothing. The registry write goes first, so
7354
+ * a crash between the two steps repeats the pair (idempotent) and never loses a switched-off state.
7355
+ *
7356
+ * It runs in the addon process, after {@link registrySwitchToBodyMigration}, BEFORE the addon
7357
+ * registers its provider.
7358
+ */
7359
+ function bodySwitchToRegistryId(addonId, date, kindName) {
7360
+ return `${addonId}/${date}-body-switch-to-registry-${kindName}`;
7361
+ }
7362
+ async function moveBodySwitchToRegistry(ports, spec) {
7363
+ const records = await ports.listRecords();
7364
+ const adopted = records.length === 0 ? {
7365
+ created: 0,
7366
+ updated: 0,
7367
+ conflicts: []
7368
+ } : await ports.adoptRows(spec.addonId, records.map((r) => ({
7369
+ id: r.id,
7370
+ name: r.name,
7371
+ enabled: r.enabled,
7372
+ stated: r.stated
7373
+ })));
7374
+ const foreign = new Map(adopted.conflicts.map((c) => [c.id, c.ownerAddonId]));
7375
+ for (const [id, owner] of foreign) await ports.warn(`body switch kept: the registry row "${id}" belongs to addon "${owner}", not "${spec.addonId}"`);
7376
+ const stated = records.filter((r) => r.stated && !foreign.has(r.id));
7377
+ for (const row of stated) await ports.stripSwitch(row.id);
7378
+ const summary = {
7379
+ records: records.length,
7380
+ stripped: stated.length,
7381
+ rowsCreated: adopted.created,
7382
+ rowsCorrected: adopted.updated,
7383
+ conflicts: adopted.conflicts.length
7384
+ };
7385
+ return stated.length === 0 && adopted.created === 0 && adopted.updated === 0 ? {
7386
+ outcome: "already-done",
7387
+ summary
7388
+ } : {
7389
+ outcome: "done",
7390
+ summary
7391
+ };
7392
+ }
7393
+ /** A migration entry: an addon states its kind, nothing else. */
7394
+ function bodySwitchToRegistryMigration(spec) {
7395
+ return {
7396
+ meta: {
7397
+ id: bodySwitchToRegistryId(spec.addonId, spec.date, spec.kindName),
7398
+ owner: spec.addonId,
7399
+ level: "addon-state",
7400
+ seq: spec.seq,
7401
+ dependsOn: spec.followsDate === void 0 ? [] : [registrySwitchToBodyId(spec.addonId, spec.followsDate)],
7402
+ store: "settings",
7403
+ scope: "cluster",
7404
+ onFailure: "block-owner",
7405
+ bodyKind: "procedure",
7406
+ description: "Move the switch of every instance record back to its registry row (creating the row of a services instance) and remove it from the body",
7407
+ fixtureMark: "enabled"
7408
+ },
7409
+ procedure: (ports) => moveBodySwitchToRegistry(ports, { addonId: spec.addonId })
7410
+ };
7411
+ }
7412
+ function bodySwitchPortsOver(deps) {
7413
+ const handle = deps.records.kind({
7414
+ name: deps.kind.name,
7415
+ declaration: deps.kind.declaration,
7416
+ schema: record(string(), unknown())
7417
+ });
7418
+ return {
7419
+ listRecords: async () => {
7420
+ return (await handle.query({ limit: 1e3 })).records.map((r) => {
7421
+ const name = r.data[deps.nameField];
7422
+ return {
7423
+ id: r.id,
7424
+ name: typeof name === "string" ? name : r.id,
7425
+ enabled: r.data[SWITCH_KEY] !== false,
7426
+ stated: SWITCH_KEY in r.data
7427
+ };
7428
+ });
7429
+ },
7430
+ adoptRows: deps.adopt,
7431
+ warn: deps.warn,
7432
+ stripSwitch: async (id) => {
7433
+ const row = await handle.get(id);
7434
+ if (row === null || !("enabled" in row.data)) return;
7435
+ const { [SWITCH_KEY]: _dropped, ...rest } = row.data;
7436
+ await handle.put({
7437
+ id,
7438
+ data: rest
7439
+ }, { ifRev: row.rev });
7440
+ }
7441
+ };
7442
+ }
7443
+ /**
7263
7444
  * Build a {@link DurableState} over a single store key. Transport-agnostic:
7264
7445
  * `read`/`write` are the addon-store or device-store accessors. The whole
7265
7446
  * validated value round-trips on every read/write — the schema is the
@@ -7291,6 +7472,20 @@ function createDurableState(deps) {
7291
7472
  };
7292
7473
  }
7293
7474
  /**
7475
+ * The registry could not be read for the switches of an addon that serves instance kinds, so its
7476
+ * instances read off (D1066). A forked runner treats it as a failed boot: the supervisor respawns
7477
+ * it, bounded and marked terminally failed (D6), rather than leave instances off silently.
7478
+ */
7479
+ var INSTANCE_SWITCHES_UNREAD_ERROR_NAME = "InstanceSwitchesUnreadError";
7480
+ var InstanceSwitchesUnreadError = class extends Error {
7481
+ ownerId;
7482
+ constructor(ownerId) {
7483
+ super(`'${ownerId}': the registry did not answer for the instance switches; its instances stay off`);
7484
+ this.ownerId = ownerId;
7485
+ this.name = INSTANCE_SWITCHES_UNREAD_ERROR_NAME;
7486
+ }
7487
+ };
7488
+ /**
7294
7489
  * Per-node scoping for the shared addon-settings blob.
7295
7490
  *
7296
7491
  * An addon's settings store is hub-central (the `addon-settings` cap is
@@ -8274,7 +8469,14 @@ var BaseAddon = class {
8274
8469
  if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
8275
8470
  if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
8276
8471
  });
8472
+ await this.hydrateSwitches();
8277
8473
  const result = await this.onInitialize();
8474
+ await this.moveLateInstanceKinds();
8475
+ await this.adoptUnrowed();
8476
+ if (this.switchesHydrated) {
8477
+ settleHydration(this.ctx.id);
8478
+ for (const served of servedInstanceKindsOf(this.ctx.id)) await served.reapply();
8479
+ }
8278
8480
  this.emitLifecycle(EventCategory.AddonStarted);
8279
8481
  const normalized = normalizeAddonInitResult(result);
8280
8482
  const providers = normalized && "providers" in normalized && normalized.providers ? normalized.providers : [];
@@ -8314,17 +8516,22 @@ var BaseAddon = class {
8314
8516
  this.retiredMigrationIds = ids;
8315
8517
  }
8316
8518
  registrySwitchSpec = null;
8519
+ /** The instance kinds whose switch move this process already ran (or tried), by record kind name. */
8520
+ switchMoved = /* @__PURE__ */ new Set();
8521
+ lastDeclared = [];
8317
8522
  registrySwitchBound() {
8318
- const spec = this.registrySwitchSpec;
8319
- if (spec === null) return [];
8320
8523
  const api = this.ctx.migrationApi;
8524
+ const spec = this.registrySwitchSpec;
8525
+ const kinds = servedInstanceKindsOf(this.ctx.id).filter((k) => !this.switchMoved.has(k.kind.name));
8526
+ if (spec === null && kinds.length === 0) return [];
8321
8527
  if (api === void 0) {
8322
8528
  this.ctx.logger.warn("the registry switch migration is skipped: the migration API is not available on this context");
8323
8529
  return [];
8324
8530
  }
8325
- return migrationSet([registrySwitchToBodyMigration({
8531
+ const date = "2026-11-06";
8532
+ const moveIn = spec === null ? [] : migrationSet([registrySwitchToBodyMigration({
8326
8533
  addonId: this.ctx.id,
8327
- date: "2026-11-06",
8534
+ date,
8328
8535
  seq: 1e3,
8329
8536
  initialBody: spec.initialBody
8330
8537
  })], (a) => registrySwitchPortsOver({
@@ -8332,13 +8539,53 @@ var BaseAddon = class {
8332
8539
  records: switchRecordsOverMigrationApi(a),
8333
8540
  kind: spec.kind
8334
8541
  })).bind(api);
8542
+ const moveBack = kinds.flatMap(({ kind }, index) => {
8543
+ this.switchMoved.add(kind.name);
8544
+ return migrationSet([bodySwitchToRegistryMigration({
8545
+ addonId: this.ctx.id,
8546
+ date: "2026-11-19",
8547
+ seq: 1001 + index,
8548
+ kindName: kind.name,
8549
+ ...spec === null ? {} : { followsDate: date }
8550
+ })], (a) => bodySwitchPortsOver({
8551
+ records: bodySwitchRecordsOverMigrationApi(a),
8552
+ kind,
8553
+ nameField: kind.declaration.entry?.nameField ?? "name",
8554
+ adopt: (addonId, rows) => this.ctx.api.integrations.adoptInstanceRows.mutate({
8555
+ addonId,
8556
+ rows: [...rows]
8557
+ }),
8558
+ warn: async (message) => {
8559
+ await a.log.warn({ message });
8560
+ }
8561
+ })).bind(api);
8562
+ });
8563
+ return [...moveIn, ...moveBack];
8564
+ }
8565
+ /**
8566
+ * A helper built AFTER the addon's migrations ran has a kind that moved nothing yet. Run its
8567
+ * switch move now (the engine replaces an owner's catalogue on every declare, so the whole
8568
+ * declared set goes with it, phased to the late ids), read the registry again, and tell the
8569
+ * addon about every instance that is off so it stops what it started on the default.
8570
+ */
8571
+ async moveLateInstanceKinds() {
8572
+ const late = servedInstanceKindsOf(this.ctx.id).filter((k) => !this.switchMoved.has(k.kind.name));
8573
+ if (late.length === 0) return;
8574
+ try {
8575
+ const only = late.map((k) => bodySwitchToRegistryId(this.ctx.id, "2026-11-19", k.kind.name));
8576
+ await this.runBound(this.lastDeclared, { only });
8577
+ } catch (err) {
8578
+ if (err instanceof AddonMigrationsBlockedError) throw err;
8579
+ this.ctx.logger.error("the late instance switch move failed", { meta: { error: errMsg$2(err) } });
8580
+ }
8335
8581
  }
8336
8582
  async runBound(declared, options) {
8583
+ this.lastDeclared = declared;
8337
8584
  const added = this.registrySwitchBound();
8338
8585
  const migrations = [...declared, ...added];
8339
8586
  const widened = options?.only === void 0 || added.length === 0 ? options : {
8340
8587
  ...options,
8341
- only: [...options.only, ...added.map((m) => m.meta.id)]
8588
+ only: [...new Set([...options.only, ...added.map((m) => m.meta.id)])]
8342
8589
  };
8343
8590
  const phased = this.retiredMigrationIds.length === 0 ? widened ?? {} : {
8344
8591
  ...widened,
@@ -8351,9 +8598,87 @@ var BaseAddon = class {
8351
8598
  finishMigration: (input) => api.finishMigration.mutate(input)
8352
8599
  }, migrations, this.ctx.logger, phased);
8353
8600
  if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
8601
+ await this.hydrateSwitches();
8602
+ await this.adoptUnrowed();
8354
8603
  return report;
8355
8604
  }
8356
8605
  /**
8606
+ * Learn the on/off state of this addon's instances from the registry rows (D1066), at boot, after
8607
+ * a migration run, and again through {@link rehydrateSwitches}. It runs on the addon's own boot
8608
+ * path, never inside a method the hub calls into. A registry that cannot answer leaves the
8609
+ * instances of THIS addon reading off (fail closed, per owner) until a read answers.
8610
+ */
8611
+ switchesHydrated = false;
8612
+ async hydrateSwitches() {
8613
+ beginHydration(this.ctx.id);
8614
+ try {
8615
+ const rows = await this.ctx.api.integrations.listByAddon.query({ addonId: this.ctx.id });
8616
+ hydrateInstanceSwitches(this.ctx.id, rows);
8617
+ this.switchesHydrated = true;
8618
+ return true;
8619
+ } catch (err) {
8620
+ this.ctx.logger.warn("instance switches not read from the registry: instances stay off", { meta: { error: errMsg$2(err) } });
8621
+ return false;
8622
+ }
8623
+ }
8624
+ /**
8625
+ * Every record of a served kind the registry holds no row for (created outside the hub door:
8626
+ * a seed, a store write) is adopted with the state it effectively had, on unless this process
8627
+ * stated it off, so the hub can switch it. A failure is logged; the next hydration retries.
8628
+ */
8629
+ async adoptUnrowed() {
8630
+ if (!this.switchesHydrated) return;
8631
+ try {
8632
+ for (const served of servedInstanceKindsOf(this.ctx.id)) {
8633
+ const rows = await served.unrowed();
8634
+ if (rows.length === 0) continue;
8635
+ await this.ctx.api.integrations.adoptInstanceRows.mutate({
8636
+ addonId: this.ctx.id,
8637
+ rows: rows.map((r) => ({
8638
+ id: r.id,
8639
+ name: r.name,
8640
+ enabled: r.enabled,
8641
+ stated: false
8642
+ }))
8643
+ });
8644
+ for (const r of rows) recordRegistrySwitch(r.id, r.enabled);
8645
+ }
8646
+ } catch (err) {
8647
+ this.ctx.logger.warn("records without a registry row were not adopted", { meta: { error: errMsg$2(err) } });
8648
+ }
8649
+ }
8650
+ /**
8651
+ * Read the switches from the registry again and announce the states now known, so an addon that
8652
+ * started on the fail-closed default (off) starts what is on. Throws
8653
+ * {@link InstanceSwitchesUnreadError} when the registry still does not answer while this addon
8654
+ * serves instance kinds: a forked runner turns that into a failed boot (the supervisor respawns
8655
+ * it, bounded, D6), an agent or the hub reads again on the next hub connect (event-driven, D3).
8656
+ * An addon with no instance kind has nothing waiting and never throws.
8657
+ */
8658
+ async rehydrateSwitches() {
8659
+ if (this._ctx === null) return;
8660
+ if (await this.hydrateSwitches()) {
8661
+ await this.adoptUnrowed();
8662
+ settleHydration(this.ctx.id);
8663
+ for (const served of servedInstanceKindsOf(this.ctx.id)) await served.reapply();
8664
+ return;
8665
+ }
8666
+ if (isHydrationPending(this.ctx.id)) throw new InstanceSwitchesUnreadError(this.ctx.id);
8667
+ }
8668
+ /**
8669
+ * Called on the hub-reachable event (instead of `onHubReachable` directly): the switches are
8670
+ * read again, then `onHubReachable` runs. A registry that still does not answer is logged and
8671
+ * left for the next connect.
8672
+ */
8673
+ async hubReachable() {
8674
+ try {
8675
+ await this.rehydrateSwitches();
8676
+ } catch (err) {
8677
+ this.ctx.logger.warn("instance switches still unread at the hub connect", { meta: { error: errMsg$2(err) } });
8678
+ }
8679
+ await this.onHubReachable();
8680
+ }
8681
+ /**
8357
8682
  * Called by the isolated-process runner AFTER `broker.start()`.
8358
8683
  * In-process addons never need this because the hub broker is already
8359
8684
  * running when `initialize()` fires. For forked children the broker
@@ -19897,6 +20222,45 @@ var CAP_VOCABULARY_BY_NAME = {
19897
20222
  }
19898
20223
  ],
19899
20224
  icon: "battery-charging"
20225
+ },
20226
+ {
20227
+ kind: "enum",
20228
+ field: "chargeState",
20229
+ label: {
20230
+ en: "Charge state",
20231
+ it: "Stato di carica"
20232
+ },
20233
+ values: [
20234
+ {
20235
+ value: "charging",
20236
+ label: {
20237
+ en: "Charging",
20238
+ it: "In carica"
20239
+ }
20240
+ },
20241
+ {
20242
+ value: "full",
20243
+ label: {
20244
+ en: "Full",
20245
+ it: "Carica completa"
20246
+ }
20247
+ },
20248
+ {
20249
+ value: "idle",
20250
+ label: {
20251
+ en: "Not charging",
20252
+ it: "Non in carica"
20253
+ }
20254
+ },
20255
+ {
20256
+ value: "unknown",
20257
+ label: {
20258
+ en: "Unknown",
20259
+ it: "Sconosciuto"
20260
+ }
20261
+ }
20262
+ ],
20263
+ icon: "battery-charging"
19900
20264
  }
19901
20265
  ],
19902
20266
  events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
@@ -21166,6 +21530,24 @@ Object.freeze({
21166
21530
  "path": "voltage",
21167
21531
  "valueType": "number"
21168
21532
  },
21533
+ {
21534
+ "path": "chargeState",
21535
+ "valueType": "enum",
21536
+ "enumValues": [
21537
+ "charging",
21538
+ "full",
21539
+ "idle",
21540
+ "unknown"
21541
+ ]
21542
+ },
21543
+ {
21544
+ "path": "currentMa",
21545
+ "valueType": "number"
21546
+ },
21547
+ {
21548
+ "path": "temperatureC",
21549
+ "valueType": "number"
21550
+ },
21169
21551
  {
21170
21552
  "path": "lastContactAt",
21171
21553
  "valueType": "number"
@@ -23281,6 +23663,650 @@ Object.freeze({
23281
23663
  }
23282
23664
  ]
23283
23665
  });
23666
+ Object.freeze({
23667
+ "air-quality-sensor": {
23668
+ "aqi": "optional",
23669
+ "co2": "optional",
23670
+ "lastFetchedAt": "required",
23671
+ "pm10": "optional",
23672
+ "pm25": "optional",
23673
+ "voc": "optional"
23674
+ },
23675
+ "alarm-panel": {
23676
+ "availableModes": "required",
23677
+ "codeRequired": "required",
23678
+ "lastChangedAt": "required",
23679
+ "state": "required",
23680
+ "targetMode": "optional"
23681
+ },
23682
+ "ambient-light-sensor": {
23683
+ "illuminance": "required",
23684
+ "lastFetchedAt": "required"
23685
+ },
23686
+ "audio-metrics": {
23687
+ "avgDbfs": "required",
23688
+ "byClass": "required",
23689
+ "current": "required",
23690
+ "level": "required",
23691
+ "peakDbfs": "required",
23692
+ "ts": "required",
23693
+ "windowSec": "required"
23694
+ },
23695
+ "automation-control": {
23696
+ "enabled": "required",
23697
+ "isRunning": "required",
23698
+ "lastChangedAt": "required",
23699
+ "lastError": "required",
23700
+ "lastTriggeredAt": "required"
23701
+ },
23702
+ "battery": {
23703
+ "binary": "optional",
23704
+ "chargeState": "optional",
23705
+ "charging": "required",
23706
+ "currentMa": "optional",
23707
+ "lastContactAt": "optional",
23708
+ "lastFullRefreshAt": "optional",
23709
+ "lastUpdated": "required",
23710
+ "level": "required",
23711
+ "sleeping": "required",
23712
+ "temperatureC": "optional",
23713
+ "voltage": "optional"
23714
+ },
23715
+ "binary": {
23716
+ "lastChangedAt": "required",
23717
+ "on": "required"
23718
+ },
23719
+ "brightness": {
23720
+ "lastChangedAt": "required",
23721
+ "level": "required"
23722
+ },
23723
+ "camera-streams": {
23724
+ "lastChangedAt": "required",
23725
+ "online": "required",
23726
+ "slotErrors": "required",
23727
+ "slotStatuses": "required"
23728
+ },
23729
+ "carbon-monoxide": {
23730
+ "detected": "required",
23731
+ "lastChangedAt": "required"
23732
+ },
23733
+ "climate-control": {
23734
+ "action": "optional",
23735
+ "availableFanModes": "required",
23736
+ "availableModes": "required",
23737
+ "availablePresets": "required",
23738
+ "currentHumidity": "required",
23739
+ "currentTemp": "required",
23740
+ "fanMode": "required",
23741
+ "lastActiveMode": "optional",
23742
+ "lastFetchedAt": "required",
23743
+ "maxTemp": "optional",
23744
+ "minTemp": "optional",
23745
+ "mode": "required",
23746
+ "preset": "required",
23747
+ "swingHorizontal": "required",
23748
+ "swingVertical": "required",
23749
+ "target": "required",
23750
+ "targetHigh": "required",
23751
+ "targetHumidity": "required",
23752
+ "targetLow": "required",
23753
+ "tempStep": "optional"
23754
+ },
23755
+ "color": {
23756
+ "colorTemperature": "optional",
23757
+ "hsv": "optional",
23758
+ "lastChangedAt": "required",
23759
+ "mode": "required",
23760
+ "rgb": "optional"
23761
+ },
23762
+ "connectivity": {
23763
+ "connected": "required",
23764
+ "lastChangedAt": "required"
23765
+ },
23766
+ "consumables": {
23767
+ "items": "required",
23768
+ "lastChangedAt": "required",
23769
+ "lastFetchedAt": "required"
23770
+ },
23771
+ "contact": {
23772
+ "entryOpen": "required",
23773
+ "lastChangedAt": "required"
23774
+ },
23775
+ "control": {
23776
+ "kind": "required",
23777
+ "lastChangedAt": "required",
23778
+ "max": "optional",
23779
+ "min": "optional",
23780
+ "options": "required",
23781
+ "step": "optional",
23782
+ "value": "required"
23783
+ },
23784
+ "cover": {
23785
+ "lastChangedAt": "required",
23786
+ "position": "required",
23787
+ "state": "required",
23788
+ "tiltPosition": "required"
23789
+ },
23790
+ "day-night": {
23791
+ "lastFetchedAt": "required",
23792
+ "mode": "required",
23793
+ "sensitivity": "optional",
23794
+ "switchDelaySec": "optional"
23795
+ },
23796
+ "device-status": {
23797
+ "lastChangedAt": "required",
23798
+ "online": "required"
23799
+ },
23800
+ "dishwasher": {
23801
+ "activeEvents": "required",
23802
+ "availability": "required",
23803
+ "availablePrograms": "required",
23804
+ "childLock": "required",
23805
+ "delayedStart": "required",
23806
+ "doorLocked": "required",
23807
+ "doorOpen": "required",
23808
+ "errorCode": "required",
23809
+ "errorLabel": "required",
23810
+ "extraDry": "required",
23811
+ "filterCleaningDue": "required",
23812
+ "halfLoad": "required",
23813
+ "hygienePlus": "required",
23814
+ "intensiveZone": "required",
23815
+ "lastFetchedAt": "required",
23816
+ "localControlActive": "required",
23817
+ "machineCareDue": "required",
23818
+ "machineCareRemainingRuns": "required",
23819
+ "operationState": "required",
23820
+ "powerOn": "required",
23821
+ "powerState": "required",
23822
+ "program": "required",
23823
+ "progress": "required",
23824
+ "remaining": "required",
23825
+ "remoteControlActive": "required",
23826
+ "remoteStartAllowed": "required",
23827
+ "selectedProgram": "required",
23828
+ "state": "required",
23829
+ "varioSpeedPlus": "required"
23830
+ },
23831
+ "do-not-disturb": {
23832
+ "enabled": "required",
23833
+ "lastChangedAt": "required"
23834
+ },
23835
+ "doorbell": {
23836
+ "lastPressedAt": "required",
23837
+ "pressCountSinceStart": "required"
23838
+ },
23839
+ "energy-system": {
23840
+ "grid": "required",
23841
+ "heatPump": "required",
23842
+ "house": "required",
23843
+ "lastFetchedAt": "required",
23844
+ "solar": "required",
23845
+ "storage": "required"
23846
+ },
23847
+ "enum-sensor": {
23848
+ "lastFetchedAt": "required",
23849
+ "timestamp": "optional",
23850
+ "value": "required"
23851
+ },
23852
+ "error": {
23853
+ "active": "required",
23854
+ "code": "required",
23855
+ "faults": "optional",
23856
+ "label": "required",
23857
+ "lastFetchedAt": "required",
23858
+ "severity": "required",
23859
+ "since": "required"
23860
+ },
23861
+ "event-emitter": {
23862
+ "eventCountSinceStart": "required",
23863
+ "eventTypes": "required",
23864
+ "lastEvent": "required",
23865
+ "vocabulary": "optional"
23866
+ },
23867
+ "fan-control": {
23868
+ "availablePresets": "required",
23869
+ "direction": "required",
23870
+ "lastChangedAt": "required",
23871
+ "oscillating": "required",
23872
+ "oscillationAxes": "optional",
23873
+ "percentageStep": "optional",
23874
+ "preset": "required",
23875
+ "speed": "required"
23876
+ },
23877
+ "feature-probe": {
23878
+ "channelCount": "required",
23879
+ "deviceType": "required",
23880
+ "flags": "required",
23881
+ "lastFetchedAt": "required",
23882
+ "lastProbedAt": "required",
23883
+ "model": "required"
23884
+ },
23885
+ "flood": {
23886
+ "flooded": "required",
23887
+ "lastChangedAt": "required"
23888
+ },
23889
+ "gas": {
23890
+ "detected": "required",
23891
+ "lastChangedAt": "required"
23892
+ },
23893
+ "group-active": {
23894
+ "active": "required",
23895
+ "lastChangedAt": "required"
23896
+ },
23897
+ "group-commands": { "results": "required" },
23898
+ "group-status": {
23899
+ "excluded": "required",
23900
+ "included": "required",
23901
+ "total": "required"
23902
+ },
23903
+ "heat-pump-status": {
23904
+ "circuits": "required",
23905
+ "energy": "required",
23906
+ "lastFetchedAt": "required",
23907
+ "power": "required",
23908
+ "starts": "required",
23909
+ "system": "required",
23910
+ "temperatures": "required",
23911
+ "waterPressureBar": "required"
23912
+ },
23913
+ "heating-valve": {
23914
+ "lastFetchedAt": "required",
23915
+ "position": "required"
23916
+ },
23917
+ "humidifier": {
23918
+ "action": "required",
23919
+ "availableModes": "required",
23920
+ "currentHumidity": "required",
23921
+ "lastChangedAt": "required",
23922
+ "maxHumidity": "required",
23923
+ "minHumidity": "required",
23924
+ "mode": "required",
23925
+ "on": "required",
23926
+ "targetHumidity": "required"
23927
+ },
23928
+ "humidity-sensor": {
23929
+ "humidity": "required",
23930
+ "lastFetchedAt": "required"
23931
+ },
23932
+ "image": {
23933
+ "lastUpdated": "required",
23934
+ "url": "required"
23935
+ },
23936
+ "image-settings": {
23937
+ "backlightMode": "optional",
23938
+ "brightness": "optional",
23939
+ "contrast": "optional",
23940
+ "exposureMode": "optional",
23941
+ "flip": "optional",
23942
+ "lastFetchedAt": "required",
23943
+ "mirror": "optional",
23944
+ "rotate": "optional",
23945
+ "saturation": "optional",
23946
+ "sharpness": "optional",
23947
+ "warmth": "optional",
23948
+ "whiteBalance": "optional"
23949
+ },
23950
+ "intercom": {
23951
+ "ability": "required",
23952
+ "lastSessionAt": "required",
23953
+ "talking": "required"
23954
+ },
23955
+ "ir-transmitter": {
23956
+ "lastFetchedAt": "required",
23957
+ "lastLearn": "required",
23958
+ "lastSend": "required"
23959
+ },
23960
+ "lawn-mower-control": {
23961
+ "activity": "required",
23962
+ "batteryLevel": "required",
23963
+ "currentCode": "required",
23964
+ "currentCodeLabel": "required",
23965
+ "lastChangedAt": "required",
23966
+ "progress": "required",
23967
+ "severity": "required"
23968
+ },
23969
+ "lock-control": {
23970
+ "codeRequired": "optional",
23971
+ "lastChangedAt": "required",
23972
+ "state": "required"
23973
+ },
23974
+ "low-power-sleep": {
23975
+ "lastContactAt": "optional",
23976
+ "lastUpdated": "required",
23977
+ "sleeping": "required"
23978
+ },
23979
+ "media-player": {
23980
+ "assumedFields": "optional",
23981
+ "availableSources": "required",
23982
+ "currentMedia": "required",
23983
+ "declaredSources": "optional",
23984
+ "duration": "required",
23985
+ "isMuted": "required",
23986
+ "lastChangedAt": "required",
23987
+ "muteReadback": "optional",
23988
+ "position": "required",
23989
+ "positionUpdatedAt": "optional",
23990
+ "repeat": "required",
23991
+ "shuffle": "required",
23992
+ "source": "required",
23993
+ "state": "required",
23994
+ "stateSource": "optional",
23995
+ "volumeLevel": "required"
23996
+ },
23997
+ "meter": {
23998
+ "lastFetchedAt": "required",
23999
+ "value": "required"
24000
+ },
24001
+ "motion": {
24002
+ "autoClearAfterMs": "required",
24003
+ "detected": "required",
24004
+ "lastDetectedAt": "required"
24005
+ },
24006
+ "motion-trigger": {
24007
+ "enabled": "required",
24008
+ "lastChangedAt": "required",
24009
+ "lastFetchedAt": "required"
24010
+ },
24011
+ "motion-zones": {
24012
+ "enabled": "required",
24013
+ "lastFetchedAt": "required",
24014
+ "regions": "required",
24015
+ "sensitivity": "required"
24016
+ },
24017
+ "native-object-detection": {
24018
+ "enabled": "required",
24019
+ "lastByClass": "required",
24020
+ "lastFetchedAt": "required",
24021
+ "supportedClasses": "required"
24022
+ },
24023
+ "navigation": {
24024
+ "flash": "required",
24025
+ "following": "required",
24026
+ "lastChangedAt": "required",
24027
+ "lastFetchedAt": "required",
24028
+ "lightLevel": "required",
24029
+ "lightMode": "required",
24030
+ "mode": "required"
24031
+ },
24032
+ "network-link": {
24033
+ "lastUpdated": "required",
24034
+ "linkUp": "optional",
24035
+ "rssi": "optional",
24036
+ "signal": "required",
24037
+ "speedKbps": "optional",
24038
+ "ssid": "optional",
24039
+ "type": "required"
24040
+ },
24041
+ "notifier": {
24042
+ "lastError": "required",
24043
+ "lastSentAt": "required",
24044
+ "queueDepth": "required",
24045
+ "supports": "required"
24046
+ },
24047
+ "numeric-sensor": {
24048
+ "lastFetchedAt": "required",
24049
+ "value": "required"
24050
+ },
24051
+ "pet-feeder": {
24052
+ "batteryPower": "required",
24053
+ "bowlFood": "required",
24054
+ "childLock": "required",
24055
+ "desiccantLeftDays": "required",
24056
+ "eating": "required",
24057
+ "error": "required",
24058
+ "errorCode": "required",
24059
+ "feeding": "required",
24060
+ "feedSound": "required",
24061
+ "food1": "required",
24062
+ "food2": "required",
24063
+ "foodLevel": "required",
24064
+ "indicatorLight": "required",
24065
+ "isDualHopper": "required",
24066
+ "lastFeedGrams": "required",
24067
+ "lastFeedHopper1": "required",
24068
+ "lastFeedHopper2": "required",
24069
+ "lastFetchedAt": "required",
24070
+ "lowFood": "required",
24071
+ "powerSource": "required",
24072
+ "status": "required",
24073
+ "supportsMarkRefilled": "required",
24074
+ "volume": "required"
24075
+ },
24076
+ "pet-fountain": {
24077
+ "empty": "required",
24078
+ "error": "required",
24079
+ "lastFetchedAt": "required",
24080
+ "pumpRunning": "required",
24081
+ "waterLevel": "required",
24082
+ "waterVolume": "required"
24083
+ },
24084
+ "power-meter": {
24085
+ "apparentPower": "optional",
24086
+ "current": "optional",
24087
+ "deliveredPower": "optional",
24088
+ "energy": "optional",
24089
+ "lastFetchedAt": "required",
24090
+ "power": "optional",
24091
+ "powerFactor": "optional",
24092
+ "voltage": "optional"
24093
+ },
24094
+ "power-source": {
24095
+ "lastFetchedAt": "required",
24096
+ "offSeconds": "required",
24097
+ "switchOn": "required"
24098
+ },
24099
+ "presence": {
24100
+ "gps": "required",
24101
+ "lastChangedAt": "required",
24102
+ "location": "required",
24103
+ "state": "required"
24104
+ },
24105
+ "pressure-sensor": {
24106
+ "lastFetchedAt": "required",
24107
+ "pressure": "required"
24108
+ },
24109
+ "privacy-mask": {
24110
+ "audioEnabled": "required",
24111
+ "enabled": "required",
24112
+ "lastFetchedAt": "required",
24113
+ "regions": "required"
24114
+ },
24115
+ "ptz-autotrack": {
24116
+ "currentSettings": "required",
24117
+ "enabled": "required",
24118
+ "lastChangedAt": "required",
24119
+ "lastFetchedAt": "required",
24120
+ "supportedTargetTypes": "required"
24121
+ },
24122
+ "pump-cycle": {
24123
+ "enabled": "required",
24124
+ "lastFetchedAt": "required",
24125
+ "offTime": "required",
24126
+ "onTime": "required"
24127
+ },
24128
+ "recording-onboard": {
24129
+ "enabled": "required",
24130
+ "lastFetchedAt": "required",
24131
+ "overwriteWhenFull": "required",
24132
+ "postRecordSec": "required",
24133
+ "preRecordSec": "required",
24134
+ "primaryTrackId": "required",
24135
+ "recordingToNowhere": "required",
24136
+ "segmentMinutes": "required",
24137
+ "storage": "required",
24138
+ "tracks": "required",
24139
+ "unreadableWindows": "required",
24140
+ "windows": "required"
24141
+ },
24142
+ "recording-signal": {
24143
+ "active": "required",
24144
+ "lastChangedAt": "required",
24145
+ "lastFetchedAt": "required",
24146
+ "reason": "required"
24147
+ },
24148
+ "running-state": {
24149
+ "lastFetchedAt": "required",
24150
+ "phase": "required",
24151
+ "running": "required",
24152
+ "since": "required",
24153
+ "source": "required"
24154
+ },
24155
+ "scene-monitor": {
24156
+ "lastFetchedAt": "required",
24157
+ "monitors": "required"
24158
+ },
24159
+ "script-runner": {
24160
+ "isRunning": "required",
24161
+ "lastChangedAt": "required",
24162
+ "lastError": "required",
24163
+ "lastRunAt": "required",
24164
+ "lastRunSuccess": "required"
24165
+ },
24166
+ "siren": {
24167
+ "active": "required",
24168
+ "activeUntil": "required",
24169
+ "activeUntilEstimated": "optional",
24170
+ "durationSeconds": "required",
24171
+ "lastFetchedAt": "required",
24172
+ "lastTriggeredAt": "required",
24173
+ "plays": "optional"
24174
+ },
24175
+ "smoke": {
24176
+ "detected": "required",
24177
+ "lastChangedAt": "required"
24178
+ },
24179
+ "stream-catalog": {
24180
+ "descriptors": "required",
24181
+ "lastFetchedAt": "required"
24182
+ },
24183
+ "stream-params": {
24184
+ "ext": "optional",
24185
+ "lastFetchedAt": "required",
24186
+ "main": "optional",
24187
+ "sub": "optional"
24188
+ },
24189
+ "stream-signals": {
24190
+ "lastFetchedAt": "required",
24191
+ "signals": "required"
24192
+ },
24193
+ "switch": {
24194
+ "lastChangedAt": "required",
24195
+ "on": "required"
24196
+ },
24197
+ "tamper": {
24198
+ "lastChangedAt": "required",
24199
+ "tampered": "required"
24200
+ },
24201
+ "temperature-sensor": {
24202
+ "lastFetchedAt": "required",
24203
+ "temperature": "required"
24204
+ },
24205
+ "timed-run": {
24206
+ "activeUntil": "required",
24207
+ "lastFetchedAt": "required",
24208
+ "quickRun": "required",
24209
+ "requestedBy": "required"
24210
+ },
24211
+ "update": {
24212
+ "availableVersion": "required",
24213
+ "currentVersion": "required",
24214
+ "inProgress": "required",
24215
+ "state": "required",
24216
+ "updatable": "required"
24217
+ },
24218
+ "vacuum-control": {
24219
+ "availableFanSpeeds": "required",
24220
+ "batteryLevel": "required",
24221
+ "errorCode": "required",
24222
+ "errorLabel": "required",
24223
+ "fanSpeed": "required",
24224
+ "lastChangedAt": "required",
24225
+ "progress": "required",
24226
+ "state": "required"
24227
+ },
24228
+ "valve": {
24229
+ "lastChangedAt": "required",
24230
+ "position": "required",
24231
+ "state": "required"
24232
+ },
24233
+ "vibration": {
24234
+ "detected": "required",
24235
+ "lastChangedAt": "required"
24236
+ },
24237
+ "water-heater": {
24238
+ "availableModes": "required",
24239
+ "away": "required",
24240
+ "currentTemp": "required",
24241
+ "lastActiveMode": "optional",
24242
+ "lastChangedAt": "required",
24243
+ "maxTemp": "required",
24244
+ "minTemp": "required",
24245
+ "operationMode": "required",
24246
+ "targetTemp": "required"
24247
+ },
24248
+ "weather": {
24249
+ "condition": "required",
24250
+ "humidity": "required",
24251
+ "lastFetchedAt": "required",
24252
+ "pressure": "required",
24253
+ "temperature": "required",
24254
+ "windBearing": "required",
24255
+ "windSpeed": "required"
24256
+ },
24257
+ "weather-station": {
24258
+ "dewPoint": "optional",
24259
+ "feelsLike": "optional",
24260
+ "humidity": "optional",
24261
+ "lastFetchedAt": "required",
24262
+ "pressure": "optional",
24263
+ "rain24h": "optional",
24264
+ "rainDaily": "optional",
24265
+ "rainEvent": "optional",
24266
+ "rainMonthly": "optional",
24267
+ "rainRate": "optional",
24268
+ "rainWeekly": "optional",
24269
+ "rainYearly": "optional",
24270
+ "solarRadiation": "optional",
24271
+ "temperature": "optional",
24272
+ "uv": "optional",
24273
+ "vpd": "optional",
24274
+ "windBearing": "optional",
24275
+ "windBearingAvg": "optional",
24276
+ "windGust": "optional",
24277
+ "windGustMax": "optional",
24278
+ "windSpeed": "optional"
24279
+ },
24280
+ "workload": {
24281
+ "addresses": "required",
24282
+ "autostart": "required",
24283
+ "hostDeviceId": "required",
24284
+ "image": "required",
24285
+ "lastFetchedAt": "required",
24286
+ "os": "required",
24287
+ "ports": "required",
24288
+ "resources": "required",
24289
+ "since": "required",
24290
+ "state": "required",
24291
+ "updateAvailable": "required",
24292
+ "version": "required"
24293
+ },
24294
+ "zone-analytics": {
24295
+ "frame": "required",
24296
+ "frameHeight": "required",
24297
+ "frameWidth": "required",
24298
+ "stationaryObjects": "optional",
24299
+ "ts": "required",
24300
+ "unzoned": "required",
24301
+ "zones": "required"
24302
+ },
24303
+ "zone-rules": {
24304
+ "detection": "required",
24305
+ "motion": "required",
24306
+ "package": "required"
24307
+ },
24308
+ "zones": { "zones": "required" }
24309
+ });
23284
24310
  Object.freeze({
23285
24311
  "actions": { "run": 363e4 },
23286
24312
  "audio-analyzer": { "classify": 3e4 },
@@ -23383,7 +24409,7 @@ function sleep(ms) {
23383
24409
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
23384
24410
  }
23385
24411
  //#endregion
23386
- //#region ../types/dist/implemented-methods-BUBqZ2a0.mjs
24412
+ //#region ../types/dist/implemented-methods-GRoJIvYs.mjs
23387
24413
  /**
23388
24414
  * The ffmpeg build every CamStack node downloads, per platform and arch.
23389
24415
  *
@@ -24515,6 +25541,19 @@ var HelperSpecSchema = discriminatedUnion("kind", [
24515
25541
  publishedProfiles: array(_enum(GRID_PROFILES)).max(3),
24516
25542
  cells: array(GridCellSpecSchema).max(16)
24517
25543
  }),
25544
+ object({
25545
+ kind: literal("crop"),
25546
+ source: CompositionSourceRefSchema,
25547
+ rect: GridRectSchema,
25548
+ aspect: _enum([
25549
+ "16:9",
25550
+ "4:3",
25551
+ "1:1",
25552
+ "free"
25553
+ ]),
25554
+ fps: number$1().int().min(1).max(60),
25555
+ publishedProfiles: array(_enum(GRID_PROFILES)).max(3)
25556
+ }),
24518
25557
  object({
24519
25558
  kind: literal("terminal"),
24520
25559
  terminalId: string().uuid()
@@ -25554,6 +26593,27 @@ function deviceTemplateFilterNames() {
25554
26593
  return DEVICE_TEMPLATE_CATALOGUE.filter((item) => item.kind === "filter").map((item) => item.name);
25555
26594
  }
25556
26595
  //#endregion
26596
+ //#region ../types/dist/enums.mjs
26597
+ function e(group, en, it, flags = {}) {
26598
+ return {
26599
+ group,
26600
+ label: {
26601
+ en,
26602
+ it
26603
+ },
26604
+ noise: flags.noise === true,
26605
+ deprecated: flags.deprecated === true
26606
+ };
26607
+ }
26608
+ var N = { noise: true };
26609
+ EventCategory.SystemBoot, e("system", "System booted", "Sistema avviato"), EventCategory.SystemAddonsReady, e("system", "Addons ready", "Addon pronti"), EventCategory.SystemRestarting, e("system", "System restarting", "Sistema in riavvio"), EventCategory.SystemRestartCompleted, e("system", "Restart completed", "Riavvio completato"), EventCategory.SystemTlsCertChanged, e("system", "TLS certificate changed", "Certificato TLS cambiato"), EventCategory.UpdateAvailable, e("system", "Update available", "Aggiornamento disponibile"), EventCategory.SystemReadyState, e("system", "Readiness changed", "Stato di prontezza cambiato"), EventCategory.AddonStarted, e("addons", "Addon started", "Addon avviato"), EventCategory.AddonStopped, e("addons", "Addon stopped", "Addon fermato"), EventCategory.AddonRestarted, e("addons", "Addon restarted", "Addon riavviato"), EventCategory.AddonUpdated, e("addons", "Addon updated", "Addon aggiornato"), EventCategory.AddonInstalled, e("addons", "Addon installed", "Addon installato"), EventCategory.AddonUninstalled, e("addons", "Addon uninstalled", "Addon disinstallato"), EventCategory.AddonCrashed, e("addons", "Addon crashed", "Addon in errore fatale"), EventCategory.AddonRunnerFailed, e("addons", "Runner failed for good", "Runner fallito definitivamente"), EventCategory.AddonRunnerRefused, e("addons", "Runner refused", "Runner rifiutato"), EventCategory.ProcessStateChanged, e("addons", "Process state changed", "Stato del processo cambiato"), EventCategory.SystemRunnerCheck, e("system", "Runner check", "Verifica dei runner"), EventCategory.AlertEpisode, e("system", "Alert episode", "Episodio di allarme"), EventCategory.AddonError, e("addons", "Addon error", "Errore di un addon"), EventCategory.AddonPageReady, e("addons", "Addon page ready", "Pagina addon pronta"), EventCategory.AddonWidgetReady, e("addons", "Addon widget ready", "Widget addon pronto"), EventCategory.AddonLoadFailed, e("addons", "Addon failed to load", "Caricamento addon fallito"), EventCategory.KeychainChanged, e("system", "Keychain changed", "Portachiavi modificato"), EventCategory.AddonLoadRecovered, e("addons", "Addon load recovered", "Caricamento addon ripristinato"), EventCategory.AddonUnsupportedVersion, e("addons", "Addon version unsupported", "Versione addon non supportata"), EventCategory.AddonUnsupportedResolved, e("addons", "Unsupported addon resolved", "Addon non supportato risolto"), EventCategory.AddonRetryScheduled, e("addons", "Addon retry scheduled", "Nuovo tentativo addon pianificato"), EventCategory.SystemLivenessFailed, e("system", "Liveness check failed", "Controllo di attività fallito"), EventCategory.SystemLivenessRecovered, e("system", "Liveness recovered", "Controllo di attività ripristinato"), EventCategory.AddonRetryAttempting, e("addons", "Addon retry running", "Nuovo tentativo addon in corso"), EventCategory.DeviceRegistered, e("devices", "Device registered", "Dispositivo registrato"), EventCategory.DeviceUnregistered, e("devices", "Device removed", "Dispositivo rimosso"), EventCategory.DeviceEnabled, e("devices", "Device enabled", "Dispositivo abilitato"), EventCategory.DeviceDisabled, e("devices", "Device disabled", "Dispositivo disabilitato"), EventCategory.DeviceSettingsUpdated, e("devices", "Device settings updated", "Impostazioni dispositivo aggiornate"), EventCategory.DeviceBindingsChanged, e("devices", "Device bindings changed", "Collegamenti dispositivo cambiati"), EventCategory.DeviceMetaChanged, e("devices", "Device details changed", "Dettagli dispositivo cambiati"), EventCategory.DeviceSourceInfoChanged, e("devices", "Device source info changed", "Info sorgente dispositivo cambiate"), EventCategory.DeviceStreamsRegistered, e("streams", "Device streams registered", "Stream del dispositivo registrati"), EventCategory.DeviceProvisioned, e("devices", "Device provisioned", "Dispositivo configurato"), EventCategory.DeviceReady, e("devices", "Device ready", "Dispositivo pronto"), EventCategory.IdentityLinkCreated, e("integrations", "Identity linked", "Identità collegata"), EventCategory.IdentityLinkLost, e("integrations", "Identity link lost", "Collegamento identità perso"), EventCategory.IntegrationEnabled, e("integrations", "Integration enabled", "Integrazione abilitata"), EventCategory.IntegrationDisabled, e("integrations", "Integration disabled", "Integrazione disabilitata"), EventCategory.IntegrationDeleted, e("integrations", "Integration deleted", "Integrazione eliminata"), EventCategory.BrokerStatusChanged, e("integrations", "Broker status changed", "Stato del broker cambiato"), EventCategory.BrokerMessage, e("integrations", "Broker message", "Messaggio del broker", N), EventCategory.ProviderStarted, e("integrations", "Provider started", "Provider avviato"), EventCategory.ProviderStopped, e("integrations", "Provider stopped", "Provider fermato"), EventCategory.ProcessCrashed, e("addons", "Process crashed", "Processo andato in crash"), EventCategory.ProcessRestartScheduled, e("addons", "Process restart scheduled", "Riavvio del processo pianificato"), EventCategory.ProcessRestarted, e("addons", "Process restarted", "Processo riavviato"), EventCategory.StorageLocationsChanged, e("storage", "Storage locations changed", "Posizioni di archiviazione cambiate"), EventCategory.RecordingStarted, e("recording", "Recording started", "Registrazione avviata"), EventCategory.RecordingStopped, e("recording", "Recording stopped", "Registrazione fermata"), EventCategory.RecordingError, e("recording", "Recording error", "Errore di registrazione"), EventCategory.RecordingHealthDegraded, e("recording", "Recording degraded", "Registrazione degradata"), EventCategory.RecordingHealthStalled, e("recording", "Recording stalled", "Registrazione bloccata"), EventCategory.RecordingHealthOk, e("recording", "Recording healthy", "Registrazione regolare"), EventCategory.RecordingStorageCritical, e("recording", "Recording storage critical", "Spazio di registrazione critico"), EventCategory.StorageLocationLow, e("storage", "Storage location low", "Spazio in esaurimento"), EventCategory.StorageLocationCritical, e("storage", "Storage location critical", "Spazio critico"), EventCategory.StorageLocationOk, e("storage", "Storage location recovered", "Spazio tornato regolare"), EventCategory.StorageDrainProgress, e("storage", "Drain progress", "Avanzamento dello svuotamento"), EventCategory.StorageDrainComplete, e("storage", "Drain complete", "Svuotamento completato"), EventCategory.RecordingSegmentWritten, e("recording", "Segment written", "Segmento scritto"), EventCategory.RecordingPolicyFallback, e("recording", "Recording policy fallback", "Politica di registrazione di ripiego"), EventCategory.RecordingRetentionCompleted, e("recording", "Retention completed", "Pulizia completata"), EventCategory.RecordingExportProgress, e("recording", "Export progress", "Avanzamento esportazione"), EventCategory.RecordingExportCompleted, e("recording", "Export completed", "Esportazione completata"), EventCategory.RecordingExportFailed, e("recording", "Export failed", "Esportazione fallita"), EventCategory.DetectionEvent, e("detection", "Detection", "Rilevamento"), EventCategory.SessionTrackNew, e("detection", "Session track started", "Nuova traccia di sessione"), EventCategory.SessionTrackExpired, e("detection", "Session track expired", "Traccia di sessione scaduta"), EventCategory.BenchmarkProgress, e("metrics", "Benchmark progress", "Avanzamento benchmark", N), EventCategory.PlatformProbePhase, e("metrics", "Platform probe phase", "Fase di analisi piattaforma", N), EventCategory.PipelineProgress, e("pipeline", "Pipeline progress", "Avanzamento pipeline", N), EventCategory.PipelineTrace, e("pipeline", "Pipeline trace", "Traccia pipeline", N), EventCategory.PipelineInferenceResult, e("pipeline", "Inference result", "Risultato di inferenza", N), EventCategory.PipelineCameraAssigned, e("pipeline", "Camera assigned to pipeline", "Camera assegnata alla pipeline"), EventCategory.PipelineCameraUnassigned, e("pipeline", "Camera unassigned from pipeline", "Camera rimossa dalla pipeline"), EventCategory.PipelineNodeInferenceUnavailable, e("pipeline", "Node inference unavailable", "Inferenza del nodo non disponibile"), EventCategory.PipelineDetectionBlind, e("pipeline", "Detection blind", "Rilevamento cieco"), EventCategory.PipelineMotionNoisy, e("pipeline", "Motion too noisy", "Movimento troppo disturbato"), EventCategory.PipelineMotionCalm, e("pipeline", "Motion calm again", "Movimento di nuovo calmo"), EventCategory.PipelinePackageLlmSilent, e("pipeline", "Package check silent", "Verifica pacchi senza risposta"), EventCategory.PipelinePackageLlmAnswered, e("pipeline", "Package check answered", "Verifica pacchi con risposta"), EventCategory.PipelineCameraUpdated, e("pipeline", "Pipeline camera updated", "Camera della pipeline aggiornata"), EventCategory.PipelineIngestOwnerChanged, e("pipeline", "Ingest owner changed", "Responsabile dell’acquisizione cambiato"), EventCategory.PipelineRunnerLoadSnapshot, e("metrics", "Runner load snapshot", "Carico dei runner", N), EventCategory.PipelineCameraMetricsSnapshot, e("metrics", "Camera metrics snapshot", "Metriche delle camere", N), EventCategory.StreamBrokerMetricsSnapshot, e("metrics", "Stream broker metrics", "Metriche dello stream broker", N), EventCategory.StreamBrokerOnCamStreamDemand, e("streams", "Stream requested", "Stream richiesto"), EventCategory.StreamBrokerOnCamStreamIdle, e("streams", "Stream idle", "Stream inattivo"), EventCategory.StreamBrokerOnRequestStreamSourceRefresh, e("streams", "Stream source refresh requested", "Aggiornamento sorgente stream richiesto"), EventCategory.StreamParamsChanged, e("streams", "Stream parameters changed", "Parametri dello stream cambiati"), EventCategory.DeviceStateChanged, e("devices", "Device state changed", "Stato dispositivo cambiato"), EventCategory.DeviceCommandSettled, e("devices", "Device command settled", "Comando al dispositivo concluso"), EventCategory.DeviceNativeShadowChanged, e("devices", "Device native state changed", "Stato nativo del dispositivo cambiato"), EventCategory.ZoneAnalyticsOccupancyChanged, e("detection", "Zone occupancy changed", "Occupazione zona cambiata"), EventCategory.BatteryOnStatusChanged, e("devices", "Battery status changed", "Stato batteria cambiato"), EventCategory.NetworkLinkOnStatusChanged, e("devices", "Network link status changed", "Stato del collegamento di rete cambiato"), EventCategory.BatteryOnWakeStarted, e("devices", "Battery device woke up", "Dispositivo a batteria attivato"), EventCategory.DoorbellOnPressed, e("devices", "Doorbell pressed", "Campanello premuto"), EventCategory.RunningStarted, e("devices", "Run started", "Esecuzione avviata"), EventCategory.RunningFinished, e("devices", "Run finished", "Esecuzione terminata"), EventCategory.WorkloadStarted, e("devices", "Workload started", "Carico di lavoro avviato"), EventCategory.WorkloadStopped, e("devices", "Workload stopped", "Carico di lavoro fermato"), EventCategory.WorkloadCrashed, e("devices", "Workload crashed", "Carico di lavoro in crash"), EventCategory.WorkloadRecovered, e("devices", "Workload recovered", "Carico di lavoro ripristinato"), EventCategory.DeviceRunOpened, e("devices", "Device run opened", "Ciclo del dispositivo aperto"), EventCategory.DeviceRunClosed, e("devices", "Device run closed", "Ciclo del dispositivo chiuso"), EventCategory.EventEmitted, e("devices", "Device event", "Evento del dispositivo"), EventCategory.PipelineEngineMetricsSnapshot, e("metrics", "Engine metrics snapshot", "Metriche dei motori", N), EventCategory.PipelineEngineProvisioning, e("pipeline", "Engine provisioning", "Preparazione del motore"), EventCategory.ClusterTopologySnapshot, e("metrics", "Cluster topology snapshot", "Topologia del cluster", N), EventCategory.MetricsNodeResourcesSnapshot, e("metrics", "Node resources snapshot", "Risorse dei nodi", N), EventCategory.MetricsNodeProcessesSnapshot, e("metrics", "Node processes snapshot", "Processi dei nodi", N), EventCategory.CapabilityBindingChanged, e("system", "Capability binding changed", "Collegamento di capability cambiato", N), EventCategory.ModelDownloadProgress, e("pipeline", "Model download progress", "Avanzamento download modello", N), EventCategory.AgentRegistered, e("agents", "Agent registered", "Agent registrato"), EventCategory.AgentUnregistered, e("agents", "Agent removed", "Agent rimosso"), EventCategory.AgentOnline, e("agents", "Agent online", "Agent online"), EventCategory.AgentOffline, e("agents", "Agent offline", "Agent offline"), EventCategory.WorkerOnline, e("agents", "Worker online", "Worker online"), EventCategory.WorkerOffline, e("agents", "Worker offline", "Worker offline"), EventCategory.AgentTaskDispatched, e("agents", "Agent task dispatched", "Attività inviata a un agent"), EventCategory.AgentTaskAssigned, e("agents", "Agent task assigned", "Attività assegnata a un agent"), EventCategory.AgentTrpcConnected, e("agents", "Agent API connected", "API dell’agent connessa"), EventCategory.AgentWsConnected, e("agents", "Agent socket connected", "Socket dell’agent connesso"), EventCategory.AgentWsDisconnected, e("agents", "Agent socket disconnected", "Socket dell’agent disconnesso"), EventCategory.AgentBackupActivated, e("agents", "Agent backup activated", "Backup dell’agent attivato"), EventCategory.OrchestrationSettingsUpdated, e("pipeline", "Orchestration settings updated", "Impostazioni di orchestrazione aggiornate"), EventCategory.MotionAnalysis, e("detection", "Motion analysis", "Analisi del movimento", N), EventCategory.MotionZonesRaw, e("detection", "Raw motion zones", "Zone di movimento grezze", N), EventCategory.MotionOnMotionChanged, e("detection", "Motion changed", "Movimento cambiato", N), EventCategory.DetectionResult, e("detection", "Detection result", "Risultato del rilevamento", N), EventCategory.DetectionRaw, e("detection", "Raw detection", "Rilevamento grezzo"), EventCategory.DetectionCameraNative, e("detection", "Camera native detection", "Rilevamento nativo della camera"), EventCategory.PipelineAudioInferenceResult, e("pipeline", "Audio inference result", "Risultato di inferenza audio", N), EventCategory.DetectionPhaseTransition, e("detection", "Detection phase changed", "Fase di rilevamento cambiata"), EventCategory.ProviderMotion, e("detection", "Camera raw motion", "Movimento grezzo della camera", N), EventCategory.ProviderDetection, e("detection", "Camera onboard detection", "Rilevamento a bordo camera"), EventCategory.EnrichmentEmbeddingStored, e("enrichment", "Embedding stored", "Embedding salvato"), EventCategory.EnrichmentSceneStateChanged, e("enrichment", "Scene state changed", "Stato della scena cambiato"), EventCategory.EnrichmentActivitySummary, e("enrichment", "Activity summary", "Riepilogo dell’attività"), EventCategory.PipelineAnalyticsTrackLifecycle, e("detection", "Track lifecycle", "Ciclo di vita della traccia"), EventCategory.PipelineAnalyticsTrackStarted, e("detection", "Track started", "Traccia iniziata", {
26610
+ noise: true,
26611
+ deprecated: true
26612
+ }), EventCategory.PipelineAnalyticsTrackEnded, e("detection", "Track ended", "Traccia terminata", {
26613
+ noise: true,
26614
+ deprecated: true
26615
+ }), EventCategory.PipelineAnalyticsDetectionEvent, e("detection", "Analytics detection", "Rilevamento analitico", N), EventCategory.PipelineAnalyticsFrameTracked, e("detection", "Frame tracked", "Fotogramma tracciato", N), EventCategory.PipelineAnalyticsStationaryChanged, e("detection", "Stationary object changed", "Oggetto fermo cambiato"), EventCategory.PipelineAnalyticsPackageDelivered, e("detection", "Package delivered", "Pacco consegnato"), EventCategory.PipelineAnalyticsPackagePickedUp, e("detection", "Package picked up", "Pacco ritirato"), EventCategory.PipelineAnalyticsFaceGalleryChanged, e("enrichment", "Face gallery changed", "Galleria volti cambiata"), EventCategory.PipelineAnalyticsPlateGalleryChanged, e("enrichment", "Plate gallery changed", "Galleria targhe cambiata"), EventCategory.CameraStreamsProfileSlotsChanged, e("streams", "Stream profile slots changed", "Slot dei profili stream cambiati"), EventCategory.StreamOnline, e("streams", "Stream online", "Stream online"), EventCategory.StreamOffline, e("streams", "Stream offline", "Stream offline"), EventCategory.NetworkTunnelStarted, e("network", "Tunnel started", "Tunnel avviato"), EventCategory.NetworkTunnelStopped, e("network", "Tunnel stopped", "Tunnel fermato"), EventCategory.LocalNetworkChanged, e("network", "Local network changed", "Rete locale cambiata"), EventCategory.MeshNetworkChanged, e("network", "Mesh network changed", "Rete mesh cambiata"), EventCategory.BackupCompleted, e("backup", "Backup completed", "Backup completato"), EventCategory.BackupRunCompleted, e("backup", "Backup run completed", "Esecuzione backup completata"), EventCategory.BackupRestored, e("backup", "Backup restored", "Backup ripristinato"), EventCategory.NotificationDispatched, e("notifications", "Notification sent", "Notifica inviata"), EventCategory.NotificationFailed, e("notifications", "Notification failed", "Notifica non riuscita"), EventCategory.NotificationRuleBroken, e("notifications", "Notification rule broken", "Regola di notifica non valida"), EventCategory.NotificationRuleRepaired, e("notifications", "Notification rule repaired", "Regola di notifica riparata"), EventCategory.MigrationFailed, e("system", "Migration failed", "Migrazione fallita"), EventCategory.MigrationApplied, e("system", "Migration applied", "Migrazione applicata"), EventCategory.DeviceUpdated, e("devices", "Device updated", "Dispositivo aggiornato"), EventCategory.DeviceOnline, e("devices", "Device online", "Dispositivo online"), EventCategory.DeviceOffline, e("devices", "Device offline", "Dispositivo offline"), EventCategory.DeviceAwake, e("devices", "Device awake", "Dispositivo attivo"), EventCategory.DeviceSleeping, e("devices", "Device sleeping", "Dispositivo in standby"), EventCategory.RetentionCleanup, e("storage", "Retention cleanup", "Pulizia della conservazione"), EventCategory.AddonsBulkUpdateProgress, e("addons", "Bulk update progress", "Avanzamento aggiornamento multiplo"), EventCategory.AddonsJobProgress, e("addons", "Addon job progress", "Avanzamento attività addon"), EventCategory.AddonsJobLog, e("addons", "Addon job log", "Log attività addon"), EventCategory.AccessoriesChildVisibilityChanged, e("devices", "Child visibility changed", "Visibilità del dispositivo figlio cambiata"), EventCategory.AccessoriesChanged, e("devices", "Accessories changed", "Accessori cambiati"), EventCategory.ActionsRunChanged, e("system", "Action run changed", "Esecuzione dell’azione cambiata"), EventCategory.ModelConvertProgress, e("pipeline", "Model conversion progress", "Avanzamento conversione modello");
26616
+ //#endregion
25557
26617
  //#region ../types/dist/index.mjs
25558
26618
  var SMTP_INBOUND_DEFAULT_PORT = 2525;
25559
26619
  var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
@@ -27417,16 +28477,32 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
27417
28477
  }),
27418
28478
  object({
27419
28479
  op: literal("upsertRecord"),
28480
+ owner: string().min(1),
27420
28481
  kind: string().min(1),
27421
28482
  recordKey: string().min(1),
27422
- value: unknown(),
28483
+ deviceId: number$1().int().positive().optional(),
28484
+ at: number$1().int().nonnegative().optional(),
28485
+ value: record(string(), unknown()),
27423
28486
  precondition: PreconditionSchema
27424
28487
  }),
27425
28488
  object({
27426
28489
  op: literal("deleteRecord"),
28490
+ owner: string().min(1),
27427
28491
  kind: string().min(1),
27428
28492
  recordKey: string().min(1),
27429
28493
  precondition: PreconditionSchema
28494
+ }),
28495
+ object({
28496
+ op: literal("rekeyDevice"),
28497
+ deviceId: number$1().int().positive(),
28498
+ addonId: string().min(1),
28499
+ stableId: string().min(1),
28500
+ precondition: PreconditionSchema
28501
+ }),
28502
+ object({
28503
+ op: literal("tombstoneDevice"),
28504
+ deviceId: number$1().int().positive(),
28505
+ precondition: PreconditionSchema
27430
28506
  })
27431
28507
  ])) });
27432
28508
  /** `JSON.stringify` with object keys sorted, so equal values spell the same. */
@@ -28344,6 +29420,16 @@ var RecordingBandTriggersSchema = RecordingTriggersSchema;
28344
29420
  * question to answer as a continuous one.
28345
29421
  */
28346
29422
  var RecordingBandAudioSchema = _enum(["on", "muted"]);
29423
+ /**
29424
+ * A battery condition on a band: the band covers a charge level only when
29425
+ * `min <= level < max` (half-open; a missing bound is unbounded). OPTIONAL —
29426
+ * an absent key means "any charge", which is what every config written before
29427
+ * it meant. A band WITH a condition is never met while the charge is unknown.
29428
+ */
29429
+ var RecordingBandBatterySchema = object({
29430
+ min: number$1().min(0).max(100).optional(),
29431
+ max: number$1().min(0).max(100).optional()
29432
+ });
28347
29433
  var RecordingBandSchema = object({
28348
29434
  days: array(RecordingWeekdaySchema),
28349
29435
  start: string().regex(HHMM),
@@ -28355,6 +29441,7 @@ var RecordingBandSchema = object({
28355
29441
  * missing must keep meaning what it meant. See {@link RecordingBandAudioSchema}.
28356
29442
  */
28357
29443
  audio: RecordingBandAudioSchema.optional(),
29444
+ battery: RecordingBandBatterySchema.optional(),
28358
29445
  triggers: RecordingBandTriggersSchema.optional(),
28359
29446
  /**
28360
29447
  * RETIRED (D381). A band no longer carries a pre-buffer of its own.
@@ -55201,6 +56288,31 @@ var BatteryStatusSchema = object({
55201
56288
  */
55202
56289
  voltage: number$1().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
55203
56290
  /**
56291
+ * What the CELL is doing, as opposed to {@link charging} (what it is powered
56292
+ * from). `'charging'` takes current, `'full'` is connected and topped up,
56293
+ * `'idle'` is a stopped cell the firmware reported as such (running on the
56294
+ * battery, or an adapter that is not feeding it).
56295
+ *
56296
+ * Absent or `'unknown'` is NOT an answer: the provider has not read the
56297
+ * charge fields. It must never be coerced to `'idle'` (D315) — a camera
56298
+ * nobody reached would be drawn "not charging". Consumers SKIP it.
56299
+ */
56300
+ chargeState: _enum([
56301
+ "charging",
56302
+ "full",
56303
+ "idle",
56304
+ "unknown"
56305
+ ]).optional().meta({ label: "Charge state" }),
56306
+ /**
56307
+ * Battery current in milliamperes, as the firmware reports it (sign is the
56308
+ * firmware's). `null`/absent = not reported. Stored in mA, not the quantity
56309
+ * base (A), so it carries no reading quantity: a quantity would make the UI
56310
+ * convert and print it as amperes.
56311
+ */
56312
+ currentMa: number$1().nullable().optional().meta(readingMeta("none", { label: "Current (mA)" })),
56313
+ /** Battery temperature in °C. `null`/absent = not reported. */
56314
+ temperatureC: number$1().nullable().optional().meta(readingMeta("temperature", { label: "Temperature" })),
56315
+ /**
55204
56316
  * Ms epoch of the last time the device PROVED it was reachable — a
55205
56317
  * completed firmware round-trip, an observed wake, or an inbound push
55206
56318
  * (firmware event, email). `0`/absent = never since this slice was born.
@@ -67157,14 +68269,8 @@ var IntegrationWithStateSchema = object({
67157
68269
  id: string(),
67158
68270
  addonId: string(),
67159
68271
  name: string(),
67160
- /** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
68272
+ /** THE switch of the instance: the hub registry row is its only stored copy (D1066). */
67161
68273
  enabled: boolean(),
67162
- /**
67163
- * True when the addon that holds the switch did not answer (down, failed, or keeps no record for
67164
- * this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
67165
- * must not draw it as on or off (D315).
67166
- */
67167
- switchUnknown: literal(true).optional(),
67168
68274
  info: record(string(), unknown()).readonly(),
67169
68275
  /** The discovery candidate this integration was set up from (D984). */
67170
68276
  originStableId: string().optional(),
@@ -67176,14 +68282,8 @@ var IntegrationLiteSchema = object({
67176
68282
  id: string(),
67177
68283
  addonId: string(),
67178
68284
  name: string(),
67179
- /** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
68285
+ /** THE switch of the instance: the hub registry row is its only stored copy (D1066). */
67180
68286
  enabled: boolean(),
67181
- /**
67182
- * True when the addon that holds the switch did not answer (down, failed, or keeps no record for
67183
- * this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
67184
- * must not draw it as on or off (D315).
67185
- */
67186
- switchUnknown: literal(true).optional(),
67187
68287
  info: record(string(), unknown()).readonly(),
67188
68288
  /** The discovery candidate this integration was set up from (D984). */
67189
68289
  originStableId: string().optional(),
@@ -67299,7 +68399,27 @@ var DeleteIntegrationResultSchema = object({
67299
68399
  success: boolean(),
67300
68400
  deletedId: string()
67301
68401
  });
67302
- method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string() }), IntegrationWithStateSchema), method(object({ addonId: string() }), IntegrationLiteSchema.nullable()), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
68402
+ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string() }), IntegrationWithStateSchema), method(object({ addonId: string() }), IntegrationLiteSchema.nullable()), method(object({ addonId: string() }), array(IntegrationLiteSchema)), method(object({
68403
+ addonId: string(),
68404
+ rows: array(object({
68405
+ id: string().min(1),
68406
+ name: string(),
68407
+ enabled: boolean(),
68408
+ /** True when the record body STATED the switch: only then does it override an existing row. */
68409
+ stated: boolean()
68410
+ }))
68411
+ }), object({
68412
+ created: number$1().int(),
68413
+ updated: number$1().int(),
68414
+ /** Rows whose id belongs to ANOTHER addon: left untouched, so the caller keeps its own copy. */
68415
+ conflicts: array(object({
68416
+ id: string(),
68417
+ ownerAddonId: string()
68418
+ }))
68419
+ }), {
68420
+ kind: "mutation",
68421
+ auth: "admin"
68422
+ }), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
67303
68423
  kind: "mutation",
67304
68424
  auth: "admin"
67305
68425
  }), method(object({ id: string() }), DeleteIntegrationResultSchema, {
@@ -80991,6 +82111,7 @@ var HardwareClassIdSchema = _enum([
80991
82111
  "apple-m-base",
80992
82112
  "apple-m-pro",
80993
82113
  "amd-phoenix",
82114
+ "nvidia-gpu",
80994
82115
  "unknown"
80995
82116
  ]);
80996
82117
  var AcceleratorKindSchema = _enum([
@@ -80998,6 +82119,7 @@ var AcceleratorKindSchema = _enum([
80998
82119
  "intel-igpu",
80999
82120
  "amd-igpu",
81000
82121
  "amd-npu",
82122
+ "nvidia-gpu",
81001
82123
  "x86-cpu",
81002
82124
  "arm-cpu",
81003
82125
  "apple-ane",
@@ -83441,6 +84563,38 @@ var DETECTOR_PERF = {
83441
84563
  measured: true
83442
84564
  } }
83443
84565
  },
84566
+ "nvidia-gpu": { "nvidia-gpu": {
84567
+ "yolov9t-320": {
84568
+ p50Ms: 12,
84569
+ fps: 83,
84570
+ measured: false
84571
+ },
84572
+ "yolov9t-640": {
84573
+ p50Ms: 16,
84574
+ fps: 62,
84575
+ measured: false
84576
+ },
84577
+ "yolov9s-320": {
84578
+ p50Ms: 13,
84579
+ fps: 77,
84580
+ measured: false
84581
+ },
84582
+ "yolov9s-640": {
84583
+ p50Ms: 20,
84584
+ fps: 50,
84585
+ measured: false
84586
+ },
84587
+ "yolov9m-320": {
84588
+ p50Ms: 16,
84589
+ fps: 62,
84590
+ measured: false
84591
+ },
84592
+ "yolov9m-640": {
84593
+ p50Ms: 32,
84594
+ fps: 31,
84595
+ measured: false
84596
+ }
84597
+ } },
83444
84598
  "apple-m-pro": {
83445
84599
  "apple-ane": {
83446
84600
  "yolov9t-320": {
@@ -83729,6 +84883,13 @@ function scaleColumn(column, ratio, estimatedFrom) {
83729
84883
  function resolveLatencyColumn(input) {
83730
84884
  const perf = input.perf ?? DETECTOR_PERF;
83731
84885
  const references = input.references ?? REFERENCE_COMPUTE;
84886
+ if (input.accelerator === "nvidia-gpu") {
84887
+ const card = classColumn(perf, "nvidia-gpu", "nvidia-gpu");
84888
+ return card === void 0 ? null : {
84889
+ column: card,
84890
+ estimatedFrom: null
84891
+ };
84892
+ }
83732
84893
  const measured = classColumn(perf, input.hardwareClass, input.accelerator);
83733
84894
  if (measured !== void 0 && input.hardwareClass !== "intel-n-series") return {
83734
84895
  column: measured,
@@ -100135,6 +101296,13 @@ Object.freeze({
100135
101296
  access: "create",
100136
101297
  role: "admin"
100137
101298
  },
101299
+ "integrations.adoptInstanceRows": {
101300
+ capName: "integrations",
101301
+ capScope: "system",
101302
+ addonId: null,
101303
+ access: "create",
101304
+ role: "admin"
101305
+ },
100138
101306
  "integrations.delete": {
100139
101307
  capName: "integrations",
100140
101308
  capScope: "system",
@@ -100170,6 +101338,13 @@ Object.freeze({
100170
101338
  access: "view",
100171
101339
  role: "admin"
100172
101340
  },
101341
+ "integrations.listByAddon": {
101342
+ capName: "integrations",
101343
+ capScope: "system",
101344
+ addonId: null,
101345
+ access: "view",
101346
+ role: "admin"
101347
+ },
100173
101348
  "integrations.update": {
100174
101349
  capName: "integrations",
100175
101350
  capScope: "system",
@@ -107026,7 +108201,7 @@ DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep",
107026
108201
  "startTalkSession",
107027
108202
  "pushTalkAudio",
107028
108203
  "endTalkSession"
107029
- ]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
108204
+ ]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, derived("valve", ["setPosition"]), DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
107030
108205
  var ALL_FEATURES = Object.values(DeviceFeature);
107031
108206
  new Set(ALL_FEATURES);
107032
108207
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
@@ -111783,6 +112958,10 @@ function classifyInferenceHardware(hw) {
111783
112958
  hardwareClass: "amd-phoenix",
111784
112959
  cpuModel
111785
112960
  };
112961
+ if (hw.nvidia?.usable === true) return {
112962
+ hardwareClass: "nvidia-gpu",
112963
+ cpuModel
112964
+ };
111786
112965
  return {
111787
112966
  hardwareClass: "unknown",
111788
112967
  cpuModel
@@ -111800,6 +112979,7 @@ function acceleratorKindOf(deviceKey, hw) {
111800
112979
  if (backend === "openvino" && device === "npu") return "intel-npu";
111801
112980
  if (backend === "openvino" && device === "gpu") return "intel-igpu";
111802
112981
  if (backend === "onnx" && device === "webgpu") return "amd-igpu";
112982
+ if (backend === "cuda" || backend === "onnx" && device === "cuda") return "nvidia-gpu";
111803
112983
  if (backend === "vitisai" && device === "npu") return "amd-npu";
111804
112984
  if (backend === "cpu" || device === "cpu") return hw.arch === "arm64" ? "arm-cpu" : "x86-cpu";
111805
112985
  return null;
@@ -115846,6 +117026,7 @@ function defaultModelIdForDevice(deviceKey) {
115846
117026
  if (backend === "edgetpu") return "yolov9s-320-edgetpu";
115847
117027
  if (backend === "coreml") return "yolov9m-640";
115848
117028
  if (backend === "onnx" && device === "webgpu") return "yolov9t-320";
117029
+ if (backend === "cuda" || backend === "onnx" && device === "cuda") return "yolov9m-320";
115849
117030
  return "yolov9s-320";
115850
117031
  }
115851
117032
  /**