@armadra/agent 0.5.1 → 0.6.1
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 +203 -304
- package/CHANGELOG.zh-CN.md +462 -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/discovered-cache.d.ts +48 -0
- package/dist/ai/providers/discovered-cache.js +102 -0
- package/dist/ai/providers/enrich.js +2 -7
- package/dist/ai/providers/model-visibility.d.ts +33 -0
- package/dist/ai/providers/model-visibility.js +70 -0
- 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/registry.d.ts +2 -0
- package/dist/ai/providers/registry.js +6 -1
- 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 +35 -0
- package/dist/auth/chatgpt/cli.js +279 -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 +26532 -11045
- 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 +6 -0
- package/dist/cli/compose-providers.js +38 -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 +145 -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 +4 -0
- package/dist/cli/subcommands/models-discover.js +60 -21
- package/dist/cli/subcommands/models-enable.d.ts +13 -0
- package/dist/cli/subcommands/models-enable.js +145 -0
- package/dist/cli/subcommands/models.d.ts +3 -1
- package/dist/cli/subcommands/models.js +39 -24
- 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 +102 -69
- 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 +12 -4
- 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 +81 -0
- package/dist/config/settings-registry.js +185 -0
- package/dist/config/types-w5.d.ts +7 -0
- package/dist/config/types-w5.js +2 -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 +2209 -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 +189 -0
- package/dist/i18n/messages/auth.js +201 -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 +248 -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 +293 -0
- package/dist/i18n/messages/config-keys.js +296 -0
- package/dist/i18n/messages/config.d.ts +508 -0
- package/dist/i18n/messages/config.js +241 -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 +99 -0
- package/dist/i18n/messages/interactive-startup.js +100 -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 +489 -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 +233 -0
- package/dist/i18n/messages/panels.js +232 -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 +355 -0
- package/dist/i18n/messages/settings.js +343 -0
- package/dist/i18n/messages/subcommands-config.d.ts +113 -0
- package/dist/i18n/messages/subcommands-config.js +129 -0
- package/dist/i18n/messages/subcommands-models.d.ts +34 -0
- package/dist/i18n/messages/subcommands-models.js +34 -0
- package/dist/i18n/messages/subcommands.d.ts +576 -0
- package/dist/i18n/messages/subcommands.js +477 -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 +22 -1
- package/dist/modes/interactive/commands.js +100 -49
- 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 +21 -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/model-items.d.ts +45 -0
- package/dist/modes/interactive/model-items.js +134 -0
- package/dist/modes/interactive/model-picker.d.ts +57 -0
- package/dist/modes/interactive/model-picker.js +191 -0
- 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.d.ts +3 -9
- package/dist/modes/interactive/startup-ui.js +44 -88
- 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/select-list.d.ts +2 -0
- package/dist/tui/components/select-list.js +7 -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 +627 -0
- package/docs/en/rpc.md +361 -0
- package/docs/en/sessions.md +219 -0
- package/docs/en/tui.md +534 -0
- package/docs/host-api.md +18 -17
- package/docs/memory.md +172 -0
- package/docs/permissions.md +2 -2
- package/docs/providers.md +73 -1
- package/docs/rpc.md +31 -3
- package/docs/session-format.md +8 -2
- package/docs/sessions.md +29 -1
- package/docs/tui.md +140 -4
- package/package.json +8 -3
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 消息目录:cli 的 `ama --help` 全文(由 messages/cli.ts 引用为 `cli.help`)。[W6-I1]
|
|
3
|
+
*
|
|
4
|
+
* 帮助是整块排版好的文本(列对齐、手工折行),两种语言各一整段,不拆成片段。
|
|
5
|
+
* 中文原文逐字节保留自第五波的 `HELP_TEXT`。
|
|
6
|
+
*/
|
|
7
|
+
export const en = {
|
|
8
|
+
text: `Usage: ama [options] [prompt]
|
|
9
|
+
ama <subcommand> …
|
|
10
|
+
|
|
11
|
+
Modes
|
|
12
|
+
(default) Terminal UI; falls back to the line UI when stdin / stdout is not a TTY
|
|
13
|
+
or TERM=dumb
|
|
14
|
+
--no-tui Line UI (readline + bracketed paste)
|
|
15
|
+
-p, --print Non-interactive: run the prompt, then exit. Prompt = arguments + piped stdin;
|
|
16
|
+
with a prompt argument, waits only 2 s for the first piped byte
|
|
17
|
+
(AMA_STDIN_WAIT_MS), then ignores stdin with a notice; a trailing - waits
|
|
18
|
+
until EOF (e.g. npm test | ama -p why -)
|
|
19
|
+
--no-stdin -p does not read stdin (the parent keeps the pipe open and you don't want
|
|
20
|
+
the 2 s wait)
|
|
21
|
+
--output-format <format> -p output: text (default) | json | stream-json
|
|
22
|
+
--max-turns <N> -p runs at most N turns (one model request plus its tool calls is a turn);
|
|
23
|
+
ends early with exit code 8 if tool calls are still pending at the limit
|
|
24
|
+
--image <file> -p sends images with the prompt (repeatable; png / jpg / gif / webp,
|
|
25
|
+
≤ 5 MB each); in the interactive UI write @image-path or paste an image path
|
|
26
|
+
--mode rpc stdio JSONL protocol (for embedding)
|
|
27
|
+
--mode acp ACP server (driven by Zed / JetBrains / Armadra)
|
|
28
|
+
--max-cost <USD> Dollar limit for one run (estimated from catalog prices); stops the run,
|
|
29
|
+
-p exits with 8
|
|
30
|
+
--tui-mode <mode> Display mode; only regular (main screen) for now
|
|
31
|
+
--quiet-startup <level> Startup screen: normal | header | silent
|
|
32
|
+
|
|
33
|
+
Model
|
|
34
|
+
--model <provider/id> Model (with --provider, the id alone is enough; @channel picks a channel,
|
|
35
|
+
e.g. packy/kimi-k2.5@messages)
|
|
36
|
+
--provider <id> Provider (requires --model)
|
|
37
|
+
--api-key <key> Key for this launch only (requires --model; prefer ama auth set)
|
|
38
|
+
--thinking <level> off | minimal | low | medium | high | xhigh
|
|
39
|
+
|
|
40
|
+
Sessions
|
|
41
|
+
-c, --continue Continue the most recent session in this directory
|
|
42
|
+
-r, --resume [id] Resume a session (interactive mode shows a picker when no id is given)
|
|
43
|
+
--session-id <id> Use the session with this id (created if missing)
|
|
44
|
+
--fork <id> Fork a new session from the given session
|
|
45
|
+
--session-dir <dir> Session directory (default ~/.local/share/ama/sessions)
|
|
46
|
+
--no-session Keep the session in memory only, no session file (cannot --resume later)
|
|
47
|
+
--from <id>[#n] Use a user message from an old session as the prompt (default: the last
|
|
48
|
+
one; with -p, images too; numbers are shown by ama sessions show)
|
|
49
|
+
|
|
50
|
+
Permissions and trust
|
|
51
|
+
--permission-mode <mode> default | auto-edit | plan | auto | full-auto | allowlist
|
|
52
|
+
(auto lets ama judge each step; allowlist only allows what allow rules
|
|
53
|
+
match, for CI)
|
|
54
|
+
--allow <rule> Add an allow rule, repeatable (e.g. "bash(git status*)")
|
|
55
|
+
--deny <rule> Add a deny rule, repeatable (e.g. "write(**/.env*)")
|
|
56
|
+
--trust / --no-trust Trust / do not trust the current project (project hooks, skills, prompt
|
|
57
|
+
templates)
|
|
58
|
+
|
|
59
|
+
Resources
|
|
60
|
+
--system-prompt <text|@file> Extra system prompt: appended as the last rule by default (tool list and other
|
|
61
|
+
prefixes stay unchanged, which helps caching)
|
|
62
|
+
--system-prompt-mode <mode> append (default) | replace (replaces the opening role description; tools
|
|
63
|
+
and project context stay)
|
|
64
|
+
--profile <file> Host profile.json (fields equal the matching options; command line wins)
|
|
65
|
+
--host <module> Host adapter module (CJS / ESM)
|
|
66
|
+
--instructions <file> Extra instruction file, repeatable
|
|
67
|
+
--skill-dir <dir> Extra skill directory, repeatable
|
|
68
|
+
--agent-dir <dir> Extra subagent definition directory, repeatable
|
|
69
|
+
--auth-file <file> Location of auth.json (default ~/.config/ama/auth.json)
|
|
70
|
+
--tools <a,b,…> Enable only these tools
|
|
71
|
+
--exclude-tools <a,b,…> Disable these tools
|
|
72
|
+
--tools-preset <name> Tool preset: default (default) | minimal | codemode-only | coordinator
|
|
73
|
+
(codemode is the old name of codemode-only and still works)
|
|
74
|
+
--codemode <mode> How codemode is offered: off | on | only (default follows the preset)
|
|
75
|
+
--memory / --no-memory Turn memory on / off for this launch (overrides memory.enabled)
|
|
76
|
+
|
|
77
|
+
Subcommands
|
|
78
|
+
ama auth set <provider> Read a key from stdin and save it to auth.json (0600)
|
|
79
|
+
ama auth list List providers with saved keys (keys are not shown)
|
|
80
|
+
ama auth remove <provider> Delete a saved key
|
|
81
|
+
ama auth login chatgpt [--paste | --device] [--flavor siwc|codex]
|
|
82
|
+
Sign in with a ChatGPT plan (OAuth in the browser; --paste / --device
|
|
83
|
+
without a local browser)
|
|
84
|
+
ama auth logout|status [chatgpt] Sign out / show sign-in and token status
|
|
85
|
+
ama sessions list|show|prune Manage sessions
|
|
86
|
+
ama sessions search <term|/regex/> [--all] [--role user|assistant|tool] [--since 7d] [--limit N]
|
|
87
|
+
Full-text search across sessions
|
|
88
|
+
ama sessions export <id> [--format md|json|jsonl] [--output <file>] [--branch leaf|all]
|
|
89
|
+
Export a session (redacted)
|
|
90
|
+
ama sessions trace <id> [--html [file]] [--json] [--open]
|
|
91
|
+
Timeline of turns, requests, tools and subagents (text / HTML / JSON)
|
|
92
|
+
ama models list [--provider <id>] List models (with source and key status)
|
|
93
|
+
ama models check <provider/id> Send one minimal request to check availability
|
|
94
|
+
ama models enable|disable <provider/model|provider/*>…
|
|
95
|
+
Edit the /model list (models.enabled); list --enabled shows it
|
|
96
|
+
ama models discover <provider> [--probe] [--write] [--limit N]
|
|
97
|
+
List models from a relay's /v1/models, probe protocols, write the config
|
|
98
|
+
ama models refresh [--provider <id>] Refresh models.dev metadata into the data directory (startup stays
|
|
99
|
+
offline; old name refresh-catalog)
|
|
100
|
+
ama providers add <id> --base-url <url> [--key-env VAR] [--probe] [--channel n=api@url] [--yes]
|
|
101
|
+
One-step setup: list models, fill in models.dev metadata, probe channels,
|
|
102
|
+
write config
|
|
103
|
+
ama providers list|channels <id>|remove <id>|refresh <id>
|
|
104
|
+
Provider → channel → model; remove; re-fetch the model list
|
|
105
|
+
ama models cache-probe <provider/id> [--tokens N] [--gap-ms MS] [--yes] [--json]
|
|
106
|
+
Check whether an endpoint reports cache hits
|
|
107
|
+
ama doctor Config layers, trust, key sources, hooks, terminal capabilities
|
|
108
|
+
ama config show [--json] Effective config with each value's source, and the model to be used
|
|
109
|
+
ama config path Config directory, data directory and file paths
|
|
110
|
+
ama config edit Open config.json in $VISUAL / $EDITOR
|
|
111
|
+
ama config get|set|unset <key> [<value>] [--project]
|
|
112
|
+
Read / write one setting (--project writes the project level; tighten-only)
|
|
113
|
+
ama config list [prefix] [--all] Settings with value, source and when they apply
|
|
114
|
+
ama memory list|show|edit|rm|path|enable|disable
|
|
115
|
+
Manage memories (user level and this project)
|
|
116
|
+
ama init [--force] Create the config directory (0700), config.json and config.schema.json;
|
|
117
|
+
existing files are kept
|
|
118
|
+
ama stats [--since 7d] [--by day|week|month|provider|channel|model|project] [--all] [--json]
|
|
119
|
+
Cross-session stats: requests, tokens, cache hit rate, cost, tool calls
|
|
120
|
+
|
|
121
|
+
Other
|
|
122
|
+
--lang <zh|en> Interface language (also AMA_LANG, ui.language; default follows LANG)
|
|
123
|
+
-h, --help Print this help
|
|
124
|
+
-v, --version Print the version
|
|
125
|
+
|
|
126
|
+
Exit codes: 0 ok · 1 runtime error · 2 usage error · 3 config error · 4 no usable model or key ·
|
|
127
|
+
5 session error · 6 host / hook startup failure · 7 -p tool call denied (no one to approve;
|
|
128
|
+
allow with --permission-mode auto-edit|auto or --allow) · 8 -p reached a budget limit ·
|
|
129
|
+
9 -p plan saved, awaiting approval (plan.unattended: approve runs it automatically) ·
|
|
130
|
+
78 host API version mismatch ·
|
|
131
|
+
130 SIGINT · 143 SIGTERM
|
|
132
|
+
`,
|
|
133
|
+
};
|
|
134
|
+
export const zh = {
|
|
135
|
+
text: `用法:ama [选项] [提示]
|
|
136
|
+
ama <子命令> …
|
|
137
|
+
|
|
138
|
+
模式
|
|
139
|
+
(缺省) 终端界面;stdin / stdout 非 TTY 或 TERM=dumb 时自动降级为行式
|
|
140
|
+
--no-tui 行式界面(readline + 括号粘贴)
|
|
141
|
+
-p, --print 非交互:执行提示后退出。提示 = 参数 + stdin 管道内容;有提示参数时
|
|
142
|
+
只等管道首字节 2 s(AMA_STDIN_WAIT_MS),没收到就忽略并提示;
|
|
143
|
+
末尾加 - 则一直等到 EOF(如 npm test | ama -p 找原因 -)
|
|
144
|
+
--no-stdin -p 不读 stdin(父进程留着管道、又不想等 2 s 时)
|
|
145
|
+
--output-format <格式> -p 的输出:text(缺省)| json | stream-json
|
|
146
|
+
--max-turns <N> -p 最多跑 N 轮(一次模型请求加其工具执行算一轮);到达上限仍有
|
|
147
|
+
未完成的工具调用时提前结束,退出码 8
|
|
148
|
+
--image <文件> -p 随提示发送图片(可重复;png / jpg / gif / webp,单张 ≤ 5 MB);
|
|
149
|
+
交互界面里写 @图片路径 或粘贴图片路径
|
|
150
|
+
--mode rpc stdio JSONL 协议(供嵌入)
|
|
151
|
+
--mode acp ACP 服务端(供 Zed / JetBrains / Armadra 驱动)
|
|
152
|
+
--max-cost <USD> 一次运行的美元上限(按目录价估算);到限结束运行,-p 退出码 8
|
|
153
|
+
--tui-mode <模式> 显示模式,第一期只有 regular(主屏)
|
|
154
|
+
--quiet-startup <档> 启动画面:normal | header | silent
|
|
155
|
+
|
|
156
|
+
模型
|
|
157
|
+
--model <provider/id> 模型(可配合 --provider 只写 id;@渠道 指定渠道,如 packy/kimi-k2.5@messages)
|
|
158
|
+
--provider <id> 供应商(必须同时给 --model)
|
|
159
|
+
--api-key <key> 只用于本次启动的 key(需要 --model;优先用 ama auth set)
|
|
160
|
+
--thinking <级别> off | minimal | low | medium | high | xhigh
|
|
161
|
+
|
|
162
|
+
会话
|
|
163
|
+
-c, --continue 继续本目录最近的会话
|
|
164
|
+
-r, --resume [id] 恢复会话(交互模式无 id 时弹选择器)
|
|
165
|
+
--session-id <id> 使用指定 id 的会话(不存在则新建)
|
|
166
|
+
--fork <id> 从指定会话分叉出新会话
|
|
167
|
+
--session-dir <目录> 会话目录(缺省 ~/.local/share/ama/sessions)
|
|
168
|
+
--no-session 会话只在内存里,不写会话文件(之后无法 --resume)
|
|
169
|
+
--from <id>[#编号] 用旧会话的一条用户消息作提示(缺省最后一条;-p 时连图片一起;
|
|
170
|
+
编号见 ama sessions show)
|
|
171
|
+
|
|
172
|
+
权限与信任
|
|
173
|
+
--permission-mode <模式> default | auto-edit | plan | auto | full-auto | allowlist
|
|
174
|
+
(auto 由 ama 判断每一步;allowlist 只放行 allow 规则命中的,适合 CI)
|
|
175
|
+
--allow <规则> 追加允许规则,可重复(如 "bash(git status*)")
|
|
176
|
+
--deny <规则> 追加拒绝规则,可重复(如 "write(**/.env*)")
|
|
177
|
+
--trust / --no-trust 信任 / 不信任当前项目(项目级 Hook、Skill、提示模板)
|
|
178
|
+
|
|
179
|
+
资源
|
|
180
|
+
--system-prompt <文本|@文件> 追加系统提示:缺省作为最后一条规则追加(工具表等前缀不变,利于缓存)
|
|
181
|
+
--system-prompt-mode <方式> append(缺省)| replace(替换开头的角色说明,工具与项目上下文保留)
|
|
182
|
+
--profile <文件> 宿主 profile.json(字段等价于对应参数,命令行优先)
|
|
183
|
+
--host <模块> 宿主适配器模块(CJS / ESM)
|
|
184
|
+
--instructions <文件> 追加指令文件,可重复
|
|
185
|
+
--skill-dir <目录> 追加 Skill 目录,可重复
|
|
186
|
+
--agent-dir <目录> 追加子 Agent 定义目录,可重复
|
|
187
|
+
--auth-file <文件> auth.json 位置(缺省 ~/.config/ama/auth.json)
|
|
188
|
+
--tools <a,b,…> 只启用这些工具
|
|
189
|
+
--exclude-tools <a,b,…> 禁用这些工具
|
|
190
|
+
--tools-preset <名> 工具预设:default(缺省)| minimal | codemode-only | coordinator
|
|
191
|
+
(codemode 是 codemode-only 的旧名,仍可用)
|
|
192
|
+
--codemode <模式> codemode 调用方式:off | on | only(缺省随预设)
|
|
193
|
+
--memory / --no-memory 本次启动开启 / 关闭 Memory(覆盖 memory.enabled)
|
|
194
|
+
|
|
195
|
+
子命令
|
|
196
|
+
ama auth set <provider> 从 stdin 读取 key 写入 auth.json(0600)
|
|
197
|
+
ama auth list 列出已保存 key 的供应商(不显示 key)
|
|
198
|
+
ama auth remove <provider> 删除已保存的 key
|
|
199
|
+
ama auth login chatgpt [--paste | --device] [--flavor siwc|codex]
|
|
200
|
+
用 ChatGPT 套餐登录(浏览器 OAuth;无浏览器时用 --paste / --device)
|
|
201
|
+
ama auth logout|status [chatgpt] 退出登录 / 查看登录与令牌状态
|
|
202
|
+
ama sessions list|show|prune 会话管理
|
|
203
|
+
ama sessions search <关键词|/正则/> [--all] [--role user|assistant|tool] [--since 7d] [--limit N]
|
|
204
|
+
跨会话全文检索
|
|
205
|
+
ama sessions export <id> [--format md|json|jsonl] [--output <文件>] [--branch leaf|all]
|
|
206
|
+
导出会话(已脱敏)
|
|
207
|
+
ama sessions trace <id> [--html [文件]] [--json] [--open]
|
|
208
|
+
回合、请求、工具与子 Agent 的时间线(文本 / HTML / JSON)
|
|
209
|
+
ama models list [--provider <id>] 列出模型(含来源与 key 状态)
|
|
210
|
+
ama models check <provider/id> 发一次最小请求检查可用性
|
|
211
|
+
ama models enable|disable <provider/model|provider/*>…
|
|
212
|
+
编辑 /model 的模型清单(models.enabled);list --enabled 查看
|
|
213
|
+
ama models discover <provider> [--probe] [--write] [--limit N]
|
|
214
|
+
从中转 /v1/models 列出模型,探测协议并写入配置
|
|
215
|
+
ama models refresh [--provider <id>] 联网刷新 models.dev 元数据到数据目录(启动不联网;
|
|
216
|
+
旧名 refresh-catalog)
|
|
217
|
+
ama providers add <id> --base-url <url> [--key-env VAR] [--probe] [--channel n=api@url] [--yes]
|
|
218
|
+
一键接入:列模型、补 models.dev 元数据、探测渠道、写入配置
|
|
219
|
+
ama providers list|channels <id>|remove <id>|refresh <id>
|
|
220
|
+
供应商 → 渠道 → 模型;删除;重拉模型列表
|
|
221
|
+
ama models cache-probe <provider/id> [--tokens N] [--gap-ms MS] [--yes] [--json]
|
|
222
|
+
判断端点是否报告缓存命中
|
|
223
|
+
ama doctor 配置层级、信任、key 来源、Hook、终端能力
|
|
224
|
+
ama config show [--json] 生效配置与每项来源、将使用的模型
|
|
225
|
+
ama config path 配置目录、数据目录与各文件路径
|
|
226
|
+
ama config edit 用 $VISUAL / $EDITOR 打开 config.json
|
|
227
|
+
ama config get|set|unset <key> [<值>] [--project]
|
|
228
|
+
读写单个设置(--project 写 .ama/config.json,只能收紧)
|
|
229
|
+
ama config list [前缀] [--all] 设置项与值、来源、何时生效
|
|
230
|
+
ama memory list|show|edit|rm|path|enable|disable
|
|
231
|
+
管理 Memory(用户级与当前项目)
|
|
232
|
+
ama init [--force] 建配置目录(0700)与 config.json、config.schema.json;已有的不覆盖
|
|
233
|
+
ama stats [--since 7d] [--by day|week|month|provider|channel|model|project] [--all] [--json]
|
|
234
|
+
跨会话统计:请求、token、缓存命中率、费用、工具调用
|
|
235
|
+
|
|
236
|
+
其它
|
|
237
|
+
--lang <zh|en> 界面语言(也可用 AMA_LANG、ui.language;缺省跟随 LANG)
|
|
238
|
+
-h, --help 输出本帮助
|
|
239
|
+
-v, --version 输出版本
|
|
240
|
+
|
|
241
|
+
退出码:0 正常 · 1 运行期错误 · 2 用法错误 · 3 配置错误 · 4 无可用模型或 key ·
|
|
242
|
+
5 会话错误 · 6 宿主 / Hook 启动失败 · 7 -p 有工具调用被拒(无人审批;用
|
|
243
|
+
--permission-mode auto-edit|auto 或 --allow 放行)· 8 -p 到达预算上限 ·
|
|
244
|
+
9 -p 的计划已落盘待审批(plan.unattended: approve 则自动批准执行)·
|
|
245
|
+
78 宿主 API 版本不匹配 ·
|
|
246
|
+
130 SIGINT · 143 SIGTERM
|
|
247
|
+
`,
|
|
248
|
+
};
|
|
@@ -0,0 +1,336 @@
|
|
|
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
|
+
export declare const en: {
|
|
9
|
+
args: {
|
|
10
|
+
flagConflict: (a: string, b: string) => string;
|
|
11
|
+
flagsConflict: (flags: readonly string[]) => string;
|
|
12
|
+
invalidChoice: (option: string, choices: readonly string[], got: string) => string;
|
|
13
|
+
emptyValue: (option: string) => string;
|
|
14
|
+
fullscreenUnsupported: string;
|
|
15
|
+
maxTurnsPositive: (got: string) => string;
|
|
16
|
+
maxCostPositive: (got: string) => string;
|
|
17
|
+
printWithMode: (mode: string) => string;
|
|
18
|
+
apiKeyNeedsModel: string;
|
|
19
|
+
printOnly: (option: string) => string;
|
|
20
|
+
systemPromptModeNeedsPrompt: string;
|
|
21
|
+
noStdinWithDash: string;
|
|
22
|
+
dashPrintOnly: string;
|
|
23
|
+
imagePrintOnly: string;
|
|
24
|
+
unknownOption: (token: string) => string;
|
|
25
|
+
emptyResumeId: string;
|
|
26
|
+
needsValue: (option: string) => string;
|
|
27
|
+
noValue: (option: string) => string;
|
|
28
|
+
};
|
|
29
|
+
main: {
|
|
30
|
+
subcommandUnavailable: (name: string) => string;
|
|
31
|
+
uncaught: (message: string) => string;
|
|
32
|
+
};
|
|
33
|
+
help: string;
|
|
34
|
+
/** 退出码说明(数值是契约,不译;键是 `ExitCode` 的名字)。 */
|
|
35
|
+
exitCodes: {
|
|
36
|
+
ok: string;
|
|
37
|
+
runtimeError: string;
|
|
38
|
+
usage: string;
|
|
39
|
+
config: string;
|
|
40
|
+
noModel: string;
|
|
41
|
+
session: string;
|
|
42
|
+
hostOrHook: string;
|
|
43
|
+
toolDenied: string;
|
|
44
|
+
limitReached: string;
|
|
45
|
+
planPending: string;
|
|
46
|
+
hostVersion: string;
|
|
47
|
+
sigint: string;
|
|
48
|
+
sigterm: string;
|
|
49
|
+
unknown: string;
|
|
50
|
+
};
|
|
51
|
+
bootstrap: {
|
|
52
|
+
/** 启动步骤名(失败时作为前缀:`<步骤>:<原因>`)。 */
|
|
53
|
+
steps: {
|
|
54
|
+
dirs: string;
|
|
55
|
+
config: string;
|
|
56
|
+
sessionList: string;
|
|
57
|
+
session: string;
|
|
58
|
+
trust: string;
|
|
59
|
+
projectConfig: string;
|
|
60
|
+
skillDiscovery: string;
|
|
61
|
+
providers: string;
|
|
62
|
+
model: string;
|
|
63
|
+
tools: string;
|
|
64
|
+
host: string;
|
|
65
|
+
permission: string;
|
|
66
|
+
assembly: string;
|
|
67
|
+
startup: string;
|
|
68
|
+
};
|
|
69
|
+
resumeNeedsId: string;
|
|
70
|
+
noSessionPicked: string;
|
|
71
|
+
sessionCwdMissing: (cwd: string) => string;
|
|
72
|
+
unknownDisabledTool: (name: string) => string;
|
|
73
|
+
eventWarning: (message: string, detail?: string) => string;
|
|
74
|
+
sessionNotReady: string;
|
|
75
|
+
hostDisposeFailed: (error: string) => string;
|
|
76
|
+
sessionStartBlocked: (reason?: string) => string;
|
|
77
|
+
subcommandNotDispatched: string;
|
|
78
|
+
runtimeNotAssembled: string;
|
|
79
|
+
warning: (text: string) => string;
|
|
80
|
+
modeNotAssembled: (mode: string) => string;
|
|
81
|
+
terminalFallback: (message: string) => string;
|
|
82
|
+
usageError: (message: string) => string;
|
|
83
|
+
};
|
|
84
|
+
startupSteps: {
|
|
85
|
+
stepFailed: (label: string, message: string) => string;
|
|
86
|
+
providerNeedsModel: (provider: string) => string;
|
|
87
|
+
noApiKey: (provider: string, envKeys: readonly string[]) => string;
|
|
88
|
+
unknownTools: (unknown: readonly string[], available: readonly string[]) => string;
|
|
89
|
+
instructionsMissing: (path: string) => string;
|
|
90
|
+
};
|
|
91
|
+
startupScreen: {
|
|
92
|
+
header: (version: string) => string;
|
|
93
|
+
model: (ref: string, thinking: string) => string;
|
|
94
|
+
cwd: (cwd: string, trust: string) => string;
|
|
95
|
+
context: (paths: readonly string[]) => string;
|
|
96
|
+
skills: (names: readonly string[]) => string;
|
|
97
|
+
prompts: (names: readonly string[]) => string;
|
|
98
|
+
hooks: (n: number) => string;
|
|
99
|
+
host: (id: string) => string;
|
|
100
|
+
warnings: (n: number) => string;
|
|
101
|
+
trust: (trusted: boolean, from: string) => string;
|
|
102
|
+
/** 信任来源的短名。 */
|
|
103
|
+
trustSource: {
|
|
104
|
+
flag: string;
|
|
105
|
+
trustFile: string;
|
|
106
|
+
prompt: string;
|
|
107
|
+
profile: string;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
proxy: {
|
|
112
|
+
unparsable: (url: string) => string;
|
|
113
|
+
unsupportedHint: (nodeVersion: string) => string;
|
|
114
|
+
invalidHint: (error: string) => string;
|
|
115
|
+
state: {
|
|
116
|
+
none: string;
|
|
117
|
+
runtime: string;
|
|
118
|
+
enabled: string;
|
|
119
|
+
unsupported: (nodeVersion: string) => string;
|
|
120
|
+
invalid: (error: string) => string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
defaultModel: {
|
|
124
|
+
priceReason: (inputCost: number, context: string) => string;
|
|
125
|
+
builtinFirst: string;
|
|
126
|
+
listFirst: string;
|
|
127
|
+
noModel: (envs: string, more: boolean) => string;
|
|
128
|
+
};
|
|
129
|
+
choicePrompt: {
|
|
130
|
+
hint: (keys: string, n: number) => string;
|
|
131
|
+
cancelled: string;
|
|
132
|
+
continueQuestion: string;
|
|
133
|
+
continue: string;
|
|
134
|
+
cancel: string;
|
|
135
|
+
textQuestion: (question: string) => string;
|
|
136
|
+
};
|
|
137
|
+
fromPrompt: {
|
|
138
|
+
notWithRpc: string;
|
|
139
|
+
imagesDropped: (n: number) => string;
|
|
140
|
+
};
|
|
141
|
+
systemPrompt: {
|
|
142
|
+
fileMissing: (path: string) => string;
|
|
143
|
+
empty: string;
|
|
144
|
+
};
|
|
145
|
+
codemodeNotice: (nodeMajor: number) => string;
|
|
146
|
+
compose: {
|
|
147
|
+
toolFactoryFailed: (message: string) => string;
|
|
148
|
+
toolRegisterFailed: (name: string, message: string) => string;
|
|
149
|
+
permissionRuleIgnored: (source: string, message: string) => string;
|
|
150
|
+
untrustedDirsSkipped: (n: number) => string;
|
|
151
|
+
};
|
|
152
|
+
composeSession: {
|
|
153
|
+
instructionsReadFailed: (path: string, message: string) => string;
|
|
154
|
+
unknownSkill: (name: string, available: readonly string[]) => string;
|
|
155
|
+
invalidCacheWarming: (value: string) => string;
|
|
156
|
+
invalidCacheRetention: (value: string) => string;
|
|
157
|
+
invalidIdleTimeout: (value: string) => string;
|
|
158
|
+
notSessionManager: string;
|
|
159
|
+
apiNotImplemented: (ref: string, api: string, viaOpenrouter: boolean) => string;
|
|
160
|
+
appendToolFailed: (name: string, message: string) => string;
|
|
161
|
+
notComposed: string;
|
|
162
|
+
switchWhileStreaming: string;
|
|
163
|
+
};
|
|
164
|
+
composeStore: {
|
|
165
|
+
ambiguousId: (id: string, candidates: readonly string[]) => string;
|
|
166
|
+
sessionNotFound: (id: string) => string;
|
|
167
|
+
noEntries: (id: string) => string;
|
|
168
|
+
unreadable: (file: string) => string;
|
|
169
|
+
};
|
|
170
|
+
composeAgents: {
|
|
171
|
+
untrustedAgentDir: (dir: string) => string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
export declare const zh: {
|
|
175
|
+
args: {
|
|
176
|
+
flagConflict: (a: string, b: string) => string;
|
|
177
|
+
flagsConflict: (flags: readonly string[]) => string;
|
|
178
|
+
invalidChoice: (option: string, choices: readonly string[], got: string) => string;
|
|
179
|
+
emptyValue: (option: string) => string;
|
|
180
|
+
fullscreenUnsupported: string;
|
|
181
|
+
maxTurnsPositive: (got: string) => string;
|
|
182
|
+
maxCostPositive: (got: string) => string;
|
|
183
|
+
printWithMode: (mode: string) => string;
|
|
184
|
+
apiKeyNeedsModel: string;
|
|
185
|
+
printOnly: (option: string) => string;
|
|
186
|
+
systemPromptModeNeedsPrompt: string;
|
|
187
|
+
noStdinWithDash: string;
|
|
188
|
+
dashPrintOnly: string;
|
|
189
|
+
imagePrintOnly: string;
|
|
190
|
+
unknownOption: (token: string) => string;
|
|
191
|
+
emptyResumeId: string;
|
|
192
|
+
needsValue: (option: string) => string;
|
|
193
|
+
noValue: (option: string) => string;
|
|
194
|
+
};
|
|
195
|
+
main: {
|
|
196
|
+
subcommandUnavailable: (name: string) => string;
|
|
197
|
+
uncaught: (message: string) => string;
|
|
198
|
+
};
|
|
199
|
+
help: string;
|
|
200
|
+
exitCodes: {
|
|
201
|
+
ok: string;
|
|
202
|
+
runtimeError: string;
|
|
203
|
+
usage: string;
|
|
204
|
+
config: string;
|
|
205
|
+
noModel: string;
|
|
206
|
+
session: string;
|
|
207
|
+
hostOrHook: string;
|
|
208
|
+
toolDenied: string;
|
|
209
|
+
limitReached: string;
|
|
210
|
+
planPending: string;
|
|
211
|
+
hostVersion: string;
|
|
212
|
+
sigint: string;
|
|
213
|
+
sigterm: string;
|
|
214
|
+
unknown: string;
|
|
215
|
+
};
|
|
216
|
+
bootstrap: {
|
|
217
|
+
steps: {
|
|
218
|
+
dirs: string;
|
|
219
|
+
config: string;
|
|
220
|
+
sessionList: string;
|
|
221
|
+
session: string;
|
|
222
|
+
trust: string;
|
|
223
|
+
projectConfig: string;
|
|
224
|
+
skillDiscovery: string;
|
|
225
|
+
providers: string;
|
|
226
|
+
model: string;
|
|
227
|
+
tools: string;
|
|
228
|
+
host: string;
|
|
229
|
+
permission: string;
|
|
230
|
+
assembly: string;
|
|
231
|
+
startup: string;
|
|
232
|
+
};
|
|
233
|
+
resumeNeedsId: string;
|
|
234
|
+
noSessionPicked: string;
|
|
235
|
+
sessionCwdMissing: (cwd: string) => string;
|
|
236
|
+
unknownDisabledTool: (name: string) => string;
|
|
237
|
+
eventWarning: (message: string, detail: string | undefined) => string;
|
|
238
|
+
sessionNotReady: string;
|
|
239
|
+
hostDisposeFailed: (error: string) => string;
|
|
240
|
+
sessionStartBlocked: (reason: string | undefined) => string;
|
|
241
|
+
subcommandNotDispatched: string;
|
|
242
|
+
runtimeNotAssembled: string;
|
|
243
|
+
warning: (text: string) => string;
|
|
244
|
+
modeNotAssembled: (mode: string) => string;
|
|
245
|
+
terminalFallback: (message: string) => string;
|
|
246
|
+
usageError: (message: string) => string;
|
|
247
|
+
};
|
|
248
|
+
startupSteps: {
|
|
249
|
+
stepFailed: (label: string, message: string) => string;
|
|
250
|
+
providerNeedsModel: (provider: string) => string;
|
|
251
|
+
noApiKey: (provider: string, envKeys: readonly string[]) => string;
|
|
252
|
+
unknownTools: (unknown: readonly string[], available: readonly string[]) => string;
|
|
253
|
+
instructionsMissing: (path: string) => string;
|
|
254
|
+
};
|
|
255
|
+
startupScreen: {
|
|
256
|
+
header: (version: string) => string;
|
|
257
|
+
model: (ref: string, thinking: string) => string;
|
|
258
|
+
cwd: (cwd: string, trust: string) => string;
|
|
259
|
+
context: (paths: readonly string[]) => string;
|
|
260
|
+
skills: (names: readonly string[]) => string;
|
|
261
|
+
prompts: (names: readonly string[]) => string;
|
|
262
|
+
hooks: (n: number) => string;
|
|
263
|
+
host: (id: string) => string;
|
|
264
|
+
warnings: (n: number) => string;
|
|
265
|
+
trust: (trusted: boolean, from: string) => string;
|
|
266
|
+
trustSource: {
|
|
267
|
+
flag: string;
|
|
268
|
+
trustFile: string;
|
|
269
|
+
prompt: string;
|
|
270
|
+
profile: string;
|
|
271
|
+
default: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
proxy: {
|
|
275
|
+
unparsable: (url: string) => string;
|
|
276
|
+
unsupportedHint: (nodeVersion: string) => string;
|
|
277
|
+
invalidHint: (error: string) => string;
|
|
278
|
+
state: {
|
|
279
|
+
none: string;
|
|
280
|
+
runtime: string;
|
|
281
|
+
enabled: string;
|
|
282
|
+
unsupported: (nodeVersion: string) => string;
|
|
283
|
+
invalid: (error: string) => string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
defaultModel: {
|
|
287
|
+
priceReason: (inputCost: number, context: string) => string;
|
|
288
|
+
builtinFirst: string;
|
|
289
|
+
listFirst: string;
|
|
290
|
+
noModel: (envs: string, more: boolean) => string;
|
|
291
|
+
};
|
|
292
|
+
choicePrompt: {
|
|
293
|
+
hint: (keys: string, n: number) => string;
|
|
294
|
+
cancelled: string;
|
|
295
|
+
continueQuestion: string;
|
|
296
|
+
continue: string;
|
|
297
|
+
cancel: string;
|
|
298
|
+
textQuestion: (question: string) => string;
|
|
299
|
+
};
|
|
300
|
+
fromPrompt: {
|
|
301
|
+
notWithRpc: string;
|
|
302
|
+
imagesDropped: (n: number) => string;
|
|
303
|
+
};
|
|
304
|
+
systemPrompt: {
|
|
305
|
+
fileMissing: (path: string) => string;
|
|
306
|
+
empty: string;
|
|
307
|
+
};
|
|
308
|
+
codemodeNotice: (nodeMajor: number) => string;
|
|
309
|
+
compose: {
|
|
310
|
+
toolFactoryFailed: (message: string) => string;
|
|
311
|
+
toolRegisterFailed: (name: string, message: string) => string;
|
|
312
|
+
permissionRuleIgnored: (source: string, message: string) => string;
|
|
313
|
+
untrustedDirsSkipped: (n: number) => string;
|
|
314
|
+
};
|
|
315
|
+
composeSession: {
|
|
316
|
+
instructionsReadFailed: (path: string, message: string) => string;
|
|
317
|
+
unknownSkill: (name: string, available: readonly string[]) => string;
|
|
318
|
+
invalidCacheWarming: (value: string) => string;
|
|
319
|
+
invalidCacheRetention: (value: string) => string;
|
|
320
|
+
invalidIdleTimeout: (value: string) => string;
|
|
321
|
+
notSessionManager: string;
|
|
322
|
+
apiNotImplemented: (ref: string, api: string, viaOpenrouter: boolean) => string;
|
|
323
|
+
appendToolFailed: (name: string, message: string) => string;
|
|
324
|
+
notComposed: string;
|
|
325
|
+
switchWhileStreaming: string;
|
|
326
|
+
};
|
|
327
|
+
composeStore: {
|
|
328
|
+
ambiguousId: (id: string, candidates: readonly string[]) => string;
|
|
329
|
+
sessionNotFound: (id: string) => string;
|
|
330
|
+
noEntries: (id: string) => string;
|
|
331
|
+
unreadable: (file: string) => string;
|
|
332
|
+
};
|
|
333
|
+
composeAgents: {
|
|
334
|
+
untrustedAgentDir: (dir: string) => string;
|
|
335
|
+
};
|
|
336
|
+
};
|