@happyvertical/smrt-core 0.57.46 → 0.57.48

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 (189) hide show
  1. package/AGENTS.md +11 -3
  2. package/agents/browser-entry.md +16 -0
  3. package/agents/build-knowledge.md +58 -14
  4. package/agents/change-feed.md +20 -0
  5. package/agents/generators.md +69 -3
  6. package/agents/schema-paths.md +82 -0
  7. package/dist/_virtual/_rolldown/runtime.js +22 -1
  8. package/dist/browser.d.ts +2 -2
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.js +2 -2
  11. package/dist/cascade.d.ts +46 -0
  12. package/dist/cascade.d.ts.map +1 -1
  13. package/dist/cascade.js +96 -7
  14. package/dist/cascade.js.map +1 -1
  15. package/dist/change-feed.d.ts.map +1 -1
  16. package/dist/change-feed.js +7 -4
  17. package/dist/change-feed.js.map +1 -1
  18. package/dist/class.d.ts.map +1 -1
  19. package/dist/class.js +3 -3
  20. package/dist/class.js.map +1 -1
  21. package/dist/consumer-plugin/index.d.ts +13 -0
  22. package/dist/consumer-plugin/index.d.ts.map +1 -1
  23. package/dist/consumer-plugin/index.js +69 -13
  24. package/dist/consumer-plugin/index.js.map +1 -1
  25. package/dist/consumer-plugin.js +2 -2
  26. package/dist/database.d.ts.map +1 -1
  27. package/dist/database.js +3 -3
  28. package/dist/database.js.map +1 -1
  29. package/dist/dispatch/bus.d.ts.map +1 -1
  30. package/dist/dispatch/bus.js +1 -4
  31. package/dist/dispatch/bus.js.map +1 -1
  32. package/dist/dispatch/index.d.ts +1 -1
  33. package/dist/dispatch/index.d.ts.map +1 -1
  34. package/dist/dispatch/types.d.ts +22 -3
  35. package/dist/dispatch/types.d.ts.map +1 -1
  36. package/dist/generators/changes-route.d.ts.map +1 -1
  37. package/dist/generators/changes-route.js +2 -2
  38. package/dist/generators/changes-route.js.map +1 -1
  39. package/dist/generators/custom-action.d.ts +11 -0
  40. package/dist/generators/custom-action.d.ts.map +1 -1
  41. package/dist/generators/custom-action.js +23 -4
  42. package/dist/generators/custom-action.js.map +1 -1
  43. package/dist/index.d.ts +2 -2
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +3 -2
  46. package/dist/lazy-config.d.ts +120 -3
  47. package/dist/lazy-config.d.ts.map +1 -1
  48. package/dist/lazy-config.js +81 -10
  49. package/dist/lazy-config.js.map +1 -1
  50. package/dist/manifest/generator.d.ts +8 -2
  51. package/dist/manifest/generator.d.ts.map +1 -1
  52. package/dist/manifest/generator.js +6 -5
  53. package/dist/manifest/generator.js.map +1 -1
  54. package/dist/manifest/index.d.ts +1 -0
  55. package/dist/manifest/index.d.ts.map +1 -1
  56. package/dist/manifest/index.js +2 -1
  57. package/dist/manifest/index.js.map +1 -1
  58. package/dist/manifest/local-manifest-reader.d.ts +13 -2
  59. package/dist/manifest/local-manifest-reader.d.ts.map +1 -1
  60. package/dist/manifest/local-manifest-reader.js +38 -6
  61. package/dist/manifest/local-manifest-reader.js.map +1 -1
  62. package/dist/manifest/manifest-loader.d.ts +9 -8
  63. package/dist/manifest/manifest-loader.d.ts.map +1 -1
  64. package/dist/manifest/manifest-loader.js +67 -27
  65. package/dist/manifest/manifest-loader.js.map +1 -1
  66. package/dist/manifest/object-declarations.d.ts +116 -0
  67. package/dist/manifest/object-declarations.d.ts.map +1 -0
  68. package/dist/manifest/object-declarations.js +161 -0
  69. package/dist/manifest/object-declarations.js.map +1 -0
  70. package/dist/manifest/static-manifest.d.ts.map +1 -1
  71. package/dist/manifest/static-manifest.js +5 -3
  72. package/dist/manifest/static-manifest.js.map +1 -1
  73. package/dist/manifest/store.d.ts.map +1 -1
  74. package/dist/manifest/store.js +18 -2
  75. package/dist/manifest/store.js.map +1 -1
  76. package/dist/manifest/test-artifacts.d.ts +57 -0
  77. package/dist/manifest/test-artifacts.d.ts.map +1 -0
  78. package/dist/manifest/test-artifacts.js +111 -0
  79. package/dist/manifest/test-artifacts.js.map +1 -0
  80. package/dist/manifest.js +2 -1
  81. package/dist/manifest.json +5 -3
  82. package/dist/migrations/differ.d.ts.map +1 -1
  83. package/dist/migrations/differ.js +11 -3
  84. package/dist/migrations/differ.js.map +1 -1
  85. package/dist/migrations/index.d.ts +2 -0
  86. package/dist/migrations/index.d.ts.map +1 -1
  87. package/dist/migrations/index.js +3 -1
  88. package/dist/migrations/qualified-name-aliases.d.ts.map +1 -1
  89. package/dist/migrations/qualified-name-aliases.js +1 -1
  90. package/dist/migrations/qualified-name-aliases.js.map +1 -1
  91. package/dist/migrations.js +3 -1
  92. package/dist/object.d.ts.map +1 -1
  93. package/dist/object.js +2 -2
  94. package/dist/object.js.map +1 -1
  95. package/dist/postgres-permissions.d.ts.map +1 -1
  96. package/dist/postgres-permissions.js +4 -3
  97. package/dist/postgres-permissions.js.map +1 -1
  98. package/dist/postgres-timeouts.d.ts +30 -3
  99. package/dist/postgres-timeouts.d.ts.map +1 -1
  100. package/dist/postgres-timeouts.js +39 -2
  101. package/dist/postgres-timeouts.js.map +1 -1
  102. package/dist/prebuild/index.d.ts.map +1 -1
  103. package/dist/prebuild/index.js +14 -11
  104. package/dist/prebuild/index.js.map +1 -1
  105. package/dist/registry/class-registration.d.ts.map +1 -1
  106. package/dist/registry/class-registration.js +24 -2
  107. package/dist/registry/class-registration.js.map +1 -1
  108. package/dist/registry/collection-exposure.d.ts +27 -0
  109. package/dist/registry/collection-exposure.d.ts.map +1 -1
  110. package/dist/registry/collection-exposure.js +74 -1
  111. package/dist/registry/collection-exposure.js.map +1 -1
  112. package/dist/registry/collection-resolution.d.ts.map +1 -1
  113. package/dist/registry/collection-resolution.js +1 -0
  114. package/dist/registry/collection-resolution.js.map +1 -1
  115. package/dist/registry/framework-base-classes.d.ts.map +1 -1
  116. package/dist/registry/framework-base-classes.js +5 -0
  117. package/dist/registry/framework-base-classes.js.map +1 -1
  118. package/dist/registry/schema-builder.d.ts +8 -1
  119. package/dist/registry/schema-builder.d.ts.map +1 -1
  120. package/dist/registry/schema-builder.js +17 -4
  121. package/dist/registry/schema-builder.js.map +1 -1
  122. package/dist/registry/types.d.ts +12 -0
  123. package/dist/registry/types.d.ts.map +1 -1
  124. package/dist/registry.d.ts +2 -1
  125. package/dist/registry.d.ts.map +1 -1
  126. package/dist/registry.js +30 -10
  127. package/dist/registry.js.map +1 -1
  128. package/dist/scanner/manifest-generator.d.ts.map +1 -1
  129. package/dist/scanner/manifest-generator.js +10 -8
  130. package/dist/scanner/manifest-generator.js.map +1 -1
  131. package/dist/scanner/types.d.ts +29 -0
  132. package/dist/scanner/types.d.ts.map +1 -1
  133. package/dist/scanner/types.js.map +1 -1
  134. package/dist/schema/generator.d.ts +32 -0
  135. package/dist/schema/generator.d.ts.map +1 -1
  136. package/dist/schema/generator.js +59 -0
  137. package/dist/schema/generator.js.map +1 -1
  138. package/dist/schema/live-parity.d.ts.map +1 -1
  139. package/dist/schema/live-parity.js +4 -2
  140. package/dist/schema/live-parity.js.map +1 -1
  141. package/dist/scripts/browser-unbundled-dev.mjs +90 -0
  142. package/dist/scripts/generate-test-manifest.js +9 -49
  143. package/dist/smrt-knowledge.json +16 -16
  144. package/dist/system/compatibility.d.ts.map +1 -1
  145. package/dist/system/compatibility.js +12 -4
  146. package/dist/system/compatibility.js.map +1 -1
  147. package/dist/system/schema.d.ts +70 -8
  148. package/dist/system/schema.d.ts.map +1 -1
  149. package/dist/system/schema.js +231 -24
  150. package/dist/system/schema.js.map +1 -1
  151. package/dist/testing/database.d.ts.map +1 -1
  152. package/dist/testing/database.js +14 -2
  153. package/dist/testing/database.js.map +1 -1
  154. package/dist/tools/tool-generator.d.ts.map +1 -1
  155. package/dist/tools/tool-generator.js +2 -2
  156. package/dist/tools/tool-generator.js.map +1 -1
  157. package/dist/utils/import-workspace-module.d.ts.map +1 -1
  158. package/dist/utils/import-workspace-module.js +23 -0
  159. package/dist/utils/import-workspace-module.js.map +1 -1
  160. package/dist/utils/naming.js +5 -3
  161. package/dist/utils/naming.js.map +1 -1
  162. package/dist/vendor/pluralize/pluralize.js +421 -0
  163. package/dist/vendor/pluralize/pluralize.js.map +1 -0
  164. package/dist/vite-plugin/api-client-entries.d.ts +5 -1
  165. package/dist/vite-plugin/api-client-entries.d.ts.map +1 -1
  166. package/dist/vite-plugin/api-client-entries.js +11 -6
  167. package/dist/vite-plugin/api-client-entries.js.map +1 -1
  168. package/dist/vite-plugin/consumer-import.d.ts +28 -0
  169. package/dist/vite-plugin/consumer-import.d.ts.map +1 -0
  170. package/dist/vite-plugin/consumer-import.js +42 -0
  171. package/dist/vite-plugin/consumer-import.js.map +1 -0
  172. package/dist/vite-plugin/dev-plane-route.d.ts +6 -1
  173. package/dist/vite-plugin/dev-plane-route.d.ts.map +1 -1
  174. package/dist/vite-plugin/dev-plane-route.js +8 -9
  175. package/dist/vite-plugin/dev-plane-route.js.map +1 -1
  176. package/dist/vite-plugin/index.d.ts.map +1 -1
  177. package/dist/vite-plugin/index.js +12 -9
  178. package/dist/vite-plugin/index.js.map +1 -1
  179. package/dist/vite-plugin/resources-route.d.ts.map +1 -1
  180. package/dist/vite-plugin/resources-route.js +3 -8
  181. package/dist/vite-plugin/resources-route.js.map +1 -1
  182. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  183. package/dist/vite-plugin/sveltekit-generator.js +7 -11
  184. package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
  185. package/dist/vite-plugin/sync-apply-route.d.ts +16 -0
  186. package/dist/vite-plugin/sync-apply-route.d.ts.map +1 -1
  187. package/dist/vite-plugin/sync-apply-route.js +48 -6
  188. package/dist/vite-plugin/sync-apply-route.js.map +1 -1
  189. package/package.json +12 -12
package/AGENTS.md CHANGED
@@ -138,12 +138,19 @@ and repository rules.
138
138
  overwrites (#4145, `issue-4145-*.test.ts`). The schema
139
139
  planner rejects a table claimed by two unrelated classes
140
140
  (`CONFIG_TABLE_NAME_COLLISION`): only one STI family shares a table (#3098);
141
- collections (including `SmrtReportCollection`) never claim one. Consumer
141
+ collections (including `SmrtReportCollection`) never claim one. The scanner
142
+ stamps each collection entry with `collectionOf` (its model) and the
143
+ registry's collection classifier trusts it first, so a collection stays a
144
+ non-owner even when runtime cannot walk its parent or holds another core
145
+ copy's `SmrtCollection` (#3956, `issue-3956-*.test.ts`). Consumer
142
146
  gates: `registry/__tests__/issue-3110-*.test.ts`, `issue-3109-*.test.ts`,
143
147
  `packages/bundle-gate/src/__tests__/consumer-same-name.spec.ts`.
144
148
  - A collection class never publishes more than its model: unset surfaces
145
149
  inherit the model's, and the build rejects a collection that opens a CRUD
146
- write its model closes. See `agents/generators.md` (Collection exposure).
150
+ write its model closes. Inherited surfaces (`inheritedExposure`) keep
151
+ following the model at runtime and collection CRUD is capped to the model's,
152
+ so closing a model closes its collection's tools (#3468). See
153
+ `agents/generators.md` (Collection exposure).
147
154
  - A model subclass (STI child or CTI subclass) never publishes more than its
148
155
  parent model: unset surfaces and `sensitive` inherit the parent's, and the
149
156
  build rejects a subclass that widens them unless it names each operation in
@@ -157,7 +164,8 @@ and repository rules.
157
164
  `expose: true` bypasses the heuristic ALONE, and an explicit `api.include` or
158
165
  `api.routes` entry keeps its pre-#2686 route. Fail closed on scanner
159
166
  uncertainty: read `parameters[].typeUnresolved`, never the `'any'` it
160
- substitutes. Accepting `Date` as wire-able and hydrating it
167
+ substitutes. Custom-action schemas and decoders read
168
+ `declaredParameterType()`, not `parameter.type` (#4327). Accepting `Date` as wire-able and hydrating it
161
169
  (`toCustomActionDate`) are one decision — changing either breaks the other.
162
170
  The runtime `APIGenerator` transport stays declaration-gated: `rest.ts`
163
171
  dispatch and `preflight-route.ts` prediction both read
@@ -19,6 +19,19 @@ package build. Bundling it under `dist/node_modules` leaves dangling imports
19
19
  when npm excludes that directory from tarballs. The packed MCP consumer tests
20
20
  the installed relative-import closure and real SHA-256 execution with normal and CI prepack paths (#4008).
21
21
 
22
+ CommonJS runtime dependencies are bundled, not external (#4054). Consumers
23
+ that exclude smrt-core from Vite dependency pre-bundling (#3843) receive
24
+ `dist/*.js` as native browser ESM, where a bare import of a CommonJS package
25
+ fails (`does not provide an export named 'default'`). `pluralize` is
26
+ therefore not in `vite.config.ts` `external`; its converted module is emitted
27
+ under `dist/vendor/` (the `entryFileNames` rule maps any bundled
28
+ `node_modules/` module there, since npm never packs `dist/node_modules`), and
29
+ it is a devDependency. `pnpm test:browser` also runs
30
+ `scripts/browser-unbundled-dev.mjs`, which serves `dist/utils/naming.js`
31
+ unbundled from a real Vite dev server (no dependency discovery) and evaluates
32
+ it in Chromium. A new CommonJS runtime dependency on a browser-reachable path
33
+ follows the same rule.
34
+
22
35
  ## How a Node-only dependency stays out
23
36
 
24
37
  Never import it statically from a module the browser graph reaches. Pick one:
@@ -47,3 +60,6 @@ not emit it), and a `browser` mapping; `browser-field.test.ts` checks all three.
47
60
  - The embedded write queue runs unqueued without async-local state; its only
48
61
  browser database, PGlite, serializes statements itself.
49
62
  - `smrt-config`'s browser loader resolves to `{}`; use `setConfig()`.
63
+ - The whole browser entry does not yet evaluate unbundled: several modules
64
+ read `process.env` at module scope, and `@happyvertical/utils` imports
65
+ CommonJS `pluralize` itself (#4534).
@@ -121,6 +121,25 @@ that declares `svelte` anyway only loses an optional context import.
121
121
  Transitive-only object modules are loaded through `importSmrtDependency()`
122
122
  from their provider's context, which needs no root import.
123
123
 
124
+ **TypeScript-source providers are Vite-only (#3092).** A workspace package
125
+ linked into the consumer may export TypeScript source (`"import":
126
+ "./src/index.ts"`). Plain Node cannot evaluate it as a provider (no `./x.js` →
127
+ `./x.ts` rewriting, no type stripping under `node_modules`, no decorator
128
+ stripping), so any register import whose target resolves to `.ts`/`.mts`/
129
+ `.cts`/`.tsx` (`resolvesToTypeScriptSource`, ESM `import` conditions from the
130
+ consumer, or from the provider for transitive modules) is emitted as
131
+ `SMRT_VITE_RUNTIME ? await import(...) : {}` with `SMRT_VITE_RUNTIME =
132
+ Boolean(import.meta.env)`, and its export/collection consistency throws are
133
+ gated the same way. Vite SSR therefore registers those constructors exactly as
134
+ before, while `smrt db:migrate` and CLIs load the register, warn once on
135
+ stderr, and rely on `.smrt/manifest.json` for those objects. Generation warns
136
+ too. Not covered: the compiled worker artifact (`.smrt/runtime/register.js`) is
137
+ a Vite build, so `import.meta.env` is constant there and the externalized
138
+ TypeScript import still fails when a plain-Node worker starts. Publish a
139
+ compiled JS export to register such objects outside Vite.
140
+ Regression: the `#3092` tests in `index.test.ts` (plain-Node and real Vite
141
+ `ssrLoadModule` loads of one generated register, and the transitive gating).
142
+
124
143
  Selective SSR compilation compares a JavaScript barrel's `svelte` export target
125
144
  against the package instance visible from its actual importer. pnpm may install
126
145
  the same version in multiple peer contexts; the app-root package directory is
@@ -241,22 +260,40 @@ Config precedence for knowledge is defaults → top-level `knowledge` in
241
260
  `smrt.config.ts` → `packages[packageName].knowledge` → plugin option →
242
261
  object-level `@smrt({ knowledge })`.
243
262
 
244
- Test generation uses that same effective configuration and publishes knowledge
245
- matching the manifest it generated. Disabling knowledge removes a previous local
246
- knowledge artifact, so consumers cannot mistake it for current enabled output.
263
+ Test generation writes no knowledge and never touches the production pair:
264
+ `smrtVitestPlugin()` writes a per-run snapshot, and core's own `generate:test`
265
+ writes only `src/manifest/test-manifest.json` (`outputMode: 'explicit'`; its
266
+ Turbo outputs exclude `.smrt/`). Disabling knowledge in a production build
267
+ removes a previous local knowledge artifact, so consumers cannot mistake it for
268
+ current enabled output.
247
269
  `new ManifestBuilder(projectRoot)` keeps discovery, package identity, and output
248
270
  at that explicit root, including installed providers and external base classes;
249
271
  omitting the argument retains the current-working-directory
250
272
  behavior. Both manifest writers retain declared package dependencies when merging
251
273
  their local and consumed-object projections.
252
274
 
253
- Test manifests carry optional `artifactPurpose: 'test'`; dependency discovery
254
- skips those artifacts, including `.smrt` fallbacks. Unmarked runtime manifests,
275
+ Test manifests carry `artifactPurpose: 'test'` and are valid only as the active
276
+ test manifest of the run that registered them. Every other reader refuses them
277
+ (`isRefusedTestArtifact`, #2760): `LocalManifestReader`, the runtime loader's
278
+ local, workspace-source, external and explicit-path loads, dependency
279
+ discovery (including `.smrt` fallbacks), CLI project/package discovery (the
280
+ `db:*` schema gate), CLI data portability, and smrt-dev-mcp's runtime boot and
281
+ knowledge reads. A test manifest left at `.smrt/manifest.json` by an older
282
+ runner therefore fails closed (`missing_local_manifest`) instead of surfacing
283
+ inline fixtures as phantom objects; regression
284
+ `packages/vitest/src/__tests__/issue-2760-test-then-cli-parity.test.ts`. Unmarked runtime manifests,
255
285
  empty published providers, and source-only development providers remain eligible.
256
- `ManifestBuilder` accepts explicit `outputMode: 'dev' | 'build'`; omitted mode
257
- retains legacy filename inference. Vitest selects dev mode explicitly, so tests
258
- never replace a production `dist/manifest.json`. Relative output directories are
259
- resolved against the builder's project root.
286
+ `ManifestBuilder` accepts explicit `outputMode: 'dev' | 'build' | 'explicit'`;
287
+ omitted mode retains legacy filename inference. `'explicit'` writes only
288
+ `outputDir/outputName`, never the unified `.smrt`/`dist` location. Vitest uses
289
+ it for its per-run snapshot `.smrt/test-runs/<run>/manifest.json`, published
290
+ per root in `__SMRT_TEST_MANIFEST_PATHS__` (`manifest/test-artifacts.ts`).
291
+ `LocalManifestReader.loadLocal()` (and so the runtime loader and manifest test
292
+ databases) reads that active snapshot before `.smrt/manifest.json` for the
293
+ registered root only; `loadForExternalPackage()` never reads it, and a process
294
+ outside the run never sees it (#4128). Core's own Vitest config registers `src/manifest/test-manifest.json`
295
+ the same way. Relative output directories are resolved against the builder's
296
+ project root.
260
297
 
261
298
  With `svelteKit.enabled`, `smrtPlugin()`'s transform prepends
262
299
  `import './smrt-register.js';` to the configured config module
@@ -281,11 +318,18 @@ admin auth.
281
318
 
282
319
  ## Vite Plugin
283
320
 
284
- `_resources` and application-runtime config detection resolve their exact
285
- `@happyvertical/smrt-users/sveltekit` and `@happyvertical/smrt-app-runtime/sveltekit`
286
- imports with ESM import conditions anchored
287
- to the consumer package URL, using `import-meta-resolve`. A `types`/`import`-only
288
- export is valid; a CommonJS `createRequire.resolve` probe would falsely skip it.
321
+ Every generated file gated on a consumer dependency (`_resources` →
322
+ `@happyvertical/smrt-users/sveltekit`, application-runtime config →
323
+ `@happyvertical/smrt-app-runtime/sveltekit`, `_dev` →
324
+ `@happyvertical/smrt-dev-mcp/dev-plane`) detects it through
325
+ `consumerResolvesImport` (`src/vite-plugin/consumer-import.ts`, #3913): ESM
326
+ import conditions anchored to the consumer package URL, using
327
+ `import-meta-resolve`. A `types`/`import`-only export is valid; a CommonJS
328
+ `createRequire.resolve` probe would falsely skip it, so new gated routes use
329
+ the shared resolver. `generated-route-dependencies-packed-consumer.test.ts`
330
+ proves all three against a real packed Core tarball plus minimal packages
331
+ carrying the dependencies' real published export maps (direct, hoisted,
332
+ absent); it does not exercise those packages' runtime graphs.
289
333
  Verify the selected target is an existing file because import-meta resolution
290
334
  can return URLs for missing files/directories. Missing/unexported dependencies
291
335
  remain skipped, ancestor-hoisted installs resolve normally, and handwritten
@@ -11,6 +11,7 @@ Adapter-agnostic change-observation spine (`src/change-feed.ts`) — the server
11
11
  - `_smrt_changes` system table: one append per framework save/delete via a GlobalInterceptors writer registered at framework init. Deletes are tombstones (`operation: 'delete'`). `_smrt_*` tables are skipped. Feed-append failures log and never fail the user's write. On PostgreSQL, `_smrt_append_change` catches the INSERT in an exception subtransaction and returns SQLSTATE as data, so swallowing/retrying a best-effort failure cannot leave a caller-managed transaction aborted with `25P02` (#2026); the feed row still commits or rolls back with the caller transaction. Raw-handle/read initialization checks for both the table and helper before issuing any DDL; a cold schema/helper install acquires the same transaction-scoped `('smrt', 'system-tables')` advisory lock as bootstrap before its first DDL and rechecks inside one server-side statement, while schema migration/bootstrap remains the authoritative replace path. No dirty-check: a field-unchanged `.save()` appends a spurious `update` entry (diff-aware paths like `getOrUpsert`/sync-apply short-circuit before `save()` and append nothing); subscribers must tolerate spurious entries — they are convergent.
12
12
  - Sequences: allocated as `MAX(seq)+1` inside the INSERT with conflict retry (a jittered pause of at most 40 ms between attempts, so two tight-loop writers cannot starve one another — #3062) — committed rows stay contiguous, so commit order == seq order on SQLite/Postgres/DuckDB (deliberately NOT identity/serial: those allocate before commit and break the cursor guarantee under concurrent writers).
13
13
  - Staged appends (PostgreSQL, #2649): `MAX+1` costs a *wait* — the loser of a primary-key race waits for the winner's whole transaction — so an append inside a caller transaction that already wrote rows would let a long write transaction and an ordinary concurrent request form a real lock cycle (`40P01`, found downstream in willgriffin/willgriffin.dev#457). `_smrt_append_change` therefore checks `pg_current_xact_id_if_assigned()` (PostgreSQL 13+): when the caller already has a transaction id it stages the entry in `_smrt_changes_pending` (identity key, conflicts with nothing, never waits, still rolled back with the caller) and `appendChange()` returns **`null`** instead of a sequence. `_smrt_drain_changes()` moves *committed* staged rows into `_smrt_changes` with contiguous `MAX(seq)+row_number()` sequences under a **try-only** advisory lock, so the drain never waits either. Draining is driven from JavaScript, never inside the append helper: an entry sequenced invisibly server-side would get no live `_events` signal while the append's own signal carried a higher sequence, and a subscriber resuming from that `Last-Event-ID` would skip it permanently. `drainChangeFeed(db)` is called best-effort by `getChangesSince()`, by `pruneChangeFeed()`, and by the append path itself (throttled to one drain per 250 ms per database, bypassed immediately after this process staged an append). The append path issues ONE drain statement (a single bounded pass) and nothing else — the caller may own the surrounding transaction, and a second statement there could fail and abort it behind the feed's own error-swallowing (#2026); the helper's whole body, preflight included, sits inside its exception boundary for the same reason. It still settles that drain's signals in order without spending a statement: a drain that allocated anything assigns a transaction id, so an append that then takes the DIRECT path proves the drain committed, and its signals publish ahead of the append's own; a deferred append proves nothing and queues them. Signals for drained entries publish only after a follow-up probe proves the drain committed, so an uncommitted drain can never advertise a sequence a rollback releases for reuse. `getChangesSince()` additionally holds back everything the handle's own drains allocated while a transaction id is still assigned at read time (a per-handle watermark, so later reads in the same transaction keep holding back), and `bootstrapSystemTables()` refreshes the helpers before its schema-version fast return so an already-stamped database does not keep the deadlocking function. Consequences: the cursor guarantee is unchanged (one `MAX+1` writer at a time, only over committed work), but a staged entry becomes visible one drain after its transaction commits, its log position is drain order rather than statement order, and it publishes its live `_events` signal at drain time (post-commit — the old pre-commit signal could describe a rolled-back write). SQLite/DuckDB keep the direct insert unchanged. Residual: an append issued as a transaction's *first* statement still allocates inline — it holds no row locks then, so it cannot close a cycle, but it can make other direct appenders wait for that commit; issue explicit `bumpChangeFeed()` calls after the write or outside the transaction. A deployment that writes only through transactions and reads the feed from a connection that cannot write must schedule `drainChangeFeed()` on a writable one.
14
+ - Tenant typing (#3297): on PostgreSQL `_smrt_changes.tenant_id`, `_smrt_changes_pending.tenant_id` and the dispatch tables' `tenant_id` are native `uuid` on fresh installs (TEXT elsewhere, and on existing installs until `smrt db:migrate-uuid` converts them in a maintenance window). The helpers (marker `smrt-change-feed-helpers:v5`) coerce each tenant id to the LIVE column type through `jsonb_populate_record(NULL::<table>, …)`, so one body serves TEXT, uuid and the mixed state mid-conversion, and `_smrt_drain_changes()` returns `drained_tenant_id` as text. v5 bodies also carry the v4 marker so an older process's probe keeps them during a rolling upgrade; `db:migrate-uuid` installs them in its own transaction before converting. Upgrade every writer before converting: an older process that reinstalls its v4 drain cannot return a uuid tenant id. Tenant ids written here must be UUIDs (or NULL); `_smrt_ai_usage.tenant_id` and `_smrt_run_once_claims.tenant_id` stay TEXT (caller-supplied scope strings).
14
15
  - `getChangesSince(db, { since, tables?, tenantId?, limit? }) → { changes, cursor, resyncRequired?, resyncCursor? }`: strictly monotonic cursor; polling with returned cursors misses no committed change and never repeats one. A cursor that cannot be served incrementally — pruned below the retained `[floor..horizon]` run, or foreign/ahead of the horizon — gets `resyncRequired: true` with empty `changes`, an unadvanced `cursor`, and `resyncCursor` set to the current horizon so clients can full-refetch then resume incrementally; detection runs on the UNFILTERED log so `tables`/`tenantId` filters never trigger or mask it. `getTenantScopedChangesSince()` resolves tenant via the DispatchBus resolver hook (fail-closed: tenancy on + no context → global rows only; tenant `T` sees `T` + global rows, never another tenant).
15
16
  - `getTableVersion(db, table) → number`: the per-table change version (`MAX(seq)` for the table **plus that table's staged-but-undrained count**, so a staged write still moves the ETag and cannot false-304 a client; the sum is monotonic because draining `n` staged rows raises the table's `MAX(seq)` by at least `n`, and both terms are read in ONE statement — separate reads let a drain be counted twice, minting a version a later write re-mints; replica-stable, with no per-process divergence), the ETag source for zero-query conditional GETs (#1765). Advances on any framework write to the table (CRUD and sync-apply, which all `save()`/`delete()`). A table with no retained entry of its own falls back to the global horizon (never a resettable low value) so an all-pruned table cannot false-304 a stale client; only 0 when the feed is empty.
16
17
  - Generated `_changes` routes: REST (`GET {basePath}/_changes`, requires `authMiddleware`, otherwise 401 — per-model `api.public` does NOT apply) and SvelteKit (`{routesDir}/_changes/+server.ts`, requires an authenticated principal on `locals`; opt out via `sveltekit.changesRoute.enabled: false`). Query params: `since`, `tables` (comma-separated), `limit`. Responses stay HTTP 200 in the resync state — `resyncRequired` is protocol state, not an error, and `resyncCursor` is the resume cursor after the client completes a full refetch.
@@ -50,6 +51,25 @@ confirms the table exists, and a request naming *only* sensitive tables gets
50
51
  an empty page rather than an unfiltered one. Filtered rows never hold the
51
52
  cursor back: an exhaustive page still advances to the served horizon.
52
53
 
54
+ The PostgreSQL drain also refuses them (#2982). Every drain passes the live
55
+ sensitive set to `_smrt_drain_changes(limit, excluded_tables)`. Under the drain
56
+ lock it deletes staged rows for those tables before allocating any sequence,
57
+ and its batch skips any that commit afterwards. Entries an older replica staged,
58
+ or that were staged before an upgrade, therefore never reach `_smrt_changes`.
59
+ The single-argument `_smrt_drain_changes(limit)` remains as a compatibility
60
+ entry point for older replicas during a rollout. It delegates with no
61
+ exclusions, which is the old behaviour; its output stays covered by the read,
62
+ signal and retention refusals above. The bootstrap and raw-handle probes require
63
+ both overloads, so an upgraded database installs the new one before current code
64
+ calls it. A newly created two-argument drain inherits the compat drain's
65
+ reconciled EXECUTE grants, so a hardened ACL with no PUBLIC EXECUTE carries
66
+ over. The compat drain has its own exception boundary. The purge is bounded per
67
+ pass, like the sequencing batch.
68
+
69
+ In a permissions-managed deployment the migration owner installs the helpers
70
+ before current replicas boot. Permission plans must come from the current CLI:
71
+ an older planner reports the two-argument overload as an unsupported routine.
72
+
53
73
  `pruneChangeFeed()` additionally deletes sensitive rows below the horizon on
54
74
  every sweep, ahead of either retention bound, so credentials do not sit at rest
55
75
  for the retention window. That deletes from the middle of the retained run,
@@ -26,15 +26,53 @@ collection class and its populated model share an endpoint, the model owns the
26
26
  canonical collection key and row payload schema; the collection class remains
27
27
  available under a deterministic class-derived secondary key. Selection and
28
28
  collision suffixes must not depend on manifest insertion order (#2027).
29
+ Client entry selection skips the framework base classes exactly as route
30
+ emission does (`isFrameworkBaseClass`, #2642): a consumer aggregating
31
+ `@happyvertical/smrt-core` receives `SmrtObject`/`SmrtCollection`, and the
32
+ client must not advertise their CRUD or methods (static helpers included) as
33
+ callable actions that no route serves (#3295). Static model methods stay
34
+ collection-scoped (`method(options)`), instance methods item-scoped
35
+ (`method(id, options)`), matching the emitted route files.
29
36
  Route emission iterates manifest objects in the same deterministic
30
37
  qualified-identity order (`orderedManifestObjectEntries`), so when two models
31
38
  share one collection the last writer of each route file — and therefore the
32
39
  CRUD method set `resolveGeneratedEndpointCrudMethods` mirrors into
33
40
  `smrt-client.d.ts` — is stable across scan orders (#2754).
41
+ The generated sync-apply route keys `SYNC_TARGETS` by segment and resolves one
42
+ owner per segment among models exposing a mutating op: STI base (an
43
+ API-enabled base without mutating ops fails the segment closed), else first in
44
+ qualified-identity order. A shared segment's registry key and write policy are
45
+ byte-stable across scan orders (#2807).
34
46
  For aggregated manifests, inheritance and item-type references resolve exact
35
47
  qualified names first, then package-local simple names, then a stable identity
36
48
  fallback so duplicate class names across packages cannot reintroduce ordering.
37
49
 
50
+ Object row-type declarations (`XData` in `smrt-objects.d.ts`, `smrt-types.d.ts`,
51
+ the Vite ambient `virtual-modules.d.ts`, and the `@smrt/types` module) are one
52
+ per CLASS, selected by `selectObjectDeclarations()` in
53
+ `src/manifest/object-declarations.ts`; every emitter reads it. Built workspace
54
+ libraries list a consumed model under their own package name (#3110), so an
55
+ aggregated consumer manifest can name one class several times: listings with
56
+ the same absolute declaring `filePath`, `className`, and field shape collapse
57
+ to one declaration, rendered from the first listing in qualified-identity order
58
+ (#3296). A path alone is machine-local evidence, so a relative or missing
59
+ `filePath`, or disagreeing fields, keeps the listing separate. The aggregated
60
+ manifest itself keeps every listing.
61
+
62
+ Names follow the qualified identity when simple names collide (#3115): a
63
+ unique class keeps `${className}Data`; distinct classes sharing a simple name
64
+ each get a package-qualified name (`@ergot/market-core:LicenseSale` ->
65
+ `ErgotMarketCoreLicenseSaleData`), none keeps the bare name (a stem without a
66
+ known package is suffixed), and the generator warns with each name and every
67
+ listing it covers. The prefix is the package of the declaration's first
68
+ listing in qualified-identity order, which for a class relisted by consumer
69
+ packages (#3296) need not be the declaring package. One class whose listings
70
+ disagree on fields (a stale relisting) also forms a collision group, so it
71
+ loses its bare name until the stale package is rebuilt. Client and web declarations resolve row types
72
+ through `createObjectDeclarationIndex().interfaceNameFor()` and import them
73
+ (`import('./smrt-objects')`, `import('@happyvertical/smrt-virt-types')`);
74
+ a bare name does not resolve inside an ambient module.
75
+
38
76
  The web module also emits a build-time **`manifestHash`** constant (#1764): `computeWebManifestHash(manifest)` is a deterministic, replica-stable digest of the emitted web-collection SHAPE (name/className/endpoint/idField/actions/fields/relationships), canonicalized (recursive key sort) before `sha256 → base64url`, truncated to 16 chars — so the same schema always hashes the same, and a field add/remove/type-change/edge-change changes it. A change means old persisted client rows may mis-hydrate, so smrt-web keys its durable persistence namespace on it and its `updateAvailable` contract signal compares against it. Four co-managed emission sites must not drift: the runtime value (`generateWebModule`), the `@happyvertical/smrt-virt-web` ambient d.ts (`vite-plugin/index.ts`), the physical `@smrt/web` d.ts (`prebuild/index.ts`), and the hand-written type mirror in `@happyvertical/smrt-web` (`packages/smrt-web/src/index.ts` — dependency-free, so textual sync only).
39
77
 
40
78
  `webMcpToolDefinitions` is deliberately outside that digest: tool-only route,
@@ -235,9 +273,24 @@ leaves unset, it inherits the model's: `false` stays `false`; an `include`
235
273
  list keeps only its CRUD verbs (the other names are the model's instance
236
274
  methods, so the collection's own methods stay closed); an `exclude` list is
237
275
  copied; an open model leaves the collection open. A `sensitive: true` model's
238
- collection gets read-only MCP unless it configures `mcp` itself. The CLI treats
276
+ collection gets read-only MCP; one that configures `mcp` itself keeps its
277
+ custom methods, but the runtime CRUD cap below still drops its MCP writes. The CLI treats
239
278
  a collection's `include` as the complete allowlist, as MCP and REST do.
240
279
 
280
+ The scanner records the surfaces it copied as `inheritedExposure` on the
281
+ collection's manifest entry. At runtime those surfaces follow the model's
282
+ effective config, narrowed and never widened (`false` wins, `include` lists
283
+ intersect, `exclude` lists union), so a consumer that closes the model
284
+ (`registerOverride`, or a subclass manifest that replaces it) closes the
285
+ undecorated collection too. On `mcp`/`cli` the runtime also caps every
286
+ collection's generated CRUD verbs to the model's effective ones, decorated or
287
+ not; custom methods a collection lists stay its own opt-in, closed with
288
+ `registerOverride` on the collection class. `exclude: ['*']` is not a
289
+ wildcard any generator reads, so both the scanner and `getConfig()` normalize
290
+ it to `include: []` (fail closed; smrt-profiles `MagicLinkToken`). See #3468,
291
+ `registry/__tests__/issue-3468-closed-collection-exposure.test.ts`. Surface
292
+ tests must match `<model>collection_` tool names as well as `<model>_`.
293
+
241
294
  A collection opens its own methods by listing them in its own `@smrt()`. A
242
295
  collection decorator's config is merged over its model's at runtime, so repeat
243
296
  the model's CRUD verbs (and storage keys) there. The build fails with
@@ -328,6 +381,18 @@ namespaces. Typed CLI actions may use standard flag names such as `limit`,
328
381
  `offset`, `where`, and `format` without those values being stripped as CRUD
329
382
  flags.
330
383
 
384
+ A parameter typed with a bare alias name declared in the method's own module
385
+ (`type ActionOptions = Record<string, unknown>`) is resolved by the scanner
386
+ (`resolveParameterAlias`, `packages/scanner/src/oxc-parser.ts`). Chains are
387
+ followed, and the alias target is recorded as `resolvedType` beside the authored
388
+ `type`, using only the declaring module's aliases, so neither a same-named alias
389
+ elsewhere nor a subclass in another module can rebind an inherited parameter.
390
+ Schema emitters and argument decoders read `declaredParameterType(parameter)`
391
+ rather than `parameter.type`. A cyclic or over-long chain sets
392
+ `aliasUnresolved` and is advertised with no type constraint. An imported or
393
+ unknown name keeps the existing fallback, and the wire-ability gate still
394
+ judges the authored name (#4327).
395
+
331
396
  MCP static dispatch resolves the exact qualified registry entry's model
332
397
  constructor first, then its registered `collectionConstructor`. Manifest-backed
333
398
  collection resources can retain a stub model constructor after generated
@@ -356,8 +421,9 @@ Generated reads (`list`/`get`) on the REST and SvelteKit generators support cond
356
421
 
357
422
  `src/vite-plugin/dev-plane-route.ts` emits `<routesDir>/_dev/[...tool]/+server.ts`
358
423
  only when `svelteKit.devPlaneRoute.enabled === true` and
359
- `@happyvertical/smrt-dev-mcp/dev-plane` resolves from the consumer (same
360
- resolvability guard as `_resources`). The route is dev-only (`$app/environment`
424
+ `@happyvertical/smrt-dev-mcp/dev-plane` resolves from the consumer under ESM
425
+ import conditions (the shared `consumerResolvesImport` guard used by
426
+ `_resources`; the subpath is `types`/`import`-only, #3913). The route is dev-only (`$app/environment`
361
427
  `dev`, else 404), refuses to start without `SMRT_DEV_MCP_TOKEN` (503), and
362
428
  delegates everything else to `createDevPlane`, passing `getSmrtConfig(...).db`
363
429
  from the embedded access prelude (below) so the plane shares the app's
@@ -81,6 +81,8 @@ divergence is a bug in the generator, not an exception to add to the test.
81
81
  whose columns are a strict subset of a declared UNIQUE index. It is a pure
82
82
  relaxation (every row satisfies the wider key) and otherwise would keep
83
83
  rejecting rows the model allows. The maintenance-window rule below applies.
84
+ DuckDB has no partial indexes, so its indexes count as predicate-free, and
85
+ its quoted index columns (`"key"`) are unquoted before comparison (#3305 M1).
84
86
  - **Optional NULL tenants** retain the SDK's NULL-equal upsert identity. Generated
85
87
  framework conflict indexes with nullable keys carry `nullsNotDistinct: true`;
86
88
  PostgreSQL 15+ creates `UNIQUE NULLS NOT DISTINCT`, enabling warm single-statement
@@ -181,6 +183,34 @@ Unknown columns, malformed entries, and a name collision with a different index
181
183
  all fail generation — a silently dropped index only surfaces later as a
182
184
  production slowdown. Keep both config rebuild sites aligned.
183
185
 
186
+ ### STI subclasses declare indexes on the shared table (#3299)
187
+
188
+ `@smrt({ indexes })` on an STI **descendant** is emitted on the shared table
189
+ by `appendStiSubclassDeclaredIndexes()` (both STI entry points, after the
190
+ base's declarations; `getAllSchemasAsDefinitions()` and `getTestDatabase()`
191
+ inherit it). It goes through the same validation as a base declaration: known
192
+ columns, the 63-byte name limit, and errors on a collision. A UNIQUE
193
+ declaration is scoped to the declaring subtype with
194
+ `WHERE _meta_type = '<qualified class>'`, so siblings sharing the column are
195
+ not constrained. As with `@field({ unique })` on a descendant, each class in
196
+ the declaring class's own subtree gets a partial copy
197
+ (`<declared name, cut to 52>_<10-hex digest>`), so uniqueness holds per
198
+ concrete class there too, not across the subtree. DuckDB/JSON skip these
199
+ rather than widen them. A subclass UNIQUE with its own `where` is refused; declare a
200
+ combined predicate on the base. A plain subclass index stays unqualified, so
201
+ polymorphic reads can use it. Columns are emitted exactly as declared and are
202
+ never tenant-prefixed, as with explicit `conflictColumns`: put `tenant_id`
203
+ first for a tenant-local key (`['tenantId', 'rampEventId']`). Leave it out
204
+ only for a reviewed global identity (#3305 dispositions).
205
+
206
+ Migration: `db:migrate` adds the new index by name. A UNIQUE index fails
207
+ closed (the migration rolls back) when existing rows already duplicate the
208
+ key. Find and repair those rows first, scoped to the subtype
209
+ (`_meta_type = '<qualified class>'`), and never by deleting history to make
210
+ the index fit. With `db:migrate --postgres-safe` it is built `CONCURRENTLY`.
211
+ A failed concurrent build leaves an INVALID index, which the next run drops
212
+ and rebuilds after the data is repaired.
213
+
184
214
  ### Relationship targets resolve to a class name on both paths
185
215
 
186
216
  `@foreignKey`/`@oneToMany`/`@manyToMany` accept a class, a name string, or a
@@ -201,6 +231,12 @@ manifest generator resolves unqualified targets in the declaring package.
201
231
  Keep the merged schema in parity tests: `getTestDatabase()` preserves its
202
232
  authoritative FK metadata over the generated columns, so testing only the
203
233
  standalone generator cannot prove the constraint that reaches the database.
234
+ With an explicit `classes` list, `getTestDatabase()` builds that authoritative
235
+ schema with `getAllSchemasAsDefinitions({ tables })`: only the requested tables
236
+ and their foreign-key closure are merged and ownership-checked
237
+ (`CONFIG_TABLE_NAME_COLLISION` still fires for any of them), so an unrelated
238
+ collision elsewhere in the registry cannot abort the setup. The implicit list
239
+ checks every registered table (#3956).
204
240
 
205
241
  Field decorator registration retains constructor ownership separately from the
206
242
  simple-name inspection view. Custom decorators should pass the callback's
@@ -208,6 +244,20 @@ constructor as `registerFieldDecorator`'s fourth argument. Omit it only for
208
244
  intentional legacy string-only metadata; that legacy metadata still composes
209
245
  with constructor-owned options, but mirrored public decorator fields do not.
210
246
 
247
+ ### Decorator-only field types agree on both paths (#4295)
248
+
249
+ A compiled model registered without a manifest entry sees only `@field()`
250
+ options, never the initializer or annotation the scanner reads. Without an
251
+ explicit `type`, a boolean `default` infers `boolean` on both paths
252
+ (`inferDecoratorOnlyFieldType` in `src/registry/class-registration.ts`, step
253
+ 3.7 of the scanner's `ManifestAdapter.inferFieldType`); anything else falls
254
+ back to `text`. Numbers are never inferred at runtime (`0` and `0.0` are the
255
+ same value), so a runtime-only numeric field must declare
256
+ `type: 'integer' | 'decimal'`. Loading the manifest later still replaces the
257
+ decorator-only type. A database whose column was built from the old TEXT
258
+ expectation is not auto-cast; parity reports the drift for an explicit
259
+ migration.
260
+
211
261
  ### A SQLite type change is a table rebuild (#2370)
212
262
 
213
263
  SQLite has no `ALTER TABLE ... ALTER COLUMN ... TYPE`, so
@@ -636,6 +686,38 @@ swap outside the batch transaction. A change toward `CASCADE` / `SET NULL` /
636
686
  `warning` advisory that `db:diff`, `db:status` and `db:migrate` print as
637
687
  DESTRUCTIVE.
638
688
 
689
+ ### Deletes inside a caller-owned transaction
690
+
691
+ `runCascadeDelete()` owns the cascade's atomic scope through
692
+ `runInOwningCascadeTransaction()` in `src/cascade.ts` (#2824). A root handle opens
693
+ its own transaction. A transaction handle on an engine with savepoints nests.
694
+ When the engine refuses to nest (`NestedTransactionError`, raised by the SDK before
695
+ the callback runs), the cascade joins the enclosing transaction. This happens for
696
+ framework-owned handles, for caller-owned **native DuckDB** transactions
697
+ (`db.transaction()` scopes and `beginTransaction()` handles passed to
698
+ `withDatabase()`), and for the bulk junction path (#2818). A transaction handle
699
+ counts as native DuckDB only after core has seen its root, through
700
+ `initialize()`, `withDatabase()` or a framework transaction. Otherwise the
701
+ handle is never treated as native by guesswork, and the delete keeps the
702
+ `NestedTransactionError` refusal. The caller's commit or
703
+ rollback then decides the outcome of the cascade, the owned `_smrt_contexts` and
704
+ `_smrt_embeddings` cleanup, and the target row.
705
+
706
+ There is no savepoint, so a cascade that fails part-way cannot be undone on its
707
+ own. On native DuckDB the framework therefore aborts the joined transaction
708
+ (`SELECT error(...)`) before rethrowing, but only if the cascade has already
709
+ issued a write. The SDK's DuckDB `delete()` reports a constant affected count,
710
+ and the owned-row cleanup always runs. In practice, then, any failure after the
711
+ depth-0 RESTRICT / NO ACTION preflight aborts the transaction. That includes a
712
+ revision or write-guard conflict on the row itself, even one that changed no
713
+ rows. DuckDB then rejects every later statement with "transaction
714
+ is aborted", and its `COMMIT` persists nothing. A caller that swallows the error
715
+ therefore cannot commit a half-applied cascade, and the callback is never
716
+ replayed. By contrast, a refusal raised before the first write, such as the
717
+ RESTRICT / NO ACTION preflight, leaves the caller's transaction usable.
718
+ JSON-adapter caller transactions keep the detectable
719
+ `NestedTransactionError` refusal, because nothing can poison them.
720
+
639
721
  `@crossPackageRef()` remains runtime-only: it registers relationship loading
640
722
  and indexes but deliberately emits no physical constraint, avoiding circular
641
723
  package DDL. Tenant markers follow the same non-constraint rule because a
@@ -1,7 +1,28 @@
1
1
  //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
2
23
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
3
24
  if (typeof require !== "undefined") return require.apply(this, arguments);
4
25
  throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
5
26
  });
6
27
  //#endregion
7
- export { __require };
28
+ export { __commonJSMin, __require, __toESM };
package/dist/browser.d.ts CHANGED
@@ -66,8 +66,8 @@ export { normalizeTypedHttpError, type TypedHttpFailure, } from "./generators/ty
66
66
  export { type HierarchyView, SmrtHierarchical } from "./hierarchical.js";
67
67
  export * from "./interceptors.js";
68
68
  export { type JunctionAttachOptions, type JunctionFilterOptions, SmrtJunction, SmrtJunctionBase, } from "./junction.js";
69
- export type { ConfigResolver, LazyConfigSentinel, ResolveLazyConfigOptions, } from "./lazy-config.js";
70
- export { getClassConfigResolvers, getConfigResolver, isLazyConfigSentinel, listConfigResolvers, registerConfigResolver, resetConfigResolvers, resolveLazyConfig, unregisterConfigResolver, } from "./lazy-config.js";
69
+ export type { ConfigResolutionContext, ConfigResolver, ConfigResolverContext, LazyConfigSentinel, ResolveLazyConfigOptions, } from "./lazy-config.js";
70
+ export { createConfigResolverContext, getClassConfigResolvers, getConfigResolver, isLazyConfigSentinel, listConfigResolvers, preferPersisted, registerConfigResolver, resetConfigResolvers, resolveLazyConfig, unregisterConfigResolver, } from "./lazy-config.js";
71
71
  export { importOptionalDependency, registerOptionalDependency, } from "./lazy-external.js";
72
72
  export { DEFAULT_LEARNING_CONFIG, type LearningEpisode, LearningMemory, type LearningMemoryConfig, type LearningMemoryOptions, type LearningMemoryRecord, type LearningOutcome, type LearningRecallOptions, type LearningSemanticSearch, } from "./learning/index.js";
73
73
  export type { DiffOptions } from "./migrations/differ.js";
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,cAAc,qBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,cAAW,CAAC;AAGnB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,4BAA4B,EAC5B,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,wBAAwB,E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,EAAE,MAAM,mBAAgB,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,YAAY,EACZ,2BAA2B,EAC3B,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,MAAM,EACN,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAAyB,CAAC;AAOjC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,KAAK,wBAAwB,EAC7B,+BAA+B,GAChC,MAAM,2BAA2B,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
package/dist/browser.js CHANGED
@@ -75,7 +75,7 @@ import { resolveOperationPermissionAlias } from "./operation-permission.js";
75
75
  import { normalizeTypedHttpError } from "./generators/typed-http-error.js";
76
76
  import { SmrtHierarchical } from "./hierarchical.js";
77
77
  import { SmrtJunction, SmrtJunctionBase } from "./junction.js";
78
- import { getClassConfigResolvers, getConfigResolver, isLazyConfigSentinel, listConfigResolvers, registerConfigResolver, resetConfigResolvers, resolveLazyConfig, unregisterConfigResolver } from "./lazy-config.js";
78
+ import { createConfigResolverContext, getClassConfigResolvers, getConfigResolver, isLazyConfigSentinel, listConfigResolvers, preferPersisted, registerConfigResolver, resetConfigResolvers, resolveLazyConfig, unregisterConfigResolver } from "./lazy-config.js";
79
79
  import { DEFAULT_LEARNING_CONFIG, LearningMemory } from "./learning/memory.js";
80
80
  import { buildConnectSection, buildGlossary, createRecipeHelp, extractFieldRefs, findField, helpToMarkdown, parseHelp, renderHelp, resolveHelp, validateHelp } from "./recipe-help.js";
81
81
  import { MOCK_PROVIDER_OPTION, RECIPE_DEMO_MODES, deriveRecipeDemo, effectiveRecipeDemo, hasBrowserOption, isMockableProvider, isServerProvider } from "./recipe-demo.js";
@@ -92,4 +92,4 @@ import { DIAGNOSTICS_DEFAULT_LIMIT, SYSTEM_DIAGNOSTICS_TABLES, readDispatchHealt
92
92
  import { DEFAULT_RETENTION_POLICY, clearRetentionTasks, getRetentionTasks, pruneAiUsage, pruneExpiredContexts, pruneRunOnceClaims, registerRetentionTask, runRetentionSweep, unregisterRetentionTask } from "./system/retention.js";
93
93
  import "./system/browser.js";
94
94
  import "./tools/index.js";
95
- export { AIError, AiUsageCollector, AiUsagePersistenceHandler, CACHE_INVALIDATION_CHANNEL, CHANGE_FEED_CREDENTIAL_TABLES, CHANGE_FEED_INTERCEPTOR_NAME, CHANGE_FEED_TABLE, CHANGE_SIGNAL_CHANNEL, CRUD_OPERATIONS, ConfigurationError, ContentHasher, CosineSimilarity, DEFAULT_AI_COST_RATES, DEFAULT_CHANGES_LIMIT, DEFAULT_DATA_QUERY_PAGE_LIMIT, DEFAULT_DATA_QUERY_RESULT_BYTES, DEFAULT_DISPLAY_LABEL_FIELDS, DEFAULT_EMBEDDING_CONFIG, DEFAULT_FACET_LIMIT, DEFAULT_LEARNING_CONFIG, DEFAULT_LIST_LIMIT, DEFAULT_LIST_ORDER_BY, DEFAULT_POSTGRES_TIMEOUTS, DEFAULT_RETENTION_POLICY, DIAGNOSTICS_DEFAULT_LIMIT, DataQueryValidationError, DatabaseError, Dispatch, DispatchBus, DispatchCollection, DispatchSubscription, DispatchSubscriptionCollection, EXTERNAL_AGENT_COUNTERS, EXTERNAL_AGENT_USAGE_OPERATION, EmbeddingProvider, EmbeddingStorage, EmbeddingUnavailableError, ErrorUtils, ExternalAgentUsageError, ExternalAgentUsageRecorder, FIELD_UI_FORMATS, FIELD_UI_FORMAT_TYPES, FIELD_UI_WIDGETS, FIELD_UI_WIDGET_TYPES, FilesystemError, GlobalInterceptors, IN_LIST_CHUNK_SIZE, LearningMemory, LiveSchemaParityError, MAX_CHANGES_LIMIT, MAX_DATA_QUERY_CURSOR_LENGTH, MAX_DATA_QUERY_FACETS, MAX_DATA_QUERY_FIELD_VALUES, MAX_DATA_QUERY_FIELD_VALUE_DESCRIPTION_LENGTH, MAX_DATA_QUERY_FIELD_VALUE_LABEL_LENGTH, MAX_DATA_QUERY_FIELD_VALUE_LENGTH, MAX_DATA_QUERY_FILTERS, MAX_DATA_QUERY_FILTER_DEPTH, MAX_DATA_QUERY_IN_VALUES, MAX_DATA_QUERY_OFFSET, MAX_DATA_QUERY_PAGE_LIMIT, MAX_DATA_QUERY_REQUEST_BYTES, MAX_DATA_QUERY_RESULT_BYTES, MAX_DATA_QUERY_WARNINGS, MAX_FACET_FIELDS, MAX_FACET_LIMIT, MAX_LIST_LIMIT, MAX_STI_READ_SCOPE_TYPES, MAX_SYNC_APPLY_BATCH_SIZE, MOCK_PROVIDER_OPTION, MetricsAdapter, NetworkError, ObjectRegistry, POSTGRES_REVISION_GUARD_EXPRESSION, POSTGRES_TIMEOUT_ENV_VARS, PubSubAdapter, QueryBoundsError, QueryOrderByError, RECIPE_DEMO_MODES, RELATIONSHIP_ROLES, RunOnceClaimError, RuntimeError, SMRT_COLLECTION_BASE_NAMES, SMRT_CUSTOM_ACTION_ERROR_METADATA_KEY, SMRT_SCHEMA_VERSION, SYNC_APPLY_ROUTE_SEGMENTS, SYNC_APPLY_UUID_PATTERN, SYSTEM_DIAGNOSTICS_TABLES, SYSTEM_TABLE_NAMES, SchemaComparer, SignalBus, SignalSanitizer, SmrtClass, SmrtCollection, SmrtError, SmrtHierarchical, SmrtJunction, SmrtJunctionBase, SmrtObject, SmrtPolymorphicAssociation, SmrtRecipe, TenantIsolationError, ValidationError, ValidationReport, ValidationUtils, appendChange, appendChanges, applyOneToManyChildAccessors, applyPendingDecoratorRegistrations, applyPostgresPermissions, applyPostgresRuntimeTimeouts, applySyncWritablePolicy, assertFiniteUnitInterval, assertPostgresSystemTimestampsCurrent, assertScopedPackageName, auditChanges, auditSnapshot, broadcastCacheInvalidation, buildCascadePlan, buildConnectSection, buildCustomActionInputSchema, buildCustomActionInvocationArgs, buildDefaultListOrderBy, buildGlossary, bumpChangeFeed, canonicalizeDataQuery, cascadeReferencesTo, checkLiveSchemaParity, childAccessorName, chunkArray, classifyDatabaseError, classifyDialectMessage, classifyMethodWireability, classifyParameterWireability, clearRetentionTasks, clone, coerceCustomActionArgument, collectForeignKeyOrphanCounts, config, convertTypeToJsonSchema, createClassNamePredicate, createDataQueryFingerprint, createDispatchBus, createFilesystemAdapter, createGeneratedCollectionAccess, createInterceptorContext, createManifestClassNamePredicate, createQualifiedName, createRecipeHelp, createSmrtClient, crossPackageRef, customActionParameterInputName, declareChangeFeedSensitiveTable, declaredTypeAcceptsDate, declaresRuntimeRestRoute, declaresRuntimeRestRouteShape, deriveRecipeDemo, describeDisplayLabel, detectEngine, displayLabelFieldProblem, drainChangeFeed, effectiveRecipeDemo, ensureBootstrapSystemTableCompatibility, ensureCacheInvalidationListener, ensureChangeFeedTable, ensureDeferredSystemTableCompatibility, ensureDispatchSubscriptionsSystemTableCompatibility, ensureDispatchSystemTableCompatibility, ensureJobEventsSystemTableCompatibility, ensureJobsSystemTableCompatibility, ensureLegacySystemTableCompatibility, ensureSystemTables, estimateAiUsageCost, executeCollectionReadPlan, executeDecision, executeToolCall, executeToolCalls, exposedCrudVerbs, extractFieldRefs, field, fieldTypeToJsonSchema, filterVisibleChangeFeedEntries, findCollectionWriteEscalations, findField, findSelectorFor, findSubclassExposureEscalations, foreignKey, formatToolResults, generateDDLForEngine, generateSchemaDiff, generateToolFromMethod, generateToolManifest, getActiveAuditOptions, getAdapterInfo, getAuthorizedChangesSince, getAuthorizedTenantScopedChangesSince, getCacheGeneration, getChangeFeedSensitiveTables, getChangesSince, getClassConfigResolvers, getClassName, getConfigResolver, getDatabaseEngine, getPackageFromQualifiedName, getRetentionTasks, getSQLFromDiff, getSystemTableShapes, getTableVersion, getTenantScopedChangesSince, hasActionableChanges, hasBrowserOption, hasChangeFeedEntryVisibilityHook, hasChangeFeedTableAuthorizerHook, helpToMarkdown, importOptionalDependency, inheritCollectionExposure, inheritSubclassExposure, inheritedCollectionSurface, invalidateCollectionCache, isAbortedTransactionError, isAdvisoryOnlyChange, isAudited, isChangeFeedDenyAll, isChangeFeedEntryVisible, isChangeFeedSensitiveTable, isCrudOperation, isCrudToolAction, isDatabaseInterface, isDeterministicDatabaseError, isEmbeddedDatabase, isFieldUIFormat, isFieldUIWidget, isFrameworkBaseClass, isFromPackage, isLazyConfigSentinel, isManualOrAdvisoryChange, isMockableProvider, isNotNullViolationError, isPostgresDatabase, isQualifiedName, isRelationshipRole, isScopedPackageName, isSensitiveConnectionParam, isServerProvider, isSmrtCollectionExtendsName, isStaleWrite, isTenantScopedClassResolved, isTransientConnectionError, isTransientDatabaseError, isType, isUniqueViolationError, isValid, listConfigResolvers, manyToMany, meta, method, migratePostgresSystemTimestamps, normalizeCustomActionFailure, normalizeDataQueryFieldValues, normalizeDataQueryRequest, normalizeDataQueryResult, normalizeDataQuerySchema, normalizeExternalAgentUsageReport, normalizeOnDelete, normalizeTypedHttpError, oneToMany, parse, parseHelp, parseQualifiedName, parseSyncApplyBatch, payloadMatchesRow, planForeignKeyCreation, planPostgresPermissions, planPostgresSystemTimestampMigrations, postgresRevisionCandidates, postgresRevisionCondition, processSyncApplyBatch, pruneAiUsage, pruneChangeFeed, pruneExpiredContexts, pruneRunOnceClaims, qualifiedNamesEqual, queryStringDecoderFor, readDispatchHealth, readJobHealth, readMethodDecoratorConfig, readMigrationStatus, readRecentChanges, readRegistryDrift, readScheduleHealth, readSystemDiagnostics, redactDatabaseUrl, redactDatabaseUrlsInText, registerChangeFeedWriter, registerCompatibleFieldDecorator, registerCompatibleMethodDecorator, registerConfigResolver, registerFilesystemAdapterFactory, registerOptionalDependency, registerRetentionTask, renderHelp, requireAuditOptions, resetChangeFeedWarnings, resetChangeSignals, resetCollectionCache, resetConfigResolvers, resetVerifiedTables, resolveApiMethodExposure, resolveAuthorizedChangeFeedTables, resolveCustomActionMetadata, resolveDatabase, resolveDbCacheKey, resolveDeclaredScopeMismatch, resolveDispatchTenantId, resolveDispatchTenantScope, resolveDisplayLabelField, resolveEffectiveActionMetadata, resolveGetStringFilter, resolveHelp, resolveLazyConfig, resolveListLimit, resolveListOffset, resolveOperationPermissionAlias, resolvePostgresTimeouts, runCascadeDelete, runRetentionSweep, runWithTenantGate, safeParse, safeStringify, setChangeFeedAuthorizer, setChangeFeedEntryVisibility, setDispatchTenantResolver, setTenantEntryPointRunner, setTenantScopedClassResolver, shouldIncludeMethod, smrt, smrt as smrtRegistry, stopCacheInvalidationListeners, stopChangeSignalListeners, stringify, subscribeToChangeSignals, summarizeExternalAgentUsage, surfaceOpensOperation, tableExists, toCustomActionBoolean, toCustomActionDate, toCustomActionNumber, toSnakeCase, unregisterChangeFeedWriter, unregisterConfigResolver, unregisterRetentionTask, usesEmbeddedRevisionFallback, validateHelp, validatePostgresPermissionContract, validateSyncApplyItem, validateToolCall, withAuditContext, withEmbeddedWriteQueue, withEmbeddedWriteTransaction, writeAudit };
95
+ export { AIError, AiUsageCollector, AiUsagePersistenceHandler, CACHE_INVALIDATION_CHANNEL, CHANGE_FEED_CREDENTIAL_TABLES, CHANGE_FEED_INTERCEPTOR_NAME, CHANGE_FEED_TABLE, CHANGE_SIGNAL_CHANNEL, CRUD_OPERATIONS, ConfigurationError, ContentHasher, CosineSimilarity, DEFAULT_AI_COST_RATES, DEFAULT_CHANGES_LIMIT, DEFAULT_DATA_QUERY_PAGE_LIMIT, DEFAULT_DATA_QUERY_RESULT_BYTES, DEFAULT_DISPLAY_LABEL_FIELDS, DEFAULT_EMBEDDING_CONFIG, DEFAULT_FACET_LIMIT, DEFAULT_LEARNING_CONFIG, DEFAULT_LIST_LIMIT, DEFAULT_LIST_ORDER_BY, DEFAULT_POSTGRES_TIMEOUTS, DEFAULT_RETENTION_POLICY, DIAGNOSTICS_DEFAULT_LIMIT, DataQueryValidationError, DatabaseError, Dispatch, DispatchBus, DispatchCollection, DispatchSubscription, DispatchSubscriptionCollection, EXTERNAL_AGENT_COUNTERS, EXTERNAL_AGENT_USAGE_OPERATION, EmbeddingProvider, EmbeddingStorage, EmbeddingUnavailableError, ErrorUtils, ExternalAgentUsageError, ExternalAgentUsageRecorder, FIELD_UI_FORMATS, FIELD_UI_FORMAT_TYPES, FIELD_UI_WIDGETS, FIELD_UI_WIDGET_TYPES, FilesystemError, GlobalInterceptors, IN_LIST_CHUNK_SIZE, LearningMemory, LiveSchemaParityError, MAX_CHANGES_LIMIT, MAX_DATA_QUERY_CURSOR_LENGTH, MAX_DATA_QUERY_FACETS, MAX_DATA_QUERY_FIELD_VALUES, MAX_DATA_QUERY_FIELD_VALUE_DESCRIPTION_LENGTH, MAX_DATA_QUERY_FIELD_VALUE_LABEL_LENGTH, MAX_DATA_QUERY_FIELD_VALUE_LENGTH, MAX_DATA_QUERY_FILTERS, MAX_DATA_QUERY_FILTER_DEPTH, MAX_DATA_QUERY_IN_VALUES, MAX_DATA_QUERY_OFFSET, MAX_DATA_QUERY_PAGE_LIMIT, MAX_DATA_QUERY_REQUEST_BYTES, MAX_DATA_QUERY_RESULT_BYTES, MAX_DATA_QUERY_WARNINGS, MAX_FACET_FIELDS, MAX_FACET_LIMIT, MAX_LIST_LIMIT, MAX_STI_READ_SCOPE_TYPES, MAX_SYNC_APPLY_BATCH_SIZE, MOCK_PROVIDER_OPTION, MetricsAdapter, NetworkError, ObjectRegistry, POSTGRES_REVISION_GUARD_EXPRESSION, POSTGRES_TIMEOUT_ENV_VARS, PubSubAdapter, QueryBoundsError, QueryOrderByError, RECIPE_DEMO_MODES, RELATIONSHIP_ROLES, RunOnceClaimError, RuntimeError, SMRT_COLLECTION_BASE_NAMES, SMRT_CUSTOM_ACTION_ERROR_METADATA_KEY, SMRT_SCHEMA_VERSION, SYNC_APPLY_ROUTE_SEGMENTS, SYNC_APPLY_UUID_PATTERN, SYSTEM_DIAGNOSTICS_TABLES, SYSTEM_TABLE_NAMES, SchemaComparer, SignalBus, SignalSanitizer, SmrtClass, SmrtCollection, SmrtError, SmrtHierarchical, SmrtJunction, SmrtJunctionBase, SmrtObject, SmrtPolymorphicAssociation, SmrtRecipe, TenantIsolationError, ValidationError, ValidationReport, ValidationUtils, appendChange, appendChanges, applyOneToManyChildAccessors, applyPendingDecoratorRegistrations, applyPostgresPermissions, applyPostgresRuntimeTimeouts, applySyncWritablePolicy, assertFiniteUnitInterval, assertPostgresSystemTimestampsCurrent, assertScopedPackageName, auditChanges, auditSnapshot, broadcastCacheInvalidation, buildCascadePlan, buildConnectSection, buildCustomActionInputSchema, buildCustomActionInvocationArgs, buildDefaultListOrderBy, buildGlossary, bumpChangeFeed, canonicalizeDataQuery, cascadeReferencesTo, checkLiveSchemaParity, childAccessorName, chunkArray, classifyDatabaseError, classifyDialectMessage, classifyMethodWireability, classifyParameterWireability, clearRetentionTasks, clone, coerceCustomActionArgument, collectForeignKeyOrphanCounts, config, convertTypeToJsonSchema, createClassNamePredicate, createConfigResolverContext, createDataQueryFingerprint, createDispatchBus, createFilesystemAdapter, createGeneratedCollectionAccess, createInterceptorContext, createManifestClassNamePredicate, createQualifiedName, createRecipeHelp, createSmrtClient, crossPackageRef, customActionParameterInputName, declareChangeFeedSensitiveTable, declaredTypeAcceptsDate, declaresRuntimeRestRoute, declaresRuntimeRestRouteShape, deriveRecipeDemo, describeDisplayLabel, detectEngine, displayLabelFieldProblem, drainChangeFeed, effectiveRecipeDemo, ensureBootstrapSystemTableCompatibility, ensureCacheInvalidationListener, ensureChangeFeedTable, ensureDeferredSystemTableCompatibility, ensureDispatchSubscriptionsSystemTableCompatibility, ensureDispatchSystemTableCompatibility, ensureJobEventsSystemTableCompatibility, ensureJobsSystemTableCompatibility, ensureLegacySystemTableCompatibility, ensureSystemTables, estimateAiUsageCost, executeCollectionReadPlan, executeDecision, executeToolCall, executeToolCalls, exposedCrudVerbs, extractFieldRefs, field, fieldTypeToJsonSchema, filterVisibleChangeFeedEntries, findCollectionWriteEscalations, findField, findSelectorFor, findSubclassExposureEscalations, foreignKey, formatToolResults, generateDDLForEngine, generateSchemaDiff, generateToolFromMethod, generateToolManifest, getActiveAuditOptions, getAdapterInfo, getAuthorizedChangesSince, getAuthorizedTenantScopedChangesSince, getCacheGeneration, getChangeFeedSensitiveTables, getChangesSince, getClassConfigResolvers, getClassName, getConfigResolver, getDatabaseEngine, getPackageFromQualifiedName, getRetentionTasks, getSQLFromDiff, getSystemTableShapes, getTableVersion, getTenantScopedChangesSince, hasActionableChanges, hasBrowserOption, hasChangeFeedEntryVisibilityHook, hasChangeFeedTableAuthorizerHook, helpToMarkdown, importOptionalDependency, inheritCollectionExposure, inheritSubclassExposure, inheritedCollectionSurface, invalidateCollectionCache, isAbortedTransactionError, isAdvisoryOnlyChange, isAudited, isChangeFeedDenyAll, isChangeFeedEntryVisible, isChangeFeedSensitiveTable, isCrudOperation, isCrudToolAction, isDatabaseInterface, isDeterministicDatabaseError, isEmbeddedDatabase, isFieldUIFormat, isFieldUIWidget, isFrameworkBaseClass, isFromPackage, isLazyConfigSentinel, isManualOrAdvisoryChange, isMockableProvider, isNotNullViolationError, isPostgresDatabase, isQualifiedName, isRelationshipRole, isScopedPackageName, isSensitiveConnectionParam, isServerProvider, isSmrtCollectionExtendsName, isStaleWrite, isTenantScopedClassResolved, isTransientConnectionError, isTransientDatabaseError, isType, isUniqueViolationError, isValid, listConfigResolvers, manyToMany, meta, method, migratePostgresSystemTimestamps, normalizeCustomActionFailure, normalizeDataQueryFieldValues, normalizeDataQueryRequest, normalizeDataQueryResult, normalizeDataQuerySchema, normalizeExternalAgentUsageReport, normalizeOnDelete, normalizeTypedHttpError, oneToMany, parse, parseHelp, parseQualifiedName, parseSyncApplyBatch, payloadMatchesRow, planForeignKeyCreation, planPostgresPermissions, planPostgresSystemTimestampMigrations, postgresRevisionCandidates, postgresRevisionCondition, preferPersisted, processSyncApplyBatch, pruneAiUsage, pruneChangeFeed, pruneExpiredContexts, pruneRunOnceClaims, qualifiedNamesEqual, queryStringDecoderFor, readDispatchHealth, readJobHealth, readMethodDecoratorConfig, readMigrationStatus, readRecentChanges, readRegistryDrift, readScheduleHealth, readSystemDiagnostics, redactDatabaseUrl, redactDatabaseUrlsInText, registerChangeFeedWriter, registerCompatibleFieldDecorator, registerCompatibleMethodDecorator, registerConfigResolver, registerFilesystemAdapterFactory, registerOptionalDependency, registerRetentionTask, renderHelp, requireAuditOptions, resetChangeFeedWarnings, resetChangeSignals, resetCollectionCache, resetConfigResolvers, resetVerifiedTables, resolveApiMethodExposure, resolveAuthorizedChangeFeedTables, resolveCustomActionMetadata, resolveDatabase, resolveDbCacheKey, resolveDeclaredScopeMismatch, resolveDispatchTenantId, resolveDispatchTenantScope, resolveDisplayLabelField, resolveEffectiveActionMetadata, resolveGetStringFilter, resolveHelp, resolveLazyConfig, resolveListLimit, resolveListOffset, resolveOperationPermissionAlias, resolvePostgresTimeouts, runCascadeDelete, runRetentionSweep, runWithTenantGate, safeParse, safeStringify, setChangeFeedAuthorizer, setChangeFeedEntryVisibility, setDispatchTenantResolver, setTenantEntryPointRunner, setTenantScopedClassResolver, shouldIncludeMethod, smrt, smrt as smrtRegistry, stopCacheInvalidationListeners, stopChangeSignalListeners, stringify, subscribeToChangeSignals, summarizeExternalAgentUsage, surfaceOpensOperation, tableExists, toCustomActionBoolean, toCustomActionDate, toCustomActionNumber, toSnakeCase, unregisterChangeFeedWriter, unregisterConfigResolver, unregisterRetentionTask, usesEmbeddedRevisionFallback, validateHelp, validatePostgresPermissionContract, validateSyncApplyItem, validateToolCall, withAuditContext, withEmbeddedWriteQueue, withEmbeddedWriteTransaction, writeAudit };