From e711e6e0fd8ab7c7dbd464e29032eccbeda32ec7 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 4 Jun 2026 03:38:05 -0700 Subject: [PATCH] fix(ci): schema-version literal, CLI core-mock spreads, plugin-sdk type-only exports, restore pruned i18n keys --- packages/cli/src/__tests__/task-plan.test.ts | 3 +- packages/cli/src/__tests__/task-steer.test.ts | 3 +- packages/i18n/locales/en/common.json | 41 +++++++++---- packages/i18n/locales/es/common.json | 41 +++++++++---- packages/i18n/locales/fr/common.json | 41 +++++++++---- packages/i18n/locales/ko/common.json | 57 +++++++++++++------ packages/i18n/locales/zh-CN/common.json | 57 +++++++++++++------ packages/i18n/locales/zh-TW/common.json | 57 +++++++++++++------ packages/plugin-sdk/src/index.ts | 13 ++--- .../src/store/__tests__/roadmap-store.test.ts | 4 +- 10 files changed, 221 insertions(+), 96 deletions(-) diff --git a/packages/cli/src/__tests__/task-plan.test.ts b/packages/cli/src/__tests__/task-plan.test.ts index 82380561c8..a8ae3ebd3b 100644 --- a/packages/cli/src/__tests__/task-plan.test.ts +++ b/packages/cli/src/__tests__/task-plan.test.ts @@ -6,7 +6,8 @@ vi.mock("node:readline/promises", () => ({ })); // Mock @fusion/core before importing -vi.mock("@fusion/core", () => ({ +vi.mock("@fusion/core", async (importOriginal) => ({ + ...(await importOriginal()), TaskStore: vi.fn(), COLUMNS: ["triage", "todo", "in-progress", "in-review", "done", "archived"], COLUMN_LABELS: { diff --git a/packages/cli/src/__tests__/task-steer.test.ts b/packages/cli/src/__tests__/task-steer.test.ts index 7cfa7f143a..bec5070b4d 100644 --- a/packages/cli/src/__tests__/task-steer.test.ts +++ b/packages/cli/src/__tests__/task-steer.test.ts @@ -6,7 +6,8 @@ vi.mock("node:readline/promises", () => ({ })); // Mock @fusion/core before importing -vi.mock("@fusion/core", () => ({ +vi.mock("@fusion/core", async (importOriginal) => ({ + ...(await importOriginal()), TaskStore: vi.fn(), COLUMNS: ["triage", "todo", "in-progress", "in-review", "done", "archived"], COLUMN_LABELS: { diff --git a/packages/i18n/locales/en/common.json b/packages/i18n/locales/en/common.json index 4504552db5..df3c04e712 100644 --- a/packages/i18n/locales/en/common.json +++ b/packages/i18n/locales/en/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "Cancel", + "close": "Close", + "save": "Save" + }, "agents": { "ratings": { "trendDeclining": "↓ Declining", @@ -29,6 +34,7 @@ "minutesAgo_other": "{{count}}m ago" } }, + "archive": "Archive", "board": { "rejection": { "capacityExhausted": "That column is at capacity. Try again when a slot frees up.", @@ -38,6 +44,7 @@ "workflowMismatch": "Drag can't move a card between workflows. Use the workflow switcher instead." } }, + "cancel": "Cancel", "chat": { "failedToGetResponse": "Failed to get response", "failureReferenceId": "ID", @@ -47,15 +54,25 @@ "openMailboxMessage": "Open mailbox message", "toolCallArgsPrefix": "args", "toolCallResultPrefix": "result", - "toolCallsCount_one": "{{count}} tool calls", - "toolCallsCount_other": "{{count}} tool calls", - "toolCallsHeader": "Tool calls", "toolCallStatusCompleted": "completed", "toolCallStatusError": "error", "toolCallStatusErrors": "errors", "toolCallStatusRunning": "running", + "toolCallsCount_one": "{{count}} tool calls", + "toolCallsCount_other": "{{count}} tool calls", + "toolCallsHeader": "Tool calls", "viewFailureDetails": "View failure details" }, + "close": "Close", + "columns": { + "archived": "Archived", + "done": "Done", + "in-progress": "In Progress", + "in-review": "In Review", + "todo": "Todo", + "triage": "Planning" + }, + "delete": "Delete", "health": { "anomaly": { "duplicateActiveId": "Duplicate active task ID", @@ -93,6 +110,13 @@ "modelSetToDefault": "{{label}} model set to default" } }, + "nodeStatus": { + "connecting": "Connecting", + "error": "Error", + "offline": "Offline", + "online": "Online", + "unknown": "Unknown" + }, "nodes": { "auth": { "differ": "Auth credentials differ", @@ -113,13 +137,7 @@ "stopped": "Stopped" } }, - "nodeStatus": { - "connecting": "Connecting", - "error": "Error", - "offline": "Offline", - "online": "Online", - "unknown": "Unknown" - }, + "refresh": "Refresh", "research": { "providerGitHub": "GitHub", "providerLlmSynthesis": "LLM Synthesis", @@ -127,6 +145,7 @@ "providerPageFetch": "Page Fetch", "providerWebSearch": "Web Search" }, + "retry": "Retry", "routing": { "policyLabel": { "block": "Block execution", @@ -186,6 +205,7 @@ "zai": "GLM models by Zhipu AI — strong multilingual support" } }, + "skip": "Skip", "taskForm": { "nodeStatusConnecting": "Connecting", "nodeStatusError": "Error", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "Initial load", "refreshSourceManual": "Manual" }, + "tryAgain": "Try Again", "workflow": { "postMerge": "Post-merge", "preMerge": "Pre-merge", diff --git a/packages/i18n/locales/es/common.json b/packages/i18n/locales/es/common.json index 4f36dd2a2b..cd3a95ec14 100644 --- a/packages/i18n/locales/es/common.json +++ b/packages/i18n/locales/es/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "Cancelar", + "close": "Cerrar", + "save": "Guardar" + }, "agents": { "ratings": { "trendDeclining": "", @@ -29,6 +34,7 @@ "minutesAgo_other": "" } }, + "archive": "Archivar", "board": { "rejection": { "capacityExhausted": "", @@ -38,6 +44,7 @@ "workflowMismatch": "" } }, + "cancel": "Cancelar", "chat": { "failedToGetResponse": "", "failureReferenceId": "", @@ -47,15 +54,25 @@ "openMailboxMessage": "", "toolCallArgsPrefix": "", "toolCallResultPrefix": "", - "toolCallsCount_one": "", - "toolCallsCount_other": "", - "toolCallsHeader": "", "toolCallStatusCompleted": "", "toolCallStatusError": "", "toolCallStatusErrors": "", "toolCallStatusRunning": "", + "toolCallsCount_one": "", + "toolCallsCount_other": "", + "toolCallsHeader": "", "viewFailureDetails": "" }, + "close": "Cerrar", + "columns": { + "archived": "Archivado", + "done": "Hecho", + "in-progress": "En progreso", + "in-review": "En revisión", + "todo": "Por hacer", + "triage": "Planificación" + }, + "delete": "Eliminar", "health": { "anomaly": { "duplicateActiveId": "", @@ -93,6 +110,13 @@ "modelSetToDefault": "" } }, + "nodeStatus": { + "connecting": "", + "error": "", + "offline": "", + "online": "", + "unknown": "" + }, "nodes": { "auth": { "differ": "", @@ -113,13 +137,7 @@ "stopped": "" } }, - "nodeStatus": { - "connecting": "", - "error": "", - "offline": "", - "online": "", - "unknown": "" - }, + "refresh": "Actualizar", "research": { "providerGitHub": "", "providerLlmSynthesis": "", @@ -127,6 +145,7 @@ "providerPageFetch": "", "providerWebSearch": "" }, + "retry": "Reintentar", "routing": { "policyLabel": { "block": "", @@ -186,6 +205,7 @@ "zai": "" } }, + "skip": "Omitir", "taskForm": { "nodeStatusConnecting": "", "nodeStatusError": "", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "", "refreshSourceManual": "" }, + "tryAgain": "Reintentar", "workflow": { "postMerge": "", "preMerge": "", diff --git a/packages/i18n/locales/fr/common.json b/packages/i18n/locales/fr/common.json index 4f36dd2a2b..3e950dc4b7 100644 --- a/packages/i18n/locales/fr/common.json +++ b/packages/i18n/locales/fr/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "Annuler", + "close": "Fermer", + "save": "Enregistrer" + }, "agents": { "ratings": { "trendDeclining": "", @@ -29,6 +34,7 @@ "minutesAgo_other": "" } }, + "archive": "Archiver", "board": { "rejection": { "capacityExhausted": "", @@ -38,6 +44,7 @@ "workflowMismatch": "" } }, + "cancel": "Annuler", "chat": { "failedToGetResponse": "", "failureReferenceId": "", @@ -47,15 +54,25 @@ "openMailboxMessage": "", "toolCallArgsPrefix": "", "toolCallResultPrefix": "", - "toolCallsCount_one": "", - "toolCallsCount_other": "", - "toolCallsHeader": "", "toolCallStatusCompleted": "", "toolCallStatusError": "", "toolCallStatusErrors": "", "toolCallStatusRunning": "", + "toolCallsCount_one": "", + "toolCallsCount_other": "", + "toolCallsHeader": "", "viewFailureDetails": "" }, + "close": "Fermer", + "columns": { + "archived": "Archivé", + "done": "Terminé", + "in-progress": "En cours", + "in-review": "En revue", + "todo": "À faire", + "triage": "Planification" + }, + "delete": "Supprimer", "health": { "anomaly": { "duplicateActiveId": "", @@ -93,6 +110,13 @@ "modelSetToDefault": "" } }, + "nodeStatus": { + "connecting": "", + "error": "", + "offline": "", + "online": "", + "unknown": "" + }, "nodes": { "auth": { "differ": "", @@ -113,13 +137,7 @@ "stopped": "" } }, - "nodeStatus": { - "connecting": "", - "error": "", - "offline": "", - "online": "", - "unknown": "" - }, + "refresh": "Actualiser", "research": { "providerGitHub": "", "providerLlmSynthesis": "", @@ -127,6 +145,7 @@ "providerPageFetch": "", "providerWebSearch": "" }, + "retry": "Réessayer", "routing": { "policyLabel": { "block": "", @@ -186,6 +205,7 @@ "zai": "" } }, + "skip": "Ignorer", "taskForm": { "nodeStatusConnecting": "", "nodeStatusError": "", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "", "refreshSourceManual": "" }, + "tryAgain": "Réessayer", "workflow": { "postMerge": "", "preMerge": "", diff --git a/packages/i18n/locales/ko/common.json b/packages/i18n/locales/ko/common.json index 257cca389f..2cb648e1f7 100644 --- a/packages/i18n/locales/ko/common.json +++ b/packages/i18n/locales/ko/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "취소", + "close": "닫기", + "save": "저장" + }, "agents": { "ratings": { "trendDeclining": "", @@ -13,22 +18,23 @@ "triggerUserRequested": "" }, "time": { + "daysAgo_one": "", "daysAgo_other": "", + "hoursAgo_one": "", "hoursAgo_other": "", "inAMoment": "", + "inDays_one": "", "inDays_other": "", + "inHours_one": "", "inHours_other": "", + "inMinutes_one": "", "inMinutes_other": "", "justNow": "", - "minutesAgo_other": "", - "daysAgo_one": "", - "hoursAgo_one": "", - "inDays_one": "", - "inHours_one": "", - "inMinutes_one": "", - "minutesAgo_one": "" + "minutesAgo_one": "", + "minutesAgo_other": "" } }, + "archive": "보관", "board": { "rejection": { "capacityExhausted": "", @@ -38,6 +44,7 @@ "workflowMismatch": "" } }, + "cancel": "취소", "chat": { "failedToGetResponse": "", "failureReferenceId": "", @@ -47,15 +54,25 @@ "openMailboxMessage": "", "toolCallArgsPrefix": "", "toolCallResultPrefix": "", - "toolCallsCount_other": "", - "toolCallsHeader": "", "toolCallStatusCompleted": "", "toolCallStatusError": "", "toolCallStatusErrors": "", "toolCallStatusRunning": "", - "viewFailureDetails": "", - "toolCallsCount_one": "" + "toolCallsCount_one": "", + "toolCallsCount_other": "", + "toolCallsHeader": "", + "viewFailureDetails": "" }, + "close": "닫기", + "columns": { + "archived": "보관됨", + "done": "완료", + "in-progress": "진행 중", + "in-review": "검토 중", + "todo": "할 일", + "triage": "계획" + }, + "delete": "삭제", "health": { "anomaly": { "duplicateActiveId": "", @@ -93,6 +110,13 @@ "modelSetToDefault": "" } }, + "nodeStatus": { + "connecting": "", + "error": "", + "offline": "", + "online": "", + "unknown": "" + }, "nodes": { "auth": { "differ": "", @@ -113,13 +137,7 @@ "stopped": "" } }, - "nodeStatus": { - "connecting": "", - "error": "", - "offline": "", - "online": "", - "unknown": "" - }, + "refresh": "새로고침", "research": { "providerGitHub": "", "providerLlmSynthesis": "", @@ -127,6 +145,7 @@ "providerPageFetch": "", "providerWebSearch": "" }, + "retry": "재시도", "routing": { "policyLabel": { "block": "", @@ -186,6 +205,7 @@ "zai": "" } }, + "skip": "건너뛰기", "taskForm": { "nodeStatusConnecting": "", "nodeStatusError": "", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "", "refreshSourceManual": "" }, + "tryAgain": "다시 시도", "workflow": { "postMerge": "", "preMerge": "", diff --git a/packages/i18n/locales/zh-CN/common.json b/packages/i18n/locales/zh-CN/common.json index 257cca389f..b75b3a1f75 100644 --- a/packages/i18n/locales/zh-CN/common.json +++ b/packages/i18n/locales/zh-CN/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "取消", + "close": "关闭", + "save": "保存" + }, "agents": { "ratings": { "trendDeclining": "", @@ -13,22 +18,23 @@ "triggerUserRequested": "" }, "time": { + "daysAgo_one": "", "daysAgo_other": "", + "hoursAgo_one": "", "hoursAgo_other": "", "inAMoment": "", + "inDays_one": "", "inDays_other": "", + "inHours_one": "", "inHours_other": "", + "inMinutes_one": "", "inMinutes_other": "", "justNow": "", - "minutesAgo_other": "", - "daysAgo_one": "", - "hoursAgo_one": "", - "inDays_one": "", - "inHours_one": "", - "inMinutes_one": "", - "minutesAgo_one": "" + "minutesAgo_one": "", + "minutesAgo_other": "" } }, + "archive": "归档", "board": { "rejection": { "capacityExhausted": "", @@ -38,6 +44,7 @@ "workflowMismatch": "" } }, + "cancel": "取消", "chat": { "failedToGetResponse": "", "failureReferenceId": "", @@ -47,15 +54,25 @@ "openMailboxMessage": "", "toolCallArgsPrefix": "", "toolCallResultPrefix": "", - "toolCallsCount_other": "", - "toolCallsHeader": "", "toolCallStatusCompleted": "", "toolCallStatusError": "", "toolCallStatusErrors": "", "toolCallStatusRunning": "", - "viewFailureDetails": "", - "toolCallsCount_one": "" + "toolCallsCount_one": "", + "toolCallsCount_other": "", + "toolCallsHeader": "", + "viewFailureDetails": "" }, + "close": "关闭", + "columns": { + "archived": "已归档", + "done": "已完成", + "in-progress": "进行中", + "in-review": "审核中", + "todo": "待办", + "triage": "规划" + }, + "delete": "删除", "health": { "anomaly": { "duplicateActiveId": "", @@ -93,6 +110,13 @@ "modelSetToDefault": "" } }, + "nodeStatus": { + "connecting": "", + "error": "", + "offline": "", + "online": "", + "unknown": "" + }, "nodes": { "auth": { "differ": "", @@ -113,13 +137,7 @@ "stopped": "" } }, - "nodeStatus": { - "connecting": "", - "error": "", - "offline": "", - "online": "", - "unknown": "" - }, + "refresh": "刷新", "research": { "providerGitHub": "", "providerLlmSynthesis": "", @@ -127,6 +145,7 @@ "providerPageFetch": "", "providerWebSearch": "" }, + "retry": "重试", "routing": { "policyLabel": { "block": "", @@ -186,6 +205,7 @@ "zai": "" } }, + "skip": "跳过", "taskForm": { "nodeStatusConnecting": "", "nodeStatusError": "", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "", "refreshSourceManual": "" }, + "tryAgain": "重试", "workflow": { "postMerge": "", "preMerge": "", diff --git a/packages/i18n/locales/zh-TW/common.json b/packages/i18n/locales/zh-TW/common.json index 257cca389f..3d99717b89 100644 --- a/packages/i18n/locales/zh-TW/common.json +++ b/packages/i18n/locales/zh-TW/common.json @@ -1,4 +1,9 @@ { + "actions": { + "cancel": "取消", + "close": "關閉", + "save": "儲存" + }, "agents": { "ratings": { "trendDeclining": "", @@ -13,22 +18,23 @@ "triggerUserRequested": "" }, "time": { + "daysAgo_one": "", "daysAgo_other": "", + "hoursAgo_one": "", "hoursAgo_other": "", "inAMoment": "", + "inDays_one": "", "inDays_other": "", + "inHours_one": "", "inHours_other": "", + "inMinutes_one": "", "inMinutes_other": "", "justNow": "", - "minutesAgo_other": "", - "daysAgo_one": "", - "hoursAgo_one": "", - "inDays_one": "", - "inHours_one": "", - "inMinutes_one": "", - "minutesAgo_one": "" + "minutesAgo_one": "", + "minutesAgo_other": "" } }, + "archive": "封存", "board": { "rejection": { "capacityExhausted": "", @@ -38,6 +44,7 @@ "workflowMismatch": "" } }, + "cancel": "取消", "chat": { "failedToGetResponse": "", "failureReferenceId": "", @@ -47,15 +54,25 @@ "openMailboxMessage": "", "toolCallArgsPrefix": "", "toolCallResultPrefix": "", - "toolCallsCount_other": "", - "toolCallsHeader": "", "toolCallStatusCompleted": "", "toolCallStatusError": "", "toolCallStatusErrors": "", "toolCallStatusRunning": "", - "viewFailureDetails": "", - "toolCallsCount_one": "" + "toolCallsCount_one": "", + "toolCallsCount_other": "", + "toolCallsHeader": "", + "viewFailureDetails": "" }, + "close": "關閉", + "columns": { + "archived": "已封存", + "done": "已完成", + "in-progress": "進行中", + "in-review": "審查中", + "todo": "待辦", + "triage": "規劃" + }, + "delete": "刪除", "health": { "anomaly": { "duplicateActiveId": "", @@ -93,6 +110,13 @@ "modelSetToDefault": "" } }, + "nodeStatus": { + "connecting": "", + "error": "", + "offline": "", + "online": "", + "unknown": "" + }, "nodes": { "auth": { "differ": "", @@ -113,13 +137,7 @@ "stopped": "" } }, - "nodeStatus": { - "connecting": "", - "error": "", - "offline": "", - "online": "", - "unknown": "" - }, + "refresh": "重新整理", "research": { "providerGitHub": "", "providerLlmSynthesis": "", @@ -127,6 +145,7 @@ "providerPageFetch": "", "providerWebSearch": "" }, + "retry": "重試", "routing": { "policyLabel": { "block": "", @@ -186,6 +205,7 @@ "zai": "" } }, + "skip": "略過", "taskForm": { "nodeStatusConnecting": "", "nodeStatusError": "", @@ -200,6 +220,7 @@ "refreshSourceInitialLoad": "", "refreshSourceManual": "" }, + "tryAgain": "重試", "workflow": { "postMerge": "", "preMerge": "", diff --git a/packages/plugin-sdk/src/index.ts b/packages/plugin-sdk/src/index.ts index d825c3fba9..686fc89c09 100644 --- a/packages/plugin-sdk/src/index.ts +++ b/packages/plugin-sdk/src/index.ts @@ -98,14 +98,11 @@ export type { import type { FusionPlugin } from "@fusion/core"; -// Re-export the trait contribution validator + constants so plugin authors can -// validate their trait manifests with the same rules the engine enforces (U8). -export { - validatePluginTraitContribution, - PLUGIN_TRAIT_RESTRICTED_FLAGS, - PLUGIN_TRAIT_ALLOWED_HOOK_POINTS, - PLUGIN_TRAIT_SCHEMA_VERSION, -} from "@fusion/core"; +// NOTE (U8): trait-contribution VALIDATION lives in @fusion/core +// (validatePluginTraitContribution) and runs engine-side at registration. +// It is deliberately NOT re-exported here — plugin-sdk's built artifact must +// carry no @fusion runtime specifiers (see cli plugin-sdk-export test); only +// type-level re-exports are allowed from @fusion/core. const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; diff --git a/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts b/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts index eb2d6be9d3..069ce0b064 100644 --- a/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts +++ b/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts @@ -743,10 +743,10 @@ describe("RoadmapStore", () => { }); describe("schema version", () => { - it("schema version is 105 after init", () => { + it("schema version is 107 after init", () => { // Tracks @fusion/core's SCHEMA_VERSION (the roadmap store layers on core's // Database). Bump this in lockstep when core adds a migration. - expect(db.getSchemaVersion()).toBe(105); + expect(db.getSchemaVersion()).toBe(107); }); });