Skip to content

Commit 0e2e4f5

Browse files
feat(automation): a flow writes a field marked as text in the organization's language (#34438)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XDoXcW9MrHfRMhTtSzNmhoC)_ Fixes #34062 Part of #34445 (covered completely; the seat closes it when this merges, since the landing tool takes one closing line) Ruling-ref: 6913660232 (B); 6929082704 (A, unreadable Localization setting) Clause-②: yes (widening) Metadata-protocol: added 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) ## 维护者速读 - **改了什么**:流程的 `create_record` / `update_record` 字段值可以标记为文本 `{ dialect: 'template', source }`;写入记录时按组织语言挑译文(先挑译文模板,再填 `{{ }}` 占位)。裸字符串仍按字面写入,不翻译。 - **为什么改**:裁决 6913660232(B):记录是全组织共读的,中文组织不该存进英文句子(hotcrm#2494)。组织语言 = 本地化设置(有人设置过)→ 应用声明的 `i18n.defaultLocale` → 原文;从不取发起人的语言。 - **风险与回滚**:纯加宽,原来合法的流程写出的值完全不变;只有标记了文本的字段才多读一次组织语言。回滚 = revert 本 PR。唯一新的失败路径:本地化设置读取抛错时该节点失败、不写入(可走 fault 边)。这一条已由你裁定为 A「A 这一步失败,不写入」(记录 6929082704):漏译仍是已裁的不中断情形;读不到设置等于不知道组织语言,所以不写入。 - **先看**:`packages/services/service-automation/src/builtin/crud-nodes.ts`(`resolveFieldValues`:读组织语言、挑译文、读取失败即失败);`packages/spec/src/automation/builtin-node-config.zod.ts`(`FlowRecordFieldValueSchema`,契约加宽处);`packages/core/src/organization-locale.ts`(共享的组织语言读取器)。 - **两分钟验证**:`pnpm --filter @objectstack/service-automation exec vitest run src/builtin/record-field-text.test.ts`,预期 24 个用例全绿(zh-CN 默认、en-US 发起人仍写 zh-CN、设置 ja-JP 胜出、缺译文写原文、裸字符串原样、读设置失败不写入、未注册设置取应用默认);Studio 一侧:`pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/flowValueSlots-12101.test.tsx packages/app-shell/src/views/metadata-admin/inspectors/flow-value-envelope.test.ts`,预期 44 个用例全绿。 - **需要你做的**:无,席位落地。 ## What changes - **Contract (spec).** A `create_record` / `update_record` `fields` value may be the text envelope `{ dialect: 'template', source }` (`FlowRecordFieldValueSchema`), beside the CEL envelope and the literal. Its `source` is judged as a text slot: `{{ }}` holes; a single-brace token and a blank source are refused at the envelope's `source`. Every other value slot still refuses a template envelope. The expression ledger hands the text envelope to the text-slot judge, not the CEL one (`FlowNodeExpressionPath.textEnvelope`, `isFlowTextEnvelopeShaped`); `FLOW_NODE_TEXT_SLOTS` gains the two `fields` maps as `envelopeOnly` slots, so a bare string there stays a literal. - **Translation face.** `TranslationDataSchema.flows` gains `records.NODE_ID.fields.FIELD`, judged as the text slot it translates; the key is spelled by `flowRecordFieldTextKey` (`@objectstack/spec/system`). Liveness row `flows.records` seeded `live` with its reader. - **One reader of the organization's language (core).** `resolveOrganizationLocale` / `readOrganizationLocaleSetting` in `@objectstack/core`: the `localization.locale` setting when somebody set it (`source !== 'default'`), else the `i18n` service's `getDefaultLocale()`, else nothing. Not `resolveLocalizationContext().locale` (its default layer is the `en-US` placeholder). Convergence: the seed loader's rung 1 now calls `readOrganizationLocaleSetting` (identical behaviour). The auth mail and the notification text keep their own code: each answers a different question (the auth mail binds the workspace's setting at boot and on change, and its SMS reads the default too; the notification text reads the recipient first and has no setting rung), so converging them would change their answers. - **Runtime (service-automation).** `AutomationEngine.setOrganizationLocaleResolver` / `organizationLocale(context)`, wired by the plugin through the exported `organizationLocaleReader(ctx)`. The record executors read the language once per node, and only when the node marks text. For each marked value they call `renderFlowTextSlot` with the run context's `locale` replaced by the organization's (parameter 2: never the starter's), so the translation is picked first and the holes are filled after (parameter 1). No translation, or no language, writes the authored text and the run goes on (parameter 5). - **Tooling (lint, reached by the CLI).** `collectExpectedEntries` walks each marked field, so `os i18n extract` scaffolds the key and the existing coverage check asks for it (no new gate). `objectstack validate` refuses a key over an unknown node, a node that is not a record write, or a field the node does not mark. `lint-flow-patterns` reads a record write's `fields` as value slots except the marked text. - **Studio (app-shell).** The flow inspector judges a `create_record` / `update_record` `fields` cell with `FlowRecordFieldValueSchema` (`recordFieldValueRefusal` in `flow-value-envelope.ts`, wired in `FlowNodeConfigField.tsx`'s `keyValue` case), so a text envelope reads as valid and a malformed value shows the spec's own refusal. Every other key-value map keeps its judge. - **Docs.** `content/docs/automation/flows.mdx` gains "Text a record keeps — a field value marked as text"; `content/docs/ui/translations.mdx` gains the key row. Not built here, per the ruling: hooks and actions (#34374, parameter 7), backfill (parameter 6), `org.locale` (parameter 8). ## Tests - `packages/services/service-automation/src/builtin/record-field-text.test.ts` (new, 24): through the real in-memory i18n service, the plugin's own `organizationLocaleReader` and a real ObjectQL engine over a recording driver, for both node types: a zh-CN app with no Localization row writes the zh-CN pick in a record-change run with no user; a run started by an en-US user still writes zh-CN; a `ja-JP` setting somebody set wins (asked for the run's organization), and CONTROL: the `source: 'default'` placeholder does not; a missing translation writes the authored text and the run completes; a bare string is written verbatim, and CONTROL: the marked field beside it is translated; a settings read that throws fails the node and writes nothing; an unregistered Localization setting (`SETTINGS_UNKNOWN_NAMESPACE` / `SETTINGS_UNKNOWN_KEY`) writes the app default and the run completes, and CONTROL: any other settings failure (`SETTINGS_STORE_UNAVAILABLE`) still fails the node; CONTROL: a write that marks no text never reads the language; a single-brace token is refused at `registerFlow` as field text. - `packages/qa/dogfood/test/flow-record-text-org-locale.dogfood.test.ts` (new, 3): a real boot with `i18n.defaultLocale: 'zh-CN'` and the record-change trigger. A system insert's run writes the zh-CN pick, the untranslated mark as authored and the bare string verbatim; a REST trigger started with `Accept-Language: en-US` still writes zh-CN (CONTROL: an en-US entry exists); after `settings.set('localization', 'locale', 'ja-JP')` the next run writes the ja-JP pick. - Spec: `record-field-text.test.ts` (new); `flow-text-slot-template.test.ts`, `flows-translation-face.test.ts` extended. Core: `organization-locale.test.ts` (new). Lint: `validate-translation-references.test.ts` extended. CLI: `test/i18n-flow-record-text-coverage.test.ts` (new: walker key, coverage gate, extract skeleton). - Studio: `ui/packages/app-shell/src/views/metadata-admin/inspectors/flow-value-envelope.test.ts` (extended: the record-field judge, parity with `CreateRecordConfigSchema` / `UpdateRecordConfigSchema`, CONTROL that other maps still refuse a text envelope) and `flowValueSlots-12101.test.tsx` (extended: the hole-mode pin learns `envelopeOnly` with a CONTROL; #34445's acceptance, a text envelope shows no refusal and CONTROL a single-brace source is still refused, for both node types). - Fixture triage (the deleted branch is "a template envelope in `fields` is malformed"): three rows that pinned it are retargeted, not respelled. `crud-fields-value-envelope.test.ts` and `validate-expressions.fields-value-slot.test.ts` now pin a `cron` dialect as the malformed envelope, and `builtin-node-config.test.ts` pins the single-brace template at `fields.total.source`. The lint file gains a located "field text" refusal with a `{{ }}` CONTROL. <details><summary>Ablation of the translate call (one-off, not committed; run by area o1-C before the hand-over)</summary> `node scripts/ablation-replace.mjs --file packages/services/service-automation/src/builtin/crud-nodes.ts --anchor "const text = flowName === undefined" --replacement "const text = true || flowName === undefined" -- ...` (the test imports the executor from `src`, so no dist leg). Leg 0 at 485d1c7: 18/18 passed. Mutation landed (anchor 1 → 0, blob 58d9e36 → 72bf866b): **10 failed | 8 passed** — every translation pin and both translation CONTROLs red, for both node types; the 8 that stay green are the ones that never read a translation (missing translation, settings failure, no-text CONTROL, registration refusal). Restored: blob == HEAD, `git diff HEAD` empty; 18/18 passed. </details> <details><summary>Package suites</summary> This thread reran every suite after merging origin/main (at `920f54c4`, a full build first, each run under the verify lock; the only later commit, `b585364d`, edits the changeset's `Skills-docs:` line): - `pnpm --filter @objectstack/spec check:generated`: exit 0. - `typecheck` exit 0 for spec, core, runtime, service-automation, lint, cli. - core 150 files / 3600 passed; service-automation 286 files / 4070 passed; lint 212 files / 9072 passed; runtime 609 files / 11218 passed, 19 skipped; cli `--project unit` 425 files / 6032 passed; spec 846 files / 27066 passed, 1 todo. - `packages/qa/dogfood` `test/flow-record-text-org-locale.dogfood.test.ts`: 1 file, 3 passed. Readings before the hand-over (area o1-C, at `485d1c7c` / `c881dac1`) are in the report on #34062. </details> ## Acceptance notes - **Unreadable setting fails the node (maintainer ruling A 「A 这一步失败,不写入」, record 6929082704, an addition to ruling 6913660232).** When the Localization setting cannot be READ (the settings service throws), the node fails and writes nothing, instead of writing the authored text. Parameter 5 covers a missing translation, which is the ruled no-fail case; an unreadable setting means the organization's language cannot be known, and writing the authored text would silently store the wrong language while the run reports success. The shared reader propagates the throw for the reason the seed loader already does. A `fault` edge routes it. Writing the authored text with a warning instead is a one-line change in `resolveFieldValues`. A host that registers no `localization` setting (`SETTINGS_UNKNOWN_NAMESPACE` / `SETTINGS_UNKNOWN_KEY`) has none set, and the app default answers (review 6924979595 S1, pinned). - An empty render (every hole empty) writes `null`, as other text slots render nothing. - Organization = `AutomationContext.tenantId`; a run with none asks the settings service with no scope (its own reach), as the seed loader does. - File surface beyond the claim: `packages/core/**` (the one shared reader: `seed-locale.ts` lives in runtime, which service-automation cannot import) and `packages/lint/src/{i18n-walk,validate-translation-references,lint-flow-patterns}.ts` (where `os i18n extract`, the coverage check and `objectstack validate` actually walk; the CLI utils re-export them). `content/docs/ui/translations.mdx` gains one row. - `dropped-refinements.baseline.json` grows by 9 sites in two families already in the ledger: `automation/FlowRecordFieldValue`'s root (the `celValueSlotSchema` `superRefine`, as at `automation/FlowValueSlot`'s root) and `flows.records.fields.valueType` under the eight schemas the census reaches (the ninth, `api/InstalledPackageAtEitherStage`, holds the same leaf past the census's `MAX_DEPTH` of 14 hops, so it has no row; PR comment 6924993336) (the `flowTextSlotTranslation()` leaf, as at `flows.notices.message` and `flows.refusals.message`). `refinement-projection.ts` has no arm for either judge, and adding one is a public-contract decision outside this card. Accounting: PR comment 6924875958. ## Verification Local gates: the `dispatch-gates.mjs --commands` list derived at `920f54c4` (125 commands), each run with its exit code recorded; the changeset gates and the teardown self-test were rerun on the final head `b585364d`. `--ran` reconciliation: 125 derived, 125 run, 0 NOT-MEASURED. 124 exit 0. One red, not from this diff: `pnpm check:platform-checklist` exit 1, `approvals.approver-resolution-matrix: VARIANTS STALE` (`ApproverType` has 11 members on main since the `platform_admin` approver landed, the item still expects 10); this branch does not touch `approval.zod.ts` or `docs/qa/platform-checklist/`, so the same tree on main reds the same way (read, not run on main). `check-plugin-teardown-shape --self-test` first answered exit 3 for the shallow clone; after fetching its control commit it answers exit 0. Every family the PR's CI runs is read from its check-runs, not rerun here. `test:repo` is left to CI (`Test Core`). Full dogfood battery: not run. The title has no `!` and the `Clause-②` arm is `(widening)`, so os-dev.md does not require it; the new dogfood file was run on its own. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5oC2FdKXYRD1jEVYJP)_ <!-- signed: repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3bf9c5c commit 0e2e4f5

45 files changed

Lines changed: 1809 additions & 62 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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.

‎content/docs/automation/flows.mdx‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,48 @@ check.
567567

568568
[#22110]: https://github.com/objectstack-ai/objectstack/issues/22110
569569

570+
### Text a record keeps — a field value marked as text
571+
572+
A `create_record` / `update_record` field value is a literal or a CEL value
573+
envelope, and a literal string is written exactly as spelled. A field that
574+
stores a **sentence people read** — an escalation reason, a status note — is
575+
marked as text instead, with the text envelope `{ dialect: 'template', source }`.
576+
Only the `fields` map of these two nodes takes it; every other value slot
577+
refuses it.
578+
579+
```typescript
580+
{
581+
id: 'set_reason', type: 'update_record', label: 'Set reason',
582+
config: {
583+
objectName: 'crm_case',
584+
filter: { id: { dialect: 'cel', source: 'record.id' } },
585+
fields: {
586+
escalation_reason: { dialect: 'template', source: 'Auto-escalated: {{ record.priority }} priority' },
587+
status: 'escalated', // a literal: written as spelled, never translated
588+
},
589+
},
590+
}
591+
```
592+
593+
- `source` is a text slot like the ones above: `{{ }}` holes over the flow's
594+
variables, and a single-brace `{…}` token is refused with its `{{ }}` spelling.
595+
- The text is written in the **organization's** language, because everyone in
596+
the organization reads the record: the Localization setting
597+
(`localization.locale`) when somebody set it, else the app's declared
598+
`i18n.defaultLocale`. It is never the language of the person who started the
599+
run — a button-started run writes the same text a record-change run does.
600+
- The translated template is picked first, then its holes are filled. Its key is
601+
`flows.<flow>.records.<node_id>.fields.<field>`; `os i18n extract` scaffolds
602+
it and `os lint` reports it missing against `supportedLocales`, like every
603+
other `flows.*` key.
604+
- A missing translation, or no language to pick, writes the authored text and
605+
the run goes on. A Localization setting that cannot be **read** fails the
606+
node and writes nothing: the organization's choice may exist, and writing
607+
another language over it would look like success. A `fault` edge routes it.
608+
- The text is picked once, when it is written. Records written before a
609+
translation existed keep what they hold, and changing the Localization setting
610+
does not rewrite them.
611+
570612
**Create Record:**
571613

572614
```typescript

‎content/docs/references/automation/builtin-node-config.mdx‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ Deliberately absent:
104104
## TypeScript Usage
105105

106106
```typescript
107-
import { AssignmentConfigSchema, AssignmentExpressionValueSchema, AssignmentValueSchema, CreateRecordConfigSchema, DeleteRecordConfigSchema, EndConfigSchema, FlowCollectionSlotSchema, FlowValueSlotSchema, GetRecordConfigSchema, MapConfigSchema, SaveNoticeConfigSchema, ScreenConfigSchema, ScreenFieldConfigSchema, UpdateRecordConfigSchema } from '@objectstack/spec/automation';
108-
import type { AssignmentConfig, AssignmentExpressionValue, AssignmentValue, CreateRecordConfig, DeleteRecordConfig, EndConfig, FlowCollectionSlot, FlowValueSlot, GetRecordConfig, MapConfig, SaveNoticeConfig, ScreenConfig, ScreenFieldConfig, UpdateRecordConfig } from '@objectstack/spec/automation';
107+
import { AssignmentConfigSchema, AssignmentExpressionValueSchema, AssignmentValueSchema, CreateRecordConfigSchema, DeleteRecordConfigSchema, EndConfigSchema, FlowCollectionSlotSchema, FlowRecordFieldValueSchema, FlowValueSlotSchema, GetRecordConfigSchema, MapConfigSchema, SaveNoticeConfigSchema, ScreenConfigSchema, ScreenFieldConfigSchema, UpdateRecordConfigSchema } from '@objectstack/spec/automation';
108+
import type { AssignmentConfig, AssignmentExpressionValue, AssignmentValue, CreateRecordConfig, DeleteRecordConfig, EndConfig, FlowCollectionSlot, FlowRecordFieldValue, FlowValueSlot, GetRecordConfig, MapConfig, SaveNoticeConfig, ScreenConfig, ScreenFieldConfig, UpdateRecordConfig } from '@objectstack/spec/automation';
109109

110110
// Validate data
111111
const result = AssignmentConfigSchema.parse(data);
@@ -154,7 +154,7 @@ Value the variable takes: a CEL value envelope `{ dialect: 'cel', source }` eval
154154
| Property | Type | Required | Description |
155155
| :--- | :--- | :--- | :--- |
156156
| **objectName** | `string` | ✅ | Object to insert into |
157-
| **fields** | `Record<string, any>` | optional | Field values to write on the new record: each key is a field name, each value a CEL value envelope or a literal |
157+
| **fields** | `Record<string, any>` | optional | Field values to write on the new record: each key is a field name, each value a CEL value envelope, a text envelope (a sentence written in the organization's language) or a literal |
158158
| **outputVariable** | `string` | optional | Flow variable bound to the created record — a name without a leading `$` (the `$` names are the flow engine's own), read as `{{ name }}` |
159159

160160

@@ -215,6 +215,13 @@ CEL value envelope `{ dialect: 'cel', source }` — evaluated by the expression
215215
---
216216

217217

218+
---
219+
220+
## FlowRecordFieldValue
221+
222+
A field value: a CEL value envelope `{ dialect: 'cel', source }` evaluated to the value written, a text envelope `{ dialect: 'template', source }` — a sentence for people to read, written in the organization's language (its translation picked at `flows.<flow>.records.<node_id>.fields.<field>`, then its `{{ }}` holes filled; the authored text when none is held) — or a literal written as it is (a bare string is never translated; a `{…}` template token in it is refused)
223+
224+
218225
---
219226

220227
## FlowValueSlot
@@ -340,7 +347,7 @@ A value: a CEL value envelope `{ dialect: 'cel', source }` evaluated by the expr
340347
| :--- | :--- | :--- | :--- |
341348
| **objectName** | `string` | ✅ | Object to update |
342349
| **filter** | `Record<string, any>` | optional | Field/value pairs identifying the record(s) to update: each operand — a field's value, an operator's comparand (`{"$ne": null}`), a list comparand's element — is a CEL value envelope `{ dialect: 'cel', source }` evaluated before the query (one that evaluates to null refuses the node), a query placeholder such as `{current_user_id}` or `{today}` the query engine resolves, or a literal; a flow `{…}` template token is refused |
343-
| **fields** | `Record<string, any>` | optional | Field values to write: each key is a field name, each value a CEL value envelope or a literal |
350+
| **fields** | `Record<string, any>` | optional | Field values to write: each key is a field name, each value a CEL value envelope, a text envelope (a sentence written in the organization's language) or a literal |
344351
| **multi** | `boolean` | optional | Declare bulk intent: update every row the filter matches (default false — a predicate update without it is refused by the engine) |
345352

346353

‎content/docs/references/index.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Protocol reference — every schema by module
33
navTitle: Protocol Reference
4-
description: Every schema published by @objectstack/spec — 1664 schemas across 14 protocol modules
4+
description: Every schema published by @objectstack/spec — 1665 schemas across 14 protocol modules
55
---
66

77
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
@@ -22,7 +22,7 @@ counts are sums of the rows they head. Regenerate with
2222
| :--- | ---: | ---: | :--- |
2323
| [AI Protocol](/docs/references/ai) | 14 | 81 | Agents, tools, skills, RAG and knowledge sources, model registry, conversations. |
2424
| [API Protocol](/docs/references/api) | 36 | 494 | REST contracts, endpoints, routing, realtime, batch, discovery. |
25-
| [Automation Protocol](/docs/references/automation) | 16 | 81 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
25+
| [Automation Protocol](/docs/references/automation) | 16 | 82 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
2626
| [Data Protocol](/docs/references/data) | 35 | 187 | Objects, fields, queries, filters, datasources and drivers — the ObjectQL layer. |
2727
| [Identity Protocol](/docs/references/identity) | 5 | 27 | Users and accounts, organizations, positions, SCIM provisioning. |
2828
| [Integration Protocol](/docs/references/integration) | 1 | 23 | The single connector protocol (ADR-0097) — catalog descriptors and provider-bound instances. |
@@ -34,7 +34,7 @@ counts are sums of the rows they head. Regenerate with
3434
| [Studio Protocol](/docs/references/studio) | 3 | 35 | Studio designer metadata — the authoring surfaces for the protocols above. |
3535
| [System Protocol](/docs/references/system) | 40 | 297 | The runtime environment — logging, jobs, cache, metrics, notifications, i18n and compliance. |
3636
| [UI Protocol](/docs/references/ui) | 16 | 176 | Apps, pages, views, dashboards, reports, actions and themes — the ObjectUI layer. |
37-
| **Total** | **218** | **1664** | 14 protocol modules |
37+
| **Total** | **218** | **1665** | 14 protocol modules |
3838

3939
---
4040

@@ -112,7 +112,7 @@ REST contracts, endpoints, routing, realtime, batch, discovery.
112112

113113
## Automation Protocol
114114

115-
**Source:** `packages/spec/src/automation/` · **Import:** `@objectstack/spec/automation` · **16 pages, 81 schemas**
115+
**Source:** `packages/spec/src/automation/` · **Import:** `@objectstack/spec/automation` · **16 pages, 82 schemas**
116116

117117
Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records.
118118

@@ -123,7 +123,7 @@ Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execu
123123
| [`approval.zod.ts`](/docs/references/automation/approval) | `ApprovalDecision`, `ApprovalEscalation`, `ApprovalNodeApprover`, `ApprovalNodeConfig`, `ApproverType`, `DecisionOutputDef` |
124124
| [`assignment-rule.zod.ts`](/docs/references/automation/assignment-rule) | `AssignmentRule`, `AssignmentRuleEntry`, `AssignmentStrategy`, `AssignmentTarget` |
125125
| [`bpmn-interop.zod.ts`](/docs/references/automation/bpmn-interop) | `BpmnDiagnostic`, `BpmnElementMapping`, `BpmnExportOptions`, `BpmnImportOptions`, `BpmnInteropResult`, `BpmnUnmappedStrategy`, `BpmnVersion` |
126-
| [`builtin-node-config.zod.ts`](/docs/references/automation/builtin-node-config) | `AssignmentConfig`, `AssignmentExpressionValue`, `AssignmentValue`, `CreateRecordConfig`, `DeleteRecordConfig`, `EndConfig`, `FlowCollectionSlot`, `FlowValueSlot`, `GetRecordConfig`, `MapConfig`, `SaveNoticeConfig`, `ScreenConfig`, `ScreenFieldConfig`, `UpdateRecordConfig` |
126+
| [`builtin-node-config.zod.ts`](/docs/references/automation/builtin-node-config) | `AssignmentConfig`, `AssignmentExpressionValue`, `AssignmentValue`, `CreateRecordConfig`, `DeleteRecordConfig`, `EndConfig`, `FlowCollectionSlot`, `FlowRecordFieldValue`, `FlowValueSlot`, `GetRecordConfig`, `MapConfig`, `SaveNoticeConfig`, `ScreenConfig`, `ScreenFieldConfig`, `UpdateRecordConfig` |
127127
| [`control-flow.zod.ts`](/docs/references/automation/control-flow) | `FlowRegion`, `LoopConfig`, `ParallelBranch`, `ParallelConfig`, `RetryPolicy`, `TryCatchConfig`, `TryCatchErrorValue` |
128128
| [`execution.zod.ts`](/docs/references/automation/execution) | `Checkpoint`, `ConcurrencyPolicy`, `ExecutionError`, `ExecutionErrorSeverity`, `ExecutionLog`, `ExecutionStatus`, `ExecutionStepLog`, `ExecutionStepMetrics`, `ExecutionStepSkipReason`, `FlowRunGateSummary`, `FlowRunNodeSummary`, `FlowRunSummary` |
129129
| [`flow.zod.ts`](/docs/references/automation/flow) | `Flow`, `FlowEdge`, `FlowNode`, `FlowNodeAction`, `FlowVariable`, `FlowVersionHistory` |

‎content/docs/references/system/translation.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ Translation data for a single object
292292
| **refusals** | `Record<string, { message?: string }>` | optional | Refusal translations keyed by the node id (`FlowNode.id`) of an `end` node declaring `outcome: 'refused'` |
293293
| **approvals** | `Record<string, { label?: string }>` | optional | Approval-step translations keyed by the node id (`FlowNode.id`) of an `approval` node |
294294
| **notices** | `Record<string, { message?: string }>` | optional | Save-notice translations keyed by the node id (`FlowNode.id`) of a `save_notice` node |
295+
| **records** | `Record<string, { fields?: Record<string, string> }>` | optional | Record-write text translations keyed by the node id (`FlowNode.id`) of a `create_record` / `update_record` node |
295296

296297
### Nested Shape: `PlatformTranslationData.hooks[string]`
297298

@@ -470,6 +471,7 @@ Translation data for a single object
470471
| **refusals** | `Record<string, { message?: string }>` | optional | Refusal translations keyed by the node id (`FlowNode.id`) of an `end` node declaring `outcome: 'refused'` |
471472
| **approvals** | `Record<string, { label?: string }>` | optional | Approval-step translations keyed by the node id (`FlowNode.id`) of an `approval` node |
472473
| **notices** | `Record<string, { message?: string }>` | optional | Save-notice translations keyed by the node id (`FlowNode.id`) of a `save_notice` node |
474+
| **records** | `Record<string, { fields?: Record<string, string> }>` | optional | Record-write text translations keyed by the node id (`FlowNode.id`) of a `create_record` / `update_record` node |
473475

474476
### Nested Shape: `ServedTranslationData.hooks[string]`
475477

@@ -711,6 +713,7 @@ Translation data for a single object
711713
| **refusals** | `Record<string, { message?: string }>` | optional | Refusal translations keyed by the node id (`FlowNode.id`) of an `end` node declaring `outcome: 'refused'` |
712714
| **approvals** | `Record<string, { label?: string }>` | optional | Approval-step translations keyed by the node id (`FlowNode.id`) of an `approval` node |
713715
| **notices** | `Record<string, { message?: string }>` | optional | Save-notice translations keyed by the node id (`FlowNode.id`) of a `save_notice` node |
716+
| **records** | `Record<string, { fields?: Record<string, string> }>` | optional | Record-write text translations keyed by the node id (`FlowNode.id`) of a `create_record` / `update_record` node |
714717

715718
### Nested Shape: `TranslationData.hooks[string]`
716719

@@ -921,6 +924,7 @@ Translation data for a single object
921924
| **refusals** | `Record<string, { message?: string }>` | optional | Refusal translations keyed by the node id (`FlowNode.id`) of an `end` node declaring `outcome: 'refused'` |
922925
| **approvals** | `Record<string, { label?: string }>` | optional | Approval-step translations keyed by the node id (`FlowNode.id`) of an `approval` node |
923926
| **notices** | `Record<string, { message?: string }>` | optional | Save-notice translations keyed by the node id (`FlowNode.id`) of a `save_notice` node |
927+
| **records** | `Record<string, { fields?: Record<string, string> }>` | optional | Record-write text translations keyed by the node id (`FlowNode.id`) of a `create_record` / `update_record` node |
924928

925929
### Nested Shape: `TranslationItem.hooks[string]`
926930

‎content/docs/ui/translations.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default defineStack({
9090
| Page tab labels (`page:tabs` items) | `pages.<name>.components.<tabsId>.items.<value>.label` — keyed by the tabs component's `id` and the item's `value`; an item without a `value` has no key (localize it with an inline locale map), and `page:accordion` panels have none |
9191
| A page `object-form`'s thank-you panel | `pages.<name>.components.<formId>.submitBehavior.title` / `.message` — keyed by the `object-form` component's `id` (a form without an `id` has no key), by the same rules as a form view's panel |
9292
| Screen-flow wizards (flow label, screen headings and body text, screen field copy) | `flows.<flow>.label` / `flows.<flow>.screens.<node_id>.title` / `.description` / `.fields.<field>.label` / `.placeholder` / `.inlineHelpText` — a screen field's help text is `inlineHelpText`, the key the field itself declares, not `help`; see the boundary note below |
93+
| Text a flow writes into a record (a `create_record` / `update_record` field value marked `{ dialect: 'template', source }`) | `flows.<flow>.records.<node_id>.fields.<field>` — picked in the organization's language (the Localization setting when set, else the app's `i18n.defaultLocale`), never the run starter's; see [Flows](/docs/automation/flows#text-a-record-keeps--a-field-value-marked-as-text) |
9394
| Hook refusal messages | `hooks.<hook>.refusals.<CODE>.message` — one per entry of the hook's `refusals` catalogue — and `hooks.<hook>.refusals.<CODE>.reasons.<REASON>.message`, one per reason an entry declares. A hook (a `js` body or a TypeScript `handler`) refuses by code, optionally with a declared reason, and the server answers the refusal with this sentence in the caller's locale, else the declared one. A translation of an entry that declares `params` keeps its `{{ name }}` holes; the server fills them after picking the translation |
9495
| Position label / description | `positions.<name>.label` / `description` — keyed by the position's `name`; overlaid on every served position, which is the list the console's position picker draws |
9596
| Permission-set label / description | `permissions.<name>.label` / `description` — the group is spelled as the stack spells the collection (`permissions[]`), keyed by the set's `name` |

‎docs/audits/2026-07-unknown-key-strictness-ledger.counts/system.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ hand-patch a number here** — fix the code or the verdict and regenerate.
1919

2020
| Dir | Sites |
2121
|---|---|
22-
| `system/` | 403 |
22+
| `system/` | 404 |

0 commit comments

Comments
 (0)