Repository navigation
feat(spec, i18n): register the ask agent tool get_record_history and label it in every locale pack - #32668
Conversation
…ocale pack Claude-Session: https://claude.ai/code/session_017xRBcSNTYTx2TpA25geuvV Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 1 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 171 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 86dfdb7fd20c372aebceddf786ccb7a067e7dd99 && git checkout 86dfdb7fd20c372aebceddf786ccb7a067e7dd99
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f770d664b84d1812f2de8f2c5f1b2bc6c2ca54cb f81138926c0c11f7afc2e921105d1d01431485eb && git checkout -B drift-repro f770d664b84d1812f2de8f2c5f1b2bc6c2ca54cb && git merge --no-ff f81138926c0c11f7afc2e921105d1d01431485eb
node scripts/docs-audit/affected-docs.mjs --json f770d664b84d1812f2de8f2c5f1b2bc6c2ca54cb
|
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 Contract reviewServed-tier: Read for this record: card #32623 with all six comments (dev report 6820150398, release 6822991810), the PR body, the 13-file list, the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings: 0 must-fix, 0 should-fix, 2 nit (changeset omits the MCP world-hint effect; jsdoc carries unverifiable cloud behaviour as fact). Nits are accepted deviations or a prose-face edit; neither needs a new head. Implemented-by: VERDICT: PASS |
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 席位核对 · ACCEPT · PR #32668 · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43315260398 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:spec#3 · os-elon-musk · session_016WV4d1T5HEokjRgR6vCBX8 Queue ejection disposition · 2026-11-12T22:21Z — re-enqueue once, head unchanged (
|
…tools (objectstack-ai#38193) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuEKqL1r3otpmPGByaZzap4u)_ Fixes objectstack-ai#34372 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 搭建助手新增的「查看自动化运行记录」工具,现在登记进平台工具名表;技能里写上这个工具名,校验不再把它当成不存在的工具拒掉。 - 替云端搭建助手解决:它要回答「我的自动化跑成功了吗」,靠的就是这个工具。 - 只是多认一个工具名,不改任何已有工具;出问题直接撤回这个改动即可。 - 无。 ## What changes - `packages/spec/src/system/constants/platform-tool-names.ts`: `'list_flow_runs'` joins `PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']` in its alphabetical place (after `get_record_history`, before `list_metadata`), and the group's doc comment names it. `PLATFORM_PROVIDED_TOOL_NAMES` therefore carries it and `isPlatformProvidedToolName('list_flow_runs')` answers `true`, so a skill whose `tools[]` names it resolves under ADR-0109 reference integrity instead of being reported as `ai-skill-tool-unresolved`. - `ui/packages/plugin-chatbot/src/__tests__/toolLabels-locale-parity-7481.test.ts`: `list_flow_runs` moves from `AHEAD_OF_PIN` (now empty) to `GRADUATED`, per the file's own note. The ui half (objectstack-ai#34368, PR objectstack-ai#34379) already put its label in every locale pack. This move must ride with the registry entry: with the entry and without the move, the `AHEAD_OF_PIN carries only names the pinned registry still lacks` case turns red (plugin-chatbot reads `@objectstack/spec` as `workspace:^`). - Changeset: `@objectstack/spec` patch (`.changeset/34372-list-flow-runs-registry.md`). Contract review M1 (7235393865, seat revision 7235409030): `SkillSchema.tools` is a free string array, so what an author can write parses the same; the only behaviour change is that one advisory lint warning no longer fires. Same as the registry's earlier additions objectstack-ai#32668 and objectstack-ai#37989. - Resumed from `claude/project-thread-a7rk9c@f754db1` (release comment 6929523318): its two commits were cherry-picked onto current `main`; the old main merge was not reused. Two conflicts resolved by keeping both sides: the `service-ai-studio` doc comment (main had added `ask_which`, cloud#4773) and the spec test (main had added the `get_record_context` case). ## Tests - `platform-tool-names.test.ts`: new case, the group contains `list_flow_runs`, `isPlatformProvidedToolName('list_flow_runs')` is `true`, control `list_flow_run` is `false`. 13/13 pass. - `packages/lint/src/validate-ai-tool-references.test.ts`: new case, a skill naming `list_flow_runs` yields no finding; control, a fictional neighbour `retry_flow_run` in the same list is still reported at `skills[0].tools[1]`. 46/46 pass. - ui `toolLabels-locale-parity-7481.test.ts` + `toolLabels-sentences-12724.test.ts`: 30/30 pass at c5e44f0. Review N2, at 2c464d4: the zh case that looped over `AHEAD_OF_PIN` (now empty, so it asserted nothing) loops over `GRADUATED` with a non-empty guard; 7481 file 17/17. <details><summary>Ablation</summary> - Deleted the `'list_flow_runs',` registry line, rebuilt `@objectstack/spec`, re-ran: the spec case `lists the build agent's read-only flow-run reader` red (1 failed / 12 passed); the ui 7481 file red on `reads a non-empty coverage set` and `AHEAD_OF_PIN carries only names the pinned registry still lacks` (the GRADUATED guard). Restored from the index, rebuilt, green again. </details> ## Acceptance notes - No other enumerating reader of the registry: `git grep get_record_history` outside the registry hits only locale packs, changelogs and a release page. - Review N1 (nit, not taken): the jsdoc carries no cloud reference for `list_flow_runs`; no cloud issue number is named on objectstack-ai#34368 or this card, and the cloud repo is outside this session's reach. - The cloud side deletes its AHEAD entry for this name on the pin bump that carries this (card item 4, cloud repo, not in this PR). ## Verification - `pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec exec vitest run src/system/constants/platform-tool-names.test.ts` — expect 13 passed. - Local derived gates (`dispatch-gates.mjs --commands`, 89 commands at c5e44f0): 86 exit 0 (two of them, `lint check:doc-formula-expressions` and `check:docs-transcript-drift`, after building the `@objectstack/lint` closure; first run was PREREQUISITE NOT MET). Not measured locally, CI runs them: `check:dual-build-cjs-loads` and `check:lean-entry-closure` (PREREQUISITE NOT MET: they load built output of packages this worktree did not build), and `pnpm --dir ui exec vitest run scripts/` (1 of 5146 red: `unit-registry-absence-collision` cannot resolve the unbuilt `@objectstack/client` entry; the closure-budget half wants a built console). No `!` in the title and no narrowing arm, so no dogfood battery is owed. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgXM39VND2qb8HbebbK)_ <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgXM39VND2qb8HbebbK --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #32623
domain:spec#2 · sunhaolin · session_017xRBcSNTYTx2TpA25geuvV
Clause-②: yes
Metadata-protocol: none
维护者速读
PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']加上get_record_history,11 个内置语言包各加一个chatbot.tool.get_record_history显示名(英文「Read the record history」)。get_record_history(cloud#4347),平台登记表不列它,cloud#4374 的一致性测试过不了;没有标签时聊天步骤会显示英文工具名。packages/spec/src/system/constants/platform-tool-names.ts(登记行与注释)、ui/packages/i18n/src/locales/zh-Hans.ts(中文文案)、.changeset/32623-get-record-history-tool.md。cd ui && pnpm exec vitest run packages/plugin-chatbot/src/__tests__/toolLabels-locale-parity-7481.test.ts,预期 17 个用例全绿。What changes
packages/spec/src/system/constants/platform-tool-names.ts:get_record_historyjoins theservice-ai-studiogroup in sorted position (betweenget_packageandlist_metadata), and the group's doc comment names it (read-only, one record's change history the user may see, restore still behind a confirm card, cloud#4347). This follows the file header's maintenance rule: new cloud tool name here, plus achatbot.tool.NAMElabel in every pack.ui/packages/i18n/src/locales/*.ts: onechatbot.tool.get_record_historyentry in each of the 11 built-in packs (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant), placed in the same sorted position as the registry, i.e. right afterget_package(thetoolblock mirrors the registry's order, so it sits a few lines aboveopen_record, not directly beside it)..changeset/32623-get-record-history-tool.md:@objectstack/specand@object-ui/i18npatch (Metadata-protocol: nonegrades every entry patch).Tests
platform-tool-names.test.ts(snake_case, no cross-package collision, no family-prefix clash, each group sorted), and the label pin isui/packages/plugin-chatbot/src/__tests__/toolLabels-locale-parity-7481.test.ts, which reads the registry from the built spec and requires a non-empty label per pack. Both now cover the new name.kolabel made the parity suite fail withko is missing chatbot.tool entries: expected [ 'get_record_history' ] to deeply equal []; restored fromHEAD, blob hash matched.Acceptance notes
dist/system/index.d.tsdeclaresPLATFORM_TOOLS_BY_PACKAGE: Readonly<Record<string, readonly string[]>>, so the declaration bytes do not move; the widening is in the published runtime value (PLATFORM_PROVIDED_TOOL_NAMES/isPlatformProvidedToolNamenow accept one more name, which the lint R7 rule and the MCP bridge read). The claim'syesis kept on that basis.ui/packages/i18n/src/locales/on main holds 11 (plusindex.ts,registry.ts,rtl.ts), and the parity suite iterates exactly those.packages/mcp/src/mcp-server-runtime.tskeeps its hand-heldPLATFORM_READ_ONLY_TOOL_NAMES, which does not list this read-only tool; outside this card's surface, noted for the seat.Verification
Local gates at 3f2b784: 79 derived, 78 exit 0, 1 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --ran FILE: 79 derived families accounted for, 78 run, 1 NOT-MEASURED (derived from a recorded exit 3).pnpm check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET (35 workspace packages have no dist/ in this container); CI builds the tree.node scripts/check-plugin-teardown-shape.mjs --self-testfirst exited 3 on the shallow clone (its pinned fixture commit was absent); after fetching that commit it exits 0.check-adr-0087-registration,check-changeset-no-major,check:issue-citations,check:keyed-text-bounds, the speccheck:*family andpnpm --dir ui exec vitest run scripts/.node scripts/check-dev-prereqs.mjsexit 1, "workspace is not built" (57 of 107 packages without dist/), a container-state reading, not a diff verdict.Tests
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/system/constants/platform-tool-names.test.ts: Test Files 1 passed, Tests 5 passed.cd ui && pnpm exec vitest run --maxWorkers=2over the three plugin-chatbot tool-label suites andpackages/i18n/: Test Files 105 passed (105), Tests 1931 passed, 13 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_017xRBcSNTYTx2TpA25geuvV
Generated by Claude Code