Skip to content

Commit cb63704

Browse files
committed
Merge origin/main into claude/project-thread-ca331k
type-alias-convention pin: main moved 859 -> 861 (#34982, DatasetNextStepDecision + DatasetNextStepSchema); TimesheetConfigSchema becomes 861 -> 862. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgTk2cRpVHpSVk9tzF
2 parents eb6f5e2 + 367e324 commit cb63704

97 files changed

Lines changed: 3280 additions & 231 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: 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 query skill says where a zoned date bucket is computed
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-query's `rules/aggregation.md` no longer says a date bucket under a non-UTC `timezone` always keeps the whole aggregate call in memory. A driver that declares `supports.zonedDateBucketing` (PostgreSQL via `driver-sql`) buckets the date in the database when the zone resolves to an area/location (`Asia/Taipei`); on every other driver, and for a zone that resolves to none (`+08:00`, `EST5EDT`), the whole call still runs in memory. One eval case covers the sentence.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/formula': patch
3+
---
4+
5+
perf(formula): the expression type checks build each typed check environment once per input, not once per call
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The type checks behind the authoring rules (`firstTypeMismatch`, `firstDateTextVerdict` and `firstDateTextCall`) built a new typed CEL environment on every call. Each build clones cel-js's registry and registers the whole stdlib again. The runtime authoring gate runs these checks over every expression in the stack each time a metadata item is published, so the cost grows with the size of the stack, not with the size of the item.
11+
12+
Measured on the showcase: one object publish built 903 environments for 97 distinct inputs. That was about 0.5 s of the publish request on an idle machine. The publish request now takes about 1.0 to 1.3 s on an idle machine, down from 1.6 to 1.8 s.
13+
14+
The environments are now kept per input (scope, date typing and field types), up to 512, least recently used first. The checks only parse and type-check against these environments, so a shared one gives the same verdicts as a fresh one. Nothing changes in what the checks report.
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/i18n': patch
4+
'@object-ui/console': patch
5+
---
6+
7+
feat(studio): flow node and list-view panels lead with labels, node delete moves to the header menu, navigation kinds read in words
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
Studio's Automations and Interfaces panels name things the way the author named them and keep machine names out of the way:
13+
14+
- **Flow node panel.** The first field is the node's Label. The node id moves into a "Developer info" section that starts collapsed. "Remove node" moves from the full-width footer button into the header's "···" menu; in Studio that menu sits in the automation panel's title bar. The removal itself is unchanged: neither the menu item nor the canvas Delete key asks to confirm, and both still refuse while a boundary event or an expression names the node.
15+
- **Objects by label.** In the node panel, the sentences that name an object ("Targets the … record that started this flow", "Fields of …") use the object's label. The object picker shows the label and keeps the machine name on its hover title.
16+
- **"Formula", not "CEL expression".** The node panel's value toggle, its placeholders and the blank-formula notice and the zh help rows of the trigger, Decision, record, loop, map, HTTP, action, screen, subflow and notify nodes say 公式 / "formula". The Update Records filter help no longer names `recordId`. The zh panel also gains the Update Records "update every matching record" row, which used to show in English.
17+
- **New automation dialog.** The first field is "Automation name" (自动化名称), matching the dialog title and the Automations list.
18+
- **List-view panel.** No `object.view` machine name under the title. The not-yet-created notice is one sentence: "Changes save as a draft first." Column rows show the field label, with the field name on hover. The Setup designers' column rows are unchanged.
19+
- **Navigation edit mode.** Each entry's kind badge reads the kind the navigation list shows (对象 / 视图 / 仪表盘 / 页面 …). An object entry that opens a named view, such as a kanban, reads 视图. The Setup designer keeps the raw type.
20+
21+
`@object-ui/i18n`: two new `studio` namespace keys (`engine.inspector.flowNode.moreActions`, `engine.inspector.flowNode.developerInfo`). Some existing `studio` values are reworded in en and zh.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
fix(mcp): the `describe_object` tool description says whose words a field `description` carries
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The tool description used to promise each field's `description` "where written", next to an object description "where the author wrote one", so a client read every field description as the app author's text. Most of them are not: on the CRM example no field declares a description, and every field description `describe_object` returns (8 on each of its 6 objects) belongs to a column the platform adds to the object (`organization_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `owner_id`, `owning_business_unit_id`, `queue`), each answered with `system: true`. The sentence now reads "description (where set: the author's, or the platform's on a column it injects)". The answer itself does not change: same keys, same values, on both transports. The object-level clause stays as it was, because an object's description is always the one its author wrote.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): a live turn that throws is recorded and replays as the same failure, and a skill file spelled otherwise than `SKILL.md` is refused by name
6+
7+
Clause-②: yes (widening: published @objectstack/scenarios ./runner types ThrownTurn, RecordedTurn and RecordedThrowError, plus one optional field on Recording.turns)
8+
Metadata-protocol: none
9+
10+
- **A thrown turn is recorded.** When a live question, dataset question, operation, confirmation or authoring turn threw, the recording held nothing for it, so a replay met a missing turn. A dataset question or a confirmation turn reads a missing turn as not measured, so a row that showed 4/5 live could show 4/4 on replay. The recording now holds such a turn as an empty turn with `thrown: { name, message }`, and the live error is still thrown exactly as before. A replay throws an error with the same name and message again, writes no recorded file and re-sends no write, so the runner counts it exactly as it counted the live throw. A recording made before this change has no such turns and replays exactly as it did. A throw that is itself a replay's verdict (a missing or unfaithful recorded turn, when a replay is recorded) is still left unrecorded.
11+
- **`--ask-skills` matches the skill file by its exact spelling.** The runner checked for `SKILL.md` with `existsSync`, which a case-insensitive filesystem answers true for `skill.md`. The run then crashed with `Cannot read properties of undefined (reading 'toString')`, and on a case-sensitive filesystem the skill was skipped without a word. The directory listing now decides. A skill directory whose file is spelled `skill.md`, `Skill.md` or any other case of `SKILL.md` is refused before any turn runs, with a sentence that names the file found and says to rename it to `SKILL.md`. This happens on every filesystem.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/core': patch
3+
'@object-ui/plugin-dashboard': patch
4+
'@object-ui/plugin-report': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
fix(dashboard): a drill on a dimension across a relationship lists its records, and a failed drill says so in the viewer's language
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
A dataset dimension can read a field of a related object (`crm_account.owner_id`). Clicking such a bucket in a dashboard widget or a report built a drill filter on the dotted path itself, which the data API refuses with `INVALID_FIELD` / 400, and the drill drawer then printed that English developer message to the viewer.
14+
15+
- **The drill resolves the relationship first.** `resolveDatasetDrillFilter` (`@object-ui/core`) reads the related object's ids matching the clicked value through the surface's own data source, as the viewer, and filters the base object on the relationship field: `{ crm_account: { $in: [...] } }`. A path of up to three hops (ADR-0071's limit) is read innermost first, one read per hop, and dimensions that share a hop are read together. A bucket with no relationship path drills exactly as before, with nothing extra read.
16+
- **No drill rather than a wrong list.** A path past three hops offers no drill. A relationship the object does not declare as a single-valued lookup, the empty bucket of a relationship dimension, and more than 200 related records at a hop open the drawer on a localized notice instead of a list. The id list is never truncated. A report emits no drill in those cases and logs why.
17+
- **The drawer speaks to the viewer.** When the drawer's list read fails, it shows a localized sentence (`dashboard.drillFailed`) instead of the server's message. New keys `dashboard.drillTooMany`, `dashboard.drillUnavailable` and `dashboard.drillFailed` are in every built-in locale.
18+
- `buildDatasetDrillFilter` now refuses a relationship-path dimension with a `FilterOperatorError` instead of writing a dotted key, and takes the resolved conditions as an optional sixth argument.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(auth): the console's Import Users and Add User work on a cloud-managed environment again
6+
7+
Clause-②: yes (widening) — added: `organizationId` in the bodies of `POST /api/v1/auth/admin/add-sso-user`, `/admin/import-sso-users` and `/admin/remove-sso-user`, admitted only when it equals the organization the caller's session is working in. Nothing that was accepted is refused.
8+
Metadata-protocol: none
9+
10+
A `type: 'api'` action forwarded to the auth mount carries the caller's active organization as `body.organizationId`. The three SSO-user doors refused every key outside their own set, so the console's Import Users (`sys_user.import_sso_users`) and Add User (`sys_user.add_sso_user`) always answered `400 INVALID_REQUEST` "Unknown field(s): organizationId".
11+
12+
Each door now admits that one key under a constraint:
13+
14+
- absent: unchanged;
15+
- equal to the session's active organization: admitted, and ignored. The organization a person joins is still read from the session, never from the body;
16+
- a different organization: `400 INVALID_REQUEST`, naming the organization sent and the one the session holds;
17+
- a value that is not a non-empty string: `400 INVALID_REQUEST`, saying the key must be the id of the organization you are working in. This is checked before the session is read, so it is the answer whether or not the session has an organization;
18+
- a string organization sent by a caller whose session works in no organization: `400 NO_ACTIVE_ORGANIZATION`, naming the organization sent.
19+
20+
On every refusal nothing is read or written and the host is not told.
21+
22+
The stamp itself (`buildApiActionRequest` in `@objectstack/runtime`) is unchanged: every identity-route forward still carries it.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): the dataset tools' output declares `nextStep` on `list_datasets` and `sourceLine` on `query_dataset` (ADR-0149 M1)
6+
7+
Clause-②: yes (widening: two optional output members on published schemas)
8+
Metadata-protocol: added
9+
Skills-docs: follow-up owed — skills/objectstack-ask/SKILL.md (follows `nextStep` and cites `sourceLine` once the executor fills them)
10+
11+
`ListDatasetsOutputSchema` (`@objectstack/spec/ai`) gains one optional member, `nextStep`, with its schema `DatasetNextStepSchema` (type `DatasetNextStep`) and the closed enum `DatasetNextStepDecision`. `QueryDatasetOutputSchema` gains one optional member, `sourceLine`. Nothing is removed or renamed, and an answer without either member parses as it did.
12+
13+
- **`nextStep`: what it is.** The platform's reading of the caller's `terms` under the ADR-0149 D3 selection rule, as three members: `decision`, `terms` and `note`.
14+
- **`decision` is a closed enum of four cases.** `one_measure` (the term equals exactly one measure), `several_measures` (it equals more than one, in one dataset or in several), `candidates_only` (it matched no member and has entries in `candidates`), `no_measure` (it equals no measure and has no candidate). A dimension the term equals is not counted: the rule selects a measure. Any other value does not parse. The values name what the platform found, not what a reader then does.
15+
- **`terms` is the reference to the members, and there is one list of candidates.** `nextStep` holds no member list. It names the caller's terms the decision is about, and the members are read under those terms from the same answer: a dataset's `matches` for `one_measure` and `several_measures`, `candidates` for `candidates_only`. No `{ dataset, member }` pointer is declared twice.
16+
- **`note` and `sourceLine` are string slots.** `note` is the decision in words; `sourceLine` is a `query_dataset` answer's source as one finished line, the same source `provenance` carries as structure. Each is a non-empty string, and the spec declares no wording for either: the text is the executor's (ADR-0149 M1).
17+
- **`sourceLine` is the tool's member only.** It is declared on `QueryDatasetOutputSchema`; `AnalyticsResultResponseSchema`, the REST door's answer, is not changed.
18+
- **When they are present.** Both are optional. `nextStep` is present only when `terms` were sent. No `sourceLine` is the key's absence: an empty string does not parse.
19+
- **Who fills them.** This change declares the shapes only, and each tool's `outputSchema` (`getDatasetToolJsonSchemas()`) lists its member from it. Filling them is the dataset tools' executor's change in `@objectstack/service-analytics`, which ships under its own entry; an answer carries `nextStep` or `sourceLine` only from a release that has both.
20+
21+
ADR-0149 M1 gains an add-only amendment note recording the ruling: M1 is unchanged, the spec gains two string slots and one closed enum and no sentence, and the two sentences are written by the executor.
22+
23+
Level: `minor` for `@objectstack/spec`, the level `Metadata-protocol: added` takes. The `authorable-surface/ai.json` baseline records the new keys: `ai/ListDatasetsOutput:nextStep`, the three `ai/DatasetNextStep` members and `ai/QueryDatasetOutput:sourceLine`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a flow node whose type no installed plugin provides now follows its `fault` edge
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A flow can name a node type that no installed plugin provides, for example an `approval` node on a deployment without `@objectstack/plugin-approvals`. Running that node fails with `NO_EXECUTOR` ("No executor registered for node type 'approval'"). Until now that failure skipped the node's `fault` edge: the run just failed, nobody was told, and the record that started it stayed where it was. An author could not declare a graceful path for it.
11+
12+
That failure is now handled like any other node failure:
13+
14+
- When the node declares a `fault` edge, the run follows it. The handler reads `{$error.code}` as `NO_EXECUTOR`, with the same message, and `{<nodeId>.error}` holds the message. The run log keeps the node's failed step with code `NO_EXECUTOR`, followed by the handler's steps.
15+
- Inside a `try_catch` region, the catch region's bound error now carries `code: 'NO_EXECUTOR'`.
16+
- With no `fault` edge, nothing changes: the same failed step, the same error text, and the run fails.
17+
18+
The boot warning that names flows referencing node types no installed plugin provides is unchanged. Installing the plugin is still the fix; the `fault` edge is the author's fallback until then.

‎.claude/agents/os-dev.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ model: opus
317317
## 干净收尾 —— 报告是你的终局动作
318318

319319
- 全文 ⛔ 不出现 HTML 注释:sanitizer 落库后吃短尖括号片段,连反引号里的也吃。
320-
- 例外:harness 自写的 PR 正文首行归属注释原样留、只报;`Fixes #<n>` 紧随其后;dev 自写仍禁。
320+
- 例外二:harness 自写 PR 正文首行归属注释原样留、只报,`Fixes #<n>` 紧随;派发令要求才独占
321+
末个非空行写 `<!-- signed: LANE#N · ACCOUNT · SESSION -->`(`PR_BODY_TRAILER_SHAPE`);其余 dev 自写仍禁。
321322
- 凡要上 GitHub 的文本,尖括号形状片段一律改占位词拼写(`FIELD`、`IDENT.MEMBER` 一类)。
322323
- 各派发模式(`mode:subagent`、`mode:cloud`、`mode:thread`)下 GitHub 都是报告的权威源。
323-
- 写完读回那条评论到尾部:只认首行标记保不住正文,sanitizer 可从首个 tag 形片段吃到尾。
324-
- PR 正文同欠一次全文回读,评审读的正是它。
324+
- 评论、PR 正文都读回到尾:只认首行标记保不住正文,sanitizer 可从首个 tag 形片段吃到尾。
325325

326326
1. **后台子进程不得比本轮运行活得久,monitor 不得比它看的东西活得久。**
327327
- monitor 按自己的死线触发,不按对象生命周期:杀掉被看的进程 ⇒ 同一步杀它的 monitor。

0 commit comments

Comments
 (0)