From 87e98178acf4f8fa1037a53f438a3891d50f07c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Oct 2026 13:28:38 +0000 Subject: [PATCH] feat(spec): register the ask agent's draft_record tool, with its chatbot label in all ten packs (cloud#3383) The cloud ask agent gains `draft_record`, a signal tool that turns chat content into a validated new-record draft the user saves (cloud#3383; the console card is #28104). PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio'] now lists it, so a skill naming it resolves under ADR-0109 reference integrity and cloud's conformance test can hold the package to the list. Each locale pack gets its `chatbot.tool.draft_record` step label. Claude-Session: https://claude.ai/code/session_01QUs3BsR8MWGg1ZtMACGG7y Co-authored-by: Claude --- .../cloud-3383-chatbot-tool-label-draft-record.md | 10 ++++++++++ .changeset/cloud-3383-draft-record-tool-name.md | 10 ++++++++++ .../lint/src/validate-ai-tool-references.test.ts | 15 +++++++++++++++ .../src/system/constants/platform-tool-names.ts | 7 +++++-- ui/packages/i18n/src/locales/ar.ts | 1 + ui/packages/i18n/src/locales/de.ts | 1 + ui/packages/i18n/src/locales/en.ts | 1 + ui/packages/i18n/src/locales/es.ts | 1 + ui/packages/i18n/src/locales/fr.ts | 1 + ui/packages/i18n/src/locales/ja.ts | 1 + ui/packages/i18n/src/locales/ko.ts | 1 + ui/packages/i18n/src/locales/pt.ts | 1 + ui/packages/i18n/src/locales/ru.ts | 1 + ui/packages/i18n/src/locales/zh.ts | 1 + 14 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .changeset/cloud-3383-chatbot-tool-label-draft-record.md create mode 100644 .changeset/cloud-3383-draft-record-tool-name.md diff --git a/.changeset/cloud-3383-chatbot-tool-label-draft-record.md b/.changeset/cloud-3383-chatbot-tool-label-draft-record.md new file mode 100644 index 00000000000..4d3dedd65ef --- /dev/null +++ b/.changeset/cloud-3383-chatbot-tool-label-draft-record.md @@ -0,0 +1,10 @@ +--- +'@object-ui/i18n': patch +--- + +feat(i18n): `chatbot.tool.draft_record` label in all ten packs + +The spec registry now lists the cloud ask agent's `draft_record` tool, so the chatbot's tool timeline can show it. Each pack gets a sentence in its own language ("Draft the new record" in English, "起草新记录" in Chinese), keeping the `toolLabels-locale-parity-7481` and `toolLabels-sentences-12724` tests green. + +Clause-②: no +Metadata-protocol: none diff --git a/.changeset/cloud-3383-draft-record-tool-name.md b/.changeset/cloud-3383-draft-record-tool-name.md new file mode 100644 index 00000000000..a8b79208d96 --- /dev/null +++ b/.changeset/cloud-3383-draft-record-tool-name.md @@ -0,0 +1,10 @@ +--- +'@objectstack/spec': minor +--- + +feat(spec): `PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']` lists `draft_record` + +Clause-②: yes (widening) +Metadata-protocol: added + +The cloud `ask` agent gains `draft_record`, a signal tool that turns chat content into a validated new-record draft the user saves themselves (cloud#3383; the console card is #28104). The registry now lists the name, in its alphabetical order, so `PLATFORM_PROVIDED_TOOL_NAMES` carries it and a skill whose `tools[]` names it resolves under ADR-0109 reference integrity instead of being reported as a fictional tool (`ai-skill-tool-unresolved`). That is the whole widening: one more accepted `skill.tools[]` value. No schema shape changes, no export is added or removed. diff --git a/packages/lint/src/validate-ai-tool-references.test.ts b/packages/lint/src/validate-ai-tool-references.test.ts index 42131939b83..073aa60078c 100644 --- a/packages/lint/src/validate-ai-tool-references.test.ts +++ b/packages/lint/src/validate-ai-tool-references.test.ts @@ -225,6 +225,21 @@ describe('validate-ai-tool-references', () => { expect(control[0].message).toContain('list_package_docs'); }); + /** + * The `ask` agent's new-record draft signal (cloud#3383, ui half #28104): a + * skill naming `draft_record` resolves; a near name nobody registers does not. + */ + it('resolves the service-ai-studio record-draft signal', () => { + expect(validateAiToolReferences({ skills: [{ name: 's', tools: ['draft_record'] }] })).toEqual([]); + + const control = validateAiToolReferences({ + skills: [{ name: 's', tools: ['draft_record', 'draft_records'] }], + }); + expect(control).toHaveLength(1); + expect(control[0].path).toBe('skills[0].tools[1]'); + expect(control[0].message).toContain('draft_records'); + }); + it('reports stable paths and tolerates junk shapes', () => { const stack = { skills: [{ name: 's', tools: ['query_records', 'nope_tool'] }], diff --git a/packages/spec/src/system/constants/platform-tool-names.ts b/packages/spec/src/system/constants/platform-tool-names.ts index 7a31e6c2e7d..1161b55d17f 100644 --- a/packages/spec/src/system/constants/platform-tool-names.ts +++ b/packages/spec/src/system/constants/platform-tool-names.ts @@ -56,8 +56,10 @@ export const PLATFORM_TOOLS_BY_PACKAGE: Readonly