Skip to content

Commit ecd9e41

Browse files
committed
Merge origin/main into claude/issue-28404-override-declaration
Takes the sibling spec cards that landed since the last merge; the generated artefacts are regenerated from the merged tree in the next commit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
2 parents e8d402b + bede9de commit ecd9e41

111 files changed

Lines changed: 6883 additions & 736 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/connector-mcp': minor
3+
'@objectstack/service-automation': minor
4+
---
5+
6+
feat(connector-mcp): an OAuth-protected MCP server is connected through the MCP authorization flow and dispatched with each organization's token (ADR-0143 S2, part of #26702)
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: semantic
10+
11+
ADR-0143 lets a `provider: 'mcp'` instance over an http transport declare `auth: { type: 'oauth2', grant: 'authorization_code' }` and leave its endpoints, and its client, to discovery. Until now such an instance was held degraded, and the `mcp` provider did not ask the credential handle. Now:
12+
13+
- **The connect runs the MCP authorization flow** (`@objectstack/service-automation`). When an administrator begins a connect, the server reads the MCP server's protected-resource metadata (RFC 9728), then its authorization server's metadata (RFC 8414, or OpenID Connect discovery). The `issuer` must be the one the server named, and `S256` must be listed. A declared `clientId` is used as is (the pre-registered form). Otherwise a public client is registered (RFC 7591) for the deployment's redirect URI. Every authorization and token request carries the server's resource indicator (RFC 8707), PKCE stays on, and a callback that names another issuer is refused before its code is used (RFC 9207). Every URL on the way must be https (plain http only to a loopback host). No request follows a redirect.
14+
- **The connection keeps its client.** `sys_connector_connection` gains `registered_client`, an encrypted, masked field holding the discovered endpoints, the client id, and any client secret the registration issued (a declared client's secret stays behind its `credentialRef`). Refreshes use it, and a reconnect reuses it instead of registering again.
15+
- **The `mcp` provider asks the credential handle** (`@objectstack/connector-mcp`). The plugin registers it with `{ credentialHandle: true }`. Over http, every request of the MCP session goes through a fetch that asks the handle. A `401` refreshes once and is sent once more; a second `401` fails the call with the `503` naming the instance. Each organization a dispatch runs for gets its own MCP session and token. The tools are listed at materialization, outside any run, with the connection connected earliest (`connected_at`, ties by organization id), so an instance several organizations connected still lists; when that connection is revoked, refused or connected again, the instance materializes again and lists with the next one. A dispatch whose run names no organization is answered as before: from the only connection, or refused with `422` when there are several. A handle on a stdio transport, or beside a static credential, is refused.
16+
- An `oauth2` instance on `mcp` whose transport URL is not https is held degraded, and a `client_credentials` one still needs its declared endpoints.

‎.changeset/27524-record-top-bar.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/plugin-detail': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
feat(app-shell): one top bar above the record header on every face — the breadcrumb on the left; the counter with ↓ ↑, ⊟, ⤢ / ⤡ and ✕ on the right, each only where it applies
9+
10+
Clause-②: yes (widening: `@object-ui/components` gains `RecordTopBar`, `RecordTopBarButton`, `useRecordStepKeys` and the types `RecordTopBarProps` and `RecordTopBarStepper`, `NavigationOverlay` gains an optional `toggles` prop and its `stepper` an optional `position` and `scope`; `@object-ui/i18n` gains `detail.recordOfScope`, `detail.relatedFilter`, `detail.relatedChips`, `detail.relatedChipAll`, `detail.relatedChipMine`, `detail.relatedChipOverdue`, `detail.relatedExport` and `detail.relatedRows` in all ten locales; no export retires and no accept set moves)
11+
Metadata-protocol: none
12+
13+
The record page v4 draws one 40 px top bar above the record header, on every face: the full page, the split pane, the overlay drawer, the maximized pane and a phone. The bar holds the frame controls. The record header's action row keeps the business actions only.
14+
15+
- **Left: the breadcrumb.** At the root it reads 「对象 › 记录名」 (for example 「Leads › Mira Costa」). The object returns to the list: in a pane it closes the pane, and on a page it goes to the list the page was opened from, or to the object's list. One level down in a pane, the bar keeps 「← 路径」 as before. A page opened under a `?from=` trail shows ← and the same path, and each ancestor links to its page.
16+
- **Right, in a fixed order.** First the counter 「3 / 21」 and ↓ ↑. Its tooltip names the list's view. Then ⊟, then ⤢ / ⤡, then ✕. Each control is drawn only where it applies:
17+
- In a pane, the counter and ↓ ↑ show whenever the pane has a list context. ✕ shows on the pane faces only, and it closes the whole path.
18+
- On a page, the counter and ↓ ↑ show only for a page a list opened: the row's ↗, or a row click or record link on a list whose rows open as pages. ↓ ↑ and `j` / `k` step through that list's rows: a step replaces the page with the sibling's page. The arrow keys still scroll the page.
19+
- ⤡ 「收为抽屉」 (Collapse to drawer) shows only for a page the row's ↗ opened. It returns to the list with the record you stepped to open in the pane.
20+
- A page opened directly shows only ⊟.
21+
- While a pane is open over a page, the pane owns `j` / `k`.
22+
- **⊟ moves into the bar.** The right-column switch (「右栏」, ⌘⇧,) leaves the record header's action row. It is drawn in the top bar only where the face's tier has a right column. In a pane, the record puts it into the pane's own bar. A host's plain overlay without the console's pane keeps it at the end of the header's action row.
23+
- **The crumb row goes.** The row above the record header that held 「‹ origin」 and 「Collapse to drawer」 is removed. Both now live in the top bar.
24+
- **The enlarged related list draws a toolbar.** When a related list is the active tab, it draws a toolbar over the table instead of the related list's card header and foot. The toolbar holds a filter input, the chips 全部 N / 我的 / 逾期, the child object's toolbar actions, 新建 and 导出, and a 「N 条 · 第 x / y 页」 line sits above the table. 我的 is drawn where the child object has an `owner_id` column. 逾期 is drawn where the child object declares a deadline (`dueLike: true` on a `date` or `datetime` field) with no `settledWhen`, because no query can ask which deadlines are settled. 导出 downloads a CSV through the server with the same parent, filter, chip, filter text and order the table shows.
25+
- **动态 count on a deep link.** A link that opens the record on another tab, or a page with the right column switched off, still shows the 动态 tab's count. The count comes from the feed the page already holds; it starts no read of its own.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/service-storage': patch
3+
---
4+
5+
fix(service-storage): `sys_file`'s file-reference columns (`ref_object`, `ref_id`, `ref_field`, `released_ref_object`, `released_ref_id`) are owned by the file-reference lifecycle and can no longer be set or changed by a write that does not come from it
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) A data-door write to five lifecycle-owned sys_file columns is no longer applied: no key of any metadata schema is removed, renamed or re-shaped, no export, type or error code is removed or renamed, and no write is refused (an update keeps the stored values, a create starts with none of them). There is nothing for `objectstack migrate meta` to rewrite and no tombstone. -->
11+
12+
The five columns that record which record and field hold a file, and which record last let it go, take the same form as the five storage-owned columns:
13+
14+
- **Update.** They are now `readonly` on `sys_file`. A non-system update, by id or by predicate, keeps the values the lifecycle wrote and lands the rest of the payload; the write answers as before and the engine logs the dropped column at `warn`, as it does for every read-only column. A caller that passes `strictReadonlyWrites` is refused with `ERR_READONLY_FIELD_REJECTED`, as for every read-only column.
15+
- **Create.** The create-side guard of the storage-owned columns now drops these five too: a non-system create of a `sys_file` row keeps the caller's other columns, drops any value it gives them, starts `pending` as before, and logs one `warn` naming the dropped columns. The create is not refused.
16+
- **Unchanged.** The file-reference lifecycle writes them under the system context, as before: a file field's claim, release and copy, and the operator backfill of file references.
17+
18+
A file is attached to a record by writing its id into the record's file field, never by writing `sys_file` directly.
19+
20+
`system-file.object.ts` now also states that the presence of `key` and `status` on a `sys_file` row is the storage writers' invariant, not the engine's (the engine checks a `readonly` field for shape only on insert), and the guard's unused helper export is no longer exported.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/mcp': patch
4+
---
5+
6+
fix(runtime): an agent connected over OAuth is refused by name before an api action's forward, and `list_actions` marks such an action instead of the target answering it as anonymous
7+
8+
Clause-②: yes (widening: a listed action gains the optional `unavailable: { code, reason }` member, `McpActionSummary.unavailable`, with the new `McpActionUnavailable` type export; every existing member keeps its value)
9+
Metadata-protocol: none
10+
Ruling-ref: #28178 ruling `6540286612`, option B
11+
12+
A same-origin `type: 'api'` action is forwarded by the action doors (MCP `run_action` and `POST /actions/:object/:action`) with the caller's own credentials. An agent connected to MCP over OAuth holds an access token that the platform honours on the MCP endpoint only, so the forward reached every other target as nobody, and the agent got the target's anonymous `401` ("Authentication is required…", "Sign in first") although it had authenticated.
13+
14+
- **Now.** One table of credential kind × target door decides what the forward can carry: an identity route (`/api/v1/auth/…`) accepts a signed-in session only, the MCP endpoint a session, an API key or an OAuth token, every other target a session or an API key. A caller whose credential the target cannot read is refused before the forward with `401` and the standard `UNAUTHENTICATED` code, and a sentence naming the action, its target and what would let it run. Nothing is run.
15+
- **`list_actions`.** Such an action is still listed, with `unavailable: { code, reason }`: the code and the sentence `run_action` would answer, so an agent can tell its user why it cannot run it.
16+
- **Same table, earlier lane.** The API-key refusal on an identity route (#28217) is now one cell of that table; its sentence is unchanged, and `list_actions` marks it for an API-key caller too.
17+
- **Unchanged.** Where an OAuth access token is accepted (the MCP endpoint only), which credentials any target accepts, and every forward the table allows. A server-built forward credential that would let an OAuth agent run these actions is a separate decision (#28367).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): the body of `POST /packages/:id/publish-drafts` is declared, so the change note a publish carries is part of the published API contract
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`@objectstack/spec/api` gains `PublishPackageDraftsRequestSchema` and its type `PublishPackageDraftsRequest`, beside the door's existing `PublishPackageDraftsResponseSchema`. It declares the two body members the door reads:
11+
12+
- **`message`** (optional string): the author's change note. The package commit records it, and so does every item history row the publish writes (`change_note`, read back as each history event's `message`). Absent or empty, those rows record the sentence naming the package.
13+
- **`backfill`** (optional array of `{ object, field }`, both non-empty strings, nothing else in an entry): fields the publish adds whose literal `defaultValue` is written into existing rows, as the signed-in caller. A malformed, repeated or unhonourable entry refuses the whole request `400 VALIDATION_ERROR` before anything is published.
14+
15+
The object is not strict: other members are stripped, not refused. `actor` is deliberately not declared, since the door records the authenticated caller; `@objectstack/client`'s `packages.publishDrafts` still sends its deprecated `opts.actor`, and that call keeps working unchanged. Nothing changes on the wire: the door reads the body as it did before this declaration.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec)!: a report chart's `seriesBy` that cannot split is refused at authoring time — on a single-series chart type, or naming the same dimension as `xAxis`
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: two combinations of existing values that no renderer could draw are now refused. A conversion cannot know whether the author meant a bar chart or one series, so there is nothing for a migration to rewrite; the refusal text names both fixes. -->
11+
12+
**BREAKING** for two report chart shapes, both of which parsed before and then failed on the page. `ReportSchema` (non-`joined` reports; a joined report's `chart` is refused whole, as before) now refuses, at `chart.seriesBy`:
13+
14+
- **`seriesBy` on a single-series type** — `pie`, `donut`, `funnel`, `treemap` or `sankey`. The split derives one series per value of the `seriesBy` dimension and these types draw one series, so the page showed a refusal panel instead of the chart. The refusal names the report, the type and the split. Fix: a bar-family type (`bar` / `column` / `horizontal-bar`) for one bar per split value in each `xAxis` category, or drop `seriesBy` to keep the single-series chart. This is the report spelling of the rule dashboards already apply to a dimensioned widget with several measures on the same types.
15+
- **`seriesBy` naming the same dimension as `xAxis`** — every series held exactly one point. Fix: name a different dimension than `xAxis`, or drop `seriesBy`.
16+
17+
`SINGLE_SERIES_CHART_TYPES` is now exported from `@objectstack/spec/ui` (the list `checkDashboardWidgetChartMeasureArity` reads); the report refusal reads the same constant, so the two doors cannot drift apart.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
feat(plugin-security): organization administrators hold `manage_connector_connections` by default, so an organization's owners and admins can connect its OAuth2 connectors without a hand-bound permission set (ADR-0143 D5, ruling B)
6+
7+
Clause-②: yes (widening: the shipped `organization_admin` set, and `organization_admin_no_bypass` through its derivation, now admit their holders at the connector connection door; no other set changes)
8+
Metadata-protocol: none
9+
10+
The connector connection door (`GET` / `POST` / `DELETE /api/v1/automation/connectors/:name/connection` and the OAuth callback) asks the organization-scoped `manage_connector_connections` capability. Until now only platform administrators held it by default, so an organization owner or admin was refused until someone granted it to them through a permission set.
11+
12+
- **Who gains it.** Every member whose organization role contains `owner` or `admin`, through the `organization_admin` set the platform already grants them per organization: `organization_admin` under a walled posture, `organization_admin_no_bypass` on a wall-less one. The no-bypass variant inherits the capability from `organization_admin`'s declaration; it is not a second list.
13+
- **What it reaches.** Their own organization's connection only. The grant is scoped to the organization it was made in, and the door acts on the caller's active organization, so an organization admin who is a plain member elsewhere is still refused there. No token is ever shown to the holder.
14+
- **Unchanged.** `member_default`, `viewer_readonly` and every other shipped set still hold the capability only by an explicit grant. No other capability of any set changes. An agent acting on behalf of an organization administrator resolves the administrator's system permissions as before, so it gains this one with them.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
'@object-ui/components': patch
4+
'@object-ui/types': patch
5+
---
6+
7+
feat(plugin-grid): right-clicking a list row opens that row's actions at the pointer; a row inside a multi-row selection opens the selection's bulk actions
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
A list row's actions were reachable only through the small ⋯ button at the far right of the row. A right-click on the row now opens them where the pointer already is. Nothing new is declared: the menu is a second way to reach what `list_item` actions, `userActions.edit` / `delete` and the view's bulk actions already declare.
13+
14+
- **A row's menu is its ⋯ menu.** Open and Open in new tab (the record URL the row's link cell draws, when the host publishes one), then the row's actions from the same resolver the ⋯ cell reads: same capability gate, same per-record `visible` / `visibleWhen`, same order, same handlers and confirm dialogs. An action that is hidden for a row is absent from both. The inline primary buttons the cell shows beside the ⋯ are listed too, above the secondary actions, since a menu has no width budget.
15+
- **A row inside a selection of two or more opens the selection's menu.** The bulk actions `BulkActionBar` offers, from the bar's own resolver, with the selection count and Clear. It never lists a single-record action. A row outside the selection, or a selection of one, opens the row's own menu.
16+
- **The browser's menu stays where it is the useful one:** on a link in a cell, on an input or a cell in edit mode, when text is selected in the row (copying from a list keeps working), and on a touch long-press (touch keeps the ⋯ button). A grid that offers no row action at all, and whose rows cannot be selected, keeps it too; on a grid that does, a row whose own actions are all hidden by their predicates still opens Open and Open in new tab.
17+
- **Keyboard:** the context-menu key and Shift+F10 on a focused cell open the same menu below it. Esc closes it and focus goes back to the cell.
18+
- **Related-list tables** get the same menu from `data-table`'s own row menu: Open, then that row's ⋯ items. They have no record URL to open in a new tab, and no bulk actions, so a row inside a selection of two or more keeps the browser's menu there.
19+
- **New runtime slot `DataTableSchema.renderRowContextMenu`.** `(row, { selected }) => ReactNode`, supplied by the host; `data-table` owns the menu around the items it returns, and `null` keeps the browser's menu. It is a function, not metadata, so the zod mirror refuses an authored value by name.

0 commit comments

Comments
 (0)