@cosmicdrift/kumiko-framework 0.369.0 → 0.370.0

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.
Files changed (449) hide show
  1. package/AGENTS.md +14 -1
  2. package/agents/examples/apex-surface-auth.md +2 -1
  3. package/agents/examples/app-config.md +98 -0
  4. package/agents/examples/auth-mfa.md +72 -0
  5. package/agents/examples/compose-stacks.md +188 -0
  6. package/agents/examples/env-composition.md +268 -0
  7. package/agents/examples/host-routing.md +181 -0
  8. package/agents/examples/legal-pages.md +52 -3
  9. package/agents/examples/managed-config.md +1 -0
  10. package/agents/examples/managed-pages.md +1 -0
  11. package/agents/examples/prod-boot-options.md +180 -0
  12. package/agents/examples/relations.md +4 -0
  13. package/agents/examples/secrets-demo.md +4 -2
  14. package/agents/examples/security-baseline.md +20 -17
  15. package/agents/examples.md +6 -1
  16. package/agents/features.md +14 -2
  17. package/dist/api/anonymous-cookie.d.ts +1 -1
  18. package/dist/api/anonymous-live-entities.d.ts +1 -1
  19. package/dist/api/auth-middleware.d.ts +2 -2
  20. package/dist/api/auth-routes.d.ts +7 -7
  21. package/dist/api/extra-route.d.ts +2 -2
  22. package/dist/api/index.d.ts +37 -37
  23. package/dist/api/jwt.d.ts +1 -1
  24. package/dist/api/observability-middleware.d.ts +1 -1
  25. package/dist/api/readiness.d.ts +1 -1
  26. package/dist/api/redis-sse-broker.d.ts +2 -2
  27. package/dist/api/request-context.d.ts +1 -1
  28. package/dist/api/request-id-middleware.d.ts +3 -3
  29. package/dist/api/route-registrars.d.ts +4 -4
  30. package/dist/api/routes.d.ts +1 -1
  31. package/dist/api/server.d.ts +16 -16
  32. package/dist/api/sse-broker.d.ts +1 -1
  33. package/dist/api/sse-route.d.ts +1 -1
  34. package/dist/api/websocket-route.d.ts +3 -3
  35. package/dist/auth/index.d.ts +2 -2
  36. package/dist/compliance/duration-spec.d.ts +2 -2
  37. package/dist/compliance/index.d.ts +6 -6
  38. package/dist/compliance/profiles.d.ts +1 -1
  39. package/dist/config/index.d.ts +44 -0
  40. package/dist/config/index.js +61 -0
  41. package/dist/crypto/blind-index.d.ts +1 -1
  42. package/dist/crypto/event-pii.d.ts +1 -1
  43. package/dist/crypto/in-memory-kms-adapter.d.ts +1 -1
  44. package/dist/crypto/index.d.ts +11 -11
  45. package/dist/crypto/is-self-pii-field.d.ts +1 -1
  46. package/dist/crypto/kms-wiring.d.ts +2 -2
  47. package/dist/crypto/owner-transition-rekey.d.ts +1 -1
  48. package/dist/crypto/pg-kms-adapter.d.ts +1 -1
  49. package/dist/crypto/pii-field-encryption.d.ts +4 -4
  50. package/dist/crypto/request-kms-cache.d.ts +1 -1
  51. package/dist/crypto/subject-resolver.d.ts +3 -3
  52. package/dist/db/apply-entity-event.d.ts +4 -4
  53. package/dist/db/assert-exists-in.d.ts +4 -4
  54. package/dist/db/blind-index-cleanup.d.ts +2 -2
  55. package/dist/db/collect-table-metas.d.ts +2 -2
  56. package/dist/db/compound-types.d.ts +1 -1
  57. package/dist/db/config-seed.d.ts +5 -5
  58. package/dist/db/connection.d.ts +1 -6
  59. package/dist/db/connection.js +15 -4
  60. package/dist/db/dialect.d.ts +1 -1
  61. package/dist/db/eagerload.d.ts +3 -3
  62. package/dist/db/entity-field-encryption.d.ts +3 -3
  63. package/dist/db/entity-field-encryption.js +3 -1
  64. package/dist/db/entity-table-from-registry.d.ts +3 -3
  65. package/dist/db/entity-table-meta.d.ts +3 -3
  66. package/dist/db/event-store-executor-context.d.ts +9 -9
  67. package/dist/db/event-store-executor-read.d.ts +2 -2
  68. package/dist/db/event-store-executor-write.d.ts +2 -2
  69. package/dist/db/event-store-executor.d.ts +8 -8
  70. package/dist/db/feature-table-sources.d.ts +1 -1
  71. package/dist/db/index.d.ts +39 -39
  72. package/dist/db/located-timestamp.d.ts +1 -1
  73. package/dist/db/lock-guard.d.ts +2 -2
  74. package/dist/db/migrate-generator.d.ts +2 -2
  75. package/dist/db/migrate-runner.d.ts +1 -1
  76. package/dist/db/money.d.ts +1 -1
  77. package/dist/db/parent-ref-clause.d.ts +4 -4
  78. package/dist/db/projection-registry-binding.d.ts +1 -1
  79. package/dist/db/queries/advisory-lock.d.ts +1 -1
  80. package/dist/db/queries/backfill-pii.d.ts +2 -2
  81. package/dist/db/queries/ddl.d.ts +1 -1
  82. package/dist/db/queries/entity-read.d.ts +1 -1
  83. package/dist/db/queries/es-ops.d.ts +1 -1
  84. package/dist/db/queries/event-consumer.d.ts +2 -2
  85. package/dist/db/queries/event-store-admin.d.ts +1 -1
  86. package/dist/db/queries/event-store-transfer.d.ts +1 -1
  87. package/dist/db/queries/event-store.d.ts +1 -1
  88. package/dist/db/queries/pii-backfill-state.d.ts +1 -1
  89. package/dist/db/queries/projection-rebuild.d.ts +1 -1
  90. package/dist/db/queries/raw-sql.d.ts +1 -1
  91. package/dist/db/queries/seed-context.d.ts +2 -2
  92. package/dist/db/queries/shadow-swap.d.ts +3 -3
  93. package/dist/db/queries/table-ops.d.ts +1 -1
  94. package/dist/db/queries/test-stack.d.ts +2 -2
  95. package/dist/db/query.d.ts +3 -3
  96. package/dist/db/rebuild-marker.d.ts +1 -1
  97. package/dist/db/reference-data.d.ts +3 -3
  98. package/dist/db/render-ddl.d.ts +1 -1
  99. package/dist/db/replay-migration-sql.d.ts +1 -1
  100. package/dist/db/retired-framework-tables.d.ts +1 -1
  101. package/dist/db/schema-inspection.d.ts +1 -1
  102. package/dist/db/table-builder.d.ts +4 -4
  103. package/dist/db/table-push.d.ts +3 -3
  104. package/dist/db/tenant-db-runner.d.ts +2 -2
  105. package/dist/db/tenant-db.d.ts +7 -9
  106. package/dist/db/tenant-db.js +2 -12
  107. package/dist/derivatives/derivatives-context.d.ts +3 -3
  108. package/dist/derivatives/field-variants.d.ts +1 -1
  109. package/dist/derivatives/index.d.ts +6 -6
  110. package/dist/engine/access.d.ts +1 -1
  111. package/dist/engine/active-membership.d.ts +2 -2
  112. package/dist/engine/boot-validator/access-declarations.d.ts +1 -1
  113. package/dist/engine/boot-validator/access-roles.d.ts +1 -1
  114. package/dist/engine/boot-validator/action-wiring.d.ts +1 -1
  115. package/dist/engine/boot-validator/api-ext.d.ts +1 -1
  116. package/dist/engine/boot-validator/boot-check.d.ts +1 -1
  117. package/dist/engine/boot-validator/card-meta-overflow.d.ts +1 -1
  118. package/dist/engine/boot-validator/config-deps.d.ts +1 -1
  119. package/dist/engine/boot-validator/detail-screens.d.ts +2 -2
  120. package/dist/engine/boot-validator/entity-handler.d.ts +1 -1
  121. package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -1
  122. package/dist/engine/boot-validator/gdpr-storage.d.ts +1 -1
  123. package/dist/engine/boot-validator/global-tenancy.d.ts +1 -1
  124. package/dist/engine/boot-validator/handler-field-references.d.ts +1 -1
  125. package/dist/engine/boot-validator/i18n-keys.d.ts +1 -1
  126. package/dist/engine/boot-validator/index.d.ts +7 -7
  127. package/dist/engine/boot-validator/nav.d.ts +1 -1
  128. package/dist/engine/boot-validator/ownership.d.ts +2 -2
  129. package/dist/engine/boot-validator/parent-ref.d.ts +1 -1
  130. package/dist/engine/boot-validator/pii-retention.d.ts +2 -2
  131. package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -1
  132. package/dist/engine/boot-validator/query-output-columns.d.ts +1 -1
  133. package/dist/engine/boot-validator/query-refs.d.ts +1 -1
  134. package/dist/engine/boot-validator/record-owned.d.ts +1 -1
  135. package/dist/engine/boot-validator/screens.d.ts +2 -2
  136. package/dist/engine/boot-validator/security-baseline.d.ts +1 -1
  137. package/dist/engine/boot-validator/selector-owner-panels.d.ts +1 -1
  138. package/dist/engine/boot-validator/transfer-graph.d.ts +2 -2
  139. package/dist/engine/boot-validator/url-prefill-fields.d.ts +1 -1
  140. package/dist/engine/boot-validator/workspaces.d.ts +1 -1
  141. package/dist/engine/boot-validator.d.ts +1 -1
  142. package/dist/engine/bridge-stub.d.ts +1 -1
  143. package/dist/engine/build-app-schema.d.ts +2 -2
  144. package/dist/engine/build-config-feature-schema.d.ts +5 -5
  145. package/dist/engine/build-target.d.ts +2 -2
  146. package/dist/engine/changeset-changes.d.ts +1 -1
  147. package/dist/engine/codemod/index.d.ts +2 -2
  148. package/dist/engine/config-helpers.d.ts +1 -1
  149. package/dist/engine/constants.d.ts +1 -1
  150. package/dist/engine/create-app.d.ts +2 -2
  151. package/dist/engine/cross-tenant.d.ts +2 -2
  152. package/dist/engine/dedupe-features.d.ts +1 -1
  153. package/dist/engine/define-feature.d.ts +1 -1
  154. package/dist/engine/define-feature.js +2 -2
  155. package/dist/engine/define-handler.d.ts +4 -4
  156. package/dist/engine/define-step.d.ts +1 -1
  157. package/dist/engine/define-workflow.d.ts +2 -2
  158. package/dist/engine/effective-features.d.ts +1 -1
  159. package/dist/engine/embedded-derived.d.ts +1 -1
  160. package/dist/engine/entity-handlers.d.ts +6 -5
  161. package/dist/engine/entity-handlers.js +6 -3
  162. package/dist/engine/event-def.d.ts +15 -0
  163. package/dist/engine/event-def.js +123 -0
  164. package/dist/engine/event-helpers.d.ts +1 -1
  165. package/dist/engine/extension-names.d.ts +8 -8
  166. package/dist/engine/extension-selector-plugins.d.ts +2 -2
  167. package/dist/engine/extensions/escape-hatch-usage.d.ts +1 -1
  168. package/dist/engine/extensions/storage-provider.d.ts +1 -1
  169. package/dist/engine/extensions/tenant-data.d.ts +3 -3
  170. package/dist/engine/extensions/tenant-resource.d.ts +2 -2
  171. package/dist/engine/extensions/user-data.d.ts +2 -2
  172. package/dist/engine/factories.d.ts +1 -1
  173. package/dist/engine/feature-ast/extractors/ai-steps.d.ts +2 -2
  174. package/dist/engine/feature-ast/extractors/events.d.ts +2 -2
  175. package/dist/engine/feature-ast/extractors/handlers.d.ts +4 -4
  176. package/dist/engine/feature-ast/extractors/hooks.d.ts +5 -5
  177. package/dist/engine/feature-ast/extractors/index.d.ts +14 -14
  178. package/dist/engine/feature-ast/extractors/jobs-routes.d.ts +3 -3
  179. package/dist/engine/feature-ast/extractors/projections-screens.d.ts +3 -3
  180. package/dist/engine/feature-ast/extractors/round1.d.ts +2 -2
  181. package/dist/engine/feature-ast/extractors/round2.d.ts +2 -2
  182. package/dist/engine/feature-ast/extractors/round3.d.ts +4 -4
  183. package/dist/engine/feature-ast/extractors/round5.d.ts +2 -2
  184. package/dist/engine/feature-ast/extractors/round6.d.ts +2 -2
  185. package/dist/engine/feature-ast/extractors/shared.d.ts +2 -2
  186. package/dist/engine/feature-ast/index.d.ts +16 -16
  187. package/dist/engine/feature-ast/parse.d.ts +2 -2
  188. package/dist/engine/feature-ast/patch.d.ts +1 -1
  189. package/dist/engine/feature-ast/patcher.d.ts +15 -15
  190. package/dist/engine/feature-ast/pattern-change-schema.d.ts +10 -10
  191. package/dist/engine/feature-ast/patterns.d.ts +15 -15
  192. package/dist/engine/feature-ast/render.d.ts +1 -1
  193. package/dist/engine/feature-builder-state.d.ts +5 -5
  194. package/dist/engine/feature-config-events-jobs.d.ts +3 -3
  195. package/dist/engine/feature-config-events-jobs.js +8 -130
  196. package/dist/engine/feature-entity-handlers.d.ts +4 -4
  197. package/dist/engine/feature-entity-handlers.js +11 -5
  198. package/dist/engine/feature-manifest.d.ts +1 -1
  199. package/dist/engine/feature-ui-extensions.d.ts +7 -7
  200. package/dist/engine/feature-ui-extensions.js +2 -2
  201. package/dist/engine/field-access.d.ts +1 -1
  202. package/dist/engine/field-helpers.d.ts +1 -1
  203. package/dist/engine/handler-helpers.d.ts +1 -1
  204. package/dist/engine/index.d.ts +89 -88
  205. package/dist/engine/index.js +1 -0
  206. package/dist/engine/instruction-fields.d.ts +1 -1
  207. package/dist/engine/object-form.d.ts +1 -1
  208. package/dist/engine/object-form.js +5 -6
  209. package/dist/engine/ownership.d.ts +3 -3
  210. package/dist/engine/pattern-library/index.d.ts +2 -2
  211. package/dist/engine/pattern-library/library.d.ts +2 -2
  212. package/dist/engine/pattern-library/mixed-schemas.d.ts +1 -1
  213. package/dist/engine/pattern-library/opaque-schemas.d.ts +1 -1
  214. package/dist/engine/pattern-library/shared-fields.d.ts +1 -1
  215. package/dist/engine/pattern-library/static-schemas.d.ts +1 -1
  216. package/dist/engine/pattern-library/types.d.ts +1 -1
  217. package/dist/engine/personal-data-fields.d.ts +2 -2
  218. package/dist/engine/pipeline.d.ts +2 -2
  219. package/dist/engine/project-app-schema-for-roles.d.ts +1 -1
  220. package/dist/engine/projection-helpers.d.ts +4 -4
  221. package/dist/engine/read-claim.d.ts +1 -1
  222. package/dist/engine/registry-facade.d.ts +2 -2
  223. package/dist/engine/registry-ingest.d.ts +2 -2
  224. package/dist/engine/registry-state.d.ts +2 -2
  225. package/dist/engine/registry-validate.d.ts +3 -3
  226. package/dist/engine/registry.d.ts +1 -1
  227. package/dist/engine/resolve-config-or-param.d.ts +2 -2
  228. package/dist/engine/role-assignment.d.ts +1 -1
  229. package/dist/engine/run-in.d.ts +1 -1
  230. package/dist/engine/run-pipeline.d.ts +3 -3
  231. package/dist/engine/schema-builder.d.ts +1 -1
  232. package/dist/engine/screen-filter-ops.d.ts +1 -1
  233. package/dist/engine/screen-helpers.d.ts +2 -2
  234. package/dist/engine/soft-delete-cleanup.d.ts +2 -2
  235. package/dist/engine/steps/_event-match.d.ts +1 -1
  236. package/dist/engine/steps/_no-return-guard.d.ts +1 -1
  237. package/dist/engine/steps/_read-source.d.ts +4 -4
  238. package/dist/engine/steps/_resolver-utils.d.ts +1 -1
  239. package/dist/engine/steps/aggregate-append-event.d.ts +1 -1
  240. package/dist/engine/steps/aggregate-create.d.ts +2 -2
  241. package/dist/engine/steps/aggregate-update.d.ts +3 -3
  242. package/dist/engine/steps/branch.d.ts +1 -1
  243. package/dist/engine/steps/call-feature.d.ts +2 -2
  244. package/dist/engine/steps/compute.d.ts +1 -1
  245. package/dist/engine/steps/for-each.d.ts +1 -1
  246. package/dist/engine/steps/mail-send.d.ts +1 -1
  247. package/dist/engine/steps/read-find-many.d.ts +2 -2
  248. package/dist/engine/steps/read-find-one.d.ts +2 -2
  249. package/dist/engine/steps/retry.d.ts +1 -1
  250. package/dist/engine/steps/return.d.ts +2 -2
  251. package/dist/engine/steps/unsafe-projection-delete.d.ts +2 -2
  252. package/dist/engine/steps/unsafe-projection-upsert.d.ts +1 -1
  253. package/dist/engine/steps/wait-for-event.d.ts +1 -1
  254. package/dist/engine/steps/wait.d.ts +1 -1
  255. package/dist/engine/steps/webhook-send.d.ts +1 -1
  256. package/dist/engine/strip-disabled-features-from-app-schema.d.ts +4 -4
  257. package/dist/engine/system-user.d.ts +2 -2
  258. package/dist/engine/template-variables.d.ts +1 -1
  259. package/dist/engine/tier-resolver-extension.d.ts +4 -4
  260. package/dist/engine/transfer-adjacency.d.ts +1 -1
  261. package/dist/engine/types/index.d.ts +6 -6
  262. package/dist/engine/validate-projection-allowlist.d.ts +1 -1
  263. package/dist/engine/validation.d.ts +1 -1
  264. package/dist/entrypoint/index.d.ts +12 -12
  265. package/dist/env/dry-run.d.ts +14 -1
  266. package/dist/env/dry-run.js +50 -0
  267. package/dist/env/index.d.ts +54 -16
  268. package/dist/env/index.js +60 -6
  269. package/dist/errors/classes.d.ts +3 -3
  270. package/dist/errors/docs-url.d.ts +1 -1
  271. package/dist/errors/index.d.ts +18 -18
  272. package/dist/errors/member-resolution.d.ts +1 -1
  273. package/dist/errors/serialize.d.ts +2 -2
  274. package/dist/errors/subject-erased.d.ts +1 -1
  275. package/dist/errors/to-kumiko-error.d.ts +1 -1
  276. package/dist/errors/write-error-info.d.ts +1 -1
  277. package/dist/errors/zod-bridge.d.ts +1 -1
  278. package/dist/es-ops/context.d.ts +4 -4
  279. package/dist/es-ops/index.d.ts +4 -4
  280. package/dist/es-ops/operations-schema.d.ts +1 -1
  281. package/dist/es-ops/runner.d.ts +3 -3
  282. package/dist/es-ops/runner.js +9 -1
  283. package/dist/es-ops/types.d.ts +2 -2
  284. package/dist/event-store/admin-api.d.ts +3 -3
  285. package/dist/event-store/archive.d.ts +2 -2
  286. package/dist/event-store/event-store.d.ts +2 -2
  287. package/dist/event-store/events-schema.d.ts +1 -1
  288. package/dist/event-store/index.d.ts +15 -15
  289. package/dist/event-store/provenance-append.d.ts +3 -3
  290. package/dist/event-store/rebuild-dead-letter.d.ts +2 -2
  291. package/dist/event-store/row-to-stored-event.d.ts +2 -2
  292. package/dist/event-store/snapshot.d.ts +2 -2
  293. package/dist/event-store/tenant-db-append.d.ts +2 -2
  294. package/dist/event-store/transfer.d.ts +3 -3
  295. package/dist/event-store/upcaster-dead-letter.d.ts +2 -2
  296. package/dist/event-store/upcaster.d.ts +3 -3
  297. package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -2
  298. package/dist/files/bind-pending-file-refs.d.ts +3 -3
  299. package/dist/files/create-file-ref-from-bytes.d.ts +4 -4
  300. package/dist/files/create-file-ref.d.ts +3 -3
  301. package/dist/files/dispose-removed-file-refs.d.ts +2 -2
  302. package/dist/files/feature.d.ts +3 -3
  303. package/dist/files/file-handle.d.ts +1 -1
  304. package/dist/files/file-ref-entity.d.ts +1 -1
  305. package/dist/files/file-ref-table.d.ts +1 -1
  306. package/dist/files/file-routes.d.ts +5 -5
  307. package/dist/files/in-memory-provider.d.ts +1 -1
  308. package/dist/files/index.d.ts +20 -20
  309. package/dist/files/load-save-file-refs.d.ts +2 -2
  310. package/dist/files/local-provider.d.ts +1 -1
  311. package/dist/files/provider-resolver.d.ts +5 -5
  312. package/dist/files/purge-expired-file-ref-bytes.d.ts +2 -2
  313. package/dist/files/record-read-check.d.ts +1 -1
  314. package/dist/files/record-write-check.d.ts +3 -3
  315. package/dist/files/storage-tracking.d.ts +2 -2
  316. package/dist/files/types.d.ts +1 -1
  317. package/dist/files/zip-stream.d.ts +1 -1
  318. package/dist/i18n/index.d.ts +4 -4
  319. package/dist/i18n/mail-registry.d.ts +1 -1
  320. package/dist/i18n/required-surface-keys.d.ts +1 -1
  321. package/dist/i18n/settings-hub-keys.d.ts +1 -1
  322. package/dist/internal/stack-support.d.ts +12 -12
  323. package/dist/internal/testing.d.ts +4 -4
  324. package/dist/jobs/index.d.ts +2 -2
  325. package/dist/jobs/job-runner.d.ts +1 -1
  326. package/dist/jobs/max-per-tenant.d.ts +1 -1
  327. package/dist/lifecycle/index.d.ts +2 -2
  328. package/dist/lifecycle/lifecycle.d.ts +1 -1
  329. package/dist/lifecycle/signal-handlers.d.ts +1 -1
  330. package/dist/logging/index.d.ts +4 -4
  331. package/dist/logging/pino-logger.d.ts +1 -1
  332. package/dist/logging/utils.d.ts +1 -1
  333. package/dist/migrations/index.d.ts +4 -4
  334. package/dist/migrations/kumiko-drift.d.ts +1 -1
  335. package/dist/migrations/pending-rebuilds.d.ts +5 -5
  336. package/dist/migrations/pii-event-backfill.d.ts +4 -4
  337. package/dist/migrations/projection-table-index.d.ts +1 -1
  338. package/dist/observability/console-provider.d.ts +1 -1
  339. package/dist/observability/context.d.ts +1 -1
  340. package/dist/observability/escape-hatch-report.d.ts +3 -3
  341. package/dist/observability/fallback.d.ts +1 -1
  342. package/dist/observability/index.d.ts +16 -16
  343. package/dist/observability/metric-validator.d.ts +1 -1
  344. package/dist/observability/metrics-handle.d.ts +1 -1
  345. package/dist/observability/metrics-wiring.d.ts +2 -2
  346. package/dist/observability/noop-provider.d.ts +1 -1
  347. package/dist/observability/prometheus-meter.d.ts +1 -1
  348. package/dist/observability/recording-meter.d.ts +1 -1
  349. package/dist/observability/recording-tracer.d.ts +1 -1
  350. package/dist/observability/redis-wrapper.d.ts +1 -1
  351. package/dist/observability/sensitive-filter.d.ts +1 -1
  352. package/dist/observability/standard-metrics.d.ts +1 -1
  353. package/dist/pipeline/active-membership.d.ts +4 -4
  354. package/dist/pipeline/append-event-core.d.ts +3 -3
  355. package/dist/pipeline/auth-claims-resolver.d.ts +2 -2
  356. package/dist/pipeline/cascade-handler.d.ts +3 -3
  357. package/dist/pipeline/dispatch-batch.d.ts +2 -2
  358. package/dist/pipeline/dispatch-query.d.ts +4 -4
  359. package/dist/pipeline/dispatch-shared.d.ts +17 -17
  360. package/dist/pipeline/dispatch-stream.d.ts +2 -2
  361. package/dist/pipeline/dispatch-write.d.ts +4 -4
  362. package/dist/pipeline/dispatcher-utils.d.ts +2 -2
  363. package/dist/pipeline/dispatcher.d.ts +12 -12
  364. package/dist/pipeline/event-consumer-state.d.ts +1 -1
  365. package/dist/pipeline/event-dispatcher-admin.d.ts +1 -1
  366. package/dist/pipeline/event-dispatcher-delivery.d.ts +7 -7
  367. package/dist/pipeline/event-dispatcher.d.ts +7 -7
  368. package/dist/pipeline/event-retention.d.ts +1 -1
  369. package/dist/pipeline/handler-access-error.d.ts +2 -2
  370. package/dist/pipeline/index.d.ts +42 -42
  371. package/dist/pipeline/irreversible-operation-gate.d.ts +1 -1
  372. package/dist/pipeline/lifecycle-pipeline.d.ts +2 -2
  373. package/dist/pipeline/member-read-only-transaction.d.ts +2 -2
  374. package/dist/pipeline/member-reader.d.ts +5 -5
  375. package/dist/pipeline/msp-rebuild.d.ts +4 -4
  376. package/dist/pipeline/multi-stream-apply-context.d.ts +3 -3
  377. package/dist/pipeline/notify-scope.d.ts +3 -3
  378. package/dist/pipeline/pending-gap-ranges.d.ts +2 -2
  379. package/dist/pipeline/pre-handler-gates.d.ts +3 -3
  380. package/dist/pipeline/pre-transaction-reservations.d.ts +4 -4
  381. package/dist/pipeline/projection-rebuild.d.ts +3 -3
  382. package/dist/pipeline/projection-state.d.ts +1 -1
  383. package/dist/pipeline/projections-runner.d.ts +3 -3
  384. package/dist/pipeline/projections-runner.js +3 -4
  385. package/dist/pipeline/system-hooks.d.ts +4 -4
  386. package/dist/pipeline/system-identity-switch.d.ts +3 -3
  387. package/dist/pipeline/tenant-timezone-cache.d.ts +1 -1
  388. package/dist/pipeline/write-origin.d.ts +3 -3
  389. package/dist/pipeline/write-result-masking.d.ts +2 -2
  390. package/dist/random/index.d.ts +2 -2
  391. package/dist/rate-limit/bucket.d.ts +1 -1
  392. package/dist/rate-limit/index.d.ts +3 -3
  393. package/dist/rate-limit/middleware.d.ts +3 -3
  394. package/dist/redis/cache-sync-bus.d.ts +2 -2
  395. package/dist/redis/cache-sync-topics.d.ts +1 -1
  396. package/dist/redis/index.d.ts +8 -8
  397. package/dist/redis/pubsub-signal.d.ts +1 -1
  398. package/dist/schema-cli.d.ts +1 -1
  399. package/dist/schema-cli.js +9 -1
  400. package/dist/search/derive-search-adapter-config.d.ts +2 -2
  401. package/dist/search/in-memory-adapter.d.ts +1 -1
  402. package/dist/search/index.d.ts +6 -6
  403. package/dist/search/meilisearch-adapter.d.ts +2 -2
  404. package/dist/search/purge-subject.d.ts +4 -4
  405. package/dist/search/reindex-entity.d.ts +3 -3
  406. package/dist/secrets/dek-cache.d.ts +1 -1
  407. package/dist/secrets/env-master-key-provider.d.ts +1 -1
  408. package/dist/secrets/env-master-key-provider.js +26 -11
  409. package/dist/secrets/envelope-cipher.d.ts +2 -2
  410. package/dist/secrets/envelope.d.ts +1 -1
  411. package/dist/secrets/index.d.ts +9 -9
  412. package/dist/secrets/rotation.d.ts +1 -1
  413. package/dist/secrets/stored-envelope.d.ts +1 -1
  414. package/dist/seeding/entity-seed.d.ts +1 -1
  415. package/dist/seeding/index.d.ts +3 -3
  416. package/dist/seeding/seed-users.d.ts +1 -1
  417. package/dist/time/index.d.ts +6 -6
  418. package/dist/ui-types/app-schema.d.ts +5 -5
  419. package/dist/ui-types/index.d.ts +23 -23
  420. package/dist/upgrade-cli.js +13 -3
  421. package/dist/utils/index.d.ts +9 -9
  422. package/package.json +19 -66
  423. package/presets/biome-app.json +80 -0
  424. package/presets/tsconfig.app.json +19 -0
  425. package/src/changes.json +78 -2
  426. package/src/scripts/codemod/README.md +18 -0
  427. package/src/scripts/codemod/codemod-support.ts +1 -1
  428. package/src/scripts/codemod/db-factory.ts +1 -1
  429. package/src/scripts/codemod/feature-factory.ts +1 -1
  430. package/src/scripts/codemod/import-extensions.ts +118 -0
  431. package/src/scripts/codemod/migrate-cross-tenant.ts +2 -2
  432. package/src/scripts/codemod/migrate-db-raw.ts +1 -1
  433. package/src/scripts/codemod/migrate-open-to-all.ts +1 -1
  434. package/src/scripts/codemod/object-form.ts +1 -1
  435. package/src/scripts/codemod/s3-imports.ts +1 -1
  436. package/src/scripts/codemod/tenant-db-options.ts +1 -1
  437. package/src/scripts/codemod/testing-move.ts +2 -2
  438. package/dist/db/bun-db-deprecated.d.ts +0 -10
  439. package/dist/db/bun-db-deprecated.js +0 -5
  440. package/dist/stack/index.d.ts +0 -10
  441. package/dist/stack/index.js +0 -11
  442. package/dist/testing/e2e-generator.d.ts +0 -5
  443. package/dist/testing/e2e-generator.js +0 -5
  444. package/dist/testing/handler-context.d.ts +0 -5
  445. package/dist/testing/handler-context.js +0 -5
  446. package/dist/testing/index.d.ts +0 -10
  447. package/dist/testing/index.js +0 -10
  448. package/dist/testing/real-providers.d.ts +0 -5
  449. package/dist/testing/real-providers.js +0 -5
@@ -1,4 +1,4 @@
1
- import type { FeatureDefinition, NavDefinition, ScreenDefinition, WorkspaceDefinition } from "../engine/types/index.js";
1
+ import type { FeatureDefinition, NavDefinition, ScreenDefinition, WorkspaceDefinition } from "../engine/types/index.ts";
2
2
  /** Pseudo-entity for actionForm field labels (renderer action-form-shim). */
3
3
  export declare const ACTION_FORM_ENTITY = "__action-form__";
4
4
  /** Pseudo-entity for configEdit field labels (renderer config-edit-shim). */
@@ -1,4 +1,4 @@
1
- import type { TranslationKeys } from "../engine/types/config.js";
1
+ import type { TranslationKeys } from "../engine/types/config.ts";
2
2
  /**
3
3
  * Settings-Hub chrome keys (parent-nav labels, secrets-screen title/strings)
4
4
  * needed by ANY app that mounts a foundation feature producing a hub nav —
@@ -1,12 +1,12 @@
1
- export { createDbConnection } from "../db/connection.js";
2
- export { createDatabase, databaseExists, dropDatabaseIfExists, truncateTablesRestartIdentity, } from "../db/queries/test-stack.js";
3
- export { type AnyDb, isClosedConnectionError } from "../db/query.js";
4
- export { columnNamesOf } from "../db/schema-inspection.js";
5
- export { schemaTableName } from "../db/table-introspection.js";
6
- export { addMissingColumns, addMissingIndexes, tableToMeta, unsafeCreateEntityTable, unsafeEnsureEntityTable, unsafePushTables, } from "../db/table-push.js";
7
- export { SEARCHABLE_FALSE_WHITELIST } from "../engine/boot-validator/entity-list-screens.js";
8
- export { validateNavBootSubset } from "../engine/boot-validator/index.js";
9
- export { validateOwnershipBoot } from "../engine/boot-validator/ownership.js";
10
- export { featureHasI18nSurface, requiredKeysFromFeature } from "../i18n/required-surface-keys.js";
11
- export type { Lifecycle } from "../lifecycle/index.js";
12
- export { createRateLimitResolver } from "../rate-limit/index.js";
1
+ export { createDbConnection } from "../db/connection.ts";
2
+ export { createDatabase, databaseExists, dropDatabaseIfExists, truncateTablesRestartIdentity, } from "../db/queries/test-stack.ts";
3
+ export { type AnyDb, isClosedConnectionError } from "../db/query.ts";
4
+ export { columnNamesOf } from "../db/schema-inspection.ts";
5
+ export { schemaTableName } from "../db/table-introspection.ts";
6
+ export { addMissingColumns, addMissingIndexes, tableToMeta, unsafeCreateEntityTable, unsafeEnsureEntityTable, unsafePushTables, } from "../db/table-push.ts";
7
+ export { SEARCHABLE_FALSE_WHITELIST } from "../engine/boot-validator/entity-list-screens.ts";
8
+ export { validateNavBootSubset } from "../engine/boot-validator/index.ts";
9
+ export { validateOwnershipBoot } from "../engine/boot-validator/ownership.ts";
10
+ export { featureHasI18nSurface, requiredKeysFromFeature } from "../i18n/required-surface-keys.ts";
11
+ export type { Lifecycle } from "../lifecycle/index.ts";
12
+ export { createRateLimitResolver } from "../rate-limit/index.ts";
@@ -1,4 +1,4 @@
1
- export { resetBlindIndexKeyForTests } from "../crypto/blind-index.js";
2
- export { resetEventPiiCatalogForTests } from "../crypto/event-pii.js";
3
- export { resetPiiSubjectKmsForTests } from "../crypto/pii-field-encryption.js";
4
- export { resetEntityFieldEncryptionCacheForTests } from "../db/entity-field-encryption.js";
1
+ export { resetBlindIndexKeyForTests } from "../crypto/blind-index.ts";
2
+ export { resetEventPiiCatalogForTests } from "../crypto/event-pii.ts";
3
+ export { resetPiiSubjectKmsForTests } from "../crypto/pii-field-encryption.ts";
4
+ export { resetEntityFieldEncryptionCacheForTests } from "../db/entity-field-encryption.ts";
@@ -1,2 +1,2 @@
1
- export type { JobDroppedMeta, JobLogEntry, JobMeta, JobOutcomeMeta, JobQueuedMeta, JobRunner, JobRunnerOptions, JobSubjectValue, } from "./job-runner.js";
2
- export { createJobRunner, serializeJobSubject } from "./job-runner.js";
1
+ export type { JobDroppedMeta, JobLogEntry, JobMeta, JobOutcomeMeta, JobQueuedMeta, JobRunner, JobRunnerOptions, JobSubjectValue, } from "./job-runner.ts";
2
+ export { createJobRunner, serializeJobSubject } from "./job-runner.ts";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="temporal-polyfill/global" preserve="true" />
2
- import { type AppContext, type DispatchWriteRef, type JobRunIn, type JobTriggerEvent, type Registry, type SessionUser, type TenantId } from "../engine/types/index.js";
2
+ import { type AppContext, type DispatchWriteRef, type JobRunIn, type JobTriggerEvent, type Registry, type SessionUser, type TenantId } from "../engine/types/index.ts";
3
3
  /**
4
4
  * BullMQ job ids are `repeat:<schedulerId>:<millis>`. Colons inside the
5
5
  * scheduler id push the segment count to ≥5, which BullMQ's legacy heuristic
@@ -1,4 +1,4 @@
1
- import type { JobDefinition } from "../engine/types/index.js";
1
+ import type { JobDefinition } from "../engine/types/index.ts";
2
2
  export declare const DEFAULT_MAX_PER_TENANT_DEFER_MS = 1000;
3
3
  export type ResolvedMaxPerTenant = {
4
4
  readonly limit: number;
@@ -1,2 +1,2 @@
1
- export { createLifecycle, type Lifecycle, type LifecycleOptions, type LifecycleState, type ShutdownHookFn, type StateChangeListener, } from "./lifecycle.js";
2
- export { type AttachSignalHandlersOptions, attachSignalHandlers, type SignalHandlerHandle, } from "./signal-handlers.js";
1
+ export { createLifecycle, type Lifecycle, type LifecycleOptions, type LifecycleState, type ShutdownHookFn, type StateChangeListener, } from "./lifecycle.ts";
2
+ export { type AttachSignalHandlersOptions, attachSignalHandlers, type SignalHandlerHandle, } from "./signal-handlers.ts";
@@ -1,4 +1,4 @@
1
- import type { Logger } from "../logging/types.js";
1
+ import type { Logger } from "../logging/types.ts";
2
2
  export type LifecycleState = "starting" | "ready" | "draining" | "stopped";
3
3
  export type StateChangeListener = (from: LifecycleState, to: LifecycleState) => void;
4
4
  export type ShutdownHookFn = (signal: string) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Lifecycle } from "./lifecycle.js";
1
+ import type { Lifecycle } from "./lifecycle.ts";
2
2
  export type AttachSignalHandlersOptions = {
3
3
  readonly timeoutMs?: number;
4
4
  readonly signals?: readonly NodeJS.Signals[];
@@ -1,4 +1,4 @@
1
- export type { LoggerOptions } from "./pino-logger.js";
2
- export { createLogger } from "./pino-logger.js";
3
- export type { Logger } from "./types.js";
4
- export { createFallbackLogger } from "./utils.js";
1
+ export type { LoggerOptions } from "./pino-logger.ts";
2
+ export { createLogger } from "./pino-logger.ts";
3
+ export type { Logger } from "./types.ts";
4
+ export { createFallbackLogger } from "./utils.ts";
@@ -1,5 +1,5 @@
1
1
  import { type DestinationStream } from "pino";
2
- import type { Logger } from "./types.js";
2
+ import type { Logger } from "./types.ts";
3
3
  export type LoggerOptions = {
4
4
  level?: "debug" | "info" | "warn" | "error";
5
5
  pretty?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Logger } from "./types.js";
1
+ import type { Logger } from "./types.ts";
2
2
  type FallbackLogger = {
3
3
  error(msg: string, data?: Record<string, unknown>): void;
4
4
  warn(msg: string, data?: Record<string, unknown>): void;
@@ -1,4 +1,4 @@
1
- export { assertKumikoSchemaCurrent, type ChecksumMismatch, detectKumikoDrift, formatKumikoDriftReport, type KumikoDriftReport, SchemaDriftError, } from "./kumiko-drift.js";
2
- export { createPendingRebuildsTable, type EnqueueProjectionRebuildDeps, type EnqueueProjectionRebuildResult, enqueueProjectionRebuild, listPendingRebuilds, type PendingRebuildRun, PROJECTION_REBUILD_JOB, pendingRebuildsTable, queueRebuildsFromMarkers, type RunPendingRebuildsOptions, rebuildProjectionOrMultiStream, reportPendingRebuildRun, runPendingRebuilds, } from "./pending-rebuilds.js";
3
- export { createPiiBackfillStateTable, type PiiEventBackfillOptions, type PiiEventBackfillResult, type PiiRebuildRun, piiAnnotationFingerprint, piiBackfillStateTable, runPiiEventBackfill, } from "./pii-event-backfill.js";
4
- export { buildProjectionTableIndex } from "./projection-table-index.js";
1
+ export { assertKumikoSchemaCurrent, type ChecksumMismatch, detectKumikoDrift, formatKumikoDriftReport, type KumikoDriftReport, SchemaDriftError, } from "./kumiko-drift.ts";
2
+ export { createPendingRebuildsTable, type EnqueueProjectionRebuildDeps, type EnqueueProjectionRebuildResult, enqueueProjectionRebuild, listPendingRebuilds, type PendingRebuildRun, PROJECTION_REBUILD_JOB, pendingRebuildsTable, queueRebuildsFromMarkers, type RunPendingRebuildsOptions, rebuildProjectionOrMultiStream, reportPendingRebuildRun, runPendingRebuilds, } from "./pending-rebuilds.ts";
3
+ export { createPiiBackfillStateTable, type PiiEventBackfillOptions, type PiiEventBackfillResult, type PiiRebuildRun, piiAnnotationFingerprint, piiBackfillStateTable, runPiiEventBackfill, } from "./pii-event-backfill.ts";
4
+ export { buildProjectionTableIndex } from "./projection-table-index.ts";
@@ -1,4 +1,4 @@
1
- import type { DbConnection } from "../db/connection.js";
1
+ import type { DbConnection } from "../db/connection.ts";
2
2
  export type ChecksumMismatch = {
3
3
  readonly id: string;
4
4
  readonly expected: string;
@@ -1,8 +1,8 @@
1
- import type { DbConnection } from "../db/connection.js";
2
- import type { Registry } from "../engine/types/index.js";
3
- import type { JobRunner } from "../jobs/index.js";
4
- import type { Logger } from "../logging/types.js";
5
- import { type RebuildResult } from "../pipeline/index.js";
1
+ import type { DbConnection } from "../db/connection.ts";
2
+ import type { Registry } from "../engine/types/index.ts";
3
+ import type { JobRunner } from "../jobs/index.ts";
4
+ import type { Logger } from "../logging/types.ts";
5
+ import { type RebuildResult } from "../pipeline/index.ts";
6
6
  export declare const pendingRebuildsTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
7
7
  export declare function createPendingRebuildsTable(db: DbConnection): Promise<void>;
8
8
  /** Liest die rebuild-Marker der frisch applizierten Migrations und queued
@@ -1,7 +1,7 @@
1
- import type { DbConnection } from "../db/connection.js";
2
- import { type PiiBackfillFailure } from "../db/queries/backfill-pii.js";
3
- import type { Registry } from "../engine/types/index.js";
4
- import type { Logger } from "../logging/types.js";
1
+ import type { DbConnection } from "../db/connection.ts";
2
+ import { type PiiBackfillFailure } from "../db/queries/backfill-pii.ts";
3
+ import type { Registry } from "../engine/types/index.ts";
4
+ import type { Logger } from "../logging/types.ts";
5
5
  export declare const piiBackfillStateTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
6
6
  export declare function createPiiBackfillStateTable(db: DbConnection): Promise<void>;
7
7
  export declare function piiAnnotationEntries(registry: Registry): readonly string[];
@@ -1,4 +1,4 @@
1
- import type { Registry } from "../engine/types/feature.js";
1
+ import type { Registry } from "../engine/types/feature.ts";
2
2
  /** Index `tableName → projection-name` aus der Registry. Nur Projections mit
3
3
  * table-Definition (single-stream + multi-stream-with-table) zählen.
4
4
  * Side-effect-only MSPs (table omitted) haben keinen Rebuild-Sinn. */
@@ -1,4 +1,4 @@
1
- import type { ObservabilityOptions, ObservabilityProvider } from "./types/index.js";
1
+ import type { ObservabilityOptions, ObservabilityProvider } from "./types/index.ts";
2
2
  type ConsoleWriter = {
3
3
  readonly log: (line: string) => void;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { Span } from "./types/index.js";
1
+ import type { Span } from "./types/index.ts";
2
2
  type ObservabilityContextData = {
3
3
  readonly activeSpan?: Span;
4
4
  };
@@ -1,6 +1,6 @@
1
- import type { EscapeHatchAuditSink, EscapeHatchKind, EscapeHatchReporter, EscapeHatchUseEvent, TenantId } from "../engine/types/index.js";
2
- import type { Logger } from "../logging/types.js";
3
- import type { Meter } from "./types/index.js";
1
+ import type { EscapeHatchAuditSink, EscapeHatchKind, EscapeHatchReporter, EscapeHatchUseEvent, TenantId } from "../engine/types/index.ts";
2
+ import type { Logger } from "../logging/types.ts";
3
+ import type { Meter } from "./types/index.ts";
4
4
  export declare const ESCAPE_HATCH_USED_SIGNAL = "security:escape-hatch-used";
5
5
  export type EscapeHatchReportWindow = {
6
6
  shouldReport(key: string, nowMs: number): boolean;
@@ -1,4 +1,4 @@
1
- import type { Meter, ObservabilityProvider, Tracer } from "./types/index.js";
1
+ import type { Meter, ObservabilityProvider, Tracer } from "./types/index.ts";
2
2
  export declare function getFallbackProvider(): ObservabilityProvider;
3
3
  export declare function getFallbackTracer(): Tracer;
4
4
  export declare function getFallbackMeter(): Meter;
@@ -1,16 +1,16 @@
1
- export { type ConsoleProviderOptions, createConsoleProvider } from "./console-provider.js";
2
- export { observabilityContext } from "./context.js";
3
- export { createEscapeHatchProcessDedup, createEscapeHatchReporter, createEscapeHatchReportWindow, ESCAPE_HATCH_USED_SIGNAL, type EscapeHatchProcessDedup, type EscapeHatchReportWindow, fallbackEscapeHatchReporter, flushEscapeHatchAudits, reportEscapeHatchUse, UNATTRIBUTED_ACTOR, withEscapeHatchAuditScope, } from "./escape-hatch-report.js";
4
- export { getFallbackMeter, getFallbackProvider, getFallbackTracer } from "./fallback.js";
5
- export { generateSpanId, generateTraceId } from "./ids.js";
6
- export { buildMetricName, validateLabelKey, validateMetricName, } from "./metric-validator.js";
7
- export { createMetricsForFactory, createMetricsHandle, createNoopMetricsHandle, createSafeMetricsHandle, createUnboundMetricsHandle, } from "./metrics-handle.js";
8
- export { type ObservabilityWiring, prometheusMetricsEnvSchema, resolveObservabilityWiring, } from "./metrics-wiring.js";
9
- export { createNoopProvider } from "./noop-provider.js";
10
- export { createPrometheusMeter, type PrometheusMeter, type PrometheusMeterSnapshot, serializeOpenMetrics, } from "./prometheus-meter.js";
11
- export { type MetricEvent, type MetricEventHandler, RecordingMeter, } from "./recording-meter.js";
12
- export { type RecordedSpan, RecordingTracer, type RecordingTracerOptions, serializeSpanContext, } from "./recording-tracer.js";
13
- export { wrapRedisClient } from "./redis-wrapper.js";
14
- export { DEFAULT_SENSITIVE_CONFIG, mergeSensitiveConfig, REDACTED, redactAttributes, redactHeaders, redactQueryString, redactValue, shouldRedactAttribute, } from "./sensitive-filter.js";
15
- export { emitDbQuery, emitDispatcherError, emitDispatcherHandler, emitEscapeHatchUse, emitEventConsumerLag, emitEventConsumerPassOutcome, emitEventConsumerPassSkipped, emitEventConsumerPendingGaps, emitEventConsumerRearmExhausted, emitEventDispatcherListenConnected, emitHttpRequest, emitJobLastSuccess, emitJobQueueDepth, registerStandardMetrics, STANDARD_METRIC_DEFS, } from "./standard-metrics.js";
16
- export type { Counter, Gauge, Histogram, Meter, MetricDefinition, MetricLabels, MetricsHandle, MetricType, ObservabilityOptions, ObservabilityProvider, SamplingConfig, SensitiveFilterConfig, SerializedTraceContext, Span, SpanAttributes, SpanAttributeValue, SpanKind, SpanStatus, StartSpanOptions, Tracer, } from "./types/index.js";
1
+ export { type ConsoleProviderOptions, createConsoleProvider } from "./console-provider.ts";
2
+ export { observabilityContext } from "./context.ts";
3
+ export { createEscapeHatchProcessDedup, createEscapeHatchReporter, createEscapeHatchReportWindow, ESCAPE_HATCH_USED_SIGNAL, type EscapeHatchProcessDedup, type EscapeHatchReportWindow, fallbackEscapeHatchReporter, flushEscapeHatchAudits, reportEscapeHatchUse, UNATTRIBUTED_ACTOR, withEscapeHatchAuditScope, } from "./escape-hatch-report.ts";
4
+ export { getFallbackMeter, getFallbackProvider, getFallbackTracer } from "./fallback.ts";
5
+ export { generateSpanId, generateTraceId } from "./ids.ts";
6
+ export { buildMetricName, validateLabelKey, validateMetricName, } from "./metric-validator.ts";
7
+ export { createMetricsForFactory, createMetricsHandle, createNoopMetricsHandle, createSafeMetricsHandle, createUnboundMetricsHandle, } from "./metrics-handle.ts";
8
+ export { type ObservabilityWiring, prometheusMetricsEnvSchema, resolveObservabilityWiring, } from "./metrics-wiring.ts";
9
+ export { createNoopProvider } from "./noop-provider.ts";
10
+ export { createPrometheusMeter, type PrometheusMeter, type PrometheusMeterSnapshot, serializeOpenMetrics, } from "./prometheus-meter.ts";
11
+ export { type MetricEvent, type MetricEventHandler, RecordingMeter, } from "./recording-meter.ts";
12
+ export { type RecordedSpan, RecordingTracer, type RecordingTracerOptions, serializeSpanContext, } from "./recording-tracer.ts";
13
+ export { wrapRedisClient } from "./redis-wrapper.ts";
14
+ export { DEFAULT_SENSITIVE_CONFIG, mergeSensitiveConfig, REDACTED, redactAttributes, redactHeaders, redactQueryString, redactValue, shouldRedactAttribute, } from "./sensitive-filter.ts";
15
+ export { emitDbQuery, emitDispatcherError, emitDispatcherHandler, emitEscapeHatchUse, emitEventConsumerLag, emitEventConsumerPassOutcome, emitEventConsumerPassSkipped, emitEventConsumerPendingGaps, emitEventConsumerRearmExhausted, emitEventDispatcherListenConnected, emitHttpRequest, emitJobLastSuccess, emitJobQueueDepth, registerStandardMetrics, STANDARD_METRIC_DEFS, } from "./standard-metrics.ts";
16
+ export type { Counter, Gauge, Histogram, Meter, MetricDefinition, MetricLabels, MetricsHandle, MetricType, ObservabilityOptions, ObservabilityProvider, SamplingConfig, SensitiveFilterConfig, SerializedTraceContext, Span, SpanAttributes, SpanAttributeValue, SpanKind, SpanStatus, StartSpanOptions, Tracer, } from "./types/index.ts";
@@ -1,4 +1,4 @@
1
- import type { MetricType } from "./types/index.js";
1
+ import type { MetricType } from "./types/index.ts";
2
2
  export declare function validateMetricName(name: string, type: MetricType): void;
3
3
  export declare function buildMetricName(featureName: string, shortName: string): string;
4
4
  export declare function validateLabelKey(key: string): void;
@@ -1,4 +1,4 @@
1
- import type { Meter, MetricsHandle } from "./types/index.js";
1
+ import type { Meter, MetricsHandle } from "./types/index.ts";
2
2
  export declare function createMetricsHandle(meter: Meter, featureName: string): MetricsHandle;
3
3
  export declare function createSafeMetricsHandle(meter: Meter, featureName: string): MetricsHandle;
4
4
  export declare function createUnboundMetricsHandle(meter: Meter): MetricsHandle;
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
- import { type PrometheusMeter } from "./prometheus-meter.js";
3
- import type { ObservabilityProvider } from "./types/index.js";
2
+ import { type PrometheusMeter } from "./prometheus-meter.ts";
3
+ import type { ObservabilityProvider } from "./types/index.ts";
4
4
  export declare const prometheusMetricsEnvSchema: z.ZodObject<{
5
5
  PROMETHEUS_METRICS_TOKEN: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodString]>>;
6
6
  }, z.core.$strip>;
@@ -1,2 +1,2 @@
1
- import type { ObservabilityProvider } from "./types/index.js";
1
+ import type { ObservabilityProvider } from "./types/index.ts";
2
2
  export declare function createNoopProvider(): ObservabilityProvider;
@@ -1,4 +1,4 @@
1
- import type { Meter, MetricDefinition, MetricLabels } from "./types/index.js";
1
+ import type { Meter, MetricDefinition, MetricLabels } from "./types/index.ts";
2
2
  type CounterState = {
3
3
  labels: MetricLabels | undefined;
4
4
  value: number;
@@ -1,4 +1,4 @@
1
- import type { Counter, Gauge, Histogram, Meter, MetricDefinition, MetricLabels } from "./types/index.js";
1
+ import type { Counter, Gauge, Histogram, Meter, MetricDefinition, MetricLabels } from "./types/index.ts";
2
2
  export type MetricEvent = {
3
3
  readonly type: "counter.inc";
4
4
  readonly name: string;
@@ -1,4 +1,4 @@
1
- import type { SensitiveFilterConfig, SerializedTraceContext, Span, SpanAttributeValue, SpanKind, SpanStatus, StartSpanOptions, Tracer } from "./types/index.js";
1
+ import type { SensitiveFilterConfig, SerializedTraceContext, Span, SpanAttributeValue, SpanKind, SpanStatus, StartSpanOptions, Tracer } from "./types/index.ts";
2
2
  export type RecordedSpan = {
3
3
  readonly traceId: string;
4
4
  readonly spanId: string;
@@ -1,3 +1,3 @@
1
1
  import type { Redis } from "ioredis";
2
- import type { Tracer } from "./types/index.js";
2
+ import type { Tracer } from "./types/index.ts";
3
3
  export declare function wrapRedisClient(client: Redis, tracer: Tracer): Redis;
@@ -1,4 +1,4 @@
1
- import type { SensitiveFilterConfig, SpanAttributeValue } from "./types/index.js";
1
+ import type { SensitiveFilterConfig, SpanAttributeValue } from "./types/index.ts";
2
2
  export declare const REDACTED = "[REDACTED]";
3
3
  export declare const DEFAULT_SENSITIVE_CONFIG: SensitiveFilterConfig;
4
4
  export declare function mergeSensitiveConfig(override: Partial<SensitiveFilterConfig> | undefined): SensitiveFilterConfig;
@@ -1,4 +1,4 @@
1
- import type { Meter, MetricDefinition } from "./types/index.js";
1
+ import type { Meter, MetricDefinition } from "./types/index.ts";
2
2
  export declare const STANDARD_METRIC_DEFS: readonly MetricDefinition[];
3
3
  export declare function registerStandardMetrics(meter: Meter): void;
4
4
  export declare function emitHttpRequest(meter: Meter, labels: {
@@ -1,7 +1,7 @@
1
- import { type PrincipalStatusPlugin, type TenantLifecycleStatusPlugin } from "../engine/active-membership.js";
2
- import type { TenantId } from "../engine/types/identifiers.js";
3
- import type { ActiveMembershipResult, Registry } from "../engine/types/index.js";
4
- import { type DispatchContext } from "./dispatch-shared.js";
1
+ import { type PrincipalStatusPlugin, type TenantLifecycleStatusPlugin } from "../engine/active-membership.ts";
2
+ import type { TenantId } from "../engine/types/identifiers.ts";
3
+ import type { ActiveMembershipResult, Registry } from "../engine/types/index.ts";
4
+ import { type DispatchContext } from "./dispatch-shared.ts";
5
5
  export type ActiveMembershipPolicy = {
6
6
  readonly allowPendingDestruction: boolean;
7
7
  readonly allowUnknownPrincipal: boolean;
@@ -1,6 +1,6 @@
1
- import type { DbRunner } from "../db/connection.js";
2
- import type { AppendEventArgs, Registry, TenantId } from "../engine/types/index.js";
3
- import { type StoredEvent } from "../event-store/event-store.js";
1
+ import type { DbRunner } from "../db/connection.ts";
2
+ import type { AppendEventArgs, Registry, TenantId } from "../engine/types/index.ts";
3
+ import { type StoredEvent } from "../event-store/event-store.ts";
4
4
  export type AppendDomainEventCoreDeps = {
5
5
  readonly registry: Registry;
6
6
  readonly db: DbRunner;
@@ -1,5 +1,5 @@
1
- import type { AuthClaimsContext, AuthClaimsHookDef, SessionUser } from "../engine/types/index.js";
2
- import type { Logger } from "../logging/types.js";
1
+ import type { AuthClaimsContext, AuthClaimsHookDef, SessionUser } from "../engine/types/index.ts";
2
+ import type { Logger } from "../logging/types.ts";
3
3
  export type ResolveAuthClaimsArgs = {
4
4
  readonly user: SessionUser;
5
5
  readonly hooks: readonly AuthClaimsHookDef[];
@@ -1,6 +1,6 @@
1
- import type { TableColumns } from "../db/dialect.js";
2
- import type { PreDeleteHookFn, Registry } from "../engine/types/index.js";
3
- import type { SystemHookDef } from "./lifecycle-pipeline.js";
1
+ import type { TableColumns } from "../db/dialect.ts";
2
+ import type { PreDeleteHookFn, Registry } from "../engine/types/index.ts";
3
+ import type { SystemHookDef } from "./lifecycle-pipeline.ts";
4
4
  type TableMap = ReadonlyMap<string, TableColumns<any>>;
5
5
  export declare function createCascadeDeleteHook(registry: Registry, tables: TableMap): SystemHookDef<PreDeleteHookFn>;
6
6
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { WriteOrigin } from "@cosmicdrift/kumiko-types/event-store-types";
2
- import type { SessionUser, WriteResult } from "../engine/types/index.js";
3
- import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.js";
2
+ import type { SessionUser, WriteResult } from "../engine/types/index.ts";
3
+ import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.ts";
4
4
  export declare function runBatch(ctx: DispatchContext, commands: readonly BatchCommand[], user: SessionUser, requestId?: string, inheritedOrigin?: WriteOrigin): Promise<BatchResult>;
5
5
  export declare function unwrapSingle(batchResult: BatchResult): WriteResult;
@@ -1,5 +1,5 @@
1
- import type { DbTx } from "../db/connection.js";
2
- import type { SessionUser } from "../engine/types/index.js";
3
- import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.js";
4
- import type { AfterCommitHook } from "./dispatcher-utils.js";
1
+ import type { DbTx } from "../db/connection.ts";
2
+ import type { SessionUser } from "../engine/types/index.ts";
3
+ import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.ts";
4
+ import type { AfterCommitHook } from "./dispatcher-utils.ts";
5
5
  export declare function executeQuery(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx?: DbTx, outerNotifySink?: AfterCommitHook[]): Promise<unknown>;
@@ -1,20 +1,20 @@
1
1
  import type { CacheSyncBus } from "@cosmicdrift/kumiko-types/cache-sync-types";
2
- import type { SseBroker } from "../api/sse-broker.js";
3
- import type { DbConnection, DbTx } from "../db/connection.js";
4
- import type { buildEntityTable } from "../db/table-builder.js";
5
- import type { defineTransitions } from "../engine/state-machine.js";
6
- import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.js";
7
- import type { TenantId } from "../engine/types/identifiers.js";
8
- import type { AppContext, HandlerContext, JobRunnerRef, PayloadRateLimitOption, RateLimitDeclaration, Registry, SessionUser, WriteResult } from "../engine/types/index.js";
9
- import { InternalError, type WriteErrorInfo } from "../errors/index.js";
10
- import { type EscapeHatchReportWindow, type getFallbackMeter, getFallbackTracer } from "../observability/index.js";
11
- import { type AfterCommitHook } from "./dispatcher-utils.js";
12
- import type { IdempotencyGuard } from "./idempotency.js";
13
- import type { LifecycleHooks } from "./lifecycle-pipeline.js";
14
- import type { TenantTimezoneCache } from "./tenant-timezone-cache.js";
15
- import { TENANT_TIMEZONE_CONFIG_KEY } from "./tenant-timezone-config-key.js";
16
- import { type WriteOrigin } from "./write-origin.js";
17
- export type { WriteOrigin } from "./write-origin.js";
2
+ import type { SseBroker } from "../api/sse-broker.ts";
3
+ import type { DbConnection, DbTx } from "../db/connection.ts";
4
+ import type { buildEntityTable } from "../db/table-builder.ts";
5
+ import type { defineTransitions } from "../engine/state-machine.ts";
6
+ import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.ts";
7
+ import type { TenantId } from "../engine/types/identifiers.ts";
8
+ import type { AppContext, HandlerContext, JobRunnerRef, PayloadRateLimitOption, RateLimitDeclaration, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
9
+ import { InternalError, type WriteErrorInfo } from "../errors/index.ts";
10
+ import { type EscapeHatchReportWindow, type getFallbackMeter, getFallbackTracer } from "../observability/index.ts";
11
+ import { type AfterCommitHook } from "./dispatcher-utils.ts";
12
+ import type { IdempotencyGuard } from "./idempotency.ts";
13
+ import type { LifecycleHooks } from "./lifecycle-pipeline.ts";
14
+ import type { TenantTimezoneCache } from "./tenant-timezone-cache.ts";
15
+ import { TENANT_TIMEZONE_CONFIG_KEY } from "./tenant-timezone-config-key.ts";
16
+ import { type WriteOrigin } from "./write-origin.ts";
17
+ export type { WriteOrigin } from "./write-origin.ts";
18
18
  export { TENANT_TIMEZONE_CONFIG_KEY };
19
19
  export declare const CONFIG_WRITE_SET_TYPE = "config:write:set";
20
20
  export declare const CONFIG_WRITE_RESET_TYPE = "config:write:reset";
@@ -62,7 +62,7 @@ export declare function buildHandlerContext(ctx: DispatchContext, type: string,
62
62
  export declare function createHandlerBoundDigest(digest: (value: string) => string, handlerName: string): (value: string) => string;
63
63
  export declare function runHandlerInstrumented<T>(ctx: DispatchContext, type: string, operation: "query" | "write" | "stream", user: SessionUser, inner: () => Promise<T>): Promise<T>;
64
64
  export declare function runStreamInstrumented<T>(ctx: DispatchContext, type: string, user: SessionUser, inner: () => AsyncGenerator<T>): AsyncGenerator<T>;
65
- export declare function checkFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<import("../errors/index.js").FeatureDisabledError | undefined>;
65
+ export declare function checkFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<import("../errors/index.ts").FeatureDisabledError | undefined>;
66
66
  export declare function ensureFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<void>;
67
67
  export declare function enforceRateLimit(ctx: DispatchContext, rateLimit: RateLimitDeclaration | undefined, handlerName: string, user: SessionUser, isSystemScope: boolean): Promise<void>;
68
68
  export declare function enforcePayloadRateLimits(ctx: DispatchContext, limits: readonly PayloadRateLimitOption[] | undefined, handlerName: string, user: SessionUser, data: unknown): Promise<void>;
@@ -1,5 +1,5 @@
1
- import type { SessionUser } from "../engine/types/index.js";
2
- import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.js";
1
+ import type { SessionUser } from "../engine/types/index.ts";
2
+ import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.ts";
3
3
  export type StreamOptions = {
4
4
  /** JWT exp (epoch seconds) the stream was opened with; the stream ends when it passes. */
5
5
  readonly tokenExpiresAtSec?: number | undefined;
@@ -1,6 +1,6 @@
1
- import type { DbTx } from "../db/connection.js";
2
- import type { SessionUser, WriteResult } from "../engine/types/index.js";
3
- import type { DispatchContext, WriteOrigin } from "./dispatch-shared.js";
4
- import { type AfterCommitHook } from "./dispatcher-utils.js";
1
+ import type { DbTx } from "../db/connection.ts";
2
+ import type { SessionUser, WriteResult } from "../engine/types/index.ts";
3
+ import type { DispatchContext, WriteOrigin } from "./dispatch-shared.ts";
4
+ import { type AfterCommitHook } from "./dispatcher-utils.ts";
5
5
  export declare function executeWrite(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx: DbTx | undefined, afterCommitHooks: AfterCommitHook[]): Promise<WriteResult>;
6
6
  export declare function executeNestedWrite(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx: DbTx | undefined, afterCommitHooks: AfterCommitHook[]): Promise<WriteResult>;
@@ -1,5 +1,5 @@
1
- import type { HandlerRef, LifecycleResult, Registry, SessionUser, WriteResult } from "../engine/types/index.js";
2
- import { type KumikoError, type WriteErrorInfo } from "../errors/index.js";
1
+ import type { HandlerRef, LifecycleResult, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
2
+ import { type KumikoError, type WriteErrorInfo } from "../errors/index.ts";
3
3
  export type FailedWriteResult = Extract<WriteResult, {
4
4
  isSuccess: false;
5
5
  }>;
@@ -1,16 +1,16 @@
1
1
  import type { CacheSyncBus } from "@cosmicdrift/kumiko-types/cache-sync-types";
2
- import type { SseBroker } from "../api/sse-broker.js";
3
- import type { DbConnection } from "../db/connection.js";
4
- import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.js";
5
- import type { TenantId } from "../engine/types/identifiers.js";
6
- import type { ActiveMembershipResult, AppContext, DispatchWriteRef, JobRunnerRef, MemberReader, Registry, SessionUser, WriteResult } from "../engine/types/index.js";
7
- import type { BatchCommand, BatchResult } from "./dispatch-shared.js";
8
- import { type StreamOptions } from "./dispatch-stream.js";
9
- import { type HandlerType } from "./dispatcher-utils.js";
10
- import type { IdempotencyGuard } from "./idempotency.js";
11
- import type { LifecycleHooks } from "./lifecycle-pipeline.js";
12
- export type { WriteResult } from "../engine/types/index.js";
13
- export type { BatchCommand, BatchResult } from "./dispatch-shared.js";
2
+ import type { SseBroker } from "../api/sse-broker.ts";
3
+ import type { DbConnection } from "../db/connection.ts";
4
+ import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.ts";
5
+ import type { TenantId } from "../engine/types/identifiers.ts";
6
+ import type { ActiveMembershipResult, AppContext, DispatchWriteRef, JobRunnerRef, MemberReader, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
7
+ import type { BatchCommand, BatchResult } from "./dispatch-shared.ts";
8
+ import { type StreamOptions } from "./dispatch-stream.ts";
9
+ import { type HandlerType } from "./dispatcher-utils.ts";
10
+ import type { IdempotencyGuard } from "./idempotency.ts";
11
+ import type { LifecycleHooks } from "./lifecycle-pipeline.ts";
12
+ export type { WriteResult } from "../engine/types/index.ts";
13
+ export type { BatchCommand, BatchResult } from "./dispatch-shared.ts";
14
14
  export type DispatcherOptions = {
15
15
  idempotency?: IdempotencyGuard;
16
16
  lifecycle?: LifecycleHooks;
@@ -1,4 +1,4 @@
1
- import type { DbConnection } from "../db/connection.js";
1
+ import type { DbConnection } from "../db/connection.ts";
2
2
  export declare const SHARED_INSTANCE_SENTINEL = "__shared__";
3
3
  export type PendingGapEntry = {
4
4
  readonly from: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="temporal-polyfill/global" preserve="true" />
2
- import type { DbConnection } from "../db/connection.js";
2
+ import type { DbConnection } from "../db/connection.ts";
3
3
  export type ConsumerRecoveryState = {
4
4
  readonly name: string;
5
5
  readonly instanceId: string;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="temporal-polyfill/global" preserve="true" />
2
2
  import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
3
- import type { DbConnection, DbRunner, DbTx } from "../db/connection.js";
4
- import { type PendingIdRange } from "../db/queries/event-store.js";
5
- import type { AppContext } from "../engine/types/index.js";
6
- import { type Meter } from "../observability/index.js";
7
- import { type PendingGapEntry } from "./event-consumer-state.js";
8
- import type { EventConsumer } from "./event-dispatcher.js";
3
+ import type { DbConnection, DbRunner, DbTx } from "../db/connection.ts";
4
+ import { type PendingIdRange } from "../db/queries/event-store.ts";
5
+ import type { AppContext } from "../engine/types/index.ts";
6
+ import { type Meter } from "../observability/index.ts";
7
+ import { type PendingGapEntry } from "./event-consumer-state.ts";
8
+ import type { EventConsumer } from "./event-dispatcher.ts";
9
9
  export type ConsumerStateRowShape = {
10
10
  readonly name: string;
11
11
  readonly instanceId: string;
@@ -28,7 +28,7 @@ export type StoredEventRow = {
28
28
  readonly type: string;
29
29
  readonly eventVersion: number;
30
30
  readonly payload: Record<string, unknown>;
31
- readonly metadata: import("../event-store/event-store.js").EventMetadata;
31
+ readonly metadata: import("../event-store/event-store.ts").EventMetadata;
32
32
  readonly createdAt: Temporal.Instant;
33
33
  readonly createdBy: string;
34
34
  };
@@ -1,7 +1,7 @@
1
- import type { PgListenClient } from "../db/connection.js";
2
- import type { AppContext } from "../engine/types/index.js";
3
- import { type StoredEvent } from "../event-store/index.js";
4
- import { type Meter, type Tracer } from "../observability/index.js";
1
+ import type { PgListenClient } from "../db/connection.ts";
2
+ import type { AppContext } from "../engine/types/index.ts";
3
+ import { type StoredEvent } from "../event-store/index.ts";
4
+ import { type Meter, type Tracer } from "../observability/index.ts";
5
5
  export type EventConsumerHandler = (event: StoredEvent, ctx: AppContext) => Promise<void>;
6
6
  export type EventConsumerBatchHandler = (events: readonly StoredEvent[], ctx: AppContext) => Promise<void>;
7
7
  export type EventConsumerErrorPolicy = {
@@ -35,7 +35,7 @@ export type EventDispatcher = {
35
35
  readonly consumers: readonly EventConsumer[];
36
36
  };
37
37
  export type EventDispatcherOptions = {
38
- readonly db: import("../db/connection.js").DbConnection;
38
+ readonly db: import("../db/connection.ts").DbConnection;
39
39
  readonly consumers: readonly EventConsumer[];
40
40
  readonly context: AppContext;
41
41
  readonly batchSize?: number;
@@ -49,5 +49,5 @@ export type EventDispatcherOptions = {
49
49
  readonly pgClient?: PgListenClient;
50
50
  };
51
51
  export declare function createEventDispatcher(options: EventDispatcherOptions): EventDispatcher;
52
- export type { ConsumerProgress, ConsumerRecoveryState } from "./event-dispatcher-admin.js";
53
- export { disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher-admin.js";
52
+ export type { ConsumerProgress, ConsumerRecoveryState } from "./event-dispatcher-admin.ts";
53
+ export { disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher-admin.ts";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="temporal-polyfill/global" preserve="true" />
2
- import type { DbConnection } from "../db/connection.js";
2
+ import type { DbConnection } from "../db/connection.ts";
3
3
  export type PruneEventsOptions = {
4
4
  readonly olderThan?: Temporal.Instant;
5
5
  readonly olderThanDays?: number;