@camstack/types 1.2.106 → 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/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-CUuoW-kk.js");
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: { listPages: require_sleep.method(zod.z.void(), zod.z.array(AddonPageDeclarationSchema).readonly()) }
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: { listWidgets: require_sleep.method(zod.z.void(), zod.z.array(WidgetMetadataSchema).readonly()) }
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: { listModels: require_sleep.method(zod.z.void(), zod.z.array(CustomModelDescriptorSchema).readonly()) }
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
@@ -7374,6 +7408,23 @@ var EngineInfoSchema = zod.z.object({
7374
7408
  * go through `settings-store`; they never see this cap, and an engine
7375
7409
  * never sees a caller.
7376
7410
  *
7411
+ * ⚠ **`internal: true` DOES NOT gate the mount, and until 2026-08-26 this
7412
+ * comment claimed otherwise.** `resolveCapMount` never reads the field, so this
7413
+ * cap was live on the AppRouter with every method at the default
7414
+ * `auth: 'protected'` — i.e. readable by ANY authenticated session, admin or
7415
+ * not. Verified against the live hub: `dataStoreProvider.query` returned raw
7416
+ * settings rows including a provider credential, bypassing the secret redaction
7417
+ * that `deviceManager.listAll` and friends go through.
7418
+ *
7419
+ * Every method is now `auth: 'admin'` EXPLICITLY, including the five reads —
7420
+ * they had no options object at all, which is exactly how they kept the
7421
+ * permissive default while the mutations looked deliberate. The explicit
7422
+ * annotation is the fix that works today; making `internal` mean something at
7423
+ * mount time is the systemic one, and it is not free: 22 caps declare it, only
7424
+ * 4 are `mount: 'skip'`, and forcing admin on all of them would change the auth
7425
+ * of surfaces the viewer and admin-ui call as non-admin users. That decision is
7426
+ * the operator's, not a side effect of this file.
7427
+ *
7377
7428
  * Design notes:
7378
7429
  * - **Stateless dispatch.** Every method carries its own
7379
7430
  * `namespace` + `collection`, so an engine keeps no per-caller state
@@ -7395,20 +7446,23 @@ var dataStoreProviderCapability = {
7395
7446
  internal: true,
7396
7447
  methods: {
7397
7448
  /** Self-description — how the orchestrator picks a registrant. */
7398
- getEngineInfo: require_sleep.method(zod.z.void(), EngineInfoSchema),
7449
+ getEngineInfo: require_sleep.method(zod.z.void(), EngineInfoSchema, { auth: "admin" }),
7399
7450
  /** Get a single value by key from a collection. */
7400
7451
  get: require_sleep.method(zod.z.object({
7401
7452
  namespace: zod.z.string().optional(),
7402
7453
  collection: zod.z.string(),
7403
7454
  key: zod.z.string()
7404
- }), zod.z.unknown()),
7455
+ }), zod.z.unknown(), { auth: "admin" }),
7405
7456
  /** Set a value by key in a collection (upsert). */
7406
7457
  set: require_sleep.method(zod.z.object({
7407
7458
  namespace: zod.z.string().optional(),
7408
7459
  collection: zod.z.string(),
7409
7460
  key: zod.z.string(),
7410
7461
  value: zod.z.unknown()
7411
- }), zod.z.void(), { kind: "mutation" }),
7462
+ }), zod.z.void(), {
7463
+ kind: "mutation",
7464
+ auth: "admin"
7465
+ }),
7412
7466
  /** Get all entries matching an optional filter. */
7413
7467
  query: require_sleep.method(zod.z.object({
7414
7468
  namespace: zod.z.string().optional(),
@@ -7417,52 +7471,80 @@ var dataStoreProviderCapability = {
7417
7471
  /**
7418
7472
  * SQL-level column projection — MUST mirror `settings-store.query`.
7419
7473
  *
7420
- * This is the second schema the same call passes through, and Zod
7421
- * objects STRIP what they do not declare: a field present on the door
7422
- * and absent here does not error, it silently disappears one hop before
7423
- * the engine, and the caller concludes the projection does nothing.
7424
- * `data-door-schema-parity.spec.ts` is what keeps the two in step.
7474
+ * An earlier version of this comment blamed Zod stripping, and that
7475
+ * was wrong corrected 2026-08-26 after the hop map
7476
+ * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
7477
+ * There is **no Zod parse at all** between the door and the engine: the
7478
+ * dispatcher forwards the payload verbatim and UDS carries it whole. A
7479
+ * field declared here reaches `SqliteSettingsBackend` either way.
7480
+ *
7481
+ * What actually lost `columns` was the THIRD declaration of this shape:
7482
+ * `SettingsQueryInput` in `interfaces/storage.ts`, a hand-written TS
7483
+ * interface the engine destructures from. The field existed on both
7484
+ * schemas and the engine still never read it, because nothing checks a
7485
+ * registered provider against `InferProvider<cap>` —
7486
+ * `ProviderRegistration.provider` is typed `object`.
7487
+ *
7488
+ * It is declared here anyway, and must stay in step with
7489
+ * `settings-store.query`: a caller reading only the cap definitions has
7490
+ * to be able to see that this call carries a projection.
7491
+ * `data-door-schema-parity.spec.ts` keeps the two aligned.
7425
7492
  */
7426
7493
  columns: zod.z.array(zod.z.string()).readonly().optional()
7427
- }), zod.z.array(SettingsRecordSchema).readonly()),
7494
+ }), zod.z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
7428
7495
  /** Insert a new record. */
7429
7496
  insert: require_sleep.method(zod.z.object({
7430
7497
  namespace: zod.z.string().optional(),
7431
7498
  collection: zod.z.string(),
7432
7499
  record: SettingsRecordSchema
7433
- }), zod.z.void(), { kind: "mutation" }),
7500
+ }), zod.z.void(), {
7501
+ kind: "mutation",
7502
+ auth: "admin"
7503
+ }),
7434
7504
  /** Update an existing record by ID. */
7435
7505
  update: require_sleep.method(zod.z.object({
7436
7506
  namespace: zod.z.string().optional(),
7437
7507
  collection: zod.z.string(),
7438
7508
  id: zod.z.string(),
7439
7509
  data: zod.z.record(zod.z.string(), zod.z.unknown())
7440
- }), zod.z.void(), { kind: "mutation" }),
7510
+ }), zod.z.void(), {
7511
+ kind: "mutation",
7512
+ auth: "admin"
7513
+ }),
7441
7514
  /** Delete a record by key/ID. */
7442
7515
  delete: require_sleep.method(zod.z.object({
7443
7516
  namespace: zod.z.string().optional(),
7444
7517
  collection: zod.z.string(),
7445
7518
  key: zod.z.string()
7446
- }), zod.z.void(), { kind: "mutation" }),
7519
+ }), zod.z.void(), {
7520
+ kind: "mutation",
7521
+ auth: "admin"
7522
+ }),
7447
7523
  /** Delete every record matching `filter`, in one statement. */
7448
7524
  deleteWhere: require_sleep.method(zod.z.object({
7449
7525
  namespace: zod.z.string().optional(),
7450
7526
  collection: zod.z.string(),
7451
7527
  filter: MutationFilterSchema
7452
- }), zod.z.object({ deleted: zod.z.number().int() }), { kind: "mutation" }),
7528
+ }), zod.z.object({ deleted: zod.z.number().int() }), {
7529
+ kind: "mutation",
7530
+ auth: "admin"
7531
+ }),
7453
7532
  /** Apply `data` to every record matching `filter`, in one statement. */
7454
7533
  updateWhere: require_sleep.method(zod.z.object({
7455
7534
  namespace: zod.z.string().optional(),
7456
7535
  collection: zod.z.string(),
7457
7536
  filter: MutationFilterSchema,
7458
7537
  data: zod.z.record(zod.z.string(), zod.z.unknown())
7459
- }), zod.z.object({ updated: zod.z.number().int() }), { kind: "mutation" }),
7538
+ }), zod.z.object({ updated: zod.z.number().int() }), {
7539
+ kind: "mutation",
7540
+ auth: "admin"
7541
+ }),
7460
7542
  /** Count entries in a collection, optionally filtered. */
7461
7543
  count: require_sleep.method(zod.z.object({
7462
7544
  namespace: zod.z.string().optional(),
7463
7545
  collection: zod.z.string(),
7464
7546
  filter: QueryFilterSchema.optional()
7465
- }), zod.z.number()),
7547
+ }), zod.z.number(), { auth: "admin" }),
7466
7548
  /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
7467
7549
  histogram: require_sleep.method(zod.z.object({
7468
7550
  namespace: zod.z.string().optional(),
@@ -7474,19 +7556,22 @@ var dataStoreProviderCapability = {
7474
7556
  }), zod.z.array(zod.z.object({
7475
7557
  bucket: zod.z.number().int(),
7476
7558
  count: zod.z.number().int()
7477
- })).readonly()),
7559
+ })).readonly(), { auth: "admin" }),
7478
7560
  /** Check if a collection is empty. */
7479
7561
  isEmpty: require_sleep.method(zod.z.object({
7480
7562
  namespace: zod.z.string().optional(),
7481
7563
  collection: zod.z.string()
7482
- }), zod.z.boolean()),
7564
+ }), zod.z.boolean(), { auth: "admin" }),
7483
7565
  /** Declare a typed (SQL-backed) collection with columns + indexes. */
7484
7566
  declareCollection: require_sleep.method(zod.z.object({
7485
7567
  namespace: zod.z.string().optional(),
7486
7568
  collection: zod.z.string(),
7487
7569
  columns: zod.z.array(CollectionColumnSchema).readonly(),
7488
7570
  indexes: zod.z.array(CollectionIndexSchema).readonly().optional()
7489
- }), zod.z.void(), { kind: "mutation" })
7571
+ }), zod.z.void(), {
7572
+ kind: "mutation",
7573
+ auth: "admin"
7574
+ })
7490
7575
  }
7491
7576
  };
7492
7577
  //#endregion
@@ -9471,13 +9556,20 @@ var embeddingEncoderCapability = {
9471
9556
  mode: "collection",
9472
9557
  internal: true,
9473
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
+ */
9474
9566
  encode: require_sleep.method(zod.z.object({
9475
9567
  crop: zod.z.instanceof(Uint8Array),
9476
9568
  width: zod.z.number(),
9477
9569
  height: zod.z.number()
9478
- }), EmbeddingResultSchema),
9479
- encodeText: require_sleep.method(zod.z.object({ text: zod.z.string() }), EmbeddingResultSchema),
9480
- 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" })
9481
9573
  }
9482
9574
  };
9483
9575
  //#endregion
@@ -9818,7 +9910,23 @@ var llmRuntimeCapability = {
9818
9910
  mode: "singleton",
9819
9911
  internal: true,
9820
9912
  methods: {
9821
- complete: require_sleep.method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
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
+ }),
9822
9930
  ensureStarted: require_sleep.method(zod.z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
9823
9931
  kind: "mutation",
9824
9932
  auth: "admin"
@@ -9827,7 +9935,7 @@ var llmRuntimeCapability = {
9827
9935
  kind: "mutation",
9828
9936
  auth: "admin"
9829
9937
  }),
9830
- status: require_sleep.method(zod.z.object({}), LlmRuntimeStatusSchema),
9938
+ status: require_sleep.method(zod.z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
9831
9939
  installModel: require_sleep.method(zod.z.object({ model: ManagedModelRefSchema }), zod.z.void(), {
9832
9940
  kind: "mutation",
9833
9941
  auth: "admin"
@@ -9836,8 +9944,8 @@ var llmRuntimeCapability = {
9836
9944
  kind: "mutation",
9837
9945
  auth: "admin"
9838
9946
  }),
9839
- listLocalModels: require_sleep.method(zod.z.object({}), zod.z.array(LlmNodeModelSchema)),
9840
- 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" })
9841
9949
  }
9842
9950
  };
9843
9951
  //#endregion
@@ -14615,7 +14723,17 @@ var oauthIntegrationCapability = {
14615
14723
  scope: "system",
14616
14724
  mode: "collection",
14617
14725
  internal: true,
14618
- methods: { getDescriptor: require_sleep.method(zod.z.void(), OauthIntegrationDescriptorSchema) }
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" }) }
14619
14737
  };
14620
14738
  //#endregion
14621
14739
  //#region src/capabilities/pipeline-analytics.cap.ts
@@ -19628,6 +19746,20 @@ var ssoBridgeCapability = {
19628
19746
  mode: "singleton",
19629
19747
  internal: true,
19630
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
+ */
19631
19763
  signBridgeToken: require_sleep.method(zod.z.object({
19632
19764
  claims: SsoBridgeClaimsSchema,
19633
19765
  /**
@@ -19640,8 +19772,8 @@ var ssoBridgeCapability = {
19640
19772
  * linking rather than produce an eternal token.
19641
19773
  */
19642
19774
  ttlSec: zod.z.union([zod.z.number().int().positive(), zod.z.literal("never")]).optional()
19643
- }), zod.z.object({ token: zod.z.string() })),
19644
- 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" })
19645
19777
  }
19646
19778
  };
19647
19779
  //#endregion
@@ -19794,8 +19926,15 @@ var storageEvictableCapability = {
19794
19926
  mode: "collection",
19795
19927
  internal: true,
19796
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
+ */
19797
19936
  /** Bytes this provider holds on the given location — drives proportional fan-out. */
19798
- 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" }),
19799
19938
  /**
19800
19939
  * Free approximately `targetBytes` of this provider's OWN least-valuable
19801
19940
  * data on the location (oldest footage, expired clips, …). Returns what it
@@ -19804,7 +19943,10 @@ var storageEvictableCapability = {
19804
19943
  evict: require_sleep.method(zod.z.object({
19805
19944
  locationId: zod.z.string(),
19806
19945
  targetBytes: zod.z.number().int().positive()
19807
- }), EvictResultSchema, { kind: "mutation" })
19946
+ }), EvictResultSchema, {
19947
+ kind: "mutation",
19948
+ auth: "admin"
19949
+ })
19808
19950
  }
19809
19951
  };
19810
19952
  //#endregion
@@ -19911,43 +20053,82 @@ var storageProviderCapability = {
19911
20053
  mode: "collection",
19912
20054
  internal: true,
19913
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
+ */
19914
20071
  /** Self-description for the "Add location" wizard. */
19915
- getProviderInfo: require_sleep.method(zod.z.void(), ProviderInfoSchema),
20072
+ getProviderInfo: require_sleep.method(zod.z.void(), ProviderInfoSchema, { auth: "admin" }),
19916
20073
  /** Validate config + probe connectivity. Called on add and on edit. */
19917
20074
  testLocation: require_sleep.method(zod.z.object({ config: zod.z.record(zod.z.string(), zod.z.unknown()) }), TestLocationResultSchema, { auth: "admin" }),
19918
20075
  resolve: require_sleep.method(zod.z.object({
19919
20076
  location: StorageLocationSchema,
19920
20077
  relativePath: zod.z.string()
19921
- }), zod.z.string()),
20078
+ }), zod.z.string(), { auth: "admin" }),
19922
20079
  write: require_sleep.method(zod.z.object({
19923
20080
  location: StorageLocationSchema,
19924
20081
  relativePath: zod.z.string(),
19925
20082
  data: zod.z.instanceof(Uint8Array)
19926
- }), zod.z.void(), { kind: "mutation" }),
20083
+ }), zod.z.void(), {
20084
+ kind: "mutation",
20085
+ auth: "admin"
20086
+ }),
19927
20087
  read: require_sleep.method(zod.z.object({
19928
20088
  location: StorageLocationSchema,
19929
20089
  relativePath: zod.z.string()
19930
- }), zod.z.instanceof(Uint8Array)),
20090
+ }), zod.z.instanceof(Uint8Array), { auth: "admin" }),
19931
20091
  exists: require_sleep.method(zod.z.object({
19932
20092
  location: StorageLocationSchema,
19933
20093
  relativePath: zod.z.string()
19934
- }), zod.z.boolean()),
20094
+ }), zod.z.boolean(), { auth: "admin" }),
19935
20095
  list: require_sleep.method(zod.z.object({
19936
20096
  location: StorageLocationSchema,
19937
20097
  prefix: zod.z.string().optional()
19938
- }), zod.z.array(zod.z.string()).readonly()),
20098
+ }), zod.z.array(zod.z.string()).readonly(), { auth: "admin" }),
19939
20099
  delete: require_sleep.method(zod.z.object({
19940
20100
  location: StorageLocationSchema,
19941
20101
  relativePath: zod.z.string()
19942
- }), zod.z.void(), { kind: "mutation" }),
19943
- getAvailableSpace: require_sleep.method(zod.z.object({ location: StorageLocationSchema }), zod.z.number().nullable()),
19944
- beginUpload: require_sleep.method(BeginUploadInputSchema, BeginUploadResultSchema, { kind: "mutation" }),
19945
- writeChunk: require_sleep.method(WriteChunkInputSchema, zod.z.void(), { kind: "mutation" }),
19946
- finalizeUpload: require_sleep.method(FinalizeUploadInputSchema, zod.z.void(), { kind: "mutation" }),
19947
- abortUpload: require_sleep.method(AbortUploadInputSchema, zod.z.void(), { kind: "mutation" }),
19948
- beginDownload: require_sleep.method(BeginDownloadInputSchema, BeginDownloadResultSchema, { kind: "mutation" }),
19949
- readChunk: require_sleep.method(ReadChunkInputSchema, zod.z.instanceof(Uint8Array)),
19950
- endDownload: require_sleep.method(EndDownloadInputSchema, zod.z.void(), { kind: "mutation" })
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
+ })
19951
20132
  }
19952
20133
  };
19953
20134
  //#endregion
@@ -20286,9 +20467,28 @@ var userPasskeysCapability = {
20286
20467
  auth: "admin",
20287
20468
  access: "create"
20288
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
+ */
20289
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()) }), {
20290
20489
  kind: "mutation",
20291
- access: "view"
20490
+ access: "view",
20491
+ auth: "admin"
20292
20492
  }),
20293
20493
  finishAuthentication: require_sleep.method(zod.z.object({
20294
20494
  /** Required — the user the assertion belongs to (verified). */
@@ -20297,11 +20497,13 @@ var userPasskeysCapability = {
20297
20497
  response: zod.z.record(zod.z.string(), zod.z.unknown())
20298
20498
  }), zod.z.object({ verified: zod.z.boolean() }), {
20299
20499
  kind: "mutation",
20300
- access: "view"
20500
+ access: "view",
20501
+ auth: "admin"
20301
20502
  }),
20302
20503
  beginDiscoverableAuthentication: require_sleep.method(zod.z.object({}), zod.z.object({ optionsJSON: zod.z.record(zod.z.string(), zod.z.unknown()) }), {
20303
20504
  kind: "mutation",
20304
- access: "view"
20505
+ access: "view",
20506
+ auth: "admin"
20305
20507
  }),
20306
20508
  finishDiscoverableAuthentication: require_sleep.method(zod.z.object({
20307
20509
  /** AuthenticationResponseJSON from the browser. */
@@ -20310,7 +20512,8 @@ response: zod.z.record(zod.z.string(), zod.z.unknown()) }), zod.z.object({
20310
20512
  userId: zod.z.string().nullable()
20311
20513
  }), {
20312
20514
  kind: "mutation",
20313
- access: "view"
20515
+ access: "view",
20516
+ auth: "admin"
20314
20517
  }),
20315
20518
  listPasskeys: require_sleep.method(zod.z.object({ userId: zod.z.string() }), zod.z.array(PasskeySummarySchema), { auth: "admin" }),
20316
20519
  removePasskey: require_sleep.method(zod.z.object({
@@ -20490,6 +20693,14 @@ var VectorStatsResultSchema = zod.z.object({
20490
20693
  /** False when the backend ranks approximately. */
20491
20694
  exact: zod.z.boolean()
20492
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
+ */
20493
20704
  var vectorStoreCapability = {
20494
20705
  name: "vector-store",
20495
20706
  scope: "system",
@@ -20497,14 +20708,26 @@ var vectorStoreCapability = {
20497
20708
  internal: true,
20498
20709
  methods: {
20499
20710
  /** Idempotent. Re-declaring with a different `dim` is an error, not a wipe. */
20500
- declareIndex: require_sleep.method(VectorDeclareIndexInputSchema, zod.z.void(), { kind: "mutation" }),
20501
- upsert: require_sleep.method(VectorUpsertInputSchema, VectorUpsertResultSchema, { kind: "mutation" }),
20502
- query: require_sleep.method(VectorQueryInputSchema, VectorQueryResultSchema),
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" }),
20503
20720
  /** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
20504
- getByIds: require_sleep.method(VectorGetInputSchema, VectorGetResultSchema),
20505
- deleteByIds: require_sleep.method(VectorDeleteInputSchema, VectorDeleteResultSchema, { kind: "mutation" }),
20506
- deleteByFilter: require_sleep.method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, { kind: "mutation" }),
20507
- stats: require_sleep.method(VectorStatsInputSchema, VectorStatsResultSchema)
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" })
20508
20731
  }
20509
20732
  };
20510
20733
  //#endregion