Skip to content

Commit 0074d59

Browse files
Merge branch 'main' into claude/project-thread-1zve7w
2 parents 8280ad4 + 7be32d3 commit 0074d59

92 files changed

Lines changed: 2921 additions & 496 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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/rest': patch
4+
---
5+
6+
fix(metadata-protocol, rest)!: the layered read of a name two packages hold refuses as the plain read does, naming the holders as `details.candidates` (ADR-0150 D3/D5)
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- 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 moved answers are reads of a name two packages hold, which now refuse as the plain read of that name already did: no stored row, layer, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for a reader of the layers, or of the REST published view, of a name two or more served packages register in code, naming no package. Such a name has no one holder (ADR-0150 D3/D5), and the plain read already refused it. Three answers move, measured in both registration orders:
14+
15+
- FROM: on a host that wires no engine for the REST door chain, `GET /meta/:type/:name/layers` (and `?layers=true`) answered 200 with the layers of the holder that registered first. TO: it answers `409 RESOURCE_CONFLICT` naming both holders as `details.candidates`.
16+
- FROM: in process, the protocol's `getMetaItemLayered({ type, name })` with no `packageId` resolved the holder that registered first. TO: it throws `PackageScopedNameRefusedError` (`RESOURCE_CONFLICT`, 409) naming both, as `getMetaItem` does.
17+
- FROM: on a REST host with no `objectQLProvider`, `GET /meta/:type/:name/published` served the name's package-unbound active row (200) when one stands. With no such row, it went on past its overlay read to the published exit: what the host's metadata service `getPublished` answers, or `501 NOT_IMPLEMENTED` when the host resolves no metadata service. TO: it answers `409 RESOURCE_CONFLICT`, without `details.candidates`. The dispatcher's `/published`, where its engine registry is not reachable, swallows the same refusal. With no such row it serves its snapshot as before. With one, it served that row and now serves the code snapshot instead.
18+
19+
**Not moved.** A name one package holds, and every read naming the package (`?package=`, `packageId`), answer as before. On a host whose door chain has an engine, `/layers` already refused 409; it now also names the holders. The save and delete doors do not move.
20+
21+
The fix for a caller: name the package whose layers it means.
22+
23+
`GET /meta/:type/:name/layers` (and the deprecated `?layers=true`) of a name two or more packages hold, read naming no package, now answers like the plain read on every exit and on both transports: `409 RESOURCE_CONFLICT` with the holders as `details.candidates` (`[{ kind: 'package', packageId }, …]`), never one holder's layers.
24+
25+
- A name two served packages register in code: the protocol's layered read (`getMetaItemLayered`) asks the registry's package-scoped resolver before it reads any layer, as `getMetaItem` does, so it throws the same `PackageScopedNameRefusedError` naming both, in process too, whatever the metadata service holds. It used to answer the holder that registered first, and so did the REST door on a host that wires no engine for its door chain. `?package=` still reads each holder's layers; a name one package holds is unchanged.
26+
- The REST `/layers` route's catch carries the candidates of a package-scoped refusal, as the plain read's catch does. Before, it answered the refusal by its sentence alone (the dispatcher already carried them).
27+
- A name whose active rows two packages hold keeps the package-less writes' refusal (its sentence, code, status and `?package=` remedy) and gains the same `details.candidates`. The save and delete doors' answer does not move.
28+
- Stored-row holders beside a disabled package keep their in-process answer: the protocol's layered read still serves its in-process readers there, and the door refuses.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-data` states what `writeRequiresMasterRead` asks when a master is set or emptied, and whose ownership floor binds an on-behalf-of write
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-data's `rules/relationships.md` is more exact about a `controlled_by_parent` detail's two write opt-ins. Under `sharing.controlledByParent.writeRequiresMasterRead`, setting a master on a row and emptying one both ask read (the sentence read as if only emptying did), and both still ask edit under `ownerMayEdit`. On an on-behalf-of update or delete the ownership floor binds for both users, not one. The `ownerMayEdit` bullet now says "every other write, on-behalf-of included, still needs master edit" where it listed the writes, which pays for the added words: the file is the same size. The eval case for the key also fails an answer that writes `ownerMayEdit: true` beside it, in either order, or puts the key on the `master_detail` field.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the data skill teaches the `dynamic` roll-up over a stored home amount
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/rules/field-types.md` § Currency now says how a roll-up of a home-currency amount is drawn as money: a `sum` / `min` / `max` / `avg` `summary` over a child field that a `homeAmount.field` names declares `currencyConfig: { currencyMode: 'dynamic' }` with no `defaultCurrency`, and is then shown in the organization's home currency (`localization.currency`) instead of as a bare number. Metadata never names the home currency (ADR-0144), so the roll-up is never `fixed` with that code; `defineStack` (`os validate`, the build) refuses `dynamic` on any other roll-up, and a `count` carries no `currencyConfig`. One worked example and a matching eval case. To pay for it, two same-file restatements are cut: the `currency` row's list of `currencyConfig` keys (§ Currency spells each) and the Autonumber snippet (the `autonumber` row and the token table carry the same `CASE-{0000}` format). No schema or runtime change.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): `--lang zh|en` and `--prompt short|detailed` choose the prompts the agent is given
6+
7+
Clause-②: yes (widening) — the CLI flags `--lang zh|en` and `--prompt short|detailed` (the `objectstack-scenarios` bin, `cli.ts`); through `./runner`: the new exports `PROMPT_LANGS`, `PromptLang`, `PROMPT_LENGTHS`, `PromptLength`, `PromptChoice`, `MissingLanguageError`, `promptLanguageGaps`, `promptLanguageRefusal`, `statedPromptChoice` and `promptChoiceText` (`prompts.ts`) and `samePromptChoice` (`driver.ts`); a new optional `choice` parameter on `buildPrompt`, `iteratePrompt`, `templateIteratePrompt`, `questionPrompt`, `operationPrompt` (`prompts.ts`) and `runHalf` (`orchestrate.ts`), and on the `RecordingDriver` constructor (`driver.ts`); the new method `RecordedDriver.assertPromptChoice` (`driver.ts`); the new optional fields `RunOptions.promptChoice`, `CardRun.promptChoice` (`orchestrate.ts`), `Recording.promptChoice` (`driver.ts`) and `CardScorecard.promptChoice` (`scorecard.ts`)
8+
Metadata-protocol: none
9+
10+
Until now every card text reached the agent as `en ?? zh`, so a card with both languages was always given in English, and the build turn was always given `prompt.detailed`: the eval measured only the most favourable input, never the Chinese sentence a customer writes.
11+
12+
`--lang zh|en` renders every card-authored text a prompt carries in that language and no other — the build prompt, the iterate change, and each question's and each operation's ask — in scratch, template and ask modes, at every ask of `--ask-repeats`. The runner's own wrapper text (preamble, data contract, naming rule, answer instructions) stays in English. There is no silent fallback: a card lacking one of the texts the run's modes render in the chosen language is skipped before the first card runs, before any scaffold or boot, with a line naming each missing text, and the other cards run. `--prompt short|detailed` picks the card prompt the build turn is given (default `detailed`); the iterate turn is unchanged.
13+
14+
With either flag the run record states the choice (`promptChoice` on the card's run and on the scorecard) and the scorecard prints `prompts: language zh · build prompt short`. A recording made under a choice carries it, and replaying it (`--driver recorded:F`) under another choice is refused before any card runs, naming the flags to replay it with. With neither flag the prompts, the record, the scorecard and the recording are unchanged byte for byte. The grader already reads a Chinese reply (`来源:` lines, Chinese measure words and declines), so a Chinese turn grades as an English one does; no scoring change.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): a position saved active through the metadata save door carries the holders of its renamed names at once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A position saved straight to active through the metadata save door (`PUT /api/v1/meta/position/:name`, the default mode, no draft) now carries the holders of the names it lists in `renamedFrom` before the door answers, as a draft save followed by the per-item publish (`POST /api/v1/meta/position/:name/publish`) already did. Before this fix the active save announced nothing, so the holder carry ran only at the next restart: until then each holder (`sys_user_position.position`) kept the old name, which no position serves any more, and lost that position's access.
11+
12+
The active save of a position now signals the host the way the per-item publish does (`onMetaItemPublished`), awaited, after the save's projector and mutation event. `ObjectQLPlugin` turns that into `metadata:reloaded` with `changed: ['position/NAME']`, which the carry reads. Only the node that took the save announces.
13+
14+
What it does not change:
15+
16+
- Position only. An active save of any other type announces nothing new.
17+
- The per-item publish and `POST /packages/:id/publish-drafts` still announce once each; neither passes through the save door.
18+
- `duplicatePackage` and the unmanaged package import, which save every copied item through the save door, announce nothing per position: what they carry stays as it was, at the next restart.
19+
- The package-commit restore and revert doors do not save through the save door, so they announce nothing new either.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(objectql): a field a dependent package adds through `objectExtensions` is served translated on `/api/v1/meta/object`
7+
8+
`SchemaRegistry.getPackagedObjectBase` (the packaged base that `/meta` translates an object against, and that the save door's translated-echo restore reads) now also carries each field a CODE `extend` contributor adds under a name the owner does not declare, as that extender ships it. A later extender's declaration of the same name replaces an earlier one, as in the fold, and a disabled package's extension adds nothing, as the fold withholds it. Before this change such a field counted as authored after the fact. Every non-default-locale read (`GET /api/v1/meta/object`, `GET /api/v1/meta/object/:name`, the list read, the form routes) then served its `label`, help text and option labels in the source language, even when the extender's own translation pack carried them. These reads now serve the pack's translation for those fields. A Studio save of such a read stores the source text again. Default-locale reads are unchanged.
9+
10+
Unchanged: the object scalars, every field the owner declares (including one an extender redeclares), and an extender's `fieldPatches` all stay the owner's. A patched label or description still keeps its text in every language. Fields added by a tenant overlay or by an extension of tenant provenance (`_provenance: 'org'`), the `.custom` pair's included, still count as authored after the fact. `@objectstack/spec` changes only in doc comments (`TranslateDocumentOptions.packagedBase` and `translateObject`).
11+
12+
Clause-②: no
13+
Metadata-protocol: none
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
---
4+
5+
fix(plugin-audit): an activity row names a record whose `nameField` is a lookup by the target record's title, and a tracked yes/no change reads as words in the reader's language
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
**Lookup `nameField` labels.** An object titled by a lookup or `user` field (a project member with `nameField: 'person'`, a lookup to `sys_user`) was named in its activity rows by the stored foreign key: `Created Project Member "gCX6SR…"` in `record_label` and in every created, updated and deleted sentence, while the record page header showed the person's name. The CRUD mirror now follows such a title field to the target record's own title (ADR-0079's title field of the target), through the same resolver that already titles a referenced record inside a field-change summary: the target's declared API exposure must serve `get`, a credential or `internal` title column is never read, and the read is one `id: { $in }` query per write, projected to the id and the title column. An object titled by any other field pays no read for its label. A multi-value lookup names every title it holds. The label still declares the lookup field as its source, so a reader not served that field is still served the row without it.
11+
12+
The title is read as the writer, not as the system. A writer the security layer refuses the target, or serves the target row without its title column, gets the stored value in the label, as before, and never a title the writer could not have read. An id the target has no row for also keeps the stored value. Rows written before this release keep the label they were written with.
13+
14+
**Yes/no changes.** A tracked `boolean` or `toggle` field change read as the literals `false → true`, beside select changes that already read through their option labels (`Status: New → Converted; Converted: false → true`). The value is now stored in the summary code as a boolean and worded by two new message keys in the plugin's bundles, `messages.activityValueTrue` and `messages.activityValueFalse`, in all eleven platform languages. The stored sentence uses the write locale, and a read with a locale re-composes it in the reader's locale, as the verb templates are (`Converted: No → Yes`, zh-CN `已转化: 否 → 是`). A boolean field that declares its own options keeps reading through them. A fired milestone's sentence is the author's and still interpolates a boolean token as stored.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ model: opus
337337
- ② `blocked`,点名那件只有 PM 能解的事;锁没排到、测试在跑、CI 未出结论都不是第三种。
338338
- 两条合法出路:在轮内同步等它(资源纪律的排队条款:限时获取 ⇒ 无锁工作 ⇒ 再取)。
339339
- 或者收窄这次检查的范围并在报告里申报:已申报的收窄是被接受的偏差,CI 跑满农场。
340-
- PM 复核的是 CI 收敛,不是你本地的覆盖面;未申报的收窄不在此列,那是漏跑。
340+
- PM L1 审核的是 CI 收敛,不是你本地的覆盖面;未申报的收窄不在此列,那是漏跑。
341341
- 唯一同时反轮询又不停轮的形状是一次前台阻塞等待:前台跑完,或 `tail --pid` 等它退出。
342342
- 比回合长的门禁在写报告那一刻读日志(重定向目标);未完成的记 NOT MEASURED 并写原因。
343343
- 自检是机械的,不看你怎么形容这次等待:终消息只能是报告 JSON 或 `blocked` 报告。
@@ -349,7 +349,7 @@ model: opus
349349
- issue 对塑造公开契约的决定欠规格(spec/Zod schema、API 形状、命名、元数据语义)时:不猜。
350350
- 契约形状(Zod 形状、错误码台账、可编写键增删/墓碑、已发布导出)改即报 `needs_decision`。
351351
- spec 散文(jsdoc、`.describe`、`content/docs/**`、再生镜像)只复述裁决区所载裁决 ⇒ 非 fork。
352-
- 同 PR 改,正文点名裁决 id,落地欠契约复审档记录;⛔ 永不自行翻转裁决,与之相左仍停手。
352+
- 同 PR 改,正文点名裁决 id,落地欠达档 L2 记录;⛔ 永不自行翻转裁决,与之相左仍停手。
353353
- 两种读法通向两种架构时同此;⛔ 不写投机代码。
354354
- 返回 `status: "needs_decision"`,每个问题带选项、真实代价与工作量、推荐,写进 `open_questions`。
355355
- 派发词标只读读数 ⇒ 不 commit、不开 PR,`status: "reading"` 贴决策卡;要实测才建闭包跑测。

0 commit comments

Comments
 (0)