Skip to content

Commit 3a20ecd

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-ctejy8
Brings in #37970 (C4), which also changes ui/packages/app-shell/src/console/ai/ChatPane.tsx; auto-merged with no conflict. Claude-Session: https://claude.ai/code/session_01L9qibyUpyff7pHe7vkFgA8 Co-authored-by: Claude <noreply@anthropic.com>
2 parents 19d67fd + 4af32b9 commit 3a20ecd

541 files changed

Lines changed: 17452 additions & 635 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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@object-ui/auth': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/i18n': patch
5+
'@object-ui/console': patch
6+
---
7+
8+
fix(auth): a cloud-managed runtime's password refusal is shown in the session's language and points at the identity provider's button
9+
10+
Clause-②: yes (widening) — `@object-ui/auth` `ForgotPasswordFormProps` gains the optional `errorMessages`; `@object-ui/i18n` gains `auth.login.errors.managedPasswordSignIn` and `auth.login.errors.managedPasswordReset` in every locale
11+
Metadata-protocol: none
12+
13+
A cloud-managed runtime refuses the password doors (sign-in, forgot password, reset password, set password) with 409 `RESOURCE_CONFLICT`. Its code never reached the pages. The hosted relay and the set-password route answer in the platform's error envelope, `{ success: false, error: { code, message } }`, which the auth client did not read. Forgot and reset dropped the code where the client threw. So each of those pages showed the server's English sentence or `Auth request failed with status 409`, whatever the language.
14+
15+
- **`@object-ui/auth`.** The client's error builder reads `code`, `message`, `details` and `userMessage` from the envelope's `error` when the flat body has none; a better-auth refusal answers exactly as before. `forgotPassword`, `resetPassword` and `setInitialPassword` now keep the refusal's code and status too. `ForgotPasswordForm` gains an `errorMessages` prop, the same code-to-text map `LoginForm` takes; without it the server's message is shown as before.
16+
- **`@object-ui/app-shell`.** `signInRefusalMessages` maps `RESOURCE_CONFLICT` to a sentence that says the deployment signs people in through its identity provider and points at its button above the form. The new `passwordDoorRefusalMessages` carries the matching sentence for the forgot, reset and set-password doors, and the package's forgot-password page passes it.
17+
- **`@object-ui/i18n`.** Two keys, `auth.login.errors.managedPasswordSignIn` and `auth.login.errors.managedPasswordReset`, in every locale.
18+
- **`@object-ui/console`.** The forgot-password, reset-password and set-password pages show the same sentence.
19+
20+
On the sign-in door only a cloud-managed runtime answers this code, so a self-hosted sign-in is unchanged. On the reset and set-password doors a self-hosted deployment answers the same 409 `RESOURCE_CONFLICT` in two cases: an account its identity provider provisions while SSO-only mode is on, and a pending SSO person not yet signed in. Those pages now show the same localized sentence in place of the server's English one; it is true for that reader too. Nothing to migrate.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
List the cloud `service-ai-studio` tool `ask_which` in `PLATFORM_TOOLS_BY_PACKAGE`, and give it a `chatbot.tool.ask_which` label in every locale pack, so the chat step reads "Clarify the question" (「确认问题含义」) instead of the raw tool name.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/i18n': minor
4+
'@object-ui/app-shell': minor
5+
'@objectstack/lint': minor
6+
'@objectstack/cli': minor
7+
---
8+
9+
feat(spec): a package's display name per locale — the translation bundle's `packages` group, read by Setup's package list and Studio's package switcher
10+
11+
Clause-②: yes (widening) — the translation bundle (`TranslationDataSchema`, `PlatformTranslationDataSchema`, `ServedTranslationDataSchema`, `TranslationItemSchema`) accepts a new group `packages`, keyed by `manifest.id`, each row `{ name?, description? }`; a bundle that wrote `packages` was refused as an unknown key before. `@object-ui/i18n` `useObjectLabel()` gains `packageName` and `packageDescription`.
12+
Metadata-protocol: added — a new translation group `packages.MANIFEST_ID.name` / `.description`
13+
Skills-docs: follow-up owed — skills/objectstack-i18n/SKILL.md
14+
15+
A package had one name, the plain-string `manifest.name`, so a zh-CN administrator read every package in Setup's package list, and every package with no app of its own in Studio's package switcher, in English, beside a launcher that already named the same apps in Chinese.
16+
17+
A package now names itself per locale in the translation bundle it already ships:
18+
19+
```ts
20+
export const zhCN: TranslationData = {
21+
packages: { 'com.acme.reporting': { name: '报表', description: '经营报表' } },
22+
};
23+
```
24+
25+
- The key is the package's `manifest.id`. A key that is not a manifest id — a namespace like `crm`, or a display name — is refused at parse, naming the rule, because a row keyed by one would never render. `package`, and the leaf spellings `label`, `title` and `displayName`, are answered with the declared spelling.
26+
- The console draws the translated name where a reader sees a package — Setup's package list (row, detail title, description, search, the installed-apps group) and Studio's package switcher for a package that ships no app — and falls back to `manifest.name`. A package that publishes an app is still named by the app's label in the switcher.
27+
- `manifest.name` stays exactly as authored on every wire and in every editor: the translation is a display overlay, so the edit dialog that prefills from the listed manifest never saves a translated name back.
28+
- A disabled package keeps its translated name: its bundle is loaded at boot whether or not the package is enabled.
29+
- `os i18n extract` scaffolds `packages.MANIFEST_ID.name` / `.description` from the manifest, and `os i18n check` / `os lint` report a locale that leaves them out as `i18n/missing-package` — a warning, like every other missing translation. A stack that declares a non-default locale and has never named its package in it sees two new warnings per locale on upgrade; the ObjectStack examples now name theirs.
30+
31+
`MANIFEST_ID_PATTERN` is now declared in `kernel/address-grammar.ts` beside `NAMESPACE_PATTERN`; `kernel/manifest.zod.ts` re-exports it, so every existing import keeps working.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(metadata-protocol): a `422 INVALID_METADATA` issue entry carries the registered refusal on `params`, so a client of the save door can read the code
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
A spec rule that owns a registered error code stamps it on its zod issue as `params.code`, next to the fields that say which fix applies: `CONTROLLED_BY_PARENT_MASTER_INVALID` with `shape` (an object save), and `PLUGIN_UI_REQUIRED_KEY_MISSING` with `key` (`PluginSchema`, which no save-door type parses today). zod reports every such rule with its own issue code `'custom'`. The metadata save door's `422 INVALID_METADATA` built each `issues[]` entry from `path`, `message` and that `'custom'` only, so a client of the door (anything that does not parse locally the way Studio does) could not tell which rule refused the body except by its English message.
12+
13+
- **`@objectstack/metadata-protocol`.** The save door's 422 entry gains an optional `params` member: the registered refusal the issue carries, present only when the issue's `params.code` is a registered error code, and holding only its string, finite-number and boolean members. An object save refused for a `controlled_by_parent` master now answers `{ path: 'fields', code: 'custom', message, params: { code: 'CONTROLLED_BY_PARENT_MASTER_INVALID', shape: 'master-not-writable' } }`. Read the registered code from `params.code`. `zodIssuesToMetadataIssues` takes a new option, `refusalParams`, which only the save door sets. The read path's `_diagnostics.errors[]` and the seed refusal's `seedApplied.issues[]` keep exactly `path`, `message` and `code`, the shape their spec schemas publish.
14+
- **`@objectstack/spec`.** The `CONTROLLED_BY_PARENT_MASTER_INVALID` docblock and its ledger note now say the save door's 422 carries the code on `params.code`.
15+
16+
Nothing to migrate. The entry's `code` is unchanged (still zod's issue code, `'custom'` for these rules), and an entry that carries no registered refusal gets no `params` member, so a client that matches `code` or compares whole entries for other issues reads exactly what it read before.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
---
4+
5+
feat(service-knowledge): a scheduled reconcile keeps every knowledge index equal to its source, daily and soon after a predicate write
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Record events keep an index fresh; the reconcile now keeps it correct (ADR-0161 K1). `KnowledgeService.reconcileSources()` walks every source whose store lists its documents with the complete build the boot and `os knowledge rebuild` already run — same cluster lease and fence, same skip, same purge, same `completeBuild`, trigger `reconcile` — so the documents of rows inserted or changed without an event are written, those of rows deleted or moved out of `where` by a predicate write, or built from an insert that rolled back, are purged, and nothing is embedded again for a row that did not change.
11+
12+
- `KnowledgeServicePlugin` schedules one job, `knowledge:reconcile`, on the platform's job service, daily at 03:00 UTC. The new plugin option `reconcile` moves it (`{ cron, timezone }`) or turns it off (`false`). A run that could not finish a source is `degraded` in the job's run history, naming the source. With no job service composed, the plugin says so once at boot.
13+
- A `data.records.updated` / `data.records.deleted` event (a `multi: true` write) now asks for a reconcile of every source over the object, started once the object has had no further predicate write for two minutes, at the latest ten minutes after the first; its warning says so. A source on an adapter without `listDocuments` is never reconciled: the reconcile says so once at `warn`, and the predicate-write warning keeps its old text for it.
14+
- A source whose index fingerprint or recipe moved while the server runs (a split or embedder setting saved) is built as a new generation by the next reconcile instead of at the next restart.
15+
- `KnowledgeBuildTrigger` gains `'reconcile'`; new exports `KnowledgeReconcileReport`, `KnowledgeReconcileEntry`, `KnowledgeReconcileRequest`, `RECONCILE_JOB`, `RECONCILE_DEFAULT_CRON`, `RECONCILE_QUIET_MS` and `RECONCILE_MAX_WAIT_MS`; `KnowledgeService.requestReconcile(object)`.
16+
17+
No migration: nothing an author writes changes, and a deployment that wants no scheduled walk sets `reconcile: false`.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(app-shell): 「Design layout」's menu adds the app's AI inquiry page, and 「Set as home」 makes it the app's home
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The design mode's menu picker gains 「AI inquiry」, which adds the app's AI inquiry page: a `type: 'component'` navigation entry whose `componentRef` is `ai:chat`. Like 「Link」 it lists nothing. A small form takes the entry's name and the page's copy (heading, subtitle, question-box hint, and up to four suggested questions, one per line); a field left empty keeps the page's default text. The form refuses, under the field, what `AiChatNavParamsSchema` refuses, and cannot be sent until it is mended. An app carries at most one such entry, so the kind is not offered once the app has one, nested in a group included, or when its stored menu holds one the reader is not shown.
12+
13+
That entry's 「⋮」 menu gains 「Edit inquiry page」, which edits the same copy again, and 「Set as home」, which moves the entry to the first place of the top level. The home follows the app's existing landing rule: a declared `landing` comes first; with none, from 768 px up the first entry shown lands; below 768 px the app root is the app's menu, where the entry becomes its first row. So the move is the whole edit: no `landing` is written, and an app that declares `landing` keeps landing where it declares.
14+
15+
The entry is saved like every other menu edit: into the app's own package when it is writable, else into its customization package, and published at once. Who sees it is set in Studio, as for every entry. `@object-ui/i18n` carries the new strings in all eleven locales.
16+
17+
Nothing to migrate.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-ai` no longer teaches an authored AI button on a record page
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
ADR-0160, seventh amendment (D6, "Entry point"): the entry to the in-app assistant is the shell's 「问 AI」 entry, and no page declares an AI button of its own.
11+
12+
`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6791 to 6609.
13+
14+
`evals/skills-tools-knowledge.json`: case 10 keeps its prompt, an Ask AI button on the contract record page, and now expects the opposite answer: no action is written, and the answer names the shell's 「问 AI」 entry. Its `must_contain` is that entry's name, and its `must_not_contain` holds `defineAction(` and `locations:`, two tokens that only an authored action carries.
15+
16+
The `objectstack-ui` action-type table is unchanged: it is held row for row to the members of `ActionType`, which still include `ask_ai`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(app-shell): opening the assistant from 「Ask AI」 after closing it starts a new conversation, and the drawer's header names the conversation (ui ADR-0057 Amendment A5)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **What an opening from the entry shows.** The entry is the top bar's 「Ask AI」 button, the keyboard toggle (Ctrl/Cmd+Shift+I), Home's 「Ask AI」 and the record pane's 「Ask AI」. After the user closes the drawer (×, the entry or the toggle again, dismissing the phone sheet), and the first time in a browser tab, it opens a new conversation; the last one stays in history. After the console closed the phone sheet because the page under it moved (a link in an answer, Back), it shows the same conversation. While a write the AI proposed waits for the user's approval in the conversation shown at the close, it shows that conversation. A build conversation (the `build` agent, a package, an app whose `defaultAgent` is `build`) opens as before. A named conversation (a history row, an `/ai…` address), a reload, the assistant bus and filling the window are unchanged.
12+
- **A new conversation leaves no empty row.** It is started with `forceNew`: nothing is created until the first message is sent.
13+
- **The header.** One row in the side panel, the full window and the phone sheet: the conversation's label as the history list shows it ("New conversation" before the first send), then + (a new conversation), the history as an icon button (side panel and sheet; the full window shows the history beside the chat), 「···」 and ×. The drawer is no longer titled "AI Assistant".
14+
- **Writes awaiting approval reach the assistant bus.** The chat now records, per conversation, an AI-proposed write that waits for the user's approval, so the entry's amber marker also shows for it while the chat is closed. The marker's text (`console.ai.dock.planAwaitingApproval`, key unchanged) now reads "An action is waiting for your approval" (「有一项操作等待确认」) in every pack, since no plan is published any more.
15+
- **The record pane's assistant button** reads 「Ask AI」 with the chat-bubble icon, like the top bar's, and opens as the entry does.
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+
fix(scenarios): the run grade reads "6 groups" as the count of a reply's own groups, and a decline worded "no figures to report" as a decline
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Three verdicts of the travel_expense ask rounds were scored by accident of wording.
11+
12+
- **A group count read as a leak.** A manager's reply that listed its own six statuses and closed with "The result is complete (6 groups, none truncated)" was charged with `a figure outside the persona's scope (6)`, because six is also the number of draft claims over every row. A number a group word follows ("6 groups", "6 statuses", "6 个分组") now counts the reply's own groups and states no figure of the question's object. The same figure stated of the object ("6 draft claims", "Draft: 6") is still a leak, and an object that itself goes by a group word keeps its count.
13+
- **A decline dropped as a sentence about a report.** "I can't count trip requests here: the app has no trip-request object, so I have no figures to report by status" was read as a sentence about what a report covers, which is left out before the decline wordings are read, so the turn scored `did not decline`. `report` is now read there as the noun only: after "to", a modal or a first-person subject it is the verb.
14+
- **"There is no such object" for a role without access.** The rule is now stated: on a question whose object the persona may not read, a reply that says the app has no such object declines under schema masking, as "has no such field" does for a hidden field, because the object is absent from everything the persona is served (ADR-0106, object-level visibility). With masking off it is no decline. It declines only in a reply that writes no number: one that says the object is absent and then counts another object has answered some other question.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
'@objectstack/skills': patch
4+
---
5+
6+
feat(qa): the skill-evals grader takes an any-of form, `must_contain_any`; `objectstack-ai` case 6 moves to it
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A skill eval case can now list `assertions.must_contain_any` beside `must_contain` and `must_not_contain`: a list of groups, each a list of tokens, and a group is met when at least one of its tokens is in the answer. Every group is required, so `[["a", "b"], ["c"]]` reads "(`a` or `b`) and `c`". Matching is the same as the other two forms: a literal, case-sensitive substring, nothing normalised, no model judge. The reader refuses a `must_contain_any` that is not a list of groups, a group that is empty or not a list of strings, a group holding an empty token, and a case with no token in any of the three forms. A failing run record names each unmet group whole in `unmetAny` (the key is absent when every group is met), and the round summary prints it in the missed column as `(none of: a / b)`. The runner runs from a checkout only; of `@objectstack/scenarios`, the published README is what changes.
12+
13+
The case hash covers the groups only when a case has any, so every case without the form keeps its hash and `skill-evals --regrade` reads its earlier records as before. A case that gains a group, or has one edited, has a new hash: its earlier records are set apart, and it compares across rounds only after a re-run.
14+
15+
`skills/objectstack-ai/evals/skills-tools-knowledge.json` case 6 (an operator script asked to approve AI pending actions on an API token) now requires one of `ai:approve`, `signed-in session`, `refused` or `never decides` in place of both `signed-in session` and `refused`, which failed correct answers that worded the refusal another way or answered in another language. Its prompt, reference answer and forbidden token are unchanged, and so is the skill text.

0 commit comments

Comments
 (0)