Skip to content

Instantly share code, notes, and snippets.

@jleechan2015
Created March 27, 2026 08:02
Show Gist options
  • Select an option

  • Save jleechan2015/cd52751d08265b44d21ee5d27fc9fbf3 to your computer and use it in GitHub Desktop.

Select an option

Save jleechan2015/cd52751d08265b44d21ee5d27fc9fbf3 to your computer and use it in GitHub Desktop.
AO lifecycle MCP mail global inbox proof — heartbeat + session lifecycle messages to global:jleechanclaw
{
"description": "AO lifecycle worker MCP mail global inbox proof — heartbeat, session start, and session end messages flowing to global:jleechanclaw inbox",
"proof": {
"test": "MCP mail global inbox poll + heartbeat for AO workers",
"date": "2026-03-27T08:01:45Z",
"mcp_server": "http://127.0.0.1:8765/mcp",
"project_key": "jleechanclaw",
"agent": "jc938prtest",
"messages_sent": [
{
"tool": "register_agent",
"result": "Agent registered successfully (id: 11)"
},
{
"tool": "send_message",
"subject": "worker heartbeat — jc938prtest",
"body_md": "I'm alive — heartbeat",
"to": ["global:jleechanclaw"],
"message_id": 9
},
{
"tool": "send_message",
"subject": "session start — jc938prtest",
"body_md": "Starting task: Fix mcp-mail plugin tests",
"to": ["global:jleechanclaw"],
"message_id": 10
},
{
"tool": "send_message",
"subject": "session end — jc938prtest",
"body_md": "Done with: Fix mcp-mail plugin tests",
"to": ["global:jleechanclaw"],
"message_id": 11
}
],
"fetch_inbox_result": {
"count": 3,
"messages": [
{"id": 11, "subject": "session end — jc938prtest", "body_md": "Done with: Fix mcp-mail plugin tests", "from": "jc938prtest", "kind": "cc", "source": "global_inbox_mention"},
{"id": 10, "subject": "session start — jc938prtest", "body_md": "Starting task: Fix mcp-mail plugin tests", "from": "jc938prtest", "kind": "cc", "source": "global_inbox_mention"},
{"id": 9, "subject": "worker heartbeat — jc938prtest", "body_md": "I'm alive — heartbeat", "from": "jc938prtest", "kind": "cc", "source": "global_inbox_mention"}
]
},
"implementation_summary": {
"core_mcp_mail": "packages/core/src/mcp-mail.ts — MCP mail HTTP client with register_agent, send_message, fetch_inbox, heartbeat/sessionStart/sessionEnd helpers",
"lifecycle_manager": "packages/core/src/lifecycle-manager.ts — inbox polling every 5min, session lifecycle events sent via sendMcpMailHeartbeat/Start/End",
"notifier_plugin": "packages/plugins/notifier-mcp-mail/src/index.ts — PluginModule for notify/notifyWithActions/post",
"plugin_registry": "packages/core/src/plugin-registry.ts — BUILTIN_PLUGINS entry for mcp-mail notifier"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment