@camstack/types 1.2.107 → 1.2.109

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.
@@ -2135,7 +2135,7 @@ function method(input, output, options) {
2135
2135
  input,
2136
2136
  output,
2137
2137
  kind: options?.kind ?? "query",
2138
- auth: options?.auth ?? "protected",
2138
+ ...options?.auth !== void 0 ? { auth: options.auth } : {},
2139
2139
  ...options?.access !== void 0 ? { access: options.access } : {},
2140
2140
  ...options?.caller !== void 0 ? { caller: options.caller } : {},
2141
2141
  timeoutMs: options?.timeoutMs
@@ -2171,8 +2171,17 @@ var adminUiCapability = {
2171
2171
  mode: "singleton",
2172
2172
  internal: true,
2173
2173
  methods: {
2174
- getStaticDir: method(zod.z.void(), StaticDirOutputSchema$1),
2175
- getVersion: method(zod.z.void(), VersionOutputSchema$1)
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
- getStaticDir: method(zod.z.void(), StaticDirOutputSchema),
2522
- getVersion: method(zod.z.void(), VersionOutputSchema)
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
@@ -2135,7 +2135,7 @@ function method(input, output, options) {
2135
2135
  input,
2136
2136
  output,
2137
2137
  kind: options?.kind ?? "query",
2138
- auth: options?.auth ?? "protected",
2138
+ ...options?.auth !== void 0 ? { auth: options.auth } : {},
2139
2139
  ...options?.access !== void 0 ? { access: options.access } : {},
2140
2140
  ...options?.caller !== void 0 ? { caller: options.caller } : {},
2141
2141
  timeoutMs: options?.timeoutMs
@@ -2171,8 +2171,17 @@ var adminUiCapability = {
2171
2171
  mode: "singleton",
2172
2172
  internal: true,
2173
2173
  methods: {
2174
- getStaticDir: method(z.void(), StaticDirOutputSchema$1),
2175
- getVersion: method(z.void(), VersionOutputSchema$1)
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
- getStaticDir: method(z.void(), StaticDirOutputSchema),
2522
- getVersion: method(z.void(), VersionOutputSchema)
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.107",
3
+ "version": "1.2.109",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",