STORY: The session backend needed to aggregate agent health from a live telemetry stream rather than static bead metadata. This refactor makes liveness signals real-time and accurate. COLLABORATION: We extended the ActivityEvent model with a native 'heartbeat' kind, updated extendActivityLease() to emit through the activity bus, and refactored getAgentLivenessMap() to prioritize heartbeat activity history over stale bead metadata. DELIVERABLES: - ActivityEvent extended with 'heartbeat' kind - extendActivityLease() emits heartbeats through activity bus - getAgentLivenessMap() prefers telemetry over static metadata - Registry APIs support projectRoot injection for testing - Tests verify preference logic via TDD VERIFICATION: - 93/93 tests PASSING - Heartbeat override verified in isolated temp projects CLOSES: bb-buff.1.3 BLOCKS: bb-buff.3.2, bb-buff.3.3, bb-buff.2.1
1.6 KiB
1.6 KiB
Command Matrix
Bootstrapping and Handshake
node scripts/bb-init.mjs --register <name> --role <role> --json- Output:
{ ok, agent_id, mode, lease, timestamp }
- Output:
node scripts/bb-init.mjs --adopt <id> [--non-interactive] --json- Output:
{ ok, agent_id, mode, lease, timestamp }or{ ok:false, error }
- Output:
Coordination Commands (bb)
bb agent register --name <agent> --role <role>bb agent activity-lease --agent <agent> [--json]- Output:
{ ok, command, data: AgentRecord }
- Output:
bb agent list [--role <role>] [--status <status>]bb agent show --agent <agent>bb agent send --from <agent> --to <agent> --bead <id> --category <HANDOFF|BLOCKED|DECISION|INFO> --subject <text> --body <text>bb agent inbox --agent <agent> [--state unread|read|acked] [--bead <id>]bb agent read --agent <agent> --message <message-id>bb agent ack --agent <agent> --message <message-id>bb agent reserve --agent <agent> --scope <path> --bead <id> [--ttl <minutes>] [--takeover-stale]bb agent release --agent <agent> --scope <path>bb agent status [--bead <id>] [--agent <agent>]
Lifecycle Commands (bd)
bd readybd show <bead-id>bd update <bead-id> --status in_progress --claimbd update <bead-id> --notes "<evidence>"bd close <bead-id> --reason "<summary>"
Legacy/Internal Scripts
node skills/beadboard-driver/scripts/resolve-bb.mjsnode skills/beadboard-driver/scripts/session-preflight.mjsnode skills/beadboard-driver/scripts/generate-agent-name.mjsnode skills/beadboard-driver/scripts/readiness-report.mjs --checks <json> --artifacts <json>