@objectstack/types 16.1.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,2656 @@
1
+ # @objectstack/types
2
+
3
+ ## 17.0.0-rc.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 2a37694: fix(plugin-dev,types): the production escape hatch stops being silent (#3900)
8
+
9
+ `DevPlugin.init()` refuses to run under `NODE_ENV=production` (ADR-0115 D6), and
10
+ `OS_ALLOW_DEV_PLUGIN` overrides that refusal. As shipped, the override returned
11
+ early with **no output at all**: the process ran the development assembly while
12
+ every log line and the ready banner read like an ordinary production start.
13
+
14
+ That reproduces, one level up, the defect the guard exists to close. The guard's
15
+ own precedent says so — `OS_ALLOW_DEGRADED_TENANCY` boots degraded _and brands
16
+ it everywhere an operator looks_, and `OS_ALLOW_DRIVER_CONNECT_FAILURE`'s
17
+ contract is "logged loudly at startup". An escape hatch that says nothing leaves
18
+ the operator's only evidence of a degraded state in an env var they may not have
19
+ set themselves.
20
+
21
+ **The override now brands itself, twice.** A warning at `init()` — emitted
22
+ before any assembly work, so it survives an assembly step that later throws —
23
+ and a repeat on the ready banner, which is the surface an operator actually
24
+ reads:
25
+
26
+ ```
27
+ ⚠ DEV ASSEMBLY UNDER NODE_ENV=production (OS_ALLOW_DEV_PLUGIN is set) — the boot
28
+ guard was explicitly overridden. This process is running the DEVELOPMENT
29
+ assembly, which is not hardened for production traffic (ADR-0115 D6).
30
+ • Auth secret is the default published inside @objectstack/plugin-dev. It is
31
+ public, so anyone can mint a session this stack accepts. Pass `authSecret`
32
+ explicitly.
33
+ • Data goes to the in-memory driver with persistence disabled — every record
34
+ is lost when this process exits.
35
+ ```
36
+
37
+ Only hazards that are live for _that_ configuration are named: the secret line
38
+ is suppressed when the operator passed their own `authSecret`, and the driver
39
+ line when the `driver` toggle is off. The dev-admin seed is deliberately absent
40
+ — `plugin-auth`'s `maybeSeedDevAdmin` is hard-gated to
41
+ `NODE_ENV === 'development'` and cannot fire on this path, so warning about it
42
+ would spend the attention the real hazards need.
43
+
44
+ **New export — `resolveAllowDevPlugin()` (`@objectstack/types`).** The flag moves
45
+ off a bare `process.env['OS_ALLOW_DEV_PLUGIN'] === '1'` and joins the
46
+ `OS_ALLOW_*` family's shared truthy vocabulary, next to
47
+ `resolveAllowDegradedTenancy` / `resolveAllowDriverConnectFailure`.
48
+
49
+ FROM → TO for operators: `OS_ALLOW_DEV_PLUGIN=1` keeps working unchanged.
50
+ `OS_ALLOW_DEV_PLUGIN=true` (and `on` / `yes`, case-insensitive, surrounding
51
+ whitespace ignored) **now takes effect** where the strict comparison previously
52
+ ignored it and failed the boot. That is a widening, in the direction an operator
53
+ setting the flag already intended; falsy and unrecognised values still refuse to
54
+ boot, and unset still means "fail fast". If you were relying on
55
+ `OS_ALLOW_DEV_PLUGIN=true` being inert as a way to keep the guard armed, unset
56
+ the variable instead.
57
+
58
+ No change to the refusal path, which this issue re-verified end to end:
59
+ `kernel.use()` only registers, `initPluginWithTimeout` does not catch,
60
+ `bootstrap()` rethrows, and `os serve`'s outer handler prints the message and
61
+ exits `1`. The `throw` is genuinely fatal here, so it needs none of the
62
+ `process.exit(1)` the tenancy guard required for sitting inside a broad `catch`.
63
+
64
+ - d5749d7: refactor(types,rest,services,plugin-sharing): one shared writer for the response envelope, and `error.code` is enforced at compile time (#3973)
65
+
66
+ `BaseResponseSchema` declares one envelope for every REST body the platform
67
+ emits. It declared it once; the code that _wrote_ it was copied per route
68
+ module. After #3843 and #3983 converted the last drifting one, seven modules
69
+ each carried their own two-line `sendOk` / `sendError` pair — so the envelope's
70
+ shape lived in fourteen places rather than one.
71
+
72
+ `pnpm check:route-envelope` proved those seven copies agreed, which is why this
73
+ is a cleanup rather than a bug fix. But a guard proves agreement; it does not
74
+ create it. An eighth module starts by copying the pair again — not
75
+ hypothetically: `share-link-routes.ts` was found already drifting by the
76
+ repo-wide scan, and its drift had broken `client.shareLinks.create()` and
77
+ `.list()` through `unwrapResponse` (#3983).
78
+
79
+ ## What moved
80
+
81
+ `sendOk` / `sendError` now live once, in `@objectstack/types`
82
+ (`response-envelope.ts`), and all seven modules import them:
83
+
84
+ | Module |
85
+ | ------------------------------------- |
86
+ | `service-storage/storage-routes.ts` |
87
+ | `service-settings/settings-routes.ts` |
88
+ | `service-datasource/admin-routes.ts` |
89
+ | `rest/external-datasource-routes.ts` |
90
+ | `rest/package-routes.ts` |
91
+ | `service-i18n/i18n-service-plugin.ts` |
92
+ | `plugin-sharing/share-link-routes.ts` |
93
+
94
+ Placement was the open question in #3973, not design. `packages/spec` is
95
+ schemas-only (Prime Directive #2), and the callers span `rest`, four
96
+ `services/*` and one `plugins/*`, which rules out anything depending on them.
97
+ `@objectstack/types` depends on nothing but `@objectstack/spec`, so every caller
98
+ can reach it, and it is already where the repo puts a helper the HTTP boundaries
99
+ share — `looksLikeInternalErrorLeak` (#3867) sits one file over and made the
100
+ same argument first.
101
+
102
+ The builders take a structural `{ status(n), json(body) }`, so the package
103
+ imports no HTTP contract at all: `IHttpResponse` satisfies it, and so does the
104
+ `any`-typed `res` the older modules carry.
105
+
106
+ ## `error.code` is now checked by the compiler
107
+
108
+ All seven copies typed the parameter `code: string`. ADR-0112 (#3841) closed the
109
+ vocabulary — `ErrorCode` is `StandardErrorCode ∪ ERROR_CODE_LEDGER` — but an
110
+ invented code was still caught only at runtime, by a conformance suite parsing a
111
+ driven body, i.e. only on routes some test happened to drive.
112
+
113
+ The shared `sendError` types `code` as `ErrorCode`, so an unregistered code now
114
+ fails to compile, at every call site at once:
115
+
116
+ ```ts
117
+ sendError(res, 400, "NOT_A_REGISTERED_CODE", "invented");
118
+ // Argument of type '"NOT_A_REGISTERED_CODE"' is not assignable to parameter of type 'ErrorCode'.
119
+ ```
120
+
121
+ This cost no call-site churn: every code the seven modules emit was already
122
+ registered.
123
+
124
+ ## `extra` is closed at the same place
125
+
126
+ `sendError`'s last parameter is `Pick<ApiError, 'category' | 'httpStatus' |
127
+ 'details' | 'requestId'>` — exactly what `ApiErrorSchema` declares beside `code`
128
+ and `message`.
129
+
130
+ It was `Record<string, unknown>` while `settings-routes` still hung `namespace` /
131
+ `key` / `reason` / `fields` beside `code`. Those bodies passed every gate anyway:
132
+ `ApiErrorSchema` is a plain `z.object`, so unknown keys were STRIPPED rather than
133
+ rejected, and `envelopeViolations` inspects only the body's top level —
134
+ conformant _by stripping_ rather than by declaration. #4224 moved that module
135
+ onto `details`, which is what lets the parameter close here. Closing it at the
136
+ shared builder is the part that lasts: an undeclared sibling is now a compile
137
+ error in every module at once, rather than a key that quietly evaporates in
138
+ whichever module reintroduces it.
139
+
140
+ ## Nothing changes on the wire
141
+
142
+ The seven pairs were identical modulo the optional `status` and `extra`
143
+ parameters this one unions, and each module's driven conformance suite still
144
+ parses its real bodies against the real spec schemas. One internal call site was
145
+ rewritten: `package-routes` passed `details` positionally and now passes
146
+ `{ details }`, producing the same `error.details` it always did.
147
+
148
+ ## The guard got stronger
149
+
150
+ `scripts/check-route-envelope.mjs` counts response write sites per module. A
151
+ module that routes everything through the shared pair builds **none** itself, so
152
+ the seven now declare `0 / 0 / 0` where they used to declare `2 / 1 / 1`, and the
153
+ shared pair is pinned separately at `2 / 1 / 1` so the invariant stays total for
154
+ the surface rather than per-module. What the count asserts is no longer "your two
155
+ builders are the enveloped ones" but "you have no builders" — and a new route
156
+ that hand-rolls a body still moves it off zero and fails.
157
+
158
+ ### Patch Changes
159
+
160
+ - 2e836de: chore(packaging): CHANGELOG.md ships in every npm tarball (#4261)
161
+
162
+ The AGENTS.md post-task checklist requires breaking changesets to carry their
163
+ FROM → TO migration because "this text ships to consumers as `CHANGELOG.md`
164
+ inside the npm package and is what an upgrading agent greps after the tombstone
165
+ error." That delivery path was severed for 68 of the 69 publishable packages:
166
+ npm packs `package.json` / `README*` / `LICENSE*` unconditionally but — unlike
167
+ older npm versions — not `CHANGELOG.md`, and the canonical
168
+ `"files": ["dist", "README.md"]` whitelist never named it. Measured on npm
169
+ 10.9.7: `npm pack --dry-run` on `@objectstack/types` shipped 3 files while its
170
+ 70KB `CHANGELOG.md` stayed behind. Only `@objectstack/spec` listed it
171
+ explicitly.
172
+
173
+ The tombstone-error scenario is precisely the one where the repo is out of
174
+ reach — the upgrading agent has `node_modules` and nothing else — so the
175
+ migration text has to ride in the tarball. Every publishable package now
176
+ declares `CHANGELOG.md` in `files`, and the canonical whitelist is
177
+ `["dist", "README.md", "CHANGELOG.md"]`.
178
+
179
+ The other half is the gate: `check:published-files` gains a fifth invariant,
180
+ COMPLETE — a whitelist that fails to cover `CHANGELOG.md` fails the
181
+ always-required lint job, so the next package cannot silently sever the path
182
+ again. `@objectstack/spec`'s per-package EXTRA_ENTRIES exemption dissolves
183
+ into the canonical set.
184
+
185
+ Consumer-visible change: one more file per install (the package's changelog,
186
+ e.g. 70.8KB for `@objectstack/types`), and `grep -r "removed key"
187
+ node_modules/@objectstack/*/CHANGELOG.md` now finds the migration it was
188
+ promised.
189
+
190
+ - c20b875: **Correct the stale premise left behind by #4012: the degraded-boot stderr copy
191
+ survives the operator's LOG LEVEL, not `os serve`'s boot-quiet window.**
192
+
193
+ `emitDegradedBootBanner` writes the `OS_ALLOW_DRIVER_CONNECT_FAILURE` banner to
194
+ stderr in addition to `logger.warn`, and every comment and test name explaining
195
+ why cited the same reason: `os serve` swallowed all of stdout while the kernel
196
+ booted, and `Logger` routes `warn` to stdout. #4012 fixed that — the boot window
197
+ now buffers and replays `warn`-and-above — which retires the _stated_
198
+ justification for a duplicate that is nonetheless still load-bearing:
199
+
200
+ `Logger.write()` returns before touching a stream when the record is below
201
+ `config.level`, so at `--log-level error`, `fatal` or `silent` the banner's
202
+ `logger.warn` reaches **no** stream at all. A production host at `error` is
203
+ exactly the deployment this escape hatch exists for, and exactly where a
204
+ logger-only banner would vanish. Removing the stderr copy on the strength of
205
+ #4012 would therefore have been a regression — so this documents the reason that
206
+ is still true, in the places someone would read before deleting it:
207
+ `degraded-boot.ts`, the engine's emit site, and all three parity tests
208
+ (objectql, runtime, service-datasource), which are renamed off "which `os serve`
209
+ boot-quiet cannot swallow" to "which the operator log level cannot filter away".
210
+
211
+ The objectql parity test now proves the claim instead of asserting around it: it
212
+ drives a **real** `ObjectLogger` at `level: 'error'` and requires the banner on
213
+ stderr _and_ nothing on stdout. Set the level to `warn` and it fails — so the
214
+ test is pinned to the level filter rather than passing for any reason.
215
+
216
+ Also corrected in the same sweep, all comment-only, all previously overstating
217
+ what #4012 had not yet fixed:
218
+
219
+ - the automation wiring summary (`format.ts`, `serve.ts`, its test) claimed the
220
+ boot window swallowed the engine's binding warnings. Its real justification is
221
+ stronger and unchanged: a flow that silently fails to arm emits **no** log line
222
+ at any level, so binding state has to be read off the live engine — absence of
223
+ a warning was never evidence of a bound flow.
224
+ - the seed summary (`seed-summary.ts`, `format.ts`, its test) and `AppPlugin`'s
225
+ seed-outcome note attributed the silence to the boot window; the operative
226
+ gate is that `SeedLoader`'s result logs are `info`, under the default `warn`.
227
+
228
+ No behavior changes.
229
+
230
+ - 9881074: fix(batch): the background walks seek instead of counting, so they stop skipping rows (#4363)
231
+
232
+ #4363 made a single paged read a partition of its result set. It could not make
233
+ a _walk_ one: seven background scans paged with a growing `offset` while writing
234
+ to the very rows they were reading, and an offset counts into a set those writes
235
+ are changing. Rows slide past the cursor and are never visited.
236
+
237
+ That is not a slow page in any of these — it is a wrong answer wearing the shape
238
+ of a clean run:
239
+
240
+ - **`rebuildApproverIndex`** built its desired state by walking
241
+ `sys_approval_request WHERE status = 'pending'` with no `orderBy` at all, then
242
+ **deleted** every index row that state did not explain. A skipped request
243
+ meant an approver silently dropped from someone's queue. (The loop beside it
244
+ ordered by `created_at` — not unique, so its pages were never a partition
245
+ either.)
246
+ - **`verifyFileReferences`** decides which files nothing references. A record it
247
+ never visits is reported as an unreferenced file.
248
+ - **`backfillFileReferences`** and the **pinyin companion backfill** rewrite
249
+ each row they read, so their own writes were shifting the set out from under
250
+ the cursor. Records were left unconverted and unsearchable by a run that
251
+ reported success.
252
+ - **`scanValueShapes`** exists to vouch that no stored value is off-shape, and
253
+ it opens a migration gate on that evidence.
254
+
255
+ All of them now go through `keysetWalk` (`@objectstack/types`): order by a
256
+ unique key, and seek past the last one instead of counting from the start. A
257
+ row's key does not move when the row is updated, and cannot be shifted when
258
+ another is deleted, so the walk is stable under exactly the mutation these
259
+ functions perform. It is also O(n) rather than O(n²/page) — measured on
260
+ Postgres over 2M rows, deep pages cost ~1.1 s by offset against ~0.09 s by seek.
261
+
262
+ One deliberate non-conversion: the REST **export** stream keeps its offset. It
263
+ honors a caller-chosen sort, and a keyset walk would have to re-order the export
264
+ by `id` to seek — changing what the user asked for to fix a cost. Its pages are
265
+ already a partition since #4363; only the depth cost remains.
266
+
267
+ `keysetWalk` merges the cursor with `$and` rather than spreading it into the
268
+ caller's filter, so a walk whose own `where` constrains the key column
269
+ (`{ id: { $in: [...] } }`) keeps that constraint instead of having it silently
270
+ overwritten. When a `max` cap is set it reads one row beyond the cap to tell
271
+ "the cap stopped us" from "the source ended exactly there" — without that, a
272
+ walk that read everything still reports `truncated`, and a caller acting on it
273
+ goes looking for rows that were never withheld.
274
+
275
+ The storage suites' fake engines now **throw** on an `offset` instead of serving
276
+ one, so the conversion is pinned rather than merely passing.
277
+
278
+ - 39eb01b: fix(runtime,cli,types): `os migrate` and the dev runtime now share one `__search` companion schema view (#3955)
279
+
280
+ On a zh-locale deployment the dev runtime provisions the hidden `__search`
281
+ pinyin companion column (ADR-0098) on every eligible object, but the
282
+ `os migrate plan`/`apply` boot went through `createStandaloneStack`, which
283
+ never derived the locale-gated pinyin decision from the compiled artifact.
284
+ Its metadata therefore lacked every companion column, and `migrate plan`
285
+ reported each live `__search` column of a dev-created database as a
286
+ destructive orphan — with `--allow-destructive` as the printed remediation,
287
+ which would have dropped live feature columns.
288
+
289
+ - `@objectstack/types`: new `collectConfiguredLocales(i18n)` and
290
+ `stampSearchPinyinEnabled(i18n)` — the single resolve-and-stamp helper for
291
+ `OS_SEARCH_PINYIN_ENABLED`. An explicit env value still wins; only a
292
+ positive locale-derived decision is stamped.
293
+ - `@objectstack/runtime`: `createStandaloneStack` stamps the decision from
294
+ the artifact's `i18n` before any plugin constructs a `SchemaRegistry`, and
295
+ surfaces `i18n` on its result like `requires`/`objects`/`manifest`.
296
+ - `@objectstack/cli`: the `serve`/`dev` boot now stamps through the same
297
+ shared helper (behaviour unchanged), so create/serve and plan/apply cannot
298
+ compute different schema views of the same source tree.
299
+
300
+ A fresh CLI-created database is now also born with the same `__search`
301
+ columns the dev runtime would provision, instead of acquiring them on the
302
+ next dev boot.
303
+
304
+ - Updated dependencies [6a67d7a]
305
+ - Updated dependencies [0ecc656]
306
+ - Updated dependencies [06772eb]
307
+ - Updated dependencies [270650f]
308
+ - Updated dependencies [3aef718]
309
+ - Updated dependencies [1ea6bce]
310
+ - Updated dependencies [c1dcacd]
311
+ - Updated dependencies [ad303ed]
312
+ - Updated dependencies [32ccb23]
313
+ - Updated dependencies [f5a4ef0]
314
+ - Updated dependencies [2d3e255]
315
+ - Updated dependencies [7d7521f]
316
+ - Updated dependencies [5dc4d02]
317
+ - Updated dependencies [05154a1]
318
+ - Updated dependencies [9b6fe7c]
319
+ - Updated dependencies [8c711fb]
320
+ - Updated dependencies [09e4547]
321
+ - Updated dependencies [91f4c78]
322
+ - Updated dependencies [820eff9]
323
+ - Updated dependencies [8d895ff]
324
+ - Updated dependencies [f6472d7]
325
+ - Updated dependencies [78caf51]
326
+ - Updated dependencies [62a789b]
327
+ - Updated dependencies [789ad63]
328
+ - Updated dependencies [2af1988]
329
+ - Updated dependencies [12a19a8]
330
+ - Updated dependencies [41dcda3]
331
+ - Updated dependencies [c8124e5]
332
+ - Updated dependencies [a1a4140]
333
+ - Updated dependencies [217e2e6]
334
+ - Updated dependencies [86a71d1]
335
+ - Updated dependencies [d5c75e2]
336
+ - Updated dependencies [03d26f7]
337
+ - Updated dependencies [4384921]
338
+ - Updated dependencies [3c628ce]
339
+ - Updated dependencies [7cb922e]
340
+ - Updated dependencies [1d22114]
341
+ - Updated dependencies [b5f9397]
342
+ - Updated dependencies [ed77493]
343
+ - Updated dependencies [58a03d2]
344
+ - Updated dependencies [dc530b4]
345
+ - Updated dependencies [e59786e]
346
+ - Updated dependencies [bcf1112]
347
+ - Updated dependencies [9774b78]
348
+ - Updated dependencies [b07d829]
349
+ - Updated dependencies [a648e96]
350
+ - Updated dependencies [a47ac06]
351
+ - Updated dependencies [e4c61a7]
352
+ - Updated dependencies [cc60165]
353
+ - Updated dependencies [081aa6f]
354
+ - Updated dependencies [91f4c78]
355
+ - Updated dependencies [e8d0c21]
356
+ - Updated dependencies [c1d44f7]
357
+ - Updated dependencies [ab9fb5c]
358
+ - Updated dependencies [f985b3f]
359
+ - Updated dependencies [9a4932a]
360
+ - Updated dependencies [f9fc874]
361
+ - Updated dependencies [011b386]
362
+ - Updated dependencies [7777e8f]
363
+ - Updated dependencies [507b92a]
364
+ - Updated dependencies [7309c81]
365
+ - Updated dependencies [20bc1ec]
366
+ - Updated dependencies [90c2b15]
367
+ - Updated dependencies [42eeb7d]
368
+ - Updated dependencies [01e124d]
369
+ - Updated dependencies [7ce02eb]
370
+ - Updated dependencies [a13827e]
371
+ - Updated dependencies [7733604]
372
+ - Updated dependencies [40e420f]
373
+ - Updated dependencies [d13004a]
374
+ - Updated dependencies [5b47ab5]
375
+ - Updated dependencies [b09d8d9]
376
+ - Updated dependencies [b09d8d9]
377
+ - Updated dependencies [8675db6]
378
+ - Updated dependencies [b09d8d9]
379
+ - Updated dependencies [3eb1b2b]
380
+ - Updated dependencies [59b85c0]
381
+ - Updated dependencies [6e357ed]
382
+ - Updated dependencies [d6938bf]
383
+ - Updated dependencies [31e0be9]
384
+ - Updated dependencies [4bfd455]
385
+ - Updated dependencies [ffd2ce2]
386
+ - Updated dependencies [62f8017]
387
+ - Updated dependencies [a831df1]
388
+ - Updated dependencies [f752ee3]
389
+ - Updated dependencies [a1b61e0]
390
+ - Updated dependencies [cd6b9f2]
391
+ - Updated dependencies [2cb6d3c]
392
+ - Updated dependencies [af2a095]
393
+ - Updated dependencies [ec796d5]
394
+ - Updated dependencies [e87fea1]
395
+ - Updated dependencies [c65e529]
396
+ - Updated dependencies [3ca34c1]
397
+ - Updated dependencies [239c3a3]
398
+ - Updated dependencies [94a0bbc]
399
+ - Updated dependencies [d6bfb3d]
400
+ - Updated dependencies [a2266a6]
401
+ - Updated dependencies [d25a0ec]
402
+ - Updated dependencies [667b83e]
403
+ - Updated dependencies [627b188]
404
+ - Updated dependencies [8d4eae7]
405
+ - Updated dependencies [65a3a84]
406
+ - Updated dependencies [ccd9397]
407
+ - Updated dependencies [bca935b]
408
+ - Updated dependencies [c54c822]
409
+ - Updated dependencies [8dcc0f5]
410
+ - Updated dependencies [75b9e51]
411
+ - Updated dependencies [0a2f233]
412
+ - Updated dependencies [8621cdd]
413
+ - Updated dependencies [6f23667]
414
+ - Updated dependencies [5d21a48]
415
+ - Updated dependencies [19365b7]
416
+ - Updated dependencies [b7ed26d]
417
+ - Updated dependencies [b3a3d83]
418
+ - Updated dependencies [7a55913]
419
+ - Updated dependencies [35accbf]
420
+ - Updated dependencies [6038de7]
421
+ - Updated dependencies [eb95d97]
422
+ - Updated dependencies [e4c2dc8]
423
+ - Updated dependencies [1bd2795]
424
+ - Updated dependencies [8186a70]
425
+ - Updated dependencies [a329cca]
426
+ - Updated dependencies [6eec18c]
427
+ - Updated dependencies [4d7bebf]
428
+ - Updated dependencies [821ac7a]
429
+ - Updated dependencies [8f81731]
430
+ - Updated dependencies [8b50cb3]
431
+ - Updated dependencies [8c2db68]
432
+ - Updated dependencies [22b5e54]
433
+ - Updated dependencies [0166bd5]
434
+ - Updated dependencies [9b702dc]
435
+ - Updated dependencies [ab16331]
436
+ - @objectstack/spec@17.0.0-rc.1
437
+
438
+ ## 17.0.0-rc.0
439
+
440
+ ### Minor Changes
441
+
442
+ - 879ea13: ADR-0105 Phase 0 + Phase 1: group tenancy posture; organization scope as a
443
+ first-class authorization dimension.
444
+
445
+ > This release carries BREAKING spec removals (see "Enforce-or-remove" below)
446
+ > but is recorded as `minor`: every publishable package is in the Changesets
447
+ > lockstep group, so one `major` would promote the whole monorepo. Breaking
448
+ > changes ship as `minor` during the launch window — the migration notes below
449
+ > are what reach consumers in `CHANGELOG.md`.
450
+
451
+ ## Tenancy is now a spectrum (D1)
452
+
453
+ `single | group | isolated`, resolved by the `tenancy` service and selected with
454
+ the new `OS_TENANCY_POSTURE` env var. Existing deployments are unchanged:
455
+ `OS_TENANCY_POSTURE` unset derives the posture from `OS_MULTI_ORG_ENABLED`
456
+ (`true` ⇒ `isolated`, else `single`). An unrecognized value throws at boot
457
+ rather than silently landing in a posture with no organization wall.
458
+
459
+ - `single` — no wall (unchanged).
460
+ - `group` — **new.** Organizations are membership boundaries over one shared
461
+ dataset; Layer 0 becomes `organization_id IN accessible_org_ids` (union / MOAC
462
+ semantics). Enforced by the OPEN engine.
463
+ - `isolated` — today's `multi`, renamed. Behavior, enterprise `org-scoping`
464
+ probe and degraded-boot handling all unchanged.
465
+
466
+ ## Organization scope is a first-class context field (D2)
467
+
468
+ `ExecutionContext.accessible_org_ids` — every organization the caller holds a
469
+ currently-valid membership in (ADR-0091 validity windows) — is resolved once by
470
+ `resolveAuthzContext` and carried by every transport. The `group` wall reads it
471
+ directly; RLS policies may reference it as
472
+ `organization_id IN (current_user.accessible_org_ids)`. An empty or absent set
473
+ fails the wall closed.
474
+
475
+ Only the Layer 0 PREDICATE widens. Composition is untouched: the wall is still
476
+ computed independently of the RLS compiler, AND-composed outermost, and
477
+ crossable only by a true `PLATFORM_ADMIN` on a posture-permitting object — so
478
+ ADR-0095's W1/W2 invariants hold in every posture.
479
+
480
+ ## Two P0 correctness fixes (D3, D4) — behavior changes
481
+
482
+ **D3 — app-authored org-scoped RLS policies are no longer silently dropped**
483
+ (finding F1, framework#3539). `collectRLSPolicies` used to strip any policy whose
484
+ `using` contained the substring `current_user.organization_id` when isolation was
485
+ inactive, which swallowed app-authored policies as well as the platform's own.
486
+ Stripping is now decided by PROVENANCE (identity against the shipped
487
+ declaration). **Upgrade impact:** in a deployment with no organization wall, an
488
+ app-authored policy referencing the active organization is now RETAINED and
489
+ fails closed (zero rows) with a one-time warning, where it previously vanished
490
+ and the object read unscoped. `getReadFilter` shared the defect, so analytics and
491
+ raw-SQL consumers were affected too. If a policy was only ever meant for
492
+ multi-org, delete it or install `@objectstack/organizations`.
493
+
494
+ **D4 — `viewAllRecords`/`modifyAllRecords` never cross an organization
495
+ boundary** (finding F2, framework#3540). Under a wall-less posture nothing
496
+ bounded the wildcard superuser bits `organization_admin` carries, so a
497
+ deployment that accumulated organizations (personal orgs on signup) made every
498
+ owner/admin an environment-wide superuser. `auto-org-admin-grant` now grants a
499
+ de-VAMA'd `organization_admin_no_bypass` variant when no wall is enforced, and
500
+ revokes the superseded variant whenever the posture changes. **Upgrade impact:**
501
+ in `single` posture an org owner/admin keeps full CRUD but loses the blanket
502
+ ownership/sharing/RLS bypass. Deliberate deployment-wide visibility remains
503
+ available through `admin_full_access` or an explicitly authored permission set —
504
+ it just stops being a side effect of a better-auth membership role.
505
+
506
+ ## Engine-owned organization stamping (D5)
507
+
508
+ Under any wall-enforcing posture the engine stamps `organization_id` from the
509
+ caller's active organization on an insert that omits it, and validates every
510
+ supplied value against the wall. Idempotent with the enterprise auto-stamp
511
+ (neither overwrites a supplied value). This also closes a real hole: the
512
+ pre-existing post-image check required a non-array payload, so a BULK insert
513
+ could carry a forged `organization_id` per row. One forged row now denies the
514
+ whole write.
515
+
516
+ ## Group structure, extension fields and red-line lints (D6, D7)
517
+
518
+ - `sys_organization` gains `parent_organization_id` and `sort_order` — a
519
+ **reporting dimension only**.
520
+ - New lint `validateOrgAxisRedLines` (`org-axis-permission-inheritance`,
521
+ `org-axis-cross-org-bu-grant`), wired into `os lint` / `os compile` /
522
+ `os validate`: an RLS policy or sharing rule that walks the org tree is an
523
+ error, as is a business-unit grant on a platform-global object.
524
+ - Extension fields on better-auth-managed objects ride the existing ADR-0092
525
+ whitelist. A new guard derives better-auth's real field surface from
526
+ `getAuthTables()` at the pinned version and fails the build on any name
527
+ collision, so a library upgrade cannot silently take ownership of a column.
528
+
529
+ ## Enforce-or-remove (D11) — BREAKING
530
+
531
+ Both removals are of surface that had **zero runtime consumers**, so no
532
+ behavior changes; authoring them is now a no-op instead of a lint warning.
533
+
534
+ - **`PermissionSet.contextVariables` — REMOVED.** The RLS compiler never read
535
+ it. FROM → TO: a set a policy needs as `field IN (current_user.<key>)` is now
536
+ supplied by a registered membership resolver (below); a constant belongs in
537
+ the policy itself as a literal (`status = 'published'`).
538
+ - **`Territory` / `TerritoryModel` / `TerritoryType` (`security/territory.zod.ts`)
539
+ — REMOVED.** No runtime object, stack field or resolver existed. FROM → TO:
540
+ matrix requirements are served by multi-position × business-unit anchoring; a
541
+ generalized dimension-security module will arrive with its own ADR.
542
+ - **`ExecutionContext.rlsMembership` — PRODUCTIZED.** The bag the compiler has
543
+ merged since ADR-0056 finally has a producer: register an
544
+ `IRlsMembershipResolver` (`@objectstack/spec/contracts`) under the
545
+ `rls-membership-resolver` service, declaring the keys it owns. Fail-closed by
546
+ construction — an unresolved key makes its policies drop out. Kernel-owned
547
+ keys (`accessible_org_ids`, `org_user_ids`, …) are reserved and cannot be
548
+ overwritten from this seam.
549
+
550
+ ## Edition boundary (D12)
551
+
552
+ The `group` posture's enforcement primitives ship OPEN — the union wall,
553
+ `accessible_org_ids` resolution, D5 stamping/validation, the D3/D4 correctness
554
+ fixes and the D6 lints — because the correctness of a wall is never a paid
555
+ feature (cloud ADR-0016 铁律「强制免费、治理收费」). `isolated` keeps its existing
556
+ enterprise `org-scoping` probe, so the current commercial boundary for
557
+ legal-entity isolation is unchanged by this release.
558
+
559
+ - 840ee4b: fix(analytics,runtime,types): gate cube auto-inference on object existence; stop the dispatcher boundary returning raw SQL (#3867)
560
+
561
+ Two independent defects on the `/analytics` surface, found while verifying #3770
562
+ against a real server. On an authenticated CRM dev server, before this change:
563
+
564
+ ```
565
+ POST /api/v1/analytics/query {"cube":"sqlite_master","measures":["count"],"dimensions":["type"]}
566
+ → 200 {"rows":[{"type":"index","count":262},{"type":"table","count":71},{"type":"view","count":1}],
567
+ "sql":"SELECT type AS \"type\", COUNT(*) AS \"count\" FROM \"sqlite_master\" GROUP BY type"}
568
+ ```
569
+
570
+ That is SQLite's internal schema table — never a registered object — read
571
+ successfully through the analytics endpoint. Not merely "the name reaches the
572
+ driver and errors": **any table the connection can see was readable.**
573
+
574
+ **① The cube name reached the driver as a table name.** `AnalyticsService.ensureCube`
575
+ auto-infers a minimal Cube when none is registered, with `cube.sql = <the queried
576
+ name>`. That is the intended "metric over an object" path — an `object-metric` KPI
577
+ widget queries `crm_account` with no authored Cube — but it accepted _any_ string,
578
+ so the endpoint could aggregate over an arbitrary physical table. The
579
+ analytics-side twin of the data-path gap #3770 closed, and it was not covered by
580
+ that fix: #3770 gated the protocol's `analyticsQuery`, which is the _degraded
581
+ fallback_; a deployment with `@objectstack/service-analytics` installed runs the
582
+ real engine instead (`ctx.replaceService`).
583
+
584
+ Inference is now gated on the same schema registry the data path consults, via a
585
+ new optional `AnalyticsServiceConfig.isRegisteredObject` that `plugin.ts` wires
586
+ from the `data` engine's `getObject`. Three-way rule: a registered Cube runs
587
+ untouched (its `sql` is whatever it declares); an unregistered name that IS an
588
+ object still auto-infers exactly as before; neither → `CUBE_NOT_FOUND` / 404
589
+ raised before any SQL exists, naming both ways to make the request valid. With no
590
+ probe configured the gate stands down and warns once — the same tiering #3770
591
+ took for a missing registry. `generateSql` (`/analytics/sql`) is gated too.
592
+
593
+ **② The dispatcher boundary returned `err.message` verbatim.** `errorResponseBase`
594
+ is the single error exit for _every_ route the dispatcher plugin mounts —
595
+ `/analytics`, `/packages`, `/i18n`, `/storage`, `/automation`, `/auth`,
596
+ `/notifications`, `/mcp`. `@objectstack/rest` has guarded its data routes against
597
+ driver dumps forever (`mapDataError`); this boundary guarded nothing, so any
598
+ driver error on any of those routes shipped its SQL to the client. Unlike ①, this
599
+ half is unconditional — it does not depend on the cube being invalid.
600
+
601
+ The leak heuristic moved out of `rest-server.ts` into `@objectstack/types` as
602
+ `looksLikeInternalErrorLeak` (both packages already depend on it) and is now
603
+ applied at both boundaries — one predicate, one place to widen when a new
604
+ dialect's phrasing shows up. `mapDataError`'s behaviour is unchanged. At the
605
+ dispatcher it applies **only to 5xx**: a 4xx message is a deliberate
606
+ business/validation answer and must reach the caller intact. Sanitising costs no
607
+ diagnostics — the untouched error still reaches `errorReporter` through the
608
+ existing `__obsRecordedError` side-channel.
609
+
610
+ **Also fixed in the same function:** `errorResponseBase` read only
611
+ `err.statusCode`, while domain errors across this codebase carry `status` (and
612
+ `HttpDispatcher.errorFromThrown` already reads `status` first). Every deliberate
613
+ 4xx thrown through a dispatcher route — including #3770's `OBJECT_NOT_FOUND` on
614
+ the analytics fallback path — was rendered as a **500**. It now reads `status`
615
+ then `statusCode`.
616
+
617
+ **Behaviour change.** `/analytics/query` and `/analytics/sql` return 404
618
+ `CUBE_NOT_FOUND` for a cube that is neither registered nor a registered object;
619
+ previously the name was passed to the driver. Dashboards and KPI widgets pointed
620
+ at real objects or authored cubes are unaffected. A 5xx on a dispatcher route
621
+ whose message looks like a driver dump now reads `Internal server error` — check
622
+ server logs or your error reporter for the original.
623
+
624
+ - 030125b: feat(objectql)!: `init()` refuses to boot when a data driver fails to connect (#3741)
625
+
626
+ `ObjectQLEngine.init()` wrapped every driver's `connect()` in a try/catch, logged
627
+ one error line, and carried on. A server whose database was unreachable therefore
628
+ "started successfully" — health endpoints could even stay green — and then failed
629
+ every request with an error that reads nothing like _the database is down_. The
630
+ warning it printed (`Operations may recover via lazy reconnection or fail at query
631
+ time`) was half fiction: grep the repo and no reconnection exists in `driver-sql`
632
+ or `driver-mongodb`, so only the "fail at query time" half was ever real. The
633
+ caller made it worse — `ObjectQLPlugin.start()` runs `syncRegisteredSchemas()`
634
+ immediately after `init()`, issuing DDL against a driver that isn't there.
635
+
636
+ The structural half of the bug was worse than the operational one: the catch
637
+ removed a driver's ability to **refuse startup at all**. Any fatal startup check —
638
+ licence, server version, incompatible configuration, missing capability, not just
639
+ an unreachable socket — is expressed by throwing from `connect()`, and every one
640
+ of them was silently downgraded to a runtime error. That is why driver-mongodb's
641
+ multi-tenancy guard (#3724 / #3734) had to be hoisted into its constructor.
642
+
643
+ - `init()` now **throws** `DriverConnectError` (`code: 'ERR_DRIVER_CONNECT'`)
644
+ when any boot-registered driver's `connect()` rejects, aborting kernel
645
+ bootstrap. It still attempts every driver first, so one failed boot names all
646
+ of them. The message is self-contained — each failed driver and its cause —
647
+ because the CLI prints `error.message` alone; the first cause is also attached
648
+ as `error.cause`. Exported from both `@objectstack/objectql` and
649
+ `@objectstack/objectql/core`.
650
+ - `connect()` is now a supported place for a driver to veto boot. Startup
651
+ validation that needs a live connection (server version, capability probes)
652
+ no longer has to be forced into a constructor.
653
+ - The misleading "lazy reconnection" warning is gone.
654
+ - New escape hatch `OS_ALLOW_DRIVER_CONNECT_FAILURE=1`
655
+ (`resolveAllowDriverConnectFailure()` in `@objectstack/types`) restores the old
656
+ lenient boot, but loudly: a `DEGRADED BOOT` banner names the failed drivers and
657
+ states that they are never retried or reconnected and that every query and
658
+ schema sync routed to them will fail for the process lifetime. The banner goes
659
+ to stderr as well as the logger, because `os serve` swallows all of stdout
660
+ during boot and `Logger` routes `warn` there — logger-only, the one message
661
+ that matters would be invisible in exactly the deployment the flag is for.
662
+ Defaults off.
663
+
664
+ **Migration.** No code or config change is needed for a correctly configured
665
+ deployment — a driver that connected before still connects. A deployment that was
666
+ _silently_ booting without its database now fails the boot instead, with the
667
+ driver name and cause in the error; fix the datasource configuration (typically
668
+ `OS_DATABASE_URL`, credentials, or network reachability). To keep booting without
669
+ it — deliberately, and knowing every request that touches it will fail — set
670
+ `OS_ALLOW_DRIVER_CONNECT_FAILURE=1`.
671
+
672
+ ### Patch Changes
673
+
674
+ - 87aca93: fix(datasource)!: a declared datasource that objects bind to must connect, or the boot fails (#3758)
675
+
676
+ `DatasourceConnectionService.handleFailure()` fail-fasted only for an `external`
677
+ datasource with `validation.onMismatch: 'fail'`. Everything else degraded to one
678
+ `warn` line — including the case the D2 auto-connect gate itself flags as having
679
+ **no fallback path**: a datasource that objects bind to explicitly via
680
+ `object.datasource`. Those objects never fall through to the `default` driver;
681
+ `engine.getDriver` throws `Datasource 'x' is not registered` for them.
682
+
683
+ So an app declaring `datasource: 'analytics'` with 20 objects bound to it, booted
684
+ against a wrong `ANALYTICS_URL`, started clean and exited zero — and then failed
685
+ every read and write of those 20 objects with an error that reads nothing like
686
+ _the analytics database is unreachable_. The rest of the app worked, which made it
687
+ **harder** to locate than a total outage: it looks like "some pages are broken",
688
+ not like a misconfigured datasource. This is the same decision #3741/#3751 fixed
689
+ one layer up in `ObjectQLEngine.init()`; the boundary here was still drawn in the
690
+ old place.
691
+
692
+ - **Fail-fast is now keyed on "no fallback path", not on `onMismatch` alone.** At
693
+ the `declared-auto` (boot) trigger, a connect failure aborts the boot when the
694
+ datasource is `external` + `onMismatch: 'fail'` **or** when ≥1 object binds to
695
+ it explicitly. `autoConnect: true` with nothing bound stays lenient — that is
696
+ "connect it if you can", and nothing declares a dependency on it. The
697
+ runtime-admin create/update and boot-rehydration triggers are unchanged and
698
+ still always degrade: a UI action must never brick a running server.
699
+ - **Every failure mode counts**, not just an unreachable socket: an unresolvable
700
+ `external.credentialsRef` (D3) and an unsupported `driver` leave the bound
701
+ objects exactly as dead, so they take the same verdict.
702
+ - **The error names the bound objects** (up to 10, then `+N more`) alongside the
703
+ underlying cause, so the message points at the real problem instead of just the
704
+ datasource name. The service already receives the list for post-connect
705
+ `syncObjectSchema`.
706
+ - **`connectDeclared()` attempts every gated datasource before throwing**, and
707
+ aggregates, so one failed boot reports all the misconfigured ones rather than
708
+ one per restart — the same shape as `ObjectQLEngine.init()`'s
709
+ `DriverConnectError`.
710
+ - **The escape hatch is shared with the engine guard**:
711
+ `OS_ALLOW_DRIVER_CONNECT_FAILURE=1` now also covers this path (and covers
712
+ `onMismatch: 'fail'`, which previously had no opt-out). The operator intent is
713
+ identical — "I know the database is unreachable, boot anyway" — and two flags
714
+ would only guarantee one of them gets missed. When set, boot continues and a
715
+ `DEGRADED BOOT` banner goes to stderr as well as the logger, because `os serve`
716
+ swallows stdout during boot. `emitDegradedBootBanner` moved to
717
+ `@objectstack/types` so both call sites share one implementation;
718
+ `@objectstack/objectql` re-exports it unchanged.
719
+
720
+ ADR-0062 D5 is amended with the new criterion and the shared flag.
721
+
722
+ **Migration.** No change for a correctly configured deployment — a datasource that
723
+ connected before still connects. A deployment that was _silently_ booting with a
724
+ dead, explicitly-bound datasource now fails the boot instead, naming the
725
+ datasource, the cause, and the objects that depend on it; fix the datasource
726
+ configuration. To keep booting without it — deliberately, knowing every request
727
+ touching those objects will fail — set `OS_ALLOW_DRIVER_CONNECT_FAILURE=1`.
728
+
729
+ - 32d3800: fix(driver-sql): bound a connection attempt at 10s, and correct the "no reconnection" claim (#3769, #3759)
730
+
731
+ Two related corrections, both from measuring what #3741/#3751/#3765 had only asserted.
732
+
733
+ **The claim was wrong.** #3751 and #3765 shipped several statements that drivers
734
+ never reconnect — "there is no lazy reconnection", "NOT retried and NOT
735
+ reconnected", "stays disconnected for the process lifetime". Measured, both
736
+ drivers recover on their own:
737
+
738
+ - driver-mongodb: killing a real `mongod` and restarting it on the same port,
739
+ the _same_ driver instance served the next write successfully (13ms), with no
740
+ reconnect call from us — the official driver's topology monitor handles it.
741
+ - driver-sql: a knex/pg pool is not poisoned by an outage. Its error tracks live
742
+ server state (`ECONNREFUSED` while down → a handshake error once a listener is
743
+ back → `ECONNREFUSED` again), i.e. every acquire opens a fresh connection.
744
+ `storage-driver.ts` also configures `pool.min: 0`, so no stale idle
745
+ connections are held.
746
+
747
+ The original reasoning grepped this repo for `reconnect`, found nothing, and
748
+ concluded recovery does not happen — but the recovery lives in the client
749
+ libraries, not in our code. The claims are now corrected in `DriverConnectError`,
750
+ the `DEGRADED BOOT` banner, `resolveAllowDriverConnectFailure`'s docs, and the
751
+ drivers / self-hosting pages.
752
+
753
+ **Fail-fast at boot is unchanged and still correct** — the reason is just
754
+ different. It is not that the connection can never return; it is that the _boot
755
+ sequence_ never re-runs. A driver that missed `init()` also missed
756
+ `syncRegisteredSchemas()`, so its tables can simply not exist even after the
757
+ database comes back. The banner now says that.
758
+
759
+ **The real defect underneath.** `SqlDriver` passed its config to knex untouched,
760
+ so a database endpoint that accepts TCP but never completes the handshake — an
761
+ overloaded instance, a half-open firewall, a load balancer mid-failover — made
762
+ every query wait out tarn's 30s default, then fail with `Timeout acquiring a
763
+ connection. The pool is probably full`, pointing an operator at pool sizing
764
+ instead of the network. With a small `pool.max` a few such queries saturate the
765
+ pool and everything else queues.
766
+
767
+ `SqlDriver` now defaults `pool.createTimeoutMillis` to **10s**, matching
768
+ driver-mongodb's existing `connectTimeoutMS ?? 10_000` so both drivers give up on
769
+ an unreachable server at the same point. A host that sets its own
770
+ `createTimeoutMillis` is left alone.
771
+
772
+ **Migration.** None for a healthy datasource. A deployment that deliberately
773
+ relies on connection establishment taking longer than 10s (a slow cross-region
774
+ replica) should set `pool.createTimeoutMillis` explicitly on its `SqlDriver`
775
+ config.
776
+
777
+ Not fixed here, tracked in #3769: knex still reports the bounded wait as "the
778
+ pool is probably full". An accurate message needs a dialect-specific connect
779
+ timeout (pg's `connectionTimeoutMillis`), which changes the shape of `connection`
780
+ and would regress the startup banner's URL display.
781
+
782
+ - Updated dependencies [50616d9]
783
+ - Updated dependencies [08b5a3d]
784
+ - Updated dependencies [d99aeb3]
785
+ - Updated dependencies [4727eb8]
786
+ - Updated dependencies [f63cd09]
787
+ - Updated dependencies [fa3d0cf]
788
+ - Updated dependencies [af5a224]
789
+ - Updated dependencies [71f76e1]
790
+ - Updated dependencies [37b1346]
791
+ - Updated dependencies [99736a0]
792
+ - Updated dependencies [fe67e34]
793
+ - Updated dependencies [fdb4f50]
794
+ - Updated dependencies [1bd5652]
795
+ - Updated dependencies [14252d3]
796
+ - Updated dependencies [7fb436c]
797
+ - Updated dependencies [879ea13]
798
+ - Updated dependencies [201b31f]
799
+ - Updated dependencies [e2616e0]
800
+ - Updated dependencies [6fdc5c6]
801
+ - Updated dependencies [8b9d71e]
802
+ - Updated dependencies [33f5e23]
803
+ - Updated dependencies [259af21]
804
+ - Updated dependencies [587fc91]
805
+ - Updated dependencies [1986594]
806
+ - Updated dependencies [ad4af62]
807
+ - Updated dependencies [d44dbfa]
808
+ - Updated dependencies [474fe39]
809
+ - Updated dependencies [0bc685a]
810
+ - Updated dependencies [b949059]
811
+ - Updated dependencies [be1c52c]
812
+ - Updated dependencies [c5ff96d]
813
+ - Updated dependencies [84e7be9]
814
+ - Updated dependencies [a6c3f38]
815
+ - Updated dependencies [debc23a]
816
+ - Updated dependencies [0f8ad09]
817
+ - Updated dependencies [8f9689f]
818
+ - Updated dependencies [57a3bb3]
819
+ - Updated dependencies [5f9a987]
820
+ - Updated dependencies [db02d47]
821
+ - Updated dependencies [0bfdf46]
822
+ - Updated dependencies [376a061]
823
+ - Updated dependencies [7c7e246]
824
+ - Updated dependencies [f35cdc5]
825
+ - Updated dependencies [9ea2bc5]
826
+ - Updated dependencies [c2d9098]
827
+ - Updated dependencies [a227ed7]
828
+ - Updated dependencies [9613396]
829
+ - Updated dependencies [e47b342]
830
+ - Updated dependencies [4ed7ed4]
831
+ - Updated dependencies [2fa4ca1]
832
+ - Updated dependencies [f5a2320]
833
+ - Updated dependencies [deb538f]
834
+ - Updated dependencies [5b89711]
835
+ - Updated dependencies [0c8a22f]
836
+ - Updated dependencies [763931e]
837
+ - Updated dependencies [de9af8a]
838
+ - Updated dependencies [c4df271]
839
+ - Updated dependencies [a41ba5c]
840
+ - Updated dependencies [189854c]
841
+ - Updated dependencies [0e3a226]
842
+ - Updated dependencies [1d4756e]
843
+ - Updated dependencies [720c5ad]
844
+ - Updated dependencies [a8d1e24]
845
+ - Updated dependencies [41642b0]
846
+ - Updated dependencies [4cca74c]
847
+ - Updated dependencies [88ef03e]
848
+ - Updated dependencies [9e2caf3]
849
+ - Updated dependencies [81ce41a]
850
+ - Updated dependencies [85e1e4e]
851
+ - Updated dependencies [dac6a08]
852
+ - Updated dependencies [394b7a1]
853
+ - Updated dependencies [677b591]
854
+ - Updated dependencies [d77d1b7]
855
+ - Updated dependencies [5b79a34]
856
+ - Updated dependencies [c757854]
857
+ - Updated dependencies [0045682]
858
+ - Updated dependencies [2a5f04a]
859
+ - Updated dependencies [4f740b0]
860
+ - Updated dependencies [67452d1]
861
+ - Updated dependencies [0fc6219]
862
+ - Updated dependencies [605e190]
863
+ - Updated dependencies [c6c59f1]
864
+ - Updated dependencies [b0e78a8]
865
+ - Updated dependencies [f31cc8d]
866
+ - Updated dependencies [f343dc4]
867
+ - Updated dependencies [8269e32]
868
+ - Updated dependencies [74f7339]
869
+ - Updated dependencies [a6c35a2]
870
+ - Updated dependencies [c2f1002]
871
+ - Updated dependencies [f163028]
872
+ - Updated dependencies [f07808c]
873
+ - Updated dependencies [7ffc3d3]
874
+ - Updated dependencies [88346ba]
875
+ - Updated dependencies [4631592]
876
+ - Updated dependencies [32ff033]
877
+ - Updated dependencies [5ac93d4]
878
+ - Updated dependencies [93f267f]
879
+ - Updated dependencies [0024abf]
880
+ - Updated dependencies [acbf364]
881
+ - Updated dependencies [7687f7b]
882
+ - Updated dependencies [1659072]
883
+ - Updated dependencies [abceb0d]
884
+ - Updated dependencies [0c302a7]
885
+ - Updated dependencies [6633337]
886
+ - Updated dependencies [f00d8d4]
887
+ - Updated dependencies [503be86]
888
+ - Updated dependencies [cde1975]
889
+ - Updated dependencies [0bc685a]
890
+ - Updated dependencies [11949fc]
891
+ - Updated dependencies [b098b0e]
892
+ - Updated dependencies [4d00b13]
893
+ - Updated dependencies [57bab76]
894
+ - Updated dependencies [b90086a]
895
+ - Updated dependencies [b95577a]
896
+ - Updated dependencies [83c161f]
897
+ - Updated dependencies [d8c4957]
898
+ - Updated dependencies [f24cb83]
899
+ - Updated dependencies [5dbbb92]
900
+ - Updated dependencies [69f1dfd]
901
+ - @objectstack/spec@17.0.0-rc.0
902
+
903
+ ## 16.1.0
904
+
905
+ ### Patch Changes
906
+
907
+ - Updated dependencies [9e45b63]
908
+ - @objectstack/spec@16.1.0
909
+
910
+ ## 16.0.0
911
+
912
+ ### Minor Changes
913
+
914
+ - 83e8f7d: feat(mcp): decouple the stdio auto-start switch from the HTTP surface + surface the MCP endpoint on `os dev` boot (#3167)
915
+
916
+ The MCP HTTP surface (`/api/v1/mcp`) and the long-lived stdio transport used to
917
+ share one env var: `OS_MCP_SERVER_ENABLED=true` turned the HTTP surface on **and**
918
+ silently auto-started the stdio transport — which bridges the raw metadata service
919
+
920
+ - data engine with no per-request principal (unscoped). An operator setting it to
921
+ "make sure MCP is on" got an unscoped transport as a side effect.
922
+
923
+ * **`@objectstack/types`** — new `resolveMcpStdioAutoStart()`. Stdio auto-start is
924
+ now its own switch, `OS_MCP_STDIO_ENABLED` (default off); `OS_MCP_SERVER_ENABLED`
925
+ governs only the HTTP surface. The legacy `OS_MCP_SERVER_ENABLED=true` trigger
926
+ still starts stdio for one release, flagged as deprecated. `=false` is unchanged
927
+ (it only ever gated HTTP).
928
+ * **`@objectstack/mcp`** — `MCPServerPlugin.start()` gates stdio on the new switch
929
+ and logs a one-time deprecation warning when started via the legacy alias.
930
+ * **`@objectstack/cli`** — `os dev` now prints the MCP endpoint, the agent-skill
931
+ URL, and a ready-to-paste `claude mcp add` command on boot (gated on the HTTP
932
+ surface being on), so the "an agent operates the app it's building" loop is
933
+ discoverable at dev time.
934
+ * **`create-objectstack`** — the blank scaffold README documents that the app is
935
+ itself an MCP server (the serve side), distinct from the consume-side connector.
936
+
937
+ - 92f5f19: feat(runtime): sandbox budget is script CPU-time, not wall clock (ADR-0102 D1, #3295)
938
+
939
+ The QuickJS sandbox now meters each hook/action invocation against how much
940
+ **VM-active (CPU) time** the body burns, not wall clock. Idle host-await time and
941
+ a nested hook's own execution (which runs host-side while the caller's VM is
942
+ parked) are no longer charged to the caller — so a slow/loaded host or a deep
943
+ nested-write chain can't trip the budget while a script is merely waiting (the
944
+ root cause of the #3259 CI flake). A separate, generous **wall-clock ceiling**
945
+ (default 30s, `max(ceiling, cpuBudget)`) remains as the backstop for a body stuck
946
+ on a host call that never settles.
947
+
948
+ What changes for consumers (behaviour, not API signatures):
949
+
950
+ - **Meaning of the timeout knobs.** `body.timeoutMs`, the `hookTimeoutMs` /
951
+ `actionTimeoutMs` runner options, and `OS_SANDBOX_HOOK_TIMEOUT_MS` /
952
+ `OS_SANDBOX_ACTION_TIMEOUT_MS` keep their **names, defaults (250ms / 5000ms),
953
+ and precedence** — but now bound CPU-time instead of wall-clock. In practice
954
+ this only _loosens_ legitimate slow/nested work; a runaway synchronous script
955
+ is still cut at the same budget.
956
+ - **Error messages.** `exceeded timeout of Nms` → either `exceeded CPU budget of
957
+ Nms` (script burned its CPU budget) or `exceeded wall-clock ceiling of Nms
958
+ while awaiting host calls` (stuck on a never-settling host call). Update any
959
+ code/tests matching the old string.
960
+
961
+ New knobs (additive):
962
+
963
+ - `QuickJSScriptRunner` option `wallCeilingMs` and env `OS_SANDBOX_WALL_CEILING_MS`
964
+ — tune the wall ceiling (explicit option › env › 30s).
965
+ - `resolveSandboxTimeoutMs` (`@objectstack/types`) gains a `'wallCeiling'` kind.
966
+
967
+ Also fixes a latent init bug in the new accounting where the interrupt handler
968
+ could fire during `installCtx` and corrupt ctx marshalling. The nested-write
969
+ integration suites now run at the stock 250ms budget (previously forced to 10s),
970
+ which is itself the regression guard for the nested-charging fix.
971
+
972
+ - 32899e6: feat(runtime): env-overridable sandbox hook/action timeout default (#3259)
973
+
974
+ The QuickJS sandbox enforces a wall-clock deadline on every hook/action
975
+ invocation (250ms hooks / 5000ms actions). Each invocation compiles a fresh
976
+ WASM module, and a nested hook compiles ANOTHER one inside the parent's budget,
977
+ so on a heavily loaded or slow host — an oversubscribed CI runner, constrained
978
+ production hardware — that fixed VM-creation cost alone can trip the hook
979
+ default even while the VM is still making progress. On CI this surfaced as an
980
+ intermittent `hook '…' exceeded timeout of 250ms` flake on PRs that never
981
+ touched the sandbox path.
982
+
983
+ The per-invocation timeout DEFAULT is now resolvable from the environment via
984
+ `resolveSandboxTimeoutMs` (`@objectstack/types`), which `QuickJSScriptRunner`
985
+ consults, so an operator can raise the floor once, deployment-wide, instead of
986
+ re-tuning every call site:
987
+
988
+ - `OS_SANDBOX_HOOK_TIMEOUT_MS` — default hook budget (ms)
989
+ - `OS_SANDBOX_ACTION_TIMEOUT_MS` — default action budget (ms)
990
+
991
+ Precedence is unchanged: an explicit `hookTimeoutMs` / `actionTimeoutMs` passed
992
+ to the runner still wins over the env var, and a body's own declared `timeoutMs`
993
+ still wins over the resolved default (the smaller of the explicit values). Only
994
+ a positive integer is honored; unset / empty / non-numeric / non-positive keeps
995
+ the built-in 250ms / 5000ms defaults, so behaviour is byte-for-byte unchanged
996
+ when the vars are absent — production is unaffected unless it opts in.
997
+
998
+ CI's Test Core now sets `OS_SANDBOX_HOOK_TIMEOUT_MS=10000` so the shared-runner
999
+ load flake can't recur; genuine hangs stay bounded by each test's own timeout.
1000
+
1001
+ ### Patch Changes
1002
+
1003
+ - Updated dependencies [f972574]
1004
+ - Updated dependencies [6289ec3]
1005
+ - Updated dependencies [22013aa]
1006
+ - Updated dependencies [3ad3dd5]
1007
+ - Updated dependencies [8efa395]
1008
+ - Updated dependencies [3a18b60]
1009
+ - Updated dependencies [a8aa34c]
1010
+ - Updated dependencies [a3823b2]
1011
+ - Updated dependencies [43a3efb]
1012
+ - Updated dependencies [524696a]
1013
+ - Updated dependencies [bfa3c3f]
1014
+ - Updated dependencies [5e3301d]
1015
+ - Updated dependencies [46e876c]
1016
+ - Updated dependencies [158aa14]
1017
+ - Updated dependencies [62a2117]
1018
+ - Updated dependencies [d2723e2]
1019
+ - Updated dependencies [fefcd54]
1020
+ - Updated dependencies [beaf2de]
1021
+ - Updated dependencies [369eb6e]
1022
+ - Updated dependencies [06ff734]
1023
+ - Updated dependencies [b659111]
1024
+ - Updated dependencies [5754a23]
1025
+ - Updated dependencies [6c270a6]
1026
+ - Updated dependencies [668dd17]
1027
+ - Updated dependencies [8abf133]
1028
+ - Updated dependencies [e0859b1]
1029
+ - Updated dependencies [04ecd4e]
1030
+ - Updated dependencies [4d5a892]
1031
+ - Updated dependencies [16cebeb]
1032
+ - Updated dependencies [86d30af]
1033
+ - Updated dependencies [8923843]
1034
+ - Updated dependencies [a2795f6]
1035
+ - Updated dependencies [f16b492]
1036
+ - Updated dependencies [4b6fde8]
1037
+ - Updated dependencies [2018df9]
1038
+ - Updated dependencies [fc5a3a2]
1039
+ - Updated dependencies [8ff9210]
1040
+ - @objectstack/spec@16.0.0
1041
+
1042
+ ## 16.0.0-rc.1
1043
+
1044
+ ### Patch Changes
1045
+
1046
+ - Updated dependencies [6289ec3]
1047
+ - Updated dependencies [8efa395]
1048
+ - Updated dependencies [bfa3c3f]
1049
+ - Updated dependencies [62a2117]
1050
+ - Updated dependencies [06ff734]
1051
+ - @objectstack/spec@16.0.0-rc.1
1052
+
1053
+ ## 16.0.0-rc.0
1054
+
1055
+ ### Minor Changes
1056
+
1057
+ - 83e8f7d: feat(mcp): decouple the stdio auto-start switch from the HTTP surface + surface the MCP endpoint on `os dev` boot (#3167)
1058
+
1059
+ The MCP HTTP surface (`/api/v1/mcp`) and the long-lived stdio transport used to
1060
+ share one env var: `OS_MCP_SERVER_ENABLED=true` turned the HTTP surface on **and**
1061
+ silently auto-started the stdio transport — which bridges the raw metadata service
1062
+
1063
+ - data engine with no per-request principal (unscoped). An operator setting it to
1064
+ "make sure MCP is on" got an unscoped transport as a side effect.
1065
+
1066
+ * **`@objectstack/types`** — new `resolveMcpStdioAutoStart()`. Stdio auto-start is
1067
+ now its own switch, `OS_MCP_STDIO_ENABLED` (default off); `OS_MCP_SERVER_ENABLED`
1068
+ governs only the HTTP surface. The legacy `OS_MCP_SERVER_ENABLED=true` trigger
1069
+ still starts stdio for one release, flagged as deprecated. `=false` is unchanged
1070
+ (it only ever gated HTTP).
1071
+ * **`@objectstack/mcp`** — `MCPServerPlugin.start()` gates stdio on the new switch
1072
+ and logs a one-time deprecation warning when started via the legacy alias.
1073
+ * **`@objectstack/cli`** — `os dev` now prints the MCP endpoint, the agent-skill
1074
+ URL, and a ready-to-paste `claude mcp add` command on boot (gated on the HTTP
1075
+ surface being on), so the "an agent operates the app it's building" loop is
1076
+ discoverable at dev time.
1077
+ * **`create-objectstack`** — the blank scaffold README documents that the app is
1078
+ itself an MCP server (the serve side), distinct from the consume-side connector.
1079
+
1080
+ - 92f5f19: feat(runtime): sandbox budget is script CPU-time, not wall clock (ADR-0102 D1, #3295)
1081
+
1082
+ The QuickJS sandbox now meters each hook/action invocation against how much
1083
+ **VM-active (CPU) time** the body burns, not wall clock. Idle host-await time and
1084
+ a nested hook's own execution (which runs host-side while the caller's VM is
1085
+ parked) are no longer charged to the caller — so a slow/loaded host or a deep
1086
+ nested-write chain can't trip the budget while a script is merely waiting (the
1087
+ root cause of the #3259 CI flake). A separate, generous **wall-clock ceiling**
1088
+ (default 30s, `max(ceiling, cpuBudget)`) remains as the backstop for a body stuck
1089
+ on a host call that never settles.
1090
+
1091
+ What changes for consumers (behaviour, not API signatures):
1092
+
1093
+ - **Meaning of the timeout knobs.** `body.timeoutMs`, the `hookTimeoutMs` /
1094
+ `actionTimeoutMs` runner options, and `OS_SANDBOX_HOOK_TIMEOUT_MS` /
1095
+ `OS_SANDBOX_ACTION_TIMEOUT_MS` keep their **names, defaults (250ms / 5000ms),
1096
+ and precedence** — but now bound CPU-time instead of wall-clock. In practice
1097
+ this only _loosens_ legitimate slow/nested work; a runaway synchronous script
1098
+ is still cut at the same budget.
1099
+ - **Error messages.** `exceeded timeout of Nms` → either `exceeded CPU budget of
1100
+ Nms` (script burned its CPU budget) or `exceeded wall-clock ceiling of Nms
1101
+ while awaiting host calls` (stuck on a never-settling host call). Update any
1102
+ code/tests matching the old string.
1103
+
1104
+ New knobs (additive):
1105
+
1106
+ - `QuickJSScriptRunner` option `wallCeilingMs` and env `OS_SANDBOX_WALL_CEILING_MS`
1107
+ — tune the wall ceiling (explicit option › env › 30s).
1108
+ - `resolveSandboxTimeoutMs` (`@objectstack/types`) gains a `'wallCeiling'` kind.
1109
+
1110
+ Also fixes a latent init bug in the new accounting where the interrupt handler
1111
+ could fire during `installCtx` and corrupt ctx marshalling. The nested-write
1112
+ integration suites now run at the stock 250ms budget (previously forced to 10s),
1113
+ which is itself the regression guard for the nested-charging fix.
1114
+
1115
+ - 32899e6: feat(runtime): env-overridable sandbox hook/action timeout default (#3259)
1116
+
1117
+ The QuickJS sandbox enforces a wall-clock deadline on every hook/action
1118
+ invocation (250ms hooks / 5000ms actions). Each invocation compiles a fresh
1119
+ WASM module, and a nested hook compiles ANOTHER one inside the parent's budget,
1120
+ so on a heavily loaded or slow host — an oversubscribed CI runner, constrained
1121
+ production hardware — that fixed VM-creation cost alone can trip the hook
1122
+ default even while the VM is still making progress. On CI this surfaced as an
1123
+ intermittent `hook '…' exceeded timeout of 250ms` flake on PRs that never
1124
+ touched the sandbox path.
1125
+
1126
+ The per-invocation timeout DEFAULT is now resolvable from the environment via
1127
+ `resolveSandboxTimeoutMs` (`@objectstack/types`), which `QuickJSScriptRunner`
1128
+ consults, so an operator can raise the floor once, deployment-wide, instead of
1129
+ re-tuning every call site:
1130
+
1131
+ - `OS_SANDBOX_HOOK_TIMEOUT_MS` — default hook budget (ms)
1132
+ - `OS_SANDBOX_ACTION_TIMEOUT_MS` — default action budget (ms)
1133
+
1134
+ Precedence is unchanged: an explicit `hookTimeoutMs` / `actionTimeoutMs` passed
1135
+ to the runner still wins over the env var, and a body's own declared `timeoutMs`
1136
+ still wins over the resolved default (the smaller of the explicit values). Only
1137
+ a positive integer is honored; unset / empty / non-numeric / non-positive keeps
1138
+ the built-in 250ms / 5000ms defaults, so behaviour is byte-for-byte unchanged
1139
+ when the vars are absent — production is unaffected unless it opts in.
1140
+
1141
+ CI's Test Core now sets `OS_SANDBOX_HOOK_TIMEOUT_MS=10000` so the shared-runner
1142
+ load flake can't recur; genuine hangs stay bounded by each test's own timeout.
1143
+
1144
+ ### Patch Changes
1145
+
1146
+ - Updated dependencies [f972574]
1147
+ - Updated dependencies [22013aa]
1148
+ - Updated dependencies [3ad3dd5]
1149
+ - Updated dependencies [3a18b60]
1150
+ - Updated dependencies [a8aa34c]
1151
+ - Updated dependencies [a3823b2]
1152
+ - Updated dependencies [43a3efb]
1153
+ - Updated dependencies [524696a]
1154
+ - Updated dependencies [5e3301d]
1155
+ - Updated dependencies [46e876c]
1156
+ - Updated dependencies [158aa14]
1157
+ - Updated dependencies [d2723e2]
1158
+ - Updated dependencies [fefcd54]
1159
+ - Updated dependencies [beaf2de]
1160
+ - Updated dependencies [369eb6e]
1161
+ - Updated dependencies [b659111]
1162
+ - Updated dependencies [5754a23]
1163
+ - Updated dependencies [6c270a6]
1164
+ - Updated dependencies [668dd17]
1165
+ - Updated dependencies [8abf133]
1166
+ - Updated dependencies [e0859b1]
1167
+ - Updated dependencies [04ecd4e]
1168
+ - Updated dependencies [4d5a892]
1169
+ - Updated dependencies [16cebeb]
1170
+ - Updated dependencies [86d30af]
1171
+ - Updated dependencies [8923843]
1172
+ - Updated dependencies [a2795f6]
1173
+ - Updated dependencies [f16b492]
1174
+ - Updated dependencies [4b6fde8]
1175
+ - Updated dependencies [2018df9]
1176
+ - Updated dependencies [fc5a3a2]
1177
+ - @objectstack/spec@16.0.0-rc.0
1178
+
1179
+ ## 15.1.1
1180
+
1181
+ ### Patch Changes
1182
+
1183
+ - @objectstack/spec@15.1.1
1184
+
1185
+ ## 15.1.0
1186
+
1187
+ ### Minor Changes
1188
+
1189
+ - f531a26: Generic pinyin search recall (#2486, ADR-0098): a locale-gated
1190
+ `OS_SEARCH_PINYIN_ENABLED` switch (auto-on when the stack configures any
1191
+ `zh-*` locale) provisions a hidden `__search` companion column for each
1192
+ object's display/name field at compile time, the new
1193
+ `@objectstack/plugin-pinyin-search` fills it with full pinyin + initials
1194
+ ("张伟" → "zhangwei zw") on before-save (plus boot backfill and a
1195
+ `rebuildSearchCompanion` reconcile entry), and `$search` ORs the column in at
1196
+ query time — so lookup pickers, list quick-search and ⌘K transparently match
1197
+ `zhangwei` / `zw` against CJK names. Purely additive: `resolveSearchFields`,
1198
+ `searchableFields`, drivers and non-Chinese deployments are untouched; FLS
1199
+ restricted / secret / PII fields never feed the companion.
1200
+
1201
+ ### Patch Changes
1202
+
1203
+ - Updated dependencies [f531a26]
1204
+ - Updated dependencies [f531a26]
1205
+ - Updated dependencies [f531a26]
1206
+ - Updated dependencies [f531a26]
1207
+ - Updated dependencies [f531a26]
1208
+ - Updated dependencies [f531a26]
1209
+ - Updated dependencies [3fe9df1]
1210
+ - Updated dependencies [f531a26]
1211
+ - Updated dependencies [f531a26]
1212
+ - Updated dependencies [f531a26]
1213
+ - Updated dependencies [f531a26]
1214
+ - Updated dependencies [f531a26]
1215
+ - Updated dependencies [f531a26]
1216
+ - Updated dependencies [f531a26]
1217
+ - Updated dependencies [f531a26]
1218
+ - Updated dependencies [f531a26]
1219
+ - Updated dependencies [f531a26]
1220
+ - Updated dependencies [f531a26]
1221
+ - Updated dependencies [4109153]
1222
+ - Updated dependencies [f531a26]
1223
+ - Updated dependencies [f531a26]
1224
+ - Updated dependencies [f531a26]
1225
+ - Updated dependencies [f531a26]
1226
+ - Updated dependencies [f531a26]
1227
+ - Updated dependencies [f531a26]
1228
+ - Updated dependencies [627f225]
1229
+ - Updated dependencies [f531a26]
1230
+ - Updated dependencies [f531a26]
1231
+ - Updated dependencies [f531a26]
1232
+ - @objectstack/spec@15.1.0
1233
+
1234
+ ## 15.0.0
1235
+
1236
+ ### Patch Changes
1237
+
1238
+ - Updated dependencies [28b7c28]
1239
+ - Updated dependencies [13749ec]
1240
+ - Updated dependencies [e62c233]
1241
+ - Updated dependencies [ed61c9b]
1242
+ - Updated dependencies [31d04d4]
1243
+ - @objectstack/spec@15.0.0
1244
+
1245
+ ## 14.8.0
1246
+
1247
+ ### Patch Changes
1248
+
1249
+ - Updated dependencies [16b4bf6]
1250
+ - Updated dependencies [16b4bf6]
1251
+ - Updated dependencies [10e8983]
1252
+ - Updated dependencies [607aaf4]
1253
+ - Updated dependencies [bb71321]
1254
+ - @objectstack/spec@14.8.0
1255
+
1256
+ ## 14.7.0
1257
+
1258
+ ### Minor Changes
1259
+
1260
+ - 824a395: Tenancy mode as a first-class capability + a single owner for the user→membership
1261
+ lifecycle (ADR-0093, Phases 1–3).
1262
+
1263
+ **Tenancy service (`@objectstack/types`, `@objectstack/plugin-auth`).** plugin-auth
1264
+ registers a `tenancy` service — the single source of truth for tenancy mode
1265
+ (`mode`, `isolationActive`, `requested`, `degraded`, `defaultOrgId()`). It derives
1266
+ `isolationActive` from the presence of the `org-scoping` service, so the
1267
+ enterprise `@objectstack/organizations` package lights it up with no change.
1268
+ SecurityPlugin's RLS-strip gate and `/auth/config` (`features.multiOrgEnabled`,
1269
+ new `features.degradedTenancy`) now consume it instead of re-deriving the fact.
1270
+
1271
+ **Fail-fast on degraded tenancy (`@objectstack/cli`, ADR-0093 D5).**
1272
+ `OS_MULTI_ORG_ENABLED=true` without a working `@objectstack/organizations` now
1273
+ **refuses to boot** — a deployment that requested tenant isolation must not serve
1274
+ traffic without it (tenant RLS would be silently stripped). Escape hatch:
1275
+ `OS_ALLOW_DEGRADED_TENANCY=1` boots in an explicitly branded degraded state
1276
+ (`features.degradedTenancy`). **This may halt upgrades for deployments that were
1277
+ silently degraded — intentionally; install the enterprise package or set the
1278
+ escape hatch.**
1279
+
1280
+ **Membership reconciler (`@objectstack/plugin-auth`, ADR-0093 D1–D3, D6).** A
1281
+ single reconciler composed into better-auth's `user.create.after` hook owns the
1282
+ "every new user gets a membership" invariant across all creation paths (signup,
1283
+ admin create-user, import, SSO JIT). It yields to any existing membership (host
1284
+ hooks win), honors a new `membershipPolicy: 'auto' | 'invite-only'` auth option
1285
+ (default `auto`), and binds only to an unambiguous target org (single-org default;
1286
+ multi-org binds nothing). A bounded, idempotent `kernel:ready` backfill covers
1287
+ pre-existing member-less users in single-org/auto deployments
1288
+ (`OS_SKIP_MEMBERSHIP_BACKFILL=1` to opt out). The endpoint-level create-user bind
1289
+ from #2882 now delegates to this shared reconciler.
1290
+
1291
+ New env vars: `OS_ALLOW_DEGRADED_TENANCY`, `OS_SKIP_MEMBERSHIP_BACKFILL`. New docs:
1292
+ Deployment → Tenancy Modes & Membership.
1293
+
1294
+ ### Patch Changes
1295
+
1296
+ - Updated dependencies [d6a72eb]
1297
+ - @objectstack/spec@14.7.0
1298
+
1299
+ ## 14.6.0
1300
+
1301
+ ### Patch Changes
1302
+
1303
+ - Updated dependencies [609cb13]
1304
+ - Updated dependencies [ce6d151]
1305
+ - @objectstack/spec@14.6.0
1306
+
1307
+ ## 14.5.0
1308
+
1309
+ ### Patch Changes
1310
+
1311
+ - Updated dependencies [526805e]
1312
+ - Updated dependencies [d79ca07]
1313
+ - Updated dependencies [33ebd34]
1314
+ - Updated dependencies [c044f08]
1315
+ - Updated dependencies [01274eb]
1316
+ - @objectstack/spec@14.5.0
1317
+
1318
+ ## 14.4.0
1319
+
1320
+ ### Patch Changes
1321
+
1322
+ - Updated dependencies [7953832]
1323
+ - Updated dependencies [82e745e]
1324
+ - Updated dependencies [f3035bd]
1325
+ - Updated dependencies [82c0d94]
1326
+ - Updated dependencies [7449476]
1327
+ - @objectstack/spec@14.4.0
1328
+
1329
+ ## 14.3.0
1330
+
1331
+ ### Patch Changes
1332
+
1333
+ - Updated dependencies [2a71f48]
1334
+ - Updated dependencies [02f6af4]
1335
+ - Updated dependencies [c1064f1]
1336
+ - @objectstack/spec@14.3.0
1337
+
1338
+ ## 14.2.0
1339
+
1340
+ ### Patch Changes
1341
+
1342
+ - Updated dependencies [ac8f029]
1343
+ - Updated dependencies [4ab9958]
1344
+ - @objectstack/spec@14.2.0
1345
+
1346
+ ## 14.1.0
1347
+
1348
+ ### Patch Changes
1349
+
1350
+ - Updated dependencies [5a8465f]
1351
+ - Updated dependencies [7f8620b]
1352
+ - Updated dependencies [82ba3a6]
1353
+ - @objectstack/spec@14.1.0
1354
+
1355
+ ## 14.0.0
1356
+
1357
+ ### Patch Changes
1358
+
1359
+ - Updated dependencies [0a8e685]
1360
+ - Updated dependencies [afa8115]
1361
+ - Updated dependencies [80f12ca]
1362
+ - Updated dependencies [e2fa074]
1363
+ - Updated dependencies [23c8668]
1364
+ - Updated dependencies [29f017d]
1365
+ - Updated dependencies [216fa9a]
1366
+ - Updated dependencies [6c22b12]
1367
+ - @objectstack/spec@14.0.0
1368
+
1369
+ ## 13.0.0
1370
+
1371
+ ### Minor Changes
1372
+
1373
+ - 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698)
1374
+
1375
+ `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the
1376
+ OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a
1377
+ fresh deployment is connectable by any MCP client with zero configuration.
1378
+ Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`.
1379
+
1380
+ - New single decision point `isMcpServerEnabled()` in `@objectstack/types`
1381
+ (default on; explicit `false`/`0`/`off`/`no` disables). The runtime
1382
+ dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST
1383
+ `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults
1384
+ all delegate to it — the served route, the advertised route, and the
1385
+ authorization track can never disagree.
1386
+ - The env var is now effectively tri-state: unset → HTTP surface on;
1387
+ explicit `true` → additionally auto-start the long-lived **stdio** transport
1388
+ at boot (unchanged, still opt-in — a default must not claim the process's
1389
+ stdin/stdout); explicit `false` → everything off, fail-closed (404, no
1390
+ metadata, no DCR).
1391
+ - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin
1392
+ the OAuth track stays dark and the default-on surface remains API-key-only.
1393
+
1394
+ ### Patch Changes
1395
+
1396
+ - Updated dependencies [6d83431]
1397
+ - Updated dependencies [01917c2]
1398
+ - Updated dependencies [b271691]
1399
+ - Updated dependencies [a5a1e41]
1400
+ - Updated dependencies [466adf6]
1401
+ - Updated dependencies [5be00c3]
1402
+ - Updated dependencies [466adf6]
1403
+ - Updated dependencies [2bee609]
1404
+ - Updated dependencies [fc7e7f7]
1405
+ - @objectstack/spec@13.0.0
1406
+
1407
+ ## 12.6.0
1408
+
1409
+ ### Patch Changes
1410
+
1411
+ - Updated dependencies [6cebf22]
1412
+ - @objectstack/spec@12.6.0
1413
+
1414
+ ## 12.5.0
1415
+
1416
+ ### Patch Changes
1417
+
1418
+ - Updated dependencies [8b3d363]
1419
+ - @objectstack/spec@12.5.0
1420
+
1421
+ ## 12.4.0
1422
+
1423
+ ### Patch Changes
1424
+
1425
+ - Updated dependencies [60dc3ba]
1426
+ - @objectstack/spec@12.4.0
1427
+
1428
+ ## 12.3.0
1429
+
1430
+ ### Patch Changes
1431
+
1432
+ - Updated dependencies [e7eceec]
1433
+ - @objectstack/spec@12.3.0
1434
+
1435
+ ## 12.2.0
1436
+
1437
+ ### Patch Changes
1438
+
1439
+ - Updated dependencies [fce8ff4]
1440
+ - Updated dependencies [3962023]
1441
+ - Updated dependencies [2bb193d]
1442
+ - Updated dependencies [0426d27]
1443
+ - Updated dependencies [da807f7]
1444
+ - @objectstack/spec@12.2.0
1445
+
1446
+ ## 12.1.0
1447
+
1448
+ ### Patch Changes
1449
+
1450
+ - Updated dependencies [93e6d02]
1451
+ - @objectstack/spec@12.1.0
1452
+
1453
+ ## 12.0.0
1454
+
1455
+ ### Patch Changes
1456
+
1457
+ - Updated dependencies [a8df396]
1458
+ - Updated dependencies [e695fe0]
1459
+ - Updated dependencies [7c09621]
1460
+ - Updated dependencies [7709db4]
1461
+ - Updated dependencies [2082109]
1462
+ - Updated dependencies [7c09621]
1463
+ - Updated dependencies [9860de4]
1464
+ - Updated dependencies [069c205]
1465
+ - @objectstack/spec@12.0.0
1466
+
1467
+ ## 11.10.0
1468
+
1469
+ ### Patch Changes
1470
+
1471
+ - Updated dependencies [6a9397e]
1472
+ - Updated dependencies [c0efe5d]
1473
+ - @objectstack/spec@11.10.0
1474
+
1475
+ ## 11.9.0
1476
+
1477
+ ### Patch Changes
1478
+
1479
+ - Updated dependencies [d3595d9]
1480
+ - @objectstack/spec@11.9.0
1481
+
1482
+ ## 11.8.0
1483
+
1484
+ ### Patch Changes
1485
+
1486
+ - @objectstack/spec@11.8.0
1487
+
1488
+ ## 11.7.0
1489
+
1490
+ ### Patch Changes
1491
+
1492
+ - Updated dependencies [5178906]
1493
+ - @objectstack/spec@11.7.0
1494
+
1495
+ ## 11.6.0
1496
+
1497
+ ### Patch Changes
1498
+
1499
+ - @objectstack/spec@11.6.0
1500
+
1501
+ ## 11.5.0
1502
+
1503
+ ### Patch Changes
1504
+
1505
+ - Updated dependencies [6ee4f04]
1506
+ - Updated dependencies [c1e3a65]
1507
+ - @objectstack/spec@11.5.0
1508
+
1509
+ ## 11.4.0
1510
+
1511
+ ### Patch Changes
1512
+
1513
+ - Updated dependencies [5821c51]
1514
+ - Updated dependencies [a0fce3f]
1515
+ - @objectstack/spec@11.4.0
1516
+
1517
+ ## 11.3.0
1518
+
1519
+ ### Patch Changes
1520
+
1521
+ - Updated dependencies [58e8e31]
1522
+ - Updated dependencies [b4a5df0]
1523
+ - @objectstack/spec@11.3.0
1524
+
1525
+ ## 11.2.0
1526
+
1527
+ ### Patch Changes
1528
+
1529
+ - Updated dependencies [d0f4b13]
1530
+ - Updated dependencies [302bdab]
1531
+ - @objectstack/spec@11.2.0
1532
+
1533
+ ## 11.1.0
1534
+
1535
+ ### Minor Changes
1536
+
1537
+ - fdb41c0: Remove ObjectStack's own legacy env-var aliases (11.0); ecosystem-standard names stay.
1538
+
1539
+ The framework's renamed env vars no longer accept their old ObjectStack names —
1540
+ rename them:
1541
+
1542
+ | removed legacy name | use |
1543
+ | ----------------------------------- | ---------------------- |
1544
+ | `OS_MULTI_TENANT` | `OS_MULTI_ORG_ENABLED` |
1545
+ | `OBJECTSTACK_METADATA_WRITABLE` | `OS_METADATA_WRITABLE` |
1546
+ | `OS_AUTH_BASE_URL`, `AUTH_BASE_URL` | `OS_AUTH_URL` |
1547
+
1548
+ **Ecosystem-standard names are NOT removed** — they remain accepted (and no longer
1549
+ emit a deprecation warning, since they are permanent conventions, not legacy):
1550
+ `DATABASE_URL`, `AUTH_SECRET`, `BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`, `PORT`,
1551
+ `CORS_*`, `LOG_LEVEL`, `ROOT_DOMAIN`, `MCP_SERVER_*`. The generic
1552
+ `readEnvWithDeprecation` helper is unchanged.
1553
+
1554
+ ### Patch Changes
1555
+
1556
+ - Updated dependencies [ecf193f]
1557
+ - Updated dependencies [51bec81]
1558
+ - Updated dependencies [3e593a7]
1559
+ - Updated dependencies [63d5403]
1560
+ - @objectstack/spec@11.1.0
1561
+
1562
+ ## 11.0.0
1563
+
1564
+ ### Patch Changes
1565
+
1566
+ - 795b6d1: refactor: single-source the multi-org (`OS_MULTI_ORG_ENABLED`) flag resolution
1567
+
1568
+ "Is this deployment multi-org?" was resolved in 10 places across 8 packages
1569
+ with three subtly different inline expressions:
1570
+
1571
+ - the canonical `String(readEnvWithDeprecation('OS_MULTI_ORG_ENABLED',
1572
+ 'OS_MULTI_TENANT') ?? 'false').toLowerCase() !== 'false'` (objectql registry,
1573
+ plugin-dev, runtime app-plugin, cli serve/verify, cloud-connection),
1574
+ - a redundant `env.OS_MULTI_ORG_ENABLED !== undefined ? … : …` variant in
1575
+ plugin-auth (auth-manager `/auth/config` features + `beforeCreateOrganization`
1576
+ guard),
1577
+ - and a bare `process.env.OS_MULTI_ORG_ENABLED ?? process.env.OS_MULTI_TENANT`
1578
+ read in the SQL driver's `isMultiTenantMode()` — which skipped the
1579
+ `OS_MULTI_TENANT` deprecation warning every other site emits.
1580
+
1581
+ Because the SQL driver computed the mode independently of the auth/security
1582
+ layer, the driver's tenant-audit gate and the rest of the system could in
1583
+ principle disagree about whether tenant isolation is active.
1584
+
1585
+ Introduces `resolveMultiOrgEnabled()` in `@objectstack/types` (next to
1586
+ `readEnvWithDeprecation`, the natural leaf dependency) as the single source of
1587
+ truth, and routes all 10 sites through it. `@objectstack/driver-sql` gains a
1588
+ direct `@objectstack/types` dependency (previously it read `process.env`
1589
+ directly).
1590
+
1591
+ Behaviour is unchanged everywhere except the SQL driver, which now also emits
1592
+ the one-shot `OS_MULTI_TENANT`-is-deprecated warning — consistent with every
1593
+ other site. This mirrors the `resolveAuthzContext` single-source pattern in
1594
+ `@objectstack/core`. Follow-up (not in this change): a lint gate forbidding new
1595
+ inline reads of these env vars outside the helper.
1596
+
1597
+ - Updated dependencies [ab5718a]
1598
+ - Updated dependencies [4845c12]
1599
+ - Updated dependencies [c1a754a]
1600
+ - Updated dependencies [6fbe91f]
1601
+ - Updated dependencies [715d667]
1602
+ - Updated dependencies [5eef4cf]
1603
+ - Updated dependencies [72759e1]
1604
+ - Updated dependencies [6c4fbd9]
1605
+ - Updated dependencies [ef3ed67]
1606
+ - Updated dependencies [cd51229]
1607
+ - Updated dependencies [7697a0e]
1608
+ - Updated dependencies [e7e04f1]
1609
+ - Updated dependencies [cfd5ac4]
1610
+ - Updated dependencies [2be5c1f]
1611
+ - Updated dependencies [ad143ce]
1612
+ - Updated dependencies [5c4a8c8]
1613
+ - Updated dependencies [3afaeed]
1614
+ - Updated dependencies [8801c02]
1615
+ - Updated dependencies [3d04e06]
1616
+ - Updated dependencies [4a84c98]
1617
+ - Updated dependencies [d980f0d]
1618
+ - Updated dependencies [a658523]
1619
+ - Updated dependencies [82ff91c]
1620
+ - Updated dependencies [638f472]
1621
+ - @objectstack/spec@11.0.0
1622
+
1623
+ ## 10.3.0
1624
+
1625
+ ### Patch Changes
1626
+
1627
+ - @objectstack/spec@10.3.0
1628
+
1629
+ ## 10.2.0
1630
+
1631
+ ### Patch Changes
1632
+
1633
+ - Updated dependencies [b496498]
1634
+ - @objectstack/spec@10.2.0
1635
+
1636
+ ## 10.1.0
1637
+
1638
+ ### Patch Changes
1639
+
1640
+ - Updated dependencies [49da36e]
1641
+ - Updated dependencies [ac79f16]
1642
+ - @objectstack/spec@10.1.0
1643
+
1644
+ ## 10.0.0
1645
+
1646
+ ### Patch Changes
1647
+
1648
+ - Updated dependencies [d7ff626]
1649
+ - Updated dependencies [2a1b16b]
1650
+ - Updated dependencies [e16f2a8]
1651
+ - Updated dependencies [e411a82]
1652
+ - Updated dependencies [a581385]
1653
+ - Updated dependencies [220ce5b]
1654
+ - Updated dependencies [3efe334]
1655
+ - Updated dependencies [feead7e]
1656
+ - Updated dependencies [6ca20b3]
1657
+ - Updated dependencies [5f875fe]
1658
+ - Updated dependencies [b469950]
1659
+ - @objectstack/spec@10.0.0
1660
+
1661
+ ## 9.11.0
1662
+
1663
+ ### Patch Changes
1664
+
1665
+ - Updated dependencies [e7f6539]
1666
+ - Updated dependencies [2365d07]
1667
+ - Updated dependencies [6595b53]
1668
+ - Updated dependencies [fa8964d]
1669
+ - Updated dependencies [36138c7]
1670
+ - Updated dependencies [a8e4f3b]
1671
+ - Updated dependencies [4c213c2]
1672
+ - Updated dependencies [2afb612]
1673
+ - @objectstack/spec@9.11.0
1674
+
1675
+ ## 9.10.0
1676
+
1677
+ ### Patch Changes
1678
+
1679
+ - Updated dependencies [db02bd5]
1680
+ - Updated dependencies [641675d]
1681
+ - Updated dependencies [94e9040]
1682
+ - Updated dependencies [1f88fd9]
1683
+ - Updated dependencies [1f88fd9]
1684
+ - @objectstack/spec@9.10.0
1685
+
1686
+ ## 9.9.1
1687
+
1688
+ ### Patch Changes
1689
+
1690
+ - @objectstack/spec@9.9.1
1691
+
1692
+ ## 9.9.0
1693
+
1694
+ ### Patch Changes
1695
+
1696
+ - Updated dependencies [84249a4]
1697
+ - Updated dependencies [11af299]
1698
+ - Updated dependencies [d5774b5]
1699
+ - Updated dependencies [134043a]
1700
+ - Updated dependencies [90108e0]
1701
+ - Updated dependencies [9afeb2d]
1702
+ - Updated dependencies [6bec07e]
1703
+ - Updated dependencies [601cc11]
1704
+ - Updated dependencies [575448d]
1705
+ - @objectstack/spec@9.9.0
1706
+
1707
+ ## 9.8.0
1708
+
1709
+ ### Patch Changes
1710
+
1711
+ - Updated dependencies [97c55b3]
1712
+ - Updated dependencies [1b1f490]
1713
+ - @objectstack/spec@9.8.0
1714
+
1715
+ ## 9.7.0
1716
+
1717
+ ### Patch Changes
1718
+
1719
+ - @objectstack/spec@9.7.0
1720
+
1721
+ ## 9.6.0
1722
+
1723
+ ### Patch Changes
1724
+
1725
+ - Updated dependencies [d1e930a]
1726
+ - Updated dependencies [71578f2]
1727
+ - Updated dependencies [5e3a301]
1728
+ - Updated dependencies [5db2742]
1729
+ - @objectstack/spec@9.6.0
1730
+
1731
+ ## 9.5.1
1732
+
1733
+ ### Patch Changes
1734
+
1735
+ - Updated dependencies [ee72aae]
1736
+ - @objectstack/spec@9.5.1
1737
+
1738
+ ## 9.5.0
1739
+
1740
+ ### Patch Changes
1741
+
1742
+ - Updated dependencies [d08551c]
1743
+ - Updated dependencies [707aeed]
1744
+ - Updated dependencies [7a103d4]
1745
+ - Updated dependencies [4b01250]
1746
+ - @objectstack/spec@9.5.0
1747
+
1748
+ ## 9.4.0
1749
+
1750
+ ### Patch Changes
1751
+
1752
+ - Updated dependencies [060467a]
1753
+ - Updated dependencies [0856476]
1754
+ - Updated dependencies [b678d8c]
1755
+ - Updated dependencies [b678d8c]
1756
+ - Updated dependencies [b678d8c]
1757
+ - @objectstack/spec@9.4.0
1758
+
1759
+ ## 9.3.0
1760
+
1761
+ ### Patch Changes
1762
+
1763
+ - Updated dependencies [1ada658]
1764
+ - Updated dependencies [3219191]
1765
+ - Updated dependencies [290f631]
1766
+ - Updated dependencies [50b7b47]
1767
+ - Updated dependencies [f15d6f6]
1768
+ - Updated dependencies [f8684ea]
1769
+ - Updated dependencies [b4765be]
1770
+ - @objectstack/spec@9.3.0
1771
+
1772
+ ## 9.2.0
1773
+
1774
+ ### Patch Changes
1775
+
1776
+ - Updated dependencies [2f57b75]
1777
+ - Updated dependencies [2f57b75]
1778
+ - @objectstack/spec@9.2.0
1779
+
1780
+ ## 9.1.0
1781
+
1782
+ ### Patch Changes
1783
+
1784
+ - Updated dependencies [b9062c9]
1785
+ - @objectstack/spec@9.1.0
1786
+
1787
+ ## 9.0.1
1788
+
1789
+ ### Patch Changes
1790
+
1791
+ - Updated dependencies [1817845]
1792
+ - @objectstack/spec@9.0.1
1793
+
1794
+ ## 9.0.0
1795
+
1796
+ ### Patch Changes
1797
+
1798
+ - Updated dependencies [4c3f693]
1799
+ - Updated dependencies [0bf39f1]
1800
+ - Updated dependencies [f533f42]
1801
+ - Updated dependencies [1c83ee8]
1802
+ - @objectstack/spec@9.0.0
1803
+
1804
+ ## 8.0.1
1805
+
1806
+ ### Patch Changes
1807
+
1808
+ - @objectstack/spec@8.0.1
1809
+
1810
+ ## 8.0.0
1811
+
1812
+ ### Patch Changes
1813
+
1814
+ - Updated dependencies [a46c017]
1815
+ - Updated dependencies [b990b89]
1816
+ - Updated dependencies [99111ec]
1817
+ - Updated dependencies [d5a8161]
1818
+ - Updated dependencies [5cf1f1b]
1819
+ - Updated dependencies [9ef89d4]
1820
+ - Updated dependencies [3306d2f]
1821
+ - Updated dependencies [bc44195]
1822
+ - Updated dependencies [9e2e229]
1823
+ - @objectstack/spec@8.0.0
1824
+
1825
+ ## 7.9.0
1826
+
1827
+ ### Patch Changes
1828
+
1829
+ - @objectstack/spec@7.9.0
1830
+
1831
+ ## 7.8.0
1832
+
1833
+ ### Patch Changes
1834
+
1835
+ - Updated dependencies [06f2bbb]
1836
+ - Updated dependencies [36719db]
1837
+ - Updated dependencies [424ab26]
1838
+ - @objectstack/spec@7.8.0
1839
+
1840
+ ## 7.7.0
1841
+
1842
+ ### Patch Changes
1843
+
1844
+ - Updated dependencies [b391955]
1845
+ - Updated dependencies [f06b64e]
1846
+ - Updated dependencies [023bf93]
1847
+ - @objectstack/spec@7.7.0
1848
+
1849
+ ## 7.6.0
1850
+
1851
+ ### Patch Changes
1852
+
1853
+ - Updated dependencies [955d4c8]
1854
+ - Updated dependencies [c4a4cbd]
1855
+ - Updated dependencies [b046ec2]
1856
+ - Updated dependencies [2170ad9]
1857
+ - Updated dependencies [02d6359]
1858
+ - Updated dependencies [7648242]
1859
+ - Updated dependencies [8fa1e7f]
1860
+ - Updated dependencies [55866f5]
1861
+ - Updated dependencies [60f9c45]
1862
+ - @objectstack/spec@7.6.0
1863
+
1864
+ ## 7.5.0
1865
+
1866
+ ### Patch Changes
1867
+
1868
+ - @objectstack/spec@7.5.0
1869
+
1870
+ ## 7.4.1
1871
+
1872
+ ### Patch Changes
1873
+
1874
+ - @objectstack/spec@7.4.1
1875
+
1876
+ ## 7.4.0
1877
+
1878
+ ### Patch Changes
1879
+
1880
+ - Updated dependencies [23c7107]
1881
+ - Updated dependencies [c72daad]
1882
+ - Updated dependencies [f115182]
1883
+ - Updated dependencies [2faf9f2]
1884
+ - Updated dependencies [2faf9f2]
1885
+ - Updated dependencies [2faf9f2]
1886
+ - Updated dependencies [58b450b]
1887
+ - Updated dependencies [82eb6cf]
1888
+ - Updated dependencies [13d8653]
1889
+ - Updated dependencies [ff3d006]
1890
+ - Updated dependencies [5e831de]
1891
+ - @objectstack/spec@7.4.0
1892
+
1893
+ ## 7.3.0
1894
+
1895
+ ### Patch Changes
1896
+
1897
+ - Updated dependencies [5e7c554]
1898
+ - @objectstack/spec@7.3.0
1899
+
1900
+ ## 7.2.1
1901
+
1902
+ ### Patch Changes
1903
+
1904
+ - 9096dfe: **`OS_` env-var prefix migration** (issue #1382).
1905
+
1906
+ All ObjectStack-owned environment variables now use the `OS_` prefix. Legacy
1907
+ names still work for one release and emit a one-shot deprecation warning via
1908
+ the new `readEnvWithDeprecation()` helper in `@objectstack/types`.
1909
+
1910
+ **Renamed (with legacy fallback):**
1911
+
1912
+ | New | Legacy (deprecated) |
1913
+ | :------------------------ | :----------------------------------------------------- |
1914
+ | `OS_AUTH_SECRET` | `AUTH_SECRET`, `BETTER_AUTH_SECRET` |
1915
+ | `OS_AUTH_URL` | `AUTH_BASE_URL`, `BETTER_AUTH_URL`, `OS_AUTH_BASE_URL` |
1916
+ | `OS_PORT` | `PORT` |
1917
+ | `OS_DATABASE_URL` | `DATABASE_URL` |
1918
+ | `OS_ROOT_DOMAIN` | `ROOT_DOMAIN` |
1919
+ | `OS_MULTI_ORG_ENABLED` | `OS_MULTI_TENANT` |
1920
+ | `OS_CORS_ENABLED` | `CORS_ENABLED` |
1921
+ | `OS_CORS_ORIGIN` | `CORS_ORIGIN` |
1922
+ | `OS_CORS_CREDENTIALS` | `CORS_CREDENTIALS` |
1923
+ | `OS_CORS_MAX_AGE` | `CORS_MAX_AGE` |
1924
+ | `OS_AI_MODEL` | `AI_MODEL` |
1925
+ | `OS_MCP_SERVER_ENABLED` | `MCP_SERVER_ENABLED` |
1926
+ | `OS_MCP_SERVER_NAME` | `MCP_SERVER_NAME` |
1927
+ | `OS_MCP_SERVER_TRANSPORT` | `MCP_SERVER_TRANSPORT` |
1928
+ | `OS_NODE_ID` | `OBJECTSTACK_NODE_ID` |
1929
+ | `OS_METADATA_WRITABLE` | `OBJECTSTACK_METADATA_WRITABLE` |
1930
+ | `OS_DEV_CRYPTO_KEY` | `OBJECTSTACK_DEV_CRYPTO_KEY` |
1931
+ | `OS_HOME` | `OBJECTSTACK_HOME` |
1932
+
1933
+ **Migration:** rename in your `.env`. Legacy names continue to work this
1934
+ release and will be removed in a future major. Industry-standard names
1935
+ (`NODE_ENV`, `HOME`, `OPENAI_API_KEY`, `TURSO_*`, OAuth
1936
+ `*_CLIENT_ID/SECRET`, `RESEND_API_KEY`, `POSTMARK_TOKEN`,
1937
+ `AI_GATEWAY_*`, `SMTP_*`) are NOT renamed.
1938
+
1939
+ - @objectstack/spec@7.2.1
1940
+
1941
+ ## 7.2.0
1942
+
1943
+ ### Patch Changes
1944
+
1945
+ - @objectstack/spec@7.2.0
1946
+
1947
+ ## 7.1.0
1948
+
1949
+ ### Patch Changes
1950
+
1951
+ - Updated dependencies [47a92f4]
1952
+ - @objectstack/spec@7.1.0
1953
+
1954
+ ## 7.0.0
1955
+
1956
+ ### Patch Changes
1957
+
1958
+ - Updated dependencies [74470ad]
1959
+ - Updated dependencies [d29617e]
1960
+ - Updated dependencies [dc72172]
1961
+ - @objectstack/spec@7.0.0
1962
+
1963
+ ## 6.9.0
1964
+
1965
+ ### Patch Changes
1966
+
1967
+ - @objectstack/spec@6.9.0
1968
+
1969
+ ## 6.8.1
1970
+
1971
+ ### Patch Changes
1972
+
1973
+ - @objectstack/spec@6.8.1
1974
+
1975
+ ## 6.8.0
1976
+
1977
+ ### Patch Changes
1978
+
1979
+ - Updated dependencies [6e88f77]
1980
+ - Updated dependencies [c8b9f57]
1981
+ - @objectstack/spec@6.8.0
1982
+
1983
+ ## 6.7.1
1984
+
1985
+ ### Patch Changes
1986
+
1987
+ - @objectstack/spec@6.7.1
1988
+
1989
+ ## 6.7.0
1990
+
1991
+ ### Patch Changes
1992
+
1993
+ - Updated dependencies [430067b]
1994
+ - Updated dependencies [4f9e9d4]
1995
+ - @objectstack/spec@6.7.0
1996
+
1997
+ ## 6.6.0
1998
+
1999
+ ### Patch Changes
2000
+
2001
+ - Updated dependencies [a49cfc2]
2002
+ - @objectstack/spec@6.6.0
2003
+
2004
+ ## 6.5.1
2005
+
2006
+ ### Patch Changes
2007
+
2008
+ - @objectstack/spec@6.5.1
2009
+
2010
+ ## 6.5.0
2011
+
2012
+ ### Patch Changes
2013
+
2014
+ - @objectstack/spec@6.5.0
2015
+
2016
+ ## 6.4.0
2017
+
2018
+ ### Patch Changes
2019
+
2020
+ - Updated dependencies [f8651cc]
2021
+ - Updated dependencies [f8651cc]
2022
+ - Updated dependencies [0bf6f9a]
2023
+ - @objectstack/spec@6.4.0
2024
+
2025
+ ## 6.3.0
2026
+
2027
+ ### Patch Changes
2028
+
2029
+ - @objectstack/spec@6.3.0
2030
+
2031
+ ## 6.2.0
2032
+
2033
+ ### Patch Changes
2034
+
2035
+ - Updated dependencies [b4c74a9]
2036
+ - @objectstack/spec@6.2.0
2037
+
2038
+ ## 6.1.1
2039
+
2040
+ ### Patch Changes
2041
+
2042
+ - @objectstack/spec@6.1.1
2043
+
2044
+ ## 6.1.0
2045
+
2046
+ ### Patch Changes
2047
+
2048
+ - Updated dependencies [93c0589]
2049
+ - @objectstack/spec@6.1.0
2050
+
2051
+ ## 6.0.0
2052
+
2053
+ ### Patch Changes
2054
+
2055
+ - Updated dependencies [629a716]
2056
+ - Updated dependencies [dbc4f7d]
2057
+ - Updated dependencies [944f187]
2058
+ - @objectstack/spec@6.0.0
2059
+
2060
+ ## 5.2.0
2061
+
2062
+ ### Patch Changes
2063
+
2064
+ - Updated dependencies [bab2b20]
2065
+ - Updated dependencies [fa011d8]
2066
+ - Updated dependencies [b806f58]
2067
+ - @objectstack/spec@5.2.0
2068
+
2069
+ ## 5.1.0
2070
+
2071
+ ### Patch Changes
2072
+
2073
+ - Updated dependencies [75f4ee6]
2074
+ - Updated dependencies [823d559]
2075
+ - @objectstack/spec@5.1.0
2076
+
2077
+ ## 5.0.0
2078
+
2079
+ ### Patch Changes
2080
+
2081
+ - Updated dependencies [2f9073a]
2082
+ - @objectstack/spec@5.0.0
2083
+
2084
+ ## 4.2.0
2085
+
2086
+ ### Patch Changes
2087
+
2088
+ - Updated dependencies [2869891]
2089
+ - @objectstack/spec@4.2.0
2090
+
2091
+ ## 4.1.1
2092
+
2093
+ ### Patch Changes
2094
+
2095
+ - @objectstack/spec@4.1.1
2096
+
2097
+ ## 4.1.0
2098
+
2099
+ ### Patch Changes
2100
+
2101
+ - Updated dependencies [2108c30]
2102
+ - Updated dependencies [23db640]
2103
+ - @objectstack/spec@4.1.0
2104
+
2105
+ ## 4.0.5
2106
+
2107
+ ### Patch Changes
2108
+
2109
+ - 15e0df6: chore: unify all package versions to a single patch release
2110
+ - Updated dependencies [15e0df6]
2111
+ - @objectstack/spec@4.0.5
2112
+
2113
+ ## 4.0.4
2114
+
2115
+ ### Patch Changes
2116
+
2117
+ - Updated dependencies [326b66b]
2118
+ - @objectstack/spec@4.0.4
2119
+
2120
+ ## 4.0.3
2121
+
2122
+ ### Patch Changes
2123
+
2124
+ - @objectstack/spec@4.0.3
2125
+
2126
+ ## 4.0.2
2127
+
2128
+ ### Patch Changes
2129
+
2130
+ - Updated dependencies [5f659e9]
2131
+ - @objectstack/spec@4.0.2
2132
+
2133
+ ## 4.0.0
2134
+
2135
+ ### Patch Changes
2136
+
2137
+ - Updated dependencies [f08ffc3]
2138
+ - Updated dependencies [e0b0a78]
2139
+ - @objectstack/spec@4.0.0
2140
+
2141
+ ## 3.3.1
2142
+
2143
+ ### Patch Changes
2144
+
2145
+ - @objectstack/spec@3.3.1
2146
+
2147
+ ## 3.3.0
2148
+
2149
+ ### Patch Changes
2150
+
2151
+ - @objectstack/spec@3.3.0
2152
+
2153
+ ## 3.2.9
2154
+
2155
+ ### Patch Changes
2156
+
2157
+ - @objectstack/spec@3.2.9
2158
+
2159
+ ## 3.2.8
2160
+
2161
+ ### Patch Changes
2162
+
2163
+ - @objectstack/spec@3.2.8
2164
+
2165
+ ## 3.2.7
2166
+
2167
+ ### Patch Changes
2168
+
2169
+ - @objectstack/spec@3.2.7
2170
+
2171
+ ## 3.2.6
2172
+
2173
+ ### Patch Changes
2174
+
2175
+ - @objectstack/spec@3.2.6
2176
+
2177
+ ## 3.2.5
2178
+
2179
+ ### Patch Changes
2180
+
2181
+ - @objectstack/spec@3.2.5
2182
+
2183
+ ## 3.2.4
2184
+
2185
+ ### Patch Changes
2186
+
2187
+ - @objectstack/spec@3.2.4
2188
+
2189
+ ## 3.2.3
2190
+
2191
+ ### Patch Changes
2192
+
2193
+ - @objectstack/spec@3.2.3
2194
+
2195
+ ## 3.2.2
2196
+
2197
+ ### Patch Changes
2198
+
2199
+ - Updated dependencies [46defbb]
2200
+ - @objectstack/spec@3.2.2
2201
+
2202
+ ## 3.2.1
2203
+
2204
+ ### Patch Changes
2205
+
2206
+ - Updated dependencies [850b546]
2207
+ - @objectstack/spec@3.2.1
2208
+
2209
+ ## 3.2.0
2210
+
2211
+ ### Patch Changes
2212
+
2213
+ - Updated dependencies [5901c29]
2214
+ - @objectstack/spec@3.2.0
2215
+
2216
+ ## 3.1.1
2217
+
2218
+ ### Patch Changes
2219
+
2220
+ - Updated dependencies [953d667]
2221
+ - @objectstack/spec@3.1.1
2222
+
2223
+ ## 3.1.0
2224
+
2225
+ ### Patch Changes
2226
+
2227
+ - Updated dependencies [0088830]
2228
+ - @objectstack/spec@3.1.0
2229
+
2230
+ ## 3.0.11
2231
+
2232
+ ### Patch Changes
2233
+
2234
+ - Updated dependencies [92d9d99]
2235
+ - @objectstack/spec@3.0.11
2236
+
2237
+ ## 3.0.10
2238
+
2239
+ ### Patch Changes
2240
+
2241
+ - Updated dependencies [d1e5d31]
2242
+ - @objectstack/spec@3.0.10
2243
+
2244
+ ## 3.0.9
2245
+
2246
+ ### Patch Changes
2247
+
2248
+ - Updated dependencies [15e0df6]
2249
+ - @objectstack/spec@3.0.9
2250
+
2251
+ ## 3.0.8
2252
+
2253
+ ### Patch Changes
2254
+
2255
+ - Updated dependencies [5a968a2]
2256
+ - @objectstack/spec@3.0.8
2257
+
2258
+ ## 3.0.7
2259
+
2260
+ ### Patch Changes
2261
+
2262
+ - Updated dependencies [0119bd7]
2263
+ - Updated dependencies [5426bdf]
2264
+ - @objectstack/spec@3.0.7
2265
+
2266
+ ## 3.0.6
2267
+
2268
+ ### Patch Changes
2269
+
2270
+ - Updated dependencies [5df254c]
2271
+ - @objectstack/spec@3.0.6
2272
+
2273
+ ## 3.0.5
2274
+
2275
+ ### Patch Changes
2276
+
2277
+ - Updated dependencies [23a4a68]
2278
+ - @objectstack/spec@3.0.5
2279
+
2280
+ ## 3.0.4
2281
+
2282
+ ### Patch Changes
2283
+
2284
+ - Updated dependencies [d738987]
2285
+ - @objectstack/spec@3.0.4
2286
+
2287
+ ## 3.0.3
2288
+
2289
+ ### Patch Changes
2290
+
2291
+ - c7267f6: Patch release for maintenance updates and improvements.
2292
+ - Updated dependencies [c7267f6]
2293
+ - @objectstack/spec@3.0.3
2294
+
2295
+ ## 3.0.2
2296
+
2297
+ ### Patch Changes
2298
+
2299
+ - Updated dependencies [28985f5]
2300
+ - @objectstack/spec@3.0.2
2301
+
2302
+ ## 3.0.1
2303
+
2304
+ ### Patch Changes
2305
+
2306
+ - Updated dependencies [389725a]
2307
+ - @objectstack/spec@3.0.1
2308
+
2309
+ ## 3.0.0
2310
+
2311
+ ### Major Changes
2312
+
2313
+ - Release v3.0.0 — unified version bump for all ObjectStack packages.
2314
+
2315
+ ### Patch Changes
2316
+
2317
+ - Updated dependencies
2318
+ - @objectstack/spec@3.0.0
2319
+
2320
+ ## 2.0.7
2321
+
2322
+ ### Patch Changes
2323
+
2324
+ - Updated dependencies
2325
+ - @objectstack/spec@2.0.7
2326
+
2327
+ ## 2.0.6
2328
+
2329
+ ### Patch Changes
2330
+
2331
+ - Patch release for maintenance and stability improvements
2332
+ - Updated dependencies
2333
+ - @objectstack/spec@2.0.6
2334
+
2335
+ ## 2.0.5
2336
+
2337
+ ### Patch Changes
2338
+
2339
+ - Updated dependencies
2340
+ - @objectstack/spec@2.0.5
2341
+
2342
+ ## 2.0.4
2343
+
2344
+ ### Patch Changes
2345
+
2346
+ - Patch release for maintenance and stability improvements
2347
+ - Updated dependencies
2348
+ - @objectstack/spec@2.0.4
2349
+
2350
+ ## 2.0.3
2351
+
2352
+ ### Patch Changes
2353
+
2354
+ - Patch release for maintenance and stability improvements
2355
+ - Updated dependencies
2356
+ - @objectstack/spec@2.0.3
2357
+
2358
+ ## 2.0.2
2359
+
2360
+ ### Patch Changes
2361
+
2362
+ - Updated dependencies [1db8559]
2363
+ - @objectstack/spec@2.0.2
2364
+
2365
+ ## 2.0.1
2366
+
2367
+ ### Patch Changes
2368
+
2369
+ - Patch release for maintenance and stability improvements
2370
+ - Updated dependencies
2371
+ - @objectstack/spec@2.0.1
2372
+
2373
+ ## 2.0.0
2374
+
2375
+ ### Patch Changes
2376
+
2377
+ - Updated dependencies [38e5dd5]
2378
+ - Updated dependencies [38e5dd5]
2379
+ - @objectstack/spec@2.0.0
2380
+
2381
+ ## 1.0.12
2382
+
2383
+ ### Patch Changes
2384
+
2385
+ - Updated dependencies
2386
+ - @objectstack/spec@1.0.12
2387
+
2388
+ ## 1.0.11
2389
+
2390
+ ### Patch Changes
2391
+
2392
+ - @objectstack/spec@1.0.11
2393
+
2394
+ ## 1.0.10
2395
+
2396
+ ### Patch Changes
2397
+
2398
+ - @objectstack/spec@1.0.10
2399
+
2400
+ ## 1.0.9
2401
+
2402
+ ### Patch Changes
2403
+
2404
+ - @objectstack/spec@1.0.9
2405
+
2406
+ ## 1.0.8
2407
+
2408
+ ### Patch Changes
2409
+
2410
+ - @objectstack/spec@1.0.8
2411
+
2412
+ ## 1.0.7
2413
+
2414
+ ### Patch Changes
2415
+
2416
+ - @objectstack/spec@1.0.7
2417
+
2418
+ ## 1.0.6
2419
+
2420
+ ### Patch Changes
2421
+
2422
+ - Updated dependencies [a7f7b9d]
2423
+ - @objectstack/spec@1.0.6
2424
+
2425
+ ## 1.0.5
2426
+
2427
+ ### Patch Changes
2428
+
2429
+ - b1d24bd: refactor: migrate build system from tsc to tsup for faster builds
2430
+ - Replaced `tsc` with `tsup` (using esbuild) across all packages
2431
+ - Added shared `tsup.config.ts` in workspace root
2432
+ - Added `tsup` as workspace dev dependency
2433
+ - significantly improved build performance
2434
+ - Updated dependencies [b1d24bd]
2435
+ - @objectstack/spec@1.0.5
2436
+
2437
+ ## 1.0.4
2438
+
2439
+ ### Patch Changes
2440
+
2441
+ - @objectstack/spec@1.0.4
2442
+
2443
+ ## 1.0.3
2444
+
2445
+ ### Patch Changes
2446
+
2447
+ - @objectstack/spec@1.0.3
2448
+
2449
+ ## 1.0.2
2450
+
2451
+ ### Patch Changes
2452
+
2453
+ - a0a6c85: Infrastructure and development tooling improvements
2454
+
2455
+ - Add changeset configuration for automated version management
2456
+ - Add comprehensive GitHub Actions workflows (CI, CodeQL, linting, releases)
2457
+ - Add development configuration files (.cursorrules, .github/prompts)
2458
+ - Add documentation files (ARCHITECTURE.md, CONTRIBUTING.md, workflows docs)
2459
+ - Update test script configuration in package.json
2460
+ - Add @objectstack/cli to devDependencies for better development experience
2461
+
2462
+ - 109fc5b: Unified patch release to align all package versions.
2463
+ - Updated dependencies [a0a6c85]
2464
+ - Updated dependencies [109fc5b]
2465
+ - @objectstack/spec@1.0.2
2466
+
2467
+ ## 1.0.1
2468
+
2469
+ ### Patch Changes
2470
+
2471
+ - @objectstack/spec@1.0.1
2472
+
2473
+ ## 1.0.0
2474
+
2475
+ ### Major Changes
2476
+
2477
+ - Major version release for ObjectStack Protocol v1.0.
2478
+ - Stabilized Protocol Definitions
2479
+ - Enhanced Runtime Plugin Support
2480
+ - Fixed Type Compliance across Monorepo
2481
+
2482
+ ### Patch Changes
2483
+
2484
+ - Updated dependencies
2485
+ - @objectstack/spec@1.0.0
2486
+
2487
+ ## 0.9.2
2488
+
2489
+ ### Patch Changes
2490
+
2491
+ - Updated dependencies
2492
+ - @objectstack/spec@0.9.2
2493
+
2494
+ ## 0.9.1
2495
+
2496
+ ### Patch Changes
2497
+
2498
+ - Patch release for maintenance and stability improvements. All packages updated with unified versioning.
2499
+ - Updated dependencies
2500
+ - @objectstack/spec@0.9.1
2501
+
2502
+ ## 0.8.2
2503
+
2504
+ ### Patch Changes
2505
+
2506
+ - Updated dependencies [555e6a7]
2507
+ - @objectstack/spec@0.8.2
2508
+
2509
+ ## 0.8.1
2510
+
2511
+ ### Patch Changes
2512
+
2513
+ - @objectstack/spec@0.8.1
2514
+
2515
+ ## 1.0.0
2516
+
2517
+ ### Minor Changes
2518
+
2519
+ - # Upgrade to Zod v4 and Protocol Improvements
2520
+
2521
+ This release includes a major upgrade to the core validation engine (Zod v4) and aligns all protocol definitions with stricter type safety.
2522
+
2523
+ ### Patch Changes
2524
+
2525
+ - Updated dependencies
2526
+ - @objectstack/spec@1.0.0
2527
+
2528
+ ## 0.7.2
2529
+
2530
+ ### Patch Changes
2531
+
2532
+ - fb41cc0: Patch release: Updated documentation and JSON schemas
2533
+ - Updated dependencies [fb41cc0]
2534
+ - @objectstack/spec@0.7.2
2535
+
2536
+ ## 0.7.1
2537
+
2538
+ ### Patch Changes
2539
+
2540
+ - Patch release for maintenance and stability improvements
2541
+ - Updated dependencies
2542
+ - @objectstack/spec@0.7.1
2543
+
2544
+ ## 0.6.1
2545
+
2546
+ ### Patch Changes
2547
+
2548
+ - Patch release for maintenance and stability improvements
2549
+ - Updated dependencies
2550
+ - @objectstack/spec@0.6.1
2551
+
2552
+ ## 0.6.0
2553
+
2554
+ ### Minor Changes
2555
+
2556
+ - b2df5f7: Unified version bump to 0.5.0
2557
+
2558
+ - Standardized all package versions to 0.5.0 across the monorepo
2559
+ - Fixed driver-memory package.json paths for proper module resolution
2560
+ - Ensured all packages are in sync for the 0.5.0 release
2561
+
2562
+ ### Patch Changes
2563
+
2564
+ - Updated dependencies [b2df5f7]
2565
+ - @objectstack/spec@0.6.0
2566
+
2567
+ ## 0.4.2
2568
+
2569
+ ### Patch Changes
2570
+
2571
+ - Unify all package versions to 0.4.2
2572
+ - Updated dependencies
2573
+ - @objectstack/spec@0.4.2
2574
+
2575
+ ## 0.4.1
2576
+
2577
+ ### Patch Changes
2578
+
2579
+ - Version synchronization and dependency updates
2580
+
2581
+ - Synchronized plugin-msw version to 0.4.1
2582
+ - Updated runtime peer dependency versions to ^0.4.1
2583
+ - Fixed internal dependency version mismatches
2584
+
2585
+ - Updated dependencies
2586
+ - @objectstack/spec@0.4.1
2587
+
2588
+ ## 0.4.0
2589
+
2590
+ ### Minor Changes
2591
+
2592
+ - Release version 0.4.0
2593
+
2594
+ ## 0.3.3
2595
+
2596
+ ### Patch Changes
2597
+
2598
+ - Workflow and configuration improvements
2599
+
2600
+ - Enhanced GitHub workflows for CI, release, and PR automation
2601
+ - Added comprehensive prompt templates for different protocol areas
2602
+ - Improved project documentation and automation guides
2603
+ - Updated changeset configuration
2604
+ - Added cursor rules for better development experience
2605
+
2606
+ - Updated dependencies
2607
+ - @objectstack/spec@0.3.3
2608
+
2609
+ ## 0.3.2
2610
+
2611
+ ### Patch Changes
2612
+
2613
+ - Patch release for maintenance and stability improvements
2614
+ - Updated dependencies
2615
+ - @objectstack/spec@0.3.2
2616
+
2617
+ ## 0.3.1
2618
+
2619
+ ### Patch Changes
2620
+
2621
+ - @objectstack/spec@0.3.1
2622
+
2623
+ ## 0.3.0
2624
+
2625
+ ### Patch Changes
2626
+
2627
+ - Updated dependencies
2628
+ - @objectstack/spec@1.0.0
2629
+
2630
+ ## 0.2.0
2631
+
2632
+ ### Minor Changes
2633
+
2634
+ - Initial release of ObjectStack Protocol & Specification packages
2635
+
2636
+ This is the first public release of the ObjectStack ecosystem, providing:
2637
+
2638
+ - Core protocol definitions and TypeScript types
2639
+ - ObjectQL query language and runtime
2640
+ - Memory driver for in-memory data storage
2641
+ - Client library for interacting with ObjectStack
2642
+ - Hono server plugin for REST API endpoints
2643
+ - Complete JSON schema generation for all specifications
2644
+
2645
+ ### Patch Changes
2646
+
2647
+ - Updated dependencies
2648
+ - @objectstack/spec@0.2.0
2649
+
2650
+ ## 0.1.1
2651
+
2652
+ ### Patch Changes
2653
+
2654
+ - Remove debug logs from registry and protocol modules
2655
+ - Updated dependencies
2656
+ - @objectstack/spec@0.1.2