Skip to content
PigBun-AIPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TeamMesh

English | 中文

TeamMesh extends the Claude Code Team ecosystem.
It enables local and remote physical-machine agents to collaborate in one team without forking native Team semantics.

Repository name is currently agent-swarm-link; public project name is TeamMesh.

Project Intent

Problems We Solve

  • Local and remote Claude instances are hard to coordinate in one stable team workflow
  • Mixed container/physical environments often cause runtime and write-location inconsistencies
  • New-user onboarding is fragmented across setup, config, and verification steps

Design Principles

  • Preserve native Claude Code Team semantics (tasks, inboxes, member model)
  • Extend boundaries (cross-machine, chained relay, runtime automation), not replace the stack
  • Use Tailscale for remote production networking; keep Docker mainly for local regression

Non-Goals

  • Replacing official Claude Code Team capabilities
  • Introducing a parallel centralized agent protocol
  • Treating local Docker Swarm test setup as production orchestration

Architecture

System Component Diagram

flowchart LR
    U[Local Claude User] --> CLI[TeamMesh CLI]
    CLI --> RELAY[Relay Node]
    RELAY --> SC1[Remote Sidecar A]
    RELAY --> SC2[Remote Sidecar B]
    SC1 --> WK1[Remote Claude Worker A]
    SC2 --> WK2[Remote Claude Worker B]
    WK1 --> CLAUDEFS1["/home/agent/.claude"]
    WK2 --> CLAUDEFS2["/home/agent/.claude"]
Loading

Collaboration Data Flow

sequenceDiagram
    participant L as Local CLI
    participant R as Relay
    participant S as Remote Sidecar
    participant W as Remote Worker
    participant F as Remote .claude FS

    L->>R: invite / team metadata
    R->>S: sync task + inbox events
    S->>W: runtime task context
    W->>F: read/write tasks & inboxes
    F-->>S: file updates
    S-->>R: callback / completion
    R-->>L: status + probe result
Loading

Key Implementation Points

  • Runtime auto-spawn: packages/cli/src/playground/team-runtime-controller.ts
  • Playground lifecycle wiring: packages/cli/src/commands/playground.ts
  • Remote invite + chained expansion: packages/cli/src/commands/invite.ts
  • Runtime probing (sidecar/worker): packages/cli/src/commands/status.ts
  • One-shot remote onboarding: scripts/onboard-remote.sh

Repository Scope

  • Core CLI/Relay/Sidecar: packages/
  • Remote onboarding script: scripts/onboard-remote.sh
  • End-to-end smoke test: scripts/e2e-smoke.sh
  • Local Docker Swarm test assets: tests/swarm/
  • Documentation: docs/

Remote production path: Tailscale + onboard/invite/status
Local regression path: tests/swarm + smoke:e2e

Quick Start

1) Build

pnpm --filter @swarm/cli build

2) Start Local Playground

node packages/cli/dist/index.js playground

3) Onboard a Remote Node

./scripts/onboard-remote.sh \
  --name remote-1 \
  --host <your-remote-host> \
  --user <ssh-user> \
  --remote-repo /path/to/agent-swarm-link

4) Check Runtime Status

node packages/cli/dist/index.js status

5) Run Real Smoke Test (Recommended)

pnpm smoke:e2e

Common Commands

node packages/cli/dist/index.js invite <node-name>
node packages/cli/dist/index.js stop <node-name>
node packages/cli/dist/index.js status --no-runtime-check
pnpm onboard:remote --help

Security & Ops Notes

  • .envrc, .claude/, and PRD docs are git-ignored to reduce local secret leakage risk
  • TLS relaxation in Docker test path is for controlled test environments only
  • Run pnpm smoke:e2e after first-time setup to verify isolation and callback chain

Docs

  • Quickstart: docs/QUICKSTART.md
  • Remote Onboarding: docs/REMOTE-ONBOARDING.md
  • Architecture: docs/ARCHITECTURE.md
  • Troubleshooting: docs/TROUBLESHOOTING.md
  • Known Issues: docs/KNOWN-ISSUES.md

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages