Open History to see the last commit
1[workspace]
2name = "t3code"
3version = "0.0.13"
4description = "Multi-provider AI coding agent with Elixir harness + Node intelligence layer"
5channels = ["conda-forge"]
6platforms = ["osx-arm64", "osx-64", "linux-64", "linux-aarch64"]
7
8[dependencies]
9# BEAM runtime (Elixir harness)
10erlang = ">=28"
11# NOTE: elixir is not yet on conda-forge for osx-arm64 (only linux-64).
12# Install elixir separately via: brew install elixir OR asdf install elixir
13# Once conda-forge adds osx-arm64 support, uncomment:
14# elixir = ">=1.19"
15
16# Node runtime (intelligence + UI layer)
17nodejs = ">=25"
18
19# Build tools
20git = ">=2.40"
21
22[tasks]
23# ── Setup ──────────────────────────────────────────────────────────
24setup = { cmd = "bun install && cd apps/harness && mix deps.get", description = "Install all dependencies (npm + hex)" }
25
26# ── Development ────────────────────────────────────────────────────
27dev = { cmd = "./scripts/dev-harness.sh", description = "Start full stack: Elixir harness + Node server + Vite" }
28dev-server = { cmd = "bun run dev:server", description = "Start Node server only" }
29dev-web = { cmd = "bun run dev:web", description = "Start Vite dev server only" }
30harness = { cmd = "cd apps/harness && T3CODE_HARNESS_PORT=4321 T3CODE_HARNESS_SECRET=dev-harness-secret mix phx.server", description = "Start Elixir harness only" }
31harness-bg = { cmd = "./apps/harness/bin/harness start-bg", description = "Start harness in background" }
32
33# ── Testing ────────────────────────────────────────────────────────
34test = { cmd = "bun run test", description = "Run all TypeScript tests" }
35test-elixir = { cmd = "cd apps/harness && mix test", description = "Run Elixir tests" }
36typecheck = { cmd = "bun run typecheck", description = "TypeScript type check" }
37
38# ── Elixir quality ─────────────────────────────────────────────────
39credo = { cmd = "cd apps/harness && mix credo", description = "Run Elixir linter" }
40format-check = { cmd = "cd apps/harness && mix format --check-formatted", description = "Check Elixir formatting" }
41precommit-elixir = { cmd = "cd apps/harness && mix precommit", description = "Run all Elixir checks" }
42
43# ── Stress tests ───────────────────────────────────────────────────
44stress-gc = { cmd = "bun run scripts/stress-test-gc-lab-elixir.ts", description = "GC lab test (requires harness)" }
45stress-leak = { cmd = "bun run scripts/stress-test-memory-leak.ts --runtime=elixir", description = "Memory leak simulation" }
46stress-scale = { cmd = "bun run scripts/stress-test-scale50.ts --runtime=elixir", description = "50-session scale test" }
47stress-subagent = { cmd = "bun run scripts/stress-test-real-subagent.ts --runtime=elixir --sessions=2", description = "Real Codex subagent test" }
48stress-analyze = { cmd = "bun run scripts/stress-test-analyze.ts", description = "Regenerate analysis from JSON results" }
49viz = { cmd = "/tmp/viz-env/bin/python3 output/stress-test/viz.py && /tmp/viz-env/bin/python3 output/stress-test/viz-real.py", description = "Generate all charts" }
50
51# ── Desktop (Electron) ─────────────────────────────────────────────
52dev-desktop = { cmd = "./scripts/dev-harness.sh & sleep 10 && cd apps/desktop && ELECTRON_RENDERER_PORT=5734 bun run dev", description = "Full desktop: Elixir harness + Electron (shares Vite from dev-harness)" }
53build-desktop = { cmd = "bun run build:desktop", description = "Build desktop artifacts" }
54dist-dmg = { cmd = "bun run dist:desktop:dmg:arm64", description = "Build macOS arm64 DMG" }
55
56# ── Utilities ──────────────────────────────────────────────────────
57harness-status = { cmd = "curl -s http://127.0.0.1:4321/api/metrics | python3 -c \"import sys,json;d=json.load(sys.stdin);b=d['beam'];print(f'BEAM: {b[\\\"process_count\\\"]} procs, {b[\\\"total_memory\\\"]//1048576}MB');[print(f' [{s[\\\"provider\\\"]:12}] {s[\\\"thread_id\\\"][:30]}... mem={s[\\\"memory\\\"]/1024:.0f}KB') for s in d.get('sessions',[])]\"", description = "Show harness session status" }
58kill-all = { cmd = "kill $(lsof -ti:4321) 2>/dev/null; kill $(lsof -ti:3780) 2>/dev/null; kill $(lsof -ti:5734) 2>/dev/null; echo 'All ports cleared'", description = "Kill stale processes on dev ports" }
59
60# ── Bun (not in conda-forge, install separately) ───────────────────
61install-bun = { cmd = "curl -fsSL https://bun.sh/install | bash", description = "Install bun if not present" }
62
63[feature.viz.dependencies]
64# Python data science stack for chart generation
65python = ">=3.12"
66matplotlib = ">=3.9"
67numpy = ">=2.0"
68seaborn = ">=0.13"
69
70[feature.viz.tasks]
71viz = { cmd = "python output/stress-test/viz.py && python output/stress-test/viz-real.py", description = "Generate all charts (uses pixi python)" }
72
73[environments]
74default = { features = [], solve-group = "default" }
75viz = { features = ["viz"], solve-group = "default" }