Skip to content

Commit a040c44

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36895-studio-path-helper
2 parents 947b96e + 4f9a3f8 commit a040c44

259 files changed

Lines changed: 11593 additions & 956 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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth)!: a directory deactivation removes the user's local password; a re-activation restores access through SSO only
6+
7+
Clause-②: yes (narrowing) — narrowed: a SCIM `active: false`, a SCIM `DELETE /Users/{id}`, a SCIM create with `active: false`, a connection decommission that leaves the user with no active source, and any later SCIM write that leaves the user inactive now also delete the user's local password (every `sys_account` row of the user with `provider_id = 'credential'`), where they left it in place, so the identity-source mark then reads the user `idp_provisioned` where the password had kept it `env_native`; and a SCIM `active: true` that lifts the directory's ban now first deletes any such row the user holds at that moment, where it lifted the ban alone, and fails (SCIM 500, the user staying deactivated) when that deletion cannot be completed. A re-activation by the directory restores no credential from before it, so a password sign-in by that user answers the ordinary `401 INVALID_EMAIL_OR_PASSWORD` until a password is set again on purpose after it.
8+
Metadata-protocol: none
9+
Skills-docs: none — no skill under `skills/**` teaches the SCIM deactivation lifecycle; `content/docs/permissions/authentication.mdx` gains the rule in this change.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed, renamed or re-shaped. The change is a runtime write on the SCIM deprovision and re-activation paths (rows of the better-auth account table), so there is nothing stored in metadata for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for a deployment that provisions users through a SCIM directory: deactivating or deleting a user through SCIM, or decommissioning the last SCIM connection that holds the user active, now removes that user's local password, alongside the ban, the API key revocation, the AI service account suspension and the ending of the user's OAuth applications and SCIM credentials it already performed. A re-activation by the directory restores access through the identity provider's sign-in only: it removes any local password the user holds at that moment, one set while the user was deactivated included, before it lifts the ban, so it restores no credential from before it; when that removal cannot be completed the re-activation fails and the user stays deactivated until the directory retries. The user's other account links (SSO / OAuth) and the user row are kept. With the password gone, the user reads as directory-managed (`sys_user.source = 'idp_provisioned'`, ADR-0135 D4) where the password had kept it `env_native`, so every rule keyed on that mark applies to the user, the SSO-only mode refusals to set a local password among them.
14+
15+
Unchanged: an administrator's ban and unban (`admin/ban-user`, `admin/unban-user`) leave the local password alone; an `active: true` over an administrator's ban, and an active SCIM write for a user who is not banned, remove nothing; a deactivation the break-glass last-administrator guard refuses removes nothing.
16+
17+
A ban whose reason reads `Deactivated via SCIM`, the reason the directory's ban records, is the directory's whoever wrote it: the directory's next active write lifts it and removes the local password.
18+
19+
What to do: nothing. No migration or backfill runs: a user deactivated before this version keeps their local credential until the directory next writes that user. An administrator's unban removes nothing. A re-activation by the directory also removes a password set while the user was deactivated. A person who needs a local password after a re-activation sets one again on purpose after it (`set-initial-password`, or an administrator's Set Password where the deployment allows it; with SSO-only mode on, these doors refuse a directory-managed user other than a platform administrator setting their own).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/plugin-audit': patch
4+
---
5+
6+
fix(audit): a search the server widens never names a column the caller may not query (#34700)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
Skills-docs: none — no skill or docs page teaches this search set.
11+
12+
- The server-chosen search set of an object now leaves out every column the object's own query guard would refuse this caller, as it already leaves out a field the caller may not query (#25672). A column the caller names in `searchFields` is not left out: the guard judges it as before.
13+
- `registerMiddleware(fn, { object, withholdSearchFields })`: a guard middleware names those columns in its own registration (`EngineMiddlewareOptions.withholdSearchFields`, asked for the reads the middleware runs on). plugin-audit's guards on `sys_audit_log` and `sys_activity` declare one, answered by the guard's own rule.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/runtime': minor
4+
'@objectstack/spec': minor
5+
---
6+
7+
fix(lint)!: a body whose regular-expression pattern the runtime's QuickJS also refuses is refused, not only warned about
8+
9+
Clause-②: no (narrowing)
10+
Metadata-protocol: narrowed
11+
Skills-docs: follow-up #36727
12+
13+
<!-- adr-0087: registered body-regexp-pattern-refused -->
14+
15+
**BREAKING** only for a body that never ran. `action-body-does-not-compile`, `hook-body-does-not-compile` and `job-body-does-not-compile` compile an L2 body inside the wrapper the runtime runs it in, with the host's JavaScript engine, and reported every failure V8 words as `Invalid regular expression: /PATTERN/FLAGS: REASON` at `warning`, because the host's V8 and the runtime's QuickJS differ on some patterns. Measured over the same wrapper text (Node 22.23.5's V8 12.4, Unicode 17.0 tables, against quickjs-emscripten 0.32.0), they differ on two constructs, a duplicate named capture group in different alternatives (`/(?<a>x)|(?<a>y)/`, V8 `Duplicate capture group name`) and a modifier group (`/(?i:a)/`, V8 `Invalid group`), and on three Unicode property names, `IDS_Unary_Operator` (`IDSU`), `Modifier_Combining_Mark` (`MCM`) and the script `Katakana_Or_Hiragana` (`Hrkt`, under `sc=`, `Script=`, `scx=` or `Script_Extensions=`), V8 `Invalid property name`: every name in QuickJS's own tables was compiled in every key form, under `u` and `v`, bare and in a class, and these twelve spellings were every disagreement. Node 22 refuses them and QuickJS runs them. Every other pattern reason probed is refused by QuickJS too, among them an unterminated group (`/(/`), nothing to repeat (`a**`), a class range out of order (`/[b-a]/`), and under `u` a back-reference to a group the pattern does not name, a Unicode property name neither engine knows (`/\p{Nope}/u`) and an incomplete quantifier (`/a{/u`). Such a body passed `os validate`, `os build`, `os lint` and the runtime publish door, and every run of it failed.
16+
17+
What moves (FROM → TO):
18+
19+
- The three rules (`validateActionBodyCompiles`, `validateHookAndJobBodyCompiles`, `@objectstack/lint`) on a regular-expression pattern failure that is not one of those measured gaps: FROM `warning` TO `error` at `os validate`, `os build`, `os lint` and the runtime publish door (`action`, `object` and `hook` writes, `422 INVALID_METADATA`), with a hint that names the fix. The measured gaps stay a `warning`; a property name is judged by the host's Unicode tables, and on a host whose tables are older than Unicode 17.0 every property name it refuses is a `warning`; a later Node whose V8 accepts a gap reports nothing for it.
20+
- `BodyCompileShape` (`@objectstack/lint`) gains `regexp-dialect-gap`, the one `warning` arm; `regexp-pattern` is now an `error`.
21+
- The unterminated-literal hint names a line terminator inside the literal as a cause (a `\n` written with one backslash in a quoted or JSON-carried `body.source`).
22+
- A hook lowered from an inline `handler` whose body does not compile gets a hint that names the handler instead of `body.source`.
23+
- The runtime's QuickJS runner (`@objectstack/runtime`): a hook or job body that does not compile is reported FROM the generic `hook 'NAME' threw: SyntaxError: …` (the sentence a body that ran and threw gets) TO `hook 'NAME' does not compile: SyntaxError: …` (and `job 'NAME' …`), the way an action body's is. The caller's answer is unchanged: the `/data` door still answers the sanitised `500 INTERNAL_ERROR`.
24+
- `os explain` for the three rules and the ADR-0087 entries `action-body-does-not-compile-refused`, `action-body-regexp-literal-token-refused` and `hook-job-body-does-not-compile-refused` now say which pattern failures warn.
25+
26+
The fix: close every group, give each quantifier something to repeat or escape it, write a class range low to high, reference only a group the pattern names, and use a Unicode property that exists.
27+
28+
No conversion is made (ADR-0087 D3, entry `body-regexp-pattern-refused`): which pattern the author meant is a judgement. Measured first-party exposure: zero.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/formula': minor
3+
'@objectstack/lint': minor
4+
'@objectstack/spec': minor
5+
---
6+
7+
fix(lint)!: `==` / `!=` between a list-valued field reached through a lookup hop and a scalar is refused, as the root-field case is
8+
9+
Clause-②: yes (narrowing)
10+
Metadata-protocol: narrowed
11+
Skills-docs: none — the `objectstack-formula` skill already teaches that a list field compared with a scalar literal is refused and the `has()`-guarded `in` rewrite; a hop read of a list field takes the same rewrite
12+
13+
<!-- adr-0087: not-required (already-registered cel-list-equality-refused) the same list-equality refusal and membership rewrite, one hop away; this change extends that entry's surface to the one-hop read at a validation rule predicate and a field expression, and states its doors (os validate, os build, the object save door) -->
14+
15+
**BREAKING** accept-set narrowing, shipped as `minor`; the new `@objectstack/formula` export `findHopListEquality` widens the package's public surface.
16+
17+
`record.labels == 'vip'` on a list-valued field has been refused as `list-equality` since the shared validator learned it, but the same comparison one hop away, `record.account.labels == 'vip'` where `account` is a lookup and `labels` a list-valued field of its target, was refused nowhere. A validation rule's `condition` / `when` and a formula's `expression` are the two sites that serve a hop: the engine hydrates the related row, so `record.account.labels` is the stored list, and comparing it with a scalar answers `false` (for `!=`, `true`) on every row. A rule written that way never fires and saves clean.
18+
19+
- **The refusal.** At those two sites, the publish lint (`os validate` / `os build`) and the object save door refuse a `==` / `!=` between a read of a hop target's list-valued field (an inherently multi-value type, or a multi-capable type declared `multiple: true`) and a non-null scalar literal, either operand order, in the root case's words, prescribing the root case's membership test on the hop read.
20+
- **What carries it.** `@objectstack/formula` exports `findHopListEquality(source, listLeaves)`, which returns the `list-equality` refusals (same code and params as `validateExpression`'s) for the reference → list-valued-leaves map its caller hands in. `ExprSchemaHint` is unchanged. The ADR-0087 entry `cel-list-equality-refused` now names the one-hop read and its doors; the Studio draft check and the shared-validator half of the MCP `validate_expression` tool do not see a hop.
21+
- **Still accepted.** A hop to a scalar field (`record.account.tier == 'vip'`), `record.account.labels == null`, `'vip' in record.account.labels`, a hop through a reference that is itself multi-valued, and every site that serves no hop (an action's `visible`, a flow condition), where `record.account` is the stored id.
22+
23+
FROM → TO:
24+
25+
- `record.account.labels == 'vip'` → `(has(record.account.labels) && record.account.labels != null && "vip" in record.account.labels)`
26+
- `record.account.labels != 'vip'` → `(!has(record.account.labels) || record.account.labels == null || !("vip" in record.account.labels))`
27+
28+
One-line fix: test membership with `in` on the hop read, guarded as the refusal prescribes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/i18n': patch
4+
'@object-ui/plugin-form': patch
5+
---
6+
7+
fix(fields): a lookup pick that keeps an amount says so over a filled field too, a create form's opening fill no longer waits for ever on a parent it cannot read, and a pick that fills a currency code and an amount in it copies both
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
Three follow-ups to the cross-currency pick rule (a pick copies an amount only into a field in the same currency). Nothing is converted, and no metadata changes.
13+
14+
- **A pick over a filled amount says why it kept it.** When a pick would replace an amount that already holds a value (a re-pick in a line-item grid, or a declared pair with `overwrite: true`) and the picked amount is in another currency, the earlier value stays and the note now shows there too, ending "Unit Price still holds its earlier value." Before, the note showed only over an empty field, so the earlier product's price sat under the new product with nothing said. The note goes away once somebody edits the field.
15+
- **The opening fill of a create form no longer waits for ever.** A form opened with a lookup already holding a record (a related list's New, a URL prefill) fills its declared targets from it. When an amount there follows the currency of a parent the record names, the fill waited for that parent's read and never ran if the read failed, the data source cannot read single records (`findOne`), or the form names no parent object. Now the wait ends when the read answers, fails or cannot run: the other targets (a description) fill, and the amount is left empty with the note "the currency here could not be read".
16+
- **A pick that fills a code field and its amount together copies both.** An amount that follows the record's own code field (`currencyMode: 'record'`) is now judged against the line or record with the same pick's write to that code field applied, in the line-item grid and in the record form. Picking a product that carries `currency_code: EUR` and a price in it onto a fresh line now fills the code and the price, where the price was withheld with a "no currency is chosen" note beside the code the same pick had just written.
17+
18+
Also in `@object-ui/fields`: new exports `declaredPickWrites`, `judgePickWrites`, `withheldStillStands` and the type `PickWrite`; `AmountCurrency` gains the kind `unread`, `WithheldAutofill` the reason `targetCurrencyUnread` and the optional `held` (the value a target kept); `amountCurrencyOf` takes an optional third argument, the pick's own writes; `AutofillCurrencyContext.targetCurrency` is handed them as an optional second argument. In `@object-ui/i18n`: two new `lookup.*` sentences, `autofillCurrencyUnread` and `autofillKept`, in every locale pack. In `@object-ui/plugin-form`: the record-form stamp's documentation lists the hosts the rule reaches; no behaviour changes there.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): the object page's 「表单」 tab is now 「字段布局」 (Field layout), edits the object's field groups only, and arranges an installed object into its paired `.custom` package
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The Studio object page's Form tab is renamed 「字段布局」 / Field layout, and says in one sentence where its groups and order are used: the record page, the right-side preview, and the create and edit dialogs. It reads and writes the object's field groups and nothing else; no form view is read or written there.
12+
13+
Group membership and order are saved in each group's own `fields` list. An object still written with a `group` on each field shows its groups as before, and its first save from the tab converts it to the lists, with nothing on the canvas moving.
14+
15+
On an object of an installed (read-only) package the tab is no longer read-only where the customization door is open: adding, renaming, deleting and reordering groups, dragging fields (a field another package brings included) and the group settings all edit the object extension of the base's paired `.custom` package, as the whole `fieldGroups` arrangement (every group listing its members), saved and published by the top bar's Save with the rest of that extension. The original package is not written. A field or group `place` entry of that extension, which a written arrangement replaces, is taken off on save; a tab placement stays. Each field card of an installed object is marked 「原始包」 / Original package, 「本环境」 / This environment, or with the package that contributes it. Where the door is walled the tab stays read-only, as before.
16+
17+
New Studio strings: `engine.studio.data.form.usedOn` and `engine.studio.designer.source.{base,baseTitle,environment,environmentTitle}` (en, zh); `engine.studio.data.form.layoutSource.*` is removed with the chip it labelled.
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/runtime': minor
4+
'@object-ui/i18n': minor
5+
'@object-ui/app-shell': minor
6+
'@object-ui/plugin-detail': minor
7+
'@object-ui/console': minor
8+
---
9+
10+
feat(i18n): console flow labels follow the server's declared fallback chain
11+
12+
Clause-②: yes (widening)
13+
Metadata-protocol: added
14+
Skills-docs: none — the new member is a response field the console reads, not something a metadata author writes; no skills/ page teaches `GET /i18n/locales` or how the console resolves flow labels
15+
16+
- **`GET /api/v1/i18n/locales` names the declared fallback chain.** `GetLocalesResponseSchema` (`@objectstack/spec/api`) gains an optional `fallbackChain: string[]`, and the runtime's `/i18n` domain fills it from the i18n service's `getFallbackLocale()` (the stack's `i18n.fallbackLocale`, else its `defaultLocale`), the same accessor the server's metadata translations hand the spec resolvers as `ResolveOptions.fallbackChain`. A service that declares no fallback (no accessor, or an empty answer, such as the core in-memory provider) serves no member. Nothing existing changes meaning.
17+
- **The console loads the fallback locale's flow translations.** The console's language loader reads the chain and `sourceLocale` beside the active language's bundle and, unless the language is the authored one, fetches each fallback locale's bundle and keeps its `flows` group (`withDeclaredFlowsFallback`, `@object-ui/i18n`).
18+
- **Flow labels walk the same locales as the server.** `activeFlowsBundle` returns the fallback locales' rows too, and the new `flowsResolveOptions` hands the spec resolvers `{ locale, fallbackChain, defaultLocale }`. The flow runner (flow name, field copy, option labels), the flow designer and docs viewer (`flowLabelTranslations`, `useFlowLabelTranslations`, which take the declared options) and the stage-change confirm now read a declared fallback locale's text for a label the active language lacks, before the authored label. A stack that declares no fallback keeps "requested locale, then the authored label".

0 commit comments

Comments
 (0)