Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/27002-chatbot-tool-labels-package-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@object-ui/i18n': patch
---

feat(i18n): `chatbot.tool.read_package_doc` and `chatbot.tool.search_package_docs` labels in all ten packs (#27002)

The spec registry `PLATFORM_TOOLS_BY_PACKAGE['service-ai']` now lists the cloud ask agent's two package-doc tools, so the chatbot's tool timeline can show them. Each pack gets a sentence in its own language ("Read the app guide", "Search the app guides" in English; "阅读应用文档", "在应用文档中查找" in Chinese), keeping the `toolLabels-locale-parity-7481` and `toolLabels-sentences-12724` tests green.

Clause-②: no
Metadata-protocol: none
10 changes: 10 additions & 0 deletions .changeset/27002-service-ai-package-doc-tool-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': minor
---

feat(spec): `PLATFORM_TOOLS_BY_PACKAGE['service-ai']` lists `read_package_doc` and `search_package_docs`

Clause-②: yes (widening)
Metadata-protocol: added

The cloud `ask` agent gains two `service-ai` tools that list and read the installed packages' `doc` items behind the `/meta/doc` audience gate (cloud#3335, the cloud half of #26691). The registry now lists both names, in its alphabetical order, so `PLATFORM_PROVIDED_TOOL_NAMES` carries them: a skill whose `tools[]` names either resolves under ADR-0109 reference integrity instead of being reported as a fictional tool (`ai-skill-tool-unresolved`). That is the whole widening: two more accepted `skill.tools[]` values. No schema shape changes, no export is added or removed, and every other name in the registry stays where it was.
20 changes: 20 additions & 0 deletions packages/lint/src/validate-ai-tool-references.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,26 @@ describe('validate-ai-tool-references', () => {
expect(control[0].message).toContain('archive_flow');
});

/**
* [#27002] The two `service-ai` package-doc tools cloud#3335 adds to the
* `ask` agent (`search_package_docs`, `read_package_doc`): the same widening
* #16512 made for five `service-ai-studio` tools, so a skill naming either
* resolves instead of being reported as a fictional tool.
*/
it('resolves the two service-ai package-doc tools (#27002)', () => {
const two = ['search_package_docs', 'read_package_doc'];
expect(validateAiToolReferences({ skills: [{ name: 's', tools: two }] })).toEqual([]);

// The control: a third name shaped like the two and registered by nobody
// is still reported, so this pin fails on a universe widened too far.
const control = validateAiToolReferences({
skills: [{ name: 's', tools: [...two, 'list_package_docs'] }],
});
expect(control).toHaveLength(1);
expect(control[0].path).toBe('skills[0].tools[2]');
expect(control[0].message).toContain('list_package_docs');
});

it('reports stable paths and tolerates junk shapes', () => {
const stack = {
skills: [{ name: 's', tools: ['query_records', 'nope_tool'] }],
Expand Down
10 changes: 8 additions & 2 deletions packages/spec/src/system/constants/platform-tool-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
* Maintenance contract: registering a new tool in a cloud AI package means
* adding its name here. The owning package's conformance test fails
* otherwise — an out-of-date registry is worse than no registry, because
* consumers now trust it.
* consumers now trust it. A new name also needs its `chatbot.tool.<name>`
* label in every pack under `ui/packages/i18n/src/locales/` — the ui
* plugin-chatbot label-parity tests read this registry.
*/

/**
Expand All @@ -38,14 +40,18 @@
export const PLATFORM_TOOLS_BY_PACKAGE: Readonly<Record<string, readonly string[]>> = {
/**
* `@objectstack/service-ai` (cloud) — the `ask` data product's shared
* data/knowledge/visualization tools.
* data/knowledge/visualization tools, and the package-doc pair that reads the
* installed packages' `doc` items behind the `/meta/doc` audience gate
* (cloud#3335).
*/
'service-ai': [
'aggregate_data',
'get_record',
'query_data',
'query_records',
'read_package_doc',
'search_knowledge',
'search_package_docs',
'visualize_data',
],
/**
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3920,7 +3920,9 @@ const ar = {
get_record: "قراءة هذا السجل",
query_data: "الاستعلام عن البيانات المطلوبة",
query_records: "البحث عن السجلات المطابقة",
read_package_doc: "قراءة دليل التطبيق",
search_knowledge: "البحث في قاعدة المعرفة عن معلومات",
search_package_docs: "البحث في أدلة التطبيق",
visualize_data: "عرض البيانات في رسم بياني",
add_field: "إضافة حقل إلى الكائن",
apply_blueprint: "بناء التطبيق وفق الخطة",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3643,7 +3643,9 @@ const de = {
get_record: "Den Datensatz lesen",
query_data: "Die benötigten Daten abfragen",
query_records: "Passende Datensätze suchen",
read_package_doc: "Die Anleitung der App lesen",
search_knowledge: "In der Wissensdatenbank nachsehen",
search_package_docs: "In den Anleitungen der App suchen",
visualize_data: "Die Daten als Diagramm darstellen",
add_field: "Dem Objekt ein Feld hinzufügen",
apply_blueprint: "Die App nach dem Plan erstellen",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4399,7 +4399,9 @@ const en = {
get_record: 'Read the record',
query_data: 'Query the data',
query_records: 'Look up the records',
read_package_doc: 'Read the app guide',
search_knowledge: 'Search the knowledge base',
search_package_docs: 'Search the app guides',
visualize_data: 'Chart the data',
add_field: 'Add a field',
apply_blueprint: 'Build the app from the plan',
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,9 @@ const es = {
get_record: "Leer el registro",
query_data: "Consultar los datos necesarios",
query_records: "Buscar los registros",
read_package_doc: "Leer la guía de la aplicación",
search_knowledge: "Consultar la base de conocimiento",
search_package_docs: "Buscar en las guías de la aplicación",
visualize_data: "Representar los datos en un gráfico",
add_field: "Añadir un campo",
apply_blueprint: "Construir la aplicación según el plan",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3709,7 +3709,9 @@ const fr = {
get_record: "Lire l’enregistrement",
query_data: "Interroger les données nécessaires",
query_records: "Rechercher les enregistrements",
read_package_doc: "Lire le guide de l’application",
search_knowledge: "Consulter la base de connaissances",
search_package_docs: "Chercher dans les guides de l’application",
visualize_data: "Représenter les données en graphique",
add_field: "Ajouter un champ à l’objet",
apply_blueprint: "Construire l’application selon le plan",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3645,7 +3645,9 @@ const ja = {
get_record: "このレコードを読み込む",
query_data: "必要なデータを照会する",
query_records: "該当するレコードを探す",
read_package_doc: "アプリのガイドを読む",
search_knowledge: "ナレッジベースで調べる",
search_package_docs: "アプリのガイドで調べる",
visualize_data: "データをグラフにする",
add_field: "オブジェクトに項目を追加する",
apply_blueprint: "設計案どおりにアプリを構築する",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3642,7 +3642,9 @@ const ko = {
get_record: "이 레코드 읽기",
query_data: "필요한 데이터 조회하기",
query_records: "해당 레코드 찾기",
read_package_doc: "앱 안내서 읽기",
search_knowledge: "지식 베이스에서 찾아보기",
search_package_docs: "앱 안내서에서 찾아보기",
visualize_data: "데이터를 차트로 그리기",
add_field: "오브젝트에 필드 추가하기",
apply_blueprint: "설계안대로 앱 만들기",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3708,7 +3708,9 @@ const pt = {
get_record: "Ler o registro",
query_data: "Consultar os dados necessários",
query_records: "Buscar os registros",
read_package_doc: "Ler o guia do aplicativo",
search_knowledge: "Consultar a base de conhecimento",
search_package_docs: "Pesquisar nos guias do aplicativo",
visualize_data: "Mostrar os dados em um gráfico",
add_field: "Adicionar um campo",
apply_blueprint: "Construir o aplicativo conforme o plano",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3792,7 +3792,9 @@ const ru = {
get_record: "Прочитать запись",
query_data: "Запросить нужные данные",
query_records: "Найти нужные записи",
read_package_doc: "Прочитать руководство приложения",
search_knowledge: "Поискать в базе знаний",
search_package_docs: "Поискать в руководствах приложения",
visualize_data: "Показать данные на графике",
add_field: "Добавить поле в объект",
apply_blueprint: "Собрать приложение по плану",
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/i18n/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3825,7 +3825,9 @@ const zh = {
get_record: '读取这条记录',
query_data: '查询所需数据',
query_records: '查找相关记录',
read_package_doc: '阅读应用文档',
search_knowledge: '在知识库中查找',
search_package_docs: '在应用文档中查找',
visualize_data: '把数据画成图表',
add_field: '给对象添加字段',
apply_blueprint: '按方案搭建应用',
Expand Down
Loading