Skip to content

Commit aaffb2c

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-0h7006
2 parents 1130a71 + d576509 commit aaffb2c

196 files changed

Lines changed: 10704 additions & 470 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: 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.
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+
fix(scenarios): `asked-back:no-figure` no longer fails an ask-back that counts its candidates or names a year written alone
6+
7+
Clause-②: no — `statedFigures` (`./score/full`) keeps its signature and answers differently: for the same text it returns fewer figures, leaving out a one- or two-digit count of the candidates an ask-back offers and a 19xx/20xx year a time word or 年 marks, unless a counted noun follows that year.
8+
Metadata-protocol: none
9+
10+
A correct ask-back that counted the readings it offered ("I found 2 metrics that match revenue: Booked amount or Billed amount — which one?", 「营收对应 2 个指标…您是指哪一个?」) failed `asked-back:no-figure` on the `2`, and so did one that named a year alone ("revenue in 2025?", 「2025 年的营收」). `statedFigures` now leaves out a one- or two-digit whole number followed by a candidate noun (metrics, measures, options, readings, datasets, candidates, choices, interpretations, definitions, meanings, matches; 个/种/项 plus 指标, 口径, 选项, 数据集, 度量, 候选, 含义, 理解, 解释, 读法), with at most one qualifier from a closed list between, and a 19xx/20xx year behind a time word (in, for, during, since, from, through, until, before, after, year, fiscal year, calendar year, FY) or before 年. A real figure still fails it: an amount (`1,234,500`, 「123.4 万元」), a percentage, a count of anything else (`42 orders`, 「3 张发票」), a decimal, a number with a unit or currency, a year-shaped number with no time word (`Revenue is 2025`, `a total of 2025 orders`), and a year-shaped count behind a time word that a counted noun follows (`payments for 2031 orders`, `from 1980 invoices`: any word ending in -s, or people/staff, except a closed list of words that follow a year as its subject or as grammar — sales, earnings, revenues, profits, results, figures, numbers, totals, margins, costs, expenses, this, its, his, was, has, is, as, thus, plus, versus, across — so `In 2025 sales grew` still reads no figure from the year). A count written as a word (「有两个指标」) was never read as a figure.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/lint': patch
3+
'@objectstack/cli': patch
4+
'@objectstack/skills': patch
5+
---
6+
7+
feat(lint): a dataset measure or dimension that declares neither `synonyms` nor a `description` is advised
8+
9+
Clause-②: yes (widening) — @objectstack/lint gains three exports on its "." entry: validateDatasetMemberVocabulary, DATASET_MEMBER_NO_VOCABULARY and the DatasetMemberVocabularyFinding type; nothing accepted before is refused
10+
Metadata-protocol: none
11+
12+
A dataset member answers a business question through its vocabulary (ADR-0149 D1): `synonyms`, the words a person types for it, and `description`, a short business definition. Both keys are optional, so a dataset that declares neither on a member passes every check, and that member then answers only to its own name and label. A person who asks in other words, or in another language, matches nothing and gets a number from a plain object query instead of the governed metric.
13+
14+
`@objectstack/lint` adds one advisory rule, `dataset-member-no-vocabulary` (`warning`). It reports once per measure or dimension that has no non-blank `synonyms` entry and no non-blank `description`, names the dataset and the member, and says what is lost. One of the two keys is enough to silence it. It runs at `os validate`, `os build` and `os lint`, and at the metadata publish door for a `dataset` write, where it is an advisory on the save response. Nothing is refused: a dataset that only feeds charts loses nothing by leaving both keys out. `os explain dataset-member-no-vocabulary` prints the full reasoning.
15+
16+
The author-time rule count the CLI prints (`Running author-time rules (N)`) rises by one, to 70 for `os validate` and `os build`.
17+
18+
`@objectstack/lint` exports `validateDatasetMemberVocabulary`, `DATASET_MEMBER_NO_VOCABULARY` and the `DatasetMemberVocabularyFinding` type.
19+
20+
`@objectstack/cli`: `os generate dataset` now writes one `synonyms` entry on each member it scaffolds, seeded from a label the stack already declares (the title field's label on the dimension, the object's plural label on the record count), in whatever language that label is written in, under a comment that says to replace the seed with the words your users type and to add a `description`. A fresh scaffold therefore draws no finding. When a seed would answer to two members (a title field labelled like the object), the scaffold picks the next candidate, so the dataset it writes always parses.
21+
22+
`@objectstack/skills`: the `objectstack-ui` dashboards rule now says, for every dataset member, to write `synonyms` as the words a person types, in the language of the brief, and a one-sentence business `description`; that one word names one member; and that a member with neither draws the new warning. Its dataset example gives the dimension a synonym too, and the skill's evals gain a case for a dataset authored from a Chinese brief.

0 commit comments

Comments
 (0)