Skip to content

Commit 1bf3dbe

Browse files
committed
Merge origin/main into claude/issue-36981-setup-pages-bearer
Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB Co-authored-by: Claude <noreply@anthropic.com>
2 parents 7d86018 + 254e396 commit 1bf3dbe

388 files changed

Lines changed: 20879 additions & 2600 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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/lint': patch
3+
---
4+
5+
feat(lint): warn when another permission set's View All, Modify All or View All Fields re-opens a field one set hides
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A new warning, `security-cross-set-field-reopen`. When one permission set hides a field (`readable: false`) or makes it read-only, and another set holds View All (`viewAllRecords`), Modify All (`modifyAllRecords`) or View All Fields (`viewAllFields`) on the same object (on its own entry for the object, or on its `'*'` entry when it has none), a user who holds both sets still reads the field, and under Modify All still edits it. The warning names both sets and the field. Its fix: drop the bit from the second set, give the second set its own `readable: false` row on the field (this works beside View All and View All Fields, not beside Modify All), say `viewAllFields: true` when the second set really should read every field, or, for a field that must stay hidden from everyone without a capability (a salary, an ID number), declare `requiredPermissions` on the field itself, with a `maskingRule` where a partial value is needed. It is a warning only: nothing that builds today stops building.
11+
12+
Not reported: a field that declares `requiredPermissions` (that gate applies after the permission sets are merged, so no set's bit opens it); a set's own Modify All over its own row, which stays `security-superuser-field-mask-inert`, so one row gets one finding; a second set whose own `readable: false` row on the field keeps it closed beside View All or View All Fields; an edit lock beside View All or View All Fields, which never grant an edit; and a key on an object or field the stack does not declare. Fields are never judged by their name.
13+
14+
`security-wildcard-vama` also reads `viewAllFields` on a package-authored `'*'` entry, as an error like the two record bits: such a set reads every field of every object, other packages' objects included. The key is new in this release, so no stack accepted by a released version is refused. On an object's own entry the bit is not reported. `os explain security-cross-set-field-reopen` prints the full reasoning, and Studio shows the warning in every platform locale.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
docs(skills): the data skill teaches the three permission axes, `viewAllFields` and the sensitivity tiers
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
objectstack-data's `rules/security.md` now teaches the permission model in three axes. Object permission (`allowRead`, `allowCreate`, `allowEdit`, `allowDelete`) decides whether the caller can use the object at all. Record scope (`viewAllRecords`, `modifyAllRecords`) widens which records the caller reaches, and from v19 those two bits open no field. Fields are visible by default, so an author writes only the exceptions: nothing for an ordinary field, `fields` rows in the sets that differ for a position-dependent one, and `requiredPermissions` on the field itself for a high-sensitivity one (salary, ID numbers), with `maskingRule` where a partial value is needed. That gate is strictest-wins over every field row, `viewAllFields`, View All and Modify All.
12+
13+
A new section teaches `viewAllFields: true` as the way to say "this set reads every field", for admin-like sets: a read vote on every field, fields added later included, and never an edit vote; the set's own `readable: false` row beats it; it grants no object access and widens no record; on the `'*'` entry it also votes on the fields of private-posture objects, which a plain `'*'` does not grant; it is authored in metadata, as Studio's permission matrix keeps the key and has no control for it.
14+
15+
`evals/hooks-security-seeds-datasources.json` gains two cases: a read-everything auditor set written with `viewAllFields`, and salary and ID-number fields gated with `requiredPermissions` and `maskingRule`. Two restatements in `rules/security.md` were removed to pay for part of the new text (the "Locks, never grants" bullet and the recipe link of the `when` section).
16+
17+
`@objectstack/spec`: two docblock sentences in `src/security/permission.zod.ts`, comments only. The `viewAllFields` docblock now says the key changes nothing on an object entry that carries View All or Modify All (it said "on a set"), and the `FieldPermissionSchema` docblock names `viewAllFields` beside the super-user bits as a voter in the field merge. No schema, description or generated artifact changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): a namespaced card prefixes each operation's `via` the way it prefixes the agent action it names
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`namespacedScenario` prefixed `run.agentActions[].name` with the card's namespace but copied `run.operations[].via` bare, so the persona-grant check never found the routed action a build declares (`decide_approval_step` against `demoleave_decide_approval_step`) and failed builds that route the decision through the card's own action. The namespaced card now carries `via` prefixed, and the loader's rule (a `via` is one of the card's agent actions on the operation's object) holds on it as on the plain card.
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 data skill says a lookup pick copies a currency amount only between fields in the same currency
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data` described `lookupAutofill` (`rules/field-types.md`) and the line-item grid's catalog auto-fill (`rules/relationships.md`) as unconditional copies. The first now states, and the second points to, the rule the platform applies to a declared pair and to the line-item grid's same-named `autofill` copy: a `currency` amount is copied only between fields in the same currency (a `fixed` code or a per-record one); otherwise the target is left as it was and the form says why. Nothing is converted, so a line in another currency takes its price by hand. The sentence is paid for in the same file by trimming type-table cells that only restated the type name. No behaviour changes.
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-ui teaches the board's lane statistic and card settings
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The kanban example in `rules/list-views.md` now writes `kanban.summary` in place of the older sum-only `summarizeField`, and sets `showFieldLabels` and `hideEmptyFields` with their defaults (both `true`). One note names the six lane statistics (`none`, `count`, `sum`, `avg`, `min`, `max`), says the four aggregates cover every record of the lane and not only the loaded cards, names the known gap (a board over a lookup field or in a grouped view), and says `summary` takes precedence over `summarizeField`. Text only; restating comments and sentences in the same file are cut to pay for it.
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-ui teaches the object's `actionLayout`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`rules/actions.md` gains one section, "Button Order (`actionLayout`)": an arm per scope (`list`, `record`), `pinned` (at most 3 buttons, in order, `[]` pins none) and `more` (the order of the overflow menu, unnamed actions after it), which placements each arm takes and where the `record` arm is drawn (record page, side preview, phone bar, a row's menu order), the list page's `$import` / `$export` as pinned-only built-ins, that `os validate` refuses a name the arm's scope does not place, and that on an installed object only its paired `.custom` package's extension writes the key, arm by arm. Text only; one eval case exercises it.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/service-knowledge': patch
3+
'@objectstack/mcp': patch
4+
'@objectstack/runtime': patch
5+
'@objectstack/spec': patch
6+
'@objectstack/lint': patch
7+
---
8+
9+
feat(mcp,service-knowledge): the MCP door serves `search_knowledge`, and a skill MCP withholds is no longer withheld in silence
10+
11+
Clause-②: yes
12+
Metadata-protocol: none
13+
14+
**`search_knowledge` over MCP.** An app that mounts the knowledge service (`KnowledgeServicePlugin`) now has its knowledge sources searchable from any MCP client: `tools/list` lists `search_knowledge` wherever the kernel holds a `knowledge` service and the connection's grant reaches the read family (`data:read`, or an API key or session, which carry no OAuth grant). Before, no MCP connection served a knowledge tool, so a BYO-AI client could not reach an app's knowledge base at all, and every skill whose `tools` named `search_knowledge` was dropped from `prompts/list`.
15+
16+
- **One definition, one executor (ADR-0149 D2).** `@objectstack/service-knowledge` exports the tool's `AIToolDefinition` (`getKnowledgeToolDefinitions`) and its executor (`createKnowledgeTools`, also `KnowledgeService.knowledgeTools()`). The MCP door registers the definition as the service hands it over, on HTTP and on stdio, and holds no copy of its description or argument schema. Arguments: `query` (required), `sourceIds` (at least one id; omit it to search every source, and an empty list is refused `VALIDATION_ERROR` rather than answered with no passage), `topK` (1 to 20, default 5); any other key is refused before the search runs.
17+
- **As the caller.** Each call runs with the caller's execution context, and the knowledge service re-checks every passage indexed from a record against the caller's row-level security; on an OAuth connection that is the delegating person's own reach.
18+
- **Only `aiExposed` sources.** The tool searches only the sources whose `aiExposed` is not `false`, and refuses a `sourceIds` entry naming any other source with `NOT_FOUND` and the sentence an unknown id gets, so an agent never learns a withheld source exists. `IKnowledgeService.search` itself is unchanged: it still searches a source its caller names explicitly, because it also serves platform callers that are not agents.
19+
- `MCP_DOOR_TOOL_NAMES` (`@objectstack/spec/system`) lists `search_knowledge`, so `os lint` resolves it for a skill offered over MCP, as it already did through the platform registry.
20+
21+
**A withheld skill is said, twice.**
22+
23+
- **Authoring time.** The `ai-skill-tool-unresolved` rule gains a verdict for a skill MCP would offer as a prompt (`instructions`, not `mcpPrompt: false`, not `active: false`) whose `tools` names one of the `ask` product's data tools no MCP connection serves (`aggregate_data`, `query_data`, `visualize_data`): the name resolves, but MCP withholds the skill from every `prompts/list`, and the warning names the tool. Fix: bind tools both doors serve, or set `mcpPrompt: false` on a skill written for the in-product agents.
24+
- **Runtime.** On the HTTP door, each `prompts/list` that withholds a skill logs one `debug` line naming the skill and each bound tool the connection does not serve.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(studio): the object extension, hook, action and flow Saves no longer publish over another admin's live change
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Studio's top-bar Save writes an item's draft and then publishes that one item. The object page pinned that publish to the published row it was loaded at, but the other editors that save this way did not: two admins who opened the same object extension, hook, pair action or flow each passed the draft check, and the later Save replaced the earlier one's live change without a word.
11+
12+
Each of those editors now reads the published version at the address its publish writes (the `/layers` read's `overlayVersion`) where its buffer is loaded, and its Save's publish sends it as `If-Match` (`If-None-Match: *` where nothing is published there yet). When another writer published since, the Save opens the same dialog the object page shows for a live change: reload re-reads the live item, overwrite (after a confirmation) publishes over the version the refusal names, and keep editing leaves the edits on the page, unsaved. The flow's on/off switch is pinned the same way. Creating a new hook, pair action or flow publishes with `If-None-Match: *`, so a same-named item another writer published first is refused instead of replaced. No dialog wording or locale key changes.
13+
14+
A reload over a draft that was pending before the Save (a copilot's) now keeps the publish pinned to the version the conflict was raised on: the reload re-reads that draft, which carries the page's edits, and the next Save is asked again instead of publishing it over the row that moved. An overwrite, a publish that lands, or a load that finds no pending draft ends that hold. This applies to the object page too.
15+
16+
A server that serves no `overlayVersion` gets an unpinned publish, as before. Nothing to migrate.

0 commit comments

Comments
 (0)