Skip to content

Commit 4566c5c

Browse files
committed
Merge origin/main into the skills action examples branch
One conflict, in scripts/check-skills-token-ratchet.mjs: main's side of the file is kept, and the three rows this branch moves are pinned again at their measurement on the merged tree (6795 to 6787, 2264 to 2256, 3890 to 3844). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6
2 parents 661e8e9 + bc17334 commit 4566c5c

94 files changed

Lines changed: 2948 additions & 230 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.

‎.changeset/36029-book-audience-system-permission.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Skills-docs: none — no `skills/` page teaches the book audience forms; `conten
1717

1818
A book's `audience` (ADR-0046 §6.7) takes a fourth form, `{ systemPermission: 'TOKEN' }`: the book's pages are read by a signed-in caller who holds that capability through any permission set, the same caller an app with `requiredPermissions: ['TOKEN']` opens for. `{ permissionSet }` names one set, so it could not gate a manual on a capability several sets grant (`setup.access` comes with `organization_admin`, `admin_full_access` and any delegated-admin set an application authors).
1919

20-
- **`@objectstack/spec`.** `BookAudienceSchema` and `BookAudience` gain the arm. It is strict, so `{ systemPermission, label }` is refused at parse; an object that also carries `permissionSet` still parses as the older, non-strict `{ permissionSet }` arm with the other key dropped, as before. `BookAudience` is a wider union now: TypeScript code that reads `.permissionSet` after a bare `typeof audience === 'object'` check narrows by key instead (`'permissionSet' in audience`). `AudienceCaller` gains `systemPermissions`, and `audienceAllows` admits the arm only when that list holds the token; an absent list denies (fail closed). Every other form answers as before.
20+
- **`@objectstack/spec`.** `BookAudienceSchema` and `BookAudience` gain the arm. It is strict, so `{ systemPermission, label }` is refused at parse, and an object that also carries `permissionSet` is refused too: an audience names one gate. `BookAudience` is a wider union now: TypeScript code that reads `.permissionSet` after a bare `typeof audience === 'object'` check narrows by key instead (`'permissionSet' in audience`). `AudienceCaller` gains `systemPermissions`, and `audienceAllows` admits the arm only when that list holds the token; an absent list denies (fail closed). Every other form answers as before.
2121
- **`@objectstack/rest`.** The docs audience reads the caller's own `systemPermissions` (the list every `requiredPermissions` arm of the `/meta` read gate reads) when some book carries the new form, on `GET /meta/doc` (with and without `?include=content`), `GET /meta/doc/:name`, `GET /meta/book`, `GET /meta/book/:name/tree` and the app-nav `doc` entries. New: `anySystemPermissionAudience`, and the optional `resolveAudienceSystemPermissions` port on `MetaReadGateAudienceSources` for a transport whose audience reads someone else's holdings.
2222
- **`@objectstack/runtime`.** The MCP docs tools (`search_package_docs`, `read_package_doc`) gate on the same form; on an OAuth grant they read the delegating person's own capabilities, never the token's ceiling.
2323
- **`@objectstack/setup`, `@objectstack/studio`.** Each package now ships a manual (`setup_manual`, `studio_manual`) claiming its package's doc namespace (`setup_*`, `studio_*`), gated on `setup.access` / `studio.access`. Before, those docs were claimed by no book, so they fell back to `org`: listed to administrators only by the Console's docs index, but readable at their address, and through `?include=content`, by every signed-in member. Now a member who cannot open Setup gets `setup_overview` in neither list and a `403 PERMISSION_DENIED` on its read; an administrator reads it as before. The docs' Console address now names the manual (`/apps/com.objectstack.setup/docs/setup/setup_overview`) in place of the package's implicit one; the flat `/docs/setup_overview` permalink still finds it.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): the Lookup's Related object and the roll-up's Child object take objects only
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
In Studio's field inspector, the Lookup's *Related object* and the roll-up summary's *Child object* pickers committed whatever text was typed, so a typo saved a field pointing at an object that does not exist. Neither door accepts an expression, so once the picker's object list has loaded, both commit only an object it lists: typed text that names no listed object is refused, the picker says no object is chosen, and the target the field already had stays (clearing the input on purpose still removes it). While the list is not yet read, or its read failed, the typed text is still committed as before. The trigger object in the new-automation dialog, the one other picker that takes objects only, now also keeps its chosen object on a refused typo. Objects that exist only as a pending draft stay choosable, because the picker lists the draft-overlaid catalog. Flow references keep their free text.
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 `objectstack-ai` skill names what replaces the two retired agent keys
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ai/SKILL.md`: the `agent.tools` tombstone row now says where the tools go (a `defineSkill` under the stack's `skills`), and the `agent.knowledge` row names the two keys that restrict retrieval on the knowledge source (`aiExposed`, `source.where`). The words are paid for in the same file: the skill example loses one sample instruction line. No fact is removed.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
'@object-ui/i18n': patch
4+
'@object-ui/react': patch
5+
'@object-ui/layout': patch
6+
'@object-ui/app-shell': patch
7+
'@object-ui/console': patch
8+
'@objectstack/console': patch
9+
---
10+
11+
perf(console): a list page draws its rows once before they paint, and the shell re-renders less during first load
12+
13+
Clause-②: yes (narrowing)
14+
Metadata-protocol: none
15+
16+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value, metadata type or stored row is added, removed or renamed, so there is nothing for `objectstack migrate meta` to rewrite. What narrows is the value two React hooks of @object-ui/i18n return: `useObjectTranslation()` and `useI18nContext()` no longer carry `appContentLanguages`, which moved to its own hook. Its consumer is code, and the compiler names every reader left behind. `runtime-interface-only` does not fit on a checked fact: the context value's interface is not exported, so it cannot be named by path. -->
17+
18+
On a list page's first load the grid drew its whole table several times between the rows' first render and their first paint: once with row-end controls before the list page scope was known, once when the inline-action fold found its host, and once when the record verdicts were republished with nothing new in them. The rows now draw once, without row-end controls, and those passes are gone.
19+
20+
The shell does less during first load too. The app's own locale list lands after the console has drawn; it used to re-render every component that reads a translation, about 1,900 of them. It is now read with `useAppContentLanguages()` from `@object-ui/i18n`, and only the language menus re-render for it. `useObjectTranslation()` and `useI18nContext()` no longer carry `appContentLanguages`. A sidebar entry is not redrawn when a new capability checker gives it the same answer.
21+
22+
Nothing changes in what the list, the sidebar or the language menus show.
23+
24+
**BREAKING** (`@object-ui/i18n`, and `@object-ui/react`, which re-exports the same two hooks: their return values), shipped as `patch`: the change is not to the metadata protocol (`Metadata-protocol: none`).
25+
26+
- Removed: the `appContentLanguages` field from what `useObjectTranslation()` and `useI18nContext()` return, whether they are imported from `@object-ui/i18n` or from `@object-ui/react`. It was added there by #36040.
27+
- Use instead: `useAppContentLanguages()`, which both entries now export: `@object-ui/i18n`, and `@object-ui/react` beside the two hooks. It returns the same value, the app's declared content languages or `null` while they are unknown, and `null` outside an `I18nProvider`.
28+
- Why: the list lands after the console has drawn. While it rode on the translation context, its arrival re-rendered every component that reads a translation, about 1,900 of them on first load. In its own context only the components that read it re-render.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/lint': minor
4+
---
5+
6+
fix(spec)!: a book audience names one gate, and a gated book claims its pages by name
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: narrowed
10+
Skills-docs: none — no `skills/` page teaches the book audience forms; `content/docs/ui/doc-pages.mdx` documents both refusals in this change
11+
12+
<!-- adr-0087: registered book-audience-two-gates-and-catch-all-claim-refused -->
13+
14+
**BREAKING** for two book shapes (ADR-0046 §6.7) that were accepted and meant less than they said. Stored books are not rewritten or refused at boot; the next save or publish of such a book is refused with the fix named.
15+
16+
- **`@objectstack/spec`.** `BookAudienceSchema` refuses an `audience` naming both `permissionSet` and `systemPermission`. The older `{ permissionSet }` arm is a plain object, so the pair used to parse as the set form with the capability stripped: the author believed the book was gated on a capability, and it was gated on one set. `defineStack`, `os validate` and the `/meta` save now refuse it, and the message says which key to keep. Only the second gate key is refused: every other shape that parsed before still parses the same way.
17+
- **`@objectstack/lint`.** New error `book-gated-catch-all-include` (`validateBookAudienceClaims`): a book whose `audience` is `{ permissionSet }` or `{ systemPermission }` with a group claiming docs by `include: '*'`. A package scope leaves out only a doc stamped with another package, so a stored doc bound to no package is in every scope, and the catch-all claimed it too and hid it from every reader outside the audience. It runs on `os validate`, `os build` and `os lint`, and at the runtime publish gate on a book write (Studio, REST `/meta`, MCP).
18+
19+
## FROM → TO
20+
21+
- `audience: { permissionSet: 'crm_admin', systemPermission: 'setup.access' }` → `audience: { systemPermission: 'setup.access' }` (everyone holding the capability through any set) or `audience: { permissionSet: 'crm_admin' }` (the holders of that one set).
22+
- `audience: { systemPermission: 'crm.runbook' }` with `groups: [{ key: 'all', label: 'All', include: '*' }]` → `include: 'crm_runbook_*'` (the package's doc namespace), a tag include `{ tag: 'runbook' }`, or pinned `pages`.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/core': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(lint,core)!: a lookup `dependsOn` entry whose filter key names a formula of the referenced object is refused at authoring; an import lookup none of whose scoped reads answered is never reported as out of scope
8+
9+
Clause-②: yes (narrowing) — a lookup, master_detail or user field whose `dependsOn` filter key names a field of the referenced object computed on read (a `formula`) publishes today and is now refused at `error` by `object-field-ref-unknown`
10+
Metadata-protocol: narrowed — a `dependsOn` filter key naming a field of the referenced object computed on read is refused at authoring
11+
Skills-docs: none — no published skill page teaches a `dependsOn` filter key on a formula
12+
13+
<!-- adr-0087: registered lookup-depends-on-param-computed-field-refused -->
14+
15+
**BREAKING** for the publish of an object with such a `dependsOn` entry: it was accepted before and is refused now, by `objectstack validate` / `lint` / `compile` / `build` and by the runtime publish gate, with the field and the fix named in the finding. The schema is unchanged, and stored objects are not rewritten or refused at boot; the refusal comes at the next publish.
16+
17+
**Why.** The record picker filters its candidates, and the importer scopes a lookup cell, by the entry's filter key on the referenced object (`param` in `{ field, param }`, else the bare name or `field`). The engine refuses every filter on a field computed on read, so such an entry published clean, then every picker query it scoped was refused and every import of the column failed its lookup. The finding names the referenced field and why it cannot be filtered on, for example `fields.task.dependsOn[0].param "project_label" is a formula field of "oos_task", computed on read: no record-picker query or import lookup can filter on it.`
18+
19+
## FROM → TO
20+
21+
- `dependsOn: [{ field: 'project', param: 'project_label' }]`, where `project_label` is a formula of the referenced object → `dependsOn: [{ field: 'project', param: 'project' }]`, naming the stored field of the referenced object that holds the same value; or drop the entry.
22+
- `dependsOn: ['region']`, where `region` is a formula on the referenced object → `dependsOn: [{ field: 'region', param: 'region_code' }]` with `region_code` a stored field of the referenced object.
23+
24+
A formula on the OWNING object stays a legal gate (`dependsOn[i].field`): the form reads it from the record being edited.
25+
26+
**`@objectstack/core`, the importer.** A scoped lookup none of whose reads answered (every read refused, for example because the row's master cell is a value the scoping field's type cannot take) is no longer asked again without the scope. It keeps `reference_not_found` and the plain `no record matches` sentence, and never answers `reference_out_of_scope`, which it could before when the value matched a record outside the scope. `RefMatch` gains the optional member `scopeUnanswered`, which a resolver sets for such a lookup.
27+
28+
Measured first-party exposure: none. Every `dependsOn` in `examples/` and in the packaged objects names a stored field on the referenced side, or sits on a field type with no picker.
29+
30+
`@objectstack/spec` adds only the upgrade-guide entry `lookup-depends-on-param-computed-field-refused`.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(approvals): a step decided in a `subflow` child no longer tells the submitter "approved" while the parent opens a further step
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The decision that ends an approval tells its submitter the outcome (`approval.approved` / `approval.rejected`); a decision that ends only a step tells no one. To tell the two apart, the platform looked for a pending request on the decided request's own run. A step decided inside a `subflow` child hands the next step to the parent run, which opens it under the parent's run id, so nothing pending was found and the submitter was told "approved" while the next step was still open.
11+
12+
The check now looks across the run that carries the request's record (`record_run_id`, recorded on each request since requests record their root run). A `subflow` child shares that run with its parent, so a further step on either side keeps the first decision quiet, and the decision that ends the approval tells the submitter as before.
13+
14+
- A `map` item whose item is a record carries a run of its own, so each item's submitter is still told that item's outcome when its last step is decided, while the batch goes on to the next item.
15+
- A request opened before requests recorded the run that carries their record is judged on its own run, as before.
16+
17+
Nothing to migrate.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/plugin-report': patch
4+
---
5+
6+
feat(app-shell): the assistant's entry is an outlined 「Ask AI」 button at the end of every page's top-right group, and a route with no page header gets it in its corner
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The assistant's one standing entry was a 32 px transparent robot icon named only by its tooltip. It is now an outlined button with a chat-bubble icon and the words 「Ask AI」 (「问 AI」 in Chinese), read from the string Home's own 「Ask AI」 button already carries in every built-in pack (`home.askAI`), so no language pack changes. The words are the platform's; no app renames them.
12+
13+
- **Where it sits.** Last in the page's top-right button group (comments, help, Ask AI), so it ends the page header's row and the record page's navigation row; after help on Home's bar and in the phone's top bar. A route whose page draws no button group (search results, a component page, the app editor) gets the same button over the empty top end corner of its content (top-right; top-left in a right-to-left language), and loses it as soon as its page draws a group. A page that keeps its own controls in that corner draws the group in its own top bar instead, so the button never covers them: the report builder (a new report, and a report's Edit) ends its header with Discard, Save, help, Ask AI, and the inbox ends its header row with its own buttons, help, Ask AI.
14+
- **When the header runs out of room.** The console page header now measures whether its title (and, on a page that offers the folded actions, its description) still fits beside the words; when it does not, the words are hidden first and the icon stays, before the page's own actions fold and before the title is cut. They come back once there is room again, after any fold has opened. The decision reads the header's own width, never a breakpoint, so a longer translation hides its words sooner.
15+
- **Phone.** The icon alone, a 44 px target.
16+
- **Accessibility.** With its words shown the words are the button's accessible name; with the icon alone `aria-label` carries the same words. On a Mac the tooltip shows ⌘⇧I and the button declares `aria-keyshortcuts="Meta+Shift+I"`; on other platforms, where Ctrl+Shift+I opens the browser's developer tools, no shortcut is shown or declared.
17+
- **Home.** Home's 「Ask AI」 opens the drawer through the same entry hook as the page's button (`useAskAiEntry`), still on the ask agent.
18+
19+
`useShellPageActionsSlot()`'s render function takes one more optional prop, `assistantIconOnly`, which a header that measures its own width passes; a header that passes nothing gets the button with its words, as before. `ReportBuilder` (`@object-ui/plugin-report`) takes an optional `headerEnd`, drawn after Save at the end of its header; without it the header ends with Save, as before. The drawer keeps its title for now.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the lifecycle rule teaches which sealed objects take signed expiry, and that a retention override cannot shorten a packaged sealed object's declared window
6+
7+
Clause-②: no (published prose only; teaches behaviour already on main)
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/rules/lifecycle.md` (Sealing) no longer says expiry is not built and that the sweeper deletes every sealed object's rows. It now says: signed expiry covers objects whose lifecycle is declared in packaged metadata, whose sealed rows leave only by whole checkpoints and read as `expired`; on such an object with no `archive`, a retention override below the declared window is rejected and the declared window applies, and to keep rows for less time the declared window is what to shorten; on any other sealed object (one created at runtime) the sweeper still deletes sealed rows, which then read as missing. The `retention_overrides` row of the Operations table points at that paragraph.
11+
12+
The same sentence said no verifier is built. `os audit verify` reads the checkpoints back, so that clause is removed.
13+
14+
The file sat at its token ceiling, so the words are paid for in the same file and no ceiling moves: the page drops the rationale sentence after "the file never shrinks" and its echo in the first validation example, the example list in the rule sentence (the Lifecycle Classes table carries a typical use per class), the hook names in the intro, the rationale clause of the Separation bullet, and three filler words in Safety Semantics.
15+
16+
Eval case 16 of `skills/objectstack-data/evals/objects-fields-relationships.json` graded the two withdrawn statements (`not reported`, and `read as missing` for an object an author declares). It now expects the page as it stands: `must_contain` carries `expired` in their place, and `expected_output` ends with the three sentences of the new paragraph.

0 commit comments

Comments
 (0)