convez.ai
AgenteIntegração & APIsAvançado
edgetalk

Edge Bridge

edgetalk/edge-bridge

Espelha chats de agentes em edge talk com CRDT de mão única

Ver no GitHub
InicialPluginScore · de 0 a 100

Agent que espelha chats de coding (pi e Claude Code) para edge talk via CRDT de mão única, convertendo transcrições de sessão em diffs portáveis nativos usando Shards. Sincroniza automaticamente histórico completo de agentes (texto, reasoning, tool calls, attachments) mantendo zero mudanças no edge talk.

Instalação

$npx convez-ai edgetalk/edge-bridge

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Sincronizar histórico de conversas de IA entre múltiplos agentes (pi, Claude Code)
  • Arquivar e compartilhar sessões de coding entre dispositivos via iCloud ou sistemas de sincronização
  • Manter registro completo de raciocínio e tool calls em formato nativo portável

Veredito

Solução técnica sofisticada para sincronizar estado de agentes IA em tempo real usando CRDT. Requer setup complexo (compilação de Shards com crsqlite) e é mais adequada para desenvolvedores que precisam arquitetar fluxos multi-agent com garantias de convergência eventual.

README

A tradução para o português deste README ainda está na fila.

edge-bridge — sync pi + Claude Code chats into edge talk

Sync coding-agent chats into edge talk, one-way, with zero changes to edge talk. Each agent is mirrored by a single portable pure-Shards script that reads the agent's session transcript, projects it into a cr-sqlite mirror with edge talk's exact schema, and emits an edge-talk-native .diff into the iCloud sync folder — which edge talk imports on its next sync, under a dedicated actor. The diff bytes use edge talk's own ToBytes/Brotli framing + Hash.XXH3-128 attachments, so there's one source of truth for the format.

pi /edge-sync       -> pi-extension.ts  -> shards pi-sync.shs <session>      -> edge-talk-sync/pi-*.diff   (actor "pi")
claude /edge-sync   -> run-sync.sh      -> shards claude-sync.shs <session>  -> edge-talk-sync/cc-*.diff   (actor "claude code")

Both scripts are self-contained and cross-platform: they detect the OS (@platform), resolve $HOME/$USERPROFILE, locate the transcript, pick paths (iCloud on macOS; a ~/.edge-talk-bridge/ staging area on Linux/Windows), and name diffs <prefix>-<v>.diff where the default <prefix> already embeds a per-machine crsql_site_id() (cc-<site_id> / pi-<site_id>), so machines never collide. The standalone shards binary has crsqlite statically linked, so no Node serializer is needed — pi's only Node is a small shim that shells out.

Full fidelity: user/assistant text, thinking -> reasoning, tool calls (tool_id/tool_name), tool results as attachments.

Files

FileRole
pi-sync.shspi: read ~/.pi/agent/sessions JSONL -> mirror -> diff
pi-extension.tsthin pi extension: /edge-sync+/edge-sync-all -> shells out to pi-sync.shs
claude-sync.shsClaude Code: read ~/.claude/projects JSONL -> mirror -> diff
run-sync.sh / run-sync.ps1Claude Code launchers (mac/linux, Windows)
commands/Claude Code slash commands

Requirements

  • A shards binary with crsqlite statically linked, on PATH (or point EDGE_BRIDGE_SHARDS_BIN at it). See Building shards.
  • macOS: edge talk + iCloud Drive — works out of the box.
  • Linux/Windows: edge talk is Apple-only, so diffs land in ~/.edge-talk-bridge/; use a transport (Syncthing/rclone/Mac relay) to carry them into the Mac's iCloud edge-talk-sync (and the matching attachments folder).

Building shards

These scripts run on the Shards runtime, which must be built with crsqlite statically linked (edge talk's diff format depends on it). Follow the build instructions in the shards repository, then either put the resulting shards binary on your PATH or set:

export EDGE_BRIDGE_SHARDS_BIN=/abs/path/to/shards

Install

pi — add the shim to pi's extensions:

// ~/.pi/agent/settings.json
{ "extensions": ["/abs/path/to/edge-bridge/pi-extension.ts"] }

Claude Code — copy the script + commands under ~/.claude (travels with your config):

mkdir -p ~/.claude/edge-sync ~/.claude/commands
cp claude-sync.shs run-sync.sh run-sync.ps1 ~/.claude/edge-sync/
cp commands/edge-sync*.md ~/.claude/commands/

Commands

In both pi and Claude Code:

  • /edge-sync — push the current chat (idempotent).
  • /edge-sync-all — backfill every session on this machine.

Configuration (env overrides)

VariableDefault
EDGE_BRIDGE_SHARDS_BINshards on PATH
EDGE_BRIDGE_SYNC_DIRmacOS iCloud edge-talk-sync, else ~/.edge-talk-bridge/edge-talk-sync
EDGE_BRIDGE_ATTACHMENTS_DIRmacOS iCloud attachments, else ~/.edge-talk-bridge/attachments
EDGE_BRIDGE_PI_DB / EDGE_BRIDGE_CLAUDE_DB~/.edge-talk-bridge/{pi,claude}-mirror.db
EDGE_BRIDGE_PI_SESSIONS$PI_AGENT_DIR/sessions or ~/.pi/agent/sessions
EDGE_BRIDGE_PROJECTS_DIR~/.claude/projects
EDGE_BRIDGE_FILE_PREFIXpi-<site_id> / cc-<site_id> (must not start with 0x)

The diffs and their attachments go to separate folders (EDGE_BRIDGE_SYNC_DIR and EDGE_BRIDGE_ATTACHMENTS_DIR), and a diff references attachments by content hash — so if you relay diffs into iCloud, relay the attachments folder too, or tool-result attachments resolve to nothing.

Notes & limitations

  • One-way (agent -> edge talk). Each mirror is a real CRR peer with its own site_id.
  • Entries are projected in file order; image attachments and branch/rewind handling are not modelled in v1 (tool-result text attachments are). Conversation title = pi/Claude Code first user message.
  • The scripts hardcode edge talk's conversations/messages/actors schema and diff framing; a change to edge talk's schema can require a matching change here.

License

MIT (c) Fragcolor Pte. Ltd.

Ver o original no GitHub

Bom para

Relacionados