Skip to content

Commit d76ab10

Browse files
Merge branch 'main' into claude/project-thread-xwd5h9
2 parents e328e13 + 49c8e0f commit d76ab10

533 files changed

Lines changed: 28242 additions & 4339 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: 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: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/cli': patch
4+
'@objectstack/platform-objects': patch
5+
'@objectstack/lint': patch
6+
---
7+
8+
feat(spec)!: retire the boolean arm of a relationship field's `inlineEdit` — `true` and `false` both read as the key left out
9+
10+
Clause-②: no (narrowing)
11+
Metadata-protocol: narrowed
12+
Skills-docs: follow-up #37042
13+
14+
<!-- adr-0087: registered field-inline-edit-boolean-removed, field-inline-edit-boolean-retired -->
15+
16+
**BREAKING** accept-set narrowing on `FieldSchema.inlineEdit` (`@objectstack/spec/data`), the inline form factor of a `lookup` or `master_detail` field. Since the field-group placement, a field group of the parent (`fieldGroups[].relatedList`) decides whether the parent's create and edit forms inline a child, and `inlineEdit` only picks the form factor of a placed child. Every reader of the key passes anything but `'grid'` and `'form'` as absent, so `true` (documented as "auto") and `false` both did exactly what leaving the key out does: the form factor is picked from the child's shape.
17+
18+
| FROM | TO |
19+
|:--|:--|
20+
| `inlineEdit: true` on a `lookup` / `master_detail` field | delete the key (the form factor is still picked from the child's shape), or write `'grid'` / `'form'` |
21+
| `inlineEdit: false` on a `lookup` / `master_detail` field | delete the key |
22+
| a child meant to be entered in the parent's form | name it in a field group of the parent: `fieldGroups: [{ key: 'lines', label: 'Lines', relatedList: '<child object>' }]` |
23+
24+
The one-line fix: delete a boolean `inlineEdit` wherever it is written; `os migrate meta --from 17 --write` deletes it from object sources. Writing one after upgrade fails `tsc` (the input type is `'grid' | 'form'`) and fails the parse with that prescription. `'grid'` and `'form'` parse unchanged. The view-level `inlineEdit` (a list view's in-cell editing switch) is a different key and is unchanged.
25+
26+
The retirement kit:
27+
28+
- **`@objectstack/spec`**: `FieldSchema.inlineEdit` is `z.enum(['grid', 'form'])`, and a boolean meets the prescription from the enum's own error map. The D2 conversion `field-inline-edit-boolean-removed` (lossless, retired from the load path) deletes a boolean `inlineEdit` from `objects[]` and `objectExtensions[]` field maps on every data-at-rest seam (stored rows, built artifacts, `os migrate meta`); the D3 entry `field-inline-edit-boolean-retired` names what the upgrade still owes: whether the child should be placed by a field group of the parent. The liveness ledger keeps the key `live` for the two surviving values, with the narrowing recorded.
29+
- **Field form** (`@objectstack/spec` `field.form.ts`, labels in `@objectstack/platform-objects`): with the boolean arm gone a select spells every value, so the field designer now offers `inlineEdit` as a `Grid` / `Form` select on `lookup` and `master_detail` fields; left unset, the form factor is picked from the child's shape. Before, the form left the key out because no widget could spell a boolean-or-string union.
30+
- **`@objectstack/lint`**: two doc comments in the field-consumer rule (`validate-field-consumers.ts`) now read a boolean `inlineEdit` as refused by the spec and as absent at the renderer; comment text on unexported functions only, so no shipped byte changes.
31+
- **`@objectstack/cli`**: the golden metadata-eval corpus places its line items with a field group of the parent, with `inlineEdit: 'grid'` as their form factor, instead of `inlineEdit: true`.
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the i18n and data skills teach the flow step-name key `flows.FLOW.nodes.NODE_ID.label` and the related-list title key `objects.OBJECT._relatedLists.LIST.label`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-i18n's SKILL.md, in the paragraph on the keys that sit deeper than their group's `label`, now names the flow step-name key `flows.FLOW.nodes.NODE_ID.label`: a screen is named through its heading `flows.FLOW.screens.NODE_ID.title` and takes a `nodes` key only beside a `title` of its own, `os i18n check` asks for a flow's top-level steps, and a step of one of the `FLOW_TECHNICAL_NODE_TYPES` (listed) is asked only where a decision's branch leads to it. Text only; paid inside the same file by cutting three restatements in the coverage and extract sections.
11+
12+
The object translation group table gains the `_relatedLists.LIST` row beside `_tabs`: the `label` of an object-form `relatedLists` entry on the parent object, keyed by the entry's literal `list` (a dotted `object.field` is one key); an entry with no `label` has no key and keeps the child field's `relatedListTitle`, else the child's plural label; the unprefixed `relatedLists` spelling is refused, naming the key. objectstack-data's `rules/relationships.md` says the same on the `relatedLists` entry: its `label` translates at `objects.PARENT._relatedLists.LIST.label`, and an entry with none has nothing to translate. One eval case covers both keys. Paid inside each file by cutting restatement; no ceiling of the skills token ratchet moves.
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.

0 commit comments

Comments
 (0)