You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5839005
Browse filesBrowse the repository at this point in the historyBrowse files
Merge origin/main (#35225 expand and related reads) into the aggregate order and cut
One conflict, in packages/mcp/src/stdio-data-bridge.ts, resolved keeping
both sides: the two Symbol.for read-option constants (this branch's
STDIO_AGGREGATE_ORDER_CUT and #35199's STDIO_LATEST_PER), each under its
own docblock, then #35225's stdioExpandMap byte-identical to main, then
unwrapRows under its own docblock. mcp-http-tools.ts and runtime
domains/mcp.ts merged without conflict.
Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8
Co-authored-by: Claude <noreply@anthropic.com>
feat(scenarios): `--modes door` builds a card through the MCP draft door with no project, then publishes it as a person would
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The runner gains a fourth mode. A door mode turn is given the booted app's MCP draft door (an OAuth token scoped `openid metadata:write`, in a 0600 config outside its directory), an empty directory of its own outside the host project, and nothing else: file and command tools are denied. The runner then does what a person does in Studio: it creates a writable package in the card's namespace before the turn, and lists and publishes that package's drafts after it (`POST /api/v1/packages/:id/publish-drafts`). It grades what the environment then serves exactly as a scratch build is graded, Build half then Run half. A publish that does not answer `published` is a finding naming each refused draft, since a refusal answers on a 200.
11
+
12
+
A round measures what instruction text is worth by arms. `--door-skills DIR` (less `--door-skill-omit`) gives the client Claude Code skills. `--door-rules FILE` or `OS_SCENARIOS_DOOR_RULES` (less `--door-rules-omit`) gives it rule texts the maintainer supplies from outside the repository, in a documented `{ rules: [{ id, text }], sets }` format that is refused loudly when malformed. The record states the arm (skills with sha256, the rules file's name and sha256, the ids active and omitted, never a text), and `summary` never sums two arms. A replay re-sends the recorded draft saves through the replay's own door. Codex and external drivers are refused for door mode.
fix(plugin-dashboard): the dashboard table widget no longer offers an "Export CSV" download
7
+
8
+
Clause-②: no
9
+
Metadata-protocol: none
10
+
11
+
The dataset table and cross-tab widgets drew a download button that built a CSV in the browser. That file skipped the export grant and the export audit entry that list export enforces. The button, its CSV helpers and the `dashboard.exportCsv` label in every locale pack are removed. To take rows out, use list export, which checks the export grant and writes the audit entry. Report exports are unchanged.
feat(auth): `directSignIn.afterSignOut` lets an explicit sign-out return through the identity provider's sign-in page
8
+
9
+
Clause-②: yes (widening)
10
+
Metadata-protocol: added
11
+
12
+
A deployment with direct sign-in on can now choose where an explicit sign-out returns once the identity provider has ended its own session. The default keeps today's behaviour, so nothing changes until a deployment sets the new value.
13
+
14
+
- The auth plugin's `directSignIn` option takes `afterSignOut: 'hold' | 'identity-provider'`, and the environment variable `OS_AUTH_DIRECT_SIGN_IN_AFTER_SIGN_OUT` wins over it, like the other direct sign-in settings. `hold` is the default. Any other value refuses to boot, naming the variable and both values.
15
+
-`GET /api/v1/auth/config` serves `features.afterSignOut` while the direct sign-in setting is on, on the same terms as `features.localSignIn`, and leaves it out otherwise. `AuthFeaturesConfigSchema` in `@objectstack/spec` gains the optional `afterSignOut` enum, and `PUBLIC_AUTH_CONFIG_NON_FLAG_KEYS` gains `'afterSignOut'`.
16
+
-`hold`: the Console's sign-out sends the sign-in page as the provider's return address, and the page holds with a button to sign in again, as before.
17
+
-`identity-provider`: while `features.directSignIn` reads `true`, the Console's sign-out sends `{basePath}/sign-in/direct` instead, so after the provider's logout the browser goes through the direct sign-in door to the provider's own sign-in page. The door starts a fresh sign-in without the browser's cookies, and the provider has just ended its session, so it asks for credentials; it does not loop. Register the door's absolute address as a post-logout redirect URI at the provider.
18
+
-`@object-ui/auth`: `AuthPublicConfig.features` gains the optional `afterSignOut`. When the tab holds no auth config at sign-out, the client reads it once (3 seconds at most) and keeps the sign-in page if it cannot.
19
+
- Module exports on the `@objectstack/plugin-auth` entry: the type `DirectSignInAfterSignOut`. In `direct-sign-in.ts` (not on the package entry): `DIRECT_SIGN_IN_AFTER_SIGN_OUT`, and `DIRECT_SIGN_IN_ENV.afterSignOut`.
fix(plugin-auth): an invitation mail sent outside a better-auth endpoint still carries the mailbox proof
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
A host that calls the organization plugin's `sendInvitationEmail` from its own code, outside any better-auth endpoint, now sends the same mail the console's invite sends: its link carries the invitation's mailbox proof, so the invitee can use the one-step acceptance from it. The proof is minted through the auth manager's own context when no endpoint context exists. Nothing else changes: the proof is still delivered only in the mail and never stored in clear, and a send inside an endpoint mints exactly as before.
feat(mcp): a record with its related records in one call — `expand` on `query_records`, `related` on `get_record`
7
+
8
+
Clause-②: yes (widening)
9
+
Metadata-protocol: none
10
+
11
+
`query_records` takes `expand`: up to 3 of the queried object's lookup, master-detail, user or tree fields, each answered as the record it names, one level deep. `get_record` takes `related`: up to 3 child objects that point at the record, each answered as a list of at most 20 rows (never above the tool's `maxQueryLimit`), as `{ record, related: [{ object, field, records, total, hasMore }] }`.
12
+
13
+
- Every object a new read shape reaches is judged by the MCP read guard exactly as the object the call names. A target the guard refuses refuses the whole call with `PERMISSION_DENIED` / 403 before any record is read. A related object whose definition is not served to the caller refuses it with `OBJECT_NOT_FOUND` / 404, also before any read.
14
+
- An `expand` name that is not a relationship field of the object as the caller is served it, and a `related` link `field` that does not point at the record, are refused with `INVALID_FIELD` / 400 before any read. A child that points at the record through several fields needs `field`.
15
+
-`expand` runs through the engine's one expansion path: one batched `id IN (...)` read per field, under the target's own permissions, row-level security and field masking. It combines with `latestPer`. Only the read guard's refusal refuses the call: a record the caller may not read on an admitted target object is not expanded, and the field keeps its stored id.
16
+
- A related list is one `query_records` read of the child, filtered only by the link to the record, with the child's own `fields` and `orderBy` and no caller filter. It is read only after the record itself. A list with more rows than its cap carries `truncated: true`.
17
+
- Each related list carries the delegation notice `query_records` carries (`delegationNarrowed`, `warning`) when the agent ceiling narrowed the read.
18
+
- The record and each related list carry `withheldFields` exactly as a plain `get_record` and a plain `query_records` of that object do.
19
+
- The stdio bridge serves `expand` too, built as the data door builds it (a target that does not serve `get` keeps its stored id). `McpDataBridge.query` gains an optional `expand` member.
20
+
21
+
Without `expand` or `related`, both tools answer exactly as before. `@objectstack/spec` is unchanged.
fix(plugin-detail): a record page's empty-sections line follows the reader's remembered "show empty fields" choice
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
A reader who chose "show empty fields" for an object found the record page's closing empty-sections line ("Deal Narrative · Notes & Next Steps · 2 empty sections · Expand") folded again on every visit, on the default record page and on an authored one alike, and expanding the line was forgotten as soon as the page closed.
11
+
12
+
The line now reads and writes the same remembered choice each section's own "Show N empty fields" row already uses, kept per user and object. With "show empty fields" remembered, the line opens on its own, on both page kinds. Expanding or collapsing the line is that choice: it is remembered for every record of the object, after a reload and on another device, and it also opens or folds each section's own empty fields, since it is one choice.
13
+
14
+
What does not change: with no signed-in user or no host preference store, the line keeps its own state, forgotten when the page closes, as before. Edit mode and a print page still draw every section. No metadata key, value or default changes.
Copy file name to clipboardExpand all lines: content/docs/ai/connect-mcp.mdx
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,7 +269,7 @@ service is installed:
269
269
|:---|:---|
270
270
|`list_objects` / `describe_object`| Discover which objects exist and their fields |
271
271
|`validate_expression`| Check a CEL expression against an object's schema before authoring it into a formula, validation, or flow condition |
272
-
|`query_records` / `get_record`| Read data (list queries are capped at 50 rows per page by default) |
272
+
|`query_records` / `get_record`| Read data (list queries are capped at 50 rows per page by default); `expand` and `related` read related records in the same call|
273
273
|`aggregate_records`| Grouped aggregation (registered when the active driver supports it) |
274
274
|`create_record` / `update_record` / `delete_record`| Write data |
275
275
|`delete_records`| Delete many records of one object, by a filter or an id list, at most 200 per call (an OAuth token needs both `data:read` and `data:write`) |
@@ -313,6 +313,55 @@ names the groups and the order that picks each group's row:
313
313
is read, as it is for an object with an `afterFind` hook or object-scoped read
314
314
middleware.
315
315
316
+
### A record with its related records: `expand` and `related`
317
+
318
+
`query_records` takes `expand`: up to 3 of the object's lookup, master-detail,
319
+
user or tree fields. Each one comes back as the record it names, one level
Copy file name to clipboardExpand all lines: content/docs/deployment/environment-variables.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ Read by `@objectstack/service-print` when `PrintServicePlugin` is composed; see
105
105
|`OS_AUTH_DIRECT_SIGN_IN_ENABLED`| boolean |`false`| Send a signed-out visitor to the Console sign-in page straight to the identity provider, and back to the page they asked for. Wins over the auth plugin's `directSignIn` option. The sign-in page is still shown when no single provider can be started, after an identity-provider error, and for an OAuth client's hand-off. See [Skip the sign-in page](/docs/permissions/sso#skip-the-sign-in-page-direct-sign-in). |
106
106
|`OS_AUTH_DIRECT_SIGN_IN_PROVIDER`| string | the one configured provider | The `providerId` direct sign-in uses: an `oidcProviders` entry or a registered SSO provider. Unset, the only configured provider is used; with none or several, the sign-in page is shown. |
107
107
|`OS_AUTH_DIRECT_SIGN_IN_LOCAL_PATH`|`hidden`\|`off`|`hidden`| With direct sign-in on, whether the Console sign-in form keeps the password form at `/login?local=1` (`hidden`) or offers no local way in (`off`). Server-side password sign-in is unchanged either way. Any other value refuses to boot. |
108
+
|`OS_AUTH_DIRECT_SIGN_IN_AFTER_SIGN_OUT`|`hold`\|`identity-provider`|`hold`| With direct sign-in on, where an explicit sign-out returns when the identity provider ends its own session: the Console sign-in page, which holds (`hold`), or the direct sign-in door, so the identity provider's own sign-in page is shown (`identity-provider`). Wins over `directSignIn.afterSignOut`. Any other value refuses to boot. |
108
109
|`OS_TENANCY_POSTURE`|`single`\|`group`\|`isolated`| derived from `OS_MULTI_ORG_ENABLED`| Which organization wall the authorization kernel enforces (ADR-0105 D1). `single` = no wall. `group` = `organization_id IN accessible_org_ids` — organizations are membership boundaries over one shared dataset, with union read access across every organization the caller belongs to. `isolated` = `organization_id = <active organization>`, the hard legal-entity wall (formerly spelled `multi`). Unset derives from `OS_MULTI_ORG_ENABLED` (`true` ⇒ `isolated`, else `single`), so existing deployments are unchanged. An unrecognized value **refuses to boot** rather than silently falling back to a posture with no wall. Both walled postures require the enterprise `@objectstack/organizations` runtime — without it the request resolves to `single` and boot is refused unless `OS_ALLOW_DEGRADED_TENANCY=1`. |
109
110
|`OS_MULTI_ORG_ENABLED`| boolean |`false`| Superseded by `OS_TENANCY_POSTURE`, and still honoured: `true` selects the `isolated` posture. When `true`, organization creation/switching UI is exposed. |
110
111
| `OS_AUTOMATION_SCHEDULED_WORK_ENABLED` | boolean | `false` | Whether this deployment runs **package-authored scheduled work**: time-triggered flows (a `type: 'schedule'` flow with a `config.schedule` cadence, and the `timeRelative` sweep) and packaged `defineJob` cron jobs. **OFF by default in every posture and every kernel** — a clock-driven workload's cost is a fact about the deployment, not about the flow, so an author cannot decide it and no metadata key asks them to. Accepts `true`/`1`/`on`/`yes` (case-insensitive); anything else, including unset, is off. While it is off nothing arms, and every such flow is listed by `getTriggerBindingAudit()` and the CLI startup summary as **disabled by deployment policy** — never as a binding failure, and nothing about the flow needs fixing. While it is on, what a time-triggered flow owes depends on the posture: under `isolated` it must declare `config.organization` on its start node or it is not armed; under `group` the declaration is optional and an undeclared sweep reads group-wide with each run acting as its own swept record's organization (a record-less cron there carries none, and its tenant-scoped writes are refused — declare one if it writes); under `single` it needs no declaration and its runs carry no organization. ⛔ Platform-internal scheduled work — approvals escalation, the lifecycle Reaper, the messaging dispatch loop, membership backfill — is **not** gated by this: the boundary is *authored by a package*, not *runs on the job service*. `os doctor` prints the effective value. |
0 commit comments