agent-context-bridge

Architecture

Agent Context Bridge is a local-first TypeScript ESM project. The core design is adapter-driven: agent-specific parsers normalize local session records into a shared event model, and renderers turn those events into concise target-agent handoff packets.

Design Principles

Main Modules

Area Responsibility
src/adapters/ Agent-specific session detection and parsing.
src/agents/ Built-in agent definitions, aliases, and adapter registry.
src/events/ Timeline and search over normalized events.
src/renderers/ Target-specific handoff rendering.
src/registry/ Local capability mapping packs and negotiation.
src/protocol/ Protocol descriptor and agent compatibility reports.
src/policy/ Default-deny policy evaluation.
src/remote/ Encrypted local-directory sync bundles.
src/team/ Hash-chained team ledger.
src/collab/ Project-local collaboration session state.
src/integrations/ Low-coupling integrations such as CC Switch.
src/ui/ Small local browser UI backed by the same services.

Data Flow

  1. bridge detect creates project-local storage and default registry mappings.
  2. Agent adapters detect nearby native session files.
  3. Parsers convert native records into normalized events with raw_ref pointers.
  4. Timeline, search, registry, protocol, and policy services operate on normalized data.
  5. Renderers produce target-agent handoff packets under .agent-bridge/packets/.
  6. CLI, MCP, CC Switch, and UI surfaces expose the same workflow.

Safety Boundaries