Skip to content

Commit 198cdf7

Browse files
committed
Merge origin/main into claude/project-thread-sjzr94
Brings #34810 (half B: the status-disarmed switch-on refusal) into half A. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
2 parents 536d5a1 + 13e0305 commit 198cdf7

140 files changed

Lines changed: 7897 additions & 267 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.

‎.changeset/33808-ai-door-confirmation-in-app.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ The semantic entry `in-app-pending-action-decided-by-person` carries the same no
2727
What changes for a caller, from the release whose in-app door implements it:
2828

2929
- FROM an operator or administrator approving another user's in-app pending action in the inbox TO the person the call ran as approving it; a second approver is a `held` item in the approvals engine.
30-
- FROM approving or rejecting through `POST /api/v1/ai/pending-actions/:id/approve|reject` with an API key or bearer token TO the person's signed-in session to the app.
30+
- FROM approving or rejecting through `POST /api/v1/ai/pending-actions/:id/approve|reject` with an API key, an OAuth token or another service credential TO the person's signed-in session to the app, whether its session token rides in the cookie or in an `Authorization: Bearer` header.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
feat(spec,runtime): an AI route's `req.user` says who is acting and which credential admitted them
7+
8+
Clause-②: yes
9+
Metadata-protocol: none
10+
11+
A door reserved to the person, such as the in-app approval of a pending action that only the person the call ran as may give, can now tell an impersonating administrator or an API key from the person, without reading request headers.
12+
13+
- `@objectstack/spec/contracts` declares the AI-route caller: `AIRouteUser`, the `req.user` an AI route handler receives (the `EvalUser` core, the id and display-name aliases, the two authority channels), and two new facts on it, `impersonatedBy` and `credential`. `AIRouteCredentialKind` is the credential vocabulary: `session`, `api_key` or `oauth`.
14+
- `@objectstack/runtime` fills both on every AI route. `impersonatedBy` is the session's impersonating administrator (`ExecutionContext.impersonatedBy`), carried as is; it is a fact the door judges, never the authorization subject, and absent when the user acts themselves. `credential` is `session` for a signed-in session whether its token rides in the cookie or in an `Authorization: Bearer` header, `api_key` for an API key, and `oauth` for an OAuth token or the in-process forward of an OAuth-connected agent; it is absent when the request recorded no admitting credential, which a door reads as "not a session". Ruled on #34184 (record 6942875153): Q1 A, Q2 A.
15+
16+
Nothing changes for an existing handler: both keys are new, and every other key of `req.user` keeps its value. The REST `/actions` and MCP `run_action` `ctx.user` are unchanged.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): the upgrade links open the runtime's declared `upgradeUrl`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`GET /api/v1/runtime/config` already serves a top-level `upgradeUrl` when the host declares one: the absolute address of the control plane's upgrade or billing page. The Console never read it, so three upgrade links opened the Cloud origin instead. On Cloud, the origin redirects to the console root, and a manager whose only organization has a running environment lands back in that environment, so the link never reaches billing.
11+
12+
The Console now reads `upgradeUrl` as served (an absent, empty or non-string value stays absent; nothing is composed in its place) and exposes it as `getUpgradeUrl()`. These links open it when it is declared:
13+
14+
- the storage-full banner's "Upgrade to continue";
15+
- the AI usage indicator's call to action;
16+
- the AI chat's quota upgrade button.
17+
18+
When the runtime declares no `upgradeUrl`, each link behaves as before: it opens `cloudConsoleUrl()`, and it is not drawn on a runtime that names no upstream cloud.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
fix(automation)!: switching on a packaged flow that its own status disarms is refused, and the toggle door answers the engine's state
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
Skills-docs: none — skills/objectstack-automation/SKILL.md teaches the toggle only as the off switch for an installed package's flow; nothing it says changes
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value, metadata type or stored row shape is added, removed, renamed or rewritten: what moves is the answer of one REST door (POST /automation/:name/toggle, and the IAutomationService.toggleFlow it calls) to one request, switching on a packaged flow whose own status already keeps it off. A flow definition that was valid stays valid and is armed exactly as before; nothing exists for objectstack migrate meta to rewrite. The one-line fix for a caller is in the body: publish the flow with status active, then switch it on. -->
13+
14+
**BREAKING** for a caller that switches on a packaged flow whose definition's `status` is `obsolete` or `invalid`. The switch moves only the activation-ledger bit, and a status is the author's, so that request never made the flow run. It now says so instead of reporting success.
15+
16+
**What changes.**
17+
18+
- `POST /api/v1/automation/:name/toggle` with `{ enabled: true }` (and `IAutomationService.toggleFlow(name, true)` on the engine's service) on such a flow used to answer `200 { name, enabled: true }`. It wrote `active: true` to `sys_metadata_activation`, replacing any `active: false` row an administrator had left there, while `GET /automation/_status` read `enabled: false`. It now answers `409 RESOURCE_CONFLICT`, names the status, and writes nothing.
19+
- An `active: false` row already standing for the flow stays as it is.
20+
- The refusal names the step that arms the flow: publish it with status `active`, or for a read-only package, install a package version that ships it active.
21+
- A second case changes. An administrator switches such a flow on while it is still `obsolete`, and the flow is later published or shipped `active`. If the ledger held an `active: false` row for it, the flow used to run as soon as it arrived `active`, because the earlier switch-on had replaced that row. Now the row is still there, so the flow stays off after it arrives `active` until it is switched on again.
22+
- The door's `200` answer reads `enabled` back from `getFlowRuntimeStates`, the same reading `GET /automation/_status` serves, and no longer echoes the request. A service that does not implement `getFlowRuntimeStates` keeps the old answer, the request echoed. So does a flow name two packages hold, switched at one package's address (`/automation/:ns/:name/toggle`) or at the bare name while only one holder's package is enabled: that reading has one row per holder under the same name, so it cannot tell which row was switched, and the engine's echo is true because it refuses the one switch-on that would leave the flow off.
23+
24+
**Who moves, in one line.** Publish the flow with status `active` first, then switch it on. A flow already published `active` that still reads `enabled: false` needs one more switch-on.
25+
26+
**Unchanged.** Switching such a flow off is still accepted: it writes `active: false`, which keeps the flow off after a later definition ships it active. Every flow whose status is `active` or `draft` switches on and off as before. A customer-authored flow is still refused by the earlier provenance check.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/components': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(studio): the Studio AI panel matches the console's AI assistant
8+
9+
Clause-②: yes (widening — new studio-namespace locale keys, and one optional `columnMarks` member on the published `GridFieldAuthoring` interface of @object-ui/components)
10+
Metadata-protocol: none
11+
12+
The AI panel on Studio's right side now looks and works like the console's AI assistant drawer.
13+
14+
- It is called "AI Assistant" (「AI 助手」) everywhere, including the line that says which tool drafted a change.
15+
- Studio's top bar shows the console's robot button in the same place. It shows or hides the right panel and always opens it on the AI assistant. `⌘.` still switches between properties and the assistant. Without an assistant, the panel icon stays.
16+
- The panel has one header row: the Properties | AI Assistant switch on the left; History, widen and Close on the right. Usage and Share moved into the History view, which covers the chat and lists earlier conversations with New chat.
17+
- The panel opens 420 px wide, like the console drawer. It can be dragged or keyed wider from its left edge and remembers the width under its own key. On a small screen it stays an overlay. Studio's top bar now names its pillars by its own width rather than the window's, so a wide panel never pushes the robot under it.
18+
- The chip above the composer reads "Viewing: <object label> · <view>" (「正在看:会议 · 记录」), never the internal name.
19+
- On the Data canvas, the fields the AI assistant changed in the pending draft carry a draft chip on their records-grid column header and on their Form card. A line above the canvas says "The AI assistant just made N changes", with Review, which opens the pending changes, and "Discard all unpublished changes", which discards the package's drafts after a confirm.
20+
21+
`@object-ui/components`: `GridFieldAuthoring` takes an optional `columnMarks`, a node per accessorKey that `data-table` draws after the column's header label.
22+
23+
`@object-ui/i18n`: new studio keys `engine.studio.slot.history`, `engine.studio.slot.resize` and `engine.studio.copilotChanges.*`. Changed values: `engine.studio.aiCopilot` and `engine.studio.draftMark.agent.copilot` (AI Assistant), `console.ai.discussing` (Viewing / 正在看, in every pack), and `draftedByCopilot` (AI assistant). No key was removed. Studio no longer reads `engine.studio.slot.openFullPage`.

‎.changeset/34729-mention-email.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
---
4+
5+
feat(plugin-audit): an @mention reaches the mentioned person by e-mail as well as the inbox, one e-mail per person per 10-minute window
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Before, a `collab.mention` notification named no channel, so messaging delivered it to the in-app inbox alone. A person who was mentioned while away from the Console never heard of it.
11+
12+
- **The mention now also goes by e-mail, on by default.** The mention writer keeps its inbox notice unchanged (one per comment and person). It then sends a second `collab.mention` emit with `channels: ['email']`. Both go through `messaging.emit` (ADR-0030 single ingress). Delivery preferences filter the e-mail like any channel: a person's `sys_notification_preference` row `(collab.mention, email, enabled: false)` mutes the e-mail and keeps the inbox notice. Approvals and every other notification are unchanged.
13+
- **One e-mail per person per 10-minute window.** The e-mail emit is deduplicated per organization, person and clock-aligned 10-minute window (`:00`, `:10`, …). The first mention of a person in a window sends the e-mail, and later mentions in that window go to the inbox only. A person gets at most one mention e-mail per window: at most two in any ten minutes when a burst crosses a window edge, and at most 144 a day. Hosted deployments cap platform-sent mail per day, and this is what keeps mentions inside that cap.
14+
- **What the e-mail says.** The subject is the notification title ("Alice mentioned you"), in the reader's language. The body is the comment preview, then one line that opens the record the comment is on. That line ships in every locale the plugin-audit catalog carries. The templates are code-declared through `MessagingService.registerBuiltinTemplates`, so an organization's own `sys_notification_template` row for `(collab.mention, email)` overrides them. The link is the inbox notice's `/{object}/{id}`, made absolute by the auth service's `getConsoleUrl`. It carries no token. Without an auth service the link stays relative. A comment whose thread names no record sends no e-mail.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
docs(scenarios): the README documents the skill-evals runner
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The package README gains a section on `skill-evals`, a command run from an ObjectStack checkout (`pnpm --filter @objectstack/scenarios skill-evals`). It runs the published skills' existing eval cases (`skills/BUNDLE/evals/*.json`) through the local Claude Code subscription login, each case once with its skill bundle installed and once without, and grades each answer by the case's own `must_contain` / `must_not_contain` tokens. The runner is not in the published `bin` or `exports`, so nothing a consumer installs changes beyond the README text and a `scripts` entry in `package.json`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
fix(components): a form's phone-width field-tab strip scrolls a tab activated by a failed submit into view in the same commit
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Below `sm`, a horizontal `fieldTabs` strip that does not fit scrolls sideways, and the active tab is scrolled into its visible window. That scroll ran in a passive effect. When the activation came from a non-discrete update, such as a failed submit jumping to the first tab holding an invalid field (react-hook-form validates asynchronously), the passive effect ran a task after the commit. For that window the newly active tab was painted while still scrolled out of the strip. The scroll now runs in a layout effect, so it lands in the same commit that marks the tab active, before paint. Tapping a tab and opening on an off-screen `defaultFieldTab` behave as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a related list's row Delete confirm names the row by its declared `nameField` when no column shows it
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A related list with authored columns sends a `$select` projection, and the row Delete confirm names the row from the row that projection fetched. The projection did not ask for the child object's declared `nameField` unless a column showed it, so the confirm read `Are you sure you want to delete "Record #<id>"?` for a row that has a name. The projection now asks for the declared `nameField` (or its deprecated `displayNameField` alias) through the same gates as its other members: the field must be declared by the child object or be a platform column, the viewer must be allowed to read it, and the block must not redact it. It is fetched only, never drawn as a column. A list without authored columns sends no projection, as before. A name field the viewer cannot read is still not requested, and its confirm keeps the `Record #<id>` wording.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/plugin-form': patch
4+
---
5+
6+
fix(console): under draft preview, the New record form draws a field that exists only in the draft, disabled, and never writes it
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Under `?preview=draft` the console reads metadata from the draft overlay, so the New record page and the global New/Edit modal listed a field the draft adds. Its definition, though, came from the adapter's published `getObjectSchema`, which does not declare it, so the form dropped it. In draft preview both surfaces now hand the form a data source that answers the published object definition plus each field only the draft declares, with its draft definition and the marker `_draftOnly: true`; the form draws such a field disabled and does not require it (its draft `required` / `requiredWhen` are dropped from that copy, so a required draft field cannot make the save refuse), and the data source leaves it out of the record a create or update sends, so neither a value nor its declared default is written. The data door validates against the published object, and preview keeps the data plane untouched (ADR-0037 Phase 1). Outside preview the form gets the adapter itself, so the published path is unchanged and still reads each object document once. A draft list column on a draft-only field is not covered here.
12+
13+
`@object-ui/plugin-form`: `ObjectForm` and the shared object-schema field mapping draw a field carrying `_draftOnly: true` disabled, and a form view restating `required` over such a field does not make it required. `_draftOnly` is an underscore-private convention between the console and this package, never an authoring key; nothing new is exported.

0 commit comments

Comments
 (0)