principles-disciple 1.72.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL.md +1 -3
- package/openclaw.plugin.json +10 -5
- package/package.json +17 -19
- package/scripts/acceptance-test.mjs +16 -73
- package/scripts/sync-plugin.mjs +382 -77
- package/src/commands/archive-impl.ts +2 -1
- package/src/commands/capabilities.ts +2 -2
- package/src/commands/context.ts +2 -2
- package/src/commands/disable-impl.ts +2 -1
- package/src/commands/evolution-status.ts +16 -16
- package/src/commands/export.ts +12 -67
- package/src/commands/pain.ts +91 -1
- package/src/commands/principle-rollback.ts +2 -1
- package/src/commands/promote-impl.ts +7 -43
- package/src/commands/rollback-impl.ts +2 -1
- package/src/commands/rollback.ts +2 -1
- package/src/commands/samples.ts +2 -1
- package/src/commands/thinking-os.ts +2 -1
- package/src/config/errors.ts +18 -2
- package/src/constants/diagnostician.ts +2 -2
- package/src/constants/tools.ts +2 -1
- package/src/core/__tests__/focus-history.test.ts +210 -0
- package/src/core/config.ts +1 -1
- package/src/core/correction-cue-learner.ts +2 -136
- package/src/core/correction-types.ts +16 -88
- package/src/core/dictionary.ts +19 -20
- package/src/core/empathy-keyword-matcher.ts +17 -289
- package/src/core/empathy-types.ts +18 -229
- package/src/core/event-log.ts +29 -132
- package/src/core/evolution-reducer.ts +21 -2
- package/src/core/evolution-types.ts +76 -464
- package/src/core/file-store.ts +80 -0
- package/src/core/focus-history.ts +228 -955
- package/src/core/local-worker-routing.ts +34 -314
- package/src/core/merge-gate-audit.ts +0 -195
- package/src/core/migration.ts +0 -1
- package/src/core/pain-diagnostic-gate.ts +154 -0
- package/src/core/pain-signal.ts +21 -138
- package/src/core/pain.ts +15 -88
- package/src/core/path-resolver.ts +0 -1
- package/src/core/paths.ts +0 -1
- package/src/core/pd-task-reconciler.ts +26 -115
- package/src/core/pd-task-service.ts +9 -9
- package/src/core/pd-task-types.ts +23 -127
- package/src/core/principle-compiler/__tests__/compiler-replay-gate.test.ts +174 -0
- package/src/core/principle-compiler/code-validator.ts +15 -42
- package/src/core/principle-compiler/compiler.ts +100 -15
- package/src/core/principle-compiler/index.ts +5 -2
- package/src/core/principle-compiler/template-generator.ts +4 -104
- package/src/core/principle-injection.ts +10 -202
- package/src/core/principle-internalization/filesystem-lifecycle-datasource.ts +42 -0
- package/src/core/principle-internalization/lifecycle-read-model.ts +39 -242
- package/src/core/principle-internalization/principle-lifecycle-service.ts +12 -10
- package/src/core/principle-tree-ledger-adapter.ts +145 -0
- package/src/core/principle-tree-ledger.ts +8 -6
- package/src/core/reflection/reflection-context.ts +14 -109
- package/src/core/replay-engine.ts +8 -500
- package/src/core/rule-host-helpers.ts +5 -35
- package/src/core/rule-host-types.ts +10 -82
- package/src/core/rule-host.ts +6 -63
- package/src/core/runtime-v2-prompt-activation-reader.ts +231 -0
- package/src/core/session-tracker.ts +87 -101
- package/src/core/shadow-observation-registry.ts +19 -48
- package/src/core/trajectory.ts +3 -1
- package/src/core/workflow-funnel-loader.ts +62 -68
- package/src/core/workspace-context.ts +46 -0
- package/src/core/workspace-dir-service.ts +1 -1
- package/src/core/workspace-dir-validation.ts +18 -9
- package/src/hooks/AGENTS.md +1 -1
- package/src/hooks/gate-block-helper.ts +71 -64
- package/src/hooks/gate.ts +183 -31
- package/src/hooks/lifecycle.ts +30 -32
- package/src/hooks/llm.ts +60 -32
- package/src/hooks/pain.ts +297 -103
- package/src/hooks/prompt.ts +400 -440
- package/src/hooks/subagent.ts +2 -29
- package/src/i18n/commands.ts +2 -10
- package/src/index.ts +95 -85
- package/src/openclaw-sdk.ts +311 -0
- package/src/service/central-database.ts +8 -4
- package/src/service/evolution-queue-migration.ts +2 -1
- package/src/service/evolution-worker.ts +163 -1786
- package/src/service/internalization-trigger-adapter.ts +302 -0
- package/src/service/keyword-optimization-service.ts +4 -4
- package/src/service/monitoring-query-service.ts +1 -215
- package/src/service/queue-io.ts +60 -331
- package/src/service/runtime-summary-service.ts +59 -16
- package/src/service/subagent-workflow/index.ts +0 -41
- package/src/service/subagent-workflow/types.ts +9 -120
- package/src/service/subagent-workflow/workflow-store.ts +2 -119
- package/src/service/workflow-watchdog.ts +0 -43
- package/src/types/event-payload.ts +16 -74
- package/src/types/event-types.ts +38 -547
- package/src/types/hygiene-types.ts +7 -30
- package/src/types/principle-tree-schema.ts +20 -222
- package/src/types/queue.ts +15 -70
- package/src/types/runtime-summary.ts +5 -49
- package/src/utils/io.ts +8 -20
- package/src/utils/retry.ts +1 -1
- package/src/utils/shadow-fingerprint.ts +2 -2
- package/src/utils/workspace-resolver.ts +50 -0
- package/templates/langs/en/core/AGENTS.md +7 -7
- package/templates/langs/en/core/BOOT.md +1 -1
- package/templates/langs/en/core/HEARTBEAT.md +2 -2
- package/templates/langs/en/principles/THINKING_OS.md +3 -2
- package/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +1 -72
- package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +6 -6
- package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +6 -6
- package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +2 -12
- package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +2 -12
- package/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +51 -15
- package/templates/langs/en/skills/evolve-task/SKILL.md +3 -3
- package/templates/langs/en/skills/pd-cli-operator/SKILL.md +67 -0
- package/templates/langs/en/skills/pd-diagnostician/SKILL.md +1 -1
- package/templates/langs/en/skills/pd-mentor/SKILL.md +2 -3
- package/templates/langs/en/skills/pd-pain-signal/SKILL.md +17 -39
- package/templates/langs/en/skills/pd-runtime-v2/SKILL.md +61 -0
- package/templates/langs/zh/core/AGENTS.md +7 -7
- package/templates/langs/zh/core/BOOT.md +1 -1
- package/templates/langs/zh/core/HEARTBEAT.md +2 -2
- package/templates/langs/zh/principles/THINKING_OS.md +3 -2
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +1 -72
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +6 -6
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +6 -6
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +8 -8
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +2 -12
- package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +2 -12
- package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +51 -15
- package/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +21 -5
- package/templates/langs/zh/skills/evolve-task/SKILL.md +4 -4
- package/templates/langs/zh/skills/pd-cli-operator/SKILL.md +67 -0
- package/templates/langs/zh/skills/pd-diagnostician/SKILL.md +1 -1
- package/templates/langs/zh/skills/pd-mentor/SKILL.md +2 -3
- package/templates/langs/zh/skills/pd-pain-signal/SKILL.md +17 -38
- package/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +61 -0
- package/tests/build-artifacts.test.ts +1 -3
- package/tests/commands/evolution-status.test.ts +0 -118
- package/tests/core/bootstrap-rules.test.ts +1 -1
- package/tests/core/config.test.ts +1 -1
- package/tests/core/event-log.test.ts +35 -0
- package/tests/core/evolution-engine.test.ts +610 -0
- package/tests/core/file-store.test.ts +102 -0
- package/tests/core/focus-history.test.ts +203 -11
- package/tests/core/merge-gate-audit.test.ts +2 -169
- package/tests/core/migration.test.ts +7 -7
- package/tests/core/model-deployment-registry.test.ts +7 -1
- package/tests/core/model-training-registry.test.ts +19 -0
- package/tests/core/observability.test.ts +0 -1
- package/tests/core/pain-diagnostic-gate.test.ts +498 -0
- package/tests/core/pain.test.ts +0 -1
- package/tests/core/path-resolver.test.ts +1 -1
- package/tests/core/paths-refactor.test.ts +0 -22
- package/tests/core/principle-internalization/deprecated-readiness.test.ts +2 -2
- package/tests/core/principle-internalization/lifecycle-metrics.test.ts +2 -2
- package/tests/core/principle-internalization/{internalization-routing-policy.test.ts → lifecycle-routing-policy.test.ts} +6 -6
- package/tests/core/principle-internalization/lineage-source-retired.test.ts +56 -0
- package/tests/core/principle-internalization/principle-lifecycle-service.test.ts +1 -23
- package/tests/core/principle-tree-ledger-adapter.test.ts +253 -0
- package/tests/core/reflection-context.test.ts +0 -14
- package/tests/core/replay-engine.test.ts +127 -215
- package/tests/core/rule-host-helpers.test.ts +2 -2
- package/tests/core/rule-implementation-runtime.test.ts +0 -27
- package/tests/core/workflow-funnel-loader.test.ts +162 -0
- package/tests/core/workspace-context.test.ts +2 -2
- package/tests/core/workspace-dir-validation.test.ts +8 -1
- package/tests/core-anti-growth.test.ts +191 -0
- package/tests/hook-workspace-nextaction-contract.test.ts +42 -0
- package/tests/hooks/confirm-first-removal.test.ts +188 -0
- package/tests/hooks/gate-auto-correct-shadow.test.ts +310 -0
- package/tests/hooks/gate-auto-correct.test.ts +665 -0
- package/tests/hooks/gate-no-path-write-tool.test.ts +172 -0
- package/tests/hooks/gate-rule-host-pipeline.test.ts +2 -1
- package/tests/hooks/pain.test.ts +269 -12
- package/tests/hooks/prompt-characterization.test.ts +500 -0
- package/tests/hooks/prompt-size-guard.test.ts +32 -17
- package/tests/hooks/runtime-v2-prompt-activation.test.ts +869 -0
- package/tests/index.test.ts +94 -1
- package/tests/integration/auto-entry-gate.test.ts +248 -0
- package/tests/integration/internalization-trigger-guard.test.ts +69 -0
- package/tests/integration/m8-legacy-paths.test.ts +63 -0
- package/tests/integration/runtime-v2-pain-guard.test.ts +125 -0
- package/tests/plugin-config-resolution-cutover.test.ts +359 -0
- package/tests/runtime-v2-discovery-guard.test.ts +154 -0
- package/tests/service/central-database.test.ts +457 -0
- package/tests/service/evolution-worker.correction-observer.test.ts +173 -0
- package/tests/service/evolution-worker.timeout.test.ts +11 -129
- package/tests/service/internalization-trigger-adapter.test.ts +251 -0
- package/tests/service/monitoring-query-service.test.ts +1 -47
- package/tests/service/queue-io.test.ts +1 -62
- package/tests/service/runtime-summary-service.test.ts +3 -1
- package/tests/service/workflow-watchdog.test.ts +0 -91
- package/tests/utils/file-lock.test.ts +5 -3
- package/tests/utils/session-key.test.ts +52 -0
- package/tests/utils/subagent-probe.test.ts +48 -1
- package/vitest.config.ts +4 -11
- package/.planning/codebase/ARCHITECTURE.md +0 -157
- package/.planning/codebase/CONCERNS.md +0 -145
- package/.planning/codebase/CONVENTIONS.md +0 -148
- package/.planning/codebase/INTEGRATIONS.md +0 -81
- package/.planning/codebase/STACK.md +0 -87
- package/.planning/codebase/STRUCTURE.md +0 -193
- package/.planning/codebase/TESTING.md +0 -243
- package/.planning/phases/01-basic-visualization/01-GAP-CLOSURE-VERIFICATION.md +0 -113
- package/docs/COMMAND_REFERENCE.md +0 -76
- package/docs/COMMAND_REFERENCE_EN.md +0 -79
- package/scripts/build-web.mjs +0 -46
- package/scripts/diagnose-nocturnal.mjs +0 -537
- package/scripts/seed-nocturnal-scenarios.mjs +0 -384
- package/src/commands/nocturnal-review.ts +0 -322
- package/src/commands/nocturnal-rollout.ts +0 -790
- package/src/commands/nocturnal-train.ts +0 -986
- package/src/commands/pd-reflect.ts +0 -88
- package/src/core/adaptive-thresholds.ts +0 -478
- package/src/core/diagnostician-task-store.ts +0 -192
- package/src/core/nocturnal-arbiter.ts +0 -715
- package/src/core/nocturnal-artifact-lineage.ts +0 -116
- package/src/core/nocturnal-artificer.ts +0 -257
- package/src/core/nocturnal-candidate-scoring.ts +0 -530
- package/src/core/nocturnal-compliance.ts +0 -1146
- package/src/core/nocturnal-dataset.ts +0 -763
- package/src/core/nocturnal-executability.ts +0 -428
- package/src/core/nocturnal-export.ts +0 -499
- package/src/core/nocturnal-paths.ts +0 -240
- package/src/core/nocturnal-reasoning-deriver.ts +0 -343
- package/src/core/nocturnal-rule-implementation-validator.ts +0 -246
- package/src/core/nocturnal-snapshot-contract.ts +0 -99
- package/src/core/nocturnal-trajectory-extractor.ts +0 -512
- package/src/core/nocturnal-trinity-types.ts +0 -218
- package/src/core/nocturnal-trinity.ts +0 -2680
- package/src/core/principle-internalization/deprecated-readiness.ts +0 -93
- package/src/core/principle-internalization/internalization-routing-policy.ts +0 -208
- package/src/core/principle-internalization/lifecycle-metrics.ts +0 -152
- package/src/http/principles-console-route.ts +0 -709
- package/src/service/central-health-service.ts +0 -49
- package/src/service/central-overview-service.ts +0 -138
- package/src/service/control-ui-query-service.ts +0 -900
- package/src/service/cooldown-strategy.ts +0 -97
- package/src/service/evolution-pain-context.ts +0 -79
- package/src/service/evolution-query-service.ts +0 -407
- package/src/service/health-query-service.ts +0 -1038
- package/src/service/nocturnal-config.ts +0 -214
- package/src/service/nocturnal-runtime.ts +0 -734
- package/src/service/nocturnal-service.ts +0 -1605
- package/src/service/nocturnal-target-selector.ts +0 -545
- package/src/service/sleep-cycle.ts +0 -157
- package/src/service/startup-reconciler.ts +0 -112
- package/src/service/subagent-workflow/correction-observer-types.ts +0 -82
- package/src/service/subagent-workflow/correction-observer-workflow-manager.ts +0 -250
- package/src/service/subagent-workflow/deep-reflect-workflow-manager.ts +0 -1
- package/src/service/subagent-workflow/dynamic-timeout.ts +0 -30
- package/src/service/subagent-workflow/empathy-observer-workflow-manager.ts +0 -268
- package/src/service/subagent-workflow/nocturnal-workflow-manager.ts +0 -795
- package/src/service/subagent-workflow/runtime-direct-driver.ts +0 -268
- package/src/service/subagent-workflow/workflow-manager-base.ts +0 -580
- package/src/tools/write-pain-flag.ts +0 -215
- package/templates/langs/en/skills/plan-script/SKILL.md +0 -32
- package/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
- package/tests/commands/nocturnal-review.test.ts +0 -448
- package/tests/commands/nocturnal-train.test.ts +0 -97
- package/tests/commands/pd-reflect.test.ts +0 -49
- package/tests/core/adaptive-thresholds.test.ts +0 -261
- package/tests/core/nocturnal-arbiter.test.ts +0 -559
- package/tests/core/nocturnal-artifact-lineage.test.ts +0 -53
- package/tests/core/nocturnal-artificer.test.ts +0 -241
- package/tests/core/nocturnal-candidate-scoring.test.ts +0 -532
- package/tests/core/nocturnal-compliance-p-principles.test.ts +0 -133
- package/tests/core/nocturnal-compliance.test.ts +0 -646
- package/tests/core/nocturnal-dataset.test.ts +0 -892
- package/tests/core/nocturnal-e2e.test.ts +0 -234
- package/tests/core/nocturnal-executability.test.ts +0 -357
- package/tests/core/nocturnal-export.test.ts +0 -517
- package/tests/core/nocturnal-reasoning-deriver.test.ts +0 -372
- package/tests/core/nocturnal-reviewed-subset-comparison.test.ts +0 -428
- package/tests/core/nocturnal-rule-implementation-validator.test.ts +0 -127
- package/tests/core/nocturnal-snapshot-contract.test.ts +0 -121
- package/tests/core/nocturnal-trajectory-extractor.test.ts +0 -634
- package/tests/core/nocturnal-trinity.test.ts +0 -2053
- package/tests/core/pain-auto-repair.test.ts +0 -96
- package/tests/core/pain-integration.test.ts +0 -510
- package/tests/fixtures/nocturnal-reviewed-subset.json +0 -183
- package/tests/http/principles-console-route.test.ts +0 -162
- package/tests/integration/chaos-resilience.test.ts +0 -348
- package/tests/integration/empathy-workflow-integration.test.ts +0 -626
- package/tests/integration/pain-diagnostician-loop.e2e.test.ts +0 -380
- package/tests/service/control-ui-query-service.test.ts +0 -121
- package/tests/service/cooldown-strategy.test.ts +0 -164
- package/tests/service/data-endpoints-regression.test.ts +0 -834
- package/tests/service/empathy-observer-workflow-manager.test.ts +0 -175
- package/tests/service/evolution-worker.nocturnal.test.ts +0 -601
- package/tests/service/nocturnal-runtime-hardening.test.ts +0 -118
- package/tests/service/nocturnal-runtime.test.ts +0 -473
- package/tests/service/nocturnal-service-code-candidate.test.ts +0 -330
- package/tests/service/nocturnal-target-selector.test.ts +0 -615
- package/tests/service/startup-reconciler.test.ts +0 -148
- package/tests/tools/write-pain-flag.test.ts +0 -358
- package/ui/src/App.tsx +0 -45
- package/ui/src/api.ts +0 -220
- package/ui/src/charts.tsx +0 -955
- package/ui/src/components/ErrorState.tsx +0 -6
- package/ui/src/components/Loading.tsx +0 -13
- package/ui/src/components/ProtectedRoute.tsx +0 -12
- package/ui/src/components/Shell.tsx +0 -91
- package/ui/src/components/WorkspaceConfig.tsx +0 -178
- package/ui/src/components/index.ts +0 -5
- package/ui/src/context/auth.tsx +0 -80
- package/ui/src/context/theme.tsx +0 -66
- package/ui/src/hooks/useAutoRefresh.ts +0 -39
- package/ui/src/i18n/ui.ts +0 -473
- package/ui/src/main.tsx +0 -16
- package/ui/src/pages/EvolutionPage.tsx +0 -333
- package/ui/src/pages/FeedbackPage.tsx +0 -138
- package/ui/src/pages/GateMonitorPage.tsx +0 -136
- package/ui/src/pages/LoginPage.tsx +0 -89
- package/ui/src/pages/OverviewPage.tsx +0 -599
- package/ui/src/pages/SamplesPage.tsx +0 -174
- package/ui/src/pages/ThinkingModelsPage.tsx +0 -702
- package/ui/src/styles.css +0 -2020
- package/ui/src/types.ts +0 -384
- package/ui/src/utils/format.ts +0 -15
package/ui/src/i18n/ui.ts
DELETED
|
@@ -1,473 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI internationalization module.
|
|
3
|
-
* Provides bilingual strings for the Principles Console WebUI.
|
|
4
|
-
* Uses the same pattern as packages/openclaw-plugin/src/i18n/commands.ts
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export type SupportedLanguage = 'zh' | 'en';
|
|
8
|
-
|
|
9
|
-
export function normalizeLanguage(lang: string): SupportedLanguage {
|
|
10
|
-
if (lang.toLowerCase().startsWith('zh')) return 'zh';
|
|
11
|
-
return 'en';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function getLanguage(): SupportedLanguage {
|
|
15
|
-
if (typeof navigator !== 'undefined') {
|
|
16
|
-
return normalizeLanguage(navigator.language);
|
|
17
|
-
}
|
|
18
|
-
return 'en';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const i18n = {
|
|
22
|
-
// ========================================================================
|
|
23
|
-
// Shell / Navigation
|
|
24
|
-
// ========================================================================
|
|
25
|
-
nav: {
|
|
26
|
-
overview: { zh: '工作区健康度', en: 'Workspace Health' },
|
|
27
|
-
evolution: { zh: '进化追踪', en: 'Evolution' },
|
|
28
|
-
samples: { zh: '样本审核', en: 'Samples' },
|
|
29
|
-
thinkingModels: { zh: '思维模型', en: 'Thinking Models' },
|
|
30
|
-
feedback: { zh: '反馈回路', en: 'Feedback Loop' },
|
|
31
|
-
gateMonitor: { zh: 'Gate 监控', en: 'Gate Monitor' },
|
|
32
|
-
exportSamples: { zh: '导出样本', en: 'Export Samples' },
|
|
33
|
-
logout: { zh: '退出登录', en: 'Logout' },
|
|
34
|
-
},
|
|
35
|
-
brand: {
|
|
36
|
-
title: { zh: '进化控制台', en: 'Principles Console' },
|
|
37
|
-
subtitle: { zh: 'AI Agent 自主进化监控平台', en: 'AI Agent Evolution Monitoring Platform' },
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
// ========================================================================
|
|
41
|
-
// Common / Shared
|
|
42
|
-
// ========================================================================
|
|
43
|
-
common: {
|
|
44
|
-
loading: { zh: '加载中...', en: 'Loading...' },
|
|
45
|
-
noData: { zh: '暂无数据', en: 'No data' },
|
|
46
|
-
actions: { zh: '操作', en: 'Actions' },
|
|
47
|
-
cancel: { zh: '取消', en: 'Cancel' },
|
|
48
|
-
confirm: { zh: '确认', en: 'Confirm' },
|
|
49
|
-
refresh: { zh: '刷新', en: 'Refresh' },
|
|
50
|
-
back: { zh: '返回', en: 'Back' },
|
|
51
|
-
lastUpdated: { zh: '最后更新', en: 'Last updated' },
|
|
52
|
-
timeRange: { zh: '时间范围', en: 'Time Range' },
|
|
53
|
-
total: { zh: '共', en: 'Total' },
|
|
54
|
-
items: { zh: '条', en: 'items' },
|
|
55
|
-
search: { zh: '搜索...', en: 'Search...' },
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
// ========================================================================
|
|
59
|
-
// Time Range Selector
|
|
60
|
-
// ========================================================================
|
|
61
|
-
timeRange: {
|
|
62
|
-
days7: { zh: '7天', en: '7 days' },
|
|
63
|
-
days14: { zh: '14天', en: '14 days' },
|
|
64
|
-
days30: { zh: '30天', en: '30 days' },
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
// ========================================================================
|
|
68
|
-
// Auth / Login
|
|
69
|
-
// ========================================================================
|
|
70
|
-
auth: {
|
|
71
|
-
checking: { zh: '正在验证身份...', en: 'Verifying identity...' },
|
|
72
|
-
loginTitle: { zh: 'Principles Console', en: 'Principles Console' },
|
|
73
|
-
loginSubtitle: { zh: 'AI Agent 进化流程监控平台', en: 'AI Agent Evolution Monitoring Platform' },
|
|
74
|
-
tokenLabel: { zh: 'Gateway Token', en: 'Gateway Token' },
|
|
75
|
-
tokenPlaceholder: { zh: '请输入您的 Gateway Token', en: 'Enter your Gateway Token' },
|
|
76
|
-
tokenHint: { zh: '在服务器上运行 openclaw config get gateway.auth.token 获取 Token', en: 'Run openclaw config get gateway.auth.token on your server to get the Token' },
|
|
77
|
-
loginButton: { zh: '登 录', en: 'Sign In' },
|
|
78
|
-
validatingButton: { zh: '正在验证...', en: 'Validating...' },
|
|
79
|
-
errorEmpty: { zh: '请输入 Gateway Token', en: 'Please enter a Gateway Token' },
|
|
80
|
-
errorInvalid: { zh: 'Token 无效或已过期,请检查后重试', en: 'Token is invalid or expired, please try again' },
|
|
81
|
-
howToGetToken: { zh: '如何获取 Token?', en: 'How to get your Token?' },
|
|
82
|
-
step1: { zh: 'SSH 登录到运行 OpenClaw Gateway 的服务器', en: 'SSH into your server running OpenClaw Gateway' },
|
|
83
|
-
step2: { zh: '运行命令查看配置:cat ~/.openclaw/openclaw.json', en: 'Run: cat ~/.openclaw/openclaw.json to view config' },
|
|
84
|
-
step3: { zh: '复制 gateway.auth.token 的值', en: 'Copy the value of gateway.auth.token' },
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
// ========================================================================
|
|
88
|
-
// Overview Page
|
|
89
|
-
// ========================================================================
|
|
90
|
-
overview: {
|
|
91
|
-
pageTitle: { zh: '工作区健康度', en: 'Workspace Health' },
|
|
92
|
-
freshness: { zh: '数据新鲜度', en: 'Freshness' },
|
|
93
|
-
syncAll: { zh: '同步全部', en: 'Sync All' },
|
|
94
|
-
syncing: { zh: '同步中...', en: 'Syncing...' },
|
|
95
|
-
workspacesEnabled: { zh: '个工作区已启用', en: 'workspaces enabled' },
|
|
96
|
-
|
|
97
|
-
// Health Cards — Plain language (Phase 5 rewritten)
|
|
98
|
-
health: {
|
|
99
|
-
// GFI → 今日健康度
|
|
100
|
-
gfi: { zh: '今日健康度', en: 'Health Status' },
|
|
101
|
-
gfiExplain: { zh: 'AI 今天的整体表现状态', en: 'AI performance state today' },
|
|
102
|
-
threshold: { zh: '警戒线', en: 'Warning Line' },
|
|
103
|
-
peakToday: { zh: '今日最高', en: 'Today\'s Peak' },
|
|
104
|
-
// PainFlag → 问题检测
|
|
105
|
-
painFlag: { zh: '问题检测', en: 'Issue Detection' },
|
|
106
|
-
active: { zh: '发现问题', en: 'Issues Found' },
|
|
107
|
-
normal: { zh: '一切正常', en: 'All Clear' },
|
|
108
|
-
noActivePain: { zh: '未检测到异常', en: 'No anomalies detected' },
|
|
109
|
-
source: { zh: '问题类型', en: 'Issue Type' },
|
|
110
|
-
// Trust Stage → 权限等级
|
|
111
|
-
trustStage: { zh: '权限等级', en: 'Permission Level' },
|
|
112
|
-
stage: { zh: '等级', en: 'Level' },
|
|
113
|
-
score: { zh: '信任分', en: 'Trust Score' },
|
|
114
|
-
trustDesc: {
|
|
115
|
-
observer: { zh: '只能观察,不能修改代码', en: 'Can observe but cannot modify code' },
|
|
116
|
-
editor: { zh: '可以编辑,高风险操作需确认', en: 'Can edit, high-risk ops need approval' },
|
|
117
|
-
developer: { zh: '可以执行大多数操作', en: 'Can perform most operations' },
|
|
118
|
-
architect: { zh: '完全信任,可自主决策', en: 'Full trust, can act autonomously' },
|
|
119
|
-
},
|
|
120
|
-
// EP Tier → 进化等级
|
|
121
|
-
epTier: { zh: '进化等级', en: 'Evolution Level' },
|
|
122
|
-
points: { zh: '进化值', en: 'Evolution XP' },
|
|
123
|
-
tierDesc: {
|
|
124
|
-
seed: { zh: '初始阶段,刚开始学习', en: 'Just starting, still learning' },
|
|
125
|
-
sprout: { zh: '萌芽阶段,有了基础认知', en: 'Sprouting, building basic understanding' },
|
|
126
|
-
sapling: { zh: '成长阶段,能处理常见场景', en: 'Growing, handling common scenarios' },
|
|
127
|
-
tree: { zh: '成熟阶段,经验丰富', en: 'Mature, experienced' },
|
|
128
|
-
forest: { zh: '专家阶段,高度自主', en: 'Expert level, highly autonomous' },
|
|
129
|
-
},
|
|
130
|
-
// Principles → 原则管理
|
|
131
|
-
principlesTotal: { zh: '原则总数', en: 'Total Principles' },
|
|
132
|
-
candidate: { zh: '候选', en: 'Candidate' },
|
|
133
|
-
probation: { zh: '试用中', en: 'Probation' },
|
|
134
|
-
active2: { zh: '已激活', en: 'Active' },
|
|
135
|
-
deprecated: { zh: '已废弃', en: 'Deprecated' },
|
|
136
|
-
// Queue → 任务队列
|
|
137
|
-
queueBacklog: { zh: '任务队列', en: 'Task Queue' },
|
|
138
|
-
pending: { zh: '等待中', en: 'Waiting' },
|
|
139
|
-
inProgress: { zh: '执行中', en: 'Running' },
|
|
140
|
-
completed: { zh: '已完成', en: 'Done' },
|
|
141
|
-
// Summary card
|
|
142
|
-
todaySummary: { zh: '今日摘要', en: 'Today\'s Summary' },
|
|
143
|
-
totalCalls: { zh: '总调用', en: 'Total Calls' },
|
|
144
|
-
successRate: { zh: '成功率', en: 'Success Rate' },
|
|
145
|
-
blockedOps: { zh: '拦截操作', en: 'Blocked Ops' },
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
// KPI labels
|
|
149
|
-
repeatErrorRate: { zh: '重复错误率', en: 'Repeat Error Rate' },
|
|
150
|
-
userCorrectionRate: { zh: '用户纠正率', en: 'User Correction Rate' },
|
|
151
|
-
pendingSamples: { zh: '待审样本', en: 'Pending Samples' },
|
|
152
|
-
approvedSamples: { zh: '已批准样本', en: 'Approved Samples' },
|
|
153
|
-
thinkingCoverage: { zh: '思维覆盖率', en: 'Thinking Coverage' },
|
|
154
|
-
painEvents: { zh: '痛点事件', en: 'Pain Events' },
|
|
155
|
-
|
|
156
|
-
// Section headers
|
|
157
|
-
recentTrend: { zh: '近期趋势', en: 'Recent Trend' },
|
|
158
|
-
topRegressions: { zh: '高频退化', en: 'Top Regressions' },
|
|
159
|
-
sampleQueue: { zh: '样本队列', en: 'Sample Queue' },
|
|
160
|
-
thinkingSummary: { zh: '思维摘要', en: 'Thinking Summary' },
|
|
161
|
-
thinkingDistribution: {
|
|
162
|
-
zh: 'AI 思维使用分布',
|
|
163
|
-
en: 'AI Thinking Model Usage',
|
|
164
|
-
},
|
|
165
|
-
thinkingDistributionDesc: {
|
|
166
|
-
zh: 'AI 使用了哪些思维模型来思考问题?柱状越高表示用得越多。',
|
|
167
|
-
en: 'Which thinking models does the AI use? Higher bars mean more usage.',
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
// Thinking summary fields
|
|
171
|
-
activeModels: { zh: '活跃模型', en: 'Active Models' },
|
|
172
|
-
dormantModels: { zh: '休眠模型', en: 'Dormant Models' },
|
|
173
|
-
effectiveModels: { zh: '有效模型', en: 'Effective Models' },
|
|
174
|
-
coverage: { zh: '覆盖率', en: 'Coverage' },
|
|
175
|
-
principleEvents: { zh: '原则事件', en: 'Principle Events' },
|
|
176
|
-
|
|
177
|
-
// Trend row suffixes
|
|
178
|
-
calls: { zh: '次调用', en: 'calls' },
|
|
179
|
-
failures: { zh: '次失败', en: 'failures' },
|
|
180
|
-
corrections: { zh: '次纠正', en: 'corrections' },
|
|
181
|
-
thinkingTurns: { zh: '思维轮次', en: 'thinking turns' },
|
|
182
|
-
|
|
183
|
-
// Table column headers
|
|
184
|
-
qualityScore: { zh: '质量分', en: 'Score' },
|
|
185
|
-
reviewStatus: { zh: '状态', en: 'Status' },
|
|
186
|
-
createdAt: { zh: '创建时间', en: 'Created At' },
|
|
187
|
-
failureMode: { zh: '失败模式', en: 'Failure Mode' },
|
|
188
|
-
relatedThinking: { zh: '相关思维', en: 'Thinking Hits' },
|
|
189
|
-
|
|
190
|
-
// Missing i18n keys (previously hardcoded in components)
|
|
191
|
-
noGfiToday: { zh: '今日暂无 GFI 记录', en: 'No GFI data today' },
|
|
192
|
-
noWorkspacesFound: { zh: '未找到已启用的工作区', en: 'No enabled workspaces found' },
|
|
193
|
-
refreshing: { zh: '刷新中', en: 'Refreshing' },
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
// ========================================================================
|
|
197
|
-
// Samples Page
|
|
198
|
-
// ========================================================================
|
|
199
|
-
samples: {
|
|
200
|
-
pageTitle: { zh: '样本审核', en: 'Sample Review' },
|
|
201
|
-
statusFilter: { zh: '状态', en: 'Status' },
|
|
202
|
-
statusAll: { zh: '全部', en: 'All' },
|
|
203
|
-
statusPending: { zh: '待审', en: 'Pending' },
|
|
204
|
-
statusApproved: { zh: '已批准', en: 'Approved' },
|
|
205
|
-
statusRejected: { zh: '已拒绝', en: 'Rejected' },
|
|
206
|
-
|
|
207
|
-
// Empty state
|
|
208
|
-
emptyTitle: { zh: '选择一条样本', en: 'Select a sample' },
|
|
209
|
-
emptyDesc: { zh: '点击左侧列表中的样本,查看bad attempt、纠正内容和相关思维命中', en: 'Click a sample from the list to inspect the bad attempt, correction, and related thinking hits' },
|
|
210
|
-
|
|
211
|
-
// Detail sections
|
|
212
|
-
badAttempt: { zh: '错误尝试', en: 'Bad Attempt' },
|
|
213
|
-
userCorrection: { zh: '用户纠正', en: 'User Correction' },
|
|
214
|
-
recoveryToolSpan: { zh: '恢复工具链', en: 'Recovery Tool Span' },
|
|
215
|
-
relatedThinkingHits: { zh: '相关思维命中', en: 'Related Thinking Hits' },
|
|
216
|
-
reviewHistory: { zh: '审核历史', en: 'Review History' },
|
|
217
|
-
noNote: { zh: '无备注', en: 'No note' },
|
|
218
|
-
noScenarios: { zh: '无场景', en: 'No scenarios' },
|
|
219
|
-
|
|
220
|
-
// Actions
|
|
221
|
-
approve: { zh: '批准', en: 'Approve' },
|
|
222
|
-
reject: { zh: '拒绝', en: 'Reject' },
|
|
223
|
-
|
|
224
|
-
// Error messages (previously hardcoded English)
|
|
225
|
-
reviewFailed: { zh: '审核操作失败', en: 'Review operation failed' },
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
// ========================================================================
|
|
229
|
-
// Thinking Models Page
|
|
230
|
-
// ========================================================================
|
|
231
|
-
thinkingModels: {
|
|
232
|
-
pageTitle: { zh: '思维模型', en: 'Thinking Models' },
|
|
233
|
-
coverage: { zh: '覆盖率', en: 'Coverage' },
|
|
234
|
-
active: { zh: '活跃', en: 'Active' },
|
|
235
|
-
dormant: { zh: '休眠', en: 'Dormant' },
|
|
236
|
-
effective: { zh: '有效', en: 'Effective' },
|
|
237
|
-
|
|
238
|
-
// Charts and sections
|
|
239
|
-
coverageTrend: { zh: '覆盖率趋势', en: 'Coverage Trend' },
|
|
240
|
-
emptyCoverageTrend: { zh: '今日暂无覆盖率记录', en: 'No coverage data yet' },
|
|
241
|
-
emptyCoverageTrendDesc: { zh: '当 AI 开始执行任务后,覆盖率会自动记录。', en: 'Coverage is tracked automatically once AI starts working.' },
|
|
242
|
-
scenarioHeatmap: { zh: '场景热力图', en: 'Scenario Heatmap' },
|
|
243
|
-
emptyScenarioMatrix: { zh: '暂无场景数据', en: 'No scenario data yet' },
|
|
244
|
-
emptyScenarioMatrixDesc: { zh: '模型触发场景后会在此显示。', en: 'Scenarios will appear here when models are triggered.' },
|
|
245
|
-
emptyAllActive: { zh: '所有模型都在使用中', en: 'All models are active' },
|
|
246
|
-
emptyAllActiveDesc: { zh: '没有休眠模型。', en: 'No dormant models.' },
|
|
247
|
-
noModelsYet: { zh: '暂无思维模型数据', en: 'No thinking model data yet' },
|
|
248
|
-
noModelsYetDesc: { zh: 'AI 开始使用后,这里会显示思维模型的使用情况。', en: 'Thinking model usage will appear here once AI starts working.' },
|
|
249
|
-
noMatches: { zh: '没有匹配的模型', en: 'No models match your filters.' },
|
|
250
|
-
|
|
251
|
-
// Recommendations
|
|
252
|
-
dormantModels: { zh: '休眠模型', en: 'Dormant Models' },
|
|
253
|
-
reinforce: { zh: '保持', en: 'Reinforce' },
|
|
254
|
-
rework: { zh: '重构', en: 'Rework' },
|
|
255
|
-
archive: { zh: '归档', en: 'Archive' },
|
|
256
|
-
filterByRec: { zh: '按推荐过滤', en: 'Filter by Rec' },
|
|
257
|
-
|
|
258
|
-
// Detail sections
|
|
259
|
-
outcomeStats: { zh: '效果统计', en: 'Outcome Stats' },
|
|
260
|
-
usageTrend: { zh: '使用趋势', en: 'Usage Trend' },
|
|
261
|
-
emptyUsageTrend: { zh: '暂无使用趋势记录', en: 'No usage trend data yet' },
|
|
262
|
-
emptyUsageTrendDesc: { zh: '该模型尚未被触发使用。', en: 'This model has not been triggered yet.' },
|
|
263
|
-
success: { zh: '成功', en: 'Success' },
|
|
264
|
-
failure: { zh: '失败', en: 'Failure' },
|
|
265
|
-
pain: { zh: '痛点', en: 'Pain' },
|
|
266
|
-
correction: { zh: '纠正', en: 'Correction' },
|
|
267
|
-
scenarioDistribution: { zh: '场景分布', en: 'Scenario Distribution' },
|
|
268
|
-
recentEvents: { zh: '最近事件', en: 'Recent Events' },
|
|
269
|
-
toolContext: { zh: '工具上下文', en: 'Tool Context' },
|
|
270
|
-
painContext: { zh: '痛点上下文', en: 'Pain Context' },
|
|
271
|
-
principleContext: { zh: '原则上下文', en: 'Principle Context' },
|
|
272
|
-
trigger: { zh: '触发条件', en: 'Trigger' },
|
|
273
|
-
antiPattern: { zh: '禁止行为', en: 'Anti-Pattern' },
|
|
274
|
-
thinkingOsSource: { zh: '思维模型定义来源', en: 'Thinking Model Source' },
|
|
275
|
-
|
|
276
|
-
// Empty state
|
|
277
|
-
emptyTitle: { zh: '选择一个思维模型', en: 'Select a thinking model' },
|
|
278
|
-
emptyDesc: { zh: '点击左侧列表中的模型,查看场景分布和最近事件', en: 'Click a model from the list to inspect scenario coverage and recent events' },
|
|
279
|
-
noDataTitle: { zh: '思维模型定义', en: 'Thinking Model Definitions' },
|
|
280
|
-
noDataDesc: { zh: '以下是 10 个思维模型的定义。当 AI 开始使用后,这里会显示每个模型的使用统计。', en: 'Below are 10 thinking model definitions. Usage statistics will appear once the AI starts working.' },
|
|
281
|
-
noUsageDataYet: { zh: '该模型暂无使用数据', en: 'No usage data for this model yet' },
|
|
282
|
-
noUsageDataDesc: { zh: '当模型被触发后,使用趋势和事件会在此显示。', en: 'Usage trends and events will appear once the model is triggered.' },
|
|
283
|
-
|
|
284
|
-
// Table
|
|
285
|
-
hits: { zh: '命中', en: 'Hits' },
|
|
286
|
-
successRate: { zh: '成功率', en: 'Success Rate' },
|
|
287
|
-
failureRate: { zh: '失败率', en: 'Failure Rate' },
|
|
288
|
-
|
|
289
|
-
// Comparison mode
|
|
290
|
-
compare: { zh: '对比', en: 'Compare' },
|
|
291
|
-
compareSelected: { zh: '对比选中', en: 'Compare Selected' },
|
|
292
|
-
exitCompare: { zh: '退出对比', en: 'Exit Compare' },
|
|
293
|
-
comparisonTitle: { zh: '模型对比', en: 'Model Comparison' },
|
|
294
|
-
comparisonEmpty: { zh: '请选择至少 2 个模型进行对比', en: 'Select at least 2 models to compare' },
|
|
295
|
-
|
|
296
|
-
// Search and sort
|
|
297
|
-
filterAll: { zh: '全部', en: 'All' },
|
|
298
|
-
searchPlaceholder: { zh: '按名称或场景搜索...', en: 'Search by name or scenario...' },
|
|
299
|
-
sortByHits: { zh: '命中数', en: 'Hits' },
|
|
300
|
-
sortBySuccessRate: { zh: '成功率', en: 'Success Rate' },
|
|
301
|
-
sortByName: { zh: '名称', en: 'Name' },
|
|
302
|
-
|
|
303
|
-
// Loading states
|
|
304
|
-
loadingDetail: { zh: '正在加载模型详情...', en: 'Loading model details...' },
|
|
305
|
-
loadingComparison: { zh: '正在加载对比数据...', en: 'Loading comparison data...' },
|
|
306
|
-
modelLoading: { zh: '加载中', en: 'Loading' },
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
// ========================================================================
|
|
310
|
-
// Evolution Page
|
|
311
|
-
// ========================================================================
|
|
312
|
-
evolution: {
|
|
313
|
-
pageTitle: { zh: '进化流程追踪', en: 'Evolution Tracking' },
|
|
314
|
-
|
|
315
|
-
// Status badges
|
|
316
|
-
pending: { zh: '待处理', en: 'Pending' },
|
|
317
|
-
inProgress: { zh: '处理中', en: 'In Progress' },
|
|
318
|
-
completed: { zh: '已完成', en: 'Completed' },
|
|
319
|
-
failed: { zh: '失败', en: 'Failed' },
|
|
320
|
-
|
|
321
|
-
// Active stage labels
|
|
322
|
-
activeStage: {
|
|
323
|
-
pending: { zh: '等待中', en: 'Pending' },
|
|
324
|
-
in_progress: { zh: '进行中', en: 'In Progress' },
|
|
325
|
-
completed: { zh: '已完成', en: 'Completed' },
|
|
326
|
-
idle: { zh: '空闲', en: 'Idle' },
|
|
327
|
-
},
|
|
328
|
-
enhancementLoopStatus: { zh: '增强回路当前状态', en: 'Enhancement Loop Status' },
|
|
329
|
-
|
|
330
|
-
// Stage labels (used in STAGE_LABELS)
|
|
331
|
-
stageLabels: {
|
|
332
|
-
pain_detected: { zh: '痛点检测', en: 'Pain Detected' },
|
|
333
|
-
queued: { zh: '已入队', en: 'Queued' },
|
|
334
|
-
started: { zh: '开始处理', en: 'Started' },
|
|
335
|
-
analyzing: { zh: '分析中', en: 'Analyzing' },
|
|
336
|
-
principle_generated: { zh: '原则生成', en: 'Principle Generated' },
|
|
337
|
-
completed: { zh: '已完成', en: 'Completed' },
|
|
338
|
-
// Principle status labels
|
|
339
|
-
candidate: { zh: '候选', en: 'Candidate' },
|
|
340
|
-
probation: { zh: '试用', en: 'Probation' },
|
|
341
|
-
active: { zh: '活跃', en: 'Active' },
|
|
342
|
-
deprecated: { zh: '废弃', en: 'Deprecated' },
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
// Status filter
|
|
346
|
-
filterAll: { zh: '全部', en: 'All' },
|
|
347
|
-
statusFilter: { zh: '状态筛选', en: 'Status Filter' },
|
|
348
|
-
taskLabel: { zh: '任务', en: 'Task' },
|
|
349
|
-
|
|
350
|
-
// Section headers
|
|
351
|
-
statusDistribution: { zh: '状态分布', en: 'Status Distribution' },
|
|
352
|
-
recentActivity: { zh: '近期活动', en: 'Recent Activity' },
|
|
353
|
-
stageDistribution: { zh: '阶段分布', en: 'Stage Distribution' },
|
|
354
|
-
|
|
355
|
-
// Activity
|
|
356
|
-
created: { zh: '新增', en: 'Created' },
|
|
357
|
-
finished: { zh: '完成', en: 'Finished' },
|
|
358
|
-
|
|
359
|
-
// Table
|
|
360
|
-
score: { zh: '分数', en: 'Score' },
|
|
361
|
-
source: { zh: '来源', en: 'Source' },
|
|
362
|
-
duration: { zh: '耗时', en: 'Duration' },
|
|
363
|
-
events: { zh: '事件', en: 'Events' },
|
|
364
|
-
|
|
365
|
-
// Empty state
|
|
366
|
-
emptyTitle: { zh: '选择一个任务', en: 'Select a task' },
|
|
367
|
-
emptyDesc: { zh: '点击左侧列表中的任务,查看进化时间线和详细事件', en: 'Click a task from the list to view its evolution timeline and detailed events' },
|
|
368
|
-
|
|
369
|
-
// Detail
|
|
370
|
-
evolutionTimeline: { zh: '进化时间线', en: 'Evolution Timeline' },
|
|
371
|
-
detailedEvents: { zh: '详细事件', en: 'Detailed Events' },
|
|
372
|
-
reason: { zh: '原因', en: 'Reason' },
|
|
373
|
-
|
|
374
|
-
// EvolutionPage panel headers (previously hardcoded Chinese)
|
|
375
|
-
currentStage: { zh: '当前阶段', en: 'Current Stage' },
|
|
376
|
-
principleLifecycle: { zh: '原则生命周期', en: 'Principle Lifecycle' },
|
|
377
|
-
nocturnalTrainingStatus: { zh: '夜间训练状态', en: 'Nocturnal Training Status' },
|
|
378
|
-
trainingQueue: { zh: '训练队列', en: 'Training Queue' },
|
|
379
|
-
arbiterPassRate: { zh: 'Arbiter 通过率', en: 'Arbiter Pass Rate' },
|
|
380
|
-
orpoSampleCount: { zh: 'ORPO 样本数', en: 'ORPO Sample Count' },
|
|
381
|
-
modelDeployments: { zh: '模型部署', en: 'Model Deployments' },
|
|
382
|
-
deploymentCount: { zh: '个', en: 'deployments' },
|
|
383
|
-
pendingShort: { zh: '待', en: 'P' },
|
|
384
|
-
inProgressShort: { zh: '中', en: 'I' },
|
|
385
|
-
completedShort: { zh: '完', en: 'C' },
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
// ========================================================================
|
|
389
|
-
// Workspace Config
|
|
390
|
-
// ========================================================================
|
|
391
|
-
workspace: {
|
|
392
|
-
title: { zh: '工作区配置', en: 'Workspace Configuration' },
|
|
393
|
-
addWorkspace: { zh: '添加', en: 'Add' },
|
|
394
|
-
cancel: { zh: '取消', en: 'Cancel' },
|
|
395
|
-
adding: { zh: '添加中...', en: 'Adding...' },
|
|
396
|
-
workspaceName: { zh: '工作区名称', en: 'Workspace Name' },
|
|
397
|
-
path: { zh: '路径', en: 'Path' },
|
|
398
|
-
include: { zh: '纳入', en: 'Include' },
|
|
399
|
-
sync: { zh: '同步', en: 'Sync' },
|
|
400
|
-
placeholder: {
|
|
401
|
-
name: { zh: 'workspace-custom', en: 'workspace-custom' },
|
|
402
|
-
path: { zh: '/home/user/.openclaw/workspace-custom', en: '/home/user/.openclaw/workspace-custom' },
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
|
|
406
|
-
// ========================================================================
|
|
407
|
-
// Feedback / Gate Monitor
|
|
408
|
-
// ========================================================================
|
|
409
|
-
feedback: {
|
|
410
|
-
pageTitle: { zh: '反馈回路', en: 'Feedback Loop' },
|
|
411
|
-
pageSubtitle: { zh: 'GFI 监控与同理心检测', en: 'GFI Monitoring & Empathy Detection' },
|
|
412
|
-
gfiDashboard: { zh: 'GFI 实时仪表盘', en: 'GFI Real-time Dashboard' },
|
|
413
|
-
threshold: { zh: '阈值', en: 'Threshold' },
|
|
414
|
-
peakToday: { zh: '今日峰值', en: 'Peak Today' },
|
|
415
|
-
hourlyTrend: { zh: '小时趋势', en: 'Hourly Trend' },
|
|
416
|
-
empathyEvents: { zh: '同理心检测事件', en: 'Empathy Events' },
|
|
417
|
-
gateBlocks: { zh: 'GFI 拦截关联', en: 'GFI Gate Blocks' },
|
|
418
|
-
noEmpathyEvents: { zh: '暂无同理心事件', en: 'No Empathy Events' },
|
|
419
|
-
noEmpathyEventsDesc: { zh: '尚未检测到同理心偏移事件', en: 'No empathy deviation events detected yet' },
|
|
420
|
-
noGateBlocks: { zh: '暂无拦截记录', en: 'No Gate Blocks' },
|
|
421
|
-
noGateBlocksDesc: { zh: '尚未有 GFI 拦截记录', en: 'No GFI gate blocks recorded yet' },
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
gate: {
|
|
425
|
-
pageTitle: { zh: 'Gate 监控', en: 'Gate Monitor' },
|
|
426
|
-
pageSubtitle: { zh: '拦截统计与 Trust/EP 双轨', en: 'Block Statistics & Trust/EP Dual Track' },
|
|
427
|
-
todayStats: { zh: '今日拦截统计', en: "Today's Block Statistics" },
|
|
428
|
-
gfiBlocks: { zh: 'GFI 拦截', en: 'GFI Blocks' },
|
|
429
|
-
stageBlocks: { zh: 'Stage 限制', en: 'Stage Limits' },
|
|
430
|
-
p03Blocks: { zh: 'P-03 不匹配', en: 'P-03 Mismatch' },
|
|
431
|
-
bypassAttempts: { zh: '绕过尝试', en: 'Bypass Attempts' },
|
|
432
|
-
p16Exemptions: { zh: 'P-16 豁免', en: 'P-16 Exemptions' },
|
|
433
|
-
trustEngine: { zh: 'Trust Engine', en: 'Trust Engine' },
|
|
434
|
-
evolutionEngine: { zh: 'Evolution Engine', en: 'Evolution Engine' },
|
|
435
|
-
blockHistory: { zh: '拦截历史', en: 'Block History' },
|
|
436
|
-
score: { zh: '分数', en: 'Score' },
|
|
437
|
-
points: { zh: '积分', en: 'Points' },
|
|
438
|
-
noGateBlocks: { zh: '暂无拦截记录', en: 'No Gate Blocks' },
|
|
439
|
-
noGateBlocksDesc: { zh: '尚未有 GFI 拦截记录', en: 'No GFI gate blocks recorded yet' },
|
|
440
|
-
},
|
|
441
|
-
} as const;
|
|
442
|
-
|
|
443
|
-
export type I18nKey = keyof typeof i18n;
|
|
444
|
-
export type I18n = typeof i18n;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Get a translated string by dot-path key.
|
|
448
|
-
* Usage: t('overview.pageTitle')
|
|
449
|
-
*/
|
|
450
|
-
export function t<K extends string>(
|
|
451
|
-
path: K
|
|
452
|
-
): string {
|
|
453
|
-
const keys = path.split('.');
|
|
454
|
-
let value: unknown = i18n;
|
|
455
|
-
for (const key of keys) {
|
|
456
|
-
if (value == null || typeof value !== 'object') return path;
|
|
457
|
-
value = (value as Record<string, unknown>)[key];
|
|
458
|
-
}
|
|
459
|
-
if (typeof value === 'object' && value !== null) {
|
|
460
|
-
const lang = getLanguage();
|
|
461
|
-
return String((value as Record<string, unknown>)[lang] ?? (value as Record<string, unknown>).en ?? path);
|
|
462
|
-
}
|
|
463
|
-
return typeof value === 'string' ? value : path;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* useI18n hook for React components.
|
|
468
|
-
* Returns a t function that uses the detected language.
|
|
469
|
-
*/
|
|
470
|
-
export function useI18n() {
|
|
471
|
-
const lang = getLanguage();
|
|
472
|
-
return { t, lang };
|
|
473
|
-
}
|
package/ui/src/main.tsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import App from './App';
|
|
4
|
-
import './styles.css';
|
|
5
|
-
|
|
6
|
-
const container = document.getElementById('root');
|
|
7
|
-
|
|
8
|
-
if (!container) {
|
|
9
|
-
throw new Error('Missing root container');
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
createRoot(container).render(
|
|
13
|
-
<React.StrictMode>
|
|
14
|
-
<App />
|
|
15
|
-
</React.StrictMode>,
|
|
16
|
-
);
|