Skip to content

Commit 40987f2

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-38369-knowledge-held-not-served
2 parents 72a9cbf + 4bc5a0c commit 40987f2

69 files changed

Lines changed: 2717 additions & 293 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/auth': patch
3+
---
4+
5+
fix(auth)!: `createAuthClient().updateUser` declares `Promise<void>`, because the server answers a receipt, not the user
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-member-retyped @object-ui/auth#AuthClient.updateUser) A published member of a runtime-exported type is retyped: one member's return annotation narrows from one concrete type to another. `AuthClient.updateUser` declared `Promise<AuthUser>`, but better-auth's `POST /update-user` answers the receipt `{ status: true }` and the client cast that receipt to `AuthUser`; the member now declares `Promise<void>` and the call resolves with nothing. No request byte, URL or refusal changes, and the diff touches no `packages/spec` path and no ADR-0087 shape surface. The affected party is a TypeScript consumer (a caller reading the result, or a host passing its own `AuthClient` as `AuthProviderOptions.client`), and the compiler delivers the break at their own site; `objectstack migrate meta`, `spec-changes.json` and the upgrade guide have nothing to rewrite. -->
11+
12+
**BREAKING** for a typed caller and for a host that implements `AuthClient` itself, shipped as `patch`: the change is not to the metadata protocol (`Metadata-protocol: none`). Nothing that worked at runtime breaks for a caller of `createAuthClient()`: the value it now drops was never a user.
13+
14+
The published typing narrows. `AuthClient.updateUser` was declared to return the updated user, but better-auth's `POST /update-user` answers `{ status: true }`, and the client passed that answer on as if it were a user. A caller that trusted the type read a user with no `id`, `name` or `email`.
15+
16+
- FROM `AuthClient.updateUser` declared to resolve the updated user TO `AuthClient.updateUser: (data: Partial<AuthUser>) => Promise<void>`, which resolves nothing (it was `(data: Partial<AuthUser>) => Promise<AuthUser>`). At runtime `createAuthClient().updateUser` resolves with `undefined` instead of the receipt. A refusal still rejects, as before.
17+
- **A caller that read the result** (`(await client.updateUser(data)).name`) no longer compiles. It read `undefined` at runtime. Read the stored fields with `getSession()` after the write. `useAuth().updateUser` already resolved with nothing and keeps the session user's identity, so React callers see no change.
18+
- **A host that builds its own `AuthClient` and passes it as `AuthProviderOptions.client`**, with an `updateUser` that returns the user (`async (data): Promise<AuthUser> => …`), no longer assigns to the interface. Return nothing from it, or annotate it `Promise<void>`. `AuthProvider` never read that value.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/skills': patch
4+
---
5+
6+
docs(skills,spec): the `objectstack-data` skill teaches which of the four field locks to use, and the `uiReadonly` + `readonly` refusal names ADR-0163
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`skills/objectstack-data/rules/validation.md` gains `## Locking a Field`: a two-by-two table of `readonly`, `readonlyWhen`, `uiReadonly` and `uiReadonlyWhen` (who is kept out, and when), one checked sales-order example, and what each column does at run time. The server lock (`readonly`, `readonlyWhen`) drops the value from every non-system write and answers success; the hand lock (`uiReadonly`, `uiReadonlyWhen`) stops the console offering the field while an action, an import and the API still write it, each write judged by the object's validations. A status field that only a Confirm action moves is `uiReadonly: true`; under `readonly: true` a declarative action's own write is dropped. The section also covers the object-level `uiReadonlyWhen` and how a field replaces it, what a console create does with a `uiReadonly` field, and the refused pair.
12+
13+
One sentence the skill carried is corrected on the way: an import is not a system-context write, so `readonly: true` drops an imported value like any other client write. The two bullets that said otherwise are now one pointer at the new section, and `SKILL.md` § Conditional Field Rules routes there. `evals/objects-fields-relationships.json` gains case 30, a `uiReadonly` status field.
14+
15+
`@objectstack/spec`: the parse refusal for `uiReadonly: true` beside `readonly: true` keeps its wording and now ends with where the model is recorded: `The two locks and which one to choose: ADR-0163 (D1, D6).` No schema, accepted value or default changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@objectstack/console': patch
4+
---
5+
6+
perf(app-shell): an object list stops loading the package ask, the view settings panel and the create-view dialog before its first screen
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
An object list page fetched about 183 KB (brotli) of authoring code before its first screen, though it only needs that code when someone opens it. Three pieces did this. The "pick or create a package" ask that a view create may open was drawn closed on every list, and it brought in the package page's create dialog, its form and the Studio strings. The view settings panel and the create-view dialog were also drawn closed on every list. Now each one loads the first time it is opened, and after that it stays mounted, so closing it works as before. When a view create is refused, the reason loads with the refusal, and its toast shows once those strings arrive.
12+
13+
Nothing a user sees or saves changes, apart from a short wait the first time one of these opens. Nothing to migrate.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-ui kanban section names the rule that judges a board's group field
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/rules/list-views.md`: the kanban example no longer carries the comment "a select field" beside `groupByField`. The note under the example now says to group by a single-valued `select`, boolean or lookup, and names the warning a text, number or date field or a multi-valued one gets, `list-view-kanban-group-field-uncategorical`. The sentence that listed `summary`, `showFieldLabels` and `hideEmptyFields` as optional is gone: the example's comments and the `summary` note already say so. No token ceiling moves.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
feat(console): the chat reads the in-app `pending_confirmation` answer beside the stored `pending_approval` one
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
The in-app assistant's pending answer is moving from `{ status: 'pending_approval', pendingActionId }` to `{ status: 'pending_confirmation', pendingId }` (`ActionConfirmationPending` in `@objectstack/spec/contracts`). The console now draws the approval card for either answer: `detectPendingApproval` is the one recogniser for both, and each status pairs with its own id key only, so `pending_confirmation` with `pendingActionId` (or `pending_approval` with `pendingId`) is not read as a pending answer. A conversation stored with the old answer still shows its approval card, and Approve and Reject still reach its item. The id still arrives on the tool invocation as `pendingActionId`.
12+
13+
The chat's local message cache keeps the shape it writes for a pending approval; a live `pending_confirmation` answer goes through it and back to an approval card unchanged.
14+
15+
What widens: the public `detectPendingApproval` export of `@object-ui/plugin-chatbot` (and `@object-ui/plugin-chatbot/core`) now also recognises `{ status: 'pending_confirmation', pendingId }`, an input it refused before; its signature and return type are unchanged. Nothing changes on the server, in the routes or in the spec, and no export is added or removed.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/service-knowledge': minor
3+
'@objectstack/spec': minor
4+
'@objectstack/platform-objects': minor
5+
---
6+
7+
feat(service-knowledge): under the `markdown` split, a section that fits is one passage
8+
9+
Clause-②: no
10+
Metadata-protocol: semantic
11+
Skills-docs: follow-up owed — skills/objectstack-ai/SKILL.md
12+
13+
On `split.strategy: 'markdown'`, a section was cut as `recursive` cuts, and its pieces were merged only while the merged piece stayed shorter than `minChars` (default 200). A section that fit `maxChars` but held several paragraphs of 200 characters or more was therefore cut into several passages, so a search hit only part of an article.
14+
15+
Now a section whose text, together with the heading path it is given, fits the effective `maxChars` and the embedder's token budget is one passage, whatever `minChars` is (`minChars: 0` included). Only a section that does not fit is cut as before, with `minChars` merging its short pieces; such a section gives exactly the passages it gave before. The text before the first heading, and a heading's text before its first sub-heading, are sections and follow the same rule. `recursive` and `whole` are unchanged. The `@objectstack/spec` docblocks, the `minChars` description and the knowledge source form's help text now say this, and the Setup bundles in `@objectstack/platform-objects` carry the new help text (regenerated for en, re-translated for zh-CN, ja-JP and es-ES); no key, value or default changes.
16+
17+
Which passages change: on `markdown` sources only, the passages of sections that fit but were cut. Each such section becomes one passage, so a table and its note inside a fitting section are always one passage.
18+
19+
The `markdown` split algorithm version stays 2: this change rides the version move to 2 that the body-less heading fix already makes in this release train, so every `markdown` source rebuilds once for both, not twice.
20+
21+
What to do: nothing.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
---
4+
5+
fix(service-knowledge): a build's start onto a source's existing sync-state row is recorded without a false error
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Every boot that built a knowledge source logged `[knowledge] the start of the build of source '…' was not recorded` at error, after the engine's `Insert operation failed … UNIQUE constraint failed: sys_knowledge_sync_state.id` warning, although the row was written. An operator rebuild failed the same way. The start was written by the row's id alone, which the engine runs as a by-id update answering the record, not a count; the record read as "no row changed", and the fallback insert hit the primary key.
11+
12+
The start is now written by id and read by the by-id answer: the record means the row was updated, and `RECORD_NOT_FOUND` means there is no row yet, so it is inserted. A build start onto an existing row is one update and logs nothing; onto no row it is one insert. The once-per-process sync-state error report is no longer spent on this, so a real sync-state write failure is reported again.
13+
14+
Nothing to change in an app or its configuration.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@objectstack/console': patch
4+
---
5+
6+
fix(app-shell): an unset switch on a Studio metadata form shows the default its schema declares
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A switch on a Studio metadata form drew every unset value as off. Where the schema gives the key a default of `true`, that is the opposite of what runs: a knowledge source that stores neither `aiExposed` nor `refresh.onRecordChange` is searched by AI agents and kept in step with its records, while both switches read off beside help text saying "On by default". Such a switch now draws the default in effect, in edit and in read-only mode. It holds for every boolean row of a form whose schema default is `true`, among them an agent's, skill's, app's and email template's `active`, an object's capability switches such as `enable.apiEnabled`, and a dashboard header's `showTitle`.
12+
13+
Nothing is written for it: an item you open and save without touching the switch still stores no value for the key and keeps following the default. Toggling the switch stores an explicit `true` or `false`, as before. A boolean with no declared default still draws off when unset, and a stored `false` draws off.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the `form` layered and per-package reads serve a form a package still ships as an old shape
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The by-name read and the list of `form` already serve a form a package ships in its `views:` (a container's `formViews` entry or a `viewKind: 'form'` item), through the projection (`projectViewForms`, ADR-0159 D5). Two reads did not: `getMetaItemLayered` (`GET /meta/form/:name/layers`) answered `code: null`, and `effective: null` while only a stored `view` row stood over the form, and `getMetaItemsPerPackage` answered no item. So nothing could read an installed app's own document of its form while that form is still an old shape, which is every first-party form today.
11+
12+
What moves (each line FROM → TO):
13+
14+
- `getMetaItemLayered({ type: 'form' })`, `code`: FROM `null` when the address ships the form as an old shape TO that address's `view` code, projected (marked `_formDefinedIn: 'view'`, its `requiredPermissions` carried).
15+
- `getMetaItemLayered({ type: 'form' })`, `effective`: FROM `null` when no `form` layer answers TO the same address's `view` effective, projected: the stored `view` row that still replaces the form, or the base's own body. A stored `form` row or an authored `form` item keeps its answer. `overlay` is unchanged: it is the stored `form` row.
16+
- `getMetaItemsPerPackage({ type: 'form' })`: FROM the `form` items only TO those items plus the projection of the same request's per-package `view` items; an authored item shadows the projection of the same package and name.
17+
18+
Response shapes are unchanged: only fields that answered `null` or `[]` now carry the item the by-name read already serves. The anonymous form doors read the per-package layer for withdrawals only, so they answer as before. Nothing to do for an upgrader.

‎content/docs/ai/knowledge-rag.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ source: {
255255
```
256256

257257
- `recursive` (the default) cuts at blank lines, then line breaks, then sentence ends, then semicolons, then characters. It reads Chinese and English sentence ends — 「3.2 条」 and 「400.50 元」 stay whole — and never cuts inside a Markdown table or list item that fits.
258-
- `markdown` cuts one section per heading; each passage begins with its heading path, which is embedded with it.
258+
- `markdown` cuts one section per heading; each passage begins with its heading path, which is embedded with it. A section that fits in one passage (its text together with the heading path it is given, within the length below) is one passage; only a section that does not fit is cut as `recursive` cuts, and `minChars` (default 200) merges the short pieces of that cut.
259259
- `whole` keeps each document as one passage.
260260

261261
A passage is at most `split.maxChars` characters — else the **Knowledge → Target chunk size** setting, else 800 — and, when the adapter reports its embedder's input limit, within 80% of that limit by the shared token estimate below. A `whole` document over that budget is **removed from the index and reported** (`failed` and `failures` on the reindex result, an `error` log on the event sync), never truncated; because the estimate runs high, a `whole` document can use about 60% of the model's limit. The full rules are in [the protocol's split section](/docs/protocol/knowledge#35-the-split).

0 commit comments

Comments
 (0)