Skip to content

Commit 87e9817

Browse files
committed
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 <noreply@anthropic.com>
1 parent 91a423e commit 87e9817

14 files changed

Lines changed: 50 additions & 2 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(i18n): `chatbot.tool.draft_record` label in all ten packs
6+
7+
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.
8+
9+
Clause-②: no
10+
Metadata-protocol: none
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']` lists `draft_record`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
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.

‎packages/lint/src/validate-ai-tool-references.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,21 @@ describe('validate-ai-tool-references', () => {
225225
expect(control[0].message).toContain('list_package_docs');
226226
});
227227

228+
/**
229+
* The `ask` agent's new-record draft signal (cloud#3383, ui half #28104): a
230+
* skill naming `draft_record` resolves; a near name nobody registers does not.
231+
*/
232+
it('resolves the service-ai-studio record-draft signal', () => {
233+
expect(validateAiToolReferences({ skills: [{ name: 's', tools: ['draft_record'] }] })).toEqual([]);
234+
235+
const control = validateAiToolReferences({
236+
skills: [{ name: 's', tools: ['draft_record', 'draft_records'] }],
237+
});
238+
expect(control).toHaveLength(1);
239+
expect(control[0].path).toBe('skills[0].tools[1]');
240+
expect(control[0].message).toContain('draft_records');
241+
});
242+
228243
it('reports stable paths and tolerates junk shapes', () => {
229244
const stack = {
230245
skills: [{ name: 's', tools: ['query_records', 'nope_tool'] }],

‎packages/spec/src/system/constants/platform-tool-names.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ export const PLATFORM_TOOLS_BY_PACKAGE: Readonly<Record<string, readonly string[
5656
],
5757
/**
5858
* `@objectstack/service-ai-studio` (cloud) — the shared schema-reader pair
59-
* (`describe_object`/`list_objects`) plus the `build` authoring product's
60-
* metadata/blueprint/package/verify tools.
59+
* (`describe_object`/`list_objects`), the `build` authoring product's
60+
* metadata/blueprint/package/verify tools, and the `ask` agent's hand-off
61+
* signals (`suggest_builder`, `open_record`, `draft_record`), which write
62+
* nothing.
6163
*/
6264
'service-ai-studio': [
6365
'add_field',
@@ -70,6 +72,7 @@ export const PLATFORM_TOOLS_BY_PACKAGE: Readonly<Record<string, readonly string[
7072
'delete_field',
7173
'describe_metadata',
7274
'describe_object',
75+
'draft_record',
7376
'get_active_package',
7477
'get_authoring_rules',
7578
'get_metadata_schema',

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4036,6 +4036,7 @@ const ar = {
40364036
delete_field: "حذف أحد الحقول",
40374037
describe_metadata: "مراجعة البيانات الوصفية",
40384038
describe_object: "مراجعة بنية الكائن",
4039+
draft_record: "صياغة مسودة السجل الجديد",
40394040
get_active_package: "التحقق من الحزمة النشطة",
40404041
get_authoring_rules: "الاطلاع على قواعد التأليف",
40414042
get_metadata_schema: "الاطلاع على تنسيق البيانات الوصفية",

‎ui/packages/i18n/src/locales/de.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3743,6 +3743,7 @@ const de = {
37433743
delete_field: "Ein Feld löschen",
37443744
describe_metadata: "Die Metadaten ansehen",
37453745
describe_object: "Die Struktur des Objekts ansehen",
3746+
draft_record: "Den neuen Datensatz entwerfen",
37463747
get_active_package: "Das aktive Paket prüfen",
37473748
get_authoring_rules: "Die Erstellungsregeln nachlesen",
37483749
get_metadata_schema: "Das Metadatenformat nachlesen",

‎ui/packages/i18n/src/locales/en.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4514,6 +4514,7 @@ const en = {
45144514
delete_field: 'Delete a field',
45154515
describe_metadata: 'Look at the metadata',
45164516
describe_object: 'Look at the object structure',
4517+
draft_record: 'Draft the new record',
45174518
get_active_package: 'Check the active package',
45184519
get_authoring_rules: 'Read the authoring rules',
45194520
get_metadata_schema: 'Read the metadata format',

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3817,6 +3817,7 @@ const es = {
38173817
delete_field: "Eliminar un campo",
38183818
describe_metadata: "Revisar los metadatos",
38193819
describe_object: "Revisar la estructura del objeto",
3820+
draft_record: "Redactar el nuevo registro",
38203821
get_active_package: "Comprobar el paquete activo",
38213822
get_authoring_rules: "Consultar las reglas de autoría",
38223823
get_metadata_schema: "Consultar el formato de los metadatos",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,6 +3813,7 @@ const fr = {
38133813
delete_field: "Supprimer le champ",
38143814
describe_metadata: "Examiner les métadonnées",
38153815
describe_object: "Examiner la structure de l’objet",
3816+
draft_record: "Préparer la nouvelle fiche",
38163817
get_active_package: "Vérifier le paquet actif",
38173818
get_authoring_rules: "Consulter les règles d’écriture",
38183819
get_metadata_schema: "Consulter le format des métadonnées",

‎ui/packages/i18n/src/locales/ja.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3745,6 +3745,7 @@ const ja = {
37453745
delete_field: "項目を削除する",
37463746
describe_metadata: "メタデータの内容を確認する",
37473747
describe_object: "オブジェクトの構造を確認する",
3748+
draft_record: "新しいレコードの下書きを作る",
37483749
get_active_package: "現在のパッケージを確認する",
37493750
get_authoring_rules: "作成ルールを読む",
37503751
get_metadata_schema: "メタデータの形式を調べる",

0 commit comments

Comments
 (0)