agenthub/tests/agent-setup.test.ts
chahinebrini df698c9dff feat(agenthub): Rollenwechsel, agent-setup + Push-Channel
roleService haelt roles.*.preferredAgent (Routing-Autoritaet fuer asks,
Watchdog, start) und agents.*.role (Health/Board/MCP-Discovery) konsistent —
bisher konnte nur eine Seite gesetzt werden und der Roster lief auseinander.
Dazu agent-setup-Kommando, Push-Channel im MCP und Selbstheilung im
remoteClient.

Build clean, 304 Tests in 55 Dateien gruen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0113SC5FkaMxcRzXHDBsHmdJ
2026-08-02 21:38:47 +02:00

16 lines
666 B
TypeScript

import { describe, expect, it } from 'vitest';
import { codexHookBlock } from '../src/cli/commands/agentSetup.js';
describe('Codex AgentHub lifecycle hooks', () => {
it('installs a host-native Stop-hook worker in addition to SessionStart context', () => {
const block = codexHookBlock('codex', 'implementer');
expect(block).toContain('[[hooks.SessionStart]]');
expect(block).toContain('agenthub hook-context --agent codex');
expect(block).toContain('[[hooks.Stop]]');
expect(block).toContain('agenthub hook-stop --agent codex');
expect(block).not.toContain('--role implementer');
expect(block).toContain('timeout = 86400');
});
});