@cortex-agent/server 2026.6.11 → 2026.6.18-2

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.
Files changed (105) hide show
  1. package/defaults/config/thread-templates.json +2 -2
  2. package/defaults/hooks/task-status-check.mjs +9 -7
  3. package/defaults/plugins/cortex-stage-gate/skills/task/SKILL.md +103 -16
  4. package/defaults/plugins/cortex-system/skills/orient/SKILL.md +6 -6
  5. package/defaults/plugins/cortex-system/skills/thread/SKILL.md +29 -35
  6. package/defaults/prompts/directives/manager.md +21 -11
  7. package/dist/agent-adapter/claude/spawn-args.d.ts +5 -0
  8. package/dist/agent-adapter/claude/spawn-args.js +6 -0
  9. package/dist/agent-adapter/types.d.ts +4 -0
  10. package/dist/core/gateway-generator.js +24 -3
  11. package/dist/core/i18n.d.ts +19 -0
  12. package/dist/core/i18n.js +46 -0
  13. package/dist/core/locales/en.d.ts +438 -0
  14. package/dist/core/locales/en.js +24 -0
  15. package/dist/core/locales/slices/commands.d.ts +214 -0
  16. package/dist/core/locales/slices/commands.js +462 -0
  17. package/dist/core/locales/slices/init.d.ts +121 -0
  18. package/dist/core/locales/slices/init.js +380 -0
  19. package/dist/core/locales/slices/interactions.d.ts +47 -0
  20. package/dist/core/locales/slices/interactions.js +102 -0
  21. package/dist/core/locales/slices/lang.d.ts +8 -0
  22. package/dist/core/locales/slices/lang.js +18 -0
  23. package/dist/core/locales/slices/scheduling.d.ts +36 -0
  24. package/dist/core/locales/slices/scheduling.js +74 -0
  25. package/dist/core/locales/slices/startup.d.ts +6 -0
  26. package/dist/core/locales/slices/startup.js +14 -0
  27. package/dist/core/locales/slices/status.d.ts +20 -0
  28. package/dist/core/locales/slices/status.js +48 -0
  29. package/dist/core/locales/zh.d.ts +5 -0
  30. package/dist/core/locales/zh.js +23 -0
  31. package/dist/core/singleton-lock.d.ts +23 -0
  32. package/dist/core/singleton-lock.js +53 -0
  33. package/dist/core/status-format.js +2 -1
  34. package/dist/core/task-parser.d.ts +6 -0
  35. package/dist/core/task-parser.js +10 -0
  36. package/dist/core/types/thread-types.d.ts +29 -0
  37. package/dist/core/utils.d.ts +9 -1
  38. package/dist/core/utils.js +9 -1
  39. package/dist/domain/agents/config.d.ts +2 -1
  40. package/dist/domain/agents/config.js +25 -6
  41. package/dist/domain/agents/facade.d.ts +4 -0
  42. package/dist/domain/agents/facade.js +3 -1
  43. package/dist/domain/mcp/core-server.js +15 -9
  44. package/dist/domain/mcp/tools/task-monitor.d.ts +2 -0
  45. package/dist/domain/mcp/tools/task-monitor.js +99 -0
  46. package/dist/domain/mcp/tools/thread-ops.js +50 -85
  47. package/dist/domain/scheduling/jobs/task-dispatch.js +18 -16
  48. package/dist/domain/scheduling/schedule-command.js +38 -37
  49. package/dist/domain/system/github-release.d.ts +18 -0
  50. package/dist/domain/system/github-release.js +106 -0
  51. package/dist/domain/system/preferences.d.ts +12 -0
  52. package/dist/domain/system/preferences.js +36 -0
  53. package/dist/domain/tasks/dispatch-utils.d.ts +5 -0
  54. package/dist/domain/tasks/dispatch-utils.js +9 -1
  55. package/dist/domain/tasks/dispatcher.d.ts +11 -2
  56. package/dist/domain/tasks/dispatcher.js +41 -11
  57. package/dist/domain/tasks/system/task-cli.d.ts +1 -0
  58. package/dist/domain/tasks/system/task-cli.js +82 -6
  59. package/dist/domain/tasks/system/task-mutations.d.ts +6 -1
  60. package/dist/domain/tasks/system/task-mutations.js +10 -1
  61. package/dist/domain/threads/hook-runner.js +1 -0
  62. package/dist/domain/threads/prompt-builder.d.ts +6 -0
  63. package/dist/domain/threads/prompt-builder.js +34 -11
  64. package/dist/domain/threads/runner.d.ts +5 -0
  65. package/dist/domain/threads/runner.js +44 -11
  66. package/dist/domain/threads/state-machine.d.ts +9 -12
  67. package/dist/domain/threads/state-machine.js +27 -50
  68. package/dist/entry/app.js +36 -3
  69. package/dist/entry/daemon.js +12 -30
  70. package/dist/entry/init.d.ts +4 -3
  71. package/dist/entry/init.js +151 -208
  72. package/dist/entry/startup-notify.js +6 -3
  73. package/dist/hooks/task-status-check.mjs +9 -7
  74. package/dist/orchestration/interactions/interaction-handlers.js +12 -11
  75. package/dist/orchestration/interactions/update-prompt-slack.js +11 -10
  76. package/dist/orchestration/interactions/update-prompt.js +66 -11
  77. package/dist/orchestration/lifecycle.js +13 -12
  78. package/dist/orchestration/routing/commands/cancel.js +10 -9
  79. package/dist/orchestration/routing/commands/channel.js +27 -26
  80. package/dist/orchestration/routing/commands/cost.js +10 -2
  81. package/dist/orchestration/routing/commands/device.js +11 -9
  82. package/dist/orchestration/routing/commands/dispatch.js +10 -10
  83. package/dist/orchestration/routing/commands/index.js +6 -2
  84. package/dist/orchestration/routing/commands/lang.d.ts +3 -0
  85. package/dist/orchestration/routing/commands/lang.js +31 -0
  86. package/dist/orchestration/routing/commands/mode.js +28 -27
  87. package/dist/orchestration/routing/commands/nvtop.js +13 -12
  88. package/dist/orchestration/routing/commands/orient.js +2 -1
  89. package/dist/orchestration/routing/commands/schedule.js +23 -22
  90. package/dist/orchestration/routing/commands/sendfile.js +8 -7
  91. package/dist/orchestration/routing/commands/session.js +11 -10
  92. package/dist/orchestration/routing/commands/status.js +78 -71
  93. package/dist/orchestration/routing/commands/tail.js +6 -5
  94. package/dist/orchestration/routing/commands/task.js +23 -22
  95. package/dist/orchestration/routing/commands/thread-handlers.js +40 -39
  96. package/dist/orchestration/routing/webhook.js +38 -1
  97. package/dist/orchestration/status-helpers.js +6 -5
  98. package/dist/orchestration/thread-callback.d.ts +11 -1
  99. package/dist/orchestration/thread-callback.js +66 -30
  100. package/dist/platform/adapters/feishu.d.ts +27 -0
  101. package/dist/platform/adapters/feishu.js +136 -4
  102. package/dist/platform/interactive-builder.js +19 -18
  103. package/dist/store/version-migrations.d.ts +7 -0
  104. package/dist/store/version-migrations.js +88 -0
  105. package/package.json +1 -1
@@ -0,0 +1,380 @@
1
+ // input: nothing (leaf data slice)
2
+ // output: initEn / initZh — `cortex init` wizard + `cortex config` message slice
3
+ // pos: one locale slice; aggregated by core/locales/en.ts & zh.ts barrels
4
+ // >>> Keep en and zh keys in lockstep (zh typed against keyof typeof initEn) <<<
5
+ export const initEn = {
6
+ // ── Clipboard / manifest copy prompt ──
7
+ 'init.clipboard.prompt': '\nPress "c" to copy manifest to clipboard (any other key to skip)...',
8
+ 'init.clipboard.copied': 'Manifest copied to clipboard!',
9
+ 'init.clipboard.failed': 'Could not copy. If running in a terminal, ensure OSC 52 is enabled.',
10
+ 'init.clipboard.manual': 'The manifest text is shown above — please copy it manually.',
11
+ // ── Backend install ──
12
+ 'init.backend.alreadyInstalled': '${label} is already installed.',
13
+ 'init.backend.installing': 'Installing ${label}...',
14
+ 'init.backend.installed': '${label} installed successfully.',
15
+ 'init.backend.installFailed': 'Failed to install ${label}.',
16
+ 'init.backend.installFailedHint': 'Installation failed. Install manually: ${command}',
17
+ 'init.backend.loginHint.claude': 'Run `claude login` to authenticate.',
18
+ 'init.backend.loginHint.pi': 'Configure your provider in PI settings.',
19
+ 'init.backend.label.claude': 'Claude Code',
20
+ 'init.backend.label.pi': 'PI',
21
+ // ── Service registration ──
22
+ 'init.service.launchdWritten': 'launchd plist written to ${path}',
23
+ 'init.service.launchdStartHint': 'To start now: launchctl load ${path}',
24
+ 'init.service.systemdUserWritten': 'systemd unit written to ${path}',
25
+ 'init.service.systemdUserEnableHint': 'To enable: sudo systemctl --user enable --now cortex',
26
+ 'init.service.systemdInstalled': 'systemd unit installed to ${path}',
27
+ 'init.service.systemdEnableHint': 'To enable: sudo systemctl enable --now cortex',
28
+ 'init.service.systemInstallFailed': 'Failed to install system service: ${message}',
29
+ 'init.service.noSudo': 'No sudo access. Service file saved locally.',
30
+ 'init.service.manualInstallHint': 'To install manually:\n sudo cp ${localPath} ${systemPath}\n sudo systemctl daemon-reload\n sudo systemctl enable --now cortex',
31
+ 'init.service.unsupported': 'Service registration is not supported on ${platform}. Start Cortex manually with `cortex daemon`.',
32
+ // ── Cancel ──
33
+ 'init.cancel': 'Init cancelled.',
34
+ // ── Slack setup ──
35
+ 'init.slack.manifestTitle': 'Slack App Manifest — copy and paste when creating the app',
36
+ 'init.slack.guide': [
37
+ 'To set up Slack, you need a Slack App:',
38
+ '',
39
+ '1. Go to https://api.slack.com/apps',
40
+ '2. Click "Create New App" → "From a manifest"',
41
+ '3. Select your workspace, then paste the manifest (shown above)',
42
+ '4. Go to "Basic Information" → copy the Signing Secret',
43
+ '5. Under Basic Information, generate an App-Level Token',
44
+ ' (scope: connections:write, name it "cortex-socket")',
45
+ '6. Go to "OAuth & Permissions" → Install to Workspace',
46
+ ' Copy the *Bot User OAuth Token* after installing',
47
+ '7. Go to "App Home" → Show Tabs → enable *Messages Tab*',
48
+ ' and check "Allow users to send messages from the messages tab"',
49
+ ' (required for DM support)',
50
+ '',
51
+ 'The manifest includes socket_mode_enabled, so Socket Mode',
52
+ 'is automatically enabled when you import it.',
53
+ '',
54
+ 'Required Bot Token Scopes (included in manifest):',
55
+ ' chat:write, im:history, im:write, reactions:read, reactions:write,',
56
+ ' users:read, commands, app_mentions:read,',
57
+ ' channels:history, channels:read, groups:history,',
58
+ ' files:read, files:write, emoji:read, pins:read, pins:write',
59
+ ].join('\n'),
60
+ 'init.slack.guideTitle': 'Slack App Setup Guide',
61
+ 'init.slack.prefillFound': 'Found existing Slack configuration. Press Enter to skip, or type anything to re-enter.',
62
+ 'init.slack.skipPrompt': 'Skip Slack configuration? (Enter = skip, any key + Enter = re-enter)',
63
+ 'init.slack.skipPlaceholder': 'Press Enter to skip',
64
+ 'init.slack.signingSecretPrompt': 'Step 1/3: SLACK_SIGNING_SECRET (from Basic Information):',
65
+ 'init.slack.signingSecretRequired': 'Signing secret is required.',
66
+ 'init.slack.appTokenPrompt': 'Step 2/3: SLACK_APP_TOKEN (App-Level Token, starts with xapp-):',
67
+ 'init.slack.appTokenRequired': 'App token is required.',
68
+ 'init.slack.appTokenPrefix': 'Token should start with xapp-',
69
+ 'init.slack.botTokenPrompt': 'Step 3/3: SLACK_BOT_TOKEN (Bot User OAuth Token, starts with xoxb-):',
70
+ 'init.slack.botTokenRequired': 'Bot token is required.',
71
+ 'init.slack.botTokenPrefix': 'Token should start with xoxb-',
72
+ // ── Feishu setup ──
73
+ 'init.feishu.guide': [
74
+ 'To set up Feishu (飞书), create a Feishu app:',
75
+ '',
76
+ '1. Go to https://open.feishu.cn/app',
77
+ '2. Click "Create Agentic App" (创建agentic应用)',
78
+ '3. Enter agent name (e.g. CortexAgent), select an avatar, and click Create',
79
+ '4. After creation, the page will display App ID and App Secret — copy them directly',
80
+ '5. Enable bot events and subscribe to: im.message.receive_v1',
81
+ '',
82
+ 'Identity for MCP document operations (docx/wiki/bitable/sheets/drive):',
83
+ ' - bot: documents are created/owned by the app (default)',
84
+ ' - user: documents are created/owned by YOUR Feishu account (Recommended)',
85
+ ].join('\n'),
86
+ 'init.feishu.guideTitle': 'Feishu App Setup Guide',
87
+ 'init.feishu.appIdPrompt': 'FEISHU_APP_ID:',
88
+ 'init.feishu.appIdRequired': 'App ID is required.',
89
+ 'init.feishu.appSecretPrompt': 'FEISHU_APP_SECRET:',
90
+ 'init.feishu.appSecretRequired': 'App secret is required.',
91
+ 'init.feishu.domainPrompt': 'FEISHU_DOMAIN (optional, "feishu" or "lark"):',
92
+ 'init.feishu.domainPlaceholder': 'feishu (leave blank to use default)',
93
+ 'init.feishu.authModePrompt': 'Identity for MCP document operations:',
94
+ 'init.feishu.authModeBotLabel': 'bot',
95
+ 'init.feishu.authModeBotHint': 'documents owned by the app',
96
+ 'init.feishu.authModeUserLabel': 'user (Recommended)',
97
+ 'init.feishu.authModeUserHint': 'documents owned by your Feishu account',
98
+ 'init.feishu.loginStarting': 'Starting Feishu user login (OAuth device flow)...',
99
+ 'init.feishu.loginComplete': 'Feishu user login complete.',
100
+ 'init.feishu.loginIncomplete': 'Feishu user login did not complete. Retry later with `cortex feishu login`.',
101
+ // ── Intro / backend selection ──
102
+ 'init.intro': 'Cortex Setup',
103
+ 'init.backend.noteBody': 'Both Claude Code and PI support API key access to any model.',
104
+ 'init.backend.noteTitle': 'Backend info',
105
+ 'init.backend.prompt': 'Which backends would you like to use?',
106
+ 'init.backend.claudeLabel': 'Claude Code',
107
+ 'init.backend.claudeHint': 'recommended, for Claude subscription',
108
+ 'init.backend.piLabel': 'PI',
109
+ 'init.backend.piHint': 'for other subscription',
110
+ // ── Platform selection ──
111
+ 'init.platform.prompt': 'Which interaction platform(s) would you like to use? (space to toggle, enter to confirm, leave empty to skip)',
112
+ 'init.platform.slackLabel': 'Slack',
113
+ 'init.platform.slackHint': 'recommended',
114
+ 'init.platform.feishuLabel': 'Feishu (飞书)',
115
+ // ── Machine identity ──
116
+ 'init.machine.prompt': 'Machine name for this device:',
117
+ 'init.machine.required': 'Machine name is required.',
118
+ 'init.machine.gpuDetected': 'Detected ${count} NVIDIA GPU(s)',
119
+ 'init.machine.gpuNone': 'No NVIDIA GPU detected (gpuCount=0)',
120
+ // ── Gateway usage ──
121
+ 'init.gateway.note': [
122
+ 'Cortex includes an open-source local gateway that proxies all',
123
+ 'LLM calls, providing multi-key rotation, automatic failover,',
124
+ 'and per-request cost tracking.',
125
+ '',
126
+ 'You can optionally share anonymous token usage with aistatus.cc,',
127
+ 'an AI model status monitoring site. Your token usage will appear',
128
+ 'on the public leaderboard (name + org + token counts). Email is',
129
+ 'used only as an identity key and is never displayed.',
130
+ '',
131
+ 'Learn more: https://aistatus.cc',
132
+ ].join('\n'),
133
+ 'init.gateway.noteTitle': 'Gateway & aistatus',
134
+ 'init.gateway.enablePrompt': 'Enable token usage reporting to aistatus?',
135
+ 'init.gateway.namePrompt': 'Name:',
136
+ 'init.gateway.namePlaceholder': 'your name',
137
+ 'init.gateway.orgPrompt': 'Organization:',
138
+ 'init.gateway.orgPlaceholder': 'your organization',
139
+ 'init.gateway.emailPrompt': 'Email (identity only, not displayed):',
140
+ 'init.gateway.emailPlaceholder': 'you@example.com',
141
+ // ── Service registration prompt ──
142
+ 'init.serviceRegister.prompt': 'Register Cortex as a system service (auto-start on boot)?',
143
+ // ── Gateway & profile auto-setup ──
144
+ 'init.gatewaySetup.overwritePrompt': 'Existing `plan` or `execute` profile detected. Overwrite with a new selection?',
145
+ 'init.gatewaySetup.planPrompt': 'Pick model for the `plan` profile (used by executor agents — planner, doc-writer, coder, etc.):',
146
+ 'init.gatewaySetup.executePrompt': 'Pick model for the `execute` profile (used by reviewer agents — reviewer, doc-reviewer, coder-reviewer, etc.):',
147
+ 'init.gatewaySetup.planFallbackPrompt': 'Pick fallback models for `plan` (in order, space to toggle, enter to confirm, leave empty for no fallback):',
148
+ 'init.gatewaySetup.executeFallbackPrompt': 'Pick fallback models for `execute` (in order, space to toggle, enter to confirm, leave empty for no fallback):',
149
+ 'init.gatewaySetup.extraProfilesPrompt': 'Pick additional models to register as standalone profiles (profile name = model name, space to toggle, enter to confirm, leave empty to skip):',
150
+ 'init.gatewaySetup.noBackends': 'No backends discovered. Make sure you have logged into Claude Code and/or PI first.',
151
+ 'init.gatewaySetup.rerunHint': 'You can re-run detection later with: cortex setup-gateway',
152
+ 'init.gatewaySetup.discovered': 'Discovered ${count} endpoint modes:\n${summary}',
153
+ 'init.gatewaySetup.gatewayWritten': 'Gateway config written to ${path}',
154
+ 'init.gatewaySetup.preservedModes': 'Preserved ${count} existing gateway mode(s) that discovery did not report: ${list}',
155
+ 'init.gatewaySetup.preservedModesHint': 'If these should have been auto-detected, check `pi /login` / `pi --list-models` and re-run.',
156
+ 'init.gatewaySetup.profilesWritten': 'Profiles written to ${path}',
157
+ 'init.gatewaySetup.generatedProfiles': 'Generated profiles: ${names} (default: ${default})',
158
+ 'init.gatewaySetup.profileIssues': '${count} profile(s) reference a gateway mode that is not configured:\n${lines}',
159
+ 'init.gatewaySetup.profileIssuesHint': 'These would fail at runtime with "Unknown mode". Add the mode to gateway.yaml or fix the profile.',
160
+ // ── Gateway & profile setup note + readiness loop ──
161
+ 'init.gatewayProfile.note': [
162
+ 'Cortex can auto-detect your Claude Code and PI configurations',
163
+ 'to generate gateway.yaml and profiles.json automatically.',
164
+ '',
165
+ 'Make sure you have logged into:',
166
+ '${loginHints}',
167
+ ].join('\n'),
168
+ 'init.gatewayProfile.noteTitle': 'Gateway & Profile Setup',
169
+ 'init.gatewayProfile.readyPrompt': 'Have you logged in and are ready to auto-detect?',
170
+ 'init.gatewayProfile.loginNow': 'Please log in now. Once done, come back and select "Yes".\n${loginHints}',
171
+ 'init.gatewayProfile.actionPrompt': 'What would you like to do?',
172
+ 'init.gatewayProfile.retryLabel': "I've logged in, retry detection",
173
+ 'init.gatewayProfile.skipLabel': 'Skip for now (run `cortex setup-gateway` later)',
174
+ 'init.gatewayProfile.skipped': 'Skipped. Run `cortex setup-gateway` later to auto-configure.',
175
+ // ── Outro ──
176
+ 'init.outro': 'Cortex initialized at ${dataDir}. Run `cortex start` to launch.',
177
+ // ── Git ──
178
+ 'init.git.required': 'Git is required but was not found on your system.',
179
+ 'init.git.initFailed': 'git init failed: ${message}',
180
+ 'init.git.autoInstalling': 'Attempting automatic git installation...',
181
+ 'init.git.installed': 'Git installed successfully.',
182
+ 'init.git.notOnPath': 'Git was installed but is not on PATH. You may need to restart your shell.',
183
+ 'init.git.autoInstallFailed': 'Automatic installation failed.',
184
+ 'init.git.manualHint': 'Please install git manually: ${hint}',
185
+ // ── config output (formatConfigOutput) ──
186
+ 'init.config.title': 'Cortex configuration:',
187
+ 'init.config.statusTitle': 'Status:',
188
+ 'init.config.initialized': 'initialized',
189
+ 'init.config.notInitialized': 'not initialized',
190
+ 'init.config.found': 'found',
191
+ 'init.config.missing': 'missing',
192
+ };
193
+ export const initZh = {
194
+ // ── Clipboard / manifest copy prompt ──
195
+ 'init.clipboard.prompt': '\n按 "c" 将清单复制到剪贴板(按其他任意键跳过)...',
196
+ 'init.clipboard.copied': '清单已复制到剪贴板!',
197
+ 'init.clipboard.failed': '无法复制。如果在终端中运行,请确保已启用 OSC 52。',
198
+ 'init.clipboard.manual': '清单文本已显示在上方——请手动复制。',
199
+ // ── Backend install ──
200
+ 'init.backend.alreadyInstalled': '${label} 已安装。',
201
+ 'init.backend.installing': '正在安装 ${label}...',
202
+ 'init.backend.installed': '${label} 安装成功。',
203
+ 'init.backend.installFailed': '安装 ${label} 失败。',
204
+ 'init.backend.installFailedHint': '安装失败。请手动安装:${command}',
205
+ 'init.backend.loginHint.claude': '运行 `claude login` 进行认证。',
206
+ 'init.backend.loginHint.pi': '在 PI 设置中配置你的服务提供商。',
207
+ 'init.backend.label.claude': 'Claude Code',
208
+ 'init.backend.label.pi': 'PI',
209
+ // ── Service registration ──
210
+ 'init.service.launchdWritten': 'launchd plist 已写入 ${path}',
211
+ 'init.service.launchdStartHint': '立即启动:launchctl load ${path}',
212
+ 'init.service.systemdUserWritten': 'systemd 单元已写入 ${path}',
213
+ 'init.service.systemdUserEnableHint': '启用方法:sudo systemctl --user enable --now cortex',
214
+ 'init.service.systemdInstalled': 'systemd 单元已安装到 ${path}',
215
+ 'init.service.systemdEnableHint': '启用方法:sudo systemctl enable --now cortex',
216
+ 'init.service.systemInstallFailed': '安装系统服务失败:${message}',
217
+ 'init.service.noSudo': '没有 sudo 权限。服务文件已保存到本地。',
218
+ 'init.service.manualInstallHint': '手动安装方法:\n sudo cp ${localPath} ${systemPath}\n sudo systemctl daemon-reload\n sudo systemctl enable --now cortex',
219
+ 'init.service.unsupported': '不支持在 ${platform} 上注册服务。请使用 `cortex daemon` 手动启动 Cortex。',
220
+ // ── Cancel ──
221
+ 'init.cancel': '初始化已取消。',
222
+ // ── Slack setup ──
223
+ 'init.slack.manifestTitle': 'Slack 应用清单 —— 创建应用时复制并粘贴',
224
+ 'init.slack.guide': [
225
+ '要设置 Slack,你需要一个 Slack 应用:',
226
+ '',
227
+ '1. 访问 https://api.slack.com/apps',
228
+ '2. 点击 "Create New App" → "From a manifest"',
229
+ '3. 选择你的工作区,然后粘贴清单(如上所示)',
230
+ '4. 进入 "Basic Information" → 复制 Signing Secret',
231
+ '5. 在 Basic Information 下,生成一个 App-Level Token',
232
+ ' (作用域:connections:write,命名为 "cortex-socket")',
233
+ '6. 进入 "OAuth & Permissions" → Install to Workspace',
234
+ ' 安装后复制 *Bot User OAuth Token*',
235
+ '7. 进入 "App Home" → Show Tabs → 启用 *Messages Tab*',
236
+ ' 并勾选 "Allow users to send messages from the messages tab"',
237
+ ' (DM 支持所必需)',
238
+ '',
239
+ '清单中包含 socket_mode_enabled,因此导入时',
240
+ 'Socket Mode 会自动启用。',
241
+ '',
242
+ '所需的 Bot Token 作用域(已包含在清单中):',
243
+ ' chat:write, im:history, im:write, reactions:read, reactions:write,',
244
+ ' users:read, commands, app_mentions:read,',
245
+ ' channels:history, channels:read, groups:history,',
246
+ ' files:read, files:write, emoji:read, pins:read, pins:write',
247
+ ].join('\n'),
248
+ 'init.slack.guideTitle': 'Slack 应用设置指南',
249
+ 'init.slack.prefillFound': '发现已有的 Slack 配置。按回车跳过,或输入任意内容重新填写。',
250
+ 'init.slack.skipPrompt': '跳过 Slack 配置?(回车 = 跳过,任意键 + 回车 = 重新填写)',
251
+ 'init.slack.skipPlaceholder': '按回车跳过',
252
+ 'init.slack.signingSecretPrompt': '步骤 1/3:SLACK_SIGNING_SECRET(来自 Basic Information):',
253
+ 'init.slack.signingSecretRequired': '需要填写 Signing Secret。',
254
+ 'init.slack.appTokenPrompt': '步骤 2/3:SLACK_APP_TOKEN(App-Level Token,以 xapp- 开头):',
255
+ 'init.slack.appTokenRequired': '需要填写 App Token。',
256
+ 'init.slack.appTokenPrefix': 'Token 应以 xapp- 开头',
257
+ 'init.slack.botTokenPrompt': '步骤 3/3:SLACK_BOT_TOKEN(Bot User OAuth Token,以 xoxb- 开头):',
258
+ 'init.slack.botTokenRequired': '需要填写 Bot Token。',
259
+ 'init.slack.botTokenPrefix': 'Token 应以 xoxb- 开头',
260
+ // ── Feishu setup ──
261
+ 'init.feishu.guide': [
262
+ '要设置飞书,请创建一个飞书应用:',
263
+ '',
264
+ '1. 访问 https://open.feishu.cn/app',
265
+ '2. 点击 "Create Agentic App"(创建agentic应用)',
266
+ '3. 输入应用名称(例如 CortexAgent),选择头像,然后点击创建',
267
+ '4. 创建后,页面会显示 App ID 和 App Secret —— 直接复制即可',
268
+ '5. 启用机器人事件并订阅:im.message.receive_v1',
269
+ '',
270
+ 'MCP 文档操作(docx/wiki/bitable/sheets/drive)的身份:',
271
+ ' - bot:文档由应用创建/拥有(默认)',
272
+ ' - user:文档由你的飞书账号创建/拥有(推荐)',
273
+ ].join('\n'),
274
+ 'init.feishu.guideTitle': '飞书应用设置指南',
275
+ 'init.feishu.appIdPrompt': 'FEISHU_APP_ID:',
276
+ 'init.feishu.appIdRequired': '需要填写 App ID。',
277
+ 'init.feishu.appSecretPrompt': 'FEISHU_APP_SECRET:',
278
+ 'init.feishu.appSecretRequired': '需要填写 App Secret。',
279
+ 'init.feishu.domainPrompt': 'FEISHU_DOMAIN(可选,"feishu" 或 "lark"):',
280
+ 'init.feishu.domainPlaceholder': 'feishu(留空使用默认值)',
281
+ 'init.feishu.authModePrompt': 'MCP 文档操作的身份:',
282
+ 'init.feishu.authModeBotLabel': 'bot',
283
+ 'init.feishu.authModeBotHint': '文档由应用拥有',
284
+ 'init.feishu.authModeUserLabel': 'user(推荐)',
285
+ 'init.feishu.authModeUserHint': '文档由你的飞书账号拥有',
286
+ 'init.feishu.loginStarting': '正在启动飞书用户登录(OAuth 设备流程)...',
287
+ 'init.feishu.loginComplete': '飞书用户登录完成。',
288
+ 'init.feishu.loginIncomplete': '飞书用户登录未完成。稍后用 `cortex feishu login` 重试。',
289
+ // ── Intro / backend selection ──
290
+ 'init.intro': 'Cortex 设置',
291
+ 'init.backend.noteBody': 'Claude Code 和 PI 都支持通过 API 密钥访问任意模型。',
292
+ 'init.backend.noteTitle': '后端信息',
293
+ 'init.backend.prompt': '你想使用哪些后端?',
294
+ 'init.backend.claudeLabel': 'Claude Code',
295
+ 'init.backend.claudeHint': '推荐,适用于 Claude 订阅',
296
+ 'init.backend.piLabel': 'PI',
297
+ 'init.backend.piHint': '适用于其他订阅',
298
+ // ── Platform selection ──
299
+ 'init.platform.prompt': '你想使用哪些交互平台?(空格切换,回车确认,留空跳过)',
300
+ 'init.platform.slackLabel': 'Slack',
301
+ 'init.platform.slackHint': '推荐',
302
+ 'init.platform.feishuLabel': 'Feishu (飞书)',
303
+ // ── Machine identity ──
304
+ 'init.machine.prompt': '此设备的机器名称:',
305
+ 'init.machine.required': '需要填写机器名称。',
306
+ 'init.machine.gpuDetected': '检测到 ${count} 块 NVIDIA GPU',
307
+ 'init.machine.gpuNone': '未检测到 NVIDIA GPU(gpuCount=0)',
308
+ // ── Gateway usage ──
309
+ 'init.gateway.note': [
310
+ 'Cortex 内置一个开源本地网关,为所有 LLM 调用提供代理,',
311
+ '支持多密钥轮换、自动故障转移,',
312
+ '以及按请求的成本跟踪。',
313
+ '',
314
+ '你可以选择将匿名 token 使用量分享给 aistatus.cc,',
315
+ '这是一个 AI 模型状态监控网站。你的 token 使用量将',
316
+ '显示在公开排行榜上(名称 + 组织 + token 计数)。邮箱',
317
+ '仅用作身份标识,绝不会被展示。',
318
+ '',
319
+ '了解更多:https://aistatus.cc',
320
+ ].join('\n'),
321
+ 'init.gateway.noteTitle': 'Gateway 与 aistatus',
322
+ 'init.gateway.enablePrompt': '启用向 aistatus 报告 token 使用量?',
323
+ 'init.gateway.namePrompt': '名称:',
324
+ 'init.gateway.namePlaceholder': '你的名称',
325
+ 'init.gateway.orgPrompt': '组织:',
326
+ 'init.gateway.orgPlaceholder': '你的组织',
327
+ 'init.gateway.emailPrompt': '邮箱(仅用于身份标识,不会展示):',
328
+ 'init.gateway.emailPlaceholder': 'you@example.com',
329
+ // ── Service registration prompt ──
330
+ 'init.serviceRegister.prompt': '将 Cortex 注册为系统服务(开机自启)?',
331
+ // ── Gateway & profile auto-setup ──
332
+ 'init.gatewaySetup.overwritePrompt': '检测到已有的 `plan` 或 `execute` 配置。是否用新的选择覆盖?',
333
+ 'init.gatewaySetup.planPrompt': '为 `plan` 配置选择模型(由执行类代理使用 —— planner、doc-writer、coder 等):',
334
+ 'init.gatewaySetup.executePrompt': '为 `execute` 配置选择模型(由审查类代理使用 —— reviewer、doc-reviewer、coder-reviewer 等):',
335
+ 'init.gatewaySetup.planFallbackPrompt': '为 `plan` 选择回退模型(按顺序,空格切换,回车确认,留空表示无回退):',
336
+ 'init.gatewaySetup.executeFallbackPrompt': '为 `execute` 选择回退模型(按顺序,空格切换,回车确认,留空表示无回退):',
337
+ 'init.gatewaySetup.extraProfilesPrompt': '选择要注册为独立配置的其他模型(配置名 = 模型名,空格切换,回车确认,留空跳过):',
338
+ 'init.gatewaySetup.noBackends': '未发现任何后端。请确保你已先登录 Claude Code 和/或 PI。',
339
+ 'init.gatewaySetup.rerunHint': '你可以稍后用以下命令重新检测:cortex setup-gateway',
340
+ 'init.gatewaySetup.discovered': '发现 ${count} 个端点模式:\n${summary}',
341
+ 'init.gatewaySetup.gatewayWritten': '网关配置已写入 ${path}',
342
+ 'init.gatewaySetup.preservedModes': '保留了 ${count} 个发现过程未报告的现有网关模式:${list}',
343
+ 'init.gatewaySetup.preservedModesHint': '如果这些本应被自动检测到,请检查 `pi /login` / `pi --list-models` 后重新运行。',
344
+ 'init.gatewaySetup.profilesWritten': '配置已写入 ${path}',
345
+ 'init.gatewaySetup.generatedProfiles': '已生成配置:${names}(默认:${default})',
346
+ 'init.gatewaySetup.profileIssues': '${count} 个配置引用了未配置的网关模式:\n${lines}',
347
+ 'init.gatewaySetup.profileIssuesHint': '这些在运行时会因 "Unknown mode" 而失败。请将该模式添加到 gateway.yaml,或修正该配置。',
348
+ // ── Gateway & profile setup note + readiness loop ──
349
+ 'init.gatewayProfile.note': [
350
+ 'Cortex 可以自动检测你的 Claude Code 和 PI 配置,',
351
+ '以自动生成 gateway.yaml 和 profiles.json。',
352
+ '',
353
+ '请确保你已登录:',
354
+ '${loginHints}',
355
+ ].join('\n'),
356
+ 'init.gatewayProfile.noteTitle': 'Gateway 与 Profile 设置',
357
+ 'init.gatewayProfile.readyPrompt': '你是否已登录并准备好自动检测?',
358
+ 'init.gatewayProfile.loginNow': '请现在登录。完成后回来选择 "Yes"。\n${loginHints}',
359
+ 'init.gatewayProfile.actionPrompt': '你想做什么?',
360
+ 'init.gatewayProfile.retryLabel': '我已登录,重试检测',
361
+ 'init.gatewayProfile.skipLabel': '暂时跳过(稍后运行 `cortex setup-gateway`)',
362
+ 'init.gatewayProfile.skipped': '已跳过。稍后运行 `cortex setup-gateway` 自动配置。',
363
+ // ── Outro ──
364
+ 'init.outro': 'Cortex 已在 ${dataDir} 初始化。运行 `cortex start` 启动。',
365
+ // ── Git ──
366
+ 'init.git.required': '需要 Git,但在你的系统上未找到。',
367
+ 'init.git.initFailed': 'git init 失败:${message}',
368
+ 'init.git.autoInstalling': '正在尝试自动安装 git...',
369
+ 'init.git.installed': 'Git 安装成功。',
370
+ 'init.git.notOnPath': 'Git 已安装但不在 PATH 中。你可能需要重启 shell。',
371
+ 'init.git.autoInstallFailed': '自动安装失败。',
372
+ 'init.git.manualHint': '请手动安装 git: ${hint}',
373
+ // ── config output (formatConfigOutput) ──
374
+ 'init.config.title': 'Cortex 配置:',
375
+ 'init.config.statusTitle': '状态:',
376
+ 'init.config.initialized': '已初始化',
377
+ 'init.config.notInitialized': '未初始化',
378
+ 'init.config.found': '已找到',
379
+ 'init.config.missing': '缺失',
380
+ };
@@ -0,0 +1,47 @@
1
+ export declare const interactionsEn: {
2
+ readonly 'interaction.askExpired': "This AskUserQuestion prompt has expired. Please ask again if you still need it.";
3
+ readonly 'interaction.askInactive': "This AskUserQuestion prompt is no longer active.";
4
+ readonly 'interaction.selectOrType': "Please select an option or type a custom answer.";
5
+ readonly 'interaction.questionsProgress': "Questions (${answered}/${total} answered)";
6
+ readonly 'interaction.planApproved': "Plan approved — Cortex will proceed.";
7
+ readonly 'interaction.planApprovedRich': "*Plan approved* — Cortex will proceed.";
8
+ readonly 'interaction.planFeedbackSent': "Plan feedback sent — Cortex will revise.\n> ${feedback}";
9
+ readonly 'interaction.noSpecificFeedback': "No specific feedback";
10
+ readonly 'interaction.cancelledPreserved': "Cancelled. Session preserved — next message will resume.";
11
+ readonly 'interaction.sessionActive': "Session `${sessionName}` active — send your message below.${profileNote}";
12
+ readonly 'interaction.sessionProfileNote': " (profile: ${profileName})";
13
+ readonly 'interaction.newConversation': "--- new conversation --- (profile: ${profileName})";
14
+ readonly 'update.installing': "Installing @cortex-agent/server@${version}... daemon will restart shortly.";
15
+ readonly 'update.skipped': "Skipped version ${version}.";
16
+ readonly 'update.cancelled': "Update cancelled. Will check again at next interval.";
17
+ readonly 'update.releaseNotesTitle': "Cortex Server v${version} Release Notes";
18
+ readonly 'update.releaseNotesEmpty': "(No release notes available)";
19
+ readonly 'update.releaseNotesTruncated': "\n\n_[Truncated — view full notes on GitHub]_";
20
+ readonly 'update.releaseNotesBody': "**${name}**\n\n${body}\n\n[View full release notes](${url})";
21
+ readonly 'update.releaseNotesFetchFailed': "Failed to fetch release notes for v${version}. View on GitHub: ${url}";
22
+ readonly 'update.available': "Cortex Server v${version} is available. Update now?";
23
+ readonly 'update.availableSection': "Cortex Server v${version} is available.";
24
+ readonly 'update.superseded': "Superseded by a newer update prompt.";
25
+ readonly 'update.timedOut': "Update prompt timed out.";
26
+ readonly 'update.button.update': "Update";
27
+ readonly 'update.button.releaseNote': "Release Note";
28
+ readonly 'update.button.skip': "Skip this version";
29
+ readonly 'update.button.cancel': "Cancel";
30
+ readonly 'modal.answer': "Answer (${answered}/${total})";
31
+ readonly 'modal.selectOneOrMore': "Select one or more";
32
+ readonly 'modal.selectOne': "Select one";
33
+ readonly 'modal.typeAnswerLabel': "Or type your answer";
34
+ readonly 'modal.customAnswerPlaceholder': "Custom answer (overrides selection above)";
35
+ readonly 'modal.yourAnswerLabel': "Your answer";
36
+ readonly 'modal.yourAnswerPlaceholder': "Type your answer";
37
+ readonly 'modal.questionsTitle': "Questions";
38
+ readonly 'modal.submit': "Submit";
39
+ readonly 'modal.cancel': "Cancel";
40
+ readonly 'modal.planReady': "*Plan ready for review.* Approve to proceed or provide feedback.";
41
+ readonly 'modal.approve': "Approve";
42
+ readonly 'modal.provideFeedback': "Provide Feedback";
43
+ readonly 'modal.planFeedbackTitle': "Plan Feedback";
44
+ readonly 'modal.feedbackLabel': "Your feedback (Cortex will revise the plan)";
45
+ readonly 'modal.feedbackPlaceholder': "What should be changed?";
46
+ };
47
+ export declare const interactionsZh: Record<keyof typeof interactionsEn, string>;
@@ -0,0 +1,102 @@
1
+ // input: nothing (leaf data slice)
2
+ // output: interactionsEn / interactionsZh — message slice (filled by i18n extraction)
3
+ // pos: one locale slice; aggregated by core/locales/en.ts & zh.ts barrels
4
+ // >>> Keep en and zh keys in lockstep (zh typed against keyof typeof interactionsEn) <<<
5
+ export const interactionsEn = {
6
+ // --- interaction-handlers.ts ---
7
+ 'interaction.askExpired': 'This AskUserQuestion prompt has expired. Please ask again if you still need it.',
8
+ 'interaction.askInactive': 'This AskUserQuestion prompt is no longer active.',
9
+ 'interaction.selectOrType': 'Please select an option or type a custom answer.',
10
+ 'interaction.questionsProgress': 'Questions (${answered}/${total} answered)',
11
+ 'interaction.planApproved': 'Plan approved — Cortex will proceed.',
12
+ 'interaction.planApprovedRich': '*Plan approved* — Cortex will proceed.',
13
+ 'interaction.planFeedbackSent': 'Plan feedback sent — Cortex will revise.\n> ${feedback}',
14
+ 'interaction.noSpecificFeedback': 'No specific feedback',
15
+ 'interaction.cancelledPreserved': 'Cancelled. Session preserved — next message will resume.',
16
+ 'interaction.sessionActive': 'Session `${sessionName}` active — send your message below.${profileNote}',
17
+ 'interaction.sessionProfileNote': ' (profile: ${profileName})',
18
+ 'interaction.newConversation': '--- new conversation --- (profile: ${profileName})',
19
+ // --- update-prompt.ts / update-prompt-slack.ts ---
20
+ 'update.installing': 'Installing @cortex-agent/server@${version}... daemon will restart shortly.',
21
+ 'update.skipped': 'Skipped version ${version}.',
22
+ 'update.cancelled': 'Update cancelled. Will check again at next interval.',
23
+ 'update.releaseNotesTitle': 'Cortex Server v${version} Release Notes',
24
+ 'update.releaseNotesEmpty': '(No release notes available)',
25
+ 'update.releaseNotesTruncated': '\n\n_[Truncated — view full notes on GitHub]_',
26
+ 'update.releaseNotesBody': '**${name}**\n\n${body}\n\n[View full release notes](${url})',
27
+ 'update.releaseNotesFetchFailed': 'Failed to fetch release notes for v${version}. View on GitHub: ${url}',
28
+ 'update.available': 'Cortex Server v${version} is available. Update now?',
29
+ 'update.availableSection': 'Cortex Server v${version} is available.',
30
+ 'update.superseded': 'Superseded by a newer update prompt.',
31
+ 'update.timedOut': 'Update prompt timed out.',
32
+ 'update.button.update': 'Update',
33
+ 'update.button.releaseNote': 'Release Note',
34
+ 'update.button.skip': 'Skip this version',
35
+ 'update.button.cancel': 'Cancel',
36
+ // --- interactive-builder.ts ---
37
+ 'modal.answer': 'Answer (${answered}/${total})',
38
+ 'modal.selectOneOrMore': 'Select one or more',
39
+ 'modal.selectOne': 'Select one',
40
+ 'modal.typeAnswerLabel': 'Or type your answer',
41
+ 'modal.customAnswerPlaceholder': 'Custom answer (overrides selection above)',
42
+ 'modal.yourAnswerLabel': 'Your answer',
43
+ 'modal.yourAnswerPlaceholder': 'Type your answer',
44
+ 'modal.questionsTitle': 'Questions',
45
+ 'modal.submit': 'Submit',
46
+ 'modal.cancel': 'Cancel',
47
+ 'modal.planReady': '*Plan ready for review.* Approve to proceed or provide feedback.',
48
+ 'modal.approve': 'Approve',
49
+ 'modal.provideFeedback': 'Provide Feedback',
50
+ 'modal.planFeedbackTitle': 'Plan Feedback',
51
+ 'modal.feedbackLabel': 'Your feedback (Cortex will revise the plan)',
52
+ 'modal.feedbackPlaceholder': 'What should be changed?',
53
+ };
54
+ export const interactionsZh = {
55
+ // --- interaction-handlers.ts ---
56
+ 'interaction.askExpired': '此 AskUserQuestion 提问已过期。如仍需要请重新提问。',
57
+ 'interaction.askInactive': '此 AskUserQuestion 提问已不再有效。',
58
+ 'interaction.selectOrType': '请选择一个选项或输入自定义答案。',
59
+ 'interaction.questionsProgress': '问题(已回答 ${answered}/${total})',
60
+ 'interaction.planApproved': '计划已批准 — Cortex 将继续执行。',
61
+ 'interaction.planApprovedRich': '*计划已批准* — Cortex 将继续执行。',
62
+ 'interaction.planFeedbackSent': '计划反馈已发送 — Cortex 将进行修订。\n> ${feedback}',
63
+ 'interaction.noSpecificFeedback': '没有具体反馈',
64
+ 'interaction.cancelledPreserved': '已取消。会话已保留 — 下一条消息将继续。',
65
+ 'interaction.sessionActive': '会话 `${sessionName}` 已激活 — 请在下方发送你的消息。${profileNote}',
66
+ 'interaction.sessionProfileNote': '(profile:${profileName})',
67
+ 'interaction.newConversation': '--- 新会话 --- (profile: ${profileName})',
68
+ // --- update-prompt.ts / update-prompt-slack.ts ---
69
+ 'update.installing': '正在安装 @cortex-agent/server@${version}……守护进程稍后将重启。',
70
+ 'update.skipped': '已跳过版本 ${version}。',
71
+ 'update.cancelled': '更新已取消。将在下次检查间隔再次检查。',
72
+ 'update.releaseNotesTitle': 'Cortex Server v${version} 发布说明',
73
+ 'update.releaseNotesEmpty': '(无可用的发布说明)',
74
+ 'update.releaseNotesTruncated': '\n\n_[已截断 — 在 GitHub 上查看完整说明]_',
75
+ 'update.releaseNotesBody': '**${name}**\n\n${body}\n\n[查看完整发布说明](${url})',
76
+ 'update.releaseNotesFetchFailed': '获取 v${version} 的发布说明失败。在 GitHub 上查看:${url}',
77
+ 'update.available': 'Cortex Server v${version} 已可用。现在更新吗?',
78
+ 'update.availableSection': 'Cortex Server v${version} 已可用。',
79
+ 'update.superseded': '已被更新的更新提示取代。',
80
+ 'update.timedOut': '更新提示已超时。',
81
+ 'update.button.update': '更新',
82
+ 'update.button.releaseNote': '发布说明',
83
+ 'update.button.skip': '跳过此版本',
84
+ 'update.button.cancel': '取消',
85
+ // --- interactive-builder.ts ---
86
+ 'modal.answer': '回答(${answered}/${total})',
87
+ 'modal.selectOneOrMore': '选择一个或多个',
88
+ 'modal.selectOne': '选择一个',
89
+ 'modal.typeAnswerLabel': '或输入你的答案',
90
+ 'modal.customAnswerPlaceholder': '自定义答案(覆盖上方选择)',
91
+ 'modal.yourAnswerLabel': '你的答案',
92
+ 'modal.yourAnswerPlaceholder': '输入你的答案',
93
+ 'modal.questionsTitle': '问题',
94
+ 'modal.submit': '提交',
95
+ 'modal.cancel': '取消',
96
+ 'modal.planReady': '*计划已就绪,等待审阅。* 批准以继续,或提供反馈。',
97
+ 'modal.approve': '批准',
98
+ 'modal.provideFeedback': '提供反馈',
99
+ 'modal.planFeedbackTitle': '计划反馈',
100
+ 'modal.feedbackLabel': '你的反馈(Cortex 将修订计划)',
101
+ 'modal.feedbackPlaceholder': '应该修改什么?',
102
+ };
@@ -0,0 +1,8 @@
1
+ export declare const langEn: {
2
+ readonly 'lang.current': "Current language: *${lang}*";
3
+ readonly 'lang.switched': "Language switched to *${lang}*.";
4
+ readonly 'lang.usage': "Usage: `!lang <en|zh>`";
5
+ readonly 'lang.available': "Available languages: `en` (English), `zh` (中文)";
6
+ readonly 'lang.unknown': "Unknown language `${lang}`. Available: `en`, `zh`.";
7
+ };
8
+ export declare const langZh: Record<keyof typeof langEn, string>;
@@ -0,0 +1,18 @@
1
+ // input: nothing (leaf data slice)
2
+ // output: langEn / langZh — !lang command message slice
3
+ // pos: one locale slice; aggregated by core/locales/en.ts & zh.ts barrels
4
+ // >>> Keep en and zh keys in lockstep (zh is typed against keyof typeof langEn) <<<
5
+ export const langEn = {
6
+ 'lang.current': 'Current language: *${lang}*',
7
+ 'lang.switched': 'Language switched to *${lang}*.',
8
+ 'lang.usage': 'Usage: `!lang <en|zh>`',
9
+ 'lang.available': 'Available languages: `en` (English), `zh` (中文)',
10
+ 'lang.unknown': 'Unknown language `${lang}`. Available: `en`, `zh`.',
11
+ };
12
+ export const langZh = {
13
+ 'lang.current': '当前语言:*${lang}*',
14
+ 'lang.switched': '已切换语言为 *${lang}*。',
15
+ 'lang.usage': '用法:`!lang <en|zh>`',
16
+ 'lang.available': '可用语言:`en`(English)、`zh`(中文)',
17
+ 'lang.unknown': '未知语言 `${lang}`。可用:`en`、`zh`。',
18
+ };
@@ -0,0 +1,36 @@
1
+ export declare const schedulingEn: {
2
+ readonly 'schedule.help.title': "*Schedule commands:*";
3
+ readonly 'schedule.help.addInterval': "`!schedule add interval <duration> [--profile <name>] <message>` — repeat every duration (e.g. `30m`, `2h`, `1d`)";
4
+ readonly 'schedule.help.addDaily': "`!schedule add daily <HH:MM> [--profile <name>] <message>` — run every day at a fixed time (24-hour)";
5
+ readonly 'schedule.help.addWeekly': "`!schedule add weekly <day> <HH:MM> [--profile <name>] <message>` — run every week (day: mon,tue,wed,thu,fri,sat,sun)";
6
+ readonly 'schedule.help.addOnce': "`!schedule add once <duration> [--profile <name>] <message>` — run once after a delay";
7
+ readonly 'schedule.help.list': "`!schedule list` — show all scheduled tasks";
8
+ readonly 'schedule.help.pause': "`!schedule pause <id>` — pause a recurring task";
9
+ readonly 'schedule.help.resume': "`!schedule resume <id>` — resume a paused recurring task";
10
+ readonly 'schedule.help.remove': "`!schedule remove <id>` — remove a task by id";
11
+ readonly 'schedule.help.availableProfiles': "Available profiles: ${profileNames}";
12
+ readonly 'schedule.list.empty': "No scheduled tasks.";
13
+ readonly 'schedule.list.header': "*Scheduled tasks (${count}):*\n${lines}";
14
+ readonly 'schedule.remove.usage': "Usage: `!schedule remove <id>`";
15
+ readonly 'schedule.remove.ok': "Removed task `${id}`.";
16
+ readonly 'schedule.taskNotFound': "Task not found: `${id}`";
17
+ readonly 'schedule.pause.usage': "Usage: `!schedule pause <id>`";
18
+ readonly 'schedule.pause.ok': "Paused task `${id}`.";
19
+ readonly 'schedule.resume.usage': "Usage: `!schedule resume <id>`";
20
+ readonly 'schedule.resume.ok': "Resumed task `${id}`.${nextAt}";
21
+ readonly 'schedule.resume.nextRun': " Next run: ${time}.";
22
+ readonly 'schedule.invalidDuration': "Invalid duration: `${duration}`. Use e.g. `30s`, `5m`, `2h`, `1d`";
23
+ readonly 'schedule.invalidTime': "Invalid time: `${time}`. Use 24-hour HH:MM, e.g. `${example}`";
24
+ readonly 'schedule.invalidDay': "Invalid day: `${day}`. Use: mon, tue, wed, thu, fri, sat, sun";
25
+ readonly 'schedule.add.intervalUsage': "Usage: `!schedule add interval <duration> [--profile <name>] <message>`";
26
+ readonly 'schedule.add.dailyUsage': "Usage: `!schedule add daily <HH:MM> [--profile <name>] <message>`";
27
+ readonly 'schedule.add.weeklyUsage': "Usage: `!schedule add weekly <day> <HH:MM> [--profile <name>] <message>`";
28
+ readonly 'schedule.add.onceUsage': "Usage: `!schedule add once <duration> [--profile <name>] <message>`";
29
+ readonly 'schedule.add.scheduledInterval': "Scheduled every *${duration}*: \"${message}\"";
30
+ readonly 'schedule.add.scheduledDaily': "Scheduled daily at *${time}*: \"${message}\"";
31
+ readonly 'schedule.add.scheduledWeekly': "Scheduled weekly *${day} ${time}*: \"${message}\"";
32
+ readonly 'schedule.add.scheduledOnce': "Scheduled once in *${duration}*: \"${message}\"";
33
+ readonly 'schedule.add.unknownType': "Unknown type: `${type}`. Use `interval`, `daily`, `weekly`, or `once`";
34
+ readonly 'schedule.profileUsage': "Usage: ${usage}";
35
+ };
36
+ export declare const schedulingZh: Record<keyof typeof schedulingEn, string>;