agent-aimail
AIMail的单个TypeScript SDK包。一个包服务所有Node.js代理 主机:共享核心(网关客户端,15邮件工具,入站预处理) 链,HMAC验证,自动绑定)加上每个支持的主机适配器 平台。
安装(主机本地,不需要CLI)
每个主机安装相同的包;包标识它的主机 启动及分支环境:
# 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 (CLI)驱动相同的命令并注册
代理之后。
主机标识
在启动时,包解析哪个主机正在加载它(主机SDK)
Resolvability + config dir),断言正在执行的条目与之匹配
主机,则运行主机的激活路径(单板资源→技能释放)
→工具注册→入站路由→急切绑定)。添加新的主机类型=
一个注册表项+一个 src/<host>/ 模块;共享核永远不会
复制。
布局
src/core/-与主机无关的核心(身份,自动绑定,工具,入站,董事会,技能)src/mail/-配置解析(agentmail.json→AgentConfig)src/openclaw/- OpenClaw插件入口(dist/openclaw/index.js)src/dsh/- DSH自安装项(dist/dsh/{mail-service,tools,inbound}.js)src/pi/- PI扩展项(dist/pi/index.js)src/hosts/-主机注册表+检测+激活断言resources/-董事会角色提示+代理技能(单一来源,在包中上演)
出口
agent-aimail-主机标识项(detect + registry)agent-aimail/core-共享核心APIagent-aimail/mail-配置解析器agent-aimail/{openclaw,dsh,pi}-主机项