From 0bd392e076e36c80a152abe00cbcd0bc9efedd9c Mon Sep 17 00:00:00 2001 From: bndw Date: Mon, 9 Mar 2026 12:48:39 -0700 Subject: feat: add axon CLI for pub/sub; fix relay hijack context bug - cmd/axon: new CLI module with keygen, pub, and req subcommands - keygen: generate Ed25519 keypair, print hex seed and pubkey - pub: sign and publish an event; accepts --kind, --content, --tag - req: query/stream events as JSON lines; accepts --kind, --author, --tag, --since, --until, --limit, --stream - key loaded from --key flag or AXON_KEY env var - relay/websocket: add Dial() for client-side WebSocket handshake (ws:// and wss://, RFC 6455 masking via client:true) - relay/server: fix broken-pipe on auth by switching hijacked conn goroutine from r.Context() to context.Background(); r.Context() is cancelled by net/http immediately after Hijack is called --- cmd/axon/go.mod | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cmd/axon/go.mod (limited to 'cmd/axon/go.mod') diff --git a/cmd/axon/go.mod b/cmd/axon/go.mod new file mode 100644 index 0000000..2f26fca --- /dev/null +++ b/cmd/axon/go.mod @@ -0,0 +1,20 @@ +module axon/cli + +go 1.25.5 + +require ( + axon v0.0.0 + axon/relay v0.0.0 + github.com/vmihailenco/msgpack/v5 v5.4.1 +) + +require ( + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + golang.org/x/crypto v0.48.0 // indirect + golang.org/x/sys v0.41.0 // indirect +) + +replace ( + axon => ../../ + axon/relay => ../../relay +) -- cgit v1.2.3