chahinebrini e8c2e43cb0 feat(mcp): echter Push an Agenten über MCP-Notifications — ohne blockierenden Tool-Call
DIE WURZEL, endlich an der Wurzel gefasst. Bisher konnte ein Agent nur
empfangen, WÄHREND er in `agenthub_work` blockierte. Kehrte der Aufruf leer
zurück und das Modell startete ihn nicht neu, war der Agent unerreichbar —
ein Mensch musste ihn anstoßen. Wir haben einen ganzen Tag um diese Tatsache
herum gebaut (Watchdog, Check-in-Kanal, längere Timeouts, notListening) statt
sie aufzulösen. Der CEO hat zu Recht darauf bestanden, das Protokoll selbst
zu nutzen.

MCP kann Server→Client jederzeit `notifications/message` schicken. Die Bridge
ist ohnehin ein langlebiger Prozess pro Agent: sie hängt sich jetzt dauerhaft
an den SSE-Stream des Hubs (`pushChannel.ts`) und reicht relevante Ereignisse
als Notification hoch — neue/zurückgegebene Task, Nachricht, beantwortete
Frage, Abbruch. Bindung erfolgt, sobald der Agent seinen Namen nennt
(hello/work), inklusive Alias-Auflösung; Reconnect mit Backoff.

⚠️ Die entscheidende Falle: `sendLoggingMessage` prüft `_capabilities.logging`
und verwirft die Notification sonst STILL. Der Server deklarierte gar keine
Capabilities — daran wäre dieser Weg unbemerkt gescheitert. Jetzt deklariert.

Live verifiziert mit einem echten MCP-Client: Nachricht am Hub angelegt →
Notification kam beim Client an, ohne dass dieser in einem Tool-Call wartete.

OFFEN und bewusst nicht behauptet: ob die CLI-Hosts (Codex/Kimi) die
Notification dem Modell zeigen — das ist client-abhängig und empirisch zu
prüfen. Deshalb bleiben Check-in-Kanal und Work-Loop als Netz bestehen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 21:08:21 +02:00
2026-06-24 23:24:57 +02:00
2026-06-24 23:24:57 +02:00

AgentHub

Local coordination layer for AI coding agents.

Install

AgentHub is not yet published to npm. Clone the repository, build it, and link it globally:

git clone https://git.rebreak.org/chahine/agenthub.git
cd agenthub
pnpm install
pnpm build
npm link

After npm link, the agenthub command is available everywhere.

Quick Start

agenthub init
agenthub task create --title "Implement DNS cache" --role implementer
agenthub handoff create --fromRole architect --toRole implementer
agenthub status --update

Supported Agents

  • Claude Code
  • Codex CLI
  • Kimi Code CLI

Network Mode

AgentHub can expose a project to other machines on the same network. Discovery is automatic: as soon as the host broadcasts, a client can find it without knowing the IP address.

On the host machine (e.g. Mac):

cd my-project
agenthub init
agenthub server start --host 0.0.0.0 --port 3377

On another machine (e.g. Windows) run init and accept the discovered server:

cd my-project
agenthub init          # asks to connect to the LAN server it found
agenthub task create --title "Windows task" --role implementer
agenthub status

For non-interactive setup, let init discover the server automatically:

agenthub init --server auto

After init, every command automatically talks to the configured server. You can still override it per command with --server http://<ip>:3377 or via the AGENTHUB_SERVER environment variable.

The init --server step only stores the server URL locally; it does not create a second project. The host machine keeps the single source of truth.

License

MIT

Description
No description provided
Readme 1.7 MiB
Languages
TypeScript 99%
PowerShell 1%