@camstack/system 1.2.294 → 1.2.296

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 (58) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/autotrack/index.js +1 -1
  8. package/dist/builtins/autotrack/index.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/camera-grid/index.js +1 -1
  12. package/dist/builtins/camera-grid/index.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-aggregation.d.ts +0 -19
  18. package/dist/builtins/device-manager/device-bindings-store.d.ts +12 -0
  19. package/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
  20. package/dist/builtins/device-manager/device-manager.addon.js +18 -2
  21. package/dist/builtins/device-manager/device-manager.addon.mjs +18 -2
  22. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  23. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  24. package/dist/builtins/hub-forwarder/index.js +1 -1
  25. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  26. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  27. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  28. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  29. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  30. package/dist/builtins/local-network/local-network.addon.js +1 -1
  31. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  32. package/dist/builtins/loki-logging/index.js +1 -1
  33. package/dist/builtins/loki-logging/index.mjs +1 -1
  34. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  35. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  36. package/dist/builtins/platform-probe/index.js +1 -1
  37. package/dist/builtins/platform-probe/index.mjs +1 -1
  38. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  40. package/dist/builtins/snapshot/index.js +1 -1
  41. package/dist/builtins/snapshot/index.mjs +1 -1
  42. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  43. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  44. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  45. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  46. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  47. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  48. package/dist/builtins/system-config/system-config.addon.js +1 -1
  49. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  50. package/dist/builtins/winston-logging/index.js +1 -1
  51. package/dist/builtins/winston-logging/index.mjs +1 -1
  52. package/dist/{dist-DASoCm2F.js → dist-DaqbC6N5.js} +281 -53
  53. package/dist/{dist-JHQ62l28.mjs → dist-O_Cf9RQm.mjs} +281 -53
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/{retired-settings-keys-B6q4W_NB.mjs → retired-settings-keys-DCcJa0nH.mjs} +1 -1
  57. package/dist/{retired-settings-keys-DrFUzOzK.js → retired-settings-keys-_jB8F9wE.js} +1 -1
  58. package/package.json +1 -1
@@ -691,7 +691,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
691
691
  return EventCategory;
692
692
  }({});
693
693
  //#endregion
694
- //#region ../types/dist/sleep-pM_J7YnY.mjs
694
+ //#region ../types/dist/sleep-D_4W7xuQ.mjs
695
695
  /**
696
696
  * The audio chunk plane's byte format, and the ONE expansion from a coded
697
697
  * window to float samples (D455).
@@ -3337,7 +3337,10 @@ var deviceOpsCapability = {
3337
3337
  setConfig: method(zod.z.object({
3338
3338
  deviceId: zod.z.number(),
3339
3339
  values: zod.z.record(zod.z.string(), zod.z.unknown())
3340
- }), zod.z.void(), { kind: "mutation" }),
3340
+ }), zod.z.void(), {
3341
+ kind: "mutation",
3342
+ auth: "admin"
3343
+ }),
3341
3344
  /**
3342
3345
  * Invoke a device custom action on a forked/remote device (the
3343
3346
  * cross-process transport for `IDevice.runDeviceAction`). Mirrors
@@ -3354,7 +3357,10 @@ var deviceOpsCapability = {
3354
3357
  * (close sockets, stop background tasks, …). The device-manager still
3355
3358
  * performs its own persistence cleanup before/after this call.
3356
3359
  */
3357
- removeDevice: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), { kind: "mutation" }),
3360
+ removeDevice: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
3361
+ kind: "mutation",
3362
+ auth: "admin"
3363
+ }),
3358
3364
  /**
3359
3365
  * Build the ConfigUISchema (FormBuilder input shape) from the device's
3360
3366
  * Zod config schema. Runs on the worker that owns the IDevice so the
@@ -8989,7 +8995,7 @@ var brokerCapability = {
8989
8995
  }),
8990
8996
  /** Read the broker's cached state for a key. Returns `null` when
8991
8997
  * unknown to the broker (never published / unknown entity). */
8992
- getState: method(GetStateInputSchema, zod.z.unknown().nullable()),
8998
+ getState: method(GetStateInputSchema, zod.z.unknown().nullable(), { auth: "admin" }),
8993
8999
  /** Status method — explicit registration with a `z.void()` input so
8994
9000
  * the codegen-generated tRPC router types its input as
8995
9001
  * `{addonId?: string, nodeId?: string}` (system-scoped collection
@@ -10800,6 +10806,16 @@ var CollectionIndexSchema = zod.z.object({
10800
10806
  * namespace, or none. Making the door enforce it is tracked separately —
10801
10807
  * it renames tables, so it needs a migration.
10802
10808
  *
10809
+ * **So every method is `auth: 'admin'` (D634).** Because nothing scopes a
10810
+ * call to its caller, a `protected` method here was a raw, unredacted read
10811
+ * (and write) of every addon's collections for any role holding
10812
+ * `category:system` — which is every role: a `viewer` could read every
10813
+ * notifier token in plaintext from `notifiers:notification-targets`. No
10814
+ * browser or app client calls this cap. Addons are not affected: an
10815
+ * addon's `ctx.api` cap call is resolved to the provider directly and never
10816
+ * enters the tRPC router (so the tier gates sessions and tokens, never
10817
+ * addons), and the hub itself calls it through the capability registry.
10818
+ *
10803
10819
  * - `{ collection: 'addon-settings' }` → table `addon-settings`
10804
10820
  * - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
10805
10821
  * table `my-addon:addon-settings`
@@ -10821,14 +10837,17 @@ var settingsStoreCapability = {
10821
10837
  namespace: zod.z.string().optional(),
10822
10838
  collection: zod.z.string(),
10823
10839
  key: zod.z.string()
10824
- }), zod.z.unknown()),
10840
+ }), zod.z.unknown(), { auth: "admin" }),
10825
10841
  /** Set a value by key in a collection (upsert). */
10826
10842
  set: method(zod.z.object({
10827
10843
  namespace: zod.z.string().optional(),
10828
10844
  collection: zod.z.string(),
10829
10845
  key: zod.z.string(),
10830
10846
  value: zod.z.unknown()
10831
- }), zod.z.void(), { kind: "mutation" }),
10847
+ }), zod.z.void(), {
10848
+ kind: "mutation",
10849
+ auth: "admin"
10850
+ }),
10832
10851
  /**
10833
10852
  * Rows matching a filter.
10834
10853
  *
@@ -10849,7 +10868,7 @@ var settingsStoreCapability = {
10849
10868
  collection: zod.z.string(),
10850
10869
  filter: QueryFilterSchema.optional(),
10851
10870
  columns: zod.z.array(zod.z.string()).readonly().optional()
10852
- }), zod.z.array(SettingsRecordSchema).readonly()),
10871
+ }), zod.z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
10853
10872
  /**
10854
10873
  * Make a SLOT hold this row — insert it, or update whatever already
10855
10874
  * occupies the slot — and answer with the id the row HAS.
@@ -10902,7 +10921,10 @@ var settingsStoreCapability = {
10902
10921
  }), zod.z.object({
10903
10922
  /** The id the row HAS: assigned by SQLite on an insert, or the existing
10904
10923
  * row's own id on an update. */
10905
- id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10924
+ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10925
+ kind: "mutation",
10926
+ auth: "admin"
10927
+ }),
10906
10928
  /** Insert a new record. */
10907
10929
  insert: method(zod.z.object({
10908
10930
  namespace: zod.z.string().optional(),
@@ -10917,7 +10939,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10917
10939
  * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
10918
10940
  * primary key — which is the only place an auto key is knowable.
10919
10941
  */
10920
- id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10942
+ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10943
+ kind: "mutation",
10944
+ auth: "admin"
10945
+ }),
10921
10946
  /**
10922
10947
  * Insert MANY records in ONE transaction, returning how many landed.
10923
10948
  *
@@ -10945,20 +10970,29 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10945
10970
  namespace: zod.z.string().optional(),
10946
10971
  collection: zod.z.string(),
10947
10972
  records: zod.z.array(BulkRecordSchema).readonly()
10948
- }), zod.z.object({ inserted: zod.z.number().int() }), { kind: "mutation" }),
10973
+ }), zod.z.object({ inserted: zod.z.number().int() }), {
10974
+ kind: "mutation",
10975
+ auth: "admin"
10976
+ }),
10949
10977
  /** Update an existing record by ID. */
10950
10978
  update: method(zod.z.object({
10951
10979
  namespace: zod.z.string().optional(),
10952
10980
  collection: zod.z.string(),
10953
10981
  id: zod.z.string(),
10954
10982
  data: zod.z.record(zod.z.string(), zod.z.unknown())
10955
- }), zod.z.void(), { kind: "mutation" }),
10983
+ }), zod.z.void(), {
10984
+ kind: "mutation",
10985
+ auth: "admin"
10986
+ }),
10956
10987
  /** Delete a record by key/ID. */
10957
10988
  delete: method(zod.z.object({
10958
10989
  namespace: zod.z.string().optional(),
10959
10990
  collection: zod.z.string(),
10960
10991
  key: zod.z.string()
10961
- }), zod.z.void(), { kind: "mutation" }),
10992
+ }), zod.z.void(), {
10993
+ kind: "mutation",
10994
+ auth: "admin"
10995
+ }),
10962
10996
  /**
10963
10997
  * Delete every record matching `filter`, in ONE statement, returning how
10964
10998
  * many rows went. This exists because its absence made every retention
@@ -10977,7 +11011,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10977
11011
  namespace: zod.z.string().optional(),
10978
11012
  collection: zod.z.string(),
10979
11013
  filter: MutationFilterSchema
10980
- }), zod.z.object({ deleted: zod.z.number().int() }), { kind: "mutation" }),
11014
+ }), zod.z.object({ deleted: zod.z.number().int() }), {
11015
+ kind: "mutation",
11016
+ auth: "admin"
11017
+ }),
10981
11018
  /**
10982
11019
  * Apply `data` to every record matching `filter`, in one statement,
10983
11020
  * returning how many rows changed. Same filter contract as
@@ -10988,13 +11025,16 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10988
11025
  collection: zod.z.string(),
10989
11026
  filter: MutationFilterSchema,
10990
11027
  data: zod.z.record(zod.z.string(), zod.z.unknown())
10991
- }), zod.z.object({ updated: zod.z.number().int() }), { kind: "mutation" }),
11028
+ }), zod.z.object({ updated: zod.z.number().int() }), {
11029
+ kind: "mutation",
11030
+ auth: "admin"
11031
+ }),
10992
11032
  /** Count entries in a collection, optionally filtered. */
10993
11033
  count: method(zod.z.object({
10994
11034
  namespace: zod.z.string().optional(),
10995
11035
  collection: zod.z.string(),
10996
11036
  filter: QueryFilterSchema.optional()
10997
- }), zod.z.number()),
11037
+ }), zod.z.number(), { auth: "admin" }),
10998
11038
  /**
10999
11039
  * `COUNT(*)` and one `SUM` / `MIN` / `MAX` per requested field, in ONE
11000
11040
  * statement, over the rows `filter` selects.
@@ -11020,7 +11060,7 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
11020
11060
  collection: zod.z.string(),
11021
11061
  fields: zod.z.array(AggregateFieldSchema).readonly(),
11022
11062
  filter: QueryFilterSchema.optional()
11023
- }), AggregateResultSchema),
11063
+ }), AggregateResultSchema, { auth: "admin" }),
11024
11064
  /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
11025
11065
  histogram: method(zod.z.object({
11026
11066
  namespace: zod.z.string().optional(),
@@ -11032,12 +11072,12 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
11032
11072
  }), zod.z.array(zod.z.object({
11033
11073
  bucket: zod.z.number().int(),
11034
11074
  count: zod.z.number().int()
11035
- })).readonly()),
11075
+ })).readonly(), { auth: "admin" }),
11036
11076
  /** Check if a collection is empty. */
11037
11077
  isEmpty: method(zod.z.object({
11038
11078
  namespace: zod.z.string().optional(),
11039
11079
  collection: zod.z.string()
11040
- }), zod.z.boolean()),
11080
+ }), zod.z.boolean(), { auth: "admin" }),
11041
11081
  /**
11042
11082
  * Declare a typed (SQL-backed) collection with explicit columns +
11043
11083
  * indexes. Idempotent: re-declaring an existing collection with the
@@ -11058,7 +11098,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
11058
11098
  collection: zod.z.string(),
11059
11099
  columns: zod.z.array(CollectionColumnSchema).readonly(),
11060
11100
  indexes: zod.z.array(CollectionIndexSchema).readonly().optional()
11061
- }), zod.z.void(), { kind: "mutation" })
11101
+ }), zod.z.void(), {
11102
+ kind: "mutation",
11103
+ auth: "admin"
11104
+ })
11062
11105
  }
11063
11106
  };
11064
11107
  /**
@@ -12108,8 +12151,14 @@ var deviceExportCapability = {
12108
12151
  getStatus: method(zod.z.void(), DeviceExportStatusSchema),
12109
12152
  listSupportedDeviceKinds: method(zod.z.void(), zod.z.array(DeviceKindSchema)),
12110
12153
  listExposedDevices: method(zod.z.void(), zod.z.array(ExposedDeviceSchema)),
12111
- exposeDevice: method(ExposeInputSchema, zod.z.void(), { kind: "mutation" }),
12112
- unexposeDevice: method(UnexposeInputSchema, zod.z.void(), { kind: "mutation" })
12154
+ exposeDevice: method(ExposeInputSchema, zod.z.void(), {
12155
+ kind: "mutation",
12156
+ auth: "admin"
12157
+ }),
12158
+ unexposeDevice: method(UnexposeInputSchema, zod.z.void(), {
12159
+ kind: "mutation",
12160
+ auth: "admin"
12161
+ })
12113
12162
  }
12114
12163
  };
12115
12164
  /** Wire/storage schema for one icon id. */
@@ -12759,11 +12808,14 @@ var deviceManagerCapability = {
12759
12808
  /** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
12760
12809
  removeDevice: method(DeviceRemovePayloadSchema, zod.z.void(), { kind: "mutation" }),
12761
12810
  /** Persist device config blob. Called by DeviceConfig.set/setAll(). */
12762
- persistConfig: method(DevicePersistConfigPayloadSchema, zod.z.void(), { kind: "mutation" }),
12811
+ persistConfig: method(DevicePersistConfigPayloadSchema, zod.z.void(), {
12812
+ kind: "mutation",
12813
+ auth: "admin"
12814
+ }),
12763
12815
  /** Load persisted config for a device. Called at restore time. */
12764
- loadConfig: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
12816
+ loadConfig: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
12765
12817
  /** Load persisted runtime state. Called at device adopt time. */
12766
- loadRuntimeState: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
12818
+ loadRuntimeState: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
12767
12819
  /** Load operator-organisational meta surface for a device. Called by
12768
12820
  * the kernel proxy to populate `DeviceContext.deviceMeta` before
12769
12821
  * the device class constructor runs. Returns `null` when the id
@@ -13328,6 +13380,23 @@ var deviceManagerCapability = {
13328
13380
  */
13329
13381
  getAllBindings: method(zod.z.object({}), zod.z.array(DeviceBindingsForDeviceSchema)),
13330
13382
  /**
13383
+ * The ids of every device bound to AT LEAST ONE of `capNames` — ids only,
13384
+ * ascending (D636).
13385
+ *
13386
+ * The targeted form of "which devices are openings / carry a battery":
13387
+ * before it, the alarm's household scan and the battery section's picker
13388
+ * read the whole fleet (~433 KB slim) and then `getBindingsBatch` over
13389
+ * ~900 ids in five calls. Same resolver as `getBindings` (so a WRAPPED
13390
+ * binding counts exactly as the routing does), walked server-side like
13391
+ * `getAllBindings`; only the matching ids cross the wire. Names are the
13392
+ * caller's to resolve with the targeted `listAll({ deviceIds })`.
13393
+ *
13394
+ * Tier: `protected`, like its siblings `getBindings` / `getBindingsBatch` /
13395
+ * `getAllBindings` — which devices carry a cap is routing metadata every
13396
+ * signed-in client already reads, and it reveals nothing those do not.
13397
+ */
13398
+ listDeviceIdsByCaps: method(zod.z.object({ capNames: zod.z.array(zod.z.string().min(1)).min(1).max(16) }), zod.z.array(zod.z.number())),
13399
+ /**
13331
13400
  * Activate (or deactivate) a wrapper addon for a (device, cap) pair — the
13332
13401
  * per-camera function switch's ONE authority (D62).
13333
13402
  *
@@ -15434,12 +15503,27 @@ var mqttBrokerCapability = {
15434
15503
  },
15435
15504
  methods: {
15436
15505
  listBrokers: method(zod.z.void(), zod.z.array(BrokerInfoSchema)),
15437
- getBrokerConfig: method(IdInputSchema, BrokerConnectionDetailsSchema),
15438
- addBroker: method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }),
15439
- removeBroker: method(IdInputSchema, zod.z.void(), { kind: "mutation" }),
15440
- testConnection: method(IdInputSchema, TestResultSchema$1, { kind: "mutation" }),
15441
- startEmbeddedBroker: method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }),
15442
- stopEmbeddedBroker: method(IdInputSchema, zod.z.void(), { kind: "mutation" }),
15506
+ getBrokerConfig: method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }),
15507
+ addBroker: method(AddBrokerInputSchema, AddBrokerResultSchema, {
15508
+ kind: "mutation",
15509
+ auth: "admin"
15510
+ }),
15511
+ removeBroker: method(IdInputSchema, zod.z.void(), {
15512
+ kind: "mutation",
15513
+ auth: "admin"
15514
+ }),
15515
+ testConnection: method(IdInputSchema, TestResultSchema$1, {
15516
+ kind: "mutation",
15517
+ auth: "admin"
15518
+ }),
15519
+ startEmbeddedBroker: method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
15520
+ kind: "mutation",
15521
+ auth: "admin"
15522
+ }),
15523
+ stopEmbeddedBroker: method(IdInputSchema, zod.z.void(), {
15524
+ kind: "mutation",
15525
+ auth: "admin"
15526
+ }),
15443
15527
  getStatus: method(zod.z.void(), StatusSchema)
15444
15528
  }
15445
15529
  };
@@ -15756,6 +15840,18 @@ var TargetKindSchema = zod.z.object({
15756
15840
  */
15757
15841
  iconMediaType: zod.z.string().optional(),
15758
15842
  configSchema: ConfigSchemaPassthrough,
15843
+ /**
15844
+ * The config keys that decide WHERE this kind's secrets are sent (server,
15845
+ * base URL, instance, chat, recipient). A save that changes any of them
15846
+ * while leaving a secret redacted is refused by the provider (D634), so an
15847
+ * editor uses this to ask for the secret on exactly those edits instead of
15848
+ * on every edit.
15849
+ *
15850
+ * Optional: absent from a provider that holds no secret (the Home Assistant
15851
+ * kinds) and from a provider older than this field — an editor that finds
15852
+ * it absent must assume ANY edit may need the secret.
15853
+ */
15854
+ destinationKeys: zod.z.array(zod.z.string()).optional(),
15759
15855
  supportsDiscovery: zod.z.boolean(),
15760
15856
  caps: TargetKindCapsSchema
15761
15857
  });
@@ -15800,25 +15896,40 @@ var notificationOutputCapability = {
15800
15896
  mode: "collection",
15801
15897
  methods: {
15802
15898
  listTargetKinds: method(zod.z.object({}), zod.z.array(TargetKindSchema)),
15803
- listTargets: method(zod.z.object({}), zod.z.array(TargetSchema)),
15899
+ listTargets: method(zod.z.object({}), zod.z.array(TargetSchema), { auth: "admin" }),
15804
15900
  discoverTargets: method(zod.z.object({
15805
15901
  kind: zod.z.string(),
15806
15902
  config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
15807
- }), zod.z.array(DiscoveredTargetSchema)),
15903
+ }), zod.z.array(DiscoveredTargetSchema), { auth: "admin" }),
15808
15904
  send: method(zod.z.object({
15809
15905
  targetId: zod.z.string(),
15810
15906
  notification: NotificationSchema
15811
- }), SendResultSchema, { kind: "mutation" }),
15907
+ }), SendResultSchema, {
15908
+ kind: "mutation",
15909
+ auth: "admin"
15910
+ }),
15812
15911
  testTarget: method(zod.z.object({
15813
15912
  targetId: zod.z.string(),
15814
15913
  sample: NotificationSchema.optional()
15815
- }), TestResultSchema, { kind: "mutation" }),
15816
- upsertTarget: method(zod.z.object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }),
15817
- deleteTarget: method(zod.z.object({ targetId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
15914
+ }), TestResultSchema, {
15915
+ kind: "mutation",
15916
+ auth: "admin"
15917
+ }),
15918
+ upsertTarget: method(zod.z.object({ target: TargetSchema }), TargetSchema, {
15919
+ kind: "mutation",
15920
+ auth: "admin"
15921
+ }),
15922
+ deleteTarget: method(zod.z.object({ targetId: zod.z.string() }), zod.z.void(), {
15923
+ kind: "mutation",
15924
+ auth: "admin"
15925
+ }),
15818
15926
  setTargetEnabled: method(zod.z.object({
15819
15927
  targetId: zod.z.string(),
15820
15928
  enabled: zod.z.boolean()
15821
- }), zod.z.void(), { kind: "mutation" })
15929
+ }), zod.z.void(), {
15930
+ kind: "mutation",
15931
+ auth: "admin"
15932
+ })
15822
15933
  }
15823
15934
  };
15824
15935
  new Set([
@@ -16703,6 +16814,19 @@ var NcSystemEventConditionSchema = zod.z.object({
16703
16814
  * does not carry) matches no `deviceTypes` list.
16704
16815
  */
16705
16816
  deviceTypes: zod.z.array(zod.z.string().min(1)).min(1).optional(),
16817
+ /**
16818
+ * Devices this rule NEVER speaks about, whatever else matched. Scoped to the
16819
+ * same kind family as `deviceIds` (`systemEventFilterApplies(kind,
16820
+ * 'deviceIds')`) and applied AFTER it: include first, then exclude. A
16821
+ * consumable subject (`consumable:<id>:<key>`) is excluded by its device id.
16822
+ *
16823
+ * It never fails closed: a subject that carries no device id is not in the
16824
+ * list, so it is not excluded. "Every battery except the one thermometer that
16825
+ * reads 0 % forever" is the question this answers — expressed as an include
16826
+ * list it would have to name every other battery device, and every device
16827
+ * adopted later would be silently left out (D636).
16828
+ */
16829
+ excludeDeviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
16706
16830
  nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
16707
16831
  packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional()
16708
16832
  });
@@ -25116,54 +25240,78 @@ var storageCapability = {
25116
25240
  resolve: method(zod.z.object({
25117
25241
  location: StorageLocationRefSchema,
25118
25242
  relativePath: zod.z.string()
25119
- }), zod.z.string()),
25243
+ }), zod.z.string(), { auth: "admin" }),
25120
25244
  write: method(zod.z.object({
25121
25245
  location: StorageLocationRefSchema,
25122
25246
  relativePath: zod.z.string(),
25123
25247
  data: zod.z.instanceof(Uint8Array)
25124
- }), zod.z.void(), { kind: "mutation" }),
25248
+ }), zod.z.void(), {
25249
+ kind: "mutation",
25250
+ auth: "admin"
25251
+ }),
25125
25252
  read: method(zod.z.object({
25126
25253
  location: StorageLocationRefSchema,
25127
25254
  relativePath: zod.z.string()
25128
- }), zod.z.instanceof(Uint8Array)),
25255
+ }), zod.z.instanceof(Uint8Array), { auth: "admin" }),
25129
25256
  exists: method(zod.z.object({
25130
25257
  location: StorageLocationRefSchema,
25131
25258
  relativePath: zod.z.string()
25132
- }), zod.z.boolean()),
25259
+ }), zod.z.boolean(), { auth: "admin" }),
25133
25260
  list: method(zod.z.object({
25134
25261
  location: StorageLocationRefSchema,
25135
25262
  prefix: zod.z.string().optional()
25136
- }), zod.z.array(zod.z.string()).readonly()),
25263
+ }), zod.z.array(zod.z.string()).readonly(), { auth: "admin" }),
25137
25264
  delete: method(zod.z.object({
25138
25265
  location: StorageLocationRefSchema,
25139
25266
  relativePath: zod.z.string()
25140
- }), zod.z.void(), { kind: "mutation" }),
25267
+ }), zod.z.void(), {
25268
+ kind: "mutation",
25269
+ auth: "admin"
25270
+ }),
25141
25271
  getAvailableSpace: method(zod.z.object({ location: StorageLocationRefSchema }), zod.z.number().nullable()),
25142
25272
  beginUpload: method(zod.z.object({
25143
25273
  location: StorageLocationRefSchema,
25144
25274
  relativePath: zod.z.string(),
25145
25275
  sizeBytes: zod.z.number().optional()
25146
- }), zod.z.object({ uploadId: zod.z.string() }), { kind: "mutation" }),
25276
+ }), zod.z.object({ uploadId: zod.z.string() }), {
25277
+ kind: "mutation",
25278
+ auth: "admin"
25279
+ }),
25147
25280
  writeChunk: method(zod.z.object({
25148
25281
  uploadId: zod.z.string(),
25149
25282
  offset: zod.z.number(),
25150
25283
  data: zod.z.instanceof(Uint8Array)
25151
- }), zod.z.void(), { kind: "mutation" }),
25152
- finalizeUpload: method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
25153
- abortUpload: method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
25284
+ }), zod.z.void(), {
25285
+ kind: "mutation",
25286
+ auth: "admin"
25287
+ }),
25288
+ finalizeUpload: method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
25289
+ kind: "mutation",
25290
+ auth: "admin"
25291
+ }),
25292
+ abortUpload: method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
25293
+ kind: "mutation",
25294
+ auth: "admin"
25295
+ }),
25154
25296
  beginDownload: method(zod.z.object({
25155
25297
  location: StorageLocationRefSchema,
25156
25298
  relativePath: zod.z.string()
25157
25299
  }), zod.z.object({
25158
25300
  downloadId: zod.z.string(),
25159
25301
  sizeBytes: zod.z.number()
25160
- }), { kind: "mutation" }),
25302
+ }), {
25303
+ kind: "mutation",
25304
+ auth: "admin"
25305
+ }),
25161
25306
  readChunk: method(zod.z.object({
25162
25307
  downloadId: zod.z.string(),
25163
25308
  offset: zod.z.number(),
25164
25309
  length: zod.z.number()
25165
- }), zod.z.instanceof(Uint8Array)),
25166
- endDownload: method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), { kind: "mutation" }),
25310
+ }), zod.z.instanceof(Uint8Array), { auth: "admin" }),
25311
+ endDownload: method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), {
25312
+ kind: "mutation",
25313
+ auth: "admin"
25314
+ }),
25167
25315
  listLocations: method(zod.z.object({ type: StorageLocationTypeSchema.optional() }), zod.z.array(StorageLocationSchema).readonly()),
25168
25316
  listLocationDeclarations: method(zod.z.void(), zod.z.array(StorageLocationDeclarationSchema).readonly()),
25169
25317
  upsertLocation: method(StorageLocationSchema.omit({
@@ -27251,7 +27399,67 @@ var WebrtcLadderDecisionSchema = zod.z.object({
27251
27399
  serverSending: zod.z.boolean().nullable(),
27252
27400
  /** Epoch ms. The overlay prints its age; a decision from 40 minutes ago
27253
27401
  * must not read like one from this second. */
27254
- at: zod.z.number()
27402
+ at: zod.z.number(),
27403
+ /** The broker's own cause when it is finer than `cause` can carry, e.g.
27404
+ * `trial-revert` (reported as `stall`/`loss` for older consumers). Optional:
27405
+ * an older server strips it instead of rejecting the answer. */
27406
+ causeDetail: zod.z.string().optional()
27407
+ });
27408
+ var WebrtcClimbHoldSchema = zod.z.object({
27409
+ /** `stall-building` — the client receives ≪ what is sent; `delivery` — the
27410
+ * current rung is not landing whole; `no-evidence` — no receiver feedback;
27411
+ * `warming` — healthy, accumulating the streak; `cooldown` — too soon after
27412
+ * a change; `capacity` — a MEASURED probe below the next rung's bar;
27413
+ * `try-unclean` — no capacity evidence, and the path is not clean enough to
27414
+ * try; `try-backoff` — a try reverted, waiting out its backoff; `trial` —
27415
+ * this rung IS a try, reverting if it does not land; `suspended` —
27416
+ * recorded playback on the track. */
27417
+ code: zod.z.string(),
27418
+ /** The rung a climb would go to. */
27419
+ nextTier: CamProfileSchema,
27420
+ /** Bytes received ÷ bytes sent over the delivery window (≥ one GOP). */
27421
+ deliveryRatio: zod.z.number().nullable(),
27422
+ deliveryWindowMs: zod.z.number().nullable(),
27423
+ /** The ratio a climb requires. */
27424
+ climbDeliveryRatio: zod.z.number(),
27425
+ /** The receiver's bandwidth estimate (REMB), kbps. Capped by what is sent. */
27426
+ capacityKbps: zod.z.number().nullable(),
27427
+ /** The viewer's downlink probe for this session, kbps. */
27428
+ probeKbps: zod.z.number().nullable(),
27429
+ /** The next rung's measured bitrate, kbps. */
27430
+ nextTierKbps: zod.z.number().nullable(),
27431
+ capacityMargin: zod.z.number(),
27432
+ /** The capacity a climb to `nextTier` needs, kbps (bitrate × margin, or the
27433
+ * client ladder threshold when the rung has measured nothing). */
27434
+ neededKbps: zod.z.number().nullable(),
27435
+ /** For `try-unclean`: which clean-path condition failed (a `WebrtcTryBlocker`,
27436
+ * carried as a string for the same reason as `code`). */
27437
+ tryBlockedBy: zod.z.string().nullable(),
27438
+ /** The delivery ratio and the loss ratio a try requires / must stay under.
27439
+ * Optional, like every field added to this schema after it first shipped:
27440
+ * the router validates output, so a REQUIRED new field makes a newer server
27441
+ * reject an older broker's whole answer (review m1). */
27442
+ tryDeliveryRatio: zod.z.number().optional(),
27443
+ tryMaxLossRatio: zod.z.number().optional(),
27444
+ /** For `try-backoff`: time until the next try, ms. */
27445
+ retryInMs: zod.z.number().nullable(),
27446
+ /** The last try that reverted in this viewer session. */
27447
+ lastRevert: zod.z.object({
27448
+ tier: CamProfileSchema,
27449
+ deliveryRatio: zod.z.number().nullable(),
27450
+ stalled: zod.z.boolean(),
27451
+ at: zod.z.number()
27452
+ }).nullable(),
27453
+ /** For `trial`: how long this rung has been on trial, and for how long it must hold. */
27454
+ trialForMs: zod.z.number().nullable(),
27455
+ trialMs: zod.z.number().nullable(),
27456
+ healthyForMs: zod.z.number().nullable(),
27457
+ requiredHealthyMs: zod.z.number().nullable(),
27458
+ /** Epoch ms this hold's code began. */
27459
+ since: zod.z.number(),
27460
+ /** The same one-line account the broker logs, e.g.
27461
+ * `held: delivery 0.97 over 4.0s ok, REMB 480 kbps < mid 1800 kbps × 1.2`. */
27462
+ summary: zod.z.string()
27255
27463
  });
27256
27464
  /** Per-tier count of MEASURED downgrades this viewer session has suffered. */
27257
27465
  var WebrtcTierFailureSchema = zod.z.object({
@@ -27315,7 +27523,12 @@ var WebrtcSessionDebugSchema = zod.z.object({
27315
27523
  tierFailures: zod.z.array(WebrtcTierFailureSchema),
27316
27524
  /** Successful promotions in this viewer session (drives the progressive
27317
27525
  * healthy timer). Null when no ladder is running. */
27318
- upgradeCount: zod.z.number().nullable()
27526
+ upgradeCount: zod.z.number().nullable(),
27527
+ /** Why the ladder is not climbing right now. Null when no ladder runs, it
27528
+ * is at the top rung, or it just moved. Optional because this output is
27529
+ * validated by the router: a server carrying this schema must still accept
27530
+ * the answer of a stream-broker deployed before the field existed. */
27531
+ climbHold: WebrtcClimbHoldSchema.nullable().optional()
27319
27532
  });
27320
27533
  /**
27321
27534
  * WebRTC session — device-scoped facade over the system `webrtc` cap.
@@ -33267,6 +33480,11 @@ var ClientNetworkStatsSchema = zod.z.object({
33267
33480
  jitterMs: zod.z.number(),
33268
33481
  estimatedBandwidthKbps: zod.z.number(),
33269
33482
  packetLossPercent: zod.z.number().min(0).max(100),
33483
+ /** The viewer's latest `/adaptive-probe` reading, Mbps — whatever it read
33484
+ * (D635 I4). Absent when it never probed or the probe failed (unknown). */
33485
+ downlinkMbps: zod.z.number().optional(),
33486
+ /** Age of that reading when this report was sent, ms. */
33487
+ downlinkAgeMs: zod.z.number().optional(),
33270
33488
  lastUpdated: zod.z.number()
33271
33489
  });
33272
33490
  var DeviceNetworkStatsSchema = zod.z.object({
@@ -33286,7 +33504,11 @@ var networkQualityCapability = {
33286
33504
  rttMs: zod.z.number().min(0).max(6e4),
33287
33505
  jitterMs: zod.z.number().min(0).max(1e4),
33288
33506
  estimatedBandwidthKbps: zod.z.number().min(0).max(1e6),
33289
- packetLossPercent: zod.z.number().min(0).max(100)
33507
+ packetLossPercent: zod.z.number().min(0).max(100),
33508
+ /** Latest downlink probe, Mbps, whatever it read; absent = never / failed. */
33509
+ downlinkMbps: zod.z.number().min(0).max(1e5).optional(),
33510
+ /** Age of that probe when this report is sent, ms. */
33511
+ downlinkAgeMs: zod.z.number().min(0).max(864e5).optional()
33290
33512
  }), zod.z.void(), { kind: "mutation" })
33291
33513
  },
33292
33514
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -44945,6 +45167,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
44945
45167
  addonId: null,
44946
45168
  access: "view"
44947
45169
  },
45170
+ "deviceManager.listDeviceIdsByCaps": {
45171
+ capName: "device-manager",
45172
+ capScope: "system",
45173
+ addonId: null,
45174
+ access: "view"
45175
+ },
44948
45176
  "deviceManager.listLocationDescriptions": {
44949
45177
  capName: "device-manager",
44950
45178
  capScope: "system",