Skip to content

Commit 57993ba

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-b809vx
Claude-Session: https://claude.ai/code/session_01QsR2jQyTLkpKcX2UF8X3Ss Co-authored-by: Claude <noreply@anthropic.com>
2 parents 7886347 + 35a9c69 commit 57993ba

162 files changed

Lines changed: 11551 additions & 405 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: 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 Korean
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `ko` beside `en`, `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr`, `pt-BR`, `ru` and `de`: 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 `ko` 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 `ko` in its `--locales`, so `check:i18n` now gates the new bundles. Package 11 of #30512, the last of its seven locales.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/metadata-protocol': patch
4+
---
5+
6+
feat(objectql, metadata-protocol): one package-scoped resolver for behavioural metadata, and one declared dependency closure for it and the save door (ADR-0150 D3/D4)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **`@objectstack/objectql`** exports `resolvePackageScopedName`, the resolution rule of ADR-0150 D3 for the metadata types addressed by `(package, name)` (`PACKAGE_SCOPED_TYPES`). A caller of package P is answered P's own item, else the unique holder in P's declared dependency closure plus the `sys` packages, else a refusal that names every candidate; a caller with no package is answered the environment's own item, else the unique package holder, else the refusal. Zero holders is `not-found`. The platform-requested name `guest_portal` resolves environment-wide whatever the caller. `SchemaRegistry` gains three read-only methods the resolver reads, `packageScopedHoldersOf`, `getPackageScopedItem` and `getEnvironmentScopedItem`, which apply the per-package overlay slot (ADR-0150 D4): a stored overlay binds to the package whose item it customizes, so it never shadows another package's same-named item there.
12+
- **`@objectstack/metadata-protocol`** exports `packageDependencyClosure`, a package's declared dependency closure (its manifest's `dependencies`, transitively, with an App's customization pair widened by the App's members). The save door's write scope now calls it, so the closure a write is judged against and the closure a name resolves in are one implementation.
13+
14+
Nothing changes for a running deployment: no reader calls the resolver yet, `getItem` keeps serving the bare slot first to every caller, the one-holder refusal of ADR-0048 §3.4 stays in force, and the save door admits and refuses exactly what it did.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): keep a single node's cloud binding credential under `OS_HOME`, so recreating the container does not disconnect it
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A self-hosted server kept its cloud binding credential in `.objectstack/cloud-connection.json` under its working directory, even with `OS_HOME` set. In a container the working directory is the image's own layer, so a restart kept the connection but a recreate (a compose recreate, an image upgrade) lost it: the server read as not connected and an online licence fell back to Community until someone connected it again.
11+
12+
- **Where it lives now.** With `OS_HOME` set, the file is `OS_HOME/cloud-connection.json`, beside the rest of the instance's state. With `OS_HOME` unset it stays at `.objectstack/cloud-connection.json` under the working directory, as before. The `credentialPath` option still wins over both.
13+
- **Upgrading.** The first start with `OS_HOME` set moves the old working-directory file into `OS_HOME`, keeps mode `0600`, and logs both paths once. When a file is already in `OS_HOME`, that one is the connection and the old file is left untouched. Nothing to do by hand.
14+
- **`os dev --fresh`.** The connection stays inside the run's temporary home, and the project's file is neither moved nor read.
15+
- Several replicas declared over the Redis cluster driver still keep the credential in the shared database row; the file the first scaled-out start moves into that row is now the `OS_HOME` one.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/service-storage': patch
3+
---
4+
5+
fix(storage): S3 chunked uploads find their object key in the upload session row, on any replica
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Chunked uploads to S3 work again. Who is affected: any deployment whose storage adapter is S3 (or S3-compatible) and whose clients upload in chunks (`POST /storage/upload/chunked`, the SDK's chunked and resumable uploads). Before this fix the first chunk answered `500` ("S3StorageAdapter: key not found for uploadId") even on a single server, and a chunk or completion served by another replica could never have found the key.
11+
12+
S3 addresses a multipart upload by object key and upload id, but the storage contract's chunk and completion calls carry the upload id alone, so the S3 adapter kept the key in an in-memory map filled at the start of the upload. The kernel's `storage` service is the swappable proxy, which did not forward that call, so the map was never filled; and a map in one process cannot serve another. The chunk and completion doors now read the key from `sys_upload_session.key` (the durable record the init door already writes) and hand it to the adapter before every backend call, and the proxy forwards `setUploadKey` to the active adapter.
13+
14+
Nothing changes for the local adapter or any adapter without `setUploadKey`, nor in the chunked-upload HTTP requests and answers. No migration: upload sessions already store their key.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the customizations read lists a moved edit under the package that serves it
6+
7+
Clause-②: no — what the customizations list holds for a moved edit; no accept set changes
8+
Metadata-protocol: none
9+
10+
When a later version of an App moves an item from one of its packages to another (an ADR-0130 D4 suite split, or its rollback), the tenant's edit of the item is served at the package that ships it now. `GET /packages/:id/customizations` (`listServedOverrides`) now lists that edit there too, and only there.
11+
12+
- **Before.** The list took a pair override's package from its declaration, the owner at the time of the edit. After a flat → composed split the edit was listed under the App, which no longer ships the item, and not under the module that serves it; after a rollback it was listed under neither.
13+
- **Now.** The list picks each item's row through the served reads' own candidates and predicates (`servedOverlayRowCandidates`, `holdsServedOverlayCandidate`, `isMovedOverrideRowOf`), so a package lists exactly the pair override its address serves. Same App is read only from the install record (`appOf` over the installed manifests), never from an id prefix; a row of another App's pair, or a declaration naming another App, is never listed.
14+
- **Unchanged.** An edit whose owner still ships the item is listed as before. The list stays the pair's rows: a row bound to a package of the App itself (saved before ADR-0146 D11) is listed under no package, before or after a move. The upgrade plan's override advice reads this list, so it follows the same rule. The item lock already reads every stored row of the item whichever package it is bound to, so it answers for a moved edit what it answers for an edit saved at the new owner; that is pinned, not changed.
15+
- **Nothing is written.** The read moves and rewrites no row.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security)!: a delegate can neither capture nor evict a direct grant beyond its scope
6+
7+
Clause-②: no (narrowing) — an edit that points a direct permission-set grant at another user is judged on both holders it touches, the user it takes the grant from and the user it gives the grant to, and an edit that re-names a stored grant's set is judged on the set it takes away as well as the set it grants, so a delegated administrator no longer moves a grant away from a holder outside its subtree or from a holder it cannot read, nor re-names a stored grant of a set outside its allowlist. Nothing is widened: no export, error code or status is added.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export of the package entry changes: a direct grant keeps its shape and meaning, each holder an edit touches is judged as a target user already is, and the set an edit takes away is judged as the removal of that grant already judges it. There is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing in the delegated-administration gate (`@objectstack/plugin-security`), only for a delegated administrator editing a stored direct grant's holder or set.
13+
14+
- **Rule.** A delegate can neither capture nor evict a direct grant beyond its scope (ADR-0090 D12). A delegated write on a direct permission-set grant is judged on every holder and every set it touches. An edit that points a stored grant at another user is judged on the holder it takes the grant from and on the holder it gives the grant to, each exactly as the gate judges a target user — through the caller's own read, and inside the subtree only through one of the subtree's business units. An edit that re-names a stored grant's permission set is judged on the set it takes away exactly as the removal of that grant judges it — the allowlist, the security catalog and strict containment — beside the set it re-names the grant to, judged as before.
15+
- **What a caller sees.** An edit with either holder outside the subtree, or a holder the caller cannot read, answers `403 DELEGATION_SCOPE_VIOLATION`, with the sentence and details of every target outside the subtree, whichever end it is. A re-name away from a set outside the allowlist answers the refusal the removal of that grant answers — `403 DELEGATION_SCOPE_VIOLATION`, "permission set '…' is not in the scope's allowlist", with that set in its details — and a re-name away from a set whose removal is refused on any other ground gets that refusal. The stored holder and the stored set are named only when the caller reads them. A stored grant that names no holder is moved only by a tenant-level administrator (`403 PERMISSION_DENIED`).
16+
- **Unchanged.** The judgment of the set an edit points a grant at; an edit that keeps both the holder and the set, an insert and a removal; a tenant-level administrator's writes; an organization administrator's writes, whose right creates and removes a grant and never edits one in place.
17+
- **Who moves.** A delegate can no longer move a direct grant away from a holder outside its subtree, nor re-name a stored grant of a set outside its allowlist. A holder it cannot read counts as outside its subtree, and a grant it could not remove it cannot re-name. Such a grant is moved or re-named by a tenant-level administrator, or removed and granted anew by an administrator whose boundary covers it.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/spec': minor
4+
'@objectstack/client': patch
5+
'@objectstack/cli': patch
6+
'@objectstack/verify': patch
7+
'@object-ui/auth': patch
8+
'@object-ui/console': patch
9+
---
10+
11+
fix(plugin-auth)!: under invite_only, a self-serve sign-up is admitted only by the invitation it presents
12+
13+
Clause-②: yes (narrowing) — under the `invite_only` audience posture an email-and-password sign-up for an invited address is admitted only when it presents that invitation's id as `invitationId`, and the address alone is refused `SELF_REGISTRATION_CLOSED`; a social OAuth creation is admitted by an invitation only when its identity provider verified the address. The sign-up request widens: `RegisterRequestSchema` and `RegisterRequest` gain `invitationId`, `SignUpData`, `RegisterForm` and the auth context's `signUp` gain it, and `os register` gains `--invitation`.
14+
Metadata-protocol: added — RegisterRequest gains the optional invitationId key (packages/spec/authorable-surface/api.json)
15+
16+
<!-- adr-0087: not-required (no-migration-prescription) No key is removed, renamed or re-shaped and no stored row is rewritten: RegisterRequest gains an optional key, and a sign-up under invite_only that does not present its invitation is refused with the posture's existing code and message. -->
17+
18+
**BREAKING** accept-set narrowing at the email-and-password sign-up door (`@objectstack/plugin-auth`), under the `invite_only` audience posture, the default.
19+
20+
A sign-up under `invite_only` presents the invitation it is admitted by: the invitation's id, the last segment of the `/accept-invitation/` link the invitation mail carries, sent in the `/sign-up/email` body as `invitationId` beside `email`, `password` and `name`. The invitation must be pending, unexpired and addressed to that email. Anything else is refused `403 SELF_REGISTRATION_CLOSED` with the same message an uninvited sign-up gets, and nothing is written.
21+
22+
**Upgrading.** A client that signs an invitee up sends `invitationId` beside the `email`, `password` and `name` it already sends. The one-line fix: send the id the invitation link carries as `invitationId`.
23+
24+
**Who moves.** Nothing in this repository: the Console, the SDK, the CLI, the `@objectstack/verify` harness and the test fixtures all present the id; a client outside it that signs invitees up under `invite_only`, such as a custom front-end or a script, sends the accept link's last path segment as `invitationId`.
25+
26+
**Operators.** Deploy the Console bundle together with the server; on a deployment with no mail transport, hand the invitee the link with the invitation's **Copy Invite Link** action; give an out-of-band recovery invitation row an `id` of your own, which the sign-up sends; and review accounts created before the upgrade that are unverified and hold or accepted an invitation.
27+
28+
- **Unchanged:** the first account of a new deployment, and the operator's own provisioning (admin create, SCIM, the boot command's seed), need no invitation. The `open` and `email_domain` postures match an invitation by address as before. A magic-link or email-OTP creation, whose own flow answers from the mailbox, matches by address; an SSO provider's creation is unchanged.
29+
- **Social OAuth under `invite_only`:** a creation through a social provider is admitted by an invitation only when the provider verified the address; otherwise it is refused with the same code as an uninvited sign-up.
30+
- **No mail transport:** hand the invitee the link with the invitation's **Copy Invite Link** action; it carries the id.
31+
- `@objectstack/spec`: `RegisterRequestSchema` declares the optional `invitationId`.
32+
- `@objectstack/client`: `auth.register()` sends it through, typed by the widened `RegisterRequest`.
33+
- `@objectstack/cli`: `os register --invitation ID`.
34+
- `@objectstack/verify`: the harness's `signUp` presents the invitation it seeds.
35+
- `@object-ui/auth`: `SignUpData.invitationId`, `RegisterForm`'s `invitationId` prop and the sixth argument of the context's `signUp` send it.
36+
- `@object-ui/console`: `/register` opened from an invitation link sends that link's id with the sign-up; so does `@object-ui/app-shell`'s `DefaultRegisterPage`, whose package now also exports `invitationIdOf`.

‎content/docs/deployment/cloud-connection.mdx‎

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ server, not by your browser: the code request, the polling, the connection
6969
itself and the disconnect. The server needs outbound HTTPS to the control-plane
7070
URL. Your browser only opens the approval link.
7171

72-
**The server's working directory is persistent.** The connection is stored in
73-
a file under the server's working directory,
74-
`.objectstack/cloud-connection.json` (see
75-
[What the server stores](#what-the-server-stores)). In the official runtime
76-
image the working directory is `/srv/app`. If that directory lives on the
77-
container's own filesystem, replacing the container loses the connection, and
72+
**The server's home is persistent.** The connection is stored in one file,
73+
`cloud-connection.json` in the server's home directory (`OS_HOME`), or
74+
`.objectstack/cloud-connection.json` under the working directory when
75+
`OS_HOME` is not set (see [What the server stores](#what-the-server-stores)).
76+
Point `OS_HOME` at a persistent volume, as the rest of the server's state
77+
already requires: if the file lives on the container's own filesystem,
78+
replacing the container (not just restarting it) loses the connection, and
7879
the server reads as not connected until you connect it again.
7980

8081
**The right people on each side.**
@@ -157,8 +158,17 @@ simply expires.
157158

158159
## What the server stores [#what-the-server-stores]
159160

160-
The connection lives in one file, `.objectstack/cloud-connection.json` under
161-
the server's working directory, written with mode `0600`:
161+
The connection lives in one file, written with mode `0600`:
162+
`OS_HOME/cloud-connection.json` when `OS_HOME` is set, otherwise
163+
`.objectstack/cloud-connection.json` under the server's working directory.
164+
165+
**Upgrading from a release that kept it under the working directory.** On the
166+
first start with `OS_HOME` set, the server moves
167+
`.objectstack/cloud-connection.json` from its working directory into
168+
`OS_HOME`, keeps mode `0600`, and logs both paths once. If a file is already in
169+
`OS_HOME`, that one is the connection and the old file is left untouched. A
170+
server started with `os dev --fresh` keeps its connection inside that run's
171+
temporary home and never moves the project's file.
162172

163173
| Field | What it is |
164174
|:---|:---|
@@ -207,8 +217,8 @@ every replica reads:
207217
If the read fails, the replica starts as an unconnected one would.
208218

209219
**Scaling out a server that is already connected.** The first start with
210-
several replicas declared moves the credential from
211-
`.objectstack/cloud-connection.json` into the row, when the row is still
220+
several replicas declared moves the credential from the server's
221+
connection file into the row, when the row is still
212222
empty, and logs where it moved it from. The file stays where it was but is
213223
not read again while replicas are declared. Scaling back to a single replica
214224
reads the file again, and the file does not follow connects or disconnects
@@ -263,8 +273,8 @@ What disconnecting **keeps**:
263273

264274
- **The runtime id.** Connecting again sends it along, so the cloud can attach
265275
the new connection to the same registration rather than a new one. To start
266-
over as a brand-new server, delete `.objectstack/cloud-connection.json`
267-
after disconnecting.
276+
over as a brand-new server, delete the connection file
277+
([What the server stores](#what-the-server-stores)) after disconnecting.
268278
- **Everything installed.** Disconnecting touches only the connection file.
269279
Packages already installed into this server stay installed and keep working.
270280

0 commit comments

Comments
 (0)