Skip to content

Commit 1ccf149

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-dv4dek
2 parents 95349ed + 645ed3d commit 1ccf149

419 files changed

Lines changed: 23331 additions & 1923 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: 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/i18n': patch
4+
---
5+
6+
fix(studio): a renamed validation rule keeps the hold of the server's verdict on its guard
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
In Studio's Validations tab a rule made from New takes its name from its error message, so editing the message renames it. The panel kept each rule's verdict by name and the condition editor reports only when its count changes, so a rename stranded the verdict under the old name: a guard the publish refuses (a nullable field compared without a null check) went on autosaving after the server had said so. The verdict now moves with the rule's name, through the message and through the name input: once the verdict shows, the next save is held and the held line names the rule. The first save of a refused guard still goes out, since only a saved draft is judged, and an edit of the guard itself still goes out to be judged again.
12+
13+
The held line the permission set editor and the hooks panel show reads "Fix the expression errors before saving." (zh 「请先修复表达式错误再保存。」) instead of naming CEL syntax errors, since it also holds the server's refusals.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/components': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(app-shell,components): "Open the full form" on an AI chat update card opens the edit form with the proposed changes applied, before → after, marked 「AI 建议」 with a per-field revert; a record open in a list's drawer is sent to the chat as the record in view
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
- **`@object-ui/app-shell`:** on an update card from the AI chat (cloud#3565), "Open the full form" used to open the record's edit page on the stored record alone, so every change the card proposed had to be typed again. The card's proposed values now travel in the router state of that navigation, through the same carrier the create card uses (`utils/recordFormAiDraft.ts`), bound to the record they were proposed for, and nothing is added to the URL. `RecordFormPage` reads them in edit mode only, for that record only, hands them to the form, and shows the same one-line notice above it that nothing is saved until the person checks and saves. Nothing submits on its own. The console dock now also reads a list's record drawer (`?recordId=`): while a record is open in the drawer, the chat's `context.surface` names the object and that record, as it already did on the record page, so "change its phone to …" asked beside the drawer reaches the agent about that record.
13+
- **`@object-ui/components`:** new host slot `SuggestedFieldChangesContext` (field name → proposed value, default `undefined`), the edit-form sibling of `SuggestedFieldsContext`. A `form` renderer under it applies each proposed value once, over the record it opens on, as an unsaved change: the form reads dirty, the discard guard hears it and Save writes it. While a field still holds the proposed value it shows the same "AI suggestion" mark, a "Was: …" line with the stored value it replaces, and a Revert button that puts the stored value back. A proposal for a field the form does not draw, or one that is read-only (by its config or by a `readonlyWhen` rule on the stored record) or disabled, is not applied. Each proposal is tried once per field, when the form first draws it, so on an edit wizard a later step's proposal lands on that step and a field the person reverted stays reverted across Next and Back. It is not metadata: no form or field key sets it, and with no provider nothing changes.
14+
- **`@object-ui/i18n`:** `form.aiBefore`, `form.aiBeforeEmpty` and `form.aiRevert` in all eleven locale packs.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/lint': patch
4+
'@objectstack/runtime': patch
5+
'@object-ui/fields': patch
6+
---
7+
8+
feat(spec): an action param's `helpText` takes an inline locale map, so an inline action can write its param hint per locale
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: added
12+
13+
- **`@objectstack/spec`: `ActionParamSchema.helpText`** accepts an inline locale map (`{ en: 'Why the account is paused', 'zh-CN': '暂停该账户的原因' }`) beside the bare sentence and the `{ dialect: 'template', source }` envelope, the same three forms `description`, `confirmText`, `successMessage` and each `outcomeMessages` entry already take. It reaches every action that carries params: a registered action (`ActionSchema.params`) and a page button's inline `action` (`InlineActionSchema`). A registered action's hint is still translated through the bundle at `objects.<object>._actions.<action>.params.<param>.helpText`; the map is the form for an inline action, which no bundle reaches. Before, a page that wrote its dialog's title, line, option labels and toast as locale maps had to leave the hint out or show it in one language. Every value that parsed before parses to the same thing. A map key that is not a language tag is refused with the slot's own sentence.
14+
- **`@objectstack/lint`:** `os validate`, `compile` and the publish gate judge each entry of a `helpText` map as a sentence, named at `params[N].helpText.<locale>`, the way they judge a `description` map: a blank entry, a `${…}` or single-brace token, a hole over a root the dialog does not bind (`record` only), logic in a hole or an unknown formatter is an error. `os i18n extract` records the map as authored text (its locales count as covered, a locale it omits is reported) and scaffolds no bundle row for it.
15+
- **`@objectstack/runtime`:** the agent-facing tool schema (`summarizeActionParams`, read by the MCP action tools) reads a `helpText` map's source-language entry (`en`, then `default`, then any entry) instead of falling back to the bound field's description.
16+
- **`@object-ui/fields`:** `resolveActionParams` resolves a `helpText` map for the active language with the same order as `label`, so the param dialog draws the viewer's language. A map no longer falls through to the field's help line; an envelope with no `source` still does.
17+
18+
Callers that read `helpText` and may now see a map: the console's `resolveActionParams` (handled here), the runtime's `summarizeActionParams` (handled here), the lint copy door and the i18n walk (handled here), and the server-side `translateAction`, which overlays a bundle sentence when one exists and otherwise passes the authored value through unchanged, as it does for a `description` map.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/plugin-security': patch
4+
'@objectstack/plugin-sharing': patch
5+
'@objectstack/core': patch
6+
'@objectstack/objectql': patch
7+
'@objectstack/verify': patch
8+
'@objectstack/lint': patch
9+
---
10+
11+
feat(security): the recycle bin's two grants are read: `restore` asks `allowRestoreOwnDeleted` and `purge` asks `manageRecycleBin`, and a member restores only the entries they deleted
12+
13+
Clause-②: yes (widening)
14+
Metadata-protocol: none
15+
Skills-docs: follow-up #30847
16+
17+
Until now every `restore` and `purge` dispatch was refused for every caller but the system, whatever the caller's permission sets granted. The two recycle-bin keys on an object permission are now read (ADR-0148 D5):
18+
19+
- **`allowRestoreOwnDeleted`** answers `restore`. It restores only the entries the caller deleted: restoring an entry someone else deleted is refused `403 PERMISSION_DENIED` unless the caller holds `manageRecycleBin` on the object. When the platform cannot tell what the caller holds, that restore is refused.
20+
- **`manageRecycleBin`** answers `purge`: purging one entry, emptying an object's entries, and the permanent delete (`delete(…, { permanent: true })`). It also restores any entry, not only your own.
21+
- **How the keys fold**: each is bounded by read; `modifyAllRecords` implies both; `manageRecycleBin` implies `allowRestoreOwnDeleted`; `allowDelete` implies neither. `objectPermissionGrants` (`@objectstack/spec/security`) answers both keys this way, and `/me/permissions` reports them.
22+
- **The tenant wall on the bin**: a caller the organization wall denies (for example, signed in with no active organization on a multi-organization deployment) now sees no entry: `restore` answers `null`, `purge` answers `false` and `empty` answers `0`. Before, such a caller's `purge` and `empty` were not scoped to any organization. The removal is scoped by the verdict the security layer recorded on the dispatch when it recorded one.
23+
- **Record sharing on the permanent delete**: the sharing write gate judges `purge` as the delete it is, so the permanent delete of a record by id is refused (`403 FORBIDDEN`) unless the caller may delete that record (ownership, write depth or Modify All Data; an edit share is not enough), and a bulk permanent delete is scoped to the records the caller may delete. `security/explain` reports a purge against the same delete gate.
24+
- **The retired `allowRestore` / `allowPurge` keys stay refused**, but their prescription (and that of the bare `restore` / `purge` keys) no longer says the operations do not exist: it says to delete the key and names the grants that gate the operations now, `allowRestoreOwnDeleted` and `manageRecycleBin`. The residue lint's rule explanation says the same.
25+
- `@objectstack/verify`: a write observer now also sees `purge` and `restore`.
26+
27+
Grant `allowRestoreOwnDeleted` (with read) to the people who should take back what they deleted, and `manageRecycleBin` to the people who administer the bin. Nothing changes for a caller who holds neither.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
i18n(platform-objects): the platform objects, Setup, Studio and Account ship in German
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `de` beside `en`, `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr`, `pt-BR` and `ru`: every `sys_*` object (labels, fields, help, options, views, actions and their dialogs), the metadata-type configuration forms Studio opens, the Setup, Studio and Account navigation, the System Overview dashboard and its datasets, the platform pages' titles, and the inline copy on the user and organization record pages. A user whose locale is `de` no longer reads English `sys_*` labels in the console. The new bundles pass through the same source-hash fallback as the existing ones, and every hand-authored leaf records the digest of the source it was translated from. The extract config documents `de` in its `--locales`, so `check:i18n` now gates the new bundles. Package 11 of #30512, sixth of seven locales; `ko` follows.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cli': minor
3+
---
4+
5+
feat(cli): `os migrate` names a declared rename the sync will carry
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
The pending-work listing prints a `rename_columns` entry as `a → b — values carried, declared by renamedFrom`, and the summary counts the columns to carry by a declared rename beside the in-place work.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cloud-connection': minor
3+
---
4+
5+
feat(cloud-connection): the install-local door carries a declared rename instead of refusing it `501`
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
An upgrade whose version declares `renamedFrom` on a field no longer answers `501 NOT_IMPLEMENTED`. Before any write, each declaration is read against the physical table by the driver's own rule; one that cannot be carried answers `422 VALIDATION_ERROR` with `details.refusals` (object, field, old key, reason), and a table that cannot be read answers `503`. The door's own refusals: an extension's field naming a key its own package never contributed to that object (`outside_package`), a renamed field turned to a type that stores no column (`destructive_type`), and a driver that renames no column while a rename is pending (`transport`). The carry runs right before the new version registers; a carry that fails puts back the tables already carried (`500`), and a register that fails puts them back too. The success answer lists each carry in `renamesCarried` (`object`, `table`, `from`, `to`), omitted when there is none.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/driver-sql': minor
3+
---
4+
5+
feat(driver-sql): a field's declared `renamedFrom` carries the old column's values to the new key in the schema sync
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
A field `b` declaring `renamedFrom: ['a']` is now carried from `a` when the table has a column for `a`, none for `b`, and the object no longer declares `a`: the schema sync renames the column (one transaction on PostgreSQL and SQLite, one atomic `ALTER TABLE` on MySQL), values, indexes and constraints with it, before any additive DDL. It runs wherever the sync runs (a boot on a new artifact, `os start` / `os dev`, `os migrate apply`, a package install), and a second sync finds `b` and no `a` and does nothing. The carry is logged by name; an index named for the old key is retired once the one named for the new key stands.
11+
12+
A declaration the carry cannot honour throws `DeclaredRenameRefusal` before any DDL on that table, naming the field, the old key and the reason: a platform column (`id`, an audit timestamp, the tenant column, a hash shadow), a key the object still declares, a key two fields claim, both columns present, two old columns present, a destructive type change (the old column narrowed under the new type, or a target with no column — a formula), a MySQL hash-shadow unique that cannot follow, or a dialect that renames no column. `previewDeferredSchemaWork` lists a carry as `rename_columns` (with `renames`) and a refusal as `refuse_table`. New exports: `DeclaredRenameRefusal`, `planDeclaredRenames`, `renderDeclaredRenameRefusal` and their types.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/driver-turso': minor
3+
---
4+
5+
feat(driver-turso): the REMOTE face refuses a pending declared rename by name instead of adding an empty column
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
The Turso remote transport renames no column. Its schema doors (`syncSchema`, `initObjects`, `syncSchemasBatch`) now read the remote catalog first and throw `DeclaredRenameRefusal` (reason `transport`) when a field's `renamedFrom` names an old column the table still holds, rather than adding the new key as an empty column beside it. `declaredRenameLimit`, `planDeclaredRenames` and `carryDeclaredRenames` answer on this face; `reverseDeclaredRenames` and `retireIndexesNamedForOldKeys` refuse `NOT_IMPLEMENTED`. The local and embedded-replica faces inherit the SQL driver's carry.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': minor
3+
---
4+
5+
docs(skills): the data skill teaches a field rename through `renamedFrom`
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
`objectstack-data`'s schema-evolution table gives a field rename its own row (declare `renamedFrom: ['old_key']` on the new key; the sync carries the column's values), and its evals ask for one.

0 commit comments

Comments
 (0)