Skip to content

Commit 83d8f03

Browse files
Merge branch 'main' into claude/project-thread-95vrea
2 parents 2f5689b + e3bdc74 commit 83d8f03

111 files changed

Lines changed: 5352 additions & 615 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(lint)!: publish-time checks for views, dashboards and the app shell that save and do not work
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: narrowed
10+
11+
<!-- adr-0087: registered publish-refuses-views-and-dashboards-that-save-and-do-not-work -->
12+
13+
**BREAKING** for a list view filter keyed on a `formula` field: it was accepted before and is refused now, with the fix named in the finding. The schema is unchanged and stored metadata is not rewritten or refused at boot; the refusal comes at the next publish, and from `os validate` / `lint` / `compile` / `build`.
14+
15+
- `list-view-filter-field-virtual` (error): a list view's own `filter`, or a `userFilters.tabs[]` preset, keyed on a field computed on read (`formula`). The engine refuses every query filtered on such a field (`400 INVALID_FIELD`), so the view opens on that error every time. Refused at the runtime publish door on a `view` write and on an `object` write through the object's own `listViews`. A dotted key whose head is a formula stays `list-view-field-dotted`; the filter bar's field list (`userFilters.fields`) is not judged.
16+
- `dashboard-without-widgets` (warning, every door): a dashboard with `widgets: []`, which opens on its header over an empty canvas. Advisory because the shape breaks no request and the platform's own create steps (Studio, the spec's create seed, `os generate dashboard`) write it and fill it afterwards.
17+
- `list-view-kanban-group-field-uncategorical` (warning): a `kanban` board grouped by a field with no fixed set of lanes. A text, number or date field gets one lane per distinct value on the loaded cards and no lane for a value no card holds; a multi-valued field puts a card holding several values in one lane named by all of them. A `select` / `radio`, a boolean and a single-valued reference are silent. Runs on the runtime `view` and `object` doors.
18+
- `app-navigation-empty` (warning): an app with no entry in `navigation` nor in any `areas[].navigation` (a separator or an empty group counts as nothing), and no navigation the stack contributes into it. It opens on the "no access" empty state for every member. Runs on the runtime `app` door.
19+
- `object-unreachable-from-navigation` and `object-without-view` (warnings, `os validate` / `lint` / `build` only): an object no navigation entry opens (not judged: a `master_detail` child, an object another object names in `relatedLists`, an object a page names when navigation opens that page, an API-disabled object, and a stack with no app), and an object navigation opens as a list that declares no `listViews` entry and no bound `views` item, which then opens on the console's own "All records" tab. Fix: `listViews: { all: { type: 'grid', columns: [...] } }` on the object, or a `views` entry bound to it.
20+
21+
## FROM → TO
22+
23+
- `filter: [{ field: 'is_overdue', operator: 'equals', value: true }]` where `is_overdue` is a `formula` → `filter: [{ field: 'due_date', operator: 'lt', value: '{today}' }]` (the stored field the formula reads), or a stored field written when its sources change.
24+
25+
`@objectstack/lint` exports six rule id constants (`LIST_VIEW_FILTER_FIELD_VIRTUAL`, `LIST_VIEW_KANBAN_GROUP_FIELD_UNCATEGORICAL`, `DASHBOARD_WITHOUT_WIDGETS`, `APP_NAVIGATION_EMPTY`, `OBJECT_UNREACHABLE_FROM_NAVIGATION`, `OBJECT_WITHOUT_VIEW`) so `os explain` carries an entry for each; the two new rule functions are not exported. `@objectstack/spec` adds only the upgrade-guide entry `publish-refuses-views-and-dashboards-that-save-and-do-not-work`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-data` states the bounds of a hook transaction, and the measured MongoDB and PostgreSQL rule
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/references/data-hooks.md`, the `api.transaction` row: `ctx.api.transaction` goes one level per body (a nested call is refused, "nested ctx.api.transaction is not supported"); inside an open unit it joins it, including a unit an action body opened with its own `ctx.api.transaction`, and the hooks of a write made inside that unit run in it and join it too; a write to another datasource is refused except an append-only ledger (`lifecycle.class` `audit` / `telemetry` / `event`), written outside the unit; on PostgreSQL and a MongoDB replica set a failed statement aborts the whole unit even when caught; a driver with no transactions runs the callback with none and no warning.
11+
12+
The `before*` Transaction cell drops "MongoDB needs a replica set (read in code, not measured)" for the measured rule: a standalone MongoDB refuses every write of such a transaction (`501 NOT_IMPLEMENTED`) and a single-node replica set is enough; on PostgreSQL and a MongoDB replica set a failed `ctx.api` statement refuses the outer write even when caught, logged or retried (`25P02` / `251`), while SQLite lets it through. Two eval cases in `skills/objectstack-data/evals/hooks-security-seeds-datasources.json` expect the same.
13+
14+
Nothing an author can write changes. The page stays at its token ceiling (10120): the added sentences are paid by cutting restating code comments and labels in the same file.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/lint': patch
3+
'@objectstack/rest': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(lint,rest)!: `os i18n extract` / `os i18n check` expect the `_relatedLists` keys `os validate` accepts under a `.custom` arrangement, and the object read translates a tab title the arrangement sets
8+
9+
Clause-②: yes (narrowing)
10+
Metadata-protocol: none
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) no schema key, accepted value, stored shape or export moves; the moved answers are the coverage gate's expected key set and the translation an object read serves, and the remedy is a translation the author adds or drops in a bundle, which no conversion can write -->
13+
14+
**BREAKING** for a stack that runs `os i18n check --strict` (or `--threshold`) and carries a paired `.custom` package's `relatedLists` arrangement (ADR-0146 D10) that labels a record-page tab. The coverage gate now expects `objects.<object>._relatedLists.<list>.label` for each list the arrangement labels, with the arrangement's text, so a stack that passed in 19.0.0-next.1 without that translation now reports it missing. Add the translation, or drop the arrangement entry's `label`. Keys over a list the arrangement hides, names bare or re-states without a `label` are no longer expected, so a gate that demanded a key `os validate` refuses stops demanding it.
15+
16+
**What changes in `@objectstack/lint`.**
17+
18+
- `collectExpectedEntries`, which `os i18n extract` and `os i18n check` read, folds the owner's `relatedLists` with the stack's `objectExtensions` the way `translation-target-unknown` folds them: every placement first, then the arrangement, whose entries replace every entry they cover (`relatedListNameCovers`). It is one fold, `related-list-titles.ts`, read by both. `os i18n extract` scaffolds no key over a list the arrangement hides, names bare or re-states without a `label`, and scaffolds one, carrying the arrangement's text, over a list it labels. A label only a code extender's `place` entry gives is still not scaffolded: the rule accepts its key, but the registry may not apply the placement.
19+
- The two `translation-target-unknown` hints for such a key name the list it addresses, `{ list: 'LIST', label }`, instead of "the owner's `label`". The stripped label may be a placement's, and where a bare child name covers a dotted list, the entry to write is the dotted list's own.
20+
21+
**What changes in `@objectstack/rest`.** The `/meta/object` reads (by name and list) hand the translator the paired `.custom` package's own `objects.<object>._relatedLists` translations, read for the pair of the base the object's packaged base ships in. A tab title the arrangement sets or changes now reads the pair's translation, then keeps its own text. Before, it read nothing, because an object answers no `servedOverrideBaseOf` (ADR-0146 D10, unchanged). Only that subtree is handed on: every other string of an object keeps the ranking it had.
22+
23+
**What changes in `@objectstack/spec`.** The wording of the `translation-related-list-key-under-arrangement-refused` ledger entry: the label the arrangement strips may be a placement's, and the remedy no longer says that a translated title needs the owner's label.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/knowledge-turso': patch
3+
'@objectstack/service-settings': patch
4+
'@objectstack/service-knowledge': patch
5+
---
6+
7+
fix(knowledge-turso)!: the Knowledge page's "Test connection" comes with the Turso fields it checks — a page without them has no such action
8+
9+
Clause-②: yes (narrowing) — the public surface grows by four exports of `@objectstack/knowledge-turso` (listed below); narrowed: where `@objectstack/knowledge-turso` does not contribute its Turso group (the store is `@objectstack/knowledge-pgvector`, on PostgreSQL, or the store is mounted with a `url` or `client` of its own), the Knowledge page has no "Test connection" action and `POST /api/settings/knowledge/test` answers `400 SETTINGS_ACTION_FAILED` (no handler registered), as every undeclared action does, where it answered the Turso form check with `200`; where the store reads its URL from settings, the action is on the page, beside the two fields, and answers as before. `@objectstack/service-settings` no longer exports `knowledgeTestActionHandler`; `@objectstack/knowledge-turso` does
10+
Metadata-protocol: none
11+
Skills-docs: none — no skill under `skills/**` teaches the Knowledge page's test action or `knowledgeTestActionHandler`.
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed, renamed or re-shaped: a settings manifest and its action handlers are runtime registrations, not authorable metadata, and nothing `objectstack migrate meta` reads names the action. -->
14+
15+
**BREAKING** for three readers:
16+
17+
- A script or client that posts to `POST /api/settings/knowledge/test` on a deployment where the Turso fields are not on the page now gets `400 SETTINGS_ACTION_FAILED`. The check it answered there read fields nothing on that deployment reads, and opened no connection. Stop calling it there.
18+
- Code that imports `knowledgeTestActionHandler` from `@objectstack/service-settings`: import it from `@objectstack/knowledge-turso` instead (`import { knowledgeTestActionHandler } from '@objectstack/knowledge-turso'`). Same check, same answers. `@objectstack/knowledge-turso` depends on the native libSQL client (`@libsql/client`); importing the handler loads nothing native, but installing the package installs that dependency.
19+
- A host that registers its own `knowledge` settings page declaring `turso_url`, `turso_auth_token` and the `test` action: `KnowledgeTursoPlugin` leaves that page as written and registers no handler for it, so its `test` button now answers `400 SETTINGS_ACTION_FAILED`. Register the handler yourself after registering the page: `settings.registerAction('knowledge', 'test', knowledgeTestActionHandler)`, with `knowledgeTestActionHandler` imported from `@objectstack/knowledge-turso`.
20+
21+
The `test` action left `@objectstack/service-settings`' `knowledge` manifest, and `@objectstack/service-knowledge` no longer registers its handler. `KnowledgeTursoPlugin` declares it as the last entry of the Turso group, after `turso_auth_token`, and registers `knowledgeTestActionHandler` with it, only where it contributes the group. The action's label moved with it, in all eleven locales: out of `@objectstack/service-settings`' bundles, into `knowledgeTursoSettingsTranslations`.
22+
23+
New exports of `@objectstack/knowledge-turso`: `knowledgeTestActionHandler`, `KNOWLEDGE_TURSO_TEST_ACTION`, and the types `KnowledgeTursoActionInput` and `KnowledgeTursoActionResult`.
24+
25+
`KnowledgeTursoPlugin` now warns once, at `init()`, when it reads its URL from settings but the Knowledge page cannot carry `turso_url` and `turso_auth_token` (no settings service, no `knowledge` page, or a host page that declares one of the group's ids without both keys): nothing can be saved there, and the store opens its default file, which the line names.
26+
27+
The Turso group's description no longer says that a cloud deployment with a database per organization reuses that organization's database for a blank URL (no deployment does: a blank URL opens `knowledge.db` in the data directory), and no longer says the fields are not read on PostgreSQL (the group is never on the page there). It says instead that a blank URL uses `knowledge.db` in the data directory, in all eleven locales.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-knowledge': minor
3+
'@objectstack/spec': minor
4+
---
5+
6+
feat(knowledge)!: refuse a knowledge_source save that names an adapter the running deployment does not mount
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: narrowed
10+
Skills-docs: none — no page under `skills/**` teaches a knowledge source's `adapter`; `content/docs/ai/knowledge-rag.mdx` and `content/docs/protocol/knowledge.mdx` name the save refusal
11+
12+
<!-- adr-0087: registered knowledge-source-unmounted-adapter-refused-at-save -->
13+
14+
**BREAKING** for an author or agent that saves a `knowledge_source` whose `adapter` names a store the running deployment does not mount (a retired store such as `ragflow`, or a typo): `PUT /api/v1/meta/knowledge_source/:name`, Studio, the MCP `save_metadata_draft` tool and a package duplicate now answer `400 VALIDATION_ERROR` where the save answered success, and nothing is written. The message names the source, the adapter and the mounted adapters. Fix: name one of the mounted adapters as the source's `adapter`, leave `adapter` out so the deployment's store holds it, or mount the named store and save again.
15+
16+
Before, the save was stored, the boot named the source at `error`, and every index and search of it answered `503 SERVICE_UNAVAILABLE`. A source already stored is not touched: it keeps answering `503` until it is saved with a mounted adapter.
17+
18+
Not moved: a source that leaves `adapter` out (it is placed on the deployment's store; several adapters and none the deployment's is still refused as before); a source naming a mounted adapter; the engine's own write, so a package install or a seed; a source registered in code (`KnowledgeServicePlugin({ sources })`, `registerSource`), which registers before its store starts; and `objectstack validate`, which runs with no deployment. For those three the boot's `error` line and the `503` at index and search stay the signal. Migration entry `knowledge-source-unmounted-adapter-refused-at-save` (`@objectstack/spec`) carries it for the upgrade guide.

‎.changeset/38034-ai-usage-tiers.md‎

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/i18n': patch
4+
---
5+
6+
feat(app-shell): the ChatDock AI usage ring shows a paid plan's personal allowance and team pool, and the notice once turns draw on the team pool
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`GET /api/v1/ai/usage` may now carry an optional `tiers` on a paid plan: the caller's personal share, the team pool it overflows into, whether turns draw on the pool, and a notice in four languages. The usage hook reads it in exactly that shape; a `tiers` of any other shape is dropped on its own and the `{ pool, breakdown }` reading stands, so the ring still renders. When `tiers` is present, the popover shows one row per tier (its status, its used share as a percentage, its reset) in place of the pool's single figure, and the notice in the console language (Chinese scripts read `zh`; `ja` and `es` read their own; every other language reads `en`). A caller with no personal share sees the team pool alone. The ring, the popover's status and reset line and the call to action keep reading `pool`. Without `tiers` (Free, self-hosted, an older backend) nothing changes. Two new console strings, `console.ai.usage.tierPersonal` and `console.ai.usage.tierTeamPool`, ship in every locale pack.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/formula': minor
3+
---
4+
5+
fix(formula): a date field compared with `addDays(today(), N)`, `addMonths(…)`, `date(…)`, `timestamp(…)` or the working-day functions evaluates the way the `today()` comparison does
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
A `date` field reaches a flow condition, a validation rule or a formula as its `YYYY-MM-DD` text. The runtime already converts that text when it meets `today()`, `now()`, `daysFromNow()` or `daysAgo()`. It missed every other call that returns a timestamp, though every save door (`os validate`, publish, flow registration) accepted the condition:
11+
12+
- An ordering such as `record.due_date < addDays(today(), 30)` failed on every run with `no such overload: dyn<string> < google.protobuf.Timestamp`. A flow with it as its start condition never ran its steps.
13+
- An equality such as `record.due_date == addDays(today(), 1)` answered `false` on the very day it names (and `!=` answered `true`), with no error, so the flow was skipped as "condition not met". `== date("2026-06-21")` and `== timestamp("2026-06-21T00:00:00Z")` did the same.
14+
15+
Both now answer what the `daysFromNow(N)` spelling of the same comparison answers. The set of functions converted is read from the functions the engine declares as returning a timestamp, so a function added later is covered too.
16+
17+
**What changes for a deployed app.** Nothing to rewrite. A flow, validation rule or formula that already uses one of these comparisons starts behaving as written: a flow whose start or decision condition failed or was skipped on every run now fires on the records the condition names. Review such flows before upgrading if they send email, create records or call out, since they will start doing so. An author who worked around the defect with `date(record.due_date) < addDays(today(), 30)` keeps the same answer.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
'@objectstack/knowledge-turso': patch
4+
'@objectstack/knowledge-pgvector': patch
5+
---
6+
7+
feat(service-knowledge): a caller who may read few of a source's records is answered from them, wherever they rank
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A knowledge search re-checks every hit as the caller after ranking, and refills once at `topK × 20`. A caller who may read only a few of a source's rows (20 of 1,000, say) could find none of them within that cap and be answered nothing, though the store held their answer.
13+
14+
- **`@objectstack/service-knowledge`.** Before the first round, for a caller who is not the system identity, the service reads the ids of each source's records that caller may read: as the caller, under the source's `where`, ids only, at most 501. When there are 500 or fewer, the source is handed them as a `record` scope term, so its adapter ranks only those rows. A caller's own `scope` is intersected with them, never widened: a one-record scope stays one record. A scope with a parent (metadata) term, more than 500 readable records, a read that fails (logged at `warn`), or no readable record in scope, and the source is searched as before. Every hit is still re-checked one by one, the organization filter is unchanged, and the system identity's search is unchanged. The conformance harness's engine double (`@objectstack/service-knowledge/testing`) answers that read as the caller too.
15+
- **`@objectstack/knowledge-turso`.** Each new generation's passage table carries an index on `source_record_id`, so a narrowed search reads only those records' passages. A generation made before gets it from its next build; nothing to run.
16+
- **`@objectstack/knowledge-pgvector`.** Each passage table carries an index on `(source_id, generation, source_record_id)`. A table made before gets it on the first write after the upgrade (`CREATE INDEX IF NOT EXISTS`, which holds writes to that table while it builds).
17+
18+
Nothing to migrate.

0 commit comments

Comments
 (0)