Przejdź do treści
Biblioteka skilli
AI i agenci · Integracja z narzędziem

ainb-fleet:bridge

/ainb-fleet:bridge

Przekazuje wiadomości dwukierunkowo między kanałem czatu (Telegram, Slack, Discord) a sesjami ainb, kierując wiadomości do sesji docelowej i odsyłając odpowiedzi z transkryptu JSONL.

Licencja
MIT
Ostatnia zmiana repozytorium
12.10.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format15 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Przekazuje wiadomości dwukierunkowo między kanałem czatu (Telegram, Slack, Discord) a sesjami ainb, kierując wiadomości do sesji docelowej i odsyłając odpowiedzi z transkryptu JSONL.

Oryginalny opis (EN)

Native phone bridge — relay messages two-way between a chat channel (Telegram, Slack, and/or Discord) and your ainb sessions. Inbound chat messages route to a target session (by `name:` prefix, else a conductor- first default) and are delivered via tmux send-keys; the session's reply is captured from its JSONL transcript and sent back to the chat. Config lives in ~/.agents-in-a-box/config/config.toml under [fleet.bridge.*]; tokens resolve from $ENV / keychain refs and are NEVER passed on argv. Use to run, install, or check the bridge — this is the channel ATC pages you through.

Jak działa

  1. Subcommands
  2. Config — ~/.agents-in-a-box/config/config.toml
  3. Routing — how an inbound message finds a session
  4. Run it for real (persistent)
  5. Caveats
Sekcje z nagłówków SKILL.md, w oryginale · 122 linii, 775 słów
Podgląd SKILL.md
---
name: ainb-fleet:bridge
description: |
  Native phone bridge — relay messages two-way between a chat channel
  (Telegram, Slack, and/or Discord) and your ainb sessions. Inbound chat
  messages route to a target session (by `name:` prefix, else a conductor-
  first default) and are delivered via tmux send-keys; the session's reply is
  captured from its JSONL transcript and sent back to the chat. Config lives
  in ~/.agents-in-a-box/config/config.toml under [fleet.bridge.*]; tokens
  resolve from $ENV / keychain refs and are NEVER passed on argv. Use to run,
  install, or check the bridge — this is the channel ATC pages you through.
version: "0.1.0"
user-invocable: true
triggers:
  - ainb-fleet:bridge
  - fleet bridge
  - phone bridge
  - telegram bridge
  - slack bridge
  - discord bridge
  - relay my sessions to my phone
allowed-tools:
  - Bash
---

# ainb fleet:bridge — native phone bridge

A single-binary, two-way relay between a chat channel and your ainb fleet.
It folds every channel into the ainb binary — there is no separate Python
runtime to install or manage. Three channels share ONE relay/routing core over
one transport:

- **Telegram** — long-polling `getUpdates` over HTTP.
- **Slack** — socket-mode WebSocket.
- **Discord** — raw Gateway WebSocket.

```
chat message ──▶ bridge ──parse target──▶ tmux send-keys ──▶ ainb session
   reply    ◀── bridge ◀──capture from JSONL transcript tail ◀──┘
```

This is ATC's voice to you: when ATC escalates, the `NEED: …` line surfaces in
whichever channel the bridge runs.

## Subcommands

```bash
ainb fleet bridge run            # start the daemon (default if no subcommand)
ainb fleet bridge install        # install as a launchd/systemd service (idempotent)
ainb fleet bridge uninstall      # remove the service unit (returns the removed path, if any)
ainb fleet bridge status         # report INSTALL state of the service unit
```

`run` loads the config and drives every configured channel concurrently; it
runs until the process is stopped. `bridge` with no subcommand is the same as
`bridge run`.

> **`status` reports INSTALL state, not liveness.** For "is the bridge actually
> running and connected right now?" use [`/ainb-fleet:daemons`](../daemons/SKILL.md)
> — its heartbeat-backed probe distinguishes a live+connected bridge from a
> crashed one (stale heartbeat / recycled pid). `bridge status` only tells you
> whether the service unit is installed.

## Config — `~/.agents-in-a-box/config/config.toml`

At least ONE channel table must be present and valid. Tokens and ids are
resolved through ainb's secret resolver: a value may be a literal, a `$ENV_VAR`
ref, or a `keychain:service` ref — so the secret stays out of argv and out of
the launchd/systemd unit, read in-process only at startup. Config path honours
`$AINB_CONFIG_PATH`.

```toml
[fleet.bridge]
response_timeout = 300            # optional, seconds — shared default (per-channel overridable)

[fleet.bridge.telegram]
token = "$TELEGRAM_BOT_TOKEN"     # or "keychain:svc" or a literal
user_id = 123456789               # authorized Telegram user id (integer)
default_target = "conductor"      # optional: session to prefer when no name: prefix
require_mention_in_groups = true  # optional, default true
response_timeout = 300            # optional, overrides the shared default

[fleet.bridge.slack]
bot_token = "$SLACK_BOT_TOKEN"    # xoxb-… (Web API)
app_token = "$SLACK_APP_TOKEN"    # xapp-… (socket-mode)
user_id = "U0123ABC"             # authorized Slack user id (string)
default_target = "conductor"      # optional
listen_mode = "mentions"          # "mentions" (default) | "all"
response_timeout = 300            # optional

[fleet.bridge.discord]
token = "$DISCORD_BOT_TOKEN"      # Bot token (gateway + REST), secret ref
user_id = "123456789012345678"    # authorized Discord user id (snowflake string)
default_target = "conductor"      # optional
channel_id = "123456789012345678" # optional fallback channel for replies
response_timeout = 300            # optional
```

Missing `[fleet.bridge]`, or a `[fleet.bridge]` with no channel table, is a
hard error. A token/id that resolves to empty (e.g. an unset env var) errors at
startup rather than silently connecting as nobody.

## Routing — how an inbound message finds a session

A leading `<name>:` prefix selects a target session, but **only when `<name>`
addresses a real session** — matched case-insensitively against the session's
`ainb run --name` first, then its workspace/repo folder name as a fallback
alias. This guard stops an ordinary sentence like `note: fix this` from being
mis-routed to a session called `note`.

```
"backend: run the tests"   ─▶ session "backend", message "run the tests"
"just do it"               ─▶ default target,    message "just do it"
"note: fix this bug"       ─▶ default target,    message "note: fix this bug"  (no session named note)
```

With no resolvable prefix, the bridge relays to the **default target**:
a conductor/ATC session if one exists (names `conductor` or `conductor-*`),
otherwise the alphabetically-first session — or `default_target` from config.
Authorization is enforced per channel: only the configured `user_id` is
relayed.

## Run it for real (persistent)

```bash
# Install + manage as an OS service (survives logout / reboot):
ainb fleet bridge install
ainb fleet bridge status        # confirm the unit is installed
# …later:
ainb fleet bridge uninstall

# Or run it directly under tmux for a session you watch:
tmux new-session -d -s fleet-bridge "ainb fleet bridge run 2>&1 | tee ~/.ainb-bridge.log"
```

## Caveats

- **Fire-and-forget delivery.** Like the rest of the fleet, inbound delivery is
  a tmux send-keys with no ACK; the reply is captured from the target's JSONL
  transcript tail, bounded by `response_timeout` (default 300s). A session that
  takes longer than the timeout to finish its turn may have its reply missed.
- **`status` ≠ liveness.** It is the install-state of the service unit only —
  use `/ainb-fleet:daemons` for the running/connected/crashed verdict.
- **One authorized user per channel.** Messages from any other chat user are
  ignored; there is no multi-user ACL in v1.

Wersje

W bazie nie ma innych skilli o nazwie ainb-fleet:bridge.

Migawka bazy z 13.11.2026 · wersja paczki 33d250c4a17a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 85ainb-fleet:standup
    Pokazuje status floty: każdą sesję claude działającą na hoście, połączoną z ainb, brokera claude-peers i zadań w tle, jako tabelę tekstową lub JSON do filtrowania w jq.
  • 90ainb-fleet:atc
    Pełni rolę jedynego nadzorcy floty sesji ainb w trybie lite (deterministyczny skan, ponawianie znanych błędów przejściowych, limity bezpieczeństwa) albo full (stały mózg orkiestrujący na heartbeat).
  • 100cc-connect
    Łączy lokalnych agentów kodujących, takich jak Claude Code, Cursor, Gemini CLI i Codex, z komunikatorami Slack, Telegram i Discord, aby zlecać zadania z czatu zespołu.
  • 100frontmcp-channels
    Przesyła powiadomienia i zdarzenia w czasie rzeczywistym do sesji Claude Code lub innego klienta MCP oraz buduje dwukierunkowe mosty czatu z WhatsApp, Telegram, Slack i Discord.
  • 100claude-bridge
    Przekazuje wiadomości między sesjami Claude Code działającymi na tym komputerze i koordynuje z nimi pracę na prośbę użytkownika.
  • 95setup-telegram-bridge
    Opisuje, jak zainstalować i skonfigurować most Telegram na maszynie z agentem AI, aby odtworzyć to samo ustawienie na innej instancji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.