|
| 1 | +# Loom Deploy — RFC 0010 Phase 1 |
| 2 | + |
| 3 | +This is the first agent-runtime deployment for Loom, installed as a Hermes-pair alongside the paused arc-starter. |
| 4 | + |
| 5 | +## Target Host |
| 6 | + |
| 7 | +- host: `dev@192.168.1.14` |
| 8 | +- working tree: `/home/dev/agent-runtime` |
| 9 | +- config: `/home/dev/agent-runtime/deploy/loom/runtime.loom.json` |
| 10 | +- host override (optional): `/home/dev/.config/agent-runtime/loom.host.json` |
| 11 | +- state root: `/home/dev/agent-runtime/deploy/loom/state/` |
| 12 | + |
| 13 | +## Identity Continuity |
| 14 | + |
| 15 | +Loom's on-chain addresses must survive this migration unchanged. |
| 16 | + |
| 17 | +- Bitcoin Taproot: `bc1ptqmds7ghh5lqexzd34xnf5sryxzjvlvuj2eetmhgjkp998545tequsd9we` |
| 18 | +- Stacks: `SP1KGHF33817ZXW27CG50JXWC0Y6BNXAQ4E7YGAHM` |
| 19 | + |
| 20 | +Verify before signoff: the arc-starter snapshot SHA is in `/home/dev/arc-starter/README.LEGACY.md`. |
| 21 | + |
| 22 | +## Pre-Deploy Checklist |
| 23 | + |
| 24 | +- [ ] arc-starter timers disabled: arc-dispatch.timer, arc-sensors.timer, arc-web.service, arc-watchdog.timer |
| 25 | +- [ ] arc-starter snapshot SHA committed and recorded in README.LEGACY.md |
| 26 | +- [ ] agent-runtime cloned to /home/dev/agent-runtime |
| 27 | +- [ ] state directories created |
| 28 | +- [ ] `bun install` succeeded |
| 29 | +- [ ] `bunx tsc --noEmit` passes |
| 30 | +- [ ] `bun run src/cli.ts healthcheck --config deploy/loom/runtime.loom.json` passes |
| 31 | + |
| 32 | +## Provisioning Steps |
| 33 | + |
| 34 | +```bash |
| 35 | +# 1. Clone |
| 36 | +git clone https://github.com/aibtcdev/agent-runtime.git /home/dev/agent-runtime |
| 37 | +cd /home/dev/agent-runtime |
| 38 | + |
| 39 | +# 2. Install deps |
| 40 | +~/.bun/bin/bun install |
| 41 | + |
| 42 | +# 3. Verify compile |
| 43 | +~/.bun/bin/bunx tsc --noEmit |
| 44 | + |
| 45 | +# 4. Create state dirs |
| 46 | +mkdir -p deploy/loom/state/logs deploy/loom/state/artifacts |
| 47 | + |
| 48 | +# 5. Configure OpenRouter env |
| 49 | +mkdir -p ~/.config/agent-runtime |
| 50 | +# Create ~/.config/agent-runtime/loom.openrouter.env with: |
| 51 | +# ANTHROPIC_API_KEY=<openrouter key> |
| 52 | +# ANTHROPIC_BASE_URL=https://openrouter.ai/api/v1 |
| 53 | + |
| 54 | +# 6. Healthcheck |
| 55 | +~/.bun/bin/bun run src/cli.ts healthcheck --config deploy/loom/runtime.loom.json |
| 56 | + |
| 57 | +# 7. Manual cycle |
| 58 | +~/.bun/bin/bun run src/cli.ts run-once --config deploy/loom/runtime.loom.json |
| 59 | +``` |
| 60 | + |
| 61 | +## State Directory Layout |
| 62 | + |
| 63 | +``` |
| 64 | +deploy/loom/ |
| 65 | + state/ |
| 66 | + runtime.db — task/attempt/bundle DB |
| 67 | + dispatch.lock — single-dispatch lock |
| 68 | + logs/ |
| 69 | + runtime.jsonl — append-only event log |
| 70 | + artifacts/ — managed output artifacts |
| 71 | +``` |
| 72 | + |
| 73 | +State dirs are separate from arc-starter's `/home/dev/arc-starter/db/`. No shared state. |
| 74 | + |
| 75 | +## Systemd Units |
| 76 | + |
| 77 | +Install from `deploy/systemd/` templates: |
| 78 | + |
| 79 | +```bash |
| 80 | +cp deploy/systemd/agent-runtime-run-once@.service ~/.config/systemd/user/ |
| 81 | +cp deploy/systemd/agent-runtime-dispatch@.timer ~/.config/systemd/user/ |
| 82 | +cp deploy/systemd/agent-runtime-operator@.service ~/.config/systemd/user/ |
| 83 | +systemctl --user daemon-reload |
| 84 | +systemctl --user enable --now agent-runtime-dispatch@loom.timer |
| 85 | +systemctl --user enable --now agent-runtime-operator@loom.service |
| 86 | +``` |
| 87 | + |
| 88 | +## Exit Condition For "Loom Is Fired Up" |
| 89 | + |
| 90 | +- `healthcheck` passes on `192.168.1.14` |
| 91 | +- One manual task completes through `hermes-openrouter` adapter |
| 92 | +- State dirs exist and are separate from arc-starter |
| 93 | +- Timer enabled and completes one unattended cycle |
| 94 | +- arc-starter timers remain disabled |
| 95 | +- Identity addresses unchanged |
| 96 | + |
| 97 | +## Rollback |
| 98 | + |
| 99 | +1. `systemctl --user stop agent-runtime-dispatch@loom.timer` |
| 100 | +2. Re-enable arc-starter: `systemctl --user enable --now arc-dispatch.timer arc-sensors.timer arc-web.service` |
| 101 | +3. State in `deploy/loom/state/` is preserved — do not delete |
0 commit comments