@armadra/agent 0.6.1 → 0.6.3
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/CHANGELOG.md +80 -0
- package/CHANGELOG.zh-CN.md +56 -0
- package/README.md +168 -575
- package/README.zh-CN.md +165 -596
- package/dist/agent/session-settings.d.ts +4 -1
- package/dist/agent/session-settings.js +7 -2
- package/dist/agent/session.d.ts +6 -0
- package/dist/agent/session.js +8 -0
- package/dist/agent/subagent-background.d.ts +75 -0
- package/dist/agent/subagent-background.js +209 -0
- package/dist/agent/subagent-registry.d.ts +24 -5
- package/dist/agent/subagent-registry.js +64 -92
- package/dist/agent/types-w5.d.ts +11 -1
- package/dist/agent/types.d.ts +5 -0
- package/dist/agents/builtin.js +0 -1
- package/dist/agents/external.js +0 -1
- package/dist/agents/parse.js +4 -3
- package/dist/agents/result.d.ts +7 -1
- package/dist/agents/result.js +20 -1
- package/dist/agents/task-control.d.ts +13 -2
- package/dist/agents/task-record.d.ts +13 -1
- package/dist/agents/task-record.js +32 -0
- package/dist/agents/types.d.ts +5 -1
- package/dist/ai/apis/chatgpt-backend.d.ts +7 -2
- package/dist/ai/apis/chatgpt-backend.js +12 -4
- package/dist/ai/providers/discovered-cache.d.ts +29 -12
- package/dist/ai/providers/discovered-cache.js +72 -12
- package/dist/ai/providers/registry.js +7 -6
- package/dist/ai/types.d.ts +5 -0
- package/dist/auth/chatgpt/backend-client.d.ts +14 -4
- package/dist/auth/chatgpt/backend-client.js +41 -8
- package/dist/auth/chatgpt/cli.d.ts +2 -1
- package/dist/auth/chatgpt/cli.js +14 -7
- package/dist/auth/chatgpt/follow.d.ts +16 -0
- package/dist/auth/chatgpt/follow.js +51 -0
- package/dist/auth/chatgpt/presets.d.ts +8 -0
- package/dist/auth/chatgpt/presets.js +12 -0
- package/dist/auth/testing/fake-oauth.d.ts +4 -1
- package/dist/auth/testing/fake-oauth.js +24 -1
- package/dist/bundle/ama.cjs +2016 -664
- package/dist/cli/compose-agents.d.ts +2 -1
- package/dist/cli/compose-agents.js +11 -2
- package/dist/cli/compose-providers.d.ts +2 -1
- package/dist/cli/compose-providers.js +6 -3
- package/dist/cli/startup-steps.js +4 -1
- package/dist/cli/subcommands/models-discover.d.ts +5 -2
- package/dist/cli/subcommands/models-discover.js +52 -10
- package/dist/config/json-schema.js +10 -2
- package/dist/config/key-docs.js +9 -3
- package/dist/config/merge.d.ts +1 -1
- package/dist/config/merge.js +20 -3
- package/dist/config/schema-w5.js +4 -2
- package/dist/config/schema-w6.d.ts +1 -1
- package/dist/config/schema-w6.js +2 -1
- package/dist/config/schema.js +2 -0
- package/dist/config/settings-registry.js +4 -0
- package/dist/config/types-w5.d.ts +10 -0
- package/dist/config/types-w5.js +2 -0
- package/dist/config/types-w6.d.ts +5 -0
- package/dist/config/types.d.ts +3 -1
- package/dist/git/info.d.ts +19 -0
- package/dist/git/info.js +64 -8
- package/dist/i18n/catalog.d.ts +52 -8
- package/dist/i18n/messages/agents.d.ts +56 -0
- package/dist/i18n/messages/agents.js +58 -2
- package/dist/i18n/messages/auth.d.ts +12 -0
- package/dist/i18n/messages/auth.js +20 -0
- package/dist/i18n/messages/config-keys.d.ts +8 -0
- package/dist/i18n/messages/config-keys.js +18 -10
- package/dist/i18n/messages/config.d.ts +8 -0
- package/dist/i18n/messages/interactive-startup.d.ts +0 -16
- package/dist/i18n/messages/interactive-startup.js +0 -16
- package/dist/i18n/messages/interactive.d.ts +23 -16
- package/dist/i18n/messages/interactive.js +25 -0
- package/dist/i18n/messages/print.d.ts +4 -0
- package/dist/i18n/messages/print.js +4 -0
- package/dist/i18n/messages/report.js +4 -4
- package/dist/i18n/messages/settings.d.ts +6 -0
- package/dist/i18n/messages/settings.js +6 -0
- package/dist/i18n/messages/subcommands-config.d.ts +4 -0
- package/dist/i18n/messages/subcommands-config.js +4 -0
- package/dist/i18n/messages/subcommands.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/modes/commands-core.js +8 -4
- package/dist/modes/interactive/agent-bar.d.ts +3 -1
- package/dist/modes/interactive/agent-bar.js +12 -5
- package/dist/modes/interactive/agent-ui.d.ts +21 -3
- package/dist/modes/interactive/agent-ui.js +81 -12
- package/dist/modes/interactive/agent-view.d.ts +4 -0
- package/dist/modes/interactive/agent-view.js +14 -1
- package/dist/modes/interactive/approval-dock.d.ts +51 -0
- package/dist/modes/interactive/approval-dock.js +112 -0
- package/dist/modes/interactive/approval-ui.d.ts +43 -0
- package/dist/modes/interactive/approval-ui.js +64 -0
- package/dist/modes/interactive/commands.js +4 -1
- package/dist/modes/interactive/event-notices.d.ts +6 -1
- package/dist/modes/interactive/event-notices.js +7 -1
- package/dist/modes/interactive/interactive-mode.d.ts +4 -2
- package/dist/modes/interactive/interactive-mode.js +33 -38
- package/dist/modes/interactive/key-dispatch.d.ts +21 -4
- package/dist/modes/interactive/key-dispatch.js +60 -8
- package/dist/modes/interactive/line/line-mode.js +5 -0
- package/dist/modes/interactive/run-indicator.d.ts +15 -0
- package/dist/modes/interactive/run-indicator.js +37 -5
- package/dist/modes/interactive/session-events.js +5 -1
- package/dist/modes/interactive/startup-header.d.ts +29 -14
- package/dist/modes/interactive/startup-header.js +93 -59
- package/dist/modes/interactive/startup-logo.d.ts +83 -0
- package/dist/modes/interactive/startup-logo.js +183 -0
- package/dist/modes/interactive/status-area.d.ts +18 -0
- package/dist/modes/interactive/status-area.js +67 -1
- package/dist/modes/interactive/status-bar.d.ts +9 -1
- package/dist/modes/interactive/status-bar.js +43 -11
- package/dist/modes/interactive/status-line.d.ts +2 -0
- package/dist/modes/interactive/status-line.js +11 -6
- package/dist/modes/interactive/status-quota.d.ts +44 -0
- package/dist/modes/interactive/status-quota.js +135 -0
- package/dist/modes/interactive/subagent-view.d.ts +1 -0
- package/dist/modes/interactive/subagent-view.js +8 -0
- package/dist/modes/interactive/task-background.d.ts +31 -0
- package/dist/modes/interactive/task-background.js +68 -0
- package/dist/modes/interactive/tool-view.d.ts +7 -1
- package/dist/modes/interactive/tool-view.js +24 -1
- package/dist/modes/print/print-mode.d.ts +11 -0
- package/dist/modes/print/print-mode.js +36 -1
- package/dist/modes/rpc/commands.d.ts +2 -1
- package/dist/modes/rpc/commands.js +9 -1
- package/dist/rpc.d.ts +13 -0
- package/dist/rpc.js +3 -0
- package/dist/tools/task-ctl.d.ts +2 -0
- package/dist/tools/task-ctl.js +7 -2
- package/dist/tools/task.d.ts +11 -0
- package/dist/tools/task.js +20 -2
- package/dist/tui/components/editor.d.ts +2 -0
- package/dist/tui/components/editor.js +4 -0
- package/dist/tui/components/loader.d.ts +5 -1
- package/dist/tui/components/loader.js +18 -5
- package/dist/tui/keybindings.d.ts +8 -3
- package/dist/tui/keybindings.js +8 -3
- package/docs/agents.md +52 -28
- package/docs/en/host-api.md +5 -1
- package/docs/en/providers.md +8 -4
- package/docs/en/rpc.md +19 -7
- package/docs/en/sessions.md +3 -1
- package/docs/en/tui.md +84 -66
- package/docs/host-api.md +5 -1
- package/docs/providers.md +29 -12
- package/docs/rpc.md +19 -7
- package/docs/sessions.md +2 -1
- package/docs/tui-design.md +42 -29
- package/docs/tui.md +67 -49
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ const dynamicDefaultsEn = {
|
|
|
25
25
|
"limits.maxTurns": "unset: unlimited",
|
|
26
26
|
"limits.maxCostUsd": "unset: unlimited",
|
|
27
27
|
"ui.replyLanguage": "unset: no reply-language rule is appended (zero-byte change)",
|
|
28
|
-
"ui.agentBar": "auto
|
|
28
|
+
"ui.agentBar": "auto (embedding hosts turn it off in their profile)",
|
|
29
29
|
"auth.chatgpt.clientId": "siwc registers dynamically on first login; codex uses the public client id (AMA_CHATGPT_CLIENT_ID overrides)",
|
|
30
30
|
"auth.chatgpt.redirectPorts": "siwc 1455 → any free port; codex 1455 → 1457",
|
|
31
31
|
};
|
|
@@ -48,7 +48,7 @@ const dynamicDefaultsZh = {
|
|
|
48
48
|
"limits.maxTurns": "不设:不限",
|
|
49
49
|
"limits.maxCostUsd": "不设:不限",
|
|
50
50
|
"ui.replyLanguage": "不设:不追加回复语言规则(零字节变化)",
|
|
51
|
-
"ui.agentBar": "
|
|
51
|
+
"ui.agentBar": "auto(嵌入宿主要关在自己的 profile 写 off)",
|
|
52
52
|
"auth.chatgpt.clientId": "siwc 首次登录动态注册;codex 用公开客户端 id(AMA_CHATGPT_CLIENT_ID 覆盖)",
|
|
53
53
|
"auth.chatgpt.redirectPorts": "siwc 1455 → 任意空闲端口;codex 1455 → 1457",
|
|
54
54
|
};
|
|
@@ -98,13 +98,14 @@ const keysEn = {
|
|
|
98
98
|
"ui.tuiMode": "Terminal interface layout (only regular for now)",
|
|
99
99
|
"ui.quietStartup": "How much the startup screen shows",
|
|
100
100
|
"ui.ascii": "ASCII glyphs (> * L, + - |); when unset it is detected: on when the locale lacks UTF-8, TERM=linux or a legacy conhost; AMA_ASCII=1/0 overrides",
|
|
101
|
-
"ui.compact": "No blank lines between message blocks and no
|
|
102
|
-
"ui.
|
|
101
|
+
"ui.compact": "No blank lines between message blocks and no AMA logo in the startup header",
|
|
102
|
+
"ui.logo": "AMA logo in the startup header: auto draws it when the terminal is at least 48 columns wide, off shows only the info lines",
|
|
103
|
+
"ui.animation": "false: the spinner stays still while running and redraws only when seconds change; the startup logo does not animate",
|
|
103
104
|
"ui.restoreOnCancel": "When Esc interrupts a run before any reply or tool call in this turn, withdraw the turn and put the message back into the input box",
|
|
104
105
|
"ui.statusLine": "Bottom info line: full shows two lines (rate line + status line), compact one; toggle at runtime with Ctrl+G or /statusline (effective from wave 5 W5-A)",
|
|
105
106
|
"ui.language": "Interface language: auto decides from LC_ALL / LC_MESSAGES / LANG (zh* is Chinese, anything else English), zh, en; AMA_LANG and --lang override; affects the interface only, text sent to the model is always English",
|
|
106
107
|
"ui.replyLanguage": "Reply language for the model (e.g. Chinese): one English rule is appended to the end of the rules section at session start; zero-byte change when unset; user level only (effective from wave 6)",
|
|
107
|
-
"ui.agentBar": "Agent bar (sub-agent list above the status line): auto shows it while tasks exist, off hides it;
|
|
108
|
+
"ui.agentBar": "Agent bar (sub-agent list above the status line): auto shows it while tasks exist, off hides it; press ↓ on an empty input to enter it",
|
|
108
109
|
memory: "Cross-session memory (docs/memory.md): off by default, requests are byte-identical while off; project level can only set enabled: false (effective from wave 6 W6-M)",
|
|
109
110
|
"memory.enabled": "Master switch; --memory / --no-memory and AMA_MEMORY=0|1 override",
|
|
110
111
|
"memory.scopes": "Enabled scopes: user (data directory, across projects), project (keyed by a hash of the repository path)",
|
|
@@ -118,6 +119,7 @@ const keysEn = {
|
|
|
118
119
|
"auth.chatgpt.clientId": "OAuth client id",
|
|
119
120
|
"auth.chatgpt.issuer": "Authorization server (override with AMA_CHATGPT_ISSUER for tests)",
|
|
120
121
|
"auth.chatgpt.originator": "originator request header for the codex flavor",
|
|
122
|
+
"auth.chatgpt.codexClientVersion": "Codex CLI version sent as client_version when listing codex-flavor models (the backend hides models newer than it); AMA_CHATGPT_CODEX_CLIENT_VERSION overrides",
|
|
121
123
|
"auth.chatgpt.redirectPorts": "Local callback ports, tried in order; 0 = any free port",
|
|
122
124
|
skills: "Skills",
|
|
123
125
|
"skills.dirs": "Extra skill directories; accumulated across levels",
|
|
@@ -150,10 +152,12 @@ const keysEn = {
|
|
|
150
152
|
"agents.maxConcurrent": "Total concurrency of external agents",
|
|
151
153
|
"agents.sessionBudgetUsd": "USD budget for external agents in this session",
|
|
152
154
|
"agents.dirs": "Extra sub-agent definition directories (*.md); accumulated across levels",
|
|
153
|
-
subagents: "ama's own task sub-sessions; user level only (effective from wave 5 W5-G)",
|
|
155
|
+
subagents: "ama's own task sub-sessions; user level only except background / autoBackgroundAfterMs (effective from wave 5 W5-G)",
|
|
154
156
|
"subagents.maxConcurrent": "Sub-sessions running at the same time",
|
|
155
157
|
"subagents.maxPending": "Queue limit; task fails beyond it",
|
|
156
158
|
"subagents.defaultModel": "Default sub-session model provider/model[@channel]",
|
|
159
|
+
"subagents.background": "Whether task runs in the background by default: auto = background in the TUI / RPC / ACP and foreground with -p; always / never are fixed. The call argument and the agent type's background: override it; user, project and host level",
|
|
160
|
+
"subagents.autoBackgroundAfterMs": "Move a foreground task to the background after it has run this many milliseconds; 0 disables; user and project level",
|
|
157
161
|
models: "Model aliases and the model picker list; user level only (effective from wave 5 W5-G)",
|
|
158
162
|
"models.aliases": "Models that model: fast / strong in sub-agent definitions point to",
|
|
159
163
|
"models.aliases.fast": "Model for the fast alias provider/model[@channel]",
|
|
@@ -216,13 +220,14 @@ const keysZh = {
|
|
|
216
220
|
"ui.tuiMode": "终端界面形态(目前只有 regular)",
|
|
217
221
|
"ui.quietStartup": "启动画面详略",
|
|
218
222
|
"ui.ascii": "ASCII 字形(> * L、+ - |);不写时自动检测:区域设置不含 UTF-8、TERM=linux、旧 conhost 时开启;AMA_ASCII=1/0 覆盖",
|
|
219
|
-
"ui.compact": "
|
|
220
|
-
"ui.
|
|
223
|
+
"ui.compact": "消息区块间不空行、启动头不画 AMA 字符画",
|
|
224
|
+
"ui.logo": "启动头的 AMA 字符画:auto 在终端宽 48 列以上时画,off 只显示信息行",
|
|
225
|
+
"ui.animation": "false:运行中 spinner 静止,只在秒数变化时重绘;启动字符画不播放动画",
|
|
221
226
|
"ui.restoreOnCancel": "运行中 Esc 中断、本回合还没有任何回复或工具调用时,撤回该回合并把原消息放回输入框",
|
|
222
227
|
"ui.statusLine": "底部信息行:full 两行(速率行 + 状态行),compact 一行;运行时 Ctrl+G 或 /statusline 切换(第五波 W5-A 起生效)",
|
|
223
228
|
"ui.language": "界面语言:auto 按 LC_ALL / LC_MESSAGES / LANG 判断(zh* 为中文,其余英文),zh,en;AMA_LANG、--lang 覆盖;只影响界面,发给模型的文本固定英文",
|
|
224
229
|
"ui.replyLanguage": "模型回复语言(如 Chinese):会话开始在 rules 节末尾追加一句英文规则;不设时零字节变化;只认用户级(第六波起生效)",
|
|
225
|
-
"ui.agentBar": "Agent 栏(状态行上方的子 Agent 列表):auto 有任务时显示,off
|
|
230
|
+
"ui.agentBar": "Agent 栏(状态行上方的子 Agent 列表):auto 有任务时显示,off 不显示;空输入时按 ↓ 进入",
|
|
226
231
|
memory: "跨会话记忆(docs/memory.md):缺省关闭,关闭时请求逐字节不变;项目级只能设 enabled: false(第六波 W6-M 起生效)",
|
|
227
232
|
"memory.enabled": "总开关;--memory / --no-memory、AMA_MEMORY=0|1 覆盖",
|
|
228
233
|
"memory.scopes": "启用的作用域:user(数据目录,跨项目)、project(按仓库路径哈希)",
|
|
@@ -236,6 +241,7 @@ const keysZh = {
|
|
|
236
241
|
"auth.chatgpt.clientId": "OAuth 客户端 id",
|
|
237
242
|
"auth.chatgpt.issuer": "授权服务器(测试用 AMA_CHATGPT_ISSUER 覆盖)",
|
|
238
243
|
"auth.chatgpt.originator": "codex flavor 的 originator 请求头",
|
|
244
|
+
"auth.chatgpt.codexClientVersion": "codex flavor 列模型时作为 client_version 发送的 Codex CLI 版本号(后端不给比它新的模型);AMA_CHATGPT_CODEX_CLIENT_VERSION 优先",
|
|
239
245
|
"auth.chatgpt.redirectPorts": "本地回调端口,依次尝试;0 = 任意空闲端口",
|
|
240
246
|
skills: "Skill",
|
|
241
247
|
"skills.dirs": "追加的 Skill 目录;各层累加",
|
|
@@ -268,10 +274,12 @@ const keysZh = {
|
|
|
268
274
|
"agents.maxConcurrent": "外部 Agent 的总并发",
|
|
269
275
|
"agents.sessionBudgetUsd": "本会话外部 Agent 的美元预算",
|
|
270
276
|
"agents.dirs": "追加的子 Agent 定义目录(*.md);各层累加",
|
|
271
|
-
subagents: "ama 自己的 task
|
|
277
|
+
subagents: "ama 自己的 task 子会话;除 background / autoBackgroundAfterMs 外只认用户级(第五波 W5-G 起生效)",
|
|
272
278
|
"subagents.maxConcurrent": "同时运行的子会话数",
|
|
273
279
|
"subagents.maxPending": "排队上限,超出时 task 报错",
|
|
274
280
|
"subagents.defaultModel": "子会话缺省模型 provider/model[@channel]",
|
|
281
|
+
"subagents.background": "task 缺省是否后台:auto = TUI / RPC / ACP 下后台、-p 下前台;always / never 固定。调用参数与类型定义的 background: 优先;用户、项目、宿主级都认",
|
|
282
|
+
"subagents.autoBackgroundAfterMs": "前台任务运行超过该毫秒数自动转后台;0 关闭;用户、项目级都认",
|
|
275
283
|
models: "模型别名与模型选择器清单;只认用户级(第五波 W5-G 起生效)",
|
|
276
284
|
"models.aliases": "子 Agent 定义里 model: fast / strong 指向的模型",
|
|
277
285
|
"models.aliases.fast": "fast 别名的模型 provider/model[@channel]",
|
|
@@ -52,6 +52,7 @@ export declare const en: {
|
|
|
52
52
|
"ui.quietStartup": string;
|
|
53
53
|
"ui.ascii": string;
|
|
54
54
|
"ui.compact": string;
|
|
55
|
+
"ui.logo": string;
|
|
55
56
|
"ui.animation": string;
|
|
56
57
|
"ui.restoreOnCancel": string;
|
|
57
58
|
"ui.statusLine": string;
|
|
@@ -71,6 +72,7 @@ export declare const en: {
|
|
|
71
72
|
"auth.chatgpt.clientId": string;
|
|
72
73
|
"auth.chatgpt.issuer": string;
|
|
73
74
|
"auth.chatgpt.originator": string;
|
|
75
|
+
"auth.chatgpt.codexClientVersion": string;
|
|
74
76
|
"auth.chatgpt.redirectPorts": string;
|
|
75
77
|
skills: string;
|
|
76
78
|
"skills.dirs": string;
|
|
@@ -107,6 +109,8 @@ export declare const en: {
|
|
|
107
109
|
"subagents.maxConcurrent": string;
|
|
108
110
|
"subagents.maxPending": string;
|
|
109
111
|
"subagents.defaultModel": string;
|
|
112
|
+
"subagents.background": string;
|
|
113
|
+
"subagents.autoBackgroundAfterMs": string;
|
|
110
114
|
models: string;
|
|
111
115
|
"models.aliases": string;
|
|
112
116
|
"models.aliases.fast": string;
|
|
@@ -307,6 +311,7 @@ export declare const zh: {
|
|
|
307
311
|
"ui.quietStartup": string;
|
|
308
312
|
"ui.ascii": string;
|
|
309
313
|
"ui.compact": string;
|
|
314
|
+
"ui.logo": string;
|
|
310
315
|
"ui.animation": string;
|
|
311
316
|
"ui.restoreOnCancel": string;
|
|
312
317
|
"ui.statusLine": string;
|
|
@@ -326,6 +331,7 @@ export declare const zh: {
|
|
|
326
331
|
"auth.chatgpt.clientId": string;
|
|
327
332
|
"auth.chatgpt.issuer": string;
|
|
328
333
|
"auth.chatgpt.originator": string;
|
|
334
|
+
"auth.chatgpt.codexClientVersion": string;
|
|
329
335
|
"auth.chatgpt.redirectPorts": string;
|
|
330
336
|
skills: string;
|
|
331
337
|
"skills.dirs": string;
|
|
@@ -362,6 +368,8 @@ export declare const zh: {
|
|
|
362
368
|
"subagents.maxConcurrent": string;
|
|
363
369
|
"subagents.maxPending": string;
|
|
364
370
|
"subagents.defaultModel": string;
|
|
371
|
+
"subagents.background": string;
|
|
372
|
+
"subagents.autoBackgroundAfterMs": string;
|
|
365
373
|
models: string;
|
|
366
374
|
"models.aliases": string;
|
|
367
375
|
"models.aliases.fast": string;
|
|
@@ -13,16 +13,8 @@ export declare const en: {
|
|
|
13
13
|
templates: (n: number) => string;
|
|
14
14
|
host: (host: string) => string;
|
|
15
15
|
warnings: (n: number) => string;
|
|
16
|
-
hintCompact: string;
|
|
17
|
-
keyModel: string;
|
|
18
|
-
keyDir: string;
|
|
19
|
-
keyMode: string;
|
|
20
|
-
keyLoaded: string;
|
|
21
|
-
keyHost: string;
|
|
22
|
-
keyWarnings: string;
|
|
23
16
|
thinking: (level: string) => string;
|
|
24
17
|
preset: (preset: string) => string;
|
|
25
|
-
warningsValue: (n: number) => string;
|
|
26
18
|
hint: string;
|
|
27
19
|
};
|
|
28
20
|
ui: {
|
|
@@ -59,16 +51,8 @@ export declare const zh: {
|
|
|
59
51
|
templates: (n: number) => string;
|
|
60
52
|
host: (host: string) => string;
|
|
61
53
|
warnings: (n: number) => string;
|
|
62
|
-
hintCompact: string;
|
|
63
|
-
keyModel: string;
|
|
64
|
-
keyDir: string;
|
|
65
|
-
keyMode: string;
|
|
66
|
-
keyLoaded: string;
|
|
67
|
-
keyHost: string;
|
|
68
|
-
keyWarnings: string;
|
|
69
54
|
thinking: (level: string) => string;
|
|
70
55
|
preset: (preset: string) => string;
|
|
71
|
-
warningsValue: (n: number) => string;
|
|
72
56
|
hint: string;
|
|
73
57
|
};
|
|
74
58
|
ui: {
|
|
@@ -14,16 +14,8 @@ export const en = {
|
|
|
14
14
|
templates: (n) => plural(n, "template"),
|
|
15
15
|
host: (host) => `host ${host}`,
|
|
16
16
|
warnings: (n) => `${plural(n, "warning")} (ama doctor)`,
|
|
17
|
-
hintCompact: "/help · Shift+Tab mode",
|
|
18
|
-
keyModel: "Model",
|
|
19
|
-
keyDir: "Folder",
|
|
20
|
-
keyMode: "Mode",
|
|
21
|
-
keyLoaded: "Loaded",
|
|
22
|
-
keyHost: "Host",
|
|
23
|
-
keyWarnings: "Warnings",
|
|
24
17
|
thinking: (level) => `thinking ${level}`,
|
|
25
18
|
preset: (preset) => `preset ${preset}`,
|
|
26
|
-
warningsValue: (n) => `${n} (see ama doctor)`,
|
|
27
19
|
hint: "/help commands · Shift+Tab mode · Ctrl+O expand tool output",
|
|
28
20
|
},
|
|
29
21
|
ui: {
|
|
@@ -60,16 +52,8 @@ export const zh = {
|
|
|
60
52
|
templates: (n) => `${n} 模板`,
|
|
61
53
|
host: (host) => `宿主 ${host}`,
|
|
62
54
|
warnings: (n) => `警告 ${n} 条(ama doctor)`,
|
|
63
|
-
hintCompact: "/help · Shift+Tab 切模式",
|
|
64
|
-
keyModel: "模型",
|
|
65
|
-
keyDir: "目录",
|
|
66
|
-
keyMode: "模式",
|
|
67
|
-
keyLoaded: "已加载",
|
|
68
|
-
keyHost: "宿主",
|
|
69
|
-
keyWarnings: "警告",
|
|
70
55
|
thinking: (level) => `思考 ${level}`,
|
|
71
56
|
preset: (preset) => `预设 ${preset}`,
|
|
72
|
-
warningsValue: (n) => `${n} 条(ama doctor 查看)`,
|
|
73
57
|
hint: "/help 命令 · Shift+Tab 切模式 · Ctrl+O 展开工具输出",
|
|
74
58
|
},
|
|
75
59
|
ui: {
|
|
@@ -91,6 +91,18 @@ export declare const en: {
|
|
|
91
91
|
cacheSilent: string;
|
|
92
92
|
sandbox: string;
|
|
93
93
|
cycleHint: string;
|
|
94
|
+
/** [W6] 订阅配额行(full 第三行)与窄屏 / compact 短格式;标签自带分隔(英文冒号后空格)。 */
|
|
95
|
+
quota: {
|
|
96
|
+
session: string;
|
|
97
|
+
reset: string;
|
|
98
|
+
weekly: string;
|
|
99
|
+
weeklyReset: string;
|
|
100
|
+
window: (duration: string) => string;
|
|
101
|
+
windowReset: (duration: string) => string;
|
|
102
|
+
short5h: string;
|
|
103
|
+
shortWeek: string;
|
|
104
|
+
pending: string;
|
|
105
|
+
};
|
|
94
106
|
};
|
|
95
107
|
subagent: {
|
|
96
108
|
running: (elapsed: string) => string;
|
|
@@ -189,16 +201,8 @@ export declare const en: {
|
|
|
189
201
|
templates: (n: number) => string;
|
|
190
202
|
host: (host: string) => string;
|
|
191
203
|
warnings: (n: number) => string;
|
|
192
|
-
hintCompact: string;
|
|
193
|
-
keyModel: string;
|
|
194
|
-
keyDir: string;
|
|
195
|
-
keyMode: string;
|
|
196
|
-
keyLoaded: string;
|
|
197
|
-
keyHost: string;
|
|
198
|
-
keyWarnings: string;
|
|
199
204
|
thinking: (level: string) => string;
|
|
200
205
|
preset: (preset: string) => string;
|
|
201
|
-
warningsValue: (n: number) => string;
|
|
202
206
|
hint: string;
|
|
203
207
|
};
|
|
204
208
|
ui: {
|
|
@@ -328,6 +332,17 @@ export declare const zh: {
|
|
|
328
332
|
cacheSilent: string;
|
|
329
333
|
sandbox: string;
|
|
330
334
|
cycleHint: string;
|
|
335
|
+
quota: {
|
|
336
|
+
session: string;
|
|
337
|
+
reset: string;
|
|
338
|
+
weekly: string;
|
|
339
|
+
weeklyReset: string;
|
|
340
|
+
window: (duration: string) => string;
|
|
341
|
+
windowReset: (duration: string) => string;
|
|
342
|
+
short5h: string;
|
|
343
|
+
shortWeek: string;
|
|
344
|
+
pending: string;
|
|
345
|
+
};
|
|
331
346
|
};
|
|
332
347
|
subagent: {
|
|
333
348
|
running: (elapsed: string) => string;
|
|
@@ -426,16 +441,8 @@ export declare const zh: {
|
|
|
426
441
|
templates: (n: number) => string;
|
|
427
442
|
host: (host: string) => string;
|
|
428
443
|
warnings: (n: number) => string;
|
|
429
|
-
hintCompact: string;
|
|
430
|
-
keyModel: string;
|
|
431
|
-
keyDir: string;
|
|
432
|
-
keyMode: string;
|
|
433
|
-
keyLoaded: string;
|
|
434
|
-
keyHost: string;
|
|
435
|
-
keyWarnings: string;
|
|
436
444
|
thinking: (level: string) => string;
|
|
437
445
|
preset: (preset: string) => string;
|
|
438
|
-
warningsValue: (n: number) => string;
|
|
439
446
|
hint: string;
|
|
440
447
|
};
|
|
441
448
|
ui: {
|
|
@@ -24,6 +24,7 @@ export const en = {
|
|
|
24
24
|
"Shift+Tab / Tab (empty input) cycle permission mode (confirm before Bypass) Ctrl+L model Ctrl+T thinking level Ctrl+O expand tool output and thinking",
|
|
25
25
|
"Approval: 1–3 or ↑↓ Enter to choose, y allow a allow for this session n / Esc deny v full input",
|
|
26
26
|
"Plan approval: 1 approve 2 run in a fresh context 3 keep revising 4 reject and leave Plan e edit plan Esc stay in Plan",
|
|
27
|
+
"Ctrl+B move foreground sub-agent tasks to the background (in tmux: C-b C-b) ↓ (empty input) Agent bar: b background x twice to stop Enter open",
|
|
27
28
|
"Ctrl+V paste a clipboard image (inserts @path) Ctrl+G footer two rows / one row",
|
|
28
29
|
"Ctrl+C clear input (again to quit) Ctrl+D quit on empty input Tab complete @ reference a file",
|
|
29
30
|
].join("\n"),
|
|
@@ -103,6 +104,18 @@ export const en = {
|
|
|
103
104
|
cacheSilent: "n/a",
|
|
104
105
|
sandbox: "sandbox",
|
|
105
106
|
cycleHint: "shift+tab to cycle",
|
|
107
|
+
/** [W6] 订阅配额行(full 第三行)与窄屏 / compact 短格式;标签自带分隔(英文冒号后空格)。 */
|
|
108
|
+
quota: {
|
|
109
|
+
session: "Session: ",
|
|
110
|
+
reset: "Reset: ",
|
|
111
|
+
weekly: "Weekly: ",
|
|
112
|
+
weeklyReset: "Weekly Reset: ",
|
|
113
|
+
window: (duration) => `${duration}: `,
|
|
114
|
+
windowReset: (duration) => `${duration} Reset: `,
|
|
115
|
+
short5h: "5h",
|
|
116
|
+
shortWeek: "wk",
|
|
117
|
+
pending: "Quota: shown after the first request",
|
|
118
|
+
},
|
|
106
119
|
},
|
|
107
120
|
subagent: {
|
|
108
121
|
running: (elapsed) => `running ${elapsed}`,
|
|
@@ -143,6 +156,7 @@ export const zh = {
|
|
|
143
156
|
"Shift+Tab / Tab(输入为空时)切换权限模式(进入 Bypass 前确认) Ctrl+L 模型 Ctrl+T 思考级别 Ctrl+O 展开工具输出与思考",
|
|
144
157
|
"审批:1–3 或 ↑↓ Enter 选择,y 允许 a 本会话允许同类 n / Esc 拒绝 v 完整输入",
|
|
145
158
|
"计划审批:1 批准 2 新上下文执行 3 继续修改 4 放弃并退出 Plan e 编辑计划 Esc 留在 Plan",
|
|
159
|
+
"Ctrl+B 前台子 Agent 任务转后台(tmux 里 C-b C-b) ↓(空输入)Agent 栏:b 转后台 x 连按两次停止 Enter 打开",
|
|
146
160
|
"Ctrl+V 粘贴剪贴板图片(插入 @路径) Ctrl+G 底部信息行两行 / 一行",
|
|
147
161
|
"Ctrl+C 清空输入(再按退出) Ctrl+D 空输入时退出 Tab 补全 @ 引用文件",
|
|
148
162
|
].join("\n"),
|
|
@@ -218,6 +232,17 @@ export const zh = {
|
|
|
218
232
|
cacheSilent: "未报告",
|
|
219
233
|
sandbox: "沙箱",
|
|
220
234
|
cycleHint: "shift+tab 切换",
|
|
235
|
+
quota: {
|
|
236
|
+
session: "5 小时:",
|
|
237
|
+
reset: "重置:",
|
|
238
|
+
weekly: "本周:",
|
|
239
|
+
weeklyReset: "本周重置:",
|
|
240
|
+
window: (duration) => `${duration}:`,
|
|
241
|
+
windowReset: (duration) => `${duration}重置:`,
|
|
242
|
+
short5h: "5h",
|
|
243
|
+
shortWeek: "周",
|
|
244
|
+
pending: "配额:首次请求后显示",
|
|
245
|
+
},
|
|
221
246
|
},
|
|
222
247
|
subagent: {
|
|
223
248
|
running: (elapsed) => `运行中 ${elapsed}`,
|
|
@@ -15,6 +15,7 @@ export declare const en: {
|
|
|
15
15
|
needsPrompt: string;
|
|
16
16
|
retry: (attempt: number, max: number, seconds: number, error: string) => string;
|
|
17
17
|
modelFailed: string;
|
|
18
|
+
waitingTasks: (n: number) => string;
|
|
18
19
|
planPending: (version: number, where: string) => string;
|
|
19
20
|
limitTurns: (limit: number) => string;
|
|
20
21
|
limitCost: (limit: string, spent: string) => string;
|
|
@@ -24,6 +25,7 @@ export declare const en: {
|
|
|
24
25
|
rpc: {
|
|
25
26
|
unknownCommand: (type: string) => string;
|
|
26
27
|
parseFailed: (error: string) => string;
|
|
28
|
+
badTaskId: string;
|
|
27
29
|
missingType: string;
|
|
28
30
|
unsupported: string;
|
|
29
31
|
noPlan: string;
|
|
@@ -53,6 +55,7 @@ export declare const zh: {
|
|
|
53
55
|
seconds: (n: number) => string;
|
|
54
56
|
millis: (n: number) => string;
|
|
55
57
|
needsPrompt: string;
|
|
58
|
+
waitingTasks: (n: number) => string;
|
|
56
59
|
retry: (attempt: number, max: number, seconds: number, error: string) => string;
|
|
57
60
|
modelFailed: string;
|
|
58
61
|
planPending: (version: number, where: string) => string;
|
|
@@ -61,6 +64,7 @@ export declare const zh: {
|
|
|
61
64
|
denied: (count: number, tools: readonly string[], reason: string) => string;
|
|
62
65
|
};
|
|
63
66
|
rpc: {
|
|
67
|
+
badTaskId: string;
|
|
64
68
|
unknownCommand: (type: string) => string;
|
|
65
69
|
parseFailed: (error: string) => string;
|
|
66
70
|
missingType: string;
|
|
@@ -16,6 +16,7 @@ export const en = {
|
|
|
16
16
|
needsPrompt: "ama: -p needs a prompt (positional argument or stdin pipe)\n",
|
|
17
17
|
retry: (attempt, max, seconds, error) => `ama: ↻ retry ${attempt}/${max} (in ${seconds}s): ${error}\n`,
|
|
18
18
|
modelFailed: "model call failed",
|
|
19
|
+
waitingTasks: (n) => `ama: waiting for ${plural(n, "background task")} and their notification turns (Ctrl+C stops them)\n`,
|
|
19
20
|
planPending: (version, where) => `ama: plan v${version} saved, awaiting approval (not executed): ${where}; -p does not approve on anyone's behalf — ` +
|
|
20
21
|
"approve it in the interactive UI or via RPC plan_response, or set plan.unattended: approve to let -p approve and continue",
|
|
21
22
|
limitTurns: (limit) => `ama: reached the turn limit ${limit} (--max-turns / limits.maxTurns); run ended before finishing`,
|
|
@@ -27,6 +28,7 @@ export const en = {
|
|
|
27
28
|
rpc: {
|
|
28
29
|
unknownCommand: (type) => `unknown command: ${type}`,
|
|
29
30
|
parseFailed: (error) => `JSON parse failed: ${error}`,
|
|
31
|
+
badTaskId: "taskId must be a string",
|
|
30
32
|
missingType: "missing type",
|
|
31
33
|
unsupported: "this session does not support this command",
|
|
32
34
|
noPlan: "this session has no plan extension",
|
|
@@ -56,6 +58,7 @@ export const zh = {
|
|
|
56
58
|
seconds: (n) => `${n} 秒`,
|
|
57
59
|
millis: (n) => `${n} 毫秒`,
|
|
58
60
|
needsPrompt: "ama: -p 需要提示(位置参数或 stdin 管道)\n",
|
|
61
|
+
waitingTasks: (n) => `ama: 等待 ${n} 个后台任务及其通知回合结束(Ctrl+C 中止)\n`,
|
|
59
62
|
retry: (attempt, max, seconds, error) => `ama: ↻ 重试 ${attempt}/${max}(${seconds}s 后):${error}\n`,
|
|
60
63
|
modelFailed: "模型调用失败",
|
|
61
64
|
planPending: (version, where) => `ama: 计划 v${version} 已落盘、待审批(未执行):${where};-p 不替人批准——` +
|
|
@@ -66,6 +69,7 @@ export const zh = {
|
|
|
66
69
|
"-p 没有人审批,需要放行时用 --permission-mode auto-edit|auto 或 --allow <规则>",
|
|
67
70
|
},
|
|
68
71
|
rpc: {
|
|
72
|
+
badTaskId: "taskId 应为字符串",
|
|
69
73
|
unknownCommand: (type) => `未知命令:${type}`,
|
|
70
74
|
parseFailed: (error) => `JSON 解析失败:${error}`,
|
|
71
75
|
missingType: "缺少 type",
|
|
@@ -33,7 +33,7 @@ export const en = {
|
|
|
33
33
|
statusline: "Footer info two lines / one line (Ctrl+G)",
|
|
34
34
|
planArgs: "[goal] | approve [mode|fresh] | reject",
|
|
35
35
|
plan: "Show the plan and status; with a goal, enter Plan mode; approve / discard a pending plan",
|
|
36
|
-
tasks: "Sub-agent tasks: status, output, stop",
|
|
36
|
+
tasks: "Sub-agent tasks: status, output, stop, background",
|
|
37
37
|
agents: "Sub-agent types and external agents (installed, version)",
|
|
38
38
|
paste: "Paste an image from the clipboard (Ctrl+V)",
|
|
39
39
|
exit: "Exit",
|
|
@@ -53,7 +53,7 @@ export const en = {
|
|
|
53
53
|
warmingSet: (mode) => `Warming: ${mode} (this session)`,
|
|
54
54
|
cacheUsage: "usage: /cache [warm off|streaming|idle | fingerprint]",
|
|
55
55
|
taskStopped: (id) => `Stopped ${id}`,
|
|
56
|
-
tasksUsage: "usage: /tasks [id] | /tasks stop <id>",
|
|
56
|
+
tasksUsage: "usage: /tasks [id] | /tasks stop <id> | /tasks bg [id]",
|
|
57
57
|
newSession: (id) => `New session ${id}`,
|
|
58
58
|
resumed: (id, messages) => `Resumed session ${id} (${plural(messages, "message")})`,
|
|
59
59
|
forked: (id) => `Forked to new session ${id}`,
|
|
@@ -276,7 +276,7 @@ export const zh = {
|
|
|
276
276
|
statusline: "底部信息行两行 / 一行(Ctrl+G)",
|
|
277
277
|
planArgs: "[目标] | approve [模式|fresh] | reject",
|
|
278
278
|
plan: "查看计划与状态;带目标进入 Plan 模式;批准 / 放弃待审批的计划",
|
|
279
|
-
tasks: "子 Agent
|
|
279
|
+
tasks: "子 Agent 任务:状态、输出、停止、转后台",
|
|
280
280
|
agents: "子 Agent 类型与外部 Agent(安装状态、版本)",
|
|
281
281
|
paste: "粘贴剪贴板里的图片(Ctrl+V)",
|
|
282
282
|
exit: "退出",
|
|
@@ -295,7 +295,7 @@ export const zh = {
|
|
|
295
295
|
warmingSet: (mode) => `保温:${mode}(本会话)`,
|
|
296
296
|
cacheUsage: "用法:/cache [warm off|streaming|idle | fingerprint]",
|
|
297
297
|
taskStopped: (id) => `已停止 ${id}`,
|
|
298
|
-
tasksUsage: "用法:/tasks [id] | /tasks stop <id>",
|
|
298
|
+
tasksUsage: "用法:/tasks [id] | /tasks stop <id> | /tasks bg [id]",
|
|
299
299
|
newSession: (id) => `已新建会话 ${id}`,
|
|
300
300
|
resumed: (id, messages) => `已恢复会话 ${id}(${messages} 条消息)`,
|
|
301
301
|
forked: (id) => `已分叉到新会话 ${id}`,
|
|
@@ -25,6 +25,7 @@ export declare const en: {
|
|
|
25
25
|
"ui.showThinking": string;
|
|
26
26
|
"ui.compact": string;
|
|
27
27
|
"ui.animation": string;
|
|
28
|
+
"ui.logo": string;
|
|
28
29
|
"ui.statusLine": string;
|
|
29
30
|
"ui.restoreOnCancel": string;
|
|
30
31
|
"ui.quietStartup": string;
|
|
@@ -84,6 +85,8 @@ export declare const en: {
|
|
|
84
85
|
"agents.sessionBudgetUsd": string;
|
|
85
86
|
"subagents.maxConcurrent": string;
|
|
86
87
|
"subagents.maxPending": string;
|
|
88
|
+
"subagents.background": string;
|
|
89
|
+
"subagents.autoBackgroundAfterMs": string;
|
|
87
90
|
"memory.enabled": string;
|
|
88
91
|
"memory.subagents": string;
|
|
89
92
|
};
|
|
@@ -199,6 +202,7 @@ export declare const zh: {
|
|
|
199
202
|
"ui.showThinking": string;
|
|
200
203
|
"ui.compact": string;
|
|
201
204
|
"ui.animation": string;
|
|
205
|
+
"ui.logo": string;
|
|
202
206
|
"ui.statusLine": string;
|
|
203
207
|
"ui.restoreOnCancel": string;
|
|
204
208
|
"ui.quietStartup": string;
|
|
@@ -258,6 +262,8 @@ export declare const zh: {
|
|
|
258
262
|
"agents.sessionBudgetUsd": string;
|
|
259
263
|
"subagents.maxConcurrent": string;
|
|
260
264
|
"subagents.maxPending": string;
|
|
265
|
+
"subagents.background": string;
|
|
266
|
+
"subagents.autoBackgroundAfterMs": string;
|
|
261
267
|
"memory.enabled": string;
|
|
262
268
|
"memory.subagents": string;
|
|
263
269
|
};
|
|
@@ -25,6 +25,7 @@ export const en = {
|
|
|
25
25
|
"ui.showThinking": "Thinking display",
|
|
26
26
|
"ui.compact": "Compact layout",
|
|
27
27
|
"ui.animation": "Spinner animation",
|
|
28
|
+
"ui.logo": "Startup logo",
|
|
28
29
|
"ui.statusLine": "Status line",
|
|
29
30
|
"ui.restoreOnCancel": "Restore on cancel",
|
|
30
31
|
"ui.quietStartup": "Startup screen",
|
|
@@ -84,6 +85,8 @@ export const en = {
|
|
|
84
85
|
"agents.sessionBudgetUsd": "External agent budget",
|
|
85
86
|
"subagents.maxConcurrent": "Subagents in parallel",
|
|
86
87
|
"subagents.maxPending": "Subagent queue limit",
|
|
88
|
+
"subagents.background": "Subagents in background",
|
|
89
|
+
"subagents.autoBackgroundAfterMs": "Auto-background after (ms)",
|
|
87
90
|
"memory.enabled": "Memory",
|
|
88
91
|
"memory.subagents": "Memory in subagents",
|
|
89
92
|
},
|
|
@@ -193,6 +196,7 @@ export const zh = {
|
|
|
193
196
|
"ui.showThinking": "思考内容",
|
|
194
197
|
"ui.compact": "紧凑布局",
|
|
195
198
|
"ui.animation": "spinner 动画",
|
|
199
|
+
"ui.logo": "启动字符画",
|
|
196
200
|
"ui.statusLine": "底部信息行",
|
|
197
201
|
"ui.restoreOnCancel": "中断后放回原消息",
|
|
198
202
|
"ui.quietStartup": "启动画面",
|
|
@@ -252,6 +256,8 @@ export const zh = {
|
|
|
252
256
|
"agents.sessionBudgetUsd": "外部 Agent 预算",
|
|
253
257
|
"subagents.maxConcurrent": "子 Agent 并发",
|
|
254
258
|
"subagents.maxPending": "子 Agent 排队上限",
|
|
259
|
+
"subagents.background": "子 Agent 缺省后台",
|
|
260
|
+
"subagents.autoBackgroundAfterMs": "自动转后台(毫秒)",
|
|
255
261
|
"memory.enabled": "记忆",
|
|
256
262
|
"memory.subagents": "子 Agent 的记忆",
|
|
257
263
|
},
|
|
@@ -48,6 +48,8 @@ export declare const en: {
|
|
|
48
48
|
listFailed: (provider: string, error: string) => string;
|
|
49
49
|
found: (provider: string, count: number, url: string) => string;
|
|
50
50
|
unmatched: string;
|
|
51
|
+
fromBackend: string;
|
|
52
|
+
noBackendWindow: (ids: string) => string;
|
|
51
53
|
image: string;
|
|
52
54
|
reasoning: string;
|
|
53
55
|
noTools: string;
|
|
@@ -101,6 +103,8 @@ export declare const zh: {
|
|
|
101
103
|
listFailed: (provider: string, error: string) => string;
|
|
102
104
|
found: (provider: string, count: number, url: string) => string;
|
|
103
105
|
unmatched: string;
|
|
106
|
+
fromBackend: string;
|
|
107
|
+
noBackendWindow: (ids: string) => string;
|
|
104
108
|
image: string;
|
|
105
109
|
reasoning: string;
|
|
106
110
|
noTools: string;
|
|
@@ -56,6 +56,8 @@ export const en = {
|
|
|
56
56
|
listFailed: (provider, error) => `ama: failed to fetch the model list of ${provider}: ${error}\n`,
|
|
57
57
|
found: (provider, count, url) => `${provider}: found ${plural(count, "model")} (${url})\n`,
|
|
58
58
|
unmatched: " models.dev: no match",
|
|
59
|
+
fromBackend: " (backend)",
|
|
60
|
+
noBackendWindow: (ids) => `The backend did not report a context window for ${ids}; using models.dev (128k when unmatched)\n`,
|
|
59
61
|
image: " · image",
|
|
60
62
|
reasoning: " · reasoning",
|
|
61
63
|
noTools: " · no tool calling",
|
|
@@ -116,6 +118,8 @@ export const zh = {
|
|
|
116
118
|
listFailed: (provider, error) => `ama: ${provider} 模型列表获取失败:${error}\n`,
|
|
117
119
|
found: (provider, count, url) => `${provider}:发现 ${count} 个模型(${url})\n`,
|
|
118
120
|
unmatched: " models.dev 未匹配",
|
|
121
|
+
fromBackend: "(后端)",
|
|
122
|
+
noBackendWindow: (ids) => `后端没有给出 ${ids} 的上下文窗口,改用 models.dev 的值(未匹配时按 128k)\n`,
|
|
119
123
|
image: " · 图片",
|
|
120
124
|
reasoning: " · 思考",
|
|
121
125
|
noTools: " · 不支持工具调用",
|
|
@@ -280,6 +280,8 @@ export declare const en: {
|
|
|
280
280
|
listFailed: (provider: string, error: string) => string;
|
|
281
281
|
found: (provider: string, count: number, url: string) => string;
|
|
282
282
|
unmatched: string;
|
|
283
|
+
fromBackend: string;
|
|
284
|
+
noBackendWindow: (ids: string) => string;
|
|
283
285
|
image: string;
|
|
284
286
|
reasoning: string;
|
|
285
287
|
noTools: string;
|
|
@@ -564,6 +566,8 @@ export declare const zh: {
|
|
|
564
566
|
listFailed: (provider: string, error: string) => string;
|
|
565
567
|
found: (provider: string, count: number, url: string) => string;
|
|
566
568
|
unmatched: string;
|
|
569
|
+
fromBackend: string;
|
|
570
|
+
noBackendWindow: (ids: string) => string;
|
|
567
571
|
image: string;
|
|
568
572
|
reasoning: string;
|
|
569
573
|
noTools: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { createAgentSession, createRuntime } from "./sdk.js";
|
|
|
38
38
|
export type { CreateSessionOptions, RuntimeOptions, SessionAuth } from "./sdk.js";
|
|
39
39
|
export type { PlanDecision, PlanResponse, PlanResponseResult, SdkAgentSession, SessionPlanApi, SessionPlanOptions, } from "./sdk.js";
|
|
40
40
|
export { AgentSessionImpl } from "./agent/session.js";
|
|
41
|
+
export type { BackgroundReason } from "./agent/subagent-background.js";
|
|
41
42
|
export { SessionManager } from "./session/manager.js";
|
|
42
43
|
export { ProviderRegistry } from "./ai/providers/registry.js";
|
|
43
44
|
export { FakeProvider } from "./ai/fake/fake-provider.js";
|
|
@@ -22,6 +22,7 @@ import { pasteImage } from "./interactive/clipboard-paste.js";
|
|
|
22
22
|
import { planCommand } from "./interactive/plan-command.js";
|
|
23
23
|
import { rewindCommand } from "./interactive/rewind-command.js";
|
|
24
24
|
import { describeAgents, describeTaskOutput, describeTasks, stopTask, } from "./interactive/tasks-report.js";
|
|
25
|
+
import { backgroundTasks, backgroundedText } from "./interactive/task-background.js";
|
|
25
26
|
import { describeCache, describeFingerprint, describeSession } from "./session-report.js";
|
|
26
27
|
import { msg } from "../i18n/index.js";
|
|
27
28
|
export { describeSession } from "./session-report.js";
|
|
@@ -63,7 +64,7 @@ export const BUILTIN_COMMANDS = [
|
|
|
63
64
|
command("cache", "cache", "[warm off|streaming|idle | fingerprint]"),
|
|
64
65
|
command("statusline", "statusline", "[full|compact]"),
|
|
65
66
|
command("plan", "plan", { key: "planArgs" }),
|
|
66
|
-
command("tasks", "tasks", "[id] | stop <id>"),
|
|
67
|
+
command("tasks", "tasks", "[id] | stop <id> | bg [id]"),
|
|
67
68
|
command("agents", "agents"),
|
|
68
69
|
command("paste", "paste"),
|
|
69
70
|
command("exit", "exit"),
|
|
@@ -110,12 +111,15 @@ function cacheCommand(session, args) {
|
|
|
110
111
|
}
|
|
111
112
|
throw new AmaError("invalid_arguments", msg().report.command.cacheUsage);
|
|
112
113
|
}
|
|
113
|
-
/** `/tasks`、`/tasks <id>`、`/tasks stop <id
|
|
114
|
-
async function tasksCommand(
|
|
114
|
+
/** `/tasks`、`/tasks <id>`、`/tasks stop <id>`、`/tasks bg [id]`([W7-C] 无 id = 全部前台任务)。 */
|
|
115
|
+
async function tasksCommand(session, args) {
|
|
116
|
+
const sessionId = session.state.sessionId;
|
|
115
117
|
const [first, second, extra] = args.split(/\s+/).filter((s) => s !== "");
|
|
116
118
|
const now = Date.now();
|
|
117
119
|
if (first === undefined)
|
|
118
120
|
return describeTasks(sessionId, now);
|
|
121
|
+
if (first === "bg" && extra === undefined)
|
|
122
|
+
return backgroundedText(backgroundTasks(session, second));
|
|
119
123
|
if (first === "stop" && second !== undefined && extra === undefined) {
|
|
120
124
|
await stopTask(sessionId, second);
|
|
121
125
|
return msg().report.command.taskStopped(second);
|
|
@@ -241,7 +245,7 @@ export async function runSlashCommand(line, ctx) {
|
|
|
241
245
|
case "plan":
|
|
242
246
|
return planCommand(session, args, ctx);
|
|
243
247
|
case "tasks":
|
|
244
|
-
return { kind: "handled", message: await tasksCommand(session
|
|
248
|
+
return { kind: "handled", message: await tasksCommand(session, args) };
|
|
245
249
|
case "agents":
|
|
246
250
|
return { kind: "handled", message: describeAgents(session.state.sessionId) };
|
|
247
251
|
case "paste": {
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* - 显示条件:有排队 / 运行中 / 等审批的任务,或本会话里看着结束、还没查看过的任务(结束后最多 10 分钟);
|
|
14
14
|
* `ui.agentBar: "off"`(嵌入宿主缺省)整个不显示。
|
|
15
15
|
* - 聚焦(`Ctrl+B` / 空输入 `↓` / `/tasks`):列出本会话全部任务,`›` 标当前项,窗口跟着选择滚动,
|
|
16
|
-
*
|
|
16
|
+
* 末行是按键提示(`↑↓ 选择 · Enter 打开 · b 转后台 · x 停止 · Esc 返回`,放不下时丢 b / x 说明)。
|
|
17
|
+
* 按键处理在 agent-ui.ts。
|
|
18
|
+
* - [W7-C] 等审批的行(含停靠在栏里的后台任务审批)整行警告色。
|
|
17
19
|
* - 状态来自任务注册表(`TaskInfo`、`live().queued`)、子 Agent 折叠视图的跟踪(轮数、最近工具、用时,界面时钟)
|
|
18
20
|
* 与 `permission_request.context.taskId`(等审批)。
|
|
19
21
|
*/
|