Skip to content

Commit ffe4e23

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-r2ii08
2 parents 7d661aa + 0d0c377 commit ffe4e23

127 files changed

Lines changed: 7366 additions & 871 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/plugin-sharing': patch
3+
---
4+
5+
feat(plugin-sharing): list the objects a sharing rule can take effect on
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
`SharingServicePlugin` mounts a read-only route, `GET /api/v1/sharing/shareable-objects`, for Setup's sharing-rule object picker. It answers `{ success: true, data: { objects } }`, each object `{ name, label, system }`, business objects first and then platform objects, each group by label.
11+
12+
An object is listed exactly when a sharing rule saved on it would take effect: the list asks the same check the save doors already ask (`SharingService.sharingRuleObjectRefusal`), so every object it leaves out is one a save refuses with `SHARING_NOT_ENABLED`. The platform's credential and session objects (sessions, linked accounts, API keys, verification tokens, two-factor rows, OAuth applications, tokens and consents, signing keys, secrets) are not listed.
13+
14+
Who may ask: the sharing-rule administrators, as `/api/v1/sharing/rules` admits them (`manage_sharing`, or the legacy `manage_platform_settings`, with an active organization). Anyone else is answered `403 PERMISSION_DENIED`, anonymous `401`. The route takes no query parameter and refuses one with `400 VALIDATION_ERROR`. With record-sharing enforcement off (`enforce: false`) it answers `501 NOT_IMPLEMENTED`.
15+
16+
`SharingRuleService` gains `listShareableObjects(context)`, the same list for in-process callers.
17+
18+
Nothing stored or authored changes; the `sys_sharing_rule` object field keeps its `object-ref` picker until the console's filtered picker lands.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
feat(plugin-list,app-shell): the console's object list keeps the page a reader turned to, in the address
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
- **`@object-ui/plugin-list`**: `ListView` gains two host props, `page` and `onPageChange`. Passing `page` makes the page controlled: the list reads it every render and asks for every move through `onPageChange` (the pager, the reset to page 1 when the object, filters, sort, search, grouping, page size or view change, and the clamp to the last reachable page when a load comes back empty past the end). A move to the page already shown calls nothing. Without `page` the list keeps its page itself, as before, and `onPageChange` only reports the move. Neither is a schema key.
12+
- **`@object-ui/app-shell`**: the console's object page keeps the list's page in the `uf__page` param of the list-state family (`LIST_PAGE_PARAM`, `parseListPageParam`), written with replace, so turning the page adds no history entry. Back from a record opened as a full page (the "Open as full page" arrow, a `page` object, a phone, where every record opens as a page and the card list turns the same page), a reload and a copied link all land on that page. Page 1 is no param, a value that is not a whole number from 1 up opens page 1, and "Reset to view" and the signed-out return link drop it with the rest of the list state. The page alone never makes an address read as a link that carries list state. The page's search-param writes now chain until the location moves, so a query change on page 2 and the reset to page 1 it causes no longer overwrite each other.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth): a refused SAML sign-in lands on the error URL, as OIDC does
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The SAML ACS (`POST /sso/saml2/sp/acs/:providerId`) used to redirect an account refusal (`account_not_linked`, `signup_disabled`, `unable_to_link_account`, `unable_to_create_user`, `email_not_verified`, `unable_to_create_session`) to the sign-in's success `callbackURL` with only `?error=`, so the user landed on the signed-in page without being signed in. A response over the size limit was sent to the app origin. Every SAML refusal now lands where the OIDC callback sends one: the sign-in's `errorCallbackURL`, or the platform's sign-in page when none was given. `error=` and `error_description` are unchanged. A successful sign-in still lands on `callbackURL`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os db orphans` sweeps details whose controlled-by-parent master is optional
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A `controlled_by_parent` object may declare its one master as an optional `master_detail` (`required: false`). `os db orphans` read only required masters, so a detail row of such an object that still named a master that no longer exists was never reported, and `--delete` never removed it. The sweep now reads that optional master too, judged by `controlledByParentMasterOf` from `@objectstack/spec/data`: a row naming a missing master is reported (and deleted with its cascade under `--delete`, after the pre-delete export), and a row that names no master is valid and is never listed. A lone optional `master_detail` on an object that is not `controlled_by_parent`, or one beside a required master, stays an ordinary reference: named, never deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): one-shot secret commands seal and open with the crypto provider `os serve` uses
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`os secret rewrap`, `os secret orphans` and the data migrations that compose the settings service (`os migrate files-to-references`, `os storage orphans`, `os migrate recompute-home-amounts`) used to build their own `LocalCryptoProvider`. On a deployment whose plugin registers a KMS- or Vault-backed provider as the `crypto-provider` service, they could open nothing `os serve` sealed, and a re-wrap could have re-sealed under the local key.
11+
12+
They now choose the provider with `os serve`'s own function. They read the host config's `plugins`, as `os serve` does without `--dev`:
13+
14+
- One plugin declares `providesServices: ['crypto-provider']`: the run boots it and seals and opens with the provider it registers.
15+
- Two plugins declare it: the run refuses before either initializes, and names both.
16+
- No plugin declares it: nothing changes. The run uses the local provider over the key that already exists, and never mints one.
17+
18+
The run fails closed and never falls back to the local key for a deployment that declares a provider. It refuses, names the provider, and writes nothing when:
19+
20+
- the declared plugin cannot boot in the run;
21+
- the declared plugin boots but registers no provider;
22+
- the host config, or one of its `plugins` entries, cannot be loaded.
23+
24+
`os secret rewrap` names the provider as the report's key source.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(console)!: the marketplace filters by business function, industry and solution type, and badges a beta package
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-interface-only ui/packages/i18n/src/namespaces/marketplace/index.ts#MarketplaceCatalogue) the console's own translation catalogues, served as this type by the marketplace namespace loader and as `en`/`zh`/… of `@object-ui/i18n/locales`: no Zod schema, no spec declaration and no stored metadata reads a translation key, so `objectstack migrate meta` has nothing to rewrite and the compiler (for typed catalogue access) or the rendered key (for a `t()` string) reaches every caller -->
12+
13+
- **Facet filters.** The marketplace page's single row of category chips is replaced by three facet filters, read from the marketplace taxonomy in `@objectstack/spec/marketplace`: solution type (a segment with All), business function and industry (toggle rows, any number of values). Values inside one facet combine with OR, the facets combine with AND, and both combine with the search box. Each value shows the count of loaded listings that carry it under the other facets' selection. A listing that declares no solution type counts as `app`, the spec's default. A facet no loaded listing carries is not drawn, so a catalog that does not serve the taxonomy yet shows no filter at all. Filtering stays on the client, over the page the catalog read loads.
14+
- **Badges.** A catalog card shows the listing's primary business function (the first it lists) and a Beta badge when its `maturity` is `beta`. The package Details page shows every business function in the listing's order, the industries, the solution type and the Beta badge. A value outside the spec's vocabulary is drawn nowhere; the old fallback that showed an unknown category's raw value is gone.
15+
- **Strings.** `@object-ui/i18n`'s marketplace catalogues drop the `marketplace.category.*` labels, a copy of the retired category enum, and gain `marketplace.businessFunction.*`, `marketplace.industry.*`, `marketplace.solutionType.*`, `marketplace.maturity.beta` and three facet headings (`marketplace.facet.*`) in every language. The console keys the labels by the spec enums' own values, and a test fails when a spec value has no label, or a catalogue labels a value the spec does not list.
16+
- **Wire.** The console reads the catalog row's `business_functions`, `industries`, `solution_type` and `maturity` columns, and no longer reads `category` or sends `?category=`.
17+
18+
**BREAKING** (`@object-ui/i18n`, the marketplace catalogues served by `@object-ui/i18n/namespaces/marketplace` and held by `en`, `zh`, `zhHant`, `ja`, `ko`, `de`, `fr`, `es`, `pt`, `ru`, `ar` of `@object-ui/i18n/locales`): the `marketplace.category` group is removed from every language. It was a copy of the retired category enum, whose values the spec no longer declares.
19+
20+
- FROM: `marketplace.category.crm`, `.erp`, `.hr`, `.finance`, `.project`, `.collaboration`, `.analytics`, `.integration`, `.automation`, `.ai`, `.security`, `.developer-tools`, `.ui-theme`, `.storage`, `.other`.
21+
- TO: no one-for-one replacement. A listing is now labelled by its facets: `marketplace.businessFunction.<value>`, `marketplace.industry.<value>` and `marketplace.solutionType.<value>`, keyed by the values of `MarketplaceBusinessFunctionSchema`, `MarketplaceIndustrySchema` and `MarketplaceSolutionTypeSchema` in `@objectstack/spec/marketplace`. Which facets an old category value becomes is `LEGACY_CATEGORY_MAPPING` in the same module.
22+
- Fix: delete a `t('marketplace.category.…')` call or an `en.marketplace.category` read, or label the listing's `businessFunctions` / `industries` / `solutionType` with the facet keys instead. A `t()` call that still names a removed key compiles (its key is a `string`) and renders the key itself.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
feat(plugin-auth): a "SCIM Credentials" entry in Setup > Access Control while SCIM is wired
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
- **`@objectstack/plugin-auth`** contributes a Setup navigation entry `nav_scim_credentials` ("SCIM Credentials") that opens `sys_scim_connection_credential`, the object the console's Mint Credential and Revoke Credential actions live on. It sits in the Access Control group after SSO Providers and carries the same gate (`manage_platform_settings`). It is contributed only while SCIM is wired, decided by `isScimWired()`, the same answer the `/admin/scim/mint-credential` door reads before it refuses 503, so the entry never opens a list whose Mint button can only fail. The mint and revoke doors keep their own platform-admin gate; the entry widens nothing. The SSO Providers entry is unchanged, and a deployment with neither SSO nor SCIM wired gets no plugin-auth Setup entry, as before.
12+
- **`@objectstack/platform-objects`** adds the label `apps.setup.navigation.nav_scim_credentials` to the Setup app's translation bundle in en, zh-CN, ja-JP, es-ES, zh-Hant and ar (a new published key, hence the widening arm).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the semantic migration entry `cbp-optional-master-admitted` states the current write rule for an empty optional master, and the security-service contract names the `ownerMayEdit` owner leg
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Migration entry `cbp-optional-master-admitted`.** Its `replacement`, and its paragraph in the protocol upgrade guide, still said that a write leaving an optional `controlled_by_parent` master empty is refused with 422. The write gate admits such writes since the owner rule landed (ADR-0055 §3 as amended): an insert that names no master is admitted and its creator owns the row; its owner and a holder of Modify All on the detail update or delete a row whose master reference is empty, and everyone else, View All included, is refused `403 PERMISSION_DENIED`; an update that empties a named master asks edit access on the master it leaves. Only a required master's empty stored reference is still refused with `422 MISSING_REQUIRED_FIELD`. This supersedes the sentence "Writes are unchanged: an insert or update that leaves the master reference empty is still refused with 422" in the `@objectstack/plugin-security` note of `.changeset/30905-cbp-optional-master.md`: that was the state before the write gate followed, and the rule above is the one that ships. The entry's `id`, `surface`, `reason` and `acceptanceCriteria` are unchanged.
11+
- **`ISecurityService.checkControlledByParentWrite` and `ControlledByParentWriteOutcome` (JSDoc).** Both now name the `sharing.controlledByParent.ownerMayEdit: true` opt-in (ADR-0055 §3 as amended 2026-10-26): a by-id update by the record's owner, not on behalf of another user, that does not empty an optional master, needs only read access to the master the record names, so the check answers `allow` for such an owner who can read it. Every other caller and every other write keeps the master-edit rule.
12+
13+
Text only: no schema, type, export or runtime answer changes.

‎content/docs/deployment/cli.mdx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ predicate/schema/binding mistakes that fail silently at runtime), and `os dev --
8282
| `os dev [package]` | | Start development mode with hot reload |
8383
| `os serve [config]` | | Start the ObjectStack server with plugin auto-detection |
8484
| `os db clean` | | Reclaim SQLite free space with a one-time `VACUUM` (ADR-0057) |
85-
| `os db orphans` | | Report detail rows whose required master-detail master does not exist; delete them only with `--delete` |
85+
| `os db orphans` | | Report detail rows whose master-detail reference names a master that does not exist; delete them only with `--delete` |
8686

8787
#### `os init`
8888

@@ -445,8 +445,11 @@ os db clean --database file:./data/app.db # explicit target
445445
446446
#### `os db orphans`
447447
448-
Reports the detail rows whose **required** `master_detail` master does not exist, and —
449-
only behind `--delete` — deletes them. **Report-only by default: without `--delete` it
448+
Reports the detail rows whose `master_detail` master does not exist, and — only behind
449+
`--delete` — deletes them. The master is a **required** `master_detail`, or the
450+
**optional** master of a `controlled_by_parent` object (its one `master_detail`, declared
451+
`required: false`); a row whose optional master is empty names no master, is valid, and
452+
is never listed. **Report-only by default: without `--delete` it
450453
writes no row or table and creates no file.** It is never run for you; nothing on any
451454
boot, upgrade, migrate or lifecycle path invokes it.
452455
@@ -459,7 +462,7 @@ where an operator acts on that report.
459462
The report lists each orphan's object, record id, field and missing master id, and the
460463
deeper detail rows its delete removes with it (the master-detail's own cascade). It
461464
also names, without ever deleting them, the dangling references on those objects that
462-
are not a required master-detail, and counts the references whose target could not be
465+
are not on such a master, and counts the references whose target could not be
463466
checked at all: unknown is not missing, and none of those rows is listed or deleted.
464467
465468
```bash

‎content/docs/permissions/sso.mdx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,17 @@ configure on the IdP side:
351351
### SAML sign-in flow
352352

353353
1. User enters their work email (or clicks the enterprise-login button).
354-
2. Client calls `POST /api/v1/auth/sign-in/sso` with `{ email, callbackURL }`.
354+
2. Client calls `POST /api/v1/auth/sign-in/sso` with `{ email, callbackURL }`
355+
(and optionally `errorCallbackURL`).
355356
3. The email **domain** is matched to the registered provider; the response is a
356357
redirect to the IdP's `entryPoint` carrying a signed `SAMLRequest`.
357358
4. The IdP authenticates the user and POSTs a SAML assertion back to the SP ACS
358359
URL; `@better-auth/sso` (samlify) validates the signature/timestamp, then
359360
creates a session and redirects to `callbackURL`.
361+
5. A refused sign-in redirects to `errorCallbackURL`, or to the platform's
362+
sign-in page when none was given, with `error=` naming the refusal: for
363+
example `account_not_linked` when the email belongs to an existing account
364+
this provider is not linked to. It never lands on `callbackURL`, as with OIDC.
360365

361366
> Signature, timestamp, and replay validation are handled by `@better-auth/sso`
362367
> (samlify). You only supply the IdP's signing certificate at registration time.

0 commit comments

Comments
 (0)