@camstack/types 1.2.250 → 1.2.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-CvwUEq16.js");
2
+ const require_sleep = require("./sleep-BAgDk7I9.js");
3
3
  const require_event_category = require("./event-category-BVfsrBYA.js");
4
4
  const require_canonical_hash = require("./canonical-hash-CSE4ioRi.js");
5
5
  const require_enums = require("./enums.js");
@@ -8442,7 +8442,7 @@ var brokerCapability = {
8442
8442
  }),
8443
8443
  /** Read the broker's cached state for a key. Returns `null` when
8444
8444
  * unknown to the broker (never published / unknown entity). */
8445
- getState: require_sleep.method(GetStateInputSchema, zod.z.unknown().nullable()),
8445
+ getState: require_sleep.method(GetStateInputSchema, zod.z.unknown().nullable(), { auth: "admin" }),
8446
8446
  /** Status method — explicit registration with a `z.void()` input so
8447
8447
  * the codegen-generated tRPC router types its input as
8448
8448
  * `{addonId?: string, nodeId?: string}` (system-scoped collection
@@ -10288,6 +10288,16 @@ var CollectionIndexSchema = zod.z.object({
10288
10288
  * namespace, or none. Making the door enforce it is tracked separately —
10289
10289
  * it renames tables, so it needs a migration.
10290
10290
  *
10291
+ * **So every method is `auth: 'admin'` (D634).** Because nothing scopes a
10292
+ * call to its caller, a `protected` method here was a raw, unredacted read
10293
+ * (and write) of every addon's collections for any role holding
10294
+ * `category:system` — which is every role: a `viewer` could read every
10295
+ * notifier token in plaintext from `notifiers:notification-targets`. No
10296
+ * browser or app client calls this cap. Addons are not affected: an
10297
+ * addon's `ctx.api` cap call is resolved to the provider directly and never
10298
+ * enters the tRPC router (so the tier gates sessions and tokens, never
10299
+ * addons), and the hub itself calls it through the capability registry.
10300
+ *
10291
10301
  * - `{ collection: 'addon-settings' }` → table `addon-settings`
10292
10302
  * - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
10293
10303
  * table `my-addon:addon-settings`
@@ -10309,14 +10319,17 @@ var settingsStoreCapability = {
10309
10319
  namespace: zod.z.string().optional(),
10310
10320
  collection: zod.z.string(),
10311
10321
  key: zod.z.string()
10312
- }), zod.z.unknown()),
10322
+ }), zod.z.unknown(), { auth: "admin" }),
10313
10323
  /** Set a value by key in a collection (upsert). */
10314
10324
  set: require_sleep.method(zod.z.object({
10315
10325
  namespace: zod.z.string().optional(),
10316
10326
  collection: zod.z.string(),
10317
10327
  key: zod.z.string(),
10318
10328
  value: zod.z.unknown()
10319
- }), zod.z.void(), { kind: "mutation" }),
10329
+ }), zod.z.void(), {
10330
+ kind: "mutation",
10331
+ auth: "admin"
10332
+ }),
10320
10333
  /**
10321
10334
  * Rows matching a filter.
10322
10335
  *
@@ -10337,7 +10350,7 @@ var settingsStoreCapability = {
10337
10350
  collection: zod.z.string(),
10338
10351
  filter: QueryFilterSchema.optional(),
10339
10352
  columns: zod.z.array(zod.z.string()).readonly().optional()
10340
- }), zod.z.array(SettingsRecordSchema).readonly()),
10353
+ }), zod.z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
10341
10354
  /**
10342
10355
  * Make a SLOT hold this row — insert it, or update whatever already
10343
10356
  * occupies the slot — and answer with the id the row HAS.
@@ -10390,7 +10403,10 @@ var settingsStoreCapability = {
10390
10403
  }), zod.z.object({
10391
10404
  /** The id the row HAS: assigned by SQLite on an insert, or the existing
10392
10405
  * row's own id on an update. */
10393
- id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10406
+ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10407
+ kind: "mutation",
10408
+ auth: "admin"
10409
+ }),
10394
10410
  /** Insert a new record. */
10395
10411
  insert: require_sleep.method(zod.z.object({
10396
10412
  namespace: zod.z.string().optional(),
@@ -10405,7 +10421,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10405
10421
  * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
10406
10422
  * primary key — which is the only place an auto key is knowable.
10407
10423
  */
10408
- id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10424
+ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10425
+ kind: "mutation",
10426
+ auth: "admin"
10427
+ }),
10409
10428
  /**
10410
10429
  * Insert MANY records in ONE transaction, returning how many landed.
10411
10430
  *
@@ -10433,20 +10452,29 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10433
10452
  namespace: zod.z.string().optional(),
10434
10453
  collection: zod.z.string(),
10435
10454
  records: zod.z.array(BulkRecordSchema).readonly()
10436
- }), zod.z.object({ inserted: zod.z.number().int() }), { kind: "mutation" }),
10455
+ }), zod.z.object({ inserted: zod.z.number().int() }), {
10456
+ kind: "mutation",
10457
+ auth: "admin"
10458
+ }),
10437
10459
  /** Update an existing record by ID. */
10438
10460
  update: require_sleep.method(zod.z.object({
10439
10461
  namespace: zod.z.string().optional(),
10440
10462
  collection: zod.z.string(),
10441
10463
  id: zod.z.string(),
10442
10464
  data: zod.z.record(zod.z.string(), zod.z.unknown())
10443
- }), zod.z.void(), { kind: "mutation" }),
10465
+ }), zod.z.void(), {
10466
+ kind: "mutation",
10467
+ auth: "admin"
10468
+ }),
10444
10469
  /** Delete a record by key/ID. */
10445
10470
  delete: require_sleep.method(zod.z.object({
10446
10471
  namespace: zod.z.string().optional(),
10447
10472
  collection: zod.z.string(),
10448
10473
  key: zod.z.string()
10449
- }), zod.z.void(), { kind: "mutation" }),
10474
+ }), zod.z.void(), {
10475
+ kind: "mutation",
10476
+ auth: "admin"
10477
+ }),
10450
10478
  /**
10451
10479
  * Delete every record matching `filter`, in ONE statement, returning how
10452
10480
  * many rows went. This exists because its absence made every retention
@@ -10465,7 +10493,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10465
10493
  namespace: zod.z.string().optional(),
10466
10494
  collection: zod.z.string(),
10467
10495
  filter: MutationFilterSchema
10468
- }), zod.z.object({ deleted: zod.z.number().int() }), { kind: "mutation" }),
10496
+ }), zod.z.object({ deleted: zod.z.number().int() }), {
10497
+ kind: "mutation",
10498
+ auth: "admin"
10499
+ }),
10469
10500
  /**
10470
10501
  * Apply `data` to every record matching `filter`, in one statement,
10471
10502
  * returning how many rows changed. Same filter contract as
@@ -10476,13 +10507,16 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10476
10507
  collection: zod.z.string(),
10477
10508
  filter: MutationFilterSchema,
10478
10509
  data: zod.z.record(zod.z.string(), zod.z.unknown())
10479
- }), zod.z.object({ updated: zod.z.number().int() }), { kind: "mutation" }),
10510
+ }), zod.z.object({ updated: zod.z.number().int() }), {
10511
+ kind: "mutation",
10512
+ auth: "admin"
10513
+ }),
10480
10514
  /** Count entries in a collection, optionally filtered. */
10481
10515
  count: require_sleep.method(zod.z.object({
10482
10516
  namespace: zod.z.string().optional(),
10483
10517
  collection: zod.z.string(),
10484
10518
  filter: QueryFilterSchema.optional()
10485
- }), zod.z.number()),
10519
+ }), zod.z.number(), { auth: "admin" }),
10486
10520
  /**
10487
10521
  * `COUNT(*)` and one `SUM` / `MIN` / `MAX` per requested field, in ONE
10488
10522
  * statement, over the rows `filter` selects.
@@ -10508,7 +10542,7 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10508
10542
  collection: zod.z.string(),
10509
10543
  fields: zod.z.array(AggregateFieldSchema).readonly(),
10510
10544
  filter: QueryFilterSchema.optional()
10511
- }), AggregateResultSchema),
10545
+ }), AggregateResultSchema, { auth: "admin" }),
10512
10546
  /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
10513
10547
  histogram: require_sleep.method(zod.z.object({
10514
10548
  namespace: zod.z.string().optional(),
@@ -10520,12 +10554,12 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10520
10554
  }), zod.z.array(zod.z.object({
10521
10555
  bucket: zod.z.number().int(),
10522
10556
  count: zod.z.number().int()
10523
- })).readonly()),
10557
+ })).readonly(), { auth: "admin" }),
10524
10558
  /** Check if a collection is empty. */
10525
10559
  isEmpty: require_sleep.method(zod.z.object({
10526
10560
  namespace: zod.z.string().optional(),
10527
10561
  collection: zod.z.string()
10528
- }), zod.z.boolean()),
10562
+ }), zod.z.boolean(), { auth: "admin" }),
10529
10563
  /**
10530
10564
  * Declare a typed (SQL-backed) collection with explicit columns +
10531
10565
  * indexes. Idempotent: re-declaring an existing collection with the
@@ -10546,7 +10580,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10546
10580
  collection: zod.z.string(),
10547
10581
  columns: zod.z.array(CollectionColumnSchema).readonly(),
10548
10582
  indexes: zod.z.array(CollectionIndexSchema).readonly().optional()
10549
- }), zod.z.void(), { kind: "mutation" })
10583
+ }), zod.z.void(), {
10584
+ kind: "mutation",
10585
+ auth: "admin"
10586
+ })
10550
10587
  }
10551
10588
  };
10552
10589
  //#endregion
@@ -11800,8 +11837,14 @@ var deviceExportCapability = {
11800
11837
  getStatus: require_sleep.method(zod.z.void(), DeviceExportStatusSchema),
11801
11838
  listSupportedDeviceKinds: require_sleep.method(zod.z.void(), zod.z.array(DeviceKindSchema)),
11802
11839
  listExposedDevices: require_sleep.method(zod.z.void(), zod.z.array(ExposedDeviceSchema)),
11803
- exposeDevice: require_sleep.method(ExposeInputSchema, zod.z.void(), { kind: "mutation" }),
11804
- unexposeDevice: require_sleep.method(UnexposeInputSchema, zod.z.void(), { kind: "mutation" })
11840
+ exposeDevice: require_sleep.method(ExposeInputSchema, zod.z.void(), {
11841
+ kind: "mutation",
11842
+ auth: "admin"
11843
+ }),
11844
+ unexposeDevice: require_sleep.method(UnexposeInputSchema, zod.z.void(), {
11845
+ kind: "mutation",
11846
+ auth: "admin"
11847
+ })
11805
11848
  }
11806
11849
  };
11807
11850
  //#endregion
@@ -12559,11 +12602,14 @@ var deviceManagerCapability = {
12559
12602
  /** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
12560
12603
  removeDevice: require_sleep.method(DeviceRemovePayloadSchema, zod.z.void(), { kind: "mutation" }),
12561
12604
  /** Persist device config blob. Called by DeviceConfig.set/setAll(). */
12562
- persistConfig: require_sleep.method(DevicePersistConfigPayloadSchema, zod.z.void(), { kind: "mutation" }),
12605
+ persistConfig: require_sleep.method(DevicePersistConfigPayloadSchema, zod.z.void(), {
12606
+ kind: "mutation",
12607
+ auth: "admin"
12608
+ }),
12563
12609
  /** Load persisted config for a device. Called at restore time. */
12564
- loadConfig: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
12610
+ loadConfig: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
12565
12611
  /** Load persisted runtime state. Called at device adopt time. */
12566
- loadRuntimeState: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
12612
+ loadRuntimeState: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
12567
12613
  /** Load operator-organisational meta surface for a device. Called by
12568
12614
  * the kernel proxy to populate `DeviceContext.deviceMeta` before
12569
12615
  * the device class constructor runs. Returns `null` when the id
@@ -13128,6 +13174,23 @@ var deviceManagerCapability = {
13128
13174
  */
13129
13175
  getAllBindings: require_sleep.method(zod.z.object({}), zod.z.array(DeviceBindingsForDeviceSchema)),
13130
13176
  /**
13177
+ * The ids of every device bound to AT LEAST ONE of `capNames` — ids only,
13178
+ * ascending (D636).
13179
+ *
13180
+ * The targeted form of "which devices are openings / carry a battery":
13181
+ * before it, the alarm's household scan and the battery section's picker
13182
+ * read the whole fleet (~433 KB slim) and then `getBindingsBatch` over
13183
+ * ~900 ids in five calls. Same resolver as `getBindings` (so a WRAPPED
13184
+ * binding counts exactly as the routing does), walked server-side like
13185
+ * `getAllBindings`; only the matching ids cross the wire. Names are the
13186
+ * caller's to resolve with the targeted `listAll({ deviceIds })`.
13187
+ *
13188
+ * Tier: `protected`, like its siblings `getBindings` / `getBindingsBatch` /
13189
+ * `getAllBindings` — which devices carry a cap is routing metadata every
13190
+ * signed-in client already reads, and it reveals nothing those do not.
13191
+ */
13192
+ listDeviceIdsByCaps: require_sleep.method(zod.z.object({ capNames: zod.z.array(zod.z.string().min(1)).min(1).max(16) }), zod.z.array(zod.z.number())),
13193
+ /**
13131
13194
  * Activate (or deactivate) a wrapper addon for a (device, cap) pair — the
13132
13195
  * per-camera function switch's ONE authority (D62).
13133
13196
  *
@@ -15382,12 +15445,27 @@ var mqttBrokerCapability = {
15382
15445
  },
15383
15446
  methods: {
15384
15447
  listBrokers: require_sleep.method(zod.z.void(), zod.z.array(BrokerInfoSchema)),
15385
- getBrokerConfig: require_sleep.method(IdInputSchema, BrokerConnectionDetailsSchema),
15386
- addBroker: require_sleep.method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }),
15387
- removeBroker: require_sleep.method(IdInputSchema, zod.z.void(), { kind: "mutation" }),
15388
- testConnection: require_sleep.method(IdInputSchema, TestResultSchema$1, { kind: "mutation" }),
15389
- startEmbeddedBroker: require_sleep.method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }),
15390
- stopEmbeddedBroker: require_sleep.method(IdInputSchema, zod.z.void(), { kind: "mutation" }),
15448
+ getBrokerConfig: require_sleep.method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }),
15449
+ addBroker: require_sleep.method(AddBrokerInputSchema, AddBrokerResultSchema, {
15450
+ kind: "mutation",
15451
+ auth: "admin"
15452
+ }),
15453
+ removeBroker: require_sleep.method(IdInputSchema, zod.z.void(), {
15454
+ kind: "mutation",
15455
+ auth: "admin"
15456
+ }),
15457
+ testConnection: require_sleep.method(IdInputSchema, TestResultSchema$1, {
15458
+ kind: "mutation",
15459
+ auth: "admin"
15460
+ }),
15461
+ startEmbeddedBroker: require_sleep.method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
15462
+ kind: "mutation",
15463
+ auth: "admin"
15464
+ }),
15465
+ stopEmbeddedBroker: require_sleep.method(IdInputSchema, zod.z.void(), {
15466
+ kind: "mutation",
15467
+ auth: "admin"
15468
+ }),
15391
15469
  getStatus: require_sleep.method(zod.z.void(), StatusSchema)
15392
15470
  }
15393
15471
  };
@@ -15708,6 +15786,18 @@ var TargetKindSchema = zod.z.object({
15708
15786
  */
15709
15787
  iconMediaType: zod.z.string().optional(),
15710
15788
  configSchema: ConfigSchemaPassthrough,
15789
+ /**
15790
+ * The config keys that decide WHERE this kind's secrets are sent (server,
15791
+ * base URL, instance, chat, recipient). A save that changes any of them
15792
+ * while leaving a secret redacted is refused by the provider (D634), so an
15793
+ * editor uses this to ask for the secret on exactly those edits instead of
15794
+ * on every edit.
15795
+ *
15796
+ * Optional: absent from a provider that holds no secret (the Home Assistant
15797
+ * kinds) and from a provider older than this field — an editor that finds
15798
+ * it absent must assume ANY edit may need the secret.
15799
+ */
15800
+ destinationKeys: zod.z.array(zod.z.string()).optional(),
15711
15801
  supportsDiscovery: zod.z.boolean(),
15712
15802
  caps: TargetKindCapsSchema
15713
15803
  });
@@ -15752,25 +15842,40 @@ var notificationOutputCapability = {
15752
15842
  mode: "collection",
15753
15843
  methods: {
15754
15844
  listTargetKinds: require_sleep.method(zod.z.object({}), zod.z.array(TargetKindSchema)),
15755
- listTargets: require_sleep.method(zod.z.object({}), zod.z.array(TargetSchema)),
15845
+ listTargets: require_sleep.method(zod.z.object({}), zod.z.array(TargetSchema), { auth: "admin" }),
15756
15846
  discoverTargets: require_sleep.method(zod.z.object({
15757
15847
  kind: zod.z.string(),
15758
15848
  config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
15759
- }), zod.z.array(DiscoveredTargetSchema)),
15849
+ }), zod.z.array(DiscoveredTargetSchema), { auth: "admin" }),
15760
15850
  send: require_sleep.method(zod.z.object({
15761
15851
  targetId: zod.z.string(),
15762
15852
  notification: NotificationSchema
15763
- }), SendResultSchema, { kind: "mutation" }),
15853
+ }), SendResultSchema, {
15854
+ kind: "mutation",
15855
+ auth: "admin"
15856
+ }),
15764
15857
  testTarget: require_sleep.method(zod.z.object({
15765
15858
  targetId: zod.z.string(),
15766
15859
  sample: NotificationSchema.optional()
15767
- }), TestResultSchema, { kind: "mutation" }),
15768
- upsertTarget: require_sleep.method(zod.z.object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }),
15769
- deleteTarget: require_sleep.method(zod.z.object({ targetId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
15860
+ }), TestResultSchema, {
15861
+ kind: "mutation",
15862
+ auth: "admin"
15863
+ }),
15864
+ upsertTarget: require_sleep.method(zod.z.object({ target: TargetSchema }), TargetSchema, {
15865
+ kind: "mutation",
15866
+ auth: "admin"
15867
+ }),
15868
+ deleteTarget: require_sleep.method(zod.z.object({ targetId: zod.z.string() }), zod.z.void(), {
15869
+ kind: "mutation",
15870
+ auth: "admin"
15871
+ }),
15770
15872
  setTargetEnabled: require_sleep.method(zod.z.object({
15771
15873
  targetId: zod.z.string(),
15772
15874
  enabled: zod.z.boolean()
15773
- }), zod.z.void(), { kind: "mutation" })
15875
+ }), zod.z.void(), {
15876
+ kind: "mutation",
15877
+ auth: "admin"
15878
+ })
15774
15879
  }
15775
15880
  };
15776
15881
  //#endregion
@@ -17049,6 +17154,21 @@ var NC_ALARM_SYSTEM_EVENT_KINDS = [
17049
17154
  "alarm-disarmed"
17050
17155
  ];
17051
17156
  /**
17157
+ * The SUSTAINED device-health family — a battery or a consumable below the
17158
+ * operator's threshold, and its recovery. Named once because three readers
17159
+ * need the same four: the viewer's dedicated "battery and consumables" rule
17160
+ * section (a stored system rule whose kinds are ALL in this family is shown
17161
+ * there), both editors' warning when these kinds meet a `deviceTypes` filter
17162
+ * (the filter that silenced the live rule for two weeks — D636), and the
17163
+ * catalog parity spec.
17164
+ */
17165
+ var NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS = [
17166
+ "device-battery-low",
17167
+ "device-battery-normal",
17168
+ "device-consumable-low",
17169
+ "device-consumable-normal"
17170
+ ];
17171
+ /**
17052
17172
  * One coherent system-event condition. `kinds` is the required opt-in safety
17053
17173
  * gate; the remaining lists are optional narrowing filters relevant to the
17054
17174
  * selected kinds.
@@ -17068,6 +17188,19 @@ var NcSystemEventConditionSchema = zod.z.object({
17068
17188
  * does not carry) matches no `deviceTypes` list.
17069
17189
  */
17070
17190
  deviceTypes: zod.z.array(zod.z.string().min(1)).min(1).optional(),
17191
+ /**
17192
+ * Devices this rule NEVER speaks about, whatever else matched. Scoped to the
17193
+ * same kind family as `deviceIds` (`systemEventFilterApplies(kind,
17194
+ * 'deviceIds')`) and applied AFTER it: include first, then exclude. A
17195
+ * consumable subject (`consumable:<id>:<key>`) is excluded by its device id.
17196
+ *
17197
+ * It never fails closed: a subject that carries no device id is not in the
17198
+ * list, so it is not excluded. "Every battery except the one thermometer that
17199
+ * reads 0 % forever" is the question this answers — expressed as an include
17200
+ * list it would have to name every other battery device, and every device
17201
+ * adopted later would be silently left out (D636).
17202
+ */
17203
+ excludeDeviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
17071
17204
  nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
17072
17205
  packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional()
17073
17206
  });
@@ -18316,6 +18449,14 @@ var NC_CONDITION_CATALOG = [
18316
18449
  value: "server-updated",
18317
18450
  label: "Server updated"
18318
18451
  },
18452
+ {
18453
+ value: "device-battery-low",
18454
+ label: "Battery low"
18455
+ },
18456
+ {
18457
+ value: "device-battery-normal",
18458
+ label: "Battery back to normal"
18459
+ },
18319
18460
  {
18320
18461
  value: "device-consumable-low",
18321
18462
  label: "Consumable low"
@@ -26403,54 +26544,78 @@ var storageCapability = {
26403
26544
  resolve: require_sleep.method(zod.z.object({
26404
26545
  location: StorageLocationRefSchema,
26405
26546
  relativePath: zod.z.string()
26406
- }), zod.z.string()),
26547
+ }), zod.z.string(), { auth: "admin" }),
26407
26548
  write: require_sleep.method(zod.z.object({
26408
26549
  location: StorageLocationRefSchema,
26409
26550
  relativePath: zod.z.string(),
26410
26551
  data: zod.z.instanceof(Uint8Array)
26411
- }), zod.z.void(), { kind: "mutation" }),
26552
+ }), zod.z.void(), {
26553
+ kind: "mutation",
26554
+ auth: "admin"
26555
+ }),
26412
26556
  read: require_sleep.method(zod.z.object({
26413
26557
  location: StorageLocationRefSchema,
26414
26558
  relativePath: zod.z.string()
26415
- }), zod.z.instanceof(Uint8Array)),
26559
+ }), zod.z.instanceof(Uint8Array), { auth: "admin" }),
26416
26560
  exists: require_sleep.method(zod.z.object({
26417
26561
  location: StorageLocationRefSchema,
26418
26562
  relativePath: zod.z.string()
26419
- }), zod.z.boolean()),
26563
+ }), zod.z.boolean(), { auth: "admin" }),
26420
26564
  list: require_sleep.method(zod.z.object({
26421
26565
  location: StorageLocationRefSchema,
26422
26566
  prefix: zod.z.string().optional()
26423
- }), zod.z.array(zod.z.string()).readonly()),
26567
+ }), zod.z.array(zod.z.string()).readonly(), { auth: "admin" }),
26424
26568
  delete: require_sleep.method(zod.z.object({
26425
26569
  location: StorageLocationRefSchema,
26426
26570
  relativePath: zod.z.string()
26427
- }), zod.z.void(), { kind: "mutation" }),
26571
+ }), zod.z.void(), {
26572
+ kind: "mutation",
26573
+ auth: "admin"
26574
+ }),
26428
26575
  getAvailableSpace: require_sleep.method(zod.z.object({ location: StorageLocationRefSchema }), zod.z.number().nullable()),
26429
26576
  beginUpload: require_sleep.method(zod.z.object({
26430
26577
  location: StorageLocationRefSchema,
26431
26578
  relativePath: zod.z.string(),
26432
26579
  sizeBytes: zod.z.number().optional()
26433
- }), zod.z.object({ uploadId: zod.z.string() }), { kind: "mutation" }),
26580
+ }), zod.z.object({ uploadId: zod.z.string() }), {
26581
+ kind: "mutation",
26582
+ auth: "admin"
26583
+ }),
26434
26584
  writeChunk: require_sleep.method(zod.z.object({
26435
26585
  uploadId: zod.z.string(),
26436
26586
  offset: zod.z.number(),
26437
26587
  data: zod.z.instanceof(Uint8Array)
26438
- }), zod.z.void(), { kind: "mutation" }),
26439
- finalizeUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
26440
- abortUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
26588
+ }), zod.z.void(), {
26589
+ kind: "mutation",
26590
+ auth: "admin"
26591
+ }),
26592
+ finalizeUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
26593
+ kind: "mutation",
26594
+ auth: "admin"
26595
+ }),
26596
+ abortUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
26597
+ kind: "mutation",
26598
+ auth: "admin"
26599
+ }),
26441
26600
  beginDownload: require_sleep.method(zod.z.object({
26442
26601
  location: StorageLocationRefSchema,
26443
26602
  relativePath: zod.z.string()
26444
26603
  }), zod.z.object({
26445
26604
  downloadId: zod.z.string(),
26446
26605
  sizeBytes: zod.z.number()
26447
- }), { kind: "mutation" }),
26606
+ }), {
26607
+ kind: "mutation",
26608
+ auth: "admin"
26609
+ }),
26448
26610
  readChunk: require_sleep.method(zod.z.object({
26449
26611
  downloadId: zod.z.string(),
26450
26612
  offset: zod.z.number(),
26451
26613
  length: zod.z.number()
26452
- }), zod.z.instanceof(Uint8Array)),
26453
- endDownload: require_sleep.method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
26614
+ }), zod.z.instanceof(Uint8Array), { auth: "admin" }),
26615
+ endDownload: require_sleep.method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), {
26616
+ kind: "mutation",
26617
+ auth: "admin"
26618
+ }),
26454
26619
  listLocations: require_sleep.method(zod.z.object({ type: StorageLocationTypeSchema.optional() }), zod.z.array(StorageLocationSchema).readonly()),
26455
26620
  listLocationDeclarations: require_sleep.method(zod.z.void(), zod.z.array(StorageLocationDeclarationSchema).readonly()),
26456
26621
  upsertLocation: require_sleep.method(StorageLocationSchema.omit({
@@ -28880,7 +29045,98 @@ var WebrtcLadderDecisionSchema = zod.z.object({
28880
29045
  serverSending: zod.z.boolean().nullable(),
28881
29046
  /** Epoch ms. The overlay prints its age; a decision from 40 minutes ago
28882
29047
  * must not read like one from this second. */
28883
- at: zod.z.number()
29048
+ at: zod.z.number(),
29049
+ /** The broker's own cause when it is finer than `cause` can carry, e.g.
29050
+ * `trial-revert` (reported as `stall`/`loss` for older consumers). Optional:
29051
+ * an older server strips it instead of rejecting the answer. */
29052
+ causeDetail: zod.z.string().optional()
29053
+ });
29054
+ /**
29055
+ * Why the adaptive ladder is NOT climbing on this session right now (D635).
29056
+ * Before this, a session held on its rung for a reason and a session with no
29057
+ * ladder at all both read "never moved". Every number is one the controller
29058
+ * used; `null` is unknown, never zero (D393).
29059
+ */
29060
+ /**
29061
+ * The hold codes this build knows. The WIRE carries `code` as a plain string:
29062
+ * this output is validated by the router, so a closed enum would make a server
29063
+ * built before the NEXT code reject the whole debug answer (review m1). A
29064
+ * consumer maps an unknown code to a generic "held" and shows `summary`.
29065
+ */
29066
+ var WEBRTC_CLIMB_HOLD_CODES = [
29067
+ "stall-building",
29068
+ "delivery",
29069
+ "no-evidence",
29070
+ "warming",
29071
+ "cooldown",
29072
+ "capacity",
29073
+ "try-unclean",
29074
+ "try-backoff",
29075
+ "trial",
29076
+ "suspended"
29077
+ ];
29078
+ /** Clean-path conditions a try-climb can be refused on (`tryBlockedBy`). */
29079
+ var WEBRTC_TRY_BLOCKERS = [
29080
+ "delivery",
29081
+ "loss",
29082
+ "rtt",
29083
+ "shared-telemetry"
29084
+ ];
29085
+ var WebrtcClimbHoldSchema = zod.z.object({
29086
+ /** `stall-building` — the client receives ≪ what is sent; `delivery` — the
29087
+ * current rung is not landing whole; `no-evidence` — no receiver feedback;
29088
+ * `warming` — healthy, accumulating the streak; `cooldown` — too soon after
29089
+ * a change; `capacity` — a MEASURED probe below the next rung's bar;
29090
+ * `try-unclean` — no capacity evidence, and the path is not clean enough to
29091
+ * try; `try-backoff` — a try reverted, waiting out its backoff; `trial` —
29092
+ * this rung IS a try, reverting if it does not land; `suspended` —
29093
+ * recorded playback on the track. */
29094
+ code: zod.z.string(),
29095
+ /** The rung a climb would go to. */
29096
+ nextTier: require_sleep.CamProfileSchema,
29097
+ /** Bytes received ÷ bytes sent over the delivery window (≥ one GOP). */
29098
+ deliveryRatio: zod.z.number().nullable(),
29099
+ deliveryWindowMs: zod.z.number().nullable(),
29100
+ /** The ratio a climb requires. */
29101
+ climbDeliveryRatio: zod.z.number(),
29102
+ /** The receiver's bandwidth estimate (REMB), kbps. Capped by what is sent. */
29103
+ capacityKbps: zod.z.number().nullable(),
29104
+ /** The viewer's downlink probe for this session, kbps. */
29105
+ probeKbps: zod.z.number().nullable(),
29106
+ /** The next rung's measured bitrate, kbps. */
29107
+ nextTierKbps: zod.z.number().nullable(),
29108
+ capacityMargin: zod.z.number(),
29109
+ /** The capacity a climb to `nextTier` needs, kbps (bitrate × margin, or the
29110
+ * client ladder threshold when the rung has measured nothing). */
29111
+ neededKbps: zod.z.number().nullable(),
29112
+ /** For `try-unclean`: which clean-path condition failed (a `WebrtcTryBlocker`,
29113
+ * carried as a string for the same reason as `code`). */
29114
+ tryBlockedBy: zod.z.string().nullable(),
29115
+ /** The delivery ratio and the loss ratio a try requires / must stay under.
29116
+ * Optional, like every field added to this schema after it first shipped:
29117
+ * the router validates output, so a REQUIRED new field makes a newer server
29118
+ * reject an older broker's whole answer (review m1). */
29119
+ tryDeliveryRatio: zod.z.number().optional(),
29120
+ tryMaxLossRatio: zod.z.number().optional(),
29121
+ /** For `try-backoff`: time until the next try, ms. */
29122
+ retryInMs: zod.z.number().nullable(),
29123
+ /** The last try that reverted in this viewer session. */
29124
+ lastRevert: zod.z.object({
29125
+ tier: require_sleep.CamProfileSchema,
29126
+ deliveryRatio: zod.z.number().nullable(),
29127
+ stalled: zod.z.boolean(),
29128
+ at: zod.z.number()
29129
+ }).nullable(),
29130
+ /** For `trial`: how long this rung has been on trial, and for how long it must hold. */
29131
+ trialForMs: zod.z.number().nullable(),
29132
+ trialMs: zod.z.number().nullable(),
29133
+ healthyForMs: zod.z.number().nullable(),
29134
+ requiredHealthyMs: zod.z.number().nullable(),
29135
+ /** Epoch ms this hold's code began. */
29136
+ since: zod.z.number(),
29137
+ /** The same one-line account the broker logs, e.g.
29138
+ * `held: delivery 0.97 over 4.0s ok, REMB 480 kbps < mid 1800 kbps × 1.2`. */
29139
+ summary: zod.z.string()
28884
29140
  });
28885
29141
  /** Per-tier count of MEASURED downgrades this viewer session has suffered. */
28886
29142
  var WebrtcTierFailureSchema = zod.z.object({
@@ -28944,7 +29200,12 @@ var WebrtcSessionDebugSchema = zod.z.object({
28944
29200
  tierFailures: zod.z.array(WebrtcTierFailureSchema),
28945
29201
  /** Successful promotions in this viewer session (drives the progressive
28946
29202
  * healthy timer). Null when no ladder is running. */
28947
- upgradeCount: zod.z.number().nullable()
29203
+ upgradeCount: zod.z.number().nullable(),
29204
+ /** Why the ladder is not climbing right now. Null when no ladder runs, it
29205
+ * is at the top rung, or it just moved. Optional because this output is
29206
+ * validated by the router: a server carrying this schema must still accept
29207
+ * the answer of a stream-broker deployed before the field existed. */
29208
+ climbHold: WebrtcClimbHoldSchema.nullable().optional()
28948
29209
  });
28949
29210
  /**
28950
29211
  * WebRTC session — device-scoped facade over the system `webrtc` cap.
@@ -35225,6 +35486,11 @@ var ClientNetworkStatsSchema = zod.z.object({
35225
35486
  jitterMs: zod.z.number(),
35226
35487
  estimatedBandwidthKbps: zod.z.number(),
35227
35488
  packetLossPercent: zod.z.number().min(0).max(100),
35489
+ /** The viewer's latest `/adaptive-probe` reading, Mbps — whatever it read
35490
+ * (D635 I4). Absent when it never probed or the probe failed (unknown). */
35491
+ downlinkMbps: zod.z.number().optional(),
35492
+ /** Age of that reading when this report was sent, ms. */
35493
+ downlinkAgeMs: zod.z.number().optional(),
35228
35494
  lastUpdated: zod.z.number()
35229
35495
  });
35230
35496
  var DeviceNetworkStatsSchema = zod.z.object({
@@ -35244,7 +35510,11 @@ var networkQualityCapability = {
35244
35510
  rttMs: zod.z.number().min(0).max(6e4),
35245
35511
  jitterMs: zod.z.number().min(0).max(1e4),
35246
35512
  estimatedBandwidthKbps: zod.z.number().min(0).max(1e6),
35247
- packetLossPercent: zod.z.number().min(0).max(100)
35513
+ packetLossPercent: zod.z.number().min(0).max(100),
35514
+ /** Latest downlink probe, Mbps, whatever it read; absent = never / failed. */
35515
+ downlinkMbps: zod.z.number().min(0).max(1e5).optional(),
35516
+ /** Age of that probe when this report is sent, ms. */
35517
+ downlinkAgeMs: zod.z.number().min(0).max(864e5).optional()
35248
35518
  }), zod.z.void(), { kind: "mutation" })
35249
35519
  },
35250
35520
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -50595,6 +50865,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
50595
50865
  addonId: null,
50596
50866
  access: "view"
50597
50867
  },
50868
+ "deviceManager.listDeviceIdsByCaps": {
50869
+ capName: "device-manager",
50870
+ capScope: "system",
50871
+ addonId: null,
50872
+ access: "view"
50873
+ },
50598
50874
  "deviceManager.listLocationDescriptions": {
50599
50875
  capName: "device-manager",
50600
50876
  capScope: "system",
@@ -59065,6 +59341,7 @@ function createSystemProxy(api) {
59065
59341
  removeByIntegration: (input) => dispatch("deviceManager", "removeByIntegration", "mutation", input),
59066
59342
  getBindingsBatch: (input) => dispatch("deviceManager", "getBindingsBatch", "query", input),
59067
59343
  getAllBindings: (input) => dispatch("deviceManager", "getAllBindings", "query", input),
59344
+ listDeviceIdsByCaps: (input) => dispatch("deviceManager", "listDeviceIdsByCaps", "query", input),
59068
59345
  listWrappersForCap: (input) => dispatch("deviceManager", "listWrappersForCap", "query", input),
59069
59346
  listBindableCapsForDeviceType: (input) => dispatch("deviceManager", "listBindableCapsForDeviceType", "query", input),
59070
59347
  discoverDevices: (input) => dispatch("deviceManager", "discoverDevices", "mutation", input),
@@ -65019,6 +65296,7 @@ exports.NC_AUDIO_SAMPLING_MIN_SEC = NC_AUDIO_SAMPLING_MIN_SEC;
65019
65296
  exports.NC_AUDIO_SEED = NC_AUDIO_SEED;
65020
65297
  exports.NC_AUTHORABLE_SYSTEM_EVENT_KINDS = NC_AUTHORABLE_SYSTEM_EVENT_KINDS;
65021
65298
  exports.NC_BASE_CONDITION_KEYS = NC_BASE_CONDITION_KEYS;
65299
+ exports.NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS = NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS;
65022
65300
  exports.NC_CLIP_RETENTION_MAX_SEC = NC_CLIP_RETENTION_MAX_SEC;
65023
65301
  exports.NC_CONDITION_CATALOG = NC_CONDITION_CATALOG;
65024
65302
  exports.NC_CONFIRM_DEFAULT_MAX_IMAGE_PX = NC_CONFIRM_DEFAULT_MAX_IMAGE_PX;
@@ -65556,12 +65834,15 @@ exports.VectorUpsertInputSchema = VectorUpsertInputSchema;
65556
65834
  exports.VectorUpsertResultSchema = VectorUpsertResultSchema;
65557
65835
  exports.VibrationStatusSchema = VibrationStatusSchema;
65558
65836
  exports.VideoEncodeSchema = VideoEncodeSchema;
65837
+ exports.WEBRTC_CLIMB_HOLD_CODES = WEBRTC_CLIMB_HOLD_CODES;
65559
65838
  exports.WEBRTC_EGRESS_PROFILE = WEBRTC_EGRESS_PROFILE;
65839
+ exports.WEBRTC_TRY_BLOCKERS = WEBRTC_TRY_BLOCKERS;
65560
65840
  exports.WEEKLY_MASK_LENGTH = WEEKLY_MASK_LENGTH;
65561
65841
  exports.WELL_KNOWN_TABS = require_sleep.WELL_KNOWN_TABS;
65562
65842
  exports.WELL_KNOWN_TAB_MAP = require_sleep.WELL_KNOWN_TAB_MAP;
65563
65843
  exports.WaterHeaterStatusSchema = WaterHeaterStatusSchema;
65564
65844
  exports.WeatherStatusSchema = WeatherStatusSchema;
65845
+ exports.WebrtcClimbHoldSchema = WebrtcClimbHoldSchema;
65565
65846
  exports.WebrtcLadderDecisionSchema = WebrtcLadderDecisionSchema;
65566
65847
  exports.WebrtcSessionDebugSchema = WebrtcSessionDebugSchema;
65567
65848
  exports.WebrtcStreamChoiceSchema = WebrtcStreamChoiceSchema;