@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.mjs CHANGED
@@ -6126,7 +6126,7 @@ var ZodIssueCode = {
6126
6126
  var ZodFirstPartyTypeKind;
6127
6127
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6128
6128
  //#endregion
6129
- //#region ../types/dist/runtime-capabilities-B36VcCR6.mjs
6129
+ //#region ../types/dist/runtime-capabilities-CK6y0W5U.mjs
6130
6130
  /**
6131
6131
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6132
6132
  * window to float samples (D455).
@@ -6221,6 +6221,57 @@ var AddonMigrationsBlockedError = class extends Error {
6221
6221
  this.migrationIds = migrationIds;
6222
6222
  }
6223
6223
  };
6224
+ var SWITCHES = /* @__PURE__ */ new Map();
6225
+ /** The ids the registry is known to hold a row for (hydrated, or told by the hub). */
6226
+ var ROWS = /* @__PURE__ */ new Set();
6227
+ /** The owner addon of an id, learned from its rows and from the helper that serves it. */
6228
+ var OWNER_OF = /* @__PURE__ */ new Map();
6229
+ /** The addons whose registry read answered at least once. */
6230
+ var ANSWERED = /* @__PURE__ */ new Set();
6231
+ /** The addons whose boot has begun reading the registry: only they can be held back. */
6232
+ var HYDRATING = /* @__PURE__ */ new Set();
6233
+ /**
6234
+ * The addons that serve an instance kind and have not been answered by the registry yet. Scoped
6235
+ * per owner: one addon's failed read never turns off another addon's instances, and an addon that
6236
+ * serves no instance kind never enters it.
6237
+ */
6238
+ var PENDING = /* @__PURE__ */ new Set();
6239
+ /**
6240
+ * An addon's boot is about to read the registry for its rows. From now on, until the registry
6241
+ * answers, its served instance kinds (already built or built later in its boot) fail closed. A
6242
+ * helper used with no addon boot around it (a spec, a tool) is never held back.
6243
+ */
6244
+ function beginHydration(ownerId) {
6245
+ if (ANSWERED.has(ownerId)) return;
6246
+ HYDRATING.add(ownerId);
6247
+ if (KINDS.has(ownerId)) PENDING.add(ownerId);
6248
+ }
6249
+ /** Whether `ownerId` still waits for the registry to answer (it serves a kind and has no rows yet). */
6250
+ function isHydrationPending(ownerId) {
6251
+ return PENDING.has(ownerId);
6252
+ }
6253
+ /** Record what the hub told: the registry holds a row of `id` in this state. */
6254
+ function recordRegistrySwitch(id, enabled) {
6255
+ SWITCHES.set(id, enabled);
6256
+ ROWS.add(id);
6257
+ }
6258
+ /** Seed the store from the registry rows of `ownerId`; the registry answered, so the owner is known. */
6259
+ function hydrateInstanceSwitches(ownerId, rows) {
6260
+ ANSWERED.add(ownerId);
6261
+ for (const row of rows) {
6262
+ recordRegistrySwitch(row.id, row.enabled);
6263
+ OWNER_OF.set(row.id, ownerId);
6264
+ }
6265
+ }
6266
+ /** The addon's boot has built every instance kind and read the registry: unknown ids now read on. */
6267
+ function settleHydration(ownerId) {
6268
+ PENDING.delete(ownerId);
6269
+ }
6270
+ var KINDS = /* @__PURE__ */ new Map();
6271
+ /** The instance kinds announced for `ownerId` so far. */
6272
+ function servedInstanceKindsOf(ownerId) {
6273
+ return [...KINDS.get(ownerId)?.values() ?? []];
6274
+ }
6224
6275
  /** Is this field's stored value a credential? */
6225
6276
  function isSecretConfigField(field) {
6226
6277
  if (field.type === "password") return true;
@@ -6910,6 +6961,32 @@ function switchRecordsOverMigrationApi(api) {
6910
6961
  };
6911
6962
  } };
6912
6963
  }
6964
+ /** The record calls the body-to-registry switch migration makes, over the migration API. */
6965
+ function bodySwitchRecordsOverMigrationApi(api) {
6966
+ return { kind: (definition) => {
6967
+ const handle = api.records.kind(definition);
6968
+ return {
6969
+ query: async () => {
6970
+ const rows = [];
6971
+ let cursor;
6972
+ do {
6973
+ const page = await handle.query({
6974
+ limit: 500,
6975
+ ...cursor === void 0 ? {} : { cursor }
6976
+ });
6977
+ rows.push(...page.records);
6978
+ cursor = page.nextCursor ?? void 0;
6979
+ } while (cursor !== void 0);
6980
+ return { records: rows };
6981
+ },
6982
+ get: (id) => handle.get({ id }),
6983
+ put: (input, opts) => handle.put({
6984
+ ...input,
6985
+ ...opts?.ifRev === void 0 ? {} : { ifRev: opts.ifRev }
6986
+ })
6987
+ };
6988
+ } };
6989
+ }
6913
6990
  function integrationRowsApiOver(api) {
6914
6991
  return {
6915
6992
  list: async () => (await api.integrations.list({})).integrations,
@@ -7122,7 +7199,10 @@ function secretArrayPrefixes(path) {
7122
7199
  }
7123
7200
  return prefixes;
7124
7201
  }
7125
- /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
7202
+ /**
7203
+ * The body key the switch USED to live under (D1007, D1015). Nothing writes or reads it any more;
7204
+ * the migrations that move it between the body and the registry name it.
7205
+ */
7126
7206
  var SWITCH_KEY = "enabled";
7127
7207
  /**
7128
7208
  * The one-switch migration (epic #440, step 3). An integration's on/off state used to live in the
@@ -7232,6 +7312,107 @@ function registrySwitchPortsOver(deps) {
7232
7312
  };
7233
7313
  }
7234
7314
  /**
7315
+ * The switch comes back to the registry (D1066), the reverse of {@link registrySwitchToBodyMigration}.
7316
+ * An instance's on/off state lived in its record body (`enabled`, D1007 superseded by D1015); the hub
7317
+ * registry row, keyed by (addon, integration id) like a device, is now the only stored switch.
7318
+ *
7319
+ * For every record of the addon's kind:
7320
+ * - the state is the body's `enabled` (absent means on). When the registry row of that id disagrees,
7321
+ * the BODY wins: it was the only live copy while the body held the switch, and the registry
7322
+ * column of a migrated row was never read;
7323
+ * - a record with no registry row gets one (a services instance, under its addon-minted id);
7324
+ * - the key is then removed from the body, so no second copy remains.
7325
+ * A rerun finds no body that states `enabled` and writes nothing. The registry write goes first, so
7326
+ * a crash between the two steps repeats the pair (idempotent) and never loses a switched-off state.
7327
+ *
7328
+ * It runs in the addon process, after {@link registrySwitchToBodyMigration}, BEFORE the addon
7329
+ * registers its provider.
7330
+ */
7331
+ function bodySwitchToRegistryId(addonId, date, kindName) {
7332
+ return `${addonId}/${date}-body-switch-to-registry-${kindName}`;
7333
+ }
7334
+ async function moveBodySwitchToRegistry(ports, spec) {
7335
+ const records = await ports.listRecords();
7336
+ const adopted = records.length === 0 ? {
7337
+ created: 0,
7338
+ updated: 0,
7339
+ conflicts: []
7340
+ } : await ports.adoptRows(spec.addonId, records.map((r) => ({
7341
+ id: r.id,
7342
+ name: r.name,
7343
+ enabled: r.enabled,
7344
+ stated: r.stated
7345
+ })));
7346
+ const foreign = new Map(adopted.conflicts.map((c) => [c.id, c.ownerAddonId]));
7347
+ for (const [id, owner] of foreign) await ports.warn(`body switch kept: the registry row "${id}" belongs to addon "${owner}", not "${spec.addonId}"`);
7348
+ const stated = records.filter((r) => r.stated && !foreign.has(r.id));
7349
+ for (const row of stated) await ports.stripSwitch(row.id);
7350
+ const summary = {
7351
+ records: records.length,
7352
+ stripped: stated.length,
7353
+ rowsCreated: adopted.created,
7354
+ rowsCorrected: adopted.updated,
7355
+ conflicts: adopted.conflicts.length
7356
+ };
7357
+ return stated.length === 0 && adopted.created === 0 && adopted.updated === 0 ? {
7358
+ outcome: "already-done",
7359
+ summary
7360
+ } : {
7361
+ outcome: "done",
7362
+ summary
7363
+ };
7364
+ }
7365
+ /** A migration entry: an addon states its kind, nothing else. */
7366
+ function bodySwitchToRegistryMigration(spec) {
7367
+ return {
7368
+ meta: {
7369
+ id: bodySwitchToRegistryId(spec.addonId, spec.date, spec.kindName),
7370
+ owner: spec.addonId,
7371
+ level: "addon-state",
7372
+ seq: spec.seq,
7373
+ dependsOn: spec.followsDate === void 0 ? [] : [registrySwitchToBodyId(spec.addonId, spec.followsDate)],
7374
+ store: "settings",
7375
+ scope: "cluster",
7376
+ onFailure: "block-owner",
7377
+ bodyKind: "procedure",
7378
+ 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",
7379
+ fixtureMark: "enabled"
7380
+ },
7381
+ procedure: (ports) => moveBodySwitchToRegistry(ports, { addonId: spec.addonId })
7382
+ };
7383
+ }
7384
+ function bodySwitchPortsOver(deps) {
7385
+ const handle = deps.records.kind({
7386
+ name: deps.kind.name,
7387
+ declaration: deps.kind.declaration,
7388
+ schema: record(string(), unknown())
7389
+ });
7390
+ return {
7391
+ listRecords: async () => {
7392
+ return (await handle.query({ limit: 1e3 })).records.map((r) => {
7393
+ const name = r.data[deps.nameField];
7394
+ return {
7395
+ id: r.id,
7396
+ name: typeof name === "string" ? name : r.id,
7397
+ enabled: r.data[SWITCH_KEY] !== false,
7398
+ stated: SWITCH_KEY in r.data
7399
+ };
7400
+ });
7401
+ },
7402
+ adoptRows: deps.adopt,
7403
+ warn: deps.warn,
7404
+ stripSwitch: async (id) => {
7405
+ const row = await handle.get(id);
7406
+ if (row === null || !("enabled" in row.data)) return;
7407
+ const { [SWITCH_KEY]: _dropped, ...rest } = row.data;
7408
+ await handle.put({
7409
+ id,
7410
+ data: rest
7411
+ }, { ifRev: row.rev });
7412
+ }
7413
+ };
7414
+ }
7415
+ /**
7235
7416
  * Build a {@link DurableState} over a single store key. Transport-agnostic:
7236
7417
  * `read`/`write` are the addon-store or device-store accessors. The whole
7237
7418
  * validated value round-trips on every read/write — the schema is the
@@ -7263,6 +7444,20 @@ function createDurableState(deps) {
7263
7444
  };
7264
7445
  }
7265
7446
  /**
7447
+ * The registry could not be read for the switches of an addon that serves instance kinds, so its
7448
+ * instances read off (D1066). A forked runner treats it as a failed boot: the supervisor respawns
7449
+ * it, bounded and marked terminally failed (D6), rather than leave instances off silently.
7450
+ */
7451
+ var INSTANCE_SWITCHES_UNREAD_ERROR_NAME = "InstanceSwitchesUnreadError";
7452
+ var InstanceSwitchesUnreadError = class extends Error {
7453
+ ownerId;
7454
+ constructor(ownerId) {
7455
+ super(`'${ownerId}': the registry did not answer for the instance switches; its instances stay off`);
7456
+ this.ownerId = ownerId;
7457
+ this.name = INSTANCE_SWITCHES_UNREAD_ERROR_NAME;
7458
+ }
7459
+ };
7460
+ /**
7266
7461
  * Per-node scoping for the shared addon-settings blob.
7267
7462
  *
7268
7463
  * An addon's settings store is hub-central (the `addon-settings` cap is
@@ -8246,7 +8441,14 @@ var BaseAddon = class {
8246
8441
  if (secrets !== void 0) this._secretChangeUnsub = secrets.onChange((ref) => {
8247
8442
  if (this._configSecretRefs.has(ref)) this.scheduleSecretReresolve(SECRET_CHANGE_DEBOUNCE_MS);
8248
8443
  });
8444
+ await this.hydrateSwitches();
8249
8445
  const result = await this.onInitialize();
8446
+ await this.moveLateInstanceKinds();
8447
+ await this.adoptUnrowed();
8448
+ if (this.switchesHydrated) {
8449
+ settleHydration(this.ctx.id);
8450
+ for (const served of servedInstanceKindsOf(this.ctx.id)) await served.reapply();
8451
+ }
8250
8452
  this.emitLifecycle(EventCategory.AddonStarted);
8251
8453
  const normalized = normalizeAddonInitResult(result);
8252
8454
  const providers = normalized && "providers" in normalized && normalized.providers ? normalized.providers : [];
@@ -8286,17 +8488,22 @@ var BaseAddon = class {
8286
8488
  this.retiredMigrationIds = ids;
8287
8489
  }
8288
8490
  registrySwitchSpec = null;
8491
+ /** The instance kinds whose switch move this process already ran (or tried), by record kind name. */
8492
+ switchMoved = /* @__PURE__ */ new Set();
8493
+ lastDeclared = [];
8289
8494
  registrySwitchBound() {
8290
- const spec = this.registrySwitchSpec;
8291
- if (spec === null) return [];
8292
8495
  const api = this.ctx.migrationApi;
8496
+ const spec = this.registrySwitchSpec;
8497
+ const kinds = servedInstanceKindsOf(this.ctx.id).filter((k) => !this.switchMoved.has(k.kind.name));
8498
+ if (spec === null && kinds.length === 0) return [];
8293
8499
  if (api === void 0) {
8294
8500
  this.ctx.logger.warn("the registry switch migration is skipped: the migration API is not available on this context");
8295
8501
  return [];
8296
8502
  }
8297
- return migrationSet([registrySwitchToBodyMigration({
8503
+ const date = "2026-11-06";
8504
+ const moveIn = spec === null ? [] : migrationSet([registrySwitchToBodyMigration({
8298
8505
  addonId: this.ctx.id,
8299
- date: "2026-11-06",
8506
+ date,
8300
8507
  seq: 1e3,
8301
8508
  initialBody: spec.initialBody
8302
8509
  })], (a) => registrySwitchPortsOver({
@@ -8304,13 +8511,53 @@ var BaseAddon = class {
8304
8511
  records: switchRecordsOverMigrationApi(a),
8305
8512
  kind: spec.kind
8306
8513
  })).bind(api);
8514
+ const moveBack = kinds.flatMap(({ kind }, index) => {
8515
+ this.switchMoved.add(kind.name);
8516
+ return migrationSet([bodySwitchToRegistryMigration({
8517
+ addonId: this.ctx.id,
8518
+ date: "2026-11-19",
8519
+ seq: 1001 + index,
8520
+ kindName: kind.name,
8521
+ ...spec === null ? {} : { followsDate: date }
8522
+ })], (a) => bodySwitchPortsOver({
8523
+ records: bodySwitchRecordsOverMigrationApi(a),
8524
+ kind,
8525
+ nameField: kind.declaration.entry?.nameField ?? "name",
8526
+ adopt: (addonId, rows) => this.ctx.api.integrations.adoptInstanceRows.mutate({
8527
+ addonId,
8528
+ rows: [...rows]
8529
+ }),
8530
+ warn: async (message) => {
8531
+ await a.log.warn({ message });
8532
+ }
8533
+ })).bind(api);
8534
+ });
8535
+ return [...moveIn, ...moveBack];
8536
+ }
8537
+ /**
8538
+ * A helper built AFTER the addon's migrations ran has a kind that moved nothing yet. Run its
8539
+ * switch move now (the engine replaces an owner's catalogue on every declare, so the whole
8540
+ * declared set goes with it, phased to the late ids), read the registry again, and tell the
8541
+ * addon about every instance that is off so it stops what it started on the default.
8542
+ */
8543
+ async moveLateInstanceKinds() {
8544
+ const late = servedInstanceKindsOf(this.ctx.id).filter((k) => !this.switchMoved.has(k.kind.name));
8545
+ if (late.length === 0) return;
8546
+ try {
8547
+ const only = late.map((k) => bodySwitchToRegistryId(this.ctx.id, "2026-11-19", k.kind.name));
8548
+ await this.runBound(this.lastDeclared, { only });
8549
+ } catch (err) {
8550
+ if (err instanceof AddonMigrationsBlockedError) throw err;
8551
+ this.ctx.logger.error("the late instance switch move failed", { meta: { error: errMsg$2(err) } });
8552
+ }
8307
8553
  }
8308
8554
  async runBound(declared, options) {
8555
+ this.lastDeclared = declared;
8309
8556
  const added = this.registrySwitchBound();
8310
8557
  const migrations = [...declared, ...added];
8311
8558
  const widened = options?.only === void 0 || added.length === 0 ? options : {
8312
8559
  ...options,
8313
- only: [...options.only, ...added.map((m) => m.meta.id)]
8560
+ only: [...new Set([...options.only, ...added.map((m) => m.meta.id)])]
8314
8561
  };
8315
8562
  const phased = this.retiredMigrationIds.length === 0 ? widened ?? {} : {
8316
8563
  ...widened,
@@ -8323,9 +8570,87 @@ var BaseAddon = class {
8323
8570
  finishMigration: (input) => api.finishMigration.mutate(input)
8324
8571
  }, migrations, this.ctx.logger, phased);
8325
8572
  if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
8573
+ await this.hydrateSwitches();
8574
+ await this.adoptUnrowed();
8326
8575
  return report;
8327
8576
  }
8328
8577
  /**
8578
+ * Learn the on/off state of this addon's instances from the registry rows (D1066), at boot, after
8579
+ * a migration run, and again through {@link rehydrateSwitches}. It runs on the addon's own boot
8580
+ * path, never inside a method the hub calls into. A registry that cannot answer leaves the
8581
+ * instances of THIS addon reading off (fail closed, per owner) until a read answers.
8582
+ */
8583
+ switchesHydrated = false;
8584
+ async hydrateSwitches() {
8585
+ beginHydration(this.ctx.id);
8586
+ try {
8587
+ const rows = await this.ctx.api.integrations.listByAddon.query({ addonId: this.ctx.id });
8588
+ hydrateInstanceSwitches(this.ctx.id, rows);
8589
+ this.switchesHydrated = true;
8590
+ return true;
8591
+ } catch (err) {
8592
+ this.ctx.logger.warn("instance switches not read from the registry: instances stay off", { meta: { error: errMsg$2(err) } });
8593
+ return false;
8594
+ }
8595
+ }
8596
+ /**
8597
+ * Every record of a served kind the registry holds no row for (created outside the hub door:
8598
+ * a seed, a store write) is adopted with the state it effectively had, on unless this process
8599
+ * stated it off, so the hub can switch it. A failure is logged; the next hydration retries.
8600
+ */
8601
+ async adoptUnrowed() {
8602
+ if (!this.switchesHydrated) return;
8603
+ try {
8604
+ for (const served of servedInstanceKindsOf(this.ctx.id)) {
8605
+ const rows = await served.unrowed();
8606
+ if (rows.length === 0) continue;
8607
+ await this.ctx.api.integrations.adoptInstanceRows.mutate({
8608
+ addonId: this.ctx.id,
8609
+ rows: rows.map((r) => ({
8610
+ id: r.id,
8611
+ name: r.name,
8612
+ enabled: r.enabled,
8613
+ stated: false
8614
+ }))
8615
+ });
8616
+ for (const r of rows) recordRegistrySwitch(r.id, r.enabled);
8617
+ }
8618
+ } catch (err) {
8619
+ this.ctx.logger.warn("records without a registry row were not adopted", { meta: { error: errMsg$2(err) } });
8620
+ }
8621
+ }
8622
+ /**
8623
+ * Read the switches from the registry again and announce the states now known, so an addon that
8624
+ * started on the fail-closed default (off) starts what is on. Throws
8625
+ * {@link InstanceSwitchesUnreadError} when the registry still does not answer while this addon
8626
+ * serves instance kinds: a forked runner turns that into a failed boot (the supervisor respawns
8627
+ * it, bounded, D6), an agent or the hub reads again on the next hub connect (event-driven, D3).
8628
+ * An addon with no instance kind has nothing waiting and never throws.
8629
+ */
8630
+ async rehydrateSwitches() {
8631
+ if (this._ctx === null) return;
8632
+ if (await this.hydrateSwitches()) {
8633
+ await this.adoptUnrowed();
8634
+ settleHydration(this.ctx.id);
8635
+ for (const served of servedInstanceKindsOf(this.ctx.id)) await served.reapply();
8636
+ return;
8637
+ }
8638
+ if (isHydrationPending(this.ctx.id)) throw new InstanceSwitchesUnreadError(this.ctx.id);
8639
+ }
8640
+ /**
8641
+ * Called on the hub-reachable event (instead of `onHubReachable` directly): the switches are
8642
+ * read again, then `onHubReachable` runs. A registry that still does not answer is logged and
8643
+ * left for the next connect.
8644
+ */
8645
+ async hubReachable() {
8646
+ try {
8647
+ await this.rehydrateSwitches();
8648
+ } catch (err) {
8649
+ this.ctx.logger.warn("instance switches still unread at the hub connect", { meta: { error: errMsg$2(err) } });
8650
+ }
8651
+ await this.onHubReachable();
8652
+ }
8653
+ /**
8329
8654
  * Called by the isolated-process runner AFTER `broker.start()`.
8330
8655
  * In-process addons never need this because the hub broker is already
8331
8656
  * running when `initialize()` fires. For forked children the broker
@@ -19869,6 +20194,45 @@ var CAP_VOCABULARY_BY_NAME = {
19869
20194
  }
19870
20195
  ],
19871
20196
  icon: "battery-charging"
20197
+ },
20198
+ {
20199
+ kind: "enum",
20200
+ field: "chargeState",
20201
+ label: {
20202
+ en: "Charge state",
20203
+ it: "Stato di carica"
20204
+ },
20205
+ values: [
20206
+ {
20207
+ value: "charging",
20208
+ label: {
20209
+ en: "Charging",
20210
+ it: "In carica"
20211
+ }
20212
+ },
20213
+ {
20214
+ value: "full",
20215
+ label: {
20216
+ en: "Full",
20217
+ it: "Carica completa"
20218
+ }
20219
+ },
20220
+ {
20221
+ value: "idle",
20222
+ label: {
20223
+ en: "Not charging",
20224
+ it: "Non in carica"
20225
+ }
20226
+ },
20227
+ {
20228
+ value: "unknown",
20229
+ label: {
20230
+ en: "Unknown",
20231
+ it: "Sconosciuto"
20232
+ }
20233
+ }
20234
+ ],
20235
+ icon: "battery-charging"
19872
20236
  }
19873
20237
  ],
19874
20238
  events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
@@ -21138,6 +21502,24 @@ Object.freeze({
21138
21502
  "path": "voltage",
21139
21503
  "valueType": "number"
21140
21504
  },
21505
+ {
21506
+ "path": "chargeState",
21507
+ "valueType": "enum",
21508
+ "enumValues": [
21509
+ "charging",
21510
+ "full",
21511
+ "idle",
21512
+ "unknown"
21513
+ ]
21514
+ },
21515
+ {
21516
+ "path": "currentMa",
21517
+ "valueType": "number"
21518
+ },
21519
+ {
21520
+ "path": "temperatureC",
21521
+ "valueType": "number"
21522
+ },
21141
21523
  {
21142
21524
  "path": "lastContactAt",
21143
21525
  "valueType": "number"
@@ -23253,6 +23635,650 @@ Object.freeze({
23253
23635
  }
23254
23636
  ]
23255
23637
  });
23638
+ Object.freeze({
23639
+ "air-quality-sensor": {
23640
+ "aqi": "optional",
23641
+ "co2": "optional",
23642
+ "lastFetchedAt": "required",
23643
+ "pm10": "optional",
23644
+ "pm25": "optional",
23645
+ "voc": "optional"
23646
+ },
23647
+ "alarm-panel": {
23648
+ "availableModes": "required",
23649
+ "codeRequired": "required",
23650
+ "lastChangedAt": "required",
23651
+ "state": "required",
23652
+ "targetMode": "optional"
23653
+ },
23654
+ "ambient-light-sensor": {
23655
+ "illuminance": "required",
23656
+ "lastFetchedAt": "required"
23657
+ },
23658
+ "audio-metrics": {
23659
+ "avgDbfs": "required",
23660
+ "byClass": "required",
23661
+ "current": "required",
23662
+ "level": "required",
23663
+ "peakDbfs": "required",
23664
+ "ts": "required",
23665
+ "windowSec": "required"
23666
+ },
23667
+ "automation-control": {
23668
+ "enabled": "required",
23669
+ "isRunning": "required",
23670
+ "lastChangedAt": "required",
23671
+ "lastError": "required",
23672
+ "lastTriggeredAt": "required"
23673
+ },
23674
+ "battery": {
23675
+ "binary": "optional",
23676
+ "chargeState": "optional",
23677
+ "charging": "required",
23678
+ "currentMa": "optional",
23679
+ "lastContactAt": "optional",
23680
+ "lastFullRefreshAt": "optional",
23681
+ "lastUpdated": "required",
23682
+ "level": "required",
23683
+ "sleeping": "required",
23684
+ "temperatureC": "optional",
23685
+ "voltage": "optional"
23686
+ },
23687
+ "binary": {
23688
+ "lastChangedAt": "required",
23689
+ "on": "required"
23690
+ },
23691
+ "brightness": {
23692
+ "lastChangedAt": "required",
23693
+ "level": "required"
23694
+ },
23695
+ "camera-streams": {
23696
+ "lastChangedAt": "required",
23697
+ "online": "required",
23698
+ "slotErrors": "required",
23699
+ "slotStatuses": "required"
23700
+ },
23701
+ "carbon-monoxide": {
23702
+ "detected": "required",
23703
+ "lastChangedAt": "required"
23704
+ },
23705
+ "climate-control": {
23706
+ "action": "optional",
23707
+ "availableFanModes": "required",
23708
+ "availableModes": "required",
23709
+ "availablePresets": "required",
23710
+ "currentHumidity": "required",
23711
+ "currentTemp": "required",
23712
+ "fanMode": "required",
23713
+ "lastActiveMode": "optional",
23714
+ "lastFetchedAt": "required",
23715
+ "maxTemp": "optional",
23716
+ "minTemp": "optional",
23717
+ "mode": "required",
23718
+ "preset": "required",
23719
+ "swingHorizontal": "required",
23720
+ "swingVertical": "required",
23721
+ "target": "required",
23722
+ "targetHigh": "required",
23723
+ "targetHumidity": "required",
23724
+ "targetLow": "required",
23725
+ "tempStep": "optional"
23726
+ },
23727
+ "color": {
23728
+ "colorTemperature": "optional",
23729
+ "hsv": "optional",
23730
+ "lastChangedAt": "required",
23731
+ "mode": "required",
23732
+ "rgb": "optional"
23733
+ },
23734
+ "connectivity": {
23735
+ "connected": "required",
23736
+ "lastChangedAt": "required"
23737
+ },
23738
+ "consumables": {
23739
+ "items": "required",
23740
+ "lastChangedAt": "required",
23741
+ "lastFetchedAt": "required"
23742
+ },
23743
+ "contact": {
23744
+ "entryOpen": "required",
23745
+ "lastChangedAt": "required"
23746
+ },
23747
+ "control": {
23748
+ "kind": "required",
23749
+ "lastChangedAt": "required",
23750
+ "max": "optional",
23751
+ "min": "optional",
23752
+ "options": "required",
23753
+ "step": "optional",
23754
+ "value": "required"
23755
+ },
23756
+ "cover": {
23757
+ "lastChangedAt": "required",
23758
+ "position": "required",
23759
+ "state": "required",
23760
+ "tiltPosition": "required"
23761
+ },
23762
+ "day-night": {
23763
+ "lastFetchedAt": "required",
23764
+ "mode": "required",
23765
+ "sensitivity": "optional",
23766
+ "switchDelaySec": "optional"
23767
+ },
23768
+ "device-status": {
23769
+ "lastChangedAt": "required",
23770
+ "online": "required"
23771
+ },
23772
+ "dishwasher": {
23773
+ "activeEvents": "required",
23774
+ "availability": "required",
23775
+ "availablePrograms": "required",
23776
+ "childLock": "required",
23777
+ "delayedStart": "required",
23778
+ "doorLocked": "required",
23779
+ "doorOpen": "required",
23780
+ "errorCode": "required",
23781
+ "errorLabel": "required",
23782
+ "extraDry": "required",
23783
+ "filterCleaningDue": "required",
23784
+ "halfLoad": "required",
23785
+ "hygienePlus": "required",
23786
+ "intensiveZone": "required",
23787
+ "lastFetchedAt": "required",
23788
+ "localControlActive": "required",
23789
+ "machineCareDue": "required",
23790
+ "machineCareRemainingRuns": "required",
23791
+ "operationState": "required",
23792
+ "powerOn": "required",
23793
+ "powerState": "required",
23794
+ "program": "required",
23795
+ "progress": "required",
23796
+ "remaining": "required",
23797
+ "remoteControlActive": "required",
23798
+ "remoteStartAllowed": "required",
23799
+ "selectedProgram": "required",
23800
+ "state": "required",
23801
+ "varioSpeedPlus": "required"
23802
+ },
23803
+ "do-not-disturb": {
23804
+ "enabled": "required",
23805
+ "lastChangedAt": "required"
23806
+ },
23807
+ "doorbell": {
23808
+ "lastPressedAt": "required",
23809
+ "pressCountSinceStart": "required"
23810
+ },
23811
+ "energy-system": {
23812
+ "grid": "required",
23813
+ "heatPump": "required",
23814
+ "house": "required",
23815
+ "lastFetchedAt": "required",
23816
+ "solar": "required",
23817
+ "storage": "required"
23818
+ },
23819
+ "enum-sensor": {
23820
+ "lastFetchedAt": "required",
23821
+ "timestamp": "optional",
23822
+ "value": "required"
23823
+ },
23824
+ "error": {
23825
+ "active": "required",
23826
+ "code": "required",
23827
+ "faults": "optional",
23828
+ "label": "required",
23829
+ "lastFetchedAt": "required",
23830
+ "severity": "required",
23831
+ "since": "required"
23832
+ },
23833
+ "event-emitter": {
23834
+ "eventCountSinceStart": "required",
23835
+ "eventTypes": "required",
23836
+ "lastEvent": "required",
23837
+ "vocabulary": "optional"
23838
+ },
23839
+ "fan-control": {
23840
+ "availablePresets": "required",
23841
+ "direction": "required",
23842
+ "lastChangedAt": "required",
23843
+ "oscillating": "required",
23844
+ "oscillationAxes": "optional",
23845
+ "percentageStep": "optional",
23846
+ "preset": "required",
23847
+ "speed": "required"
23848
+ },
23849
+ "feature-probe": {
23850
+ "channelCount": "required",
23851
+ "deviceType": "required",
23852
+ "flags": "required",
23853
+ "lastFetchedAt": "required",
23854
+ "lastProbedAt": "required",
23855
+ "model": "required"
23856
+ },
23857
+ "flood": {
23858
+ "flooded": "required",
23859
+ "lastChangedAt": "required"
23860
+ },
23861
+ "gas": {
23862
+ "detected": "required",
23863
+ "lastChangedAt": "required"
23864
+ },
23865
+ "group-active": {
23866
+ "active": "required",
23867
+ "lastChangedAt": "required"
23868
+ },
23869
+ "group-commands": { "results": "required" },
23870
+ "group-status": {
23871
+ "excluded": "required",
23872
+ "included": "required",
23873
+ "total": "required"
23874
+ },
23875
+ "heat-pump-status": {
23876
+ "circuits": "required",
23877
+ "energy": "required",
23878
+ "lastFetchedAt": "required",
23879
+ "power": "required",
23880
+ "starts": "required",
23881
+ "system": "required",
23882
+ "temperatures": "required",
23883
+ "waterPressureBar": "required"
23884
+ },
23885
+ "heating-valve": {
23886
+ "lastFetchedAt": "required",
23887
+ "position": "required"
23888
+ },
23889
+ "humidifier": {
23890
+ "action": "required",
23891
+ "availableModes": "required",
23892
+ "currentHumidity": "required",
23893
+ "lastChangedAt": "required",
23894
+ "maxHumidity": "required",
23895
+ "minHumidity": "required",
23896
+ "mode": "required",
23897
+ "on": "required",
23898
+ "targetHumidity": "required"
23899
+ },
23900
+ "humidity-sensor": {
23901
+ "humidity": "required",
23902
+ "lastFetchedAt": "required"
23903
+ },
23904
+ "image": {
23905
+ "lastUpdated": "required",
23906
+ "url": "required"
23907
+ },
23908
+ "image-settings": {
23909
+ "backlightMode": "optional",
23910
+ "brightness": "optional",
23911
+ "contrast": "optional",
23912
+ "exposureMode": "optional",
23913
+ "flip": "optional",
23914
+ "lastFetchedAt": "required",
23915
+ "mirror": "optional",
23916
+ "rotate": "optional",
23917
+ "saturation": "optional",
23918
+ "sharpness": "optional",
23919
+ "warmth": "optional",
23920
+ "whiteBalance": "optional"
23921
+ },
23922
+ "intercom": {
23923
+ "ability": "required",
23924
+ "lastSessionAt": "required",
23925
+ "talking": "required"
23926
+ },
23927
+ "ir-transmitter": {
23928
+ "lastFetchedAt": "required",
23929
+ "lastLearn": "required",
23930
+ "lastSend": "required"
23931
+ },
23932
+ "lawn-mower-control": {
23933
+ "activity": "required",
23934
+ "batteryLevel": "required",
23935
+ "currentCode": "required",
23936
+ "currentCodeLabel": "required",
23937
+ "lastChangedAt": "required",
23938
+ "progress": "required",
23939
+ "severity": "required"
23940
+ },
23941
+ "lock-control": {
23942
+ "codeRequired": "optional",
23943
+ "lastChangedAt": "required",
23944
+ "state": "required"
23945
+ },
23946
+ "low-power-sleep": {
23947
+ "lastContactAt": "optional",
23948
+ "lastUpdated": "required",
23949
+ "sleeping": "required"
23950
+ },
23951
+ "media-player": {
23952
+ "assumedFields": "optional",
23953
+ "availableSources": "required",
23954
+ "currentMedia": "required",
23955
+ "declaredSources": "optional",
23956
+ "duration": "required",
23957
+ "isMuted": "required",
23958
+ "lastChangedAt": "required",
23959
+ "muteReadback": "optional",
23960
+ "position": "required",
23961
+ "positionUpdatedAt": "optional",
23962
+ "repeat": "required",
23963
+ "shuffle": "required",
23964
+ "source": "required",
23965
+ "state": "required",
23966
+ "stateSource": "optional",
23967
+ "volumeLevel": "required"
23968
+ },
23969
+ "meter": {
23970
+ "lastFetchedAt": "required",
23971
+ "value": "required"
23972
+ },
23973
+ "motion": {
23974
+ "autoClearAfterMs": "required",
23975
+ "detected": "required",
23976
+ "lastDetectedAt": "required"
23977
+ },
23978
+ "motion-trigger": {
23979
+ "enabled": "required",
23980
+ "lastChangedAt": "required",
23981
+ "lastFetchedAt": "required"
23982
+ },
23983
+ "motion-zones": {
23984
+ "enabled": "required",
23985
+ "lastFetchedAt": "required",
23986
+ "regions": "required",
23987
+ "sensitivity": "required"
23988
+ },
23989
+ "native-object-detection": {
23990
+ "enabled": "required",
23991
+ "lastByClass": "required",
23992
+ "lastFetchedAt": "required",
23993
+ "supportedClasses": "required"
23994
+ },
23995
+ "navigation": {
23996
+ "flash": "required",
23997
+ "following": "required",
23998
+ "lastChangedAt": "required",
23999
+ "lastFetchedAt": "required",
24000
+ "lightLevel": "required",
24001
+ "lightMode": "required",
24002
+ "mode": "required"
24003
+ },
24004
+ "network-link": {
24005
+ "lastUpdated": "required",
24006
+ "linkUp": "optional",
24007
+ "rssi": "optional",
24008
+ "signal": "required",
24009
+ "speedKbps": "optional",
24010
+ "ssid": "optional",
24011
+ "type": "required"
24012
+ },
24013
+ "notifier": {
24014
+ "lastError": "required",
24015
+ "lastSentAt": "required",
24016
+ "queueDepth": "required",
24017
+ "supports": "required"
24018
+ },
24019
+ "numeric-sensor": {
24020
+ "lastFetchedAt": "required",
24021
+ "value": "required"
24022
+ },
24023
+ "pet-feeder": {
24024
+ "batteryPower": "required",
24025
+ "bowlFood": "required",
24026
+ "childLock": "required",
24027
+ "desiccantLeftDays": "required",
24028
+ "eating": "required",
24029
+ "error": "required",
24030
+ "errorCode": "required",
24031
+ "feeding": "required",
24032
+ "feedSound": "required",
24033
+ "food1": "required",
24034
+ "food2": "required",
24035
+ "foodLevel": "required",
24036
+ "indicatorLight": "required",
24037
+ "isDualHopper": "required",
24038
+ "lastFeedGrams": "required",
24039
+ "lastFeedHopper1": "required",
24040
+ "lastFeedHopper2": "required",
24041
+ "lastFetchedAt": "required",
24042
+ "lowFood": "required",
24043
+ "powerSource": "required",
24044
+ "status": "required",
24045
+ "supportsMarkRefilled": "required",
24046
+ "volume": "required"
24047
+ },
24048
+ "pet-fountain": {
24049
+ "empty": "required",
24050
+ "error": "required",
24051
+ "lastFetchedAt": "required",
24052
+ "pumpRunning": "required",
24053
+ "waterLevel": "required",
24054
+ "waterVolume": "required"
24055
+ },
24056
+ "power-meter": {
24057
+ "apparentPower": "optional",
24058
+ "current": "optional",
24059
+ "deliveredPower": "optional",
24060
+ "energy": "optional",
24061
+ "lastFetchedAt": "required",
24062
+ "power": "optional",
24063
+ "powerFactor": "optional",
24064
+ "voltage": "optional"
24065
+ },
24066
+ "power-source": {
24067
+ "lastFetchedAt": "required",
24068
+ "offSeconds": "required",
24069
+ "switchOn": "required"
24070
+ },
24071
+ "presence": {
24072
+ "gps": "required",
24073
+ "lastChangedAt": "required",
24074
+ "location": "required",
24075
+ "state": "required"
24076
+ },
24077
+ "pressure-sensor": {
24078
+ "lastFetchedAt": "required",
24079
+ "pressure": "required"
24080
+ },
24081
+ "privacy-mask": {
24082
+ "audioEnabled": "required",
24083
+ "enabled": "required",
24084
+ "lastFetchedAt": "required",
24085
+ "regions": "required"
24086
+ },
24087
+ "ptz-autotrack": {
24088
+ "currentSettings": "required",
24089
+ "enabled": "required",
24090
+ "lastChangedAt": "required",
24091
+ "lastFetchedAt": "required",
24092
+ "supportedTargetTypes": "required"
24093
+ },
24094
+ "pump-cycle": {
24095
+ "enabled": "required",
24096
+ "lastFetchedAt": "required",
24097
+ "offTime": "required",
24098
+ "onTime": "required"
24099
+ },
24100
+ "recording-onboard": {
24101
+ "enabled": "required",
24102
+ "lastFetchedAt": "required",
24103
+ "overwriteWhenFull": "required",
24104
+ "postRecordSec": "required",
24105
+ "preRecordSec": "required",
24106
+ "primaryTrackId": "required",
24107
+ "recordingToNowhere": "required",
24108
+ "segmentMinutes": "required",
24109
+ "storage": "required",
24110
+ "tracks": "required",
24111
+ "unreadableWindows": "required",
24112
+ "windows": "required"
24113
+ },
24114
+ "recording-signal": {
24115
+ "active": "required",
24116
+ "lastChangedAt": "required",
24117
+ "lastFetchedAt": "required",
24118
+ "reason": "required"
24119
+ },
24120
+ "running-state": {
24121
+ "lastFetchedAt": "required",
24122
+ "phase": "required",
24123
+ "running": "required",
24124
+ "since": "required",
24125
+ "source": "required"
24126
+ },
24127
+ "scene-monitor": {
24128
+ "lastFetchedAt": "required",
24129
+ "monitors": "required"
24130
+ },
24131
+ "script-runner": {
24132
+ "isRunning": "required",
24133
+ "lastChangedAt": "required",
24134
+ "lastError": "required",
24135
+ "lastRunAt": "required",
24136
+ "lastRunSuccess": "required"
24137
+ },
24138
+ "siren": {
24139
+ "active": "required",
24140
+ "activeUntil": "required",
24141
+ "activeUntilEstimated": "optional",
24142
+ "durationSeconds": "required",
24143
+ "lastFetchedAt": "required",
24144
+ "lastTriggeredAt": "required",
24145
+ "plays": "optional"
24146
+ },
24147
+ "smoke": {
24148
+ "detected": "required",
24149
+ "lastChangedAt": "required"
24150
+ },
24151
+ "stream-catalog": {
24152
+ "descriptors": "required",
24153
+ "lastFetchedAt": "required"
24154
+ },
24155
+ "stream-params": {
24156
+ "ext": "optional",
24157
+ "lastFetchedAt": "required",
24158
+ "main": "optional",
24159
+ "sub": "optional"
24160
+ },
24161
+ "stream-signals": {
24162
+ "lastFetchedAt": "required",
24163
+ "signals": "required"
24164
+ },
24165
+ "switch": {
24166
+ "lastChangedAt": "required",
24167
+ "on": "required"
24168
+ },
24169
+ "tamper": {
24170
+ "lastChangedAt": "required",
24171
+ "tampered": "required"
24172
+ },
24173
+ "temperature-sensor": {
24174
+ "lastFetchedAt": "required",
24175
+ "temperature": "required"
24176
+ },
24177
+ "timed-run": {
24178
+ "activeUntil": "required",
24179
+ "lastFetchedAt": "required",
24180
+ "quickRun": "required",
24181
+ "requestedBy": "required"
24182
+ },
24183
+ "update": {
24184
+ "availableVersion": "required",
24185
+ "currentVersion": "required",
24186
+ "inProgress": "required",
24187
+ "state": "required",
24188
+ "updatable": "required"
24189
+ },
24190
+ "vacuum-control": {
24191
+ "availableFanSpeeds": "required",
24192
+ "batteryLevel": "required",
24193
+ "errorCode": "required",
24194
+ "errorLabel": "required",
24195
+ "fanSpeed": "required",
24196
+ "lastChangedAt": "required",
24197
+ "progress": "required",
24198
+ "state": "required"
24199
+ },
24200
+ "valve": {
24201
+ "lastChangedAt": "required",
24202
+ "position": "required",
24203
+ "state": "required"
24204
+ },
24205
+ "vibration": {
24206
+ "detected": "required",
24207
+ "lastChangedAt": "required"
24208
+ },
24209
+ "water-heater": {
24210
+ "availableModes": "required",
24211
+ "away": "required",
24212
+ "currentTemp": "required",
24213
+ "lastActiveMode": "optional",
24214
+ "lastChangedAt": "required",
24215
+ "maxTemp": "required",
24216
+ "minTemp": "required",
24217
+ "operationMode": "required",
24218
+ "targetTemp": "required"
24219
+ },
24220
+ "weather": {
24221
+ "condition": "required",
24222
+ "humidity": "required",
24223
+ "lastFetchedAt": "required",
24224
+ "pressure": "required",
24225
+ "temperature": "required",
24226
+ "windBearing": "required",
24227
+ "windSpeed": "required"
24228
+ },
24229
+ "weather-station": {
24230
+ "dewPoint": "optional",
24231
+ "feelsLike": "optional",
24232
+ "humidity": "optional",
24233
+ "lastFetchedAt": "required",
24234
+ "pressure": "optional",
24235
+ "rain24h": "optional",
24236
+ "rainDaily": "optional",
24237
+ "rainEvent": "optional",
24238
+ "rainMonthly": "optional",
24239
+ "rainRate": "optional",
24240
+ "rainWeekly": "optional",
24241
+ "rainYearly": "optional",
24242
+ "solarRadiation": "optional",
24243
+ "temperature": "optional",
24244
+ "uv": "optional",
24245
+ "vpd": "optional",
24246
+ "windBearing": "optional",
24247
+ "windBearingAvg": "optional",
24248
+ "windGust": "optional",
24249
+ "windGustMax": "optional",
24250
+ "windSpeed": "optional"
24251
+ },
24252
+ "workload": {
24253
+ "addresses": "required",
24254
+ "autostart": "required",
24255
+ "hostDeviceId": "required",
24256
+ "image": "required",
24257
+ "lastFetchedAt": "required",
24258
+ "os": "required",
24259
+ "ports": "required",
24260
+ "resources": "required",
24261
+ "since": "required",
24262
+ "state": "required",
24263
+ "updateAvailable": "required",
24264
+ "version": "required"
24265
+ },
24266
+ "zone-analytics": {
24267
+ "frame": "required",
24268
+ "frameHeight": "required",
24269
+ "frameWidth": "required",
24270
+ "stationaryObjects": "optional",
24271
+ "ts": "required",
24272
+ "unzoned": "required",
24273
+ "zones": "required"
24274
+ },
24275
+ "zone-rules": {
24276
+ "detection": "required",
24277
+ "motion": "required",
24278
+ "package": "required"
24279
+ },
24280
+ "zones": { "zones": "required" }
24281
+ });
23256
24282
  Object.freeze({
23257
24283
  "actions": { "run": 363e4 },
23258
24284
  "audio-analyzer": { "classify": 3e4 },
@@ -23355,7 +24381,7 @@ function sleep(ms) {
23355
24381
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
23356
24382
  }
23357
24383
  //#endregion
23358
- //#region ../types/dist/implemented-methods-BUBqZ2a0.mjs
24384
+ //#region ../types/dist/implemented-methods-GRoJIvYs.mjs
23359
24385
  /**
23360
24386
  * The ffmpeg build every CamStack node downloads, per platform and arch.
23361
24387
  *
@@ -24487,6 +25513,19 @@ var HelperSpecSchema = discriminatedUnion("kind", [
24487
25513
  publishedProfiles: array(_enum(GRID_PROFILES)).max(3),
24488
25514
  cells: array(GridCellSpecSchema).max(16)
24489
25515
  }),
25516
+ object({
25517
+ kind: literal("crop"),
25518
+ source: CompositionSourceRefSchema,
25519
+ rect: GridRectSchema,
25520
+ aspect: _enum([
25521
+ "16:9",
25522
+ "4:3",
25523
+ "1:1",
25524
+ "free"
25525
+ ]),
25526
+ fps: number$1().int().min(1).max(60),
25527
+ publishedProfiles: array(_enum(GRID_PROFILES)).max(3)
25528
+ }),
24490
25529
  object({
24491
25530
  kind: literal("terminal"),
24492
25531
  terminalId: string().uuid()
@@ -25526,6 +26565,27 @@ function deviceTemplateFilterNames() {
25526
26565
  return DEVICE_TEMPLATE_CATALOGUE.filter((item) => item.kind === "filter").map((item) => item.name);
25527
26566
  }
25528
26567
  //#endregion
26568
+ //#region ../types/dist/enums.mjs
26569
+ function e(group, en, it, flags = {}) {
26570
+ return {
26571
+ group,
26572
+ label: {
26573
+ en,
26574
+ it
26575
+ },
26576
+ noise: flags.noise === true,
26577
+ deprecated: flags.deprecated === true
26578
+ };
26579
+ }
26580
+ var N = { noise: true };
26581
+ 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", {
26582
+ noise: true,
26583
+ deprecated: true
26584
+ }), EventCategory.PipelineAnalyticsTrackEnded, e("detection", "Track ended", "Traccia terminata", {
26585
+ noise: true,
26586
+ deprecated: true
26587
+ }), 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");
26588
+ //#endregion
25529
26589
  //#region ../types/dist/index.mjs
25530
26590
  var SMTP_INBOUND_DEFAULT_PORT = 2525;
25531
26591
  var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
@@ -27389,16 +28449,32 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
27389
28449
  }),
27390
28450
  object({
27391
28451
  op: literal("upsertRecord"),
28452
+ owner: string().min(1),
27392
28453
  kind: string().min(1),
27393
28454
  recordKey: string().min(1),
27394
- value: unknown(),
28455
+ deviceId: number$1().int().positive().optional(),
28456
+ at: number$1().int().nonnegative().optional(),
28457
+ value: record(string(), unknown()),
27395
28458
  precondition: PreconditionSchema
27396
28459
  }),
27397
28460
  object({
27398
28461
  op: literal("deleteRecord"),
28462
+ owner: string().min(1),
27399
28463
  kind: string().min(1),
27400
28464
  recordKey: string().min(1),
27401
28465
  precondition: PreconditionSchema
28466
+ }),
28467
+ object({
28468
+ op: literal("rekeyDevice"),
28469
+ deviceId: number$1().int().positive(),
28470
+ addonId: string().min(1),
28471
+ stableId: string().min(1),
28472
+ precondition: PreconditionSchema
28473
+ }),
28474
+ object({
28475
+ op: literal("tombstoneDevice"),
28476
+ deviceId: number$1().int().positive(),
28477
+ precondition: PreconditionSchema
27402
28478
  })
27403
28479
  ])) });
27404
28480
  /** `JSON.stringify` with object keys sorted, so equal values spell the same. */
@@ -28316,6 +29392,16 @@ var RecordingBandTriggersSchema = RecordingTriggersSchema;
28316
29392
  * question to answer as a continuous one.
28317
29393
  */
28318
29394
  var RecordingBandAudioSchema = _enum(["on", "muted"]);
29395
+ /**
29396
+ * A battery condition on a band: the band covers a charge level only when
29397
+ * `min <= level < max` (half-open; a missing bound is unbounded). OPTIONAL —
29398
+ * an absent key means "any charge", which is what every config written before
29399
+ * it meant. A band WITH a condition is never met while the charge is unknown.
29400
+ */
29401
+ var RecordingBandBatterySchema = object({
29402
+ min: number$1().min(0).max(100).optional(),
29403
+ max: number$1().min(0).max(100).optional()
29404
+ });
28319
29405
  var RecordingBandSchema = object({
28320
29406
  days: array(RecordingWeekdaySchema),
28321
29407
  start: string().regex(HHMM),
@@ -28327,6 +29413,7 @@ var RecordingBandSchema = object({
28327
29413
  * missing must keep meaning what it meant. See {@link RecordingBandAudioSchema}.
28328
29414
  */
28329
29415
  audio: RecordingBandAudioSchema.optional(),
29416
+ battery: RecordingBandBatterySchema.optional(),
28330
29417
  triggers: RecordingBandTriggersSchema.optional(),
28331
29418
  /**
28332
29419
  * RETIRED (D381). A band no longer carries a pre-buffer of its own.
@@ -55173,6 +56260,31 @@ var BatteryStatusSchema = object({
55173
56260
  */
55174
56261
  voltage: number$1().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
55175
56262
  /**
56263
+ * What the CELL is doing, as opposed to {@link charging} (what it is powered
56264
+ * from). `'charging'` takes current, `'full'` is connected and topped up,
56265
+ * `'idle'` is a stopped cell the firmware reported as such (running on the
56266
+ * battery, or an adapter that is not feeding it).
56267
+ *
56268
+ * Absent or `'unknown'` is NOT an answer: the provider has not read the
56269
+ * charge fields. It must never be coerced to `'idle'` (D315) — a camera
56270
+ * nobody reached would be drawn "not charging". Consumers SKIP it.
56271
+ */
56272
+ chargeState: _enum([
56273
+ "charging",
56274
+ "full",
56275
+ "idle",
56276
+ "unknown"
56277
+ ]).optional().meta({ label: "Charge state" }),
56278
+ /**
56279
+ * Battery current in milliamperes, as the firmware reports it (sign is the
56280
+ * firmware's). `null`/absent = not reported. Stored in mA, not the quantity
56281
+ * base (A), so it carries no reading quantity: a quantity would make the UI
56282
+ * convert and print it as amperes.
56283
+ */
56284
+ currentMa: number$1().nullable().optional().meta(readingMeta("none", { label: "Current (mA)" })),
56285
+ /** Battery temperature in °C. `null`/absent = not reported. */
56286
+ temperatureC: number$1().nullable().optional().meta(readingMeta("temperature", { label: "Temperature" })),
56287
+ /**
55176
56288
  * Ms epoch of the last time the device PROVED it was reachable — a
55177
56289
  * completed firmware round-trip, an observed wake, or an inbound push
55178
56290
  * (firmware event, email). `0`/absent = never since this slice was born.
@@ -67129,14 +68241,8 @@ var IntegrationWithStateSchema = object({
67129
68241
  id: string(),
67130
68242
  addonId: string(),
67131
68243
  name: string(),
67132
- /** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
68244
+ /** THE switch of the instance: the hub registry row is its only stored copy (D1066). */
67133
68245
  enabled: boolean(),
67134
- /**
67135
- * True when the addon that holds the switch did not answer (down, failed, or keeps no record for
67136
- * this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
67137
- * must not draw it as on or off (D315).
67138
- */
67139
- switchUnknown: literal(true).optional(),
67140
68246
  info: record(string(), unknown()).readonly(),
67141
68247
  /** The discovery candidate this integration was set up from (D984). */
67142
68248
  originStableId: string().optional(),
@@ -67148,14 +68254,8 @@ var IntegrationLiteSchema = object({
67148
68254
  id: string(),
67149
68255
  addonId: string(),
67150
68256
  name: string(),
67151
- /** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
68257
+ /** THE switch of the instance: the hub registry row is its only stored copy (D1066). */
67152
68258
  enabled: boolean(),
67153
- /**
67154
- * True when the addon that holds the switch did not answer (down, failed, or keeps no record for
67155
- * this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
67156
- * must not draw it as on or off (D315).
67157
- */
67158
- switchUnknown: literal(true).optional(),
67159
68259
  info: record(string(), unknown()).readonly(),
67160
68260
  /** The discovery candidate this integration was set up from (D984). */
67161
68261
  originStableId: string().optional(),
@@ -67271,7 +68371,27 @@ var DeleteIntegrationResultSchema = object({
67271
68371
  success: boolean(),
67272
68372
  deletedId: string()
67273
68373
  });
67274
- method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string() }), IntegrationWithStateSchema), method(object({ addonId: string() }), IntegrationLiteSchema.nullable()), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
68374
+ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string() }), IntegrationWithStateSchema), method(object({ addonId: string() }), IntegrationLiteSchema.nullable()), method(object({ addonId: string() }), array(IntegrationLiteSchema)), method(object({
68375
+ addonId: string(),
68376
+ rows: array(object({
68377
+ id: string().min(1),
68378
+ name: string(),
68379
+ enabled: boolean(),
68380
+ /** True when the record body STATED the switch: only then does it override an existing row. */
68381
+ stated: boolean()
68382
+ }))
68383
+ }), object({
68384
+ created: number$1().int(),
68385
+ updated: number$1().int(),
68386
+ /** Rows whose id belongs to ANOTHER addon: left untouched, so the caller keeps its own copy. */
68387
+ conflicts: array(object({
68388
+ id: string(),
68389
+ ownerAddonId: string()
68390
+ }))
68391
+ }), {
68392
+ kind: "mutation",
68393
+ auth: "admin"
68394
+ }), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
67275
68395
  kind: "mutation",
67276
68396
  auth: "admin"
67277
68397
  }), method(object({ id: string() }), DeleteIntegrationResultSchema, {
@@ -80963,6 +82083,7 @@ var HardwareClassIdSchema = _enum([
80963
82083
  "apple-m-base",
80964
82084
  "apple-m-pro",
80965
82085
  "amd-phoenix",
82086
+ "nvidia-gpu",
80966
82087
  "unknown"
80967
82088
  ]);
80968
82089
  var AcceleratorKindSchema = _enum([
@@ -80970,6 +82091,7 @@ var AcceleratorKindSchema = _enum([
80970
82091
  "intel-igpu",
80971
82092
  "amd-igpu",
80972
82093
  "amd-npu",
82094
+ "nvidia-gpu",
80973
82095
  "x86-cpu",
80974
82096
  "arm-cpu",
80975
82097
  "apple-ane",
@@ -83413,6 +84535,38 @@ var DETECTOR_PERF = {
83413
84535
  measured: true
83414
84536
  } }
83415
84537
  },
84538
+ "nvidia-gpu": { "nvidia-gpu": {
84539
+ "yolov9t-320": {
84540
+ p50Ms: 12,
84541
+ fps: 83,
84542
+ measured: false
84543
+ },
84544
+ "yolov9t-640": {
84545
+ p50Ms: 16,
84546
+ fps: 62,
84547
+ measured: false
84548
+ },
84549
+ "yolov9s-320": {
84550
+ p50Ms: 13,
84551
+ fps: 77,
84552
+ measured: false
84553
+ },
84554
+ "yolov9s-640": {
84555
+ p50Ms: 20,
84556
+ fps: 50,
84557
+ measured: false
84558
+ },
84559
+ "yolov9m-320": {
84560
+ p50Ms: 16,
84561
+ fps: 62,
84562
+ measured: false
84563
+ },
84564
+ "yolov9m-640": {
84565
+ p50Ms: 32,
84566
+ fps: 31,
84567
+ measured: false
84568
+ }
84569
+ } },
83416
84570
  "apple-m-pro": {
83417
84571
  "apple-ane": {
83418
84572
  "yolov9t-320": {
@@ -83701,6 +84855,13 @@ function scaleColumn(column, ratio, estimatedFrom) {
83701
84855
  function resolveLatencyColumn(input) {
83702
84856
  const perf = input.perf ?? DETECTOR_PERF;
83703
84857
  const references = input.references ?? REFERENCE_COMPUTE;
84858
+ if (input.accelerator === "nvidia-gpu") {
84859
+ const card = classColumn(perf, "nvidia-gpu", "nvidia-gpu");
84860
+ return card === void 0 ? null : {
84861
+ column: card,
84862
+ estimatedFrom: null
84863
+ };
84864
+ }
83704
84865
  const measured = classColumn(perf, input.hardwareClass, input.accelerator);
83705
84866
  if (measured !== void 0 && input.hardwareClass !== "intel-n-series") return {
83706
84867
  column: measured,
@@ -100107,6 +101268,13 @@ Object.freeze({
100107
101268
  access: "create",
100108
101269
  role: "admin"
100109
101270
  },
101271
+ "integrations.adoptInstanceRows": {
101272
+ capName: "integrations",
101273
+ capScope: "system",
101274
+ addonId: null,
101275
+ access: "create",
101276
+ role: "admin"
101277
+ },
100110
101278
  "integrations.delete": {
100111
101279
  capName: "integrations",
100112
101280
  capScope: "system",
@@ -100142,6 +101310,13 @@ Object.freeze({
100142
101310
  access: "view",
100143
101311
  role: "admin"
100144
101312
  },
101313
+ "integrations.listByAddon": {
101314
+ capName: "integrations",
101315
+ capScope: "system",
101316
+ addonId: null,
101317
+ access: "view",
101318
+ role: "admin"
101319
+ },
100145
101320
  "integrations.update": {
100146
101321
  capName: "integrations",
100147
101322
  capScope: "system",
@@ -106998,7 +108173,7 @@ DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep",
106998
108173
  "startTalkSession",
106999
108174
  "pushTalkAudio",
107000
108175
  "endTalkSession"
107001
- ]), 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");
108176
+ ]), 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");
107002
108177
  var ALL_FEATURES = Object.values(DeviceFeature);
107003
108178
  new Set(ALL_FEATURES);
107004
108179
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
@@ -111755,6 +112930,10 @@ function classifyInferenceHardware(hw) {
111755
112930
  hardwareClass: "amd-phoenix",
111756
112931
  cpuModel
111757
112932
  };
112933
+ if (hw.nvidia?.usable === true) return {
112934
+ hardwareClass: "nvidia-gpu",
112935
+ cpuModel
112936
+ };
111758
112937
  return {
111759
112938
  hardwareClass: "unknown",
111760
112939
  cpuModel
@@ -111772,6 +112951,7 @@ function acceleratorKindOf(deviceKey, hw) {
111772
112951
  if (backend === "openvino" && device === "npu") return "intel-npu";
111773
112952
  if (backend === "openvino" && device === "gpu") return "intel-igpu";
111774
112953
  if (backend === "onnx" && device === "webgpu") return "amd-igpu";
112954
+ if (backend === "cuda" || backend === "onnx" && device === "cuda") return "nvidia-gpu";
111775
112955
  if (backend === "vitisai" && device === "npu") return "amd-npu";
111776
112956
  if (backend === "cpu" || device === "cpu") return hw.arch === "arm64" ? "arm-cpu" : "x86-cpu";
111777
112957
  return null;
@@ -115818,6 +116998,7 @@ function defaultModelIdForDevice(deviceKey) {
115818
116998
  if (backend === "edgetpu") return "yolov9s-320-edgetpu";
115819
116999
  if (backend === "coreml") return "yolov9m-640";
115820
117000
  if (backend === "onnx" && device === "webgpu") return "yolov9t-320";
117001
+ if (backend === "cuda" || backend === "onnx" && device === "cuda") return "yolov9m-320";
115821
117002
  return "yolov9s-320";
115822
117003
  }
115823
117004
  /**