Skip to content

Commit fe50943

Browse files
chore(approvals): merge main into the approvals trunk (#38497 refresh) (#38791)
1 parent 6e17a6a commit fe50943

1,253 files changed

Lines changed: 70398 additions & 18443 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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(plugin-chatbot): a member rates an assistant answer with thumbs up / down and an optional note
7+
8+
Clause-②: yes
9+
Metadata-protocol: none
10+
11+
`<ChatbotEnhanced rateAnswers conversationId="…">` draws a thumbs up / thumbs down pair on each finished assistant answer. A thumb opens a short form with an optional note (up to 500 characters); a thumbs-down first shows "A thumbs-down shares this question and your note with your organization's administrators", and nothing is sent until the member presses Send. The answer's stored rating draws pressed, and the member can change or remove it. The control calls the AI service's rating routes, `GET` / `POST` / `DELETE {base}/conversations/:id/turns/:turnId/feedback` (`answerFeedbackApiBase`, default `/api/v1/ai`), through the host's authenticated `apiFetch` when a `SchemaRendererProvider` is mounted.
12+
13+
The control is off unless the host passes `rateAnswers`, and it is never drawn on a `readOnly` transcript (such as another member's shared conversation), without a `conversationId`, while an answer streams, or on an answer with no turn. A turn stored as several assistant messages draws one control, on its last message.
14+
15+
Each message now carries `turnId`, the turn the rating routes address: a live answer takes the id of the user message that started its turn (the `turnId` the chat transport already sends), and a restored message takes the `turnId` its history carried. A host passing restored `initialMessages` to `useObjectChat` hands each message's `turnId` in; a restored message without one gets no control, never a guessed id.
16+
17+
`@object-ui/i18n` adds the `chatbot.answerFeedback.*` labels in every locale.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(plugin-chatbot): a member saves an answer as a question, their own view, or a report or dashboard widget draft, and runs saved questions again
7+
8+
Clause-②: yes
9+
Metadata-protocol: none
10+
11+
`<ChatbotEnhanced saveAnswers conversationId="…">` draws a Save button on each finished assistant answer whose turn ran an object query (a data tool answered a `source` block). It opens a row of actions under the answer: "Save question", "Save as my view", "Save as report draft" and "Add as dashboard widget draft". Each one names the answer's turn and the tool call whose query it keeps (the turn's last object query): "Save question" calls `POST {base}/saved-questions` with `conversationId`, `turnId` and `toolCallId`, and the other three call `POST {base}/conversations/:id/turns/:turnId/artifact` with `kind` `view`, `report` or `widget` (`answerSaveApiBase`, default `/api/v1/ai`). Nothing is published from the chat: the report and widget results are drafts, and the row says so. When the server refuses draft authoring to the member (`report_authoring_requires_manage_metadata`), the chat says why and no longer offers the two draft actions; any other refusal shows the server's message.
12+
13+
With `saveAnswers`, the composer also opens a "Saved questions" side panel: the member's saved questions, read each time it opens, each one run again (`POST {base}/saved-questions/:id/run`, the fresh result drawn under it) or deleted (`DELETE {base}/saved-questions/:id`).
14+
15+
The actions are off unless the host passes `saveAnswers`, and are never drawn on a `readOnly` transcript, without a `conversationId`, while an answer streams, on an answer with no turn, or on a turn without an object-query `source` (a dataset answer's `provenance` is not one). The Console's AI chat switches them on.
16+
17+
`@object-ui/i18n` adds the `chatbot.answerSave.*` and `chatbot.savedQuestions.*` labels in every locale.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/client': patch
3+
---
4+
5+
feat(client): `ai.savedQuestions` and `ai.answers`, the SDK methods for the AI answer follow-up routes
6+
7+
Clause-②: yes
8+
Metadata-protocol: none
9+
10+
The client now calls the eight routes `@objectstack/spec/api` declares in `ai-answer.zod.ts`, typed from those spec shapes only:
11+
12+
- `ai.savedQuestions.list()`, `create(request)`, `delete(id)` and `run(id)`: `GET`/`POST /api/v1/ai/saved-questions`, `DELETE /api/v1/ai/saved-questions/:id` and `POST /api/v1/ai/saved-questions/:id/run`.
13+
- `ai.answers.createArtifact(conversationId, turnId, request)`: `POST /api/v1/ai/conversations/:id/turns/:turnId/artifact`, answering a list view, a report draft or a one-widget dashboard draft, discriminated by `kind`.
14+
- `ai.answers.getFeedback`, `setFeedback` and `deleteFeedback(conversationId, turnId, …)`: `GET`/`POST`/`DELETE /api/v1/ai/conversations/:id/turns/:turnId/feedback`.
15+
16+
Each method resolves to the route's `data` payload; the two deletes resolve `undefined` on the route's 204. A refusal throws the usual transport error, with the route's code on `err.code` and the status on `err.httpStatus`. The request and response types are re-exported from `@objectstack/client`. The routes are served by the AI service; check `discovery.services` first, as for the rest of `ai.*`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): a disabled package's validation rule no longer stands as the packaged rule of the object it extends
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`SchemaRegistry.getPackagedObjectBase` built the packaged rule set from every code extender of the object, a disabled package included, while the served object withholds a disabled package's extension. Where an enabled extender and a later, disabled one both ship a rule of one name, the base carried the disabled rule while the served object carried the enabled one, so the enabled rule's `message` read as rewritten by the tenant: `/meta` served it in the source language under every other locale, and a refused write quoted it untranslated. The base now leaves a disabled package's extensions out of its rules as it already did for its fields and tabs, so the enabled rule's message is translated again. Nothing to change in your metadata.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/rest': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
fix(rest,runtime): the draft and layered `_env` reads of a name only disabled packages hold answer their own 404
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`GET /meta/:type/_env/:name` already answered `404` for a name that only disabled packages hold. Three spellings of the same read still answered `409 RESOURCE_CONFLICT` and named the disabled package: `?state=draft`, `?preview=draft` and `?layers=true`, for a caller who may read pending drafts. Each now answers what the bare by-name read answers, on both transports (`RestServer` and the runtime dispatcher), and names no package:
12+
13+
- `?state=draft` (any case): `404 NO_DRAFT`
14+
- `?preview=draft`: `404 RESOURCE_NOT_FOUND`
15+
- `?layers=true`: `404 RESOURCE_NOT_FOUND`
16+
17+
A package-less draft stored under such a name is the disabled holder's customization, so it is withheld too. Once the holder is enabled again, each read refuses `409` and names it, as before.
18+
19+
The door judges the read the caller actually gets. For a draft read, both the plain read and the draft read must withhold the name. Sometimes an enabled package holds a stored draft of the name that the plain read does not see, and the bare draft read serves that draft to an admitted builder. In that case `_env` keeps the `409` and never serves the draft. The layered view is judged by the plain read, because its chain withholds every layer whenever the plain read withholds a disabled holder's item.
20+
21+
FROM → TO for a client: a `409` on these three reads of a disabled-only name becomes a `404` (`NO_DRAFT` for `?state=draft`). Both are refusals, so code that already handles a missing item needs no change.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(metadata-protocol)!: the reads that name no package give one answer per name: the environment's doc entry first, and a disabled holder read as absent
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: registered doc-bare-read-environment-entry-first, disabled-holder-package-less-row-bare-read-judged-as-absent -->
12+
13+
**BREAKING** for a caller that reads a shared name without naming a package, shipped as `patch`: no key an author writes changes (`Metadata-protocol: none`). Three reads that named no package answered by registration or save order, or disagreed with the registry's own read of the same name; each now gives one answer. Naming the package (`?package=ID`, or `packageId` in process) reads that package's item exactly as before.
14+
15+
- **A doc the environment stores beside one enabled package's doc of the same name** (#34452, ruling 6942962369). FROM `GET /api/v1/meta/doc/NAME`, `/layers` and `/published` serving the package's doc while the registry and the metadata facade served the environment's own entry, TO every read that names no package serving the environment's entry, as it already did beside two or more holders. `?package=ID` still reads the package's doc. Known deviation, tracked in #38659: the plain read naming no package serves the entry under a holder's envelope (`_packageId` that holder, `_provenance: package`, lock `full`), as it already did beside two or more holders.
16+
- **The in-process layered read of a doc two or more enabled packages hold, with no environment entry** (#34190). FROM the layered read naming no package serving the layers of the package registered last, TO a `409 RESOURCE_CONFLICT` rejection naming each holder in `refusal.candidates`, as the item read and every HTTP door already answered.
17+
- **A package-less row beside a disabled package's row and enabled packages' rows of a name no enabled package ships** (#34440). FROM the plain read and the execution read following save order, `/published` serving the package-less row, `/layers` refusing with the disabled package among the candidates, and one save order answering 404 (every bare door answered 404 when the disabled package held the name in code alone beside two or more enabled packages' rows), TO the answer the reads give without the disabled holder: two or more enabled holders refused `409 RESOURCE_CONFLICT` naming exactly them in `details.candidates`, one enabled holder served, in every save order and after a restart. `?package=` of the disabled package still answers 404.
18+
19+
The fix for a caller that relied on the old answer: name the package it means. `os migrate meta --from 18` lists both entries.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-i18n entry file becomes a router
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-i18n/SKILL.md` goes from 25.3 KB to 9.0 KB (504 lines to 160). It now holds five things: three first checks (read the stack's `i18n` block and the contract before writing a key; which of `defaultLocale`, `sourceLocale`, `supportedLocales` and `fallbackLocale` is which; verify with `os i18n check` and `os validate`), one type-checked bundle with the `translation` metadata item beside it, the key map as one path listing, seven traps, and a table that says where to go for the rest. No rule's teaching changes. This skill has no hand-written reference file, so no text moved: what left the entry was cut, and this entry says what now answers it.
11+
12+
**What the entry keeps.** The key map lists, as paths, the groups under `objects.{object}` (`fields`, `_views`, `_actions`, `_sections`, `_tabs`, `_relatedLists`, `_milestones`, `_validations`) and the top-level groups the old entry listed, with their keys. It is not the whole contract: it stops above the leaf keys of `bulkActions.{def}`, of `params.{param}`, of a dataset member and of a report block's `description`, and it does not list the top-level `forms` group (the old entry did not either). The routing table sends a key or shape the map does not show to the contract. Six notes under it carry the placements a path cannot show: `inlineTitle` and `relatedListTitle` are keys of the child object; `_views.{view}.title` is a form's own heading and a section's override says `helpText` where the field says `help`; `columns` is a sibling of `fields` (with the one worked example the map keeps) and `preflight` has no `title`; `_relatedLists.{list}` is on the parent; a report block is keyed by its `name` and a `books` group by its `key`; a flow step is keyed under `approvals`, `screens` or `nodes`. The seven traps, each one a bundle that parses and ships and then translates nothing or the wrong text: an option key is the stored `value`, never the label; `t()` fills double braces only and there is no ICU MessageFormat; `os i18n extract` writes `objects` and `globalActions` only unless you pass `--no-objects-only`; coverage is not freshness, so `os i18n extract … --check` is the second gate; a generated module is an `objects` subtree that needs wrapping, and `withSourceFallback` needs the `--source-hashes` companion as its fourth argument; text the server writes is in the organization's language; an app-authored refusal has no `en` floor.
13+
14+
**What left, and what answers it now.**
15+
16+
- The condition on each key (which declaration a key needs before it is accepted) and the retired and misspelled keys (`o`, `app`, `nav`, `dashboard`, `_globalOptions`, `_meta`, `validationMessages`, `settings`, `confirmMessage`, `sourceLanguage`, `authoringLocale`, `authoringLanguage`): the contract, `node_modules/@objectstack/spec/src/system/translation.zod.ts`. Its shapes are strict, a key with a condition says it in its `.describe()` text, and a refused key is answered with the key to write. `os validate` reports a key that names nothing the metadata declares as `translation-target-unknown`, an error.
17+
- The `i18n` property table, the naming-convention table and the file-layout table: the contract and the bundle example.
18+
- The flags of `os i18n check` and `os i18n extract` beyond the ones a run needs (`--include-platform`, `--show-keys`, `--fill`, `--default-locale`, `--no-metadata-forms`) and `os lint --i18n-strict`: each command's `--help`.
19+
- The `II18nService` method list: `@objectstack/spec/contracts`. The locale resolution order: https://objectstack.ai/docs/protocol/kernel/i18n-standard. The coverage and diff shapes: the contract (`TranslationCoverageResultSchema`, `TranslationDiffItemSchema`). The three `/api/v1/i18n` routes: https://objectstack.ai/docs/api/plugin-endpoints, which the entry does not link.
20+
- The paragraph on platform-composed `userMessage` sentences, the list of shipped example bundles, and the sentence that validation, delete-restriction and permission-denial messages name fields in the request's language: cut. They describe what the platform does and ask nothing of a bundle author.
21+
22+
**Anchors that no longer exist in `SKILL.md`.** Every section heading of the old file: `#translation-configuration`, `#stack-level-i18n-config`, `#authoring-translation-bundles-objects`, `#object-level-translation-structure`, `#naming-conventions`, `#file-organization-strategies`, `#authoring-at-runtime-the-translation-item`, `#message-interpolation`, `#simple-format-default`, `#no-icu-messageformat`, `#translation-coverage`, `#os-i18n-check`, `#os-i18n-extract---check--freshness-not-coverage`, `#diff--coverage-schemas`, `#integration-with-ii18nservice`, `#service-contract`, `#registration`, `#server-composed-user-text-usermessage`, `#translation-workflow-best-practices`, `#1-extract-skeletons-from-metadata`, `#2-register`, `#shipped-examples`, `#common-pitfalls`, `#-the-retired-o-shape`, `#verify-your-work`, `#references`, `#see-also`. The new ones are `#first-checks`, `#a-bundle`, `#key-map`, `#traps` and `#where-to-go`. No file in this repository linked an anchor of the old entry.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-platform entry file becomes a router
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-platform/SKILL.md` goes from 24.7 KB to 9.0 KB (421 lines to 105). It now holds three things: four first checks (the installed `@objectstack/spec` version, what the project already has, the contract, `os validate`), the traps that pass `os validate` and then fail at run time, and a table that says which file to open for the task at hand. No rule's teaching changes. Text moved, and this entry says where it went. The skill's files are 2.1 KB smaller together (107.5 KB to 105.5 KB).
11+
12+
**What the entry keeps.** Five traps: no driver in `plugins:`, an installed package is customized from its paired `.custom` package, who owns the HTTP server (`createHonoApp` or `HonoServerPlugin`), `manifest.engines.protocol`, and `manifest.namespace`. Then the full list of `defineStack()` top-level keys with the rule that an undeclared key is refused, the `requires:` provider table with the three rules that bite most often, and `Seed Data` (the three import modes; a seed cannot create a person, `demoStaff` does).
13+
14+
**What left, and where it is now.**
15+
16+
- `references/bootstrap.md` now also holds `Strict Validation` (`#strict-validation`), the manifest notes the entry's two traps do not repeat (`#manifest`), `Project Structure Conventions`, what the `blank` template scaffolds (under `#scaffolding-command`), `Runtime Boot Sequence` (`#runtime-boot-sequence`), the `requires:` tokens that have no provider row and the remaining rules (`#requires-in-detail`), `onEnable`, `Customizing an installed package` in full (`#customizing-an-installed-package`), and `demoStaff` with its example (`#demo-accounts--demostaff-vs-devlogins`).
17+
- `references/operations.md` now also holds `Driver Selection Guide` (`#driver-selection-guide`), when to construct `DriverPlugin` yourself (`#wiring-a-driver-yourself`), `HTTP Layer (Hono)` (`#http-layer-hono`), and the note that `os compile` writes `dist/objectstack.json`.
18+
- Anchors that no longer exist in `SKILL.md`: `#definestack--the-core-configuration` (now `#definestack-keys`), `#full-configuration-reference`, `#strict-validation`, `#compile-artifact-and-runtime-metadata-boundary`, `#manifest-reference`, `#the-app--platform-boundary`, `#the-template`, `#project-structure-conventions`, `#naming-conventions`, `#driver-selection-guide`, `#wiring-a-driver--you-usually-do-not`, `#http-layer-hono`, `#usage-pattern-hono`, `#architecture`, `#runtime-boot-sequence`, `#onenable--where-an-app-binds-runtime-code`, `#demo-accounts--demostaff-vs-devlogins`, `#references`. `#requires--which-service-plugins-boot` and `#seed-data` still do.
19+
20+
**Not carried over, because another file already says it.** The `App / Platform Boundary` section (objectstack-project owns that decision; `references/bootstrap.md#app-or-platform` keeps the two sentences it does not have), the naming-convention table (objectstack-data's naming rules), the annotated manifest example (every key is in `kernel/manifest.zod.ts`, which the entry's third check points at; the barrel example in `references/bootstrap.md` now shows `engines`), the Hono usage snippet, and the closing list of the other files (the routing table replaces it). In `references/plugin-development.md`, the `Plugin` interface block and the hook example are now one pointer each to `rules/plugin-lifecycle.md` and `references/plugin-hooks.md`, which carry the same text.

0 commit comments

Comments
 (0)