@objectstack/core 17.0.0-rc.0 → 17.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,3047 @@
1
+ # @objectstack/core
2
+
3
+ ## 17.0.0-rc.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 32ccb23: feat(spec,core,runtime)!: ADR-0112 batch 1 — one error-code vocabulary, SCREAMING_SNAKE, schema-enforced (#3841)
8
+
9
+ Settles #3841 per ADR-0112: the top-level `error.code` vocabulary is
10
+ SCREAMING_SNAKE, in two tiers.
11
+
12
+ - **`StandardErrorCode` members renamed in place** (`validation_error` →
13
+ `VALIDATION_ERROR`, all 53). Breaking for importers that branch on the old
14
+ lowercase members; the type name and member _meanings_ are unchanged.
15
+ - **New `ERROR_CODE_LEDGER`** (`@objectstack/spec/api`): service-specific codes
16
+ (`AUTH_REQUIRED`, `VALIDATION_FAILED`, `ATTACHMENT_DOWNLOAD_DENIED`, …) are
17
+ registered per owning package. `ErrorCode` = standard ∪ registered.
18
+ - **`ApiErrorSchema.code` is now `ErrorCode`**, not `z.string()` — an
19
+ unregistered code fails parse, so the envelope conformance suites assert
20
+ values, not just shape.
21
+ - **`FieldErrorSchema.code` widened to `z.string()`** (ADR-0112 D6): field-level
22
+ codes are a separate vocabulary the enum never described; #3977 owns its real
23
+ catalog.
24
+ - **Derived codes changed case on the wire**: `standardErrorCodeForHttpStatus`
25
+ now yields SCREAMING members (`permission_denied` → `PERMISSION_DENIED`,
26
+ `method_not_allowed` → `METHOD_NOT_ALLOWED`, …) — this map was #3842's
27
+ designated one-file sweep point for exactly this decision.
28
+ - **`ANONYMOUS_DENY_CODE` is `'UNAUTHENTICATED'`** (was `'unauthenticated'`) —
29
+ the promoted code on anonymous-denied requests and the REST `enforceAuth`
30
+ body change spelling with it.
31
+
32
+ `error-catalog.mdx` and the error-handling guides are rewritten to the single
33
+ vocabulary; a spec test now locks the catalog page's headings to the enum so
34
+ they cannot drift apart again. Remaining lowercase emitters (cloud-connection,
35
+ plugin-auth envelope codes, metadata-protocol, …) are the batch-2 sweep.
36
+
37
+ - 0af50a3: fix(driver-sql,service-analytics): a bare-day upper bound covers the whole day on `Field.datetime` (#3777)
38
+
39
+ A bare `YYYY-MM-DD` comparand anchors to midnight UTC. That is right for a
40
+ lower bound and was silently wrong for an upper one: the dashboard date-range
41
+ filter compiles `{ $gte: from, $lte: to }` with bare-day bounds, so on a
42
+ `datetime` column every row created after 00:00 of the `to` day vanished from
43
+ the result — no error, the chart renders, the numbers are just smaller. The
44
+ default configuration hit it: the filter's default field is `created_at`
45
+ (a system-injected `Field.datetime`) and 7 of the 13 presets end "today".
46
+
47
+ The translation is operator-sensitive and half-open, applied at every
48
+ comparison emitter:
49
+
50
+ - `SqlDriver` (and `SqliteWasmDriver` by inheritance): `$lte`/`<=` with a
51
+ bare-day comparand on a `datetime` column compiles to `< next-day-midnight`
52
+ in the column's storage form; `$between [min, max]` with a bare-day max
53
+ decomposes to `>= min AND < next-day(max)`. Both the plain and the
54
+ legacy-repair (mixed-storage) column paths, both `where` spellings.
55
+ - `NativeSQLStrategy`: `dateRange` windows and `lte` filters bind `< next-day`
56
+ instead of an inclusive `BETWEEN`/`<=` when the bound is a bare day.
57
+ - The `/analytics/sql` rendering and the dataset preview evaluator apply the
58
+ same rule, so the echoed SQL and drafted numbers reproduce execution.
59
+
60
+ `@objectstack/core` gains the shared primitive `nextUtcCalendarDay(value)`:
61
+ the next calendar day of a valid bare `YYYY-MM-DD` (else `null` — instants,
62
+ `Date`s and impossible days are never widened).
63
+
64
+ Unchanged on purpose, per the semantics table on #3777: `date`/`time` columns
65
+ (`<= day` is already whole-day-correct there), full-ISO/`Date` comparands
66
+ (instant semantics), and `$gte`/`$gt`/`$lt` (midnight anchoring is correct for
67
+ those). No authored metadata changes: a dashboard's existing
68
+ `{ $gte, $lte }` window now simply includes its final day.
69
+
70
+ - 3c628ce: feat(auth)!: retire the `api.requireAuth` opt-out — anonymous access to object data is always denied (#3963)
71
+
72
+ `api.requireAuth: false` let a deployment open its ENTIRE data plane with one
73
+ config key. It is removed. Auth is a kernel concern, not a deployment posture:
74
+ anonymous callers are denied on every HTTP surface that reaches object data,
75
+ unconditionally.
76
+
77
+ Every surface that legitimately serves a session-less caller already derives its
78
+ own narrow authorization from a DECLARATION, so none of them needed the global
79
+ switch:
80
+
81
+ - control plane (`/auth/*`, `/health`, `/ready`, `/discovery`, ADR-0069
82
+ remediation) — the auth-gate allowlist;
83
+ - public form submission — `publicFormGrant` (ADR-0056 Option A);
84
+ - share links — the capability token, validated then read as SYSTEM;
85
+ - a `book.audience: 'public'` read — the ADR-0046 §6.7 audience gate (#3995);
86
+ - MCP — an OAuth token or API key.
87
+
88
+ **Breaking changes.**
89
+
90
+ - `api.requireAuth` is a retired key. It is tombstoned (`retiredKey`) in both
91
+ `RestApiConfigSchema` and the stack `api` block, so authoring it now fails with
92
+ a fix-it message rather than being silently stripped (the ADR-0104 / #3733
93
+ quiet-failure this whole line of work has been closing). `os migrate meta`
94
+ drops it via the protocol-17 conversion `stack-api-require-auth-removed`.
95
+ - `shouldDenyAnonymous` (@objectstack/core) no longer takes a `requireAuth`
96
+ input; it denies any anonymous, non-system caller outside the control-plane
97
+ allowlist.
98
+ - A stack that mounts **no auth at all** now FAILS AT BOOT when it would serve a
99
+ data API (`objectstack serve`, plugin-dev), instead of getting an explicit
100
+ fail-open. Enable auth (the `auth` tier or AuthPlugin), or run without the data
101
+ API. There is no anonymous-data carve-out any more — publishing a public
102
+ surface is done by declaration (see above).
103
+
104
+ **Migration.** Delete `api.requireAuth` from the stack config (or run
105
+ `os migrate meta`). If you were serving data publicly with `requireAuth: false`,
106
+ replace it with the declaration that fits: a public form view, a share link, or
107
+ `book.audience: 'public'`. If you have an auth-less stack that intentionally
108
+ served data, it must now mount auth or stop serving the data API.
109
+
110
+ - d13004a: feat(core,runtime): plugin ordering is a declared, kernel-enforced contract (ADR-0116, #4131)
111
+
112
+ `kernel.use()` registration order was never a contract — the kernel resolves
113
+ init/start order from the plugin dependency graph — but a plugin that needed a
114
+ service at init _when its provider is composed_ while also booting _without_
115
+ the provider had no way to declare that. `AppPlugin` was the standing example:
116
+ it grabs `manifest`/`objectql` synchronously in `init()`, declared nothing
117
+ (a hard dependency would break empty-env / metadata-only / mock-engine
118
+ kernels), and so its correctness rode on which array slot each caller put it
119
+ in. That convention failed the same way twice (`DefaultDatasourcePlugin`'s
120
+ first cut; then #4085, disguised for months as "crashes when the artifact is
121
+ missing").
122
+
123
+ The kernel `Plugin` contract gains three additive fields, enforced by both
124
+ `ObjectKernel` and `LiteKernel` through one shared implementation
125
+ (`plugin-order.ts` — the previously duplicated topological sort is unified
126
+ there):
127
+
128
+ - **`optionalDependencies: string[]`** — order-if-present: hoisted ahead
129
+ exactly like `dependencies` when composed (real topology edges, including
130
+ cycle detection), silently skipped when absent.
131
+ - **`requiresServices: string[]`** — services resolved synchronously during
132
+ `init()` with no fallback. Validated **before Phase 1**: a required service
133
+ whose only declared provider initializes later fails the boot with an error
134
+ naming both plugins, both slots, and the fix — before any init side
135
+ effects. Re-checked immediately before the plugin's own init, where a still-
136
+ missing service becomes a named composition error exactly where the old
137
+ bare `Service not found` crash fired.
138
+ - **`providesServices: string[]`** — services a plugin's `init()`
139
+ unconditionally registers; powers the validation and the diagnostics.
140
+
141
+ Plugins that declare nothing get the diagnosis too: a `getService` miss
142
+ during Phase 1 now appends which plugin was initializing and — when a
143
+ composed plugin declares the service — who provides it and how to declare the
144
+ ordering. The `Service '<name>' not found` prefix and the factory-backed
145
+ `is async - use await` message are unchanged.
146
+
147
+ First adopters: `AppPlugin` declares
148
+ `optionalDependencies: ['com.objectstack.engine.objectql']` +
149
+ `requiresServices: ['manifest']` (cleared on the empty-env no-op path), so
150
+ the #4085 composition — AppPlugin registered before the engine — now boots
151
+ correctly in every slot; `ObjectQLPlugin` declares
152
+ `providesServices: ['objectql', 'data', 'manifest', 'lifecycle']` and
153
+ `MetadataPlugin` declares `providesServices: ['metadata']`.
154
+
155
+ Everything is additive — plugins that declare nothing keep their exact
156
+ ordering semantics; no existing declaration changes meaning.
157
+
158
+ - e4c2dc8: Order temporal operands correctly when one side is a JS `Date` on the two
159
+ type-blind filter backends (ADR-0053 D-A3 / #4191).
160
+
161
+ `utcInstantMs` joins `nextUtcCalendarDay` in `@objectstack/spec/data`
162
+ (re-exported from `@objectstack/core`): it reads the UTC instant a temporal
163
+ operand denotes, accepting only unambiguous spellings — a `Date`, epoch ms, a
164
+ bare `YYYY-MM-DD`, and an ISO timestamp with or without an explicit zone (a
165
+ zone-naive one being UTC, per D-B2) — and returning `null` for everything
166
+ else, notably a bare wall clock, which denotes no instant.
167
+
168
+ Both type-blind evaluators now use it to compare a `Date` against wire text,
169
+ which JS relational operators cannot do: `<` and friends coerce with hint
170
+ `number`, so the `Date` becomes its epoch and the string becomes `NaN`.
171
+
172
+ - `formula`'s `matchesFilterCondition` (the RLS write-side `check`) dropped
173
+ every `Date`-valued row in 10 of the 16 shared conformance cases. The
174
+ post-image is the caller's raw write payload, so an SDK write of
175
+ `new Date()` hit this directly, and fail-closed turned it into a **denied
176
+ write**.
177
+ - `service-analytics`' preview evaluator diverged on the same 10 cases in
178
+ BOTH directions, because `String(new Date())` sorts after every `'2026-…'`
179
+ comparand — a drafted chart both lost rows and gained ones, then changed
180
+ its numbers at publish. Rows from a mongo-backed dataset arrive as BSON
181
+ `Date`s, so this was reachable in normal use.
182
+
183
+ Comparisons that did not involve a `Date` are unchanged.
184
+
185
+ ### Patch Changes
186
+
187
+ - 2af1988: fix(formula,spec,core): the RLS write-side `check` evaluator honours calendar-day upper bounds (ADR-0053 D-D)
188
+
189
+ `@objectstack/formula`'s `matchesFilterCondition` — the evaluator behind RLS
190
+ write-side `check` policies (ADR-0058 D4) — compared a bare `YYYY-MM-DD` `$lte`
191
+ bound literally. On a `datetime` post-image that meant a policy of the shape
192
+ `{ signed_on: { $lte: '{today}' } }` **denied every write made after 00:00**:
193
+ the write-side twin of the read-side data loss #3777 fixed, and the last of the
194
+ platform's filter backends that disagreed about what a bare day means as a
195
+ bound.
196
+
197
+ `$lte` and a `$between` max now evaluate half-open against the next calendar
198
+ day, matching the SQL compiler, the memory and mongo drivers, and the analytics
199
+ preview evaluator. Unchanged, per the same semantics table: full-ISO bounds keep
200
+ exact-instant semantics, `$gte`/`$gt`/`$lt` keep their midnight anchoring, and a
201
+ plain `YYYY-MM-DD` value compares identically (string ordering makes the two
202
+ forms equivalent). The evaluator stays fail-closed on a null bound.
203
+
204
+ **Where the rule now lives.** `nextUtcCalendarDay` moved from
205
+ `@objectstack/core` to `@objectstack/spec/data` — beside `date-macros.zod.ts`,
206
+ whose vocabulary it interprets. `formula` cannot depend on `core`, and a second
207
+ copy of the rule is exactly the divergence #3777 catalogued; `spec` is the one
208
+ package all six consumers already depend on, so this adds no dependency edge.
209
+
210
+ No import changes are required: `@objectstack/core` re-exports the symbol, so
211
+ existing `import { nextUtcCalendarDay } from '@objectstack/core'` keeps working.
212
+ New code should prefer `@objectstack/spec/data`.
213
+
214
+ - 2e836de: chore(packaging): CHANGELOG.md ships in every npm tarball (#4261)
215
+
216
+ The AGENTS.md post-task checklist requires breaking changesets to carry their
217
+ FROM → TO migration because "this text ships to consumers as `CHANGELOG.md`
218
+ inside the npm package and is what an upgrading agent greps after the tombstone
219
+ error." That delivery path was severed for 68 of the 69 publishable packages:
220
+ npm packs `package.json` / `README*` / `LICENSE*` unconditionally but — unlike
221
+ older npm versions — not `CHANGELOG.md`, and the canonical
222
+ `"files": ["dist", "README.md"]` whitelist never named it. Measured on npm
223
+ 10.9.7: `npm pack --dry-run` on `@objectstack/types` shipped 3 files while its
224
+ 70KB `CHANGELOG.md` stayed behind. Only `@objectstack/spec` listed it
225
+ explicitly.
226
+
227
+ The tombstone-error scenario is precisely the one where the repo is out of
228
+ reach — the upgrading agent has `node_modules` and nothing else — so the
229
+ migration text has to ride in the tarball. Every publishable package now
230
+ declares `CHANGELOG.md` in `files`, and the canonical whitelist is
231
+ `["dist", "README.md", "CHANGELOG.md"]`.
232
+
233
+ The other half is the gate: `check:published-files` gains a fifth invariant,
234
+ COMPLETE — a whitelist that fails to cover `CHANGELOG.md` fails the
235
+ always-required lint job, so the next package cannot silently sever the path
236
+ again. `@objectstack/spec`'s per-package EXTRA_ENTRIES exemption dissolves
237
+ into the canonical set.
238
+
239
+ Consumer-visible change: one more file per install (the package's changelog,
240
+ e.g. 70.8KB for `@objectstack/types`), and `grep -r "removed key"
241
+ node_modules/@objectstack/*/CHANGELOG.md` now finds the migration it was
242
+ promised.
243
+
244
+ - 45dc446: Every in-memory fallback and dev stub now self-describes with the standard `__serviceInfo` descriptor, classified by what it actually is (#4058 step 1).
245
+
246
+ ADR-0076 D12 gave services one way to say "I am not the real thing", but the producers never converged on it:
247
+
248
+ - The kernel's own fallbacks (`createMemoryCache` / `Queue` / `Job` / `I18n` / `Metadata`) carried `_fallback: true` — a marker **no** consumer recognized, `readServiceSelfInfo` included — so both discovery builders reported them as fully `available`.
249
+ - `plugin-dev` marked all of its implementations with the same `_dev: true`, normalized to `status: 'stub', handlerReady: false`. That declared a working in-memory search index exactly as fake as an AI stub returning invented text.
250
+
251
+ Both now carry `__serviceInfo`, split by a rule that holds across the whole set:
252
+
253
+ - **`degraded`** — really does the work, with reduced capability: `cache`, `queue`, `job`, `file-storage`, `search`, `i18n`, `metadata`, `workflow`, `realtime`. Its answers are true answers; the `message` names what is missing (no persistence, no scheduling timer, no state-machine validation, …).
254
+ - **`stub`** — the answer is fabricated: `ai`, `automation`, `notification`, `data`, `auth`, `security.permissions`, `security.rls`, `security.fieldMasker`. Never to be mistaken for a capability.
255
+
256
+ `handlerReady: false` is set independently wherever no HTTP handler serves the slot (`cache` / `queue` / `job` / `realtime`, and every `stub`).
257
+
258
+ Discovery output changes accordingly — a kernel fallback that used to report `status: 'available'` now reports `degraded` with an explanatory message. No routing, gating, or dispatch behavior changes: every dispatcher domain still resolves services exactly as before. Consumers reading `discovery.services.*` get the truth instead of a uniform claim.
259
+
260
+ For anything that duck-typed the old markers: `svc._fallback` / `svc._dev` → `readServiceSelfInfo(svc)` from `@objectstack/spec/api` (the legacy `_dev` key is still understood by that reader, so third-party stubs carrying it keep working).
261
+
262
+ - f985b3f: fix(spec,core,cloud-connection,metadata): one HTTP contract, one canonical slot name — and the dead shadow copy that helped cause the false exemption is deleted (#4251)
263
+
264
+ **`packages/core/src/contracts/` was a dead near-copy of the real contracts,
265
+ and it is gone.** The directory (http-server.ts, data-engine.ts, logger.ts) had
266
+ ZERO importers — no relative import, no subpath export, not a tsup entry;
267
+ core's barrel has re-exported the `@objectstack/spec/contracts` versions all
268
+ along ("Re-export contracts from @objectstack/spec for backward
269
+ compatibility"). But the shadow had already **diverged** from the live
270
+ contract (spec's `IHttpResponse` grew `write?`/`end?` and `IHttpRequest` grew
271
+ `rawBody?`; the copy never did), so anyone who grepped their way into it read a
272
+ stale contract that nothing enforces — the exact both-humans-and-AI failure
273
+ mode behind the false `http.server` exemption (#4382). Deleting it is
274
+ zero-risk by construction: nothing could reach it.
275
+
276
+ **`http.server` is the canonical slot name, and the ledger now says so.**
277
+ `ServiceSlotContracts` gains `'http.server': IHttpServer` plus the deprecated
278
+ `'http-server'` alias entry (same instance — hono-plugin and qa's node-plugin
279
+ register both two lines apart; cloud's two server entrypoints do the same).
280
+ Canonical is the only name present on EVERY provider path: runtime's
281
+ `config.server` path registers no alias, so the three cloud-connection plugins
282
+ that read the alias alone (marketplace-proxy, runtime-config,
283
+ marketplace-install-local) found an empty slot there — a live miss, now fixed:
284
+ all readers go canonical-first with the alias as a fallback that dies with the
285
+ alias registrations. The registrations themselves are untouched this release;
286
+ both sites now carry the deprecation note.
287
+
288
+ **`getRawApp?(): any` joins `IHttpServer`** — the deliberate framework-handle
289
+ escape, declared once. Four consumers were each declaring it locally
290
+ (cloud-connection ×2, metadata's HMR routes, cloud's serverless node-server);
291
+ those local `RawAppHost`/`HttpServerWithRawApp` types are deleted. The `any`
292
+ return is deliberate and documented at the single declaration: the handle's
293
+ real type belongs to the framework, and naming it would give the contract a
294
+ framework dependency. Adapters are not required to expose it; consumers
295
+ feature-detect.
296
+
297
+ **`IMetadataService.bulkRegister`/`bulkUnregister` declare the write options
298
+ their implementation has always accepted.** `bulkRegister`'s contract options
299
+ dropped the `MetadataWriteOptions` half its implementation intersects in
300
+ (`notify` is destructured on the method's first line); `bulkUnregister`
301
+ declared no options at all while the manager takes them. Same shape as the
302
+ `IDataEngine` read-methods gap from B2: a caller typed to the contract could
303
+ not reach the channel without erasing the lookup. Both additive; no implementor
304
+ or caller breaks.
305
+
306
+ Slot-lookup baseline ratchets 168 → 167 (marketplace-install-local's lookup
307
+ typed while touched).
308
+
309
+ - 7777e8f: fix(spec)!: retire the never-built typed-event system; the lifecycle registry now lists the events that actually fire (#4212 follow-up)
310
+
311
+ The lifecycle-event surface promised a typed-event system that was never
312
+ built, in three layers. `kernel/plugin-lifecycle-events.zod.ts` shipped ten
313
+ payload schemas (`PluginRegisteredEvent`, `PluginErrorEvent`,
314
+ `HookTriggeredEvent`, `KernelReadyEvent`, …) and a 21-name
315
+ `PluginLifecycleEventType` enum — zero consumers for every export, and the
316
+ enum was wrong in both directions: 17 names nothing fires, 10 real events
317
+ missing. `contracts/plugin-lifecycle-events.ts` declared the same 17 dead
318
+ names in `IPluginLifecycleEvents` next to 5 real ones, plus an
319
+ `ITypedEventEmitter` interface nothing implements. All of it read as a
320
+ promise; anyone who coded against it (hooking `plugin:started`, awaiting
321
+ `plugin:error`) registered a handler that could never fire, with no error
322
+ saying so — the same silent-drop shape as the #4212 lifecycle-hook family.
323
+
324
+ Removed, with zero consumers verified repo-wide:
325
+
326
+ - `kernel/plugin-lifecycle-events.zod.ts` and every export: `EventPhase`,
327
+ `PluginEventBase`, `PluginRegisteredEvent`, `PluginLifecyclePhaseEvent`,
328
+ `PluginErrorEvent`, `ServiceRegisteredEvent`, `ServiceUnregisteredEvent`,
329
+ `HookRegisteredEvent`, `HookTriggeredEvent`, `KernelEventBase`,
330
+ `KernelReadyEvent`, `KernelShutdownEvent`, `PluginLifecycleEventType`
331
+ (schemas and inferred types).
332
+ - `ITypedEventEmitter` from `contracts/plugin-lifecycle-events.ts`.
333
+ - The 17 never-fired names from `IPluginLifecycleEvents`.
334
+
335
+ `IPluginLifecycleEvents` is now the registry of the **14 events with a real
336
+ emitter** — `kernel:{ready,bootstrapped,listening,shutdown}`, `app:seeded`,
337
+ `metadata:reloaded` (payload `metadata` now optional, matching the documented
338
+ contract), `external.schema.drift`, `ai:routes`, `auth:configure`, and the
339
+ `{service}:ready` convention family (`mcp`, `automation`, `analytics`,
340
+ `external-datasource`, `datasource-admin`) — each payload as observed at its
341
+ fire site. A new `LifecycleEventName` union types
342
+ `PluginContext.hook`/`trigger` in `@objectstack/core` as
343
+ `LifecycleEventName | (string & {})`: known names autocomplete, custom
344
+ cross-plugin names stay legal, existing callers compile unchanged. A pinning
345
+ test asserts two-way equality between the interface keys and the fire-site
346
+ inventory.
347
+
348
+ FROM → TO:
349
+
350
+ - `PluginLifecycleEventType` → `LifecycleEventName` (the union of names that
351
+ fire). There is no runtime enum; the bus is open by design.
352
+ - Event payload schemas (`KernelReadyEvent`, `PluginErrorEvent`, …) → the
353
+ payload tuples on `IPluginLifecycleEvents`. No wire format existed or
354
+ exists; payloads are in-process arguments.
355
+ - `ITypedEventEmitter` → `PluginContext.hook`/`trigger` (the emitter that
356
+ actually exists).
357
+ - Handlers for the 17 dead names → delete them; they never ran. For plugin
358
+ phase observation use the boot report (ADR-0084); for per-plugin errors the
359
+ kernel throws/logs at the failing phase.
360
+
361
+ Plain deletion rather than `retiredKey()` tombstones, per the #4233
362
+ precedent: these keys were never authorable — they described runtime event
363
+ payload records no config author can write, so the silent-strip class the
364
+ authorable-surface ratchet guards against is vacuous. Its baseline entries
365
+ and the `json-schema.manifest.json` keys are dropped deliberately in this PR.
366
+ No ADR-0087 conversion: no stack metadata names these types; there is nothing
367
+ for `os migrate meta` to rewrite.
368
+
369
+ - 7ce02eb: feat(spec,objectql): `IObjectQLEngine` — the `objectql` slot's contract exists, the class `implements` it, and the seven consumer-local stand-ins are deleted (#4251 B3)
370
+
371
+ ObjectQL registers one instance under two names, and the ledger can finally say
372
+ what each name means: `data` stays `IDataEngine` (the data plane), `objectql`
373
+ now resolves to **`IObjectQLEngine`** — the full engine: schema access
374
+ (`getSchema` / `getObject` / `registry`), actions (`registerAction` /
375
+ `removeActionsByPackage` / `executeAction`), the hook/middleware seams
376
+ (`registerHook` / `unregisterHooksByPackage` / `registerFunction` /
377
+ `registerMiddleware` / `bindHooks`), the first-wins default runners and hook
378
+ metrics, boot wiring (`registerDriver` / `setDatasourceMapping` /
379
+ `registerApp`), and the ops probes (`checkDriversHealth` /
380
+ `wasDatastoreCreatedFromEmpty` / `invalidateDataMigrationFlags`). The ledger
381
+ test pins the new relation: `objectql` strictly widens `data`, deliberately no
382
+ longer equal.
383
+
384
+ **Why now, and why `implements` is the point.** The honest state for two
385
+ batches was recorded on `DomainHandlerContext.getObjectQL`: ObjectQL is wider
386
+ than `IDataEngine`, the wider part had no contract, and typing it `IDataEngine`
387
+ would be "the more comfortable-looking lie". The interim discipline — each
388
+ consumer declares the narrow slice it uses — produced seven local surfaces
389
+ (`AppEngineSurface`, `EngineRegistrySurface`, `EngineExtensionSurface`,
390
+ `SecurityEngineSurface`, `FreshDatastoreEngine`, the dispatcher's inline
391
+ `checkDriversHealth` slice, the `getObjectQL: any` itself). Each was honest and
392
+ each was an UNCHECKED claim: `getService<Surface>('objectql')` is an assertion,
393
+ so an engine rename would have broken every consumer at runtime with zero
394
+ compile errors. `ObjectQL implements IObjectQLEngine` converts all of them into
395
+ one compiler-verified claim. All seven stand-ins are deleted; consumers import
396
+ the one declaration. `getObjectQL` is typed `Promise<IObjectQLEngine | null>`
397
+ end to end, closing the oldest documented `any` in the dispatcher.
398
+
399
+ **Evidence bar unchanged.** Every declared member has a cross-package consumer
400
+ reaching it through the slot; engine members without one (e.g. `triggerHooks`,
401
+ cross-package only in tests) stay off until a caller appears. The registry view
402
+ (`EngineSchemaRegistryView`) declares exactly the eight members consumers use.
403
+
404
+ **`_registry` never leaves the engine package now.** plugin-security's
405
+ declared-metadata readers (`readDeclared`, permission-set projection, suggested
406
+ audience bindings) reached ObjectQL's private `_registry` field through `any` —
407
+ the same private reach `/me/apps` had in B2, five more times. All migrated to
408
+ the public `registry` getter the contract declares, test doubles included.
409
+
410
+ **`IMetadataService` gains `subscribe?` / `loadMany?`** — implemented by
411
+ `MetadataManager` beside `watch` all along, reached through the slot only via
412
+ `any` by ObjectQLPlugin's metadata bridge (the re-sync keeping runtime-authored
413
+ hooks/actions live). With them declared, the bridge's six `metadata` lookups
414
+ and metadata-protocol's `objectql` lookup carry contract types, and both files
415
+ leave the grandfather list entirely: baseline **167 → 159 sites, 36 → 34
416
+ files**.
417
+
418
+ - be7360c: chore(plugins,services): declare `providesServices` on the 20 remaining init-time service providers (ADR-0116 follow-up, #4131)
419
+
420
+ ADR-0116 gave the kernel a declared ordering contract, but only
421
+ `ObjectQLPlugin` and `MetadataPlugin` had declared what their `init()`
422
+ registers. The pre-Phase-1 ordering check can only _name a provider_ for
423
+ services someone declared, so its coverage was two plugins wide.
424
+
425
+ An audit of every plugin's `init()` body (brace-matched, comments stripped,
426
+ each call classified by whether it sits inside a `try`/`if`) found 20 plugins
427
+ that register a service on every path without declaring it. All 20 now
428
+ declare `providesServices`. Purely additive: no ordering changes, no new
429
+ failure modes — a `providesServices` entry only lets the kernel say _who_
430
+ provides a service when it reports a misordering, and enriches the Phase-1
431
+ `getService` miss diagnostic.
432
+
433
+ Three needed a closer read before declaring, because they register the same
434
+ service from several branches (`cache`, `queue`, `job`): each early-return
435
+ branch plus the fallback registers it, so every path does — the declaration
436
+ is honest. ADR-0116's rule that a _conditionally_ registered service must
437
+ never be declared is unchanged and was applied throughout.
438
+
439
+ The same audit found 12 plugins that hard-resolve a service during `init()`
440
+ (11 of them `manifest`) without declaring `requiresServices`. None is a live
441
+ exposure — every one already declares a hard `dependencies` entry on the
442
+ provider, so the kernel orders them correctly today. Those are tracked
443
+ separately: with a hard dependency in place, `requiresServices` mostly
444
+ restates what the kernel already enforces, and its real value is on
445
+ _soft_-dependency consumers, of which `AppPlugin` is currently the only one.
446
+
447
+ - 857a6cf: fix(cli,core,metadata,runtime): `os serve` boots with no compiled artifact — the platform does not need an application to start (#4085)
448
+
449
+ The artifact (`dist/objectstack.json`) defines an **application**. ObjectStack is
450
+ a development platform, so it has to start without one — but `os serve
451
+ objectstack.config.ts` died during boot whenever the artifact was absent:
452
+
453
+ ```
454
+ Loading objectstack.config.ts...
455
+ [StandaloneStack] artifact read FAILED: path='…/dist/objectstack.json' error=ENOENT…
456
+
457
+ ✗ Service 'manifest' is async - use await
458
+ ```
459
+
460
+ Exit 1 — on a **known-good app** (`examples/app-todo` fails the same way with
461
+ only its `dist/objectstack.json` moved aside), and on every freshly authored
462
+ project between `os init` and its first `os compile`. The message named neither
463
+ the missing artifact nor a fix, so it read as an internal kernel fault.
464
+
465
+ Three separate faults, each of which alone was enough to refuse the boot:
466
+
467
+ - **`serve` registered the config-derived `AppPlugin` before the stack's own
468
+ `plugins[]`.** Registration order _is_ the kernel's init/start order, and that
469
+ slot sits ahead of `ObjectQLPlugin` (which registers `manifest`/`objectql`) and
470
+ `DefaultDatasourcePlugin` (which connects the database the app seeds through).
471
+ The wrap is now **appended** to `plugins[]`, the same slot
472
+ `createStandaloneStack` gives its artifact-derived `AppPlugin` — so config-boot
473
+ and artifact-boot share one plugin order. The artifact path never hit this,
474
+ which is exactly what made a plugin-**order** bug look artifact-related.
475
+
476
+ - **`ctx.getService()` reported a never-registered service as "is async".**
477
+ `PluginLoader.getService` is an `async` method, so its return value is _always_
478
+ a Promise and its internal "not found" rejection can never surface
479
+ synchronously — the kernel read the answer off that Promise and told every
480
+ caller to `await` a service that did not exist, while the `not found` branch
481
+ below it was unreachable. It now decides from the registry: absent ⇒
482
+ `[Kernel] Service 'x' not found`, registered-but-uninstantiated ⇒ the unchanged
483
+ `Service 'x' is async - use await`. The same crash now reads
484
+ `[Kernel] Service 'manifest' not found`, which points at the layer that is
485
+ actually wrong.
486
+
487
+ - **`MetadataPlugin` treated an absent `local-file` artifact as fatal.**
488
+ `createStandaloneStack` always points it at `dist/objectstack.json`, so a stack
489
+ with no app at all could not boot. A **missing** local artifact is now "nothing
490
+ compiled yet": it logs, starts empty, and leaves the artifact watcher armed, so
491
+ a later `os compile` hydrates the running server. The tolerance is
492
+ ENOENT-only — a malformed or unreadable artifact stays fatal — and
493
+ `bootstrap: 'artifact-only'` (sealed runtime, where the artifact _is_ the
494
+ deployment) keeps failing loudly rather than silently serving an empty runtime.
495
+
496
+ `[StandaloneStack] artifact read FAILED … ENOENT` is likewise no longer shouted
497
+ at callers for whom "no artifact" is a healthy state; a present-but-unusable
498
+ artifact keeps the loud warning.
499
+
500
+ Pinned by an e2e pair that drives the real `os serve` with **no `os compile`
501
+ anywhere**: an app defined only by `objectstack.config.ts` (asserting its object
502
+ is in the started plugin set, not merely that boot survived) and a bare
503
+ `export default {}` platform. The #4012 fixture drops the `os compile` this bug
504
+ had forced on it.
505
+
506
+ - d92c72d: fix(lint,runtime,core): the slot-lookup guard sees the split-declaration form — the shape that made the ratchet look cleaner the more it was used (#4251)
507
+
508
+ The three selectors from #4321 all key off the erasure and the lookup being in
509
+ ONE expression. Split them and every selector misses:
510
+
511
+ ```ts
512
+ let ql: any;
513
+ try {
514
+ ql = ctx.getService("objectql");
515
+ } catch {
516
+ /* optional */
517
+ }
518
+ ```
519
+
520
+ Selector 1 needs the call inside the declarator (this declarator has no init),
521
+ selector 2 needs `as`, selector 3 needs a type argument. The contract is erased
522
+ exactly as in `const ql: any = ctx.getService(…)`.
523
+
524
+ **Why this could not wait for the batches.** The baseline's monotonicity check
525
+ means a file that leaves the grandfather list can never be re-added. So every
526
+ batch converted more of this shape from "grandfathered" into "lint covers this
527
+ file and says nothing" — B2 alone moved `plugin-security/security-plugin.ts`
528
+ into that state. A ratchet that reports a cleaner number the more you sweep is
529
+ the #4342 failure wearing different clothes, and the fix only gets more
530
+ expensive per batch shipped.
531
+
532
+ **It is a rule, not a fourth selector, and that is the whole finding.** esquery
533
+ can match `AssignmentExpression:has(CallExpression[…])`, but it cannot tell
534
+ which declaration the assigned identifier resolves to — so it would equally
535
+ flag the correctly-typed form this work line exists to produce (`let
536
+ i18nService: II18nService | undefined; i18nService = …`, 8 such sites today in
537
+ runtime/app-plugin.ts, service-automation and metadata-protocol). Resolving the
538
+ identifier needs SCOPE analysis. That is cheap and needs no type information, so
539
+ this stays out of the typed-lint pass the KNOWN RESIDUAL still waits on — but it
540
+ is a rule, and the earlier "just one more selector" estimate was wrong.
541
+
542
+ Verified against exactly that: the rule flags all 16 real sites and none of the
543
+ 8 correctly-typed lookalikes.
544
+
545
+ **Scale.** The baseline goes 140 → **169 sites** with the file count unchanged
546
+ at 37: 29 sites were already inside grandfathered files and simply invisible.
547
+ 16 more could NOT be grandfathered (12 in files earlier batches had cleared, 3
548
+ in files never listed, 1 the regex sweep had missed) and are typed here —
549
+ `runtime/app-plugin.ts` ×5, `core/fallbacks/authored-translation-sync.ts` ×2,
550
+ `plugin-security/security-plugin.ts` ×2, `cloud-connection/{runtime-config,
551
+ marketplace-proxy}-plugin.ts` ×3, `platform-objects/src/plugin.ts` ×2,
552
+ `runtime/http-dispatcher.ts`, `runtime/domains/ai.ts`. No baseline key was
553
+ added; the key set still only shrinks.
554
+
555
+ Contracts where they exist (`IAIService`, `IJobService`, `IMetadataService`,
556
+ `II18nService`, `IDataEngine`, `IHttpServer`), named local surfaces where they
557
+ do not — `AppEngineSurface`, `SecurityEngineSurface`, `RawAppHost`,
558
+ `EnvRegistrySurface`, `FreshDatastoreEngine`, `AuthoredTranslationSink`. Two of
559
+ those record something worth naming: `IHttpServer` has no `getRawApp()` (the
560
+ contract is framework-agnostic and the raw app is Hono's own handle), and
561
+ ObjectQL's `_defaultBodyRunner` / `_defaultActionRunner` have no public reader
562
+ at all — the engine attaches them via `(this as any)` and publishes nothing,
563
+ while `getHookMetricsRecorder()` exists for exactly that question about the
564
+ metrics recorder. Declared rather than laundered through `any`, and filed.
565
+
566
+ - Updated dependencies [6a67d7a]
567
+ - Updated dependencies [0ecc656]
568
+ - Updated dependencies [06772eb]
569
+ - Updated dependencies [270650f]
570
+ - Updated dependencies [3aef718]
571
+ - Updated dependencies [1ea6bce]
572
+ - Updated dependencies [c1dcacd]
573
+ - Updated dependencies [ad303ed]
574
+ - Updated dependencies [32ccb23]
575
+ - Updated dependencies [f5a4ef0]
576
+ - Updated dependencies [2d3e255]
577
+ - Updated dependencies [7d7521f]
578
+ - Updated dependencies [5dc4d02]
579
+ - Updated dependencies [05154a1]
580
+ - Updated dependencies [9b6fe7c]
581
+ - Updated dependencies [8c711fb]
582
+ - Updated dependencies [09e4547]
583
+ - Updated dependencies [91f4c78]
584
+ - Updated dependencies [820eff9]
585
+ - Updated dependencies [8d895ff]
586
+ - Updated dependencies [f6472d7]
587
+ - Updated dependencies [78caf51]
588
+ - Updated dependencies [62a789b]
589
+ - Updated dependencies [789ad63]
590
+ - Updated dependencies [2af1988]
591
+ - Updated dependencies [12a19a8]
592
+ - Updated dependencies [41dcda3]
593
+ - Updated dependencies [c8124e5]
594
+ - Updated dependencies [a1a4140]
595
+ - Updated dependencies [217e2e6]
596
+ - Updated dependencies [86a71d1]
597
+ - Updated dependencies [d5c75e2]
598
+ - Updated dependencies [03d26f7]
599
+ - Updated dependencies [4384921]
600
+ - Updated dependencies [3c628ce]
601
+ - Updated dependencies [7cb922e]
602
+ - Updated dependencies [1d22114]
603
+ - Updated dependencies [b5f9397]
604
+ - Updated dependencies [ed77493]
605
+ - Updated dependencies [58a03d2]
606
+ - Updated dependencies [dc530b4]
607
+ - Updated dependencies [e59786e]
608
+ - Updated dependencies [bcf1112]
609
+ - Updated dependencies [9774b78]
610
+ - Updated dependencies [b07d829]
611
+ - Updated dependencies [a648e96]
612
+ - Updated dependencies [a47ac06]
613
+ - Updated dependencies [e4c61a7]
614
+ - Updated dependencies [cc60165]
615
+ - Updated dependencies [081aa6f]
616
+ - Updated dependencies [91f4c78]
617
+ - Updated dependencies [e8d0c21]
618
+ - Updated dependencies [c1d44f7]
619
+ - Updated dependencies [ab9fb5c]
620
+ - Updated dependencies [f985b3f]
621
+ - Updated dependencies [9a4932a]
622
+ - Updated dependencies [f9fc874]
623
+ - Updated dependencies [011b386]
624
+ - Updated dependencies [7777e8f]
625
+ - Updated dependencies [507b92a]
626
+ - Updated dependencies [7309c81]
627
+ - Updated dependencies [20bc1ec]
628
+ - Updated dependencies [90c2b15]
629
+ - Updated dependencies [42eeb7d]
630
+ - Updated dependencies [01e124d]
631
+ - Updated dependencies [7ce02eb]
632
+ - Updated dependencies [a13827e]
633
+ - Updated dependencies [7733604]
634
+ - Updated dependencies [40e420f]
635
+ - Updated dependencies [d13004a]
636
+ - Updated dependencies [5b47ab5]
637
+ - Updated dependencies [b09d8d9]
638
+ - Updated dependencies [b09d8d9]
639
+ - Updated dependencies [8675db6]
640
+ - Updated dependencies [b09d8d9]
641
+ - Updated dependencies [3eb1b2b]
642
+ - Updated dependencies [59b85c0]
643
+ - Updated dependencies [6e357ed]
644
+ - Updated dependencies [d6938bf]
645
+ - Updated dependencies [31e0be9]
646
+ - Updated dependencies [4bfd455]
647
+ - Updated dependencies [ffd2ce2]
648
+ - Updated dependencies [62f8017]
649
+ - Updated dependencies [a831df1]
650
+ - Updated dependencies [f752ee3]
651
+ - Updated dependencies [a1b61e0]
652
+ - Updated dependencies [cd6b9f2]
653
+ - Updated dependencies [2cb6d3c]
654
+ - Updated dependencies [af2a095]
655
+ - Updated dependencies [ec796d5]
656
+ - Updated dependencies [e87fea1]
657
+ - Updated dependencies [c65e529]
658
+ - Updated dependencies [3ca34c1]
659
+ - Updated dependencies [239c3a3]
660
+ - Updated dependencies [94a0bbc]
661
+ - Updated dependencies [d6bfb3d]
662
+ - Updated dependencies [a2266a6]
663
+ - Updated dependencies [d25a0ec]
664
+ - Updated dependencies [667b83e]
665
+ - Updated dependencies [627b188]
666
+ - Updated dependencies [8d4eae7]
667
+ - Updated dependencies [65a3a84]
668
+ - Updated dependencies [ccd9397]
669
+ - Updated dependencies [bca935b]
670
+ - Updated dependencies [c54c822]
671
+ - Updated dependencies [8dcc0f5]
672
+ - Updated dependencies [75b9e51]
673
+ - Updated dependencies [0a2f233]
674
+ - Updated dependencies [8621cdd]
675
+ - Updated dependencies [6f23667]
676
+ - Updated dependencies [5d21a48]
677
+ - Updated dependencies [19365b7]
678
+ - Updated dependencies [b7ed26d]
679
+ - Updated dependencies [b3a3d83]
680
+ - Updated dependencies [7a55913]
681
+ - Updated dependencies [35accbf]
682
+ - Updated dependencies [6038de7]
683
+ - Updated dependencies [eb95d97]
684
+ - Updated dependencies [e4c2dc8]
685
+ - Updated dependencies [1bd2795]
686
+ - Updated dependencies [8186a70]
687
+ - Updated dependencies [a329cca]
688
+ - Updated dependencies [6eec18c]
689
+ - Updated dependencies [4d7bebf]
690
+ - Updated dependencies [821ac7a]
691
+ - Updated dependencies [8f81731]
692
+ - Updated dependencies [8b50cb3]
693
+ - Updated dependencies [8c2db68]
694
+ - Updated dependencies [22b5e54]
695
+ - Updated dependencies [0166bd5]
696
+ - Updated dependencies [9b702dc]
697
+ - Updated dependencies [ab16331]
698
+ - @objectstack/spec@17.0.0-rc.1
699
+
700
+ ## 17.0.0-rc.0
701
+
702
+ ### Minor Changes
703
+
704
+ - 879ea13: ADR-0105 Phase 0 + Phase 1: group tenancy posture; organization scope as a
705
+ first-class authorization dimension.
706
+
707
+ > This release carries BREAKING spec removals (see "Enforce-or-remove" below)
708
+ > but is recorded as `minor`: every publishable package is in the Changesets
709
+ > lockstep group, so one `major` would promote the whole monorepo. Breaking
710
+ > changes ship as `minor` during the launch window — the migration notes below
711
+ > are what reach consumers in `CHANGELOG.md`.
712
+
713
+ ## Tenancy is now a spectrum (D1)
714
+
715
+ `single | group | isolated`, resolved by the `tenancy` service and selected with
716
+ the new `OS_TENANCY_POSTURE` env var. Existing deployments are unchanged:
717
+ `OS_TENANCY_POSTURE` unset derives the posture from `OS_MULTI_ORG_ENABLED`
718
+ (`true` ⇒ `isolated`, else `single`). An unrecognized value throws at boot
719
+ rather than silently landing in a posture with no organization wall.
720
+
721
+ - `single` — no wall (unchanged).
722
+ - `group` — **new.** Organizations are membership boundaries over one shared
723
+ dataset; Layer 0 becomes `organization_id IN accessible_org_ids` (union / MOAC
724
+ semantics). Enforced by the OPEN engine.
725
+ - `isolated` — today's `multi`, renamed. Behavior, enterprise `org-scoping`
726
+ probe and degraded-boot handling all unchanged.
727
+
728
+ ## Organization scope is a first-class context field (D2)
729
+
730
+ `ExecutionContext.accessible_org_ids` — every organization the caller holds a
731
+ currently-valid membership in (ADR-0091 validity windows) — is resolved once by
732
+ `resolveAuthzContext` and carried by every transport. The `group` wall reads it
733
+ directly; RLS policies may reference it as
734
+ `organization_id IN (current_user.accessible_org_ids)`. An empty or absent set
735
+ fails the wall closed.
736
+
737
+ Only the Layer 0 PREDICATE widens. Composition is untouched: the wall is still
738
+ computed independently of the RLS compiler, AND-composed outermost, and
739
+ crossable only by a true `PLATFORM_ADMIN` on a posture-permitting object — so
740
+ ADR-0095's W1/W2 invariants hold in every posture.
741
+
742
+ ## Two P0 correctness fixes (D3, D4) — behavior changes
743
+
744
+ **D3 — app-authored org-scoped RLS policies are no longer silently dropped**
745
+ (finding F1, framework#3539). `collectRLSPolicies` used to strip any policy whose
746
+ `using` contained the substring `current_user.organization_id` when isolation was
747
+ inactive, which swallowed app-authored policies as well as the platform's own.
748
+ Stripping is now decided by PROVENANCE (identity against the shipped
749
+ declaration). **Upgrade impact:** in a deployment with no organization wall, an
750
+ app-authored policy referencing the active organization is now RETAINED and
751
+ fails closed (zero rows) with a one-time warning, where it previously vanished
752
+ and the object read unscoped. `getReadFilter` shared the defect, so analytics and
753
+ raw-SQL consumers were affected too. If a policy was only ever meant for
754
+ multi-org, delete it or install `@objectstack/organizations`.
755
+
756
+ **D4 — `viewAllRecords`/`modifyAllRecords` never cross an organization
757
+ boundary** (finding F2, framework#3540). Under a wall-less posture nothing
758
+ bounded the wildcard superuser bits `organization_admin` carries, so a
759
+ deployment that accumulated organizations (personal orgs on signup) made every
760
+ owner/admin an environment-wide superuser. `auto-org-admin-grant` now grants a
761
+ de-VAMA'd `organization_admin_no_bypass` variant when no wall is enforced, and
762
+ revokes the superseded variant whenever the posture changes. **Upgrade impact:**
763
+ in `single` posture an org owner/admin keeps full CRUD but loses the blanket
764
+ ownership/sharing/RLS bypass. Deliberate deployment-wide visibility remains
765
+ available through `admin_full_access` or an explicitly authored permission set —
766
+ it just stops being a side effect of a better-auth membership role.
767
+
768
+ ## Engine-owned organization stamping (D5)
769
+
770
+ Under any wall-enforcing posture the engine stamps `organization_id` from the
771
+ caller's active organization on an insert that omits it, and validates every
772
+ supplied value against the wall. Idempotent with the enterprise auto-stamp
773
+ (neither overwrites a supplied value). This also closes a real hole: the
774
+ pre-existing post-image check required a non-array payload, so a BULK insert
775
+ could carry a forged `organization_id` per row. One forged row now denies the
776
+ whole write.
777
+
778
+ ## Group structure, extension fields and red-line lints (D6, D7)
779
+
780
+ - `sys_organization` gains `parent_organization_id` and `sort_order` — a
781
+ **reporting dimension only**.
782
+ - New lint `validateOrgAxisRedLines` (`org-axis-permission-inheritance`,
783
+ `org-axis-cross-org-bu-grant`), wired into `os lint` / `os compile` /
784
+ `os validate`: an RLS policy or sharing rule that walks the org tree is an
785
+ error, as is a business-unit grant on a platform-global object.
786
+ - Extension fields on better-auth-managed objects ride the existing ADR-0092
787
+ whitelist. A new guard derives better-auth's real field surface from
788
+ `getAuthTables()` at the pinned version and fails the build on any name
789
+ collision, so a library upgrade cannot silently take ownership of a column.
790
+
791
+ ## Enforce-or-remove (D11) — BREAKING
792
+
793
+ Both removals are of surface that had **zero runtime consumers**, so no
794
+ behavior changes; authoring them is now a no-op instead of a lint warning.
795
+
796
+ - **`PermissionSet.contextVariables` — REMOVED.** The RLS compiler never read
797
+ it. FROM → TO: a set a policy needs as `field IN (current_user.<key>)` is now
798
+ supplied by a registered membership resolver (below); a constant belongs in
799
+ the policy itself as a literal (`status = 'published'`).
800
+ - **`Territory` / `TerritoryModel` / `TerritoryType` (`security/territory.zod.ts`)
801
+ — REMOVED.** No runtime object, stack field or resolver existed. FROM → TO:
802
+ matrix requirements are served by multi-position × business-unit anchoring; a
803
+ generalized dimension-security module will arrive with its own ADR.
804
+ - **`ExecutionContext.rlsMembership` — PRODUCTIZED.** The bag the compiler has
805
+ merged since ADR-0056 finally has a producer: register an
806
+ `IRlsMembershipResolver` (`@objectstack/spec/contracts`) under the
807
+ `rls-membership-resolver` service, declaring the keys it owns. Fail-closed by
808
+ construction — an unresolved key makes its policies drop out. Kernel-owned
809
+ keys (`accessible_org_ids`, `org_user_ids`, …) are reserved and cannot be
810
+ overwritten from this seam.
811
+
812
+ ## Edition boundary (D12)
813
+
814
+ The `group` posture's enforcement primitives ship OPEN — the union wall,
815
+ `accessible_org_ids` resolution, D5 stamping/validation, the D3/D4 correctness
816
+ fixes and the D6 lints — because the correctness of a wall is never a paid
817
+ feature (cloud ADR-0016 铁律「强制免费、治理收费」). `isolated` keeps its existing
818
+ enterprise `org-scoping` probe, so the current commercial boundary for
819
+ legal-entity isolation is unchanged by this release.
820
+
821
+ - 763931e: feat(filters): evaluate `{filter-token}` placeholders server-side (#3582)
822
+
823
+ Filter values travel as JSON, so a time- or user-scoped slice writes a
824
+ placeholder instead of code:
825
+
826
+ ```ts
827
+ filter: { close_date: { $gte: '{current_year_start}' }, owner: '{current_user_id}' }
828
+ ```
829
+
830
+ The vocabulary has been in `@objectstack/spec` for a while (`date-macros.zod.ts`,
831
+ `context-tokens.zod.ts`) and `objectstack build` rejects tokens outside it
832
+ (#3574). What was missing is the half that _substitutes a value_: **nothing on
833
+ the server ever did**. A placeholder reached the driver as the literal string
834
+ `'{current_year_start}'`, compared as text, and matched nothing.
835
+
836
+ That failure is invisible — an empty widget looks exactly like a metric that is
837
+ legitimately zero — so apps worked around it by computing dates at module load,
838
+ which freezes "this year" into the built artifact and quietly goes stale.
839
+
840
+ **New: `resolveFilterTokens()` in `@objectstack/core`**, wired into the two
841
+ server-side seams every filter passes through:
842
+
843
+ - **ObjectQL read path** — `find` / `findOne` / `count` / `aggregate`, so REST
844
+ queries, related lists, saved-view filters and flow `find_records` all resolve.
845
+ It runs before the middleware chain, so only author-supplied filters are
846
+ inspected; RLS/sharing filters are injected downstream from concrete values.
847
+ - **Analytics dataset executor** — a dataset's intrinsic `filter`, a widget's
848
+ `runtimeFilter`, measure-scoped filters, and time-dimension `dateRange`s.
849
+ This path needs its own call: `NativeSQLStrategy` compiles raw SQL and binds
850
+ comparands directly, so a dashboard widget never passes through `engine.find()`.
851
+
852
+ Behavioural notes:
853
+
854
+ - Date tokens resolve to ISO strings (`YYYY-MM-DD`, or a full timestamp for
855
+ `{now}` / `{N_hours_ago}` / `{N_minutes_ago}`). Turning that into a column's
856
+ on-disk form stays the driver's job (`SqlDriver.temporalFilterValue`), so
857
+ there is still exactly one source of truth for the storage convention.
858
+ - Calendar boundaries follow `ExecutionContext.timezone`; one instant is pinned
859
+ per filter tree, so a `>= {current_month_start}` / `< {next_month_start}` pair
860
+ can never straddle a boundary.
861
+ - `{current_org_id}` reads `ExecutionContext.tenantId`; `{current_user_id}` reads
862
+ `userId`. A request carrying neither now **throws** instead of resolving to
863
+ `null` — a null comparand degrades to `IS NULL` on most drivers and would hand
864
+ back the rows the filter was written to exclude.
865
+ - An unrecognised placeholder **throws**, carrying the near-miss fix
866
+ (`{current_user}` → `{current_user_id}`, `{this_quarter_start}` →
867
+ `{current_quarter_start}`). This matches what `objectstack build` already
868
+ enforces. Consequence, previously implicit and now load-bearing: a filter value
869
+ that is _entirely_ `{...}` is always read as a placeholder, so a literal value
870
+ of that shape is not expressible — rename the value.
871
+
872
+ Also in this change: `notify` no longer sends the six-character string
873
+ `"undefined"` as an audience member. `to: ['{record.owner.manager}']` walks
874
+ `.manager` on a scalar foreign-key id, resolves to nothing, and `String(undefined)`
875
+ turned that into a phantom recipient — the emit "succeeded", addressed nobody,
876
+ and said nothing. Unresolved recipients are now dropped, and a node with no
877
+ recipient left fails naming the offending template and pointing at the start
878
+ node's `config.expand` (#3475), which does hydrate the relation.
879
+
880
+ - 4cca74c: fix(i18n)!: the `translation` metadata type speaks the same `objects.` shape everything else does (#3778)
881
+
882
+ A translation authored in the product saved successfully and then rendered
883
+ nothing. Not a resolver gap — a contract split. The `translation` metadata type
884
+ (`allowRuntimeCreate: true`, so Studio/the metadata API/an agent can author it)
885
+ was registered against `AppTranslationBundleSchema`, an object-first shape keyed
886
+ on `o.<object>`. Every resolver, `os i18n extract`, `os i18n check`, the objectui
887
+ hooks, and all nine shipped bundles read `objects.<object>`. Nothing bridged the
888
+ two, so the save path and the read path never met.
889
+
890
+ **Why converge instead of bridge.** A converter was the obvious fix and the
891
+ wrong one: it would be throwaway code, and it would start producing _working_
892
+ `o.`-shaped rows — closing the migration-free window that exists precisely
893
+ because the feature never functioned. The retired shape's real-world footprint
894
+ was zero: all three `*.translation.ts` files in the tree (platform-objects,
895
+ CRM and todo examples) were already `objects.`-shaped, contradicting the type's
896
+ own registered schema. Converging is a registration fix, not a migration.
897
+
898
+ **Breaking.** `AppTranslationBundleSchema`, `ObjectTranslationNodeSchema`, and
899
+ their types are **deleted** — no deprecation cycle. Nothing worked end-to-end
900
+ through them, so there is no functioning consumer to protect, and a
901
+ deprecated-but-present schema is exactly the exemplar an AI agent copies into
902
+ new code. The optional `II18nService.getAppBundle` / `loadAppBundle` methods go
903
+ with them: zero implementers, so they advertised a capability the runtime never
904
+ delivered.
905
+
906
+ **The replacement.** `TranslationItemSchema` — one locale of the same
907
+ `TranslationData` groups a file bundle uses, plus the `locale` it translates,
908
+ with a `defineTranslation()` factory. An item is one entry of a
909
+ `TranslationBundle`; that is the whole type.
910
+
911
+ Three details are deliberate, all aimed at the failure being silent rather than
912
+ loud:
913
+
914
+ - **`locale` is required**, not inferred from the item name. The sync skips an
915
+ item whose locale it cannot resolve, and a skip is invisible to whoever — or
916
+ whatever — authored it. (The name fallback still covers rows written before
917
+ this.)
918
+ - **Retired keys are rejected, not stripped.** Zod drops undeclared keys
919
+ silently, which would reproduce this bug exactly: save succeeds, nothing
920
+ renders. A pre-parse guard turns that silence into a 422 naming the group to
921
+ use (`'o' … — use 'objects.<object_name>'`). It runs ahead of the parse so the
922
+ retired keys stay out of the schema itself — the generated JSON Schema and the
923
+ Studio editor never advertise a shape that cannot work.
924
+ - **`ObjectTranslationData.label` is now optional.** Partial translation is the
925
+ normal state and every resolver already treats each key as independent.
926
+ Requiring it forced authors to restate the source label just to validate,
927
+ filling bundles with fake translations that mask real coverage gaps.
928
+
929
+ Also in this change: the authored-translation sync warns (naming the row and the
930
+ fix) when it meets a row still in the retired shape instead of loading it into
931
+ nowhere, and no longer merges publish bookkeeping (`_lockReason`,
932
+ `_packageVersion`, …) into the translation layer. `GET
933
+ /i18n/labels/:object/:locale`'s fallback now reads the nested
934
+ `objects.<obj>.fields.<field>.label` data it is actually given — it scanned for
935
+ flat dotted `o.<obj>.fields.<field>` keys, a third dialect no producer ever
936
+ wrote, so it always returned `{}`.
937
+
938
+ Migration: author every translation — file or runtime item — under `objects.`.
939
+ `o` → `objects`, `app` → `apps`, `nav` → `apps.<app>.navigation.<id>.label`,
940
+ `dashboard` → `dashboards`, `_globalOptions` →
941
+ `objects.<obj>.fields.<field>.options`, `_meta.locale` → top-level `locale`,
942
+ `_actions.confirmMessage` → `_actions.confirmText`. `reports`, `notifications`,
943
+ `errors`, and `namespace` had no runtime consumer and have no replacement.
944
+
945
+ ### Patch Changes
946
+
947
+ - a227ed7: fix(objectql)!: one key for the empty group bucket — real `null`, on both aggregation paths (#3839)
948
+
949
+ A grouped row whose dimension value is empty now carries `null` for that
950
+ dimension no matter which way the aggregate ran. Downstream code can test the
951
+ empty bucket with a plain `value == null` again: charts render their own empty
952
+ label, drill-through on that bucket builds `field = null` and returns the rows
953
+ it should, and a dashboard no longer changes shape when the driver, the
954
+ granularity or the reference timezone changes.
955
+
956
+ ### What was wrong
957
+
958
+ `engine.aggregate` has two implementations of one feature. It pushes the
959
+ aggregate down as SQL when the driver advertises every requested granularity and
960
+ the reference timezone is UTC; otherwise it fetches rows and buckets them in JS.
961
+ The two disagreed about how to spell "empty":
962
+
963
+ ```
964
+ --- same dataset, same query, one row with a NULL value ---
965
+ pushed-down SQL : [{ "key": null, "type": "null", "total": 2 }, …]
966
+ in-memory : [{ "key": "(null)", "type": "string", "total": 2 }, …]
967
+ ```
968
+
969
+ The measures were always right — only the key's type and literal differed —
970
+ which is why this went unnoticed for so long: every total reconciled. But the
971
+ engine picks a path per query, so the same data produced a different bucket key
972
+ on SQLite-plus-UTC-plus-`month` than on `week` (which SQLite does not advertise),
973
+ a non-UTC timezone, or `driver-rest` / `driver-memory` / a remote Turso, all of
974
+ which bucket in memory unconditionally.
975
+
976
+ It was never date-specific either. A plain `groupBy: ['stage']` over a NULL
977
+ column diverged the same way.
978
+
979
+ Consumers are written against `null` — they check `== null` and supply their own
980
+ empty label ('—', '(empty)', a localized "Uncategorized"). The sentinel defeated
981
+ every one of them: it rendered a raw English debug string in the UI, and a drill
982
+ on the empty bucket compiled to `field = '(null)'` and matched nothing.
983
+
984
+ The in-memory path's comment justified the string as staying "consistent with
985
+ the client `useReportData` hook". That hook was removed with ADR-0021, and the
986
+ literal never appeared in it.
987
+
988
+ ### What changed
989
+
990
+ - `applyInMemoryAggregation` and `bucketDateValue` (`@objectstack/objectql`) key
991
+ the empty bucket as `null`. `bucketDateValue` now returns `string | null`. A
992
+ null instant and an unparseable one still share one bucket, because SQL cannot
993
+ tell them apart either (`strftime('%Y-%m', 'not-a-date')` is NULL).
994
+ - The internal composite bucket id is JSON-encoded, so the empty bucket stays
995
+ distinct from a row whose value is the literal string `"null"`.
996
+ - `bucketKeyToCalendarRange` (`@objectstack/core`) accepts `string | null`. The
997
+ empty bucket has no calendar span, so a drill on it opens the unscoped
998
+ superset instead of an invented bound — unchanged behavior, honest signature.
999
+ - The driver output contract in `@objectstack/spec` now states the rule: a row
1000
+ with no value keys as `null`, never a sentinel. Propagating NULL through the
1001
+ bucket expression is the whole of it; a driver only breaks it by adding a
1002
+ `COALESCE`.
1003
+
1004
+ ### Gates
1005
+
1006
+ `checkDateBucketParity` (`@objectstack/verify`) deliberately carried no null
1007
+ instant, because the divergence would have failed it for a reason it was not
1008
+ about. Its fixture now has one, so the convergence is held in place — including
1009
+ for out-of-tree drivers that run the check against themselves.
1010
+
1011
+ Two fixes were needed to make that fixture meaningful:
1012
+
1013
+ - The check folded bucket labels through `String(value)`, which turns SQL NULL
1014
+ into `'null'` — a label a TEXT column can genuinely hold. A driver spelling
1015
+ "empty" as a string could compare equal to one returning real NULL. The empty
1016
+ bucket is now keyed out of band.
1017
+ - Label sets were compared with `JSON.stringify`, which is sensitive to key
1018
+ insertion order. Row order is not part of this contract and the two paths
1019
+ naturally differ (SQL sorts its groups; the in-memory path emits first-seen
1020
+ order), so a driver with entirely correct buckets could be reported as
1021
+ disagreeing — with an empty diff message, since nothing actually differed.
1022
+ The comparison is now order-insensitive.
1023
+
1024
+ A new dogfood check covers the non-date half against real drivers: same dataset,
1025
+ plain and date-bucketed `groupBy`, both paths, one key.
1026
+
1027
+ - Updated dependencies [50616d9]
1028
+ - Updated dependencies [08b5a3d]
1029
+ - Updated dependencies [d99aeb3]
1030
+ - Updated dependencies [4727eb8]
1031
+ - Updated dependencies [f63cd09]
1032
+ - Updated dependencies [fa3d0cf]
1033
+ - Updated dependencies [af5a224]
1034
+ - Updated dependencies [71f76e1]
1035
+ - Updated dependencies [37b1346]
1036
+ - Updated dependencies [99736a0]
1037
+ - Updated dependencies [fe67e34]
1038
+ - Updated dependencies [fdb4f50]
1039
+ - Updated dependencies [1bd5652]
1040
+ - Updated dependencies [14252d3]
1041
+ - Updated dependencies [7fb436c]
1042
+ - Updated dependencies [879ea13]
1043
+ - Updated dependencies [201b31f]
1044
+ - Updated dependencies [e2616e0]
1045
+ - Updated dependencies [6fdc5c6]
1046
+ - Updated dependencies [8b9d71e]
1047
+ - Updated dependencies [33f5e23]
1048
+ - Updated dependencies [259af21]
1049
+ - Updated dependencies [587fc91]
1050
+ - Updated dependencies [1986594]
1051
+ - Updated dependencies [ad4af62]
1052
+ - Updated dependencies [d44dbfa]
1053
+ - Updated dependencies [474fe39]
1054
+ - Updated dependencies [0bc685a]
1055
+ - Updated dependencies [b949059]
1056
+ - Updated dependencies [be1c52c]
1057
+ - Updated dependencies [c5ff96d]
1058
+ - Updated dependencies [84e7be9]
1059
+ - Updated dependencies [a6c3f38]
1060
+ - Updated dependencies [debc23a]
1061
+ - Updated dependencies [0f8ad09]
1062
+ - Updated dependencies [8f9689f]
1063
+ - Updated dependencies [57a3bb3]
1064
+ - Updated dependencies [5f9a987]
1065
+ - Updated dependencies [db02d47]
1066
+ - Updated dependencies [0bfdf46]
1067
+ - Updated dependencies [376a061]
1068
+ - Updated dependencies [7c7e246]
1069
+ - Updated dependencies [f35cdc5]
1070
+ - Updated dependencies [9ea2bc5]
1071
+ - Updated dependencies [c2d9098]
1072
+ - Updated dependencies [a227ed7]
1073
+ - Updated dependencies [9613396]
1074
+ - Updated dependencies [e47b342]
1075
+ - Updated dependencies [4ed7ed4]
1076
+ - Updated dependencies [2fa4ca1]
1077
+ - Updated dependencies [f5a2320]
1078
+ - Updated dependencies [deb538f]
1079
+ - Updated dependencies [5b89711]
1080
+ - Updated dependencies [0c8a22f]
1081
+ - Updated dependencies [763931e]
1082
+ - Updated dependencies [de9af8a]
1083
+ - Updated dependencies [c4df271]
1084
+ - Updated dependencies [a41ba5c]
1085
+ - Updated dependencies [189854c]
1086
+ - Updated dependencies [0e3a226]
1087
+ - Updated dependencies [1d4756e]
1088
+ - Updated dependencies [720c5ad]
1089
+ - Updated dependencies [a8d1e24]
1090
+ - Updated dependencies [41642b0]
1091
+ - Updated dependencies [4cca74c]
1092
+ - Updated dependencies [88ef03e]
1093
+ - Updated dependencies [9e2caf3]
1094
+ - Updated dependencies [81ce41a]
1095
+ - Updated dependencies [85e1e4e]
1096
+ - Updated dependencies [dac6a08]
1097
+ - Updated dependencies [394b7a1]
1098
+ - Updated dependencies [677b591]
1099
+ - Updated dependencies [d77d1b7]
1100
+ - Updated dependencies [5b79a34]
1101
+ - Updated dependencies [c757854]
1102
+ - Updated dependencies [0045682]
1103
+ - Updated dependencies [2a5f04a]
1104
+ - Updated dependencies [4f740b0]
1105
+ - Updated dependencies [67452d1]
1106
+ - Updated dependencies [0fc6219]
1107
+ - Updated dependencies [605e190]
1108
+ - Updated dependencies [c6c59f1]
1109
+ - Updated dependencies [b0e78a8]
1110
+ - Updated dependencies [f31cc8d]
1111
+ - Updated dependencies [f343dc4]
1112
+ - Updated dependencies [8269e32]
1113
+ - Updated dependencies [74f7339]
1114
+ - Updated dependencies [a6c35a2]
1115
+ - Updated dependencies [c2f1002]
1116
+ - Updated dependencies [f163028]
1117
+ - Updated dependencies [f07808c]
1118
+ - Updated dependencies [7ffc3d3]
1119
+ - Updated dependencies [88346ba]
1120
+ - Updated dependencies [4631592]
1121
+ - Updated dependencies [32ff033]
1122
+ - Updated dependencies [5ac93d4]
1123
+ - Updated dependencies [93f267f]
1124
+ - Updated dependencies [0024abf]
1125
+ - Updated dependencies [acbf364]
1126
+ - Updated dependencies [7687f7b]
1127
+ - Updated dependencies [1659072]
1128
+ - Updated dependencies [abceb0d]
1129
+ - Updated dependencies [0c302a7]
1130
+ - Updated dependencies [6633337]
1131
+ - Updated dependencies [f00d8d4]
1132
+ - Updated dependencies [503be86]
1133
+ - Updated dependencies [cde1975]
1134
+ - Updated dependencies [0bc685a]
1135
+ - Updated dependencies [11949fc]
1136
+ - Updated dependencies [b098b0e]
1137
+ - Updated dependencies [4d00b13]
1138
+ - Updated dependencies [57bab76]
1139
+ - Updated dependencies [b90086a]
1140
+ - Updated dependencies [b95577a]
1141
+ - Updated dependencies [83c161f]
1142
+ - Updated dependencies [d8c4957]
1143
+ - Updated dependencies [f24cb83]
1144
+ - Updated dependencies [5dbbb92]
1145
+ - Updated dependencies [69f1dfd]
1146
+ - @objectstack/spec@17.0.0-rc.0
1147
+
1148
+ ## 16.1.0
1149
+
1150
+ ### Minor Changes
1151
+
1152
+ - b20201f: fix(service-automation): `runAs:'user'` runs data ops with the triggering user's
1153
+ real permission sets + positions, not a bare member fallback (#3356, follow-up to
1154
+ #1888)
1155
+
1156
+ Since #1888 the automation engine honours `flow.runAs` (`system` elevates), but
1157
+ the `runAs:'user'` credential propagation was hollow. A record-change-triggered
1158
+ `runAs:'user'` flow ran its data nodes (`update_record`, …) with a **zero-grant**
1159
+ principal — only the `member`/`everyone` baseline — even when the triggering user
1160
+ was fully authorized. Two faces by object config: a `private` object 403'd the
1161
+ in-flow write (`not permitted for positions [org_member, everyone]` — the user's
1162
+ permission sets were invisible); a `public_read_write` object let the write
1163
+ through but **silently stripped** readonly/FLS-gated fields. The root cause: the
1164
+ ObjectQL record-change hook session carries only a `userId` — never the writer's
1165
+ positions/permission sets — and nothing in between resolved them, so the comment
1166
+ promising "enforces RLS exactly as the user who made the change" never held.
1167
+
1168
+ The fix resolves the triggering user's **actual** authorization at run setup, from
1169
+ the same tables a direct REST request resolves through:
1170
+
1171
+ - **`@objectstack/core`** factors the userId-driven core of `resolveAuthzContext`
1172
+ into a new exported `resolveUserAuthzGrants(ql, userId, opts)` — the single place
1173
+ that reads `sys_member` / `sys_user_position` / `sys_*_permission_set` and
1174
+ derives positions, permission-set names, `platform_admin`, and posture. The
1175
+ HTTP resolver now delegates to it (behaviour byte-identical; the full contract
1176
+ suite still passes), so a non-HTTP surface that already knows the user id builds
1177
+ the SAME envelope instead of re-implementing the reads.
1178
+ - **`@objectstack/service-automation`** gains `AutomationEngine.setUserGrantsResolver`,
1179
+ wired by the plugin to `resolveUserAuthzGrants` over the objectql/data engine.
1180
+ For a `runAs:'user'` run whose trigger left the authz envelope unresolved (no
1181
+ `permissions`), the engine now resolves the user's positions + permission sets
1182
+ once at run setup and threads them into every data node's ObjectQL context —
1183
+ so the run enforces RLS/FLS exactly as that user. Contexts that already carry
1184
+ `permissions` are left untouched (a REST trigger, and notably an ADR-0090 agent
1185
+ ceiling acting on-behalf-of a user — always non-empty — so a deliberately
1186
+ narrowed identity is never re-broadened). `runAs:'system'` is unchanged, and a
1187
+ resolver error fails safe (warns, keeps the bare user — never elevates).
1188
+ - **`@objectstack/trigger-record-change`** stops forwarding the misleading
1189
+ half-populated `positions` (empty in practice, and never `permissions`) from the
1190
+ hook session; it forwards `userId` + tenant only and lets the engine resolve the
1191
+ full grants authoritatively.
1192
+
1193
+ When no ObjectQL engine is present (bare engine / tests) the resolver is unwired
1194
+ and run identity is unchanged from before.
1195
+
1196
+ ### Patch Changes
1197
+
1198
+ - Updated dependencies [9e45b63]
1199
+ - @objectstack/spec@16.1.0
1200
+
1201
+ ## 16.0.0
1202
+
1203
+ ### Minor Changes
1204
+
1205
+ - dd9f223: feat(analytics): scope a datetime date-bucket drill to the reference-tz midnight instants (#1752 follow-up)
1206
+
1207
+ Closes the one gap left by the initial #1752 change: a `datetime` date dimension
1208
+ bucketed under a **non-UTC reference timezone** previously fell back to a superset
1209
+ drill (its bucket boundary is that tz's midnight _instant_, which `YYYY-MM-DD`
1210
+ calendar bounds can't express).
1211
+
1212
+ - **`@objectstack/core`** adds `zonedDateStartToUtcMs(ymd, tz)` — the UTC instant
1213
+ at which a calendar day begins in a reference timezone (the inverse of
1214
+ `calendarPartsInTz`). DST-safe: the offset is read from the platform tz
1215
+ database via `Intl`, with a two-pass resolution for the rare offset-boundary
1216
+ case; an unset/`'UTC'`/invalid zone returns plain UTC midnight.
1217
+ - **`@objectstack/service-analytics`** now emits `drillRanges` bounds per the
1218
+ field's temporal type (ADR-0053): a `datetime` field → ISO **instant** bounds
1219
+ at the reference tz's midnight (works under any tz, incl. DST); a `date` field
1220
+ → `YYYY-MM-DD` calendar bounds (tz-naive, exact under any tz). An unknown field
1221
+ type is still emitted only under UTC and omitted (superset) under a non-UTC tz.
1222
+
1223
+ No objectui change is needed — the client already forwards whatever bound values
1224
+ the server sends into the drill filter and the `filter[field][gte|lt]` URL.
1225
+
1226
+ - 290e2f0: feat(analytics): emit a half-open date-range drill scope for granularity-bucketed date dimensions (#1752)
1227
+
1228
+ A report/dashboard cell grouped by a `dateGranularity` date dimension ("2026-Q2")
1229
+ covers a SPAN of records, so drilling it needs a range (`>= start AND < nextStart`),
1230
+ which the equality drill contract (`drillRawRows`) can't express — date dims were
1231
+ therefore excluded from drill metadata and a drill landed on an unscoped superset.
1232
+
1233
+ - **`@objectstack/core`** adds `bucketKeyToCalendarRange(key, granularity)`, the
1234
+ inverse of `bucketDateValue`: it turns a canonical bucket key into its half-open
1235
+ `[start, end)` calendar span (`YYYY-MM-DD`, `end` exclusive). Pure, timezone-naive
1236
+ calendar arithmetic; returns `null` for unbucketable / out-of-range keys so the
1237
+ caller falls back to an unscoped (superset) drill rather than emit a wrong bound.
1238
+ - **`@objectstack/service-analytics`** emits a `drillRanges` sidecar (aligned to
1239
+ `rows` by index — the range companion to `drillRawRows`) for `date` +
1240
+ `dateGranularity` dimensions, computed from the canonical bucket key in the
1241
+ pre-label-resolution snapshot pass. A `datetime` field under a non-UTC reference
1242
+ timezone is omitted (host drills a superset) until instant-boundary support
1243
+ lands; a tz-naive `date` field is exact under any timezone (ADR-0053).
1244
+
1245
+ Consumed by objectui's report drill-through to scope the drilled record list to the
1246
+ clicked time bucket.
1247
+
1248
+ ### Patch Changes
1249
+
1250
+ - e057f42: fix: harden the bulk-write path — retries, idempotency, contracts, and summary visibility (#3147–#3152)
1251
+
1252
+ Six reliability fixes to the batched seed/import + `engine.insert(array)` path
1253
+ introduced by the #2678 bulk-write rework:
1254
+
1255
+ - **#3151** `bulkWrite` validates that `writeBatch` returns one record per input
1256
+ row (a short/long/non-array return is degraded per-row, not backfilled as
1257
+ phantom success); `engine.insert(array)` likewise rejects a short driver
1258
+ `bulkCreate` return instead of padding afterInsert with `undefined`.
1259
+ - **#3150** wraps the two remaining un-retried write points (seed
1260
+ `writeRecord`/`resolveDeferredUpdates`, import's no-`createManyData`
1261
+ fallback) in `withTransientRetry`; `defaultIsTransientError` short-circuits
1262
+ definitive logical errors to non-transient.
1263
+ - **#3148** import `resolveRef` flushes pending creates on a same-object miss so
1264
+ a later row can reference an earlier same-file CREATE, and no longer
1265
+ negatively caches a miss.
1266
+ - **#3149** threads an `attempt` counter through `bulkWrite`; seed rechecks by
1267
+ `externalId` and import by `matchFields` before re-writing, so a
1268
+ commit-then-lost-response retry cannot duplicate a batch.
1269
+ - **#3147** `recomputeSummaries` retries transient failures and, on exhaustion,
1270
+ surfaces `SummaryRecomputeError` (`ERR_SUMMARY_RECOMPUTE`) instead of a
1271
+ silent warn; seed/import recover it to a warning without re-writing.
1272
+ - **#3152** autonumbers are assigned after validation, so a batch that dies in
1273
+ validation consumes no sequence value (no number-range gaps).
1274
+
1275
+ - 5f05de2: **`createLogger({ file })` now actually writes the file under ESM.** `openFileStream` loaded `fs` with a lazy `require()` to keep the browser-safe logger entry out of the `fs` bundle graph; esbuild rewrites that to its `__require` shim in the ESM output, which throws `Dynamic require of "fs" is not supported`, and a bare `catch {}` swallowed it. Since the workspace is `type: module`, every Node ESM consumer — `os serve`, `os dev` — silently got no file logging at all, while the CJS build kept working. The builtin now loads via `process.getBuiltinModule` (opaque to bundlers, works in both module systems, with a `require` fallback for Node < 20.16), and a `file` destination that cannot be opened reports itself on stderr instead of disappearing.
1276
+
1277
+ Turning the destination back on also fixed three faults that were unreachable while it never opened: `child()` opened a second stream per child and orphaned it, destroying a child logger closed the stream its parent and siblings were still writing to, and an async open failure (e.g. an unwritable path) hit an `'error'` event with no listener and took the process down.
1278
+
1279
+ - 021ba4c: fix(core): ObjectLogger honors NO_COLOR and TTY detection before emitting ANSI colors
1280
+
1281
+ The kernel/plugin logger (`ctx.logger`, wired by `os serve` / `os dev`) colorized its
1282
+ `pretty`-format level tags unconditionally, so `NO_COLOR=1` runs and piped/CI output
1283
+ still carried ANSI escapes (e.g. `\x1b[31m…ERROR\x1b[0m`), breaking plain-text log
1284
+ scanners (see scripts/publish-smoke.sh, which had to strip ANSI before grepping).
1285
+
1286
+ Per the no-color.org convention, color is now emitted only when the destination stream
1287
+ (stdout, or stderr for error/fatal) is an interactive TTY **and** `NO_COLOR` is unset or
1288
+ empty — any non-empty `NO_COLOR` value disables color. Interactive terminals keep the
1289
+ existing colorized output. The optional file destination now always receives plain text.
1290
+
1291
+ - Updated dependencies [f972574]
1292
+ - Updated dependencies [6289ec3]
1293
+ - Updated dependencies [22013aa]
1294
+ - Updated dependencies [3ad3dd5]
1295
+ - Updated dependencies [8efa395]
1296
+ - Updated dependencies [3a18b60]
1297
+ - Updated dependencies [a8aa34c]
1298
+ - Updated dependencies [a3823b2]
1299
+ - Updated dependencies [43a3efb]
1300
+ - Updated dependencies [524696a]
1301
+ - Updated dependencies [bfa3c3f]
1302
+ - Updated dependencies [5e3301d]
1303
+ - Updated dependencies [46e876c]
1304
+ - Updated dependencies [158aa14]
1305
+ - Updated dependencies [62a2117]
1306
+ - Updated dependencies [d2723e2]
1307
+ - Updated dependencies [fefcd54]
1308
+ - Updated dependencies [beaf2de]
1309
+ - Updated dependencies [369eb6e]
1310
+ - Updated dependencies [06ff734]
1311
+ - Updated dependencies [b659111]
1312
+ - Updated dependencies [5754a23]
1313
+ - Updated dependencies [6c270a6]
1314
+ - Updated dependencies [668dd17]
1315
+ - Updated dependencies [8abf133]
1316
+ - Updated dependencies [e0859b1]
1317
+ - Updated dependencies [04ecd4e]
1318
+ - Updated dependencies [4d5a892]
1319
+ - Updated dependencies [16cebeb]
1320
+ - Updated dependencies [86d30af]
1321
+ - Updated dependencies [8923843]
1322
+ - Updated dependencies [a2795f6]
1323
+ - Updated dependencies [f16b492]
1324
+ - Updated dependencies [4b6fde8]
1325
+ - Updated dependencies [2018df9]
1326
+ - Updated dependencies [fc5a3a2]
1327
+ - Updated dependencies [8ff9210]
1328
+ - @objectstack/spec@16.0.0
1329
+
1330
+ ## 16.0.0-rc.1
1331
+
1332
+ ### Patch Changes
1333
+
1334
+ - Updated dependencies [6289ec3]
1335
+ - Updated dependencies [8efa395]
1336
+ - Updated dependencies [bfa3c3f]
1337
+ - Updated dependencies [62a2117]
1338
+ - Updated dependencies [06ff734]
1339
+ - @objectstack/spec@16.0.0-rc.1
1340
+
1341
+ ## 16.0.0-rc.0
1342
+
1343
+ ### Minor Changes
1344
+
1345
+ - dd9f223: feat(analytics): scope a datetime date-bucket drill to the reference-tz midnight instants (#1752 follow-up)
1346
+
1347
+ Closes the one gap left by the initial #1752 change: a `datetime` date dimension
1348
+ bucketed under a **non-UTC reference timezone** previously fell back to a superset
1349
+ drill (its bucket boundary is that tz's midnight _instant_, which `YYYY-MM-DD`
1350
+ calendar bounds can't express).
1351
+
1352
+ - **`@objectstack/core`** adds `zonedDateStartToUtcMs(ymd, tz)` — the UTC instant
1353
+ at which a calendar day begins in a reference timezone (the inverse of
1354
+ `calendarPartsInTz`). DST-safe: the offset is read from the platform tz
1355
+ database via `Intl`, with a two-pass resolution for the rare offset-boundary
1356
+ case; an unset/`'UTC'`/invalid zone returns plain UTC midnight.
1357
+ - **`@objectstack/service-analytics`** now emits `drillRanges` bounds per the
1358
+ field's temporal type (ADR-0053): a `datetime` field → ISO **instant** bounds
1359
+ at the reference tz's midnight (works under any tz, incl. DST); a `date` field
1360
+ → `YYYY-MM-DD` calendar bounds (tz-naive, exact under any tz). An unknown field
1361
+ type is still emitted only under UTC and omitted (superset) under a non-UTC tz.
1362
+
1363
+ No objectui change is needed — the client already forwards whatever bound values
1364
+ the server sends into the drill filter and the `filter[field][gte|lt]` URL.
1365
+
1366
+ - 290e2f0: feat(analytics): emit a half-open date-range drill scope for granularity-bucketed date dimensions (#1752)
1367
+
1368
+ A report/dashboard cell grouped by a `dateGranularity` date dimension ("2026-Q2")
1369
+ covers a SPAN of records, so drilling it needs a range (`>= start AND < nextStart`),
1370
+ which the equality drill contract (`drillRawRows`) can't express — date dims were
1371
+ therefore excluded from drill metadata and a drill landed on an unscoped superset.
1372
+
1373
+ - **`@objectstack/core`** adds `bucketKeyToCalendarRange(key, granularity)`, the
1374
+ inverse of `bucketDateValue`: it turns a canonical bucket key into its half-open
1375
+ `[start, end)` calendar span (`YYYY-MM-DD`, `end` exclusive). Pure, timezone-naive
1376
+ calendar arithmetic; returns `null` for unbucketable / out-of-range keys so the
1377
+ caller falls back to an unscoped (superset) drill rather than emit a wrong bound.
1378
+ - **`@objectstack/service-analytics`** emits a `drillRanges` sidecar (aligned to
1379
+ `rows` by index — the range companion to `drillRawRows`) for `date` +
1380
+ `dateGranularity` dimensions, computed from the canonical bucket key in the
1381
+ pre-label-resolution snapshot pass. A `datetime` field under a non-UTC reference
1382
+ timezone is omitted (host drills a superset) until instant-boundary support
1383
+ lands; a tz-naive `date` field is exact under any timezone (ADR-0053).
1384
+
1385
+ Consumed by objectui's report drill-through to scope the drilled record list to the
1386
+ clicked time bucket.
1387
+
1388
+ ### Patch Changes
1389
+
1390
+ - e057f42: fix: harden the bulk-write path — retries, idempotency, contracts, and summary visibility (#3147–#3152)
1391
+
1392
+ Six reliability fixes to the batched seed/import + `engine.insert(array)` path
1393
+ introduced by the #2678 bulk-write rework:
1394
+
1395
+ - **#3151** `bulkWrite` validates that `writeBatch` returns one record per input
1396
+ row (a short/long/non-array return is degraded per-row, not backfilled as
1397
+ phantom success); `engine.insert(array)` likewise rejects a short driver
1398
+ `bulkCreate` return instead of padding afterInsert with `undefined`.
1399
+ - **#3150** wraps the two remaining un-retried write points (seed
1400
+ `writeRecord`/`resolveDeferredUpdates`, import's no-`createManyData`
1401
+ fallback) in `withTransientRetry`; `defaultIsTransientError` short-circuits
1402
+ definitive logical errors to non-transient.
1403
+ - **#3148** import `resolveRef` flushes pending creates on a same-object miss so
1404
+ a later row can reference an earlier same-file CREATE, and no longer
1405
+ negatively caches a miss.
1406
+ - **#3149** threads an `attempt` counter through `bulkWrite`; seed rechecks by
1407
+ `externalId` and import by `matchFields` before re-writing, so a
1408
+ commit-then-lost-response retry cannot duplicate a batch.
1409
+ - **#3147** `recomputeSummaries` retries transient failures and, on exhaustion,
1410
+ surfaces `SummaryRecomputeError` (`ERR_SUMMARY_RECOMPUTE`) instead of a
1411
+ silent warn; seed/import recover it to a warning without re-writing.
1412
+ - **#3152** autonumbers are assigned after validation, so a batch that dies in
1413
+ validation consumes no sequence value (no number-range gaps).
1414
+
1415
+ - 5f05de2: **`createLogger({ file })` now actually writes the file under ESM.** `openFileStream` loaded `fs` with a lazy `require()` to keep the browser-safe logger entry out of the `fs` bundle graph; esbuild rewrites that to its `__require` shim in the ESM output, which throws `Dynamic require of "fs" is not supported`, and a bare `catch {}` swallowed it. Since the workspace is `type: module`, every Node ESM consumer — `os serve`, `os dev` — silently got no file logging at all, while the CJS build kept working. The builtin now loads via `process.getBuiltinModule` (opaque to bundlers, works in both module systems, with a `require` fallback for Node < 20.16), and a `file` destination that cannot be opened reports itself on stderr instead of disappearing.
1416
+
1417
+ Turning the destination back on also fixed three faults that were unreachable while it never opened: `child()` opened a second stream per child and orphaned it, destroying a child logger closed the stream its parent and siblings were still writing to, and an async open failure (e.g. an unwritable path) hit an `'error'` event with no listener and took the process down.
1418
+
1419
+ - 021ba4c: fix(core): ObjectLogger honors NO_COLOR and TTY detection before emitting ANSI colors
1420
+
1421
+ The kernel/plugin logger (`ctx.logger`, wired by `os serve` / `os dev`) colorized its
1422
+ `pretty`-format level tags unconditionally, so `NO_COLOR=1` runs and piped/CI output
1423
+ still carried ANSI escapes (e.g. `\x1b[31m…ERROR\x1b[0m`), breaking plain-text log
1424
+ scanners (see scripts/publish-smoke.sh, which had to strip ANSI before grepping).
1425
+
1426
+ Per the no-color.org convention, color is now emitted only when the destination stream
1427
+ (stdout, or stderr for error/fatal) is an interactive TTY **and** `NO_COLOR` is unset or
1428
+ empty — any non-empty `NO_COLOR` value disables color. Interactive terminals keep the
1429
+ existing colorized output. The optional file destination now always receives plain text.
1430
+
1431
+ - Updated dependencies [f972574]
1432
+ - Updated dependencies [22013aa]
1433
+ - Updated dependencies [3ad3dd5]
1434
+ - Updated dependencies [3a18b60]
1435
+ - Updated dependencies [a8aa34c]
1436
+ - Updated dependencies [a3823b2]
1437
+ - Updated dependencies [43a3efb]
1438
+ - Updated dependencies [524696a]
1439
+ - Updated dependencies [5e3301d]
1440
+ - Updated dependencies [46e876c]
1441
+ - Updated dependencies [158aa14]
1442
+ - Updated dependencies [d2723e2]
1443
+ - Updated dependencies [fefcd54]
1444
+ - Updated dependencies [beaf2de]
1445
+ - Updated dependencies [369eb6e]
1446
+ - Updated dependencies [b659111]
1447
+ - Updated dependencies [5754a23]
1448
+ - Updated dependencies [6c270a6]
1449
+ - Updated dependencies [668dd17]
1450
+ - Updated dependencies [8abf133]
1451
+ - Updated dependencies [e0859b1]
1452
+ - Updated dependencies [04ecd4e]
1453
+ - Updated dependencies [4d5a892]
1454
+ - Updated dependencies [16cebeb]
1455
+ - Updated dependencies [86d30af]
1456
+ - Updated dependencies [8923843]
1457
+ - Updated dependencies [a2795f6]
1458
+ - Updated dependencies [f16b492]
1459
+ - Updated dependencies [4b6fde8]
1460
+ - Updated dependencies [2018df9]
1461
+ - Updated dependencies [fc5a3a2]
1462
+ - @objectstack/spec@16.0.0-rc.0
1463
+
1464
+ ## 15.1.1
1465
+
1466
+ ### Patch Changes
1467
+
1468
+ - @objectstack/spec@15.1.1
1469
+
1470
+ ## 15.1.0
1471
+
1472
+ ### Minor Changes
1473
+
1474
+ - f531a26: refactor(security): converge the anonymous-deny decision into one shared function + a source-enumerating ratchet (#2567 Phase 2)
1475
+
1476
+ Phase 1 gated every HTTP surface (REST `/data`, dispatcher `/graphql` + `/meta`,
1477
+ raw-hono `/data`) against the secure-by-default `requireAuth` posture, but each
1478
+ seam hand-rolled the same `!userId && !isSystem → 401` check. Phase 2 removes
1479
+ that duplication and pins the surfaces so a new ungated entry point fails CI.
1480
+
1481
+ - **New `shouldDenyAnonymous` in `@objectstack/core`** (`security/anonymous-deny.ts`)
1482
+ — the single anonymous-deny decision + shared 401 body/constants, mirroring the
1483
+ `auth-gate.ts` pattern (pure function so the seams can never drift). All five
1484
+ seams — REST `enforceAuth`, dispatcher `handleGraphQL` / `handleMetadata` /
1485
+ `handleAI`, hono `denyAnonymous` — now delegate to it. **Pure refactor: no
1486
+ runtime behavior change** (verified by the unchanged Phase-1 handler + e2e
1487
+ proofs). Identity resolution and the dynamic exemptions (public-form grants,
1488
+ share-link tokens) are untouched — they run upstream and only ever hand the
1489
+ seam an already-resolved context.
1490
+ - **A `discover()` ratchet on the authz-conformance matrix** — it statically
1491
+ enumerates the data/meta/graphql HTTP entry points from source (curated
1492
+ per-file probes, control-plane routes excluded) and asserts each is classified
1493
+ by a matrix `covers` key. A new `/data`/`/meta`/`/graphql` route (or a
1494
+ removed/stale `covers`) now fails CI as UNCLASSIFIED / STALE, not in review. A
1495
+ companion negative test proves the ratchet bites.
1496
+
1497
+ A design trap is guarded: `isAuthGateAllowlisted(undefined)` returns `true`, so a
1498
+ body-routed seam (GraphQL, which has no request path) must pass no path — the
1499
+ shared function's non-empty-path guard denies anonymous unconditionally there,
1500
+ never falling through to the control-plane allowlist.
1501
+
1502
+ - f531a26: feat(kernel): add `kernel:bootstrapped` lifecycle anchor — the phase that fires after every `kernel:ready` handler has settled but before `kernel:listening` (HTTP socket open). `kernel:ready` handlers run sequentially in plugin-registration order, so a handler that consumes data produced by a later-starting plugin (e.g. the security bootstrap seeds `sys_position`; the app plugin's seed loader inserts records) would race the very rows it needs. `kernel:bootstrapped` is the correct anchor for reconcile/backfill work: every producer's ready handler has finished by the time it fires. Both `ObjectKernel` and `LiteKernel` trigger it. The sharing-rule boot backfill moves from `kernel:listening` to `kernel:bootstrapped` (semantics-only; behaviour unchanged).
1503
+
1504
+ ### Patch Changes
1505
+
1506
+ - Updated dependencies [f531a26]
1507
+ - Updated dependencies [f531a26]
1508
+ - Updated dependencies [f531a26]
1509
+ - Updated dependencies [f531a26]
1510
+ - Updated dependencies [f531a26]
1511
+ - Updated dependencies [f531a26]
1512
+ - Updated dependencies [3fe9df1]
1513
+ - Updated dependencies [f531a26]
1514
+ - Updated dependencies [f531a26]
1515
+ - Updated dependencies [f531a26]
1516
+ - Updated dependencies [f531a26]
1517
+ - Updated dependencies [f531a26]
1518
+ - Updated dependencies [f531a26]
1519
+ - Updated dependencies [f531a26]
1520
+ - Updated dependencies [f531a26]
1521
+ - Updated dependencies [f531a26]
1522
+ - Updated dependencies [f531a26]
1523
+ - Updated dependencies [f531a26]
1524
+ - Updated dependencies [4109153]
1525
+ - Updated dependencies [f531a26]
1526
+ - Updated dependencies [f531a26]
1527
+ - Updated dependencies [f531a26]
1528
+ - Updated dependencies [f531a26]
1529
+ - Updated dependencies [f531a26]
1530
+ - Updated dependencies [f531a26]
1531
+ - Updated dependencies [627f225]
1532
+ - Updated dependencies [f531a26]
1533
+ - Updated dependencies [f531a26]
1534
+ - Updated dependencies [f531a26]
1535
+ - @objectstack/spec@15.1.0
1536
+
1537
+ ## 15.0.0
1538
+
1539
+ ### Minor Changes
1540
+
1541
+ - 13749ec: ADR-0095 D2/D3: the authorization kernel now resolves an explicit **posture
1542
+ ladder** — a monotonic principal tier `PLATFORM_ADMIN > TENANT_ADMIN > MEMBER >
1543
+ EXTERNAL` — once, in `resolveAuthzContext`, and carries it on
1544
+ `ResolvedAuthzContext.posture`.
1545
+
1546
+ - **D2 — the ladder.** New `@objectstack/core/security` module `posture-ladder.ts`
1547
+ reuses the spec `AuthzPosture` enum and pins the rung → row-visibility
1548
+ injection-rule mapping (exactly one rule per rung) plus its two ADR-required
1549
+ invariants as unit-tested properties: strict nesting (rung _n_'s visible set ⊇
1550
+ rung _n−1_'s) and the `EXTERNAL` deny-by-default semantics (explicitly shared
1551
+ rows only — OWD baselines and sharing rules never widen it). `EXTERNAL` is
1552
+ defined and test-locked now but never resolved: no external principal type
1553
+ exists yet (portal/ADR-0093), so the resolver's floor is `MEMBER`.
1554
+ - **D3 — capability-derived, single track.** The rung derives from held
1555
+ **capability grants**, never a better-auth role: `PLATFORM_ADMIN` from the
1556
+ unscoped `admin_full_access` grant (the same `viewAllRecords`/`modifyAllRecords`
1557
+ evidence the superuser bypass trusts), `TENANT_ADMIN` from the
1558
+ `organization_admin` grant. The better-auth `role='admin'` remains only a
1559
+ _provisioning source_ of those grants (`auto-org-admin-grant.ts`,
1560
+ `mapMembershipRole`); no enforcement path reads the raw role, closing the
1561
+ #2836 dual-track adjudication class by construction.
1562
+ - New spec export `ORGANIZATION_ADMIN` (the org-admin capability-grant name),
1563
+ alongside the existing `ADMIN_FULL_ACCESS`.
1564
+
1565
+ **Behavior-preserving.** Enforcement is unchanged — the per-object Layer 0
1566
+ exemption and per-side superuser bypass still gate access exactly as before;
1567
+ `posture` is an additive, derived, explainable field. The `authz-matrix-gate`
1568
+ unit snapshot and the dogfood authz-conformance matrix stay green. No migration
1569
+ required.
1570
+
1571
+ ### Patch Changes
1572
+
1573
+ - Updated dependencies [28b7c28]
1574
+ - Updated dependencies [13749ec]
1575
+ - Updated dependencies [e62c233]
1576
+ - Updated dependencies [ed61c9b]
1577
+ - Updated dependencies [31d04d4]
1578
+ - @objectstack/spec@15.0.0
1579
+
1580
+ ## 14.8.0
1581
+
1582
+ ### Patch Changes
1583
+
1584
+ - Updated dependencies [16b4bf6]
1585
+ - Updated dependencies [16b4bf6]
1586
+ - Updated dependencies [10e8983]
1587
+ - Updated dependencies [607aaf4]
1588
+ - Updated dependencies [bb71321]
1589
+ - @objectstack/spec@14.8.0
1590
+
1591
+ ## 14.7.0
1592
+
1593
+ ### Patch Changes
1594
+
1595
+ - Updated dependencies [d6a72eb]
1596
+ - @objectstack/spec@14.7.0
1597
+
1598
+ ## 14.6.0
1599
+
1600
+ ### Patch Changes
1601
+
1602
+ - Updated dependencies [609cb13]
1603
+ - Updated dependencies [ce6d151]
1604
+ - @objectstack/spec@14.6.0
1605
+
1606
+ ## 14.5.0
1607
+
1608
+ ### Patch Changes
1609
+
1610
+ - Updated dependencies [526805e]
1611
+ - Updated dependencies [d79ca07]
1612
+ - Updated dependencies [33ebd34]
1613
+ - Updated dependencies [c044f08]
1614
+ - Updated dependencies [01274eb]
1615
+ - @objectstack/spec@14.5.0
1616
+
1617
+ ## 14.4.0
1618
+
1619
+ ### Minor Changes
1620
+
1621
+ - 82e745e: ADR-0091 L1 — grant validity windows: effective-dated assignments, resolution-time filtering, explain expired state, authoring lint.
1622
+
1623
+ - **plugin-security (objects)**: `sys_user_position` and `sys_user_permission_set` gain the D1 lifecycle columns — `valid_from`, `valid_until` (half-open `[from, until)`, UTC; null = unbounded, existing rows unchanged), `reason`, `delegated_from`, `last_certified_at`, `certified_by`.
1624
+ - **core**: new shared predicate `isGrantActive` / `isGrantExpired` (`@objectstack/core`), and `resolveAuthzContext` now filters BOTH grant tables through it (D2, fail-closed — an expired unscoped `admin_full_access` grant no longer derives `platform_admin`). Present-but-unparseable bounds fail closed.
1625
+ - **plugin-security (explain)**: `buildContextForUser` applies the same filter and returns `expiredGrants`; the principal layer reports the dedicated "held until … — expired" contributor state so "why did access disappear" is self-answering. Spec `ExplainLayerSchema` contributors gain an optional `state: 'active' | 'expired'`.
1626
+ - **plugin-sharing**: `PositionGraphService.expandPositionUsers` filters expired holders — sharing-rule recipients stop including them at resolution time.
1627
+ - **lint (D7)**: two new error rules over seed data — `security-grant-expired-at-authoring` (a `valid_until` in the past, or unparseable, is a grant that can never resolve) and `security-delegation-missing-reason` (a `delegated_from` row without `reason` breaks the D3 dual audit). Also re-exported the missing `SECURITY_MASTER_DETAIL_UNGRANTED` constant.
1628
+
1629
+ No background job is involved anywhere — per ADR-0049, an expired grant simply stops resolving, in every edition.
1630
+
1631
+ ### Patch Changes
1632
+
1633
+ - Updated dependencies [7953832]
1634
+ - Updated dependencies [82e745e]
1635
+ - Updated dependencies [f3035bd]
1636
+ - Updated dependencies [82c0d94]
1637
+ - Updated dependencies [7449476]
1638
+ - @objectstack/spec@14.4.0
1639
+
1640
+ ## 14.3.0
1641
+
1642
+ ### Patch Changes
1643
+
1644
+ - Updated dependencies [2a71f48]
1645
+ - Updated dependencies [02f6af4]
1646
+ - Updated dependencies [c1064f1]
1647
+ - @objectstack/spec@14.3.0
1648
+
1649
+ ## 14.2.0
1650
+
1651
+ ### Patch Changes
1652
+
1653
+ - Updated dependencies [ac8f029]
1654
+ - Updated dependencies [4ab9958]
1655
+ - @objectstack/spec@14.2.0
1656
+
1657
+ ## 14.1.0
1658
+
1659
+ ### Patch Changes
1660
+
1661
+ - Updated dependencies [5a8465f]
1662
+ - Updated dependencies [7f8620b]
1663
+ - Updated dependencies [82ba3a6]
1664
+ - @objectstack/spec@14.1.0
1665
+
1666
+ ## 14.0.0
1667
+
1668
+ ### Patch Changes
1669
+
1670
+ - Updated dependencies [0a8e685]
1671
+ - Updated dependencies [afa8115]
1672
+ - Updated dependencies [80f12ca]
1673
+ - Updated dependencies [e2fa074]
1674
+ - Updated dependencies [23c8668]
1675
+ - Updated dependencies [29f017d]
1676
+ - Updated dependencies [216fa9a]
1677
+ - Updated dependencies [6c22b12]
1678
+ - @objectstack/spec@14.0.0
1679
+
1680
+ ## 13.0.0
1681
+
1682
+ ### Major Changes
1683
+
1684
+ - 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence.
1685
+
1686
+ Pre-launch one-step renames and secure defaults (no compatibility aliases, per
1687
+ ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline):
1688
+
1689
+ - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field
1690
+ `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set`
1691
+ (field `role_id` → `position_id`); `RoleSchema`/`defineRole` →
1692
+ `PositionSchema`/`definePosition` with **no `parent`** (positions are flat;
1693
+ hierarchy lives on the business-unit tree).
1694
+ - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract
1695
+ `current_user.roles` → `current_user.positions` (formula validators updated);
1696
+ stack property `roles:` → `positions:`; metadata kinds `role`/`profile` →
1697
+ `position` (profile kind removed).
1698
+ - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault`
1699
+ narrows to an install-time suggestion; `appDefaultProfileName` →
1700
+ `appDefaultPermissionSetName` (isDefault-only).
1701
+ - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional
1702
+ `externalSharingModel` (external dial, `private` default) lands as P1 spec
1703
+ shape (ADR-0090 D11).
1704
+ - **Secure default (D1)**: a custom object with an owner field and NO
1705
+ `sharingModel` now resolves `private` (was: fully public). System objects
1706
+ keep their explicit posture. Unrecognised stored values fail closed.
1707
+ - ExecutionContext gains the P1 principal-taxonomy shape (D10):
1708
+ `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in
1709
+ later).
1710
+ - Sharing recipients: `role` → `position` (expanded via `sys_user_position`
1711
+ ∪ the better-auth membership transition source); `role_and_subordinates`
1712
+ removed — `unit_and_subordinates` now expands the business-unit subtree
1713
+ (finishes ADR-0057 D5's re-homing).
1714
+
1715
+ ### Minor Changes
1716
+
1717
+ - 01917c2: ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions.
1718
+
1719
+ - `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`;
1720
+ both anchors seeded (system-managed) alongside the builtin identity names.
1721
+ - Every authenticated principal implicitly holds `everyone` in
1722
+ `ctx.positions`, so sets bound to it resolve as ordinary position-bound
1723
+ grants — ADDITIVE. The fallback CLIFF is abolished: the configured
1724
+ baseline (`fallbackPermissionSet`, default `member_default`) now applies
1725
+ in addition to explicit grants instead of only when the user had none,
1726
+ and is also seeded as an `everyone` binding (same table/audit/explain
1727
+ path as admin-authored defaults).
1728
+ - Sessionless HTTP principals resolve as `principalKind: 'guest'` holding
1729
+ exactly `['guest']`; internal bare contexts are untouched.
1730
+ - Audience-anchor binding gate: `sys_position_permission_set` writes that
1731
+ would bind a high-privilege set (VAMA, delete/purge/transfer, system
1732
+ permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the
1733
+ data layer, unconditionally (`describeHighPrivilegeBits` predicate is
1734
+ exported and shared with the seed-time validation).
1735
+
1736
+ ### Patch Changes
1737
+
1738
+ - Updated dependencies [6d83431]
1739
+ - Updated dependencies [01917c2]
1740
+ - Updated dependencies [b271691]
1741
+ - Updated dependencies [a5a1e41]
1742
+ - Updated dependencies [466adf6]
1743
+ - Updated dependencies [5be00c3]
1744
+ - Updated dependencies [466adf6]
1745
+ - Updated dependencies [2bee609]
1746
+ - Updated dependencies [fc7e7f7]
1747
+ - @objectstack/spec@13.0.0
1748
+
1749
+ ## 12.6.0
1750
+
1751
+ ### Minor Changes
1752
+
1753
+ - 21420d9: Seed loader and data-import now route bulk writes through the engine's array-form `insert()` (one round-trip per batch, with parent-deduplicated summary recompute) instead of one `insert()`/`createData()` call per record, and both retry transient driver errors instead of silently dropping the row (#2678).
1754
+
1755
+ A new shared helper, `bulkWrite` (`@objectstack/core`), batches rows through a caller-supplied batch-write function, retries a whole-batch transient failure (network blip / timeout) with exponential backoff, and degrades to per-row writes (each itself retried) when a batch fails for a non-transient reason — so one bad row can't drop the other N-1. `withTransientRetry` wraps a single write (e.g. an update) with the same retry behavior.
1756
+
1757
+ - `SeedLoaderService.loadDataset()` (`@objectstack/metadata-protocol`) buffers insert-mode records and flushes them in batches of 200 via the engine's array `insert()`. Datasets with a self-referencing field (e.g. `employee.manager_id -> employee`) keep the historical per-record write path, since a later record may need an earlier one's freshly-assigned id.
1758
+ - `runImport()` (`@objectstack/rest`) buffers create-resolved rows and flushes them via `protocol.createManyData()` when the protocol supports it, falling back to the original per-row `createData()` call otherwise. `Protocol.createManyData` (`@objectstack/metadata-protocol`) now forwards `context` to `engine.insert()` like `createData` already did, so tenant-scoped bulk creates work correctly.
1759
+
1760
+ Previously, a 1000-row seed or import into an object with a rollup summary issued 1000+ round-trips and up to 1000 summary recomputes; a single transient network error on any one row silently dropped it with no retry (the 2026-07-06 HotCRM first-boot incident). A `bulkCreate`-capable driver now sees roughly `ceil(N/batch)` writes, and a transient error is retried before a row is ever reported as failed.
1761
+
1762
+ **Fix (`@objectstack/driver-sql`):** `SqlDriver.bulkCreate()` never generated a client-side id for a row missing one, unlike `create()` — a latent gap that this change is the first to exercise at scale (a bulk-inserted row without a driver-native id default silently landed with `id: NULL`). `bulkCreate()` now mirrors `create()`'s id/`_id` normalization per row.
1763
+
1764
+ ### Patch Changes
1765
+
1766
+ - Updated dependencies [6cebf22]
1767
+ - @objectstack/spec@12.6.0
1768
+
1769
+ ## 12.5.0
1770
+
1771
+ ### Patch Changes
1772
+
1773
+ - Updated dependencies [8b3d363]
1774
+ - @objectstack/spec@12.5.0
1775
+
1776
+ ## 12.4.0
1777
+
1778
+ ### Patch Changes
1779
+
1780
+ - Updated dependencies [60dc3ba]
1781
+ - @objectstack/spec@12.4.0
1782
+
1783
+ ## 12.3.0
1784
+
1785
+ ### Patch Changes
1786
+
1787
+ - Updated dependencies [e7eceec]
1788
+ - @objectstack/spec@12.3.0
1789
+
1790
+ ## 12.2.0
1791
+
1792
+ ### Patch Changes
1793
+
1794
+ - 4f5b791: Wire three more Studio-authored metadata surfaces at runtime (#2605 — the
1795
+ "declared but never wired" family, following the #2596 hooks template).
1796
+
1797
+ **Authored actions now execute (#2605 item 1).** `engine.executeAction`'s map
1798
+ was only ever populated from the app bundle at boot, so a published `action`
1799
+ row (standalone or embedded in an authored object's `actions[]`) was stored
1800
+ and listed but never executable — before OR after a restart. Now:
1801
+
1802
+ - `AppPlugin` installs a QuickJS-sandboxed default action runner at boot
1803
+ (`engine.setDefaultActionRunner`), the action-path twin of the #2596 hook
1804
+ body runner. Opt out with `OS_DISABLE_AUTHORED_ACTIONS=1`.
1805
+ - `ObjectQLPlugin` re-registers runtime-authored actions from their
1806
+ `sys_metadata` rows under `packageId: 'metadata-service'` at
1807
+ `kernel:ready`, on `metadata:reloaded`, and on `action`/`object` protocol
1808
+ mutations — saves, publishes, edits, and deletes take effect live.
1809
+ Package-artifact actions are excluded (AppPlugin owns those; re-registering
1810
+ would clobber their handlers).
1811
+
1812
+ **Authored translations reach the i18n runtime (#2591).** `translation`
1813
+ metadata items (single-locale `AppTranslationBundle` payloads; locale from
1814
+ `_meta.locale`, a top-level `locale`, or a BCP-47-shaped item name) now load
1815
+ into the i18n service as a separate authored layer that overlays static
1816
+ bundles. Both adapters carry the layer — service-i18n's `FileI18nAdapter`
1817
+ AND the kernel's in-memory fallback (`createMemoryI18n`), which is what dev
1818
+ and standalone stacks actually run. The shared sync
1819
+ (`wireAuthoredTranslationSync`, exported from `@objectstack/core`, wired by
1820
+ the runtime's AppPlugin and by I18nServicePlugin with single-owner
1821
+ semantics) runs at `kernel:ready`, on `metadata:reloaded`, and on
1822
+ `translation` protocol mutations, with clear-then-reload semantics so
1823
+ deleted items/keys stop resolving instead of lingering in the deep-merged
1824
+ map.
1825
+
1826
+ **Sharing rules created at runtime bind without a restart (#2592).**
1827
+ `bindRuleHooks` was boot-only, so the first rule authored at runtime for an
1828
+ object with no boot-time rule silently never evaluated (rule authoring is a
1829
+ data insert — `metadata:reloaded` never fires). The sharing plugin now binds
1830
+ afterInsert/afterUpdate/afterDelete triggers on `sys_sharing_rule` that
1831
+ unbind + re-bind the rule-hook package from a fresh `listRules()`, serialized
1832
+ so overlapping writes can't leave a stale snapshot bound, and fail-safe so a
1833
+ rebind failure never fails the rule write.
1834
+
1835
+ - Updated dependencies [fce8ff4]
1836
+ - Updated dependencies [3962023]
1837
+ - Updated dependencies [2bb193d]
1838
+ - Updated dependencies [0426d27]
1839
+ - Updated dependencies [da807f7]
1840
+ - @objectstack/spec@12.2.0
1841
+
1842
+ ## 12.1.0
1843
+
1844
+ ### Patch Changes
1845
+
1846
+ - Updated dependencies [93e6d02]
1847
+ - @objectstack/spec@12.1.0
1848
+
1849
+ ## 12.0.0
1850
+
1851
+ ### Patch Changes
1852
+
1853
+ - Updated dependencies [a8df396]
1854
+ - Updated dependencies [e695fe0]
1855
+ - Updated dependencies [7c09621]
1856
+ - Updated dependencies [7709db4]
1857
+ - Updated dependencies [2082109]
1858
+ - Updated dependencies [7c09621]
1859
+ - Updated dependencies [9860de4]
1860
+ - Updated dependencies [069c205]
1861
+ - @objectstack/spec@12.0.0
1862
+
1863
+ ## 11.10.0
1864
+
1865
+ ### Patch Changes
1866
+
1867
+ - Updated dependencies [6a9397e]
1868
+ - Updated dependencies [c0efe5d]
1869
+ - @objectstack/spec@11.10.0
1870
+
1871
+ ## 11.9.0
1872
+
1873
+ ### Patch Changes
1874
+
1875
+ - Updated dependencies [d3595d9]
1876
+ - @objectstack/spec@11.9.0
1877
+
1878
+ ## 11.8.0
1879
+
1880
+ ### Patch Changes
1881
+
1882
+ - @objectstack/spec@11.8.0
1883
+
1884
+ ## 11.7.0
1885
+
1886
+ ### Patch Changes
1887
+
1888
+ - Updated dependencies [5178906]
1889
+ - @objectstack/spec@11.7.0
1890
+
1891
+ ## 11.6.0
1892
+
1893
+ ### Patch Changes
1894
+
1895
+ - @objectstack/spec@11.6.0
1896
+
1897
+ ## 11.5.0
1898
+
1899
+ ### Patch Changes
1900
+
1901
+ - Updated dependencies [6ee4f04]
1902
+ - Updated dependencies [c1e3a65]
1903
+ - @objectstack/spec@11.5.0
1904
+
1905
+ ## 11.4.0
1906
+
1907
+ ### Patch Changes
1908
+
1909
+ - Updated dependencies [5821c51]
1910
+ - Updated dependencies [a0fce3f]
1911
+ - @objectstack/spec@11.4.0
1912
+
1913
+ ## 11.3.0
1914
+
1915
+ ### Patch Changes
1916
+
1917
+ - Updated dependencies [58e8e31]
1918
+ - Updated dependencies [b4a5df0]
1919
+ - @objectstack/spec@11.3.0
1920
+
1921
+ ## 11.2.0
1922
+
1923
+ ### Patch Changes
1924
+
1925
+ - Updated dependencies [d0f4b13]
1926
+ - Updated dependencies [302bdab]
1927
+ - @objectstack/spec@11.2.0
1928
+
1929
+ ## 11.1.0
1930
+
1931
+ ### Minor Changes
1932
+
1933
+ - ce0b4f6: Auth: password expiry — the session-validation gate (ADR-0069 D1, P1)
1934
+
1935
+ Builds the **authentication-policy session gate** ADR-0069 needs and uses it for password expiry. When `password_expiry_days` (new `auth` setting, 0 = off) is exceeded, an authenticated user is blocked from protected REST resources with `403 PASSWORD_EXPIRED` until they change their password — while auth + remediation paths stay reachable.
1936
+
1937
+ - **core**: new pure `evaluateAuthGate` / `isAuthGateAllowlisted` helper (`@objectstack/core/security`) — single source of truth for the allow-list (auth endpoints, change-password, health, UI-bootstrap reads).
1938
+ - **plugin-auth**: `customSession` computes the gate posture once and attaches `user.authGate`; `computeAuthGate` reads `sys_user.password_changed_at` vs the configured window; `password_changed_at` is stamped on sign-up / change / reset; `isAuthGateActive()` keeps the gate **zero-overhead** when off.
1939
+ - **platform-objects**: new `sys_user.password_changed_at` column.
1940
+ - **rest**: `resolveExecCtx` carries `authGate`; `enforceAuth` blocks gated sessions (independent of `requireAuth`) using the core allow-list.
1941
+ - **service-settings**: new `password_expiry_days` field.
1942
+
1943
+ Default-off / additive (no upgrade behavior change); a null `password_changed_at` never expires (existing users). Per ADR-0049 the setting ships with its enforcement; timestamps written as `Date` (ADR-0074).
1944
+
1945
+ This gate is the shared seam for **enforced MFA** (ADR-0069 D3), which lands next as a small addition (a second `authGate` branch). The dispatcher/MCP path is a follow-up (tracked in #2375); the REST surface the Console uses is fully gated here.
1946
+
1947
+ - 3e593a7: Remove the deprecated `DriverInterface` type alias — use `IDataDriver` (11.0).
1948
+
1949
+ `DriverInterface` was a `@deprecated` alias of `IDataDriver` (the authoritative
1950
+ driver contract). It is removed from `@objectstack/spec/contracts` and
1951
+ `@objectstack/core`; `objectql`'s engine now types drivers as `IDataDriver`
1952
+ directly (a type-identical change, since the alias _was_ `IDataDriver`).
1953
+
1954
+ Driver authors: replace `DriverInterface` with `IDataDriver` (same shape).
1955
+
1956
+ Note: this is unrelated to the live `IDataEngine` interface (engine-layer
1957
+ contract, not deprecated) and to the separate zod-derived `DriverInterface` /
1958
+ `DriverInterfaceSchema` in `@objectstack/spec/data` (the runtime driver schema),
1959
+ both of which are unchanged.
1960
+
1961
+ ### Patch Changes
1962
+
1963
+ - 9ccfcd6: perf(core): authenticated requests issued ~16 sequential queries — duplicate authz + repeated localization — now request-scoped memoized
1964
+
1965
+ An authenticated REST request resolves its execution context (identity +
1966
+ RBAC/RLS + localization) many times in a single handler — the data operation
1967
+ itself, app-nav RBAC filtering, dashboard widget gating, the ADR-0069 auth gate.
1968
+ Each `resolveExecCtx` pass is the full `resolveAuthzContext` aggregation plus the
1969
+ localization read (~16 sequential queries), and nothing memoized it, so a request
1970
+ that resolves twice paid for duplicate authz and repeated localization.
1971
+
1972
+ - **`@objectstack/rest`** — `resolveExecCtx` is now memoized per request, keyed by
1973
+ the request object (a `WeakMap`, so the entry is collected with the request — no
1974
+ TTL, no cross-request leak) and the input `environmentId`. The in-flight Promise
1975
+ is cached so concurrent callers share one resolution. The heavy path moved to
1976
+ `computeExecCtx`. Anonymous (`undefined`) resolutions are cached too.
1977
+ - **`@objectstack/core`** — within a single `resolveAuthzContext` pass, `sys_user`
1978
+ is now read at most once (the email fallback and the `ai_seat` synthesis shared a
1979
+ duplicate query on the API-key path); `resolveLocalizationContext`'s direct-read
1980
+ fallback batches `timezone`/`locale`/`currency` into one `sys_setting` query
1981
+ (`$in` on `key`) instead of three sequential reads.
1982
+
1983
+ No authorization-behavior change — the same roles/permissions/RLS context is
1984
+ resolved, just without the redundant reads. The `sys_member` reads (per-user roles
1985
+ vs. all-org-members) are intentionally left distinct (different filters/limits).
1986
+
1987
+ Tests: query-counting regressions assert `sys_user` reads once and localization
1988
+ reads once; new rest-server tests pin the per-request/per-environment memo contract.
1989
+
1990
+ - Updated dependencies [ecf193f]
1991
+ - Updated dependencies [51bec81]
1992
+ - Updated dependencies [3e593a7]
1993
+ - Updated dependencies [63d5403]
1994
+ - @objectstack/spec@11.1.0
1995
+
1996
+ ## 11.0.0
1997
+
1998
+ ### Patch Changes
1999
+
2000
+ - c715d25: chore(license): unify the framework repo to a single Apache-2.0 license
2001
+
2002
+ The repo was left in a half-finished, self-contradictory source-available
2003
+ transition: 44 package `LICENSE` files carried restrictive dual-license text
2004
+ (a Licensor of "ObjectStack AI LLC", a four-year conversion date, and an
2005
+ anti-competitive-hosting grant) while those same packages' `package.json`
2006
+ already declared `"license": "Apache-2.0"` — and that license text pointed at
2007
+ `LICENSING.md` for the authoritative list of restricted packages, which listed
2008
+ none. The root also carried a redundant `LICENSE.apache` left over from that
2009
+ transition.
2010
+
2011
+ The framework is deliberately permissive Apache-2.0 to maximize adoption; value
2012
+ capture lives in the separate closed-source cloud repo, not here. This change
2013
+ makes that unambiguous: every package `LICENSE` now contains the canonical
2014
+ Apache 2.0 text (copied from the root `LICENSE`), the redundant root
2015
+ `LICENSE.apache` is removed, and `LICENSING.md` states the entire repository is
2016
+ Apache-2.0 with no dual-license language. No restrictive-license residue remains
2017
+ anywhere outside `node_modules`.
2018
+
2019
+ This is a metadata-only change (license text and `package.json` already agreed);
2020
+ the patch bump republishes the affected packages with the corrected `LICENSE`.
2021
+
2022
+ - aa33b02: fix(security): single-source the request authorization resolver — REST no longer drops sys_user_position
2023
+
2024
+ The REST server and the runtime dispatcher each carried their own copy of the request → ExecutionContext identity/role resolver, and they drifted on a security path. The REST copy silently omitted `sys_user_position` (so custom roles granted via the ADR-0057 D4 platform-RBAC path did not apply over REST), `sys_position_permission_set`, the `owner→org_owner` membership normalization, the platform-admin derivation, and the `ai_seat` synthesis — fail-closed (legitimate access denied), not an escalation.
2025
+
2026
+ Both entry points now delegate to a single shared resolver, `resolveAuthzContext` in `@objectstack/core/security` (joining the API-key verifier that already lived there). A contract test locks every authorization source and a lint gate (`check:authz-resolver`) prevents a future duplicate resolver or a dropped delegation.
2027
+
2028
+ - Updated dependencies [ab5718a]
2029
+ - Updated dependencies [4845c12]
2030
+ - Updated dependencies [c1a754a]
2031
+ - Updated dependencies [6fbe91f]
2032
+ - Updated dependencies [715d667]
2033
+ - Updated dependencies [5eef4cf]
2034
+ - Updated dependencies [72759e1]
2035
+ - Updated dependencies [6c4fbd9]
2036
+ - Updated dependencies [ef3ed67]
2037
+ - Updated dependencies [cd51229]
2038
+ - Updated dependencies [7697a0e]
2039
+ - Updated dependencies [e7e04f1]
2040
+ - Updated dependencies [cfd5ac4]
2041
+ - Updated dependencies [2be5c1f]
2042
+ - Updated dependencies [ad143ce]
2043
+ - Updated dependencies [5c4a8c8]
2044
+ - Updated dependencies [3afaeed]
2045
+ - Updated dependencies [8801c02]
2046
+ - Updated dependencies [3d04e06]
2047
+ - Updated dependencies [4a84c98]
2048
+ - Updated dependencies [d980f0d]
2049
+ - Updated dependencies [a658523]
2050
+ - Updated dependencies [82ff91c]
2051
+ - Updated dependencies [638f472]
2052
+ - @objectstack/spec@11.0.0
2053
+
2054
+ ## 10.3.0
2055
+
2056
+ ### Patch Changes
2057
+
2058
+ - @objectstack/spec@10.3.0
2059
+
2060
+ ## 10.2.0
2061
+
2062
+ ### Patch Changes
2063
+
2064
+ - Updated dependencies [b496498]
2065
+ - @objectstack/spec@10.2.0
2066
+
2067
+ ## 10.1.0
2068
+
2069
+ ### Patch Changes
2070
+
2071
+ - Updated dependencies [49da36e]
2072
+ - Updated dependencies [ac79f16]
2073
+ - @objectstack/spec@10.1.0
2074
+
2075
+ ## 10.0.0
2076
+
2077
+ ### Patch Changes
2078
+
2079
+ - d5f6d29: fix(runtime): surface code-defined datasources at `GET /api/v1/datasources` and `GET /api/v1/meta/datasource` on the standalone / host-config boot path (ADR-0015 §18, follow-up to #2111).
2080
+
2081
+ A datasource declared in `defineStack({ datasources: [...] })` (e.g. the showcase's `showcase_external`) is stamped `origin: 'code'` and registered by `AppPlugin` via `metadata.registerInMemory('datasource', …)` — gated on `typeof metadata.registerInMemory === 'function'`. On the standalone / host-config path (`os dev`/`serve` for a config whose `plugins` are already instantiated — `isHostConfig` true — so no `MetadataPlugin` loads) the `metadata` service is an in-memory fallback that implemented `register`/`list`/`get` but **not** `registerInMemory`. The guard was therefore false, AppPlugin silently skipped the registration, and the datasource was absent from both REST surfaces (and Setup → Integrations → Datasources) even though the boot banner counted it and its federated objects were queryable.
2082
+
2083
+ Both in-memory `metadata` fallbacks (`@objectstack/core`'s `createMemoryMetadata` and `@objectstack/plugin-dev`'s dev stub) now implement `registerInMemory` (synchronous, no persistence — identical to `register` for these in-memory stores, matching `MetadataManager`'s signature). The read paths (`metadata.list`, datasource-admin `listDatasources`, and `protocol.getMetaItems` which merges `metadata.list`) were already correct; this restores the write-side registration they depend on. It also makes stack-declared security metadata (`roles`/`permissions`/`sharingRules`/`policies`, registered through the same guard) listable on this path.
2084
+
2085
+ - Updated dependencies [d7ff626]
2086
+ - Updated dependencies [2a1b16b]
2087
+ - Updated dependencies [e16f2a8]
2088
+ - Updated dependencies [e411a82]
2089
+ - Updated dependencies [a581385]
2090
+ - Updated dependencies [220ce5b]
2091
+ - Updated dependencies [3efe334]
2092
+ - Updated dependencies [feead7e]
2093
+ - Updated dependencies [6ca20b3]
2094
+ - Updated dependencies [5f875fe]
2095
+ - Updated dependencies [b469950]
2096
+ - @objectstack/spec@10.0.0
2097
+
2098
+ ## 9.11.0
2099
+
2100
+ ### Patch Changes
2101
+
2102
+ - Updated dependencies [e7f6539]
2103
+ - Updated dependencies [2365d07]
2104
+ - Updated dependencies [6595b53]
2105
+ - Updated dependencies [fa8964d]
2106
+ - Updated dependencies [36138c7]
2107
+ - Updated dependencies [a8e4f3b]
2108
+ - Updated dependencies [4c213c2]
2109
+ - Updated dependencies [2afb612]
2110
+ - @objectstack/spec@9.11.0
2111
+
2112
+ ## 9.10.0
2113
+
2114
+ ### Patch Changes
2115
+
2116
+ - Updated dependencies [db02bd5]
2117
+ - Updated dependencies [641675d]
2118
+ - Updated dependencies [94e9040]
2119
+ - Updated dependencies [1f88fd9]
2120
+ - Updated dependencies [1f88fd9]
2121
+ - @objectstack/spec@9.10.0
2122
+
2123
+ ## 9.9.1
2124
+
2125
+ ### Patch Changes
2126
+
2127
+ - @objectstack/spec@9.9.1
2128
+
2129
+ ## 9.9.0
2130
+
2131
+ ### Minor Changes
2132
+
2133
+ - 601cc11: feat(analytics): timezone-aware date bucketing (ADR-0053 Phase 2)
2134
+
2135
+ Analytics day/week/month/quarter/year buckets now resolve on a **reference timezone's** calendar days, so a row near a tz day-boundary lands in the bucket a user in that zone would expect — identically on SQLite and Postgres.
2136
+
2137
+ Per ADR-0053 decision **D2**, bucketing is done **in-memory, uniformly** for non-UTC zones rather than emitting dialect-specific `date_trunc … AT TIME ZONE` (SQLite has no tz database and MySQL needs tz tables loaded, so splitting by dialect would shift bucket boundaries for the same data). `engine.aggregate({ timezone })` therefore forces the in-memory aggregation path when a non-UTC reference tz is set — the date-range `where` still goes to the driver, so only matching rows are fetched. **UTC / unset keeps the native driver fast path unchanged.**
2138
+
2139
+ - New shared `calendarPartsInTz` / `calendarPartsInTzOrUtc` util in `@objectstack/core` (DST-safe via `Intl.DateTimeFormat`, never hand-rolled offset math; falls back to UTC for an unset/`'UTC'`/invalid zone).
2140
+ - `EngineAggregateOptions` and the analytics `executeAggregate` bridge / `ObjectQLStrategy` thread the reference timezone (sourced from the dataset selection / `ExecutionContext`) through to `applyInMemoryAggregation` → `bucketDateValue`, and the draft-preview evaluator's `bucketDate`.
2141
+ - `formatDateBucket` (dimension labels) stays UTC-only by design: it re-labels values that were _already_ bucketed upstream, so re-applying a timezone there would shift a correct bucket by a day.
2142
+
2143
+ ### Patch Changes
2144
+
2145
+ - Updated dependencies [84249a4]
2146
+ - Updated dependencies [11af299]
2147
+ - Updated dependencies [d5774b5]
2148
+ - Updated dependencies [134043a]
2149
+ - Updated dependencies [90108e0]
2150
+ - Updated dependencies [9afeb2d]
2151
+ - Updated dependencies [6bec07e]
2152
+ - Updated dependencies [601cc11]
2153
+ - Updated dependencies [575448d]
2154
+ - @objectstack/spec@9.9.0
2155
+
2156
+ ## 9.8.0
2157
+
2158
+ ### Patch Changes
2159
+
2160
+ - Updated dependencies [97c55b3]
2161
+ - Updated dependencies [1b1f490]
2162
+ - @objectstack/spec@9.8.0
2163
+
2164
+ ## 9.7.0
2165
+
2166
+ ### Patch Changes
2167
+
2168
+ - @objectstack/spec@9.7.0
2169
+
2170
+ ## 9.6.0
2171
+
2172
+ ### Patch Changes
2173
+
2174
+ - Updated dependencies [d1e930a]
2175
+ - Updated dependencies [71578f2]
2176
+ - Updated dependencies [5e3a301]
2177
+ - Updated dependencies [5db2742]
2178
+ - @objectstack/spec@9.6.0
2179
+
2180
+ ## 9.5.1
2181
+
2182
+ ### Patch Changes
2183
+
2184
+ - Updated dependencies [ee72aae]
2185
+ - @objectstack/spec@9.5.1
2186
+
2187
+ ## 9.5.0
2188
+
2189
+ ### Patch Changes
2190
+
2191
+ - Updated dependencies [d08551c]
2192
+ - Updated dependencies [707aeed]
2193
+ - Updated dependencies [7a103d4]
2194
+ - Updated dependencies [4b01250]
2195
+ - @objectstack/spec@9.5.0
2196
+
2197
+ ## 9.4.0
2198
+
2199
+ ### Patch Changes
2200
+
2201
+ - Updated dependencies [060467a]
2202
+ - Updated dependencies [0856476]
2203
+ - Updated dependencies [b678d8c]
2204
+ - Updated dependencies [b678d8c]
2205
+ - Updated dependencies [b678d8c]
2206
+ - @objectstack/spec@9.4.0
2207
+
2208
+ ## 9.3.0
2209
+
2210
+ ### Patch Changes
2211
+
2212
+ - Updated dependencies [1ada658]
2213
+ - Updated dependencies [3219191]
2214
+ - Updated dependencies [290f631]
2215
+ - Updated dependencies [50b7b47]
2216
+ - Updated dependencies [f15d6f6]
2217
+ - Updated dependencies [f8684ea]
2218
+ - Updated dependencies [b4765be]
2219
+ - @objectstack/spec@9.3.0
2220
+
2221
+ ## 9.2.0
2222
+
2223
+ ### Patch Changes
2224
+
2225
+ - Updated dependencies [2f57b75]
2226
+ - Updated dependencies [2f57b75]
2227
+ - @objectstack/spec@9.2.0
2228
+
2229
+ ## 9.1.0
2230
+
2231
+ ### Patch Changes
2232
+
2233
+ - Updated dependencies [b9062c9]
2234
+ - @objectstack/spec@9.1.0
2235
+
2236
+ ## 9.0.1
2237
+
2238
+ ### Patch Changes
2239
+
2240
+ - Updated dependencies [1817845]
2241
+ - @objectstack/spec@9.0.1
2242
+
2243
+ ## 9.0.0
2244
+
2245
+ ### Patch Changes
2246
+
2247
+ - Updated dependencies [4c3f693]
2248
+ - Updated dependencies [0bf39f1]
2249
+ - Updated dependencies [f533f42]
2250
+ - Updated dependencies [1c83ee8]
2251
+ - @objectstack/spec@9.0.0
2252
+
2253
+ ## 8.0.1
2254
+
2255
+ ### Patch Changes
2256
+
2257
+ - @objectstack/spec@8.0.1
2258
+
2259
+ ## 8.0.0
2260
+
2261
+ ### Minor Changes
2262
+
2263
+ - c262301: fix(rest): REST data API honors sys_api_key — one shared verifier with MCP (closes #1633)
2264
+
2265
+ Staging e2e found the MCP surface authenticated a `sys_api_key` but the REST data
2266
+ API (`@objectstack/rest`) returned 401 for the same key — its `resolveExecCtx`
2267
+ only checked the better-auth session, never the API key.
2268
+
2269
+ Converged both surfaces onto ONE verifier so they can't drift:
2270
+
2271
+ - **`@objectstack/core/security`** now owns the shared `sys_api_key` primitives
2272
+ (`hashApiKey`, `generateApiKey`, `extractApiKey`, `parseScopes`, `isExpired`)
2273
+ plus a new `resolveApiKeyPrincipal(ql, headers, nowMs?)` that hashes the
2274
+ inbound key, looks it up by the indexed at-rest hash, and rejects unknown /
2275
+ revoked / expired / owner-less keys (fail-closed). `core` is the natural home:
2276
+ both `rest` and `runtime` depend on it, it depends on neither (no cycle), and
2277
+ it's server-side (already uses `node:crypto`).
2278
+ - **`@objectstack/runtime`** — `security/api-key.ts` re-exports the primitives
2279
+ from core (stable import surface) and `resolveExecutionContext` now delegates
2280
+ its API-key branch to `resolveApiKeyPrincipal`.
2281
+ - **`@objectstack/rest`** — `resolveExecCtx` resolves the data engine once and
2282
+ tries `resolveApiKeyPrincipal` (x-api-key / `Authorization: ApiKey`) BEFORE the
2283
+ session, so `/api/v1/data` + `/api/v1/meta` now authenticate an API key under
2284
+ the key's permissions + RLS, exactly like the dispatcher/MCP path.
2285
+
2286
+ Tests: core `api-key.test.ts` (primitives + verifier: valid / revoked / expired /
2287
+ unknown / owner-less / plaintext-not-matched / fail-closed-ql). runtime + rest
2288
+ suites green.
2289
+
2290
+ ### Patch Changes
2291
+
2292
+ - Updated dependencies [a46c017]
2293
+ - Updated dependencies [b990b89]
2294
+ - Updated dependencies [99111ec]
2295
+ - Updated dependencies [d5a8161]
2296
+ - Updated dependencies [5cf1f1b]
2297
+ - Updated dependencies [9ef89d4]
2298
+ - Updated dependencies [3306d2f]
2299
+ - Updated dependencies [bc44195]
2300
+ - Updated dependencies [9e2e229]
2301
+ - @objectstack/spec@8.0.0
2302
+
2303
+ ## 7.9.0
2304
+
2305
+ ### Patch Changes
2306
+
2307
+ - @objectstack/spec@7.9.0
2308
+
2309
+ ## 7.8.0
2310
+
2311
+ ### Patch Changes
2312
+
2313
+ - Updated dependencies [06f2bbb]
2314
+ - Updated dependencies [36719db]
2315
+ - Updated dependencies [424ab26]
2316
+ - @objectstack/spec@7.8.0
2317
+
2318
+ ## 7.7.0
2319
+
2320
+ ### Patch Changes
2321
+
2322
+ - Updated dependencies [b391955]
2323
+ - Updated dependencies [f06b64e]
2324
+ - Updated dependencies [023bf93]
2325
+ - @objectstack/spec@7.7.0
2326
+
2327
+ ## 7.6.0
2328
+
2329
+ ### Patch Changes
2330
+
2331
+ - Updated dependencies [955d4c8]
2332
+ - Updated dependencies [c4a4cbd]
2333
+ - Updated dependencies [b046ec2]
2334
+ - Updated dependencies [2170ad9]
2335
+ - Updated dependencies [02d6359]
2336
+ - Updated dependencies [7648242]
2337
+ - Updated dependencies [8fa1e7f]
2338
+ - Updated dependencies [55866f5]
2339
+ - Updated dependencies [60f9c45]
2340
+ - @objectstack/spec@7.6.0
2341
+
2342
+ ## 7.5.0
2343
+
2344
+ ### Patch Changes
2345
+
2346
+ - @objectstack/spec@7.5.0
2347
+
2348
+ ## 7.4.1
2349
+
2350
+ ### Patch Changes
2351
+
2352
+ - @objectstack/spec@7.4.1
2353
+
2354
+ ## 7.4.0
2355
+
2356
+ ### Patch Changes
2357
+
2358
+ - Updated dependencies [23c7107]
2359
+ - Updated dependencies [c72daad]
2360
+ - Updated dependencies [f115182]
2361
+ - Updated dependencies [2faf9f2]
2362
+ - Updated dependencies [2faf9f2]
2363
+ - Updated dependencies [2faf9f2]
2364
+ - Updated dependencies [58b450b]
2365
+ - Updated dependencies [82eb6cf]
2366
+ - Updated dependencies [13d8653]
2367
+ - Updated dependencies [ff3d006]
2368
+ - Updated dependencies [5e831de]
2369
+ - @objectstack/spec@7.4.0
2370
+
2371
+ ## 7.3.0
2372
+
2373
+ ### Patch Changes
2374
+
2375
+ - 5e7c554: **Rename kernel plugin-sandbox permission schemas to remove a naming footgun** (issue #1383).
2376
+
2377
+ `@objectstack/spec/kernel` exported `PermissionSchema` / `PermissionSetSchema`
2378
+ (and the `Permission` / `PermissionSet` types) for the plugin-sandbox security
2379
+ model. Their names collided with the metadata-protocol permission set exported
2380
+ from `@objectstack/spec/security` (`PermissionSetSchema`), making it very easy
2381
+ to validate the `permission`/`profile` metadata type against the wrong schema
2382
+ and reject every legal payload.
2383
+
2384
+ The kernel symbols are now prefixed with `Plugin` to reflect their specialized
2385
+ semantics:
2386
+
2387
+ | Old (`@objectstack/spec/kernel`) | New |
2388
+ | :------------------------------- | :-------------------------- |
2389
+ | `PermissionSchema` | `PluginPermissionSchema` |
2390
+ | `PermissionSetSchema` | `PluginPermissionSetSchema` |
2391
+ | `Permission` (type) | `PluginPermission` |
2392
+ | `PermissionSet` (type) | `PluginPermissionSet` |
2393
+
2394
+ The metadata `permission`/`profile` types are unchanged — keep using
2395
+ `PermissionSetSchema` from `@objectstack/spec/security`.
2396
+
2397
+ - Updated dependencies [5e7c554]
2398
+ - @objectstack/spec@7.3.0
2399
+
2400
+ ## 7.2.1
2401
+
2402
+ ### Patch Changes
2403
+
2404
+ - @objectstack/spec@7.2.1
2405
+
2406
+ ## 7.2.0
2407
+
2408
+ ### Patch Changes
2409
+
2410
+ - @objectstack/spec@7.2.0
2411
+
2412
+ ## 7.1.0
2413
+
2414
+ ### Patch Changes
2415
+
2416
+ - Updated dependencies [47a92f4]
2417
+ - @objectstack/spec@7.1.0
2418
+
2419
+ ## 7.0.0
2420
+
2421
+ ### Patch Changes
2422
+
2423
+ - Updated dependencies [74470ad]
2424
+ - Updated dependencies [d29617e]
2425
+ - Updated dependencies [dc72172]
2426
+ - @objectstack/spec@7.0.0
2427
+
2428
+ ## 6.9.0
2429
+
2430
+ ### Patch Changes
2431
+
2432
+ - @objectstack/spec@6.9.0
2433
+
2434
+ ## 6.8.1
2435
+
2436
+ ### Patch Changes
2437
+
2438
+ - @objectstack/spec@6.8.1
2439
+
2440
+ ## 6.8.0
2441
+
2442
+ ### Patch Changes
2443
+
2444
+ - Updated dependencies [6e88f77]
2445
+ - Updated dependencies [c8b9f57]
2446
+ - @objectstack/spec@6.8.0
2447
+
2448
+ ## 6.7.1
2449
+
2450
+ ### Patch Changes
2451
+
2452
+ - @objectstack/spec@6.7.1
2453
+
2454
+ ## 6.7.0
2455
+
2456
+ ### Patch Changes
2457
+
2458
+ - Updated dependencies [430067b]
2459
+ - Updated dependencies [4f9e9d4]
2460
+ - @objectstack/spec@6.7.0
2461
+
2462
+ ## 6.6.0
2463
+
2464
+ ### Patch Changes
2465
+
2466
+ - Updated dependencies [a49cfc2]
2467
+ - @objectstack/spec@6.6.0
2468
+
2469
+ ## 6.5.1
2470
+
2471
+ ### Patch Changes
2472
+
2473
+ - @objectstack/spec@6.5.1
2474
+
2475
+ ## 6.5.0
2476
+
2477
+ ### Patch Changes
2478
+
2479
+ - @objectstack/spec@6.5.0
2480
+
2481
+ ## 6.4.0
2482
+
2483
+ ### Patch Changes
2484
+
2485
+ - Updated dependencies [f8651cc]
2486
+ - Updated dependencies [f8651cc]
2487
+ - Updated dependencies [0bf6f9a]
2488
+ - @objectstack/spec@6.4.0
2489
+
2490
+ ## 6.3.0
2491
+
2492
+ ### Patch Changes
2493
+
2494
+ - @objectstack/spec@6.3.0
2495
+
2496
+ ## 6.2.0
2497
+
2498
+ ### Patch Changes
2499
+
2500
+ - Updated dependencies [b4c74a9]
2501
+ - @objectstack/spec@6.2.0
2502
+
2503
+ ## 6.1.1
2504
+
2505
+ ### Patch Changes
2506
+
2507
+ - @objectstack/spec@6.1.1
2508
+
2509
+ ## 6.1.0
2510
+
2511
+ ### Patch Changes
2512
+
2513
+ - Updated dependencies [93c0589]
2514
+ - @objectstack/spec@6.1.0
2515
+
2516
+ ## 6.0.0
2517
+
2518
+ ### Patch Changes
2519
+
2520
+ - Updated dependencies [629a716]
2521
+ - Updated dependencies [dbc4f7d]
2522
+ - Updated dependencies [944f187]
2523
+ - @objectstack/spec@6.0.0
2524
+
2525
+ ## 5.2.0
2526
+
2527
+ ### Patch Changes
2528
+
2529
+ - Updated dependencies [bab2b20]
2530
+ - Updated dependencies [fa011d8]
2531
+ - Updated dependencies [b806f58]
2532
+ - @objectstack/spec@5.2.0
2533
+
2534
+ ## 5.1.0
2535
+
2536
+ ### Patch Changes
2537
+
2538
+ - Updated dependencies [75f4ee6]
2539
+ - Updated dependencies [823d559]
2540
+ - @objectstack/spec@5.1.0
2541
+
2542
+ ## 5.0.0
2543
+
2544
+ ### Patch Changes
2545
+
2546
+ - Updated dependencies [2f9073a]
2547
+ - @objectstack/spec@5.0.0
2548
+
2549
+ ## 4.2.0
2550
+
2551
+ ### Patch Changes
2552
+
2553
+ - Updated dependencies [2869891]
2554
+ - @objectstack/spec@4.2.0
2555
+
2556
+ ## 4.1.1
2557
+
2558
+ ### Patch Changes
2559
+
2560
+ - @objectstack/spec@4.1.1
2561
+
2562
+ ## 4.1.0
2563
+
2564
+ ### Patch Changes
2565
+
2566
+ - Updated dependencies [2108c30]
2567
+ - Updated dependencies [23db640]
2568
+ - @objectstack/spec@4.1.0
2569
+
2570
+ ## 4.0.5
2571
+
2572
+ ### Patch Changes
2573
+
2574
+ - 15e0df6: chore: unify all package versions to a single patch release
2575
+ - Updated dependencies [15e0df6]
2576
+ - @objectstack/spec@4.0.5
2577
+
2578
+ ## 4.0.4
2579
+
2580
+ ### Patch Changes
2581
+
2582
+ - Updated dependencies [326b66b]
2583
+ - @objectstack/spec@4.0.4
2584
+
2585
+ ## 4.0.3
2586
+
2587
+ ### Patch Changes
2588
+
2589
+ - @objectstack/spec@4.0.3
2590
+
2591
+ ## 4.0.2
2592
+
2593
+ ### Patch Changes
2594
+
2595
+ - Updated dependencies [5f659e9]
2596
+ - @objectstack/spec@4.0.2
2597
+
2598
+ ## 4.0.0
2599
+
2600
+ ### Minor Changes
2601
+
2602
+ - e0b0a78: Deprecate DataEngineQueryOptions in favor of QueryAST-aligned EngineQueryOptions.
2603
+
2604
+ Engine, Protocol, and Client now use standard QueryAST parameter names:
2605
+
2606
+ - `filter` → `where`
2607
+ - `select` → `fields`
2608
+ - `sort` → `orderBy`
2609
+ - `skip` → `offset`
2610
+ - `populate` → `expand`
2611
+ - `top` → `limit`
2612
+
2613
+ The old DataEngine\* schemas and types are preserved with `@deprecated` markers for backward compatibility.
2614
+
2615
+ ### Patch Changes
2616
+
2617
+ - Updated dependencies [f08ffc3]
2618
+ - Updated dependencies [e0b0a78]
2619
+ - @objectstack/spec@4.0.0
2620
+
2621
+ ## 3.3.1
2622
+
2623
+ ### Patch Changes
2624
+
2625
+ - @objectstack/spec@3.3.1
2626
+
2627
+ ## 3.3.0
2628
+
2629
+ ### Patch Changes
2630
+
2631
+ - @objectstack/spec@3.3.0
2632
+
2633
+ ## 3.2.9
2634
+
2635
+ ### Patch Changes
2636
+
2637
+ - @objectstack/spec@3.2.9
2638
+
2639
+ ## 3.2.8
2640
+
2641
+ ### Patch Changes
2642
+
2643
+ - @objectstack/spec@3.2.8
2644
+
2645
+ ## 3.2.7
2646
+
2647
+ ### Patch Changes
2648
+
2649
+ - @objectstack/spec@3.2.7
2650
+
2651
+ ## 3.2.6
2652
+
2653
+ ### Patch Changes
2654
+
2655
+ - @objectstack/spec@3.2.6
2656
+
2657
+ ## 3.2.5
2658
+
2659
+ ### Patch Changes
2660
+
2661
+ - @objectstack/spec@3.2.5
2662
+
2663
+ ## 3.2.4
2664
+
2665
+ ### Patch Changes
2666
+
2667
+ - @objectstack/spec@3.2.4
2668
+
2669
+ ## 3.2.3
2670
+
2671
+ ### Patch Changes
2672
+
2673
+ - @objectstack/spec@3.2.3
2674
+
2675
+ ## 3.2.2
2676
+
2677
+ ### Patch Changes
2678
+
2679
+ - Updated dependencies [46defbb]
2680
+ - @objectstack/spec@3.2.2
2681
+
2682
+ ## 3.2.1
2683
+
2684
+ ### Patch Changes
2685
+
2686
+ - Updated dependencies [850b546]
2687
+ - @objectstack/spec@3.2.1
2688
+
2689
+ ## 3.2.0
2690
+
2691
+ ### Patch Changes
2692
+
2693
+ - Updated dependencies [5901c29]
2694
+ - @objectstack/spec@3.2.0
2695
+
2696
+ ## 3.1.1
2697
+
2698
+ ### Patch Changes
2699
+
2700
+ - Updated dependencies [953d667]
2701
+ - @objectstack/spec@3.1.1
2702
+
2703
+ ## 3.1.0
2704
+
2705
+ ### Patch Changes
2706
+
2707
+ - Updated dependencies [0088830]
2708
+ - @objectstack/spec@3.1.0
2709
+
2710
+ ## 3.0.11
2711
+
2712
+ ### Patch Changes
2713
+
2714
+ - Updated dependencies [92d9d99]
2715
+ - @objectstack/spec@3.0.11
2716
+
2717
+ ## 3.0.10
2718
+
2719
+ ### Patch Changes
2720
+
2721
+ - Updated dependencies [d1e5d31]
2722
+ - @objectstack/spec@3.0.10
2723
+
2724
+ ## 3.0.9
2725
+
2726
+ ### Patch Changes
2727
+
2728
+ - Updated dependencies [15e0df6]
2729
+ - @objectstack/spec@3.0.9
2730
+
2731
+ ## 3.0.8
2732
+
2733
+ ### Patch Changes
2734
+
2735
+ - Updated dependencies [5a968a2]
2736
+ - @objectstack/spec@3.0.8
2737
+
2738
+ ## 3.0.7
2739
+
2740
+ ### Patch Changes
2741
+
2742
+ - Updated dependencies [0119bd7]
2743
+ - Updated dependencies [5426bdf]
2744
+ - @objectstack/spec@3.0.7
2745
+
2746
+ ## 3.0.6
2747
+
2748
+ ### Patch Changes
2749
+
2750
+ - Updated dependencies [5df254c]
2751
+ - @objectstack/spec@3.0.6
2752
+
2753
+ ## 3.0.5
2754
+
2755
+ ### Patch Changes
2756
+
2757
+ - Updated dependencies [23a4a68]
2758
+ - @objectstack/spec@3.0.5
2759
+
2760
+ ## 3.0.4
2761
+
2762
+ ### Patch Changes
2763
+
2764
+ - Updated dependencies [d738987]
2765
+ - @objectstack/spec@3.0.4
2766
+
2767
+ ## 3.0.3
2768
+
2769
+ ### Patch Changes
2770
+
2771
+ - c7267f6: Patch release for maintenance updates and improvements.
2772
+ - Updated dependencies [c7267f6]
2773
+ - @objectstack/spec@3.0.3
2774
+
2775
+ ## 3.0.2
2776
+
2777
+ ### Patch Changes
2778
+
2779
+ - Updated dependencies [28985f5]
2780
+ - @objectstack/spec@3.0.2
2781
+
2782
+ ## 3.0.1
2783
+
2784
+ ### Patch Changes
2785
+
2786
+ - Updated dependencies [389725a]
2787
+ - @objectstack/spec@3.0.1
2788
+
2789
+ ## 3.0.0
2790
+
2791
+ ### Major Changes
2792
+
2793
+ - Release v3.0.0 — unified version bump for all ObjectStack packages.
2794
+
2795
+ ### Patch Changes
2796
+
2797
+ - Updated dependencies
2798
+ - @objectstack/spec@3.0.0
2799
+
2800
+ ## 2.0.7
2801
+
2802
+ ### Patch Changes
2803
+
2804
+ - Updated dependencies
2805
+ - @objectstack/spec@2.0.7
2806
+
2807
+ ## 2.0.6
2808
+
2809
+ ### Patch Changes
2810
+
2811
+ - Patch release for maintenance and stability improvements
2812
+ - Updated dependencies
2813
+ - @objectstack/spec@2.0.6
2814
+
2815
+ ## 2.0.5
2816
+
2817
+ ### Patch Changes
2818
+
2819
+ - Updated dependencies
2820
+ - @objectstack/spec@2.0.5
2821
+
2822
+ ## 2.0.4
2823
+
2824
+ ### Patch Changes
2825
+
2826
+ - Patch release for maintenance and stability improvements
2827
+ - Updated dependencies
2828
+ - @objectstack/spec@2.0.4
2829
+
2830
+ ## 2.0.3
2831
+
2832
+ ### Patch Changes
2833
+
2834
+ - Patch release for maintenance and stability improvements
2835
+ - Updated dependencies
2836
+ - @objectstack/spec@2.0.3
2837
+
2838
+ ## 2.0.2
2839
+
2840
+ ### Patch Changes
2841
+
2842
+ - Updated dependencies [1db8559]
2843
+ - @objectstack/spec@2.0.2
2844
+
2845
+ ## 2.0.1
2846
+
2847
+ ### Patch Changes
2848
+
2849
+ - Patch release for maintenance and stability improvements
2850
+ - Updated dependencies
2851
+ - @objectstack/spec@2.0.1
2852
+
2853
+ ## 2.0.0
2854
+
2855
+ ### Patch Changes
2856
+
2857
+ - Updated dependencies [38e5dd5]
2858
+ - Updated dependencies [38e5dd5]
2859
+ - @objectstack/spec@2.0.0
2860
+
2861
+ ## 1.0.12
2862
+
2863
+ ### Patch Changes
2864
+
2865
+ - chore: add Vercel deployment configs, simplify console runtime configuration
2866
+ - Updated dependencies
2867
+ - @objectstack/spec@1.0.12
2868
+
2869
+ ## 1.0.11
2870
+
2871
+ ### Patch Changes
2872
+
2873
+ - @objectstack/spec@1.0.11
2874
+
2875
+ ## 1.0.10
2876
+
2877
+ ### Patch Changes
2878
+
2879
+ - 10f52e1: fix: silence unhandled promise rejections when checking for async services in kernel
2880
+ - @objectstack/spec@1.0.10
2881
+
2882
+ ## 1.0.9
2883
+
2884
+ ### Patch Changes
2885
+
2886
+ - @objectstack/spec@1.0.9
2887
+
2888
+ ## 1.0.8
2889
+
2890
+ ### Patch Changes
2891
+
2892
+ - @objectstack/spec@1.0.8
2893
+
2894
+ ## 1.0.7
2895
+
2896
+ ### Patch Changes
2897
+
2898
+ - @objectstack/spec@1.0.7
2899
+
2900
+ ## 1.0.6
2901
+
2902
+ ### Patch Changes
2903
+
2904
+ - Updated dependencies [a7f7b9d]
2905
+ - @objectstack/spec@1.0.6
2906
+
2907
+ ## 1.0.5
2908
+
2909
+ ### Patch Changes
2910
+
2911
+ - b1d24bd: refactor: migrate build system from tsc to tsup for faster builds
2912
+ - Replaced `tsc` with `tsup` (using esbuild) across all packages
2913
+ - Added shared `tsup.config.ts` in workspace root
2914
+ - Added `tsup` as workspace dev dependency
2915
+ - significantly improved build performance
2916
+ - Updated dependencies [b1d24bd]
2917
+ - @objectstack/spec@1.0.5
2918
+
2919
+ ## 1.0.4
2920
+
2921
+ ### Patch Changes
2922
+
2923
+ - @objectstack/spec@1.0.4
2924
+
2925
+ ## 1.0.3
2926
+
2927
+ ### Patch Changes
2928
+
2929
+ - fb2eabd: fix: resolve "process is not defined" runtime error in browser environments by adding safe environment detection and polyfills
2930
+ - @objectstack/spec@1.0.3
2931
+
2932
+ ## 1.0.2
2933
+
2934
+ ### Patch Changes
2935
+
2936
+ - a0a6c85: Infrastructure and development tooling improvements
2937
+
2938
+ - Add changeset configuration for automated version management
2939
+ - Add comprehensive GitHub Actions workflows (CI, CodeQL, linting, releases)
2940
+ - Add development configuration files (.cursorrules, .github/prompts)
2941
+ - Add documentation files (ARCHITECTURE.md, CONTRIBUTING.md, workflows docs)
2942
+ - Update test script configuration in package.json
2943
+ - Add @objectstack/cli to devDependencies for better development experience
2944
+
2945
+ - 109fc5b: Unified patch release to align all package versions.
2946
+ - Updated dependencies [a0a6c85]
2947
+ - Updated dependencies [109fc5b]
2948
+ - @objectstack/spec@1.0.2
2949
+
2950
+ ## 1.0.1
2951
+
2952
+ ### Patch Changes
2953
+
2954
+ - @objectstack/spec@1.0.1
2955
+
2956
+ ## 1.0.0
2957
+
2958
+ ### Major Changes
2959
+
2960
+ - Major version release for ObjectStack Protocol v1.0.
2961
+ - Stabilized Protocol Definitions
2962
+ - Enhanced Runtime Plugin Support
2963
+ - Fixed Type Compliance across Monorepo
2964
+
2965
+ ### Patch Changes
2966
+
2967
+ - Updated dependencies
2968
+ - @objectstack/spec@1.0.0
2969
+
2970
+ ## 0.9.2
2971
+
2972
+ ### Patch Changes
2973
+
2974
+ - Updated dependencies
2975
+ - @objectstack/spec@0.9.2
2976
+
2977
+ ## 0.9.1
2978
+
2979
+ ### Patch Changes
2980
+
2981
+ - Patch release for maintenance and stability improvements. All packages updated with unified versioning.
2982
+ - Updated dependencies
2983
+ - @objectstack/spec@0.9.1
2984
+
2985
+ ## 0.8.2
2986
+
2987
+ ### Patch Changes
2988
+
2989
+ - Updated dependencies [555e6a7]
2990
+ - @objectstack/spec@0.8.2
2991
+
2992
+ ## 0.8.1
2993
+
2994
+ ### Patch Changes
2995
+
2996
+ - @objectstack/spec@0.8.1
2997
+
2998
+ ## 1.0.0
2999
+
3000
+ ### Minor Changes
3001
+
3002
+ - # Upgrade to Zod v4 and Protocol Improvements
3003
+
3004
+ This release includes a major upgrade to the core validation engine (Zod v4) and aligns all protocol definitions with stricter type safety.
3005
+
3006
+ ### Patch Changes
3007
+
3008
+ - Updated dependencies
3009
+ - @objectstack/spec@1.0.0
3010
+
3011
+ ## 0.7.2
3012
+
3013
+ ### Patch Changes
3014
+
3015
+ - fb41cc0: Patch release: Updated documentation and JSON schemas
3016
+ - Updated dependencies [fb41cc0]
3017
+ - @objectstack/spec@0.7.2
3018
+
3019
+ ## 0.7.1
3020
+
3021
+ ### Patch Changes
3022
+
3023
+ - Updated dependencies
3024
+ - @objectstack/spec@0.7.1
3025
+
3026
+ ## 0.6.1
3027
+
3028
+ ### Patch Changes
3029
+
3030
+ - Patch release for maintenance and stability improvements
3031
+ - Updated dependencies
3032
+ - @objectstack/spec@0.6.1
3033
+
3034
+ ## 0.6.0
3035
+
3036
+ ### Minor Changes
3037
+
3038
+ - b2df5f7: Unified version bump to 0.5.0
3039
+
3040
+ - Standardized all package versions to 0.5.0 across the monorepo
3041
+ - Fixed driver-memory package.json paths for proper module resolution
3042
+ - Ensured all packages are in sync for the 0.5.0 release
3043
+
3044
+ ### Patch Changes
3045
+
3046
+ - Updated dependencies [b2df5f7]
3047
+ - @objectstack/spec@0.6.0