@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama config get | set | unset | list` (docs/wave6-plan.md §6.4, D24-D26). [W6-S]
|
|
2
|
+
* `ama config get | set | unset | list` (docs/history/wave6-plan.md §6.4, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* Thin layer over config/edit.ts (the `/config` panel uses the same core):
|
|
5
5
|
* - `get <key> [--json]`: effective value, source layer and apply tier;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama config get | set | unset | list` (docs/wave6-plan.md §6.4, D24-D26). [W6-S]
|
|
2
|
+
* `ama config get | set | unset | list` (docs/history/wave6-plan.md §6.4, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* Thin layer over config/edit.ts (the `/config` panel uses the same core):
|
|
5
5
|
* - `get <key> [--json]`: effective value, source layer and apply tier;
|
|
@@ -231,7 +231,7 @@ function proxySection(report, io) {
|
|
|
231
231
|
for (const line of describeProxy(inspectProxy(io.env)))
|
|
232
232
|
report.item(line);
|
|
233
233
|
}
|
|
234
|
-
/** 检查点备份占用(docs/rewind-plan.md §1.4)。 */
|
|
234
|
+
/** 检查点备份占用(docs/history/rewind-plan.md §1.4)。 */
|
|
235
235
|
async function fileHistoryLine(report, dataDir) {
|
|
236
236
|
try {
|
|
237
237
|
const usage = await blobUsage(dataDir);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama init [--force]`(docs/providers.md「配置目录」):建配置目录与缺省文件,逐个报告状态。
|
|
2
|
+
* `ama init [--force]`(docs/guides/providers.md「配置目录」):建配置目录与缺省文件,逐个报告状态。
|
|
3
3
|
*/
|
|
4
4
|
import { describeInit, initConfigDir, initNextSteps } from "../../config/init.js";
|
|
5
5
|
import { resolveConfigDir } from "../../config/paths.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama memory list|show|edit|rm|path|enable|disable`(docs/wave6-plan.md §3.5)。[W6-M]
|
|
2
|
+
* `ama memory list|show|edit|rm|path|enable|disable`(docs/history/wave6-plan.md §3.5)。[W6-M]
|
|
3
3
|
*
|
|
4
4
|
* - 作用域按用户级配置(`memory.scopes`,缺省 user + project);项目作用域以 cwd 定位,需项目已受信任
|
|
5
5
|
* (trust.json 记录),否则跳过并提示。`memory.enabled` 为 false 时照样能看、能改(条目保留但不使用)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama memory list|show|edit|rm|path|enable|disable`(docs/wave6-plan.md §3.5)。[W6-M]
|
|
2
|
+
* `ama memory list|show|edit|rm|path|enable|disable`(docs/history/wave6-plan.md §3.5)。[W6-M]
|
|
3
3
|
*
|
|
4
4
|
* - 作用域按用户级配置(`memory.scopes`,缺省 user + project);项目作用域以 cwd 定位,需项目已受信任
|
|
5
5
|
* (trust.json 记录),否则跳过并提示。`memory.enabled` 为 false 时照样能看、能改(条目保留但不使用)。
|
|
@@ -87,7 +87,7 @@ async function check(io, registry, ref) {
|
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* `ama models refresh [--provider <id>[,<id>…]]`:显式联网拉 models.dev,按内置快照的清单裁剪,
|
|
90
|
-
* 写用户级覆盖 `<dataDir>/models-dev.json`(docs/providers.md「模型元数据」)。启动与其它命令不联网。
|
|
90
|
+
* 写用户级覆盖 `<dataDir>/models-dev.json`(docs/guides/providers.md「模型元数据」)。启动与其它命令不联网。
|
|
91
91
|
*/
|
|
92
92
|
const REFRESH_ACTION = {
|
|
93
93
|
usage: "ama models refresh [--provider <id>[,<id>…]]",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama providers list|channels|remove`(docs/providers.md「一键接入」):供应商 → 渠道 → 模型数与 key 来源
|
|
2
|
+
* `ama providers list|channels|remove`(docs/guides/providers.md「一键接入」):供应商 → 渠道 → 模型数与 key 来源
|
|
3
3
|
* (从不显示 key);remove 删配置条目(先备份)与 auth.json 里该供应商及其渠道的 key。
|
|
4
4
|
*/
|
|
5
5
|
import { type Ctx } from "./providers.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama providers list|channels|remove`(docs/providers.md「一键接入」):供应商 → 渠道 → 模型数与 key 来源
|
|
2
|
+
* `ama providers list|channels|remove`(docs/guides/providers.md「一键接入」):供应商 → 渠道 → 模型数与 key 来源
|
|
3
3
|
* (从不显示 key);remove 删配置条目(先备份)与 auth.json 里该供应商及其渠道的 key。
|
|
4
4
|
*/
|
|
5
5
|
import { apiShortName } from "../../ai/providers/channels.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama providers add|list|channels|remove|refresh`(docs/providers.md「一键接入」「渠道」)。
|
|
2
|
+
* `ama providers add|list|channels|remove|refresh`(docs/guides/providers.md「一键接入」「渠道」)。
|
|
3
3
|
*
|
|
4
4
|
* - add:只给 baseUrl 与 key,列出中转的模型(`GET /models`)、用 models.dev 补元数据、可选逐渠道
|
|
5
5
|
* 探测,把渠道与模型追加进用户级 config.json(先备份);key 从 stdin 读(不回显)存 auth.json,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama providers add|list|channels|remove|refresh`(docs/providers.md「一键接入」「渠道」)。
|
|
2
|
+
* `ama providers add|list|channels|remove|refresh`(docs/guides/providers.md「一键接入」「渠道」)。
|
|
3
3
|
*
|
|
4
4
|
* - add:只给 baseUrl 与 key,列出中转的模型(`GET /models`)、用 models.dev 补元数据、可选逐渠道
|
|
5
5
|
* 探测,把渠道与模型追加进用户级 config.json(先备份);key 从 stdin 读(不回显)存 auth.json,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - `--format md|json|jsonl`(缺省 md);`--branch leaf|all`(缺省 leaf = 当前分支);
|
|
5
5
|
* - `--output <文件>`:写文件(0600,已存在则覆盖),否则写 stdout;
|
|
6
|
-
* - 导出内容先脱敏(session/redact.ts),格式说明见 docs/sessions.md「导出」。
|
|
6
|
+
* - 导出内容先脱敏(session/redact.ts),格式说明见 docs/guides/sessions.md「导出」。
|
|
7
7
|
*/
|
|
8
8
|
import type { CliIo } from "../deps.js";
|
|
9
9
|
export declare function sessionsExportUsage(): string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - `--format md|json|jsonl`(缺省 md);`--branch leaf|all`(缺省 leaf = 当前分支);
|
|
5
5
|
* - `--output <文件>`:写文件(0600,已存在则覆盖),否则写 stdout;
|
|
6
|
-
* - 导出内容先脱敏(session/redact.ts),格式说明见 docs/sessions.md「导出」。
|
|
6
|
+
* - 导出内容先脱敏(session/redact.ts),格式说明见 docs/guides/sessions.md「导出」。
|
|
7
7
|
*/
|
|
8
8
|
import { writeFileSync } from "node:fs";
|
|
9
9
|
import { join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama sessions trace <id|文件>`:会话轨迹导出(docs/wave6-plan.md §2.5、D7)。[W6-T2]
|
|
2
|
+
* `ama sessions trace <id|文件>`:会话轨迹导出(docs/history/wave6-plan.md §2.5、D7)。[W6-T2]
|
|
3
3
|
*
|
|
4
4
|
* - 缺省 / `--html [文件]` / `--format html`:自包含 HTML(`trace/html.ts`);`--json` / `--format json`:与 RPC
|
|
5
5
|
* `get_trace` 同形的 JSON(全部回合、已加载子会话、`previews` 只含本会话节点;`--no-content` 时没有)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ama sessions trace <id|文件>`:会话轨迹导出(docs/wave6-plan.md §2.5、D7)。[W6-T2]
|
|
2
|
+
* `ama sessions trace <id|文件>`:会话轨迹导出(docs/history/wave6-plan.md §2.5、D7)。[W6-T2]
|
|
3
3
|
*
|
|
4
4
|
* - 缺省 / `--html [文件]` / `--format html`:自包含 HTML(`trace/html.ts`);`--json` / `--format json`:与 RPC
|
|
5
5
|
* `get_trace` 同形的 JSON(全部回合、已加载子会话、`previews` 只含本会话节点;`--no-content` 时没有)。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - show <id>:头信息 + 条目类型统计 + 首条提示 + 用户消息编号(`--from <id>#<编号>` 复用)。
|
|
7
7
|
* - search / export / trace:见 sessions-search.ts、sessions-export.ts、sessions-trace.ts(只读扫描,不经会话存储)。
|
|
8
8
|
* - prune [--older-than <天>] [--dry-run]:缺省 30 天,移到 trash(不删除);之后清理检查点备份
|
|
9
|
-
* (未被任何会话引用且超过 1 天的 blob,docs/rewind-plan.md §1.4)与超过 7 天的剪贴板图片
|
|
9
|
+
* (未被任何会话引用且超过 1 天的 blob,docs/history/rewind-plan.md §1.4)与超过 7 天的剪贴板图片
|
|
10
10
|
* (`<数据目录>/clipboard/`,W5-I),`--dry-run` 时只报告。
|
|
11
11
|
*/
|
|
12
12
|
import type { CliIo, RuntimeDeps } from "../deps.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - show <id>:头信息 + 条目类型统计 + 首条提示 + 用户消息编号(`--from <id>#<编号>` 复用)。
|
|
7
7
|
* - search / export / trace:见 sessions-search.ts、sessions-export.ts、sessions-trace.ts(只读扫描,不经会话存储)。
|
|
8
8
|
* - prune [--older-than <天>] [--dry-run]:缺省 30 天,移到 trash(不删除);之后清理检查点备份
|
|
9
|
-
* (未被任何会话引用且超过 1 天的 blob,docs/rewind-plan.md §1.4)与超过 7 天的剪贴板图片
|
|
9
|
+
* (未被任何会话引用且超过 1 天的 blob,docs/history/rewind-plan.md §1.4)与超过 7 天的剪贴板图片
|
|
10
10
|
* (`<数据目录>/clipboard/`,W5-I),`--dry-run` 时只报告。
|
|
11
11
|
*/
|
|
12
12
|
import { join, resolve } from "node:path";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - 时间:`--since` / `--until` 接受 `7d`(含今天的最近 7 天)、`today`、`YYYY-MM-DD`(本地日期,含当天)。
|
|
6
6
|
* - 分组:`--by day|week|month|provider|channel|model|project`。
|
|
7
7
|
* - 缓存:`<数据目录>/stats-index.json`,按文件 mtime / size 失效;`--no-cache` 不读也不写。
|
|
8
|
-
* - 口径见 session/stats-aggregate.ts 与 docs/sessions.md「统计」。
|
|
8
|
+
* - 口径见 session/stats-aggregate.ts 与 docs/guides/sessions.md「统计」。
|
|
9
9
|
*/
|
|
10
10
|
import { type StatsReport } from "../../session/stats-aggregate.js";
|
|
11
11
|
import type { CliIo } from "../deps.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - 时间:`--since` / `--until` 接受 `7d`(含今天的最近 7 天)、`today`、`YYYY-MM-DD`(本地日期,含当天)。
|
|
6
6
|
* - 分组:`--by day|week|month|provider|channel|model|project`。
|
|
7
7
|
* - 缓存:`<数据目录>/stats-index.json`,按文件 mtime / size 失效;`--no-cache` 不读也不写。
|
|
8
|
-
* - 口径见 session/stats-aggregate.ts 与 docs/sessions.md「统计」。
|
|
8
|
+
* - 口径见 session/stats-aggregate.ts 与 docs/guides/sessions.md「统计」。
|
|
9
9
|
*/
|
|
10
10
|
import { join, resolve } from "node:path";
|
|
11
11
|
import { expandHome, resolveDataDir } from "../../config/paths.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - 命令行:`<node> --max-old-space-size=<MB> --permission --allow-fs-read=<入口>
|
|
5
5
|
* --disallow-code-generation-from-strings <入口> --ama-codemode-sandbox`;堆上限取 `codemode.maxHeapMb`
|
|
6
|
-
* (缺省 256,0 不加),超出时子进程 OOM 退出,映射为脚本错误(docs/memory-plan.md D10);Node 22.0–22.12 用 `--experimental-permission`。不授予文件写、
|
|
6
|
+
* (缺省 256,0 不加),超出时子进程 OOM 退出,映射为脚本错误(docs/history/memory-plan.md D10);Node 22.0–22.12 用 `--experimental-permission`。不授予文件写、
|
|
7
7
|
* 子进程、worker、addon、inspector 权限;以空环境启动(拿不到密钥与会话路径);嵌入 Electron
|
|
8
8
|
* 时设 `ELECTRON_RUN_AS_NODE=1` 运行同一可执行文件。
|
|
9
9
|
* - 入口:bundle 里是 ama.cjs 同目录的 `ama-sandbox.cjs`(构建脚本定义 `__AMA_SANDBOX_ENTRY__`);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* (完整门禁);名字是 `codemode` 直接拒绝。脚本结束时 abort 仍在跑的调用。
|
|
14
14
|
* - 超时:父进程计时,到点杀子进程树(POSIX 进程组 / Windows taskkill);外层 abort:先发
|
|
15
15
|
* `abort`,宽限后杀树。
|
|
16
|
-
* - OS 沙箱(docs/sandbox.md):有可用的 sandbox-exec / bwrap / unshare 时,整条命令行经它启动,拒绝
|
|
16
|
+
* - OS 沙箱(docs/guides/sandbox.md):有可用的 sandbox-exec / bwrap / unshare 时,整条命令行经它启动,拒绝
|
|
17
17
|
* 网络与一切写入(`CODEMODE_OS_POLICY`;子进程本来就没有写权限)。Node 22 / 24 的 strict 依赖这一层
|
|
18
18
|
* (`requireOsSandbox`),包装不了就报错,不裸跑;Node ≥ 25 是叠加的纵深防御。
|
|
19
19
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - 命令行:`<node> --max-old-space-size=<MB> --permission --allow-fs-read=<入口>
|
|
5
5
|
* --disallow-code-generation-from-strings <入口> --ama-codemode-sandbox`;堆上限取 `codemode.maxHeapMb`
|
|
6
|
-
* (缺省 256,0 不加),超出时子进程 OOM 退出,映射为脚本错误(docs/memory-plan.md D10);Node 22.0–22.12 用 `--experimental-permission`。不授予文件写、
|
|
6
|
+
* (缺省 256,0 不加),超出时子进程 OOM 退出,映射为脚本错误(docs/history/memory-plan.md D10);Node 22.0–22.12 用 `--experimental-permission`。不授予文件写、
|
|
7
7
|
* 子进程、worker、addon、inspector 权限;以空环境启动(拿不到密钥与会话路径);嵌入 Electron
|
|
8
8
|
* 时设 `ELECTRON_RUN_AS_NODE=1` 运行同一可执行文件。
|
|
9
9
|
* - 入口:bundle 里是 ama.cjs 同目录的 `ama-sandbox.cjs`(构建脚本定义 `__AMA_SANDBOX_ENTRY__`);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* (完整门禁);名字是 `codemode` 直接拒绝。脚本结束时 abort 仍在跑的调用。
|
|
14
14
|
* - 超时:父进程计时,到点杀子进程树(POSIX 进程组 / Windows taskkill);外层 abort:先发
|
|
15
15
|
* `abort`,宽限后杀树。
|
|
16
|
-
* - OS 沙箱(docs/sandbox.md):有可用的 sandbox-exec / bwrap / unshare 时,整条命令行经它启动,拒绝
|
|
16
|
+
* - OS 沙箱(docs/guides/sandbox.md):有可用的 sandbox-exec / bwrap / unshare 时,整条命令行经它启动,拒绝
|
|
17
17
|
* 网络与一切写入(`CODEMODE_OS_POLICY`;子进程本来就没有写权限)。Node 22 / 24 的 strict 依赖这一层
|
|
18
18
|
* (`requireOsSandbox`),包装不了就报错,不裸跑;Node ≥ 25 是叠加的纵深防御。
|
|
19
19
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 单请求图片总量预算(docs/wave5-plan.md §4、D11)。[W5-I] 纯函数,无模型调用。
|
|
2
|
+
* 单请求图片总量预算(docs/history/wave5-plan.md §4、D11)。[W5-I] 纯函数,无模型调用。
|
|
3
3
|
*
|
|
4
4
|
* base64 图片在历史里每轮重发,几张截图就可能撞上 Anthropic 32 MB / Gemini 20 MB 的请求上限。
|
|
5
5
|
* `planImageBudget` 给出要降级的消息:调用方把每条写成 `context_edit{reason:"image_budget"}`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 单请求图片总量预算(docs/wave5-plan.md §4、D11)。[W5-I] 纯函数,无模型调用。
|
|
2
|
+
* 单请求图片总量预算(docs/history/wave5-plan.md §4、D11)。[W5-I] 纯函数,无模型调用。
|
|
3
3
|
*
|
|
4
4
|
* base64 图片在历史里每轮重发,几张截图就可能撞上 Anthropic 32 MB / Gemini 20 MB 的请求上限。
|
|
5
5
|
* `planImageBudget` 给出要降级的消息:调用方把每条写成 `context_edit{reason:"image_budget"}`,
|
package/dist/config/edit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Settings edit core (docs/wave6-plan.md §6.2, D24-D26). [W6-S]
|
|
2
|
+
* Settings edit core (docs/history/wave6-plan.md §6.2, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* Shared by the `/config` panel, `/config key=value` and `ama config get | set | unset | list`:
|
|
5
5
|
* - `readSnapshot()` reads the user and project files fresh and merges them with the profile / command
|
package/dist/config/edit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Settings edit core (docs/wave6-plan.md §6.2, D24-D26). [W6-S]
|
|
2
|
+
* Settings edit core (docs/history/wave6-plan.md §6.2, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* Shared by the `/config` panel, `/config key=value` and `ama config get | set | unset | list`:
|
|
5
5
|
* - `readSnapshot()` reads the user and project files fresh and merges them with the profile / command
|
package/dist/config/init.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 配置目录初始化(docs/providers.md「配置目录」):`ama init` 与 CLI 首次运行的自动初始化。
|
|
2
|
+
* 配置目录初始化(docs/guides/providers.md「配置目录」):`ama init` 与 CLI 首次运行的自动初始化。
|
|
3
3
|
*
|
|
4
4
|
* - 目录 0700;`config.json` 只在不存在时写最小内容(`--force` 时先备份再重写):只有 `$schema`、
|
|
5
5
|
* `version` 与空 `providers`,不写死任何缺省值——缺省值以后调整(例如 codemode 跟随预设)对老用户
|
package/dist/config/init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 配置目录初始化(docs/providers.md「配置目录」):`ama init` 与 CLI 首次运行的自动初始化。
|
|
2
|
+
* 配置目录初始化(docs/guides/providers.md「配置目录」):`ama init` 与 CLI 首次运行的自动初始化。
|
|
3
3
|
*
|
|
4
4
|
* - 目录 0700;`config.json` 只在不存在时写最小内容(`--force` 时先备份再重写):只有 `$schema`、
|
|
5
5
|
* `version` 与空 `providers`,不写死任何缺省值——缺省值以后调整(例如 codemode 跟随预设)对老用户
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* config.json 的 JSON Schema(draft-07 子集),写到配置目录的 `config.schema.json` 给编辑器补全与校验
|
|
3
|
-
* (docs/providers.md「配置目录」)。规则与 schema.ts 的 `validateConfig` 一一对应:未知字段在那里是
|
|
3
|
+
* (docs/guides/providers.md「配置目录」)。规则与 schema.ts 的 `validateConfig` 一一对应:未知字段在那里是
|
|
4
4
|
* warning、这里是 `additionalProperties: false`;渠道引用(模型 `channels` 指向已定义的渠道)这类跨字段
|
|
5
5
|
* 规则 JSON Schema 表达不了,只在 `validateConfig` 里查。一致性由 json-schema.test.ts 的正反例守住。
|
|
6
6
|
* 顶层与各段的键(供应商内部除外)的 description / default 来自 key-docs.ts(`annotate`);说明跟随界面
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
type Schema = Record<string, unknown>;
|
|
10
10
|
export declare const CONFIG_SCHEMA_FILE = "config.schema.json";
|
|
11
|
-
export declare const CONFIG_SCHEMA_ID = "https://github.com/
|
|
11
|
+
export declare const CONFIG_SCHEMA_ID = "https://github.com/AMA-Link/armadra-agent/config.schema.json";
|
|
12
12
|
/** 生成 config.json 的 JSON Schema。 */
|
|
13
13
|
export declare function buildConfigJsonSchema(): Schema;
|
|
14
14
|
/** 写进文件的文本(2 空格缩进 + 换行结尾)。 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* config.json 的 JSON Schema(draft-07 子集),写到配置目录的 `config.schema.json` 给编辑器补全与校验
|
|
3
|
-
* (docs/providers.md「配置目录」)。规则与 schema.ts 的 `validateConfig` 一一对应:未知字段在那里是
|
|
3
|
+
* (docs/guides/providers.md「配置目录」)。规则与 schema.ts 的 `validateConfig` 一一对应:未知字段在那里是
|
|
4
4
|
* warning、这里是 `additionalProperties: false`;渠道引用(模型 `channels` 指向已定义的渠道)这类跨字段
|
|
5
5
|
* 规则 JSON Schema 表达不了,只在 `validateConfig` 里查。一致性由 json-schema.test.ts 的正反例守住。
|
|
6
6
|
* 顶层与各段的键(供应商内部除外)的 description / default 来自 key-docs.ts(`annotate`);说明跟随界面
|
|
@@ -15,7 +15,7 @@ import { CACHE_RETENTIONS, CHANNEL_NAME_PATTERN, CHECKPOINT_MODES, SANDBOX_ENABL
|
|
|
15
15
|
import { AGENT_ID_PATTERN } from "./schema-w5.js";
|
|
16
16
|
import { AGENTS_RESERVED_KEYS, SUBAGENT_BACKGROUND_MODES } from "./types-w5.js";
|
|
17
17
|
export const CONFIG_SCHEMA_FILE = "config.schema.json";
|
|
18
|
-
export const CONFIG_SCHEMA_ID = "https://github.com/
|
|
18
|
+
export const CONFIG_SCHEMA_ID = "https://github.com/AMA-Link/armadra-agent/config.schema.json";
|
|
19
19
|
const KNOWN_APIS = [
|
|
20
20
|
"openai-completions",
|
|
21
21
|
"openai-responses",
|
package/dist/config/schema-w5.js
CHANGED
package/dist/config/schema-w6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Settings registry (docs/wave6-plan.md §6.1, D24-D26). [W6-S]
|
|
2
|
+
* Settings registry (docs/history/wave6-plan.md §6.1, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* One row per key that the `/config` panel and `ama config set` treat as a scalar setting: group, apply
|
|
5
5
|
* tier (now / next session / restart), whether it changes the cache prefix, project-level writability
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Settings registry (docs/wave6-plan.md §6.1, D24-D26). [W6-S]
|
|
2
|
+
* Settings registry (docs/history/wave6-plan.md §6.1, D24-D26). [W6-S]
|
|
3
3
|
*
|
|
4
4
|
* One row per key that the `/config` panel and `ama config set` treat as a scalar setting: group, apply
|
|
5
5
|
* tier (now / next session / restart), whether it changes the cache prefix, project-level writability
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第五波配置键的形状(docs/wave5-plan.md §9)。[W5-C0] 契约文件:C0 只定形状、校验(schema-w5.ts)、
|
|
2
|
+
* 第五波配置键的形状(docs/history/wave5-plan.md §9)。[W5-C0] 契约文件:C0 只定形状、校验(schema-w5.ts)、
|
|
3
3
|
* 说明与缺省(key-docs.ts)、JSON Schema;行为由各批次实现,未实现前这些键被接受但不起作用。
|
|
4
4
|
*
|
|
5
5
|
* 层级:项目级只接受 `plan.bash`(只能更严)、`reminders`、`ui.statusLine`(随 `ui` 段);其余只认
|
|
@@ -59,7 +59,7 @@ export interface AgentsConfig {
|
|
|
59
59
|
}
|
|
60
60
|
/** 取 `agents.<id>`(保留键返回 undefined)。 */
|
|
61
61
|
export declare function agentEntry(agents: AgentsConfig | undefined, agentId: string): AgentEntryConfig | undefined;
|
|
62
|
-
/** [W7-B2] 子 Agent 缺省前台还是后台(docs/agents-concurrency-plan.md §2.6)。 */
|
|
62
|
+
/** [W7-B2] 子 Agent 缺省前台还是后台(docs/history/agents-concurrency-plan.md §2.6)。 */
|
|
63
63
|
export declare const SUBAGENT_BACKGROUND_MODES: readonly ["auto", "always", "never"];
|
|
64
64
|
export type SubagentBackgroundMode = (typeof SUBAGENT_BACKGROUND_MODES)[number];
|
|
65
65
|
/** [W5-G] ama 自己的子会话。 */
|
package/dist/config/types-w5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第五波配置键的形状(docs/wave5-plan.md §9)。[W5-C0] 契约文件:C0 只定形状、校验(schema-w5.ts)、
|
|
2
|
+
* 第五波配置键的形状(docs/history/wave5-plan.md §9)。[W5-C0] 契约文件:C0 只定形状、校验(schema-w5.ts)、
|
|
3
3
|
* 说明与缺省(key-docs.ts)、JSON Schema;行为由各批次实现,未实现前这些键被接受但不起作用。
|
|
4
4
|
*
|
|
5
5
|
* 层级:项目级只接受 `plan.bash`(只能更严)、`reminders`、`ui.statusLine`(随 `ui` 段);其余只认
|
|
@@ -18,7 +18,7 @@ export function agentEntry(agents, agentId) {
|
|
|
18
18
|
const entry = agents[agentId];
|
|
19
19
|
return typeof entry === "object" && !Array.isArray(entry) ? entry : undefined;
|
|
20
20
|
}
|
|
21
|
-
/** [W7-B2] 子 Agent 缺省前台还是后台(docs/agents-concurrency-plan.md §2.6)。 */
|
|
21
|
+
/** [W7-B2] 子 Agent 缺省前台还是后台(docs/history/agents-concurrency-plan.md §2.6)。 */
|
|
22
22
|
export const SUBAGENT_BACKGROUND_MODES = ["auto", "always", "never"];
|
|
23
23
|
/** `models.enabled` 的一项:`provider/model[@channel]` 或 `provider/*`。 */
|
|
24
24
|
export const MODELS_ENABLED_REF = /^[^/\s]+\/\S+$/;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第六波配置键的形状(docs/wave6-plan.md §7、§1.3、§3.1、§4.3、§4.4、§5.2)。[W6-C0] 契约文件:C0 只定形状、
|
|
2
|
+
* 第六波配置键的形状(docs/history/wave6-plan.md §7、§1.3、§3.1、§4.3、§4.4、§5.2)。[W6-C0] 契约文件:C0 只定形状、
|
|
3
3
|
* 校验(schema-w6.ts)、说明与缺省(key-docs.ts)、JSON Schema;行为由各批次实现,未实现前这些键被接受但不起作用。
|
|
4
4
|
*
|
|
5
5
|
* 层级(merge.ts):项目级可设 `ui.language`、`ui.agentBar`,`memory` 只接受 `enabled: false`;`ui.replyLanguage`、
|
|
6
6
|
* `memory` 其余键、`auth` 只认用户级 / profile(项目级忽略并 warning)。
|
|
7
7
|
*/
|
|
8
|
-
/** `ui.language`:auto 按 `LC_ALL` / `LC_MESSAGES` / `LANG` 判断,判断不出用 en(docs/i18n.md)。 */
|
|
8
|
+
/** `ui.language`:auto 按 `LC_ALL` / `LC_MESSAGES` / `LANG` 判断,判断不出用 en(docs/guides/i18n.md)。 */
|
|
9
9
|
export type LanguageSetting = "auto" | "zh" | "en";
|
|
10
10
|
export declare const LANGUAGE_SETTINGS: readonly LanguageSetting[];
|
|
11
11
|
/** [W6-A] Agent 栏:auto 有任务时显示;off 不显示(嵌入宿主缺省 off)。 */
|
|
@@ -27,7 +27,7 @@ export interface UiConfigW6 {
|
|
|
27
27
|
export type MemoryScopeName = "user" | "project";
|
|
28
28
|
export declare const MEMORY_SCOPES: readonly MemoryScopeName[];
|
|
29
29
|
export declare const MEMORY_SUBAGENT_MODES: readonly ["off", "read"];
|
|
30
|
-
/** [W6-M] `memory` 段(docs/wave6-plan.md §3.1)。缺省关闭;关闭时系统提示、工具表、请求体逐字节不变。 */
|
|
30
|
+
/** [W6-M] `memory` 段(docs/history/wave6-plan.md §3.1)。缺省关闭;关闭时系统提示、工具表、请求体逐字节不变。 */
|
|
31
31
|
export interface MemoryConfig {
|
|
32
32
|
/** 总开关,缺省 false;项目级只能设为 false;`--memory` / `--no-memory`、`AMA_MEMORY=0|1` 覆盖。 */
|
|
33
33
|
enabled?: boolean;
|
|
@@ -42,7 +42,7 @@ export interface MemoryConfig {
|
|
|
42
42
|
/** 子会话:read(缺省,写命令执行层拒绝)/ off(view 也拒绝)。 */
|
|
43
43
|
subagents?: (typeof MEMORY_SUBAGENT_MODES)[number];
|
|
44
44
|
}
|
|
45
|
-
/** [W6-O] ChatGPT 登录的两条路径(docs/wave6-plan.md §4.1、D13)。 */
|
|
45
|
+
/** [W6-O] ChatGPT 登录的两条路径(docs/history/wave6-plan.md §4.1、D13)。 */
|
|
46
46
|
export type ChatGptFlavor = "siwc" | "codex";
|
|
47
47
|
export declare const CHATGPT_FLAVORS: readonly ChatGptFlavor[];
|
|
48
48
|
/** [W6-O] `auth.chatgpt`:不含密钥;只认用户级 / profile。 */
|
|
@@ -85,7 +85,7 @@ export interface ApiKeyAuthEntry {
|
|
|
85
85
|
baseUrl?: string;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* [W6-O] auth.json 里的 OAuth 条目(docs/wave6-plan.md §4.3、D15)。token 与 id_token 原文绝不进日志、错误、
|
|
88
|
+
* [W6-O] auth.json 里的 OAuth 条目(docs/history/wave6-plan.md §4.3、D15)。token 与 id_token 原文绝不进日志、错误、
|
|
89
89
|
* 事件、会话;`describeAuthFile` 只给 `{ kind: "oauth", flavor, plan, expiresIn, needsLogin }`。
|
|
90
90
|
*/
|
|
91
91
|
export interface OAuthAuthEntry {
|
package/dist/config/types-w6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第六波配置键的形状(docs/wave6-plan.md §7、§1.3、§3.1、§4.3、§4.4、§5.2)。[W6-C0] 契约文件:C0 只定形状、
|
|
2
|
+
* 第六波配置键的形状(docs/history/wave6-plan.md §7、§1.3、§3.1、§4.3、§4.4、§5.2)。[W6-C0] 契约文件:C0 只定形状、
|
|
3
3
|
* 校验(schema-w6.ts)、说明与缺省(key-docs.ts)、JSON Schema;行为由各批次实现,未实现前这些键被接受但不起作用。
|
|
4
4
|
*
|
|
5
5
|
* 层级(merge.ts):项目级可设 `ui.language`、`ui.agentBar`,`memory` 只接受 `enabled: false`;`ui.replyLanguage`、
|
package/dist/config/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* hooks.json 的形状是 `HookConfig`(hooks/types.ts)。
|
|
8
8
|
* (W3-C0)第三波:`cache` 段(§1.12,只认用户级 / profile);`ModelConfig` / `ModelOverride`
|
|
9
9
|
* 允许模型级 `api`(§2.3,同一中转的模型走不同协议),由 W3-B12 在注册表里生效。
|
|
10
|
-
* (W5-C0)第五波配置键(docs/wave5-plan.md §9):新段的形状在 types-w5.ts(`AmaConfigW5` 并入
|
|
10
|
+
* (W5-C0)第五波配置键(docs/history/wave5-plan.md §9):新段的形状在 types-w5.ts(`AmaConfigW5` 并入
|
|
11
11
|
* `AmaConfig`),已有段加 `ui.statusLine`、`compaction.prune / pruneExclude`、profile `agentDirs`。
|
|
12
12
|
*/
|
|
13
13
|
import type { WarmingMode } from "../ai/cache/types.js";
|
|
@@ -27,13 +27,13 @@ export declare const CONFIG_FILE_VERSION: 1;
|
|
|
27
27
|
*/
|
|
28
28
|
export type ModelConfig = Partial<Omit<Model, "id" | "provider" | "channel" | "channels">> & {
|
|
29
29
|
id: string;
|
|
30
|
-
/** 挂载的渠道名,第一个是首选;缺省 `defaultChannel`(docs/providers.md「渠道」)。 */
|
|
30
|
+
/** 挂载的渠道名,第一个是首选;缺省 `defaultChannel`(docs/guides/providers.md「渠道」)。 */
|
|
31
31
|
channels?: string[];
|
|
32
32
|
/** models.dev 条目 `provider/model`(显式匹配);false 关闭 models.dev 补全。 */
|
|
33
33
|
modelsDev?: string | false;
|
|
34
34
|
/**
|
|
35
35
|
* [ME-C0] 从内置目录继承模型固有属性:缺省按 id 别名自动匹配;`"provider/id"` 显式指定;false 关闭
|
|
36
|
-
* (docs/model-efficiency-plan.md D10,实现归 ME-D)。
|
|
36
|
+
* (docs/history/model-efficiency-plan.md D10,实现归 ME-D)。
|
|
37
37
|
*/
|
|
38
38
|
catalog?: string | false;
|
|
39
39
|
};
|
|
@@ -63,7 +63,7 @@ export interface ProviderConfig {
|
|
|
63
63
|
headers?: Record<string, string>;
|
|
64
64
|
compat?: ProviderCompat;
|
|
65
65
|
requiresApiKey?: boolean;
|
|
66
|
-
/** 多渠道(docs/providers.md「渠道」);不写时 `api` + `baseUrl` 是隐式的 `default` 渠道。 */
|
|
66
|
+
/** 多渠道(docs/guides/providers.md「渠道」);不写时 `api` + `baseUrl` 是隐式的 `default` 渠道。 */
|
|
67
67
|
channels?: Record<string, ChannelConfig>;
|
|
68
68
|
/** 缺省 `channels` 的第一个键。 */
|
|
69
69
|
defaultChannel?: string;
|
|
@@ -206,7 +206,7 @@ export declare const MIN_CONTEXT_BUDGET = 32768;
|
|
|
206
206
|
export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 180000;
|
|
207
207
|
export declare const CHECKPOINT_MODES: readonly CheckpointMode[];
|
|
208
208
|
/**
|
|
209
|
-
* 检查点(docs/rewind-plan.md §5)。环境变量 `AMA_CHECKPOINTS` 覆盖 `mode`;项目级只接受
|
|
209
|
+
* 检查点(docs/history/rewind-plan.md §5)。环境变量 `AMA_CHECKPOINTS` 覆盖 `mode`;项目级只接受
|
|
210
210
|
* `mode: "off"` 与调小 `maxFileBytes`(只能收紧)。
|
|
211
211
|
*/
|
|
212
212
|
export interface CheckpointsConfig {
|
|
@@ -222,7 +222,7 @@ export declare const SANDBOX_ENABLED_MODES: readonly ("auto" | "off")[];
|
|
|
222
222
|
/** [S2] `sandbox.network` 的取值。 */
|
|
223
223
|
export declare const SANDBOX_NETWORK_MODES: readonly ("deny" | "allow")[];
|
|
224
224
|
/**
|
|
225
|
-
* 操作系统级沙箱(docs/sandbox.md)。只认用户级 / profile;项目级只接受收紧的 `network: "deny"`,其余忽略
|
|
225
|
+
* 操作系统级沙箱(docs/guides/sandbox.md)。只认用户级 / profile;项目级只接受收紧的 `network: "deny"`,其余忽略
|
|
226
226
|
* 并 warning。环境变量 `AMA_SANDBOX=off` 覆盖 `enabled`。
|
|
227
227
|
*/
|
|
228
228
|
export interface SandboxConfig {
|
package/dist/config/types.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* hooks.json 的形状是 `HookConfig`(hooks/types.ts)。
|
|
8
8
|
* (W3-C0)第三波:`cache` 段(§1.12,只认用户级 / profile);`ModelConfig` / `ModelOverride`
|
|
9
9
|
* 允许模型级 `api`(§2.3,同一中转的模型走不同协议),由 W3-B12 在注册表里生效。
|
|
10
|
-
* (W5-C0)第五波配置键(docs/wave5-plan.md §9):新段的形状在 types-w5.ts(`AmaConfigW5` 并入
|
|
10
|
+
* (W5-C0)第五波配置键(docs/history/wave5-plan.md §9):新段的形状在 types-w5.ts(`AmaConfigW5` 并入
|
|
11
11
|
* `AmaConfig`),已有段加 `ui.statusLine`、`compaction.prune / pruneExclude`、profile `agentDirs`。
|
|
12
12
|
*/
|
|
13
13
|
export { AGENT_BAR_MODES, CHATGPT_FLAVORS, LANGUAGE_SETTINGS, MEMORY_SCOPES, MEMORY_SUBAGENT_MODES, apiKeyEntry, isOAuthEntry, } from "./types-w6.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AcpDriver:经 ACP 驱动外部 Agent(docs/wave5-plan.md §5.1–§5.2,D14)。[W5-E]
|
|
2
|
+
* AcpDriver:经 ACP 驱动外部 Agent(docs/history/wave5-plan.md §5.1–§5.2,D14)。[W5-E]
|
|
3
3
|
*
|
|
4
4
|
* open:起进程 → `initialize` → 续聊优先 `session/resume`(不回放),其次 `session/load`
|
|
5
5
|
* (回放的历史通知在 open 期间丢弃),都不支持则新开并发 notice「已新开」→ 按 ama 模式
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AcpDriver:经 ACP 驱动外部 Agent(docs/wave5-plan.md §5.1–§5.2,D14)。[W5-E]
|
|
2
|
+
* AcpDriver:经 ACP 驱动外部 Agent(docs/history/wave5-plan.md §5.1–§5.2,D14)。[W5-E]
|
|
3
3
|
*
|
|
4
4
|
* open:起进程 → `initialize` → 续聊优先 `session/resume`(不回放),其次 `session/load`
|
|
5
5
|
* (回放的历史通知在 open 期间丢弃),都不支持则新开并发 notice「已新开」→ 按 ama 模式
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ACP(Agent Client Protocol)v1 的子集类型(docs/wave5-plan.md §5.1,D14)。[W5-E]
|
|
2
|
+
* ACP(Agent Client Protocol)v1 的子集类型(docs/history/wave5-plan.md §5.1,D14)。[W5-E]
|
|
3
3
|
*
|
|
4
4
|
* 手写、零依赖;只收 ama 作为客户端(驱动外部 Agent)与服务端(`ama --mode acp`)两侧用到的部分:
|
|
5
5
|
* `initialize`、`authenticate`、`session/new|load|resume|list|close`、`session/prompt|cancel|set_mode|set_config_option`、
|