@camstack/addon-export-hap 1.2.89 → 1.2.91

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.
@@ -72,7 +72,7 @@ function carryForward(base, existing, keys) {
72
72
  return out;
73
73
  }
74
74
  //#endregion
75
- //#region ../types/dist/event-category-zAv7pMUz.mjs
75
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
76
76
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
77
77
  EventCategory["SystemBoot"] = "system.boot";
78
78
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -267,6 +267,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
267
267
  EventCategory["ProcessCrashed"] = "process.crashed";
268
268
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
269
269
  EventCategory["ProcessRestarted"] = "process.restarted";
270
+ /**
271
+ * The SET of storage locations changed — one was created, edited, enabled,
272
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
273
+ *
274
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
275
+ * it must also converge on its own periodic path, because a dropped event
276
+ * must not leave a node writing to yesterday's disk set forever. It exists
277
+ * because there was NO signal at all — an operator who added a second
278
+ * recordings disk in the admin UI got nothing, and the recorder kept its
279
+ * resolved locations until something else happened to re-resolve them
280
+ * (D387). Payload `StorageLocationsChangedPayload`.
281
+ */
282
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
270
283
  EventCategory["RecordingStarted"] = "recording.started";
271
284
  EventCategory["RecordingStopped"] = "recording.stopped";
272
285
  EventCategory["RecordingError"] = "recording.error";
@@ -8269,111 +8282,6 @@ var CameraSwitchGroupSchema = object({
8269
8282
  fetchedAt: number()
8270
8283
  });
8271
8284
  /**
8272
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
8273
- * an addon declares its channels in.
8274
- *
8275
- * ## Two axes, deliberately separated
8276
- *
8277
- * - **DECLARATION** — which channels exist. Only the addon knows:
8278
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8279
- * baichuan/handshake. A hand-wired central list rots at the first addition,
8280
- * and rots silently. So a channel is declared where it is consulted, and the
8281
- * `log-channels` capability enumerates the declarations.
8282
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
8283
- * thing: the logging settings document on the `system` cap. Two authorities
8284
- * over the values is the exact defect
8285
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8286
- * remove; re-introducing it from the cure side would be grotesque.
8287
- *
8288
- * Nothing in this file reads a clock, an env var or a store. The registry is
8289
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8290
- * the hot path with a value somebody actually read, and by
8291
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8292
- * never reaches here, so it can neither disarm an armed channel nor arm a
8293
- * disarmed one (D49).
8294
- *
8295
- * ## The canonical call shape
8296
- *
8297
- * ```ts
8298
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8299
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8300
- * }
8301
- * ```
8302
- *
8303
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8304
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
8305
- * object literal is never constructed because it lives inside the branch. It
8306
- * is the same shape already proven in production at `stream-broker.ts:1650`,
8307
- * and the same discipline `LoggingGate.allowsDestination` uses for the
8308
- * destination floor (measured at 1.93 ns/call when off).
8309
- *
8310
- * ## Why a channel emits at `info`
8311
- *
8312
- * `loki-logging.addon.ts` pins the destination default at `info` and
8313
- * `loki-destination.ts` drops everything below it, so a line emitted at
8314
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8315
- * minutes. A diagnostic that cannot be read an hour later is worse than no
8316
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8317
- * emits at the channel's declared level, whose schema floor is `info`.
8318
- */
8319
- /**
8320
- * The level a channel writes at once armed.
8321
- *
8322
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8323
- * not leave the process for Loki, and the whole point of arming a channel is
8324
- * to read it later.
8325
- */
8326
- var LogChannelLevelSchema = _enum([
8327
- "info",
8328
- "warn",
8329
- "error"
8330
- ]);
8331
- /**
8332
- * What an addon declares about one channel. No value, no state — a
8333
- * declaration is inert.
8334
- */
8335
- var LogChannelDescriptorSchema = object({
8336
- /**
8337
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8338
- * the addon's short name so an operator reading a channel list can tell who
8339
- * owns it without a second lookup.
8340
- */
8341
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8342
- /** One sentence: what the operator will SEE after arming it. */
8343
- description: string().min(1),
8344
- /** The level its lines are emitted at. Never below `info`. */
8345
- defaultLevel: LogChannelLevelSchema,
8346
- /**
8347
- * Whether this channel can be narrowed to a camera.
8348
- *
8349
- * `true` is a PROMISE with two halves, and both must hold: the gate is
8350
- * consulted with the numeric device id, AND every line the channel admits
8351
- * carries `tags: { deviceId }` with that same numeric id. The second half is
8352
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8353
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8354
- * the body is the only way to filter.
8355
- *
8356
- * A channel whose lines carry the device only in `meta` (or not at all) is
8357
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8358
- * the operator narrows to one camera, sees nothing, and concludes the code
8359
- * path was never taken.
8360
- */
8361
- perDevice: boolean()
8362
- });
8363
- /**
8364
- * An armed window over one channel, as the document hands it to a mirror.
8365
- *
8366
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8367
- * expires by itself, which is the one failure a boolean cannot avoid.
8368
- */
8369
- var LogChannelWindowSchema = object({
8370
- channel: string().min(1),
8371
- /** Epoch ms the window closes at. */
8372
- armedUntilMs: number(),
8373
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8374
- deviceIds: array(number().int()).readonly().nullable()
8375
- });
8376
- /**
8377
8285
  * Ops-log — the durable, append-only operations audit shared by the
8378
8286
  * recordings and events management surfaces.
8379
8287
  *
@@ -9295,6 +9203,21 @@ var StorageCleanupJobSchema = object({
9295
9203
  });
9296
9204
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9297
9205
  /**
9206
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9207
+ * alias below is `z.infer<>` of it, never a second spelling.
9208
+ */
9209
+ var StorageLocationModeSchema = _enum([
9210
+ "active",
9211
+ "readonly",
9212
+ "drain",
9213
+ "disabled"
9214
+ ]);
9215
+ _enum([
9216
+ "normal",
9217
+ "never",
9218
+ "drain"
9219
+ ]);
9220
+ /**
9298
9221
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9299
9222
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9300
9223
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9319,8 +9242,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9319
9242
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
9320
9243
  *
9321
9244
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
9322
- * The default location for a type uses `id === <type>:default` by
9323
- * convention (the bare type ref like `'backups'` resolves to it).
9245
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
9246
+ * There is no default location any more (D383): `enabled` is the whole write
9247
+ * model, and a bare type ref resolves to the sole location of the type, or —
9248
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
9249
+ * slug is `default`.
9324
9250
  *
9325
9251
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
9326
9252
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -9341,23 +9267,37 @@ var StorageLocationSchema = object({
9341
9267
  * flag at upsert time, not here (the schema is provider-agnostic).
9342
9268
  */
9343
9269
  nodeId: string().optional(),
9344
- isDefault: boolean().default(false),
9345
9270
  isSystem: boolean().default(false),
9346
9271
  /**
9347
- * Operator opt-in: whether consumers that BALANCE across several locations
9348
- * of a type may write here. Recordings reads it today; event media and
9349
- * backups are the next consumers, which is why the flag lives on the
9350
- * location rather than in any one addon's store — nothing has to be
9351
- * extended to add the next consumer.
9272
+ * THE write switch, and the only one (D383). `enabled: true` means every
9273
+ * consumer that chooses a write target for this type may write here, and all
9274
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
9275
+ * still read, still played back, still age-swept, still drained, never
9276
+ * written.
9352
9277
  *
9353
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
9354
- * flag existed reads back with no flag and keeps working exactly as before;
9355
- * that is the whole compat story, and it is why no migration ships with it.
9356
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
9357
- * disk must not silently start writing to it); the default of a type is
9358
- * always stamped `true`.
9278
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
9279
+ * stored" on an update and "born inert unless it is the first location of its
9280
+ * type" on a create. On a PERSISTED row absence is legacy and it means
9281
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
9282
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
9283
+ * stops existing rather than being re-derived on every read.
9359
9284
  */
9360
9285
  enabled: boolean().optional(),
9286
+ /**
9287
+ * THE state of this location (D385), and the only authority on what may be
9288
+ * written, read or evicted here. Interpreted in exactly one place —
9289
+ * `storage-location-mode.ts` — which also folds the legacy
9290
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9291
+ * ambiguous.
9292
+ *
9293
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9294
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9295
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9296
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9297
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9298
+ * either, so the two cannot disagree.
9299
+ */
9300
+ mode: StorageLocationModeSchema.optional(),
9361
9301
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9362
9302
  * for node-local locations it can reach) — never persisted, absent when the
9363
9303
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9365,13 +9305,50 @@ var StorageLocationSchema = object({
9365
9305
  totalBytes: number(),
9366
9306
  availableBytes: number()
9367
9307
  }).nullable().optional(),
9308
+ /**
9309
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9310
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9311
+ * never persisted, never a filesystem walk.
9312
+ *
9313
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9314
+ * location yet — nobody stores here, the owning addon is down, or the first
9315
+ * refresh has not completed. A UI must omit the segment rather than draw it
9316
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9317
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9318
+ * be spelled out loud instead of appearing by accident.
9319
+ *
9320
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9321
+ * about the whole figure rather than about its freshest part.
9322
+ */
9323
+ owned: object({
9324
+ bytes: number().int().nonnegative(),
9325
+ measuredAtMs: number().int().nonnegative()
9326
+ }).optional(),
9368
9327
  createdAt: number(),
9369
9328
  updatedAt: number()
9370
9329
  });
9330
+ object({ isDefault: boolean().optional() });
9331
+ /**
9332
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9333
+ *
9334
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9335
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9336
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9337
+ * operator learns not to believe the screen.
9338
+ */
9339
+ var StorageDrainProgressSchema = object({
9340
+ locationId: string(),
9341
+ startedAtMs: number(),
9342
+ startBytes: number(),
9343
+ bytesRemaining: number(),
9344
+ drained: boolean(),
9345
+ estimatedEmptyAtMs: number().nullable()
9346
+ });
9371
9347
  /**
9372
9348
  * Reference accepted by consumer-facing `api.storage.*` calls.
9373
9349
  * Either:
9374
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
9350
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
9351
+ * (transitionally, the `<type>:default`-slugged row when several exist)
9375
9352
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
9376
9353
  *
9377
9354
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9547,6 +9524,111 @@ var DecoderSessionConfigSchema = object({
9547
9524
  */
9548
9525
  debug: boolean().optional()
9549
9526
  });
9527
+ /**
9528
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9529
+ * an addon declares its channels in.
9530
+ *
9531
+ * ## Two axes, deliberately separated
9532
+ *
9533
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9534
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9535
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9536
+ * and rots silently. So a channel is declared where it is consulted, and the
9537
+ * `log-channels` capability enumerates the declarations.
9538
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9539
+ * thing: the logging settings document on the `system` cap. Two authorities
9540
+ * over the values is the exact defect
9541
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9542
+ * remove; re-introducing it from the cure side would be grotesque.
9543
+ *
9544
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9545
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9546
+ * the hot path with a value somebody actually read, and by
9547
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9548
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9549
+ * disarmed one (D49).
9550
+ *
9551
+ * ## The canonical call shape
9552
+ *
9553
+ * ```ts
9554
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9555
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9556
+ * }
9557
+ * ```
9558
+ *
9559
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9560
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9561
+ * object literal is never constructed because it lives inside the branch. It
9562
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9563
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9564
+ * destination floor (measured at 1.93 ns/call when off).
9565
+ *
9566
+ * ## Why a channel emits at `info`
9567
+ *
9568
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9569
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9570
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9571
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9572
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9573
+ * emits at the channel's declared level, whose schema floor is `info`.
9574
+ */
9575
+ /**
9576
+ * The level a channel writes at once armed.
9577
+ *
9578
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9579
+ * not leave the process for Loki, and the whole point of arming a channel is
9580
+ * to read it later.
9581
+ */
9582
+ var LogChannelLevelSchema = _enum([
9583
+ "info",
9584
+ "warn",
9585
+ "error"
9586
+ ]);
9587
+ /**
9588
+ * What an addon declares about one channel. No value, no state — a
9589
+ * declaration is inert.
9590
+ */
9591
+ var LogChannelDescriptorSchema = object({
9592
+ /**
9593
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9594
+ * the addon's short name so an operator reading a channel list can tell who
9595
+ * owns it without a second lookup.
9596
+ */
9597
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9598
+ /** One sentence: what the operator will SEE after arming it. */
9599
+ description: string().min(1),
9600
+ /** The level its lines are emitted at. Never below `info`. */
9601
+ defaultLevel: LogChannelLevelSchema,
9602
+ /**
9603
+ * Whether this channel can be narrowed to a camera.
9604
+ *
9605
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9606
+ * consulted with the numeric device id, AND every line the channel admits
9607
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9608
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9609
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9610
+ * the body is the only way to filter.
9611
+ *
9612
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9613
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9614
+ * the operator narrows to one camera, sees nothing, and concludes the code
9615
+ * path was never taken.
9616
+ */
9617
+ perDevice: boolean()
9618
+ });
9619
+ /**
9620
+ * An armed window over one channel, as the document hands it to a mirror.
9621
+ *
9622
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9623
+ * expires by itself, which is the one failure a boolean cannot avoid.
9624
+ */
9625
+ var LogChannelWindowSchema = object({
9626
+ channel: string().min(1),
9627
+ /** Epoch ms the window closes at. */
9628
+ armedUntilMs: number(),
9629
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9630
+ deviceIds: array(number().int()).readonly().nullable()
9631
+ });
9550
9632
  function pickPreferredRtspEntry(entries, pref, deviceId, options = {}) {
9551
9633
  if (entries.length === 0) return null;
9552
9634
  const prefix = `${deviceId}/`;
@@ -22346,7 +22428,7 @@ method(object({
22346
22428
  downloadId: string(),
22347
22429
  offset: number(),
22348
22430
  length: number()
22349
- }), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(object({ type: StorageLocationTypeSchema }), StorageLocationSchema.nullable()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
22431
+ }), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
22350
22432
  createdAt: true,
22351
22433
  updatedAt: true
22352
22434
  }), StorageLocationSchema, {
@@ -22358,7 +22440,7 @@ method(object({
22358
22440
  }), _void(), {
22359
22441
  kind: "mutation",
22360
22442
  auth: "admin"
22361
- }), method(object({ id: string() }), object({
22443
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22362
22444
  ok: boolean(),
22363
22445
  error: string().optional()
22364
22446
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22428,6 +22510,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22428
22510
  kind: "mutation",
22429
22511
  auth: "admin"
22430
22512
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22513
+ /**
22514
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22515
+ * location (D388).
22516
+ *
22517
+ * ## Why this is not `storage-evictable`
22518
+ *
22519
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22520
+ * not, in two ways that both matter and both bite hardest on the locations an
22521
+ * operator most wants a figure for:
22522
+ *
22523
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22524
+ * and `recordingsLow:default` deliberately share one root and evict as one
22525
+ * oldest-first pool, so both answer with the SAME combined total. As an
22526
+ * occupancy figure that double-counts the disk.
22527
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22528
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22529
+ * is retiring and staring at.
22530
+ *
22531
+ * So this is its own contract with its own quantity, and the quantity is
22532
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22533
+ * would ever be willing to delete it. A provider that can only answer
22534
+ * "evictable" must not register here — a number that silently means different
22535
+ * things per class is worse than no number.
22536
+ *
22537
+ * ## Absence is an answer
22538
+ *
22539
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22540
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22541
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22542
+ * consuming side has to be written out loud instead of appearing by accident.
22543
+ *
22544
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22545
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22546
+ */
22547
+ /** One provider's occupancy answer for one location. */
22548
+ var StorageOccupancyReportSchema = object({
22549
+ locationId: string(),
22550
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22551
+ * not net of what it is willing to delete. */
22552
+ ownedBytes: number().int().nonnegative(),
22553
+ /** When the provider last actually measured this. The orchestrator carries it
22554
+ * through so a UI can say how old the figure is instead of implying "now". */
22555
+ measuredAtMs: number().int().nonnegative()
22556
+ });
22557
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22431
22558
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22432
22559
  providerId: string().min(1),
22433
22560
  displayName: string().min(1),
@@ -24067,39 +24194,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
24067
24194
  deviceId: number(),
24068
24195
  status: BatteryStatusSchema
24069
24196
  });
24070
- /**
24071
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
24072
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24073
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
24074
- * one Home Assistant projection.
24075
- */
24076
- var NetworkLinkStatusSchema = object({
24077
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24078
- type: _enum([
24079
- "wifi",
24080
- "ethernet",
24081
- "cellular",
24082
- "unknown"
24083
- ]),
24084
- /**
24085
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
24086
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24087
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24088
- * one whose reading has not landed must not be drawn at 0 %. Consumers
24089
- * SKIP a null rather than coerce it.
24090
- */
24091
- signalPercent: number().min(0).max(100).nullable(),
24092
- /** Raw received signal strength in dBm, when the firmware reports one. */
24093
- rssiDbm: number().optional(),
24094
- /** Network name of a wireless link, when the firmware reports it. */
24095
- ssid: string().optional(),
24096
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24097
- lastUpdated: number()
24098
- });
24099
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
24100
- deviceId: number(),
24101
- status: NetworkLinkStatusSchema
24102
- });
24103
24197
  object({
24104
24198
  on: boolean(),
24105
24199
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26497,6 +26591,236 @@ DeviceType.Camera, method(object({
26497
26591
  detection: NativeDetectionSchema
26498
26592
  });
26499
26593
  /**
26594
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26595
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26596
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26597
+ *
26598
+ * Why a NEW cap rather than overloading `ptz`:
26599
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26600
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26601
+ * The two are different physical models: PTZ is absolute-position + presets,
26602
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26603
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26604
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26605
+ * the reverse:
26606
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26607
+ * / `getOptions`), and
26608
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26609
+ * robot camera shows up in the existing PTZ control path without every
26610
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26611
+ * not here (see the addon design note):
26612
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26613
+ * ptz.stop() → navigation.stop()
26614
+ * ptz.goHome() → navigation.runAction('goHome')
26615
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26616
+ * ptz.goToPreset(id) → navigation.runAction(id)
26617
+ *
26618
+ * ## Continuous drive
26619
+ *
26620
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26621
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26622
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26623
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26624
+ * coalesce them. The UI owns the cadence.
26625
+ *
26626
+ * ## The action dictionary
26627
+ *
26628
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26629
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26630
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26631
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26632
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26633
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26634
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26635
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26636
+ *
26637
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26638
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26639
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26640
+ * every device handle. A future nodedreame publish adds a typed
26641
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26642
+ * provider can then swap the raw calls for the typed methods with no change to
26643
+ * THIS contract.
26644
+ */
26645
+ /**
26646
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26647
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26648
+ * halts it.
26649
+ *
26650
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26651
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26652
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26653
+ * vector by it (drivers without proportional drive ignore it).
26654
+ *
26655
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26656
+ * axis alone; an all-undefined nudge is a no-op.
26657
+ */
26658
+ var NavigationMoveCommandSchema = object({
26659
+ pan: number().min(-1).max(1).optional(),
26660
+ tilt: number().min(-1).max(1).optional(),
26661
+ speed: number().min(0).max(1).optional()
26662
+ });
26663
+ /**
26664
+ * The enumerated discrete actions a navigation-capable robot can perform via
26665
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26666
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26667
+ * `playSound` (see the `sound` dictionary entries).
26668
+ */
26669
+ var NavigationActionIdSchema = _enum([
26670
+ "goHome",
26671
+ "locate",
26672
+ "spotClean",
26673
+ "findPet",
26674
+ "personFollow",
26675
+ "stop",
26676
+ "startClean",
26677
+ "pauseClean",
26678
+ "dockWash",
26679
+ "autoEmpty",
26680
+ "flashOn",
26681
+ "flashOff"
26682
+ ]);
26683
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26684
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26685
+ /**
26686
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26687
+ * native panel and the PTZ mimic render as a button.
26688
+ *
26689
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26690
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26691
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26692
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26693
+ * - `label` — operator-facing English label.
26694
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26695
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26696
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26697
+ * flips it from config, never by editing code.
26698
+ */
26699
+ var NavigationActionEntrySchema = object({
26700
+ id: string(),
26701
+ kind: NavigationEntryKindSchema,
26702
+ label: string(),
26703
+ icon: string(),
26704
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26705
+ soundId: number().int().optional(),
26706
+ /** Per-device feature flag — render this entry only when true. */
26707
+ enabled: boolean()
26708
+ });
26709
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26710
+ var NavigationPointSchema = object({
26711
+ x: number(),
26712
+ y: number()
26713
+ });
26714
+ /**
26715
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26716
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26717
+ * that are turned on for THIS device. Data-driven: the provider derives these
26718
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26719
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26720
+ * that are not dictionary entries.
26721
+ *
26722
+ * - `move` / `stop` — the momentary drive joystick.
26723
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26724
+ * map-coordinate plumbing is wired.
26725
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26726
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26727
+ * - `light` — the on/off fill-light toggle (works anytime).
26728
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26729
+ * camera-service control; needs an active stream).
26730
+ */
26731
+ var NavigationFeaturesSchema = object({
26732
+ move: boolean(),
26733
+ stop: boolean(),
26734
+ goToPoint: boolean(),
26735
+ runAction: boolean(),
26736
+ playSound: boolean(),
26737
+ light: boolean(),
26738
+ lightMode: boolean()
26739
+ });
26740
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26741
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26742
+ /**
26743
+ * Live navigation state so the UI can reflect what the robot is doing:
26744
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26745
+ * - `following` — person/pet follow is currently armed.
26746
+ * - `flash` — the on-camera fill light is on.
26747
+ * - `lightMode` — auto vs manual fill-light mode.
26748
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26749
+ * `lightMode === 'manual'`.
26750
+ */
26751
+ var NavigationStatusSchema = object({
26752
+ mode: _enum([
26753
+ "idle",
26754
+ "cleaning",
26755
+ "spot",
26756
+ "following",
26757
+ "goto",
26758
+ "returning",
26759
+ "paused",
26760
+ "unknown"
26761
+ ]),
26762
+ following: boolean(),
26763
+ flash: boolean(),
26764
+ lightMode: NavigationLightModeSchema,
26765
+ lightLevel: number().min(40).max(100),
26766
+ /** Ms epoch when the slice was last updated. */
26767
+ lastChangedAt: number()
26768
+ });
26769
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26770
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
26771
+ deviceId: number(),
26772
+ actionId: NavigationActionIdSchema
26773
+ }), _void(), { kind: "mutation" }), method(object({
26774
+ deviceId: number(),
26775
+ soundId: number().int()
26776
+ }), _void(), { kind: "mutation" }), method(object({
26777
+ deviceId: number(),
26778
+ on: boolean()
26779
+ }), _void(), { kind: "mutation" }), method(object({
26780
+ deviceId: number(),
26781
+ mode: NavigationLightModeSchema,
26782
+ level: number().min(40).max(100).optional()
26783
+ }), _void(), { kind: "mutation" }), method(object({
26784
+ deviceId: number(),
26785
+ level: number().min(40).max(100)
26786
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26787
+ deviceId: number(),
26788
+ status: NavigationStatusSchema
26789
+ });
26790
+ /**
26791
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26792
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26793
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26794
+ * one Home Assistant projection.
26795
+ */
26796
+ var NetworkLinkStatusSchema = object({
26797
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26798
+ type: _enum([
26799
+ "wifi",
26800
+ "ethernet",
26801
+ "cellular",
26802
+ "unknown"
26803
+ ]),
26804
+ /**
26805
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26806
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26807
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26808
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26809
+ * SKIP a null rather than coerce it.
26810
+ */
26811
+ signalPercent: number().min(0).max(100).nullable(),
26812
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26813
+ rssiDbm: number().optional(),
26814
+ /** Network name of a wireless link, when the firmware reports it. */
26815
+ ssid: string().optional(),
26816
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26817
+ lastUpdated: number()
26818
+ });
26819
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26820
+ deviceId: number(),
26821
+ status: NetworkLinkStatusSchema
26822
+ });
26823
+ /**
26500
26824
  * network-quality — system-scoped singleton capability tracking RTT,
26501
26825
  * jitter, and observed/peak bandwidth per device + per client.
26502
26826
  *
@@ -27738,203 +28062,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27738
28062
  deviceId: number(),
27739
28063
  status: PtzAutotrackStatusSchema
27740
28064
  });
27741
- /**
27742
- * `navigation` — a device-scoped capability that natively expresses the FULL
27743
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27744
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27745
- *
27746
- * Why a NEW cap rather than overloading `ptz`:
27747
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27748
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27749
- * The two are different physical models: PTZ is absolute-position + presets,
27750
- * navigation is momentary drive nudges + discrete robot ACTIONS
27751
- * (dock / spot-clean / follow-pet / go-to-point / …).
27752
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27753
- * the reverse:
27754
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27755
- * / `getOptions`), and
27756
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27757
- * robot camera shows up in the existing PTZ control path without every
27758
- * PTZ provider learning about robots. The mapping lives in the adapter,
27759
- * not here (see the addon design note):
27760
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27761
- * ptz.stop() → navigation.stop()
27762
- * ptz.goHome() → navigation.runAction('goHome')
27763
- * ptz.getPresets() → navigation.listActions() (id→preset)
27764
- * ptz.goToPreset(id) → navigation.runAction(id)
27765
- *
27766
- * ## Continuous drive
27767
- *
27768
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27769
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27770
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27771
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27772
- * coalesce them. The UI owns the cadence.
27773
- *
27774
- * ## The action dictionary
27775
- *
27776
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27777
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27778
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27779
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27780
- * vendor-specific list. `kind: 'action'` entries are triggered with
27781
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27782
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27783
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27784
- *
27785
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27786
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27787
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27788
- * every device handle. A future nodedreame publish adds a typed
27789
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27790
- * provider can then swap the raw calls for the typed methods with no change to
27791
- * THIS contract.
27792
- */
27793
- /**
27794
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27795
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27796
- * halts it.
27797
- *
27798
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27799
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27800
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27801
- * vector by it (drivers without proportional drive ignore it).
27802
- *
27803
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27804
- * axis alone; an all-undefined nudge is a no-op.
27805
- */
27806
- var NavigationMoveCommandSchema = object({
27807
- pan: number().min(-1).max(1).optional(),
27808
- tilt: number().min(-1).max(1).optional(),
27809
- speed: number().min(0).max(1).optional()
27810
- });
27811
- /**
27812
- * The enumerated discrete actions a navigation-capable robot can perform via
27813
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27814
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27815
- * `playSound` (see the `sound` dictionary entries).
27816
- */
27817
- var NavigationActionIdSchema = _enum([
27818
- "goHome",
27819
- "locate",
27820
- "spotClean",
27821
- "findPet",
27822
- "personFollow",
27823
- "stop",
27824
- "startClean",
27825
- "pauseClean",
27826
- "dockWash",
27827
- "autoEmpty",
27828
- "flashOn",
27829
- "flashOff"
27830
- ]);
27831
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27832
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27833
- /**
27834
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27835
- * native panel and the PTZ mimic render as a button.
27836
- *
27837
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27838
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27839
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27840
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27841
- * - `label` — operator-facing English label.
27842
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27843
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27844
- * PTZ render ONLY enabled entries. Data-driven: the provider
27845
- * flips it from config, never by editing code.
27846
- */
27847
- var NavigationActionEntrySchema = object({
27848
- id: string(),
27849
- kind: NavigationEntryKindSchema,
27850
- label: string(),
27851
- icon: string(),
27852
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27853
- soundId: number().int().optional(),
27854
- /** Per-device feature flag — render this entry only when true. */
27855
- enabled: boolean()
27856
- });
27857
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27858
- var NavigationPointSchema = object({
27859
- x: number(),
27860
- y: number()
27861
- });
27862
- /**
27863
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27864
- * The cap reports which are enabled so the UI / PTZ render only the controls
27865
- * that are turned on for THIS device. Data-driven: the provider derives these
27866
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27867
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27868
- * that are not dictionary entries.
27869
- *
27870
- * - `move` / `stop` — the momentary drive joystick.
27871
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27872
- * map-coordinate plumbing is wired.
27873
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27874
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27875
- * - `light` — the on/off fill-light toggle (works anytime).
27876
- * - `lightMode` — the auto/manual selector + manual level slider (a
27877
- * camera-service control; needs an active stream).
27878
- */
27879
- var NavigationFeaturesSchema = object({
27880
- move: boolean(),
27881
- stop: boolean(),
27882
- goToPoint: boolean(),
27883
- runAction: boolean(),
27884
- playSound: boolean(),
27885
- light: boolean(),
27886
- lightMode: boolean()
27887
- });
27888
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27889
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27890
- /**
27891
- * Live navigation state so the UI can reflect what the robot is doing:
27892
- * - `mode` — coarse activity (idle / cleaning / following / …).
27893
- * - `following` — person/pet follow is currently armed.
27894
- * - `flash` — the on-camera fill light is on.
27895
- * - `lightMode` — auto vs manual fill-light mode.
27896
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27897
- * `lightMode === 'manual'`.
27898
- */
27899
- var NavigationStatusSchema = object({
27900
- mode: _enum([
27901
- "idle",
27902
- "cleaning",
27903
- "spot",
27904
- "following",
27905
- "goto",
27906
- "returning",
27907
- "paused",
27908
- "unknown"
27909
- ]),
27910
- following: boolean(),
27911
- flash: boolean(),
27912
- lightMode: NavigationLightModeSchema,
27913
- lightLevel: number().min(40).max(100),
27914
- /** Ms epoch when the slice was last updated. */
27915
- lastChangedAt: number()
27916
- });
27917
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27918
- DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
27919
- deviceId: number(),
27920
- actionId: NavigationActionIdSchema
27921
- }), _void(), { kind: "mutation" }), method(object({
27922
- deviceId: number(),
27923
- soundId: number().int()
27924
- }), _void(), { kind: "mutation" }), method(object({
27925
- deviceId: number(),
27926
- on: boolean()
27927
- }), _void(), { kind: "mutation" }), method(object({
27928
- deviceId: number(),
27929
- mode: NavigationLightModeSchema,
27930
- level: number().min(40).max(100).optional()
27931
- }), _void(), { kind: "mutation" }), method(object({
27932
- deviceId: number(),
27933
- level: number().min(40).max(100)
27934
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27935
- deviceId: number(),
27936
- status: NavigationStatusSchema
27937
- });
27938
28065
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27939
28066
  kind: "mutation",
27940
28067
  auth: "admin"
@@ -35268,13 +35395,13 @@ Object.freeze({
35268
35395
  addonId: null,
35269
35396
  access: "view"
35270
35397
  },
35271
- "storage.getDefaultLocation": {
35398
+ "storage.list": {
35272
35399
  capName: "storage",
35273
35400
  capScope: "system",
35274
35401
  addonId: null,
35275
35402
  access: "view"
35276
35403
  },
35277
- "storage.list": {
35404
+ "storage.listDrainProgress": {
35278
35405
  capName: "storage",
35279
35406
  capScope: "system",
35280
35407
  addonId: null,
@@ -35424,6 +35551,12 @@ Object.freeze({
35424
35551
  addonId: null,
35425
35552
  access: "view"
35426
35553
  },
35554
+ "storageOccupancy.getOccupancy": {
35555
+ capName: "storage-occupancy",
35556
+ capScope: "system",
35557
+ addonId: null,
35558
+ access: "view"
35559
+ },
35427
35560
  "storageProvider.abortUpload": {
35428
35561
  capName: "storage-provider",
35429
35562
  capScope: "system",
@@ -38804,32 +38937,221 @@ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
38804
38937
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
38805
38938
  var MB = 1024 * 1024;
38806
38939
  1024 * MB, 3072 * MB;
38807
- /**
38808
- * Compute the stable 64-char lowercase-hex fingerprint of a device's
38809
- * export-relevant shape. Two structurally-equal shapes (any feature order,
38810
- * any duplicates, any deviceId) hash identically.
38811
- */
38812
- function canonicalDeviceFingerprint(shape) {
38813
- const features = [...new Set(shape.features)].toSorted();
38814
- return canonicalHash({
38815
- deviceType: shape.deviceType,
38816
- features
38817
- });
38818
- }
38819
- /**
38820
- * Resolve the fingerprint an exporter should feed into `diffExportTargets`
38821
- * for one device this cycle.
38822
- *
38823
- * When a device is NOT yet probe-ready, carry forward its last-advertised
38824
- * (persisted) fingerprint so it nets to NO CHANGE in `diffExportTargets`
38825
- * (neither update nor remove) — never advertise a partial mid-probe shape. A
38826
- * brand-new un-probed device with no persisted entry falls back to `fresh` so
38827
- * it can advertise once.
38828
- */
38829
- function resolveExportFingerprint(input) {
38830
- if (input.ready) return input.fresh;
38831
- return input.persisted ?? input.fresh;
38832
- }
38940
+ var DEFAULT_FIRST_UNIT_TIMEOUT_MS = 12e3;
38941
+ /** Heartbeat cadence — ~2 minutes of 4 s fragments. */
38942
+ var FRAGMENT_LOG_EVERY = 30;
38943
+ var Fmp4FragmentChild = class {
38944
+ deps;
38945
+ args;
38946
+ child = null;
38947
+ splitter = new Fmp4BoxSplitter();
38948
+ stopped = false;
38949
+ unitsOut = 0;
38950
+ activeHwAccel = null;
38951
+ constructor(deps, args) {
38952
+ this.deps = deps;
38953
+ this.args = args;
38954
+ }
38955
+ /** Spawn, and resolve once the INIT segment has been cut out of stdout. */
38956
+ async start() {
38957
+ const requested = this.args.invocation.decodeHwAccel;
38958
+ this.activeHwAccel = requested;
38959
+ try {
38960
+ await this.spawnAttempt(requested);
38961
+ return;
38962
+ } catch (err) {
38963
+ if (this.stopped) throw err;
38964
+ if (requested === null || isSoftwareDecode(requested)) throw err;
38965
+ this.deps.logger.warn("fmp4 fragment child: hardware decode produced NO fragment — retrying in SOFTWARE", {
38966
+ tags: { deviceId: this.args.deviceId },
38967
+ meta: {
38968
+ sourceId: this.args.sourceId,
38969
+ decodeHwAccel: requested,
38970
+ error: errMsg$15(err)
38971
+ }
38972
+ });
38973
+ this.killChild();
38974
+ this.splitter = new Fmp4BoxSplitter();
38975
+ this.activeHwAccel = null;
38976
+ await this.spawnAttempt(null);
38977
+ }
38978
+ }
38979
+ /** The backend the child ACTUALLY ran with — `null` for software. */
38980
+ activeDecodeHwAccel() {
38981
+ const value = this.activeHwAccel;
38982
+ return value === null || value === "none" || value === "copy" ? null : value;
38983
+ }
38984
+ /** Kill ffmpeg and end the plane. Idempotent. */
38985
+ async stop() {
38986
+ if (this.stopped) return;
38987
+ this.stopped = true;
38988
+ this.killChild();
38989
+ this.args.plane.end("the fragment child stopped");
38990
+ }
38991
+ spawnAttempt(decodeHwAccel) {
38992
+ const args = buildFfmpegArgs({
38993
+ ...this.args.invocation,
38994
+ decodeHwAccel,
38995
+ sink: {
38996
+ kind: "stdout",
38997
+ container: "mp4",
38998
+ fragmentMs: this.args.fragmentMs
38999
+ }
39000
+ });
39001
+ this.deps.logger.info("fmp4 fragment child: spawning ffmpeg", {
39002
+ tags: { deviceId: this.args.deviceId },
39003
+ meta: {
39004
+ sourceId: this.args.sourceId,
39005
+ fragmentMs: this.args.fragmentMs,
39006
+ decodeHwAccel: decodeHwAccel ?? "software",
39007
+ argv: args.join(" ")
39008
+ }
39009
+ });
39010
+ return new Promise((resolve, reject) => {
39011
+ const child = this.deps.spawnFn(this.deps.ffmpegBinaryPath, args, { stdio: [
39012
+ "ignore",
39013
+ "pipe",
39014
+ "pipe"
39015
+ ] });
39016
+ this.child = child;
39017
+ let settled = false;
39018
+ /**
39019
+ * This attempt FAILED. Set before the kill, because SIGTERM makes the
39020
+ * child exit and that exit must not be reported as a death: the retry —
39021
+ * or the caller's rejection — already owns what happens next. Without it
39022
+ * the timeout path ends the plane the software retry is about to fill,
39023
+ * and the consumer sees a stream that stopped for no reason. A "which
39024
+ * spawn is current" counter does NOT cover this: the retry has not been
39025
+ * spawned when the kill's exit arrives.
39026
+ */
39027
+ let failed = false;
39028
+ /**
39029
+ * This attempt is still the live producer: it has not failed (a failure
39030
+ * hands ownership to the retry, or to the caller's rejection) and nothing
39031
+ * has stopped the child. Those two cover every way an attempt stops being
39032
+ * current — `start` only respawns after a rejection.
39033
+ */
39034
+ const isCurrent = () => !this.stopped && !failed;
39035
+ const timeoutMs = this.deps.firstUnitTimeoutMs ?? DEFAULT_FIRST_UNIT_TIMEOUT_MS;
39036
+ const settle = (fail) => {
39037
+ if (settled) return;
39038
+ settled = true;
39039
+ clearTimeout(timer);
39040
+ if (fail) {
39041
+ failed = true;
39042
+ reject(fail);
39043
+ } else resolve();
39044
+ };
39045
+ const timer = setTimeout(() => {
39046
+ settle(/* @__PURE__ */ new Error(`fmp4 fragment child: no fragment within ${timeoutMs}ms`));
39047
+ this.killChild();
39048
+ }, timeoutMs);
39049
+ timer.unref?.();
39050
+ child.stdout?.on("data", (chunk) => {
39051
+ for (const unit of this.splitter.push(chunk)) {
39052
+ this.unitsOut += 1;
39053
+ this.args.plane.publish(unit);
39054
+ if (unit.kind === "init") {
39055
+ this.deps.logger.info("fmp4 fragment child: INIT segment cut", {
39056
+ tags: { deviceId: this.args.deviceId },
39057
+ meta: {
39058
+ sourceId: this.args.sourceId,
39059
+ bytes: unit.data.length
39060
+ }
39061
+ });
39062
+ settle();
39063
+ } else if (this.unitsOut % FRAGMENT_LOG_EVERY === 0) this.deps.logger.info("fmp4 fragment child: fragments still flowing", {
39064
+ tags: { deviceId: this.args.deviceId },
39065
+ meta: {
39066
+ sourceId: this.args.sourceId,
39067
+ unitsOut: this.unitsOut,
39068
+ bytes: unit.data.length,
39069
+ subscribers: this.args.plane.subscriberCount
39070
+ }
39071
+ });
39072
+ }
39073
+ const fault = this.splitter.fault;
39074
+ if (fault !== null) this.onFault(fault, settled, isCurrent(), settle);
39075
+ });
39076
+ child.stderr?.setEncoding("utf8");
39077
+ child.stderr?.on("data", (line) => {
39078
+ this.deps.logger.debug("fmp4 fragment child ffmpeg", {
39079
+ tags: { deviceId: this.args.deviceId },
39080
+ meta: {
39081
+ sourceId: this.args.sourceId,
39082
+ line: line.trim()
39083
+ }
39084
+ });
39085
+ });
39086
+ child.once("error", (err) => {
39087
+ if (!settled) {
39088
+ settle(err);
39089
+ return;
39090
+ }
39091
+ if (!isCurrent()) return;
39092
+ this.args.plane.end("the fragment child errored");
39093
+ this.deps.onChildExit?.(err);
39094
+ });
39095
+ child.once("exit", (code, signal) => {
39096
+ if (!settled) {
39097
+ settle(/* @__PURE__ */ new Error(`fmp4 fragment child: ffmpeg exited before any fragment (code=${code} signal=${signal})`));
39098
+ return;
39099
+ }
39100
+ if (!isCurrent()) return;
39101
+ const error = /* @__PURE__ */ new Error(`fmp4 fragment child: ffmpeg exited while live (code=${code} signal=${signal})`);
39102
+ this.deps.logger.warn("fmp4 fragment child: ffmpeg exited while live", {
39103
+ tags: { deviceId: this.args.deviceId },
39104
+ meta: {
39105
+ sourceId: this.args.sourceId,
39106
+ code,
39107
+ signal,
39108
+ unitsOut: this.unitsOut
39109
+ }
39110
+ });
39111
+ this.args.plane.end("the fragment child exited");
39112
+ this.deps.onChildExit?.(error);
39113
+ });
39114
+ });
39115
+ }
39116
+ /**
39117
+ * The byte stream stopped being splittable. Not recoverable — the splitter
39118
+ * cannot resynchronise mid-box — so the child is a corpse and every consumer
39119
+ * has to be told, loudly, with the reason.
39120
+ */
39121
+ onFault(reason, wasLive, current, settle) {
39122
+ const error = /* @__PURE__ */ new Error(`fmp4 fragment child: ${reason}`);
39123
+ this.deps.logger.error("fmp4 fragment child: the ffmpeg output stopped parsing as fMP4", {
39124
+ tags: { deviceId: this.args.deviceId },
39125
+ meta: {
39126
+ sourceId: this.args.sourceId,
39127
+ unitsOut: this.unitsOut,
39128
+ interstitial: this.splitter.discardedInterstitialTypes,
39129
+ reason
39130
+ }
39131
+ });
39132
+ this.killChild();
39133
+ settle(error);
39134
+ if (wasLive && current) {
39135
+ this.args.plane.end("the fragment child produced unsplittable output");
39136
+ this.deps.onChildExit?.(error);
39137
+ }
39138
+ }
39139
+ killChild() {
39140
+ const child = this.child;
39141
+ this.child = null;
39142
+ if (child && !child.killed) try {
39143
+ child.kill("SIGTERM");
39144
+ } catch (err) {
39145
+ this.deps.logger.warn("fmp4 fragment child: kill error", {
39146
+ tags: { deviceId: this.args.deviceId },
39147
+ meta: {
39148
+ sourceId: this.args.sourceId,
39149
+ error: errMsg$15(err)
39150
+ }
39151
+ });
39152
+ }
39153
+ }
39154
+ };
38833
39155
  /**
38834
39156
  * Fmp4FragmentPlane — a SUBSCRIBABLE fragmented-MP4 plane, fed by one
38835
39157
  * {@link import('./fmp4-box-splitter.js').Fmp4BoxSplitter}.
@@ -39115,221 +39437,32 @@ var Fmp4FragmentPlane = class {
39115
39437
  }
39116
39438
  }
39117
39439
  };
39118
- var DEFAULT_FIRST_UNIT_TIMEOUT_MS = 12e3;
39119
- /** Heartbeat cadence — ~2 minutes of 4 s fragments. */
39120
- var FRAGMENT_LOG_EVERY = 30;
39121
- var Fmp4FragmentChild = class {
39122
- deps;
39123
- args;
39124
- child = null;
39125
- splitter = new Fmp4BoxSplitter();
39126
- stopped = false;
39127
- unitsOut = 0;
39128
- activeHwAccel = null;
39129
- constructor(deps, args) {
39130
- this.deps = deps;
39131
- this.args = args;
39132
- }
39133
- /** Spawn, and resolve once the INIT segment has been cut out of stdout. */
39134
- async start() {
39135
- const requested = this.args.invocation.decodeHwAccel;
39136
- this.activeHwAccel = requested;
39137
- try {
39138
- await this.spawnAttempt(requested);
39139
- return;
39140
- } catch (err) {
39141
- if (this.stopped) throw err;
39142
- if (requested === null || isSoftwareDecode(requested)) throw err;
39143
- this.deps.logger.warn("fmp4 fragment child: hardware decode produced NO fragment — retrying in SOFTWARE", {
39144
- tags: { deviceId: this.args.deviceId },
39145
- meta: {
39146
- sourceId: this.args.sourceId,
39147
- decodeHwAccel: requested,
39148
- error: errMsg$15(err)
39149
- }
39150
- });
39151
- this.killChild();
39152
- this.splitter = new Fmp4BoxSplitter();
39153
- this.activeHwAccel = null;
39154
- await this.spawnAttempt(null);
39155
- }
39156
- }
39157
- /** The backend the child ACTUALLY ran with — `null` for software. */
39158
- activeDecodeHwAccel() {
39159
- const value = this.activeHwAccel;
39160
- return value === null || value === "none" || value === "copy" ? null : value;
39161
- }
39162
- /** Kill ffmpeg and end the plane. Idempotent. */
39163
- async stop() {
39164
- if (this.stopped) return;
39165
- this.stopped = true;
39166
- this.killChild();
39167
- this.args.plane.end("the fragment child stopped");
39168
- }
39169
- spawnAttempt(decodeHwAccel) {
39170
- const args = buildFfmpegArgs({
39171
- ...this.args.invocation,
39172
- decodeHwAccel,
39173
- sink: {
39174
- kind: "stdout",
39175
- container: "mp4",
39176
- fragmentMs: this.args.fragmentMs
39177
- }
39178
- });
39179
- this.deps.logger.info("fmp4 fragment child: spawning ffmpeg", {
39180
- tags: { deviceId: this.args.deviceId },
39181
- meta: {
39182
- sourceId: this.args.sourceId,
39183
- fragmentMs: this.args.fragmentMs,
39184
- decodeHwAccel: decodeHwAccel ?? "software",
39185
- argv: args.join(" ")
39186
- }
39187
- });
39188
- return new Promise((resolve, reject) => {
39189
- const child = this.deps.spawnFn(this.deps.ffmpegBinaryPath, args, { stdio: [
39190
- "ignore",
39191
- "pipe",
39192
- "pipe"
39193
- ] });
39194
- this.child = child;
39195
- let settled = false;
39196
- /**
39197
- * This attempt FAILED. Set before the kill, because SIGTERM makes the
39198
- * child exit and that exit must not be reported as a death: the retry —
39199
- * or the caller's rejection — already owns what happens next. Without it
39200
- * the timeout path ends the plane the software retry is about to fill,
39201
- * and the consumer sees a stream that stopped for no reason. A "which
39202
- * spawn is current" counter does NOT cover this: the retry has not been
39203
- * spawned when the kill's exit arrives.
39204
- */
39205
- let failed = false;
39206
- /**
39207
- * This attempt is still the live producer: it has not failed (a failure
39208
- * hands ownership to the retry, or to the caller's rejection) and nothing
39209
- * has stopped the child. Those two cover every way an attempt stops being
39210
- * current — `start` only respawns after a rejection.
39211
- */
39212
- const isCurrent = () => !this.stopped && !failed;
39213
- const timeoutMs = this.deps.firstUnitTimeoutMs ?? DEFAULT_FIRST_UNIT_TIMEOUT_MS;
39214
- const settle = (fail) => {
39215
- if (settled) return;
39216
- settled = true;
39217
- clearTimeout(timer);
39218
- if (fail) {
39219
- failed = true;
39220
- reject(fail);
39221
- } else resolve();
39222
- };
39223
- const timer = setTimeout(() => {
39224
- settle(/* @__PURE__ */ new Error(`fmp4 fragment child: no fragment within ${timeoutMs}ms`));
39225
- this.killChild();
39226
- }, timeoutMs);
39227
- timer.unref?.();
39228
- child.stdout?.on("data", (chunk) => {
39229
- for (const unit of this.splitter.push(chunk)) {
39230
- this.unitsOut += 1;
39231
- this.args.plane.publish(unit);
39232
- if (unit.kind === "init") {
39233
- this.deps.logger.info("fmp4 fragment child: INIT segment cut", {
39234
- tags: { deviceId: this.args.deviceId },
39235
- meta: {
39236
- sourceId: this.args.sourceId,
39237
- bytes: unit.data.length
39238
- }
39239
- });
39240
- settle();
39241
- } else if (this.unitsOut % FRAGMENT_LOG_EVERY === 0) this.deps.logger.info("fmp4 fragment child: fragments still flowing", {
39242
- tags: { deviceId: this.args.deviceId },
39243
- meta: {
39244
- sourceId: this.args.sourceId,
39245
- unitsOut: this.unitsOut,
39246
- bytes: unit.data.length,
39247
- subscribers: this.args.plane.subscriberCount
39248
- }
39249
- });
39250
- }
39251
- const fault = this.splitter.fault;
39252
- if (fault !== null) this.onFault(fault, settled, isCurrent(), settle);
39253
- });
39254
- child.stderr?.setEncoding("utf8");
39255
- child.stderr?.on("data", (line) => {
39256
- this.deps.logger.debug("fmp4 fragment child ffmpeg", {
39257
- tags: { deviceId: this.args.deviceId },
39258
- meta: {
39259
- sourceId: this.args.sourceId,
39260
- line: line.trim()
39261
- }
39262
- });
39263
- });
39264
- child.once("error", (err) => {
39265
- if (!settled) {
39266
- settle(err);
39267
- return;
39268
- }
39269
- if (!isCurrent()) return;
39270
- this.args.plane.end("the fragment child errored");
39271
- this.deps.onChildExit?.(err);
39272
- });
39273
- child.once("exit", (code, signal) => {
39274
- if (!settled) {
39275
- settle(/* @__PURE__ */ new Error(`fmp4 fragment child: ffmpeg exited before any fragment (code=${code} signal=${signal})`));
39276
- return;
39277
- }
39278
- if (!isCurrent()) return;
39279
- const error = /* @__PURE__ */ new Error(`fmp4 fragment child: ffmpeg exited while live (code=${code} signal=${signal})`);
39280
- this.deps.logger.warn("fmp4 fragment child: ffmpeg exited while live", {
39281
- tags: { deviceId: this.args.deviceId },
39282
- meta: {
39283
- sourceId: this.args.sourceId,
39284
- code,
39285
- signal,
39286
- unitsOut: this.unitsOut
39287
- }
39288
- });
39289
- this.args.plane.end("the fragment child exited");
39290
- this.deps.onChildExit?.(error);
39291
- });
39292
- });
39293
- }
39294
- /**
39295
- * The byte stream stopped being splittable. Not recoverable — the splitter
39296
- * cannot resynchronise mid-box — so the child is a corpse and every consumer
39297
- * has to be told, loudly, with the reason.
39298
- */
39299
- onFault(reason, wasLive, current, settle) {
39300
- const error = /* @__PURE__ */ new Error(`fmp4 fragment child: ${reason}`);
39301
- this.deps.logger.error("fmp4 fragment child: the ffmpeg output stopped parsing as fMP4", {
39302
- tags: { deviceId: this.args.deviceId },
39303
- meta: {
39304
- sourceId: this.args.sourceId,
39305
- unitsOut: this.unitsOut,
39306
- interstitial: this.splitter.discardedInterstitialTypes,
39307
- reason
39308
- }
39309
- });
39310
- this.killChild();
39311
- settle(error);
39312
- if (wasLive && current) {
39313
- this.args.plane.end("the fragment child produced unsplittable output");
39314
- this.deps.onChildExit?.(error);
39315
- }
39316
- }
39317
- killChild() {
39318
- const child = this.child;
39319
- this.child = null;
39320
- if (child && !child.killed) try {
39321
- child.kill("SIGTERM");
39322
- } catch (err) {
39323
- this.deps.logger.warn("fmp4 fragment child: kill error", {
39324
- tags: { deviceId: this.args.deviceId },
39325
- meta: {
39326
- sourceId: this.args.sourceId,
39327
- error: errMsg$15(err)
39328
- }
39329
- });
39330
- }
39331
- }
39332
- };
39440
+ /**
39441
+ * Compute the stable 64-char lowercase-hex fingerprint of a device's
39442
+ * export-relevant shape. Two structurally-equal shapes (any feature order,
39443
+ * any duplicates, any deviceId) hash identically.
39444
+ */
39445
+ function canonicalDeviceFingerprint(shape) {
39446
+ const features = [...new Set(shape.features)].toSorted();
39447
+ return canonicalHash({
39448
+ deviceType: shape.deviceType,
39449
+ features
39450
+ });
39451
+ }
39452
+ /**
39453
+ * Resolve the fingerprint an exporter should feed into `diffExportTargets`
39454
+ * for one device this cycle.
39455
+ *
39456
+ * When a device is NOT yet probe-ready, carry forward its last-advertised
39457
+ * (persisted) fingerprint so it nets to NO CHANGE in `diffExportTargets`
39458
+ * (neither update nor remove) — never advertise a partial mid-probe shape. A
39459
+ * brand-new un-probed device with no persisted entry falls back to `fresh` so
39460
+ * it can advertise once.
39461
+ */
39462
+ function resolveExportFingerprint(input) {
39463
+ if (input.ready) return input.fresh;
39464
+ return input.persisted ?? input.fresh;
39465
+ }
39333
39466
  //#endregion
39334
39467
  //#region ../../node_modules/tslib/tslib.es6.mjs
39335
39468
  var tslib_es6_exports = /* @__PURE__ */ __exportAll({