diff --git a/apps/web/tests/expected/japanese-plugin-metadata/card.expected.md b/apps/web/tests/expected/japanese-plugin-metadata/card.expected.md index 895df7fbae..0fa58e0c23 100644 --- a/apps/web/tests/expected/japanese-plugin-metadata/card.expected.md +++ b/apps/web/tests/expected/japanese-plugin-metadata/card.expected.md @@ -1,5 +1,5 @@ - listitem: - button "自動認可レビューを表示": 自動認可レビュー - - text: 実験的 各ツール呼び出しの前にモデルが認可を判断する、自動レビュー権限モードを提供します。 + - text: 実験的 各ツール呼び出しの前にモデルが認可を判断する、自動認可レビュー権限モードを提供します。 - status - switch "自動認可レビューを有効化" diff --git a/apps/web/tests/japanese-plugin-metadata.e2e.ts b/apps/web/tests/japanese-plugin-metadata.e2e.ts index 5fcb34ae83..fb56add4f1 100644 --- a/apps/web/tests/japanese-plugin-metadata.e2e.ts +++ b/apps/web/tests/japanese-plugin-metadata.e2e.ts @@ -23,7 +23,7 @@ it('displays Japanese plugin titles and descriptions from package metadata', asy const title = panel.getByRole('button', { name: '自動認可レビューを表示', exact: true }) await title.waitFor() const card = title.locator('xpath=ancestor::li') - await card.getByText('各ツール呼び出しの前にモデルが認可を判断する、自動レビュー権限モードを提供します。', { exact: true }).waitFor() + await card.getByText('各ツール呼び出しの前にモデルが認可を判断する、自動認可レビュー権限モードを提供します。', { exact: true }).waitFor() const expected = fileURLToPath(new URL('./expected/japanese-plugin-metadata/card.expected.md', import.meta.url)) await compareOrRefreshGolden(expected, await captureStableAria(page, '[data-plugin-panel] li:has(button[aria-label="自動認可レビューを表示"])', scaffold.workspaceCwd), webSnapshotMode()) diff --git a/docs/cookbook/adding-a-package.i18n.yaml b/docs/cookbook/adding-a-package.i18n.yaml index 5fdc926b52..2f95205489 100644 --- a/docs/cookbook/adding-a-package.i18n.yaml +++ b/docs/cookbook/adding-a-package.i18n.yaml @@ -21,8 +21,8 @@ en: 0894bd9f35430753 zh: 2d28090e71134edd /cookbook-adding-a-workspace-package/5-add-optional-plugin-display-metadata: - en: bf6a19c236cb00e3 - zh: 4f0d62de5466112f + en: 1238eaea376391d1 + zh: c7e606f95d8980bf /cookbook-adding-a-workspace-package/6-verify: en: 80c7fb90b1175aae zh: 2ba37962dbc57299 diff --git a/docs/cookbook/adding-a-package.md b/docs/cookbook/adding-a-package.md index a0328ccf8a..2950932479 100644 --- a/docs/cookbook/adding-a-package.md +++ b/docs/cookbook/adding-a-package.md @@ -136,7 +136,7 @@ Merge these entries into `package.json`, retaining existing runtime exports and } ``` -Keep language files together in `locale/`, with `en.json` as the discovery entry. Fields are optional; present values must be non-empty strings. English `meta.title` and `meta.description` use sentence case: capitalize only the first word, proper nouns, and product names, as in `Git worktrees` ([rule](../../.agents/skills/dsh-prose-standard/SKILL.md#required-coverage-by-prose-location)). Missing files or fields permit fallback, while malformed JSON or invalid fields produce a per-plugin diagnostic. First-party packages and plugin templates must provide `ja.json` covering every field present in `en.json` or `zh.json`, preserving placeholders; detail paths may point to the existing English document. Run `pnpm run check:i18n` to verify JSON metadata and UI dictionary completeness; these checks also run in `check:all`, CI static checks, and hygiene. +Keep language files together in `locale/`, with `en.json` as the discovery entry. Fields are optional; present values must be non-empty strings. English `meta.title` and `meta.description` use sentence case: capitalize only the first word, proper nouns, and product names, as in `Git worktrees` ([rule](../../.agents/skills/dsh-prose-standard/SKILL.md#required-coverage-by-prose-location)). At runtime, missing files or fields permit fallback, while malformed JSON or invalid fields produce a per-plugin diagnostic. First-party packages and plugin templates must provide `ja.json` covering every field present in `en.json` or optional `zh.json`, preserving placeholders; detail paths may point to the existing English document. Subpath resources under `locale//` follow the same checks. English descriptions explain user-visible behavior and end with sentence punctuation. Run `pnpm run check:i18n` to verify JSON metadata and UI dictionary completeness; the JSON checks also run in `check:all`, CI static checks, and hygiene. Fields fall back independently before view-specific name formatting, using the existing locale language chain first: diff --git a/docs/cookbook/adding-a-package.zh.md b/docs/cookbook/adding-a-package.zh.md index 49fa2d0d01..6ab95ce3b3 100644 --- a/docs/cookbook/adding-a-package.zh.md +++ b/docs/cookbook/adding-a-package.zh.md @@ -136,7 +136,7 @@ Append-only, prefix-stable, replacing, or independent behavior, including the ex } ``` -语言文件统一放在 `locale/`,并保留 `en.json` 作为发现入口。字段可选,填写时必须是非空字符串。英文 `meta.title` 和 `meta.description` 使用 sentence case:只大写首个单词、专有名词和产品名,例如 `Git worktrees`([rule](../../.agents/skills/dsh-prose-standard/SKILL.md#required-coverage-by-prose-location))。文件或字段缺失时允许回退,JSON 损坏或字段无效时显示单插件诊断。 仓库内的包和插件模板必须提供 `ja.json`,覆盖 `en.json` 或 `zh.json` 中的全部字段并保留占位符;详情路径可指向现有英文文档。运行 `pnpm run check:i18n` 检查 JSON 元数据和 UI 字典完整性;这些检查也接入 `check:all`、CI 静态检查和 hygiene。 +语言文件统一放在 `locale/`,并保留 `en.json` 作为发现入口。字段可选,填写时必须是非空字符串。英文 `meta.title` 和 `meta.description` 使用 sentence case:只大写首个单词、专有名词和产品名,例如 `Git worktrees`([rule](../../.agents/skills/dsh-prose-standard/SKILL.md#required-coverage-by-prose-location))。运行时文件或字段缺失时允许回退,JSON 损坏或字段无效时显示单插件诊断。仓库内的包和插件模板必须提供 `ja.json`,覆盖 `en.json` 或可选 `zh.json` 中的全部字段并保留占位符;详情路径可指向现有英文文档。`locale//` 下的子路径资源使用相同检查。英文描述面向产品用户说明可见行为,并以句末标点结束。运行 `pnpm run check:i18n` 检查 JSON 元数据和 UI 字典完整性;JSON 检查也接入 `check:all`、CI 静态检查和 hygiene。 各字段先独立回退,再按页面规则格式化技术名称;回退优先经过现有 locale 语言链: diff --git a/packages/acp/acp/locale/en.json b/packages/acp/acp/locale/en.json index c15f45406b..25540ee89e 100644 --- a/packages/acp/acp/locale/en.json +++ b/packages/acp/acp/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "ACP server", - "description": "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio" + "description": "Run agents through JSON-RPC over standard input and output for automation." } } diff --git a/packages/api/remote-access/locale/en.json b/packages/api/remote-access/locale/en.json index f441b795e0..c1f4dd693d 100644 --- a/packages/api/remote-access/locale/en.json +++ b/packages/api/remote-access/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Remote access control", - "description": "Method-level Remote access control for non-owner Peers and the per-Peer access snapshot" + "description": "Control which methods non-owner connections can access and retain permission snapshots for each connection." } } diff --git a/packages/boot/app-boot/src/official-bundles.generated.ts b/packages/boot/app-boot/src/official-bundles.generated.ts index 5f8fbe36ed..cb993e2d24 100644 --- a/packages/boot/app-boot/src/official-bundles.generated.ts +++ b/packages/boot/app-boot/src/official-bundles.generated.ts @@ -8,7 +8,7 @@ export const OFFICIAL_ON_DEMAND_CATALOG: readonly OfficialBundleCatalogEntry[] = packageName: '@deepseek-ai/dsh-subagent-claude-code', meta: { title: { 'en': 'Claude Code subagent', 'ja': 'Claude Code \u30B5\u30D6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8', 'zh': 'Claude Code \u5B50\u667A\u80FD\u4F53' }, - description: { 'en': 'Delegate one task to Claude Code using its native authentication and settings.', 'ja': 'Claude Code \u306E\u6A19\u6E96\u306E\u8A8D\u8A3C\u3068\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u5358\u72EC\u306E\u30BF\u30B9\u30AF\u3092\u59D4\u6D3E\u3057\u307E\u3059\u3002', 'zh': '\u4F7F\u7528 Claude Code \u539F\u751F\u8BA4\u8BC1\u548C\u8BBE\u7F6E\u59D4\u6D3E\u5355\u4E2A\u4EFB\u52A1\u3002' }, + description: { 'en': 'Delegate one task to Claude Code using its native authentication and settings.', 'ja': 'Claude Code \u306E\u30CD\u30A4\u30C6\u30A3\u30D6\u306E\u8A8D\u8A3C\u3068\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u5358\u72EC\u306E\u30BF\u30B9\u30AF\u3092\u59D4\u6D3E\u3057\u307E\u3059\u3002', 'zh': '\u4F7F\u7528 Claude Code \u539F\u751F\u8BA4\u8BC1\u548C\u8BBE\u7F6E\u59D4\u6D3E\u5355\u4E2A\u4EFB\u52A1\u3002' }, icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIxNC45ODkzIiB5PSIxNS4xODc3IiB3aWR0aD0iMTIuMjM2NSIgaGVpZ2h0PSIxMi4yMzY1IiByeD0iMiIgZmlsbD0idXJsKCNkc2hfcGx1Z2luX2FydF9SMGEpIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9yZWN0PjxyZWN0IHg9IjguODcxMDkiIHk9IjkuMDY5NyIgd2lkdGg9IjEyLjIzNjUiIGhlaWdodD0iMTIuMjM2NSIgcng9IjIiIGZpbGw9InVybCgjZHNoX3BsdWdpbl9hcnRfUjBiKSIgZmlsbC1vcGFjaXR5PSIwLjgiPjwvcmVjdD48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImRzaF9wbHVnaW5fYXJ0X1IwYSIgeDE9IjIxLjEwNzUiIHkxPSIxNS4xODc3IiB4Mj0iMjEuMTA3NSIgeTI9IjI3LjQyNDMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjNDVFN0E0Ij48L3N0b3A+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDU5MDlEIj48L3N0b3A+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImRzaF9wbHVnaW5fYXJ0X1IwYiIgeDE9IjE0Ljk4OTQiIHkxPSI5LjA2OTciIHgyPSIxNC45ODk0IiB5Mj0iMjEuMzA2MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM2OUI5RkYiPjwvc3RvcD48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMzMjRERTIiPjwvc3RvcD48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4K', }, }, @@ -16,7 +16,7 @@ export const OFFICIAL_ON_DEMAND_CATALOG: readonly OfficialBundleCatalogEntry[] = packageName: '@deepseek-ai/dsh-subagent-codex', meta: { title: { 'en': 'Codex subagent', 'ja': 'Codex \u30B5\u30D6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8', 'zh': 'Codex \u5B50\u667A\u80FD\u4F53' }, - description: { 'en': 'Delegate one task to Codex using its native authentication and settings.', 'ja': 'Codex \u306E\u6A19\u6E96\u306E\u8A8D\u8A3C\u3068\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u5358\u72EC\u306E\u30BF\u30B9\u30AF\u3092\u59D4\u6D3E\u3057\u307E\u3059\u3002', 'zh': '\u4F7F\u7528 Codex \u539F\u751F\u8BA4\u8BC1\u548C\u8BBE\u7F6E\u59D4\u6D3E\u5355\u4E2A\u4EFB\u52A1\u3002' }, + description: { 'en': 'Delegate one task to Codex using its native authentication and settings.', 'ja': 'Codex \u306E\u30CD\u30A4\u30C6\u30A3\u30D6\u306E\u8A8D\u8A3C\u3068\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u5358\u72EC\u306E\u30BF\u30B9\u30AF\u3092\u59D4\u6D3E\u3057\u307E\u3059\u3002', 'zh': '\u4F7F\u7528 Codex \u539F\u751F\u8BA4\u8BC1\u548C\u8BBE\u7F6E\u59D4\u6D3E\u5355\u4E2A\u4EFB\u52A1\u3002' }, icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIxNC45ODkzIiB5PSIxNS4xODc3IiB3aWR0aD0iMTIuMjM2NSIgaGVpZ2h0PSIxMi4yMzY1IiByeD0iMiIgZmlsbD0idXJsKCNkc2hfcGx1Z2luX2FydF9SMGEpIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9yZWN0PjxyZWN0IHg9IjguODcxMDkiIHk9IjkuMDY5NyIgd2lkdGg9IjEyLjIzNjUiIGhlaWdodD0iMTIuMjM2NSIgcng9IjIiIGZpbGw9InVybCgjZHNoX3BsdWdpbl9hcnRfUjBiKSIgZmlsbC1vcGFjaXR5PSIwLjgiPjwvcmVjdD48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImRzaF9wbHVnaW5fYXJ0X1IwYSIgeDE9IjIxLjEwNzUiIHkxPSIxNS4xODc3IiB4Mj0iMjEuMTA3NSIgeTI9IjI3LjQyNDMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjNDVFN0E0Ij48L3N0b3A+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDU5MDlEIj48L3N0b3A+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImRzaF9wbHVnaW5fYXJ0X1IwYiIgeDE9IjE0Ljk4OTQiIHkxPSI5LjA2OTciIHgyPSIxNC45ODk0IiB5Mj0iMjEuMzA2MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM2OUI5RkYiPjwvc3RvcD48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMzMjRERTIiPjwvc3RvcD48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4K', }, }, diff --git a/packages/boot/plugin-manager/locale/tools/ja.json b/packages/boot/plugin-manager/locale/tools/ja.json new file mode 100644 index 0000000000..836f03de7b --- /dev/null +++ b/packages/boot/plugin-manager/locale/tools/ja.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "プラグイン管理ツール" + } +} diff --git a/packages/boot/plugin-market/locale/en.json b/packages/boot/plugin-market/locale/en.json index 173b262396..5baedc3f0f 100644 --- a/packages/boot/plugin-market/locale/en.json +++ b/packages/boot/plugin-market/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Plugin market indexes", - "description": "Configured plugin market indexes for the Web Discover page and the plugin_market agent tool" + "description": "Manage configured market indexes for plugin discovery and the plugin_market tool." } } diff --git a/packages/browser-use/browser-use/locale/en.json b/packages/browser-use/browser-use/locale/en.json index 3a1b06e1d8..fb0661bfcc 100644 --- a/packages/browser-use/browser-use/locale/en.json +++ b/packages/browser-use/browser-use/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Browser provider registry", - "description": "Exclusive named browser-use provider registration" + "description": "Register browser automation providers by name, with one provider per name." } } diff --git a/packages/bundle/acp-app/locale/en.json b/packages/bundle/acp-app/locale/en.json index 500b3da4dd..8de14398c9 100644 --- a/packages/bundle/acp-app/locale/en.json +++ b/packages/bundle/acp-app/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "ACP profile", - "description": "The dsh ACP profile bundle: automation-only JSON-RPC stdio and process lifecycle over dsh-base" + "description": "Provide automation-only ACP communication and process lifecycle management over dsh-base." } } diff --git a/packages/bundle/headless/locale/en.json b/packages/bundle/headless/locale/en.json index 82ebc297c5..8d393f6587 100644 --- a/packages/bundle/headless/locale/en.json +++ b/packages/bundle/headless/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Headless profile", - "description": "The dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layer" + "description": "Run a single task directly with the core Agent/Session runner over dsh-base, without a Host, HTTP, or browser layer." } } diff --git a/packages/bundle/headless/locale/ja.json b/packages/bundle/headless/locale/ja.json index babdcdd500..969cad80f8 100644 --- a/packages/bundle/headless/locale/ja.json +++ b/packages/bundle/headless/locale/ja.json @@ -1,6 +1,6 @@ { "meta": { "title": "ヘッドレスプロファイル", - "description": "dsh-base 上で単一タスクを実行し、Host、HTTP、ブラウザのレイヤーを含みません。" + "description": "dsh-base 上でコアの Agent/Session ランナーを直接使用して単一タスクを実行し、Host、HTTP、ブラウザのレイヤーを含みません。" } } diff --git a/packages/bundle/headless/locale/zh.json b/packages/bundle/headless/locale/zh.json index cce7b4034e..b8ac8ba1f1 100644 --- a/packages/bundle/headless/locale/zh.json +++ b/packages/bundle/headless/locale/zh.json @@ -1,6 +1,6 @@ { "meta": { "title": "无界面运行配置", - "description": "在 dsh-base 上提供单次任务运行,不包含 Host、HTTP 或浏览器层。" + "description": "在 dsh-base 上直接使用核心 Agent/Session 执行单次任务,不包含 Host、HTTP 或浏览器层。" } } diff --git a/packages/bundle/sdk-app/locale/en.json b/packages/bundle/sdk-app/locale/en.json index 6626fd0209..8cdffe0ac7 100644 --- a/packages/bundle/sdk-app/locale/en.json +++ b/packages/bundle/sdk-app/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SDK profile", - "description": "The dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-base" + "description": "Provide JSON-RPC over standard input and output and manage the process lifecycle over dsh-base." } } diff --git a/packages/bundle/web-app/locale/startup/ja.json b/packages/bundle/web-app/locale/startup/ja.json new file mode 100644 index 0000000000..b920e8bcf5 --- /dev/null +++ b/packages/bundle/web-app/locale/startup/ja.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Web 起動設定" + } +} diff --git a/packages/client/ui-conversation/src/client/locales.ts b/packages/client/ui-conversation/src/client/locales.ts index 36edb38e56..cde0c51e72 100644 --- a/packages/client/ui-conversation/src/client/locales.ts +++ b/packages/client/ui-conversation/src/client/locales.ts @@ -1096,9 +1096,9 @@ export const ja = { 'tool.title.glob': 'Glob', 'tool.title.webSearch': '検索', 'tool.title.webFetch': '取得', - 'tool.autoReviewRejected': '自動レビューにより拒否されました', + 'tool.autoReviewRejected': '自動認可レビューにより拒否されました', 'tool.autoReviewNotExecuted': 'ツールは実行されませんでした。理由: {reason}', - 'tool.autoReviewReasonFallback': '自動レビューがこの操作を承認しませんでした', + 'tool.autoReviewReasonFallback': '自動認可レビューがこの操作を承認しませんでした', 'diff.collapseAria': '差分を折りたたむ', 'diff.expandAria': '差分の残り{count}行を表示', 'diff.expandRest': '… 残り{count}行', diff --git a/packages/client/ui-deepseek-model-label-1017/locale/en.json b/packages/client/ui-deepseek-model-label-1017/locale/en.json index 5f0a54c37b..b4906f27c6 100644 --- a/packages/client/ui-deepseek-model-label-1017/locale/en.json +++ b/packages/client/ui-deepseek-model-label-1017/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "DeepSeek 1017 model badge", - "description": "Temporary 1017 release badge for official DeepSeek Flash model labels" + "description": "Add a temporary 1017 release badge to official DeepSeek Flash model names." } } diff --git a/packages/client/ui-permission-presets/src/client/locales.ts b/packages/client/ui-permission-presets/src/client/locales.ts index 0c3b2ed852..792c1d5605 100644 --- a/packages/client/ui-permission-presets/src/client/locales.ts +++ b/packages/client/ui-permission-presets/src/client/locales.ts @@ -111,11 +111,11 @@ export const accessJa = { 'confirm.acknowledge': 'リスクを理解し、続行します', 'confirm.cancel': 'キャンセル', 'confirm.enable': 'フルアクセスを有効にする', - 'auto.label': '自動レビュー', + 'auto.label': '自動認可レビュー', 'auto.badge': 'EXP', 'auto.description': 'すべてのネイティブツール呼び出しと PTC 内部呼び出しを実験的な同一モデルでレビューしたうえで、サンドボックスなしで実行します。', - 'auto.confirm.title': '自動レビュー(実験的)を有効にしますか?', - 'auto.confirm.description': '自動レビューはサンドボックスなしで実行されます。ネイティブツール呼び出しと PTC 内部呼び出しのたびに、現在のエージェントと同じモデルが許可可否をレビューし、拒否された呼び出しはあなたが承認または却下します。この機能は実験的であり、操作を誤って許可・拒否する可能性があり、追加のトークンを消費します。', + 'auto.confirm.title': '自動認可レビュー(実験的)を有効にしますか?', + 'auto.confirm.description': '自動認可レビューはサンドボックスなしで実行されます。ネイティブツール呼び出しと PTC 内部呼び出しのたびに、現在のエージェントと同じモデルが許可可否をレビューし、拒否された呼び出しはあなたが承認または却下します。この機能は実験的であり、操作を誤って許可・拒否する可能性があり、追加のトークンを消費します。', 'auto.confirm.acknowledge': 'これらのリスクを理解し、続行します', - 'auto.confirm.enable': '自動レビューを有効にする', + 'auto.confirm.enable': '自動認可レビューを有効にする', } satisfies Record diff --git a/packages/client/ui-plugin-market/locale/en.json b/packages/client/ui-plugin-market/locale/en.json index 5c6e875238..2c72ab4cec 100644 --- a/packages/client/ui-plugin-market/locale/en.json +++ b/packages/client/ui-plugin-market/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Plugin discovery", - "description": "Discover tab of the dsh web Plugins page: browse configured plugin market indexes and install their bundles" + "description": "Browse configured plugin market indexes and install their packages." } } diff --git a/packages/computer-use/computer-use/locale/en.json b/packages/computer-use/computer-use/locale/en.json index aa05e0bd1e..a41caa4b2f 100644 --- a/packages/computer-use/computer-use/locale/en.json +++ b/packages/computer-use/computer-use/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Computer provider registry", - "description": "Exclusive named computer-use provider registration" + "description": "Register Computer Use providers by name, with one provider per name." } } diff --git a/packages/context/harness-dev-context/locale/en.json b/packages/context/harness-dev-context/locale/en.json index 9d2e26826a..34337f0631 100644 --- a/packages/context/harness-dev-context/locale/en.json +++ b/packages/context/harness-dev-context/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Harness development context", - "description": "Model context naming the DeepSeek Harness checkout and Web GUI URL without letting either change the system prompt" + "description": "Give the model the Harness source directory and Web URL without changing its system prompt." } } diff --git a/packages/context/tmux-context/locale/en.json b/packages/context/tmux-context/locale/en.json index 533d68bfc9..b85cc2e4a3 100644 --- a/packages/context/tmux-context/locale/en.json +++ b/packages/context/tmux-context/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "tmux context", - "description": "Opt-in durable per-step context with this agent's tmux pane and window location" + "description": "Save tmux pane and window locations for each step when needed." } } diff --git a/packages/deliverables/deliverable-file-references/locale/en.json b/packages/deliverables/deliverable-file-references/locale/en.json index 9c2ac2e2ec..4c0399cc09 100644 --- a/packages/deliverables/deliverable-file-references/locale/en.json +++ b/packages/deliverables/deliverable-file-references/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Deliverable file references", - "description": "Shared model guidance for file links and deliverables across DeepSeek Harness hosts" + "description": "Provide shared model guidance for file links and deliverables across application environments." } } diff --git a/packages/experimental/auto-review/locale/ja.json b/packages/experimental/auto-review/locale/ja.json index 9486770c2e..cbe474b367 100644 --- a/packages/experimental/auto-review/locale/ja.json +++ b/packages/experimental/auto-review/locale/ja.json @@ -1,7 +1,7 @@ { "meta": { "title": "自動認可レビュー", - "description": "各ツール呼び出しの前にモデルが認可を判断する、自動レビュー権限モードを提供します。", + "description": "各ツール呼び出しの前にモデルが認可を判断する、自動認可レビュー権限モードを提供します。", "detail": "docs/DETAIL.md" } } diff --git a/packages/experimental/auto-review/src/index.ts b/packages/experimental/auto-review/src/index.ts index 659d8f5211..de2134ffd4 100644 --- a/packages/experimental/auto-review/src/index.ts +++ b/packages/experimental/auto-review/src/index.ts @@ -8,7 +8,6 @@ * @module @deepseek-ai/dsh-experimental-auto-review */ -import { deniedDisplayReason } from './locales.ts' import type {} from '@deepseek-ai/dsh-working-directory' import { FiberState, type Context } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' @@ -33,6 +32,7 @@ import { type PreToolDecision, type ToolExecution, } from '@deepseek-ai/dsh-tools' +import { deniedDisplayReason } from './locales.ts' /** Structured error name persisted for every final reviewer denial. */ const AUTO_REVIEW_DENIED_ERROR_NAME = 'AutoReviewDeniedError' diff --git a/packages/experimental/auto-review/src/locales.ts b/packages/experimental/auto-review/src/locales.ts index e856ee8fa0..4a4dc5deff 100644 --- a/packages/experimental/auto-review/src/locales.ts +++ b/packages/experimental/auto-review/src/locales.ts @@ -14,8 +14,8 @@ export const zh = { /** Japanese approval messages. */ export const ja = { - denied: '自動レビューがこの呼び出しを拒否しました。', - deniedWithReason: (reason: string): string => `自動レビューがこの呼び出しを拒否しました:${reason}`, + denied: '自動認可レビューがこの呼び出しを拒否しました。', + deniedWithReason: (reason: string): string => `自動認可レビューがこの呼び出しを拒否しました:${reason}`, } satisfies typeof en /** diff --git a/packages/experimental/auto-review/tests/auto-review.spec.ts b/packages/experimental/auto-review/tests/auto-review.spec.ts index a8ffe0de22..1d9136362e 100644 --- a/packages/experimental/auto-review/tests/auto-review.spec.ts +++ b/packages/experimental/auto-review/tests/auto-review.spec.ts @@ -967,9 +967,9 @@ describe('native review request', () => { ? 'Auto review denied tool "probe"' : `Auto review denied tool "probe": ${item.expectedReason}`) expect(displayReasons.at(-1)).toEqual(item.expectedReason === undefined - ? { en: 'Auto review denied this call.', zh: 'Auto review 拒绝了此调用。', ja: '自動レビューがこの呼び出しを拒否しました。' } + ? { en: 'Auto review denied this call.', zh: 'Auto review 拒绝了此调用。', ja: '自動認可レビューがこの呼び出しを拒否しました。' } : { en: `Auto review denied this call: ${item.expectedReason}`, zh: `Auto review 拒绝了此调用:${item.expectedReason}`, - ja: `自動レビューがこの呼び出しを拒否しました:${item.expectedReason}` }) + ja: `自動認可レビューがこの呼び出しを拒否しました:${item.expectedReason}` }) } expect(probe.runs()).toBe(2) diff --git a/packages/experimental/browser-use-stagehand-native/locale/en.json b/packages/experimental/browser-use-stagehand-native/locale/en.json index 32e107ac76..c1f1dcc846 100644 --- a/packages/experimental/browser-use-stagehand-native/locale/en.json +++ b/packages/experimental/browser-use-stagehand-native/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Stagehand browser tools", - "description": "Experimental Stagehand browser tools with separately configured native models" + "description": "Provide experimental Stagehand browser tools using a separately configured native model." } } diff --git a/packages/experimental/claude-code-mods/locale/en.json b/packages/experimental/claude-code-mods/locale/en.json index ca354dbeb1..2fb907f7a7 100644 --- a/packages/experimental/claude-code-mods/locale/en.json +++ b/packages/experimental/claude-code-mods/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Claude Code mods", - "description": "Experimental bridge: load Claude Code mods (hooks modules) and run their hook chains on DeepSeek Harness extension points" + "description": "Load Claude Code extensions and run their hooks through Harness extension points." } } diff --git a/packages/experimental/client-ui-claude-code-mods/locale/en.json b/packages/experimental/client-ui-claude-code-mods/locale/en.json index 99d82ca501..cdec4e5ef8 100644 --- a/packages/experimental/client-ui-claude-code-mods/locale/en.json +++ b/packages/experimental/client-ui-claude-code-mods/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Claude Code mods interface", - "description": "Web band above the prompt for Claude Code mods: draws each session's mod tree and sends button presses back to the bridge" + "description": "Display each session's extension tree above the input box and send button actions to the extension service." } } diff --git a/packages/experimental/cot-translation-bundle/locale/en.json b/packages/experimental/cot-translation-bundle/locale/en.json index 519553ec38..389beaed1e 100644 --- a/packages/experimental/cot-translation-bundle/locale/en.json +++ b/packages/experimental/cot-translation-bundle/locale/en.json @@ -1,7 +1,7 @@ { "meta": { "title": "Machine translation of reasoning", - "description": "Machine translation of expanded reasoning; source text is sent to the selected service", + "description": "Machine translation of expanded reasoning; source text is sent to the selected service.", "detail": "docs/DETAIL.md" } } diff --git a/packages/experimental/cua-macos/locale/en.json b/packages/experimental/cua-macos/locale/en.json index 4d43097088..6a630ed54a 100644 --- a/packages/experimental/cua-macos/locale/en.json +++ b/packages/experimental/cua-macos/locale/en.json @@ -1,6 +1,6 @@ { "meta": { - "title": "macOS computer use provider", - "description": "macOS native provider for shared Computer Use application and window objects" + "title": "macOS Computer Use provider", + "description": "Provide native macOS applications and windows for the shared Computer Use service." } } diff --git a/packages/experimental/cua-macos/locale/ja.json b/packages/experimental/cua-macos/locale/ja.json index b0c0f696a3..f99dcde772 100644 --- a/packages/experimental/cua-macos/locale/ja.json +++ b/packages/experimental/cua-macos/locale/ja.json @@ -1,6 +1,6 @@ { "meta": { - "title": "macOS コンピュータ操作バックエンド", - "description": "共通のコンピュータ操作サービスに macOS ネイティブのアプリとウィンドウのオブジェクトを提供します。" + "title": "macOS Computer Useバックエンド", + "description": "共通のComputer Useサービスに macOS ネイティブのアプリとウィンドウのオブジェクトを提供します。" } } diff --git a/packages/experimental/cua-macos/locale/zh.json b/packages/experimental/cua-macos/locale/zh.json index 1bc1a795b4..b1b18a7181 100644 --- a/packages/experimental/cua-macos/locale/zh.json +++ b/packages/experimental/cua-macos/locale/zh.json @@ -1,6 +1,6 @@ { "meta": { - "title": "macOS 电脑操作后端", - "description": "为共享电脑操作服务提供 macOS 原生应用与窗口对象。" + "title": "macOS Computer Use后端", + "description": "为共享Computer Use服务提供 macOS 原生应用与窗口对象。" } } diff --git a/packages/experimental/cua/README.i18n.yaml b/packages/experimental/cua/README.i18n.yaml index 4e732d96ce..4dee3658d2 100644 --- a/packages/experimental/cua/README.i18n.yaml +++ b/packages/experimental/cua/README.i18n.yaml @@ -12,8 +12,8 @@ en: f4d9cc48587d62a2 zh: d1bac6c1fe7eb29e /deepseek-ai-dsh-cua/table-of-contents: - en: 0eab171f6bf125ee - zh: 1337384d6c8ee027 + en: 5db4d4fea25493b9 + zh: 65ab64fc24eb0d09 /deepseek-ai-dsh-cua/use-this-package: en: 4b4000d5eafc9256 zh: 4eeae251ec7c8ec4 diff --git a/packages/experimental/cua/README.md b/packages/experimental/cua/README.md index 60cf0779f3..d7130d7c6f 100644 --- a/packages/experimental/cua/README.md +++ b/packages/experimental/cua/README.md @@ -20,7 +20,7 @@ Inspect applications, retain window objects across PTC calls, and send actions t - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work) - [Dev Note](#dev-note) -Application consent supplies English, Chinese, and Japanese display text from `src/locales.ts` and uses the fixed approval presentation of User Questions and remains independent of the session tool-approval policy. Native icons accompany the prompt and permission-page observations, but remain outside saved identities and model results. System checks, saved grants and refusals, and icons use separate queries so each result can appear without waiting for the others. +Application consent supplies English, Chinese, and Japanese display text from `src/locales.ts`. It uses the fixed approval presentation of User Questions and remains independent of the session tool-approval policy. Native icons accompany the prompt and permission-page observations, but remain outside saved identities and model results. System checks, saved grants and refusals, and icons use separate queries so each result can appear without waiting for the others. ----- diff --git a/packages/experimental/cua/README.zh.md b/packages/experimental/cua/README.zh.md index 1008f6a4fe..c2507fc3e7 100644 --- a/packages/experimental/cua/README.zh.md +++ b/packages/experimental/cua/README.zh.md @@ -20,7 +20,7 @@ kind: "package-reference" - [已知限制与后续工作](#known-limitations-and-deferred-work) - [开发备注](#dev-note) -应用授权从 `src/locales.ts` 提供中英日展示文案,并使用 User Questions 的固定审批呈现,仍独立于会话的工具审批策略。本机图标用于授权提示和权限页展示,不进入保存的身份信息或模型结果。系统权限、持久授权与拒绝记录、图标分别查询,各项结果返回后即可显示。 +应用授权从 `src/locales.ts` 提供中英日展示文案。它使用 User Questions 的固定审批呈现,仍独立于会话的工具审批策略。本机图标用于授权提示和权限页展示,不进入保存的身份信息或模型结果。系统权限、持久授权与拒绝记录、图标分别查询,各项结果返回后即可显示。 ----- diff --git a/packages/experimental/cua/locale/en.json b/packages/experimental/cua/locale/en.json index 7317a48903..698e4dfa41 100644 --- a/packages/experimental/cua/locale/en.json +++ b/packages/experimental/cua/locale/en.json @@ -1,6 +1,6 @@ { "meta": { - "title": "Computer use service", - "description": "Shared Computer Use application objects, authorization, and logged tool execution" + "title": "Computer Use service", + "description": "Manage application access, permissions, and logged tool execution for Computer Use." } } diff --git a/packages/experimental/cua/locale/ja.json b/packages/experimental/cua/locale/ja.json index 3ec4586be0..7c5496d111 100644 --- a/packages/experimental/cua/locale/ja.json +++ b/packages/experimental/cua/locale/ja.json @@ -1,6 +1,6 @@ { "meta": { - "title": "コンピュータ操作サービス", - "description": "コンピュータ操作のアプリオブジェクト、認可、ログに記録されるツール実行を管理します。" + "title": "Computer Useサービス", + "description": "Computer Useのアプリオブジェクト、認可、ログに記録されるツール実行を管理します。" } } diff --git a/packages/experimental/cua/locale/zh.json b/packages/experimental/cua/locale/zh.json index c266ecd9a3..30da26aa7c 100644 --- a/packages/experimental/cua/locale/zh.json +++ b/packages/experimental/cua/locale/zh.json @@ -1,6 +1,6 @@ { "meta": { - "title": "电脑操作服务", - "description": "管理电脑操作的应用对象、授权和带日志的工具执行。" + "title": "Computer Use服务", + "description": "管理Computer Use的应用对象、授权和带日志的工具执行。" } } diff --git a/packages/experimental/cua/src/application-access.ts b/packages/experimental/cua/src/application-access.ts index b27f0840af..22cdb74e74 100644 --- a/packages/experimental/cua/src/application-access.ts +++ b/packages/experimental/cua/src/application-access.ts @@ -1,9 +1,9 @@ /** Application consent checked before native observations and input. */ -import { applicationAccessDisplay } from './locales.ts' import type { Context } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import { UserQuestionError, type AskUserQuestionAnswer } from '@deepseek-ai/dsh-user-questions' import { z } from 'zod' +import { applicationAccessDisplay } from './locales.ts' import { NativeError, type NativeClient } from './native-client.ts' import type { CuaAppHandle } from './types.ts' import type { CuaApplicationGrant, CuaApplicationId } from './application-types.ts' diff --git a/packages/experimental/hooks-claude-code/locale/en.json b/packages/experimental/hooks-claude-code/locale/en.json index 1df9241c8e..fc6e291794 100644 --- a/packages/experimental/hooks-claude-code/locale/en.json +++ b/packages/experimental/hooks-claude-code/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Claude Code hooks", - "description": "Bridge plugin: run a Claude Code hooks.json / settings hook config on the DeepSeek Harness interception seams" + "description": "Run hooks from Claude Code hooks.json or settings at Harness interception points." } } diff --git a/packages/experimental/hooks-codex/locale/en.json b/packages/experimental/hooks-codex/locale/en.json index a5536e7bd8..232d96f616 100644 --- a/packages/experimental/hooks-codex/locale/en.json +++ b/packages/experimental/hooks-codex/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Codex hooks", - "description": "Bridge plugin: run a Codex hooks.json hook config on the DeepSeek Harness interception seams" + "description": "Run hooks from Codex hooks.json at Harness interception points." } } diff --git a/packages/experimental/plugin-market-bundle/locale/en.json b/packages/experimental/plugin-market-bundle/locale/en.json index 71ef0d6072..99c473c02c 100644 --- a/packages/experimental/plugin-market-bundle/locale/en.json +++ b/packages/experimental/plugin-market-bundle/locale/en.json @@ -1,7 +1,7 @@ { "meta": { "title": "Custom plugin markets", - "description": "Adds a Discover tab to Plugins for browsing and installing bundles from plugin market indexes you add", + "description": "Adds a Discover tab to Plugins for browsing and installing bundles from plugin market indexes you add.", "detail": "docs/DETAIL.md" } } diff --git a/packages/experimental/ptc-runtime-python/locale/en.json b/packages/experimental/ptc-runtime-python/locale/en.json index 9e0fbb6ca9..2d517eeff8 100644 --- a/packages/experimental/ptc-runtime-python/locale/en.json +++ b/packages/experimental/ptc-runtime-python/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Python PTC runtime", - "description": "CPython subprocess implementation of the DeepSeek Harness PTC execution seam" + "description": "Run programmatic tool-calling code in CPython subprocesses." } } diff --git a/packages/experimental/session-title-all-prompts-llm/locale/en.json b/packages/experimental/session-title-all-prompts-llm/locale/en.json index 16df8b5d8e..e3678c162f 100644 --- a/packages/experimental/session-title-all-prompts-llm/locale/en.json +++ b/packages/experimental/session-title-all-prompts-llm/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "All-message session titles", - "description": "All-user-messages LLM provider plugin for DeepSeek Harness session titles" + "description": "Generate session titles from all user messages in the session." } } diff --git a/packages/experimental/tool-session-query/locale/en.json b/packages/experimental/tool-session-query/locale/en.json index f8c29cfdb2..74fbb6c35c 100644 --- a/packages/experimental/tool-session-query/locale/en.json +++ b/packages/experimental/tool-session-query/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Session history tools", - "description": "Workspace-authorized model-facing session history search, trace, and event read tools" + "description": "Search session history and read trajectories and events according to workspace permissions." } } diff --git a/packages/experimental/tool-terminal/locale/en.json b/packages/experimental/tool-terminal/locale/en.json index 82c14419cc..6e7e530cbc 100644 --- a/packages/experimental/tool-terminal/locale/en.json +++ b/packages/experimental/tool-terminal/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Persistent terminal tools", - "description": "Six model-facing persistent PTY tools with owner isolation and generic background-job integration" + "description": "Provide six persistent PTY tools with isolated session ownership and background task integration." } } diff --git a/packages/experimental/translator/locale/en.json b/packages/experimental/translator/locale/en.json index 891ae5e970..81862cf2a0 100644 --- a/packages/experimental/translator/locale/en.json +++ b/packages/experimental/translator/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Translation service", - "description": "Machine translation with reusable Session results" + "description": "Translate text and reuse translations saved in the session." } } diff --git a/packages/experimental/voice-input-bundle/locale/en.json b/packages/experimental/voice-input-bundle/locale/en.json index cfa2a70585..a88375bd63 100644 --- a/packages/experimental/voice-input-bundle/locale/en.json +++ b/packages/experimental/voice-input-bundle/locale/en.json @@ -1,7 +1,7 @@ { "meta": { "title": "Voice input", - "description": "Transcribe recordings locally with SenseVoice; first use requires installing dependencies", + "description": "Transcribe recordings locally with SenseVoice; first use requires installing dependencies.", "detail": "docs/DETAIL.md" } } diff --git a/packages/experimental/webhook-github/locale/en.json b/packages/experimental/webhook-github/locale/en.json index c58bb8609d..3fc2a6a50c 100644 --- a/packages/experimental/webhook-github/locale/en.json +++ b/packages/experimental/webhook-github/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "GitHub webhooks", - "description": "Signed GitHub HTTP webhook adapter for the DeepSeek Harness webhook runtime" + "description": "Verify signed GitHub HTTP webhooks and forward them to the Webhook service." } } diff --git a/packages/experimental/webhook/locale/en.json b/packages/experimental/webhook/locale/en.json index 654382295b..464b75e099 100644 --- a/packages/experimental/webhook/locale/en.json +++ b/packages/experimental/webhook/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Webhook runtime", - "description": "Fire-and-forget webhook rule runtime that creates Workspace-backed DeepSeek Harness Sessions" + "description": "Create Harness sessions in a workspace through Webhook rules without waiting for completion." } } diff --git a/packages/experimental/worktree/locale/en.json b/packages/experimental/worktree/locale/en.json index 12cd5d5966..b05367c81e 100644 --- a/packages/experimental/worktree/locale/en.json +++ b/packages/experimental/worktree/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Worktree service", - "description": "Creates a named Git worktree and changes the calling Session working directory" + "description": "Create named Git worktrees and change the current session's working directory." } } diff --git a/packages/extensions/tool-cordis/locale/host/ja.json b/packages/extensions/tool-cordis/locale/host/ja.json new file mode 100644 index 0000000000..69a35dcab8 --- /dev/null +++ b/packages/extensions/tool-cordis/locale/host/ja.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "プラグイン API 検査サービス" + } +} diff --git a/packages/fs/fs-local/locale/en.json b/packages/fs/fs-local/locale/en.json index fbceac5331..a3022206c6 100644 --- a/packages/fs/fs-local/locale/en.json +++ b/packages/fs/fs-local/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Local filesystem", - "description": "Local-filesystem implementation of the DeepSeek Harness filesystem seam (ctx.fs)" + "description": "Access files through the local filesystem." } } diff --git a/packages/fs/tool-str-replace-editor/locale/en.json b/packages/fs/tool-str-replace-editor/locale/en.json index d419ff3619..238d8aa7b6 100644 --- a/packages/fs/tool-str-replace-editor/locale/en.json +++ b/packages/fs/tool-str-replace-editor/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Text editor tools", - "description": "Model-facing view, create, literal replace, and line insert tool over the Harness filesystem service" + "description": "View, create, replace, and insert text through the filesystem service." } } diff --git a/packages/host/frontend-static/locale/en.json b/packages/host/frontend-static/locale/en.json index abb8abe43e..4a41a346a3 100644 --- a/packages/host/frontend-static/locale/en.json +++ b/packages/host/frontend-static/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Static frontend server", - "description": "SPA dist server for the Web shell: owns the webserver fallback seat, serving explicit index entries and static assets with traversal rejection and 404 misses" + "description": "Serve the Web application's entry page and static files, reject paths outside their directory, and return 404 for missing resources." } } diff --git a/packages/lsp/lsp-stdio/locale/en.json b/packages/lsp/lsp-stdio/locale/en.json index 9df1548f51..f3d86d7623 100644 --- a/packages/lsp/lsp-stdio/locale/en.json +++ b/packages/lsp/lsp-stdio/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Stdio language server provider", - "description": "Generic stdio language-server provider for the DeepSeek Harness LSP capability seam (ctx.lsp) — spawns configured servers, translates JSON-RPC, and serves transient-open goToDefinition/findReferences/goToImplementation/hover queries in the host filesystem namespace" + "description": "Connect to language servers through subprocesses and JSON-RPC, open files as needed, and run code queries." } } diff --git a/packages/lsp/lsp/locale/en.json b/packages/lsp/lsp/locale/en.json index a21b79509b..bbd90e3f94 100644 --- a/packages/lsp/lsp/locale/en.json +++ b/packages/lsp/lsp/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Language server service", - "description": "Abstract LSP capability seam (ctx.lsp) for the DeepSeek Harness — language-server provider registry keyed by branded id and extension mapping, order-independent per-query selection, normalized definition/references/implementation/hover requests and results, and the LspError taxonomy" + "description": "Register language servers for definition, reference, implementation, and hover queries with consistent errors." } } diff --git a/packages/lsp/tool-lsp/locale/en.json b/packages/lsp/tool-lsp/locale/en.json index 4e080b302e..f3219f891c 100644 --- a/packages/lsp/tool-lsp/locale/en.json +++ b/packages/lsp/tool-lsp/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Language server tools", - "description": "Model-facing lsp tool over the DeepSeek Harness LSP capability seam (ctx.lsp) — one read-only tool with goToDefinition/findReferences/goToImplementation/hover operations, one-based UTF-16 cursor coordinates, bounded location rendering, and hover normalization" + "description": "Query definitions, references, implementations, and hover information using one-based UTF-16 cursor positions and bounded results." } } diff --git a/packages/mcp/mcp-client/locale/en.json b/packages/mcp/mcp-client/locale/en.json index aea6577692..1ef1b105a6 100644 --- a/packages/mcp/mcp-client/locale/en.json +++ b/packages/mcp/mcp-client/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "MCP client", - "description": "MCP client bridge: connects to MCP servers and registers their tools on ctx.tools" + "description": "Connect to MCP servers and make their tools available in Harness." } } diff --git a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md index 938798a374..8a3fd8cf62 100644 --- a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md +++ b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md @@ -43,8 +43,8 @@ The files below live in this skill's base directory, which the `skill` tool repo | Web UI: Client manifest, module loader, slot registration | `references/ui-plugin.md` | | Connecting an MCP server through a configuration-only bundle | `references/mcp-bundle.md` | | Page/panel design checks and verification without browser control | `references/verification.md` | -| UI plugin template, including display resources | `templates/decoration/package.json`, `templates/decoration/cordis.patch.yml`, `templates/decoration/index.js`, `templates/decoration/client.js`, `templates/decoration/locale/en.json`, `templates/decoration/icon.svg` | -| MCP bundle template, including display resources | `templates/mcp/package.json`, `templates/mcp/cordis.patch.yml`, `templates/mcp/locale/en.json`, `templates/mcp/icon.svg` | +| UI plugin template, including display resources | `templates/decoration/package.json`, `templates/decoration/cordis.patch.yml`, `templates/decoration/index.js`, `templates/decoration/client.js`, `templates/decoration/locale/en.json`, `templates/decoration/locale/ja.json`, `templates/decoration/icon.svg` | +| MCP bundle template, including display resources | `templates/mcp/package.json`, `templates/mcp/cordis.patch.yml`, `templates/mcp/locale/en.json`, `templates/mcp/locale/ja.json`, `templates/mcp/icon.svg` | | Loader patch dialect and the list of installable plugin packages | the `cordis-composition-reference` skill | | Choosing extension points, contexts, and state mechanisms for upgrade stability and performance | `references/practices.md` | | Sharing application operations between UI actions and agent tools | `references/user-actions.md` | diff --git a/packages/sandbox/sandbox/src/escalation.ts b/packages/sandbox/sandbox/src/escalation.ts index bbd262e6cd..c912fdd080 100644 --- a/packages/sandbox/sandbox/src/escalation.ts +++ b/packages/sandbox/sandbox/src/escalation.ts @@ -16,8 +16,8 @@ * @module dsh-sandbox/escalation */ -import { escalationDisplayReason } from './locales.ts' import { assertNever } from '@deepseek-ai/dsh-util-values' +import { escalationDisplayReason } from './locales.ts' import type { SandboxMode } from './index.ts' /** diff --git a/packages/sandbox/sandbox/src/locales.ts b/packages/sandbox/sandbox/src/locales.ts index 4fde7f2514..30fc56d32d 100644 --- a/packages/sandbox/sandbox/src/locales.ts +++ b/packages/sandbox/sandbox/src/locales.ts @@ -12,7 +12,7 @@ export const zh = { /** Japanese escalation messages. */ export const ja = { - escalation: (mode: string, justification: string): string => `この操作に ${mode} 権限を許可しますか:${justification}`, + escalation: (mode: string, justification: string): string => `${mode} 権限でこの操作を許可します:${justification}`, } satisfies typeof en /** diff --git a/packages/sandbox/sandbox/tests/escalation.spec.ts b/packages/sandbox/sandbox/tests/escalation.spec.ts index e4da01c49a..987ac0105b 100644 --- a/packages/sandbox/sandbox/tests/escalation.spec.ts +++ b/packages/sandbox/sandbox/tests/escalation.spec.ts @@ -89,7 +89,7 @@ describe('approveEscalation', () => { displayReason: { en: 'Allow this operation with workspace-write permissions: the user asked to write in the workspace', zh: '允许本次操作使用 workspace-write 权限:the user asked to write in the workspace', - ja: 'この操作に workspace-write 権限を許可しますか:the user asked to write in the workspace', + ja: 'workspace-write 権限でこの操作を許可します:the user asked to write in the workspace', }, }) }) diff --git a/packages/schedule/tool-schedule/locale/en.json b/packages/schedule/tool-schedule/locale/en.json index 237c0995b2..b10c1b0a89 100644 --- a/packages/schedule/tool-schedule/locale/en.json +++ b/packages/schedule/tool-schedule/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Scheduling tools", - "description": "Model-facing reminder management tools (schedule_create, schedule_list, schedule_update, schedule_delete) over the Host ctx.schedule service" + "description": "Create, view, update, and delete automated tasks." } } diff --git a/packages/sdk/server/locale/en.json b/packages/sdk/server/locale/en.json index c584666812..09ceefd919 100644 --- a/packages/sdk/server/locale/en.json +++ b/packages/sdk/server/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SDK server", - "description": "Stdio JSON-RPC server plugin for out-of-process DeepSeek Harness SDK clients" + "description": "Serve SDK clients in separate processes through JSON-RPC over standard input and output." } } diff --git a/packages/session/message-quotes/locale/en.json b/packages/session/message-quotes/locale/en.json index 641dfab7af..dd73eca27a 100644 --- a/packages/session/message-quotes/locale/en.json +++ b/packages/session/message-quotes/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Message quotes", - "description": "Selected-text quotation and Markdown blockquote presentation" + "description": "Quote selected text and display it as a Markdown block quote." } } diff --git a/packages/session/tool-working-directory/locale/en.json b/packages/session/tool-working-directory/locale/en.json index 283113a354..e36e12288c 100644 --- a/packages/session/tool-working-directory/locale/en.json +++ b/packages/session/tool-working-directory/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Working directory tools", - "description": "Read and change the active Session working directory" + "description": "Read and change the current session's working directory." } } diff --git a/packages/session/working-directory/locale/en.json b/packages/session/working-directory/locale/en.json index 1c760c9d17..52294d6032 100644 --- a/packages/session/working-directory/locale/en.json +++ b/packages/session/working-directory/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Session working directories", - "description": "Session working directories with durable changes and model context" + "description": "Manage session working directories, save directory changes, and provide the model with working-directory context." } } diff --git a/packages/shell/bash-local/locale/en.json b/packages/shell/bash-local/locale/en.json index 7f12029522..a9f0e1a52e 100644 --- a/packages/shell/bash-local/locale/en.json +++ b/packages/shell/bash-local/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Local Bash execution", - "description": "Local-subprocess implementation of the DeepSeek Harness bash executor seam" + "description": "Run Bash commands in local subprocesses." } } diff --git a/packages/shell/pwsh-local/locale/en.json b/packages/shell/pwsh-local/locale/en.json index 3ff7f27175..658a74fa41 100644 --- a/packages/shell/pwsh-local/locale/en.json +++ b/packages/shell/pwsh-local/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Local PowerShell execution", - "description": "Local PowerShell implementation of the DeepSeek Harness bash executor seam" + "description": "Run commands through local PowerShell." } } diff --git a/packages/skill/skill-office/locale/en.json b/packages/skill/skill-office/locale/en.json index 35653e8d42..1ae1f03a36 100644 --- a/packages/skill/skill-office/locale/en.json +++ b/packages/skill/skill-office/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Office skills", - "description": "Bundled Word, PowerPoint, and Excel workflows and LibreOffice Kit operations" + "description": "Provide built-in Word, PowerPoint, and Excel workflows and LibreOffice Kit operations." } } diff --git a/packages/skill/tool-workspace-dependencies/locale/en.json b/packages/skill/tool-workspace-dependencies/locale/en.json index c954d32ba1..7de2e8689c 100644 --- a/packages/skill/tool-workspace-dependencies/locale/en.json +++ b/packages/skill/tool-workspace-dependencies/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Workspace dependencies", - "description": "The load_workspace_dependencies tool: absolute paths into a bundled Python, Node.js, and pnpm payload" + "description": "Provide absolute paths to the bundled Python, Node.js, and pnpm runtimes." } } diff --git a/packages/ssh/fs-ssh/locale/en.json b/packages/ssh/fs-ssh/locale/en.json index e5f75cca9e..7c2a0f4b9b 100644 --- a/packages/ssh/fs-ssh/locale/en.json +++ b/packages/ssh/fs-ssh/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SSH filesystem", - "description": "Filesystem provider over the shared POSIX SSH helper" + "description": "Access remote files through the shared POSIX SSH helper." } } diff --git a/packages/ssh/sandbox-ssh/locale/en.json b/packages/ssh/sandbox-ssh/locale/en.json index 51e0615ec1..393ecd6063 100644 --- a/packages/ssh/sandbox-ssh/locale/en.json +++ b/packages/ssh/sandbox-ssh/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SSH process sandbox", - "description": "Remote POSIX sandbox argv provider over the shared SSH helper" + "description": "Build sandbox commands for remote POSIX processes through the shared SSH helper." } } diff --git a/packages/ssh/ssh/locale/en.json b/packages/ssh/ssh/locale/en.json index ea2eac63ef..ac0e2e9d3d 100644 --- a/packages/ssh/ssh/locale/en.json +++ b/packages/ssh/ssh/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SSH connections", - "description": "Shared OpenSSH connection and versioned POSIX remote helper" + "description": "Share OpenSSH connections and versioned POSIX remote helpers." } } diff --git a/packages/ssh/subprocess-ssh/locale/en.json b/packages/ssh/subprocess-ssh/locale/en.json index 60420303b2..635e852b7f 100644 --- a/packages/ssh/subprocess-ssh/locale/en.json +++ b/packages/ssh/subprocess-ssh/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SSH subprocesses", - "description": "Subprocess and terminal provider over the shared POSIX SSH helper" + "description": "Provide subprocesses and terminals through the shared POSIX SSH helper." } } diff --git a/packages/storage/storage-sqlite/locale/en.json b/packages/storage/storage-sqlite/locale/en.json index e5f5ad3086..630c5d1bc7 100644 --- a/packages/storage/storage-sqlite/locale/en.json +++ b/packages/storage/storage-sqlite/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "SQLite storage", - "description": "SQLite storage backend (kv facet) for the DeepSeek Harness storage hub" + "description": "Store Harness key-value data in SQLite." } } diff --git a/packages/subagent/subagent-acp/locale/en.json b/packages/subagent/subagent-acp/locale/en.json index 6b7671a9b2..7471096997 100644 --- a/packages/subagent/subagent-acp/locale/en.json +++ b/packages/subagent/subagent-acp/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "ACP subagent backend", - "description": "Out-of-process ACP subagent backend: drives a child agent in a spawned subprocess over the Agent Client Protocol" + "description": "Run external agents in subprocesses through ACP." } } diff --git a/packages/subagent/subagent-claude-code/locale/ja.json b/packages/subagent/subagent-claude-code/locale/ja.json index 02467775d6..5bb20fc61a 100644 --- a/packages/subagent/subagent-claude-code/locale/ja.json +++ b/packages/subagent/subagent-claude-code/locale/ja.json @@ -1,6 +1,6 @@ { "meta": { "title": "Claude Code サブエージェント", - "description": "Claude Code の標準の認証と設定を使用して、単独のタスクを委派します。" + "description": "Claude Code のネイティブの認証と設定を使用して、単独のタスクを委派します。" } } diff --git a/packages/subagent/subagent-codex/locale/ja.json b/packages/subagent/subagent-codex/locale/ja.json index 987893a846..5682e53865 100644 --- a/packages/subagent/subagent-codex/locale/ja.json +++ b/packages/subagent/subagent-codex/locale/ja.json @@ -1,6 +1,6 @@ { "meta": { "title": "Codex サブエージェント", - "description": "Codex の標準の認証と設定を使用して、単独のタスクを委派します。" + "description": "Codex のネイティブの認証と設定を使用して、単独のタスクを委派します。" } } diff --git a/packages/subagent/subagent-dsh-sdk/locale/en.json b/packages/subagent/subagent-dsh-sdk/locale/en.json index 0c88dba510..421c2f8c97 100644 --- a/packages/subagent/subagent-dsh-sdk/locale/en.json +++ b/packages/subagent/subagent-dsh-sdk/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "DSH SDK subagent backend", - "description": "Out-of-process SDK subagent backend: drives a child DeepSeek Harness runtime subprocess over stdio JSON-RPC through the TypeScript SDK client" + "description": "Run Harness in a subprocess through the TypeScript SDK and JSON-RPC over standard input and output." } } diff --git a/packages/subagent/tool-subagent/locale/model-selection-settings/ja.json b/packages/subagent/tool-subagent/locale/model-selection-settings/ja.json new file mode 100644 index 0000000000..6e3b580a73 --- /dev/null +++ b/packages/subagent/tool-subagent/locale/model-selection-settings/ja.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "サブエージェントのモデル選択設定" + } +} diff --git a/packages/web/web-search-exa/locale/en.json b/packages/web/web-search-exa/locale/en.json index 6d656920f6..aaf280f917 100644 --- a/packages/web/web-search-exa/locale/en.json +++ b/packages/web/web-search-exa/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Exa web search", - "description": "Exa-backed search provider for the DeepSeek Harness web capability seam (ctx.web)" + "description": "Search the Web through Exa." } } diff --git a/packages/web/web-search-perplexity/locale/en.json b/packages/web/web-search-perplexity/locale/en.json index 87e4c3e19d..08e111e12b 100644 --- a/packages/web/web-search-perplexity/locale/en.json +++ b/packages/web/web-search-perplexity/locale/en.json @@ -1,6 +1,6 @@ { "meta": { "title": "Perplexity web search", - "description": "Perplexity-backed search provider for the DeepSeek Harness web capability seam (ctx.web)" + "description": "Search the Web through Perplexity." } } diff --git a/scripts/run-gates.spec.ts b/scripts/run-gates.spec.ts index e13778cdc1..87dcd44d4f 100644 --- a/scripts/run-gates.spec.ts +++ b/scripts/run-gates.spec.ts @@ -370,16 +370,17 @@ describe('gate graph validation', () => { expect(ids).toEqual([ 'rescope-vendor', 'publint', 'constraints', 'default-product-isolation', 'product-use', 'official-bundle-catalog', 'provider-data', 'package-dependencies', 'application-entrypoints', 'dsh-package-licenses', 'node-next-types', - 'optional-dependency-imports', 'client-packages', 'installer-locales', 'locale-metadata', 'locale-dictionaries', 'client-ui-i18n', 'client-route-resolution', 'no-bare-dispatcher', + 'optional-dependency-imports', 'client-packages', 'installer-locales', 'locale-metadata', 'client-ui-i18n', 'client-route-resolution', 'no-bare-dispatcher', 'plugin-record-callers', 'no-unknown-casts', 'no-top-level-await', 'cordis-config', 'runtime-closure', ]) }) - it('includes metadata and dictionary completeness in local and CI aggregates', () => { + it('includes JSON resource checks in local and CI aggregates', () => { for (const mode of ['i18n', 'check-all', 'ci-static', 'hygiene'] as const) { const ids = withPnpmEntrypoint(() => gatesForMode(mode).map(gate => gate.id)) - expect(ids).toEqual(expect.arrayContaining(['installer-locales', 'locale-metadata', 'locale-dictionaries'])) + expect(ids).toEqual(expect.arrayContaining(['installer-locales', 'locale-metadata'])) + if (mode !== 'i18n') expect(ids).not.toContain('locale-dictionaries') } expect(withPnpmEntrypoint(() => gatesForMode('i18n').map(gate => gate.id))) .toEqual(['installer-locales', 'locale-metadata', 'locale-dictionaries']) diff --git a/scripts/run-gates.ts b/scripts/run-gates.ts index 1041f2abb1..5392190939 100644 --- a/scripts/run-gates.ts +++ b/scripts/run-gates.ts @@ -366,7 +366,7 @@ export function gatesForMode(selected: Mode): Gate[] { case 'doc-quick': return docQuickLeafGates() case 'i18n': - return i18nGates() + return i18nGates(true) } } @@ -389,11 +389,11 @@ function ciSharedStaticGates(): Gate[] { ] } -function i18nGates(): Gate[] { +function i18nGates(includeDictionaries: boolean): Gate[] { return [ pnpmScript('installer-locales', 'verify-installer-locales', { label: 'Windows installer locales' }), pnpmScript('locale-metadata', 'verify-locale-metadata', { label: 'Japanese plugin metadata' }), - pnpmExec('locale-dictionaries', ['vitest', 'run', 'scripts/locale-dictionary-parity.spec.ts'], { label: 'locale dictionaries' }), + ...includeDictionaries ? [pnpmExec('locale-dictionaries', ['vitest', 'run', 'scripts/locale-dictionary-parity.spec.ts'], { label: 'locale dictionaries' })] : [], ] } @@ -403,7 +403,7 @@ function sharedHygieneGates(): Gate[] { label: 'optional dependency imports', }), pnpmScript('client-packages', 'verify-client-packages', { label: 'client packages' }), - ...i18nGates(), + ...i18nGates(false), pnpmScript('client-ui-i18n', 'verify-client-ui-i18n', { label: 'client UI i18n' }), pnpmScript('client-route-resolution', 'verify-client-route-resolution', { label: 'client route resolution' }), pnpmScript('no-bare-dispatcher', 'verify-no-bare-dispatcher', { label: 'proxy-aware dispatchers' }), diff --git a/scripts/verify-locale-metadata.spec.ts b/scripts/verify-locale-metadata.spec.ts index f61ac5d3cb..9a4dc45187 100644 --- a/scripts/verify-locale-metadata.spec.ts +++ b/scripts/verify-locale-metadata.spec.ts @@ -41,7 +41,7 @@ it.each([ it('checks referenced detail documents', () => { const root = fixture() const directory = join(root, 'packages/demo/plugin/locale') - const meta = { title: 'Name {name}', description: 'Description', detail: 'docs/DETAIL.md' } + const meta = { title: 'Name {name}', description: 'Description.', detail: 'docs/DETAIL.md' } for (const language of ['en', 'zh', 'ja']) writeFileSync(join(directory, `${language}.json`), JSON.stringify({ meta })) expect(localeMetadataProblems(root).join('\n')).toContain('missing detail resource') mkdirSync(join(directory, '../docs')) @@ -73,3 +73,49 @@ it('rejects loadable plugins without any locale directory', () => { writeFileSync(join(directory, 'src/index.ts'), 'export function apply() {}') expect(localeMetadataProblems(root).join('\n')).toContain('new-plugin/locale') }) + +it('checks nested subpath locale resources and package-relative detail files', () => { + const root = fixture() + const directory = join(root, 'packages/demo/plugin/locale/tools') + mkdirSync(directory) + for (const language of ['en', 'zh']) writeFileSync(join(directory, `${language}.json`), JSON.stringify({ meta: { title: 'Tools', detail: 'docs/TOOLS.md' } })) + mkdirSync(join(root, 'packages/demo/plugin/docs')) + writeFileSync(join(root, 'packages/demo/plugin/docs/TOOLS.md'), '# Tools\n') + expect(localeMetadataProblems(root).join('\n')).toContain('locale/tools') + expect(localeMetadataProblems(root).join('\n')).toContain('ja.json') + writeFileSync(join(directory, 'ja.json'), JSON.stringify({ meta: { title: 'ツール', detail: 'docs/TOOLS.md' } })) + expect(localeMetadataProblems(root)).toEqual([]) +}) + +it.each(['../../other/README.md', 'docs\\DETAIL.md', 'docs/DETAIL.txt', '/README.md'])('rejects runtime-invalid detail path %s', (detail) => { + const root = fixture({ meta: { title: '名前 {name}', description: '説明', detail } }) + expect(localeMetadataProblems(root).join('\n')).toMatch(/must (?:be a relative path|name a Markdown file)/u) +}) + +it('requires sentence punctuation for English descriptions', () => { + const root = fixture() + const file = join(root, 'packages/demo/plugin/locale/en.json') + writeFileSync(file, JSON.stringify({ meta: { title: 'Name {name}', description: 'Description' } })) + expect(localeMetadataProblems(root).join('\n')).toContain('sentence punctuation') + writeFileSync(file, JSON.stringify({ meta: { title: 'Name {name}', description: 'Description.' } })) + expect(localeMetadataProblems(root)).toEqual([]) +}) + +it('permits missing Chinese resources for loadable plugins', () => { + const root = fixture({ meta: { title: '名前 {name}' } }) + const directory = join(root, 'packages/demo/plugin') + mkdirSync(join(directory, 'src')) + writeFileSync(join(directory, 'src/index.ts'), 'export function apply() {}') + writeFileSync(join(directory, 'package.json'), JSON.stringify({ name: '@deepseek-ai/dsh-demo' })) + rmSync(join(directory, 'locale/zh.json')) + expect(localeMetadataProblems(root)).toEqual([]) +}) + +it('excludes packages formally classified as test helpers', () => { + const root = fixture() + const directory = join(root, 'packages/test-support/llm-replay') + mkdirSync(join(directory, 'src'), { recursive: true }) + writeFileSync(join(directory, 'src/index.ts'), 'export function apply() {}') + writeFileSync(join(directory, 'package.json'), JSON.stringify({ name: '@deepseek-ai/dsh-llm-replay' })) + expect(localeMetadataProblems(root)).toEqual([]) +}) diff --git a/scripts/verify-locale-metadata.ts b/scripts/verify-locale-metadata.ts index b59f62d7e7..027cb31fb4 100644 --- a/scripts/verify-locale-metadata.ts +++ b/scripts/verify-locale-metadata.ts @@ -1,6 +1,8 @@ /** Check Japanese coverage of package metadata and plugin templates without loading plugins. */ import { existsSync, globSync, readFileSync } from 'node:fs' -import { basename, dirname, join, resolve } from 'node:path' +import { basename, posix, join, resolve } from 'node:path' +import { detailPath } from '../packages/util/plugin-detail/src/document.ts' +import { PRODUCT_PACKAGE_POLICY } from './product-package-policy.ts' import { collectConfigCatalog } from './gen-config-catalog.ts' /** Flatten metadata strings and reject values that cannot be translated. */ @@ -16,16 +18,14 @@ function strings(value: unknown, key = ''): Record { * @returns actionable missing-file, field, placeholder and resource diagnostics. */ export function localeMetadataProblems(root: string): string[] { - const directories = new Set(globSync('packages/**/locale/*.json', { + const directories = new Set(globSync('packages/**/locale/**/*.json', { cwd: root, exclude: ['packages/**/node_modules/**', 'packages/**/lib/**', 'packages/**/tests/**'], - }).filter(file => ['en.json', 'zh.json', 'ja.json'].includes(basename(file))).map(dirname)) - const loadable = new Set() + }).map(file => file.replaceAll('\\', '/')).filter(file => ['en.json', 'zh.json', 'ja.json'].includes(basename(file))).map(file => posix.dirname(file))) for (const entry of collectConfigCatalog(root)) { - // Test-support providers are fixtures, outside the product plugin inventory. - if (entry.dir.startsWith('packages/test-support/')) continue + const dir = entry.dir.replaceAll('\\', '/') + if (PRODUCT_PACKAGE_POLICY[dir]?.category === 'test') continue if (entry.kind !== 'config' && entry.kind !== 'no-config') continue - const directory = join(entry.dir, 'locale') - loadable.add(directory) + const directory = `${dir}/locale` directories.add(directory) } const problems: string[] = [] @@ -35,10 +35,18 @@ export function localeMetadataProblems(root: string): string[] { const read = (language: string): Record => { const file = join(root, directory, `${language}.json`) const value: unknown = JSON.parse(readFileSync(file, 'utf8')) - return strings(value) + const dictionary = strings(value) + const detail = detailPath(dictionary['meta.detail'], `${directory}/${language}.json: meta.detail`) + const packageDir = directory.slice(0, directory.lastIndexOf('/locale')) + if (detail !== undefined && !existsSync(resolve(root, packageDir, detail))) { + throw new Error(`missing detail resource ${detail}`) + } + return dictionary } const en = read('en') - const zh = loadable.has(directory) || existsSync(join(root, directory, 'zh.json')) ? read('zh') : {} + const zh = existsSync(join(root, directory, 'zh.json')) ? read('zh') : {} + const description = en['meta.description'] + if (description !== undefined && !/[.!?]$/u.test(description)) problems.push(`${directory}/en.json: meta.description must end with sentence punctuation`) const ja = read('ja') const expected = { ...zh, ...en } for (const key of new Set([...Object.keys(expected), ...Object.keys(ja)])) { @@ -47,9 +55,6 @@ export function localeMetadataProblems(root: string): string[] { else { const placeholders = (text: string): string => (text.match(/\{\w+\}/gu) ?? []).sort().join(',') if (placeholders(ja[key]) !== placeholders(expected[key])) problems.push(`${directory}/ja.json: ${key} changes placeholders`) - if (key === 'meta.detail' && !existsSync(resolve(root, directory, '..', ja[key]))) { - problems.push(`${directory}/ja.json: missing detail resource ${ja[key]}`) - } } } } catch (error) { @@ -60,7 +65,7 @@ export function localeMetadataProblems(root: string): string[] { } if (import.meta.filename === resolve(process.argv[1] ?? '')) { - const problems = localeMetadataProblems(process.cwd()) + const problems = localeMetadataProblems(resolve(import.meta.dirname, '..')) for (const problem of problems) console.error(problem) if (problems.length > 0) process.exitCode = 1 else console.log('verify-locale-metadata: all package and template metadata has complete Japanese translations.') diff --git a/snapshots/sdk/background-wait-steer/tool-schemas.expected.json b/snapshots/sdk/background-wait-steer/tool-schemas.expected.json index 90228febab..c9fb03068a 100644 --- a/snapshots/sdk/background-wait-steer/tool-schemas.expected.json +++ b/snapshots/sdk/background-wait-steer/tool-schemas.expected.json @@ -325,7 +325,7 @@ }, { "name": "present", - "description": "Declare existing files as final deliverables for the user. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.", + "description": "Declare existing files as final deliverables for the user. Hosts may show presented files only after your turn ends, so call it once the files are final. If the user needs to review files earlier, such as before a tool call that waits for their answer, link them in your message instead. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.", "parameters": { "type": "object", "properties": {