Skip to content

Commit e591f32

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-dv67oe
Claude-Session: https://claude.ai/code/session_01ADHkmQEc6KnPaxi9d3soLZ Co-authored-by: Claude <noreply@anthropic.com>
2 parents 7c5f3e5 + 0c0d3b6 commit e591f32

200 files changed

Lines changed: 8635 additions & 1863 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: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
'@objectstack/spec': patch
4+
'@objectstack/skills': patch
5+
'@object-ui/app-shell': patch
6+
---
7+
8+
fix(metadata-protocol)!: a write naming no package onto an installed package's view, dashboard, report, translation or email template is refused where `os migrate packageless-overlays` can move its row, naming the base's `.custom` pair and the command
9+
10+
Clause-②: yes (narrowing) — the metadata save, publish, delete and rollback doors refuse a write that names no package onto an item of the five overlay types that one installed read-only package ships, where the ceremony would classify the row (or the first write's body) `movable` and its move can succeed; they accepted it before as a package-unbound Setup row. Every row the ceremony lists and does not move keeps that write. One write is widened: a rollback of the `.custom` pair's own declared row of an item its base ships (#28644 item 1) is judged as the pair's declared override, where the store sealed it as an artifact override before, on every type the pair can override (a page or flow pair row included).
11+
12+
Metadata-protocol: narrowed (the `allowEnvironmentOverlay` flag of `view`, `dashboard`, `report`, `translation` and `email_template` no longer opens a package-less write onto a packaged item the ceremony can move; it stays the predicate the migration ceremony, the read of an unmigrated row and every row the ceremony leaves use)
13+
14+
Skills-docs: updated here — `skills/objectstack-platform/SKILL.md`'s ADR-0146 paragraph said "a package-unbound Setup row still wins over the base's until D11"; it now says such a row from before D11 wins over the base's until `os migrate packageless-overlays` moves it, and that its package-less save, reset and rollback are refused once the command can move it. To stay under the bundle's token ceiling, the same paragraph drops "the base's is unchanged" after the export sentence (which "replaces the base's document whole" already implies) and the aside that the other overridable types wait for their doors (the sentence already names the six types the read honours today).
15+
16+
<!-- adr-0087: registered packageless-overlay-write-closed -->
17+
18+
**BREAKING** write narrowing at the metadata doors (`@objectstack/metadata-protocol`), shipped as `minor` during the launch window.
19+
20+
**Upgrade, then run the ceremony.** The command ships in this release. On each deployment with Setup customizations of a package's items, upgrade, run `os migrate packageless-overlays` (preview) with the flags and environment the deployment boots with (`--preset` and `--dev` mean what they mean to `os serve`), then `os migrate packageless-overlays --apply`. Nothing breaks at the upgrade: between the upgrade and `--apply`, every customization is served as before, and the package-less save, reset, publish and rollback of one the command can move are refused, naming the command. Done when the preview lists no movable row.
21+
22+
The preview lists five dispositions; only `movable` rows are moved, and every other row keeps its package-less write:
23+
24+
- `movable`: `--apply` moves it into the pair. A move that ends `failed` keeps the row as it was; fix what the error names and re-run. When the error names the pair (it cannot be ensured, or it refuses the row) or the base's missing version, the row also keeps its package-less write and may be left.
25+
- `multi_shipped` (several packages ship the name): delete it naming no package, then save it into the pair of the package it customizes if it is still wanted (the pair's override is then served at that base's address, `?package=<base>`; a read naming no package is not pinned to it while several packages ship the name).
26+
- `no_pair` (the base's id forms no pair): nothing to do.
27+
- `foreign_declaration` (its `overrides` names another package): remove the key with a save naming no package, then re-run: the move declares the right override. (A package-less save that keeps a corrected `overrides` is refused by the override write gate.)
28+
- `shadowed` (the pair already holds the item; the pair's row is served when it declares the override, otherwise this row still is): nothing to do to keep the pair's declared override; or restore the package original (`DELETE …?package=<base>.custom`) and re-run to move this one.
29+
30+
### Migration: FROM → TO
31+
32+
FROM, a customization of the installed package `com.acme.crm`'s view written with no package:
33+
34+
```http
35+
PUT /api/v1/meta/view/account_list
36+
{ "name": "account_list", "label": "My accounts" }
37+
```
38+
39+
TO, the same customization written into the base's paired `.custom`, declaring what it overrides:
40+
41+
```http
42+
PUT /api/v1/meta/view/account_list?package=com.acme.crm.custom
43+
{ "name": "account_list", "label": "My accounts", "overrides": { "package": "com.acme.crm", "basedOn": "1.4.0" } }
44+
```
45+
46+
To restore the package original, FROM `DELETE /api/v1/meta/view/account_list` TO `DELETE /api/v1/meta/view/account_list?package=com.acme.crm.custom`. `basedOn` is the base's installed `manifest.version`. The pair is created by `os migrate packageless-overlays --apply`, or by Studio's Customize.
47+
48+
- **Now refused.** A save (draft or publish mode), a publish, a delete of the active item, or a rollback whose restored row is package-less, with no `?package=` (or an empty one), of a `view`, `dashboard`, `report`, `translation` or `email_template` that exactly one installed read-only package ships, where the item's stored package-less row in that state (or, with none, the saved body) is one the ceremony classifies `movable`, the pair can be ensured (the base has a namespace and a SemVer version), and the override write gate admits that row into the pair. This covers an unmigrated `movable` row, and the first package-less write of an item the pair already holds (a moved one). Each answers `403 NOT_OVERRIDABLE`, writes nothing, and its message names the item, the shipping package, the pair (`?package=<base>.custom`), the `overrides` declaration and `os migrate packageless-overlays`; a rollback's message says to save a version from before the move into the pair, declaring it. The metadata item page shows that message as sent when its URL holds no `?package=`. The refusal comes before every gate that reads a stored row's lock, so it is the same with or without `overrides` in the body.
49+
- **Still open.** Every write naming `?package=<base>.custom` (the pair's save, publish, delete and rollback, judged by the override write gate as before); a rollback of the pair's own declared row, which is judged as the pair's override; a write of a name no installed package ships (environment metadata); and every package-less write the ceremony would not move, as before this release: a name several read-only packages ship (`multi_shipped`); a base whose id forms no pair (`no_pair`); a base whose pair cannot be ensured (no namespace, or a version that is not SemVer); a stored package-less row whose `overrides` names another package (`foreign_declaration`) or beside the pair's row of the item (`shadowed`; its package-less writes are addressed to the pair's row as before, so its package-less delete restores the package original); and an `email_template` locale the base does not ship (the pair refuses it, #28777; the ceremony's move of it is #28904). Discarding a draft stays open.
50+
- **Unchanged.** A package-less row stored before this release is still served exactly as before, by every read. The ceremony still moves it: it writes into the pair, never package-less.
51+
- **Studio.** The read-only item notice no longer links to the package-less Setup overlay (`@object-ui/app-shell`).
52+
- **Removed with it.** #28413's interim allowance, by which a package-less save that landed on a moved row kept that row's `overrides` block, is gone: such a save is refused like any other.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
feat(service-automation)!: a flow whose region body calls a child that can suspend is registered but not armed, and the region refusal cancels the child run it leaves behind (#28897)
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: none
10+
11+
**BREAKING** for a record-triggered flow with a `subflow` or `map` node inside a `loop` body, a `parallel` branch or a `try_catch` slot, whose child flow can suspend the run.
12+
13+
- **Before.** A region body cannot carry a durable pause (ruling D on #15646). The flow parse refuses the pausing node types inside a region, but it cannot see into a `subflow` / `map` child. Such a flow armed, and the first time its child suspended, the run failed at the region boundary with the named refusal (`durable pause inside a structured region …`). The child run that node had started was left parked in the suspended-run store: a later resume ran the rest of the child for a caller that had already failed, and then failed to resume that caller.
14+
- **Now, the first door.** The arming gate in `activateFlowTrigger` declines such a flow, after its disabled-subflow and save-notice halves. "Can suspend" is the save-notice half's reading: the child holds a node of an always-suspending type reachable from its start, or calls, from its top-level graph, a child that can suspend. The flow still registers, is not armed, and warns once, naming the region node (the innermost container), the `subflow` / `map` node and the child's suspending node. `GET /automation/_status` reports it `bound: false` with that reason and the new `unboundCause` value `suspending_subflow_in_region` (added to `FLOW_UNBOUND_CAUSES` in `@objectstack/spec/contracts`). Whenever a flow is registered, every flow whose calls reach it is judged again, so the decline does not depend on load order, and a child republished without its suspension arms the caller again.
15+
- **Now, the second door.** A run that still meets the region refusal (a direct execute, or a flow with no trigger) fails exactly as before, with the same refusal. Before throwing it, the engine cancels the child run the `subflow` / `map` node parked, and every run that child is parked on, through `cancelRun`. Each cancelled run records `cancelled`, with the refusal as its reason.
16+
- **Not declined.** A region-nested call whose child cannot suspend, and a top-level call to a child that can (the top-level graph carries the pause). Registration, the save door and `objectstack validate` accept the same flows as before.
17+
- **The fix.** Move the `subflow` / `map` node the reason names onto the top-level graph and route the region's exit to it, or republish the child without the node that suspends. The flow arms on its own once the shape is gone.
18+
- **Who moves.** No shipped flow has the shape. HotCRM's `campaign_enrollment` calls two children from loop bodies, and neither child suspends. The showcase and dogfood calls are all top-level.
19+
20+
<!-- adr-0087: not-required (no-migration-prescription) no metadata key is added, removed, renamed or re-shaped and the save door accepts the same flows: a flow that registered still registers and is only left unarmed by the runtime, with its own reason naming what to move, a run that failed at the region still fails there with the same refusal, and the one contract change is a new value in the runtime status cause list, which no author writes and no migration could rewrite -->
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/plugin-list': minor
4+
---
5+
6+
spec(ui): a list view lets readers hide and show columns by default — `userActions.hideFields` defaults to `true`
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: semantic
10+
11+
A declared default moves. A list view whose `userActions` block says nothing about `hideFields` now offers the Hide Fields control, so a reader can remove a column they do not need without the app author having to turn the control on.
12+
13+
- **Before.** `UserActionsConfigSchema.hideFields` defaulted to `false`, and the list renderer drew the control only for an explicit `hideFields: true`. Generated apps and the CRM example never declared it, so their lists had no way to hide a column.
14+
- **Now.** The default is `true`, and the list renderer reads `hideFields !== false`, so the spec default and the renderer agree. A view with no `userActions` block parses with none, and the renderer reads the absent key as the new default.
15+
- **Interface pages.** A page `interfaceConfig.userActions` block that omits the key parses to `true` as well, but an interface page keeps its own closed-by-default toolbar, as it already does for `filter`, `rowHeight` and `group`: it draws the control only for an explicit `hideFields: true`.
16+
- **Where the choice is kept** does not change. The control only subtracts from the columns the view draws. On a view that declares `columns`, or a saved view, the choice is stored on the reader's own list state and survives a reload for that reader only. On a system view that declares no `columns`, it lasts for the session. It never writes the shared view.
17+
- **To withhold the control**, write `userActions: { hideFields: false }`. Every authored `hideFields` parses exactly as before, and a non-boolean is still refused.
18+
- **Compiled artifacts.** A document that serialised an earlier parse (an `os compile` artifact) carries the old written `false` and keeps withholding the control. Recompile it, or delete the key.
19+
- **Upgrade path.** The ADR-0087 D3 semantic entry `list-view-hide-fields-default-on` carries the change to `os migrate meta` and the upgrade guide. The default change is declared in the build's default-change ledger. No key is added or removed.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-grid': patch
4+
'@object-ui/plugin-list': patch
5+
'@object-ui/i18n': patch
6+
'@object-ui/app-shell': patch
7+
---
8+
9+
feat(ui)!: a record opened from a list opens in the drawer by default, and the split pane beside the list retires
10+
11+
Clause-②: yes (narrowing)
12+
Metadata-protocol: none
13+
14+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#RECORD_SPLIT_MIN_CONTENT_PX, @object-ui/components#RecordListFaceProvider, @object-ui/components#useRecordListFace, @object-ui/components#recordListFaceFor, @object-ui/components#RECORD_LIST_CARD_FACE_BELOW_PX, @object-ui/components#RECORD_LIST_NARROW_COLUMN_COUNT, @object-ui/components#RecordListFace) the retired operands are a React context provider, a hook, a helper, two constants and a type of the split pane's narrowed list face, in a published ui package's entry; no packages/spec schema, no registered node type, no ADR-0087 conversion surface and no stored shape names them (the split mode already left `NavigationModeSchema`), so there is nothing for `objectstack migrate meta` to rewrite -->
15+
16+
**BREAKING** for a host that drew the split pane through `@object-ui/components`, read its narrowed list face, or passed the Display menu a `split` choice. The maintainer ruled 「默认改抽屉,分屏彻底退役,只留抽屉和整页」: a record opens in the drawer or as the full page, and the split pane is gone.
17+
18+
- **The Console.** A row click on a drawer-mode object opens the record in the non-modal drawer over the list, which keeps its full width and every view column. A click on another row swaps the record, ↑ ↓ step through the list, the drawer drags from 360 px to 60% of the window, and ⤢ maximizes it in place. A view that declares `navigation.mode: 'page'` and a phone still open the full page. No metadata changes: `navigation.mode` keeps its values.
19+
- **The reader's preference.** The Display menu's 「打开记录」 (Open records) offers Drawer and Full page only. The preference under `os:record-open-mode` is `drawer` or `page`; a stored `split` is an unknown value and reads as the default, the drawer, with no compatibility read.
20+
- **`@object-ui/components`.** `NavigationOverlay` draws the drawer for `mode: 'drawer'` and no longer has a `split` face: `NavigationOverlayMode` is `page | drawer | new_window | none`. Over a `mainContent` list the drawer is non-modal and undimmed, as before, and the list keeps its full width. The open-row store stays (`ActiveListRecordProvider`, `useIsActiveListRecord`, `ActiveListRow`, `useScrollActiveListRecordIntoView`, `listRecordIdOf`). The split pane's 「Close panel」 label is no longer drawn; the drawer's ✕ is 「Close」.
21+
- **`@object-ui/plugin-grid`.** The grid no longer narrows to three columns or to compact card rows beside a record pane; it draws every view column.
22+
- **`@object-ui/plugin-list`.** `ListView`'s record-count bar always prints its count. The `recordOpen` host prop offers two choices: its `preference` is `'drawer' | 'page'`, its `setPreference` takes either, and its `selectPage` member is gone (pass `setPreference('page')`).
23+
- **`@object-ui/i18n`.** `list.recordOpenSplit` leaves all ten packs.
24+
25+
What leaves, and what to write instead:
26+
27+
- FROM `RECORD_SPLIT_MIN_CONTENT_PX` TO nothing: the drawer has no width floor to fall back from.
28+
- FROM `RecordListFaceProvider` TO nothing: no list is narrowed any more, so there is no face to publish.
29+
- FROM `useRecordListFace` TO nothing: a list under the drawer draws its full face; read `useIsActiveListRecord` for the open row.
30+
- FROM `recordListFaceFor` TO nothing.
31+
- FROM `RECORD_LIST_CARD_FACE_BELOW_PX` TO nothing.
32+
- FROM `RECORD_LIST_NARROW_COLUMN_COUNT` TO nothing.
33+
- FROM `RecordListFace` TO nothing.
34+
35+
A host that passed `mode="split"` to `NavigationOverlay` passes `mode="drawer"` with the same `mainContent`. A host of the Display menu that passed `selectPage` drops it and lets `setPreference` receive `'page'`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/service-messaging': patch
3+
---
4+
5+
fix(service-messaging): a `sys_notification_template` read for a recipient locale with no row tries the stack's declared fallback locale before `en` (#28919)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`NotificationTemplateStore` walked the named tag, its primary subtag (`zh-CN` → `zh`), then `DEFAULT_LOCALE` (`en`), and never read the stack's declared `i18n.fallbackLocale` (else `defaultLocale`). The email template ladder reads it since #28880, so the two template families answered the same recipient differently. The ladder is now: the named tag, its primary subtag, the declared fallback (read from the i18n service's `getFallbackLocale` at each resolve, so a service registered later is seen) and its primary subtag, then `en`. The store holds no locale list, so it tries exact rows; it does not fold with `resolveBundleLocale`. A host with no i18n service, a store built outside this package, and a call that names no locale answer exactly as before. Every shipped example declares `fallbackLocale: 'en'`, so their ladder is unchanged. The published `NotificationTemplateStoreOptions` is unchanged: the composition hands the reader in under a module-private key.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): `list_actions` no longer offers `revoke_api_key` as runnable to a caller signed in with an API key. The action is marked `unavailable` with the API-key management guard's own `PERMISSION_DENIED` and sentence, the refusal `run_action` gives (#28943)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The forward's credential marker (`apiForwardCredentialRefusal`) only asked whether the target's door reads the caller's credential. The data door reads an API key, so `sys_api_key`'s Revoke was listed as runnable to an `osk_` caller. The row's per-object gate (`@objectstack/core` `apiKeyManagementCredentialRefusal`) then refused the write with `403 PERMISSION_DENIED`. The marker now also asks that guard about the data-door request a forward makes (the object, and the operation its method and path name). The guard is the one source: the listing's `unavailable` entry carries the guard's code and sentence, and the REST action door and MCP `run_action` answer that same refusal before forwarding instead of after. The guard's refusal is unchanged, and so are reads of `sys_api_key`, every other object, and the session caller's listing and run.

0 commit comments

Comments
 (0)