Skip to content

Commit 69c4831

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-5bqffu
2 parents 4fa9c1c + 121017b commit 69c4831

337 files changed

Lines changed: 13287 additions & 1407 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(app-shell): Home sends the deployment notice, authorized-clients and API-key reads once per load
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
On a built Console, a cold load of Home sent `GET /api/settings/deployment/notice` twice and `GET /api/v1/auth/authorized-clients` and the `sys_api_key` list three times each. The repeats were not concurrent, so sharing an in-flight request could not remove them. Each had its own cause:
12+
13+
- **Home was mounted twice.** Home waits on the launcher's `pending` flag so that it never draws an app tile that `/me/apps` then hides. The `LauncherAppsProvider` set that flag from its effect, which runs after the first commit. So the first frame had nothing pending and nothing narrowed: Home drew its page, then switched to its loading state, then drew the page again. Everything inside it mounted twice, and the deployment notice and the Connect an AI Assistant card sent their reads twice. The first read is now `pending` from the render that makes it due. Home draws its page once, after the answer, and a hidden app's tile is never drawn in that first frame.
14+
- **Two readers of one answer.** Home draws the Connect an AI Assistant card and the administrator's first-run checklist together. Both read "has this person connected an assistant" through `useConnectedAccess`, and each sent its own two requests. Every reader mounted at the same time now shares one pair of reads. A change to either record re-reads it once for all of them. The shared answer is dropped with its last reader, so a page mounted later reads afresh.
15+
16+
A list page load already read every URL once on a built Console, so nothing changes there.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/metadata-protocol': patch
4+
---
5+
6+
fix(objectql)!: a by-name read of a doc that names no package refuses a name two enabled packages hold, naming both
7+
8+
Clause-②: no (narrowing) — narrowed: a by-name read of a doc that names no package (`GET /meta/doc/NAME` and the doors that read through it, `MetadataFacade.get`/`getEntry`), of a name two or more enabled packages hold, moves from one holder's body, picked by registration order, to `409 RESOURCE_CONFLICT` naming every holder. Unchanged: one holder, a read that names the package, the environment's own item.
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) no key of any schema is added, removed, renamed or re-shaped and no stored row changes shape: what moves is the answer a by-name doc read gives when two packages ship the name, so there is nothing for a migration to rewrite and no tombstone -->
12+
13+
**BREAKING** for a caller that reads a doc by its name alone while two enabled packages ship that name: it now gets `409 RESOURCE_CONFLICT` naming the packages, where it got one of them. The fix: name the package (`?package=PACKAGE_ID` on the REST door, the package id in process). A doc name one package ships reads as before.
14+
15+
A read of a `doc` by its name alone (`GET /api/v1/meta/doc/NAME`, the doors that read through it, and `MetadataFacade.get('doc', name)` / `getEntry`) answered one holder's doc when two packages ship the same name: the registry's first-registered copy, or on a composed server the metadata service's copy, which is the package registered last. It now answers `409 RESOURCE_CONFLICT` (`ambiguous-in-environment`), naming every enabled package that holds the name, in either registration order. `MetadataFacade.exists` answers `true` for such a name.
16+
17+
Unchanged: a doc name one package holds reads as before; a read that names the package (`?package=` on the REST door, a package caller in process) is not changed; the environment's own doc of the name, as the server holds it, still answers first. A disabled package holds no name: beside one enabled holder the read is not refused, and the facade serves the enabled holder's doc. `doc` keeps its global literal name and its addressing (ADR-0150 D1 bucket 1).
18+
19+
What moves, for a doc name two enabled packages ship: the answer was `200` with one holder's doc, chosen by registration order; it is `409 RESOURCE_CONFLICT` naming each holder. No metadata, no stored row and no export changes, so there is nothing to rewrite: a caller that wants one of the docs names its package.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(app-shell): a list view authored `navigation.preventNavigation: true` opens no record and draws no link face
7+
8+
Clause-②: no — an authored key starts being honoured; no surface added
9+
Metadata-protocol: none
10+
11+
The spec describes `navigation.preventNavigation` as "Disable standard navigation entirely". The Console's object list did not read it: a `drawer` view with the flag still opened the record drawer on a row click (it wrote `?recordId=`), and a ⌘, Ctrl or middle click still opened the record in a new tab. Its rows also kept their link face: the first column drew as the record link and the right-click menu offered Open and Open in new tab.
12+
13+
On a desktop, the Console's object list now resolves such a view the way it resolves a view authored `navigation: { mode: 'none' }`, whatever mode the view names. A row click opens nothing, a modifier click included. The record-link column draws plain text, and the right-click menu offers no Open items. The row's actions stay. A view without the flag, or with `preventNavigation: false`, opens its records as before. On a phone the list is unchanged: a tap still opens the record's page.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-automation` teaches the silent half of the after-save retried-callout rule
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `try_catch` row of the `objectstack-automation` skill already said that, in a `record-after-*` flow, a retry may not reach an inline `http` / `connector_action` node (refused when the flow is saved). It now also names the half that is not refused: when the retried inline call sits inside a `subflow` / `map` child, retried by either flow, the caller saves but is never armed, and `GET /api/v1/automation/_status` reports it `bound: false` with `unboundCause: retried_callout_in_subflow` until the child's `http` node is `durable: true` or nothing retries the call. One eval case covers it.
11+
12+
The fault-edge note no longer spells the flow-level retry as `errorHandling.retry`, a key the schema does not have; it reads `errorHandling.strategy: 'retry'`.
13+
14+
Paid in place, the token ceiling does not move. Five restatements were cut, each keeping another home: the trigger table's `Fires` column (the token and the hook column say it), "not a name-keyed map" (the array example beside it), "Not author-facing" (the same row's "author the container"), the hook `runAs` note's closing "declare `runAs: 'system'`" (the note's own first sentence), and "an inbound vendor callback is an `api` flow" (the Flow Types `api` row and integration recipe 4).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the error-code ledger's `OS_PROTOCOL_INCOMPATIBLE` comment says when the refusal carries a `migrateCommand` and when it does not
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Comment only; no schema, type, code or export changes. The comment on the `OS_PROTOCOL_INCOMPATIBLE` row in `src/api/error-code-ledger.zod.ts` said the remedy is `objectstack migrate meta --from N` and listed `migrateCommand` among the `error.details` members unconditionally. It now matches the shipped refusal. `requiredRange`, `rangeSource`, `protocolVersion` and `targetMajor` are on every refusal. `migrateCommand` is present only from the migrate-meta support floor (16, ADR-0087 D3) up to the runtime's major, and is bare when the target major cannot be determined. It is absent for a package ahead of the runtime and for one below the floor, and in both cases the message names the remedies that apply.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/core': minor
4+
'@objectstack/runtime': minor
5+
'@objectstack/service-i18n': minor
6+
'@objectstack/rest': minor
7+
'@objectstack/objectql': minor
8+
'@objectstack/plugin-email': minor
9+
'@objectstack/service-analytics': minor
10+
'@objectstack/service-storage': minor
11+
---
12+
13+
feat(i18n): the serving layer reads `i18n.sourceLocale` as the authored label's language
14+
15+
Clause-②: yes
16+
Metadata-protocol: semantic
17+
18+
`II18nService` (`@objectstack/spec/contracts`) gains an optional `getSourceLocale()` / `setSourceLocale(locale)` pair, shaped like the fallback pair; `FileI18nAdapter` and the kernel's in-memory fallback implement both.
19+
20+
An app authored in one language that defaults its users to another now serves its inline labels to a request in the authored language. Take `defaultLocale: 'zh-CN'`, `sourceLocale: 'en'`, English inline labels, a `zh-CN` bundle and no `fallbackLocale`:
21+
22+
- Before: an `en` request was not treated as the authored language, walked the fallback chain (`zh-CN`) ahead of the inline text and was served the Chinese bundle row, unless the stack also declared `fallbackLocale: 'en'`.
23+
- Now: an `en` request answers the English inline label; a `zh-CN` request answers the `zh-CN` row; any other locale walks the declared fallback chain exactly as before.
24+
25+
`AppPlugin` threads the declared `i18n.sourceLocale` into the i18n service, and every metadata-document translation (the REST metadata reads, a formula's `label()`, an email template's `option` hole, analytics select-option labels and the upload-link page) passes `getSourceLocale()`, else `getDefaultLocale()`, as `ResolveOptions.defaultLocale`. A stack that declares no `sourceLocale` is served exactly as before. A `fallbackLocale: 'en'` added only to work around this can stay; it is no longer needed for the `en` request.
26+
27+
Writing your own i18n provider: implement `setSourceLocale` to receive the declaration and `getSourceLocale` to report it, answering `undefined` when nothing was declared — never `defaultLocale`; the serving layer does that collapse itself.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
'@objectstack/driver-turso': patch
4+
---
5+
6+
feat(driver-sql, driver-turso): schema sync builds the `(created_at, id)` and `(owner_id)` indexes without a declaration
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
Schema sync now builds two indexes on system columns that no object has to declare:
12+
13+
- `(created_at, id)`, named `idx_<table>_created_at_id`, on every table that has both columns. This is the default list order, `created_at desc, id desc`. Without the index, every default-ordered page sorted all of its filtered rows. On PostgreSQL 16 with 1M rows, the admin list statement takes 1.3 ms instead of 317 ms.
14+
- `(owner_id)`, named `idx_<table>_owner_id`, on an object whose fields include a single-valued `owner_id`. This is the column a private-OWD read filters on. An object with no `owner_id` gets no such index.
15+
16+
Both indexes are non-unique. They follow the #31882 rule for reference columns. If a declared index's key already starts with the same columns, it serves instead, and no second index is built. If an author declares the same key, it gets the same name, so the two converge. On an existing database, `os migrate plan` lists each missing index as a `safe` `create_index`. The next sync builds it, and on PostgreSQL it is built `CONCURRENTLY`. A second sync makes no changes. An existing table that has no `created_at` column gets no default-order index and no error line.
17+
18+
Turso's remote face (`libsql://`) now builds the full implicit set too: these two keys and the #31882 reference-column indexes. Until now it built only declared indexes, so the drift plan on a remote database showed a `create_index` for each implicit index after every sync.
19+
20+
On SQLite, the index does not speed up a default-ordered page yet. While the engine adds the empty controlled-by-parent chain to the query, the SQLite planner still sorts in a temporary B-tree. When the query has no chain, the same page takes 0.16 ms instead of 1.6 s at 1M rows.
21+
22+
Widening: `@objectstack/driver-sql` now exports `implicitReferenceIndexes` from its main entry. Its arguments take an optional `physicalColumns` set, and when one is given, a key over a column the table lacks is left out.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
perf(objectql): a `controlled_by_parent` read no longer carries the parent-chain subquery for a
9+
reader who holds View All on the detail and whose scope is unrestricted at every master hop, when the
10+
detail's `master_detail` is required.
11+
12+
For that reader (an admin with View All on the detail and on every object of the chain, under a
13+
posture whose read scope adds no row condition), the engine's `ReadableIds` composition drops the
14+
required master's leaf (`fk IN (SELECT id FROM master …)`) instead of compiling it. Admin lists,
15+
counts and aggregates on detail objects run one subquery fewer per hop.
16+
17+
Behaviour change, by maintainer ruling: totals, counts and aggregates for that reader may include
18+
orphan rows, which are detail rows whose required master is missing or empty (rows that a
19+
system-context write or a schema change left behind), inside the reader's own tenant wall. Every
20+
other reader keeps the whole chain and sees exactly what it saw before. That includes a reader with
21+
any restricted hop, a reader with View All on the detail only, and a plain member. An optional master
22+
keeps its leaf. Under walled tenancy a tenant admin's master scope is the tenant wall, so nothing is
23+
dropped there.
24+
25+
Writes are unchanged. Every read a write makes while it runs keeps the chain: the security checks on a
26+
predicate or by-id update or delete, and a hook's reads. An orphan therefore stays outside every
27+
write, exactly as before.

‎.changeset/33723-chat-cjk-bold.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
---
4+
5+
fix(plugin-chatbot): bold next to CJK full-width punctuation renders bold in chat answers
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A `**` run with a CJK letter on one side and full-width punctuation on the other (book-title marks, corner brackets, the full-width comma, full stop, exclamation and question marks, the enumeration comma) showed as literal asterisks in chat answers and the reasoning panel: CommonMark's flanking rule reads full-width punctuation as punctuation, and a CJK sentence puts no space beside the run. Both chat markdown surfaces now render with `remark-cjk-friendly` in streamdown's `cjk` plugin slot, so such a run opens and closes. ASCII emphasis, inline code spans and backslash-escaped asterisks keep their CommonMark meaning. A caller that passes its own `plugins` to `MessageResponse` keeps the CJK rule.
11+
12+
`@object-ui/plugin-chatbot` gains the dependency `remark-cjk-friendly` (MIT).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The published query and hook skill examples now filter on the platform's `owner_id` column with `{current_user_id}`, and the hook `find` example reads the caller's id from `ctx.session?.userId` instead of an unbound variable.

0 commit comments

Comments
 (0)