@armadra/agent 0.8.0 → 0.9.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 +52 -32
- package/CHANGELOG.zh-CN.md +69 -49
- package/README.md +162 -204
- package/README.zh-CN.md +150 -199
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/agent/limits.d.ts +1 -1
- package/dist/agent/limits.js +1 -1
- package/dist/agent/loop-guard.d.ts +1 -1
- package/dist/agent/loop-guard.js +1 -1
- package/dist/agent/prompt-rules.d.ts +1 -1
- package/dist/agent/prompt-rules.js +1 -1
- package/dist/agent/reminders.d.ts +1 -1
- package/dist/agent/reminders.js +1 -1
- package/dist/agent/session-cache-key.d.ts +1 -1
- package/dist/agent/session-cache-key.js +1 -1
- package/dist/agent/session-extensions.d.ts +1 -1
- package/dist/agent/session-extensions.js +1 -1
- package/dist/agent/session-images.d.ts +1 -1
- package/dist/agent/session-images.js +1 -1
- package/dist/agent/session-plan.d.ts +1 -1
- package/dist/agent/session-plan.js +1 -1
- package/dist/agent/session-rewind.d.ts +1 -1
- package/dist/agent/session-rewind.js +1 -1
- package/dist/agent/session-settings.d.ts +1 -1
- package/dist/agent/session-settings.js +1 -1
- package/dist/agent/session-subagent.d.ts +1 -1
- package/dist/agent/session-subagent.js +1 -1
- package/dist/agent/session-telemetry.d.ts +1 -1
- package/dist/agent/session-telemetry.js +1 -1
- package/dist/agent/session-trace-writer.d.ts +1 -1
- package/dist/agent/session-trace-writer.js +1 -1
- package/dist/agent/session.js +1 -1
- package/dist/agent/subagent-background.d.ts +1 -1
- package/dist/agent/subagent-background.js +1 -1
- package/dist/agent/subagent-direct.d.ts +1 -1
- package/dist/agent/subagent-direct.js +1 -1
- package/dist/agent/subagent-fork.d.ts +1 -1
- package/dist/agent/subagent-fork.js +1 -1
- package/dist/agent/subagent-registry.d.ts +1 -1
- package/dist/agent/subagent-registry.js +1 -1
- package/dist/agent/system-prompt.js +1 -1
- package/dist/agent/tool-availability.d.ts +1 -1
- package/dist/agent/tool-availability.js +1 -1
- package/dist/agent/types-w5.d.ts +2 -2
- package/dist/agent/types-w5.js +1 -1
- package/dist/agent/types-w6.d.ts +1 -1
- package/dist/agent/types-w6.js +1 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/worktree.d.ts +1 -1
- package/dist/agent/worktree.js +1 -1
- package/dist/agents/builtin.d.ts +1 -1
- package/dist/agents/builtin.js +1 -1
- package/dist/agents/catalog.d.ts +1 -1
- package/dist/agents/catalog.js +1 -1
- package/dist/agents/discover.d.ts +1 -1
- package/dist/agents/discover.js +1 -1
- package/dist/agents/external.d.ts +1 -1
- package/dist/agents/external.js +1 -1
- package/dist/agents/parse.d.ts +1 -1
- package/dist/agents/parse.js +1 -1
- package/dist/agents/result.d.ts +1 -1
- package/dist/agents/result.js +2 -2
- package/dist/agents/task-record.d.ts +3 -3
- package/dist/agents/task-record.js +2 -2
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/types.js +1 -1
- package/dist/ai/apis/anthropic-compat.d.ts +2 -2
- package/dist/ai/apis/anthropic-compat.js +2 -2
- package/dist/ai/apis/cache-params.d.ts +1 -1
- package/dist/ai/apis/cache-params.js +1 -1
- package/dist/ai/apis/chatgpt-backend.d.ts +1 -1
- package/dist/ai/apis/chatgpt-backend.js +1 -1
- package/dist/ai/apis/chatgpt-rate-limits.d.ts +1 -1
- package/dist/ai/apis/chatgpt-rate-limits.js +1 -1
- package/dist/ai/apis/max-tokens.d.ts +1 -1
- package/dist/ai/apis/max-tokens.js +1 -1
- package/dist/ai/apis/shared.d.ts +1 -1
- package/dist/ai/apis/shared.js +1 -1
- package/dist/ai/image-intern.d.ts +2 -2
- package/dist/ai/image-intern.js +1 -1
- package/dist/ai/image-limits.d.ts +1 -1
- package/dist/ai/image-limits.js +1 -1
- package/dist/ai/json-body.d.ts +1 -1
- package/dist/ai/json-body.js +1 -1
- package/dist/ai/providers/builtin.d.ts +2 -2
- package/dist/ai/providers/builtin.js +4 -4
- package/dist/ai/providers/catalog-data.js +2 -2
- package/dist/ai/providers/catalog.d.ts +2 -2
- package/dist/ai/providers/catalog.js +1 -1
- package/dist/ai/providers/channels.d.ts +1 -1
- package/dist/ai/providers/channels.js +1 -1
- package/dist/ai/providers/enrich.d.ts +1 -1
- package/dist/ai/providers/enrich.js +1 -1
- package/dist/ai/providers/models-dev-cache.d.ts +1 -1
- package/dist/ai/providers/models-dev-cache.js +1 -1
- package/dist/ai/providers/models-dev-data.d.ts +1 -1
- package/dist/ai/providers/models-dev-data.js +12 -12
- package/dist/ai/providers/models-dev-snapshot.d.ts +1 -1
- package/dist/ai/providers/models-dev-snapshot.js +1 -1
- package/dist/ai/providers/models-dev.d.ts +4 -4
- package/dist/ai/providers/models-dev.js +3 -3
- package/dist/ai/types.d.ts +2 -2
- package/dist/ai/types.js +1 -1
- package/dist/auth/chatgpt/cli.d.ts +1 -1
- package/dist/auth/chatgpt/cli.js +1 -1
- package/dist/auth/chatgpt/host-id.d.ts +1 -1
- package/dist/auth/chatgpt/host-id.js +1 -1
- package/dist/auth/chatgpt/login.d.ts +1 -1
- package/dist/auth/chatgpt/login.js +1 -1
- package/dist/auth/chatgpt/presets.d.ts +1 -1
- package/dist/auth/chatgpt/presets.js +1 -1
- package/dist/auth/oauth/callback-server.d.ts +1 -1
- package/dist/auth/oauth/callback-server.js +1 -1
- package/dist/auth/oauth/flows.d.ts +1 -1
- package/dist/auth/oauth/flows.js +1 -1
- package/dist/auth/oauth/oidc.d.ts +1 -1
- package/dist/auth/oauth/oidc.js +1 -1
- package/dist/auth/oauth/pkce.d.ts +1 -1
- package/dist/auth/oauth/pkce.js +1 -1
- package/dist/auth/oauth/refresh.d.ts +1 -1
- package/dist/auth/oauth/refresh.js +1 -1
- package/dist/auth/oauth/token-client.d.ts +1 -1
- package/dist/auth/oauth/token-client.js +1 -1
- package/dist/auth/oauth/token-store.d.ts +1 -1
- package/dist/auth/oauth/token-store.js +1 -1
- package/dist/auth/testing/fake-oauth.d.ts +1 -1
- package/dist/auth/testing/fake-oauth.js +1 -1
- package/dist/bundle/ama.cjs +41 -38
- package/dist/checkpoints/backend.js +6 -1
- package/dist/checkpoints/blobs.d.ts +1 -1
- package/dist/checkpoints/blobs.js +1 -1
- package/dist/checkpoints/gc.d.ts +1 -1
- package/dist/checkpoints/gc.js +1 -1
- package/dist/checkpoints/git-head.d.ts +1 -1
- package/dist/checkpoints/git-head.js +1 -1
- package/dist/checkpoints/index.d.ts +1 -1
- package/dist/checkpoints/index.js +1 -1
- package/dist/checkpoints/replay.d.ts +1 -1
- package/dist/checkpoints/replay.js +1 -1
- package/dist/checkpoints/restore.d.ts +1 -1
- package/dist/checkpoints/restore.js +1 -1
- package/dist/checkpoints/settings.d.ts +1 -1
- package/dist/checkpoints/settings.js +1 -1
- package/dist/checkpoints/shadow-git.d.ts +1 -1
- package/dist/checkpoints/shadow-git.js +1 -1
- package/dist/checkpoints/shadow-restore.d.ts +1 -1
- package/dist/checkpoints/shadow-restore.js +1 -1
- package/dist/checkpoints/tracker.d.ts +1 -1
- package/dist/checkpoints/tracker.js +1 -1
- package/dist/checkpoints/types.d.ts +1 -1
- package/dist/checkpoints/types.js +1 -1
- package/dist/cli/args.d.ts +2 -2
- package/dist/cli/args.js +1 -1
- package/dist/cli/bootstrap.js +1 -1
- package/dist/cli/choice-prompt.d.ts +1 -1
- package/dist/cli/choice-prompt.js +1 -1
- package/dist/cli/codemode-notice.d.ts +1 -1
- package/dist/cli/codemode-notice.js +1 -1
- package/dist/cli/compose-agents.d.ts +1 -1
- package/dist/cli/compose-agents.js +1 -1
- package/dist/cli/compose-extensions.d.ts +1 -1
- package/dist/cli/compose-extensions.js +1 -1
- package/dist/cli/compose-memory.d.ts +1 -1
- package/dist/cli/compose-memory.js +1 -1
- package/dist/cli/compose-providers.d.ts +1 -1
- package/dist/cli/compose-providers.js +1 -1
- package/dist/cli/compose-request.d.ts +1 -1
- package/dist/cli/compose-request.js +1 -1
- package/dist/cli/from-prompt.d.ts +1 -1
- package/dist/cli/from-prompt.js +1 -1
- package/dist/cli/main.d.ts +1 -1
- package/dist/cli/main.js +1 -1
- package/dist/cli/subcommands/auth.d.ts +1 -1
- package/dist/cli/subcommands/auth.js +1 -1
- package/dist/cli/subcommands/config-set.d.ts +1 -1
- package/dist/cli/subcommands/config-set.js +1 -1
- package/dist/cli/subcommands/doctor.js +1 -1
- package/dist/cli/subcommands/init.d.ts +1 -1
- package/dist/cli/subcommands/init.js +1 -1
- package/dist/cli/subcommands/memory.d.ts +1 -1
- package/dist/cli/subcommands/memory.js +1 -1
- package/dist/cli/subcommands/models.js +1 -1
- package/dist/cli/subcommands/providers-list.d.ts +1 -1
- package/dist/cli/subcommands/providers-list.js +1 -1
- package/dist/cli/subcommands/providers-plan.d.ts +1 -1
- package/dist/cli/subcommands/providers-plan.js +1 -1
- package/dist/cli/subcommands/providers.d.ts +1 -1
- package/dist/cli/subcommands/providers.js +1 -1
- package/dist/cli/subcommands/sessions-export.d.ts +1 -1
- package/dist/cli/subcommands/sessions-export.js +1 -1
- package/dist/cli/subcommands/sessions-trace.d.ts +1 -1
- package/dist/cli/subcommands/sessions-trace.js +1 -1
- package/dist/cli/subcommands/sessions.d.ts +1 -1
- package/dist/cli/subcommands/sessions.js +1 -1
- package/dist/cli/subcommands/stats.d.ts +1 -1
- package/dist/cli/subcommands/stats.js +1 -1
- package/dist/codemode/capability.d.ts +1 -1
- package/dist/codemode/capability.js +1 -1
- package/dist/codemode/host-side.d.ts +2 -2
- package/dist/codemode/host-side.js +2 -2
- package/dist/compaction/image-budget.d.ts +1 -1
- package/dist/compaction/image-budget.js +1 -1
- package/dist/config/edit.d.ts +1 -1
- package/dist/config/edit.js +1 -1
- package/dist/config/init.d.ts +1 -1
- package/dist/config/init.js +1 -1
- package/dist/config/json-schema.d.ts +2 -2
- package/dist/config/json-schema.js +2 -2
- package/dist/config/schema-w5.d.ts +1 -1
- package/dist/config/schema-w5.js +1 -1
- package/dist/config/schema-w6.d.ts +1 -1
- package/dist/config/schema-w6.js +1 -1
- package/dist/config/settings-registry.d.ts +1 -1
- package/dist/config/settings-registry.js +1 -1
- package/dist/config/types-w5.d.ts +2 -2
- package/dist/config/types-w5.js +2 -2
- package/dist/config/types-w6.d.ts +5 -5
- package/dist/config/types-w6.js +1 -1
- package/dist/config/types.d.ts +6 -6
- package/dist/config/types.js +1 -1
- package/dist/drivers/acp/client.d.ts +1 -1
- package/dist/drivers/acp/client.js +1 -1
- package/dist/drivers/acp/driver.d.ts +1 -1
- package/dist/drivers/acp/driver.js +1 -1
- package/dist/drivers/acp/testing/fake-agent.d.ts +1 -1
- package/dist/drivers/acp/testing/fake-agent.js +1 -1
- package/dist/drivers/acp/types.d.ts +1 -1
- package/dist/drivers/acp/types.js +1 -1
- package/dist/drivers/agents.d.ts +1 -1
- package/dist/drivers/agents.js +1 -1
- package/dist/drivers/base.d.ts +1 -1
- package/dist/drivers/base.js +1 -1
- package/dist/drivers/catalog.d.ts +1 -1
- package/dist/drivers/catalog.js +1 -1
- package/dist/drivers/env.d.ts +1 -1
- package/dist/drivers/env.js +1 -1
- package/dist/drivers/host-runners.d.ts +1 -1
- package/dist/drivers/host-runners.js +1 -1
- package/dist/drivers/jsonrpc.d.ts +1 -1
- package/dist/drivers/jsonrpc.js +1 -1
- package/dist/drivers/native/claude-normalize.d.ts +1 -1
- package/dist/drivers/native/claude-normalize.js +1 -1
- package/dist/drivers/native/claude-stream.d.ts +1 -1
- package/dist/drivers/native/claude-stream.js +1 -1
- package/dist/drivers/native/codex-app-server.d.ts +1 -1
- package/dist/drivers/native/codex-app-server.js +1 -1
- package/dist/drivers/native/codex-normalize.d.ts +1 -1
- package/dist/drivers/native/codex-normalize.js +1 -1
- package/dist/drivers/native/oneshot.d.ts +1 -1
- package/dist/drivers/native/oneshot.js +1 -1
- package/dist/drivers/permissions.d.ts +1 -1
- package/dist/drivers/permissions.js +1 -1
- package/dist/drivers/pids.d.ts +1 -1
- package/dist/drivers/pids.js +1 -1
- package/dist/drivers/pool.d.ts +1 -1
- package/dist/drivers/pool.js +1 -1
- package/dist/drivers/probe.d.ts +1 -1
- package/dist/drivers/probe.js +1 -1
- package/dist/drivers/process.d.ts +1 -1
- package/dist/drivers/process.js +1 -1
- package/dist/drivers/runner.d.ts +1 -1
- package/dist/drivers/runner.js +1 -1
- package/dist/drivers/store.d.ts +1 -1
- package/dist/drivers/store.js +1 -1
- package/dist/drivers/types.d.ts +1 -1
- package/dist/drivers/types.js +1 -1
- package/dist/git/info.d.ts +1 -1
- package/dist/git/info.js +1 -1
- package/dist/host/api-impl.d.ts +1 -1
- package/dist/host/api-impl.js +1 -1
- package/dist/host/types.d.ts +2 -2
- package/dist/i18n/catalog.d.ts +2 -2
- package/dist/i18n/catalog.js +2 -2
- package/dist/i18n/format.d.ts +1 -1
- package/dist/i18n/format.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/messages/acp.d.ts +1 -1
- package/dist/i18n/messages/acp.js +1 -1
- package/dist/i18n/messages/agents.d.ts +1 -1
- package/dist/i18n/messages/agents.js +1 -1
- package/dist/i18n/messages/approval.d.ts +1 -1
- package/dist/i18n/messages/approval.js +1 -1
- package/dist/i18n/messages/auth.d.ts +1 -1
- package/dist/i18n/messages/auth.js +1 -1
- package/dist/i18n/messages/cli.d.ts +1 -1
- package/dist/i18n/messages/cli.js +1 -1
- package/dist/i18n/messages/config-keys.js +12 -12
- package/dist/i18n/messages/config.d.ts +1 -1
- package/dist/i18n/messages/config.js +3 -3
- package/dist/i18n/messages/drivers.d.ts +1 -1
- package/dist/i18n/messages/drivers.js +1 -1
- package/dist/i18n/messages/errors.d.ts +1 -1
- package/dist/i18n/messages/errors.js +1 -1
- package/dist/i18n/messages/interactive-line.d.ts +1 -1
- package/dist/i18n/messages/interactive-line.js +1 -1
- package/dist/i18n/messages/interactive-startup.d.ts +1 -1
- package/dist/i18n/messages/interactive-startup.js +1 -1
- package/dist/i18n/messages/interactive-view.d.ts +1 -1
- package/dist/i18n/messages/interactive-view.js +1 -1
- package/dist/i18n/messages/interactive.d.ts +1 -1
- package/dist/i18n/messages/interactive.js +1 -1
- package/dist/i18n/messages/memory.d.ts +1 -1
- package/dist/i18n/messages/memory.js +1 -1
- package/dist/i18n/messages/panels.d.ts +1 -1
- package/dist/i18n/messages/panels.js +1 -1
- package/dist/i18n/messages/permissions.d.ts +1 -1
- package/dist/i18n/messages/permissions.js +1 -1
- package/dist/i18n/messages/plan.d.ts +1 -1
- package/dist/i18n/messages/plan.js +1 -1
- package/dist/i18n/messages/print.d.ts +2 -2
- package/dist/i18n/messages/print.js +2 -2
- package/dist/i18n/messages/report-context.d.ts +1 -1
- package/dist/i18n/messages/report-context.js +1 -1
- package/dist/i18n/messages/report.d.ts +1 -1
- package/dist/i18n/messages/report.js +1 -1
- package/dist/i18n/messages/rewind.d.ts +1 -1
- package/dist/i18n/messages/rewind.js +1 -1
- package/dist/i18n/messages/session.d.ts +1 -1
- package/dist/i18n/messages/session.js +1 -1
- package/dist/i18n/messages/settings.d.ts +1 -1
- package/dist/i18n/messages/settings.js +1 -1
- package/dist/i18n/messages/subcommands.d.ts +1 -1
- package/dist/i18n/messages/subcommands.js +1 -1
- package/dist/i18n/messages/trace.d.ts +1 -1
- package/dist/i18n/messages/trace.js +1 -1
- package/dist/i18n/types.d.ts +1 -1
- package/dist/i18n/types.js +1 -1
- package/dist/memory/frontmatter.d.ts +1 -1
- package/dist/memory/frontmatter.js +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/memory/lock.d.ts +1 -1
- package/dist/memory/lock.js +1 -1
- package/dist/memory/paths.d.ts +1 -1
- package/dist/memory/paths.js +1 -1
- package/dist/memory/runtime.d.ts +1 -1
- package/dist/memory/runtime.js +1 -1
- package/dist/memory/secrets.d.ts +1 -1
- package/dist/memory/secrets.js +1 -1
- package/dist/memory/section.d.ts +1 -1
- package/dist/memory/section.js +1 -1
- package/dist/memory/store.d.ts +1 -1
- package/dist/memory/store.js +1 -1
- package/dist/memory/tool.d.ts +1 -1
- package/dist/memory/tool.js +1 -1
- package/dist/modes/acp/acp-auth-gate.d.ts +1 -1
- package/dist/modes/acp/acp-auth-gate.js +1 -1
- package/dist/modes/acp/acp-config.d.ts +1 -1
- package/dist/modes/acp/acp-config.js +1 -1
- package/dist/modes/acp/acp-connection.d.ts +1 -1
- package/dist/modes/acp/acp-connection.js +1 -1
- package/dist/modes/acp/acp-events.d.ts +1 -1
- package/dist/modes/acp/acp-events.js +1 -1
- package/dist/modes/acp/acp-mode.d.ts +1 -1
- package/dist/modes/acp/acp-mode.js +1 -1
- package/dist/modes/acp/acp-server.d.ts +2 -2
- package/dist/modes/acp/acp-server.js +2 -2
- package/dist/modes/acp/acp-sessions.d.ts +2 -2
- package/dist/modes/acp/acp-sessions.js +2 -2
- package/dist/modes/acp/acp-tool-text.d.ts +1 -1
- package/dist/modes/acp/acp-tool-text.js +1 -1
- package/dist/modes/commands-core.js +1 -1
- package/dist/modes/image-input.d.ts +1 -1
- package/dist/modes/image-input.js +1 -1
- package/dist/modes/interactive/agent-bar.d.ts +1 -1
- package/dist/modes/interactive/agent-bar.js +1 -1
- package/dist/modes/interactive/agent-transcript.d.ts +1 -1
- package/dist/modes/interactive/agent-transcript.js +1 -1
- package/dist/modes/interactive/agent-view.d.ts +1 -1
- package/dist/modes/interactive/agent-view.js +1 -1
- package/dist/modes/interactive/approval-dock.d.ts +1 -1
- package/dist/modes/interactive/approval-dock.js +1 -1
- package/dist/modes/interactive/config-panel.d.ts +1 -1
- package/dist/modes/interactive/config-panel.js +1 -1
- package/dist/modes/interactive/config-ui.d.ts +1 -1
- package/dist/modes/interactive/config-ui.js +1 -1
- package/dist/modes/interactive/memory-panel.d.ts +1 -1
- package/dist/modes/interactive/memory-panel.js +1 -1
- package/dist/modes/interactive/plan-command.d.ts +1 -1
- package/dist/modes/interactive/plan-command.js +1 -1
- package/dist/modes/interactive/plan-dialog.d.ts +1 -1
- package/dist/modes/interactive/plan-dialog.js +1 -1
- package/dist/modes/interactive/plan-flow.d.ts +1 -1
- package/dist/modes/interactive/plan-flow.js +1 -1
- package/dist/modes/interactive/subagent-view.d.ts +1 -1
- package/dist/modes/interactive/subagent-view.js +1 -1
- package/dist/modes/interactive/task-background.d.ts +1 -1
- package/dist/modes/interactive/task-background.js +1 -1
- package/dist/modes/interactive/trace-view.d.ts +1 -1
- package/dist/modes/interactive/trace-view.js +1 -1
- package/dist/modes/print/json-event.d.ts +1 -1
- package/dist/modes/print/json-event.js +2 -2
- package/dist/modes/print/print-mode.d.ts +1 -1
- package/dist/modes/print/print-mode.js +1 -1
- package/dist/modes/print/search-hint.d.ts +1 -1
- package/dist/modes/print/search-hint.js +1 -1
- package/dist/modes/rpc/commands.js +2 -2
- package/dist/permissions/auto-safe.d.ts +1 -1
- package/dist/permissions/auto-safe.js +1 -1
- package/dist/permissions/bypass.d.ts +1 -1
- package/dist/permissions/bypass.js +1 -1
- package/dist/permissions/classifier.d.ts +1 -1
- package/dist/permissions/classifier.js +1 -1
- package/dist/permissions/memory-class.d.ts +1 -1
- package/dist/permissions/memory-class.js +1 -1
- package/dist/permissions/pipeline.d.ts +2 -2
- package/dist/permissions/pipeline.js +2 -2
- package/dist/permissions/protected.d.ts +1 -1
- package/dist/permissions/protected.js +1 -1
- package/dist/permissions/readonly-bash.d.ts +1 -1
- package/dist/permissions/readonly-bash.js +1 -1
- package/dist/permissions/types.d.ts +2 -2
- package/dist/plan/done-markers.d.ts +1 -1
- package/dist/plan/done-markers.js +1 -1
- package/dist/plan/extract.d.ts +1 -1
- package/dist/plan/extract.js +1 -1
- package/dist/plan/prompts.d.ts +1 -1
- package/dist/plan/prompts.js +1 -1
- package/dist/plan/store.d.ts +1 -1
- package/dist/plan/store.js +1 -1
- package/dist/rpc.d.ts +3 -3
- package/dist/rpc.js +3 -3
- package/dist/sandbox/bash.d.ts +1 -1
- package/dist/sandbox/bash.js +1 -1
- package/dist/sandbox/detect.d.ts +1 -1
- package/dist/sandbox/detect.js +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/profile.d.ts +1 -1
- package/dist/sandbox/profile.js +1 -1
- package/dist/sandbox/wrap.d.ts +1 -1
- package/dist/sandbox/wrap.js +1 -1
- package/dist/sdk.d.ts +3 -3
- package/dist/sdk.js +2 -2
- package/dist/session/line-reader.d.ts +1 -1
- package/dist/session/line-reader.js +1 -1
- package/dist/session/list.d.ts +1 -1
- package/dist/session/list.js +1 -1
- package/dist/session/migrate.d.ts +1 -1
- package/dist/session/migrate.js +1 -1
- package/dist/session/store.d.ts +1 -1
- package/dist/session/store.js +1 -1
- package/dist/skills/builtin.js +2 -2
- package/dist/tools/background-jobs.d.ts +1 -1
- package/dist/tools/background-jobs.js +1 -1
- package/dist/tools/clipboard-image.d.ts +1 -1
- package/dist/tools/clipboard-image.js +1 -1
- package/dist/tools/edit.d.ts +1 -1
- package/dist/tools/edit.js +1 -1
- package/dist/tools/grep.d.ts +1 -1
- package/dist/tools/grep.js +1 -1
- package/dist/tools/image-resize.d.ts +1 -1
- package/dist/tools/image-resize.js +1 -1
- package/dist/tools/read-lines.d.ts +1 -1
- package/dist/tools/read-lines.js +1 -1
- package/dist/tools/read.d.ts +1 -1
- package/dist/tools/read.js +1 -1
- package/dist/tools/task-ctl.d.ts +1 -1
- package/dist/tools/task-ctl.js +1 -1
- package/dist/tools/task.d.ts +2 -2
- package/dist/tools/task.js +2 -2
- package/dist/tools/types.d.ts +3 -3
- package/dist/tools/types.js +1 -1
- package/dist/trace/build.d.ts +1 -1
- package/dist/trace/build.js +1 -1
- package/dist/trace/detail.d.ts +1 -1
- package/dist/trace/detail.js +1 -1
- package/dist/trace/flatten.d.ts +1 -1
- package/dist/trace/flatten.js +1 -1
- package/dist/trace/format.d.ts +1 -1
- package/dist/trace/format.js +1 -1
- package/dist/trace/html-template.d.ts +1 -1
- package/dist/trace/html-template.js +1 -1
- package/dist/trace/html.d.ts +1 -1
- package/dist/trace/html.js +1 -1
- package/dist/trace/query-session.d.ts +1 -1
- package/dist/trace/query-session.js +1 -1
- package/dist/trace/query.d.ts +1 -1
- package/dist/trace/query.js +1 -1
- package/dist/trace/types.d.ts +1 -1
- package/dist/trace/types.js +1 -1
- package/dist/tui/components/settings-list.d.ts +1 -1
- package/dist/tui/components/settings-list.js +1 -1
- package/docs/README.md +85 -0
- package/docs/assets/ama-wordmark-dark.svg +37 -0
- package/docs/assets/ama-wordmark-light.svg +37 -0
- package/docs/en/README.md +39 -0
- package/docs/en/{permissions.md → guides/permissions.md} +14 -14
- package/docs/en/{providers.md → guides/providers.md} +6 -6
- package/docs/en/{sessions.md → guides/sessions.md} +6 -6
- package/docs/en/{tui.md → guides/tui.md} +15 -15
- package/docs/en/{acp.md → reference/acp.md} +6 -6
- package/docs/en/{host-api.md → reference/host-api.md} +7 -7
- package/docs/en/{rpc.md → reference/rpc.md} +13 -13
- package/docs/{agents.md → guides/agents.md} +13 -13
- package/docs/{codemode.md → guides/codemode.md} +3 -3
- package/docs/{hooks.md → guides/hooks.md} +2 -2
- package/docs/guides/i18n.md +93 -0
- package/docs/{memory.md → guides/memory.md} +1 -1
- package/docs/{permissions.md → guides/permissions.md} +2 -2
- package/docs/{plan.md → guides/plan.md} +4 -4
- package/docs/{providers.md → guides/providers.md} +4 -4
- package/docs/{sessions.md → guides/sessions.md} +5 -5
- package/docs/{tui.md → guides/tui.md} +8 -8
- package/docs/{acp.md → reference/acp.md} +5 -5
- package/docs/{host-api.md → reference/host-api.md} +4 -4
- package/docs/{rpc.md → reference/rpc.md} +11 -11
- package/docs/{session-format.md → reference/session-format.md} +7 -7
- package/package.json +12 -23
- package/docs/rewind-plan.md +0 -181
- package/docs/tui-design.md +0 -764
- /package/docs/{sandbox.md → guides/sandbox.md} +0 -0
package/README.md
CHANGED
|
@@ -1,154 +1,160 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/ama-wordmark-dark.svg">
|
|
5
|
+
<img src="docs/assets/ama-wordmark-light.svg" alt="ama" width="216">
|
|
6
|
+
</picture>
|
|
7
7
|
|
|
8
8
|
English · [简体中文](README.zh-CN.md)
|
|
9
9
|
|
|
10
|
-
A coding agent for your terminal that
|
|
10
|
+
**A coding agent for your terminal that scripts, editors and hosts can call, and that can hand work to other coding agents.**
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
██ ██ ██ ██ ██ ██ Accept edits · preset default
|
|
17
|
-
▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ AGENTS.md · 2 Skill
|
|
18
|
-
/help commands · Shift+Tab mode · Ctrl+O expand tool output
|
|
19
|
-
```
|
|
12
|
+
[](https://github.com/AMA-Link/armadra-agent/actions/workflows/ci.yml)
|
|
13
|
+
[](https://www.npmjs.com/package/@armadra/agent)
|
|
14
|
+
[](LICENSE)
|
|
15
|
+
[](https://nodejs.org)
|
|
20
16
|
|
|
21
|
-
- [
|
|
22
|
-
- [Quick start](#quick-start)
|
|
23
|
-
- [Capabilities](#capabilities)
|
|
24
|
-
- [Embedding and integration](#embedding-and-integration)
|
|
25
|
-
- [Command reference](#command-reference)
|
|
26
|
-
- [Exit codes](#exit-codes)
|
|
27
|
-
- [Documentation](#documentation)
|
|
28
|
-
- [Known limitations](#known-limitations)
|
|
29
|
-
- [Development](#development)
|
|
30
|
-
- [License and acknowledgements](#license-and-acknowledgements)
|
|
17
|
+
[Install](#install) · [Connect a model](#connect-a-model) · [Usage](#usage) · [Configuration and permissions](#configuration-and-permissions) · [Docs](docs/README.md) · [Changelog](CHANGELOG.md)
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
</div>
|
|
33
20
|
|
|
34
|
-
|
|
21
|
+
---
|
|
35
22
|
|
|
36
|
-
|
|
23
|
+
ama reads, edits and runs code in your project from a terminal UI, and answers one-shot questions with `ama -p`. It can
|
|
24
|
+
delegate to its own sub-agents or drive external coding agents (Claude Code, Codex, GitHub Copilot CLI, OpenCode, Pi and
|
|
25
|
+
any ACP agent) with the login you already have in each CLI. Use it on its own, from your editor over ACP, embedded through
|
|
26
|
+
RPC or the SDK, or as the coordinator on the [Armadra](https://github.com/AMA-Link/Armadra) canvas.
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
- **Built to be called**: `-p`, `--mode rpc`, `--mode acp`, the SDK and host adapters are first-class entry points; exit codes and JSON shapes are contracts.
|
|
40
|
-
- **Cache first**: the request prefix stays byte-stable, cache breakpoints follow each provider, and the UI shows whether the cache works and why it missed. The system prompt plus tool table of the main presets stays within token budgets enforced by tests.
|
|
41
|
-
- **Approvals are never answered for you**: neither ama nor the model answers a permission prompt on a person's behalf; when nobody can approve, the answer is "deny".
|
|
42
|
-
- **Skills, not MCP**: extend ama with `SKILL.md` directories, prompt templates, command hooks and host adapters.
|
|
43
|
-
- **Little configuration**: one environment variable is enough to start; everything else has a default.
|
|
28
|
+
## Why ama
|
|
44
29
|
|
|
45
|
-
|
|
30
|
+
- **Zero runtime dependencies**: TypeScript on Node ≥ 22 with nothing in `dependencies`; also shipped as a single
|
|
31
|
+
`ama.cjs` file. HTTP, SSE, YAML frontmatter and JSON Schema handling are written in-house.
|
|
32
|
+
- **Cache first**: the system prompt and tool table stay byte-stable within a session, changes are only appended, cache
|
|
33
|
+
breakpoints follow each provider, and the status bar shows the hit rate and why a request missed. Token budgets for
|
|
34
|
+
the main tool presets are enforced by tests.
|
|
35
|
+
- **Approvals go to a person**: neither ama nor the model answers a permission prompt, including those raised by
|
|
36
|
+
sub-agents and external agents. When nobody can approve (`-p`, unattended RPC), the answer is "deny".
|
|
37
|
+
- **Built to be called**: `-p`, `--mode rpc`, `--mode acp`, the SDK and host adapters are first-class entry points;
|
|
38
|
+
exit codes and JSON shapes are contracts, versioned and checked before every release.
|
|
39
|
+
- **Skills, not MCP**: extend ama with `SKILL.md` directories, prompt templates, command hooks and host adapters.
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
## Install
|
|
48
42
|
|
|
49
43
|
```sh
|
|
50
44
|
npm i -g @armadra/agent
|
|
51
45
|
ama --version
|
|
52
46
|
```
|
|
53
47
|
|
|
54
|
-
[
|
|
48
|
+
Each [release](https://github.com/AMA-Link/armadra-agent/releases) also ships a single-file build (`ama.cjs` plus the
|
|
49
|
+
codemode sandbox entry `ama-sandbox.cjs`, kept in the same directory) and `package.tgz` for offline installs.
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
## Connect a model
|
|
57
52
|
|
|
58
53
|
Pick one:
|
|
59
54
|
|
|
60
55
|
```sh
|
|
61
|
-
export ANTHROPIC_API_KEY=sk-...
|
|
62
|
-
ama auth set deepseek
|
|
63
|
-
ama
|
|
64
|
-
ama
|
|
65
|
-
ama --model ollama/<model>
|
|
56
|
+
export ANTHROPIC_API_KEY=sk-... # or OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY, …
|
|
57
|
+
ama auth set deepseek # store a key in ~/.config/ama/auth.json (0600), read from stdin
|
|
58
|
+
ama auth login chatgpt # use your own ChatGPT Plus / Pro plan instead of an API key
|
|
59
|
+
ama providers add packy --base-url https://relay.example/v1 --probe # a relay: list models, probe protocols, write config
|
|
60
|
+
ama --model ollama/<model> # local Ollama / LM Studio need no key
|
|
66
61
|
```
|
|
67
62
|
|
|
68
|
-
|
|
63
|
+
- **Built-in providers (18)**: Anthropic, OpenAI, Google, DeepSeek, Moonshot (Kimi), Zhipu, Qwen (DashScope), OpenRouter,
|
|
64
|
+
Groq, xAI, Mistral, MiniMax, StepFun, Volcengine Ark, Tencent, ChatGPT (plan login), Ollama and LM Studio, over four
|
|
65
|
+
protocols: Anthropic Messages, OpenAI Responses, OpenAI Chat Completions and Google Generative AI.
|
|
66
|
+
- **Channels**: one provider can expose several endpoints; `provider/model@channel` picks one, e.g.
|
|
67
|
+
`deepseek/deepseek-v4-pro@messages`.
|
|
68
|
+
- **Model metadata** (context window, output limit, image input, reasoning, prices) comes from a bundled models.dev
|
|
69
|
+
snapshot, so startup needs no network; `ama models refresh` updates it on demand.
|
|
70
|
+
- With a key present, ama picks the first provider that has one and its default model; `ama config show` says which
|
|
71
|
+
and why.
|
|
72
|
+
|
|
73
|
+
Details: [providers and models](docs/en/guides/providers.md), [ChatGPT login](docs/en/guides/providers.md#chatgpt-login),
|
|
74
|
+
[connecting relays](docs/en/guides/providers.md#connecting-relays).
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
69
77
|
|
|
70
|
-
###
|
|
78
|
+
### Terminal UI
|
|
71
79
|
|
|
72
80
|
```sh
|
|
73
81
|
cd your-project
|
|
74
|
-
ama
|
|
75
|
-
ama -p "explain src/index.ts" # one-shot: prints the answer and exits
|
|
76
|
-
git diff | ama -p "review this change" # piped input is appended to the prompt
|
|
77
|
-
ama -p "list the TODOs" --output-format json
|
|
82
|
+
ama
|
|
78
83
|
```
|
|
79
84
|
|
|
80
|
-
`-p` has nobody to approve, so writes and commands are denied unless you allow them (`--permission-mode auto-edit`, `auto`, or `--allow "bash(npm test*)"`).
|
|
81
|
-
|
|
82
|
-
### Keys to know
|
|
83
|
-
|
|
84
85
|
| Key / command | Effect |
|
|
85
86
|
| ---------------------- | --------------------------------------------------------------------------- |
|
|
86
87
|
| Shift+Tab (Tab, empty) | Cycle permission modes; entering Bypass asks to confirm |
|
|
87
|
-
| `/model` (Ctrl+L) | Pick a model
|
|
88
|
+
| `/model` (Ctrl+L) | Pick a model |
|
|
88
89
|
| ↓ on an empty input | Focus the agent bar; Enter opens a live view of a sub-agent |
|
|
89
90
|
| Ctrl+B | Move a blocking foreground sub-agent to the background (in tmux: `C-b C-b`) |
|
|
90
91
|
| Esc / Esc Esc | Interrupt the run / (idle, empty input) open the rewind list |
|
|
91
|
-
|
|
|
92
|
-
|
|
|
92
|
+
| `/plan <goal>` | Research read-only, then approve a plan before anything is changed |
|
|
93
|
+
| `/trace` | Tree of turns, requests, tools and sub-agents with timing |
|
|
93
94
|
| `/config` | Settings panel |
|
|
94
|
-
| Ctrl+C twice | Quit (the resume command stays in the scrollback) |
|
|
95
|
-
|
|
96
|
-
`/help` lists every command. Keys can be remapped in `~/.config/ama/keybindings.json`; see [docs/en/tui.md](docs/en/tui.md#keys).
|
|
97
|
-
|
|
98
|
-
## Capabilities
|
|
99
|
-
|
|
100
|
-
### Models and providers
|
|
101
|
-
|
|
102
|
-
Four protocol lines (Anthropic Messages, OpenAI Responses, OpenAI Chat Completions, Google Generative AI) and 18 built-in providers: Anthropic, OpenAI, Google, DeepSeek, Moonshot (Kimi), Zhipu, Qwen (DashScope), OpenRouter, Groq, xAI, Mistral, MiniMax, StepFun, Volcengine Ark, Tencent, ChatGPT (plan login), Ollama and LM Studio. One provider can mount several channels; Messages / Responses are preferred and Chat is the fallback, and `provider/model@channel` picks one explicitly. Relays connect with `ama providers add`, which lists the models, probes the channels and writes the config. Context window, output limit, image input, reasoning and prices come from a bundled models.dev snapshot, so startup needs no network (`ama models refresh` updates it on demand). `models.enabled` (`ama models enable|disable`, or Space in `/model`) keeps the picker to the models you use. See [docs/en/providers.md](docs/en/providers.md) and [ChatGPT login](docs/en/providers.md#chatgpt-login).
|
|
103
|
-
|
|
104
|
-
### Permissions and sandbox
|
|
105
|
-
|
|
106
|
-
| Mode | Display name | Writes | Commands |
|
|
107
|
-
| ----------- | ------------------ | ----------- | --------------------------------- |
|
|
108
|
-
| `default` | Manual | ask | ask |
|
|
109
|
-
| `auto-edit` | Accept edits | allow | ask |
|
|
110
|
-
| `plan` | Plan | deny | read-only commands only |
|
|
111
|
-
| `auto` | Auto | allow ¹ | safe ones allowed, risky ones ask |
|
|
112
|
-
| `full-auto` | Bypass permissions | allow | allow (dangerous commands ask) |
|
|
113
|
-
| `allowlist` | Allowlist only | allow rules | allow rules (for CI) |
|
|
114
|
-
|
|
115
|
-
¹ Secrets, `.git/`, `.ama/` and paths outside the project still ask. `auto` decides in three tiers: rules, then a static safe list, then a model classifier on a separate request. Allow / deny rules (`bash(git push*)`, `write(src/**)`), dangerous-command detection that sees through `sh -c` / `eval` / `xargs`, and project trust apply in every mode; project config can only tighten. On macOS (`sandbox-exec`) and Linux (bubblewrap) an OS sandbox isolates codemode, and optionally bash (`sandbox.bash: "auto"`). See [docs/en/permissions.md](docs/en/permissions.md) and [docs/sandbox.md](docs/sandbox.md) (Chinese).
|
|
116
|
-
|
|
117
|
-
### Sub-agents and external agents
|
|
118
|
-
|
|
119
|
-
The `task` tool hands a sub-task to a sub-agent with a fresh context: built-in `general`, `explore` and `plan`, or your own types defined in `~/.config/ama/agents/*.md`, `.ama/agents/*.md` (trusted projects) or `--agent-dir`. Under the `default` preset `task` is callable from codemode scripts; `tools.default: ["+task"]` exposes it directly. In the terminal UI, RPC and ACP a task runs in the background by default and reports back with a notification; `-p` waits for it. Running tasks appear in the agent bar above the status line, where you can open a live view and talk to a sub-agent directly. `task(agent="claude" | "codex" | "acp:<program>")` drives an external agent with your existing login in that CLI; its approvals go to a human only and its mode is never wider than ama's. `ama --mode acp` exposes ama itself as an ACP agent. See [docs/agents.md](docs/agents.md) (Chinese) and [docs/en/tui.md](docs/en/tui.md#agent-bar).
|
|
120
95
|
|
|
121
|
-
|
|
96
|
+
`/help` lists every command. Each turn is a checkpoint that `/rewind` can return to (code, conversation or both).
|
|
97
|
+
See [terminal UI](docs/en/guides/tui.md) and [sessions](docs/en/guides/sessions.md).
|
|
122
98
|
|
|
123
|
-
|
|
99
|
+
### One-shot runs: `-p`
|
|
124
100
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Long sessions compact automatically in two tiers: large old tool results are pruned first, then the history is summarized, with the summary request reusing the cached prefix. ama keeps the prefix byte-stable, detects and explains cache misses, tells endpoints that report cache usage from those that do not, and can warm the cache during long tool runs (`cache.warming`). Cross-session memory is off by default; `ama memory enable` turns it on, and requests are byte-identical while it is off. See [docs/en/providers.md](docs/en/providers.md#caching) and [docs/memory.md](docs/memory.md) (Chinese).
|
|
132
|
-
|
|
133
|
-
### Observability
|
|
134
|
-
|
|
135
|
-
The status bar shows throughput (tok/s, time to first token), usage and cache hit rate on the first line; mode, model, context, git branch, cost and duration on the second; and with a ChatGPT plan a third line with quota usage and reset times. `Ctrl+G` folds it to one line. `/trace` opens a tree of turns, requests, tools and sub-agents with timing; `ama sessions trace <id> --html` writes the same as a redacted single-file page. `ama stats` aggregates requests, tokens, cache hit rate and cost across sessions. See [docs/en/tui.md](docs/en/tui.md#layout) and [docs/en/sessions.md](docs/en/sessions.md).
|
|
136
|
-
|
|
137
|
-
### codemode and tool presets
|
|
138
|
-
|
|
139
|
-
codemode lets the model write a short JavaScript that orchestrates many tool calls; it runs in a `node --permission` child process (inside the OS sandbox when available) and only its output goes back to the model. Every inner call still passes hooks and permissions. Tool presets: `default` (read, edit, write, bash, grep, glob, plus codemode when the network is isolated), `minimal`, `codemode-only` and `coordinator`. See [docs/codemode.md](docs/codemode.md) (Chinese).
|
|
140
|
-
|
|
141
|
-
### Configuration
|
|
142
|
-
|
|
143
|
-
One user file, `~/.config/ama/config.json`, created on first use with a JSON schema for editors. Layers merge as built-in defaults ← user ← profile ← project ← command line; the project level (`.ama/config.json`) can only tighten. `/config` opens a settings panel; from the shell use `ama config get|set|unset|list`, and `ama config show` prints every effective value with its source. Project conventions in `AGENTS.md` are picked up automatically. `ama doctor` checks layers, trust, key sources, hooks and sandbox. See [docs/en/tui.md](docs/en/tui.md#the-config-settings-panel-and-ama-config).
|
|
144
|
-
|
|
145
|
-
### Interface language
|
|
146
|
-
|
|
147
|
-
The interface is available in Chinese and English: `ui.language` (`auto` / `zh` / `en`), `--lang` or `AMA_LANG`; `auto` follows `LANG`. Text sent to the model is always English, so requests are identical in both languages; set `ui.replyLanguage` (for example `"Chinese"`) to have the model reply in another language.
|
|
101
|
+
```sh
|
|
102
|
+
ama -p "explain src/index.ts"
|
|
103
|
+
git diff | ama -p "review this change"
|
|
104
|
+
npm test 2>&1 | ama -p "why does this fail" -
|
|
105
|
+
ama -p "list the TODOs" --output-format json # or stream-json, same events as RPC
|
|
106
|
+
```
|
|
148
107
|
|
|
149
|
-
|
|
108
|
+
`-p` has nobody to approve, so writes and commands are denied unless you allow them (`--permission-mode auto-edit`,
|
|
109
|
+
`auto`, or `--allow "bash(npm test*)"`). Budgets: `--max-turns`, `--max-cost`. Exit codes are listed at the end of
|
|
110
|
+
`ama --help` (for example 7 = tool calls denied, 8 = budget reached, 9 = plan awaiting approval).
|
|
111
|
+
|
|
112
|
+
### Coordinate external agents
|
|
113
|
+
|
|
114
|
+
`task(agent="…")` runs another coding agent with that CLI's own login, model and permission policy; the result comes back
|
|
115
|
+
as a tool result. Approvals it raises go to you only, and its mode is never wider than ama's.
|
|
116
|
+
|
|
117
|
+
| `agent` | Driver | Status (2026-10-10) |
|
|
118
|
+
| --------------------------------- | ------------------------------------------------------------ | -------------------- |
|
|
119
|
+
| `claude` | `claude-agent-acp` → `claude -p` stream-json → one-shot JSON | Verified |
|
|
120
|
+
| `codex` | `codex-acp` → `codex app-server` → `codex exec` (one-shot) | Verified |
|
|
121
|
+
| `copilot` | `copilot --acp --stdio` | Verified |
|
|
122
|
+
| `opencode` | `opencode acp` | Verified |
|
|
123
|
+
| `pi` | `pi --mode rpc` with an approval gate loaded for the run | Verified |
|
|
124
|
+
| `cursor` | `cursor-agent acp` | Listed, not verified |
|
|
125
|
+
| `gemini`, `qwen`, `kimi`, `goose` | Their ACP subcommands | Listed, not verified |
|
|
126
|
+
| `acp:<program>` | Any other ACP agent | — |
|
|
127
|
+
|
|
128
|
+
`task` is not in the default tool list: enable it with `tools.default: ["+task"]` (or `--tools …,task`). `/agents`
|
|
129
|
+
shows which CLIs are installed. Capability matrix, mode mapping and accounts:
|
|
130
|
+
[sub-agents and external agents](docs/guides/agents.md#实测能力矩阵2026-10-10) (Chinese), measurements in
|
|
131
|
+
[external agent benchmarks](docs/benchmarks/external-agents-2026-10.md).
|
|
132
|
+
|
|
133
|
+
### Sub-agents and fork
|
|
134
|
+
|
|
135
|
+
The same `task` tool starts ama's own sub-agents: built-in `general`, `explore` and `plan`, or your types in
|
|
136
|
+
`~/.config/ama/agents/*.md`, `.ama/agents/*.md` (trusted projects) or `--agent-dir`. A sub-agent starts with a fresh
|
|
137
|
+
context by default; `context: "fork"` inherits the parent conversation and reuses its cached prefix. Tasks run in the
|
|
138
|
+
background in the UI, RPC and ACP (`-p` waits), can be isolated in a git worktree, and appear in the agent bar where you
|
|
139
|
+
can watch and talk to them. Depth is 1: sub-agents cannot delegate again.
|
|
140
|
+
|
|
141
|
+
### Embed and integrate
|
|
142
|
+
|
|
143
|
+
| Entry point | Use | Docs |
|
|
144
|
+
| -------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
145
|
+
| `ama --mode acp` | ACP agent for Zed, JetBrains and Armadra; also an ACP client | [ACP](docs/en/reference/acp.md) |
|
|
146
|
+
| `ama --mode rpc` | JSONL over stdio for hosts; types in `@armadra/agent/rpc` | [RPC protocol](docs/en/reference/rpc.md) |
|
|
147
|
+
| SDK | `createAgentSession()` / `createRuntime()` from `@armadra/agent` | [example](examples/sdk-demo.ts) |
|
|
148
|
+
| `--profile <file>` | Host adapter: register tools, answer approvals, inject messages | [host adapter API](docs/en/reference/host-api.md) |
|
|
149
|
+
| `@armadra/agent/tui` | The terminal component library | [terminal UI](docs/en/guides/tui.md#component-library-armadraagenttui) |
|
|
150
|
+
|
|
151
|
+
Zed (`settings.json`):
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{ "agent_servers": { "ama": { "type": "custom", "command": "ama", "args": ["--mode", "acp"] } } }
|
|
155
|
+
```
|
|
150
156
|
|
|
151
|
-
|
|
157
|
+
SDK:
|
|
152
158
|
|
|
153
159
|
```ts
|
|
154
160
|
import { createAgentSession } from "@armadra/agent";
|
|
@@ -157,121 +163,73 @@ const session = await createAgentSession({
|
|
|
157
163
|
cwd: process.cwd(),
|
|
158
164
|
model: "anthropic/<model-id>", // "fake/echo" for a dry run
|
|
159
165
|
auth: { kind: "env" },
|
|
160
|
-
permission: {
|
|
161
|
-
mode: "default",
|
|
162
|
-
ask: async (request) => (request.toolName === "read" ? "allow" : "deny"),
|
|
163
|
-
},
|
|
166
|
+
permission: { mode: "default", ask: async (req) => (req.toolName === "read" ? "allow" : "deny") },
|
|
164
167
|
});
|
|
165
168
|
await session.prompt("list the entry files under src");
|
|
166
169
|
console.log(session.getLastAssistantText());
|
|
167
170
|
await session.dispose();
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
| `ama doctor` / `ama init` | Diagnostics / create the config directory |
|
|
199
|
-
|
|
200
|
-
Common flags: `--model`, `--thinking`, `--permission-mode`, `--allow` / `--deny`, `--tools-preset`, `--max-turns`, `--max-cost`, `--image`, `--lang`. `ama --help` lists everything.
|
|
201
|
-
|
|
202
|
-
## Exit codes
|
|
203
|
-
|
|
204
|
-
| Code | Meaning |
|
|
205
|
-
| ---- | ----------------------------------------------------------------------- |
|
|
206
|
-
| 0 | Success |
|
|
207
|
-
| 1 | Runtime error (the model ultimately failed, etc.) |
|
|
208
|
-
| 2 | Usage error; the current model does not accept images |
|
|
209
|
-
| 3 | Config / profile / path error; `ama config set` rejected a key or value |
|
|
210
|
-
| 4 | No usable model or key |
|
|
211
|
-
| 5 | Session missing or corrupted |
|
|
212
|
-
| 6 | Host / hook startup failure |
|
|
213
|
-
| 7 | `-p` had tool calls denied (no approver, deny rules, plan, …) |
|
|
214
|
-
| 8 | `-p` reached a budget limit (`--max-turns` / `--max-cost` / `limits`) |
|
|
215
|
-
| 9 | `-p` saved a plan that awaits approval |
|
|
216
|
-
| 78 | Host API version mismatch |
|
|
217
|
-
| 130 | SIGINT; 143 = SIGTERM |
|
|
173
|
+
## Configuration and permissions
|
|
174
|
+
|
|
175
|
+
- **Config**: one user file, `~/.config/ama/config.json`, merged as built-in defaults ← user ← profile ← project ←
|
|
176
|
+
command line. The project level (`.ama/config.json`) can only tighten. `ama config show` prints every effective value
|
|
177
|
+
with its source; `ama doctor` checks layers, trust, key sources, hooks and the sandbox.
|
|
178
|
+
- **AGENTS.md**: read automatically, no trust needed. In each directory the first of `AGENTS.override.md`, `AGENTS.md`,
|
|
179
|
+
`AGENTS.MD` is used; the user-level `~/.config/ama/AGENTS.md` comes first, then ancestors from the outermost down to
|
|
180
|
+
the current directory. Identical copies (for example a worktree inside the main repo) are read once.
|
|
181
|
+
- **Trust**: project hooks (`.ama/hooks.json`), skills (`.ama/skills/`, ancestor `.agents/skills/`) and prompt templates
|
|
182
|
+
load only in trusted projects. ama asks once in the terminal UI and can remember the answer; `--trust` / `--no-trust`
|
|
183
|
+
decide for one launch; unattended runs default to untrusted.
|
|
184
|
+
- **Permission modes**:
|
|
185
|
+
|
|
186
|
+
| Mode | Display name | Writes | Commands |
|
|
187
|
+
| ----------- | ------------------ | ----------- | -------------------------------------------------- |
|
|
188
|
+
| `default` | Manual | ask | ask |
|
|
189
|
+
| `auto-edit` | Accept edits | allow | ask |
|
|
190
|
+
| `plan` | Plan | deny | read-only commands only |
|
|
191
|
+
| `auto` | Auto | allow ¹ | safe list allowed, the rest judged by a classifier |
|
|
192
|
+
| `full-auto` | Bypass permissions | allow | allow (dangerous commands ask) |
|
|
193
|
+
| `allowlist` | Allowlist only | allow rules | allow rules (for CI) |
|
|
194
|
+
|
|
195
|
+
¹ Secrets, `.git/`, `.ama/` and paths outside the project still ask. Deny rules and dangerous-command detection apply in
|
|
196
|
+
every mode. On macOS (`sandbox-exec`) and Linux (bubblewrap) an OS sandbox isolates codemode and, optionally, bash; Windows has none. See
|
|
197
|
+
[permissions](docs/en/guides/permissions.md) and [sandbox](docs/guides/sandbox.md) (Chinese).
|
|
198
|
+
|
|
199
|
+
The interface is available in English and Chinese (`--lang`, `AMA_LANG` or `ui.language`); text sent to the model is
|
|
200
|
+
always English, so requests are byte-identical in both languages.
|
|
218
201
|
|
|
219
202
|
## Documentation
|
|
220
203
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
**User docs**
|
|
224
|
-
|
|
225
|
-
- [Providers and models](docs/en/providers.md) ([中文](docs/providers.md)): providers, channels, keys, ChatGPT login, relays, models.dev, images, caching
|
|
226
|
-
- [Terminal UI](docs/en/tui.md) ([中文](docs/tui.md)): layout, status bar, keys, commands, rewind, approvals, agent bar, traces, `/config`
|
|
227
|
-
- [Permissions](docs/en/permissions.md) ([中文](docs/permissions.md)): modes, decision order, auto's three tiers
|
|
228
|
-
- [Sessions](docs/en/sessions.md) ([中文](docs/sessions.md)): stats, search, `--from`, export, traces, checkpoints
|
|
229
|
-
- [Sub-agents and external agents](docs/agents.md), [Plan mode](docs/plan.md), [Memory](docs/memory.md), [Sandbox](docs/sandbox.md), [codemode](docs/codemode.md), [Command hooks](docs/hooks.md) (Chinese)
|
|
230
|
-
|
|
231
|
-
**Integration docs**
|
|
232
|
-
|
|
233
|
-
- [RPC protocol](docs/en/rpc.md) ([中文](docs/rpc.md)), [Host adapter API](docs/en/host-api.md) ([中文](docs/host-api.md))
|
|
234
|
-
- [ACP](docs/en/acp.md) ([中文](docs/acp.md)): `ama --mode acp`, sessions, tool calls, sign-in, deviations, the ACP client
|
|
235
|
-
- [Session file format](docs/session-format.md) (Chinese)
|
|
236
|
-
|
|
237
|
-
**Design and research** (Chinese)
|
|
238
|
-
|
|
239
|
-
- [Overall design and decision log][design], [terminal UI visual spec](docs/tui-design.md), [rewind design](docs/rewind-plan.md), [bilingual conventions][i18n]
|
|
240
|
-
- [Local extensions (draft, not implemented)][extensions], [benchmarks][benchmarks], [research reports][research]
|
|
241
|
-
- Wave plans: [wave 3][w3], [wave 5][wave5], [wave 6][wave6], [early implementation plan][impl]
|
|
242
|
-
|
|
243
|
-
[design]: https://github.com/Owlbay/armadra-agent/blob/main/docs/design.md
|
|
244
|
-
[i18n]: https://github.com/Owlbay/armadra-agent/blob/main/docs/i18n.md
|
|
245
|
-
[extensions]: https://github.com/Owlbay/armadra-agent/blob/main/docs/extensions.md
|
|
246
|
-
[benchmarks]: https://github.com/Owlbay/armadra-agent/tree/main/docs/benchmarks
|
|
247
|
-
[research]: https://github.com/Owlbay/armadra-agent/tree/main/docs/research
|
|
248
|
-
[w3]: https://github.com/Owlbay/armadra-agent/blob/main/docs/wave3-plan.md
|
|
249
|
-
[wave5]: https://github.com/Owlbay/armadra-agent/blob/main/docs/wave5-plan.md
|
|
250
|
-
[wave6]: https://github.com/Owlbay/armadra-agent/blob/main/docs/wave6-plan.md
|
|
251
|
-
[impl]: https://github.com/Owlbay/armadra-agent/blob/main/docs/implementation-plan.md
|
|
252
|
-
|
|
253
|
-
Release notes: [CHANGELOG.md](CHANGELOG.md) (English, from 0.6.0) and [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md) (Chinese, complete history).
|
|
204
|
+
The [documentation index](docs/README.md) lists every document (an English index is in
|
|
205
|
+
[docs/en/README.md](docs/en/README.md)). Layout:
|
|
254
206
|
|
|
255
|
-
|
|
207
|
+
- `docs/guides/`: how things work today: [terminal UI](docs/en/guides/tui.md), [providers](docs/en/guides/providers.md),
|
|
208
|
+
[permissions](docs/en/guides/permissions.md), [sessions](docs/en/guides/sessions.md), plus agents, plan mode, memory,
|
|
209
|
+
hooks, codemode, sandbox and i18n in Chinese.
|
|
210
|
+
- `docs/reference/`: protocols and formats: [RPC](docs/en/reference/rpc.md), [ACP](docs/en/reference/acp.md),
|
|
211
|
+
[host adapter API](docs/en/reference/host-api.md), [session file format](docs/reference/session-format.md) (Chinese).
|
|
212
|
+
- `docs/design/`: the [overall design](docs/design/design.md) and other target designs.
|
|
213
|
+
- `docs/history/`, `docs/research/`, `docs/benchmarks/`: finished plans, research and measurements, for the record.
|
|
256
214
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
- **ChatGPT login not yet verified with a real account**: both login flavors are tested against a local mock; real-account checks run locally with `AMA_E2E_CHATGPT=1`.
|
|
260
|
-
- **DeepSeek, Zhipu and Kimi default to the Chat channel**: their Messages channels (`@messages`) have only been tested through relays.
|
|
261
|
-
- Sub-agents have depth 1 and no fork mode that inherits the parent conversation.
|
|
215
|
+
Release notes: [CHANGELOG.md](CHANGELOG.md) (English, from 0.6.0) and [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md)
|
|
216
|
+
(Chinese, complete history).
|
|
262
217
|
|
|
263
|
-
## Development
|
|
218
|
+
## Development and release
|
|
264
219
|
|
|
265
220
|
Requires Node ≥ 22 and pnpm (`corepack enable`).
|
|
266
221
|
|
|
267
222
|
```sh
|
|
268
223
|
pnpm install
|
|
269
|
-
pnpm run ci # typecheck, format, dependency and
|
|
224
|
+
pnpm run ci # typecheck, format, dependency, i18n and doc-link checks, release check, tests, build
|
|
270
225
|
AMA_E2E=1 pnpm test:e2e # bundle-level end-to-end tests with the free fake provider
|
|
271
226
|
```
|
|
272
227
|
|
|
273
|
-
Tests use the scripted `fake` provider
|
|
228
|
+
Tests use the scripted `fake` provider, never a real model. Conventions are in [AGENTS.md](AGENTS.md) and
|
|
229
|
+
[CONTRIBUTING](.github/CONTRIBUTING.md). Releases are cut by pushing a `v<version>` tag: CI creates the GitHub Release
|
|
230
|
+
and publishes to npm through trusted publishing.
|
|
274
231
|
|
|
275
|
-
## License
|
|
232
|
+
## License
|
|
276
233
|
|
|
277
|
-
[MIT](LICENSE). Model metadata comes from [models.dev](https://models.dev) (MIT); see
|
|
234
|
+
[MIT](LICENSE). Model metadata comes from [models.dev](https://models.dev) (MIT); see
|
|
235
|
+
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|