@armadra/agent 0.5.1 → 0.6.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/CHANGELOG.md +177 -304
- package/CHANGELOG.zh-CN.md +442 -0
- package/README.md +408 -364
- package/README.zh-CN.md +705 -0
- package/dist/agent/session-plan.js +2 -2
- package/dist/agent/session-state.d.ts +3 -0
- package/dist/agent/session-state.js +20 -0
- package/dist/agent/session-subagent.d.ts +15 -1
- package/dist/agent/session-subagent.js +26 -3
- package/dist/agent/session-telemetry.d.ts +16 -2
- package/dist/agent/session-telemetry.js +29 -7
- package/dist/agent/session-tools.js +5 -2
- package/dist/agent/session-trace-writer.d.ts +27 -0
- package/dist/agent/session-trace-writer.js +253 -0
- package/dist/agent/session.d.ts +2 -0
- package/dist/agent/session.js +12 -0
- package/dist/agent/subagent-direct.d.ts +20 -0
- package/dist/agent/subagent-direct.js +76 -0
- package/dist/agent/subagent-registry.d.ts +8 -1
- package/dist/agent/subagent-registry.js +28 -1
- package/dist/agent/system-prompt.d.ts +3 -1
- package/dist/agent/system-prompt.js +3 -0
- package/dist/agent/tool-runner.d.ts +2 -1
- package/dist/agent/tool-runner.js +5 -4
- package/dist/agent/types-w6.d.ts +39 -0
- package/dist/agent/types-w6.js +4 -0
- package/dist/agent/types.d.ts +5 -2
- package/dist/agents/external.js +1 -1
- package/dist/agents/task-record.d.ts +74 -1
- package/dist/agents/task-record.js +100 -0
- package/dist/ai/apis/cache-params.js +2 -1
- package/dist/ai/apis/chatgpt-backend.d.ts +52 -0
- package/dist/ai/apis/chatgpt-backend.js +224 -0
- package/dist/ai/apis/chatgpt-rate-limits.d.ts +26 -0
- package/dist/ai/apis/chatgpt-rate-limits.js +91 -0
- package/dist/ai/apis/openai-responses-request.d.ts +2 -1
- package/dist/ai/apis/openai-responses-request.js +8 -2
- package/dist/ai/apis/openai-responses.d.ts +2 -0
- package/dist/ai/apis/openai-responses.js +51 -16
- package/dist/ai/overflow.d.ts +1 -1
- package/dist/ai/overflow.js +10 -7
- package/dist/ai/providers/auth.d.ts +15 -2
- package/dist/ai/providers/auth.js +69 -2
- package/dist/ai/providers/builtin.js +27 -0
- package/dist/ai/providers/catalog-data.js +1 -0
- package/dist/ai/providers/enrich.js +2 -7
- package/dist/ai/providers/models-dev-cache.js +15 -19
- package/dist/ai/providers/models-dev-snapshot.js +8 -7
- package/dist/ai/providers/models-dev.js +5 -15
- package/dist/ai/providers/suggest.js +2 -16
- package/dist/ai/types.d.ts +27 -1
- package/dist/auth/chatgpt/backend-client.d.ts +26 -0
- package/dist/auth/chatgpt/backend-client.js +74 -0
- package/dist/auth/chatgpt/claims.d.ts +17 -0
- package/dist/auth/chatgpt/claims.js +46 -0
- package/dist/auth/chatgpt/cli.d.ts +33 -0
- package/dist/auth/chatgpt/cli.js +252 -0
- package/dist/auth/chatgpt/doctor.d.ts +17 -0
- package/dist/auth/chatgpt/doctor.js +36 -0
- package/dist/auth/chatgpt/host-id.d.ts +7 -0
- package/dist/auth/chatgpt/host-id.js +26 -0
- package/dist/auth/chatgpt/login.d.ts +30 -0
- package/dist/auth/chatgpt/login.js +130 -0
- package/dist/auth/chatgpt/presets.d.ts +66 -0
- package/dist/auth/chatgpt/presets.js +120 -0
- package/dist/auth/chatgpt/quota-text.d.ts +13 -0
- package/dist/auth/chatgpt/quota-text.js +36 -0
- package/dist/auth/oauth/browser.d.ts +12 -0
- package/dist/auth/oauth/browser.js +27 -0
- package/dist/auth/oauth/callback-server.d.ts +47 -0
- package/dist/auth/oauth/callback-server.js +147 -0
- package/dist/auth/oauth/flows.d.ts +62 -0
- package/dist/auth/oauth/flows.js +113 -0
- package/dist/auth/oauth/jwt.d.ts +24 -0
- package/dist/auth/oauth/jwt.js +81 -0
- package/dist/auth/oauth/live.d.ts +21 -0
- package/dist/auth/oauth/live.js +25 -0
- package/dist/auth/oauth/oidc.d.ts +26 -0
- package/dist/auth/oauth/oidc.js +72 -0
- package/dist/auth/oauth/pkce.d.ts +15 -0
- package/dist/auth/oauth/pkce.js +20 -0
- package/dist/auth/oauth/refresh.d.ts +35 -0
- package/dist/auth/oauth/refresh.js +129 -0
- package/dist/auth/oauth/token-client.d.ts +33 -0
- package/dist/auth/oauth/token-client.js +121 -0
- package/dist/auth/oauth/token-store.d.ts +23 -0
- package/dist/auth/oauth/token-store.js +125 -0
- package/dist/auth/testing/fake-oauth.d.ts +73 -0
- package/dist/auth/testing/fake-oauth.js +271 -0
- package/dist/auth/testing/refresh-child.d.ts +5 -0
- package/dist/auth/testing/refresh-child.js +16 -0
- package/dist/bundle/ama.cjs +25928 -11144
- package/dist/checkpoints/backend.js +6 -5
- package/dist/checkpoints/restore.js +3 -2
- package/dist/checkpoints/settings.js +2 -1
- package/dist/checkpoints/shadow-git.js +7 -6
- package/dist/checkpoints/shadow-restore.js +3 -2
- package/dist/checkpoints/tracker.js +4 -3
- package/dist/cli/args.d.ts +9 -2
- package/dist/cli/args.js +74 -27
- package/dist/cli/bootstrap.js +53 -31
- package/dist/cli/choice-prompt.js +8 -6
- package/dist/cli/codemode-notice.js +2 -2
- package/dist/cli/compose-agents.js +2 -1
- package/dist/cli/compose-extensions.js +2 -0
- package/dist/cli/compose-memory.d.ts +53 -0
- package/dist/cli/compose-memory.js +127 -0
- package/dist/cli/compose-providers.d.ts +5 -0
- package/dist/cli/compose-providers.js +32 -2
- package/dist/cli/compose-session.d.ts +5 -0
- package/dist/cli/compose-session.js +27 -13
- package/dist/cli/compose-store.d.ts +2 -0
- package/dist/cli/compose-store.js +9 -5
- package/dist/cli/compose.d.ts +2 -0
- package/dist/cli/compose.js +13 -5
- package/dist/cli/default-model.d.ts +0 -2
- package/dist/cli/default-model.js +5 -8
- package/dist/cli/deps.d.ts +5 -1
- package/dist/cli/exit-codes.d.ts +1 -1
- package/dist/cli/exit-codes.js +7 -16
- package/dist/cli/from-prompt.js +3 -2
- package/dist/cli/help-text.d.ts +2 -1
- package/dist/cli/help-text.js +5 -99
- package/dist/cli/main.d.ts +5 -0
- package/dist/cli/main.js +21 -2
- package/dist/cli/proxy.js +14 -9
- package/dist/cli/runtime.d.ts +5 -0
- package/dist/cli/startup-screen.js +20 -27
- package/dist/cli/startup-steps.js +6 -8
- package/dist/cli/subcommands/auth.d.ts +6 -3
- package/dist/cli/subcommands/auth.js +52 -22
- package/dist/cli/subcommands/config-set.d.ts +21 -0
- package/dist/cli/subcommands/config-set.js +137 -0
- package/dist/cli/subcommands/config.d.ts +2 -1
- package/dist/cli/subcommands/config.js +51 -37
- package/dist/cli/subcommands/doctor.d.ts +2 -1
- package/dist/cli/subcommands/doctor.js +97 -58
- package/dist/cli/subcommands/init.d.ts +1 -1
- package/dist/cli/subcommands/init.js +8 -7
- package/dist/cli/subcommands/memory.d.ts +18 -0
- package/dist/cli/subcommands/memory.js +189 -0
- package/dist/cli/subcommands/model-meta.js +11 -9
- package/dist/cli/subcommands/models-cache-probe.js +23 -20
- package/dist/cli/subcommands/models-discover.d.ts +3 -0
- package/dist/cli/subcommands/models-discover.js +44 -21
- package/dist/cli/subcommands/models.d.ts +1 -1
- package/dist/cli/subcommands/models.js +29 -22
- package/dist/cli/subcommands/probe-runner.js +8 -7
- package/dist/cli/subcommands/providers-list.js +32 -21
- package/dist/cli/subcommands/providers-plan.js +24 -25
- package/dist/cli/subcommands/providers-probe.js +5 -6
- package/dist/cli/subcommands/providers.d.ts +1 -1
- package/dist/cli/subcommands/providers.js +45 -50
- package/dist/cli/subcommands/sessions-export.d.ts +1 -1
- package/dist/cli/subcommands/sessions-export.js +10 -9
- package/dist/cli/subcommands/sessions-search.d.ts +1 -1
- package/dist/cli/subcommands/sessions-search.js +11 -10
- package/dist/cli/subcommands/sessions-trace.d.ts +30 -0
- package/dist/cli/subcommands/sessions-trace.js +156 -0
- package/dist/cli/subcommands/sessions.d.ts +4 -3
- package/dist/cli/subcommands/sessions.js +40 -37
- package/dist/cli/subcommands/stats.d.ts +1 -1
- package/dist/cli/subcommands/stats.js +49 -30
- package/dist/cli/system-prompt-arg.js +3 -2
- package/dist/codemode/capability.js +3 -2
- package/dist/compaction/post-compact.d.ts +1 -0
- package/dist/compaction/post-compact.js +15 -1
- package/dist/compaction/prune-tier.d.ts +1 -1
- package/dist/compaction/prune-tier.js +3 -3
- package/dist/compaction/serialize.js +2 -1
- package/dist/config/auth-file.d.ts +12 -2
- package/dist/config/auth-file.js +32 -10
- package/dist/config/checker.js +12 -11
- package/dist/config/context-files.js +3 -2
- package/dist/config/edit.d.ts +106 -0
- package/dist/config/edit.js +350 -0
- package/dist/config/init.d.ts +4 -3
- package/dist/config/init.js +10 -18
- package/dist/config/json-schema.d.ts +2 -1
- package/dist/config/json-schema.js +101 -68
- package/dist/config/key-docs.d.ts +18 -7
- package/dist/config/key-docs.js +43 -128
- package/dist/config/load.js +7 -6
- package/dist/config/merge.d.ts +4 -1
- package/dist/config/merge.js +42 -22
- package/dist/config/paths.js +6 -5
- package/dist/config/profile.d.ts +5 -1
- package/dist/config/profile.js +7 -2
- package/dist/config/schema-w5.js +3 -2
- package/dist/config/schema-w6.d.ts +19 -0
- package/dist/config/schema-w6.js +115 -0
- package/dist/config/schema.js +34 -20
- package/dist/config/settings-registry.d.ts +78 -0
- package/dist/config/settings-registry.js +184 -0
- package/dist/config/types-w6.d.ts +109 -0
- package/dist/config/types-w6.js +19 -0
- package/dist/config/types.d.ts +11 -8
- package/dist/config/types.js +1 -0
- package/dist/drivers/acp/client.js +1 -1
- package/dist/drivers/acp/driver.js +13 -8
- package/dist/drivers/agents.js +4 -3
- package/dist/drivers/base.js +3 -2
- package/dist/drivers/host-runners.js +2 -1
- package/dist/drivers/native/claude-stream.js +12 -11
- package/dist/drivers/native/codex-app-server.js +17 -12
- package/dist/drivers/native/oneshot.js +8 -7
- package/dist/drivers/pool.js +1 -1
- package/dist/drivers/runner.d.ts +3 -1
- package/dist/drivers/runner.js +68 -20
- package/dist/drivers/turn.js +1 -1
- package/dist/hooks/config.js +3 -2
- package/dist/hooks/protocol.js +18 -12
- package/dist/host/api-impl.js +11 -10
- package/dist/host/loader.js +9 -8
- package/dist/host/types.d.ts +3 -0
- package/dist/i18n/catalog.d.ts +2169 -0
- package/dist/i18n/catalog.js +72 -0
- package/dist/i18n/format.d.ts +21 -0
- package/dist/i18n/format.js +58 -0
- package/dist/i18n/index.d.ts +58 -0
- package/dist/i18n/index.js +72 -0
- package/dist/i18n/messages/agents.d.ts +84 -0
- package/dist/i18n/messages/agents.js +85 -0
- package/dist/i18n/messages/approval.d.ts +99 -0
- package/dist/i18n/messages/approval.js +100 -0
- package/dist/i18n/messages/auth.d.ts +187 -0
- package/dist/i18n/messages/auth.js +189 -0
- package/dist/i18n/messages/cli-args.d.ts +46 -0
- package/dist/i18n/messages/cli-args.js +46 -0
- package/dist/i18n/messages/cli-help.d.ts +12 -0
- package/dist/i18n/messages/cli-help.js +244 -0
- package/dist/i18n/messages/cli.d.ts +336 -0
- package/dist/i18n/messages/cli.js +311 -0
- package/dist/i18n/messages/config-keys.d.ts +289 -0
- package/dist/i18n/messages/config-keys.js +292 -0
- package/dist/i18n/messages/config.d.ts +502 -0
- package/dist/i18n/messages/config.js +239 -0
- package/dist/i18n/messages/drivers.d.ts +123 -0
- package/dist/i18n/messages/drivers.js +124 -0
- package/dist/i18n/messages/errors.d.ts +83 -0
- package/dist/i18n/messages/errors.js +171 -0
- package/dist/i18n/messages/interactive-line.d.ts +61 -0
- package/dist/i18n/messages/interactive-line.js +69 -0
- package/dist/i18n/messages/interactive-startup.d.ts +103 -0
- package/dist/i18n/messages/interactive-startup.js +104 -0
- package/dist/i18n/messages/interactive-view.d.ts +140 -0
- package/dist/i18n/messages/interactive-view.js +141 -0
- package/dist/i18n/messages/interactive.d.ts +493 -0
- package/dist/i18n/messages/interactive.js +248 -0
- package/dist/i18n/messages/memory.d.ts +123 -0
- package/dist/i18n/messages/memory.js +128 -0
- package/dist/i18n/messages/panels.d.ts +190 -0
- package/dist/i18n/messages/panels.js +189 -0
- package/dist/i18n/messages/permissions.d.ts +126 -0
- package/dist/i18n/messages/permissions.js +151 -0
- package/dist/i18n/messages/plan.d.ts +123 -0
- package/dist/i18n/messages/plan.js +124 -0
- package/dist/i18n/messages/print.d.ts +86 -0
- package/dist/i18n/messages/print.js +91 -0
- package/dist/i18n/messages/report.d.ts +391 -0
- package/dist/i18n/messages/report.js +490 -0
- package/dist/i18n/messages/rewind.d.ts +198 -0
- package/dist/i18n/messages/rewind.js +217 -0
- package/dist/i18n/messages/session.d.ts +230 -0
- package/dist/i18n/messages/session.js +258 -0
- package/dist/i18n/messages/settings.d.ts +348 -0
- package/dist/i18n/messages/settings.js +336 -0
- package/dist/i18n/messages/subcommands-config.d.ts +111 -0
- package/dist/i18n/messages/subcommands-config.js +127 -0
- package/dist/i18n/messages/subcommands.d.ts +548 -0
- package/dist/i18n/messages/subcommands.js +474 -0
- package/dist/i18n/messages/trace.d.ts +243 -0
- package/dist/i18n/messages/trace.js +238 -0
- package/dist/i18n/types.d.ts +15 -0
- package/dist/i18n/types.js +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -0
- package/dist/memory/edit.d.ts +24 -0
- package/dist/memory/edit.js +63 -0
- package/dist/memory/frontmatter.d.ts +37 -0
- package/dist/memory/frontmatter.js +79 -0
- package/dist/memory/index.d.ts +28 -0
- package/dist/memory/index.js +126 -0
- package/dist/memory/lock.d.ts +17 -0
- package/dist/memory/lock.js +62 -0
- package/dist/memory/paths.d.ts +57 -0
- package/dist/memory/paths.js +175 -0
- package/dist/memory/report.d.ts +36 -0
- package/dist/memory/report.js +86 -0
- package/dist/memory/runtime.d.ts +42 -0
- package/dist/memory/runtime.js +36 -0
- package/dist/memory/secrets.d.ts +8 -0
- package/dist/memory/secrets.js +27 -0
- package/dist/memory/section.d.ts +28 -0
- package/dist/memory/section.js +59 -0
- package/dist/memory/store.d.ts +70 -0
- package/dist/memory/store.js +284 -0
- package/dist/memory/tool.d.ts +31 -0
- package/dist/memory/tool.js +94 -0
- package/dist/modes/acp/acp-events.js +2 -1
- package/dist/modes/acp/acp-server.js +13 -12
- package/dist/modes/commands-core.d.ts +11 -0
- package/dist/modes/commands-core.js +93 -62
- package/dist/modes/image-input.js +20 -6
- package/dist/modes/interactive/agent-bar.d.ts +95 -0
- package/dist/modes/interactive/agent-bar.js +248 -0
- package/dist/modes/interactive/agent-panels.js +27 -26
- package/dist/modes/interactive/agent-transcript.d.ts +47 -0
- package/dist/modes/interactive/agent-transcript.js +191 -0
- package/dist/modes/interactive/agent-ui.d.ts +36 -1
- package/dist/modes/interactive/agent-ui.js +180 -14
- package/dist/modes/interactive/agent-view.d.ts +72 -0
- package/dist/modes/interactive/agent-view.js +281 -0
- package/dist/modes/interactive/approval-dialog.js +46 -34
- package/dist/modes/interactive/clipboard-paste.d.ts +2 -2
- package/dist/modes/interactive/clipboard-paste.js +9 -4
- package/dist/modes/interactive/commands.d.ts +19 -1
- package/dist/modes/interactive/commands.js +84 -40
- package/dist/modes/interactive/completion.js +2 -1
- package/dist/modes/interactive/config-panel.d.ts +70 -0
- package/dist/modes/interactive/config-panel.js +319 -0
- package/dist/modes/interactive/config-ui.d.ts +96 -0
- package/dist/modes/interactive/config-ui.js +397 -0
- package/dist/modes/interactive/confirm-dialog.js +6 -7
- package/dist/modes/interactive/event-notices.js +11 -9
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.js +19 -22
- package/dist/modes/interactive/key-dispatch.d.ts +12 -0
- package/dist/modes/interactive/key-dispatch.js +24 -9
- package/dist/modes/interactive/line/line-editor.js +2 -1
- package/dist/modes/interactive/line/line-mode.js +18 -7
- package/dist/modes/interactive/line/line-render.js +25 -24
- package/dist/modes/interactive/memory-panel.d.ts +64 -0
- package/dist/modes/interactive/memory-panel.js +221 -0
- package/dist/modes/interactive/message-view.d.ts +4 -2
- package/dist/modes/interactive/message-view.js +42 -33
- package/dist/modes/interactive/panels.js +39 -31
- package/dist/modes/interactive/pickers.d.ts +2 -1
- package/dist/modes/interactive/pickers.js +10 -6
- package/dist/modes/interactive/plan-command.d.ts +1 -1
- package/dist/modes/interactive/plan-command.js +24 -27
- package/dist/modes/interactive/plan-dialog.js +18 -17
- package/dist/modes/interactive/plan-flow.js +6 -5
- package/dist/modes/interactive/rewind-command.d.ts +1 -1
- package/dist/modes/interactive/rewind-command.js +18 -16
- package/dist/modes/interactive/rewind-flow.d.ts +0 -1
- package/dist/modes/interactive/rewind-flow.js +13 -14
- package/dist/modes/interactive/rewind-list.js +7 -6
- package/dist/modes/interactive/rewind-panel.js +40 -40
- package/dist/modes/interactive/rewind-text.d.ts +5 -3
- package/dist/modes/interactive/rewind-text.js +48 -38
- package/dist/modes/interactive/run-indicator.js +15 -12
- package/dist/modes/interactive/session-events.js +3 -2
- package/dist/modes/interactive/startup-header.js +22 -23
- package/dist/modes/interactive/startup-ui.js +38 -30
- package/dist/modes/interactive/status-area.d.ts +2 -0
- package/dist/modes/interactive/status-area.js +8 -2
- package/dist/modes/interactive/status-bar.js +4 -3
- package/dist/modes/interactive/subagent-view.js +9 -7
- package/dist/modes/interactive/tasks-report.d.ts +6 -0
- package/dist/modes/interactive/tasks-report.js +28 -31
- package/dist/modes/interactive/terminal-setup.d.ts +9 -0
- package/dist/modes/interactive/terminal-setup.js +23 -0
- package/dist/modes/interactive/tool-summary.js +19 -17
- package/dist/modes/interactive/tool-view.js +7 -4
- package/dist/modes/interactive/trace-view.d.ts +89 -0
- package/dist/modes/interactive/trace-view.js +332 -0
- package/dist/modes/print/print-mode.js +14 -15
- package/dist/modes/rpc/commands.js +7 -3
- package/dist/modes/rpc/rpc-mode.js +9 -3
- package/dist/modes/session-report.d.ts +2 -0
- package/dist/modes/session-report.js +101 -105
- package/dist/modes/startup-ui-text.js +11 -6
- package/dist/permissions/bypass.d.ts +8 -10
- package/dist/permissions/bypass.js +19 -10
- package/dist/permissions/memory-class.d.ts +23 -0
- package/dist/permissions/memory-class.js +54 -0
- package/dist/permissions/modes.d.ts +3 -3
- package/dist/permissions/modes.js +21 -16
- package/dist/permissions/pipeline.d.ts +1 -1
- package/dist/permissions/pipeline.js +9 -2
- package/dist/permissions/preview.js +49 -42
- package/dist/permissions/rules.js +5 -2
- package/dist/permissions/types.d.ts +4 -0
- package/dist/plan/store.js +2 -1
- package/dist/rpc.d.ts +39 -1
- package/dist/rpc.js +3 -0
- package/dist/sandbox/bash.js +11 -8
- package/dist/sandbox/detect.js +14 -11
- package/dist/sdk.d.ts +17 -1
- package/dist/sdk.js +29 -7
- package/dist/session/export.js +31 -30
- package/dist/session/manager.d.ts +1 -1
- package/dist/session/manager.js +5 -3
- package/dist/session/reuse.js +5 -4
- package/dist/session/scan.js +3 -2
- package/dist/session/stats-aggregate.d.ts +3 -1
- package/dist/session/stats-aggregate.js +5 -1
- package/dist/session/stats-index.js +2 -1
- package/dist/session/stats-scan.d.ts +4 -1
- package/dist/session/stats-scan.js +6 -2
- package/dist/session/store.d.ts +11 -0
- package/dist/session/store.js +48 -1
- package/dist/session/types.d.ts +2 -0
- package/dist/skills/builtin.js +2 -1
- package/dist/tools/image-file.d.ts +26 -1
- package/dist/tools/image-file.js +55 -13
- package/dist/tools/presets.d.ts +14 -1
- package/dist/tools/presets.js +3 -3
- package/dist/tools/registry.js +1 -1
- package/dist/tools/truncate.d.ts +1 -1
- package/dist/tools/truncate.js +2 -2
- package/dist/tools/types.d.ts +17 -1
- package/dist/trace/build-index.d.ts +91 -0
- package/dist/trace/build-index.js +127 -0
- package/dist/trace/build-nodes.d.ts +24 -0
- package/dist/trace/build-nodes.js +279 -0
- package/dist/trace/build-util.d.ts +43 -0
- package/dist/trace/build-util.js +120 -0
- package/dist/trace/build.d.ts +82 -0
- package/dist/trace/build.js +382 -0
- package/dist/trace/detail.d.ts +35 -0
- package/dist/trace/detail.js +205 -0
- package/dist/trace/flatten.d.ts +69 -0
- package/dist/trace/flatten.js +173 -0
- package/dist/trace/format.d.ts +47 -0
- package/dist/trace/format.js +329 -0
- package/dist/trace/html-template.d.ts +19 -0
- package/dist/trace/html-template.js +150 -0
- package/dist/trace/html.d.ts +104 -0
- package/dist/trace/html.js +292 -0
- package/dist/trace/preview.d.ts +29 -0
- package/dist/trace/preview.js +59 -0
- package/dist/trace/query-session.d.ts +14 -0
- package/dist/trace/query-session.js +38 -0
- package/dist/trace/query.d.ts +55 -0
- package/dist/trace/query.js +188 -0
- package/dist/trace/session.d.ts +40 -0
- package/dist/trace/session.js +168 -0
- package/dist/trace/types.d.ts +243 -0
- package/dist/trace/types.js +13 -0
- package/dist/tui/components/editor-paste.d.ts +2 -0
- package/dist/tui/components/editor-paste.js +6 -3
- package/dist/tui/components/editor.js +2 -2
- package/dist/tui/components/loader.d.ts +3 -0
- package/dist/tui/components/loader.js +14 -0
- package/dist/tui/components/settings-list.d.ts +61 -0
- package/dist/tui/components/settings-list.js +135 -0
- package/dist/tui/keybindings.d.ts +5 -0
- package/dist/tui/keybindings.js +17 -5
- package/dist/tui.d.ts +1 -0
- package/dist/tui.js +2 -0
- package/docs/en/host-api.md +167 -0
- package/docs/en/permissions.md +214 -0
- package/docs/en/providers.md +625 -0
- package/docs/en/rpc.md +361 -0
- package/docs/en/sessions.md +219 -0
- package/docs/en/tui.md +527 -0
- package/docs/host-api.md +18 -17
- package/docs/memory.md +172 -0
- package/docs/permissions.md +2 -2
- package/docs/providers.md +67 -1
- package/docs/rpc.md +31 -3
- package/docs/session-format.md +8 -2
- package/docs/sessions.md +29 -1
- package/docs/tui.md +132 -3
- package/package.json +8 -3
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 消息目录:cli(键名规范见 docs/i18n.md)。[W6-C0 建空壳,W6-I1 迁入 `src/cli/**` 的界面文案]
|
|
3
|
+
*
|
|
4
|
+
* en 是形状源;zh 用 `satisfies Messages<typeof en>`,缺键 / 多键 / 参数不符在 tsc 期报错。
|
|
5
|
+
* 整句一个键、禁止片段拼接;插值写成函数,条件分支写进函数体。
|
|
6
|
+
* `--help` 全文较长,单独放在 `cli-help.ts`。
|
|
7
|
+
*/
|
|
8
|
+
import * as help from "./cli-help.js";
|
|
9
|
+
import * as args from "./cli-args.js";
|
|
10
|
+
export const en = {
|
|
11
|
+
args: args.en,
|
|
12
|
+
main: {
|
|
13
|
+
subcommandUnavailable: (name) => `ama ${name}: not available in this build yet`,
|
|
14
|
+
uncaught: (message) => `ama: uncaught exception: ${message}\n`,
|
|
15
|
+
},
|
|
16
|
+
help: help.en.text,
|
|
17
|
+
/** 退出码说明(数值是契约,不译;键是 `ExitCode` 的名字)。 */
|
|
18
|
+
exitCodes: {
|
|
19
|
+
ok: "OK",
|
|
20
|
+
runtimeError: "Runtime error (model ultimately failed, etc.)",
|
|
21
|
+
usage: "Invalid arguments",
|
|
22
|
+
config: "Config / profile / path error",
|
|
23
|
+
noModel: "No usable model or key",
|
|
24
|
+
session: "Session missing / corrupt / cwd mismatch",
|
|
25
|
+
hostOrHook: "Host / hook failed to load or start",
|
|
26
|
+
toolDenied: "-p: a tool call was denied during the run (no one to approve)",
|
|
27
|
+
limitReached: "-p reached a budget limit (--max-turns / --max-cost / limits)",
|
|
28
|
+
planPending: "-p saved a plan that awaits approval (not executed)",
|
|
29
|
+
hostVersion: "HOST_API_VERSION mismatch",
|
|
30
|
+
sigint: "Exited on SIGINT (Ctrl+C twice)",
|
|
31
|
+
sigterm: "SIGTERM",
|
|
32
|
+
unknown: "Unknown exit code",
|
|
33
|
+
},
|
|
34
|
+
bootstrap: {
|
|
35
|
+
/** 启动步骤名(失败时作为前缀:`<步骤>:<原因>`)。 */
|
|
36
|
+
steps: {
|
|
37
|
+
dirs: "directories",
|
|
38
|
+
config: "config",
|
|
39
|
+
sessionList: "session list",
|
|
40
|
+
session: "session",
|
|
41
|
+
trust: "trust",
|
|
42
|
+
projectConfig: "project config",
|
|
43
|
+
skillDiscovery: "skill discovery",
|
|
44
|
+
providers: "providers",
|
|
45
|
+
model: "model",
|
|
46
|
+
tools: "tools",
|
|
47
|
+
host: "host adapter",
|
|
48
|
+
permission: "permissions",
|
|
49
|
+
assembly: "session assembly",
|
|
50
|
+
startup: "startup",
|
|
51
|
+
},
|
|
52
|
+
resumeNeedsId: "--resume needs a session id in non-interactive mode",
|
|
53
|
+
noSessionPicked: "No session selected",
|
|
54
|
+
sessionCwdMissing: (cwd) => `The session's working directory does not exist: ${cwd}`,
|
|
55
|
+
unknownDisabledTool: (name) => `config tools.disabled: unknown tool ${name}, ignored`,
|
|
56
|
+
eventWarning: (message, detail) => detail === undefined ? message : `${message}: ${detail}`,
|
|
57
|
+
sessionNotReady: "Session is not ready yet",
|
|
58
|
+
hostDisposeFailed: (error) => `Host adapter dispose failed: ${error}`,
|
|
59
|
+
sessionStartBlocked: (reason) => `SessionStart hook blocked startup: ${reason ?? "(no reason given)"}`,
|
|
60
|
+
subcommandNotDispatched: "Subcommands should be dispatched by main",
|
|
61
|
+
runtimeNotAssembled: "ama: runtime not assembled (the integration batch injects it via registerRuntimeDeps)\n",
|
|
62
|
+
warning: (text) => `ama: warning: ${text}\n`,
|
|
63
|
+
modeNotAssembled: (mode) => `Mode ${mode} is not assembled yet`,
|
|
64
|
+
terminalFallback: (message) => `ama: warning: terminal initialization failed, falling back to the line UI (${message})\n`,
|
|
65
|
+
usageError: (message) => `ama: ${message}\n(see ama --help for usage)\n`,
|
|
66
|
+
},
|
|
67
|
+
startupSteps: {
|
|
68
|
+
stepFailed: (label, message) => `${label}: ${message}`,
|
|
69
|
+
providerNeedsModel: (provider) => `--provider ${provider} also needs --model (it does not fall back to the provider's default model)`,
|
|
70
|
+
noApiKey: (provider, envKeys) => `Provider ${provider} has no API key: run \`ama auth set ${provider}\`` +
|
|
71
|
+
(envKeys.length > 0 ? `, or set the environment variable ${envKeys.join(" / ")}` : ""),
|
|
72
|
+
unknownTools: (unknown, available) => `Unknown tools: ${unknown.join(", ")} (available: ${available.join(", ")})`,
|
|
73
|
+
instructionsMissing: (path) => `--instructions file does not exist: ${path}`,
|
|
74
|
+
},
|
|
75
|
+
startupScreen: {
|
|
76
|
+
header: (version) => `ama ${version} · Enter send · Esc interrupt · Ctrl+C twice to quit · /help commands`,
|
|
77
|
+
model: (ref, thinking) => `Model: ${ref} · thinking ${thinking}`,
|
|
78
|
+
cwd: (cwd, trust) => `Directory: ${cwd} · ${trust}`,
|
|
79
|
+
context: (paths) => `Context: ${paths.join(", ")}`,
|
|
80
|
+
skills: (names) => `Skills: ${names.join(", ")}`,
|
|
81
|
+
prompts: (names) => `Prompt templates: ${names.join(" ")}`,
|
|
82
|
+
hooks: (n) => `Hooks: ${n}`,
|
|
83
|
+
host: (id) => `Host: ${id}`,
|
|
84
|
+
warnings: (n) => `Warnings: ${n} (see ama doctor)`,
|
|
85
|
+
trust: (trusted, from) => `${trusted ? "trusted" : "untrusted"} (${from})`,
|
|
86
|
+
/** 信任来源的短名。 */
|
|
87
|
+
trustSource: {
|
|
88
|
+
flag: "command line",
|
|
89
|
+
trustFile: "trust.json",
|
|
90
|
+
prompt: "confirmed this time",
|
|
91
|
+
profile: "profile",
|
|
92
|
+
default: "default",
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
proxy: {
|
|
96
|
+
unparsable: (url) => `cannot parse ${url}`,
|
|
97
|
+
unsupportedHint: (nodeVersion) => `ama: HTTPS_PROXY / HTTP_PROXY is set, but fetch in Node ${nodeVersion} ignores proxy variables; requests go direct. ` +
|
|
98
|
+
"Upgrade to Node 24+, or set NODE_USE_ENV_PROXY=1 on Node 22.21+\n",
|
|
99
|
+
invalidHint: (error) => `ama: cannot parse the proxy variables; requests go direct: ${error}\n`,
|
|
100
|
+
state: {
|
|
101
|
+
none: "No proxy variables set: direct connection",
|
|
102
|
+
runtime: "Enabled (Node handles it via NODE_USE_ENV_PROXY / --use-env-proxy)",
|
|
103
|
+
enabled: "Enabled (ama calls Node's built-in setGlobalProxyFromEnv at startup)",
|
|
104
|
+
unsupported: (nodeVersion) => `✗ Node ${nodeVersion} has no built-in proxy support; requests go direct. Upgrade to Node 24+`,
|
|
105
|
+
invalid: (error) => `✗ Cannot parse the proxy variables: ${error}`,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
defaultModel: {
|
|
109
|
+
priceReason: (inputCost, context) => `Lowest input price among models with tool calling, context ≥ 64k and known prices ($${inputCost}/M input, context ${context})`,
|
|
110
|
+
builtinFirst: "First model recommended by the built-in catalog",
|
|
111
|
+
listFirst: "First model in the list (no model has tool calling, context ≥ 64k and known prices at once)",
|
|
112
|
+
noModel: (envs, more) => `No usable model: set the environment variable ${envs}${more ? " or similar" : ""}, ` +
|
|
113
|
+
"save a key with `ama auth set <provider>`, or connect a relay with " +
|
|
114
|
+
"`ama providers add <id> --base-url <url>` (--model also works)",
|
|
115
|
+
},
|
|
116
|
+
choicePrompt: {
|
|
117
|
+
hint: (keys, n) => `${keys} select · Enter confirm · 1-${n} pick · Esc cancel`,
|
|
118
|
+
cancelled: "(cancelled)",
|
|
119
|
+
continueQuestion: "Continue?",
|
|
120
|
+
continue: "Continue",
|
|
121
|
+
cancel: "Cancel",
|
|
122
|
+
textQuestion: (question) => `${question} [y/N] `,
|
|
123
|
+
},
|
|
124
|
+
fromPrompt: {
|
|
125
|
+
notWithRpc: "--from cannot be used with --mode rpc",
|
|
126
|
+
imagesDropped: (n) => `ama: the --from message has ${n} image(s); the interactive UI only takes the text (-p sends them too)\n`,
|
|
127
|
+
},
|
|
128
|
+
systemPrompt: {
|
|
129
|
+
fileMissing: (path) => `--system-prompt file does not exist: ${path}`,
|
|
130
|
+
empty: "--system-prompt is empty",
|
|
131
|
+
},
|
|
132
|
+
codemodeNotice: (nodeMajor) => `Node ${nodeMajor} < 25 and no OS sandbox available: the codemode sandbox has no network isolation, so codemode is off by default; ` +
|
|
133
|
+
"turn it on with `--codemode on` or codemode.mode in config (shown once per config directory)",
|
|
134
|
+
compose: {
|
|
135
|
+
toolFactoryFailed: (message) => `Tool factory failed: ${message}`,
|
|
136
|
+
toolRegisterFailed: (name, message) => `Failed to register tool ${name}: ${message}`,
|
|
137
|
+
permissionRuleIgnored: (source, message) => `Permission rule (${source}): ${message}, ignored`,
|
|
138
|
+
untrustedDirsSkipped: (n) => `${n} project-level director${n === 1 ? "y was" : "ies were"} skipped because the project is not trusted (load with --trust)`,
|
|
139
|
+
},
|
|
140
|
+
composeSession: {
|
|
141
|
+
instructionsReadFailed: (path, message) => `Failed to read instruction file: ${path}: ${message}`,
|
|
142
|
+
unknownSkill: (name, available) => `Unknown skill: ${name}` +
|
|
143
|
+
(available.length > 0 ? ` (available: ${available.join(", ")})` : ""),
|
|
144
|
+
invalidCacheWarming: (value) => `AMA_CACHE_WARMING=${value} is invalid (off | streaming | idle), ignored`,
|
|
145
|
+
invalidCacheRetention: (value) => `AMA_CACHE_RETENTION=${value} is invalid (none | short | long), ignored`,
|
|
146
|
+
invalidIdleTimeout: (value) => `AMA_IDLE_TIMEOUT_MS=${value} is invalid (expected milliseconds ≥ 0), ignored`,
|
|
147
|
+
notSessionManager: "The composition root only accepts SessionManager instances (created by sessions.open)",
|
|
148
|
+
apiNotImplemented: (ref, api, viaOpenrouter) => `Protocol ${api} of model ${ref} is not implemented yet` +
|
|
149
|
+
(viaOpenrouter ? "; go through openrouter for now" : ""),
|
|
150
|
+
appendToolFailed: (name, message) => `Failed to append tool ${name}: ${message}`,
|
|
151
|
+
notComposed: "This session was not created by the composition root and cannot be switched",
|
|
152
|
+
switchWhileStreaming: "Cannot switch sessions while a run is in progress",
|
|
153
|
+
},
|
|
154
|
+
composeStore: {
|
|
155
|
+
ambiguousId: (id, candidates) => `Session id prefix ${id} is ambiguous, candidates: ${candidates.join(", ")}`,
|
|
156
|
+
sessionNotFound: (id) => `Session not found: ${id}`,
|
|
157
|
+
noEntries: (id) => `Session ${id} has no entries`,
|
|
158
|
+
unreadable: (file) => `Cannot read session file: ${file}`,
|
|
159
|
+
},
|
|
160
|
+
composeAgents: {
|
|
161
|
+
untrustedAgentDir: (dir) => `Project not trusted; skipped subagent definition directory ${dir} (takes effect with --trust)`,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
export const zh = {
|
|
165
|
+
args: args.zh,
|
|
166
|
+
main: {
|
|
167
|
+
subcommandUnavailable: (name) => `ama ${name}:当前版本尚未提供`,
|
|
168
|
+
uncaught: (message) => `ama: 未捕获的异常:${message}\n`,
|
|
169
|
+
},
|
|
170
|
+
help: help.zh.text,
|
|
171
|
+
exitCodes: {
|
|
172
|
+
ok: "正常",
|
|
173
|
+
runtimeError: "运行期错误(模型最终失败等)",
|
|
174
|
+
usage: "参数用法错误",
|
|
175
|
+
config: "配置 / profile / 路径错误",
|
|
176
|
+
noModel: "无可用模型或密钥",
|
|
177
|
+
session: "会话不存在 / 损坏 / cwd 不匹配",
|
|
178
|
+
hostOrHook: "宿主 / Hook 加载或启动失败",
|
|
179
|
+
toolDenied: "-p 运行中有工具调用被拒(没有人审批)",
|
|
180
|
+
limitReached: "-p 到达预算上限(--max-turns / --max-cost / limits)",
|
|
181
|
+
planPending: "-p 产出的计划已落盘、待审批(未执行)",
|
|
182
|
+
hostVersion: "HOST_API_VERSION 不匹配",
|
|
183
|
+
sigint: "SIGINT 退出(两次 Ctrl+C)",
|
|
184
|
+
sigterm: "SIGTERM",
|
|
185
|
+
unknown: "未知退出码",
|
|
186
|
+
},
|
|
187
|
+
bootstrap: {
|
|
188
|
+
steps: {
|
|
189
|
+
dirs: "目录",
|
|
190
|
+
config: "配置",
|
|
191
|
+
sessionList: "会话列表",
|
|
192
|
+
session: "会话",
|
|
193
|
+
trust: "信任",
|
|
194
|
+
projectConfig: "项目配置",
|
|
195
|
+
skillDiscovery: "Skill 发现",
|
|
196
|
+
providers: "供应商",
|
|
197
|
+
model: "模型",
|
|
198
|
+
tools: "工具",
|
|
199
|
+
host: "宿主适配器",
|
|
200
|
+
permission: "权限",
|
|
201
|
+
assembly: "会话组装",
|
|
202
|
+
startup: "启动",
|
|
203
|
+
},
|
|
204
|
+
resumeNeedsId: "--resume 在非交互模式下需要会话 id",
|
|
205
|
+
noSessionPicked: "未选择会话",
|
|
206
|
+
sessionCwdMissing: (cwd) => `会话的工作目录不存在:${cwd}`,
|
|
207
|
+
unknownDisabledTool: (name) => `config tools.disabled:未知工具 ${name},已忽略`,
|
|
208
|
+
eventWarning: (message, detail) => (detail === undefined ? message : `${message}:${detail}`),
|
|
209
|
+
sessionNotReady: "会话尚未就绪",
|
|
210
|
+
hostDisposeFailed: (error) => `宿主适配器 dispose 失败:${error}`,
|
|
211
|
+
sessionStartBlocked: (reason) => `SessionStart Hook 阻止启动:${reason ?? "(无原因)"}`,
|
|
212
|
+
subcommandNotDispatched: "子命令应由 main 分派",
|
|
213
|
+
runtimeNotAssembled: "ama: 运行时尚未装配(集成批次通过 registerRuntimeDeps 注入实现)\n",
|
|
214
|
+
warning: (text) => `ama: 警告:${text}\n`,
|
|
215
|
+
modeNotAssembled: (mode) => `模式 ${mode} 尚未装配`,
|
|
216
|
+
terminalFallback: (message) => `ama: 警告:终端初始化失败,降级为行式界面(${message})\n`,
|
|
217
|
+
usageError: (message) => `ama: ${message}\n(ama --help 查看用法)\n`,
|
|
218
|
+
},
|
|
219
|
+
startupSteps: {
|
|
220
|
+
stepFailed: (label, message) => `${label}:${message}`,
|
|
221
|
+
providerNeedsModel: (provider) => `--provider ${provider} 需要同时给出 --model(不回退到该供应商的缺省模型)`,
|
|
222
|
+
noApiKey: (provider, envKeys) => `供应商 ${provider} 没有 API key:运行 \`ama auth set ${provider}\`` +
|
|
223
|
+
(envKeys.length > 0 ? `,或设置环境变量 ${envKeys.join(" / ")}` : ""),
|
|
224
|
+
unknownTools: (unknown, available) => `未知工具:${unknown.join(", ")}(可用:${available.join(", ")})`,
|
|
225
|
+
instructionsMissing: (path) => `--instructions 文件不存在:${path}`,
|
|
226
|
+
},
|
|
227
|
+
startupScreen: {
|
|
228
|
+
header: (version) => `ama ${version} · Enter 发送 · Esc 中断 · Ctrl+C 两次退出 · /help 命令`,
|
|
229
|
+
model: (ref, thinking) => `模型:${ref} · 思考 ${thinking}`,
|
|
230
|
+
cwd: (cwd, trust) => `目录:${cwd} · ${trust}`,
|
|
231
|
+
context: (paths) => `上下文:${paths.join(", ")}`,
|
|
232
|
+
skills: (names) => `Skill:${names.join(", ")}`,
|
|
233
|
+
prompts: (names) => `提示模板:${names.join(" ")}`,
|
|
234
|
+
hooks: (n) => `Hook:${n} 条`,
|
|
235
|
+
host: (id) => `宿主:${id}`,
|
|
236
|
+
warnings: (n) => `警告:${n} 条(ama doctor 查看)`,
|
|
237
|
+
trust: (trusted, from) => `${trusted ? "已信任" : "未信任"}(${from})`,
|
|
238
|
+
trustSource: {
|
|
239
|
+
flag: "命令行",
|
|
240
|
+
trustFile: "trust.json",
|
|
241
|
+
prompt: "本次确认",
|
|
242
|
+
profile: "profile",
|
|
243
|
+
default: "缺省",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
proxy: {
|
|
247
|
+
unparsable: (url) => `无法解析 ${url}`,
|
|
248
|
+
unsupportedHint: (nodeVersion) => `ama: 检测到 HTTPS_PROXY / HTTP_PROXY,但 Node ${nodeVersion} 的 fetch 不读代理变量,请求将直连;` +
|
|
249
|
+
"升级到 Node 24+,或在 Node 22.21+ 上设 NODE_USE_ENV_PROXY=1\n",
|
|
250
|
+
invalidHint: (error) => `ama: 代理变量无法解析,请求将直连:${error}\n`,
|
|
251
|
+
state: {
|
|
252
|
+
none: "未设置代理变量:直连",
|
|
253
|
+
runtime: "已启用(Node 按 NODE_USE_ENV_PROXY / --use-env-proxy 接管)",
|
|
254
|
+
enabled: "已启用(ama 启动时调用 Node 内置的 setGlobalProxyFromEnv)",
|
|
255
|
+
unsupported: (nodeVersion) => `✗ 当前 Node ${nodeVersion} 不支持内置代理,请求直连;升级到 Node 24+`,
|
|
256
|
+
invalid: (error) => `✗ 代理变量无法解析:${error}`,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
defaultModel: {
|
|
260
|
+
priceReason: (inputCost, context) => `支持工具调用、上下文 ≥ 64k 且有价格的模型里输入价最低($${inputCost}/M 输入,上下文 ${context})`,
|
|
261
|
+
builtinFirst: "内置目录推荐的首个模型",
|
|
262
|
+
listFirst: "列表首个模型(没有同时支持工具调用、上下文 ≥ 64k 且有价格的模型)",
|
|
263
|
+
noModel: (envs, more) => `没有可用模型:设置 ${envs}${more ? " 等" : ""}环境变量,或 \`ama auth set <provider>\` 保存 key,` +
|
|
264
|
+
"或 `ama providers add <id> --base-url <url>` 接入中转站(也可 --model 指定)",
|
|
265
|
+
},
|
|
266
|
+
choicePrompt: {
|
|
267
|
+
hint: (keys, n) => `${keys} 选择 · Enter 确认 · 1-${n} 直接选 · Esc 取消`,
|
|
268
|
+
cancelled: "(已取消)",
|
|
269
|
+
continueQuestion: "继续?",
|
|
270
|
+
continue: "继续",
|
|
271
|
+
cancel: "取消",
|
|
272
|
+
textQuestion: (question) => `${question}[y/N] `,
|
|
273
|
+
},
|
|
274
|
+
fromPrompt: {
|
|
275
|
+
notWithRpc: "--from 不用于 --mode rpc",
|
|
276
|
+
imagesDropped: (n) => `ama: --from 的消息带 ${n} 张图片,交互界面只带文本(-p 会一并发送)\n`,
|
|
277
|
+
},
|
|
278
|
+
systemPrompt: {
|
|
279
|
+
fileMissing: (path) => `--system-prompt 文件不存在:${path}`,
|
|
280
|
+
empty: "--system-prompt 的内容为空",
|
|
281
|
+
},
|
|
282
|
+
codemodeNotice: (nodeMajor) => `Node ${nodeMajor} < 25 且没有可用的操作系统沙箱:codemode 沙箱的网络未隔离,codemode 缺省关闭;` +
|
|
283
|
+
"用 `--codemode on` 或 config 的 codemode.mode 开启(每个配置目录只提示一次)",
|
|
284
|
+
compose: {
|
|
285
|
+
toolFactoryFailed: (message) => `工具工厂失败:${message}`,
|
|
286
|
+
toolRegisterFailed: (name, message) => `工具 ${name} 注册失败:${message}`,
|
|
287
|
+
permissionRuleIgnored: (source, message) => `权限规则(${source}):${message},已忽略`,
|
|
288
|
+
untrustedDirsSkipped: (n) => `${n} 个项目级目录因未信任被跳过(--trust 加载)`,
|
|
289
|
+
},
|
|
290
|
+
composeSession: {
|
|
291
|
+
instructionsReadFailed: (path, message) => `读取指令文件失败:${path}:${message}`,
|
|
292
|
+
unknownSkill: (name, available) => `未知 Skill:${name}` + (available.length > 0 ? `(可用:${available.join(", ")})` : ""),
|
|
293
|
+
invalidCacheWarming: (value) => `AMA_CACHE_WARMING=${value} 无效(off | streaming | idle),已忽略`,
|
|
294
|
+
invalidCacheRetention: (value) => `AMA_CACHE_RETENTION=${value} 无效(none | short | long),已忽略`,
|
|
295
|
+
invalidIdleTimeout: (value) => `AMA_IDLE_TIMEOUT_MS=${value} 无效(应为不小于 0 的毫秒数),已忽略`,
|
|
296
|
+
notSessionManager: "组装根只接受 SessionManager 实例(由 sessions.open 创建)",
|
|
297
|
+
apiNotImplemented: (ref, api, viaOpenrouter) => `模型 ${ref} 的协议 ${api} 尚未实现` + (viaOpenrouter ? ";过渡期请经 openrouter 调用" : ""),
|
|
298
|
+
appendToolFailed: (name, message) => `追加工具 ${name} 失败:${message}`,
|
|
299
|
+
notComposed: "该会话不是由组装根创建的,不能切换",
|
|
300
|
+
switchWhileStreaming: "运行中不能切换会话",
|
|
301
|
+
},
|
|
302
|
+
composeStore: {
|
|
303
|
+
ambiguousId: (id, candidates) => `会话 id 前缀 ${id} 不唯一,候选:${candidates.join(", ")}`,
|
|
304
|
+
sessionNotFound: (id) => `会话不存在:${id}`,
|
|
305
|
+
noEntries: (id) => `会话 ${id} 没有条目`,
|
|
306
|
+
unreadable: (file) => `会话文件无法读取:${file}`,
|
|
307
|
+
},
|
|
308
|
+
composeAgents: {
|
|
309
|
+
untrustedAgentDir: (dir) => `项目未信任,跳过子 Agent 定义目录 ${dir}(--trust 后生效)`,
|
|
310
|
+
},
|
|
311
|
+
};
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 消息目录:config 领域的配置键说明(config.schema.json 的 description、`ama config show`、`/config`
|
|
3
|
+
* 面板)。[W6-I4] 由 `messages/config.ts` 挂到 `msg().config.keys` / `msg().config.dynamicDefaults`,
|
|
4
|
+
* 取用走 `config/key-docs.ts` 的 `keyDoc(path)`。
|
|
5
|
+
*
|
|
6
|
+
* 键是配置路径(`permission.mode`);段落本身也有一条。键与 schema 一一对应由 json-schema.test.ts 守住。
|
|
7
|
+
*/
|
|
8
|
+
export declare const en: {
|
|
9
|
+
keys: {
|
|
10
|
+
$schema: string;
|
|
11
|
+
version: string;
|
|
12
|
+
defaultModel: string;
|
|
13
|
+
thinkingLevel: string;
|
|
14
|
+
providers: string;
|
|
15
|
+
permission: string;
|
|
16
|
+
"permission.mode": string;
|
|
17
|
+
"permission.allow": string;
|
|
18
|
+
"permission.deny": string;
|
|
19
|
+
"permission.builtinDeny": string;
|
|
20
|
+
"permission.autoModel": string;
|
|
21
|
+
"permission.autoSafeCommands": string;
|
|
22
|
+
compaction: string;
|
|
23
|
+
"compaction.enabled": string;
|
|
24
|
+
"compaction.reserveTokens": string;
|
|
25
|
+
"compaction.keepRecentTokens": string;
|
|
26
|
+
"compaction.prune": string;
|
|
27
|
+
"compaction.prune.keepResults": string;
|
|
28
|
+
"compaction.prune.clearAtLeast": string;
|
|
29
|
+
"compaction.pruneExclude": string;
|
|
30
|
+
retry: string;
|
|
31
|
+
"retry.enabled": string;
|
|
32
|
+
"retry.maxRetries": string;
|
|
33
|
+
"retry.baseDelayMs": string;
|
|
34
|
+
"retry.maxDelayMs": string;
|
|
35
|
+
tools: string;
|
|
36
|
+
"tools.preset": string;
|
|
37
|
+
"tools.default": string;
|
|
38
|
+
"tools.maxToolResultChars": string;
|
|
39
|
+
"tools.bashTimeoutMs": string;
|
|
40
|
+
"tools.disabled": string;
|
|
41
|
+
codemode: string;
|
|
42
|
+
"codemode.mode": string;
|
|
43
|
+
"codemode.inlineBudget": string;
|
|
44
|
+
"codemode.requireStrict": string;
|
|
45
|
+
hooks: string;
|
|
46
|
+
"hooks.timeoutMs": string;
|
|
47
|
+
ui: string;
|
|
48
|
+
"ui.theme": string;
|
|
49
|
+
"ui.markdown": string;
|
|
50
|
+
"ui.showThinking": string;
|
|
51
|
+
"ui.tuiMode": string;
|
|
52
|
+
"ui.quietStartup": string;
|
|
53
|
+
"ui.ascii": string;
|
|
54
|
+
"ui.compact": string;
|
|
55
|
+
"ui.animation": string;
|
|
56
|
+
"ui.restoreOnCancel": string;
|
|
57
|
+
"ui.statusLine": string;
|
|
58
|
+
"ui.language": string;
|
|
59
|
+
"ui.replyLanguage": string;
|
|
60
|
+
"ui.agentBar": string;
|
|
61
|
+
memory: string;
|
|
62
|
+
"memory.enabled": string;
|
|
63
|
+
"memory.scopes": string;
|
|
64
|
+
"memory.indexMaxBytes": string;
|
|
65
|
+
"memory.fileMaxBytes": string;
|
|
66
|
+
"memory.maxFiles": string;
|
|
67
|
+
"memory.subagents": string;
|
|
68
|
+
auth: string;
|
|
69
|
+
"auth.chatgpt": string;
|
|
70
|
+
"auth.chatgpt.flavor": string;
|
|
71
|
+
"auth.chatgpt.clientId": string;
|
|
72
|
+
"auth.chatgpt.issuer": string;
|
|
73
|
+
"auth.chatgpt.originator": string;
|
|
74
|
+
"auth.chatgpt.redirectPorts": string;
|
|
75
|
+
skills: string;
|
|
76
|
+
"skills.dirs": string;
|
|
77
|
+
cache: string;
|
|
78
|
+
request: string;
|
|
79
|
+
"request.idleTimeoutMs": string;
|
|
80
|
+
"cache.warming": string;
|
|
81
|
+
"cache.retention": string;
|
|
82
|
+
"cache.minSavingsUsd": string;
|
|
83
|
+
"cache.missNotices": string;
|
|
84
|
+
"cache.warmSubagents": string;
|
|
85
|
+
checkpoints: string;
|
|
86
|
+
"checkpoints.mode": string;
|
|
87
|
+
"checkpoints.maxFileBytes": string;
|
|
88
|
+
"checkpoints.keep": string;
|
|
89
|
+
sandbox: string;
|
|
90
|
+
"sandbox.enabled": string;
|
|
91
|
+
"sandbox.bash": string;
|
|
92
|
+
"sandbox.network": string;
|
|
93
|
+
"sandbox.writable": string;
|
|
94
|
+
images: string;
|
|
95
|
+
"images.resize": string;
|
|
96
|
+
plan: string;
|
|
97
|
+
"plan.bash": string;
|
|
98
|
+
"plan.directory": string;
|
|
99
|
+
"plan.unattended": string;
|
|
100
|
+
"plan.model": string;
|
|
101
|
+
"plan.thinkingLevel": string;
|
|
102
|
+
agents: string;
|
|
103
|
+
"agents.maxConcurrent": string;
|
|
104
|
+
"agents.sessionBudgetUsd": string;
|
|
105
|
+
"agents.dirs": string;
|
|
106
|
+
subagents: string;
|
|
107
|
+
"subagents.maxConcurrent": string;
|
|
108
|
+
"subagents.maxPending": string;
|
|
109
|
+
"subagents.defaultModel": string;
|
|
110
|
+
models: string;
|
|
111
|
+
"models.aliases": string;
|
|
112
|
+
"models.aliases.fast": string;
|
|
113
|
+
"models.aliases.strong": string;
|
|
114
|
+
fallbackModel: string;
|
|
115
|
+
limits: string;
|
|
116
|
+
"limits.maxTurns": string;
|
|
117
|
+
"limits.maxCostUsd": string;
|
|
118
|
+
reminders: string;
|
|
119
|
+
"reminders.todo": string;
|
|
120
|
+
"reminders.fileChanges": string;
|
|
121
|
+
"reminders.contextPressure": string;
|
|
122
|
+
"reminders.budget": string;
|
|
123
|
+
todo: string;
|
|
124
|
+
"todo.reminder": string;
|
|
125
|
+
};
|
|
126
|
+
dynamicDefaults: {
|
|
127
|
+
$schema: string;
|
|
128
|
+
defaultModel: string;
|
|
129
|
+
"permission.autoModel": string;
|
|
130
|
+
"codemode.mode": string;
|
|
131
|
+
"ui.ascii": string;
|
|
132
|
+
"ui.statusLine": string;
|
|
133
|
+
"plan.directory": string;
|
|
134
|
+
"plan.model": string;
|
|
135
|
+
"plan.thinkingLevel": string;
|
|
136
|
+
"agents.sessionBudgetUsd": string;
|
|
137
|
+
"subagents.defaultModel": string;
|
|
138
|
+
"models.aliases.fast": string;
|
|
139
|
+
"models.aliases.strong": string;
|
|
140
|
+
fallbackModel: string;
|
|
141
|
+
"limits.maxTurns": string;
|
|
142
|
+
"limits.maxCostUsd": string;
|
|
143
|
+
"ui.replyLanguage": string;
|
|
144
|
+
"ui.agentBar": string;
|
|
145
|
+
"auth.chatgpt.clientId": string;
|
|
146
|
+
"auth.chatgpt.redirectPorts": string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export declare const zh: {
|
|
150
|
+
keys: {
|
|
151
|
+
$schema: string;
|
|
152
|
+
version: string;
|
|
153
|
+
defaultModel: string;
|
|
154
|
+
thinkingLevel: string;
|
|
155
|
+
providers: string;
|
|
156
|
+
permission: string;
|
|
157
|
+
"permission.mode": string;
|
|
158
|
+
"permission.allow": string;
|
|
159
|
+
"permission.deny": string;
|
|
160
|
+
"permission.builtinDeny": string;
|
|
161
|
+
"permission.autoModel": string;
|
|
162
|
+
"permission.autoSafeCommands": string;
|
|
163
|
+
compaction: string;
|
|
164
|
+
"compaction.enabled": string;
|
|
165
|
+
"compaction.reserveTokens": string;
|
|
166
|
+
"compaction.keepRecentTokens": string;
|
|
167
|
+
"compaction.prune": string;
|
|
168
|
+
"compaction.prune.keepResults": string;
|
|
169
|
+
"compaction.prune.clearAtLeast": string;
|
|
170
|
+
"compaction.pruneExclude": string;
|
|
171
|
+
retry: string;
|
|
172
|
+
"retry.enabled": string;
|
|
173
|
+
"retry.maxRetries": string;
|
|
174
|
+
"retry.baseDelayMs": string;
|
|
175
|
+
"retry.maxDelayMs": string;
|
|
176
|
+
tools: string;
|
|
177
|
+
"tools.preset": string;
|
|
178
|
+
"tools.default": string;
|
|
179
|
+
"tools.maxToolResultChars": string;
|
|
180
|
+
"tools.bashTimeoutMs": string;
|
|
181
|
+
"tools.disabled": string;
|
|
182
|
+
codemode: string;
|
|
183
|
+
"codemode.mode": string;
|
|
184
|
+
"codemode.inlineBudget": string;
|
|
185
|
+
"codemode.requireStrict": string;
|
|
186
|
+
hooks: string;
|
|
187
|
+
"hooks.timeoutMs": string;
|
|
188
|
+
ui: string;
|
|
189
|
+
"ui.theme": string;
|
|
190
|
+
"ui.markdown": string;
|
|
191
|
+
"ui.showThinking": string;
|
|
192
|
+
"ui.tuiMode": string;
|
|
193
|
+
"ui.quietStartup": string;
|
|
194
|
+
"ui.ascii": string;
|
|
195
|
+
"ui.compact": string;
|
|
196
|
+
"ui.animation": string;
|
|
197
|
+
"ui.restoreOnCancel": string;
|
|
198
|
+
"ui.statusLine": string;
|
|
199
|
+
"ui.language": string;
|
|
200
|
+
"ui.replyLanguage": string;
|
|
201
|
+
"ui.agentBar": string;
|
|
202
|
+
memory: string;
|
|
203
|
+
"memory.enabled": string;
|
|
204
|
+
"memory.scopes": string;
|
|
205
|
+
"memory.indexMaxBytes": string;
|
|
206
|
+
"memory.fileMaxBytes": string;
|
|
207
|
+
"memory.maxFiles": string;
|
|
208
|
+
"memory.subagents": string;
|
|
209
|
+
auth: string;
|
|
210
|
+
"auth.chatgpt": string;
|
|
211
|
+
"auth.chatgpt.flavor": string;
|
|
212
|
+
"auth.chatgpt.clientId": string;
|
|
213
|
+
"auth.chatgpt.issuer": string;
|
|
214
|
+
"auth.chatgpt.originator": string;
|
|
215
|
+
"auth.chatgpt.redirectPorts": string;
|
|
216
|
+
skills: string;
|
|
217
|
+
"skills.dirs": string;
|
|
218
|
+
cache: string;
|
|
219
|
+
request: string;
|
|
220
|
+
"request.idleTimeoutMs": string;
|
|
221
|
+
"cache.warming": string;
|
|
222
|
+
"cache.retention": string;
|
|
223
|
+
"cache.minSavingsUsd": string;
|
|
224
|
+
"cache.missNotices": string;
|
|
225
|
+
"cache.warmSubagents": string;
|
|
226
|
+
checkpoints: string;
|
|
227
|
+
"checkpoints.mode": string;
|
|
228
|
+
"checkpoints.maxFileBytes": string;
|
|
229
|
+
"checkpoints.keep": string;
|
|
230
|
+
sandbox: string;
|
|
231
|
+
"sandbox.enabled": string;
|
|
232
|
+
"sandbox.bash": string;
|
|
233
|
+
"sandbox.network": string;
|
|
234
|
+
"sandbox.writable": string;
|
|
235
|
+
images: string;
|
|
236
|
+
"images.resize": string;
|
|
237
|
+
plan: string;
|
|
238
|
+
"plan.bash": string;
|
|
239
|
+
"plan.directory": string;
|
|
240
|
+
"plan.unattended": string;
|
|
241
|
+
"plan.model": string;
|
|
242
|
+
"plan.thinkingLevel": string;
|
|
243
|
+
agents: string;
|
|
244
|
+
"agents.maxConcurrent": string;
|
|
245
|
+
"agents.sessionBudgetUsd": string;
|
|
246
|
+
"agents.dirs": string;
|
|
247
|
+
subagents: string;
|
|
248
|
+
"subagents.maxConcurrent": string;
|
|
249
|
+
"subagents.maxPending": string;
|
|
250
|
+
"subagents.defaultModel": string;
|
|
251
|
+
models: string;
|
|
252
|
+
"models.aliases": string;
|
|
253
|
+
"models.aliases.fast": string;
|
|
254
|
+
"models.aliases.strong": string;
|
|
255
|
+
fallbackModel: string;
|
|
256
|
+
limits: string;
|
|
257
|
+
"limits.maxTurns": string;
|
|
258
|
+
"limits.maxCostUsd": string;
|
|
259
|
+
reminders: string;
|
|
260
|
+
"reminders.todo": string;
|
|
261
|
+
"reminders.fileChanges": string;
|
|
262
|
+
"reminders.contextPressure": string;
|
|
263
|
+
"reminders.budget": string;
|
|
264
|
+
todo: string;
|
|
265
|
+
"todo.reminder": string;
|
|
266
|
+
};
|
|
267
|
+
dynamicDefaults: {
|
|
268
|
+
$schema: string;
|
|
269
|
+
defaultModel: string;
|
|
270
|
+
"permission.autoModel": string;
|
|
271
|
+
"codemode.mode": string;
|
|
272
|
+
"ui.ascii": string;
|
|
273
|
+
"ui.statusLine": string;
|
|
274
|
+
"plan.directory": string;
|
|
275
|
+
"plan.model": string;
|
|
276
|
+
"plan.thinkingLevel": string;
|
|
277
|
+
"agents.sessionBudgetUsd": string;
|
|
278
|
+
"subagents.defaultModel": string;
|
|
279
|
+
"models.aliases.fast": string;
|
|
280
|
+
"models.aliases.strong": string;
|
|
281
|
+
fallbackModel: string;
|
|
282
|
+
"limits.maxTurns": string;
|
|
283
|
+
"limits.maxCostUsd": string;
|
|
284
|
+
"ui.replyLanguage": string;
|
|
285
|
+
"ui.agentBar": string;
|
|
286
|
+
"auth.chatgpt.clientId": string;
|
|
287
|
+
"auth.chatgpt.redirectPorts": string;
|
|
288
|
+
};
|
|
289
|
+
};
|