@camstack/types 1.2.107 → 1.2.108
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/addon-pages-source.cap.d.ts +10 -0
- package/dist/capabilities/addon-widgets-source.cap.d.ts +12 -0
- package/dist/capabilities/admin-ui.cap.d.ts +9 -0
- package/dist/capabilities/custom-model-registry.cap.d.ts +9 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts +7 -0
- package/dist/capabilities/llm-runtime.cap.d.ts +13 -0
- package/dist/capabilities/oauth-integration.cap.d.ts +9 -0
- package/dist/capabilities/sso-bridge.cap.d.ts +14 -0
- package/dist/capabilities/storage-evictable.cap.d.ts +7 -0
- package/dist/capabilities/storage-provider.cap.d.ts +15 -0
- package/dist/capabilities/user-passkeys.cap.d.ts +18 -0
- package/dist/capabilities/vector-store.cap.d.ts +8 -0
- package/dist/capabilities/viewer-ui.cap.d.ts +15 -0
- package/dist/index.js +214 -42
- package/dist/index.mjs +214 -42
- package/dist/{sleep-BLxqGLY0.mjs → sleep-DCBRhx0s.mjs} +28 -4
- package/dist/{sleep-CUuoW-kk.js → sleep-OOwhyQIx.js} +28 -4
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-EY0GNjV9.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-OOwhyQIx.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
|
|
2
|
-
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-
|
|
2
|
+
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-DCBRhx0s.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
@@ -28,6 +28,16 @@ export declare const addonPagesSourceCapability: {
|
|
|
28
28
|
readonly mode: "collection";
|
|
29
29
|
readonly internal: true;
|
|
30
30
|
readonly methods: {
|
|
31
|
+
/**
|
|
32
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
33
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
34
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
35
|
+
* consumer, the `addon-pages-aggregator` builtin, reads it via
|
|
36
|
+
* `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
|
|
37
|
+
* only, never tRPC (per `ctx.capabilities` seeing only the local
|
|
38
|
+
* process). The public, enriched listing admin-ui actually consumes is
|
|
39
|
+
* the separate `addon-pages` cap, unaffected by this change.
|
|
40
|
+
*/
|
|
31
41
|
readonly listPages: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
32
42
|
id: z.ZodString;
|
|
33
43
|
label: z.ZodString;
|
|
@@ -122,6 +122,18 @@ export declare const addonWidgetsSourceCapability: {
|
|
|
122
122
|
readonly mode: "collection";
|
|
123
123
|
readonly internal: true;
|
|
124
124
|
readonly methods: {
|
|
125
|
+
/**
|
|
126
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
127
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
128
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
129
|
+
* consumer, the `addon-widgets-aggregator` builtin, reads it via
|
|
130
|
+
* `ctx.capabilities.getCollection('addon-widgets-source')` — LOCAL-PROCESS
|
|
131
|
+
* only, never tRPC. The public, enriched listing admin-ui actually
|
|
132
|
+
* consumes is the separate `addon-widgets` cap (`listWidgets` there is
|
|
133
|
+
* gated separately, and a `preAuth: true` widget is surfaced through the
|
|
134
|
+
* PUBLIC `auth.listLoginMethods` contribution channel instead) —
|
|
135
|
+
* neither is affected by this change.
|
|
136
|
+
*/
|
|
125
137
|
readonly listWidgets: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
126
138
|
tab: z.ZodString;
|
|
127
139
|
subTab: z.ZodOptional<z.ZodString>;
|
|
@@ -6,6 +6,15 @@ export declare const adminUiCapability: {
|
|
|
6
6
|
readonly mode: "singleton";
|
|
7
7
|
readonly internal: true;
|
|
8
8
|
readonly methods: {
|
|
9
|
+
/**
|
|
10
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
11
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
12
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
13
|
+
* `getStaticDir` leaks a hub filesystem path. The only caller is
|
|
14
|
+
* `main.ts`'s static-file bootstrap, via `capRegistry.getSingletonForNode`
|
|
15
|
+
* — never tRPC — so `auth: 'admin'` costs it nothing. The actual admin-ui
|
|
16
|
+
* SPA assets are served as plain static files, unaffected by this gate.
|
|
17
|
+
*/
|
|
9
18
|
readonly getStaticDir: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
10
19
|
staticDir: z.ZodString;
|
|
11
20
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
@@ -161,6 +161,15 @@ export declare const customModelRegistryCapability: {
|
|
|
161
161
|
readonly mode: "collection";
|
|
162
162
|
readonly internal: true;
|
|
163
163
|
readonly methods: {
|
|
164
|
+
/**
|
|
165
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
166
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
167
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
168
|
+
* consumer, the detection-pipeline's model resolution
|
|
169
|
+
* (`addon-pipeline/src/detection-pipeline/provider.ts`), calls
|
|
170
|
+
* `ctx.api.customModelRegistry.listModels.query()` — UDS/Moleculer,
|
|
171
|
+
* never tRPC — so `auth: 'admin'` costs it nothing.
|
|
172
|
+
*/
|
|
164
173
|
readonly listModels: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
165
174
|
stepId: z.ZodString;
|
|
166
175
|
entry: z.ZodObject<{
|
|
@@ -22,6 +22,13 @@ export declare const embeddingEncoderCapability: {
|
|
|
22
22
|
readonly mode: "collection";
|
|
23
23
|
readonly internal: true;
|
|
24
24
|
readonly methods: {
|
|
25
|
+
/**
|
|
26
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
27
|
+
* `data-store-provider`) — every method below was reachable on the
|
|
28
|
+
* AppRouter by ANY authenticated session at the default
|
|
29
|
+
* `auth: 'protected'`. Consumers reach the encoder via `ctx.api` from
|
|
30
|
+
* `addon-post-analysis`, never tRPC.
|
|
31
|
+
*/
|
|
25
32
|
readonly encode: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
26
33
|
crop: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
27
34
|
width: z.ZodNumber;
|
|
@@ -248,6 +248,19 @@ export declare const llmRuntimeCapability: {
|
|
|
248
248
|
readonly mode: "singleton";
|
|
249
249
|
readonly internal: true;
|
|
250
250
|
readonly methods: {
|
|
251
|
+
/**
|
|
252
|
+
* `complete`, `status`, `listLocalModels` and `getDiskUsage` had NO
|
|
253
|
+
* `auth` override — `internal: true` did not gate the mount (see the
|
|
254
|
+
* 2026-08-26 note on `data-store-provider`), so they were reachable on
|
|
255
|
+
* the AppRouter by ANY authenticated session at the default
|
|
256
|
+
* `auth: 'protected'`, inconsistent with the rest of this cap (already
|
|
257
|
+
* `auth: 'admin'`) and with this file's own docblock: "the operator
|
|
258
|
+
* reaches this only through the `llm` cap's methods." The sole caller,
|
|
259
|
+
* `addon-ai`'s `runtime-client.ts`, reaches every method here via
|
|
260
|
+
* `ctx.api` + `nodePin` — never tRPC — so `auth: 'admin'` costs it
|
|
261
|
+
* nothing; the public `llm` cap (which end users and non-admin sessions
|
|
262
|
+
* legitimately call for chat/generation) is untouched.
|
|
263
|
+
*/
|
|
251
264
|
readonly complete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
252
265
|
addonId: z.ZodOptional<z.ZodString>;
|
|
253
266
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -140,6 +140,15 @@ export declare const oauthIntegrationCapability: {
|
|
|
140
140
|
readonly mode: "collection";
|
|
141
141
|
readonly internal: true;
|
|
142
142
|
readonly methods: {
|
|
143
|
+
/**
|
|
144
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
145
|
+
* `data-store-provider`) — `getDescriptor` was reachable on the AppRouter
|
|
146
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The
|
|
147
|
+
* real caller is `/api/oauth2/authorize` and `/api/oauth2/integrations`
|
|
148
|
+
* (`oauth2-routes.ts`), which resolve the provider directly off the
|
|
149
|
+
* capability registry — never through tRPC. `auth: 'admin'` closes the
|
|
150
|
+
* tRPC surface without touching that path.
|
|
151
|
+
*/
|
|
143
152
|
readonly getDescriptor: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
144
153
|
integrationId: z.ZodString;
|
|
145
154
|
displayName: z.ZodString;
|
|
@@ -83,6 +83,20 @@ export declare const ssoBridgeCapability: {
|
|
|
83
83
|
readonly mode: "singleton";
|
|
84
84
|
readonly internal: true;
|
|
85
85
|
readonly methods: {
|
|
86
|
+
/**
|
|
87
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
88
|
+
* `data-store-provider`) — `signBridgeToken` was reachable on the
|
|
89
|
+
* AppRouter by ANY authenticated session at the default
|
|
90
|
+
* `auth: 'protected'`. The claims (including `isAdmin`) are CALLER-
|
|
91
|
+
* SUPPLIED: an unprivileged session could have minted its own
|
|
92
|
+
* `isAdmin: true` bridge token and redeemed it at
|
|
93
|
+
* `/api/auth/sso/finish` to become admin — a full privilege escalation
|
|
94
|
+
* through the exact surface this cap exists to close (see the module
|
|
95
|
+
* docblock). Every real caller (`oauth-grants.ts`, `main.ts`
|
|
96
|
+
* registration, the OIDC/magic-link addons) reaches this through
|
|
97
|
+
* `ctx.api` / the in-process registry — never through tRPC — so
|
|
98
|
+
* `auth: 'admin'` costs those callers nothing.
|
|
99
|
+
*/
|
|
86
100
|
readonly signBridgeToken: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
87
101
|
claims: z.ZodObject<{
|
|
88
102
|
userId: z.ZodString;
|
|
@@ -29,6 +29,13 @@ export declare const storageEvictableCapability: {
|
|
|
29
29
|
readonly mode: "collection";
|
|
30
30
|
readonly internal: true;
|
|
31
31
|
readonly methods: {
|
|
32
|
+
/**
|
|
33
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
34
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
35
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
36
|
+
* consumer is the orchestrator's `StoragePressureManager`, which calls
|
|
37
|
+
* `ctx.api` — never tRPC — so `auth: 'admin'` costs it nothing.
|
|
38
|
+
*/
|
|
32
39
|
/** Bytes this provider holds on the given location — drives proportional fan-out. */
|
|
33
40
|
readonly getEvictableUsage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
34
41
|
locationId: z.ZodString;
|
|
@@ -112,6 +112,21 @@ export declare const storageProviderCapability: {
|
|
|
112
112
|
readonly mode: "collection";
|
|
113
113
|
readonly internal: true;
|
|
114
114
|
readonly methods: {
|
|
115
|
+
/**
|
|
116
|
+
* Every method below except `testLocation` had NO `auth` override —
|
|
117
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
118
|
+
* `data-store-provider`), so this was reachable on the AppRouter by ANY
|
|
119
|
+
* authenticated session at the default `auth: 'protected'`: arbitrary
|
|
120
|
+
* read/write/delete/list against any storage location the operator has
|
|
121
|
+
* configured, keyed only by a caller-supplied `location` + `relativePath`
|
|
122
|
+
* — the same "public consumers never see this cap" claim that was false
|
|
123
|
+
* for `data-store-provider`, here gating raw file I/O instead of raw
|
|
124
|
+
* settings rows. The only legitimate caller,
|
|
125
|
+
* `addon-registry.service.ts`'s `activeStorageProvider`, calls the
|
|
126
|
+
* provider object directly (in-process) — never tRPC — so `auth: 'admin'`
|
|
127
|
+
* on every method costs it nothing. Public consumers already go through
|
|
128
|
+
* the separate `storage` singleton cap.
|
|
129
|
+
*/
|
|
115
130
|
/** Self-description for the "Add location" wizard. */
|
|
116
131
|
readonly getProviderInfo: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
132
|
providerId: z.ZodString;
|
|
@@ -81,6 +81,24 @@ export declare const userPasskeysCapability: {
|
|
|
81
81
|
success: z.ZodLiteral<true>;
|
|
82
82
|
credentialId: z.ZodString;
|
|
83
83
|
}, z.core.$strip>, "mutation">;
|
|
84
|
+
/**
|
|
85
|
+
* The four methods below had NO `auth` override — `internal: true` did
|
|
86
|
+
* not gate the mount (see the 2026-08-26 note on `data-store-provider`),
|
|
87
|
+
* so they were reachable on the AppRouter at the default
|
|
88
|
+
* `auth: 'protected'` (any authenticated session), inconsistent with
|
|
89
|
+
* every other method on this cap (all already `auth: 'admin'`).
|
|
90
|
+
*
|
|
91
|
+
* ⚠ Checked before gating: these are also the PRE-AUTH login-ceremony
|
|
92
|
+
* methods, so admin-gating them here must not break login for an
|
|
93
|
+
* unauthenticated principal. It doesn't — the real login path is the
|
|
94
|
+
* PUBLIC `auth.beginAuthentication` / `auth.finishAuthentication` /
|
|
95
|
+
* `auth.beginDiscoverableAuthentication` / `auth.finishDiscoverableAuthentication`
|
|
96
|
+
* procedures in `server/backend/src/api/core/auth.router.ts`, which call
|
|
97
|
+
* `provider.beginAuthentication(...)` etc. directly against the
|
|
98
|
+
* capability-registry-resolved provider — never through this cap's own
|
|
99
|
+
* tRPC route. `auth: 'admin'` here only closes a redundant, unused
|
|
100
|
+
* second entry point onto the same ceremony.
|
|
101
|
+
*/
|
|
84
102
|
readonly beginAuthentication: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
85
103
|
userId: z.ZodOptional<z.ZodString>;
|
|
86
104
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -164,6 +164,14 @@ export declare const VectorStatsResultSchema: z.ZodObject<{
|
|
|
164
164
|
bytes: z.ZodOptional<z.ZodNumber>;
|
|
165
165
|
exact: z.ZodBoolean;
|
|
166
166
|
}, z.core.$strip>;
|
|
167
|
+
/**
|
|
168
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
169
|
+
* `data-store-provider`) — every method below was reachable on the AppRouter
|
|
170
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The only
|
|
171
|
+
* consumers (`addon-post-analysis`'s embedding stores) reach this cap via
|
|
172
|
+
* `ctx.api` — UDS/Moleculer, never tRPC — so `auth: 'admin'` on every method
|
|
173
|
+
* costs them nothing. No client (viewer or admin-ui) calls `vectorStore.*`.
|
|
174
|
+
*/
|
|
167
175
|
export declare const vectorStoreCapability: {
|
|
168
176
|
readonly name: "vector-store";
|
|
169
177
|
readonly scope: "system";
|
|
@@ -13,6 +13,21 @@ export declare const viewerUiCapability: {
|
|
|
13
13
|
readonly mode: "singleton";
|
|
14
14
|
readonly internal: true;
|
|
15
15
|
readonly methods: {
|
|
16
|
+
/**
|
|
17
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
18
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
19
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
20
|
+
* `getStaticDir` leaks a hub filesystem path.
|
|
21
|
+
*
|
|
22
|
+
* ⚠ Checked before gating: the VIEWER app IS used by a non-admin user
|
|
23
|
+
* (`roberta`), but it never calls `viewerUi.*` over tRPC. The static SPA
|
|
24
|
+
* it loads is served by the plain `GET /viewer/*` Fastify route in
|
|
25
|
+
* `main.ts`, which reads `staticDir`/`indexPath` from a module-level
|
|
26
|
+
* cache populated ONCE at boot via `capRegistry.getSingletonForNode`
|
|
27
|
+
* (in-process, not tRPC) — the cap's tRPC procedure is never on that
|
|
28
|
+
* request path. `auth: 'admin'` here does not block a single viewer
|
|
29
|
+
* user from loading the app.
|
|
30
|
+
*/
|
|
16
31
|
readonly getStaticDir: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
17
32
|
staticDir: z.ZodString;
|
|
18
33
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-EY0GNjV9.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-OOwhyQIx.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -4349,7 +4349,18 @@ var addonPagesSourceCapability = {
|
|
|
4349
4349
|
scope: "system",
|
|
4350
4350
|
mode: "collection",
|
|
4351
4351
|
internal: true,
|
|
4352
|
-
methods: {
|
|
4352
|
+
methods: {
|
|
4353
|
+
/**
|
|
4354
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
4355
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
4356
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
4357
|
+
* consumer, the `addon-pages-aggregator` builtin, reads it via
|
|
4358
|
+
* `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
|
|
4359
|
+
* only, never tRPC (per `ctx.capabilities` seeing only the local
|
|
4360
|
+
* process). The public, enriched listing admin-ui actually consumes is
|
|
4361
|
+
* the separate `addon-pages` cap, unaffected by this change.
|
|
4362
|
+
*/
|
|
4363
|
+
listPages: require_sleep.method(zod.z.void(), zod.z.array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
|
|
4353
4364
|
};
|
|
4354
4365
|
//#endregion
|
|
4355
4366
|
//#region src/capabilities/addon-routes.cap.ts
|
|
@@ -4652,7 +4663,20 @@ var addonWidgetsSourceCapability = {
|
|
|
4652
4663
|
scope: "system",
|
|
4653
4664
|
mode: "collection",
|
|
4654
4665
|
internal: true,
|
|
4655
|
-
methods: {
|
|
4666
|
+
methods: {
|
|
4667
|
+
/**
|
|
4668
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
4669
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
4670
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
4671
|
+
* consumer, the `addon-widgets-aggregator` builtin, reads it via
|
|
4672
|
+
* `ctx.capabilities.getCollection('addon-widgets-source')` — LOCAL-PROCESS
|
|
4673
|
+
* only, never tRPC. The public, enriched listing admin-ui actually
|
|
4674
|
+
* consumes is the separate `addon-widgets` cap (`listWidgets` there is
|
|
4675
|
+
* gated separately, and a `preAuth: true` widget is surfaced through the
|
|
4676
|
+
* PUBLIC `auth.listLoginMethods` contribution channel instead) —
|
|
4677
|
+
* neither is affected by this change.
|
|
4678
|
+
*/
|
|
4679
|
+
listWidgets: require_sleep.method(zod.z.void(), zod.z.array(WidgetMetadataSchema).readonly(), { auth: "admin" }) }
|
|
4656
4680
|
};
|
|
4657
4681
|
//#endregion
|
|
4658
4682
|
//#region src/capabilities/addon-widgets.cap.ts
|
|
@@ -7101,7 +7125,17 @@ var customModelRegistryCapability = {
|
|
|
7101
7125
|
scope: "system",
|
|
7102
7126
|
mode: "collection",
|
|
7103
7127
|
internal: true,
|
|
7104
|
-
methods: {
|
|
7128
|
+
methods: {
|
|
7129
|
+
/**
|
|
7130
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
7131
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
7132
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
7133
|
+
* consumer, the detection-pipeline's model resolution
|
|
7134
|
+
* (`addon-pipeline/src/detection-pipeline/provider.ts`), calls
|
|
7135
|
+
* `ctx.api.customModelRegistry.listModels.query()` — UDS/Moleculer,
|
|
7136
|
+
* never tRPC — so `auth: 'admin'` costs it nothing.
|
|
7137
|
+
*/
|
|
7138
|
+
listModels: require_sleep.method(zod.z.void(), zod.z.array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }) }
|
|
7105
7139
|
};
|
|
7106
7140
|
//#endregion
|
|
7107
7141
|
//#region src/capabilities/settings-store.cap.ts
|
|
@@ -9522,13 +9556,20 @@ var embeddingEncoderCapability = {
|
|
|
9522
9556
|
mode: "collection",
|
|
9523
9557
|
internal: true,
|
|
9524
9558
|
methods: {
|
|
9559
|
+
/**
|
|
9560
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
9561
|
+
* `data-store-provider`) — every method below was reachable on the
|
|
9562
|
+
* AppRouter by ANY authenticated session at the default
|
|
9563
|
+
* `auth: 'protected'`. Consumers reach the encoder via `ctx.api` from
|
|
9564
|
+
* `addon-post-analysis`, never tRPC.
|
|
9565
|
+
*/
|
|
9525
9566
|
encode: require_sleep.method(zod.z.object({
|
|
9526
9567
|
crop: zod.z.instanceof(Uint8Array),
|
|
9527
9568
|
width: zod.z.number(),
|
|
9528
9569
|
height: zod.z.number()
|
|
9529
|
-
}), EmbeddingResultSchema),
|
|
9530
|
-
encodeText: require_sleep.method(zod.z.object({ text: zod.z.string() }), EmbeddingResultSchema),
|
|
9531
|
-
getInfo: require_sleep.method(zod.z.void(), EmbeddingInfoSchema)
|
|
9570
|
+
}), EmbeddingResultSchema, { auth: "admin" }),
|
|
9571
|
+
encodeText: require_sleep.method(zod.z.object({ text: zod.z.string() }), EmbeddingResultSchema, { auth: "admin" }),
|
|
9572
|
+
getInfo: require_sleep.method(zod.z.void(), EmbeddingInfoSchema, { auth: "admin" })
|
|
9532
9573
|
}
|
|
9533
9574
|
};
|
|
9534
9575
|
//#endregion
|
|
@@ -9869,7 +9910,23 @@ var llmRuntimeCapability = {
|
|
|
9869
9910
|
mode: "singleton",
|
|
9870
9911
|
internal: true,
|
|
9871
9912
|
methods: {
|
|
9872
|
-
|
|
9913
|
+
/**
|
|
9914
|
+
* `complete`, `status`, `listLocalModels` and `getDiskUsage` had NO
|
|
9915
|
+
* `auth` override — `internal: true` did not gate the mount (see the
|
|
9916
|
+
* 2026-08-26 note on `data-store-provider`), so they were reachable on
|
|
9917
|
+
* the AppRouter by ANY authenticated session at the default
|
|
9918
|
+
* `auth: 'protected'`, inconsistent with the rest of this cap (already
|
|
9919
|
+
* `auth: 'admin'`) and with this file's own docblock: "the operator
|
|
9920
|
+
* reaches this only through the `llm` cap's methods." The sole caller,
|
|
9921
|
+
* `addon-ai`'s `runtime-client.ts`, reaches every method here via
|
|
9922
|
+
* `ctx.api` + `nodePin` — never tRPC — so `auth: 'admin'` costs it
|
|
9923
|
+
* nothing; the public `llm` cap (which end users and non-admin sessions
|
|
9924
|
+
* legitimately call for chat/generation) is untouched.
|
|
9925
|
+
*/
|
|
9926
|
+
complete: require_sleep.method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
9927
|
+
kind: "mutation",
|
|
9928
|
+
auth: "admin"
|
|
9929
|
+
}),
|
|
9873
9930
|
ensureStarted: require_sleep.method(zod.z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
9874
9931
|
kind: "mutation",
|
|
9875
9932
|
auth: "admin"
|
|
@@ -9878,7 +9935,7 @@ var llmRuntimeCapability = {
|
|
|
9878
9935
|
kind: "mutation",
|
|
9879
9936
|
auth: "admin"
|
|
9880
9937
|
}),
|
|
9881
|
-
status: require_sleep.method(zod.z.object({}), LlmRuntimeStatusSchema),
|
|
9938
|
+
status: require_sleep.method(zod.z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
|
|
9882
9939
|
installModel: require_sleep.method(zod.z.object({ model: ManagedModelRefSchema }), zod.z.void(), {
|
|
9883
9940
|
kind: "mutation",
|
|
9884
9941
|
auth: "admin"
|
|
@@ -9887,8 +9944,8 @@ var llmRuntimeCapability = {
|
|
|
9887
9944
|
kind: "mutation",
|
|
9888
9945
|
auth: "admin"
|
|
9889
9946
|
}),
|
|
9890
|
-
listLocalModels: require_sleep.method(zod.z.object({}), zod.z.array(LlmNodeModelSchema)),
|
|
9891
|
-
getDiskUsage: require_sleep.method(zod.z.object({}), LlmRuntimeDiskUsageSchema)
|
|
9947
|
+
listLocalModels: require_sleep.method(zod.z.object({}), zod.z.array(LlmNodeModelSchema), { auth: "admin" }),
|
|
9948
|
+
getDiskUsage: require_sleep.method(zod.z.object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" })
|
|
9892
9949
|
}
|
|
9893
9950
|
};
|
|
9894
9951
|
//#endregion
|
|
@@ -14666,7 +14723,17 @@ var oauthIntegrationCapability = {
|
|
|
14666
14723
|
scope: "system",
|
|
14667
14724
|
mode: "collection",
|
|
14668
14725
|
internal: true,
|
|
14669
|
-
methods: {
|
|
14726
|
+
methods: {
|
|
14727
|
+
/**
|
|
14728
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
14729
|
+
* `data-store-provider`) — `getDescriptor` was reachable on the AppRouter
|
|
14730
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The
|
|
14731
|
+
* real caller is `/api/oauth2/authorize` and `/api/oauth2/integrations`
|
|
14732
|
+
* (`oauth2-routes.ts`), which resolve the provider directly off the
|
|
14733
|
+
* capability registry — never through tRPC. `auth: 'admin'` closes the
|
|
14734
|
+
* tRPC surface without touching that path.
|
|
14735
|
+
*/
|
|
14736
|
+
getDescriptor: require_sleep.method(zod.z.void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
|
|
14670
14737
|
};
|
|
14671
14738
|
//#endregion
|
|
14672
14739
|
//#region src/capabilities/pipeline-analytics.cap.ts
|
|
@@ -19679,6 +19746,20 @@ var ssoBridgeCapability = {
|
|
|
19679
19746
|
mode: "singleton",
|
|
19680
19747
|
internal: true,
|
|
19681
19748
|
methods: {
|
|
19749
|
+
/**
|
|
19750
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19751
|
+
* `data-store-provider`) — `signBridgeToken` was reachable on the
|
|
19752
|
+
* AppRouter by ANY authenticated session at the default
|
|
19753
|
+
* `auth: 'protected'`. The claims (including `isAdmin`) are CALLER-
|
|
19754
|
+
* SUPPLIED: an unprivileged session could have minted its own
|
|
19755
|
+
* `isAdmin: true` bridge token and redeemed it at
|
|
19756
|
+
* `/api/auth/sso/finish` to become admin — a full privilege escalation
|
|
19757
|
+
* through the exact surface this cap exists to close (see the module
|
|
19758
|
+
* docblock). Every real caller (`oauth-grants.ts`, `main.ts`
|
|
19759
|
+
* registration, the OIDC/magic-link addons) reaches this through
|
|
19760
|
+
* `ctx.api` / the in-process registry — never through tRPC — so
|
|
19761
|
+
* `auth: 'admin'` costs those callers nothing.
|
|
19762
|
+
*/
|
|
19682
19763
|
signBridgeToken: require_sleep.method(zod.z.object({
|
|
19683
19764
|
claims: SsoBridgeClaimsSchema,
|
|
19684
19765
|
/**
|
|
@@ -19691,8 +19772,8 @@ var ssoBridgeCapability = {
|
|
|
19691
19772
|
* linking rather than produce an eternal token.
|
|
19692
19773
|
*/
|
|
19693
19774
|
ttlSec: zod.z.union([zod.z.number().int().positive(), zod.z.literal("never")]).optional()
|
|
19694
|
-
}), zod.z.object({ token: zod.z.string() })),
|
|
19695
|
-
verifyBridgeToken: require_sleep.method(zod.z.object({ token: zod.z.string() }), SsoBridgeClaimsSchema.nullable())
|
|
19775
|
+
}), zod.z.object({ token: zod.z.string() }), { auth: "admin" }),
|
|
19776
|
+
verifyBridgeToken: require_sleep.method(zod.z.object({ token: zod.z.string() }), SsoBridgeClaimsSchema.nullable(), { auth: "admin" })
|
|
19696
19777
|
}
|
|
19697
19778
|
};
|
|
19698
19779
|
//#endregion
|
|
@@ -19845,8 +19926,15 @@ var storageEvictableCapability = {
|
|
|
19845
19926
|
mode: "collection",
|
|
19846
19927
|
internal: true,
|
|
19847
19928
|
methods: {
|
|
19929
|
+
/**
|
|
19930
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19931
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
19932
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
19933
|
+
* consumer is the orchestrator's `StoragePressureManager`, which calls
|
|
19934
|
+
* `ctx.api` — never tRPC — so `auth: 'admin'` costs it nothing.
|
|
19935
|
+
*/
|
|
19848
19936
|
/** Bytes this provider holds on the given location — drives proportional fan-out. */
|
|
19849
|
-
getEvictableUsage: require_sleep.method(zod.z.object({ locationId: zod.z.string() }), EvictableUsageSchema),
|
|
19937
|
+
getEvictableUsage: require_sleep.method(zod.z.object({ locationId: zod.z.string() }), EvictableUsageSchema, { auth: "admin" }),
|
|
19850
19938
|
/**
|
|
19851
19939
|
* Free approximately `targetBytes` of this provider's OWN least-valuable
|
|
19852
19940
|
* data on the location (oldest footage, expired clips, …). Returns what it
|
|
@@ -19855,7 +19943,10 @@ var storageEvictableCapability = {
|
|
|
19855
19943
|
evict: require_sleep.method(zod.z.object({
|
|
19856
19944
|
locationId: zod.z.string(),
|
|
19857
19945
|
targetBytes: zod.z.number().int().positive()
|
|
19858
|
-
}), EvictResultSchema, {
|
|
19946
|
+
}), EvictResultSchema, {
|
|
19947
|
+
kind: "mutation",
|
|
19948
|
+
auth: "admin"
|
|
19949
|
+
})
|
|
19859
19950
|
}
|
|
19860
19951
|
};
|
|
19861
19952
|
//#endregion
|
|
@@ -19962,43 +20053,82 @@ var storageProviderCapability = {
|
|
|
19962
20053
|
mode: "collection",
|
|
19963
20054
|
internal: true,
|
|
19964
20055
|
methods: {
|
|
20056
|
+
/**
|
|
20057
|
+
* Every method below except `testLocation` had NO `auth` override —
|
|
20058
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
20059
|
+
* `data-store-provider`), so this was reachable on the AppRouter by ANY
|
|
20060
|
+
* authenticated session at the default `auth: 'protected'`: arbitrary
|
|
20061
|
+
* read/write/delete/list against any storage location the operator has
|
|
20062
|
+
* configured, keyed only by a caller-supplied `location` + `relativePath`
|
|
20063
|
+
* — the same "public consumers never see this cap" claim that was false
|
|
20064
|
+
* for `data-store-provider`, here gating raw file I/O instead of raw
|
|
20065
|
+
* settings rows. The only legitimate caller,
|
|
20066
|
+
* `addon-registry.service.ts`'s `activeStorageProvider`, calls the
|
|
20067
|
+
* provider object directly (in-process) — never tRPC — so `auth: 'admin'`
|
|
20068
|
+
* on every method costs it nothing. Public consumers already go through
|
|
20069
|
+
* the separate `storage` singleton cap.
|
|
20070
|
+
*/
|
|
19965
20071
|
/** Self-description for the "Add location" wizard. */
|
|
19966
|
-
getProviderInfo: require_sleep.method(zod.z.void(), ProviderInfoSchema),
|
|
20072
|
+
getProviderInfo: require_sleep.method(zod.z.void(), ProviderInfoSchema, { auth: "admin" }),
|
|
19967
20073
|
/** Validate config + probe connectivity. Called on add and on edit. */
|
|
19968
20074
|
testLocation: require_sleep.method(zod.z.object({ config: zod.z.record(zod.z.string(), zod.z.unknown()) }), TestLocationResultSchema, { auth: "admin" }),
|
|
19969
20075
|
resolve: require_sleep.method(zod.z.object({
|
|
19970
20076
|
location: StorageLocationSchema,
|
|
19971
20077
|
relativePath: zod.z.string()
|
|
19972
|
-
}), zod.z.string()),
|
|
20078
|
+
}), zod.z.string(), { auth: "admin" }),
|
|
19973
20079
|
write: require_sleep.method(zod.z.object({
|
|
19974
20080
|
location: StorageLocationSchema,
|
|
19975
20081
|
relativePath: zod.z.string(),
|
|
19976
20082
|
data: zod.z.instanceof(Uint8Array)
|
|
19977
|
-
}), zod.z.void(), {
|
|
20083
|
+
}), zod.z.void(), {
|
|
20084
|
+
kind: "mutation",
|
|
20085
|
+
auth: "admin"
|
|
20086
|
+
}),
|
|
19978
20087
|
read: require_sleep.method(zod.z.object({
|
|
19979
20088
|
location: StorageLocationSchema,
|
|
19980
20089
|
relativePath: zod.z.string()
|
|
19981
|
-
}), zod.z.instanceof(Uint8Array)),
|
|
20090
|
+
}), zod.z.instanceof(Uint8Array), { auth: "admin" }),
|
|
19982
20091
|
exists: require_sleep.method(zod.z.object({
|
|
19983
20092
|
location: StorageLocationSchema,
|
|
19984
20093
|
relativePath: zod.z.string()
|
|
19985
|
-
}), zod.z.boolean()),
|
|
20094
|
+
}), zod.z.boolean(), { auth: "admin" }),
|
|
19986
20095
|
list: require_sleep.method(zod.z.object({
|
|
19987
20096
|
location: StorageLocationSchema,
|
|
19988
20097
|
prefix: zod.z.string().optional()
|
|
19989
|
-
}), zod.z.array(zod.z.string()).readonly()),
|
|
20098
|
+
}), zod.z.array(zod.z.string()).readonly(), { auth: "admin" }),
|
|
19990
20099
|
delete: require_sleep.method(zod.z.object({
|
|
19991
20100
|
location: StorageLocationSchema,
|
|
19992
20101
|
relativePath: zod.z.string()
|
|
19993
|
-
}), zod.z.void(), {
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
|
|
20001
|
-
|
|
20102
|
+
}), zod.z.void(), {
|
|
20103
|
+
kind: "mutation",
|
|
20104
|
+
auth: "admin"
|
|
20105
|
+
}),
|
|
20106
|
+
getAvailableSpace: require_sleep.method(zod.z.object({ location: StorageLocationSchema }), zod.z.number().nullable(), { auth: "admin" }),
|
|
20107
|
+
beginUpload: require_sleep.method(BeginUploadInputSchema, BeginUploadResultSchema, {
|
|
20108
|
+
kind: "mutation",
|
|
20109
|
+
auth: "admin"
|
|
20110
|
+
}),
|
|
20111
|
+
writeChunk: require_sleep.method(WriteChunkInputSchema, zod.z.void(), {
|
|
20112
|
+
kind: "mutation",
|
|
20113
|
+
auth: "admin"
|
|
20114
|
+
}),
|
|
20115
|
+
finalizeUpload: require_sleep.method(FinalizeUploadInputSchema, zod.z.void(), {
|
|
20116
|
+
kind: "mutation",
|
|
20117
|
+
auth: "admin"
|
|
20118
|
+
}),
|
|
20119
|
+
abortUpload: require_sleep.method(AbortUploadInputSchema, zod.z.void(), {
|
|
20120
|
+
kind: "mutation",
|
|
20121
|
+
auth: "admin"
|
|
20122
|
+
}),
|
|
20123
|
+
beginDownload: require_sleep.method(BeginDownloadInputSchema, BeginDownloadResultSchema, {
|
|
20124
|
+
kind: "mutation",
|
|
20125
|
+
auth: "admin"
|
|
20126
|
+
}),
|
|
20127
|
+
readChunk: require_sleep.method(ReadChunkInputSchema, zod.z.instanceof(Uint8Array), { auth: "admin" }),
|
|
20128
|
+
endDownload: require_sleep.method(EndDownloadInputSchema, zod.z.void(), {
|
|
20129
|
+
kind: "mutation",
|
|
20130
|
+
auth: "admin"
|
|
20131
|
+
})
|
|
20002
20132
|
}
|
|
20003
20133
|
};
|
|
20004
20134
|
//#endregion
|
|
@@ -20337,9 +20467,28 @@ var userPasskeysCapability = {
|
|
|
20337
20467
|
auth: "admin",
|
|
20338
20468
|
access: "create"
|
|
20339
20469
|
}),
|
|
20470
|
+
/**
|
|
20471
|
+
* The four methods below had NO `auth` override — `internal: true` did
|
|
20472
|
+
* not gate the mount (see the 2026-08-26 note on `data-store-provider`),
|
|
20473
|
+
* so they were reachable on the AppRouter at the default
|
|
20474
|
+
* `auth: 'protected'` (any authenticated session), inconsistent with
|
|
20475
|
+
* every other method on this cap (all already `auth: 'admin'`).
|
|
20476
|
+
*
|
|
20477
|
+
* ⚠ Checked before gating: these are also the PRE-AUTH login-ceremony
|
|
20478
|
+
* methods, so admin-gating them here must not break login for an
|
|
20479
|
+
* unauthenticated principal. It doesn't — the real login path is the
|
|
20480
|
+
* PUBLIC `auth.beginAuthentication` / `auth.finishAuthentication` /
|
|
20481
|
+
* `auth.beginDiscoverableAuthentication` / `auth.finishDiscoverableAuthentication`
|
|
20482
|
+
* procedures in `server/backend/src/api/core/auth.router.ts`, which call
|
|
20483
|
+
* `provider.beginAuthentication(...)` etc. directly against the
|
|
20484
|
+
* capability-registry-resolved provider — never through this cap's own
|
|
20485
|
+
* tRPC route. `auth: 'admin'` here only closes a redundant, unused
|
|
20486
|
+
* second entry point onto the same ceremony.
|
|
20487
|
+
*/
|
|
20340
20488
|
beginAuthentication: require_sleep.method(zod.z.object({ userId: zod.z.string().optional() }), zod.z.object({ optionsJSON: zod.z.record(zod.z.string(), zod.z.unknown()) }), {
|
|
20341
20489
|
kind: "mutation",
|
|
20342
|
-
access: "view"
|
|
20490
|
+
access: "view",
|
|
20491
|
+
auth: "admin"
|
|
20343
20492
|
}),
|
|
20344
20493
|
finishAuthentication: require_sleep.method(zod.z.object({
|
|
20345
20494
|
/** Required — the user the assertion belongs to (verified). */
|
|
@@ -20348,11 +20497,13 @@ var userPasskeysCapability = {
|
|
|
20348
20497
|
response: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
20349
20498
|
}), zod.z.object({ verified: zod.z.boolean() }), {
|
|
20350
20499
|
kind: "mutation",
|
|
20351
|
-
access: "view"
|
|
20500
|
+
access: "view",
|
|
20501
|
+
auth: "admin"
|
|
20352
20502
|
}),
|
|
20353
20503
|
beginDiscoverableAuthentication: require_sleep.method(zod.z.object({}), zod.z.object({ optionsJSON: zod.z.record(zod.z.string(), zod.z.unknown()) }), {
|
|
20354
20504
|
kind: "mutation",
|
|
20355
|
-
access: "view"
|
|
20505
|
+
access: "view",
|
|
20506
|
+
auth: "admin"
|
|
20356
20507
|
}),
|
|
20357
20508
|
finishDiscoverableAuthentication: require_sleep.method(zod.z.object({
|
|
20358
20509
|
/** AuthenticationResponseJSON from the browser. */
|
|
@@ -20361,7 +20512,8 @@ response: zod.z.record(zod.z.string(), zod.z.unknown()) }), zod.z.object({
|
|
|
20361
20512
|
userId: zod.z.string().nullable()
|
|
20362
20513
|
}), {
|
|
20363
20514
|
kind: "mutation",
|
|
20364
|
-
access: "view"
|
|
20515
|
+
access: "view",
|
|
20516
|
+
auth: "admin"
|
|
20365
20517
|
}),
|
|
20366
20518
|
listPasskeys: require_sleep.method(zod.z.object({ userId: zod.z.string() }), zod.z.array(PasskeySummarySchema), { auth: "admin" }),
|
|
20367
20519
|
removePasskey: require_sleep.method(zod.z.object({
|
|
@@ -20541,6 +20693,14 @@ var VectorStatsResultSchema = zod.z.object({
|
|
|
20541
20693
|
/** False when the backend ranks approximately. */
|
|
20542
20694
|
exact: zod.z.boolean()
|
|
20543
20695
|
});
|
|
20696
|
+
/**
|
|
20697
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
20698
|
+
* `data-store-provider`) — every method below was reachable on the AppRouter
|
|
20699
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The only
|
|
20700
|
+
* consumers (`addon-post-analysis`'s embedding stores) reach this cap via
|
|
20701
|
+
* `ctx.api` — UDS/Moleculer, never tRPC — so `auth: 'admin'` on every method
|
|
20702
|
+
* costs them nothing. No client (viewer or admin-ui) calls `vectorStore.*`.
|
|
20703
|
+
*/
|
|
20544
20704
|
var vectorStoreCapability = {
|
|
20545
20705
|
name: "vector-store",
|
|
20546
20706
|
scope: "system",
|
|
@@ -20548,14 +20708,26 @@ var vectorStoreCapability = {
|
|
|
20548
20708
|
internal: true,
|
|
20549
20709
|
methods: {
|
|
20550
20710
|
/** Idempotent. Re-declaring with a different `dim` is an error, not a wipe. */
|
|
20551
|
-
declareIndex: require_sleep.method(VectorDeclareIndexInputSchema, zod.z.void(), {
|
|
20552
|
-
|
|
20553
|
-
|
|
20711
|
+
declareIndex: require_sleep.method(VectorDeclareIndexInputSchema, zod.z.void(), {
|
|
20712
|
+
kind: "mutation",
|
|
20713
|
+
auth: "admin"
|
|
20714
|
+
}),
|
|
20715
|
+
upsert: require_sleep.method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
20716
|
+
kind: "mutation",
|
|
20717
|
+
auth: "admin"
|
|
20718
|
+
}),
|
|
20719
|
+
query: require_sleep.method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }),
|
|
20554
20720
|
/** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
|
|
20555
|
-
getByIds: require_sleep.method(VectorGetInputSchema, VectorGetResultSchema),
|
|
20556
|
-
deleteByIds: require_sleep.method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
20557
|
-
|
|
20558
|
-
|
|
20721
|
+
getByIds: require_sleep.method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }),
|
|
20722
|
+
deleteByIds: require_sleep.method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
20723
|
+
kind: "mutation",
|
|
20724
|
+
auth: "admin"
|
|
20725
|
+
}),
|
|
20726
|
+
deleteByFilter: require_sleep.method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
20727
|
+
kind: "mutation",
|
|
20728
|
+
auth: "admin"
|
|
20729
|
+
}),
|
|
20730
|
+
stats: require_sleep.method(VectorStatsInputSchema, VectorStatsResultSchema, { auth: "admin" })
|
|
20559
20731
|
}
|
|
20560
20732
|
};
|
|
20561
20733
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
|
|
2
|
-
import { $ as DecodedFrameSchema, A as event, B as ReadinessRegistry, C as DeviceFeature, Ct as isEvent, D as DEFAULT_RUNTIME_STATE_DURABILITY, Dt as collectHydratedFieldValues, E as adminUiCapability, Et as collectHydratedFieldEntries, F as systemMethod, G as BrokerStatsSchema, H as emitDownForOwnedCaps, I as CAP_NODE_PIN_CONTEXT_KEY, J as CamProfileSchema, K as BrokerStatusSchema, L as nodePin, M as isDeviceConfigCap, N as method, O as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Ot as hydrateSchema, P as resolveCapMount, Q as DecodedAudioChunkSchema, R as readNodePin, S as ChargingStatus, St as emitReadiness, T as DeviceType, Tt as WELL_KNOWN_TAB_MAP, U as readinessKey, V as ReadinessTimeoutError, W as scopeKey, X as CamStreamResolutionSchema, Y as CamStreamKindSchema, Z as CameraStreamSchema, _ as createMirrorSource, _t as DisposerChain, a as asJsonObject, at as ProfileSlotStatusSchema, b as deviceOpsCapability, bt as createDurableState, c as parseJsonArray, ct as SubscribeAudioChunksInputSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as SubscribeFramesResultSchema, et as EncodedPacketSchema, f as DEVICE_SCOPED_CAPS, ft as makeProfileBrokerId, g as createLazyTrpcSource, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, ht as selectAssignedProfileSlots, i as asJsonArray, it as ProfileSlotSchema, j as expandCapMethods, k as DEVICE_STATUS_METHOD, kt as resolveHydratedFieldValue, l as parseJsonObject, lt as SubscribeAudioChunksResultSchema, m as createDeviceProxy, mt as parseProfileBrokerId, n as sleepCancellable, nt as FrameHandleSchema, o as asNumber, ot as StreamSourceEntrySchema, p as isDeviceScopedCap, pt as makeSourceBrokerId, q as CAM_PROFILE_ORDER, r as asBoolean, rt as ProfileRtspEntrySchema, s as asString, st as StreamSourceSchema, t as sleep, tt as FrameHandleFormatSchema, u as parseJsonUnknown, ut as SubscribeFramesInputSchema, v as createSliceHandle, vt as BaseAddon, w as DeviceRole, wt as WELL_KNOWN_TABS, x as viewerUiCapability, xt as createEvent, y as RawStateResultSchema, yt as normalizeAddonInitResult, z as toNodeId } from "./sleep-
|
|
2
|
+
import { $ as DecodedFrameSchema, A as event, B as ReadinessRegistry, C as DeviceFeature, Ct as isEvent, D as DEFAULT_RUNTIME_STATE_DURABILITY, Dt as collectHydratedFieldValues, E as adminUiCapability, Et as collectHydratedFieldEntries, F as systemMethod, G as BrokerStatsSchema, H as emitDownForOwnedCaps, I as CAP_NODE_PIN_CONTEXT_KEY, J as CamProfileSchema, K as BrokerStatusSchema, L as nodePin, M as isDeviceConfigCap, N as method, O as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Ot as hydrateSchema, P as resolveCapMount, Q as DecodedAudioChunkSchema, R as readNodePin, S as ChargingStatus, St as emitReadiness, T as DeviceType, Tt as WELL_KNOWN_TAB_MAP, U as readinessKey, V as ReadinessTimeoutError, W as scopeKey, X as CamStreamResolutionSchema, Y as CamStreamKindSchema, Z as CameraStreamSchema, _ as createMirrorSource, _t as DisposerChain, a as asJsonObject, at as ProfileSlotStatusSchema, b as deviceOpsCapability, bt as createDurableState, c as parseJsonArray, ct as SubscribeAudioChunksInputSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as SubscribeFramesResultSchema, et as EncodedPacketSchema, f as DEVICE_SCOPED_CAPS, ft as makeProfileBrokerId, g as createLazyTrpcSource, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, ht as selectAssignedProfileSlots, i as asJsonArray, it as ProfileSlotSchema, j as expandCapMethods, k as DEVICE_STATUS_METHOD, kt as resolveHydratedFieldValue, l as parseJsonObject, lt as SubscribeAudioChunksResultSchema, m as createDeviceProxy, mt as parseProfileBrokerId, n as sleepCancellable, nt as FrameHandleSchema, o as asNumber, ot as StreamSourceEntrySchema, p as isDeviceScopedCap, pt as makeSourceBrokerId, q as CAM_PROFILE_ORDER, r as asBoolean, rt as ProfileRtspEntrySchema, s as asString, st as StreamSourceSchema, t as sleep, tt as FrameHandleFormatSchema, u as parseJsonUnknown, ut as SubscribeFramesInputSchema, v as createSliceHandle, vt as BaseAddon, w as DeviceRole, wt as WELL_KNOWN_TABS, x as viewerUiCapability, xt as createEvent, y as RawStateResultSchema, yt as normalizeAddonInitResult, z as toNodeId } from "./sleep-DCBRhx0s.mjs";
|
|
3
3
|
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-rO1sRmEK.mjs";
|
|
4
4
|
import { EventSourceType } from "./enums.mjs";
|
|
5
5
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
@@ -4348,7 +4348,18 @@ var addonPagesSourceCapability = {
|
|
|
4348
4348
|
scope: "system",
|
|
4349
4349
|
mode: "collection",
|
|
4350
4350
|
internal: true,
|
|
4351
|
-
methods: {
|
|
4351
|
+
methods: {
|
|
4352
|
+
/**
|
|
4353
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
4354
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
4355
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
4356
|
+
* consumer, the `addon-pages-aggregator` builtin, reads it via
|
|
4357
|
+
* `ctx.capabilities.getCollection('addon-pages-source')` — LOCAL-PROCESS
|
|
4358
|
+
* only, never tRPC (per `ctx.capabilities` seeing only the local
|
|
4359
|
+
* process). The public, enriched listing admin-ui actually consumes is
|
|
4360
|
+
* the separate `addon-pages` cap, unaffected by this change.
|
|
4361
|
+
*/
|
|
4362
|
+
listPages: method(z.void(), z.array(AddonPageDeclarationSchema).readonly(), { auth: "admin" }) }
|
|
4352
4363
|
};
|
|
4353
4364
|
//#endregion
|
|
4354
4365
|
//#region src/capabilities/addon-routes.cap.ts
|
|
@@ -4651,7 +4662,20 @@ var addonWidgetsSourceCapability = {
|
|
|
4651
4662
|
scope: "system",
|
|
4652
4663
|
mode: "collection",
|
|
4653
4664
|
internal: true,
|
|
4654
|
-
methods: {
|
|
4665
|
+
methods: {
|
|
4666
|
+
/**
|
|
4667
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
4668
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
4669
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
4670
|
+
* consumer, the `addon-widgets-aggregator` builtin, reads it via
|
|
4671
|
+
* `ctx.capabilities.getCollection('addon-widgets-source')` — LOCAL-PROCESS
|
|
4672
|
+
* only, never tRPC. The public, enriched listing admin-ui actually
|
|
4673
|
+
* consumes is the separate `addon-widgets` cap (`listWidgets` there is
|
|
4674
|
+
* gated separately, and a `preAuth: true` widget is surfaced through the
|
|
4675
|
+
* PUBLIC `auth.listLoginMethods` contribution channel instead) —
|
|
4676
|
+
* neither is affected by this change.
|
|
4677
|
+
*/
|
|
4678
|
+
listWidgets: method(z.void(), z.array(WidgetMetadataSchema).readonly(), { auth: "admin" }) }
|
|
4655
4679
|
};
|
|
4656
4680
|
//#endregion
|
|
4657
4681
|
//#region src/capabilities/addon-widgets.cap.ts
|
|
@@ -7100,7 +7124,17 @@ var customModelRegistryCapability = {
|
|
|
7100
7124
|
scope: "system",
|
|
7101
7125
|
mode: "collection",
|
|
7102
7126
|
internal: true,
|
|
7103
|
-
methods: {
|
|
7127
|
+
methods: {
|
|
7128
|
+
/**
|
|
7129
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
7130
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
7131
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
7132
|
+
* consumer, the detection-pipeline's model resolution
|
|
7133
|
+
* (`addon-pipeline/src/detection-pipeline/provider.ts`), calls
|
|
7134
|
+
* `ctx.api.customModelRegistry.listModels.query()` — UDS/Moleculer,
|
|
7135
|
+
* never tRPC — so `auth: 'admin'` costs it nothing.
|
|
7136
|
+
*/
|
|
7137
|
+
listModels: method(z.void(), z.array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }) }
|
|
7104
7138
|
};
|
|
7105
7139
|
//#endregion
|
|
7106
7140
|
//#region src/capabilities/settings-store.cap.ts
|
|
@@ -9521,13 +9555,20 @@ var embeddingEncoderCapability = {
|
|
|
9521
9555
|
mode: "collection",
|
|
9522
9556
|
internal: true,
|
|
9523
9557
|
methods: {
|
|
9558
|
+
/**
|
|
9559
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
9560
|
+
* `data-store-provider`) — every method below was reachable on the
|
|
9561
|
+
* AppRouter by ANY authenticated session at the default
|
|
9562
|
+
* `auth: 'protected'`. Consumers reach the encoder via `ctx.api` from
|
|
9563
|
+
* `addon-post-analysis`, never tRPC.
|
|
9564
|
+
*/
|
|
9524
9565
|
encode: method(z.object({
|
|
9525
9566
|
crop: z.instanceof(Uint8Array),
|
|
9526
9567
|
width: z.number(),
|
|
9527
9568
|
height: z.number()
|
|
9528
|
-
}), EmbeddingResultSchema),
|
|
9529
|
-
encodeText: method(z.object({ text: z.string() }), EmbeddingResultSchema),
|
|
9530
|
-
getInfo: method(z.void(), EmbeddingInfoSchema)
|
|
9569
|
+
}), EmbeddingResultSchema, { auth: "admin" }),
|
|
9570
|
+
encodeText: method(z.object({ text: z.string() }), EmbeddingResultSchema, { auth: "admin" }),
|
|
9571
|
+
getInfo: method(z.void(), EmbeddingInfoSchema, { auth: "admin" })
|
|
9531
9572
|
}
|
|
9532
9573
|
};
|
|
9533
9574
|
//#endregion
|
|
@@ -9868,7 +9909,23 @@ var llmRuntimeCapability = {
|
|
|
9868
9909
|
mode: "singleton",
|
|
9869
9910
|
internal: true,
|
|
9870
9911
|
methods: {
|
|
9871
|
-
|
|
9912
|
+
/**
|
|
9913
|
+
* `complete`, `status`, `listLocalModels` and `getDiskUsage` had NO
|
|
9914
|
+
* `auth` override — `internal: true` did not gate the mount (see the
|
|
9915
|
+
* 2026-08-26 note on `data-store-provider`), so they were reachable on
|
|
9916
|
+
* the AppRouter by ANY authenticated session at the default
|
|
9917
|
+
* `auth: 'protected'`, inconsistent with the rest of this cap (already
|
|
9918
|
+
* `auth: 'admin'`) and with this file's own docblock: "the operator
|
|
9919
|
+
* reaches this only through the `llm` cap's methods." The sole caller,
|
|
9920
|
+
* `addon-ai`'s `runtime-client.ts`, reaches every method here via
|
|
9921
|
+
* `ctx.api` + `nodePin` — never tRPC — so `auth: 'admin'` costs it
|
|
9922
|
+
* nothing; the public `llm` cap (which end users and non-admin sessions
|
|
9923
|
+
* legitimately call for chat/generation) is untouched.
|
|
9924
|
+
*/
|
|
9925
|
+
complete: method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
9926
|
+
kind: "mutation",
|
|
9927
|
+
auth: "admin"
|
|
9928
|
+
}),
|
|
9872
9929
|
ensureStarted: method(z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
9873
9930
|
kind: "mutation",
|
|
9874
9931
|
auth: "admin"
|
|
@@ -9877,7 +9934,7 @@ var llmRuntimeCapability = {
|
|
|
9877
9934
|
kind: "mutation",
|
|
9878
9935
|
auth: "admin"
|
|
9879
9936
|
}),
|
|
9880
|
-
status: method(z.object({}), LlmRuntimeStatusSchema),
|
|
9937
|
+
status: method(z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
|
|
9881
9938
|
installModel: method(z.object({ model: ManagedModelRefSchema }), z.void(), {
|
|
9882
9939
|
kind: "mutation",
|
|
9883
9940
|
auth: "admin"
|
|
@@ -9886,8 +9943,8 @@ var llmRuntimeCapability = {
|
|
|
9886
9943
|
kind: "mutation",
|
|
9887
9944
|
auth: "admin"
|
|
9888
9945
|
}),
|
|
9889
|
-
listLocalModels: method(z.object({}), z.array(LlmNodeModelSchema)),
|
|
9890
|
-
getDiskUsage: method(z.object({}), LlmRuntimeDiskUsageSchema)
|
|
9946
|
+
listLocalModels: method(z.object({}), z.array(LlmNodeModelSchema), { auth: "admin" }),
|
|
9947
|
+
getDiskUsage: method(z.object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" })
|
|
9891
9948
|
}
|
|
9892
9949
|
};
|
|
9893
9950
|
//#endregion
|
|
@@ -14665,7 +14722,17 @@ var oauthIntegrationCapability = {
|
|
|
14665
14722
|
scope: "system",
|
|
14666
14723
|
mode: "collection",
|
|
14667
14724
|
internal: true,
|
|
14668
|
-
methods: {
|
|
14725
|
+
methods: {
|
|
14726
|
+
/**
|
|
14727
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
14728
|
+
* `data-store-provider`) — `getDescriptor` was reachable on the AppRouter
|
|
14729
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The
|
|
14730
|
+
* real caller is `/api/oauth2/authorize` and `/api/oauth2/integrations`
|
|
14731
|
+
* (`oauth2-routes.ts`), which resolve the provider directly off the
|
|
14732
|
+
* capability registry — never through tRPC. `auth: 'admin'` closes the
|
|
14733
|
+
* tRPC surface without touching that path.
|
|
14734
|
+
*/
|
|
14735
|
+
getDescriptor: method(z.void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
|
|
14669
14736
|
};
|
|
14670
14737
|
//#endregion
|
|
14671
14738
|
//#region src/capabilities/pipeline-analytics.cap.ts
|
|
@@ -19678,6 +19745,20 @@ var ssoBridgeCapability = {
|
|
|
19678
19745
|
mode: "singleton",
|
|
19679
19746
|
internal: true,
|
|
19680
19747
|
methods: {
|
|
19748
|
+
/**
|
|
19749
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19750
|
+
* `data-store-provider`) — `signBridgeToken` was reachable on the
|
|
19751
|
+
* AppRouter by ANY authenticated session at the default
|
|
19752
|
+
* `auth: 'protected'`. The claims (including `isAdmin`) are CALLER-
|
|
19753
|
+
* SUPPLIED: an unprivileged session could have minted its own
|
|
19754
|
+
* `isAdmin: true` bridge token and redeemed it at
|
|
19755
|
+
* `/api/auth/sso/finish` to become admin — a full privilege escalation
|
|
19756
|
+
* through the exact surface this cap exists to close (see the module
|
|
19757
|
+
* docblock). Every real caller (`oauth-grants.ts`, `main.ts`
|
|
19758
|
+
* registration, the OIDC/magic-link addons) reaches this through
|
|
19759
|
+
* `ctx.api` / the in-process registry — never through tRPC — so
|
|
19760
|
+
* `auth: 'admin'` costs those callers nothing.
|
|
19761
|
+
*/
|
|
19681
19762
|
signBridgeToken: method(z.object({
|
|
19682
19763
|
claims: SsoBridgeClaimsSchema,
|
|
19683
19764
|
/**
|
|
@@ -19690,8 +19771,8 @@ var ssoBridgeCapability = {
|
|
|
19690
19771
|
* linking rather than produce an eternal token.
|
|
19691
19772
|
*/
|
|
19692
19773
|
ttlSec: z.union([z.number().int().positive(), z.literal("never")]).optional()
|
|
19693
|
-
}), z.object({ token: z.string() })),
|
|
19694
|
-
verifyBridgeToken: method(z.object({ token: z.string() }), SsoBridgeClaimsSchema.nullable())
|
|
19774
|
+
}), z.object({ token: z.string() }), { auth: "admin" }),
|
|
19775
|
+
verifyBridgeToken: method(z.object({ token: z.string() }), SsoBridgeClaimsSchema.nullable(), { auth: "admin" })
|
|
19695
19776
|
}
|
|
19696
19777
|
};
|
|
19697
19778
|
//#endregion
|
|
@@ -19844,8 +19925,15 @@ var storageEvictableCapability = {
|
|
|
19844
19925
|
mode: "collection",
|
|
19845
19926
|
internal: true,
|
|
19846
19927
|
methods: {
|
|
19928
|
+
/**
|
|
19929
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
19930
|
+
* `data-store-provider`) — this was reachable on the AppRouter by ANY
|
|
19931
|
+
* authenticated session at the default `auth: 'protected'`. The only
|
|
19932
|
+
* consumer is the orchestrator's `StoragePressureManager`, which calls
|
|
19933
|
+
* `ctx.api` — never tRPC — so `auth: 'admin'` costs it nothing.
|
|
19934
|
+
*/
|
|
19847
19935
|
/** Bytes this provider holds on the given location — drives proportional fan-out. */
|
|
19848
|
-
getEvictableUsage: method(z.object({ locationId: z.string() }), EvictableUsageSchema),
|
|
19936
|
+
getEvictableUsage: method(z.object({ locationId: z.string() }), EvictableUsageSchema, { auth: "admin" }),
|
|
19849
19937
|
/**
|
|
19850
19938
|
* Free approximately `targetBytes` of this provider's OWN least-valuable
|
|
19851
19939
|
* data on the location (oldest footage, expired clips, …). Returns what it
|
|
@@ -19854,7 +19942,10 @@ var storageEvictableCapability = {
|
|
|
19854
19942
|
evict: method(z.object({
|
|
19855
19943
|
locationId: z.string(),
|
|
19856
19944
|
targetBytes: z.number().int().positive()
|
|
19857
|
-
}), EvictResultSchema, {
|
|
19945
|
+
}), EvictResultSchema, {
|
|
19946
|
+
kind: "mutation",
|
|
19947
|
+
auth: "admin"
|
|
19948
|
+
})
|
|
19858
19949
|
}
|
|
19859
19950
|
};
|
|
19860
19951
|
//#endregion
|
|
@@ -19961,43 +20052,82 @@ var storageProviderCapability = {
|
|
|
19961
20052
|
mode: "collection",
|
|
19962
20053
|
internal: true,
|
|
19963
20054
|
methods: {
|
|
20055
|
+
/**
|
|
20056
|
+
* Every method below except `testLocation` had NO `auth` override —
|
|
20057
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
20058
|
+
* `data-store-provider`), so this was reachable on the AppRouter by ANY
|
|
20059
|
+
* authenticated session at the default `auth: 'protected'`: arbitrary
|
|
20060
|
+
* read/write/delete/list against any storage location the operator has
|
|
20061
|
+
* configured, keyed only by a caller-supplied `location` + `relativePath`
|
|
20062
|
+
* — the same "public consumers never see this cap" claim that was false
|
|
20063
|
+
* for `data-store-provider`, here gating raw file I/O instead of raw
|
|
20064
|
+
* settings rows. The only legitimate caller,
|
|
20065
|
+
* `addon-registry.service.ts`'s `activeStorageProvider`, calls the
|
|
20066
|
+
* provider object directly (in-process) — never tRPC — so `auth: 'admin'`
|
|
20067
|
+
* on every method costs it nothing. Public consumers already go through
|
|
20068
|
+
* the separate `storage` singleton cap.
|
|
20069
|
+
*/
|
|
19964
20070
|
/** Self-description for the "Add location" wizard. */
|
|
19965
|
-
getProviderInfo: method(z.void(), ProviderInfoSchema),
|
|
20071
|
+
getProviderInfo: method(z.void(), ProviderInfoSchema, { auth: "admin" }),
|
|
19966
20072
|
/** Validate config + probe connectivity. Called on add and on edit. */
|
|
19967
20073
|
testLocation: method(z.object({ config: z.record(z.string(), z.unknown()) }), TestLocationResultSchema, { auth: "admin" }),
|
|
19968
20074
|
resolve: method(z.object({
|
|
19969
20075
|
location: StorageLocationSchema,
|
|
19970
20076
|
relativePath: z.string()
|
|
19971
|
-
}), z.string()),
|
|
20077
|
+
}), z.string(), { auth: "admin" }),
|
|
19972
20078
|
write: method(z.object({
|
|
19973
20079
|
location: StorageLocationSchema,
|
|
19974
20080
|
relativePath: z.string(),
|
|
19975
20081
|
data: z.instanceof(Uint8Array)
|
|
19976
|
-
}), z.void(), {
|
|
20082
|
+
}), z.void(), {
|
|
20083
|
+
kind: "mutation",
|
|
20084
|
+
auth: "admin"
|
|
20085
|
+
}),
|
|
19977
20086
|
read: method(z.object({
|
|
19978
20087
|
location: StorageLocationSchema,
|
|
19979
20088
|
relativePath: z.string()
|
|
19980
|
-
}), z.instanceof(Uint8Array)),
|
|
20089
|
+
}), z.instanceof(Uint8Array), { auth: "admin" }),
|
|
19981
20090
|
exists: method(z.object({
|
|
19982
20091
|
location: StorageLocationSchema,
|
|
19983
20092
|
relativePath: z.string()
|
|
19984
|
-
}), z.boolean()),
|
|
20093
|
+
}), z.boolean(), { auth: "admin" }),
|
|
19985
20094
|
list: method(z.object({
|
|
19986
20095
|
location: StorageLocationSchema,
|
|
19987
20096
|
prefix: z.string().optional()
|
|
19988
|
-
}), z.array(z.string()).readonly()),
|
|
20097
|
+
}), z.array(z.string()).readonly(), { auth: "admin" }),
|
|
19989
20098
|
delete: method(z.object({
|
|
19990
20099
|
location: StorageLocationSchema,
|
|
19991
20100
|
relativePath: z.string()
|
|
19992
|
-
}), z.void(), {
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
|
|
20101
|
+
}), z.void(), {
|
|
20102
|
+
kind: "mutation",
|
|
20103
|
+
auth: "admin"
|
|
20104
|
+
}),
|
|
20105
|
+
getAvailableSpace: method(z.object({ location: StorageLocationSchema }), z.number().nullable(), { auth: "admin" }),
|
|
20106
|
+
beginUpload: method(BeginUploadInputSchema, BeginUploadResultSchema, {
|
|
20107
|
+
kind: "mutation",
|
|
20108
|
+
auth: "admin"
|
|
20109
|
+
}),
|
|
20110
|
+
writeChunk: method(WriteChunkInputSchema, z.void(), {
|
|
20111
|
+
kind: "mutation",
|
|
20112
|
+
auth: "admin"
|
|
20113
|
+
}),
|
|
20114
|
+
finalizeUpload: method(FinalizeUploadInputSchema, z.void(), {
|
|
20115
|
+
kind: "mutation",
|
|
20116
|
+
auth: "admin"
|
|
20117
|
+
}),
|
|
20118
|
+
abortUpload: method(AbortUploadInputSchema, z.void(), {
|
|
20119
|
+
kind: "mutation",
|
|
20120
|
+
auth: "admin"
|
|
20121
|
+
}),
|
|
20122
|
+
beginDownload: method(BeginDownloadInputSchema, BeginDownloadResultSchema, {
|
|
20123
|
+
kind: "mutation",
|
|
20124
|
+
auth: "admin"
|
|
20125
|
+
}),
|
|
20126
|
+
readChunk: method(ReadChunkInputSchema, z.instanceof(Uint8Array), { auth: "admin" }),
|
|
20127
|
+
endDownload: method(EndDownloadInputSchema, z.void(), {
|
|
20128
|
+
kind: "mutation",
|
|
20129
|
+
auth: "admin"
|
|
20130
|
+
})
|
|
20001
20131
|
}
|
|
20002
20132
|
};
|
|
20003
20133
|
//#endregion
|
|
@@ -20336,9 +20466,28 @@ var userPasskeysCapability = {
|
|
|
20336
20466
|
auth: "admin",
|
|
20337
20467
|
access: "create"
|
|
20338
20468
|
}),
|
|
20469
|
+
/**
|
|
20470
|
+
* The four methods below had NO `auth` override — `internal: true` did
|
|
20471
|
+
* not gate the mount (see the 2026-08-26 note on `data-store-provider`),
|
|
20472
|
+
* so they were reachable on the AppRouter at the default
|
|
20473
|
+
* `auth: 'protected'` (any authenticated session), inconsistent with
|
|
20474
|
+
* every other method on this cap (all already `auth: 'admin'`).
|
|
20475
|
+
*
|
|
20476
|
+
* ⚠ Checked before gating: these are also the PRE-AUTH login-ceremony
|
|
20477
|
+
* methods, so admin-gating them here must not break login for an
|
|
20478
|
+
* unauthenticated principal. It doesn't — the real login path is the
|
|
20479
|
+
* PUBLIC `auth.beginAuthentication` / `auth.finishAuthentication` /
|
|
20480
|
+
* `auth.beginDiscoverableAuthentication` / `auth.finishDiscoverableAuthentication`
|
|
20481
|
+
* procedures in `server/backend/src/api/core/auth.router.ts`, which call
|
|
20482
|
+
* `provider.beginAuthentication(...)` etc. directly against the
|
|
20483
|
+
* capability-registry-resolved provider — never through this cap's own
|
|
20484
|
+
* tRPC route. `auth: 'admin'` here only closes a redundant, unused
|
|
20485
|
+
* second entry point onto the same ceremony.
|
|
20486
|
+
*/
|
|
20339
20487
|
beginAuthentication: method(z.object({ userId: z.string().optional() }), z.object({ optionsJSON: z.record(z.string(), z.unknown()) }), {
|
|
20340
20488
|
kind: "mutation",
|
|
20341
|
-
access: "view"
|
|
20489
|
+
access: "view",
|
|
20490
|
+
auth: "admin"
|
|
20342
20491
|
}),
|
|
20343
20492
|
finishAuthentication: method(z.object({
|
|
20344
20493
|
/** Required — the user the assertion belongs to (verified). */
|
|
@@ -20347,11 +20496,13 @@ var userPasskeysCapability = {
|
|
|
20347
20496
|
response: z.record(z.string(), z.unknown())
|
|
20348
20497
|
}), z.object({ verified: z.boolean() }), {
|
|
20349
20498
|
kind: "mutation",
|
|
20350
|
-
access: "view"
|
|
20499
|
+
access: "view",
|
|
20500
|
+
auth: "admin"
|
|
20351
20501
|
}),
|
|
20352
20502
|
beginDiscoverableAuthentication: method(z.object({}), z.object({ optionsJSON: z.record(z.string(), z.unknown()) }), {
|
|
20353
20503
|
kind: "mutation",
|
|
20354
|
-
access: "view"
|
|
20504
|
+
access: "view",
|
|
20505
|
+
auth: "admin"
|
|
20355
20506
|
}),
|
|
20356
20507
|
finishDiscoverableAuthentication: method(z.object({
|
|
20357
20508
|
/** AuthenticationResponseJSON from the browser. */
|
|
@@ -20360,7 +20511,8 @@ response: z.record(z.string(), z.unknown()) }), z.object({
|
|
|
20360
20511
|
userId: z.string().nullable()
|
|
20361
20512
|
}), {
|
|
20362
20513
|
kind: "mutation",
|
|
20363
|
-
access: "view"
|
|
20514
|
+
access: "view",
|
|
20515
|
+
auth: "admin"
|
|
20364
20516
|
}),
|
|
20365
20517
|
listPasskeys: method(z.object({ userId: z.string() }), z.array(PasskeySummarySchema), { auth: "admin" }),
|
|
20366
20518
|
removePasskey: method(z.object({
|
|
@@ -20540,6 +20692,14 @@ var VectorStatsResultSchema = z.object({
|
|
|
20540
20692
|
/** False when the backend ranks approximately. */
|
|
20541
20693
|
exact: z.boolean()
|
|
20542
20694
|
});
|
|
20695
|
+
/**
|
|
20696
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
20697
|
+
* `data-store-provider`) — every method below was reachable on the AppRouter
|
|
20698
|
+
* by ANY authenticated session at the default `auth: 'protected'`. The only
|
|
20699
|
+
* consumers (`addon-post-analysis`'s embedding stores) reach this cap via
|
|
20700
|
+
* `ctx.api` — UDS/Moleculer, never tRPC — so `auth: 'admin'` on every method
|
|
20701
|
+
* costs them nothing. No client (viewer or admin-ui) calls `vectorStore.*`.
|
|
20702
|
+
*/
|
|
20543
20703
|
var vectorStoreCapability = {
|
|
20544
20704
|
name: "vector-store",
|
|
20545
20705
|
scope: "system",
|
|
@@ -20547,14 +20707,26 @@ var vectorStoreCapability = {
|
|
|
20547
20707
|
internal: true,
|
|
20548
20708
|
methods: {
|
|
20549
20709
|
/** Idempotent. Re-declaring with a different `dim` is an error, not a wipe. */
|
|
20550
|
-
declareIndex: method(VectorDeclareIndexInputSchema, z.void(), {
|
|
20551
|
-
|
|
20552
|
-
|
|
20710
|
+
declareIndex: method(VectorDeclareIndexInputSchema, z.void(), {
|
|
20711
|
+
kind: "mutation",
|
|
20712
|
+
auth: "admin"
|
|
20713
|
+
}),
|
|
20714
|
+
upsert: method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
20715
|
+
kind: "mutation",
|
|
20716
|
+
auth: "admin"
|
|
20717
|
+
}),
|
|
20718
|
+
query: method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }),
|
|
20553
20719
|
/** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
|
|
20554
|
-
getByIds: method(VectorGetInputSchema, VectorGetResultSchema),
|
|
20555
|
-
deleteByIds: method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
20556
|
-
|
|
20557
|
-
|
|
20720
|
+
getByIds: method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }),
|
|
20721
|
+
deleteByIds: method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
20722
|
+
kind: "mutation",
|
|
20723
|
+
auth: "admin"
|
|
20724
|
+
}),
|
|
20725
|
+
deleteByFilter: method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
20726
|
+
kind: "mutation",
|
|
20727
|
+
auth: "admin"
|
|
20728
|
+
}),
|
|
20729
|
+
stats: method(VectorStatsInputSchema, VectorStatsResultSchema, { auth: "admin" })
|
|
20558
20730
|
}
|
|
20559
20731
|
};
|
|
20560
20732
|
//#endregion
|
|
@@ -2171,8 +2171,17 @@ var adminUiCapability = {
|
|
|
2171
2171
|
mode: "singleton",
|
|
2172
2172
|
internal: true,
|
|
2173
2173
|
methods: {
|
|
2174
|
-
|
|
2175
|
-
|
|
2174
|
+
/**
|
|
2175
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2176
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2177
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2178
|
+
* `getStaticDir` leaks a hub filesystem path. The only caller is
|
|
2179
|
+
* `main.ts`'s static-file bootstrap, via `capRegistry.getSingletonForNode`
|
|
2180
|
+
* — never tRPC — so `auth: 'admin'` costs it nothing. The actual admin-ui
|
|
2181
|
+
* SPA assets are served as plain static files, unaffected by this gate.
|
|
2182
|
+
*/
|
|
2183
|
+
getStaticDir: method(z.void(), StaticDirOutputSchema$1, { auth: "admin" }),
|
|
2184
|
+
getVersion: method(z.void(), VersionOutputSchema$1, { auth: "admin" })
|
|
2176
2185
|
}
|
|
2177
2186
|
};
|
|
2178
2187
|
//#endregion
|
|
@@ -2518,8 +2527,23 @@ var viewerUiCapability = {
|
|
|
2518
2527
|
mode: "singleton",
|
|
2519
2528
|
internal: true,
|
|
2520
2529
|
methods: {
|
|
2521
|
-
|
|
2522
|
-
|
|
2530
|
+
/**
|
|
2531
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2532
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2533
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2534
|
+
* `getStaticDir` leaks a hub filesystem path.
|
|
2535
|
+
*
|
|
2536
|
+
* ⚠ Checked before gating: the VIEWER app IS used by a non-admin user
|
|
2537
|
+
* (`roberta`), but it never calls `viewerUi.*` over tRPC. The static SPA
|
|
2538
|
+
* it loads is served by the plain `GET /viewer/*` Fastify route in
|
|
2539
|
+
* `main.ts`, which reads `staticDir`/`indexPath` from a module-level
|
|
2540
|
+
* cache populated ONCE at boot via `capRegistry.getSingletonForNode`
|
|
2541
|
+
* (in-process, not tRPC) — the cap's tRPC procedure is never on that
|
|
2542
|
+
* request path. `auth: 'admin'` here does not block a single viewer
|
|
2543
|
+
* user from loading the app.
|
|
2544
|
+
*/
|
|
2545
|
+
getStaticDir: method(z.void(), StaticDirOutputSchema, { auth: "admin" }),
|
|
2546
|
+
getVersion: method(z.void(), VersionOutputSchema, { auth: "admin" })
|
|
2523
2547
|
}
|
|
2524
2548
|
};
|
|
2525
2549
|
//#endregion
|
|
@@ -2171,8 +2171,17 @@ var adminUiCapability = {
|
|
|
2171
2171
|
mode: "singleton",
|
|
2172
2172
|
internal: true,
|
|
2173
2173
|
methods: {
|
|
2174
|
-
|
|
2175
|
-
|
|
2174
|
+
/**
|
|
2175
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2176
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2177
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2178
|
+
* `getStaticDir` leaks a hub filesystem path. The only caller is
|
|
2179
|
+
* `main.ts`'s static-file bootstrap, via `capRegistry.getSingletonForNode`
|
|
2180
|
+
* — never tRPC — so `auth: 'admin'` costs it nothing. The actual admin-ui
|
|
2181
|
+
* SPA assets are served as plain static files, unaffected by this gate.
|
|
2182
|
+
*/
|
|
2183
|
+
getStaticDir: method(zod.z.void(), StaticDirOutputSchema$1, { auth: "admin" }),
|
|
2184
|
+
getVersion: method(zod.z.void(), VersionOutputSchema$1, { auth: "admin" })
|
|
2176
2185
|
}
|
|
2177
2186
|
};
|
|
2178
2187
|
//#endregion
|
|
@@ -2518,8 +2527,23 @@ var viewerUiCapability = {
|
|
|
2518
2527
|
mode: "singleton",
|
|
2519
2528
|
internal: true,
|
|
2520
2529
|
methods: {
|
|
2521
|
-
|
|
2522
|
-
|
|
2530
|
+
/**
|
|
2531
|
+
* `internal: true` did not gate the mount (see the 2026-08-26 note on
|
|
2532
|
+
* `data-store-provider`) — both methods were reachable on the AppRouter
|
|
2533
|
+
* by ANY authenticated session at the default `auth: 'protected'`, and
|
|
2534
|
+
* `getStaticDir` leaks a hub filesystem path.
|
|
2535
|
+
*
|
|
2536
|
+
* ⚠ Checked before gating: the VIEWER app IS used by a non-admin user
|
|
2537
|
+
* (`roberta`), but it never calls `viewerUi.*` over tRPC. The static SPA
|
|
2538
|
+
* it loads is served by the plain `GET /viewer/*` Fastify route in
|
|
2539
|
+
* `main.ts`, which reads `staticDir`/`indexPath` from a module-level
|
|
2540
|
+
* cache populated ONCE at boot via `capRegistry.getSingletonForNode`
|
|
2541
|
+
* (in-process, not tRPC) — the cap's tRPC procedure is never on that
|
|
2542
|
+
* request path. `auth: 'admin'` here does not block a single viewer
|
|
2543
|
+
* user from loading the app.
|
|
2544
|
+
*/
|
|
2545
|
+
getStaticDir: method(zod.z.void(), StaticDirOutputSchema, { auth: "admin" }),
|
|
2546
|
+
getVersion: method(zod.z.void(), VersionOutputSchema, { auth: "admin" })
|
|
2523
2547
|
}
|
|
2524
2548
|
};
|
|
2525
2549
|
//#endregion
|