Skip to content

Commit 8a036c9

Browse files
committed
Merge origin/main into claude/issue-36902-detail-save-at-once
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziBCAytAzzCu3iPBFR
2 parents f8e4b50 + bfd1049 commit 8a036c9

220 files changed

Lines changed: 11192 additions & 1365 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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/service-settings': patch
3+
'@objectstack/service-knowledge': patch
4+
'@objectstack/platform-objects': patch
5+
---
6+
7+
fix(settings)!: the knowledge settings page and the AI page's embedder section appear only where the knowledge service is mounted
8+
9+
Clause-②: no (narrowing) — narrowed: on a deployment that does not mount `KnowledgeServicePlugin` (every stock boot), `GET` / `PUT /api/settings/knowledge` and `POST /api/settings/knowledge/test` now answer `404 UNKNOWN_NAMESPACE`, where they served the Knowledge page; a write of an `ai.embedder_*` key (`embedder_provider`, `embedder_api_key`, `embedder_model`, `embedder_base_url`, `embedder_dimensions`, `embedder_batch_size`) now answers `400 UNKNOWN_KEY`, and `POST /api/settings/ai/test_embedder` answers that no handler is registered; the hub list no longer carries `knowledge`, and the Setup sidebar no longer carries `nav_settings_knowledge`. `builtinSettingsManifests` drops `knowledgeSettingsManifest`, and `aiSettingsManifest` drops its embedder section.
10+
Metadata-protocol: none
11+
Skills-docs: none — no skill under `skills/**` teaches the knowledge settings page or the `ai.embedder_*` keys; `skills/objectstack-ai` teaches wiring `KnowledgeServicePlugin`, which is unchanged.
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed, renamed or re-shaped: settings manifests are runtime registrations, not authorable metadata. The moved answers are settings doors that a deployment without the knowledge service no longer serves; a deployment that mounts it serves them exactly as before, and stored rows are untouched, so there is nothing for a migration to rewrite. -->
14+
15+
**BREAKING** for a deployment that does not mount the knowledge service: the knowledge base is not a default capability, so its settings are no longer offered by default. The Knowledge page, the AI page's Embedder section, their "Test connection" / "Test embedder" buttons and the Setup entry are now contributed by `@objectstack/service-knowledge` when `KnowledgeServicePlugin` is mounted beside `SettingsServicePlugin`, and only then. Values already stored under `knowledge.*` or `ai.embedder_*` stay in the database and are served again as soon as the service is mounted.
16+
17+
The AI page's description no longer names the knowledge base, in every bundled locale.
18+
19+
`@objectstack/service-settings` now exports `knowledgeSettingsManifest`, `knowledgeTestActionHandler`, `aiSettingsManifest`, `aiEmbedderSettingsSpecifiers`, `withAiEmbedderSection` and `aiTestEmbedderActionHandler` from its package entry, and its default `actionHandlers` map no longer registers `knowledge.test` or `ai.test_embedder`. `@objectstack/service-knowledge` depends on `@objectstack/service-settings` and declares the settings plugin in `optionalDependencies`, so the kernel inits it first.
20+
21+
What to do: nothing, unless you configure an embedder or a knowledge backend from Setup. Then mount `KnowledgeServicePlugin` from `@objectstack/service-knowledge` (with a knowledge adapter plugin) beside `SettingsServicePlugin`; the page, the embedder section and the Setup entry come back with it. A host that passed its own `ai` manifest to `SettingsServicePlugin({ manifests })` adds `aiEmbedderSettingsSpecifiers` to it (or wraps it with `withAiEmbedderSection`) to keep the embedder keys. The embedder section joins only the bundled `ai` page, recognised as that very declaration; a host's own `ai` page (or one served through an option source) is left as it is, and the plugin logs a warning saying so. A host that passes its own `actionHandlers` to `SettingsServicePlugin` keeps a `knowledge` entry there only beside the knowledge manifest: without it the settings plugin refuses to register the handler for an unknown namespace at boot.
22+
23+
Stored credentials: on a deployment that does not mount the knowledge service, `ai.embedder_api_key`, `knowledge.turso_auth_token` and `knowledge.ragflow_api_key` stay stored (as `sys_secret` handles) but no settings door serves, edits or clears them, and the AI page's reset clears declared keys only. To remove them, mount `KnowledgeServicePlugin` once and clear the keys from Setup, or delete their rows from `sys_platform_setting` (the `knowledge` namespace and the `ai.embedder_*` keys) and the `sys_secret` rows whose `id` those rows hold in `value_enc` (a `sec_` handle); until then the `sys_secret` orphan report may list them.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/core': minor
3+
'@objectstack/client': minor
4+
'@objectstack/rest': minor
5+
'@object-ui/app-shell': minor
6+
'@object-ui/i18n': minor
7+
---
8+
9+
fix(core, console): a banned user's hand-over follows each object's Change Owner switch, and the ban dialog says why a record stays
10+
11+
Clause-②: no
12+
Metadata-protocol: semantic
13+
14+
An object's Change Owner switch (`userActions.transfer`) now also decides whether the offboarding hand-over (`POST /api/v1/security/users/USER_ID/assigned-work/transfer`) moves the object's `owner_id`, and how the count (`GET /api/v1/security/users/USER_ID/assigned-work`) reports it. The hand-over reads the same resolution the Change Owner action refuses by (`resolveUserActionTransfer`), so the two never disagree:
15+
16+
- An object that turns the switch off keeps its records' owners where they are. Before, the hand-over moved them.
17+
- A `controlled_by_parent` detail that leaves the switch out keeps its owner (the default is off there), as before. A detail that sets `userActions.transfer: true` now has its owner handed over like any other object. Before, every detail's owner was skipped.
18+
- The object's own user fields (an approver, an assignee) are handed over whatever the switch says.
19+
20+
A kept owner is still counted. Before, a detail's owner was left out of the count; now its row answers `transferable: false` with `reason: 'transfer_off'`. A multi-valued user field answers `reason: 'multi_valued'`. `reason` is a new optional member of each `objects[]` row in `security.assignedWork.count`'s answer (`UserAssignedWorkSummary` in `@objectstack/client`, `UserAssignedWorkHoldReason` in `@objectstack/core`). It is present exactly when `transferable` is false.
21+
22+
The ban dialog words each kept row by its reason. A kept owner reads "Not handed over: this object keeps the owner of each record (Change Owner is off for it)." (zh: 不会交接:该对象的记录负责人保持不变(该对象已关闭“更改负责人”)。). A multi-valued row keeps its own sentence ("Lists several people, so it cannot be handed over here."), and a kept owner never shows it. The new `console.assignedWork.ownerKept` key is in all eleven UI locales.
23+
24+
To keep the old hand-over of an object you switched off, set `userActions.transfer` back on for it. Before this change the switch gated only the Change Owner action; it now gates that action and the hand-over, and nothing else: a plain `owner_id` write (an import, a hook, a `PATCH`) still needs only the transfer grant.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
---
4+
5+
fix(service-knowledge): knowledge search asks the object's API exposure and the caller's field-level read rules before it searches a source
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A knowledge passage is built at index time, under a system context, from every `contentFields` member of its source, the record `title` and the source's `metadataFields`. Knowledge search re-checked only that the caller may read each hit's row, so a caller who could read a row but not one of those fields was served that field's text, and an object the API does not serve was served as passages. `KnowledgeService.search` now decides, for a non-system caller and once per object per search, whether each `object` source may be searched at all:
11+
12+
- the object's owning package is not disabled;
13+
- the spec's exposure decision serves the object for the `search` operation (`enable.apiEnabled: false`, or an `enable.apiMethods` whitelist that does not grant `search`, refuses);
14+
- a `sys_*` object declares `enable.aiReadable: true`;
15+
- every field the source serves (each `contentFields` member, `'*'` meaning every declared field except `id`; each `metadataFields` member; `title`), less the credential-class and `internal` fields an index never carries, is one the caller may query, per the `security` service's `getQueryableFields` (absent it, `getReadableFields` less every field declaring a `maskingRule`; with no `security` service, every field except those declaring a `maskingRule`).
16+
17+
A source that fails any gate is not searched for that caller. Every gate fails closed: a lookup that throws, or a `security` service that answers neither field question, keeps the source out. `KnowledgeServicePlugin` wires the `security` service, resolved per search: a missing answer or the kernel's not-registered refusal reads as "no security service"; any other throw from that lookup (a registration that cannot be used) refuses the sources, reported at `error` once per object per search. A host constructing `KnowledgeService` directly passes it as the new optional `resolveSecurity` option. The system context bypasses the gates, as it bypasses the row re-check.
18+
19+
Three adjacent holes close with it. A caller with no execution context, or a service with no data engine bound, is now searched no `object` source at all, where before an object-source hit carrying no `sourceRecordId` was served to it. An admitted object source's hit with no `sourceRecordId` cannot be re-checked and is dropped. `KnowledgeService.search` drops a hit whose reported `sourceId` names another source than the one searched; it sees only what an adapter reports.
20+
21+
**Narrowing for restricted callers.** A caller who may read a source's rows but not one of the fields the source serves now gets no hits from that source, where before it got passages carrying that field's text. A caller of an `apiEnabled: false` object, of an object whose `apiMethods` do not grant `search`, of a disabled package's object, or of a `sys_*` object without `enable.aiReadable: true` now gets no hits from its sources. No metadata key changes. To keep a source searchable for restricted callers, declare its `contentFields` / `metadataFields` from fields every intended reader may query and move sensitive fields into a separate source.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/rest': patch
4+
'@objectstack/runtime': patch
5+
'@objectstack/platform-objects': patch
6+
'@object-ui/app-shell': patch
7+
---
8+
9+
feat(spec): Studio list columns for 27 metadata types, served in the reader's language on both doors
10+
11+
Clause-②: yes (widening: `/meta/types` serves `list` on 26 more entries, and the runtime dispatcher's listing is now translated)
12+
Metadata-protocol: none
13+
14+
`METADATA_LIST_REGISTRY` now declares the Studio list columns of 27 metadata types: the first batch (`hook`, `flow`, `job`, `api`, `action`, `report`, `dataset`, `email_template`, `assignment_rule`, `sharing_rule`, `queue`, `agent`, `tool`, `skill`, `doc`, `seed`, `mapping`, `picklist`, `translation`) and the eight types the console used to declare itself (`object`, `field`, `view`, `page`, `dashboard`, `permission`, `position`, `book`). Every column names a key the type's schema declares, checked by the reconciliation test. Nothing an author writes changes: the registry is the spec's own constant.
15+
16+
- **Headers in every shipped language.** The 52 headers no form field already labels get their own `metadataForms.<type>.fields.<path>.label` leaf in the 11 platform bundles (`@objectstack/platform-objects`), translated in all ten non-English locales. A column the form labels reads the form's words.
17+
- **Both doors translate the listing.** The runtime dispatcher's `GET /meta` and `GET /meta/types` now answer the types listing in the request's language, as `RestServer`'s `GET /meta` does: type labels, form labels, list headers and schema titles. Both run one function, `translateMetaTypesListing` (`@objectstack/rest`). Before this, a host served through the dispatcher answered all of it in English.
18+
- **The console's own declarations move into the spec.** Studio's lists of objects, fields, views, pages, dashboards, permission sets, positions and books read the served columns. The console keeps only what the schema cannot say: a field row's server-stamped `object`, a position's holder count and granted permission sets, a view's derived display type, a book's audience and a sharing rule's `sharedWith` rendering. The console declared `object`'s columns twice, in two registrations that disagreed (the later one won); both declarations are gone, so one remains, in the spec. A page's former `route` column named no `PageSchema` key and is dropped. What an admin sees in Studio (`@object-ui/app-shell`): the metadata lists of all 27 types show the spec's columns, in the declared order, with headers in the reader's language. The moved lists lose the console's fixed column widths (the view list's display type and the book list's audience keep theirs), the Fields list reads name, type, label, then object, the sharing-rule list's header reads "Access Level" where it read "Access", and the Pages list shows type and description in place of the dropped route column. A summary cell reads an expression member as its source, so the Jobs list's schedule shows a cron job's expression (`cron · 0 2 * * * · UTC`), not only its kind and time zone.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/types': patch
3+
'@objectstack/runtime': patch
4+
'@objectstack/cli': patch
5+
'@object-ui/app-shell': patch
6+
'@object-ui/console': patch
7+
---
8+
9+
refactor(studio): every Studio address comes from one builder; no address changes
10+
11+
Clause-②: yes (widening)
12+
Metadata-protocol: none
13+
14+
Studio redesign groundwork (#36895, epic #36890). Every place that produced a `/studio...` URL now calls one builder, so a later change can move an item type to its metadata address in one place. Every address is byte-for-byte what it was: no link, bookmark or redirect changes.
15+
16+
- **Console.** `studioAddress.ts` in `@object-ui/app-shell` builds every Studio address: the landing, a package, a pillar, an item (`studioItemPath`), the "All metadata" area, and the draft review links. `studioAddressTable.ts` lists every address family, every `?surface=` spelling and every query parameter, with what each becomes on the metadata address. The retired `/interfaces` redirect keeps exactly the parameters that table marks. New exports from `@object-ui/app-shell`: `STUDIO_ROOT_PATH`, `STUDIO_HOME_PILLAR`, `studioLandingPath`, `studioPackagePath`. Existing exports keep their names and values.
17+
- **Server.** `studioChangesReviewLink` and `studioItemReviewLink`, new in `@objectstack/types`, build the review links that `os meta register` prints and that the MCP authoring tools return after a draft save. The text an AI is handed is unchanged.
18+
- **Guards.** A test under `ui/` refuses a hand-built Studio address in any ui source. A test in `@objectstack/types` refuses one in any server package, and holds the review links quoted by the `objectstack-mcp-build` skill's evals equal to what the builder returns.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
feat(app-shell): every metadata type's list is drawn by ObjectGrid, and its New on a read-only base creates in the base's paired `.custom` package
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
- `@object-ui/plugin-grid`: `ObjectGrid` takes two generic host props for its table view — `hostCells` (a host draws a column's cells) and `rowTint` (a palette name per row, over `rowColor`).
12+
- `@object-ui/app-shell`: the metadata list (Setup and Studio's All metadata area) is an `ObjectGrid` fed a declared schema and the page's rows in the list's own order; diagnostics tint, lock, the Active switch, Clone, the served columns and the 「修改时间」 column (its time, its unpublished-changes mark and its `changed` sort, objectstack#36898) are the page's cells; sort, search and page live in the address. The grid's personal columns, export, selection and inline edit are off for it.
13+
- On a read-only base in Studio, the list's New creates in the paired `.custom` package (ADR-0146 D3): an object (with its organization-wide sharing default) and a flow (from a starting point) open the list's create dialog; another type opens the area's create in the pair. Under the customization wall no New is offered.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(console): the metadata list shows when each item last changed and marks items with unpublished changes
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
The generic metadata list (Setup's catalog lists and Studio's "All metadata" area) gains a 「修改时间」 / "Modified" column, read off the list answer's `changedAt` sibling. Only an item served from a stored row has a time; a code-shipped item shows an empty cell. The sort control gains "Modified (newest first)" and "Modified (oldest first)", which ride the address as `sort=-changed` / `sort=changed`; items without a time sort last either way, and the item page's ‹ › follow the same order.
13+
14+
Beneath the time, an item with a pending draft on the existing `GET /api/v1/meta/_drafts` ledger is marked 「有未发布的改动」 / "Unpublished changes", including drafts that existed before this change. A draft the AI assistant wrote (any of its recorded changes made by the AI copilot or through the MCP build door, the rule the item page's AI line uses) is marked 「AI 的改动未发布」 / "Unpublished AI changes" instead. A publish removes the mark.
15+
16+
`MetadataClient.listResponse` now returns the list's `changedAt` beside the items (each entry read with the spec's own rule; an entry that does not parse is dropped, and absence stays absence). `list` is unchanged.
17+
18+
New locale keys in the studio catalogue (en, zh): `engine.list.sort.changed.asc`, `engine.list.sort.changed.desc`, `engine.list.col.changedAt`, `engine.list.draftMark.human`, `engine.list.draftMark.humanTitle`, `engine.list.draftMark.ai`, `engine.list.draftMark.aiTitle`.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
fix(i18n): the full search page names component, doc and link results in every language
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The console's full search page (opened from the command palette's "Open Full Search Page") titles each result group and badges each result by the navigation item's type. Component items, doc items and link items printed raw keys (`search.typeComponents`, `search.badgeDoc`, `search.typeUrls`, …) because no locale pack defined them, English included. Every shipped console locale pack now carries a heading and a badge for the three types, and the search placeholder and its accessible label also name components and docs. A new test in `@object-ui/app-shell` renders the page with one navigation item of every spec type and fails when any heading or badge key the page asks for is missing from a pack.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/console': patch
3+
---
4+
5+
fix(console): the approvals inbox status filter offers Cancelled
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On the **Submitted by me** and **All** tabs of the approvals inbox, the status filter listed Pending, Approved, Rejected, Recalled and Returned for revision, but not **Cancelled**, although cancelled requests show in the same list with their own badge and the server answers `GET /api/v1/approvals/requests?status=cancelled`. The filter now offers Cancelled, and choosing it lists only the cancelled requests.
11+
12+
The options are now drawn from the approval contract's status list (`APPROVAL_STATUSES` in `@objectstack/spec/contracts`) rather than typed out one by one, so a status the platform adds later appears in the filter without a console change. Each option keeps the label its badge shows.
13+
14+
Nothing to migrate.

0 commit comments

Comments
 (0)