You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a14435d
Browse filesBrowse the repository at this point in the historyBrowse files
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.
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.
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.
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.
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.
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.
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.
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.
Copy file name to clipboardExpand all lines: content/docs/ai/knowledge-rag.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,7 @@ source: {
255
255
```
256
256
257
257
-`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.
259
259
-`whole` keeps each document as one passage.
260
260
261
261
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).
maxChars: 600, // optional: longest passage, in characters
567
-
minChars: 200, // optional: merge adjacent pieces shorter than this (default 200)
567
+
minChars: 200, // optional: merge adjacent pieces shorter than this (default 200);
568
+
// under 'markdown', only in a section that does not fit
568
569
}
569
570
```
570
571
571
572
| Strategy | How it cuts |
572
573
|----------|-------------|
573
574
|`whole`| One passage per document. |
574
575
|`recursive` (the default) | At blank lines, then line breaks, then sentence ends, then semicolons, then characters — each next level only for a piece still too long. A Markdown table or list item is one unit while it fits; a table that does not fit is cut between rows, each piece repeating the header row. Adjacent pieces are merged while the merged piece is shorter than `minChars`; a short title block leads the text after it. |
575
-
|`markdown`| One section per heading (a `#` inside a code fence is no heading), each cut as `recursive` cuts. Every passage begins with its heading path (`Policy > Transport > Air`), which counts toward its length and is embedded with it, and carries it as `headingPath`. A heading with no text of its own joins the next passage. |
576
+
|`markdown`| One section per heading (a `#` inside a code fence is no heading); the text before the first heading, and a heading's text before its first sub-heading, are sections too. Every passage begins with its heading path (`Policy > Transport > Air`), which counts toward its length and is embedded with it, and carries it as `headingPath`. A section that fits — its text together with the heading path it is given (the whole path, or the innermost heading when the whole path is too long), within the effective `maxChars` and the token budget — is **one passage, whatever `minChars` is**; only a section that does not fit is cut as `recursive` cuts, its pieces merged up to `minChars`. A heading with no text of its own is named by the path of the section after it when it is that section's ancestor, and is a passage of its own otherwise. |
576
577
577
578
**Sentence ends, for Chinese and English text.**`。?!` end a sentence
578
579
wherever they stand. `. ? !` end one only before whitespace or the end of the
@@ -588,7 +589,9 @@ embedder's `maxInputTokens`, every passage's token estimate (the shared
588
589
`estimateTokens` from `@objectstack/spec/shared`) also stays within **80%** of
589
590
that limit. A passage keeps both bounds, so the effective length is the
590
591
smaller one; with no limit known, only `maxChars` applies. A `minChars` above
591
-
the effective `maxChars` reads as `maxChars`. The splitter never overlaps
592
+
the effective `maxChars` reads as `maxChars`; under `markdown` it merges only
593
+
the pieces of a section that does not fit, so `minChars: 0` still leaves a
594
+
fitting section whole. The splitter never overlaps
592
595
passages.
593
596
594
597
**`whole` over the limit.** A `whole` document whose estimate is over the 80%
0 commit comments