Skip to content

Commit d388141

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-k6o0gu
2 parents b9767e0 + f4b1f9e commit d388141

107 files changed

Lines changed: 5127 additions & 291 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: 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: 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.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
docs(spec): the liveness ledger grades `renamedFrom` live — a declared rename carries the old column's values on upgrade
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
`liveness/field.json` (shipped in the package) flips the field's `renamedFrom` row from `planned` to `live`, citing its executor: the SQL driver's schema sync carries the old column to the declaring field, or refuses by name before any change, and the install-local door carries it before the new version registers. The field's `renamedFrom` description and docblock now say so, in place of "until that step ships, no upgrade carries a column" (the generated `references/data/field`, `data/object` and `system/migration` pages follow). No schema shape changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-auth': minor
3+
'@objectstack/platform-objects': minor
4+
'@objectstack/spec': patch
5+
---
6+
7+
feat(plugin-auth,platform-objects): per-provider SSO sign-in options for IdP-initiated sign-in and just-in-time accounts, and `invite_only` now refuses an SSO sign-in by someone who was not invited
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: semantic
11+
12+
**Behaviour change for existing deployments.** Under the `invite_only` audience posture, which is the default, an enterprise SSO sign-in (OIDC or SAML, through `@better-auth/sso`) by a person who has no account and no pending invitation is now refused. It redirects to the error page with `error=SELF_REGISTRATION_CLOSED`, and no user is created. Before, such a sign-in created the account. To keep the old behaviour for a provider, turn on its new `allowJit` option: **Setup → SSO Providers → Edit Sign-In Options**, or `POST /api/v1/auth/sso/update-provider` with `{ providerId, allowJit: true }`. Unchanged: a person who already has an account, a person with a pending invitation, the first human of an empty deployment, every sign-in under the `email_domain` or `open` posture, and the social and `oidcProviders` sign-ins.
13+
14+
- **Two options on each SSO provider, both off by default.** `sys_sso_provider` gains `allow_idp_initiated` and `allow_jit` (boolean, default false, history tracked). They are declared to `@better-auth/sso` as provider `additionalFields`, so its own `/sso/register` and `/sso/update-provider` accept them, a non-boolean is refused 400 `VALIDATION_ERROR`, and the people who can write a provider today are the only ones who can change them. Every change writes a `sys_audit_log` row and a field-level activity line with the old and the new value.
15+
- **IdP-initiated sign-in (SAML and OIDC).** Off, a SAML Response with no `InResponseTo` is refused `error=unsolicited_response`, and an OIDC callback with a `code` and no `state` is refused `error=state_not_found`, as before. On, the vendor's own IdP-initiated handling runs for that provider only. For SAML, the vendor's plugin-wide `saml.allowIdpInitiated` now answers the provider's column for each ACS request. For OIDC, the column is carried into the configuration the vendor reads, and an `allowIdpInitiated` member stored in that configuration is ignored and removed on the next write.
16+
- **Setup.** The SSO Providers list shows both options, and each row has an **Edit Sign-In Options** action.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-query's self-contained examples are now type-checked by `check:skill-examples`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Twenty of the forty-two fenced TypeScript blocks in `skills/objectstack-query` carry the opt-in check marker: 8 of 14 in `SKILL.md`, 8 of 11 in `rules/aggregation.md`, 4 of 10 in `rules/pagination.md`. Engine calls gain a two-line `IDataEngine` declaration from `@objectstack/spec/contracts`, and standalone query literals are typed as `QueryInput` from `@objectstack/spec/data`, so a renamed key, a removed key (`cursor`, `array_agg`) or an unknown option now fails the gate instead of shipping. Every marked example compiled as written; none needed a correction. The rest are left unmarked and each file says so once: the bare `{ where: … }` option fragments in `SKILL.md`, all seven `where` fragments in `rules/filters.md`, and the ❌/✅ pairs whose ❌ half is wrong on purpose. No rule's teaching changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the metadata list serves every stored `seed` item, named by its row
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`getMetaItems({ type: 'seed' })`, the read behind `GET /api/v1/meta/seed`, listed no stored seed item while `GET /api/v1/meta/seed/:name` served each one. A seed body states no name (`SeedSchema` declares none; the name lives on the stored row), and the list merge keyed every stored body by its own `name`, so it skipped each seed. The merge now slots a stored body that states no name by its row's name, the name the by-name read finds it under, and serves it carrying that name. This holds on the environment's list, the package-scoped list and the draft preview, and a package's shipped seed of the same name shares that one slot. A body that states its own name keeps it, the stored body is not written, and `SeedSchema` is unchanged.

0 commit comments

Comments
 (0)