@camstack/server 1.2.380 → 1.2.382

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.
@@ -218,6 +218,8 @@ function buildNetworkQualityProvider(nq) {
218
218
  jitterMs: input.jitterMs,
219
219
  estimatedBandwidthKbps: input.estimatedBandwidthKbps,
220
220
  packetLossPercent: input.packetLossPercent,
221
+ ...(input.downlinkMbps !== undefined ? { downlinkMbps: input.downlinkMbps } : {}),
222
+ ...(input.downlinkAgeMs !== undefined ? { downlinkAgeMs: input.downlinkAgeMs } : {}),
221
223
  });
222
224
  },
223
225
  };
@@ -1,12 +1,66 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADAPTIVE_PROBE_BYTES = void 0;
3
+ exports.ADAPTIVE_PROBE_PER_IP_PER_MINUTE = exports.ADAPTIVE_PROBE_BYTES = void 0;
4
4
  exports.registerAdaptiveProbeRoute = registerAdaptiveProbeRoute;
5
- exports.ADAPTIVE_PROBE_BYTES = 128 * 1024;
6
- const BODY = Buffer.alloc(exports.ADAPTIVE_PROBE_BYTES, 0x61);
7
- function registerAdaptiveProbeRoute(fastify) {
8
- fastify.get('/adaptive-probe', async (_req, reply) => {
5
+ /**
6
+ * Burst blob for adaptive-tier downlink measurement (D635).
7
+ *
8
+ * Size: 1 MiB. The client times the body from its FIRST byte and decides
9
+ * against 2.5 Mbps (`mid`) and 8 Mbps (`high`). At 8 Mbps, 1 MiB is ~1.05 s of
10
+ * transfer, so a 16 ms WebView timer tick is ~1.5 % of the reading and a WAN
11
+ * slow start (~3 RTTs at 50 ms) is ~15 %; the previous 128 KiB was 131 ms at
12
+ * the same rate — a single timer tick was 12 % of it, and timed from the
13
+ * request on a busy hub it measured latency (1.2–1.46 Mbps on a LAN).
14
+ *
15
+ * Cost, including cellular: one probe per camera app-wide per 30 s cache
16
+ * window (the client single-flights it), cut by the client's 2.5 s deadline —
17
+ * at most ~0.8 MB at 2.5 Mbps, 1 MiB on anything faster. That is about three
18
+ * minutes of a 41 kbps sub stream per camera OPEN, not per minute of viewing;
19
+ * renegotiations reuse the cached value and never probe.
20
+ *
21
+ * Access (round 3, review I6): a 100-byte request that returns 1 MiB is an
22
+ * amplifier, and the hub is reachable through relays. The route therefore
23
+ * requires a SESSION — Bearer JWT or the session cookie, the same session-grade
24
+ * check the stream data plane applies — and is rate-limited per client IP.
25
+ * Everything a refusal returns is a few bytes.
26
+ */
27
+ const node_crypto_1 = require("node:crypto");
28
+ const health_routes_js_1 = require("./health.routes.js");
29
+ const auth_rate_limit_js_1 = require("../../auth/auth-rate-limit.js");
30
+ exports.ADAPTIVE_PROBE_BYTES = 1024 * 1024;
31
+ /**
32
+ * Probes a client IP may draw per minute: 12. The client probes at most once
33
+ * per 30 s per app (single-flight + cache), so 12 leaves room for several
34
+ * apps/devices behind one NAT and caps an abuser at 12 MiB/min.
35
+ */
36
+ exports.ADAPTIVE_PROBE_PER_IP_PER_MINUTE = 12;
37
+ /**
38
+ * Random, so it is INCOMPRESSIBLE. The previous body was one repeated byte and
39
+ * `@fastify/compress` (global in `main.ts`; its default types include
40
+ * `octet-stream`) gzipped it to a few hundred bytes — the client timed a round
41
+ * trip and called it bandwidth. `compress: false` below stops our own
42
+ * compressor; randomness also defeats one in a relay on the way.
43
+ */
44
+ const BODY = (0, node_crypto_1.randomBytes)(exports.ADAPTIVE_PROBE_BYTES);
45
+ function registerAdaptiveProbeRoute(fastify, deps) {
46
+ fastify.get('/adaptive-probe', { compress: false }, async (req, reply) => {
9
47
  reply.header('cache-control', 'no-store');
48
+ const authorized = (0, health_routes_js_1.isAuthorizedHealthRequest)({
49
+ ...(typeof req.headers.authorization === 'string'
50
+ ? { authorization: req.headers.authorization }
51
+ : {}),
52
+ ...(typeof req.headers.cookie === 'string' ? { cookie: req.headers.cookie } : {}),
53
+ }, deps.verifyToken);
54
+ if (!authorized)
55
+ return reply.status(401).send({ ok: false, error: 'unauthorized' });
56
+ const key = (0, auth_rate_limit_js_1.clientKeyFromRequest)(req);
57
+ if (key !== null) {
58
+ const verdict = deps.limiter.check(`adaptive-probe:${key}`);
59
+ if (!verdict.allowed) {
60
+ reply.header('retry-after', String(verdict.retryAfterSeconds));
61
+ return reply.status(429).send({ ok: false, error: 'rate limited' });
62
+ }
63
+ }
10
64
  reply.header('content-type', 'application/octet-stream');
11
65
  return reply.send(BODY);
12
66
  });
@@ -46,6 +46,11 @@ exports.redactDeviceInfoSecrets = redactDeviceInfoSecrets;
46
46
  exports.redactDeviceInfoRecordSecrets = redactDeviceInfoRecordSecrets;
47
47
  exports.redactSettingsSections = redactSettingsSections;
48
48
  exports.redactSettingsAggregate = redactSettingsAggregate;
49
+ exports.redactSettingsForm = redactSettingsForm;
50
+ exports.redactExportSetup = redactExportSetup;
51
+ exports.redactDeepSecrets = redactDeepSecrets;
52
+ exports.redactStatusAggregateSetup = redactStatusAggregateSetup;
53
+ exports.redactStatusAggregateBatchSetup = redactStatusAggregateBatchSetup;
49
54
  exports.redactConfigEntries = redactConfigEntries;
50
55
  exports.redactStreamUrlSecrets = redactStreamUrlSecrets;
51
56
  /** What a non-admin sees instead of the value. Matches the `***` convention
@@ -131,18 +136,6 @@ function redactDeviceInfoRecordSecrets(data) {
131
136
  out[key] = redactDeviceInfoSecrets(value);
132
137
  return out;
133
138
  }
134
- /** One settings field as the aggregate emits it: `{ key, value, … }`. */
135
- function redactField(field) {
136
- if (!isRecord(field))
137
- return field;
138
- const key = field['key'];
139
- if (typeof key !== 'string' || !isSecretConfigKey(key))
140
- return field;
141
- const value = field['value'];
142
- if (typeof value !== 'string' || value.length === 0)
143
- return field;
144
- return { ...field, value: exports.REDACTED_SECRET };
145
- }
146
139
  /**
147
140
  * Project a `SettingsSchemaWithValues` (`{ sections: [{ fields: [...] }] }`).
148
141
  * Used by `getDeviceSettingsAggregate` and `getSettingsSchema`.
@@ -161,7 +154,10 @@ function redactSettingsSections(data) {
161
154
  const fields = section['fields'];
162
155
  if (!Array.isArray(fields))
163
156
  return section;
164
- return { ...section, fields: fields.map(redactField) };
157
+ // The same field-aware walk as the addon forms: by TYPE, at any depth,
158
+ // into array rows — a device form carries `password`-typed fields whose
159
+ // key no keyword catches, and HomeKit's pairing `qr-code` (D634 r2).
160
+ return { ...section, fields: fields.map(redactFormField) };
165
161
  }),
166
162
  };
167
163
  }
@@ -177,11 +173,173 @@ function redactSettingsAggregate(data) {
177
173
  return data;
178
174
  return { ...data, settings: redactSettingsSections(settings) };
179
175
  }
176
+ /** True when a hydrated form field carries a credential: by TYPE first, then by name. */
177
+ function isSecretFormField(field) {
178
+ // A `qr-code` in a settings form is a PAIRING code (HomeKit `X-HM://…`):
179
+ // whoever scans it controls the accessory.
180
+ if (field['type'] === 'password' || field['secret'] === true || field['type'] === 'qr-code') {
181
+ return true;
182
+ }
183
+ const key = field['key'];
184
+ return typeof key === 'string' && isSecretConfigKey(key);
185
+ }
186
+ /** The `itemFields` of an array field, when it declares them. */
187
+ function itemFieldsOf(field) {
188
+ const items = field?.['itemFields'];
189
+ return Array.isArray(items) ? items : undefined;
190
+ }
191
+ /** The declared item field named `key`, if any. */
192
+ function itemField(itemFields, key) {
193
+ const found = itemFields?.find((f) => isRecord(f) && f['key'] === key);
194
+ return isRecord(found) ? found : undefined;
195
+ }
196
+ /**
197
+ * Withhold every secret inside one form VALUE, whatever its shape.
198
+ *
199
+ * Round 1 replaced only a secret field's string value, so an array of rows
200
+ * (`editable-array` — mqtt-broker `brokers[].password`), a `multiple` secret
201
+ * (an array of strings) and a JSON object holding a `token` all went out
202
+ * whole. So the value is walked: an array element by element, an object key
203
+ * by key — a key is secret when its declared item field is (`password` /
204
+ * `secret: true`) or its NAME is — and everything under a secret is withheld.
205
+ * A non-secret string that is a URL loses its userinfo / credential params
206
+ * (`mqtt://user:pass@host`), the same masker the stream URLs use.
207
+ */
208
+ function redactFormValue(value, secret, itemFields) {
209
+ if (typeof value === 'string') {
210
+ if (value.length === 0)
211
+ return value;
212
+ if (secret)
213
+ return exports.REDACTED_SECRET;
214
+ return value.includes('://') ? (0, types_1.maskUrlCredentials)(value) : value;
215
+ }
216
+ if (Array.isArray(value))
217
+ return value.map((el) => redactFormValue(el, secret, itemFields));
218
+ if (!isRecord(value))
219
+ return value;
220
+ const out = {};
221
+ for (const [key, child] of Object.entries(value)) {
222
+ const declared = itemField(itemFields, key);
223
+ const childSecret = secret || (declared !== undefined && isSecretFormField(declared)) || isSecretConfigKey(key);
224
+ out[key] = redactFormValue(child, childSecret, itemFieldsOf(declared));
225
+ }
226
+ return out;
227
+ }
228
+ /** One hydrated form field, its secret withheld and its children walked. */
229
+ function redactFormField(field) {
230
+ if (!isRecord(field))
231
+ return field;
232
+ const nested = field['fields'];
233
+ const tabs = field['tabs'];
234
+ if (Array.isArray(nested))
235
+ return { ...field, fields: nested.map(redactFormField) };
236
+ if (Array.isArray(tabs)) {
237
+ return {
238
+ ...field,
239
+ tabs: tabs.map((tab) => {
240
+ if (!isRecord(tab))
241
+ return tab;
242
+ const tabFields = tab['fields'];
243
+ return Array.isArray(tabFields) ? { ...tab, fields: tabFields.map(redactFormField) } : tab;
244
+ }),
245
+ };
246
+ }
247
+ if (!('value' in field))
248
+ return field;
249
+ const redacted = {
250
+ ...field,
251
+ value: redactFormValue(field['value'], isSecretFormField(field), itemFieldsOf(field)),
252
+ };
253
+ // The HomeKit QR caption spells the setup code out in prose.
254
+ const caption = field['caption'];
255
+ return field['type'] === 'qr-code' && typeof caption === 'string' && caption.length > 0
256
+ ? { ...redacted, caption: exports.REDACTED_SECRET }
257
+ : redacted;
258
+ }
259
+ /**
260
+ * Project an ADDON settings form (`addonSettings.getGlobalSettings` /
261
+ * `getIntegrationSettings` / `getDeviceSettings`, a `SettingsSchemaWithValues`).
262
+ *
263
+ * Unlike {@link redactSettingsSections} (device forms, whose secrets are named
264
+ * by key convention) this decides by the FIELD: an addon's credential is often
265
+ * called something no keyword catches — an ntfy `topic`, a PEM `privateKey`
266
+ * marked `secret: true` — and addon forms nest fields in groups and sub-tabs.
267
+ * `hydrateSchema` fills a password field with its stored value on purpose (a
268
+ * masked value clobbered secrets on save), so this boundary is the only place
269
+ * the value is withheld from a non-admin; an admin still gets the real form,
270
+ * and `updateGlobalSettings` / `updateDeviceSettings` are admin-only, so a
271
+ * redacted value can never be written back (D634).
272
+ */
273
+ function redactSettingsForm(data) {
274
+ if (!isRecord(data))
275
+ return data;
276
+ const sections = data['sections'];
277
+ if (!Array.isArray(sections))
278
+ return data;
279
+ return {
280
+ ...data,
281
+ sections: sections.map((section) => {
282
+ if (!isRecord(section))
283
+ return section;
284
+ const fields = section['fields'];
285
+ return Array.isArray(fields) ? { ...section, fields: fields.map(redactFormField) } : section;
286
+ }),
287
+ };
288
+ }
289
+ /**
290
+ * Project a `deviceExport.getStatus` answer: drop the `setup` block.
291
+ *
292
+ * `setup` is the export's PAIRING material — HomeKit's `X-HM://` setup URI as
293
+ * `qr`, the Alexa export's Lambda ingress token as a `secret: true` row. The
294
+ * row flag only masks in the UI; the value travels. Only the admin export
295
+ * panel renders it, so a non-admin keeps the link state and counts and never
296
+ * receives the block (D634 r2). One object or a fanned-out array.
297
+ */
298
+ function redactExportSetup(data) {
299
+ if (Array.isArray(data))
300
+ return data.map((row) => redactExportSetup(row));
301
+ if (!isRecord(data) || !('setup' in data))
302
+ return data;
303
+ const { setup: _setup, ...rest } = data;
304
+ return rest;
305
+ }
306
+ /**
307
+ * Walk an arbitrary payload and withhold every secret-NAMED key's value and
308
+ * every URL's credentials — for surfaces with no schema to consult: the raw
309
+ * upstream state a device exposes (Home Assistant attributes carry
310
+ * `access_token` and `?token=` picture URLs), an integration's `info`, a
311
+ * broker list's `url` (D634 r3).
312
+ */
313
+ function redactDeepSecrets(data) {
314
+ return redactFormValue(data, false, undefined);
315
+ }
316
+ /** The status-aggregate entry that carries export pairing material. */
317
+ const DEVICE_EXPORT_CAP = 'device-export';
318
+ /**
319
+ * Project a single status aggregate (`Record<capName, status | null>`): the
320
+ * `device-export` entry loses its `setup` (D634 r3 — defence in depth; the
321
+ * aggregation itself no longer asks a system collection cap per device).
322
+ */
323
+ function redactStatusAggregateSetup(data) {
324
+ if (!isRecord(data) || !(DEVICE_EXPORT_CAP in data))
325
+ return data;
326
+ return { ...data, [DEVICE_EXPORT_CAP]: redactExportSetup(data[DEVICE_EXPORT_CAP]) };
327
+ }
328
+ /** Project a batch status aggregate (`Record<deviceId, Record<capName, status>>`). */
329
+ function redactStatusAggregateBatchSetup(data) {
330
+ if (!isRecord(data))
331
+ return data;
332
+ const out = {};
333
+ for (const [deviceId, statuses] of Object.entries(data)) {
334
+ out[deviceId] = redactStatusAggregateSetup(statuses);
335
+ }
336
+ return out;
337
+ }
180
338
  /** Project a flat `ConfigEntry[]` — `getConfigSchema`'s `{ key, value }` rows. */
181
339
  function redactConfigEntries(data) {
182
340
  if (!Array.isArray(data))
183
341
  return data;
184
- return data.map(redactField);
342
+ return data.map(redactFormField);
185
343
  }
186
344
  /**
187
345
  * URL fields whose VALUE is an RTSP/RTMP restream address and can embed
@@ -237,6 +395,21 @@ function redactStreamUrlSecrets(data) {
237
395
  * failing test rather than a silent leak.
238
396
  */
239
397
  exports.NON_ADMIN_CONFIG_REDACTED_METHODS = new Map([
398
+ // ── Addon settings forms (D634) — hydrated with the STORED secret ──
399
+ ['addonSettings.getGlobalSettings', redactSettingsForm],
400
+ ['addonSettings.getIntegrationSettings', redactSettingsForm],
401
+ ['addonSettings.getDeviceSettings', redactSettingsForm],
402
+ ['deviceExport.getStatus', redactExportSetup],
403
+ // ── Round-3 sweep: the per-device device-ops twins and the listings ──
404
+ ['deviceOps.getConfigEntries', redactConfigEntries],
405
+ ['deviceOps.getSettingsSchema', redactSettingsSections],
406
+ ['deviceOps.getRawState', redactDeepSecrets],
407
+ ['mqttBroker.listBrokers', redactDeepSecrets],
408
+ ['integrations.list', redactDeepSecrets],
409
+ ['integrations.get', redactDeepSecrets],
410
+ ['integrations.getByAddonId', redactDeepSecrets],
411
+ ['deviceManager.getDeviceStatusAggregate', redactStatusAggregateSetup],
412
+ ['deviceManager.getDeviceStatusAggregateBatch', redactStatusAggregateBatchSetup],
240
413
  ['deviceManager.getDevice', redactDeviceInfoSecrets],
241
414
  ['deviceManager.listAll', redactDeviceInfoSecrets],
242
415
  ['deviceManager.getChildren', redactDeviceInfoSecrets],
@@ -1523,7 +1523,7 @@ function createCapRouter_broker(getProvider, createRemoteProxy) {
1523
1523
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
1524
1524
  return p.unsubscribe(methodInput);
1525
1525
  }),
1526
- getState: trpc_middleware_js_1.protectedProcedure
1526
+ getState: trpc_middleware_js_1.adminProcedure
1527
1527
  .input(types_23.brokerCapability.methods.getState.input.loose())
1528
1528
  .output(types_23.brokerCapability.methods.getState.output)
1529
1529
  .query(async ({ input, ctx }) => {
@@ -2582,7 +2582,7 @@ function createCapRouter_deviceExport(getProvider, createRemoteProxy) {
2582
2582
  const p = resolveProvider('device-export', input?.nodeId, () => getProvider(ctx, input?.addonId), createRemoteProxy);
2583
2583
  return p.listExposedDevices();
2584
2584
  }),
2585
- exposeDevice: trpc_middleware_js_1.protectedProcedure
2585
+ exposeDevice: trpc_middleware_js_1.adminProcedure
2586
2586
  .input(types_42.deviceExportCapability.methods.exposeDevice.input.loose())
2587
2587
  .output(types_42.deviceExportCapability.methods.exposeDevice.output)
2588
2588
  .mutation(async ({ input, ctx }) => {
@@ -2591,7 +2591,7 @@ function createCapRouter_deviceExport(getProvider, createRemoteProxy) {
2591
2591
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2592
2592
  return p.exposeDevice(methodInput);
2593
2593
  }),
2594
- unexposeDevice: trpc_middleware_js_1.protectedProcedure
2594
+ unexposeDevice: trpc_middleware_js_1.adminProcedure
2595
2595
  .input(types_42.deviceExportCapability.methods.unexposeDevice.input.loose())
2596
2596
  .output(types_42.deviceExportCapability.methods.unexposeDevice.output)
2597
2597
  .mutation(async ({ input, ctx }) => {
@@ -2667,7 +2667,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2667
2667
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2668
2668
  return p.removeDevice(methodInput);
2669
2669
  }),
2670
- persistConfig: trpc_middleware_js_1.protectedProcedure
2670
+ persistConfig: trpc_middleware_js_1.adminProcedure
2671
2671
  .input(types_43.deviceManagerCapability.methods.persistConfig.input.loose())
2672
2672
  .output(types_43.deviceManagerCapability.methods.persistConfig.output)
2673
2673
  .mutation(async ({ input, ctx }) => {
@@ -2676,7 +2676,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2676
2676
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2677
2677
  return p.persistConfig(methodInput);
2678
2678
  }),
2679
- loadConfig: trpc_middleware_js_1.protectedProcedure
2679
+ loadConfig: trpc_middleware_js_1.adminProcedure
2680
2680
  .input(types_43.deviceManagerCapability.methods.loadConfig.input.loose())
2681
2681
  .output(types_43.deviceManagerCapability.methods.loadConfig.output)
2682
2682
  .query(async ({ input, ctx }) => {
@@ -2685,7 +2685,7 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
2685
2685
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
2686
2686
  return p.loadConfig(methodInput);
2687
2687
  }),
2688
- loadRuntimeState: trpc_middleware_js_1.protectedProcedure
2688
+ loadRuntimeState: trpc_middleware_js_1.adminProcedure
2689
2689
  .input(types_43.deviceManagerCapability.methods.loadRuntimeState.input.loose())
2690
2690
  .output(types_43.deviceManagerCapability.methods.loadRuntimeState.output)
2691
2691
  .query(async ({ input, ctx }) => {
@@ -3136,6 +3136,15 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
3136
3136
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3137
3137
  return p.getAllBindings(methodInput);
3138
3138
  }),
3139
+ listDeviceIdsByCaps: trpc_middleware_js_1.protectedProcedure
3140
+ .input(types_43.deviceManagerCapability.methods.listDeviceIdsByCaps.input.loose())
3141
+ .output(types_43.deviceManagerCapability.methods.listDeviceIdsByCaps.output)
3142
+ .query(async ({ input, ctx }) => {
3143
+ const { nodeId, ...methodInput } = input;
3144
+ const p = resolveProvider('device-manager', nodeId, () => getProvider(ctx), createRemoteProxy);
3145
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3146
+ return p.listDeviceIdsByCaps(methodInput);
3147
+ }),
3139
3148
  setWrapperActive: trpc_middleware_js_1.adminProcedure
3140
3149
  .input(types_43.deviceManagerCapability.methods.setWrapperActive.input.loose())
3141
3150
  .output(types_43.deviceManagerCapability.methods.setWrapperActive.output)
@@ -3437,7 +3446,7 @@ function createCapRouter_deviceOps(getProvider, createRemoteProxy) {
3437
3446
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3438
3447
  return p.getConfigEntries(methodInput);
3439
3448
  }),
3440
- setConfig: trpc_middleware_js_1.protectedProcedure
3449
+ setConfig: trpc_middleware_js_1.adminProcedure
3441
3450
  .input(types_44.deviceOpsCapability.methods.setConfig.input.loose())
3442
3451
  .output(types_44.deviceOpsCapability.methods.setConfig.output)
3443
3452
  .mutation(async ({ input, ctx }) => {
@@ -3455,7 +3464,7 @@ function createCapRouter_deviceOps(getProvider, createRemoteProxy) {
3455
3464
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3456
3465
  return p.runAction(methodInput);
3457
3466
  }),
3458
- removeDevice: trpc_middleware_js_1.protectedProcedure
3467
+ removeDevice: trpc_middleware_js_1.adminProcedure
3459
3468
  .input(types_44.deviceOpsCapability.methods.removeDevice.input.loose())
3460
3469
  .output(types_44.deviceOpsCapability.methods.removeDevice.output)
3461
3470
  .mutation(async ({ input, ctx }) => {
@@ -5233,7 +5242,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5233
5242
  const p = resolveProvider('mqtt-broker', input?.nodeId, () => getProvider(ctx, input?.addonId), createRemoteProxy);
5234
5243
  return p.listBrokers();
5235
5244
  }),
5236
- getBrokerConfig: trpc_middleware_js_1.protectedProcedure
5245
+ getBrokerConfig: trpc_middleware_js_1.adminProcedure
5237
5246
  .input(types_74.mqttBrokerCapability.methods.getBrokerConfig.input.loose())
5238
5247
  .output(types_74.mqttBrokerCapability.methods.getBrokerConfig.output)
5239
5248
  .query(async ({ input, ctx }) => {
@@ -5242,7 +5251,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5242
5251
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5243
5252
  return p.getBrokerConfig(methodInput);
5244
5253
  }),
5245
- addBroker: trpc_middleware_js_1.protectedProcedure
5254
+ addBroker: trpc_middleware_js_1.adminProcedure
5246
5255
  .input(types_74.mqttBrokerCapability.methods.addBroker.input.loose())
5247
5256
  .output(types_74.mqttBrokerCapability.methods.addBroker.output)
5248
5257
  .mutation(async ({ input, ctx }) => {
@@ -5251,7 +5260,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5251
5260
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5252
5261
  return p.addBroker(methodInput);
5253
5262
  }),
5254
- removeBroker: trpc_middleware_js_1.protectedProcedure
5263
+ removeBroker: trpc_middleware_js_1.adminProcedure
5255
5264
  .input(types_74.mqttBrokerCapability.methods.removeBroker.input.loose())
5256
5265
  .output(types_74.mqttBrokerCapability.methods.removeBroker.output)
5257
5266
  .mutation(async ({ input, ctx }) => {
@@ -5260,7 +5269,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5260
5269
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5261
5270
  return p.removeBroker(methodInput);
5262
5271
  }),
5263
- testConnection: trpc_middleware_js_1.protectedProcedure
5272
+ testConnection: trpc_middleware_js_1.adminProcedure
5264
5273
  .input(types_74.mqttBrokerCapability.methods.testConnection.input.loose())
5265
5274
  .output(types_74.mqttBrokerCapability.methods.testConnection.output)
5266
5275
  .mutation(async ({ input, ctx }) => {
@@ -5269,7 +5278,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5269
5278
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5270
5279
  return p.testConnection(methodInput);
5271
5280
  }),
5272
- startEmbeddedBroker: trpc_middleware_js_1.protectedProcedure
5281
+ startEmbeddedBroker: trpc_middleware_js_1.adminProcedure
5273
5282
  .input(types_74.mqttBrokerCapability.methods.startEmbeddedBroker.input.loose())
5274
5283
  .output(types_74.mqttBrokerCapability.methods.startEmbeddedBroker.output)
5275
5284
  .mutation(async ({ input, ctx }) => {
@@ -5278,7 +5287,7 @@ function createCapRouter_mqttBroker(getProvider, createRemoteProxy) {
5278
5287
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5279
5288
  return p.startEmbeddedBroker(methodInput);
5280
5289
  }),
5281
- stopEmbeddedBroker: trpc_middleware_js_1.protectedProcedure
5290
+ stopEmbeddedBroker: trpc_middleware_js_1.adminProcedure
5282
5291
  .input(types_74.mqttBrokerCapability.methods.stopEmbeddedBroker.input.loose())
5283
5292
  .output(types_74.mqttBrokerCapability.methods.stopEmbeddedBroker.output)
5284
5293
  .mutation(async ({ input, ctx }) => {
@@ -5632,7 +5641,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5632
5641
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5633
5642
  return p.listTargetKinds(methodInput);
5634
5643
  }),
5635
- listTargets: trpc_middleware_js_1.protectedProcedure
5644
+ listTargets: trpc_middleware_js_1.adminProcedure
5636
5645
  .input(types_80.notificationOutputCapability.methods.listTargets.input.loose())
5637
5646
  .output(types_80.notificationOutputCapability.methods.listTargets.output)
5638
5647
  .query(async ({ input, ctx }) => {
@@ -5641,7 +5650,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5641
5650
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5642
5651
  return p.listTargets(methodInput);
5643
5652
  }),
5644
- discoverTargets: trpc_middleware_js_1.protectedProcedure
5653
+ discoverTargets: trpc_middleware_js_1.adminProcedure
5645
5654
  .input(types_80.notificationOutputCapability.methods.discoverTargets.input.loose())
5646
5655
  .output(types_80.notificationOutputCapability.methods.discoverTargets.output)
5647
5656
  .query(async ({ input, ctx }) => {
@@ -5650,7 +5659,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5650
5659
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5651
5660
  return p.discoverTargets(methodInput);
5652
5661
  }),
5653
- send: trpc_middleware_js_1.protectedProcedure
5662
+ send: trpc_middleware_js_1.adminProcedure
5654
5663
  .input(types_80.notificationOutputCapability.methods.send.input.loose())
5655
5664
  .output(types_80.notificationOutputCapability.methods.send.output)
5656
5665
  .mutation(async ({ input, ctx }) => {
@@ -5659,7 +5668,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5659
5668
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5660
5669
  return p.send(methodInput);
5661
5670
  }),
5662
- testTarget: trpc_middleware_js_1.protectedProcedure
5671
+ testTarget: trpc_middleware_js_1.adminProcedure
5663
5672
  .input(types_80.notificationOutputCapability.methods.testTarget.input.loose())
5664
5673
  .output(types_80.notificationOutputCapability.methods.testTarget.output)
5665
5674
  .mutation(async ({ input, ctx }) => {
@@ -5668,7 +5677,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5668
5677
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5669
5678
  return p.testTarget(methodInput);
5670
5679
  }),
5671
- upsertTarget: trpc_middleware_js_1.protectedProcedure
5680
+ upsertTarget: trpc_middleware_js_1.adminProcedure
5672
5681
  .input(types_80.notificationOutputCapability.methods.upsertTarget.input.loose())
5673
5682
  .output(types_80.notificationOutputCapability.methods.upsertTarget.output)
5674
5683
  .mutation(async ({ input, ctx }) => {
@@ -5677,7 +5686,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5677
5686
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5678
5687
  return p.upsertTarget(methodInput);
5679
5688
  }),
5680
- deleteTarget: trpc_middleware_js_1.protectedProcedure
5689
+ deleteTarget: trpc_middleware_js_1.adminProcedure
5681
5690
  .input(types_80.notificationOutputCapability.methods.deleteTarget.input.loose())
5682
5691
  .output(types_80.notificationOutputCapability.methods.deleteTarget.output)
5683
5692
  .mutation(async ({ input, ctx }) => {
@@ -5686,7 +5695,7 @@ function createCapRouter_notificationOutput(getProvider, createRemoteProxy) {
5686
5695
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5687
5696
  return p.deleteTarget(methodInput);
5688
5697
  }),
5689
- setTargetEnabled: trpc_middleware_js_1.protectedProcedure
5698
+ setTargetEnabled: trpc_middleware_js_1.adminProcedure
5690
5699
  .input(types_80.notificationOutputCapability.methods.setTargetEnabled.input.loose())
5691
5700
  .output(types_80.notificationOutputCapability.methods.setTargetEnabled.output)
5692
5701
  .mutation(async ({ input, ctx }) => {
@@ -8745,7 +8754,7 @@ function createCapRouter_serverManagement(getProvider, createRemoteProxy) {
8745
8754
  }
8746
8755
  function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8747
8756
  return (0, trpc_middleware_js_1.trpcRouter)({
8748
- get: trpc_middleware_js_1.protectedProcedure
8757
+ get: trpc_middleware_js_1.adminProcedure
8749
8758
  .input(types_104.settingsStoreCapability.methods.get.input.loose())
8750
8759
  .output(types_104.settingsStoreCapability.methods.get.output)
8751
8760
  .query(async ({ input, ctx }) => {
@@ -8754,7 +8763,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8754
8763
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8755
8764
  return p.get(methodInput);
8756
8765
  }),
8757
- set: trpc_middleware_js_1.protectedProcedure
8766
+ set: trpc_middleware_js_1.adminProcedure
8758
8767
  .input(types_104.settingsStoreCapability.methods.set.input.loose())
8759
8768
  .output(types_104.settingsStoreCapability.methods.set.output)
8760
8769
  .mutation(async ({ input, ctx }) => {
@@ -8763,7 +8772,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8763
8772
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8764
8773
  return p.set(methodInput);
8765
8774
  }),
8766
- query: trpc_middleware_js_1.protectedProcedure
8775
+ query: trpc_middleware_js_1.adminProcedure
8767
8776
  .input(types_104.settingsStoreCapability.methods.query.input.loose())
8768
8777
  .output(types_104.settingsStoreCapability.methods.query.output)
8769
8778
  .query(async ({ input, ctx }) => {
@@ -8772,7 +8781,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8772
8781
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8773
8782
  return p.query(methodInput);
8774
8783
  }),
8775
- upsert: trpc_middleware_js_1.protectedProcedure
8784
+ upsert: trpc_middleware_js_1.adminProcedure
8776
8785
  .input(types_104.settingsStoreCapability.methods.upsert.input.loose())
8777
8786
  .output(types_104.settingsStoreCapability.methods.upsert.output)
8778
8787
  .mutation(async ({ input, ctx }) => {
@@ -8781,7 +8790,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8781
8790
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8782
8791
  return p.upsert(methodInput);
8783
8792
  }),
8784
- insert: trpc_middleware_js_1.protectedProcedure
8793
+ insert: trpc_middleware_js_1.adminProcedure
8785
8794
  .input(types_104.settingsStoreCapability.methods.insert.input.loose())
8786
8795
  .output(types_104.settingsStoreCapability.methods.insert.output)
8787
8796
  .mutation(async ({ input, ctx }) => {
@@ -8790,7 +8799,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8790
8799
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8791
8800
  return p.insert(methodInput);
8792
8801
  }),
8793
- insertMany: trpc_middleware_js_1.protectedProcedure
8802
+ insertMany: trpc_middleware_js_1.adminProcedure
8794
8803
  .input(types_104.settingsStoreCapability.methods.insertMany.input.loose())
8795
8804
  .output(types_104.settingsStoreCapability.methods.insertMany.output)
8796
8805
  .mutation(async ({ input, ctx }) => {
@@ -8799,7 +8808,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8799
8808
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8800
8809
  return p.insertMany(methodInput);
8801
8810
  }),
8802
- update: trpc_middleware_js_1.protectedProcedure
8811
+ update: trpc_middleware_js_1.adminProcedure
8803
8812
  .input(types_104.settingsStoreCapability.methods.update.input.loose())
8804
8813
  .output(types_104.settingsStoreCapability.methods.update.output)
8805
8814
  .mutation(async ({ input, ctx }) => {
@@ -8808,7 +8817,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8808
8817
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8809
8818
  return p.update(methodInput);
8810
8819
  }),
8811
- delete: trpc_middleware_js_1.protectedProcedure
8820
+ delete: trpc_middleware_js_1.adminProcedure
8812
8821
  .input(types_104.settingsStoreCapability.methods.delete.input.loose())
8813
8822
  .output(types_104.settingsStoreCapability.methods.delete.output)
8814
8823
  .mutation(async ({ input, ctx }) => {
@@ -8817,7 +8826,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8817
8826
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8818
8827
  return p.delete(methodInput);
8819
8828
  }),
8820
- deleteWhere: trpc_middleware_js_1.protectedProcedure
8829
+ deleteWhere: trpc_middleware_js_1.adminProcedure
8821
8830
  .input(types_104.settingsStoreCapability.methods.deleteWhere.input.loose())
8822
8831
  .output(types_104.settingsStoreCapability.methods.deleteWhere.output)
8823
8832
  .mutation(async ({ input, ctx }) => {
@@ -8826,7 +8835,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8826
8835
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8827
8836
  return p.deleteWhere(methodInput);
8828
8837
  }),
8829
- updateWhere: trpc_middleware_js_1.protectedProcedure
8838
+ updateWhere: trpc_middleware_js_1.adminProcedure
8830
8839
  .input(types_104.settingsStoreCapability.methods.updateWhere.input.loose())
8831
8840
  .output(types_104.settingsStoreCapability.methods.updateWhere.output)
8832
8841
  .mutation(async ({ input, ctx }) => {
@@ -8835,7 +8844,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8835
8844
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8836
8845
  return p.updateWhere(methodInput);
8837
8846
  }),
8838
- count: trpc_middleware_js_1.protectedProcedure
8847
+ count: trpc_middleware_js_1.adminProcedure
8839
8848
  .input(types_104.settingsStoreCapability.methods.count.input.loose())
8840
8849
  .output(types_104.settingsStoreCapability.methods.count.output)
8841
8850
  .query(async ({ input, ctx }) => {
@@ -8844,7 +8853,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8844
8853
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8845
8854
  return p.count(methodInput);
8846
8855
  }),
8847
- aggregate: trpc_middleware_js_1.protectedProcedure
8856
+ aggregate: trpc_middleware_js_1.adminProcedure
8848
8857
  .input(types_104.settingsStoreCapability.methods.aggregate.input.loose())
8849
8858
  .output(types_104.settingsStoreCapability.methods.aggregate.output)
8850
8859
  .query(async ({ input, ctx }) => {
@@ -8853,7 +8862,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8853
8862
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8854
8863
  return p.aggregate(methodInput);
8855
8864
  }),
8856
- histogram: trpc_middleware_js_1.protectedProcedure
8865
+ histogram: trpc_middleware_js_1.adminProcedure
8857
8866
  .input(types_104.settingsStoreCapability.methods.histogram.input.loose())
8858
8867
  .output(types_104.settingsStoreCapability.methods.histogram.output)
8859
8868
  .query(async ({ input, ctx }) => {
@@ -8862,7 +8871,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8862
8871
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8863
8872
  return p.histogram(methodInput);
8864
8873
  }),
8865
- isEmpty: trpc_middleware_js_1.protectedProcedure
8874
+ isEmpty: trpc_middleware_js_1.adminProcedure
8866
8875
  .input(types_104.settingsStoreCapability.methods.isEmpty.input.loose())
8867
8876
  .output(types_104.settingsStoreCapability.methods.isEmpty.output)
8868
8877
  .query(async ({ input, ctx }) => {
@@ -8871,7 +8880,7 @@ function createCapRouter_settingsStore(getProvider, createRemoteProxy) {
8871
8880
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
8872
8881
  return p.isEmpty(methodInput);
8873
8882
  }),
8874
- declareCollection: trpc_middleware_js_1.protectedProcedure
8883
+ declareCollection: trpc_middleware_js_1.adminProcedure
8875
8884
  .input(types_104.settingsStoreCapability.methods.declareCollection.input.loose())
8876
8885
  .output(types_104.settingsStoreCapability.methods.declareCollection.output)
8877
8886
  .mutation(async ({ input, ctx }) => {
@@ -9031,7 +9040,7 @@ function createCapRouter_ssoBridge(getProvider, createRemoteProxy) {
9031
9040
  }
9032
9041
  function createCapRouter_storage(getProvider, createRemoteProxy) {
9033
9042
  return (0, trpc_middleware_js_1.trpcRouter)({
9034
- resolve: trpc_middleware_js_1.protectedProcedure
9043
+ resolve: trpc_middleware_js_1.adminProcedure
9035
9044
  .input(types_108.storageCapability.methods.resolve.input.loose())
9036
9045
  .output(types_108.storageCapability.methods.resolve.output)
9037
9046
  .query(async ({ input, ctx }) => {
@@ -9040,7 +9049,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9040
9049
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9041
9050
  return p.resolve(methodInput);
9042
9051
  }),
9043
- write: trpc_middleware_js_1.protectedProcedure
9052
+ write: trpc_middleware_js_1.adminProcedure
9044
9053
  .input(types_108.storageCapability.methods.write.input.loose())
9045
9054
  .output(types_108.storageCapability.methods.write.output)
9046
9055
  .mutation(async ({ input, ctx }) => {
@@ -9049,7 +9058,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9049
9058
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9050
9059
  return p.write(methodInput);
9051
9060
  }),
9052
- read: trpc_middleware_js_1.protectedProcedure
9061
+ read: trpc_middleware_js_1.adminProcedure
9053
9062
  .input(types_108.storageCapability.methods.read.input.loose())
9054
9063
  .output(types_108.storageCapability.methods.read.output)
9055
9064
  .query(async ({ input, ctx }) => {
@@ -9058,7 +9067,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9058
9067
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9059
9068
  return p.read(methodInput);
9060
9069
  }),
9061
- exists: trpc_middleware_js_1.protectedProcedure
9070
+ exists: trpc_middleware_js_1.adminProcedure
9062
9071
  .input(types_108.storageCapability.methods.exists.input.loose())
9063
9072
  .output(types_108.storageCapability.methods.exists.output)
9064
9073
  .query(async ({ input, ctx }) => {
@@ -9067,7 +9076,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9067
9076
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9068
9077
  return p.exists(methodInput);
9069
9078
  }),
9070
- list: trpc_middleware_js_1.protectedProcedure
9079
+ list: trpc_middleware_js_1.adminProcedure
9071
9080
  .input(types_108.storageCapability.methods.list.input.loose())
9072
9081
  .output(types_108.storageCapability.methods.list.output)
9073
9082
  .query(async ({ input, ctx }) => {
@@ -9076,7 +9085,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9076
9085
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9077
9086
  return p.list(methodInput);
9078
9087
  }),
9079
- delete: trpc_middleware_js_1.protectedProcedure
9088
+ delete: trpc_middleware_js_1.adminProcedure
9080
9089
  .input(types_108.storageCapability.methods.delete.input.loose())
9081
9090
  .output(types_108.storageCapability.methods.delete.output)
9082
9091
  .mutation(async ({ input, ctx }) => {
@@ -9094,7 +9103,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9094
9103
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9095
9104
  return p.getAvailableSpace(methodInput);
9096
9105
  }),
9097
- beginUpload: trpc_middleware_js_1.protectedProcedure
9106
+ beginUpload: trpc_middleware_js_1.adminProcedure
9098
9107
  .input(types_108.storageCapability.methods.beginUpload.input.loose())
9099
9108
  .output(types_108.storageCapability.methods.beginUpload.output)
9100
9109
  .mutation(async ({ input, ctx }) => {
@@ -9103,7 +9112,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9103
9112
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9104
9113
  return p.beginUpload(methodInput);
9105
9114
  }),
9106
- writeChunk: trpc_middleware_js_1.protectedProcedure
9115
+ writeChunk: trpc_middleware_js_1.adminProcedure
9107
9116
  .input(types_108.storageCapability.methods.writeChunk.input.loose())
9108
9117
  .output(types_108.storageCapability.methods.writeChunk.output)
9109
9118
  .mutation(async ({ input, ctx }) => {
@@ -9112,7 +9121,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9112
9121
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9113
9122
  return p.writeChunk(methodInput);
9114
9123
  }),
9115
- finalizeUpload: trpc_middleware_js_1.protectedProcedure
9124
+ finalizeUpload: trpc_middleware_js_1.adminProcedure
9116
9125
  .input(types_108.storageCapability.methods.finalizeUpload.input.loose())
9117
9126
  .output(types_108.storageCapability.methods.finalizeUpload.output)
9118
9127
  .mutation(async ({ input, ctx }) => {
@@ -9121,7 +9130,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9121
9130
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9122
9131
  return p.finalizeUpload(methodInput);
9123
9132
  }),
9124
- abortUpload: trpc_middleware_js_1.protectedProcedure
9133
+ abortUpload: trpc_middleware_js_1.adminProcedure
9125
9134
  .input(types_108.storageCapability.methods.abortUpload.input.loose())
9126
9135
  .output(types_108.storageCapability.methods.abortUpload.output)
9127
9136
  .mutation(async ({ input, ctx }) => {
@@ -9130,7 +9139,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9130
9139
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9131
9140
  return p.abortUpload(methodInput);
9132
9141
  }),
9133
- beginDownload: trpc_middleware_js_1.protectedProcedure
9142
+ beginDownload: trpc_middleware_js_1.adminProcedure
9134
9143
  .input(types_108.storageCapability.methods.beginDownload.input.loose())
9135
9144
  .output(types_108.storageCapability.methods.beginDownload.output)
9136
9145
  .mutation(async ({ input, ctx }) => {
@@ -9139,7 +9148,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9139
9148
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9140
9149
  return p.beginDownload(methodInput);
9141
9150
  }),
9142
- readChunk: trpc_middleware_js_1.protectedProcedure
9151
+ readChunk: trpc_middleware_js_1.adminProcedure
9143
9152
  .input(types_108.storageCapability.methods.readChunk.input.loose())
9144
9153
  .output(types_108.storageCapability.methods.readChunk.output)
9145
9154
  .query(async ({ input, ctx }) => {
@@ -9148,7 +9157,7 @@ function createCapRouter_storage(getProvider, createRemoteProxy) {
9148
9157
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
9149
9158
  return p.readChunk(methodInput);
9150
9159
  }),
9151
- endDownload: trpc_middleware_js_1.protectedProcedure
9160
+ endDownload: trpc_middleware_js_1.adminProcedure
9152
9161
  .input(types_108.storageCapability.methods.endDownload.input.loose())
9153
9162
  .output(types_108.storageCapability.methods.endDownload.output)
9154
9163
  .mutation(async ({ input, ctx }) => {
package/dist/main.js CHANGED
@@ -60,6 +60,7 @@ const addon_upload_1 = require("./api/addon-upload");
60
60
  const auth_whoami_1 = require("./api/auth-whoami");
61
61
  const backup_download_js_1 = require("./api/backup-download.js");
62
62
  const health_routes_1 = require("./api/health/health.routes");
63
+ const auth_rate_limit_1 = require("./auth/auth-rate-limit");
63
64
  const adaptive_probe_routes_1 = require("./api/health/adaptive-probe.routes");
64
65
  const model_distributor_js_1 = require("./api/model-distributor.js");
65
66
  const oauth2_routes_js_1 = require("./api/oauth2/oauth2-routes.js");
@@ -583,7 +584,10 @@ async function bootstrap() {
583
584
  verifyToken: (token) => app.get(auth_service_1.AuthService).verifyToken(token),
584
585
  });
585
586
  console.log(`[bootstrap] Health routes registered (hub v${hubVersion})`);
586
- (0, adaptive_probe_routes_1.registerAdaptiveProbeRoute)(fastify);
587
+ (0, adaptive_probe_routes_1.registerAdaptiveProbeRoute)(fastify, {
588
+ verifyToken: (token) => app.get(auth_service_1.AuthService).verifyToken(token),
589
+ limiter: (0, auth_rate_limit_1.createRateLimiter)({ windowMs: 60_000, max: adaptive_probe_routes_1.ADAPTIVE_PROBE_PER_IP_PER_MINUTE }),
590
+ });
587
591
  }
588
592
  catch (err) {
589
593
  console.warn('[bootstrap] Failed to register health routes:', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.380",
3
+ "version": "1.2.382",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -35,18 +35,18 @@
35
35
  ]
36
36
  },
37
37
  "dependencies": {
38
- "@camstack/addon-admin-ui": "1.2.261",
39
- "@camstack/addon-agent-ui": "1.2.143",
38
+ "@camstack/addon-admin-ui": "1.2.264",
39
+ "@camstack/addon-agent-ui": "1.2.145",
40
40
  "@camstack/addon-auth": "1.2.123",
41
41
  "@camstack/addon-decoder-nodeav": "1.2.115",
42
- "@camstack/addon-notifiers": "1.2.119",
43
- "@camstack/addon-pipeline": "1.2.290",
44
- "@camstack/addon-pipeline-orchestrator": "1.2.247",
45
- "@camstack/addon-post-analysis": "1.2.276",
42
+ "@camstack/addon-notifiers": "1.2.120",
43
+ "@camstack/addon-pipeline": "1.2.292",
44
+ "@camstack/addon-pipeline-orchestrator": "1.2.249",
45
+ "@camstack/addon-post-analysis": "1.2.279",
46
46
  "@camstack/sdk": "1.2.118",
47
- "@camstack/system": "1.2.294",
48
- "@camstack/types": "1.2.250",
49
- "@camstack/ui-library": "1.2.201",
47
+ "@camstack/system": "1.2.297",
48
+ "@camstack/types": "1.2.253",
49
+ "@camstack/ui-library": "1.2.203",
50
50
  "@fastify/compress": "^9.0.0",
51
51
  "@fastify/cookie": "^11.0.2",
52
52
  "@fastify/cors": "^11.2.0",