@nanobpm/urban 0.77.4 → 0.78.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.
@@ -214,6 +214,71 @@ export type {
214
214
  LineageStoreOptions,
215
215
  } from "./core/modules/lineage-store.ts";
216
216
 
217
+ // ─────────────────────────────────────────── Read models ────────────────────────────────────────
218
+ // The declare-once, compile-to-both derived read-model primitive (ADR 0065): a closed expression DSL
219
+ // (`col`/`lit`/comparisons/`and`/`or`/`not`/`caseWhen`/`exists`) declared ONCE via `defineReadModel`,
220
+ // compiled to BOTH a SQLite VIEW select-list (`compileToSqlSelect`) and an in-process TS function
221
+ // (`compileToFn`) from the SAME AST, plus the framework-derived managed VIEW DDL and the parity guard
222
+ // that replaces per-projection hand-written parity tests.
223
+ //
224
+ // SIBLING REGISTRATION POINTS (ADR 0065 rollout — see core/read-model.ts for the full seam docs):
225
+ // • `readModelRegistry` — register a `defineReadModel(...)` result; the boot path (core/modules/
226
+ // workers.ts) applies its managed VIEW. The `writer-source-inversion` task registers here.
227
+ // • `projectionRegistry` — register a canonical engine-truth projection NAME usable in `exists(...)`.
228
+ // The `canonical-projections` task registers `urban_open_user_tasks` / `urban_instance_state`.
229
+ export {
230
+ and,
231
+ assertReadModelParity,
232
+ assertSqlIdentifier,
233
+ caseWhen,
234
+ col,
235
+ compileToFn,
236
+ compileToSqlSelect,
237
+ defineReadModel,
238
+ deriveReadModelViewDdl,
239
+ eq,
240
+ exists,
241
+ gt,
242
+ gte,
243
+ lit,
244
+ lt,
245
+ lte,
246
+ neq,
247
+ not,
248
+ or,
249
+ pcol,
250
+ ProjectionRegistry,
251
+ projectionRegistry,
252
+ ReadModelRegistry,
253
+ readModelRegistry,
254
+ when,
255
+ } from "./core/read-model.ts";
256
+ export type {
257
+ AndExpr,
258
+ BaseRow,
259
+ CaseExpr,
260
+ ColExpr,
261
+ CompareExpr,
262
+ CompareOp,
263
+ DerivationFn,
264
+ ExistsExpr,
265
+ Expr,
266
+ Literal,
267
+ LitExpr,
268
+ NotExpr,
269
+ OrExpr,
270
+ ParityDb,
271
+ ParityOptions,
272
+ ParitySample,
273
+ ProjColExpr,
274
+ ProjectionRows,
275
+ ProjectionSource,
276
+ ReadModel,
277
+ ReadModelDecl,
278
+ SqlCompileOptions,
279
+ WhenClause,
280
+ } from "./core/read-model.ts";
281
+
217
282
  // Phase — the framework-level *domain phase* primitive (issue #266): derive "which phase is this
218
283
  // instance in?" from the BPMN scope hierarchy + write-provenance (Tier 0, zero declaration), an
219
284
  // optional `nano:phase` override (Tier 1), and a lineage rollup for the epic frontier (Tier 2).