agent-aimail

中文文档
0.2.9发布于 2026/11/03MITTypeScriptES Module构建来源已验证

AIMail agent mail SDK — single package for OpenClaw / dsh (DeepSeek Harness) / Pi hosts. Host detection at startup, per-host activation. 14 mail tools, inbound delivery (HMAC), board/skill resources, agent-level addressing.

原始使用文档
文档目录4 节
  1. Install (host-native, no CLI required)
  2. Host identification
  3. Layout
  4. Exports

agent-aimail

AIMail's single TypeScript SDK package. One package serves all Node.js agent hosts: the shared core (gateway client, 15 mail tools, inbound preprocess chain, HMAC verification, auto-bind) plus a host adapter for each supported platform.

Install (host-native, no CLI required)

Each host installs the same package; the package identifies its host environment on startup and branches:

# OpenClaw (gateway plugin)
openclaw plugins install agent-aimail --force --accept-capabilities

# dsh (deepseek-harness, self-mounting bundle)
dsh plugin --profile web add agent-aimail

# pi (earendil-works/pi-coding-agent, extension)
pi install npm:agent-aimail

aimail install (the CLI) drives the same commands and registers the agent afterwards.

Host identification

On startup the package resolves which host is loading it (host SDK resolvability + config dir), asserts the entry being executed matches that host, then runs the host's activation path (board resources → skill release → tool registration → inbound route → eager bind). Adding a new host type = one registry entry + one src/<host>/ module; the shared core is never copied.

Layout

  • src/core/ — host-agnostic core (identity, auto-bind, tools, inbound, board, skill)
  • src/mail/ — config resolution (agentmail.json → AgentConfig)
  • src/openclaw/ — OpenClaw plugin entry (dist/openclaw/index.js)
  • src/dsh/ — dsh self-mounting entries (dist/dsh/{mail-service,tools,inbound}.js)
  • src/pi/ — pi extension entry (dist/pi/index.js)
  • src/hosts/ — host registry + detection + activation assertion
  • resources/ — board role prompts + agent skill (single source, staged at pack)

Exports

  • agent-aimail — host identification entry (detect + registry)
  • agent-aimail/core — shared core API
  • agent-aimail/mail — config resolvers
  • agent-aimail/{openclaw,dsh,pi} — host entries

版本与发布记录

agent-aimail 共发布 11 个版本,首次发布于 2026/10/22;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.9latest2026/11/03今天
0.2.82026/11/021 天前
0.2.72026/11/021 天前
0.2.62026/10/304 天前
0.2.52026/10/286 天前
0.2.42026/10/259 天前

关于 agent-aimail 的常见问题

agent-aimail 是什么?

AIMail代理邮件SDK - OpenClaw / dsh (DeepSeek Harness) / Pi主机的单个包。启动时的主机检测,每个主机激活。邮件工具,入站投递(HMAC),董事会/技能资源,代理级寻址。

如何安装 agent-aimail?

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

agent-aimail 支持 TypeScript 吗?

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

agent-aimail 支持 ESM 还是 CommonJS?

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

agent-aimail 可以商用吗?

agent-aimail 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

agent-aimail 还在维护吗?

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