Commit Graph
7 Commits
Author SHA1 Message Date
Story Crater Bot 83efe8ef9e fix(agent-pod): stop double-encoding events in agent-run.js
JSON.stringify({id, event: line}) treated the already-JSON `line` as a
plain string, so every event landed in the hub double-encoded (a JSON
string containing escaped JSON, not an object) -- agent-console's
json.Unmarshal into a struct silently failed on every single event.
Now the raw JSON line is spliced directly into the request body.
Also await all in-flight event posts before posting /agent/end, since
those POSTs were fire-and-forget and could reorder past it on the wire.
2026-08-16 09:06:46 -07:00
Story Crater Bot fe24a206de feat(agent-pod): expose agent-hub at api.riotpiao.com/console
Kong route to the agent-hub Service so agent-console can attach over
the existing gateway instead of kubectl port-forward.
2026-08-16 08:16:33 -07:00
Story Crater Bot 7f8e947958 feat(agent-pod): add agent-hub sidecar for multi-agent session monitoring
Hub relays pi's own --mode json session protocol (session/agent_start/
turn_start/message_*/turn_end/agent_end -- the same event shape Claude
Code sessions use) to agent-console over WebSocket, so concurrent pi
runs inside the pod are observable as real transcripts instead of log
tails. agent-run.js wraps `pi -p --mode json` and relays its stdout
lines to the hub; each invocation gets its own session id, so N
concurrent agents show up as N sessions. Source mounted via ConfigMap
and run with `go run .` (no registry yet, same as the pi container).
2026-08-16 07:55:33 -07:00
Story Crater Bot 23fc334b8a fix(agent-pod): pin api.riotpiao.com via hostAliases
api.riotpiao.com has no in-cluster DNS record (getaddrinfo ENOTFOUND
from inside the pod, confirmed against google.com resolving fine and
kong-proxy.api.svc.cluster.local resolving fine) -- it only resolves
via the home network's own DNS. Node's fetch/undici also silently
drops a manually-set Host header (forbidden header per WHATWG fetch
spec), so overriding Host per-request isn't viable either. hostAliases
pinning the hostname to ingress-nginx-controller's ClusterIP lets
pi's models.json baseUrl work completely unchanged -- TLS SNI/Host
still say api.riotpiao.com so cert validation and Kong's Host-based
routing both still work.
2026-08-16 00:59:14 -07:00
Story Crater Bot 8d60396d14 fix(agent-pod): bump base image to node:22-slim
pi-coding-agent requires node >=22.19.0 (undici's
webidl.util.markAsUncloneable, added in Node 22) -- node:20-slim
installed fine but crashed on every invocation.
2026-08-16 00:54:45 -07:00
Story Crater Bot 0a2757aeac fix(agent-pod): pin pi-coding-agent to a version that actually exists on npm
0.1.23 was pi's own internal version string (from local pi --version),
not the npm package's semver -- npm has no such release, so the
container crash-looped on ETARGET. Latest published is 0.84.2.
2026-08-16 00:34:55 -07:00
Story Crater Bot 3620b4929c feat(agent-pod): deploy pi coding-agent pod for in-cluster harness
Namespace + Deployment (2-4 CPU, 4-8Gi mem) running node:20-slim with
pi installed at startup, wired to the homelab-ornith/reasoning/qwen
model providers via the existing model-invoke-apikey. Placeholder
node:20-slim image for now, real harness image to follow.
2026-08-16 00:23:30 -07:00