Skip to content

Commit 59c76e7

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-txk3tb
2 parents 4c502a1 + a5cb4f1 commit 59c76e7

66 files changed

Lines changed: 8832 additions & 231 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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
refactor(objectql): the `ObjectQL` constructor body moves into the hooks-and-functions facet
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- The constructor's body moves out of `engine.ts` into `engine-hooks-and-functions.ts` as `HooksAndFunctionsFacet.construct`. The constructor keeps its signature and does two things: it assigns `logger` (a field the compiler requires the constructor itself to assign) from `HooksAndFunctionsFacet.constructLogger(hostContext)`, then calls `construct` with the facet's host. Where the body handed the engine itself on (the package-enable summary refresh, the two env hardening flags), it reads the same engine through the host's `facade` entry.
11+
- No behaviour changes and nothing to do on upgrade: the same statements run in the same order. The built declaration files are unchanged; the source maps move.
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 Arabic
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `ar` beside `en`, `zh-CN`, `ja-JP`, `es-ES` and `zh-Hant`: 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. An administrator or developer reading the platform in Arabic no longer sees it in English. 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 `ar` in its `--locales`, so `check:i18n` now gates the new bundles. Package 11 of #30512, second of seven locales; `fr`, `pt-BR`, `ru`, `de` and `ko` follow.

‎.changeset/30889-os-mcp-connect.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): `os mcp connect` registers your environment's MCP server with Claude Code in one command
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`os mcp connect` finds the environment `os deploy` deploys to (`--env`, then the active environment for this control plane, then your organization's only one; several with no `--env` is refused, as deploy refuses) and runs `claude mcp add --transport http NAME https://ENV-HOST/api/v1/mcp`. The server is named after the environment (its slug, else its display name, else its id), so several environments can be registered side by side; `--name` overrides it.
11+
12+
- `--print` prints the endpoint and the `claude mcp add` line and runs nothing. For any other MCP client, add that endpoint as a remote HTTP MCP server in the client's own settings.
13+
- `--url http://localhost:3000` connects a self-hosted or local server instead, named `objectstack` like the `os dev` banner's Connect row. The banner now prints its line through the same builder, so the two stay one spelling.
14+
- No token is stored or handed to the client. Claude Code runs the environment's own OAuth: run `/mcp` in Claude Code and the browser shows the environment's sign-in and consent. The command prints where to revoke that grant (Account → Connect an AI Assistant in the environment's console).
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+
---
4+
5+
refactor(plugin-auth): the SCIM connection-id cap is derived from the exported service-principal prefix
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`POST /api/v1/auth/admin/scim/mint-credential` refuses a `connectionId` longer than 246 characters so the connection's audit actor `svc:scim:CONNECTION_ID` fits the 255 characters of `sys_audit_log.actor`. That cap was computed from the prefix spelled out a second time; it now reads the length of `SCIM_SERVICE_PRINCIPAL_PREFIX`, the constant the actor label itself is built from, so the two can no longer drift apart. Nothing a caller sees changes: the cap is still 246, and the refusal is still `400 INVALID_REQUEST`.
11+
12+
Exported (completing the record of the SCIM credential routes, whose release note names the routes only): two public `AuthManager` methods back them. `isScimWired()` answers whether the SCIM service provider is mounted on this deployment (the same decision that mounts `/scim/v2`), and `mintScimConnectionCredential(engine, input)` mints a connection bearer with the deployment's auth secret, the key the mounted SCIM verifier digests with.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
feat(runtime): `@objectstack/runtime` exports the package disable door's dependent-rule verdict, `readPackageDisableDependents`, and its sentence, `formatPackageDisableDependents`, with the `DisableDependentRule` type
6+
7+
Clause-②: yes
8+
Metadata-protocol: none
9+
10+
`readPackageDisableDependents(registry, packageId)` answers the validation rules a disable of the package would leave reading a field it adds through `objectExtensions`: each as `{ packageId, object, rule, fields }`, from any enabled package (declared dependent or not, an app's `.custom` pair included), ordered by package, object and rule. It reads the registry and writes nothing, and answers an empty list for a package that withholds nothing. `formatPackageDisableDependents(lead, dependents)` spells the refusal's message: `lead`, every rule as `package · object · rule (reads FIELD, …)`, then the remedy.
11+
12+
They are the same two functions `PATCH /packages/:id/disable` and `POST /packages` with `enableOnInstall: false` ask, now on the package entry, so a host door that takes a package out of service another way (a control plane's per-install disable, a soft-disable uninstall) asks the same scan before its write and answers the same `409 PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE` (the code is in the `@objectstack/spec` error-code ledger) instead of keeping a second copy. Nothing existing changes: every door answers exactly as before.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the security-service contract describes an empty optional `controlled_by_parent` master reference
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Documentation only; no type, export or behaviour changes. Since ADR-0055 §3 as amended on 2026-11-07, a `controlled_by_parent` object may have one optional master, and a row whose optional master reference is empty is written by its owner or by a holder of Modify All on its object. The JSDoc of `ISecurityService.checkControlledByParentWrite` and its outcome types now says so:
11+
12+
- `ControlledByParentWriteDenialLeg`'s `master_chain` also covers the record whose own optional master reference is empty, refused to a principal who neither owns it nor holds Modify All on its object, and a master above it whose optional master reference is empty, which ends the chain under that row's owner rule. Only a required master's empty reference above the record is the chain-walk refusal the old text described.
13+
- `ControlledByParentWriteUnresolvedReason`'s `master_reference_missing` is a stored **required** master reference left empty; an empty optional one answers `allow` or `deny` on `master_chain`.
14+
- `ControlledByParentWriteOutcome`'s `allow` and the member's own description name the owner rule beside edit access to the master.

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,17 @@ jobs:
521521
# narrower audits entry is left as the package that declared it
522522
# spelled it, exactly as the two narrower `skills/` entries were.
523523
- 'docs/**'
524+
# @objectstack/mcp's src/skill-md.test.ts imports the Console's
525+
# "Download skill" mirror and pins it byte-identical to the
526+
# SKILL.md the server renders (#31017) -- the server's half of the
527+
# drift pin ui/apps/console/src/pages/developer/
528+
# objectstack-skill.test.ts carries since #30865. That Console
529+
# half runs only when Test UI starts, which a diff confined to
530+
# packages/mcp never does; this half runs in Test Core on every
531+
# packages/mcp change, `core` already starting it. Verbatim per
532+
# the declaration, one file: a mirror-only diff starts Test Core
533+
# here and `--union-into` adds @objectstack/mcp to it.
534+
- 'ui/apps/console/src/pages/developer/objectstack-skill.ts'
524535
# The objectui tree, the root files the ui jobs build from, and the
525536
# five paths outside ui/ that the ui jobs' gates and tests read
526537
# (objectstack#25712):

‎content/docs/api/error-catalog.mdx‎

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -181,28 +181,40 @@ substitute. See the [Data API](/docs/api/data-api).
181181
### `MISSING_REQUIRED_FIELD`
182182
**Cause:** A required field was not provided in the request body.
183183
**Fix:** Include the missing field. Check `fields` for the field name — **except** on the
184-
`controlled_by_parent` stored-master path below, where the status is `422` and no `fields`
184+
`controlled_by_parent` stored required-master path below, where the status is `422` and no `fields`
185185
array is sent; read the field name out of the message there.
186186
**Retry:** `no_retry`
187187

188188
<Callout type="warn">
189189
**`MISSING_REQUIRED_FIELD` is `400` with one exception: a `controlled_by_parent` detail
190-
whose stored master reference is null answers `422`, without `fields`.**
190+
whose stored reference to a required master is null answers `422`, without `fields`.**
191191

192192
An object whose `sharingModel` is `controlled_by_parent` derives its access from a master
193193
record, so the gate authorizing writes to it resolves that master *before* the executor —
194194
and the executor is where required-field validation runs. An update or delete **by id** of
195-
a detail record whose *stored* master reference is null answers
196-
`422 MISSING_REQUIRED_FIELD`, whatever the declaration: the caller sent no such field, so
197-
nothing could be named in `fields` and no payload would fix it.
195+
a detail record whose *stored* master reference is null, where the master is declared
196+
`required: true`, answers `422 MISSING_REQUIRED_FIELD`, whether or not the master is marked
197+
`readonly` or `system`: the caller sent no such field, so nothing could be named in `fields`
198+
and no payload would fix it.
199+
200+
An optional master never answers this code. When the object's only `master_detail` is
201+
declared `required: false` (an optional master, ADR-0055 §1 as amended), a stored empty
202+
reference is not an error: the row belongs to no master and is its owner's. Its owner and a
203+
holder of View All on the detail read it; its owner and a holder of Modify All on the detail
204+
update or delete it. Everyone else who reaches the gate, View All included, is refused
205+
`403 PERMISSION_DENIED`; a principal who cannot read the row meets the read door first
206+
(`404 RECORD_NOT_FOUND`), as for every hidden row.
198207

199208
A request that leaves the master reference out, or empties it, does not answer this code.
200-
On a `master_detail` that is `required` and neither `readonly` nor `system`, validation
201-
answers it with the documented `400 VALIDATION_FAILED` and `fields`. A master reference
202-
marked `readonly` or `system` is not one an author's write supplies, so it cannot be the
203-
master (ADR-0055 §1): `ObjectSchema` refuses that declaration at parse
204-
(`master-not-writable`), and on an object that reaches the runtime without the parse, every
205-
write that sets the reference answers `422 INVALID_METADATA`:
209+
On a `master_detail` that is `required: true` and neither `readonly` nor `system`, validation
210+
answers it with the documented `400 VALIDATION_FAILED` and `fields`. On an optional master
211+
an insert that leaves it out is not refused, and its creator owns the row; an update that
212+
empties it is judged by the master it leaves, asking edit access on it
213+
(`403 PERMISSION_DENIED` without it). A master reference marked `readonly` or `system`,
214+
required or optional, is not one an author's write supplies, so it cannot be the master
215+
(ADR-0055 §1): `ObjectSchema` refuses that declaration at parse (`master-not-writable`), and
216+
on an object that reaches the runtime without the parse, every write that sets the
217+
reference answers `422 INVALID_METADATA`:
206218

207219
- every insert, single or batch, whether or not it names a master;
208220
- every update whose body carries the reference key, whatever the value, `null` included.
@@ -211,19 +223,24 @@ Its message starts `[Security] Configuration defect:` and carries the parse's ow
211223
naming the object, the field, the flag and the fix. A delete, and an update that leaves the
212224
key out, are answered as on any detail.
213225

214-
A `master_detail` with no `required`, and a `required` `lookup` on an object that declares no
215-
`master_detail`, are not master references at all: the master is exactly one `master_detail`
216-
declared `required: true` (ADR-0055 §1). `ObjectSchema` refuses such an object at parse, and
217-
one that reaches the runtime unparsed answers every write `422 INVALID_METADATA`.
226+
The master is exactly one `master_detail`: the one declared `required: true`, or, when the
227+
object declares none, its only `master_detail` declared `required: false` (ADR-0055 §1 as
228+
amended). Two `master_detail` fields with none required, two required ones, and a
229+
`required` `lookup` on an object that declares no `master_detail` name no master at all:
230+
`ObjectSchema` refuses such an object at parse, and one that reaches the runtime unparsed
231+
answers every write `422 INVALID_METADATA`. Write `required` on the master either way:
232+
`ObjectSchema.create()` forces an omitted one to `true` and `os lint` reports the omission
233+
at `error`, while a raw parse reads it as `false`, the optional master.
218234

219235
The full matrix is on the protocol page:
220236
[`MISSING_REQUIRED_FIELD`](/docs/protocol/kernel/error-handling#missing_required_field).
221237

222238
The `INVALID_METADATA` refusal is not going to be relaxed: required-field validation skips
223239
`system` and `readonly` fields before its required check, so on those two declarations the
224-
gate is the only thing standing between the request and a detail record outside its master
225-
— which the `controlled_by_parent` read filter (`fk IN (readable masters)`) can never match,
226-
leaving a record readable by nobody.
240+
gate is the only thing standing between the request and, under a required master, a detail
241+
record outside its master — which the read filter of a required master
242+
(`fk IN (readable masters)`, with no arm for an empty reference) can never match, leaving a
243+
record readable by nobody.
227244

228245
**Branch on `code`, treat `fields` as optional, and read the status off the response**
229246
rather than deriving it from the table at the end of this page.
@@ -1011,7 +1028,7 @@ async function handleApiCall() {
10111028
| 404 | `not_found` | `RECORD_NOT_FOUND`, `OBJECT_NOT_FOUND`, `ENDPOINT_NOT_FOUND` |
10121029
| 409 | `conflict` | `CONCURRENT_MODIFICATION`, `UNIQUE_VIOLATION`, `DELETE_RESTRICTED` |
10131030
| 413 | `validation` | `PAYLOAD_TOO_LARGE` — an upload over the storage settings' `max_upload_mb`, or an import over its row ceiling (see [above](#payload_too_large)) |
1014-
| 422 | `validation` | `MISSING_REQUIRED_FIELD` on a `controlled_by_parent` detail whose stored master reference is null (see [above](#missing_required_field)) — this row is an exception to the 400 row, not a second home for the code |
1031+
| 422 | `validation` | `MISSING_REQUIRED_FIELD` on a `controlled_by_parent` detail whose stored reference to a required master is null; an optional master's empty reference is not an error (see [above](#missing_required_field)) — this row is an exception to the 400 row, not a second home for the code |
10151032
| 429 | `rate_limit` | `RATE_LIMIT_EXCEEDED`, `QUOTA_EXCEEDED` |
10161033
| 500 | `server` | `INTERNAL_ERROR`, `DATABASE_ERROR` |
10171034
| 501 | `server` | `NOT_IMPLEMENTED` — the storage routes answer it when the adapter cannot issue presigned URLs |

0 commit comments

Comments
 (0)