Skip to content

Commit 3bbce49

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/area-E1b-33210
2 parents 8913382 + bdd5176 commit 3bbce49

147 files changed

Lines changed: 6440 additions & 562 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/plugin-chatbot': patch
5+
---
6+
7+
feat(console-ai): an image or PDF attached in the AI chat is uploaded as the user and sent to the agent as a file part
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
The console's AI chat used to send only spreadsheet attachments (parsed in the page) and told the model that every other file "was not read". Now:
13+
14+
- The composer shows its attach button and the attachment chips, so a file can be picked, pasted or dropped and seen before it is sent.
15+
- An image (PNG, JPEG, GIF, WebP) or a PDF of at most 10 MiB is uploaded to storage as the signed-in user through the console's upload adapter (`POST /api/v1/storage/upload/presigned`, the bytes, then `POST /api/v1/storage/upload/complete` without `attachTo`), so it belongs to no record yet. The user turn carries one AI SDK file part per uploaded file: `{ type: 'file', mediaType, filename, url, providerMetadata: { objectstack: { fileId } } }`, where `url` is the stored file's address (`/api/v1/storage/files/{fileId}`, made absolute) and never an inline data URL, so the request and the stored conversation stay small. The turn's text names the files it sent.
16+
- A file over the cap, of another type, or whose upload failed is not sent, and the turn's text names it and says why, so the user and the agent both know its content was not read. The turn still sends.
17+
- A spreadsheet keeps the in-page parse, unchanged.
18+
19+
`@object-ui/plugin-chatbot`: `useObjectChat().sendMessage` takes a third, optional argument, `fileParts` (the new exported `ChatFilePart` type), which the API mode sends as the turn's file parts. Its second argument, `files`, is still not sent: upload the files first and pass the result as `fileParts`. Existing two-argument calls are unchanged.
20+
21+
Reading the files is the agent's side: an agent service that does not yet convert these parts for its model sees the file names in the text and the parts it does not read.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/core': minor
3+
'@objectstack/plugin-security': minor
4+
'@objectstack/lint': patch
5+
'@objectstack/spec': patch
6+
---
7+
8+
fix(core, plugin-security, lint)!: a permission set's own field-mask row binds its own holders over that set's View All vote
9+
10+
Clause-②: yes (narrowing)
11+
Metadata-protocol: semantic
12+
13+
<!-- adr-0087: registered permission-own-field-mask-binds-over-own-view-all -->
14+
15+
**BREAKING** for the holders of a permission set that grants View All (`viewAllRecords`) on an object and declares `readable: false` on a field of that object in its own `fields`. Per ADR-0066 D2 ⑧ as amended on 2026-11-15 (the maintainer's ruling on the card), that row wins over the same set's View All field vote: the set casts no read vote on the field, so a holder reads it only when another set they hold casts a read vote on it (that set's own `readable: true` row, or its View All or Modify All on the object). A co-held set that says nothing about the field does not restore it. Every reader of the field merge answers the same: the data doors, through `PermissionEvaluator.getFieldPermissions`, and the `fields` slot of `/auth/me/permissions`. Until this release the set's own View All voted the field readable, so the row bound none of the set's holders (the ADR's note of 2026-11-02).
16+
17+
**Not moved.** Another set's View All or Modify All on the object still makes the field readable (and, under Modify All, editable) for a caller who holds both sets. A View All set still votes on every field it does not mask itself. An omitted `readable` parses to `true` and is not a mask. View All never granted an edit, so an edit lock beside it binds as before. Modify All is unchanged: a set holding `modifyAllRecords` on the object votes `readable: true` and `editable: true` on every field of it, its own rows included. The row-level bypass is untouched.
18+
19+
**Who moves:** an administrator whose set pairs View All on an object with its own `readable: false` row for a field of that object, and whose holders are expected to keep reading the field. The row now hides the field from them, as it reads. Where the field is meant to be read, the row is the thing to delete. No default permission set the platform ships carries the pair.
20+
21+
`@objectstack/lint`: `security-superuser-field-mask-inert` reports only a row that its own set's Modify All unbinds (a `readable: false`, an edit lock, or both). A `readable: false` beside the set's own View All is no longer reported, because it binds. The finding's `userTextParams` no longer carry `bypass` (Modify All is the only bypass the rule reports), and its message, hint and user sentence name Modify All. `security-controlled-by-parent-master-reference-hidden` is skipped only beside Modify All and is reported beside View All, and the roll-up source visibility rule reads a View All set's own mask as hiding the field. The rule ids are unchanged.
22+
23+
`@objectstack/core`: the exported `superuserFieldVote(sets, objectName)` takes an optional third argument, the field name, and reads the `fields` of the sets it is given. Called with two arguments it answers the object-wide vote, as before.
24+
25+
`@objectstack/spec`: the doc comment above `FieldPermissionSchema` states the exception, and the upgrade guide gains the semantic entry `permission-own-field-mask-binds-over-own-view-all`, which tells an administrator how to find the pair and what to decide. No schema, description or generated artifact changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection)!: `POST /api/v1/marketplace/install-local` parses the manifest `namespace` through its declaration, as it already parses the id
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none (the declaration `ManifestSchema.shape.namespace` already refuses these values; this door now enforces it. The dev confirms against the diff.)
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export changes shape. The install door now refuses a namespace `ManifestSchema.shape.namespace` already refuses everywhere else, `defineStack` and `objectstack build` included; no stored row, ledger entry or authored value is rewritten (an entry an older build ledgered still rehydrates), so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** for a caller of the install-local door whose package declares a `namespace` the manifest declaration refuses: anything but 2–20 characters of lowercase letters, digits and `_` opening with a lowercase letter.
13+
14+
- FROM: an inline manifest declaring `namespace: ''`, `'QA_N'` or `'9-Bad Ns!'` answered `200`, was registered and ledgered under that namespace, and `QA_N` installed beside an existing owner of `qa_n` without the install-time namespace gate answering. TO: it answers `400 PLUGIN_MANIFEST_INVALID` with the declaration's own sentence and nothing is registered, synced or written.
15+
- FROM: an inline manifest declaring `namespace: null` or a non-string `namespace` was admitted, the key unparsed (a `null` read as no namespace). TO: it answers the same `400 PLUGIN_MANIFEST_INVALID`; only an absent key means no namespace.
16+
- FROM: a cloud-fetched snapshot declaring such a namespace installed the same way. TO: it answers `502 PLUGIN_MANIFEST_INVALID`, the status the door already gives an invalid upstream snapshot.
17+
18+
**Not moved.** A manifest whose `namespace` key is absent installs as before (the key is optional). A member of a multi-package artifact declaring such a namespace keeps the artifact-entry refusal it already had (`INVALID_ARTIFACT_PACKAGE_ENTRY`, 422). A conforming namespace installs as before, and one another package owns still meets the registry's own namespace gate. A package an older build already installed under such a namespace still rehydrates at boot and can still be uninstalled; it cannot be re-installed until its namespace conforms.
19+
20+
The fix for a caller: declare the namespace in lowercase snake form (`qa_n`, not `QA_N`), or omit it.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/core': minor
4+
'@objectstack/service-automation': minor
5+
'@objectstack/lint': minor
6+
'@objectstack/runtime': patch
7+
'@object-ui/app-shell': patch
8+
---
9+
10+
feat(automation): a flow writes a field marked as text in the organization's language
11+
12+
Clause-②: yes (widening) — `create_record` / `update_record` `fields` values now also take the text envelope `{ dialect: 'template', source }` (`FlowRecordFieldValueSchema`), and the translation face gains `flows.<flow>.records.<node_id>.fields.<field>`; every value accepted before is accepted and written as before
13+
Metadata-protocol: added
14+
Skills-docs: follow-up #34434 — skills/objectstack-automation/SKILL.md (the record write's field values: the text envelope beside the CEL envelope and the literal), skills/objectstack-i18n/SKILL.md (the `flows.<flow>.records.<node_id>.fields.<field>` key and the organization-language rule)
15+
16+
A `create_record` / `update_record` field value can now be marked as text: `{ dialect: 'template', source: 'Auto-escalated: {{ record.priority }} priority' }`. The node writes that sentence in the organization's language, because everyone in the organization reads the record. It picks the translated template at `flows.<flow>.records.<node_id>.fields.<field>` first, then fills its `{{ }}` holes. The language is the Localization setting (`localization.locale`) when somebody set it, else the app's declared `i18n.defaultLocale`. It is never the language of the person who started the run, so a run started by a button writes the same text as a record-change run.
17+
18+
- A missing translation, or no language to pick, writes the authored text, and the run goes on.
19+
- A bare string is still a literal and is written as spelled. Only the `fields` map of these two nodes takes the text envelope; every other value slot still refuses it. The source is judged as a text slot: a single-brace `{token}` is refused with its `{{ }}` spelling.
20+
- A Localization setting that cannot be read fails the node and writes nothing, so another language is never stored over a choice that may exist. A `fault` edge routes the failure. A host that registers no `localization` setting has none set, so the app's declared default answers.
21+
- The Studio flow inspector judges a record node's `fields` cells by the same rule (`FlowRecordFieldValueSchema`), so a text envelope there reads as valid and a malformed value still shows the spec's refusal. Fixes #34445.
22+
- `os i18n extract` scaffolds the key, and the existing coverage check reports it missing against `supportedLocales`. `objectstack validate` refuses a key over an unknown node, over a node that is not a record write, or over a field the node does not mark as text.
23+
- Text is picked when it is written. Records already written are not changed.
24+
25+
`@objectstack/core` exports `resolveOrganizationLocale` and `readOrganizationLocaleSetting`: one reader of the organization's language, for text the platform writes on the organization's behalf. `@objectstack/runtime`'s seed-locale resolver now reads its organization-setting rung through `readOrganizationLocaleSetting`; its answers are unchanged.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/client': patch
4+
---
5+
6+
docs: deciding an in-app AI pending action is the person's own act, on their signed-in session
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The `objectstack-ai` skill, the client SDK page, the actions-as-tools page and the `client.ai.pendingActions` docblock now say what the confirmation rule says for the in-app assistant door (`in-app-pending-action-decided-by-person`): only the person the assistant call ran as approves or rejects their item, in the app on their signed-in session. Another user's `ai:approve` does not decide it, and an API key or token is refused, even the person's own, and so is an AI identity. A client on a token can still list and get the queue. The door enforces this from the runtime release that carries the in-app door, not from this package release. Docs and docblock text only: no export, type, route or behaviour changes in these packages. The skill gains one eval case (an operator script on an API token asked to approve the queue).
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(ui, skills): a print page whose sections may break between sheets authors one `record:details` block per section
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/rules/pages.md`, § Print pages: one sentence after the page-break hints says that where sections may break between sheets, the author writes one `record:details` block per section, because `avoidBreakInside` keeps each block whole on one sheet when it fits (the qualifier the spec describe carries: a block taller than one sheet still breaks inside itself) and a multi-section block moves to the next sheet whole. The file pays for it within its token ceiling, which is not raised. It drops the sentence that said the console's print rendering was still to follow and that `os validate` warns the layout is not applied, which no longer holds: the console applies every `print` key. It also drops the words ", in full" from "must draw all it declares", which they only repeated; the "draws a window of its rows" refusal still covers a block that draws part of its rows. And § Routing model drops "regardless of which app you came from" after "one global `/docs/<name>` route resolves any doc": the same paragraph already says the viewer is platform-level and the URL has no package or app prefix. The docs page `content/docs/ui/print-pages.mdx` carries the same guidance under its key table. `avoidBreakInside` keeps its meaning; no schema or runtime change.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/formula': minor
3+
'@objectstack/skills': patch
4+
---
5+
6+
feat(formula): `rmbUpper(amount)` writes an amount in Chinese capital numerals (人民币大写) for printed quotes, contracts and invoices
7+
8+
Clause-②: yes (widening) — a new CEL stdlib function, `rmbUpper(dyn): string`, registered by `registerStdLib` and advertised in `CEL_STDLIB_FUNCTIONS`; an expression that calls it was refused as an unknown function before, and nothing that worked before is refused or changes value.
9+
Metadata-protocol: added — a formula, predicate or flow value may now call `rmbUpper(...)`.
10+
Skills-docs: updated here — `skills/objectstack-formula/SKILL.md` lists it in the stdlib Numbers table, and `content/docs/data-modeling/formulas.mdx` adds the catalog row and an "Amount in Chinese capitals" cookbook entry.
11+
12+
`rmbUpper(245000)` is `贰拾肆万伍仟元整` and `rmbUpper(10500.5)` is `壹万零伍佰元伍角`. A formula field reads it as text:
13+
14+
```ts
15+
Field.formula({ label: '大写金额', returnType: 'text', expression: 'rmbUpper(record.total_amount)' })
16+
```
17+
18+
- The amount is rounded once to 分, half away from zero, on the exact decimal it spells, so `1.005` is `壹元零壹分` and binary floating point never decides a cent.
19+
- One `零` stands for each run of zeros (`壹仟零伍元整`, `壹万零伍佰元整`, `壹亿零壹元整`), a ten is `壹拾`, the 万 and 亿 groups follow the usual rules, and the count of 亿 above 亿 is written with 万 (`壹拾万零壹亿元整`).
20+
- A whole amount ends in `整`; a 分 with no 角 writes `零` for the 角 (`壹元零伍分`); an amount under one yuan is its 角 and 分 alone (`伍角`).
21+
- `0` is `零元整`, a negative amount is prefixed `负`, and `null` reads `''`, so an empty total prints an empty line.
22+
- A number, a currency field and decimal text (`'245000.00'`) are read. Text that spells no number, a boolean or a list, and an amount of 10^16 yuan or more, is a runtime error rather than some text.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/mcp': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(mcp): `delete_record` tells the agent that a request naming one matching record is the human's approval
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The MCP `delete_record` tool description and its `confirm` member now say when the human's request is already the approval. When the human names the record to delete and exactly one record matches, that request approves the delete: the agent sends `confirm: true` on that call and does not ask again. When the name matches more than one record, or the request does not identify one record, the agent deletes nothing yet: it lists the candidates, asks the human which one, and sends `confirm: true` only after the answer.
12+
13+
The same server's other texts now say the same rule. The skill served at `GET /api/v1/mcp/skill` (and the Console's "Download skill" copy of it) carries the two sentences in its `delete_record` entry instead of "Ask your human first", and its destructive-action gotcha and workflow step say that a delete the user named, with exactly one record matching, is already confirmed. The refusal of a `delete_record` call without `confirm: true` now says to retry with `confirm: true` when the human's request named exactly this one record, and to ask the human first when the name matched more than one record or the request is a bulk delete; its code (`ACTION_CONFIRMATION_REQUIRED`), status (428) and `details` are unchanged.
14+
15+
Before, the description said "ask the human first, then retry", and models read a request that named one record either way: some asked a second time before a delete the user had already asked for.
16+
17+
The gate is unchanged. A `delete_record` call without `confirm: true` is still refused with `ACTION_CONFIRMATION_REQUIRED` (428), and nothing is deleted. A deleted business record still goes to the recycle bin. `delete_records` (bulk) is unchanged: a call without `confirm: true` is the preview, and the agent sends `confirm: true` only after the human approves it.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/plugin-form': patch
4+
---
5+
6+
fix(plugin-form): a record form's inline members resolve `{ $record }` lookupFilters, and only a record form can opt a lookup in
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A lookup field's `lookupFilters` entry `{ $record: 'quote_date' }` (or one hop away, `{ $record: 'account.cb_market' }`) resolves in a record form, whatever its layout. Until now that held only for fields generated from the object schema.
12+
13+
- **Inline members.** A `customFields` member and a self-describing inline section entry are fields of the record being edited too. A record form now stamps every field it draws in the one step every layout draws through (`gateFormFields`), after the members are merged and the sections expanded. Their `{ $record }` entries resolve like a generated field's. Before, they were left out of the candidate query.
14+
- **Only the form says so.** The picker honours only a stamp `withRecordBeingEdited` issued. A `recordBeingEdited` key written as data opts nothing in: on a standalone form's field, an action's parameter, or anywhere else, it is ignored and the `{ $record }` entry is left out. A record form also drops an authored `recordBeingEdited` from the fields it draws before it writes its own.
15+
16+
Fields generated from the object schema, literal entries and `dependsOn` query exactly as before.

0 commit comments

Comments
 (0)