@ai-devkit/agent-manager

中文文档
0.42.2发布于 2026/11/04Apache-2.0TypeScriptES Module近 30 天下载 2751

Standalone agent detection and management utilities for AI DevKit

原始使用文档
文档目录4 节
  1. What It Provides
  2. Typical Use
  3. Documentation
  4. License

@ai-devkit/agent-manager

Detect, inspect, and send prompts to running AI coding agent sessions.

This package powers the ai-devkit agent commands. Use it when you need the lower-level agent session management utilities that AI DevKit uses to find active Claude Code, Codex, Gemini CLI, and other supported coding-agent sessions.

What It Provides

  • Session detection — Find running agent sessions across supported providers
  • Session details — Inspect agent metadata, working directory, and status
  • Prompt sending — Send follow-up instructions to an existing session
  • Provider adapters — Shared adapter layer for agent-specific behavior
  • Terminal control — Discover, focus, and type into the terminal pane that hosts a running agent. Supported emulators: tmux, WezTerm, iTerm2, and macOS Terminal.app. Resolution is automatic from the agent PID's TTY.

Typical Use

Most users should use the CLI:

ai-devkit agent list
ai-devkit agent send "run the tests and report back" --id <agent-name> --wait
npm test 2>&1 | ai-devkit agent send --id <agent-name> --stdin

Claude Code can also be registered as a durable agent. Registration does not launch Claude; each send starts one synchronous process and later sends resume the same Claude session:

ai-devkit agent start --type claude --mode durable --name reviewer --cwd /path/to/project
ai-devkit agent send "review the current diff" --id reviewer

Durable mode inherits Claude Code's settings, permissions, hooks, MCP servers, and tool side effects for that working directory. AI DevKit adds no permission bypass or automatic retry, and prompts are delivered over stdin rather than command-line arguments. --timeout is not supported for durable agents in this first release.

Durable durable-agent state is stored in ~/.ai-devkit/agents.db. This feature was not released with JSON persistence, so there is no legacy import or dual-write.

For direct DurableAgentRepository consumers, dbPath selects the SQLite database. The lockTimeoutMs, incompleteLockGraceMs, and mutationLockStaleMs options are deprecated, accepted, and ignored because SQLite transactions replace the filesystem lock machinery.

Use this package directly only when building custom tooling around AI DevKit's agent detection and control surface.

Documentation

Full guides and workflow examples: ai-devkit.com/docs

License

Apache License 2.0

版本与发布记录

@ai-devkit/agent-manager 共发布 52 个版本,首次发布于 2026/02/25;过去 12 个月发布了 52 个版本。

版本发布日期距今
0.42.2latest2026/11/044 天前
0.42.12026/10/1226 天前
0.42.02026/10/1128 天前
0.41.02026/10/0929 天前
0.40.02026/10/0830 天前
0.39.02026/10/051 个月前

关于 @ai-devkit/agent-manager 的常见问题

@ai-devkit/agent-manager 是什么?

Standalone agent detection and management utilities for AI DevKit

如何安装 @ai-devkit/agent-manager?

在项目目录运行 npm install @ai-devkit/agent-manager,或使用 pnpm add / yarn add / bun add。

@ai-devkit/agent-manager 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ai-devkit/agent-manager 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ai-devkit/agent-manager 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.20.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ai-devkit/agent-manager 可以商用吗?

@ai-devkit/agent-manager 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@ai-devkit/agent-manager 的下载量有多少?

根据 npm 官方下载统计,@ai-devkit/agent-manager 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,751 次,日均约 92 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ai-devkit/agent-manager 还在维护吗?

最新版本 0.42.2 发布于 2026/11/04(4 天前);至今共发布 52 个版本,其中过去 12 个月发布了 52 个;首次发布于 2026/02/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。