@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
package/CHANGELOG.md
CHANGED
|
@@ -1,304 +1,177 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
`
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
`
|
|
102
|
-
-
|
|
103
|
-
`
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
`
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
`
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
`[DONE:n]`。复测 212 次请求,约 $0.27。
|
|
179
|
-
|
|
180
|
-
### 已知限制
|
|
181
|
-
|
|
182
|
-
- Linux 沙箱未在真机上验证(bubblewrap 的策略只经单元测试与 Ubuntu CI 验证;没有 bwrap 时退到 `unshare`,不能用于 bash 沙箱)。
|
|
183
|
-
- 外部 Agent 的真实 CLI 端到端只在本地跑:本机已登录 `claude` / `codex` 时 `AMA_E2E_AGENTS=1`(会用订阅额度);CI 只跑录制回放与
|
|
184
|
-
ama 驱动 ama。
|
|
185
|
-
- DeepSeek、智谱、Kimi 缺省仍走 Chat,等官方直连过了实测门再切 Messages。
|
|
186
|
-
- models.dev 每周刷新的 PR 需要仓库 secret `MODELS_DEV_PR_TOKEN` 才会触发 CI(没有时 workflow 自跑 `pnpm run ci` 并写进 PR 描述)。
|
|
187
|
-
|
|
188
|
-
## 0.4.0(2026-10-02)
|
|
189
|
-
|
|
190
|
-
- **终端界面重做**(视觉规格见 docs/tui-design.md):带框启动头(模型 / 目录 / 模式 / 已加载资源,窄屏去框);
|
|
191
|
-
工具调用改 `⏺ 工具名 摘要` + `⎿ 一行结果摘要` + 缩进正文三级层级,相邻调用不空行,运行中摘要行带 spinner 与秒数,
|
|
192
|
-
diff 带行号;思考块 `✻ 思考 · N token`,`Ctrl+O` 同时展开思考;运行中动词(思考中 / 回复中 · ↓≈N / 运行 bash /
|
|
193
|
-
等待确认 / 重试 / 压缩上下文);输入框 `›` 提示符与占位;状态栏两区(左模式 + `shift+tab 切换`,右用量,
|
|
194
|
-
模型名按宽度缩写);审批对话框编号选项(1–3 / ↑↓ Enter,危险命令缺省选中拒绝,边框随严重度着色);
|
|
195
|
-
`/session` `/cache` `/permissions` 改为左竖条面板;退出时留一行会话摘要与 `ama --resume <id>`。
|
|
196
|
-
新配置 `ui.theme: "auto"`、`ui.ascii`(`AMA_ASCII=1`)、`ui.compact`、`ui.animation`。
|
|
197
|
-
- **破坏性变更(`@armadra/agent/tui` 与界面文本)**:`SemanticColor` 增加 `muted` / `link` / `selection`,`Theme`
|
|
198
|
-
增加必填的 `glyphs`——自己实现 `Theme` 的宿主需补这 3 个颜色与字形表(可用 `UNICODE_GLYPHS`);`Loader` 渲染从
|
|
199
|
-
`⠋ 消息 (12s)` 改为 `⠋ 动词 · 12s · 附加项`;粘贴折叠标记从 `[paste #N +M lines]` 改为 `[粘贴 #N · M 行]`;
|
|
200
|
-
状态栏不再有 `mode:` / `think:` / `preset:` 前缀(模式移到最左,`preset` 只在非 default 时出现),按 `mode:` 解析
|
|
201
|
-
状态栏的脚本需改为取最左一项;排队消息标签 `↳ steer` / `↳ followUp` / `↳ host` 改为 `↳ 插话` / `↳ 之后` / `↳ 宿主`
|
|
202
|
-
(会话文件里的 `origin` 不变);`/permission` 选择器标题 `Mode` 改为「权限模式」。
|
|
203
|
-
- **codemode 缺省开放**:`codemode.mode` 不写时跟随预设——`default` 预设在沙箱网络隔离(Node ≥ 25)时带上
|
|
204
|
-
`codemode`(六个工具 + codemode),Node 22 / 24 缺省不开并在启动时提示一次(每个配置目录一次,记在数据目录
|
|
205
|
-
`notices.json`),`--codemode on` 或 config 显式开启;`minimal` / `coordinator` 不开。缺省配置不写这个键。
|
|
206
|
-
- **修复:coordinator 经 codemode 绕过**:`coordinator` 预设显式开了 codemode 时,脚本里只能调活动集里的工具
|
|
207
|
-
(read 与宿主工具),`tools.bash` / `tools.write` 不再可达。
|
|
208
|
-
- **on 模式去重**:`codemode` 描述不再内联已直接暴露的工具声明,其它工具描述也不再追加提示,只列「参数同直接
|
|
209
|
-
工具」与「仅脚本可调用」的名字;系统提示 + 工具表比 off 只多约 390 token(原约 1356)。`--codemode on` 的旧会话
|
|
210
|
-
续接时描述字节变化,会有一次缓存未命中。
|
|
211
|
-
- **预设改名**:`codemode` 预设更名 `codemode-only`;旧名作别名继续可用(配置、`--tools-preset`、RPC、SDK、schema),
|
|
212
|
-
`ama config show` 显示规范名并提示。
|
|
213
|
-
- **`ama init` 不写死缺省值**:新生成的 `config.json` 只有 `$schema`、`version` 与空 `providers`,以后缺省值调整对老
|
|
214
|
-
用户同样生效;init 结束打印下一步。已存在的文件不动(之前生成的文件里的 `thinkingLevel` / `permission.mode` /
|
|
215
|
-
`tools.preset` 仍会按 user 层生效,想跟随缺省可以删掉)。
|
|
216
|
-
- **`ama config show`**:补全 `cache`、`codemode` 等段与每项来源,codemode 写明生效模式与原因;接受
|
|
217
|
-
`--tools-preset` / `--codemode`;`ama doctor` 同样显示 codemode。`config.schema.json` 的每个键都带说明与缺省值。
|
|
218
|
-
- **不再展示 fake**:零配置的模型选择器、`doctor`、`models list`、`providers list`、`config show` 缺省不列测试供应商
|
|
219
|
-
`fake`(`AMA_SHOW_FAKE=1` 或 `AMA_FAKE_SCRIPT` 时照列,`--model fake/…` 照常可用);没有可用模型时提示 key 环境变量、
|
|
220
|
-
`ama auth set` 与 `ama providers add`。
|
|
221
|
-
- **缺省模型**:自定义供应商(中转站)不再取列表首条,而是在 models.dev 有价格、支持工具调用、上下文 ≥ 64k 的模型里
|
|
222
|
-
取输入价最低的;`ama providers add` 在还没有 `defaultModel` 时按同一规则写入并说明原因。内置供应商仍取目录首条。
|
|
223
|
-
|
|
224
|
-
- **auto 权限模式**:`--permission-mode auto`(界面显示名 Auto)由 ama 判断每一步——规则层不调模型,危险命令、
|
|
225
|
-
网络命令、删除类命令、机密文件与项目外写入一律询问;静态判定放行只读工具、项目内写入与安全名单里的命令
|
|
226
|
-
(`ls`、`grep`、`git status/diff/log`、`npm test`、`tsc --noEmit`、`cargo test` 等,`permission.autoSafeCommands` 追加);
|
|
227
|
-
其余交给一次独立的模型分类器(`permission.autoModel`,不影响主会话缓存,用量记 `permission_classify`)。
|
|
228
|
-
事件带 `autoDecision`,`/permissions` 显示最近判定。见 docs/permissions.md。
|
|
229
|
-
- **allowlist 模式**:只放行只读工具与 allow 规则命中的调用,其余直接拒绝、从不询问,适合 CI。
|
|
230
|
-
- **模式选择器**:`/permission` 打开 Mode 列表(显示名 + 说明、数字 1–6、当前打勾、Default / Recommended),
|
|
231
|
-
`Shift+Tab` 循环 Manual → Accept edits → Plan → Auto → Bypass permissions,状态栏显示显示名。
|
|
232
|
-
项目级配置不能设 `auto` / `full-auto`。
|
|
233
|
-
- **测试隔离**:组装测试不再把会话写进真实数据目录,测试结束检查真实 `~/.local/share/ama` / `~/.config/ama` 有无新增。
|
|
234
|
-
|
|
235
|
-
- **探测提速**:`ama providers add|refresh --probe` 与 `ama models discover --probe` 并发探测(`--concurrency`,缺省 6),
|
|
236
|
-
流里出现首个内容事件即判可用并断开,单次超时缩到 15 s(`--probe-timeout`);429 时降并发并重试一次,
|
|
237
|
-
连续 429 才停止。实测 22 个模型、60 次探测从预计 20–30 分钟降到约 85 s。
|
|
238
|
-
降并发之后连续 4 次没被限流就并发 +1,回到初始并发为止。
|
|
239
|
-
|
|
240
|
-
- **流空闲超时**:模型请求等响应头、以及流里两块数据之间缺省 300 s 没有任何字节即判卡住,按可重试错误重试;
|
|
241
|
-
`request.idleTimeoutMs`(用户级)或 `AMA_IDLE_TIMEOUT_MS` 调整,0 关闭。服务端发一块就停住不再让 `-p` 永久挂起。
|
|
242
|
-
- **`-p` 与 stdin**:`git diff | ama -p "审阅"` 照旧把管道内容拼在提示后面;有提示参数时只等管道首字节 2 秒
|
|
243
|
-
(`AMA_STDIN_WAIT_MS` 可调,0 = 不等),一个字节都没有就忽略 stdin 并在 stderr 提示,父进程留着不关的管道不再让
|
|
244
|
-
`-p` 挂起;收到首字节后读到 EOF。末尾加 `-` 一直等到 EOF(上游要先跑很久才输出时用),`< 文件` 照常读取;没有提示
|
|
245
|
-
参数时等 stdin 超过 3 s 提示一次;`--no-stdin` 完全不读。
|
|
246
|
-
- **`-p` 无人值守的拒绝可见**:被拒的工具调用在 stderr 汇总(工具、原因、放行办法),`json` 结果带 `deniedTools`,
|
|
247
|
-
`tool_execution_end` 带 `denied: true`,退出码 7(新增)。重试期间 stderr 每次一行 `↻`。
|
|
248
|
-
- **新参数**:`-p --max-turns N`(到上限仍在调工具时退出 1,`json` 带 `maxTurnsReached`)、
|
|
249
|
-
`--system-prompt <文本|@文件>` 与 `--system-prompt-mode append|replace`(缺省作为最后一条规则追加,缓存前缀不变)、
|
|
250
|
-
`--no-session`(会话不落盘)。
|
|
251
|
-
- **报错准确**:`provider/model@渠道` 渠道不存在时报「渠道不存在」并列出该模型的可用渠道(中转供应商不再把 `@后缀`
|
|
252
|
-
当成模型 id 发出去);供应商写错报「供应商不存在」并给编辑距离最近的候选;模型写错列出最接近的几个。
|
|
253
|
-
- **代理**:设了 `HTTPS_PROXY` / `HTTP_PROXY` 时启动即启用 Node 内置的环境变量代理(`NO_PROXY` 生效),Node 22.21 以前
|
|
254
|
-
提示一次并直连;`ama doctor` 新增「代理」一节。
|
|
255
|
-
- **行式管道模式**:模型错误只在运行结束时打印一次,有运行失败时退出码 1(以前 0)。
|
|
256
|
-
- **只读命令不写盘**:`config show` / `path`、`doctor`、`models list` 等不再创建配置目录,首次自动初始化只在进入对话的
|
|
257
|
-
命令与 `providers add` 里触发。
|
|
258
|
-
|
|
259
|
-
- **会话统计**:`ama stats` 只读扫描会话,汇总请求(对话、保温、权限分类、压缩分开计)、回合与平均耗时、
|
|
260
|
-
token、缓存命中率(只算报告缓存的端点)、费用(只加有价请求)、错误与重试、工具调用 Top N;
|
|
261
|
-
`--since` / `--until` / `--by day|week|month|provider|channel|model|project` / `--json`;
|
|
262
|
-
增量索引 `<数据目录>/stats-index.json`,1000 个会话冷扫描约 160 ms。
|
|
263
|
-
- **会话检索与导出**:`ama sessions search <关键词|/正则/>`(`--role`、`--since`、`--limit`,TTY 高亮);
|
|
264
|
-
`ama sessions export <id> --format md|json|jsonl [--branch leaf|all] [--output]`,导出前脱敏 key / token。
|
|
265
|
-
- **复用**:`ama sessions show` 列出用户消息编号;`--from <id>[#编号]` 用那条消息作新提示(`-p` 时连图片),
|
|
266
|
-
可配合 `--model` 换模型重问。见 docs/sessions.md。
|
|
267
|
-
- **发布**:release job 优先用 npm 可信发布(OIDC,npm ≥ 11.5.1),`NPM_TOKEN` 只作回退;需要在 npmjs.com
|
|
268
|
-
为 `@armadra/agent` 添加 Trusted Publisher(Owlbay / armadra-agent / ci.yml)。
|
|
269
|
-
|
|
270
|
-
## 0.3.0(2026-10-02)
|
|
271
|
-
|
|
272
|
-
自定义供应商与多渠道、models.dev 模型元数据、图像输入、默认配置目录。
|
|
273
|
-
|
|
274
|
-
- **一键接入**:`ama providers add <id> --base-url <url>` 只要 baseUrl 与 key——列出中转的模型、按提示或 `--probe` 逐渠道
|
|
275
|
-
探测、写进配置;`list` / `channels` / `remove` / `refresh`。
|
|
276
|
-
- **渠道**:一个供应商可挂多个渠道(协议 + 地址 + 可选 key / headers / compat),模型声明 `channels`,
|
|
277
|
-
`provider/model@channel` 指定渠道;旧配置按隐式 `default` 渠道处理,不用改。
|
|
278
|
-
- **models.dev 元数据**:上下文、输出上限、图像输入、推理、价格缺省从 models.dev 补(数据目录缓存,启动不联网),
|
|
279
|
-
`ama models refresh-catalog` 刷新;`models list` / `config show` 标出每个字段的来源。
|
|
280
|
-
- **图像输入**:`-p --image`、界面里 `@图片路径`;与 read 工具共用 MIME 检测与 5 MB 上限;模型不收图片时拒绝。
|
|
281
|
-
- **配置目录**:首次运行自动建 `~/.config/ama/` 与最小 `config.json`、`config.schema.json`;`ama init`、
|
|
282
|
-
`ama config path`、`ama config edit`。
|
|
283
|
-
- **修复**:Responses 的 `incomplete_details.reason: "length"` 按输出截断处理(中转转发 DeepSeek 时出现)。
|
|
284
|
-
|
|
285
|
-
## 0.2.1(2026-10-02)
|
|
286
|
-
|
|
287
|
-
npm 首发:`npm i -g @armadra/agent`。功能与 0.2.0 相同。
|
|
288
|
-
|
|
289
|
-
- **npm 发布**:包名 `@armadra/agent`;打 `v*` tag 时 CI 在生成 GitHub Release 之后执行 `npm publish --provenance`(仓库未配置 `NPM_TOKEN` 时跳过)。
|
|
290
|
-
- **包元数据**:仓库地址改为 `Owlbay/armadra-agent`,补 keywords、homepage、bugs、author、`sideEffects`;包里带用户文档(providers / tui / codemode / hooks / host-api / rpc / session-format)与 CHANGELOG,不再带源映射与测试辅助,解包体积约 2.9 MB。
|
|
291
|
-
- **README**:重写为完整介绍——定位、特性、安装、配置、中转站、工具预设、缓存、安全、各入口与 SDK、嵌入 Armadra。
|
|
292
|
-
|
|
293
|
-
## 0.2.0(2026-10-02)
|
|
294
|
-
|
|
295
|
-
首个可用版本。
|
|
296
|
-
|
|
297
|
-
- **模型接入**:协议与供应商数据分离,四条协议线(Anthropic Messages、OpenAI Chat Completions、OpenAI Responses、Google Generative AI),13 家内置供应商与自定义供应商、模型级协议;只用 API Key;`ama models discover` 从中转站 `/v1/models` 探测协议并写入配置,`OPENAI_BASE_URL` / `ANTHROPIC_BASE_URL` 零配置接入。
|
|
298
|
-
- **调用**:内置工具与工具预设(`default` / `minimal` / `codemode` / `coordinator`),codemode(`node --permission` 子进程 + vm 沙箱,脚本内调用照样走权限管线),`task` 子 Agent,Skill(`/skill:`),不接 MCP。
|
|
299
|
-
- **安全**:权限管线(拒绝 → 危险命令 → 模式 → 允许)、危险命令识别穿透 `sh -c` / `eval` / `xargs` / `find -exec` 与 git 全局选项、项目级配置只能收紧、项目信任、审批时的执行前预览。
|
|
300
|
-
- **Hook**:命令式 Hook(9 个事件)与进程内宿主适配器 HostApi。
|
|
301
|
-
- **缓存**:前缀逐字节稳定、各协议缓存字段与兼容开关(400 自动剥离)、前缀指纹与未命中归因、不报缓存的三态与分块粒度推断、`off / streaming / idle` 保温、压缩摘要按会话前缀续写、状态栏 / `/session` / `/cache` / `ama models cache-probe`。
|
|
302
|
-
- **会话**:JSONL 条目树、分叉与 `/tree`、两档压缩与熔断。
|
|
303
|
-
- **入口**:差分渲染终端界面(主屏模式)、`--no-tui` 行式、`-p`(text / json / stream-json)、`--mode rpc`、SDK。
|
|
304
|
-
- **发布物**:`ama.cjs` 与 `ama-sandbox.cjs` 两个单文件 bundle、`package.tgz`、`SHA256SUMS`;暂不发布 npm。
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
English · [简体中文](CHANGELOG.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
> This file is in English starting with 0.6.0. Release notes for 0.1 through 0.5.1 are in Chinese in
|
|
6
|
+
> [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md). New entries go into both files.
|
|
7
|
+
|
|
8
|
+
## 0.6.0 (2026-10-03)
|
|
9
|
+
|
|
10
|
+
Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/config` settings panel, and a bilingual
|
|
11
|
+
(Chinese / English) interface. The design and decision table are in docs/wave6-plan.md; current docs per topic are linked below.
|
|
12
|
+
|
|
13
|
+
### Breaking changes and upgrade notes
|
|
14
|
+
|
|
15
|
+
- **The interface may switch to English**: the new default `ui.language: "auto"` decides from `LC_ALL` / `LC_MESSAGES` / `LANG`;
|
|
16
|
+
`zh*` is Chinese and everything else (including undecidable) is English. The common macOS `LANG=en_US.UTF-8` makes Chinese
|
|
17
|
+
users see English after upgrading; to keep Chinese, run `ama config set ui.language zh` (or use `--lang zh`, `AMA_LANG=zh`).
|
|
18
|
+
- **README and CHANGELOG are now English**: `README.md` / `CHANGELOG.md` are English (shown on the npm page); the Chinese versions
|
|
19
|
+
are `README.zh-CN.md` / `CHANGELOG.zh-CN.md` (with all notes for 0.1–0.5.1). Chinese docs keep their paths; `docs/en/` has six
|
|
20
|
+
English translations.
|
|
21
|
+
- **Markers sent to the model are now English** (independent of the interface language; requests are byte-identical in both):
|
|
22
|
+
the tool-result truncation marker `[… N chars omitted …]`, the compaction prune placeholder `[pruned: …]`, summary
|
|
23
|
+
serialization truncation, `Tool calls:` / `Files changed:` and failure notes in external agent reports, hook block reasons,
|
|
24
|
+
allowlist denial notes, errors that land in `task` tool results (unknown external agent, host-only agent, queued interrupt) and
|
|
25
|
+
the "… N more tool calls" summary line. Only tool results produced after upgrading are affected and the cache prefix is
|
|
26
|
+
untouched; **scripts that parse tool results by the old Chinese markers need updating**.
|
|
27
|
+
- **Session files gain `custom{customType:"ama.trace"}` entries** (one per model request, plus retry waits, fallbacks,
|
|
28
|
+
compaction, auxiliary requests and external agent turn skeletons; ids, times and counts only, never in the context and never
|
|
29
|
+
changing requests). RPC clients see extra `entry_appended` events for them; scripts that walk session entries should skip them.
|
|
30
|
+
- **`/tasks` now focuses the agent bar**, and `/tasks <id>` opens the sub-agent view directly; with `ui.agentBar: "off"` (the
|
|
31
|
+
default in embedding hosts) it is still the old picker.
|
|
32
|
+
- **`ama sessions list` hides sub-agent (task) sessions by default**; `--all` lists them marked `↳ subagent`. `ama -c` and the
|
|
33
|
+
`--resume` / `/resume` pickers no longer pick them (see "Other fixes and improvements").
|
|
34
|
+
- **`ama --help` changed**: both languages now list `--lang`, `--memory` / `--no-memory`, `ama auth login | logout | status`,
|
|
35
|
+
`ama config get | set | unset | list`, `ama memory` and `ama sessions trace`; scripts that parse the help text need updating.
|
|
36
|
+
- **The `ama stats` index version was bumped**: the first run rescans all sessions automatically (incremental afterwards).
|
|
37
|
+
- **`PresetResolution.warnings` is structured**: the warnings of `resolvePreset()` changed from Chinese strings to
|
|
38
|
+
`{ kind: "codemode_only_fallback" | "codemode_unavailable" | "unknown_tool", … }`, rendered by the caller.
|
|
39
|
+
- **18 built-in providers** (new: `chatgpt`): scripts that enumerate built-in providers see one more.
|
|
40
|
+
- **One cache miss** (only when the matching feature is turned on): the first request after enabling memory (the new `memory`
|
|
41
|
+
system section and `memory` tool), and the first session after setting `ui.replyLanguage` (one more line at the end of
|
|
42
|
+
`rules`). With neither, the system prompt and tool table sent for the `default` / `minimal` presets are byte-identical to 0.5.1.
|
|
43
|
+
- Protocol version constants (`RPC_PROTOCOL_VERSION`, `HOST_API_VERSION`, session format version) are unchanged; all new events,
|
|
44
|
+
commands and fields are optional; exit codes are unchanged.
|
|
45
|
+
|
|
46
|
+
### Agent bar and sub-agent view
|
|
47
|
+
|
|
48
|
+
- **Agent bar** ([docs/en/tui.md](docs/en/tui.md) "Agent bar"): sub-agent tasks are listed above the status line (queued /
|
|
49
|
+
running · elapsed · turns · latest tool / awaiting approval / done / failed / stopped), at most 3 lines plus "N more"; finished
|
|
50
|
+
tasks stay until viewed, at most 10 minutes. Enter it with `Ctrl+B` or `↓` on an empty input (key action `app.agents.focus`;
|
|
51
|
+
with text `Ctrl+B` still moves the cursor left; use `↓` in tmux), ↑↓ to select, Enter to open. Hidden by default in embedding
|
|
52
|
+
hosts (`ui.agentBar: "off"`).
|
|
53
|
+
- **Sub-agent view**: a full-screen overlay on the main screen (rows − 1) that follows the sub-session's messages and tool calls
|
|
54
|
+
live; external agents show live output kept in memory (≤ 2000 items / 1 MB, never written to disk). The input box talks to the
|
|
55
|
+
sub-agent directly: while it runs the message is queued until the turn ends, external agents get it after the current run, and
|
|
56
|
+
finished tasks continue in the background; the sub-session records it as `origin: "direct"`. Esc goes back (no interrupt); the
|
|
57
|
+
sub-agent's approvals pop up over the view with their origin; `/tasks stop <id>` works inside the view too.
|
|
58
|
+
|
|
59
|
+
### Traces
|
|
60
|
+
|
|
61
|
+
- **Timing on disk**: every model request records an `ama.trace` entry (time to first token, decode, tools, retry waits,
|
|
62
|
+
fallbacks, compaction, auxiliary requests); sub-sessions measure time to first token and throughput too. Ids, times and counts
|
|
63
|
+
only, no content.
|
|
64
|
+
- **`/trace`** ([docs/en/tui.md](docs/en/tui.md) "Traces"): turn → request → tool → sub-call / sub-agent, each row with duration,
|
|
65
|
+
TTFT / decode / tool bars, tokens and cache hits; Enter for details; sub-agents expand into their sub-sessions; long sessions
|
|
66
|
+
load from the tail and follow while running; `/trace <task id>` for one task; line mode prints a text tree. Older sessions
|
|
67
|
+
without timing records are estimated from entry times and marked `≈`, without changing the session file.
|
|
68
|
+
- **`ama sessions trace <id|file>`** ([docs/en/sessions.md](docs/en/sessions.md) "Traces"): exports a self-contained single-file
|
|
69
|
+
HTML page (tree + waterfall, TTFT / decode / tool colors, nested sub-agents and external agents, search, jump to turn, zoom,
|
|
70
|
+
details, virtual list, light and dark; inline styles and script with a CSP that blocks all external loads; data and content
|
|
71
|
+
redacted twice and the data block escaped against injection). `--json` prints the same shape as `get_trace`, `--no-content`
|
|
72
|
+
keeps only structure and numbers, `--children` embeds child-session previews, `--open` opens a browser and `--now` pins the
|
|
73
|
+
generation time (byte-for-byte deterministic output).
|
|
74
|
+
- **RPC `get_trace`** ([docs/en/rpc.md](docs/en/rpc.md) "Traces"): tail-first paging (`turnLimit` / `before`), increments by
|
|
75
|
+
`since` (driven by `entry_appended`), `taskId` sub-traces and redacted previews with `content: "preview"`; 43 RPC commands in
|
|
76
|
+
total. SDK `session.trace()`; the pure function `buildTrace()` and the `Trace` type are exported from the package entry.
|
|
77
|
+
|
|
78
|
+
### Memory
|
|
79
|
+
|
|
80
|
+
- Cross-session memory ([docs/memory.md](docs/memory.md), Chinese), **off by default**: enable with `ama memory enable`,
|
|
81
|
+
`--memory` or `AMA_MEMORY=1`. Entries are Markdown files with frontmatter under
|
|
82
|
+
`<data dir>/memory/{user,projects/<dir>-<sha8>}/`, with an auto-rebuilt `MEMORY.md` index; the project scope requires a
|
|
83
|
+
trusted project; when disabled the request body is byte-for-byte unchanged.
|
|
84
|
+
- New `memory` tool (`view` / `create` / `str_replace` / `delete`, paths limited to `/memories/<scope>/`) with a `memory`
|
|
85
|
+
permission class: in default mode the first write asks and can be allowed for the session; content that looks like a
|
|
86
|
+
credential is refused; sub-agents are read-only; `memory(...)` rules match by command or logical path. Project level can only
|
|
87
|
+
set `memory.enabled` to `false`.
|
|
88
|
+
- New `memory` system-prompt section (after `skills`, index only): fixed at session start, writes take effect next session,
|
|
89
|
+
refreshed by `/memory reload` and after compaction; post-compaction notes list memory paths read or written.
|
|
90
|
+
- `/memory` (panel, show, edit, rm, on|off, reload) and `ama memory list|show|edit|rm|path|enable|disable`. Disabled by default
|
|
91
|
+
for embedding hosts and the SDK; enable with `memory: { enabled, dir }` (workspace scope only, no user scope).
|
|
92
|
+
|
|
93
|
+
### ChatGPT login
|
|
94
|
+
|
|
95
|
+
- `ama auth login chatgpt` drives ama with your own ChatGPT Plus / Pro plan ([docs/en/providers.md](docs/en/providers.md)
|
|
96
|
+
"ChatGPT login"). By default it uses OpenAI's official Sign in with ChatGPT (dynamic registration, id_token verified against
|
|
97
|
+
JWKS); `--flavor codex` is an opt-in fallback (borrowing the Codex CLI public client after a one-time "unofficial, personal use
|
|
98
|
+
only" confirmation). `--paste` pastes the callback URL (SSH / hosts), `--device` uses a device code (codex only);
|
|
99
|
+
`ama auth status` / `logout chatgpt`; `ama auth list` shows `oauth · <flavor> · <plan>`.
|
|
100
|
+
- New built-in provider `chatgpt` (channels `siwc` / `codex`, defaulting to the signed-in flavor); list its models with
|
|
101
|
+
`ama models discover chatgpt`.
|
|
102
|
+
- Credentials are an OAuth entry in `auth.json` (`type: "oauth"`, 0600), refreshed automatically and serialized across processes
|
|
103
|
+
with `auth.json.lock`; failures report `auth_expired`; tokens never reach logs, sessions, events or errors; RPC `keySource` may
|
|
104
|
+
be `oauth`.
|
|
105
|
+
- Plan requests record `cost = 0` with `billing: "subscription"`; `/session` lists subscription usage and quota, and `ama stats`
|
|
106
|
+
has its own "Subscription" row (not in the cost, not counted as unpriced); new event `quota_update` (RPC and host events); an
|
|
107
|
+
exhausted quota reports `quota_exceeded` without retrying.
|
|
108
|
+
|
|
109
|
+
### `/config` and `ama config`
|
|
110
|
+
|
|
111
|
+
- **`/config` settings panel** ([docs/en/tui.md](docs/en/tui.md) "The `/config` settings panel and `ama config`"): lists scalar
|
|
112
|
+
settings by group with their effective value, source (default / user / profile / project / cli / env) and when a change takes
|
|
113
|
+
effect (immediately / new session / restart); ↑↓ Enter / Space to change, `/` to search, Tab to switch the target layer
|
|
114
|
+
(project level may only tighten), overridden items marked locked. Changes are written at once (re-read before writing, one key
|
|
115
|
+
only, `.bak` kept); immediate items apply to the current session right away, with a summary on close. `/config key=value`
|
|
116
|
+
sets a single key (line mode too).
|
|
117
|
+
- **`ama config get | set | unset | list`**: `--project` writes the project level, `--json-value` passes lists / objects; unknown
|
|
118
|
+
keys, invalid values and loosening at project level exit with 3; persisting `permission.mode full-auto` asks for confirmation
|
|
119
|
+
in a terminal and needs `--yes` otherwise.
|
|
120
|
+
- **`ui.replyLanguage`**: when set, `Reply to the user in <language>.` is appended to the end of the system prompt's `rules`
|
|
121
|
+
section at session start; requests are byte-identical when unset (user level only).
|
|
122
|
+
|
|
123
|
+
### Bilingual interface
|
|
124
|
+
|
|
125
|
+
- **Interface language**: `AMA_LANG`, `--lang zh|en`, config `ui.language` (`auto` / `zh` / `en`), and `language` for profiles
|
|
126
|
+
and the SDK. The CLI (`--help`, startup screen, errors, subcommand output), the TUI and line mode (startup header, status line,
|
|
127
|
+
approval dialog and preview, Plan dialog, rewind, panels and pickers, notices and key hints), the stderr of `-p`,
|
|
128
|
+
human-readable RPC `error` and ACP error / permission option names, approval previews in `permission_request`, slash command
|
|
129
|
+
descriptions and replies, `ama doctor` (with a new "UI language" line), Markdown session export, config key descriptions and
|
|
130
|
+
validation diagnostics, and `ama init` output all follow it. Chinese output is unchanged word for word; compact status line
|
|
131
|
+
notation (`ctx`, `cache`, `$`, `↑ ↓`) is not translated; JSON fields of RPC and `-p --output-format json` do not change.
|
|
132
|
+
`config.schema.json` descriptions are written in the current language; run `ama init` again after switching.
|
|
133
|
+
- **Hosts decide by `code`** and must never parse the human-readable `error` / `message` ([docs/en/rpc.md](docs/en/rpc.md)).
|
|
134
|
+
- **Bilingual docs**: `docs/en/` adds English versions of `tui`, `permissions`, `providers`, `rpc`, `host-api` and `sessions`
|
|
135
|
+
(each header records the Chinese commit it translates); development conventions are in [docs/i18n.md](docs/i18n.md) (Chinese).
|
|
136
|
+
|
|
137
|
+
### Other fixes and improvements
|
|
138
|
+
|
|
139
|
+
- **Continue / resume skip sub-agent sessions**: `ama -c`, the `--resume` picker, the interactive `/resume` picker and ACP
|
|
140
|
+
`session/list` no longer pick or list sub-agent (task) sessions — those whose header has `parentSession` and whose first
|
|
141
|
+
entry is `custom{ama.task}` (forks still count). `-c` only reads the first two lines of each file. An explicit
|
|
142
|
+
`--resume <sub-agent session id>` still works; `prune`, `stats` and `sessions search` are unchanged.
|
|
143
|
+
- The bundle is emitted as UTF-8 (Chinese is no longer escaped as `\uXXXX`), about 40 KB smaller.
|
|
144
|
+
- RPC `permission_request.context` may carry `toolCallId` (approvals for this session's own tool calls now have `context` too).
|
|
145
|
+
- `ama memory enable / disable` write through the same path as `/config` (re-read before writing, one key only, `.bak` kept).
|
|
146
|
+
- The `/trace` detail key column fits the longest key (no misalignment in English); the `/config` footer no longer truncates at
|
|
147
|
+
80 columns in English.
|
|
148
|
+
|
|
149
|
+
### Interfaces, tests and release
|
|
150
|
+
|
|
151
|
+
- Wave 6 contracts (docs/wave6-plan.md §7, all optional and backward compatible): the `Trace` type and `buildTrace()`, SDK
|
|
152
|
+
`session.trace()` and the `memory` option, RPC `get_trace` (optional result fields `task` and `previews`), the `quota_update`
|
|
153
|
+
event, `oauth` in `KeySource`, OAuth entries in `auth.json`, and the config keys `ui.language` / `ui.replyLanguage` /
|
|
154
|
+
`ui.agentBar` / `memory.*` / `auth.chatgpt.*` (written to `config.schema.json`).
|
|
155
|
+
- `pnpm check:i18n` runs in CI in strict mode: any Chinese line in `src/**` fails; the few allowed lines (input aliases, paste
|
|
156
|
+
markers, `_reason` in price data) each carry a reason. Tests pin zh by default, plus English frame goldens and CLI samples.
|
|
157
|
+
- `release-check` understands the bilingual changelogs (both need a section for the current version) and notes (without failing)
|
|
158
|
+
when a Chinese doc changed more than 5 times since the commit its `docs/en/` translation is based on.
|
|
159
|
+
- New bundle-level e2e: `ama auth status` without entries, deterministic `ama sessions trace --html` without external links,
|
|
160
|
+
`AMA_LANG=en -p` requests byte-identical to zh, `ama config set / get / unset` round trips, and a `--memory` write visible in
|
|
161
|
+
`ama memory list`.
|
|
162
|
+
- The npm package now also ships `docs/memory.md` and `docs/en/*.md`.
|
|
163
|
+
|
|
164
|
+
### Known limitations
|
|
165
|
+
|
|
166
|
+
- **ChatGPT login is not yet verified with a real account**: both flavors are tested against a local mock only. Three items
|
|
167
|
+
await a real Plus / Pro account: the tool `namespace` shape on the official (siwc) path (`toolsInNamespace` stays off), whether
|
|
168
|
+
the codex device code needs enabling in ChatGPT security settings, and the fields of the codex `wham/usage` quota response.
|
|
169
|
+
Real-account checks run locally with `AMA_E2E_CHATGPT=1` (never in CI).
|
|
170
|
+
- The Linux sandbox (bubblewrap) is still not verified on real machines, only by unit tests and Ubuntu CI.
|
|
171
|
+
- Memory has no automatic extraction (writes happen only when the model calls the `memory` tool or the user runs a command);
|
|
172
|
+
entering the agent bar with `↓` in tmux and the light / dark HTML trace are covered by automated tests only and await a manual
|
|
173
|
+
check.
|
|
174
|
+
|
|
175
|
+
## Earlier releases
|
|
176
|
+
|
|
177
|
+
See [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md) (Chinese).
|