Files
archie/config.example.toml
T
sam 8c4bb1ef1d feat: promote archie-agent to NATS-connected per-task worker
Replaces stdin/stdout subprocess transport with NATS JetStream
request-reply pattern. The Runner interface and workflow orchestration
are unchanged.

New NATSRunner (implements Runner):
- Publishes AgentRequestMessage to JetStream with X-Archie-Reply header
- Blocks on core NATS inbox subscription for response
- Same Run(ctx, workspace, req) (Result, error) contract

Rewritten archie-agent (cmd/archie-agent):
- Long-running NATS-connected process (was 28-line stdin/stdout)
- Pull-consumes from ARCHIE_TASKS with archie.agent.> filter
- Builds InProcessRunner, executes agent loop, replies to inbox
- Graceful shutdown via signal handling

Extended internal/nats:
- SubjectAgentWildcard, SubjectForAgentRequest, ReplyHeader
- Conn() accessor, NewReplyInbox(), PublishMsg() for JetStream
- Stream subjects extended to ["archie.task.>", "archie.agent.>"]

Config: "nats" added as valid agent.mode alongside inprocess/subprocess
Tests: NATSRunner round-trip with embedded NATS server + handler
2026-07-22 02:13:01 +10:00

80 lines
2.3 KiB
TOML

# archied configuration. Copy to ~/.config/archie/config.toml.
# Forge tokens are NOT configured here: export the variable named by token_env.
# work_dir = "~/.local/share/archie/work" # default
# db_path = "~/.local/share/archie/archie.db"
poll_interval = "60s"
label = "archie"
bot_user = "vectis-labs-archie"
diff_cap_lines = 400
[forge]
type = "github"
host = "https://github.com"
token_env = "ARCHIE_GITHUB_TOKEN"
[dispatch]
trigger = "assignee" # "assignee", "label", or "either"
ack_reaction = "eyes" # "off" disables pickup reactions
[dispatch.labels]
queued = "archie:queued"
working = "archie:working"
waiting = "archie:waiting"
pr = "archie:pr"
parked = "archie:parked"
[models] # role -> ai-sdk runtime ref (used by agent workflows, Phase 4b)
triage = "openai/gpt-5.4"
planner = "openai/gpt-5.4"
builder = "openai/gpt-5.4"
[providers.openai]
class = "openai"
api_key_env = "OPENAI_API_KEY"
[providers.ollama]
class = "ollama"
[agent]
mode = "inprocess" # "subprocess" runs each stage through archie-agent (stdin/stdout); "nats" sends stages over NATS
command = "archie-agent" # executable path for subprocess mode (not used in nats mode)
# Subprocess mode isolates the protocol and process lifecycle, not OS privileges.
# The worker still runs as the daemon user until the Docker sandbox phase lands.
# env = ["GOCACHE"] # extra environment variable names forwarded to the worker
[web] # observability dashboard (read-only, no auth — keep it local/tailnet)
listen = "127.0.0.1:8484" # "off" disables
[notify] # optional webhook for human-in-the-loop moments (n8n -> email)
# webhook = "https://n8n.catlow.cloud/webhook/archie"
[budgets]
max_steps = 60
max_tokens = 400000
wall_clock = "30m"
gate_max_failures = 5
# NATS JetStream for distributed task queue. Remove or leave commented out
# to run in single-process SQLite mode.
# [nats]
# url = "nats://localhost:4222"
# token_env = "NATS_TOKEN"
[[repos]]
owner = "samcharles93"
name = "todo"
base = "main"
ecosystem = "go" # "go", "python", "node", "rust", or "custom"
# Override the ecosystem defaults when needed:
# preflight = [["go", "version"]]
# test_glob = "*_test.go"
protect = ["_templ.go"]
gate = [
["templ", "generate", "./components/"],
["go", "vet", "./..."],
["go", "build", "./..."],
["golangci-lint", "run"],
["go", "test", "./...", "-count=1"],
]