@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,292 @@
|
|
|
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
|
+
/** 缺省值由运行时决定的键 → 规则(schema 不写 default)。 */
|
|
9
|
+
const dynamicDefaultsEn = {
|
|
10
|
+
$schema: "ama init writes ./config.schema.json",
|
|
11
|
+
defaultModel: "picked automatically with zero configuration",
|
|
12
|
+
"permission.autoModel": "the current session model",
|
|
13
|
+
"codemode.mode": "follows the tool preset",
|
|
14
|
+
"ui.ascii": "auto-detected",
|
|
15
|
+
"ui.statusLine": "full in a standalone terminal, compact in an embedding host (with a profile)",
|
|
16
|
+
"plan.directory": "<data dir>/plans",
|
|
17
|
+
"plan.model": "unset: keep the current model",
|
|
18
|
+
"plan.thinkingLevel": "unset: keep the current thinking level",
|
|
19
|
+
"agents.sessionBudgetUsd": "unset: unlimited",
|
|
20
|
+
"subagents.defaultModel": "unset: inherit the parent session model",
|
|
21
|
+
"models.aliases.fast": "unset: fast is treated as inherit",
|
|
22
|
+
"models.aliases.strong": "unset: strong is treated as inherit",
|
|
23
|
+
fallbackModel: "unset: no fallback",
|
|
24
|
+
"limits.maxTurns": "unset: unlimited",
|
|
25
|
+
"limits.maxCostUsd": "unset: unlimited",
|
|
26
|
+
"ui.replyLanguage": "unset: no reply-language rule is appended (zero-byte change)",
|
|
27
|
+
"ui.agentBar": "auto in a standalone terminal, off in an embedding host (with a profile)",
|
|
28
|
+
"auth.chatgpt.clientId": "siwc registers dynamically on first login; codex uses the public client id (AMA_CHATGPT_CLIENT_ID overrides)",
|
|
29
|
+
"auth.chatgpt.redirectPorts": "siwc 1455 → any free port; codex 1455 → 1457",
|
|
30
|
+
};
|
|
31
|
+
const dynamicDefaultsZh = {
|
|
32
|
+
$schema: "ama init 写 ./config.schema.json",
|
|
33
|
+
defaultModel: "零配置自动选择",
|
|
34
|
+
"permission.autoModel": "当前会话模型",
|
|
35
|
+
"codemode.mode": "跟随预设",
|
|
36
|
+
"ui.ascii": "自动检测",
|
|
37
|
+
"ui.statusLine": "独立终端 full,嵌入宿主(有 profile)compact",
|
|
38
|
+
"plan.directory": "<数据目录>/plans",
|
|
39
|
+
"plan.model": "不设:沿用当前模型",
|
|
40
|
+
"plan.thinkingLevel": "不设:沿用当前思考强度",
|
|
41
|
+
"agents.sessionBudgetUsd": "不设:不限",
|
|
42
|
+
"subagents.defaultModel": "不设:继承父会话模型",
|
|
43
|
+
"models.aliases.fast": "不设:fast 按 inherit 处理",
|
|
44
|
+
"models.aliases.strong": "不设:strong 按 inherit 处理",
|
|
45
|
+
fallbackModel: "不设:不回退",
|
|
46
|
+
"limits.maxTurns": "不设:不限",
|
|
47
|
+
"limits.maxCostUsd": "不设:不限",
|
|
48
|
+
"ui.replyLanguage": "不设:不追加回复语言规则(零字节变化)",
|
|
49
|
+
"ui.agentBar": "独立终端 auto,嵌入宿主(有 profile)off",
|
|
50
|
+
"auth.chatgpt.clientId": "siwc 首次登录动态注册;codex 用公开客户端 id(AMA_CHATGPT_CLIENT_ID 覆盖)",
|
|
51
|
+
"auth.chatgpt.redirectPorts": "siwc 1455 → 任意空闲端口;codex 1455 → 1457",
|
|
52
|
+
};
|
|
53
|
+
/** 键路径 → 说明(段落本身也有一条)。 */
|
|
54
|
+
const keysEn = {
|
|
55
|
+
$schema: "Path to the JSON Schema used by editors",
|
|
56
|
+
version: "Config file format version; always 1",
|
|
57
|
+
defaultModel: "Default model provider/model or provider/model@channel; when unset it is picked automatically (ama config show shows which one and why)",
|
|
58
|
+
thinkingLevel: "Thinking level",
|
|
59
|
+
providers: "Custom providers and overrides of built-in providers (docs/providers.md)",
|
|
60
|
+
permission: "Permissions (docs/permissions.md)",
|
|
61
|
+
"permission.mode": "Permission mode; project level can only make it stricter",
|
|
62
|
+
"permission.allow": "Allow rules, e.g. bash(npm test); cannot be added at project level",
|
|
63
|
+
"permission.deny": "Deny rules, e.g. write(**/.env); accumulated across levels",
|
|
64
|
+
"permission.builtinDeny": "Built-in deny list (writes to .git/**, reads and writes to .ssh/**): true enables all, false removes all, an array lists the rule texts to remove; user level only",
|
|
65
|
+
"permission.autoModel": "Model provider/model for the auto-mode classifier; the current session model when unset; user level only",
|
|
66
|
+
"permission.autoSafeCommands": "Extra entries for the auto-mode safe list (word prefixes or globs with *); user level only",
|
|
67
|
+
compaction: "Automatic compaction",
|
|
68
|
+
"compaction.enabled": "Compact automatically when the context nears its limit",
|
|
69
|
+
"compaction.reserveTokens": "Tokens reserved for the reply; compaction starts when less is left",
|
|
70
|
+
"compaction.keepRecentTokens": "Tokens of recent messages kept verbatim when compacting",
|
|
71
|
+
"compaction.prune": "Tier-one pruning (old tool results replaced with placeholders); user level only (effective from wave 5 W5-H1)",
|
|
72
|
+
"compaction.prune.keepResults": "Keep the most recent N tool results unpruned",
|
|
73
|
+
"compaction.prune.clearAtLeast": "Prune only when at least this many tokens are saved (avoids breaking the cache too often); auto = max(20000, 0.1 × context budget)",
|
|
74
|
+
"compaction.pruneExclude": "Tool names never pruned by tier one; user level only (effective from wave 5 W5-H1)",
|
|
75
|
+
retry: "Retrying failed requests",
|
|
76
|
+
"retry.enabled": "Retry retryable errors (rate limits, server errors, dropped connections…) automatically",
|
|
77
|
+
"retry.maxRetries": "Maximum number of retries",
|
|
78
|
+
"retry.baseDelayMs": "Wait before the first retry (ms, exponential backoff; Retry-After wins when present)",
|
|
79
|
+
"retry.maxDelayMs": "Upper bound for a single wait (ms)",
|
|
80
|
+
tools: "Built-in tools",
|
|
81
|
+
"tools.preset": "Tool preset: default (six tools; codemode added when the network is isolated; todo needs +todo in tools.default), minimal, codemode-only, coordinator; codemode is the old name of codemode-only; project level can only make it stricter",
|
|
82
|
+
"tools.default": "Tweak the preset: +name adds, -name removes, bare names replace the preset's built-in tools as a whole; user level only",
|
|
83
|
+
"tools.maxToolResultChars": "Character limit for one tool result in the context; beyond it head and tail are kept",
|
|
84
|
+
"tools.bashTimeoutMs": "Default bash timeout (ms; overridable per call, max 600000)",
|
|
85
|
+
"tools.disabled": "Disabled tool names; accumulated across levels",
|
|
86
|
+
codemode: "codemode: the model writes scripts that call tools in batches (docs/codemode.md)",
|
|
87
|
+
"codemode.mode": "off | on | only; when unset it follows the preset: default → on (Node ≥ 25; Node 22 / 24 → off), codemode-only → only, minimal / coordinator → off; project level only accepts off",
|
|
88
|
+
"codemode.inlineBudget": "Budget (estimated tokens) for inlining tool declarations in the description in only mode; beyond it only names are listed",
|
|
89
|
+
"codemode.requireStrict": "true: disable codemode when the runtime Node does not isolate the network (Node 22 / 24)",
|
|
90
|
+
hooks: "Hook settings (the hooks themselves live in hooks.json)",
|
|
91
|
+
"hooks.timeoutMs": "Default timeout for a single hook command (ms)",
|
|
92
|
+
ui: "Terminal interface",
|
|
93
|
+
"ui.theme": "Color theme: dark, light, or auto (guessed from COLORFGBG without querying the terminal; dark when unsure)",
|
|
94
|
+
"ui.markdown": "Render replies as Markdown",
|
|
95
|
+
"ui.showThinking": "How thinking content is shown",
|
|
96
|
+
"ui.tuiMode": "Terminal interface layout (only regular for now)",
|
|
97
|
+
"ui.quietStartup": "How much the startup screen shows",
|
|
98
|
+
"ui.ascii": "ASCII glyphs (> * L, + - |); when unset it is detected: on when the locale lacks UTF-8, TERM=linux or a legacy conhost; AMA_ASCII=1/0 overrides",
|
|
99
|
+
"ui.compact": "No blank lines between message blocks and no box around the startup header",
|
|
100
|
+
"ui.animation": "false: the spinner stays still while running and redraws only when seconds change",
|
|
101
|
+
"ui.restoreOnCancel": "When Esc interrupts a run before any reply or tool call in this turn, withdraw the turn and put the message back into the input box",
|
|
102
|
+
"ui.statusLine": "Bottom info line: full shows two lines (rate line + status line), compact one; toggle at runtime with Ctrl+G or /statusline (effective from wave 5 W5-A)",
|
|
103
|
+
"ui.language": "Interface language: auto decides from LC_ALL / LC_MESSAGES / LANG (zh* is Chinese, anything else English), zh, en; AMA_LANG and --lang override; affects the interface only, text sent to the model is always English",
|
|
104
|
+
"ui.replyLanguage": "Reply language for the model (e.g. Chinese): one English rule is appended to the end of the rules section at session start; zero-byte change when unset; user level only (effective from wave 6)",
|
|
105
|
+
"ui.agentBar": "Agent bar (sub-agent list above the status line): auto shows it while tasks exist, off hides it; enter with Ctrl+B or ↓ on an empty input (effective from wave 6 W6-A)",
|
|
106
|
+
memory: "Cross-session memory (docs/memory.md): off by default, requests are byte-identical while off; project level can only set enabled: false (effective from wave 6 W6-M)",
|
|
107
|
+
"memory.enabled": "Master switch; --memory / --no-memory and AMA_MEMORY=0|1 override",
|
|
108
|
+
"memory.scopes": "Enabled scopes: user (data directory, across projects), project (keyed by a hash of the repository path)",
|
|
109
|
+
"memory.indexMaxBytes": "Per-scope limit for the index in the system prompt (bytes); truncated by update time beyond it",
|
|
110
|
+
"memory.fileMaxBytes": "Limit for one memory entry (bytes); writes beyond it are refused",
|
|
111
|
+
"memory.maxFiles": "Maximum entries per scope",
|
|
112
|
+
"memory.subagents": "Sub-agents: read is read-only (write commands refused), off refuses even view",
|
|
113
|
+
auth: "Subscription login settings (no secrets; credentials live in auth.json); user level / profile only (effective from wave 6 W6-O)",
|
|
114
|
+
"auth.chatgpt": "ChatGPT login (ama auth login chatgpt)",
|
|
115
|
+
"auth.chatgpt.flavor": "siwc: official OpenAI Sign in with ChatGPT (default); codex: borrows the public Codex client (unofficial, must be enabled explicitly)",
|
|
116
|
+
"auth.chatgpt.clientId": "OAuth client id",
|
|
117
|
+
"auth.chatgpt.issuer": "Authorization server (override with AMA_CHATGPT_ISSUER for tests)",
|
|
118
|
+
"auth.chatgpt.originator": "originator request header for the codex flavor",
|
|
119
|
+
"auth.chatgpt.redirectPorts": "Local callback ports, tried in order; 0 = any free port",
|
|
120
|
+
skills: "Skills",
|
|
121
|
+
"skills.dirs": "Extra skill directories; accumulated across levels",
|
|
122
|
+
cache: "Prompt caching; the whole section is user level only",
|
|
123
|
+
request: "Model requests; the whole section is user level / profile only",
|
|
124
|
+
"request.idleTimeoutMs": "Stream idle timeout (ms): waiting longer for headers or between two chunks counts as stuck and is retried as a retryable error; 0 disables; AMA_IDLE_TIMEOUT_MS overrides",
|
|
125
|
+
"cache.warming": "Warming: off disables, streaming warms while generating, idle also warms while idle",
|
|
126
|
+
"cache.retention": "Cache retention tier: none, short, long (when the provider supports it)",
|
|
127
|
+
"cache.minSavingsUsd": "Minimum expected savings (USD) for warming",
|
|
128
|
+
"cache.missNotices": "Show cache misses and remaining context in the message area",
|
|
129
|
+
"cache.warmSubagents": "Also warm sub-sessions (task)",
|
|
130
|
+
checkpoints: 'Checkpoints: file backups used to roll back code (docs/sessions.md "Checkpoints and file backups")',
|
|
131
|
+
"checkpoints.mode": "tools: track files changed by edit / write; shadow-git: also snapshot the whole working directory with a shadow git so direct changes (bash etc.) can be rolled back too (needs git; large directories fall back to tools); off: disabled; AMA_CHECKPOINTS overrides; project level only accepts off",
|
|
132
|
+
"checkpoints.maxFileBytes": "Backup limit for a single file (bytes); larger files are not backed up and rollback reports them as unrecoverable; project level can only lower it",
|
|
133
|
+
"checkpoints.keep": "Number of recent checkpoints available for rollback; older ones are no longer listed; user level / profile only",
|
|
134
|
+
sandbox: 'OS-level sandbox (docs/sandbox.md); user level / profile only, project level only accepts network: "deny"',
|
|
135
|
+
"sandbox.enabled": "auto: use macOS sandbox-exec / Linux bwrap or unshare when available (codemode child processes are denied network and writes; this isolates codemode's network on Node 22 / 24); off: not used; AMA_SANDBOX=off overrides",
|
|
136
|
+
"sandbox.bash": "auto: run bash through sandbox-exec / bwrap (unshare does not count), writes limited to the workspace, temp dir, output dir and sandbox.writable, and sandboxed commands need no approval in default mode; off: not used; user level / profile only",
|
|
137
|
+
"sandbox.network": "Network inside the bash sandbox: deny blocks it (required for approval-free sandboxed commands); allow permits network but writes stay limited and approval works as usual; project level can only set deny",
|
|
138
|
+
"sandbox.writable": "Extra writable directories for the bash sandbox (absolute paths or ~/…); user level / profile only",
|
|
139
|
+
images: "Image input; user level only (effective from wave 5 W5-I)",
|
|
140
|
+
"images.resize": "auto: resize images above the endpoint limit with system tools (sips / magick), refusing as before when none is found; off: never resize",
|
|
141
|
+
plan: "Plan mode (effective from wave 5 W5-F)",
|
|
142
|
+
"plan.bash": "bash in plan mode: readonly allows read-only commands and refuses the rest, ask asks for the rest, deny refuses everything; project level can only make it stricter",
|
|
143
|
+
"plan.directory": "Directory for plan files (must be inside the project root, otherwise the default is used); user level only",
|
|
144
|
+
"plan.unattended": "When unattended (-p, or RPC without the plans capability): stop writes the plan and waits for approval, approve approves and executes automatically; user level only",
|
|
145
|
+
"plan.model": "Planning model provider/model[@channel]: switched to on entering plan, switched back on approval; user level only",
|
|
146
|
+
"plan.thinkingLevel": "Thinking level while planning; user level only",
|
|
147
|
+
agents: "External agents (claude / codex / ACP) and sub-agent types; agents.<id> sets maxConcurrent / maxMode / model / env.passthrough for a single agent; user level only (effective from wave 5 W5-E / W5-G)",
|
|
148
|
+
"agents.maxConcurrent": "Total concurrency of external agents",
|
|
149
|
+
"agents.sessionBudgetUsd": "USD budget for external agents in this session",
|
|
150
|
+
"agents.dirs": "Extra sub-agent definition directories (*.md); accumulated across levels",
|
|
151
|
+
subagents: "ama's own task sub-sessions; user level only (effective from wave 5 W5-G)",
|
|
152
|
+
"subagents.maxConcurrent": "Sub-sessions running at the same time",
|
|
153
|
+
"subagents.maxPending": "Queue limit; task fails beyond it",
|
|
154
|
+
"subagents.defaultModel": "Default sub-session model provider/model[@channel]",
|
|
155
|
+
models: "Model aliases; user level only (effective from wave 5 W5-G)",
|
|
156
|
+
"models.aliases": "Models that model: fast / strong in sub-agent definitions point to",
|
|
157
|
+
"models.aliases.fast": "Model for the fast alias provider/model[@channel]",
|
|
158
|
+
"models.aliases.strong": "Model for the strong alias provider/model[@channel]",
|
|
159
|
+
fallbackModel: "Fallback model provider/model[@channel]: switch and retry once when retryable errors are exhausted or the model is overloaded; the next turn returns to the main model; user level only (effective from wave 5 W5-H2)",
|
|
160
|
+
limits: "Session budget; the run ends when reached (-p exit code 8); --max-turns / --max-cost override; user level only (effective from wave 5 W5-H2)",
|
|
161
|
+
"limits.maxTurns": "Maximum turns per run",
|
|
162
|
+
"limits.maxCostUsd": "USD limit per run",
|
|
163
|
+
reminders: "Reminders attached to the end of the conversation (cache prefix untouched); settable at project level (effective from wave 5 W5-H2)",
|
|
164
|
+
"reminders.todo": "Restate todo when it has open items and has not been updated for several turns",
|
|
165
|
+
"reminders.fileChanges": "List files that were read and then changed externally",
|
|
166
|
+
"reminders.contextPressure": "Remind once each at 70% / 85% context usage",
|
|
167
|
+
"reminders.budget": "Remind when less than 20% of the budget is left",
|
|
168
|
+
todo: "todo tool; user level only (effective from wave 5 W5-F / W5-H2)",
|
|
169
|
+
"todo.reminder": "Remind to restate after N consecutive turns without an update while items are open; 0 disables",
|
|
170
|
+
};
|
|
171
|
+
const keysZh = {
|
|
172
|
+
$schema: "编辑器用的 JSON Schema 路径",
|
|
173
|
+
version: "配置文件格式版本,固定为 1",
|
|
174
|
+
defaultModel: "缺省模型 provider/model 或 provider/model@channel;不写时零配置自动选择(ama config show 显示选了谁、为什么)",
|
|
175
|
+
thinkingLevel: "思考强度",
|
|
176
|
+
providers: "自定义供应商与对内置供应商的覆盖(docs/providers.md)",
|
|
177
|
+
permission: "权限(docs/permissions.md)",
|
|
178
|
+
"permission.mode": "权限模式;项目级只能更严",
|
|
179
|
+
"permission.allow": "放行规则,如 bash(npm test);项目级不能加",
|
|
180
|
+
"permission.deny": "拒绝规则,如 write(**/.env);各层累加",
|
|
181
|
+
"permission.builtinDeny": "内置 deny 表(.git/** 写、.ssh/** 读写):true 全部启用,false 全部移除,数组 = 要移除的规则原文;只认用户级",
|
|
182
|
+
"permission.autoModel": "auto 模式分类器的模型 provider/model;不写时用当前会话模型;只认用户级",
|
|
183
|
+
"permission.autoSafeCommands": "auto 模式安全名单追加(词前缀或含 * 的通配);只认用户级",
|
|
184
|
+
compaction: "自动压缩",
|
|
185
|
+
"compaction.enabled": "上下文接近上限时自动压缩",
|
|
186
|
+
"compaction.reserveTokens": "为回复预留的 token;剩余不足时触发压缩",
|
|
187
|
+
"compaction.keepRecentTokens": "压缩时原样保留的最近消息 token",
|
|
188
|
+
"compaction.prune": "档一裁剪(旧工具结果换成占位);只认用户级(第五波 W5-H1 起生效)",
|
|
189
|
+
"compaction.prune.keepResults": "保留最近 N 个工具结果不裁",
|
|
190
|
+
"compaction.prune.clearAtLeast": "一次至少能省这么多 token 才裁(避免频繁打断缓存);auto = max(20000, 0.1 × 上下文预算)",
|
|
191
|
+
"compaction.pruneExclude": "不被档一裁剪的工具名;只认用户级(第五波 W5-H1 起生效)",
|
|
192
|
+
retry: "请求失败重试",
|
|
193
|
+
"retry.enabled": "可重试的错误(限流、服务端错误、连接中断等)自动重试",
|
|
194
|
+
"retry.maxRetries": "最多重试次数",
|
|
195
|
+
"retry.baseDelayMs": "首次重试等待(毫秒,指数退避;有 Retry-After 时按它)",
|
|
196
|
+
"retry.maxDelayMs": "单次等待上限(毫秒)",
|
|
197
|
+
tools: "内置工具",
|
|
198
|
+
"tools.preset": "工具预设:default(六个工具;网络隔离时另加 codemode,todo 需在 tools.default 加 +todo)、minimal、codemode-only、coordinator;codemode 是 codemode-only 的旧名;项目级只能更严",
|
|
199
|
+
"tools.default": "在预设上微调:+name 加、-name 去,不带前缀的名字整组替换预设的内置工具;只认用户级",
|
|
200
|
+
"tools.maxToolResultChars": "单条工具结果进上下文的字符上限,超出保留首尾",
|
|
201
|
+
"tools.bashTimeoutMs": "bash 缺省超时(毫秒,单次调用可覆盖,最大 600000)",
|
|
202
|
+
"tools.disabled": "禁用的工具名;各层累加",
|
|
203
|
+
codemode: "codemode:模型写脚本批量调用工具(docs/codemode.md)",
|
|
204
|
+
"codemode.mode": "off | on | only;不写时跟随预设:default → on(Node ≥ 25;Node 22 / 24 → off)、codemode-only → only、minimal / coordinator → off;项目级只接受 off",
|
|
205
|
+
"codemode.inlineBudget": "only 模式在描述里内联工具声明的预算(估算 token),超出只列名字",
|
|
206
|
+
"codemode.requireStrict": "true:运行时 Node 不隔离网络(Node 22 / 24)时直接禁用 codemode",
|
|
207
|
+
hooks: "Hook 设置(Hook 本身写在 hooks.json)",
|
|
208
|
+
"hooks.timeoutMs": "单个 Hook 命令的缺省超时(毫秒)",
|
|
209
|
+
ui: "终端界面",
|
|
210
|
+
"ui.theme": "配色主题:dark、light,或 auto(按 COLORFGBG 猜,不发终端查询,猜不出用 dark)",
|
|
211
|
+
"ui.markdown": "按 Markdown 渲染回复",
|
|
212
|
+
"ui.showThinking": "思考内容的显示方式",
|
|
213
|
+
"ui.tuiMode": "终端界面形态(目前只有 regular)",
|
|
214
|
+
"ui.quietStartup": "启动画面详略",
|
|
215
|
+
"ui.ascii": "ASCII 字形(> * L、+ - |);不写时自动检测:区域设置不含 UTF-8、TERM=linux、旧 conhost 时开启;AMA_ASCII=1/0 覆盖",
|
|
216
|
+
"ui.compact": "消息区块间不空行、启动头不画框",
|
|
217
|
+
"ui.animation": "false:运行中 spinner 静止,只在秒数变化时重绘",
|
|
218
|
+
"ui.restoreOnCancel": "运行中 Esc 中断、本回合还没有任何回复或工具调用时,撤回该回合并把原消息放回输入框",
|
|
219
|
+
"ui.statusLine": "底部信息行:full 两行(速率行 + 状态行),compact 一行;运行时 Ctrl+G 或 /statusline 切换(第五波 W5-A 起生效)",
|
|
220
|
+
"ui.language": "界面语言:auto 按 LC_ALL / LC_MESSAGES / LANG 判断(zh* 为中文,其余英文),zh,en;AMA_LANG、--lang 覆盖;只影响界面,发给模型的文本固定英文",
|
|
221
|
+
"ui.replyLanguage": "模型回复语言(如 Chinese):会话开始在 rules 节末尾追加一句英文规则;不设时零字节变化;只认用户级(第六波起生效)",
|
|
222
|
+
"ui.agentBar": "Agent 栏(状态行上方的子 Agent 列表):auto 有任务时显示,off 不显示;Ctrl+B / 空输入时 ↓ 进入(第六波 W6-A 起生效)",
|
|
223
|
+
memory: "跨会话记忆(docs/memory.md):缺省关闭,关闭时请求逐字节不变;项目级只能设 enabled: false(第六波 W6-M 起生效)",
|
|
224
|
+
"memory.enabled": "总开关;--memory / --no-memory、AMA_MEMORY=0|1 覆盖",
|
|
225
|
+
"memory.scopes": "启用的作用域:user(数据目录,跨项目)、project(按仓库路径哈希)",
|
|
226
|
+
"memory.indexMaxBytes": "每作用域索引进系统提示的上限(字节),超出按更新时间截断",
|
|
227
|
+
"memory.fileMaxBytes": "单条记忆上限(字节),超出拒写",
|
|
228
|
+
"memory.maxFiles": "每作用域条目上限",
|
|
229
|
+
"memory.subagents": "子 Agent:read 只读(写命令拒绝),off 连 view 也拒绝",
|
|
230
|
+
auth: "订阅登录设置(不含密钥,凭据在 auth.json);只认用户级 / profile(第六波 W6-O 起生效)",
|
|
231
|
+
"auth.chatgpt": "ChatGPT 登录(ama auth login chatgpt)",
|
|
232
|
+
"auth.chatgpt.flavor": "siwc:OpenAI 官方 Sign in with ChatGPT(缺省);codex:借用 Codex 公开客户端(非官方、需显式开启)",
|
|
233
|
+
"auth.chatgpt.clientId": "OAuth 客户端 id",
|
|
234
|
+
"auth.chatgpt.issuer": "授权服务器(测试用 AMA_CHATGPT_ISSUER 覆盖)",
|
|
235
|
+
"auth.chatgpt.originator": "codex flavor 的 originator 请求头",
|
|
236
|
+
"auth.chatgpt.redirectPorts": "本地回调端口,依次尝试;0 = 任意空闲端口",
|
|
237
|
+
skills: "Skill",
|
|
238
|
+
"skills.dirs": "追加的 Skill 目录;各层累加",
|
|
239
|
+
cache: "提示缓存;整段只认用户级",
|
|
240
|
+
request: "模型请求;整段只认用户级 / profile",
|
|
241
|
+
"request.idleTimeoutMs": "流空闲超时(毫秒):等响应头或两块数据之间超过即判卡住并按可重试错误重试;0 关闭;AMA_IDLE_TIMEOUT_MS 覆盖",
|
|
242
|
+
"cache.warming": "保温:off 关闭,streaming 生成期间保温,idle 空闲时也保温",
|
|
243
|
+
"cache.retention": "缓存时长档:none、short、long(供应商支持时)",
|
|
244
|
+
"cache.minSavingsUsd": "保温的最低期望节省(美元)",
|
|
245
|
+
"cache.missNotices": "在消息区提示缓存未命中与上下文余量",
|
|
246
|
+
"cache.warmSubagents": "子会话(task)也保温",
|
|
247
|
+
checkpoints: "检查点:回滚代码用的文件备份(docs/sessions.md「检查点与文件备份」)",
|
|
248
|
+
"checkpoints.mode": "tools:跟踪 edit / write 改过的文件;shadow-git:另用影子 git 快照整个工作目录,bash 等直接改动也能回滚(需要 git,大目录自动降级为 tools);off:关闭;AMA_CHECKPOINTS 覆盖;项目级只接受 off",
|
|
249
|
+
"checkpoints.maxFileBytes": "单个文件的备份上限(字节),超出不备份、回滚时报告无法恢复;项目级只能调小",
|
|
250
|
+
"checkpoints.keep": "可回滚的最近检查点数,更早的不再列为回滚点;只认用户级 / profile",
|
|
251
|
+
sandbox: '操作系统级沙箱(docs/sandbox.md);只认用户级 / profile,项目级只接受 network: "deny"',
|
|
252
|
+
"sandbox.enabled": "auto:探测到可用的 macOS sandbox-exec / Linux bwrap、unshare 就用(codemode 子进程拒绝网络与写入;Node 22 / 24 上 codemode 因此网络隔离);off:不用;AMA_SANDBOX=off 覆盖",
|
|
253
|
+
"sandbox.bash": "auto:bash 经 sandbox-exec / bwrap 运行(unshare 不算),写入只限工作区、临时目录、输出目录与 sandbox.writable,default 模式下沙箱内命令免审批;off:不用;只认用户级 / profile",
|
|
254
|
+
"sandbox.network": "bash 沙箱里的网络:deny 拒绝(沙箱内免审批的前提);allow 允许联网但写入仍受限、照常审批;项目级只能设 deny",
|
|
255
|
+
"sandbox.writable": "bash 沙箱追加的可写目录(绝对路径或 ~/…);只认用户级 / profile",
|
|
256
|
+
images: "图像输入;只认用户级(第五波 W5-I 起生效)",
|
|
257
|
+
"images.resize": "auto:图片超过端点上限时用系统工具(sips / magick)缩放,找不到工具按原规则拒绝;off:从不缩放",
|
|
258
|
+
plan: "Plan 模式(第五波 W5-F 起生效)",
|
|
259
|
+
"plan.bash": "plan 模式下的 bash:readonly 只读命令放行其余拒绝,ask 其余询问,deny 全拒;项目级只能更严",
|
|
260
|
+
"plan.directory": "计划文件目录(必须在项目根之内,否则回落缺省);只认用户级",
|
|
261
|
+
"plan.unattended": "无人值守(-p、RPC 未声明 plans 能力)时:stop 落盘计划后停下等人审批,approve 自动批准执行;只认用户级",
|
|
262
|
+
"plan.model": "规划用模型 provider/model[@channel]:进入 plan 时切换、批准时切回;只认用户级",
|
|
263
|
+
"plan.thinkingLevel": "规划时的思考强度;只认用户级",
|
|
264
|
+
agents: "外部 Agent(claude / codex / ACP)与子 Agent 类型;agents.<id> 设单个 Agent 的 maxConcurrent / maxMode / model / env.passthrough;只认用户级(第五波 W5-E / W5-G 起生效)",
|
|
265
|
+
"agents.maxConcurrent": "外部 Agent 的总并发",
|
|
266
|
+
"agents.sessionBudgetUsd": "本会话外部 Agent 的美元预算",
|
|
267
|
+
"agents.dirs": "追加的子 Agent 定义目录(*.md);各层累加",
|
|
268
|
+
subagents: "ama 自己的 task 子会话;只认用户级(第五波 W5-G 起生效)",
|
|
269
|
+
"subagents.maxConcurrent": "同时运行的子会话数",
|
|
270
|
+
"subagents.maxPending": "排队上限,超出时 task 报错",
|
|
271
|
+
"subagents.defaultModel": "子会话缺省模型 provider/model[@channel]",
|
|
272
|
+
models: "模型别名;只认用户级(第五波 W5-G 起生效)",
|
|
273
|
+
"models.aliases": "子 Agent 定义里 model: fast / strong 指向的模型",
|
|
274
|
+
"models.aliases.fast": "fast 别名的模型 provider/model[@channel]",
|
|
275
|
+
"models.aliases.strong": "strong 别名的模型 provider/model[@channel]",
|
|
276
|
+
fallbackModel: "回退模型 provider/model[@channel]:可重试错误用尽或过载时切换重试一次,下一回合回主模型;只认用户级(第五波 W5-H2 起生效)",
|
|
277
|
+
limits: "会话预算,到限结束本次运行(-p 退出码 8);--max-turns / --max-cost 覆盖;只认用户级(第五波 W5-H2 起生效)",
|
|
278
|
+
"limits.maxTurns": "一次运行最多回合数",
|
|
279
|
+
"limits.maxCostUsd": "一次运行的美元上限",
|
|
280
|
+
reminders: "附在对话尾部的提醒(不改缓存前缀);项目级可设(第五波 W5-H2 起生效)",
|
|
281
|
+
"reminders.todo": "todo 有未完成项且多回合未更新时复述",
|
|
282
|
+
"reminders.fileChanges": "读过的文件被外部改动时列出",
|
|
283
|
+
"reminders.contextPressure": "上下文用量到 70% / 85% 时各提醒一次",
|
|
284
|
+
"reminders.budget": "预算剩余不足 20% 时提醒",
|
|
285
|
+
todo: "todo 工具;只认用户级(第五波 W5-F / W5-H2 起生效)",
|
|
286
|
+
"todo.reminder": "连续 N 回合未更新且有未完成项时提醒复述;0 关闭",
|
|
287
|
+
};
|
|
288
|
+
export const en = { keys: keysEn, dynamicDefaults: dynamicDefaultsEn };
|
|
289
|
+
export const zh = {
|
|
290
|
+
keys: keysZh,
|
|
291
|
+
dynamicDefaults: dynamicDefaultsZh,
|
|
292
|
+
};
|