Commit Graph

49 Commits

Author SHA1 Message Date
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
gitea-actions[bot]
f45fa64855 deploy: update production images to ff0573703f 2026-03-21 20:36:48 +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
a687652bcd Add Gitea as a git provider for harness workspace repositories
Some checks failed
CI / lint-and-test (push) Successful in 30s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
Support Gitea alongside GitHub/GitLab for repo search, authenticated
cloning, and pull request creation via Gitea API. Tasks can specify
gitProvider and gitBaseUrl in their spec (defaults to github for
backwards compat). Auto-discovers GITEA_TOKEN from env on boot.
2026-03-21 20:33:35 +00:00
gitea-actions[bot]
11192da432 deploy: update production images to e2b339aac8 2026-03-21 20:28:54 +00:00
Julia McGhee
e2b339aac8 Auto-discover OpenCode Zen and Go models, add catalog search and pagination
All checks were successful
CI / lint-and-test (push) Successful in 29s
Deploy Production / deploy (push) Successful in 3m40s
CI / build (push) Successful in 1m34s
Add model fetchers for OpenCode Zen (https://opencode.ai/zen/v1/models) and
Go (https://opencode.ai/zen/go/v1/models) APIs. Register opencode-go as a new
provider, load shared credentials from auth.json, add known models with pricing,
and create default agents for both tiers on first boot.

Replace the manual "Add Model" form with a search bar that filters by model
name/ID and paginate the catalog at 25 models per page.
2026-03-21 20:24:38 +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
3fe75a8e04 Migrate harness from in-memory stores to CloudNativePG
Some checks failed
CI / lint-and-test (push) Successful in 22s
Deploy Production / deploy (push) Failing after 21s
CI / build (push) Failing after 1m51s
Replace all in-memory Map-backed stores (credentials, models, agents,
tasks, iterations, usage) with Drizzle ORM queries against the
homelab-pg PostgreSQL cluster. All store functions are now async.

- Add 6 harness_* tables to @homelab/db schema
- Generate and apply initial Drizzle migration
- Add lazy DB connection proxy to avoid build-time errors
- Wire DATABASE_URL from sealed secret into harness deployment
- Update all API routes, orchestrator, executor, and boot to await
  async store operations
2026-03-21 20:17:08 +00:00
gitea-actions[bot]
df351439d6 deploy: update production images to a60754d5a2 2026-03-21 20:00:58 +00:00
Julia McGhee
a60754d5a2 Fix boot state sharing across Next.js module boundaries
All checks were successful
CI / lint-and-test (push) Successful in 29s
Deploy Production / deploy (push) Successful in 47s
CI / build (push) Successful in 1m16s
Use globalThis for all in-memory stores (credentials, models, agents,
tasks) so the instrumentation hook and API route handlers share the
same data. Next.js bundles these as separate chunks with independent
module instances, causing boot-populated state to be invisible to
API routes.
2026-03-21 19:59:41 +00:00
gitea-actions[bot]
a079225367 deploy: update production images to 25b4769ff8 2026-03-21 19:54:48 +00:00
Julia McGhee
25b4769ff8 Auto-discover credentials, models, and agents on harness startup
All checks were successful
CI / lint-and-test (push) Successful in 20s
Deploy Production / deploy (push) Successful in 59s
CI / build (push) Successful in 1m13s
Read mounted secret files (Claude OAuth, OpenCode auth.json) and env
vars on boot, register them as credentials, fetch available models
from provider APIs, and create default agent configs for each viable
runtime+provider+model combination.
2026-03-21 19:53:29 +00:00
gitea-actions[bot]
e97614d568 deploy: update production images to df1111da15 2026-03-21 19:44:21 +00:00
Julia McGhee
df1111da15 Remove mock data from harness and add agent credential healthchecks
All checks were successful
CI / lint-and-test (push) Successful in 25s
Deploy Production / deploy (push) Successful in 59s
CI / build (push) Successful in 1m11s
Strip all seed/mock data (fake tasks, models, usage entries, agent configs)
so the dashboard starts clean and populates from real API state. Add
/api/agents/health endpoint that validates each agent's provider credentials
and CLI availability.
2026-03-21 19:42:53 +00:00
gitea-actions[bot]
28ec38bc59 deploy: update production images to fccf749598 2026-03-21 19:16:47 +00:00
Julia McGhee
82225fa8c9 chore: trigger harness rebuild
All checks were successful
CI / lint-and-test (push) Successful in 23s
CI / build (push) Successful in 1m14s
2026-03-21 18:27:12 +00:00
Julia McGhee
3153f0eda5 chore: trigger web rebuild
All checks were successful
CI / lint-and-test (push) Successful in 19s
CI / build (push) Successful in 1m14s
2026-03-21 18:23:40 +00:00
Julia McGhee
3a15f6ed07 chore: trigger api rebuild
All checks were successful
CI / lint-and-test (push) Successful in 25s
CI / build (push) Successful in 29s
2026-03-21 18:21:11 +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
2e32e02adb Add empty public dir for harness (required by Dockerfile)
Some checks failed
CI / lint-and-test (push) Successful in 44s
CI / build (push) Has been cancelled
2026-03-21 17:45:31 +00:00
Julia McGhee
5e86e56bed Add .dockerignore for harness to exclude node_modules from COPY
Some checks failed
CI / lint-and-test (push) Successful in 34s
CI / build (push) Failing after 1m12s
2026-03-21 17:43:10 +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
30c6f89f20 Seal remaining Gitea secrets: API token, runner token, pull secret
Some checks are pending
CI / changes (push) Waiting to run
CI / lint-and-test (push) Waiting to run
CI / build (push) Blocked by required conditions
Deploy Production / deploy (push) Waiting to run
All placeholder secrets replaced with real sealed values:
- argocd-gitea-token: API token for ArgoCD PR generator
- gitea-runner-token: registration token for in-cluster runner
- gitea-pull-secret: registry credentials for app image pulls
2026-03-21 16:09:19 +00:00
Julia McGhee
e0fcf2b756 Fix Gitea username: julia → lazorgurl in all registry/API refs
Some checks are pending
CI / changes (push) Waiting to run
CI / lint-and-test (push) Waiting to run
CI / build (push) Blocked by required conditions
Deploy Production / deploy (push) Waiting to run
Gitea admin username is julia but the Gitea account name is
lazorgurl. Update container registry URLs, workflow refs,
Taskfile API calls, and pull secret placeholders.
2026-03-21 16:06:58 +00:00
Julia McGhee
f04ecbf5cd Add Gitea self-hosted git/CI/registry to replace GitHub
Deploy Gitea via Helm with dedicated CloudNativePG database,
in-cluster Actions runner (DinD), and built-in container registry.
ArgoCD repoURLs updated to use in-cluster Gitea SSH. Preview
ApplicationSet switched from GitHub PR generator to Gitea PR
generator. App images now pull from gitea.coreworlds.io registry.

Remaining setup after deploy: seal runner token, ArgoCD API token,
and registry pull secret once Gitea is running. Add ArgoCD deploy
key to Gitea repo settings.
2026-03-21 15:43:30 +00:00
Julia McGhee
06ae2c7d46 Add ESLint config for harness app to fix CI lint 2026-03-21 15:38:12 +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
Julia McGhee
051c957347 Add observability stack: ServiceMonitors, Tempo, OTel API instrumentation, dashboards
- Add ServiceMonitors for Traefik, ArgoCD, and Longhorn
- Enable cert-manager ServiceMonitor via helm values
- Deploy Grafana Tempo for distributed tracing (single-binary, Longhorn PVC)
- Add Tempo datasource with trace-to-logs and trace-to-metrics correlation
- Instrument API with OpenTelemetry SDK (Prometheus metrics + OTLP traces)
- Replace console.log with pino structured logging + pino-http middleware
- Add Grafana dashboards for Traefik, API overview, and PostgreSQL (CNPG)
2026-03-20 21:01:05 +00:00
github-actions[bot]
8a23d5d5f6 deploy: update production images to da95687db9 2026-03-20 20:36:32 +00:00
Julia McGhee
11f1365f75 Fix CI lint failures: add ESLint config, use next/font, fix JSX comment
- Add .eslintrc.json so next lint doesn't prompt interactively in CI
- Switch Google Fonts from <link> tags to next/font/google
- Wrap "// SECURE_NODE_7" in JSX expression to avoid comment parse error
2026-03-20 20:27:13 +00:00
Julia McGhee
3d61911868 Add Tactical Monolith design system and landing page to web app
Set up Tailwind CSS v4 with full design token system from Stitch project
(obsidian surfaces, neon cyan/magenta/lime palette, Space Grotesk + Inter
typography, 0px border-radius). Landing page includes hero section, side
nav, module cards, system status panels, terminal log, and CRT overlay.
2026-03-20 20:24:19 +00:00
Julia McGhee
18b2564c8e Add sealed api-secrets with database and Valkey connection strings 2026-03-20 20:16:35 +00:00
Julia McGhee
9ae228f0f3 Add ghcr.io pull secret for private container images
Sealed secret provides auth for pulling from ghcr.io/lazorgurl/*.
Added imagePullSecrets to both app deployments.
2026-03-20 20:06:18 +00:00
github-actions[bot]
a38c6d399a deploy: update production images to 6df9afdc20 2026-03-20 19:58:01 +00:00
Julia McGhee
6317291330 Add empty public directory for Next.js Docker build 2026-03-20 19:53:32 +00:00
Julia McGhee
68261e17a2 Add .dockerignore files to prevent node_modules copy conflicts 2026-03-20 19:51:12 +00:00
Julia McGhee
c9f612d5ce Switch Dockerfiles from pnpm to npm for standalone app builds
pnpm in workspace mode can't generate per-app lockfiles, and without a
lockfile the install is unreliable in CI. npm works fine for these
standalone app builds since they have no workspace dependencies.
2026-03-20 19:49:50 +00:00
Julia McGhee
dafbb59463 Fix Docker builds: drop frozen-lockfile for standalone app builds
Apps build in isolation from the monorepo, so the root pnpm-lock.yaml
doesn't match the app-level package.json. Use plain pnpm install
since each app's package.json is the source of truth.
2026-03-20 19:48:00 +00:00
Julia McGhee
71442a0405 Switch from homelab.local to coreworlds.io with split-horizon DNS and LAN-only access controls
- Migrate all ingress hostnames from *.homelab.local to *.coreworlds.io
- Remove broken Traefik certresolver config (cert-manager handles TLS)
- Add internal-only IP allowlist middleware for platform services
- Add IngressRoutes for ArgoCD, Grafana, Longhorn (LAN-only via middleware)
- Seal and add Cloudflare API token for cert-manager DNS-01 challenges
- Update cert-manager ClusterIssuers with real email
- Update k3s TLS SAN to k3s.coreworlds.io
- Rewrite Ubiquiti docs for single-node topology and split-horizon DNS
- Fix seal-secret.sh controller name to match Helm release
- Add UCG DNS setup script using API key auth
2026-03-20 19:21:46 +00:00
Julia McGhee
7f3585a013 Configure ArgoCD for private repo access
- Update repo URLs from HTTPS placeholder to git@github.com:lazorgurl/homelab.git
- Update container image refs from OWNER to lazorgurl
- Set KUBECONFIG env in Taskfile
- Fix kubeconfig-fetch.sh to auto-detect server IP from inventory
- Fix Ansible: callback plugin, br_netfilter ordering, ssh service name
2026-03-20 18:33:30 +00:00
Julia McGhee
96e3f32f28 Initial monorepo scaffold
Turborepo + pnpm monorepo for k3s homelab cluster on Intel NUCs.

- Apps: Next.js web frontend, Express API (TypeScript, Dockerfiles, k8s manifests)
- Packages: shared UI, ESLint config, TypeScript config, Drizzle DB schemas
- Infra/Ansible: bare-metal provisioning with roles for common, k3s-server, k3s-agent, hardening
- Infra/Kubernetes: ArgoCD GitOps (app-of-apps + ApplicationSets), platform components
  (cert-manager, Traefik, CloudNativePG, Valkey, Longhorn, Sealed Secrets), namespaces
- Observability: kube-prometheus-stack, Loki, Promtail as ArgoCD Applications
- CI/CD: GitHub Actions for PR builds, preview deploys, production deploys
- DX: Taskfile, utility scripts, copier templates, Ubiquiti network docs
2026-03-19 22:24:56 +00:00