Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ jobs:
with:
go-version-file: go.mod

- uses: actions/setup-python@v7
with:
python-version: "3.13"

- uses: oven-sh/setup-bun@v2

- name: Build the web dashboard
run: make web

- name: Install Python dependencies
run: python -m pip install cryptography

- name: gofmt
run: |
unformatted=$(gofmt -l .)
Expand All @@ -49,14 +42,27 @@ jobs:
- name: Go tests (race detector)
run: go test -race ./...

- name: Python peer tests
run: make test-python
- name: Cross-compile the release artifacts
run: scripts/dist.sh 0.0.0-ci

- name: Go/Python interop
run: make interop
# The carriers that go through the internet. They depend on tailcat's
# public DERP relays and on Cloudflare's quick tunnels, so they report
# without blocking a merge.
carriers:
runs-on: ubuntu-latest
timeout-minutes: 15
continue-on-error: true
steps:
- uses: actions/checkout@v7

- name: Conformance suite against the Python peer
run: make conformance
- uses: actions/setup-go@v7
with:
go-version-file: go.mod

- name: Cross-compile the release artifacts
run: scripts/dist.sh 0.0.0-ci
- name: Install cloudflared
run: |
curl -fsSL -o /usr/local/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x /usr/local/bin/cloudflared

- name: tailcat and Cloudflare carriers
run: make carriers
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,31 @@ Release versions of this implementation. The protocol version (`v` in `hello`) i

## [Unreleased]

Draft 2 of the protocol (protocol v1), implemented. Not compatible with 0.6.0 or earlier: peers of the two drafts cannot connect, and addresses shared before do not work. `awp up` prints a new address.

### Changed

- SPEC.md draft 2 (protocol v1). A connection is a WireGuard tunnel between the two peers' keys: the Ed25519 identity key, converted, is the WireGuard key, so the tunnel's authentication is the protocol's and `auth` is gone. Carriers move WireGuard datagrams and are interchangeable and untrusted: `udp`, `tailcat` (the default), `ws` (any HTTP tunnel, including Cloudflare quick tunnels), `unix`. Addresses are `awp1…` blobs of key, pre-shared key and endpoints; `hello` carries `ep` for reconnecting to the sender. Draft 1's notes are folded in: `aud` on grants, cumulative acks, chunks before their msg, what `seen` counts, strictly increasing ids, one connection per pair, the `refused` code, encodings and canonical JSON. Not compatible with draft 1. The implementation still speaks draft 1; the spec example test skips until the wire package follows.
- SPEC.md draft 2. A connection is a WireGuard tunnel between the two peers' keys: the Ed25519 identity key, converted to X25519, is the WireGuard key, so the tunnel's authentication is the protocol's. `auth` and the hello nonce are gone; `hello.key` must be the key on the other end of the tunnel, and `grants` travel in hello. Carriers move WireGuard datagrams and are untrusted: tailcat (the default), UDP, WebSockets (any HTTP tunnel, including Cloudflare quick tunnels), Unix sockets. There is no plaintext binding. Draft 1's notes are folded in: `aud` on grants, cumulative acks, chunks before their msg, what `seen` counts, strictly increasing ids, one connection per pair, the `refused` code, encodings and canonical JSON.
- Addresses are `awp1` strings: the key, the listener's pre-shared key and every endpoint it listens on, in one. `hello.addr` and `introduce.peer.address` are addresses too. Pre-shared keys are per pair once two peers have met, so `awp address --rotate` shuts out agents not met yet without cutting off the ones you know.
- The engine runs on a new `tunnel` package: Tailscale's wireguard-go and a gVisor TCP/IP stack in userspace, with a `conn.Bind` over the carriers that follows a peer to wherever its last authenticated packet came from. The `transport` package is gone. `awp daemon --listen` takes carriers: `tailcat`, `udp:HOST:PORT`, `unix:/path`, `ws:HOST:PORT[=URL]` and `cloudflare`.
- The JSON Schema is `schema/v1/awp.schema.json`, `$id` https://agentwireprotocol.com/schema/v1/awp.schema.json.
- `awp conform` reaches the peer through a tunnel of its own and checks the tunnel binding: two new scenarios, `hello-key` and `hello-own-key`, replace `auth-bad-sig`. `--listen` takes a carrier.
- `awp status` and the control API report the address, its endpoints, and carriers still coming up, in place of the tailcat fields.

### Added

- `awp tunnel`: the tunnel alone, as a helper process for SDKs in languages without WireGuard. It holds the SDK's key, prints the address, opens streams on request over a control socket, forwards the streams peers open, and refuses a hello that names another key before the SDK sees it.
- `awp address --rotate`.
- A CI job for the carriers that need the internet (tailcat, Cloudflare), and `make carriers`.

### Fixed

- `awp connect` right after a bye dials afresh instead of returning the connection that is closing.

### Removed

- The single-file Python peer (`python/`) and its interop and conformance scripts. The Python SDK (agentwireprotocol/python-sdk) runs the conformance suite in its own CI.
- `AWP_ALLOW_PLAINTEXT` and the `tcp:` binding.

## [0.6.0] - 2026-09-29

Expand Down
22 changes: 9 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
LDFLAGS := -s -w
PLUGIN := plugin/awp

.PHONY: build web test test-go test-python interop conformance schema dist plugin plugin-local clean
.PHONY: build web test test-go carriers schema dist plugin plugin-local clean

build:
go build -trimpath -ldflags "$(LDFLAGS)" -o bin/awp ./cmd/awp
Expand All @@ -16,24 +16,20 @@ web:
find internal/web/dist -mindepth 1 ! -name README -exec rm -rf {} +
cp -R web/dist/. internal/web/dist/

test: test-go test-python interop conformance
test: test-go

# The Go tests include the conformance suite against the Go node, both
# ways. The SDKs run it against themselves in their own repositories.
test-go:
go vet ./...
go test -race ./...

test-python:
cd python && python3 -m unittest test_awp_peer
# The carriers that need the internet: tailcat through its DERP relays, and
# a WebSocket through a Cloudflare quick tunnel (needs cloudflared).
carriers:
AWP_TEST_TAILCAT=1 AWP_TEST_CLOUDFLARE=1 go test -count=1 -v -run 'TestTailcat|TestCloudflare' ./tunnel

interop: build
cd python && AWP_BIN=$(CURDIR)/bin/awp python3 -m unittest -v interop_test

# The conformance suite (awp conform) against the Python peer, both ways.
# The Go node runs it in its own tests (conformance).
conformance: build
AWP_BIN=$(CURDIR)/bin/awp scripts/conformance.sh

# The JSON Schema and its reference page, schema/v0/, from the wire
# The JSON Schema and its reference page, schema/v1/, from the wire
# package. A test fails when they are stale.
schema:
go generate ./wire
Expand Down
2 changes: 2 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Implementation notes for SPEC.md draft 1

Draft 2 (SPEC.md) folds in the proposals below and replaces the transport and the handshake they discuss: `auth` is gone, and so are the plain bindings. These notes stay as the record of why draft 2 says what it does.

These notes come from building AWP twice, independently. The Go reference daemon is in this repository. The single-file Python peer (`python/awp_peer.py`) was written from SPEC.md alone, without looking at the Go code. The two interoperate (`python/interop_test.py`). The places where either implementation had to guess are listed below, with the choice made and a proposed spec change.

## Decisions on the open questions
Expand Down
Loading
Loading