Skip to content

Commit 4646f87

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-o1C-37961
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
2 parents 0b2a3bc + bbe4258 commit 4646f87

884 files changed

Lines changed: 16538 additions & 2647 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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
'@objectstack/spec': major
3+
'@object-ui/types': major
4+
'@objectstack/lint': minor
5+
'@objectstack/runtime': minor
6+
'@objectstack/platform-objects': minor
7+
'@object-ui/core': minor
8+
'@object-ui/components': minor
9+
'@object-ui/plugin-detail': minor
10+
'@object-ui/app-shell': minor
11+
'@object-ui/i18n': minor
12+
'@objectstack/cli': patch
13+
'@objectstack/cloud-connection': patch
14+
'@objectstack/objectql': patch
15+
'@objectstack/metadata-protocol': patch
16+
'@objectstack/plugin-approvals': patch
17+
'@objectstack/scenarios': patch
18+
'@objectstack/service-datasource': patch
19+
'@objectstack/service-messaging': patch
20+
'@objectstack/verify': patch
21+
'@object-ui/console': patch
22+
'@object-ui/fields': patch
23+
'@object-ui/layout': patch
24+
'@object-ui/plugin-grid': patch
25+
'@object-ui/plugin-list': patch
26+
'@object-ui/react': patch
27+
---
28+
29+
feat(spec)!: an action's `locations` say what it acts on, not the part of the page it sits in
30+
31+
**BREAKING** (19.0.0): `ACTION_LOCATIONS` is `list`, `record`, `record_page`, `record_row`, `record_related`, `record_section`. The four words that named a part of a page are retired: `list_toolbar`, `list_item`, `record_header` and `record_more`. `record` is new: the action acts on one record, so it is drawn on the record page's header and in each list row's menu. Which actions are buttons and in what order stays the object's `actionLayout`.
32+
33+
Clause-②: yes (narrowing)
34+
Metadata-protocol: narrowed
35+
Skills-docs: follow-up #37895
36+
37+
<!-- adr-0087: registered action-locations-acted-on -->
38+
39+
A replacement with a registered conversion, so `yes (narrowing)` as on main's precedents (`.changeset/pre/37086-define-metadata-form-rename.md`, `.changeset/pre/37304-knowledge-source-governed-type.md`). Narrowed: the four retired words are refused wherever a location is read. Widened in the same change: the four newly accepted values `list`, `record`, `record_page` and `record_row` at the same positions; the new `@object-ui/types` export `actionFoldedIntoMenu`; and eight new `@object-ui/i18n` Studio keys for the location labels (en, zh), which replace the eight keys of the retired words.
40+
41+
FROM → TO (each action is drawn in exactly the places it was drawn before):
42+
43+
- `locations: ['list_toolbar']` → `locations: ['list']`.
44+
- `locations: ['list_item']` → `locations: ['record_row']`.
45+
- `locations: ['record_header']` or `['record_more']` → `locations: ['record_page']`.
46+
- `record_header` or `record_more` beside `list_item` → `locations: ['record']`.
47+
- `locations: ['record_more']` without `record_header` (the action lived only in the record header's ⋯ menu) → `locations: ['record_page'], component: 'action:menu'`. The fold is the action's `component`, the key that already sends an action into an action bar's overflow menu.
48+
- A component's single `location` (`record:quick_actions`, `action:group`, `action:bar`): `list_toolbar` → `list`, `list_item` → `record_row`, `record_header` → `record_page`.
49+
50+
An old word is refused at authoring with the word to write instead. `os migrate meta --from 18 --write` rewrites sources (ADR-0087 conversion `action-locations-acted-on`, retired from the load path from day one, as every protocol-19 entry). Stored items (`applyConversionsToStoredItem`, `os migrate meta --stored`) and built artifacts replay the same conversion. It leaves a TODO, and changes nothing, where no lossless rewrite exists: a `record_more`-only action also on `list_toolbar` that does not already carry `component: 'action:menu'` (the list toolbar folds `action:menu` too); an action at `record_header` with an authored `component: 'action:menu'` (the record page header folded it into its ⋯ menu while a `record:quick_actions` bar at `record_header` drew it as a button, and `record_page` has one state for both); a component whose `location` is `record_more`; and an `action:group` at `record_header` with a `record_more`-only member. A site left as stored keeps its old word, which a protocol-19 runtime matches to no surface: that action or block is drawn nowhere until it is rewritten by hand. The protocol-19 upgrade guide carries the same step as the semantic entry `action-locations-page-parts-retired`.
51+
52+
Also in this change:
53+
54+
- `@object-ui/types`: `actionRendersAt` reads `record` as covering `record_page` and `record_row`. The new `actionFoldedIntoMenu(action)` answers whether an action is folded into the ⋯ (`component: 'action:menu'`). `arrangedHeaderActions` pins and unpins through `component` and no longer writes locations.
55+
- `@object-ui/components`: the record `page:header` routes every folded action to its ⋯ menu, and every other `record_page` action takes the inline budget, as `record_header` actions did.
56+
- `@object-ui/plugin-detail`: `record:quick_actions` defaults to `record_page` and leaves folded actions out at that location, as it left out `record_more`-only ones. The related list reads `record` as a row action.
57+
- `@object-ui/core`, `@objectstack/runtime`: the record-scoped checks (`isRecordScopedAction`, `requiresRecord`) accept `record`.
58+
- `@objectstack/lint`: the record-page header, related-list and action-layout rules read the new words.
59+
- Studio: the action inspector, the `record:quick_actions` location dropdown and the action preview offer `record` and draw the fold as "record_page · ⋯".
60+
- `@objectstack/platform-objects`, the examples and every other package: declarations and prose rewritten to the new words. The packages listed as `patch` change comments, test fixtures or authoring copy, except three that ship rewritten words: `@objectstack/plugin-approvals` and `@objectstack/service-datasource` (their declared actions' `locations`) and `@object-ui/layout` (a location literal it passes at runtime).
61+
62+
Not moved: #37895 (the `skills/**` teaching of the new words; Blocked-by this change).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(lint)!: a knowledge source is checked for its object, its fields and the search gates that need no caller, in `os validate` and at publish
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: narrowed
10+
Skills-docs: follow-up owed — skills/objectstack-ai/SKILL.md
11+
12+
<!-- adr-0087: registered knowledge-source-publish-refuses-missing-references-and-gated-objects -->
13+
14+
ADR-0161 K4, row 4.
15+
16+
**BREAKING** for the publish of a knowledge source that carries one of the four errors below: it was accepted before and is refused now (422, the finding's rule id, path, message and fix), and `os validate` / `lint` / `compile` / `build` refuse the same source. The schema is unchanged, and stored sources are not rewritten or refused at boot.
17+
18+
A new rule, `validateKnowledgeSource`, exported from `@objectstack/lint` with its five rule id constants. It runs on all three CLI commands and on the runtime publish gate for a `knowledge_source` write, with one set of rule ids and messages. Four errors: a source over a missing object has nothing to index, a missing field indexes no text for that member, and a gated object is never searched for a caller the service judges:
19+
20+
- `knowledge-source-object-unknown`: `source.object` names an object that the stack, a package of its artifact, or (at the publish gate) the host does not define. Under the package closure the publish gate states, an object outside it is worded for the closure with the remedy to declare the dependency. On the CLI, while the manifest declares a dependency the artifact does not carry, the build cannot see that package's objects, so the finding is a warning that clears when the dependency defines the object (the publish gate judges it against the closure, which holds them); with no such dependency it is an error. A platform object a known package registers is not judged when the stack does not carry it; a platform-prefixed name no known package registers is a warning.
21+
- `knowledge-source-field-unknown`: a `source.content` or `source.metadataFields` member names no field of the object, declared (the stack's own object extensions included) or addressable without a declaration (`id`, which the driver provisions, and the injected system columns `owner_id`, `created_at`, …).
22+
- `knowledge-source-object-not-searchable`: the object's API exposure does not serve `search` (`canServeApiOperation(enable, 'search')`): `enable.apiEnabled: false`, an `enable.apiMethods` list that does not grant `list` (search derives from it; `search` itself is a retired list value the parse strips), or a list that grants `list` beside `enable.searchable: false`. With no `apiMethods` list, `searchable: false` does not refuse it.
23+
- `knowledge-source-system-object-not-ai-readable`: a `sys_` object that does not declare `enable.aiReadable: true` (`isAiReadExposed`).
24+
25+
One warning, which refuses nothing:
26+
27+
- `knowledge-source-field-never-indexed`: a member names a credential-class field or a field declared `internal: true`; the index never carries either, even when named, so the member is skipped.
28+
29+
The two gates are the knowledge service's own search-time gates that need no caller, asked through the same spec predicates. The disabled-package gate and the field-queryable gate need an environment or a caller and stay at save, judged for the author. `os explain` answers each of the five ids.
30+
31+
## FROM → TO
32+
33+
- `source: { object: 'kb_artcle', … }` → `source: { object: 'kb_article', … }`, an object the stack defines. An object a dependency defines clears at publish once the package's manifest declares that dependency in `dependencies`; on the CLI it stays a warning while the artifact does not carry the dependency.
34+
- `content: ['title', 'bdy']` → `content: ['title', 'body']`.
35+
- a source over an object with `enable: { apiEnabled: false }` → serve the object (`apiEnabled: true` and, where it declares `apiMethods`, a list that includes `list`, with `searchable` not false), or index another object.
36+
- a source over `sys_audit_note` → index a business object, or declare `enable.aiReadable: true` on the system object's own definition.
37+
38+
`@objectstack/spec` adds only the upgrade-guide entry `knowledge-source-publish-refuses-missing-references-and-gated-objects`.
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): `objectstack-ai` names the `os validate` rules for a `knowledge_source`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ai` § Knowledge Sources (RAG) now lists what `os validate` and publish report for a knowledge source, by rule id, with the fix for each. `knowledge-source-object-unknown`: `source.object` is no object of the stack or its packages; on the CLI it is a warning while the manifest declares a dependency that `packages[]` does not carry. `knowledge-source-field-unknown`: a `content` or `metadataFields` member is no field of the object (`id` and the injected system columns resolve). `knowledge-source-object-not-searchable`: the API does not serve the object for `search`. `knowledge-source-system-object-not-ai-readable`: a `sys_` object without `enable.aiReadable: true`. `knowledge-source-field-never-indexed` is a warning for a credential-class or `internal: true` member, which the index never carries. An error refuses the publish. The section's example passes `os validate` with no knowledge-source finding.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/lint': patch
3+
---
4+
5+
feat(lint): warn when a select option `color` renders neutral on the option badge
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A new warning, `field/option-color-renders-neutral`. An option is coloured only by the colour its author declares, and the option badge paints exactly two spellings: one of the nine palette families (`gray`, `red`, `orange`, `yellow`, `green`, `blue`, `indigo`, `purple`, `pink`, lowercase) or a `#rgb` / `#rrggbb` hex. Any other declared colour (`teal`, `amber`, `Red`, `rgb(…)`, `#rrggbbaa`, a hex with no `#`) rendered neutral grey with no signal. It now draws a warning naming the option and a fix line: the lowercase family or the `#`-prefixed / alpha-free hex when the value points at one, otherwise the families and the hex form.
11+
12+
It runs on `os validate`, `os build` and `os lint` over object fields, object-extension fields, picklists and picklist extensions, and at the metadata save door on `object` and `object_extension` writes, where it rides back as an advisory. Nothing is refused: `SelectOption.color` still accepts any string, and charts and gantt bars still paint a CSS colour name. `os lint --strict` fails on it, as on every warning. `os explain field/option-color-renders-neutral` gives the per-surface reading. Published from the root entry: `FIELD_OPTION_COLOR_RENDERS_NEUTRAL`, `OPTION_COLOR_FAMILIES`, `isBadgePaintableOptionColor`, `lintOptionColors` and the type `OptionColorPicklist`.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
---
4+
5+
fix(service-knowledge): the knowledge field gate stops asking about a field named `title`; a source whose index could still hold an earlier-rule title is searched only once its index is proven built under the current recipe
6+
7+
Clause-②: yes (narrowing) — narrowed: for a caller other than the system context, a source over an object that declares a field named `title` the index may carry and the source does not serve (the display field is another field, none resolves, or the object's fields cannot be enumerated; the source lists `title` in neither `content` nor `metadataFields`) is now searched only when its adapter's `indexStatus` reports the fingerprint and the recipe hash the service computes now, and the builds that record that hash purge; otherwise the search names it in `refused` as `KNOWLEDGE_REBUILD_REQUIRED` (409), and refuses whole when it was the only source, where it was searched for any caller who may query `title`. That holds until a complete build of the source has completed: on a built-in adapter the boot pass, a source reload or the reconcile runs one, and under `buildAtBoot: false` (no boot or reload build) only the reconcile, where it runs, or `os knowledge rebuild` does. It holds for good, since no build can prove the index, for a source with `refresh.onRecordChange: false` (its builds purge nothing) and on an adapter with no `indexStatus`, no `completeBuild` or no `listDocuments`. Each hit of a proven source is then served only when the record still belongs to the source and the stored `docHash` is the one the current recipe assembles from the record as it reads now (one system read per source per search round); a hit that fails that check, or that the check cannot be made for (the read fails, no record id, no stored hash, a hash that cannot be computed, an unreadable tenancy posture), is dropped, where it was served before. Widened: saving a `knowledge_source` over such an object no longer requires the author to query `title`, which the source never indexes.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed or renamed, and nothing stored is rewritten: the moved answer is whether a search serves a source whose index is not proven built under the current recipe. The adapter author's fix below is new code on optional IKnowledgeAdapter members, not a rewrite of anything authored or stored, and the operator's fix is a rebuild. -->
11+
12+
**BREAKING** for deployments whose knowledge sources sit over an object that declares a field named `title` the source does not serve:
13+
14+
- **Such a source is refused `KNOWLEDGE_REBUILD_REQUIRED` until a complete build under the current recipe completes.** On a built-in adapter (memory, pgvector, Turso) the boot pass, a source reload or the reconcile builds a source whose index records no recipe hash or another one, and the refusal ends when that build completes. Under `buildAtBoot: false`, which also turns off the build on reload, only the reconcile (where a job service runs it) builds it. Fix: run `os knowledge rebuild <source>`; it also ends the refusal sooner in every other case.
15+
- **A proven source serves a hit only when its stored document matches the record as it reads now.** A document written before an edit the event sync has not caught up with, or left in place by a build's purge, is dropped from the answer until it is rewritten; for a stale or missing record's own document the search starts that repair in the background, once per document until a later search finds it current, and a document under a foreign id is dropped, not repaired. Fix: none needed for a synced source; `os knowledge rebuild <source>` rewrites every document now.
16+
- **An adapter whose search hits carry no `docHash` serves no hit from such a source**, since a hit with no stored hash cannot be checked against its record and is dropped. The built-in adapters (memory, pgvector, Turso) return the stored `docHash` on every hit. Fix: return each hit's stored `docHash` from the adapter's `search` (ADR-0161 K8, item 3).
17+
- **A source with `refresh.onRecordChange: false` stays refused** to every caller but the system context: an external indexer owns its index, its builds purge nothing, so no recorded recipe hash proves it. Fix: let the service sync the source (drop `refresh.onRecordChange: false`) and rebuild it, or search it as the system context.
18+
- **On an adapter with no `indexStatus`, no `completeBuild` or no `listDocuments`, such a source stays refused**, since no build can prove what its index holds. Fix: implement all three on the adapter (`@objectstack/spec/contracts`, `IKnowledgeAdapter`), then rebuild the source.
19+
20+
The field gate (ADR-0090 D10 rule 1) kept asking whether the caller may query a declared `title` field alongside the object's display field, because a document indexed before the title became the display field carries the value of `title`. That arm is retired. A complete build under the current recipe rewrites each document it walks whose title changed (its `docHash` covers the title) and, when it purges, removes every document it did not walk; the recipe hash names the title rule (ADR-0161 K7) and was first recorded by code that already read the display field. So the search asks for that proof per source instead, and only for a source where it matters: one over an object that declares no `title` field, whose display field is `title`, whose `title` is credential-class or `internal`, or that serves `title` itself, is searched as before, with no extra read. A proven source's hits are each checked against the live record, since the proof speaks for the index as its last complete build left it and not for a document written after it. Every other arm of the gate (the display field, each `content` and `metadataFields` member, the fields `where` reads, the object-level gates) is unchanged.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
A model picked in the chat composer now stays picked after you send. The composer cleared its message box by resetting the whole form, and the model picker in that form answered the reset by switching back to the default model, so the next question silently ran on the default. Sending now clears only the message box.

0 commit comments

Comments
 (0)