Skip to content

Commit f66978d

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-37225-plugin-bearer-fetch
2 parents b5a55f2 + eaa9e54 commit f66978d

50 files changed

Lines changed: 3607 additions & 56 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The MCP `query_records`, `aggregate_records` and `get_record` tool descriptions now say what a refusal's `notRecorded` member means: what it names is not recorded in this app, so the model follows the refusal's `ifNotRecorded` sentence and never reports 0 or empty for it. The refusal members and their sentences are unchanged. A `where` (or an aggregation `filter`) that carries the search companion key `__search` beside a field the caller's schema does not show no longer names `__search` in `notRecorded.fields`: the key is the engine's own search column, never a field the caller's app records.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
feat(service-knowledge): a knowledge source that was never built is built after boot, and an administrator can rebuild one with `os knowledge rebuild`
7+
8+
Clause-②: yes
9+
Metadata-protocol: none
10+
11+
- **The first build.** After every boot, `KnowledgeServicePlugin` reads what each `object` source's adapter holds (`indexStatus`, else one entry of `listDocuments`) against the index fingerprint and recipe hash the service computes now (ADR-0161 K7, "What starts a rebuild"), and builds — once, in the background, one source at a time — every source the adapter holds nothing for, holds under another fingerprint, or holds under another recipe hash. A source already built is left alone; a source with `refresh.onRecordChange: false` is left to its external indexer; an adapter with neither `indexStatus` nor `listDocuments` is never built automatically, and the boot log says so once. `KnowledgeServicePlugin({ buildAtBoot: false })` turns it off.
12+
- **One node builds a source.** A build runs under the `cluster` service's lock, key `knowledge:build:SOURCE`, renewed while it runs; a node that gets the lock after another built the source re-reads it and builds nothing, and a lock that does not answer starts no build. With no cluster service the composition is one node. Only a shared cluster lock driver (`redis`) makes this hold across nodes: the default `memory` driver's lock is per process, so with it every node builds.
13+
- **The administrator's rebuild.** The `knowledge` settings namespace gains two actions, gated like every settings write on `manage_platform_settings`: `rebuild` (`{ "source": "ID" }`) starts one complete build in the background, and `index_status` (`{}` or `{ "source": "ID" }`) answers each source's index state and the last build the answering node ran — its progress while it runs, its result (written, unchanged, purged, cannot be indexed) once it ended. `os knowledge rebuild SOURCE` starts a build and follows its progress to its end (`--no-wait` exits 0 once it has started and reports no outcome; otherwise exit 1 when it did not run or did not finish); `os knowledge status [SOURCE]` prints the state.
14+
- **What it costs.** A build sends the content fields of every matching row the index does not already hold unchanged to the embedding provider, which bills for them. The line that starts a build says so, the server logs its progress every ten seconds and its result, and `content/docs/ai/knowledge-rag.mdx` states it. The default `memory` adapter holds nothing after a restart, so with it every boot builds the whole source again, on every node.
15+
- `KnowledgeService` gains `readIndexState`, `rebuildSource`, `buildRecord`, `buildSourcesAtBoot` and `stopBuilds`, and the option `resolveBuildLock`; `IKnowledgeService` is unchanged.
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-platform stack-config example declares `engines: { protocol: '^19' }`, the major the 19.x boot handshake accepts
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`PROTOCOL_VERSION` moves to `19.0.0`, and a 19 runtime refuses a manifest that declares `'^18'` at boot (`OS_PROTOCOL_INCOMPATIBLE`). The `objectstack-platform` `defineStack` example, the eval that pins it (`evals/config-plugins-ops.json`, prompt and expected output together) and the `objectstack-upgrade` sentence that says what every scaffold and example writes now say `'^19'`. The upgrade skill's worked examples (`'^17'` → `--from 17`, the `--to 18` acceptance replay of the last ported hop) are unchanged: step 19 carries no conversion and one semantic entry (`protocol-18-range-refused`).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
'@object-ui/plugin-grid': patch
4+
---
5+
6+
fix(plugin-detail, plugin-grid): a field the server's refusal adds to the fill-in dialog reads the record the change would leave
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The fill-in dialog adds a row for a field a refusal names. That row now carries the record the change would leave (the stored record with the change merged in), as the dialog's other rows do, in all three hosts: the stage menu, the record page's inline Save and the list cell. An option `visibleWhen` on that row reads the change, so the stage menu's confirmation, which opens with no other row, no longer shows such a row with no options to pick.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(console): New on a list opened from a related list's "View all" seeds the relationship lookup's `dependsOn` fields, as the related tab's New does
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A related list's "View all" opens the child list under the parent record (the record trail). Its New opened the child's create form with the parent link alone, so a relationship lookup that declares `dependsOn` (an order `dependsOn` the account) drew gated ("Select Account first") with the parent hidden, or was emptied by a `lookupAutofill`. It now opens with the same seed the related tab's New writes (`relatedCreateSeedOf`): the parent pair first, then one `formLink` pair per `dependsOn` field, valued from the parent record. The trail holds the parent's id alone, so the page reads the parent record once, and only when the relationship lookup declares a `dependsOn`; a lookup without one, or a parent that cannot be read, opens with the parent link alone, as before. While the parent is read, New is disabled; a read that has not answered within 5 seconds opens the form with the parent link alone, and a read that answers after the page moved on (another filter, another page) opens nothing.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The rest of the report authoring panel's hints now say in Japanese and Spanish (and, where it still lagged, Chinese) what the English says. The Group Columns By, Sort Order, Blocks, Chart, Date Range and Export Options hints and the Joined blocks and Filter & chart section descriptions still translated the older developer wording (dimension names, sort keys with rows / columns / values, sub-reports bound to a dataset, chart type / legend / colors, the dataset's date dimension, the dataset's object); they are re-translated from the current English with the panel's business words (データソース / 指標 / グループ化, Fuente de datos / Métricas / Agrupar por, 数据来源 / 指标 / 分组). In Chinese the Chart hint and the Filter & chart description already followed the English and are unchanged.
9+
10+
Only translated text moved. No key, accepted value, default or English string changed.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/service-record-context': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
feat(record-context): the citation verifier tells a refusal from a failure and reports failures to the host
7+
8+
Clause-②: yes (widening) — new optional third argument of the exported verifyRecordCitations and two new exported types; existing calls unchanged
9+
Metadata-protocol: none
10+
11+
ADR-0160 D9 verifies an answer's citations once, so a citation lost to an outage is lost for good. `verifyRecordCitations` used to drop a citation the same way whether the verifying call was refused or failed.
12+
13+
- **A refusal** is a throw carrying an ADR-0112 `code` with a declared 4xx status (read as ADR-0112's reader reads it: `.status`, then `.statusCode`), the only shape `get_record_context` refuses with. Its citations are dropped and nothing is reported, as before.
14+
- **Any other throw** (no code, a driver code with no status, a 5xx) is a failure. Its citations are still dropped, so the result stays fail-closed, and the failure goes to the new optional `onError(error, call)` option, once per verifying call, so the host can log or retry. A failed read of the served definition behind an HTML body is reported too; there only the tag-removed reading is lost. A callback that throws, or returns a promise that rejects, is ignored.
15+
- A refused read and a missing record still give the host the same answer: dropped, not reported.
16+
- New exported types `VerifyRecordCitationsOptions` and `VerifyingCall`. Existing two-argument calls are unchanged.
17+
- Docs: the verifier says which list cap a producer gets (the first 20 read, where `RecordCitationsSchema` refuses 21) and that the tag-removed reading of an HTML body joins adjacent text, so it is not only stricter than matching as stored. `stripBodyTags` says it is not a sanitizer.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/driver-sqlite-wasm': patch
3+
---
4+
5+
fix(driver-sqlite-wasm): `disconnect()` returns only after the final flush is on disk
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A file-backed sqlite-wasm datasource wrote its final image from the connection's `close()`, which the Knex pool runs as its destroyer. The pool (tarn) stops waiting for a destroyer after 5 s and resolves anyway. So when that flush (a whole-image write and fsync) took longer, `disconnect()`, a kernel's `stop()` and a refused boot's rollback all returned before the data was on disk. A process that exited right after lost the committed writes, and a reader of the file got the old bytes. `disconnect()` now awaits the flush itself, with no timeout, before it closes the pool, and a flush that fails is thrown from `disconnect()`. A second `disconnect()` that arrives while the first one is still running shares the first one's teardown, instead of waiting for a connection from a pool that is being destroyed.

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,35 @@ Known residual: text made mostly of random hex or base64 — UUIDs, sha256 diges
218218

219219
## When the model or the split changes: rebuild
220220

221-
Vectors from two embedding models are not comparable, and neither are the passages of two splits. So every source's index is built under one **index fingerprint** — the embedding model and dimensions the adapter reports, the resolved split, and the content list — which the knowledge service computes and carries on every write and every search, and the adapter checks against the index it holds. Change any of them and the source's stored index is **refused** (`KNOWLEDGE_REBUILD_REQUIRED`, 409) until a complete reindex rebuilds it; it never answers with vectors of the old model ranked against the new one. A search over several sources still answers from the others, and the `search_knowledge` tool names each refused source in `refused`. Changing `where` or `metadataFields` changes no vector: a complete reindex repairs it in place. The full rules are in [the protocol's fingerprint section](/docs/protocol/knowledge#36-the-index-fingerprint).
221+
Vectors from two embedding models are not comparable, and neither are the passages of two splits. So every source's index is built under one **index fingerprint** — the embedding model and dimensions the adapter reports, the resolved split, and the content list — which the knowledge service computes and carries on every write and every search, and the adapter checks against the index it holds. Change any of them and the source's stored index is **refused** (`KNOWLEDGE_REBUILD_REQUIRED`, 409) until a complete reindex rebuilds it — which the next boot starts by itself, or `os knowledge rebuild` (below) does now; it never answers with vectors of the old model ranked against the new one. A search over several sources still answers from the others, and the `search_knowledge` tool names each refused source in `refused`. Changing `where` or `metadataFields` changes no vector: a complete reindex repairs it in place. The full rules are in [the protocol's fingerprint section](/docs/protocol/knowledge#36-the-index-fingerprint).
222+
223+
## The first build, and rebuilding a source
224+
225+
Event sync keeps an index in step with rows as they are written; it never indexes the rows a source matched before it was mounted. So after every boot the knowledge service reads what each source's adapter holds and builds, once, in the background, every `object` source that needs it — the boot never waits for it:
226+
227+
| What the adapter holds | At boot |
228+
|:--|:--|
229+
| nothing for the source (or, for an adapter without an index status, no document) | built |
230+
| an index under another fingerprint (embedding model, dimensions or split) | built anew, beside the old index where the store keeps generations |
231+
| the same fingerprint, but the source's `where`, `metadataFields`, title rule or withheld fields changed | rebuilt in place; unchanged documents are skipped |
232+
| the same fingerprint and recipe | left alone |
233+
234+
A source with `refresh.onRecordChange: false` is left to its external indexer, and an adapter that reports neither an index status nor its documents is never built automatically: the boot log says so, and you rebuild it by hand. With several server nodes sharing a cluster lock driver (`OS_CLUSTER_DRIVER=redis`, [Cluster](/docs/kernel/cluster)), only one builds a source: the build runs under the `cluster` service's lock, and a node that finds the source built when it gets the lock builds nothing. `KnowledgeServicePlugin({ buildAtBoot: false })` turns the boot builds off.
235+
236+
<Callout type="warn">
237+
**A build costs money.** A complete build reads every row the source's `where` matches and sends the listed content fields of each one the index does not already hold unchanged to your embedding provider, which bills for them. The first build of a large source, or a rebuild after you change the embedding model or the split, sends all of it. The boot log line that starts a build says so.
238+
239+
The default `memory` adapter holds nothing after a restart, so with it **every boot is a first build**: each boot sends the whole source to the embedding provider again, on every node, because each process keeps its own index. Use a persistent adapter (pgvector, Turso, RAGFlow) for a source you do not want re-embedded on each restart. And "only one node builds a source" holds only with a shared cluster lock driver: the default `memory` cluster driver's lock is a per-process mutex, so with it every node builds the source itself.
240+
</Callout>
241+
242+
To rebuild a source yourself, as an administrator (an account with `manage_platform_settings`):
243+
244+
```bash
245+
os knowledge status # each source: built, never built or due a rebuild, and the last build
246+
os knowledge rebuild support_articles # start a complete build and follow its progress
247+
```
248+
249+
`os knowledge rebuild` starts the build on the server and prints its progress — rows read, documents written, unchanged, purged, and those that cannot be indexed — until it ends; `--no-wait` returns once it has started. Both commands call the `knowledge` settings actions `rebuild` and `index_status` (`POST /api/settings/knowledge/rebuild` with `{ "source": "ID" }`). The server logs each build's start, its progress every ten seconds, and its result. A build's progress lives on the node that runs it: behind a load balancer, read it from that node.
222250

223251
## Self-hosted vector store: PostgreSQL + pgvector
224252

‎content/docs/deployment/cli.mdx‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,6 +4003,62 @@ the grant, use the environment's console: **Account → Connect an AI Assistant*
40034003
| `-s, --server <url>` | `OS_CLOUD_URL` | Control-plane URL. Default `https://cloud.objectos.ai`, or the URL recorded by `os cloud login` |
40044004
| `-t, --token <key>` | `OS_CLOUD_API_KEY` | Bearer token, used only to find the environment; `$OS_TOKEN` and `~/.objectstack/cloud.json` are the fallbacks |
40054005
4006+
### Knowledge
4007+
4008+
The administrator's view of the server's [knowledge sources](/docs/ai/knowledge-rag#the-first-build-and-rebuilding-a-source):
4009+
what each source's index holds, and one complete rebuild of a source. Both
4010+
commands call the `knowledge` settings actions (`POST /api/settings/knowledge/rebuild`
4011+
and `/index_status`), which answer only an account with
4012+
`manage_platform_settings`; any other caller is refused with `403` and is told
4013+
nothing about the sources.
4014+
4015+
| Command | Description |
4016+
|---------|-------------|
4017+
| `os knowledge status` | Each source's index state (built, never built, due a rebuild) and the last build the answering node ran |
4018+
| `os knowledge rebuild` | Start one complete build of a source on the server and follow its progress |
4019+
4020+
#### `os knowledge status`
4021+
4022+
```bash
4023+
os knowledge status # every source
4024+
os knowledge status support_articles # one source
4025+
```
4026+
4027+
Prints, per source, its adapter and kind, its index state against what the
4028+
server expects (and whether a build is due), and the last build the node that
4029+
answered ran: its progress while it runs, its counts once it ended. A build's
4030+
record lives on the node that ran it, so behind a load balancer the node that
4031+
answers may not be the one building; the index state is read from the store and
4032+
is the same on every node. Exits `1` with the server's refusal text when the
4033+
action is refused.
4034+
4035+
#### `os knowledge rebuild`
4036+
4037+
```bash
4038+
os knowledge rebuild support_articles # start and follow to the end
4039+
os knowledge rebuild support_articles --no-wait # start, and return at once
4040+
```
4041+
4042+
**A build costs money:** every row the source's `where` matches is read, and the
4043+
content fields of each one the index does not already hold unchanged are sent to
4044+
the embedding provider, which bills for them. The build runs on the server in
4045+
the background; the command reads `index_status` every `--interval` seconds and
4046+
prints the build's progress until it ends. It exits `0` when the build finished,
4047+
and `1` when the server refused the rebuild (an unknown or `file` source, a
4048+
build already running on that node), when the build did not run or did not
4049+
finish, or when the progress was answered by another node than the one
4050+
building (the build continues there). `--no-wait` exits `0` once the build has
4051+
started and reports no outcome: the build can still end without running
4052+
(another node holds the source's lock) or fail, which only `os knowledge status`
4053+
then shows.
4054+
4055+
| Flag | Commands | Env equivalent | Purpose |
4056+
|---|---|---|---|
4057+
| `-u, --url <url>` | both | `OS_CLOUD_URL` | Server URL (default `http://localhost:3000`) |
4058+
| `-t, --token <token>` | both | `OS_TOKEN` | Bearer token of an administrator |
4059+
| `--no-wait` | `rebuild` | — | Return once the build has started; its outcome is not reported |
4060+
| `--interval <s>` | `rebuild` | — | Seconds between two progress reads (default `2`) |
4061+
40064062
### Skills
40074063

40084064
The published skills catalog (`@objectstack/skills`, see [AI Skills](/docs/ai/skills))

0 commit comments

Comments
 (0)