@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,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 会话的可变设置:模型、思考级别、工具表与活动集、系统提示静态部分(从 session.ts 搬出,
|
|
3
|
-
* docs/wave5-plan.md §9「session.ts → session-settings.ts」)。[W5-C0]
|
|
3
|
+
* docs/history/wave5-plan.md §9「session.ts → session-settings.ts」)。[W5-C0]
|
|
4
4
|
*
|
|
5
5
|
* 纯搬迁:`setModel / setThinkingLevel / setPermissionMode / setActiveTools / addTool /
|
|
6
6
|
* updateSystem / announceStart / getTools` 的行为与事件顺序不变;`AgentSessionImpl` 以同名成员转发。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 会话的可变设置:模型、思考级别、工具表与活动集、系统提示静态部分(从 session.ts 搬出,
|
|
3
|
-
* docs/wave5-plan.md §9「session.ts → session-settings.ts」)。[W5-C0]
|
|
3
|
+
* docs/history/wave5-plan.md §9「session.ts → session-settings.ts」)。[W5-C0]
|
|
4
4
|
*
|
|
5
5
|
* 纯搬迁:`setModel / setThinkingLevel / setPermissionMode / setActiveTools / addTool /
|
|
6
6
|
* updateSystem / announceStart / getTools` 的行为与事件顺序不变;`AgentSessionImpl` 以同名成员转发。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent(设计 §5.2 task、D14;第五波 docs/wave5-plan.md §7,D22–D24):`ToolContext.spawnSubagent`
|
|
2
|
+
* 子 Agent(设计 §5.2 task、D14;第五波 docs/history/wave5-plan.md §7,D22–D24):`ToolContext.spawnSubagent`
|
|
3
3
|
* 的实现与 ama 自己的 runner(`AmaRunner`)。[B2 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - `runSubagent`:交给会话的任务注册表(subagent-registry.ts)——类型解析、并发池、前台 / 后台、
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent(设计 §5.2 task、D14;第五波 docs/wave5-plan.md §7,D22–D24):`ToolContext.spawnSubagent`
|
|
2
|
+
* 子 Agent(设计 §5.2 task、D14;第五波 docs/history/wave5-plan.md §7,D22–D24):`ToolContext.spawnSubagent`
|
|
3
3
|
* 的实现与 ama 自己的 runner(`AmaRunner`)。[B2 → W5-G]
|
|
4
4
|
*
|
|
5
5
|
* - `runSubagent`:交给会话的任务注册表(subagent-registry.ts)——类型解析、并发池、前台 / 后台、
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 轨迹写入(docs/wave6-plan.md §2.2、D5)。[W6-C0]
|
|
2
|
+
* 轨迹写入(docs/history/wave6-plan.md §2.2、D5)。[W6-C0]
|
|
3
3
|
*
|
|
4
4
|
* 会话扩展:订阅事件,把计时写成 `custom{customType:"ama.trace"}` 条目(`trace/types.ts` 的 `TraceEntryData`)。
|
|
5
5
|
* - `step`:每个 turn 请求一条(成功、失败、被重试掉的都写),在 `turn_end` 时写——此时 assistant 与该批
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 轨迹写入(docs/wave6-plan.md §2.2、D5)。[W6-C0]
|
|
2
|
+
* 轨迹写入(docs/history/wave6-plan.md §2.2、D5)。[W6-C0]
|
|
3
3
|
*
|
|
4
4
|
* 会话扩展:订阅事件,把计时写成 `custom{customType:"ama.trace"}` 条目(`trace/types.ts` 的 `TraceEntryData`)。
|
|
5
5
|
* - `step`:每个 turn 请求一条(成功、失败、被重试掉的都写),在 `turn_end` 时写——此时 assistant 与该批
|
package/dist/agent/session.js
CHANGED
|
@@ -369,7 +369,7 @@ export class AgentSessionImpl {
|
|
|
369
369
|
return Promise.reject(new AmaError("busy", "cannot compact while running"));
|
|
370
370
|
return this.startCycle((signal) => this.compaction.compactManual(instructions, signal, cutAt));
|
|
371
371
|
}
|
|
372
|
-
// [RW-B] 回滚(docs/rewind-plan.md §3;编排与校验在 session-rewind.ts)
|
|
372
|
+
// [RW-B] 回滚(docs/history/rewind-plan.md §3;编排与校验在 session-rewind.ts)
|
|
373
373
|
rewindPoints = () => this.rewinder.points();
|
|
374
374
|
rewind = (request) => this.rewinder.rewind(request);
|
|
375
375
|
summarizeFrom = (entryId, instructions) => this.rewinder.summarizeFrom(entryId, instructions);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 的后台化(docs/agents-concurrency-plan.md §2.3、§2.5–§2.6)。[W7-B1]
|
|
2
|
+
* 子 Agent 的后台化(docs/history/agents-concurrency-plan.md §2.3、§2.5–§2.6)。[W7-B1]
|
|
3
3
|
*
|
|
4
4
|
* 从 subagent-registry.ts 拆出(保持 ≤ 600 行):
|
|
5
5
|
* - `resolveTaskBackground`:`subagents.background`(auto / always / never)→ 本会话 `task` 的缺省;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 的后台化(docs/agents-concurrency-plan.md §2.3、§2.5–§2.6)。[W7-B1]
|
|
2
|
+
* 子 Agent 的后台化(docs/history/agents-concurrency-plan.md §2.3、§2.5–§2.6)。[W7-B1]
|
|
3
3
|
*
|
|
4
4
|
* 从 subagent-registry.ts 拆出(保持 ≤ 600 行):
|
|
5
5
|
* - `resolveTaskBackground`:`subagents.background`(auto / always / never)→ 本会话 `task` 的缺省;
|
|
@@ -18,7 +18,7 @@ export const SECTION_ORDER = [
|
|
|
18
18
|
"rules",
|
|
19
19
|
"project_context",
|
|
20
20
|
"skills",
|
|
21
|
-
// [W6-C0] 记忆索引(W6-M,docs/wave6-plan.md §3.4);未开启时为 undefined,字节不变
|
|
21
|
+
// [W6-C0] 记忆索引(W6-M,docs/history/wave6-plan.md §3.4);未开启时为 undefined,字节不变
|
|
22
22
|
"memory",
|
|
23
23
|
"hooks",
|
|
24
24
|
"cwd",
|
package/dist/agent/types-w5.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第五波会话契约(docs/wave5-plan.md §1.3、§5.4、§6.3、§6.5、§7.5、§8.3;[W5-C0])。
|
|
2
|
+
* 第五波会话契约(docs/history/wave5-plan.md §1.3、§5.4、§6.3、§6.5、§7.5、§8.3;[W5-C0])。
|
|
3
3
|
*
|
|
4
4
|
* 这里放新增事件的载荷与 `SessionStats` 的扩展形状,由 agent/types.ts 并入 `SessionEvent` /
|
|
5
5
|
* `SessionStats` 并再导出(agent/types.ts 已接近 600 行)。全部是新增事件与可选字段:
|
|
@@ -81,7 +81,7 @@ export interface SubagentEndEvent {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* [W7-B1] 前台任务转后台(docs/agents-concurrency-plan.md §2.5):`user` = 人(TUI `Ctrl+B` 等),
|
|
84
|
+
* [W7-B1] 前台任务转后台(docs/history/agents-concurrency-plan.md §2.5):`user` = 人(TUI `Ctrl+B` 等),
|
|
85
85
|
* `timeout` = `subagents.autoBackgroundAfterMs` 到时,`host` = 宿主 / SDK(`session.backgroundTask`)。
|
|
86
86
|
*/
|
|
87
87
|
export interface SubagentBackgroundEvent {
|
package/dist/agent/types-w5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第五波会话契约(docs/wave5-plan.md §1.3、§5.4、§6.3、§6.5、§7.5、§8.3;[W5-C0])。
|
|
2
|
+
* 第五波会话契约(docs/history/wave5-plan.md §1.3、§5.4、§6.3、§6.5、§7.5、§8.3;[W5-C0])。
|
|
3
3
|
*
|
|
4
4
|
* 这里放新增事件的载荷与 `SessionStats` 的扩展形状,由 agent/types.ts 并入 `SessionEvent` /
|
|
5
5
|
* `SessionStats` 并再导出(agent/types.ts 已接近 600 行)。全部是新增事件与可选字段:
|
package/dist/agent/types-w6.d.ts
CHANGED
package/dist/agent/types-w6.js
CHANGED
package/dist/agent/types.d.ts
CHANGED
|
@@ -423,7 +423,7 @@ export interface AgentSession {
|
|
|
423
423
|
followUp: string[];
|
|
424
424
|
};
|
|
425
425
|
/**
|
|
426
|
-
* [W7-B1] 阻塞中的前台子 Agent 任务转后台(不给 taskId = 全部;docs/agents-concurrency-plan.md §2.5)。
|
|
426
|
+
* [W7-B1] 阻塞中的前台子 Agent 任务转后台(不给 taskId = 全部;docs/history/agents-concurrency-plan.md §2.5)。
|
|
427
427
|
* `reason` 缺省 `"host"`(宿主 / SDK);TUI 的人工操作传 `"user"`。返回被转后台或被打断等待的 taskId。
|
|
428
428
|
*/
|
|
429
429
|
backgroundTask(taskId?: string, reason?: "user" | "timeout" | "host"): string[];
|
package/dist/agent/worktree.d.ts
CHANGED
package/dist/agent/worktree.js
CHANGED
package/dist/agents/builtin.d.ts
CHANGED
package/dist/agents/builtin.js
CHANGED
package/dist/agents/catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 类型目录:内置 ⊕ 发现的定义 ⊕ 外部 runner(docs/wave5-plan.md §7.1–§7.3、§7.6)。[W5-G]
|
|
2
|
+
* 子 Agent 类型目录:内置 ⊕ 发现的定义 ⊕ 外部 runner(docs/history/wave5-plan.md §7.1–§7.3、§7.6)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* - 发现的同名定义覆盖内置类型(不 warning);外部 runner(W5-E 的 ProcessRunner、宿主 runner)以
|
|
5
5
|
* `add()` 登记,名字已存在时保留先登记者。
|
package/dist/agents/catalog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 类型目录:内置 ⊕ 发现的定义 ⊕ 外部 runner(docs/wave5-plan.md §7.1–§7.3、§7.6)。[W5-G]
|
|
2
|
+
* 子 Agent 类型目录:内置 ⊕ 发现的定义 ⊕ 外部 runner(docs/history/wave5-plan.md §7.1–§7.3、§7.6)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* - 发现的同名定义覆盖内置类型(不 warning);外部 runner(W5-E 的 ProcessRunner、宿主 runner)以
|
|
5
5
|
* `add()` 登记,名字已存在时保留先登记者。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 定义发现(docs/wave5-plan.md §7.1,D22)。[W5-G]
|
|
2
|
+
* 子 Agent 定义发现(docs/history/wave5-plan.md §7.1,D22)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* 顺序:`--agent-dir`(可重复,profile `agentDirs` 由启动步骤并在其后)→ config `agents.dirs` →
|
|
5
5
|
* `<configDir>/agents/*.md`(用户级)→ `<cwd>/.ama/agents/*.md`(项目级,需信任;未信任跳过并记入
|
package/dist/agents/discover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 定义发现(docs/wave5-plan.md §7.1,D22)。[W5-G]
|
|
2
|
+
* 子 Agent 定义发现(docs/history/wave5-plan.md §7.1,D22)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* 顺序:`--agent-dir`(可重复,profile `agentDirs` 由启动步骤并在其后)→ config `agents.dirs` →
|
|
5
5
|
* `<configDir>/agents/*.md`(用户级)→ `<cwd>/.ama/agents/*.md`(项目级,需信任;未信任跳过并记入
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 外部 Agent 接入 `task(agent=…)`(docs/wave5-plan.md §5.3–§5.5、§7.3、§7.6,D13、D15、D17)。[W5-EG]
|
|
2
|
+
* 外部 Agent 接入 `task(agent=…)`(docs/history/wave5-plan.md §5.3–§5.5、§7.3、§7.6,D13、D15、D17)。[W5-EG]
|
|
3
3
|
*
|
|
4
4
|
* - 名字:`claude` / `codex` / `acp:<program>` / 驱动表里的其它 id(`gemini` …,`ama` 除外——那是子会话
|
|
5
5
|
* 类型的 runner 名;ama 自己经 ACP 用 `acp:ama`)/ 宿主注入的 runner id(宿主注入的 `ama` 在类型里的 runner
|
package/dist/agents/external.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 外部 Agent 接入 `task(agent=…)`(docs/wave5-plan.md §5.3–§5.5、§7.3、§7.6,D13、D15、D17)。[W5-EG]
|
|
2
|
+
* 外部 Agent 接入 `task(agent=…)`(docs/history/wave5-plan.md §5.3–§5.5、§7.3、§7.6,D13、D15、D17)。[W5-EG]
|
|
3
3
|
*
|
|
4
4
|
* - 名字:`claude` / `codex` / `acp:<program>` / 驱动表里的其它 id(`gemini` …,`ama` 除外——那是子会话
|
|
5
5
|
* 类型的 runner 名;ama 自己经 ACP 用 `acp:ama`)/ 宿主注入的 runner id(宿主注入的 `ama` 在类型里的 runner
|
package/dist/agents/parse.d.ts
CHANGED
package/dist/agents/parse.js
CHANGED
package/dist/agents/result.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 结果的上限、落盘与通知文本(docs/wave5-plan.md §7.4,D23–D24)。[W5-G]
|
|
2
|
+
* 子 Agent 结果的上限、落盘与通知文本(docs/history/wave5-plan.md §7.4,D23–D24)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* - 结果 > 50 KB(UTF-8 字节)保留头 70% + 尾 30%,中间一行说明省略了多少、全文在哪;
|
|
5
5
|
* - 后台任务完成后以 `<task-notification>` 作为 followUp 投递给父会话(系统提示 rules 里由 task
|
package/dist/agents/result.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 结果的上限、落盘与通知文本(docs/wave5-plan.md §7.4,D23–D24)。[W5-G]
|
|
2
|
+
* 子 Agent 结果的上限、落盘与通知文本(docs/history/wave5-plan.md §7.4,D23–D24)。[W5-G]
|
|
3
3
|
*
|
|
4
4
|
* - 结果 > 50 KB(UTF-8 字节)保留头 70% + 尾 30%,中间一行说明省略了多少、全文在哪;
|
|
5
5
|
* - 后台任务完成后以 `<task-notification>` 作为 followUp 投递给父会话(系统提示 rules 里由 task
|
|
@@ -63,7 +63,7 @@ export function taskNotification(input) {
|
|
|
63
63
|
attrs.push(`outputFile="${attr(input.outputFile)}"`);
|
|
64
64
|
return `<task-notification ${attrs.join(" ")}>\n${input.report}\n</task-notification>`;
|
|
65
65
|
}
|
|
66
|
-
// [W7-B1] 后台任务的固定英文文案(docs/agents-concurrency-plan.md §2.5;工具结果不进缓存前缀,但要
|
|
66
|
+
// [W7-B1] 后台任务的固定英文文案(docs/history/agents-concurrency-plan.md §2.5;工具结果不进缓存前缀,但要
|
|
67
67
|
// 稳定,便于测试与模型学习)。
|
|
68
68
|
export const NOTIFY_HINT = "A <task-notification> arrives when it finishes; use task_ctl to wait, stop or read output.";
|
|
69
69
|
export function startedText(taskId, agent) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 子 Agent 任务记录:并发池、单条任务的状态、runner 进度 → `subagent_update`、父会话
|
|
3
|
-
* `custom{ama.task}` 快照的写入形状与 resume 重建(docs/wave5-plan.md §7.4–§7.5)。[W5-G]
|
|
3
|
+
* `custom{ama.task}` 快照的写入形状与 resume 重建(docs/history/wave5-plan.md §7.4–§7.5)。[W5-G]
|
|
4
4
|
* 编排在 agent/subagent-registry.ts。
|
|
5
5
|
*/
|
|
6
6
|
import type { SessionTaskStats, SubagentStartEvent, SubagentUpdateEvent } from "../agent/types-w5.js";
|
|
@@ -42,7 +42,7 @@ export interface AmaRunnerSpec {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* [W6-C0] 外部 Agent 的展示事件(`DriverEvent` 派生,子 Agent 视图用):只在内存环形缓冲里(≤ 2000 条 /
|
|
45
|
-
* 1 MB),不落盘(docs/wave6-plan.md §1.2、D2)。
|
|
45
|
+
* 1 MB),不落盘(docs/history/wave6-plan.md §1.2、D2)。
|
|
46
46
|
*/
|
|
47
47
|
export interface ExternalDisplayEvent {
|
|
48
48
|
at: number;
|
|
@@ -72,7 +72,7 @@ export type TaskHandle = RunnerHandle & {
|
|
|
72
72
|
*/
|
|
73
73
|
message?(text: string, when: "followUp" | "send" | "interrupt"): Promise<void>;
|
|
74
74
|
};
|
|
75
|
-
/** [W6-A] 外部 Agent 环形缓冲的上限(docs/wave6-plan.md D2)。 */
|
|
75
|
+
/** [W6-A] 外部 Agent 环形缓冲的上限(docs/history/wave6-plan.md D2)。 */
|
|
76
76
|
export declare const RING_MAX_EVENTS = 2000;
|
|
77
77
|
export declare const RING_MAX_BYTES: number;
|
|
78
78
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 子 Agent 任务记录:并发池、单条任务的状态、runner 进度 → `subagent_update`、父会话
|
|
3
|
-
* `custom{ama.task}` 快照的写入形状与 resume 重建(docs/wave5-plan.md §7.4–§7.5)。[W5-G]
|
|
3
|
+
* `custom{ama.task}` 快照的写入形状与 resume 重建(docs/history/wave5-plan.md §7.4–§7.5)。[W5-G]
|
|
4
4
|
* 编排在 agent/subagent-registry.ts。
|
|
5
5
|
*/
|
|
6
6
|
import { AmaError } from "../errors.js";
|
|
@@ -44,7 +44,7 @@ export class SubagentPool {
|
|
|
44
44
|
this.waiters[0]?.();
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
/** [W6-A] 外部 Agent 环形缓冲的上限(docs/wave6-plan.md D2)。 */
|
|
47
|
+
/** [W6-A] 外部 Agent 环形缓冲的上限(docs/history/wave6-plan.md D2)。 */
|
|
48
48
|
export const RING_MAX_EVENTS = 2000;
|
|
49
49
|
export const RING_MAX_BYTES = 1024 * 1024;
|
|
50
50
|
/**
|
package/dist/agents/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 定义契约(docs/wave5-plan.md §7.1–§7.2,D22)。[W5-C0] 契约文件,发现与解析归 W5-G。
|
|
2
|
+
* 子 Agent 定义契约(docs/history/wave5-plan.md §7.1–§7.2,D22)。[W5-C0] 契约文件,发现与解析归 W5-G。
|
|
3
3
|
*
|
|
4
4
|
* 定义文件:`--agent-dir`(可重复)→ profile `agentDirs` → `~/.config/ama/agents/*.md` →
|
|
5
5
|
* `<cwd>/.ama/agents/*.md`(需信任);frontmatter 与 Skill 同风格(kebab-case),正文追加到子会话
|
package/dist/agents/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 子 Agent 定义契约(docs/wave5-plan.md §7.1–§7.2,D22)。[W5-C0] 契约文件,发现与解析归 W5-G。
|
|
2
|
+
* 子 Agent 定义契约(docs/history/wave5-plan.md §7.1–§7.2,D22)。[W5-C0] 契约文件,发现与解析归 W5-G。
|
|
3
3
|
*
|
|
4
4
|
* 定义文件:`--agent-dir`(可重复)→ profile `agentDirs` → `~/.config/ama/agents/*.md` →
|
|
5
5
|
* `<cwd>/.ama/agents/*.md`(需信任);frontmatter 与 Skill 同风格(kebab-case),正文追加到子会话
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* anthropic-messages 的 compat 推断([W5-M2],docs/wave5-plan.md §3.1、D10):按请求主机给缺省。
|
|
2
|
+
* anthropic-messages 的 compat 推断([W5-M2],docs/history/wave5-plan.md §3.1、D10):按请求主机给缺省。
|
|
3
3
|
*
|
|
4
4
|
* 顺序:保守缺省 ← 主机表(`model.baseUrl` 的主机名子串,先命中先用)← `provider.compat` ←
|
|
5
5
|
* `model.compat`(字段级覆盖,undefined 不覆盖)。registry 物化后的模型已把供应商 / 渠道 compat 合进
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* - OpenRouter:流式 usage 只出现在 `message_delta`,`applyAnthropicUsage` 本就按非 null 字段合并,
|
|
15
15
|
* 不需要开关(anthropic-compat.test.ts 核对)。
|
|
16
16
|
*
|
|
17
|
-
* 表里每一项都对应厂商文档或实测(docs/research/R1-models-protocols.md §2.1、docs/providers.md「渠道实测」)。
|
|
17
|
+
* 表里每一项都对应厂商文档或实测(docs/research/R1-models-protocols.md §2.1、docs/guides/providers.md「渠道实测」)。
|
|
18
18
|
*/
|
|
19
19
|
import type { AnthropicMessagesCompat, Model, ProviderData } from "../types.js";
|
|
20
20
|
export type ResolvedAnthropicCompat = Required<AnthropicMessagesCompat>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* anthropic-messages 的 compat 推断([W5-M2],docs/wave5-plan.md §3.1、D10):按请求主机给缺省。
|
|
2
|
+
* anthropic-messages 的 compat 推断([W5-M2],docs/history/wave5-plan.md §3.1、D10):按请求主机给缺省。
|
|
3
3
|
*
|
|
4
4
|
* 顺序:保守缺省 ← 主机表(`model.baseUrl` 的主机名子串,先命中先用)← `provider.compat` ←
|
|
5
5
|
* `model.compat`(字段级覆盖,undefined 不覆盖)。registry 物化后的模型已把供应商 / 渠道 compat 合进
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* - OpenRouter:流式 usage 只出现在 `message_delta`,`applyAnthropicUsage` 本就按非 null 字段合并,
|
|
15
15
|
* 不需要开关(anthropic-compat.test.ts 核对)。
|
|
16
16
|
*
|
|
17
|
-
* 表里每一项都对应厂商文档或实测(docs/research/R1-models-protocols.md §2.1、docs/providers.md「渠道实测」)。
|
|
17
|
+
* 表里每一项都对应厂商文档或实测(docs/research/R1-models-protocols.md §2.1、docs/guides/providers.md「渠道实测」)。
|
|
18
18
|
*/
|
|
19
19
|
export const ANTHROPIC_COMPAT_KEYS = [
|
|
20
20
|
"supportsCacheControlOnTools",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - `sendPromptCacheKey`、`supportsLongCacheRetention`:按 `HOST_CACHE_CAPABILITIES`([W5-M2],官方
|
|
6
6
|
* 文档写明支持的主机才开;其余主机——含全部中转——缺省关)。`sendPromptCacheKey` 只对 OpenAI 两条线有意义;
|
|
7
7
|
* - `sendSessionAffinityHeaders`、`supportsExplicitPromptCacheMode`:缺省一律关(实测中转都接受
|
|
8
|
-
* 但未见命中提升,OpenRouter 未实测,见 docs/providers.md「缓存」);
|
|
8
|
+
* 但未见命中提升,OpenRouter 未实测,见 docs/guides/providers.md「缓存」);
|
|
9
9
|
* - `cacheReporting`:`auto`。
|
|
10
10
|
* 显式 `model.compat`(registry 已把 provider.compat 合进来)逐字段覆盖推断。
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - `sendPromptCacheKey`、`supportsLongCacheRetention`:按 `HOST_CACHE_CAPABILITIES`([W5-M2],官方
|
|
6
6
|
* 文档写明支持的主机才开;其余主机——含全部中转——缺省关)。`sendPromptCacheKey` 只对 OpenAI 两条线有意义;
|
|
7
7
|
* - `sendSessionAffinityHeaders`、`supportsExplicitPromptCacheMode`:缺省一律关(实测中转都接受
|
|
8
|
-
* 但未见命中提升,OpenRouter 未实测,见 docs/providers.md「缓存」);
|
|
8
|
+
* 但未见命中提升,OpenRouter 未实测,见 docs/guides/providers.md「缓存」);
|
|
9
9
|
* - `cacheReporting`:`auto`。
|
|
10
10
|
* 显式 `model.compat`(registry 已把 provider.compat 合进来)逐字段覆盖推断。
|
|
11
11
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* openai-responses 的 ChatGPT 订阅后端(compat `chatgptBackend`;docs/wave6-plan.md §4.1、§4.6、D14、D17)。[W6-O]
|
|
2
|
+
* openai-responses 的 ChatGPT 订阅后端(compat `chatgptBackend`;docs/history/wave6-plan.md §4.1、§4.6、D14、D17)。[W6-O]
|
|
3
3
|
*
|
|
4
4
|
* - 请求体:强制 `store:false`、`stream:true`、`input` 数组;按后端删禁用字段(SIWC 15 个;codex 5 个,保留
|
|
5
5
|
* `prompt_cache_key`);SIWC 不发 `role:"system"` item(改 developer);`instructionsMode: "developer-message"`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* openai-responses 的 ChatGPT 订阅后端(compat `chatgptBackend`;docs/wave6-plan.md §4.1、§4.6、D14、D17)。[W6-O]
|
|
2
|
+
* openai-responses 的 ChatGPT 订阅后端(compat `chatgptBackend`;docs/history/wave6-plan.md §4.1、§4.6、D14、D17)。[W6-O]
|
|
3
3
|
*
|
|
4
4
|
* - 请求体:强制 `store:false`、`stream:true`、`input` 数组;按后端删禁用字段(SIWC 15 个;codex 5 个,保留
|
|
5
5
|
* `prompt_cache_key`);SIWC 不发 `role:"system"` item(改 developer);`instructionsMode: "developer-message"`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ChatGPT 订阅配额解析(docs/wave6-plan.md §4.1 配额行、D17;R6 §1.2 配额三行)。[W6-O]
|
|
2
|
+
* ChatGPT 订阅配额解析(docs/history/wave6-plan.md §4.1 配额行、D17;R6 §1.2 配额三行)。[W6-O]
|
|
3
3
|
*
|
|
4
4
|
* - 响应头(codex flavor):`x-codex-primary-used-percent` / `-window-minutes` / `-reset-at`(epoch 秒),
|
|
5
5
|
* `secondary` 同形;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ChatGPT 订阅配额解析(docs/wave6-plan.md §4.1 配额行、D17;R6 §1.2 配额三行)。[W6-O]
|
|
2
|
+
* ChatGPT 订阅配额解析(docs/history/wave6-plan.md §4.1 配额行、D17;R6 §1.2 配额三行)。[W6-O]
|
|
3
3
|
*
|
|
4
4
|
* - 响应头(codex flavor):`x-codex-primary-used-percent` / `-window-minutes` / `-reset-at`(epoch 秒),
|
|
5
5
|
* `secondary` 同形;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `max_tokens` 的主动收紧与被动修正(docs/model-efficiency-plan.md §1.9、D9)。[ME-C]
|
|
2
|
+
* `max_tokens` 的主动收紧与被动修正(docs/history/model-efficiency-plan.md §1.9、D9)。[ME-C]
|
|
3
3
|
*
|
|
4
4
|
* - 主动收紧:窗口已知时 `max_tokens = min(请求值, max(MIN_OUTPUT_TOKENS, 窗口 − 估算输入 − 余量))`,
|
|
5
5
|
* 输入按请求体字符 / 4 估算(本模块自带,不依赖 compaction/)。预算型思考(`fixed`)不收紧:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `max_tokens` 的主动收紧与被动修正(docs/model-efficiency-plan.md §1.9、D9)。[ME-C]
|
|
2
|
+
* `max_tokens` 的主动收紧与被动修正(docs/history/model-efficiency-plan.md §1.9、D9)。[ME-C]
|
|
3
3
|
*
|
|
4
4
|
* - 主动收紧:窗口已知时 `max_tokens = min(请求值, max(MIN_OUTPUT_TOKENS, 窗口 − 估算输入 − 余量))`,
|
|
5
5
|
* 输入按请求体字符 / 4 估算(本模块自带,不依赖 compaction/)。预算型思考(`fixed`)不收紧:
|
package/dist/ai/apis/shared.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare function finishDone(stream: AssistantEventStreamImpl, tracker: Bl
|
|
|
52
52
|
/** 出错或中止:关块、写 errorMessage、发 error(signal 已中止 → aborted)。 */
|
|
53
53
|
export declare function finishError(stream: AssistantEventStreamImpl, tracker: BlockTracker, model: Model, error: unknown, signal: AbortSignal): void;
|
|
54
54
|
/**
|
|
55
|
-
* 供应商以安全理由拒答(Anthropic `stop_reason: "refusal"`,docs/acp-plan.md D12):消息照旧以
|
|
55
|
+
* 供应商以安全理由拒答(Anthropic `stop_reason: "refusal"`,docs/history/acp-plan.md D12):消息照旧以
|
|
56
56
|
* `error` 收尾(TUI / print / 重试的口径不变),`rawStopReason` 记原值;需要区分的消费者(ACP 的
|
|
57
57
|
* `refusal` 停止原因)用 {@link stopReasonOf}。这是 `refusal` 的唯一映射处。[ACP-B]
|
|
58
58
|
*/
|
package/dist/ai/apis/shared.js
CHANGED
|
@@ -189,7 +189,7 @@ export function finishError(stream, tracker, model, error, signal) {
|
|
|
189
189
|
stream.push({ type: "error", reason: aborted ? "aborted" : "error", message: output });
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* 供应商以安全理由拒答(Anthropic `stop_reason: "refusal"`,docs/acp-plan.md D12):消息照旧以
|
|
192
|
+
* 供应商以安全理由拒答(Anthropic `stop_reason: "refusal"`,docs/history/acp-plan.md D12):消息照旧以
|
|
193
193
|
* `error` 收尾(TUI / print / 重试的口径不变),`rawStopReason` 记原值;需要区分的消费者(ACP 的
|
|
194
194
|
* `refusal` 停止原因)用 {@link stopReasonOf}。这是 `refusal` 的唯一映射处。[ACP-B]
|
|
195
195
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 图片 base64 按内容哈希驻留(docs/memory-plan.md D5、§2.5)。
|
|
2
|
+
* 图片 base64 按内容哈希驻留(docs/history/memory-plan.md D5、§2.5)。
|
|
3
3
|
*
|
|
4
4
|
* `WeakRef` 的目标不能是字符串,所以驻留单元是 `ImageBlock`:表为 `Map<键, WeakRef<ImageBlock>>`,
|
|
5
5
|
* 键 = `mimeType` + base64 字符串的 sha256;`FinalizationRegistry` 在 block 被回收后清键。命中时返回
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { ImageBlock } from "./types.js";
|
|
12
12
|
/**
|
|
13
|
-
* 会话条目的最小形状:ai 不 import session(docs/design.md §1.1),`SessionEntry[]` 可直接传入。
|
|
13
|
+
* 会话条目的最小形状:ai 不 import session(docs/design/design.md §1.1),`SessionEntry[]` 可直接传入。
|
|
14
14
|
* 只有 `type === "message"` 且 `message.content` 为数组的条目里的 `image` 块参与驻留。
|
|
15
15
|
*/
|
|
16
16
|
export interface ImageCarrier {
|
package/dist/ai/image-intern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 图片 base64 按内容哈希驻留(docs/memory-plan.md D5、§2.5)。
|
|
2
|
+
* 图片 base64 按内容哈希驻留(docs/history/memory-plan.md D5、§2.5)。
|
|
3
3
|
*
|
|
4
4
|
* `WeakRef` 的目标不能是字符串,所以驻留单元是 `ImageBlock`:表为 `Map<键, WeakRef<ImageBlock>>`,
|
|
5
5
|
* 键 = `mimeType` + base64 字符串的 sha256;`FinalizationRegistry` 在 block 被回收后清键。命中时返回
|
package/dist/ai/image-limits.js
CHANGED
package/dist/ai/json-body.d.ts
CHANGED
package/dist/ai/json-body.js
CHANGED