Commit Graph

27 Commits

Author SHA1 Message Date
Julia McGhee
033bb1f4e6 Fix opencode install: download musl binary directly from GitHub
Some checks failed
CI / lint-and-test (push) Successful in 36s
Deploy Production / deploy (push) Failing after 3m7s
CI / build (push) Failing after 3m26s
The opencode.ai install script fails in CI (TLS errors, missing $SHELL).
Download the pre-built musl binary directly from GitHub releases instead.
Verified locally on linux/amd64 with PTY spawn.
2026-03-21 23:06:03 +00:00
Julia McGhee
111b189205 Fix opencode install: set SHELL env for Alpine compatibility
Some checks failed
CI / lint-and-test (push) Successful in 41s
Deploy Production / deploy (push) Failing after 2m51s
CI / build (push) Failing after 3m21s
The opencode installer script requires $SHELL to be set, which Alpine's
sh in Docker doesn't provide. This caused the install to download the
binary but fail before placing it, silently swallowed by the || fallback.
Also hardcode the known install path and fail the build if it's missing.
2026-03-21 22:49:54 +00:00
Julia McGhee
30ce05f9d7 Fix opencode path: installer uses ~/.opencode/bin not ~/.local/bin
All checks were successful
CI / lint-and-test (push) Successful in 38s
Deploy Production / deploy (push) Successful in 1m38s
CI / build (push) Successful in 1m59s
2026-03-21 22:35:03 +00:00
Julia McGhee
96cd8dfed9 Fix deploy build failure and opencode chat execvp error
All checks were successful
CI / lint-and-test (push) Successful in 38s
Deploy Production / deploy (push) Successful in 1m20s
CI / build (push) Successful in 2m0s
Add "gitea" to local RepoResult provider type (was missing from UI
interface despite being returned by repo-search). Copy opencode binary
instead of symlinking — symlink through /root/ is inaccessible to the
nextjs user due to directory permissions.
2026-03-21 22:21:28 +00:00
Julia McGhee
bf67446480 Fix opencode not found: symlink installer binary to /usr/local/bin
All checks were successful
CI / lint-and-test (push) Successful in 34s
Deploy Production / deploy (push) Successful in 1m30s
CI / build (push) Successful in 1m51s
The opencode curl installer puts the binary in /root/.local/bin which
isn't on PATH for the nextjs user. Add a symlink to /usr/local/bin
after install. Also ensure /usr/local/bin is always in the PATH
passed to spawned agent processes.
2026-03-21 22:10:13 +00:00
Julia McGhee
548b0fde98 Fix harness crash: load standalone config to skip webpack in production
All checks were successful
CI / lint-and-test (push) Successful in 38s
Deploy Production / deploy (push) Successful in 1m26s
CI / build (push) Successful in 1m52s
The standalone next package is trimmed and doesn't include webpack.
The custom server.js was using next() which triggers config loading
that requires webpack. Fix by extracting the standalone config at
build time and setting __NEXT_PRIVATE_STANDALONE_CONFIG before
requiring next, matching what the generated standalone server does.
2026-03-21 21:44:15 +00:00
Julia McGhee
4b517958aa Fix harness crash: move server.js into standalone app dir
All checks were successful
CI / lint-and-test (push) Successful in 29s
Deploy Production / deploy (push) Successful in 1m29s
CI / build (push) Successful in 1m49s
server.js requires 'next', which the standalone output places at
apps/harness/node_modules/next. Running server.js from the repo root
meant Node couldn't resolve it. Move server.js and pty-server.js into
apps/harness/ so module resolution finds the standalone node_modules.
2026-03-21 21:33:59 +00:00
Julia McGhee
ccebbc4015 Remove git MCP server: package doesn't exist on npm, git CLI suffices
Some checks failed
CI / lint-and-test (push) Successful in 34s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
@modelcontextprotocol/server-git is not published to npm (it's a
Python package). Agents already have git installed and can use it
directly, so the MCP wrapper is unnecessary.
2026-03-21 21:13:37 +00:00
Julia McGhee
ed3331b575 Fix kubernetes-mcp-server package name: remove incorrect @manusa/ scope
Some checks failed
CI / lint-and-test (push) Successful in 41s
Deploy Production / deploy (push) Failing after 42s
CI / build (push) Failing after 1m8s
The npm package is published as `kubernetes-mcp-server` (unscoped),
not `@manusa/kubernetes-mcp-server` which returns 404.
2026-03-21 21:09:30 +00:00
Julia McGhee
27991e7309 Fix gitea-mcp COPY path: use explicit GOBIN instead of guessing GOPATH default
Some checks failed
Deploy Production / deploy (push) Failing after 1m5s
CI / build (push) Failing after 1m11s
CI / lint-and-test (push) Successful in 34s
golang:1.26-alpine uses GOPATH=/go (not /root/go), so the binary was
installed to /go/bin/gitea-mcp but the COPY looked at /root/go/bin/.
Set GOBIN=/usr/local/bin for a deterministic install location.

Also adds harness MCP server bundle to the image.
2026-03-21 21:06:11 +00:00
Julia McGhee
33e2d8505a Fix gitea-mcp builder: bump to Go 1.26 (current stable)
Some checks failed
CI / build (push) Failing after 53s
CI / lint-and-test (push) Successful in 34s
Deploy Production / deploy (push) Failing after 54s
gitea-mcp@v1.0.1 requires go >= 1.26.0. Go 1.26 was released Feb 2026.
2026-03-21 20:59:32 +00:00
Julia McGhee
b2fae6d296 Bump gitea-mcp builder to Go 1.24 to satisfy toolchain requirement
Some checks failed
CI / lint-and-test (push) Successful in 37s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
gitea-mcp@v1.0.1 requires go >= 1.26 toolchain directive which Go 1.22
cannot handle. Go 1.24 supports automatic toolchain resolution.
2026-03-21 20:58:42 +00:00
Julia McGhee
620fbc6b83 Add MCP servers (Gitea, K8s, Postgres, filesystem, git) to harness agents
Some checks failed
CI / lint-and-test (push) Successful in 36s
Deploy Production / deploy (push) Failing after 40s
CI / build (push) Failing after 59s
Wire 5 MCP servers into Claude Code agents spawned by the harness:
- Gitea MCP for repo/issue/PR management on self-hosted Gitea
- Kubernetes MCP with read-only RBAC for cluster inspection
- Postgres MCP with read-only user for database queries
- Filesystem and Git MCP scoped to task worktrees

Generates .claude/settings.json in each worktree before agent spawn.
Gracefully skips for Codex/OpenCode runtimes (no MCP support).

Also fixes node-pty build failure by using local Node.js headers
instead of downloading from unofficial-builds.nodejs.org (ECONNRESET).
2026-03-21 20:55:19 +00:00
Julia McGhee
7bb091d4b3 Add interactive PTY Chat tab with xterm.js terminal emulator
Some checks failed
CI / lint-and-test (push) Successful in 33s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
Browser-based interactive terminal sessions with agent CLIs via
WebSocket + node-pty. Supports full TUI rendering (colors, cursor,
ctrl-c) through xterm.js in the browser.

Architecture: xterm.js ←WebSocket→ pty-server.js ←PTY→ agent CLI

- Extract shared buildAgentEnv() from executor into agent-env.ts
- Add internal /api/agents/[id]/env endpoint for PTY server
- Add pty-server.js (WebSocket + node-pty, max 3 sessions, 2hr cleanup)
- Add custom server.js wrapping Next.js with WebSocket upgrade
- Add ChatTab component with agent selector and terminal
- Wire CHAT tab into dashboard nav and render
- Configure serverExternalPackages for node-pty
- Update Dockerfile with build tools and custom server
- Bump k8s memory limit 1Gi → 2Gi for PTY sessions
2026-03-21 20:43:07 +00:00
Julia McGhee
ff0573703f Fix harness Dockerfile standalone paths for monorepo workspace build
All checks were successful
CI / lint-and-test (push) Successful in 29s
Deploy Production / deploy (push) Successful in 1m9s
CI / build (push) Successful in 1m42s
Next.js standalone output nests server.js under apps/harness/ when
built from a pnpm workspace. Preserve the directory structure and
update CMD to point to the correct server.js path.
2026-03-21 20:35:09 +00:00
Julia McGhee
f0d9482bc8 Fix Docker build for harness workspace dependency on @homelab/db
Some checks failed
CI / lint-and-test (push) Successful in 29s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
Switch harness Dockerfile to pnpm with repo root build context so
workspace:^ dependency on @homelab/db resolves. Use .dockercontext
marker file to opt individual apps into root context builds while
keeping web/api on their local app context.
2026-03-21 20:24:02 +00:00
Julia McGhee
a525fc8aec chore: trigger full rebuild (7)
All checks were successful
CI / lint-and-test (push) Successful in 18s
CI / build (push) Successful in 2m11s
2026-03-21 18:13:19 +00:00
Julia McGhee
d7f0931fa6 Fix harness: add ca-certificates, make opencode install non-fatal
Some checks failed
CI / lint-and-test (push) Successful in 17s
CI / build (push) Failing after 3m38s
2026-03-21 18:04:44 +00:00
Julia McGhee
adaff14c36 chore: trigger full rebuild (6)
Some checks failed
CI / lint-and-test (push) Successful in 37s
CI / build (push) Failing after 5m16s
2026-03-21 17:58:13 +00:00
Julia McGhee
264e498657 chore: trigger full rebuild (5)
Some checks failed
CI / lint-and-test (push) Successful in 22s
CI / build (push) Has been cancelled
2026-03-21 17:52:17 +00:00
Julia McGhee
1e3d4bceaa Install opencode via curl installer (Go binary, not on npm)
Some checks failed
CI / lint-and-test (push) Successful in 23s
CI / build (push) Failing after 1m11s
2026-03-21 17:41:05 +00:00
Julia McGhee
188003f0e8 Fix harness Dockerfile: remove opencode (not on npm)
Some checks failed
CI / lint-and-test (push) Successful in 37s
CI / build (push) Has been cancelled
2026-03-21 17:39:32 +00:00
Julia McGhee
e672ca5d2d chore: trigger full rebuild (4)
Some checks failed
CI / lint-and-test (push) Successful in 44s
CI / build (push) Failing after 3m3s
2026-03-21 17:34:23 +00:00
Julia McGhee
0be7ad6dca chore: trigger full rebuild of all app images (3)
Some checks failed
CI / lint-and-test (push) Successful in 34s
CI / build (push) Failing after 45s
2026-03-21 17:30:47 +00:00
Julia McGhee
8ceea37976 chore: trigger full rebuild of all app images
Some checks failed
CI / changes (push) Successful in 16s
CI / lint-and-test (push) Successful in 43s
CI / build (push) Failing after 19s
2026-03-21 17:27:06 +00:00
Julia McGhee
3ef1cbd1bb chore: trigger initial image builds for Gitea registry
Some checks failed
CI / changes (push) Successful in 2s
CI / lint-and-test (push) Successful in 43s
CI / build (push) Failing after 20s
2026-03-21 17:20:14 +00:00
Julia McGhee
6dde7c8aef Add harness app: agent orchestrator with cluster deployment
- Next.js app for orchestrating coding agent benchmarks (Claude Code, Codex, OpenCode)
- Dockerfile installs git, gh CLI, and agent CLIs for headless execution
- K8s deployment with workspace volume, sealed credentials for Claude + OpenCode
- Traefik IngressRoute at harness.coreworlds.io with internal-only middleware + TLS
- CI pipeline path filter for harness builds
- Fix OpenCode runtime flags (subcommand-based headless mode)
2026-03-21 15:26:09 +00:00