@camstack/addon-provider-wyze 0.2.82 → 0.2.83

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.
Files changed (3) hide show
  1. package/dist/addon.js +125 -127
  2. package/dist/addon.mjs +125 -127
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7647,111 +7647,6 @@ var CameraSwitchGroupSchema = object({
7647
7647
  fetchedAt: number()
7648
7648
  });
7649
7649
  /**
7650
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7651
- * an addon declares its channels in.
7652
- *
7653
- * ## Two axes, deliberately separated
7654
- *
7655
- * - **DECLARATION** — which channels exist. Only the addon knows:
7656
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7657
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7658
- * and rots silently. So a channel is declared where it is consulted, and the
7659
- * `log-channels` capability enumerates the declarations.
7660
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7661
- * thing: the logging settings document on the `system` cap. Two authorities
7662
- * over the values is the exact defect
7663
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7664
- * remove; re-introducing it from the cure side would be grotesque.
7665
- *
7666
- * Nothing in this file reads a clock, an env var or a store. The registry is
7667
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7668
- * the hot path with a value somebody actually read, and by
7669
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7670
- * never reaches here, so it can neither disarm an armed channel nor arm a
7671
- * disarmed one (D49).
7672
- *
7673
- * ## The canonical call shape
7674
- *
7675
- * ```ts
7676
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7677
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7678
- * }
7679
- * ```
7680
- *
7681
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7682
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7683
- * object literal is never constructed because it lives inside the branch. It
7684
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7685
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7686
- * destination floor (measured at 1.93 ns/call when off).
7687
- *
7688
- * ## Why a channel emits at `info`
7689
- *
7690
- * `loki-logging.addon.ts` pins the destination default at `info` and
7691
- * `loki-destination.ts` drops everything below it, so a line emitted at
7692
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7693
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7694
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7695
- * emits at the channel's declared level, whose schema floor is `info`.
7696
- */
7697
- /**
7698
- * The level a channel writes at once armed.
7699
- *
7700
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7701
- * not leave the process for Loki, and the whole point of arming a channel is
7702
- * to read it later.
7703
- */
7704
- var LogChannelLevelSchema = _enum([
7705
- "info",
7706
- "warn",
7707
- "error"
7708
- ]);
7709
- /**
7710
- * What an addon declares about one channel. No value, no state — a
7711
- * declaration is inert.
7712
- */
7713
- var LogChannelDescriptorSchema = object({
7714
- /**
7715
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7716
- * the addon's short name so an operator reading a channel list can tell who
7717
- * owns it without a second lookup.
7718
- */
7719
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7720
- /** One sentence: what the operator will SEE after arming it. */
7721
- description: string().min(1),
7722
- /** The level its lines are emitted at. Never below `info`. */
7723
- defaultLevel: LogChannelLevelSchema,
7724
- /**
7725
- * Whether this channel can be narrowed to a camera.
7726
- *
7727
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7728
- * consulted with the numeric device id, AND every line the channel admits
7729
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7730
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7731
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7732
- * the body is the only way to filter.
7733
- *
7734
- * A channel whose lines carry the device only in `meta` (or not at all) is
7735
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7736
- * the operator narrows to one camera, sees nothing, and concludes the code
7737
- * path was never taken.
7738
- */
7739
- perDevice: boolean()
7740
- });
7741
- /**
7742
- * An armed window over one channel, as the document hands it to a mirror.
7743
- *
7744
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7745
- * expires by itself, which is the one failure a boolean cannot avoid.
7746
- */
7747
- var LogChannelWindowSchema = object({
7748
- channel: string().min(1),
7749
- /** Epoch ms the window closes at. */
7750
- armedUntilMs: number(),
7751
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7752
- deviceIds: array(number().int()).readonly().nullable()
7753
- });
7754
- /**
7755
7650
  * Ops-log — the durable, append-only operations audit shared by the
7756
7651
  * recordings and events management surfaces.
7757
7652
  *
@@ -8697,8 +8592,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8697
8592
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8698
8593
  *
8699
8594
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8700
- * The default location for a type uses `id === <type>:default` by
8701
- * convention (the bare type ref like `'backups'` resolves to it).
8595
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8596
+ * There is no default location any more (D383): `enabled` is the whole write
8597
+ * model, and a bare type ref resolves to the sole location of the type, or —
8598
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8599
+ * slug is `default`.
8702
8600
  *
8703
8601
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8704
8602
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8719,21 +8617,20 @@ var StorageLocationSchema = object({
8719
8617
  * flag at upsert time, not here (the schema is provider-agnostic).
8720
8618
  */
8721
8619
  nodeId: string().optional(),
8722
- isDefault: boolean().default(false),
8723
8620
  isSystem: boolean().default(false),
8724
8621
  /**
8725
- * Operator opt-in: whether consumers that BALANCE across several locations
8726
- * of a type may write here. Recordings reads it today; event media and
8727
- * backups are the next consumers, which is why the flag lives on the
8728
- * location rather than in any one addon's store — nothing has to be
8729
- * extended to add the next consumer.
8622
+ * THE write switch, and the only one (D383). `enabled: true` means every
8623
+ * consumer that chooses a write target for this type may write here, and all
8624
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8625
+ * still read, still played back, still age-swept, still drained, never
8626
+ * written.
8730
8627
  *
8731
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8732
- * flag existed reads back with no flag and keeps working exactly as before;
8733
- * that is the whole compat story, and it is why no migration ships with it.
8734
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8735
- * disk must not silently start writing to it); the default of a type is
8736
- * always stamped `true`.
8628
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8629
+ * stored" on an update and "born inert unless it is the first location of its
8630
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8631
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8632
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8633
+ * stops existing rather than being re-derived on every read.
8737
8634
  */
8738
8635
  enabled: boolean().optional(),
8739
8636
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
@@ -8746,10 +8643,12 @@ var StorageLocationSchema = object({
8746
8643
  createdAt: number(),
8747
8644
  updatedAt: number()
8748
8645
  });
8646
+ object({ isDefault: boolean().optional() });
8749
8647
  /**
8750
8648
  * Reference accepted by consumer-facing `api.storage.*` calls.
8751
8649
  * Either:
8752
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8650
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8651
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8753
8652
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8754
8653
  *
8755
8654
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8925,6 +8824,111 @@ var DecoderSessionConfigSchema = object({
8925
8824
  */
8926
8825
  debug: boolean().optional()
8927
8826
  });
8827
+ /**
8828
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8829
+ * an addon declares its channels in.
8830
+ *
8831
+ * ## Two axes, deliberately separated
8832
+ *
8833
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8834
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8835
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8836
+ * and rots silently. So a channel is declared where it is consulted, and the
8837
+ * `log-channels` capability enumerates the declarations.
8838
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8839
+ * thing: the logging settings document on the `system` cap. Two authorities
8840
+ * over the values is the exact defect
8841
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8842
+ * remove; re-introducing it from the cure side would be grotesque.
8843
+ *
8844
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8845
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8846
+ * the hot path with a value somebody actually read, and by
8847
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8848
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8849
+ * disarmed one (D49).
8850
+ *
8851
+ * ## The canonical call shape
8852
+ *
8853
+ * ```ts
8854
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8855
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8856
+ * }
8857
+ * ```
8858
+ *
8859
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8860
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8861
+ * object literal is never constructed because it lives inside the branch. It
8862
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8863
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8864
+ * destination floor (measured at 1.93 ns/call when off).
8865
+ *
8866
+ * ## Why a channel emits at `info`
8867
+ *
8868
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8869
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8870
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8871
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8872
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8873
+ * emits at the channel's declared level, whose schema floor is `info`.
8874
+ */
8875
+ /**
8876
+ * The level a channel writes at once armed.
8877
+ *
8878
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8879
+ * not leave the process for Loki, and the whole point of arming a channel is
8880
+ * to read it later.
8881
+ */
8882
+ var LogChannelLevelSchema = _enum([
8883
+ "info",
8884
+ "warn",
8885
+ "error"
8886
+ ]);
8887
+ /**
8888
+ * What an addon declares about one channel. No value, no state — a
8889
+ * declaration is inert.
8890
+ */
8891
+ var LogChannelDescriptorSchema = object({
8892
+ /**
8893
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8894
+ * the addon's short name so an operator reading a channel list can tell who
8895
+ * owns it without a second lookup.
8896
+ */
8897
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8898
+ /** One sentence: what the operator will SEE after arming it. */
8899
+ description: string().min(1),
8900
+ /** The level its lines are emitted at. Never below `info`. */
8901
+ defaultLevel: LogChannelLevelSchema,
8902
+ /**
8903
+ * Whether this channel can be narrowed to a camera.
8904
+ *
8905
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8906
+ * consulted with the numeric device id, AND every line the channel admits
8907
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8908
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8909
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8910
+ * the body is the only way to filter.
8911
+ *
8912
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8913
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8914
+ * the operator narrows to one camera, sees nothing, and concludes the code
8915
+ * path was never taken.
8916
+ */
8917
+ perDevice: boolean()
8918
+ });
8919
+ /**
8920
+ * An armed window over one channel, as the document hands it to a mirror.
8921
+ *
8922
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8923
+ * expires by itself, which is the one failure a boolean cannot avoid.
8924
+ */
8925
+ var LogChannelWindowSchema = object({
8926
+ channel: string().min(1),
8927
+ /** Epoch ms the window closes at. */
8928
+ armedUntilMs: number(),
8929
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8930
+ deviceIds: array(number().int()).readonly().nullable()
8931
+ });
8928
8932
  var MODEL_FORMATS = [
8929
8933
  "onnx",
8930
8934
  "coreml",
@@ -22078,7 +22082,7 @@ method(object({
22078
22082
  downloadId: string(),
22079
22083
  offset: number(),
22080
22084
  length: number()
22081
- }), _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({
22085
+ }), _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({
22082
22086
  createdAt: true,
22083
22087
  updatedAt: true
22084
22088
  }), StorageLocationSchema, {
@@ -38931,12 +38935,6 @@ Object.freeze({
38931
38935
  addonId: null,
38932
38936
  access: "view"
38933
38937
  },
38934
- "storage.getDefaultLocation": {
38935
- capName: "storage",
38936
- capScope: "system",
38937
- addonId: null,
38938
- access: "view"
38939
- },
38940
38938
  "storage.list": {
38941
38939
  capName: "storage",
38942
38940
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7626,111 +7626,6 @@ var CameraSwitchGroupSchema = object({
7626
7626
  fetchedAt: number()
7627
7627
  });
7628
7628
  /**
7629
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7630
- * an addon declares its channels in.
7631
- *
7632
- * ## Two axes, deliberately separated
7633
- *
7634
- * - **DECLARATION** — which channels exist. Only the addon knows:
7635
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7636
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7637
- * and rots silently. So a channel is declared where it is consulted, and the
7638
- * `log-channels` capability enumerates the declarations.
7639
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7640
- * thing: the logging settings document on the `system` cap. Two authorities
7641
- * over the values is the exact defect
7642
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7643
- * remove; re-introducing it from the cure side would be grotesque.
7644
- *
7645
- * Nothing in this file reads a clock, an env var or a store. The registry is
7646
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7647
- * the hot path with a value somebody actually read, and by
7648
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7649
- * never reaches here, so it can neither disarm an armed channel nor arm a
7650
- * disarmed one (D49).
7651
- *
7652
- * ## The canonical call shape
7653
- *
7654
- * ```ts
7655
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7656
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7657
- * }
7658
- * ```
7659
- *
7660
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7661
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7662
- * object literal is never constructed because it lives inside the branch. It
7663
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7664
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7665
- * destination floor (measured at 1.93 ns/call when off).
7666
- *
7667
- * ## Why a channel emits at `info`
7668
- *
7669
- * `loki-logging.addon.ts` pins the destination default at `info` and
7670
- * `loki-destination.ts` drops everything below it, so a line emitted at
7671
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7672
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7673
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7674
- * emits at the channel's declared level, whose schema floor is `info`.
7675
- */
7676
- /**
7677
- * The level a channel writes at once armed.
7678
- *
7679
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7680
- * not leave the process for Loki, and the whole point of arming a channel is
7681
- * to read it later.
7682
- */
7683
- var LogChannelLevelSchema = _enum([
7684
- "info",
7685
- "warn",
7686
- "error"
7687
- ]);
7688
- /**
7689
- * What an addon declares about one channel. No value, no state — a
7690
- * declaration is inert.
7691
- */
7692
- var LogChannelDescriptorSchema = object({
7693
- /**
7694
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7695
- * the addon's short name so an operator reading a channel list can tell who
7696
- * owns it without a second lookup.
7697
- */
7698
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7699
- /** One sentence: what the operator will SEE after arming it. */
7700
- description: string().min(1),
7701
- /** The level its lines are emitted at. Never below `info`. */
7702
- defaultLevel: LogChannelLevelSchema,
7703
- /**
7704
- * Whether this channel can be narrowed to a camera.
7705
- *
7706
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7707
- * consulted with the numeric device id, AND every line the channel admits
7708
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7709
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7710
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7711
- * the body is the only way to filter.
7712
- *
7713
- * A channel whose lines carry the device only in `meta` (or not at all) is
7714
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7715
- * the operator narrows to one camera, sees nothing, and concludes the code
7716
- * path was never taken.
7717
- */
7718
- perDevice: boolean()
7719
- });
7720
- /**
7721
- * An armed window over one channel, as the document hands it to a mirror.
7722
- *
7723
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7724
- * expires by itself, which is the one failure a boolean cannot avoid.
7725
- */
7726
- var LogChannelWindowSchema = object({
7727
- channel: string().min(1),
7728
- /** Epoch ms the window closes at. */
7729
- armedUntilMs: number(),
7730
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7731
- deviceIds: array(number().int()).readonly().nullable()
7732
- });
7733
- /**
7734
7629
  * Ops-log — the durable, append-only operations audit shared by the
7735
7630
  * recordings and events management surfaces.
7736
7631
  *
@@ -8676,8 +8571,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8676
8571
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8677
8572
  *
8678
8573
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8679
- * The default location for a type uses `id === <type>:default` by
8680
- * convention (the bare type ref like `'backups'` resolves to it).
8574
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8575
+ * There is no default location any more (D383): `enabled` is the whole write
8576
+ * model, and a bare type ref resolves to the sole location of the type, or —
8577
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8578
+ * slug is `default`.
8681
8579
  *
8682
8580
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8683
8581
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8698,21 +8596,20 @@ var StorageLocationSchema = object({
8698
8596
  * flag at upsert time, not here (the schema is provider-agnostic).
8699
8597
  */
8700
8598
  nodeId: string().optional(),
8701
- isDefault: boolean().default(false),
8702
8599
  isSystem: boolean().default(false),
8703
8600
  /**
8704
- * Operator opt-in: whether consumers that BALANCE across several locations
8705
- * of a type may write here. Recordings reads it today; event media and
8706
- * backups are the next consumers, which is why the flag lives on the
8707
- * location rather than in any one addon's store — nothing has to be
8708
- * extended to add the next consumer.
8601
+ * THE write switch, and the only one (D383). `enabled: true` means every
8602
+ * consumer that chooses a write target for this type may write here, and all
8603
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8604
+ * still read, still played back, still age-swept, still drained, never
8605
+ * written.
8709
8606
  *
8710
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8711
- * flag existed reads back with no flag and keeps working exactly as before;
8712
- * that is the whole compat story, and it is why no migration ships with it.
8713
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8714
- * disk must not silently start writing to it); the default of a type is
8715
- * always stamped `true`.
8607
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8608
+ * stored" on an update and "born inert unless it is the first location of its
8609
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8610
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8611
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8612
+ * stops existing rather than being re-derived on every read.
8716
8613
  */
8717
8614
  enabled: boolean().optional(),
8718
8615
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
@@ -8725,10 +8622,12 @@ var StorageLocationSchema = object({
8725
8622
  createdAt: number(),
8726
8623
  updatedAt: number()
8727
8624
  });
8625
+ object({ isDefault: boolean().optional() });
8728
8626
  /**
8729
8627
  * Reference accepted by consumer-facing `api.storage.*` calls.
8730
8628
  * Either:
8731
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8629
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8630
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8732
8631
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8733
8632
  *
8734
8633
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8904,6 +8803,111 @@ var DecoderSessionConfigSchema = object({
8904
8803
  */
8905
8804
  debug: boolean().optional()
8906
8805
  });
8806
+ /**
8807
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8808
+ * an addon declares its channels in.
8809
+ *
8810
+ * ## Two axes, deliberately separated
8811
+ *
8812
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8813
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8814
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8815
+ * and rots silently. So a channel is declared where it is consulted, and the
8816
+ * `log-channels` capability enumerates the declarations.
8817
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8818
+ * thing: the logging settings document on the `system` cap. Two authorities
8819
+ * over the values is the exact defect
8820
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8821
+ * remove; re-introducing it from the cure side would be grotesque.
8822
+ *
8823
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8824
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8825
+ * the hot path with a value somebody actually read, and by
8826
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8827
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8828
+ * disarmed one (D49).
8829
+ *
8830
+ * ## The canonical call shape
8831
+ *
8832
+ * ```ts
8833
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8834
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8835
+ * }
8836
+ * ```
8837
+ *
8838
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8839
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8840
+ * object literal is never constructed because it lives inside the branch. It
8841
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8842
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8843
+ * destination floor (measured at 1.93 ns/call when off).
8844
+ *
8845
+ * ## Why a channel emits at `info`
8846
+ *
8847
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8848
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8849
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8850
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8851
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8852
+ * emits at the channel's declared level, whose schema floor is `info`.
8853
+ */
8854
+ /**
8855
+ * The level a channel writes at once armed.
8856
+ *
8857
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8858
+ * not leave the process for Loki, and the whole point of arming a channel is
8859
+ * to read it later.
8860
+ */
8861
+ var LogChannelLevelSchema = _enum([
8862
+ "info",
8863
+ "warn",
8864
+ "error"
8865
+ ]);
8866
+ /**
8867
+ * What an addon declares about one channel. No value, no state — a
8868
+ * declaration is inert.
8869
+ */
8870
+ var LogChannelDescriptorSchema = object({
8871
+ /**
8872
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8873
+ * the addon's short name so an operator reading a channel list can tell who
8874
+ * owns it without a second lookup.
8875
+ */
8876
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8877
+ /** One sentence: what the operator will SEE after arming it. */
8878
+ description: string().min(1),
8879
+ /** The level its lines are emitted at. Never below `info`. */
8880
+ defaultLevel: LogChannelLevelSchema,
8881
+ /**
8882
+ * Whether this channel can be narrowed to a camera.
8883
+ *
8884
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8885
+ * consulted with the numeric device id, AND every line the channel admits
8886
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8887
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8888
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8889
+ * the body is the only way to filter.
8890
+ *
8891
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8892
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8893
+ * the operator narrows to one camera, sees nothing, and concludes the code
8894
+ * path was never taken.
8895
+ */
8896
+ perDevice: boolean()
8897
+ });
8898
+ /**
8899
+ * An armed window over one channel, as the document hands it to a mirror.
8900
+ *
8901
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8902
+ * expires by itself, which is the one failure a boolean cannot avoid.
8903
+ */
8904
+ var LogChannelWindowSchema = object({
8905
+ channel: string().min(1),
8906
+ /** Epoch ms the window closes at. */
8907
+ armedUntilMs: number(),
8908
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8909
+ deviceIds: array(number().int()).readonly().nullable()
8910
+ });
8907
8911
  var MODEL_FORMATS = [
8908
8912
  "onnx",
8909
8913
  "coreml",
@@ -22057,7 +22061,7 @@ method(object({
22057
22061
  downloadId: string(),
22058
22062
  offset: number(),
22059
22063
  length: number()
22060
- }), _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({
22064
+ }), _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({
22061
22065
  createdAt: true,
22062
22066
  updatedAt: true
22063
22067
  }), StorageLocationSchema, {
@@ -38910,12 +38914,6 @@ Object.freeze({
38910
38914
  addonId: null,
38911
38915
  access: "view"
38912
38916
  },
38913
- "storage.getDefaultLocation": {
38914
- capName: "storage",
38915
- capScope: "system",
38916
- addonId: null,
38917
- access: "view"
38918
- },
38919
38917
  "storage.list": {
38920
38918
  capName: "storage",
38921
38919
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.82",
3
+ "version": "0.2.83",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",