@camstack/system 1.2.136 → 1.2.138
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/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-bindings-store.d.ts +10 -4
- package/dist/builtins/device-manager/device-manager.addon.js +189 -25
- package/dist/builtins/device-manager/device-manager.addon.mjs +189 -25
- package/dist/builtins/device-manager/device-row-store.d.ts +20 -1
- package/dist/builtins/device-manager/fleet-read-census.d.ts +47 -0
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-Bh25kEUH.mjs → dist-DMOTtKH8.mjs} +310 -63
- package/dist/{dist-D-R0SuP-.js → dist-mQ3BkrJd.js} +310 -63
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{retired-settings-keys-BZbOXqch.mjs → retired-settings-keys-CPRvyt-E.mjs} +1 -1
- package/dist/{retired-settings-keys-CqD6rSQx.js → retired-settings-keys-Dvkcu_zf.js} +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-mQ3BkrJd.js");
|
|
7
7
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
8
8
|
/**
|
|
9
9
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-DMOTtKH8.mjs";
|
|
2
2
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-mQ3BkrJd.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-DMOTtKH8.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|
|
@@ -2568,8 +2568,17 @@ var adminUiCapability = {
|
|
|
2568
2568
|
mode: "singleton",
|
|
2569
2569
|
internal: true,
|
|
2570
2570
|
methods: {
|
|
2571
|
-
|
|
2572
|
-
|
|
2571
|
+
/**
|
|
2572
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2573
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2574
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2575
|
+
* `getStaticDir` leaks a hub filesystem path. The only caller is
|
|
2576
|
+
* `main.ts`'s static-file bootstrap, via `capRegistry.getSingletonForNode`
|
|
2577
|
+
* — never tRPC — so `auth: 'admin'` costs it nothing. The actual admin-ui
|
|
2578
|
+
* SPA assets are served as plain static files, unaffected by this gate.
|
|
2579
|
+
*/
|
|
2580
|
+
getStaticDir: method(z.void(), StaticDirOutputSchema$1, { auth: "admin" }),
|
|
2581
|
+
getVersion: method(z.void(), VersionOutputSchema$1, { auth: "admin" })
|
|
2573
2582
|
}
|
|
2574
2583
|
};
|
|
2575
2584
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
@@ -2905,8 +2914,23 @@ var viewerUiCapability = {
|
|
|
2905
2914
|
mode: "singleton",
|
|
2906
2915
|
internal: true,
|
|
2907
2916
|
methods: {
|
|
2908
|
-
|
|
2909
|
-
|
|
2917
|
+
/**
|
|
2918
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2919
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2920
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2921
|
+
* `getStaticDir` leaks a hub filesystem path.
|
|
2922
|
+
*
|
|
2923
|
+
* ⚠ Checked before gating: the VIEWER app IS used by a non-admin user
|
|
2924
|
+
* (`roberta`), but it never calls `viewerUi.*` over tRPC. The static SPA
|
|
2925
|
+
* it loads is served by the plain `GET /viewer/*` Fastify route in
|
|
2926
|
+
* `main.ts`, which reads `staticDir`/`indexPath` from a module-level
|
|
2927
|
+
* cache populated ONCE at boot via `capRegistry.getSingletonForNode`
|
|
2928
|
+
* (in-process, not tRPC) — the cap's tRPC procedure is never on that
|
|
2929
|
+
* request path. `auth: 'admin'` here does not block a single viewer
|
|
2930
|
+
* user from loading the app.
|
|
2931
|
+
*/
|
|
2932
|
+
getStaticDir: method(z.void(), StaticDirOutputSchema, { auth: "admin" }),
|
|
2933
|
+
getVersion: method(z.void(), VersionOutputSchema, { auth: "admin" })
|
|
2910
2934
|
}
|
|
2911
2935
|
};
|
|
2912
2936
|
/**
|
|
@@ -5265,7 +5289,18 @@ var addonPagesSourceCapability = {
|
|
|
5265
5289
|
scope: "system",
|
|
5266
5290
|
mode: "collection",
|
|
5267
5291
|
internal: true,
|
|
5268
|
-
methods: {
|
|
5292
|
+
methods: {
|
|
5293
|
+
/**
|
|
5294
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
5295
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
5296
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
5297
|
+
* consumer, the `addon-pages-aggregator` builtin, reads it via
|
|
5298
|
+
* `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
|
|
5299
|
+
* only, never tRPC (per `ctx.capabilities` seeing only the local
|
|
5300
|
+
* process). The public, enriched listing admin-ui actually consumes is
|
|
5301
|
+
* the separate `addon-pages` cap, unaffected by this change.
|
|
5302
|
+
*/
|
|
5303
|
+
listPages: method(z.void(), z.array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
|
|
5269
5304
|
};
|
|
5270
5305
|
var AddonHttpRouteSchema = z.object({
|
|
5271
5306
|
method: z.enum([
|
|
@@ -5562,7 +5597,20 @@ var addonWidgetsSourceCapability = {
|
|
|
5562
5597
|
scope: "system",
|
|
5563
5598
|
mode: "collection",
|
|
5564
5599
|
internal: true,
|
|
5565
|
-
methods: {
|
|
5600
|
+
methods: {
|
|
5601
|
+
/**
|
|
5602
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
5603
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
5604
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
5605
|
+
* consumer, the `addon-widgets-aggregator` builtin, reads it via
|
|
5606
|
+
* `ctx.capabilities.getCollection('addon-widgets-source')` — LOCAL-PROCESS
|
|
5607
|
+
* only, never tRPC. The public, enriched listing admin-ui actually
|
|
5608
|
+
* consumes is the separate `addon-widgets` cap (`listWidgets` there is
|
|
5609
|
+
* gated separately, and a `preAuth: true` widget is surfaced through the
|
|
5610
|
+
* PUBLIC `auth.listLoginMethods` contribution channel instead) —
|
|
5611
|
+
* neither is affected by this change.
|
|
5612
|
+
*/
|
|
5613
|
+
listWidgets: method(z.void(), z.array(WidgetMetadataSchema).readonly(), { auth: "admin" }) }
|
|
5566
5614
|
};
|
|
5567
5615
|
/**
|
|
5568
5616
|
* `addon-widgets` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -7915,7 +7963,17 @@ var customModelRegistryCapability = {
|
|
|
7915
7963
|
scope: "system",
|
|
7916
7964
|
mode: "collection",
|
|
7917
7965
|
internal: true,
|
|
7918
|
-
methods: {
|
|
7966
|
+
methods: {
|
|
7967
|
+
/**
|
|
7968
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
7969
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
7970
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
7971
|
+
* consumer, the detection-pipeline's model resolution
|
|
7972
|
+
* (`addon-pipeline/src/detection-pipeline/provider.ts`), calls
|
|
7973
|
+
* `ctx.api.customModelRegistry.listModels.query()` — UDS/Moleculer,
|
|
7974
|
+
* never tRPC — so `auth: 'admin'` costs it nothing.
|
|
7975
|
+
*/
|
|
7976
|
+
listModels: method(z.void(), z.array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }) }
|
|
7919
7977
|
};
|
|
7920
7978
|
/**
|
|
7921
7979
|
* Query filter for settings-store collections.
|
|
@@ -8184,6 +8242,23 @@ var EngineInfoSchema = z.object({
|
|
|
8184
8242
|
* go through `settings-store`; they never see this cap, and an engine
|
|
8185
8243
|
* never sees a caller.
|
|
8186
8244
|
*
|
|
8245
|
+
* ⚠ **`internal: true` DOES NOT gate the mount, and until 2026-08-26 this
|
|
8246
|
+
* comment claimed otherwise.** `resolveCapMount` never reads the field, so this
|
|
8247
|
+
* cap was live on the AppRouter with every method at the default
|
|
8248
|
+
* `auth: 'protected'` — i.e. readable by ANY authenticated session, admin or
|
|
8249
|
+
* not. Verified against the live hub: `dataStoreProvider.query` returned raw
|
|
8250
|
+
* settings rows including a provider credential, bypassing the secret redaction
|
|
8251
|
+
* that `deviceManager.listAll` and friends go through.
|
|
8252
|
+
*
|
|
8253
|
+
* Every method is now `auth: 'admin'` EXPLICITLY, including the five reads —
|
|
8254
|
+
* they had no options object at all, which is exactly how they kept the
|
|
8255
|
+
* permissive default while the mutations looked deliberate. The explicit
|
|
8256
|
+
* annotation is the fix that works today; making `internal` mean something at
|
|
8257
|
+
* mount time is the systemic one, and it is not free: 22 caps declare it, only
|
|
8258
|
+
* 4 are `mount: 'skip'`, and forcing admin on all of them would change the auth
|
|
8259
|
+
* of surfaces the viewer and admin-ui call as non-admin users. That decision is
|
|
8260
|
+
* the operator's, not a side effect of this file.
|
|
8261
|
+
*
|
|
8187
8262
|
* Design notes:
|
|
8188
8263
|
* - **Stateless dispatch.** Every method carries its own
|
|
8189
8264
|
* `namespace` + `collection`, so an engine keeps no per-caller state
|
|
@@ -8205,20 +8280,23 @@ var dataStoreProviderCapability = {
|
|
|
8205
8280
|
internal: true,
|
|
8206
8281
|
methods: {
|
|
8207
8282
|
/** Self-description — how the orchestrator picks a registrant. */
|
|
8208
|
-
getEngineInfo: method(z.void(), EngineInfoSchema),
|
|
8283
|
+
getEngineInfo: method(z.void(), EngineInfoSchema, { auth: "admin" }),
|
|
8209
8284
|
/** Get a single value by key from a collection. */
|
|
8210
8285
|
get: method(z.object({
|
|
8211
8286
|
namespace: z.string().optional(),
|
|
8212
8287
|
collection: z.string(),
|
|
8213
8288
|
key: z.string()
|
|
8214
|
-
}), z.unknown()),
|
|
8289
|
+
}), z.unknown(), { auth: "admin" }),
|
|
8215
8290
|
/** Set a value by key in a collection (upsert). */
|
|
8216
8291
|
set: method(z.object({
|
|
8217
8292
|
namespace: z.string().optional(),
|
|
8218
8293
|
collection: z.string(),
|
|
8219
8294
|
key: z.string(),
|
|
8220
8295
|
value: z.unknown()
|
|
8221
|
-
}), z.void(), {
|
|
8296
|
+
}), z.void(), {
|
|
8297
|
+
kind: "mutation",
|
|
8298
|
+
auth: "admin"
|
|
8299
|
+
}),
|
|
8222
8300
|
/** Get all entries matching an optional filter. */
|
|
8223
8301
|
query: method(z.object({
|
|
8224
8302
|
namespace: z.string().optional(),
|
|
@@ -8227,52 +8305,80 @@ var dataStoreProviderCapability = {
|
|
|
8227
8305
|
/**
|
|
8228
8306
|
* SQL-level column projection — MUST mirror `settings-store.query`.
|
|
8229
8307
|
*
|
|
8230
|
-
*
|
|
8231
|
-
*
|
|
8232
|
-
*
|
|
8233
|
-
*
|
|
8234
|
-
*
|
|
8308
|
+
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
8309
|
+
* was wrong — corrected 2026-08-26 after the hop map
|
|
8310
|
+
* (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
|
|
8311
|
+
* There is **no Zod parse at all** between the door and the engine: the
|
|
8312
|
+
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
8313
|
+
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
8314
|
+
*
|
|
8315
|
+
* What actually lost `columns` was the THIRD declaration of this shape:
|
|
8316
|
+
* `SettingsQueryInput` in `interfaces/storage.ts`, a hand-written TS
|
|
8317
|
+
* interface the engine destructures from. The field existed on both
|
|
8318
|
+
* schemas and the engine still never read it, because nothing checks a
|
|
8319
|
+
* registered provider against `InferProvider<cap>` —
|
|
8320
|
+
* `ProviderRegistration.provider` is typed `object`.
|
|
8321
|
+
*
|
|
8322
|
+
* It is declared here anyway, and must stay in step with
|
|
8323
|
+
* `settings-store.query`: a caller reading only the cap definitions has
|
|
8324
|
+
* to be able to see that this call carries a projection.
|
|
8325
|
+
* `data-door-schema-parity.spec.ts` keeps the two aligned.
|
|
8235
8326
|
*/
|
|
8236
8327
|
columns: z.array(z.string()).readonly().optional()
|
|
8237
|
-
}), z.array(SettingsRecordSchema).readonly()),
|
|
8328
|
+
}), z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
|
|
8238
8329
|
/** Insert a new record. */
|
|
8239
8330
|
insert: method(z.object({
|
|
8240
8331
|
namespace: z.string().optional(),
|
|
8241
8332
|
collection: z.string(),
|
|
8242
8333
|
record: SettingsRecordSchema
|
|
8243
|
-
}), z.void(), {
|
|
8334
|
+
}), z.void(), {
|
|
8335
|
+
kind: "mutation",
|
|
8336
|
+
auth: "admin"
|
|
8337
|
+
}),
|
|
8244
8338
|
/** Update an existing record by ID. */
|
|
8245
8339
|
update: method(z.object({
|
|
8246
8340
|
namespace: z.string().optional(),
|
|
8247
8341
|
collection: z.string(),
|
|
8248
8342
|
id: z.string(),
|
|
8249
8343
|
data: z.record(z.string(), z.unknown())
|
|
8250
|
-
}), z.void(), {
|
|
8344
|
+
}), z.void(), {
|
|
8345
|
+
kind: "mutation",
|
|
8346
|
+
auth: "admin"
|
|
8347
|
+
}),
|
|
8251
8348
|
/** Delete a record by key/ID. */
|
|
8252
8349
|
delete: method(z.object({
|
|
8253
8350
|
namespace: z.string().optional(),
|
|
8254
8351
|
collection: z.string(),
|
|
8255
8352
|
key: z.string()
|
|
8256
|
-
}), z.void(), {
|
|
8353
|
+
}), z.void(), {
|
|
8354
|
+
kind: "mutation",
|
|
8355
|
+
auth: "admin"
|
|
8356
|
+
}),
|
|
8257
8357
|
/** Delete every record matching `filter`, in one statement. */
|
|
8258
8358
|
deleteWhere: method(z.object({
|
|
8259
8359
|
namespace: z.string().optional(),
|
|
8260
8360
|
collection: z.string(),
|
|
8261
8361
|
filter: MutationFilterSchema
|
|
8262
|
-
}), z.object({ deleted: z.number().int() }), {
|
|
8362
|
+
}), z.object({ deleted: z.number().int() }), {
|
|
8363
|
+
kind: "mutation",
|
|
8364
|
+
auth: "admin"
|
|
8365
|
+
}),
|
|
8263
8366
|
/** Apply `data` to every record matching `filter`, in one statement. */
|
|
8264
8367
|
updateWhere: method(z.object({
|
|
8265
8368
|
namespace: z.string().optional(),
|
|
8266
8369
|
collection: z.string(),
|
|
8267
8370
|
filter: MutationFilterSchema,
|
|
8268
8371
|
data: z.record(z.string(), z.unknown())
|
|
8269
|
-
}), z.object({ updated: z.number().int() }), {
|
|
8372
|
+
}), z.object({ updated: z.number().int() }), {
|
|
8373
|
+
kind: "mutation",
|
|
8374
|
+
auth: "admin"
|
|
8375
|
+
}),
|
|
8270
8376
|
/** Count entries in a collection, optionally filtered. */
|
|
8271
8377
|
count: method(z.object({
|
|
8272
8378
|
namespace: z.string().optional(),
|
|
8273
8379
|
collection: z.string(),
|
|
8274
8380
|
filter: QueryFilterSchema.optional()
|
|
8275
|
-
}), z.number()),
|
|
8381
|
+
}), z.number(), { auth: "admin" }),
|
|
8276
8382
|
/** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
|
|
8277
8383
|
histogram: method(z.object({
|
|
8278
8384
|
namespace: z.string().optional(),
|
|
@@ -8284,19 +8390,22 @@ var dataStoreProviderCapability = {
|
|
|
8284
8390
|
}), z.array(z.object({
|
|
8285
8391
|
bucket: z.number().int(),
|
|
8286
8392
|
count: z.number().int()
|
|
8287
|
-
})).readonly()),
|
|
8393
|
+
})).readonly(), { auth: "admin" }),
|
|
8288
8394
|
/** Check if a collection is empty. */
|
|
8289
8395
|
isEmpty: method(z.object({
|
|
8290
8396
|
namespace: z.string().optional(),
|
|
8291
8397
|
collection: z.string()
|
|
8292
|
-
}), z.boolean()),
|
|
8398
|
+
}), z.boolean(), { auth: "admin" }),
|
|
8293
8399
|
/** Declare a typed (SQL-backed) collection with columns + indexes. */
|
|
8294
8400
|
declareCollection: method(z.object({
|
|
8295
8401
|
namespace: z.string().optional(),
|
|
8296
8402
|
collection: z.string(),
|
|
8297
8403
|
columns: z.array(CollectionColumnSchema).readonly(),
|
|
8298
8404
|
indexes: z.array(CollectionIndexSchema).readonly().optional()
|
|
8299
|
-
}), z.void(), {
|
|
8405
|
+
}), z.void(), {
|
|
8406
|
+
kind: "mutation",
|
|
8407
|
+
auth: "admin"
|
|
8408
|
+
})
|
|
8300
8409
|
}
|
|
8301
8410
|
};
|
|
8302
8411
|
/**
|
|
@@ -10141,13 +10250,20 @@ var embeddingEncoderCapability = {
|
|
|
10141
10250
|
mode: "collection",
|
|
10142
10251
|
internal: true,
|
|
10143
10252
|
methods: {
|
|
10253
|
+
/**
|
|
10254
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
10255
|
+
* `data-store-provider`) — every method below was reachable on the
|
|
10256
|
+
* AppRouter by ANY authenticated session at the default
|
|
10257
|
+
* `auth: 'protected'`. Consumers reach the encoder via `ctx.api` from
|
|
10258
|
+
* `addon-post-analysis`, never tRPC.
|
|
10259
|
+
*/
|
|
10144
10260
|
encode: method(z.object({
|
|
10145
10261
|
crop: z.instanceof(Uint8Array),
|
|
10146
10262
|
width: z.number(),
|
|
10147
10263
|
height: z.number()
|
|
10148
|
-
}), EmbeddingResultSchema),
|
|
10149
|
-
encodeText: method(z.object({ text: z.string() }), EmbeddingResultSchema),
|
|
10150
|
-
getInfo: method(z.void(), EmbeddingInfoSchema)
|
|
10264
|
+
}), EmbeddingResultSchema, { auth: "admin" }),
|
|
10265
|
+
encodeText: method(z.object({ text: z.string() }), EmbeddingResultSchema, { auth: "admin" }),
|
|
10266
|
+
getInfo: method(z.void(), EmbeddingInfoSchema, { auth: "admin" })
|
|
10151
10267
|
}
|
|
10152
10268
|
};
|
|
10153
10269
|
/**
|
|
@@ -10458,12 +10574,28 @@ var llmRuntimeCapability = {
|
|
|
10458
10574
|
mode: "singleton",
|
|
10459
10575
|
internal: true,
|
|
10460
10576
|
methods: {
|
|
10577
|
+
/**
|
|
10578
|
+
* `complete`, `status`, `listLocalModels` and `getDiskUsage` had NO
|
|
10579
|
+
* `auth` override — `internal: true` did not gate the mount (see the
|
|
10580
|
+
* 2026-08-26 note on `data-store-provider`), so they were reachable on
|
|
10581
|
+
* the AppRouter by ANY authenticated session at the default
|
|
10582
|
+
* `auth: 'protected'`, inconsistent with the rest of this cap (already
|
|
10583
|
+
* `auth: 'admin'`) and with this file's own docblock: "the operator
|
|
10584
|
+
* reaches this only through the `llm` cap's methods." The sole caller,
|
|
10585
|
+
* `addon-ai`'s `runtime-client.ts`, reaches every method here via
|
|
10586
|
+
* `ctx.api` + `nodePin` — never tRPC — so `auth: 'admin'` costs it
|
|
10587
|
+
* nothing; the public `llm` cap (which end users and non-admin sessions
|
|
10588
|
+
* legitimately call for chat/generation) is untouched.
|
|
10589
|
+
*/
|
|
10461
10590
|
complete: method(LlmGenerateBaseInputSchema.extend({
|
|
10462
10591
|
images: z.array(LlmImageSchema).optional(),
|
|
10463
10592
|
runtime: ManagedRuntimeConfigSchema,
|
|
10464
10593
|
/** The managed profile's timeout, threaded by the hub provider. */
|
|
10465
10594
|
timeoutMs: z.number().int().positive().optional()
|
|
10466
|
-
}), LlmGenerateResultSchema, {
|
|
10595
|
+
}), LlmGenerateResultSchema, {
|
|
10596
|
+
kind: "mutation",
|
|
10597
|
+
auth: "admin"
|
|
10598
|
+
}),
|
|
10467
10599
|
ensureStarted: method(z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
10468
10600
|
kind: "mutation",
|
|
10469
10601
|
auth: "admin"
|
|
@@ -10472,7 +10604,7 @@ var llmRuntimeCapability = {
|
|
|
10472
10604
|
kind: "mutation",
|
|
10473
10605
|
auth: "admin"
|
|
10474
10606
|
}),
|
|
10475
|
-
status: method(z.object({}), LlmRuntimeStatusSchema),
|
|
10607
|
+
status: method(z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
|
|
10476
10608
|
installModel: method(z.object({ model: ManagedModelRefSchema }), z.void(), {
|
|
10477
10609
|
kind: "mutation",
|
|
10478
10610
|
auth: "admin"
|
|
@@ -10481,8 +10613,8 @@ var llmRuntimeCapability = {
|
|
|
10481
10613
|
kind: "mutation",
|
|
10482
10614
|
auth: "admin"
|
|
10483
10615
|
}),
|
|
10484
|
-
listLocalModels: method(z.object({}), z.array(LlmNodeModelSchema)),
|
|
10485
|
-
getDiskUsage: method(z.object({}), LlmRuntimeDiskUsageSchema)
|
|
10616
|
+
listLocalModels: method(z.object({}), z.array(LlmNodeModelSchema), { auth: "admin" }),
|
|
10617
|
+
getDiskUsage: method(z.object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" })
|
|
10486
10618
|
}
|
|
10487
10619
|
};
|
|
10488
10620
|
/**
|
|
@@ -14331,7 +14463,17 @@ var oauthIntegrationCapability = {
|
|
|
14331
14463
|
scope: "system",
|
|
14332
14464
|
mode: "collection",
|
|
14333
14465
|
internal: true,
|
|
14334
|
-
methods: {
|
|
14466
|
+
methods: {
|
|
14467
|
+
/**
|
|
14468
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
14469
|
+
* `data-store-provider`) — `getDescriptor` was reachable on the AppRouter
|
|
14470
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The
|
|
14471
|
+
* real caller is `/api/oauth2/authorize` and `/api/oauth2/integrations`
|
|
14472
|
+
* (`oauth2-routes.ts`), which resolve the provider directly off the
|
|
14473
|
+
* capability registry — never through tRPC. `auth: 'admin'` closes the
|
|
14474
|
+
* tRPC surface without touching that path.
|
|
14475
|
+
*/
|
|
14476
|
+
getDescriptor: method(z.void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
|
|
14335
14477
|
};
|
|
14336
14478
|
/**
|
|
14337
14479
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
@@ -19103,6 +19245,20 @@ var ssoBridgeCapability = {
|
|
|
19103
19245
|
mode: "singleton",
|
|
19104
19246
|
internal: true,
|
|
19105
19247
|
methods: {
|
|
19248
|
+
/**
|
|
19249
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19250
|
+
* `data-store-provider`) — `signBridgeToken` was reachable on the
|
|
19251
|
+
* AppRouter by ANY authenticated session at the default
|
|
19252
|
+
* `auth: 'protected'`. The claims (including `isAdmin`) are CALLER-
|
|
19253
|
+
* SUPPLIED: an unprivileged session could have minted its own
|
|
19254
|
+
* `isAdmin: true` bridge token and redeemed it at
|
|
19255
|
+
* `/api/auth/sso/finish` to become admin — a full privilege escalation
|
|
19256
|
+
* through the exact surface this cap exists to close (see the module
|
|
19257
|
+
* docblock). Every real caller (`oauth-grants.ts`, `main.ts`
|
|
19258
|
+
* registration, the OIDC/magic-link addons) reaches this through
|
|
19259
|
+
* `ctx.api` / the in-process registry — never through tRPC — so
|
|
19260
|
+
* `auth: 'admin'` costs those callers nothing.
|
|
19261
|
+
*/
|
|
19106
19262
|
signBridgeToken: method(z.object({
|
|
19107
19263
|
claims: SsoBridgeClaimsSchema,
|
|
19108
19264
|
/**
|
|
@@ -19115,8 +19271,8 @@ var ssoBridgeCapability = {
|
|
|
19115
19271
|
* linking rather than produce an eternal token.
|
|
19116
19272
|
*/
|
|
19117
19273
|
ttlSec: z.union([z.number().int().positive(), z.literal("never")]).optional()
|
|
19118
|
-
}), z.object({ token: z.string() })),
|
|
19119
|
-
verifyBridgeToken: method(z.object({ token: z.string() }), SsoBridgeClaimsSchema.nullable())
|
|
19274
|
+
}), z.object({ token: z.string() }), { auth: "admin" }),
|
|
19275
|
+
verifyBridgeToken: method(z.object({ token: z.string() }), SsoBridgeClaimsSchema.nullable(), { auth: "admin" })
|
|
19120
19276
|
}
|
|
19121
19277
|
};
|
|
19122
19278
|
var ProviderListEntrySchema = z.discriminatedUnion("shouldSaveDiskSpace", [z.object({
|
|
@@ -19265,8 +19421,15 @@ var storageEvictableCapability = {
|
|
|
19265
19421
|
mode: "collection",
|
|
19266
19422
|
internal: true,
|
|
19267
19423
|
methods: {
|
|
19424
|
+
/**
|
|
19425
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19426
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
19427
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
19428
|
+
* consumer is the orchestrator's `StoragePressureManager`, which calls
|
|
19429
|
+
* `ctx.api` — never tRPC — so `auth: 'admin'` costs it nothing.
|
|
19430
|
+
*/
|
|
19268
19431
|
/** Bytes this provider holds on the given location — drives proportional fan-out. */
|
|
19269
|
-
getEvictableUsage: method(z.object({ locationId: z.string() }), EvictableUsageSchema),
|
|
19432
|
+
getEvictableUsage: method(z.object({ locationId: z.string() }), EvictableUsageSchema, { auth: "admin" }),
|
|
19270
19433
|
/**
|
|
19271
19434
|
* Free approximately `targetBytes` of this provider's OWN least-valuable
|
|
19272
19435
|
* data on the location (oldest footage, expired clips, …). Returns what it
|
|
@@ -19275,7 +19438,10 @@ var storageEvictableCapability = {
|
|
|
19275
19438
|
evict: method(z.object({
|
|
19276
19439
|
locationId: z.string(),
|
|
19277
19440
|
targetBytes: z.number().int().positive()
|
|
19278
|
-
}), EvictResultSchema, {
|
|
19441
|
+
}), EvictResultSchema, {
|
|
19442
|
+
kind: "mutation",
|
|
19443
|
+
auth: "admin"
|
|
19444
|
+
})
|
|
19279
19445
|
}
|
|
19280
19446
|
};
|
|
19281
19447
|
/**
|
|
@@ -19378,43 +19544,82 @@ var storageProviderCapability = {
|
|
|
19378
19544
|
mode: "collection",
|
|
19379
19545
|
internal: true,
|
|
19380
19546
|
methods: {
|
|
19547
|
+
/**
|
|
19548
|
+
* Every method below except `testLocation` had NO `auth` override —
|
|
19549
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19550
|
+
* `data-store-provider`), so this was reachable on the AppRouter by ANY
|
|
19551
|
+
* authenticated session at the default `auth: 'protected'`: arbitrary
|
|
19552
|
+
* read/write/delete/list against any storage location the operator has
|
|
19553
|
+
* configured, keyed only by a caller-supplied `location` + `relativePath`
|
|
19554
|
+
* — the same "public consumers never see this cap" claim that was false
|
|
19555
|
+
* for `data-store-provider`, here gating raw file I/O instead of raw
|
|
19556
|
+
* settings rows. The only legitimate caller,
|
|
19557
|
+
* `addon-registry.service.ts`'s `activeStorageProvider`, calls the
|
|
19558
|
+
* provider object directly (in-process) — never tRPC — so `auth: 'admin'`
|
|
19559
|
+
* on every method costs it nothing. Public consumers already go through
|
|
19560
|
+
* the separate `storage` singleton cap.
|
|
19561
|
+
*/
|
|
19381
19562
|
/** Self-description for the "Add location" wizard. */
|
|
19382
|
-
getProviderInfo: method(z.void(), ProviderInfoSchema),
|
|
19563
|
+
getProviderInfo: method(z.void(), ProviderInfoSchema, { auth: "admin" }),
|
|
19383
19564
|
/** Validate config + probe connectivity. Called on add and on edit. */
|
|
19384
19565
|
testLocation: method(z.object({ config: z.record(z.string(), z.unknown()) }), TestLocationResultSchema, { auth: "admin" }),
|
|
19385
19566
|
resolve: method(z.object({
|
|
19386
19567
|
location: StorageLocationSchema,
|
|
19387
19568
|
relativePath: z.string()
|
|
19388
|
-
}), z.string()),
|
|
19569
|
+
}), z.string(), { auth: "admin" }),
|
|
19389
19570
|
write: method(z.object({
|
|
19390
19571
|
location: StorageLocationSchema,
|
|
19391
19572
|
relativePath: z.string(),
|
|
19392
19573
|
data: z.instanceof(Uint8Array)
|
|
19393
|
-
}), z.void(), {
|
|
19574
|
+
}), z.void(), {
|
|
19575
|
+
kind: "mutation",
|
|
19576
|
+
auth: "admin"
|
|
19577
|
+
}),
|
|
19394
19578
|
read: method(z.object({
|
|
19395
19579
|
location: StorageLocationSchema,
|
|
19396
19580
|
relativePath: z.string()
|
|
19397
|
-
}), z.instanceof(Uint8Array)),
|
|
19581
|
+
}), z.instanceof(Uint8Array), { auth: "admin" }),
|
|
19398
19582
|
exists: method(z.object({
|
|
19399
19583
|
location: StorageLocationSchema,
|
|
19400
19584
|
relativePath: z.string()
|
|
19401
|
-
}), z.boolean()),
|
|
19585
|
+
}), z.boolean(), { auth: "admin" }),
|
|
19402
19586
|
list: method(z.object({
|
|
19403
19587
|
location: StorageLocationSchema,
|
|
19404
19588
|
prefix: z.string().optional()
|
|
19405
|
-
}), z.array(z.string()).readonly()),
|
|
19589
|
+
}), z.array(z.string()).readonly(), { auth: "admin" }),
|
|
19406
19590
|
delete: method(z.object({
|
|
19407
19591
|
location: StorageLocationSchema,
|
|
19408
19592
|
relativePath: z.string()
|
|
19409
|
-
}), z.void(), {
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19593
|
+
}), z.void(), {
|
|
19594
|
+
kind: "mutation",
|
|
19595
|
+
auth: "admin"
|
|
19596
|
+
}),
|
|
19597
|
+
getAvailableSpace: method(z.object({ location: StorageLocationSchema }), z.number().nullable(), { auth: "admin" }),
|
|
19598
|
+
beginUpload: method(BeginUploadInputSchema, BeginUploadResultSchema, {
|
|
19599
|
+
kind: "mutation",
|
|
19600
|
+
auth: "admin"
|
|
19601
|
+
}),
|
|
19602
|
+
writeChunk: method(WriteChunkInputSchema, z.void(), {
|
|
19603
|
+
kind: "mutation",
|
|
19604
|
+
auth: "admin"
|
|
19605
|
+
}),
|
|
19606
|
+
finalizeUpload: method(FinalizeUploadInputSchema, z.void(), {
|
|
19607
|
+
kind: "mutation",
|
|
19608
|
+
auth: "admin"
|
|
19609
|
+
}),
|
|
19610
|
+
abortUpload: method(AbortUploadInputSchema, z.void(), {
|
|
19611
|
+
kind: "mutation",
|
|
19612
|
+
auth: "admin"
|
|
19613
|
+
}),
|
|
19614
|
+
beginDownload: method(BeginDownloadInputSchema, BeginDownloadResultSchema, {
|
|
19615
|
+
kind: "mutation",
|
|
19616
|
+
auth: "admin"
|
|
19617
|
+
}),
|
|
19618
|
+
readChunk: method(ReadChunkInputSchema, z.instanceof(Uint8Array), { auth: "admin" }),
|
|
19619
|
+
endDownload: method(EndDownloadInputSchema, z.void(), {
|
|
19620
|
+
kind: "mutation",
|
|
19621
|
+
auth: "admin"
|
|
19622
|
+
})
|
|
19418
19623
|
}
|
|
19419
19624
|
};
|
|
19420
19625
|
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
@@ -19747,9 +19952,28 @@ var userPasskeysCapability = {
|
|
|
19747
19952
|
auth: "admin",
|
|
19748
19953
|
access: "create"
|
|
19749
19954
|
}),
|
|
19955
|
+
/**
|
|
19956
|
+
* The four methods below had NO `auth` override — `internal: true` did
|
|
19957
|
+
* not gate the mount (see the 2026-08-26 note on `data-store-provider`),
|
|
19958
|
+
* so they were reachable on the AppRouter at the default
|
|
19959
|
+
* `auth: 'protected'` (any authenticated session), inconsistent with
|
|
19960
|
+
* every other method on this cap (all already `auth: 'admin'`).
|
|
19961
|
+
*
|
|
19962
|
+
* ⚠ Checked before gating: these are also the PRE-AUTH login-ceremony
|
|
19963
|
+
* methods, so admin-gating them here must not break login for an
|
|
19964
|
+
* unauthenticated principal. It doesn't — the real login path is the
|
|
19965
|
+
* PUBLIC `auth.beginAuthentication` / `auth.finishAuthentication` /
|
|
19966
|
+
* `auth.beginDiscoverableAuthentication` / `auth.finishDiscoverableAuthentication`
|
|
19967
|
+
* procedures in `server/backend/src/api/core/auth.router.ts`, which call
|
|
19968
|
+
* `provider.beginAuthentication(...)` etc. directly against the
|
|
19969
|
+
* capability-registry-resolved provider — never through this cap's own
|
|
19970
|
+
* tRPC route. `auth: 'admin'` here only closes a redundant, unused
|
|
19971
|
+
* second entry point onto the same ceremony.
|
|
19972
|
+
*/
|
|
19750
19973
|
beginAuthentication: method(z.object({ userId: z.string().optional() }), z.object({ optionsJSON: z.record(z.string(), z.unknown()) }), {
|
|
19751
19974
|
kind: "mutation",
|
|
19752
|
-
access: "view"
|
|
19975
|
+
access: "view",
|
|
19976
|
+
auth: "admin"
|
|
19753
19977
|
}),
|
|
19754
19978
|
finishAuthentication: method(z.object({
|
|
19755
19979
|
/** Required — the user the assertion belongs to (verified). */
|
|
@@ -19758,11 +19982,13 @@ var userPasskeysCapability = {
|
|
|
19758
19982
|
response: z.record(z.string(), z.unknown())
|
|
19759
19983
|
}), z.object({ verified: z.boolean() }), {
|
|
19760
19984
|
kind: "mutation",
|
|
19761
|
-
access: "view"
|
|
19985
|
+
access: "view",
|
|
19986
|
+
auth: "admin"
|
|
19762
19987
|
}),
|
|
19763
19988
|
beginDiscoverableAuthentication: method(z.object({}), z.object({ optionsJSON: z.record(z.string(), z.unknown()) }), {
|
|
19764
19989
|
kind: "mutation",
|
|
19765
|
-
access: "view"
|
|
19990
|
+
access: "view",
|
|
19991
|
+
auth: "admin"
|
|
19766
19992
|
}),
|
|
19767
19993
|
finishDiscoverableAuthentication: method(z.object({
|
|
19768
19994
|
/** AuthenticationResponseJSON from the browser. */
|
|
@@ -19771,7 +19997,8 @@ response: z.record(z.string(), z.unknown()) }), z.object({
|
|
|
19771
19997
|
userId: z.string().nullable()
|
|
19772
19998
|
}), {
|
|
19773
19999
|
kind: "mutation",
|
|
19774
|
-
access: "view"
|
|
20000
|
+
access: "view",
|
|
20001
|
+
auth: "admin"
|
|
19775
20002
|
}),
|
|
19776
20003
|
listPasskeys: method(z.object({ userId: z.string() }), z.array(PasskeySummarySchema), { auth: "admin" }),
|
|
19777
20004
|
removePasskey: method(z.object({
|
|
@@ -19949,6 +20176,14 @@ var VectorStatsResultSchema = z.object({
|
|
|
19949
20176
|
/** False when the backend ranks approximately. */
|
|
19950
20177
|
exact: z.boolean()
|
|
19951
20178
|
});
|
|
20179
|
+
/**
|
|
20180
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
20181
|
+
* `data-store-provider`) — every method below was reachable on the AppRouter
|
|
20182
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The only
|
|
20183
|
+
* consumers (`addon-post-analysis`'s embedding stores) reach this cap via
|
|
20184
|
+
* `ctx.api` — UDS/Moleculer, never tRPC — so `auth: 'admin'` on every method
|
|
20185
|
+
* costs them nothing. No client (viewer or admin-ui) calls `vectorStore.*`.
|
|
20186
|
+
*/
|
|
19952
20187
|
var vectorStoreCapability = {
|
|
19953
20188
|
name: "vector-store",
|
|
19954
20189
|
scope: "system",
|
|
@@ -19956,14 +20191,26 @@ var vectorStoreCapability = {
|
|
|
19956
20191
|
internal: true,
|
|
19957
20192
|
methods: {
|
|
19958
20193
|
/** Idempotent. Re-declaring with a different `dim` is an error, not a wipe. */
|
|
19959
|
-
declareIndex: method(VectorDeclareIndexInputSchema, z.void(), {
|
|
19960
|
-
|
|
19961
|
-
|
|
20194
|
+
declareIndex: method(VectorDeclareIndexInputSchema, z.void(), {
|
|
20195
|
+
kind: "mutation",
|
|
20196
|
+
auth: "admin"
|
|
20197
|
+
}),
|
|
20198
|
+
upsert: method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
20199
|
+
kind: "mutation",
|
|
20200
|
+
auth: "admin"
|
|
20201
|
+
}),
|
|
20202
|
+
query: method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }),
|
|
19962
20203
|
/** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
|
|
19963
|
-
getByIds: method(VectorGetInputSchema, VectorGetResultSchema),
|
|
19964
|
-
deleteByIds: method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
19965
|
-
|
|
19966
|
-
|
|
20204
|
+
getByIds: method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }),
|
|
20205
|
+
deleteByIds: method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
20206
|
+
kind: "mutation",
|
|
20207
|
+
auth: "admin"
|
|
20208
|
+
}),
|
|
20209
|
+
deleteByFilter: method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
20210
|
+
kind: "mutation",
|
|
20211
|
+
auth: "admin"
|
|
20212
|
+
}),
|
|
20213
|
+
stats: method(VectorStatsInputSchema, VectorStatsResultSchema, { auth: "admin" })
|
|
19967
20214
|
}
|
|
19968
20215
|
};
|
|
19969
20216
|
var ClipSchema = z.object({
|