Skip to content

Commit ef8a823

Browse files
Merge branch 'main' into claude/area-A5-33894
2 parents d16e160 + 2539ad9 commit ef8a823

153 files changed

Lines changed: 4061 additions & 629 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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/core': minor
4+
'@objectstack/runtime': minor
5+
'@objectstack/service-i18n': minor
6+
'@objectstack/rest': minor
7+
'@objectstack/objectql': minor
8+
'@objectstack/plugin-email': minor
9+
'@objectstack/service-analytics': minor
10+
'@objectstack/service-storage': minor
11+
---
12+
13+
feat(i18n): the serving layer reads `i18n.sourceLocale` as the authored label's language
14+
15+
Clause-②: yes
16+
Metadata-protocol: semantic
17+
18+
`II18nService` (`@objectstack/spec/contracts`) gains an optional `getSourceLocale()` / `setSourceLocale(locale)` pair, shaped like the fallback pair; `FileI18nAdapter` and the kernel's in-memory fallback implement both.
19+
20+
An app authored in one language that defaults its users to another now serves its inline labels to a request in the authored language. Take `defaultLocale: 'zh-CN'`, `sourceLocale: 'en'`, English inline labels, a `zh-CN` bundle and no `fallbackLocale`:
21+
22+
- Before: an `en` request was not treated as the authored language, walked the fallback chain (`zh-CN`) ahead of the inline text and was served the Chinese bundle row, unless the stack also declared `fallbackLocale: 'en'`.
23+
- Now: an `en` request answers the English inline label; a `zh-CN` request answers the `zh-CN` row; any other locale walks the declared fallback chain exactly as before.
24+
25+
`AppPlugin` threads the declared `i18n.sourceLocale` into the i18n service, and every metadata-document translation (the REST metadata reads, a formula's `label()`, an email template's `option` hole, analytics select-option labels and the upload-link page) passes `getSourceLocale()`, else `getDefaultLocale()`, as `ResolveOptions.defaultLocale`. A stack that declares no `sourceLocale` is served exactly as before. A `fallbackLocale: 'en'` added only to work around this can stay; it is no longer needed for the `en` request.
26+
27+
Writing your own i18n provider: implement `setSourceLocale` to receive the declaration and `getSourceLocale` to report it, answering `undefined` when nothing was declared — never `defaultLocale`; the serving layer does that collapse itself.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The published query and hook skill examples now filter on the platform's `owner_id` column with `{current_user_id}`, and the hook `find` example reads the caller's id from `ctx.session?.userId` instead of an unbound variable.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): `--modes ask` runs only the questions and operations on a supplied verified build, so ask models compare on the same app
6+
7+
Clause-②: yes (widening) — the `--modes` value `ask` (`cli.ts`); the mode unions widened to `'scratch' | 'template' | 'ask'` on `RunOptions.modes`, `ModeRun.mode`, `modeDir`'s `mode` (`orchestrate.ts`), `StepRef.mode` (`driver.ts`, so the external driver contract's `step.mode` may now be `ask`), `ModeScorecard.mode` (`scorecard.ts`) and `CliArgs.modes` (`cli.ts`); the new export `askModeRefusal` (`orchestrate.ts`) and the new optional field `ModeScorecard.supplied` (`scorecard.ts`), all reached through `./runner`; on `./export`, the run-record reader's `mode` now accepts `ask`, the new export `ASK_MODE_NOT_EXPORTED` (`pass.ts`) and the new optional field `Transcript.notShown` (`transcript.ts`)
8+
Metadata-protocol: none
9+
10+
Until now every mode authored: scratch builds the app and template mode authors an iterate before its only Run half, so two ask models were always graded on two different builds, and a difference in 问数 could be the build's rather than the model's.
11+
12+
`--modes ask` installs a verified build into a blank host of its own, the same build template mode installs and by the same unmanaged install (`--template F`, else this run's scratch build when it passed), seeds it, and runs the Run half alone: every question (`--ask-repeats` honoured) and every operation. The driver is never asked to author; there is no build score and no iterate. Its turns key as `card/ask/run/<step>/<persona>`, and `--driver recorded:F` replays them. On the same build and the same turns its grades equal scratch mode's first Run half. `ask` without `--template` and without `scratch` in the same run is refused before any card runs; relying on a scratch build that did not pass, it is skipped with the reason, as template mode is.
13+
14+
The record names the build's source on the mode (`template.source`); its Build row is `not-run` with the note `supplied (…): not scored`, its iterate rows `not run: ask mode authors no iterate`. The scorecard's `ask` column reads `supplied` in its Build cells and `no authoring turns` in its author rows (and the card's author lines too when ask is the only mode that ran), with a line naming the build's source; every Run row reads as for any Run half. The gallery exporter reads a record holding an ask mode and passes over it: the mode is not judged, its turns are not shown, and the transcript states why. The default modes (`scratch`, `template`) and their records, scorecards and exports are unchanged byte for byte.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/objectql': patch
4+
'@objectstack/runtime': patch
5+
---
6+
7+
feat(spec): the server-constructed in-product AI path can name itself on `ExecutionContext.performedBy`, and hooks see it on `HookContext.provenance`
8+
9+
Clause-②: yes — widened: `ExecutionContext.performedBy` accepts three new optional keys beside `clientId`: `agentId` (the in-product AI agent that performed the write for the signed-in person), `conversationId` (the AI conversation) and `confirmationId` (the id of the pending item the person approved). `clientId` is now optional, and a `performedBy` must name at least one of `clientId` and `agentId`, so `{ agentId }` parses where only `{ clientId }` did; a `performedBy` naming neither is refused at parse exactly as before, and the published JSON Schema states that rule as an `anyOf`. `HookContext.provenance` accepts `performedByAgentId`, `performedByConversationId` and `performedByConfirmationId`, each copied from its `performedBy` sibling by the engine the way `performedByClientId` is copied from `clientId`, and a sandboxed hook body reads them on `ctx.provenance` too.
10+
Metadata-protocol: none
11+
12+
Before this, the in-product AI had no place on the write context: it writes as the person, and `ObjectQL#createContext` parses the envelope, so an `agentId` a host put on `performedBy` was dropped there and the write looked like the person's own. The attribution stays server-constructed and never client-supplied, no security middleware reads it, and it never becomes the subject a write is authorized as; the write still runs as the person, with `userId` theirs and no `onBehalfOf`. The OAuth `/mcp` door is unchanged: it still sets `performedBy.clientId` alone, and hooks still see `provenance.performedByClientId`.
13+
14+
What to do: nothing, unless your TypeScript reads `ExecutionContext['performedBy']` and assumes `clientId` is there. It is now `string | undefined`, because the in-product AI path names `agentId` instead; check it before use, as `performedBy?.clientId` readers already do. Recording these keys in `sys_audit_log` is a separate change to the audit writer.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec)!: the AI-door confirmation rule binds every AI door, the in-app assistant included, through its own pending-action channel
6+
7+
Clause-②: no (narrowing) — once the in-app door implements the contract, a holder of `ai:approve` can no longer approve or reject someone else's in-app pending action, and the in-app approve and reject doors refuse every credential but a person's signed-in session to the app; nothing is widened, and no export, type or signature changes.
8+
Metadata-protocol: semantic
9+
Skills-docs: follow-up — `skills/objectstack-ai/SKILL.md` (the "AI Pending Actions" paragraph: "an operator approves or rejects in Studio's AI Pending Actions inbox (or via `GET/POST /api/v1/ai/pending-actions/...`)") still describes today's queue, which is the door's behaviour in this release; it moves with the change that implements the in-app door, together with `content/docs/api/client-sdk.mdx` ("deciding takes `ai:approve`") and the `client.ai.pendingActions` docblock in `packages/client/src/index.ts`.
10+
11+
<!-- adr-0087: registered in-app-pending-action-decided-by-person -->
12+
13+
**BREAKING, when the implementing change ships**, for an inbox operator or administrator who approves or rejects another user's in-app AI pending action, and for a script, integration or host that decides pending actions on an API key or token. Ruled on the AI-door confirmation decision (record 6893484458): 「B 同一规则,两套流程暂留」.
14+
15+
⚠ In the release that carries this changeset nothing changes at any door. The in-app assistant still runs ADR-0011's queue as documented: any holder of `ai:approve` may decide an item, the approve and reject routes take whatever credential they authenticate, and an approved item is re-dispatched as before. What ships now is the contract that door moves to, in `@objectstack/spec/contracts` (`AI_ACTION_CONFIRMATION_CAPABILITY` and the `IAIService` pending-action members, `contracts/ai-service.ts`):
16+
17+
- Rule 1 covers every AI door that starts an action declaring `ai.requiresConfirmation: true`: the MCP `run_action` and `resume_run` tools and the in-app assistant's action tools.
18+
- The in-app door keeps its own channel, the inline pending-approval card and the inbox (`IAIService.proposePendingAction` / `approvePendingAction` / `rejectPendingAction`, unchanged). When that channel is not wired, the door does not offer a declared-gated action as a tool at all.
19+
- Who decides: only the person the call ran as. Holding `ai:approve`, or any other permission, does not let another user decide an item; a host that wants a second person to approve the write uses the existing `held` outcome.
20+
- Which credential: the approve and reject doors take a person's signed-in session to the app and nothing else; an API key, token, other service credential or AI identity is refused, whoever it resolves to.
21+
- As whom it runs: an approved item runs as that person, never as a synthetic AI principal, with every gate and permission re-checked at the moment of approval.
22+
- The three points bind every item in the in-app queue, whichever trigger queued it (the declared flag or the destructive heuristic): a pending row does not record why it was queued, and the queue has one decider rule.
23+
- Neither the model's own confirmation nor the caller's `confirm` counts. The in-app queue and the pending-confirmation service (`IActionConfirmationService`) stay two seams.
24+
25+
The semantic entry `in-app-pending-action-decided-by-person` carries the same notice, with the same timing, into the upgrade guide and `os migrate meta`.
26+
27+
What changes for a caller, from the release whose in-app door implements it:
28+
29+
- 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.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
'@objectstack/service-settings': patch
4+
---
5+
6+
fix(i18n): Setup no longer shows five audit actions, or the AI settings help for conversation titles and two provider models, in English under a translated locale
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The audit actions `package_unmanaged_import`, `credential_use`, `scim_refused`, `audit_signing_key_change` and `dataset_query` were still the English extract fill in all ten translated locales, so the audit log, its detail and the System Overview "Audit Events by Action" chart and table named them in English (for example "Credential Use" under zh-CN). They are now translated in zh-CN, zh-Hant, ja-JP, ko, es-ES, fr, de, pt-BR, ru and ar.
12+
13+
On the AI settings page, the help under the conversation-title toggle ("When on, the LLM is asked to produce a short title …") had no translation in any locale, and neither had the model help of the DashScope and Cloudflare AI Gateway providers; zh-CN also lacked the OpenRouter API key hint. All of them are now translated. Only translation values change: no setting, key or audit action is added or removed.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/console': patch
5+
---
6+
7+
fix(app-shell): the Studio connector action Input repeater follows the run's declared-keys rule
8+
9+
Clause-②: yes (widening) — `@object-ui/i18n` gains the studio pack key `engine.inspector.flowNode.kv.undeclaredKey` (en, zh). Nothing is removed or narrowed.
10+
Metadata-protocol: none
11+
12+
- **The repeater offers extras only where the run accepts them.** A `connector_action` step refuses, at run time, an input key the action's input schema does not declare. Studio now reads the schema the same way: an action whose schema lists `properties` (every shipped connector) is closed, and one that carries `additionalProperties` or `unevaluatedProperties` other than `false`, a `$ref`, `allOf` / `anyOf` / `oneOf`, `patternProperties` or another key-admitting keyword, or no `properties` at all, is open. An open action keeps the key/value repeater beside its typed fields, as before. A closed action keeps it only for a key it declares that no typed field can edit, such as an OpenAPI operation's `$ref` or schemaless request `body`, or Slack's `blocks`, and suggests those keys in the key cell. When every declared key has a typed field, the repeater is gone.
13+
- **Keys the run refuses are marked, not dropped.** On a closed action, a stored input key the schema does not declare (one left behind by an older flow or an action switch) stays in the repeater with a line under it saying that the run refuses it and how to fix it. A key typed into the repeater that the action does not declare gets the same line. Studio never removes such a key on its own; the author removes it.
14+
- An OpenAPI operation whose only input is a schemaless body now gets the judged repeater too, where it used to get the generic one.

‎.changeset/33862-import-wizard-save-reason-tab-trap.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fix(plugin-grid): Tab leaves the import wizard's "Save current" reason again
77
Clause-②: no
88
Metadata-protocol: none
99

10-
In the import wizard's mapping step with no column mapped, "Save current" is disabled and a focusable wrapper around it gives the reason in a tooltip. Pressing Tab on that wrapper sent focus to the dialog itself, and the next Tab started over at the template select: a keyboard user could not reach the column-mapping selects, Next, Cancel, Back or Close, and could leave only with Escape. The tooltip's content was mounted inside the dialog and unmounted as the wrapper lost focus; the dialog's focus trap read that removal as the focused element disappearing and pulled focus to the dialog. The tooltip now renders outside the dialog, so Tab and Shift+Tab walk every control in order and the reason is still read out when the wrapper is focused.
10+
In the import wizard's mapping step with no column mapped, "Save current" is disabled and a focusable wrapper around it gives the reason in a tooltip. Pressing Tab on that wrapper sent focus to the dialog itself, and the next Tab started over at the template select: a keyboard user could not reach the column-mapping selects, Next, Cancel, Back or Close, and could leave only with Escape. The tooltip's content was mounted inside the dialog and unmounted as the wrapper lost focus; the dialog's focus trap read that removal as the focused element disappearing and pulled focus to the dialog. The dialog's focus trap no longer reads that removal as focus lost, so Tab and Shift+Tab walk every control in order and the reason is still read out when the wrapper is focused.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
fix(mcp): the served SKILL.md tells a client what to do when the data cannot answer a question
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The MCP server's client instructions (the SKILL.md a host with the dataset pair serves) taught how to choose between a governed metric and an object query, but said nothing about a question no metric, object or field can answer. A client then sometimes declined and went on to fill the gap with an assumed value and a conclusion drawn from it, measured once as "if laptops come with a typical warranty of 1 year or longer, none would run out before 2026-12-31", which is an answer the data cannot support.
11+
12+
The dataset entries now carry one more rule: say the data the client can read does not record it and name what is missing, offer the computation if the user supplies the missing value, never fill the gap with an assumed value or a conclusion drawn from one, and take any figure added from a tool answer and cite it. Instruction text only; no tool, schema or metadata changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
docs(service-automation): the `http` node's comments say that the outbox sends a GET or HEAD with no body
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Comments only, no behaviour change. Two comments in the `http` node executor said the messaging HTTP outbox sends and signs `'{}'` for a node with no `body`. They now name the exception: a GET or HEAD goes out with no body and is signed over `''`. The published source maps shift by the added comment lines.

0 commit comments

Comments
 (0)