feat!: universal agent messaging — no hooks, no plugins, stdin injection#10
Merged
feat!: universal agent messaging — no hooks, no plugins, stdin injection#10
Conversation
…tion
Delete all hooks, skills, and plugin infrastructure. Agents no longer
need Claude Code-specific plugins for mesh participation.
- Delete plugin/ directory (hooks.json, stop_inbox.sh, idle_inbox.sh,
SKILL.md, plugin.json, marketplace.json)
- Remove hook format from inbox endpoint — returns raw message object
instead of Claude Stop hook JSON ({decision: "block", reason: "..."})
- Update all docs: ARCH.md (data flow, lifecycle, ASCII art), mesh.md
(heartbeat refs, endpoint table, delivery mechanism), plugin.md
(rewritten as agent integration guide), database.md (column desc),
README.md (plugin section, project structure, scheduler ref)
- Update test suite: rename hook-format tests, assert against raw
message fields, remove format=hook/raw parameter tests
- 203 tests passing, 96% coverage
When the pruning loop detects an active→idle transition, deliver pending inbox messages by writing to the agent's stdin via heimdall INPUT frame. - Add peek_next_message() to db.py — reads without consuming - Add _deliver_inbox_on_idle() to pruning.py — peek → send → consume pattern ensures messages survive delivery failure - Catch OSError, TimeoutError, ValueError from send_input — message stays in inbox for retry on next idle cycle - Cap message body at 4096 bytes to avoid pty buffer overflow - 5 new tests: delivery, empty inbox, no session, OSError preserves message, ValueError handled - 208 tests passing, 96% coverage
8e5e2a5 to
2ed63b7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 96.03% 96.11% +0.07%
==========================================
Files 15 15
Lines 1035 1054 +19
==========================================
+ Hits 994 1013 +19
Misses 41 41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Every agent gets mesh awareness via --append-system-prompt at launch. The prompt includes the agent's name, peer discovery curl, and message sending curl — all pointing at the configured server port. - Add _build_mesh_prompt() to terminal/router.py - Inject into Claude command via --append-system-prompt - Use --json flag in curl snippet (avoids single-quote escaping issue) - Port from AppConfig.server.port, not hardcoded - Safety comment: agent_name sanitizer ensures JSON/shell safety - 4 new tests: prompt content, agent name in JSON payload, port config - 212 tests passing, 96% coverage
2ed63b7 to
f52f3f2
Compare
CLAUDE.md was project instructions for the AI agent — not meant for contributors. Replace with a proper CONTRIBUTING.md covering setup, development workflow, code style, testing, architecture, and CI.
All 7 docs updated to reflect heimdall migration, plugin deletion, and universal agent messaging: - ARCH.md: fix diagram (remove plugin system, add monitoring loop), update module map, fix terminal data flow (subscription not polling), fix agent lifecycle (immediate deletion on session gone) - database.md: add agent_state/state_ms columns, state field semantics - deployment.md: replace dashboard config with pruning config - mesh.md: two-stage message delivery, 5s monitoring interval, immediate session-gone deletion, RequireAgent type fix - plugin.md: two-stage delivery model with message formats - terminal.md: complete rewrite — subscription push model, binary WebSocket, mesh prompt injection, file drop endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace Claude Code-specific hooks and plugins with a universal agent messaging model that works for all agent types (Claude Code, Codex, OpenCode, scripts).
Phase 1: Delete plugin directory
Phase 2: Idle-wake message delivery
[drasill:message from {sender}] {body}Phase 3: Mesh awareness system prompt
--append-system-prompt--jsonflag in curl (avoids escaping issues)Test plan