Skip to content

Commit 6c57786

Browse files
committed
Merge origin/main into claude/project-thread-jkfy43 (K=15 before landing #34784)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
2 parents 70e332e + e05445e commit 6c57786

252 files changed

Lines changed: 13585 additions & 948 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): an install-local re-install whose installed copy the resolver refuses names that copy, not the incoming package
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a re-install, `POST /api/v1/marketplace/install-local` reads the copy its last install stored, to compare the incoming version with it. When this runtime's artifact resolver refuses that stored copy (for example, a package entry that still carries a retired spelling), the answer used to be "Package 'X' cannot be installed: …", which reads as a fault in the incoming package. It now says that the installed copy is refused, that the incoming version was not judged, and what to do: uninstall the package to remove the stored copy, then install this version.
11+
12+
The status and code are unchanged: the resolver's own (for example `422 INVALID_ARTIFACT_PACKAGE_ENTRY`), with its `details` when it states any, and nothing is installed or written. A refusal of the incoming package keeps its "Package 'X' cannot be installed" sentence, and when both copies are refused the incoming package's refusal is the answer.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
feat(app-shell): the avatar menu's organization entries follow the deployment posture, and the organization switcher moves into the avatar menu
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The avatar menu reads the deployment signals the server already serves on `GET /api/v1/auth/config` (`features.multiOrgEnabled`, `features.cloudManaged`, `features.tenancyPosture`) and offers organization entries by them:
11+
12+
- **Single-tenant** (`multiOrgEnabled` false, the `single` posture): no organization entry at all, and no organization switcher. Member management for the one organization stays at Setup → Organization.
13+
- **Multi-organization**: "My Organizations" and "Create organization"; "Switch organization" joins them only when the member belongs to two or more organizations.
14+
- **Cloud-managed** (`cloudManaged` true): no "Create organization"; organizations are created on the cloud there.
15+
16+
A server that serves none of these flags reads the spec's defaults (multi-organization on, not managed), which is the menu as it was.
17+
18+
The organization switcher no longer sits at the left of the top bar, which now holds only the product mark and the app switcher. It is the avatar menu's "Switch organization" submenu. Under the `group` posture it still names the working organization (the write target) and says that views show data from every organization the member belongs to (ADR-0105). On a walled posture (`group` or `isolated`) the top bar still names the active organization, read-only, now at any membership count (before, only at exactly one), so a member of two or more organizations still sees which organization lists are scoped to; the name is also shown under "My Organizations". The switcher's own "Manage members" and "Create organization" items are gone: "My Organizations" and the menu's own create entry lead to the same pages. Inside the ObjectStack mobile shell, the top-bar button that opens the shell's native connection switcher is unchanged.
19+
20+
There is no Setup setting for this menu.
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
---
4+
5+
fix(plugin-chatbot): the AI build result card draws the checklist's verification line, and states a failed build once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
When an AI build fails verification, the result card's `checklist` now carries a `verification` line (`{ kind: 'verification', status: 'failed', label, count }`), and its `status` and `passed/total` follow the verdict. The console dropped that line, so a failed build read "Checks passed 4/5" over four rows. The card now draws it as a red row: the producer's label, then the issue count. A failed checklist is the one place the turn states the failure: the build's draft card no longer draws its "N to fix" chip or the red "fix the problems" sentence beside it. The findings stay behind its Technical details.
11+
12+
A checklist line of any other kind that carries a valid `status` and a string `line` is drawn by those two fields, so a new kind from the producer needs no console change. Lines of the existing kinds draw as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
feat(app-shell): the AI chat request carries the console's UI language as `context.uiLocale`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The AI chat pane, on the AI page and in the console dock, now sends the language the console renders in as `context.uiLocale` on every chat request, beside the existing `agentName`, `activeApp`, `packageId` and `surface` keys. Before, the server saw only the browser's `Accept-Language`, so a reply could name a card control (such as the plan card's approve button) in a language the card did not use. The value is the console's resolved language tag, sent as is; the server decides whether to use it. Nothing else in the request changes.
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a discussion block in the record page's activity card keeps the card's inner padding
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The activity card at the foot of the record page's right column draws its body edge to edge, because the compact activity face it normally holds pads its own rows. A page whose `discussion` slot places `record:chatter` (or `record:discussion`) puts the full discussion timeline in that card instead, and that timeline padded only its top: the row icons sat on the card's left border, the composer's send button touched the right border, and long rows ran into it before wrapping.
11+
12+
Inside that card the discussion timeline now takes the same inset as the related-list cards above it (12 px at the sides and a 12 px band at the top and foot), with one divider under the card head. The compact activity face in the same card, and the discussion timeline in the Activity tab and on the page body, look exactly as before.

‎.changeset/34685-ask-data-skill.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-ask`, a skill for a client that answers business questions over MCP
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A person who connects Claude Code (or another MCP client) to an ObjectStack app and asks it for a number now has a skill that tells the client how to answer. Until now that procedure was written only in the `list_datasets` tool description and on the page at `GET /mcp/skill`, and a client does not reliably read either before it picks a tool.
11+
12+
The new skill `objectstack-ask` is for the connected client, not for a developer writing queries in code. It gives the steps in order:
13+
14+
- Lift the business words of the question and call `list_datasets` with them as `terms`, in the user's own words and language.
15+
- Decide by `matches`. A word matches only when it equals a member's name, label or synonym (case, spacing, `_` and `-` aside), never by similarity. One measure match is computed with `query_dataset`, and the source is cited from the answer's `provenance`. Several matches are a question for the user. A dimension match alone is not an answer.
16+
- When nothing matches but the word is a loose form of several listed measures (a bare "revenue" beside Won Revenue, Annual Revenue and Planned Revenue), ask which one is meant and compute nothing yet.
17+
- Otherwise fall back to `aggregate_records` / `query_records`, and open the answer with a line saying it is not from a governed metric (非指标口径).
18+
- `membersWithheld: true` is reported as measures the user may not read, never as a metric that does not exist.
19+
- When no metric, object or field records what the question needs, say what is missing. Never answer from an assumed value.
20+
21+
`objectstack-ai` and `objectstack-query`'s aggregation rules each gain one line pointing to it. Install or update the catalog as before (`@objectstack/skills`, then the sync); nothing else changes.

0 commit comments

Comments
 (0)