@armadra/agent 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -32
- package/CHANGELOG.zh-CN.md +56 -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.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 +1 -1
- 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 +24 -24
- 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
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* 命中;带 path 的工具记文件所在目录,之后该目录下的路径命中;其它工具只记工具名。
|
|
26
26
|
* 记忆只作用于第 ③ 步模式产生的 ask(auto 里只作用于规则层之后)。
|
|
27
27
|
*
|
|
28
|
-
* [S2] bash 沙箱(docs/permissions.md「判定顺序」):default / auto-edit 下,bash 调用若将在 OS 沙箱内
|
|
28
|
+
* [S2] bash 沙箱(docs/guides/permissions.md「判定顺序」):default / auto-edit 下,bash 调用若将在 OS 沙箱内
|
|
29
29
|
* 运行且沙箱拒绝网络、没请求 `sandbox: false`、命令文本不碰机密路径、嵌套不超深,第 ③ 步的 ask 变
|
|
30
30
|
* allow(`sandboxed: true`);①② 与 Hook ask 照旧优先。auto 下沙箱不直接放行,只作为分类器输入;
|
|
31
31
|
* 请求 `sandbox: false` 越出沙箱时规则层询问(allow 规则 / Hook allow / 会话记忆仍可放行)。
|
|
@@ -72,7 +72,7 @@ export const PLAN_MODE_MESSAGE = "Plan mode is active: write/execute tools are d
|
|
|
72
72
|
/** [W5-F] plan 下 `todo set / update` 的拒绝说明(计划与清单分开,避免跳过审批)。 */
|
|
73
73
|
export const PLAN_TODO_MESSAGE = "Plan mode is active: the todo list is created from the approved plan. Write the steps in a <proposed_plan> block instead.";
|
|
74
74
|
/**
|
|
75
|
-
* [W5-F] plan 模式第 ③ 步(输入可见,docs/wave5-plan.md §6.2):
|
|
75
|
+
* [W5-F] plan 模式第 ③ 步(输入可见,docs/history/wave5-plan.md §6.2):
|
|
76
76
|
* read 放行(`todo` 只放行 get);bash 按 `plan.bash`(readonly:只读子集放行其余拒绝;ask:其余询问;
|
|
77
77
|
* deny:全拒);task 放行(子会话共用同一管线,同样处在 plan);其余 write / execute 拒绝。
|
|
78
78
|
* 返回 undefined = 交给通常的模式真值表。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* auto 模式规则层的受保护路径(§7.4,docs/permissions.md「规则层」)。
|
|
2
|
+
* auto 模式规则层的受保护路径(§7.4,docs/guides/permissions.md「规则层」)。
|
|
3
3
|
*
|
|
4
4
|
* - **机密路径**(读写都询问):`.env` / `.env.*`(`.example` / `.sample` / `.template` / `.dist` 除外)、
|
|
5
5
|
* `*.env`、`.ssh/`、`.gnupg/`、`.aws/`、`.kube/config`、`.docker/config.json`、`.config/gcloud/`、
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* auto 模式规则层的受保护路径(§7.4,docs/permissions.md「规则层」)。
|
|
2
|
+
* auto 模式规则层的受保护路径(§7.4,docs/guides/permissions.md「规则层」)。
|
|
3
3
|
*
|
|
4
4
|
* - **机密路径**(读写都询问):`.env` / `.env.*`(`.example` / `.sample` / `.template` / `.dist` 除外)、
|
|
5
5
|
* `*.env`、`.ssh/`、`.gnupg/`、`.aws/`、`.kube/config`、`.docker/config.json`、`.config/gcloud/`、
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plan 模式与 allowlist 放行的只读 bash 子集 `READONLY_BASH`(docs/wave5-plan.md §6.2、D21)。[W5-F]
|
|
2
|
+
* plan 模式与 allowlist 放行的只读 bash 子集 `READONLY_BASH`(docs/history/wave5-plan.md §6.2、D21)。[W5-F]
|
|
3
3
|
*
|
|
4
4
|
* 判定 = auto 的静态判定(`analyzeBashForAuto`:分词、嵌套展开、规则层的网络 / 删除 / 写入目标 /
|
|
5
5
|
* 机密路径、命令替换、变量展开、点文件通配)**全部通过**,再加四条更窄的限制:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plan 模式与 allowlist 放行的只读 bash 子集 `READONLY_BASH`(docs/wave5-plan.md §6.2、D21)。[W5-F]
|
|
2
|
+
* plan 模式与 allowlist 放行的只读 bash 子集 `READONLY_BASH`(docs/history/wave5-plan.md §6.2、D21)。[W5-F]
|
|
3
3
|
*
|
|
4
4
|
* 判定 = auto 的静态判定(`analyzeBashForAuto`:分词、嵌套展开、规则层的网络 / 删除 / 写入目标 /
|
|
5
5
|
* 机密路径、命令替换、变量展开、点文件通配)**全部通过**,再加四条更窄的限制:
|
|
@@ -75,7 +75,7 @@ export interface ApprovalRequestContext {
|
|
|
75
75
|
/** [W5-C0] 子 Agent 任务 id(对话框标注 `[task:<agent>]`)。 */
|
|
76
76
|
taskId?: string;
|
|
77
77
|
/**
|
|
78
|
-
* [W5-C0] 来自外部 Agent 的权限请求(docs/wave5-plan.md §5.3):只走 broker 链(宿主 → UI →
|
|
78
|
+
* [W5-C0] 来自外部 Agent 的权限请求(docs/history/wave5-plan.md §5.3):只走 broker 链(宿主 → UI →
|
|
79
79
|
* 无人值守拒绝),auto 分类器与模型都不参与;RPC `permission_request` 原样带出。
|
|
80
80
|
*/
|
|
81
81
|
origin?: ExternalPermissionOrigin;
|
|
@@ -171,7 +171,7 @@ export interface PermissionVerdict {
|
|
|
171
171
|
*/
|
|
172
172
|
classify?: boolean;
|
|
173
173
|
/**
|
|
174
|
-
* [S2] 这次 bash 调用将经 OS 沙箱运行(docs/sandbox.md「第二阶段」)。default / auto-edit 下因此免审批时
|
|
174
|
+
* [S2] 这次 bash 调用将经 OS 沙箱运行(docs/guides/sandbox.md「第二阶段」)。default / auto-edit 下因此免审批时
|
|
175
175
|
* 为真;auto 下随 `classify` 一起交给分类器作为输入。
|
|
176
176
|
*/
|
|
177
177
|
sandboxed?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [W5-Z] `[DONE:<步骤>]` 文本交接(docs/plan.md「交接」,D20 / R6 的回退):活动工具集里没有 `todo` 时,
|
|
2
|
+
* [W5-Z] `[DONE:<步骤>]` 文本交接(docs/guides/plan.md「交接」,D20 / R6 的回退):活动工具集里没有 `todo` 时,
|
|
3
3
|
* 批准计划的交接消息请模型每完成一步在回复里单独一行写 `[DONE:S1]`;ama 在回合结束时读这些标记,
|
|
4
4
|
* 把计划生成的待办(`planStep`)标为 done、下一个未完成项转 in_progress,照常落 `ama.todo` 与发
|
|
5
5
|
* `todo_updated`,界面与 RPC 的进度显示不依赖 todo 工具。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [W5-Z] `[DONE:<步骤>]` 文本交接(docs/plan.md「交接」,D20 / R6 的回退):活动工具集里没有 `todo` 时,
|
|
2
|
+
* [W5-Z] `[DONE:<步骤>]` 文本交接(docs/guides/plan.md「交接」,D20 / R6 的回退):活动工具集里没有 `todo` 时,
|
|
3
3
|
* 批准计划的交接消息请模型每完成一步在回复里单独一行写 `[DONE:S1]`;ama 在回合结束时读这些标记,
|
|
4
4
|
* 把计划生成的待办(`planStep`)标为 done、下一个未完成项转 in_progress,照常落 `ama.todo` 与发
|
|
5
5
|
* `todo_updated`,界面与 RPC 的进度显示不依赖 todo 工具。
|
package/dist/plan/extract.d.ts
CHANGED
package/dist/plan/extract.js
CHANGED
package/dist/plan/prompts.d.ts
CHANGED
package/dist/plan/prompts.js
CHANGED
package/dist/plan/store.d.ts
CHANGED
package/dist/plan/store.js
CHANGED
package/dist/rpc.d.ts
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* - 线上事件 = 进程内 `SessionEvent`,但 `message_update` 换成纯增量(去掉 partial / 累计消息,
|
|
13
13
|
* 附最新 usage);stream-json 输出同一形状。
|
|
14
14
|
* - 类型定义直接放在本文件(B6 实现 import 它),避免子路径入口依赖实现文件。
|
|
15
|
-
* - [W5-C0] 第五波(docs/wave5-plan.md §6.5、§7.5):命令 `plan_response / get_plan / get_todos /
|
|
15
|
+
* - [W5-C0] 第五波(docs/history/wave5-plan.md §6.5、§7.5):命令 `plan_response / get_plan / get_todos /
|
|
16
16
|
* get_tasks / get_agents`(返回形状见 `RpcW5Results`),客户端能力 `plans`(声明后计划审批交客户端);
|
|
17
17
|
* 新事件由 `SessionEvent` 派生自动包含。命令实现归 W5-F(C0 时返回 `not_implemented`),
|
|
18
18
|
* `RPC_PROTOCOL_VERSION` 不变。
|
|
19
|
-
* - [W6-C0] 第六波(docs/wave6-plan.md §2.6、§4.4):命令 `get_trace`(参数 `RpcGetTraceParams`、返回
|
|
19
|
+
* - [W6-C0] 第六波(docs/history/wave6-plan.md §2.6、§4.4):命令 `get_trace`(参数 `RpcGetTraceParams`、返回
|
|
20
20
|
* `RpcW6Results`,W6-T2 实现,之前回 `not_implemented`);事件 `quota_update`;`permission_request.context`
|
|
21
21
|
* 可带 `toolCallId`;`keySource` 可为 `oauth`。`RPC_PROTOCOL_VERSION` 不变。
|
|
22
|
-
* - [W7-B2] 后台子 Agent(docs/agents-concurrency-plan.md §2.5):命令 `background_task { taskId? }` →
|
|
22
|
+
* - [W7-B2] 后台子 Agent(docs/history/agents-concurrency-plan.md §2.5):命令 `background_task { taskId? }` →
|
|
23
23
|
* `RpcW7Results`(无 taskId = 全部前台运行中任务;对已结束 / 已在后台的任务回空表);事件
|
|
24
24
|
* `subagent_background` 由 `SessionEvent` 派生。`RPC_PROTOCOL_VERSION` 不变。
|
|
25
25
|
*/
|
package/dist/rpc.js
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* - 线上事件 = 进程内 `SessionEvent`,但 `message_update` 换成纯增量(去掉 partial / 累计消息,
|
|
13
13
|
* 附最新 usage);stream-json 输出同一形状。
|
|
14
14
|
* - 类型定义直接放在本文件(B6 实现 import 它),避免子路径入口依赖实现文件。
|
|
15
|
-
* - [W5-C0] 第五波(docs/wave5-plan.md §6.5、§7.5):命令 `plan_response / get_plan / get_todos /
|
|
15
|
+
* - [W5-C0] 第五波(docs/history/wave5-plan.md §6.5、§7.5):命令 `plan_response / get_plan / get_todos /
|
|
16
16
|
* get_tasks / get_agents`(返回形状见 `RpcW5Results`),客户端能力 `plans`(声明后计划审批交客户端);
|
|
17
17
|
* 新事件由 `SessionEvent` 派生自动包含。命令实现归 W5-F(C0 时返回 `not_implemented`),
|
|
18
18
|
* `RPC_PROTOCOL_VERSION` 不变。
|
|
19
|
-
* - [W6-C0] 第六波(docs/wave6-plan.md §2.6、§4.4):命令 `get_trace`(参数 `RpcGetTraceParams`、返回
|
|
19
|
+
* - [W6-C0] 第六波(docs/history/wave6-plan.md §2.6、§4.4):命令 `get_trace`(参数 `RpcGetTraceParams`、返回
|
|
20
20
|
* `RpcW6Results`,W6-T2 实现,之前回 `not_implemented`);事件 `quota_update`;`permission_request.context`
|
|
21
21
|
* 可带 `toolCallId`;`keySource` 可为 `oauth`。`RPC_PROTOCOL_VERSION` 不变。
|
|
22
|
-
* - [W7-B2] 后台子 Agent(docs/agents-concurrency-plan.md §2.5):命令 `background_task { taskId? }` →
|
|
22
|
+
* - [W7-B2] 后台子 Agent(docs/history/agents-concurrency-plan.md §2.5):命令 `background_task { taskId? }` →
|
|
23
23
|
* `RpcW7Results`(无 taskId = 全部前台运行中任务;对已结束 / 已在后台的任务回空表);事件
|
|
24
24
|
* `subagent_background` 由 `SessionEvent` 派生。`RPC_PROTOCOL_VERSION` 不变。
|
|
25
25
|
*/
|
package/dist/sandbox/bash.d.ts
CHANGED
package/dist/sandbox/bash.js
CHANGED
package/dist/sandbox/detect.d.ts
CHANGED
package/dist/sandbox/detect.js
CHANGED
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** 操作系统级沙箱(docs/sandbox.md):探测、参数生成与命令包装。 */
|
|
1
|
+
/** 操作系统级沙箱(docs/guides/sandbox.md):探测、参数生成与命令包装。 */
|
|
2
2
|
export { NO_OS_SANDBOX, configureOsSandbox, osSandboxStatus, probeOsSandbox, resetOsSandboxForTests, resolveSandboxEnabled, type OsSandboxStatus, type ProbeDeps, type SandboxEnabled, } from "./detect.js";
|
|
3
3
|
export { buildBwrapArgs, buildSbplProfile, buildUnshareArgs, type OsSandboxKind, type OsSandboxPolicy, } from "./profile.js";
|
|
4
4
|
export { resolveExtras, resolveWritable, wrapCommand, type WrappedCommand } from "./wrap.js";
|
package/dist/sandbox/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** 操作系统级沙箱(docs/sandbox.md):探测、参数生成与命令包装。 */
|
|
1
|
+
/** 操作系统级沙箱(docs/guides/sandbox.md):探测、参数生成与命令包装。 */
|
|
2
2
|
export { NO_OS_SANDBOX, configureOsSandbox, osSandboxStatus, probeOsSandbox, resetOsSandboxForTests, resolveSandboxEnabled, } from "./detect.js";
|
|
3
3
|
export { buildBwrapArgs, buildSbplProfile, buildUnshareArgs, } from "./profile.js";
|
|
4
4
|
export { resolveExtras, resolveWritable, wrapCommand } from "./wrap.js";
|
package/dist/sandbox/profile.js
CHANGED
package/dist/sandbox/wrap.d.ts
CHANGED
package/dist/sandbox/wrap.js
CHANGED
package/dist/sdk.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* summarizeFrom / summarizeUpTo / undoAbortedTurn`,内存会话只能仅对话)。
|
|
11
11
|
*
|
|
12
12
|
* 两者共用组装根(cli/compose*.ts),审批链、系统提示装配、工具预设与缓存行为与 CLI 一致。
|
|
13
|
-
* - [W5-F] 计划(docs/plan.md):`CreateSessionOptions.plan`(plan.* 配置 + `onProposed` 审批回调);
|
|
13
|
+
* - [W5-F] 计划(docs/guides/plan.md):`CreateSessionOptions.plan`(plan.* 配置 + `onProposed` 审批回调);
|
|
14
14
|
* 返回的会话带 `plan.current() / respond() / todos()`。没有 `onProposed` 时按 `plan.unattended`
|
|
15
15
|
* (缺省 stop:计划落盘后停下,不替人批准)。
|
|
16
|
-
* - [W6-C0] `language`(两个入口都有):界面语言,跟随宿主界面(docs/i18n.md);进程级,`AMA_LANG` 仍优先。
|
|
16
|
+
* - [W6-C0] `language`(两个入口都有):界面语言,跟随宿主界面(docs/guides/i18n.md);进程级,`AMA_LANG` 仍优先。
|
|
17
17
|
*/
|
|
18
18
|
import type { ApiRegistry } from "./ai/apis/api.js";
|
|
19
19
|
import type { ModelThinkingLevel, ProviderData } from "./ai/types.js";
|
|
@@ -135,7 +135,7 @@ export interface CreateSessionOptions {
|
|
|
135
135
|
/** 命令式 Hook(缺省不加载文件系统里的 hooks.json)。 */
|
|
136
136
|
hooks?: HookConfig | false;
|
|
137
137
|
config?: Partial<AmaConfig>;
|
|
138
|
-
/** [W5-F] 计划(plan.* 配置与审批回调),见 docs/plan.md。 */
|
|
138
|
+
/** [W5-F] 计划(plan.* 配置与审批回调),见 docs/guides/plan.md。 */
|
|
139
139
|
plan?: SessionPlanOptions;
|
|
140
140
|
unattended?: boolean;
|
|
141
141
|
onWarning?: (message: string) => void;
|
package/dist/sdk.js
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* summarizeFrom / summarizeUpTo / undoAbortedTurn`,内存会话只能仅对话)。
|
|
11
11
|
*
|
|
12
12
|
* 两者共用组装根(cli/compose*.ts),审批链、系统提示装配、工具预设与缓存行为与 CLI 一致。
|
|
13
|
-
* - [W5-F] 计划(docs/plan.md):`CreateSessionOptions.plan`(plan.* 配置 + `onProposed` 审批回调);
|
|
13
|
+
* - [W5-F] 计划(docs/guides/plan.md):`CreateSessionOptions.plan`(plan.* 配置 + `onProposed` 审批回调);
|
|
14
14
|
* 返回的会话带 `plan.current() / respond() / todos()`。没有 `onProposed` 时按 `plan.unattended`
|
|
15
15
|
* (缺省 stop:计划落盘后停下,不替人批准)。
|
|
16
|
-
* - [W6-C0] `language`(两个入口都有):界面语言,跟随宿主界面(docs/i18n.md);进程级,`AMA_LANG` 仍优先。
|
|
16
|
+
* - [W6-C0] `language`(两个入口都有):界面语言,跟随宿主界面(docs/guides/i18n.md);进程级,`AMA_LANG` 仍优先。
|
|
17
17
|
*/
|
|
18
18
|
import { resolve } from "node:path";
|
|
19
19
|
import { ProviderRegistry } from "./ai/providers/registry.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 会话文件的字节级按行读取(docs/memory-plan.md D6、§2.4)。[M-C0] 实现与单测;调用方由 [M-C] 接入
|
|
2
|
+
* 会话文件的字节级按行读取(docs/history/memory-plan.md D6、§2.4)。[M-C0] 实现与单测;调用方由 [M-C] 接入
|
|
3
3
|
* (`store.ts readSessionLines`、`scan.ts forEachLine`、`list.ts`)。
|
|
4
4
|
*
|
|
5
5
|
* - fd + 一块复用的缓冲(缺省 64 KiB)顺序 `readSync`,以 `indexOf(0x0a)` 切行;跨块的残片挪到缓冲
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 会话文件的字节级按行读取(docs/memory-plan.md D6、§2.4)。[M-C0] 实现与单测;调用方由 [M-C] 接入
|
|
2
|
+
* 会话文件的字节级按行读取(docs/history/memory-plan.md D6、§2.4)。[M-C0] 实现与单测;调用方由 [M-C] 接入
|
|
3
3
|
* (`store.ts readSessionLines`、`scan.ts forEachLine`、`list.ts`)。
|
|
4
4
|
*
|
|
5
5
|
* - fd + 一块复用的缓冲(缺省 64 KiB)顺序 `readSync`,以 `indexOf(0x0a)` 切行;跨块的残片挪到缓冲
|
package/dist/session/list.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 会话列表(`SessionManager.list` 的实现)。[M-C] 按块逐行读(docs/memory-plan.md D6、§2.4):
|
|
2
|
+
* 会话列表(`SessionManager.list` 的实现)。[M-C] 按块逐行读(docs/history/memory-plan.md D6、§2.4):
|
|
3
3
|
* 只解析头、第一条条目、`leaf` / `session_info` 行、要取 `firstPrompt` 的那一条 user 消息与末行;
|
|
4
4
|
* 其余 ama 写的行只看行首的 type / role(`lineTypeOf`),不生成全文字符串、不留条目对象。
|
|
5
5
|
*
|
package/dist/session/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 会话列表(`SessionManager.list` 的实现)。[M-C] 按块逐行读(docs/memory-plan.md D6、§2.4):
|
|
2
|
+
* 会话列表(`SessionManager.list` 的实现)。[M-C] 按块逐行读(docs/history/memory-plan.md D6、§2.4):
|
|
3
3
|
* 只解析头、第一条条目、`leaf` / `session_info` 行、要取 `firstPrompt` 的那一条 user 消息与末行;
|
|
4
4
|
* 其余 ama 写的行只看行首的 type / role(`lineTypeOf`),不生成全文字符串、不留条目对象。
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - [W3-C1b] `leaf` 行(`/tree` 位置,第三波 A7)不是条目:不进 entries;最后一条 leaf 行若在
|
|
9
9
|
* 最后一条条目之后,作为 `leafId` 返回(之后又追加了条目则作废)。id 须为字符串或 null。
|
|
10
10
|
* 将来格式升级时在这里加「旧版本 → 当前」的内存迁移(文件只追加,不回写);`list.ts` 不经本函数、
|
|
11
|
-
* 自己按 v1 规则流式统计,升级格式时要同时改它(docs/memory-plan.md R6)。
|
|
11
|
+
* 自己按 v1 规则流式统计,升级格式时要同时改它(docs/history/memory-plan.md R6)。
|
|
12
12
|
*/
|
|
13
13
|
import type { SessionEntry, SessionHeader, SessionLine } from "./types.js";
|
|
14
14
|
export interface MigratedSession {
|
package/dist/session/migrate.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - [W3-C1b] `leaf` 行(`/tree` 位置,第三波 A7)不是条目:不进 entries;最后一条 leaf 行若在
|
|
9
9
|
* 最后一条条目之后,作为 `leafId` 返回(之后又追加了条目则作废)。id 须为字符串或 null。
|
|
10
10
|
* 将来格式升级时在这里加「旧版本 → 当前」的内存迁移(文件只追加,不回写);`list.ts` 不经本函数、
|
|
11
|
-
* 自己按 v1 规则流式统计,升级格式时要同时改它(docs/memory-plan.md R6)。
|
|
11
|
+
* 自己按 v1 规则流式统计,升级格式时要同时改它(docs/history/memory-plan.md R6)。
|
|
12
12
|
*/
|
|
13
13
|
import { AmaError } from "../errors.js";
|
|
14
14
|
import { SESSION_FORMAT_VERSION } from "./types.js";
|
package/dist/session/store.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ReadResult {
|
|
|
30
30
|
export declare function isBlankLine(line: Buffer): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* 读并解析 JSONL。`repair: true` 时把末尾半行从文件里截掉(只截最后一行,且只在它无法解析时)。
|
|
33
|
-
* 按块逐行读(line-reader.ts,docs/memory-plan.md §2.4):不生成全文字符串与 split 数组。
|
|
33
|
+
* 按块逐行读(line-reader.ts,docs/history/memory-plan.md §2.4):不生成全文字符串与 split 数组。
|
|
34
34
|
*/
|
|
35
35
|
export declare function readSessionLines(file: string, options?: {
|
|
36
36
|
repair?: boolean;
|
package/dist/session/store.js
CHANGED
|
@@ -45,7 +45,7 @@ export function isBlankLine(line) {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* 读并解析 JSONL。`repair: true` 时把末尾半行从文件里截掉(只截最后一行,且只在它无法解析时)。
|
|
48
|
-
* 按块逐行读(line-reader.ts,docs/memory-plan.md §2.4):不生成全文字符串与 split 数组。
|
|
48
|
+
* 按块逐行读(line-reader.ts,docs/history/memory-plan.md §2.4):不生成全文字符串与 split 数组。
|
|
49
49
|
*/
|
|
50
50
|
export function readSessionLines(file, options = {}) {
|
|
51
51
|
const lines = [];
|
package/dist/skills/builtin.js
CHANGED
|
@@ -14,7 +14,7 @@ import { dirname, join } from "node:path";
|
|
|
14
14
|
export const BUILTIN_SKILLS_DIR = "builtin";
|
|
15
15
|
const AMA_DOCS_BODY = `# ama quick reference
|
|
16
16
|
|
|
17
|
-
ama is the coding agent running this session. Docs: https://github.com/
|
|
17
|
+
ama is the coding agent running this session. Docs: https://github.com/AMA-Link/armadra-agent (README.md, docs/).
|
|
18
18
|
|
|
19
19
|
## Files
|
|
20
20
|
- User config dir \`~/.config/ama/\` (\`AMA_CONFIG_DIR\`; Windows \`%APPDATA%\\ama\`): \`config.json\`, \`auth.json\` (keys, 0600), \`hooks.json\`, \`keybindings.json\`, \`trust.json\`, \`AGENTS.md\`, \`skills/\`, \`prompts/\`.
|
|
@@ -93,7 +93,7 @@ export async function withBuiltinSkills(skills, dataDir, builtins = BUILTIN_SKIL
|
|
|
93
93
|
await ensureFile(location, builtinSkillText(builtin));
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
|
96
|
-
// 与 skills/ 其它加载告警一样固定英文(模型侧模块不 import i18n,见 docs/i18n.md)
|
|
96
|
+
// 与 skills/ 其它加载告警一样固定英文(模型侧模块不 import i18n,见 docs/guides/i18n.md)
|
|
97
97
|
warnings.push(`built-in skill ${builtin.name} could not be written: ${error.message}`);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 后台命令(docs/wave5-plan.md §8.3 H6,D29:不加新工具,`bash{background}` + `bash{job, action}`)。[W5-H2]
|
|
2
|
+
* 后台命令(docs/history/wave5-plan.md §8.3 H6,D29:不加新工具,`bash{background}` + `bash{job, action}`)。[W5-H2]
|
|
3
3
|
*
|
|
4
4
|
* - `start`:调用方(bash.ts)给出 `spawn(stdout)`——**进程只在 bash.ts 的 `spawnShell` 里创建**,
|
|
5
5
|
* 这里只拿到 ChildProcess;stdout / stderr 直接写进 `outputPath`(文件描述符交给子进程,ama 退出也不
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 后台命令(docs/wave5-plan.md §8.3 H6,D29:不加新工具,`bash{background}` + `bash{job, action}`)。[W5-H2]
|
|
2
|
+
* 后台命令(docs/history/wave5-plan.md §8.3 H6,D29:不加新工具,`bash{background}` + `bash{job, action}`)。[W5-H2]
|
|
3
3
|
*
|
|
4
4
|
* - `start`:调用方(bash.ts)给出 `spawn(stdout)`——**进程只在 bash.ts 的 `spawnShell` 里创建**,
|
|
5
5
|
* 这里只拿到 ChildProcess;stdout / stderr 直接写进 `outputPath`(文件描述符交给子进程,ama 退出也不
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 剪贴板图片(docs/wave5-plan.md §4、D12)。[W5-I] 界面接线(`Ctrl+V`、`/paste`)归 W5-U。
|
|
2
|
+
* 剪贴板图片(docs/history/wave5-plan.md §4、D12)。[W5-I] 界面接线(`Ctrl+V`、`/paste`)归 W5-U。
|
|
3
3
|
*
|
|
4
4
|
* 零依赖读不了剪贴板位图,按平台依次调系统命令,成功写 `<dataDir>/clipboard/<时间戳>.png` 并返回
|
|
5
5
|
* 路径(编辑器插入 `@<路径>`,之后走 loadImageFile);没有工具或剪贴板里没有图返回 undefined:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 剪贴板图片(docs/wave5-plan.md §4、D12)。[W5-I] 界面接线(`Ctrl+V`、`/paste`)归 W5-U。
|
|
2
|
+
* 剪贴板图片(docs/history/wave5-plan.md §4、D12)。[W5-I] 界面接线(`Ctrl+V`、`/paste`)归 W5-U。
|
|
3
3
|
*
|
|
4
4
|
* 零依赖读不了剪贴板位图,按平台依次调系统命令,成功写 `<dataDir>/clipboard/<时间戳>.png` 并返回
|
|
5
5
|
* 路径(编辑器插入 `@<路径>`,之后走 loadImageFile);没有工具或剪贴板里没有图返回 undefined:
|
package/dist/tools/edit.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare function planEdits(content: string, edits: readonly EditOp[], rep
|
|
|
38
38
|
export declare function unifiedDiff(oldText: string, newText: string, path: string, context?: number): string;
|
|
39
39
|
/** 改前 / 改后全文([ACP-C] D6):任一侧超过 {@link FILE_CHANGE_TEXT_LIMIT} 返回 undefined。 */
|
|
40
40
|
export declare function fileChangeOf(path: string, oldText: string | null, newText: string, firstChangedLine?: number): FileChange | undefined;
|
|
41
|
-
/** 检查点:写前备份(docs/rewind-plan.md §2);钩子按约定不抛,这里再兜一层,不让编辑失败。 */
|
|
41
|
+
/** 检查点:写前备份(docs/history/rewind-plan.md §2);钩子按约定不抛,这里再兜一层,不让编辑失败。 */
|
|
42
42
|
export declare function beforeWrite(ctx: ToolContext, abs: string): Promise<void>;
|
|
43
43
|
export declare function executeEdit(input: EditInput, ctx: ToolContext): Promise<ToolResult>;
|
|
44
44
|
export declare function createEditTool(): ToolDefinition<EditInput>;
|
package/dist/tools/edit.js
CHANGED
|
@@ -177,7 +177,7 @@ export function fileChangeOf(path, oldText, newText, firstChangedLine) {
|
|
|
177
177
|
// ---------------------------------------------------------------------------
|
|
178
178
|
// 工具
|
|
179
179
|
// ---------------------------------------------------------------------------
|
|
180
|
-
/** 检查点:写前备份(docs/rewind-plan.md §2);钩子按约定不抛,这里再兜一层,不让编辑失败。 */
|
|
180
|
+
/** 检查点:写前备份(docs/history/rewind-plan.md §2);钩子按约定不抛,这里再兜一层,不让编辑失败。 */
|
|
181
181
|
export async function beforeWrite(ctx, abs) {
|
|
182
182
|
if (ctx.checkpoint === undefined)
|
|
183
183
|
return;
|
package/dist/tools/grep.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 不相邻的组之间 `--`;匹配行截 500 字符;
|
|
7
7
|
* - 匹配数到 limit(缺省 100)即停并提示;整体输出再按 50 KB 头截断。
|
|
8
8
|
* - [S-A] `filesOnly`:只列命中文件(去重、按路径排序,每个文件命中一行即停),limit 按文件数计;
|
|
9
|
-
* 给模型在大仓库里先缩范围(docs/search-plan.md §4.2)。
|
|
9
|
+
* 给模型在大仓库里先缩范围(docs/design/search-plan.md §4.2)。
|
|
10
10
|
*/
|
|
11
11
|
import type { ToolContext, ToolDefinition, ToolResult } from "./types.js";
|
|
12
12
|
export interface GrepInput {
|
package/dist/tools/grep.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 不相邻的组之间 `--`;匹配行截 500 字符;
|
|
7
7
|
* - 匹配数到 limit(缺省 100)即停并提示;整体输出再按 50 KB 头截断。
|
|
8
8
|
* - [S-A] `filesOnly`:只列命中文件(去重、按路径排序,每个文件命中一行即停),limit 按文件数计;
|
|
9
|
-
* 给模型在大仓库里先缩范围(docs/search-plan.md §4.2)。
|
|
9
|
+
* 给模型在大仓库里先缩范围(docs/design/search-plan.md §4.2)。
|
|
10
10
|
*/
|
|
11
11
|
import { readFile, stat } from "node:fs/promises";
|
|
12
12
|
import { displayPath, resolvePath } from "./paths.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `read` 大文件的字节窗口读取(docs/memory-plan.md D1、§2.1)。[M-E]
|
|
2
|
+
* `read` 大文件的字节窗口读取(docs/history/memory-plan.md D1、§2.1)。[M-E]
|
|
3
3
|
*
|
|
4
4
|
* fd + 64 KiB 块顺序扫描,只解码 `[offset, offset + limit)` 内且累计不超过 `maxBytes`(多收一行)
|
|
5
5
|
* 的行,其余行只计数;口径与小文件路径(`splitBom` + `normalizeToLF` + 去末尾一个换行再 `split`)
|
package/dist/tools/read-lines.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `read` 大文件的字节窗口读取(docs/memory-plan.md D1、§2.1)。[M-E]
|
|
2
|
+
* `read` 大文件的字节窗口读取(docs/history/memory-plan.md D1、§2.1)。[M-E]
|
|
3
3
|
*
|
|
4
4
|
* fd + 64 KiB 块顺序扫描,只解码 `[offset, offset + limit)` 内且累计不超过 `maxBytes`(多收一行)
|
|
5
5
|
* 的行,其余行只计数;口径与小文件路径(`splitBom` + `normalizeToLF` + 去末尾一个换行再 `split`)
|
package/dist/tools/read.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface ReadToolOptions {
|
|
|
26
26
|
}
|
|
27
27
|
export declare function isBinary(buf: Buffer): boolean;
|
|
28
28
|
/**
|
|
29
|
-
* [S-A] read 收到目录时的下一步提示:只指向模型当前真能调用的工具(docs/search-plan.md §4.2)。
|
|
29
|
+
* [S-A] read 收到目录时的下一步提示:只指向模型当前真能调用的工具(docs/design/search-plan.md §4.2)。
|
|
30
30
|
* 活动集未知(宿主自建上下文)时沿用旧文案。
|
|
31
31
|
*/
|
|
32
32
|
export declare function directoryHint(shown: string, ctx: Pick<ToolContext, "activeTools">): string;
|
package/dist/tools/read.js
CHANGED
|
@@ -29,7 +29,7 @@ function error(message) {
|
|
|
29
29
|
return { content: message, isError: true };
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* [S-A] read 收到目录时的下一步提示:只指向模型当前真能调用的工具(docs/search-plan.md §4.2)。
|
|
32
|
+
* [S-A] read 收到目录时的下一步提示:只指向模型当前真能调用的工具(docs/design/search-plan.md §4.2)。
|
|
33
33
|
* 活动集未知(宿主自建上下文)时沿用旧文案。
|
|
34
34
|
*/
|
|
35
35
|
export function directoryHint(shown, ctx) {
|
package/dist/tools/task-ctl.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `task_ctl` 工具:查看 / 等待 / 停止后台子 Agent 任务,读输出,向任务追加消息
|
|
3
|
-
* (docs/wave5-plan.md §7.3,D13)。[W5-C0 桩 → W5-G]
|
|
3
|
+
* (docs/history/wave5-plan.md §7.3,D13)。[W5-C0 桩 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - 与 `task` 同进退(预设、`--tools`、`disable("task")`,见 registry.ts 的 `TOOL_COMPANIONS`);
|
|
6
6
|
* - 控制面按会话 id 取(agents/task-control.ts,注册表登记);子会话里(depth ≥ 1)不可用——工具表
|
package/dist/tools/task-ctl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `task_ctl` 工具:查看 / 等待 / 停止后台子 Agent 任务,读输出,向任务追加消息
|
|
3
|
-
* (docs/wave5-plan.md §7.3,D13)。[W5-C0 桩 → W5-G]
|
|
3
|
+
* (docs/history/wave5-plan.md §7.3,D13)。[W5-C0 桩 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - 与 `task` 同进退(预设、`--tools`、`disable("task")`,见 registry.ts 的 `TOOL_COMPANIONS`);
|
|
6
6
|
* - 控制面按会话 id 取(agents/task-control.ts,注册表登记);子会话里(depth ≥ 1)不可用——工具表
|
package/dist/tools/task.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `task` 工具:子 Agent 的统一入口(设计 §5.2、D14;第五波 docs/wave5-plan.md §7.3,D13、D23)。
|
|
2
|
+
* `task` 工具:子 Agent 的统一入口(设计 §5.2、D14;第五波 docs/history/wave5-plan.md §7.3,D13、D23)。
|
|
3
3
|
* [B3 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - `agent`:子 Agent 类型(内置 general / explore / plan、`.ama/agents/*.md`)或外部 Agent;缺省
|
|
@@ -55,7 +55,7 @@ export interface TaskToolOptions {
|
|
|
55
55
|
export declare const TASK_CONTEXT_LEAD: string;
|
|
56
56
|
/** 缺省前台(`-p`、`subagents.background: never`)时的描述。 */
|
|
57
57
|
export declare const FOREGROUND_DESCRIPTION: string;
|
|
58
|
-
/** [W7-B1] 缺省后台(交互 / RPC / ACP,docs/agents-concurrency-plan.md §2.6)时的描述。 */
|
|
58
|
+
/** [W7-B1] 缺省后台(交互 / RPC / ACP,docs/history/agents-concurrency-plan.md §2.6)时的描述。 */
|
|
59
59
|
export declare const BACKGROUND_DESCRIPTION: string;
|
|
60
60
|
/** 描述里类型清单的标题(清单本身另有 400 token 预算,见 agents/catalog.ts)。 */
|
|
61
61
|
export declare const TASK_AGENTS_HEADING = "\nAgents:\n";
|
package/dist/tools/task.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `task` 工具:子 Agent 的统一入口(设计 §5.2、D14;第五波 docs/wave5-plan.md §7.3,D13、D23)。
|
|
2
|
+
* `task` 工具:子 Agent 的统一入口(设计 §5.2、D14;第五波 docs/history/wave5-plan.md §7.3,D13、D23)。
|
|
3
3
|
* [B3 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - `agent`:子 Agent 类型(内置 general / explore / plan、`.ama/agents/*.md`)或外部 Agent;缺省
|
|
@@ -64,7 +64,7 @@ export const TASK_CONTEXT_LEAD = "Delegate to a sub-agent (fresh context: give f
|
|
|
64
64
|
/** 缺省前台(`-p`、`subagents.background: never`)时的描述。 */
|
|
65
65
|
export const FOREGROUND_DESCRIPTION = `${TASK_CONTEXT_LEAD} Returns its final report. Parallel in one reply; writers use isolation ` +
|
|
66
66
|
"worktree. background: returns a taskId (see task_ctl); taskId: continue it.";
|
|
67
|
-
/** [W7-B1] 缺省后台(交互 / RPC / ACP,docs/agents-concurrency-plan.md §2.6)时的描述。 */
|
|
67
|
+
/** [W7-B1] 缺省后台(交互 / RPC / ACP,docs/history/agents-concurrency-plan.md §2.6)时的描述。 */
|
|
68
68
|
export const BACKGROUND_DESCRIPTION = `${TASK_CONTEXT_LEAD} Runs in the background by default: returns a taskId; a ` +
|
|
69
69
|
"<task-notification> follows; keep working. background:false waits for the result. " +
|
|
70
70
|
"taskId: continue it. Parallel in one reply; writers use isolation worktree.";
|