Commit Graph

154 Commits

Author SHA1 Message Date
Julia McGhee
7f8981658a Add container registry tab to platform dashboard
All checks were successful
CI / lint-and-test (push) Successful in 40s
Deploy Production / deploy (push) Successful in 1m22s
CI / build (push) Successful in 1m49s
Browse and manage Gitea container images directly from the dashboard.
- List all container images with tag counts
- Drill into an image to see all tags sorted by date
- Delete individual tags (with confirmation)
- Visual distinction for digests vs named tags, "latest" badge
- Proxies Gitea's /api/v1/packages API with sealed token
2026-03-22 11:10:36 +00:00
gitea-actions[bot]
b9e67aed51 deploy: update production images to e0c6d3940a 2026-03-22 10:57:43 +00:00
Julia McGhee
e0c6d3940a Fix chat provider routing for OpenCode Zen/Go
All checks were successful
CI / lint-and-test (push) Successful in 38s
Deploy Production / deploy (push) Successful in 1m30s
CI / build (push) Successful in 2m16s
OpenCode Zen and Go models were being routed to api.openai.com because
their base URLs weren't in the provider map. Add correct base URLs
(opencode.ai/zen and opencode.ai/zen/go) and error on unknown providers
instead of silently falling back to OpenAI.
2026-03-22 10:55:36 +00:00
gitea-actions[bot]
8f06467880 deploy: update production images to 997205a6c8 2026-03-22 10:51:11 +00:00
Julia McGhee
997205a6c8 Fix chat model selector: fetch all provider models instead of curated
All checks were successful
CI / lint-and-test (push) Successful in 40s
Deploy Production / deploy (push) Successful in 1m19s
CI / build (push) Successful in 2m12s
The dropdown was empty because it fetched from /api/models/curated
(small DB subset) filtered to enabled-only. Switch to /api/models
which queries all providers live and returns 300+ available models.
2026-03-22 10:49:06 +00:00
gitea-actions[bot]
bd17e442f7 deploy: update production images to d08a630172 2026-03-22 10:48:23 +00:00
Julia McGhee
d08a630172 Platform dash: add tabs, bucket manager, new dirs, fix button layout
Some checks failed
CI / lint-and-test (push) Successful in 42s
Deploy Production / deploy (push) Successful in 1m20s
CI / build (push) Has been cancelled
- Object store is now a tab ("Object Browser") alongside "Buckets"
- Buckets tab: create and delete buckets
- New directory creation via NEW DIR button
- DOWNLOAD and DELETE buttons are now full words with borders and
  spacing between them to prevent misclicks
- Bucket selector dropdown when multiple buckets exist
- All API routes accept optional bucket query param
2026-03-22 10:46:09 +00:00
gitea-actions[bot]
ff3c50305b deploy: update production images to 9e1491201b 2026-03-22 10:45:35 +00:00
Julia McGhee
9e1491201b Replace PTY chat with streaming AI chat and shared tool registry
Some checks failed
CI / lint-and-test (push) Successful in 39s
Deploy Production / deploy (push) Successful in 2m5s
CI / build (push) Has been cancelled
Replace the xterm/PTY-based chat tab with a direct-to-API streaming chat
UI that calls provider APIs (Anthropic, OpenAI) with SSE streaming and
inline tool execution.

- Extract 18 shared tools from MCP server into chat-tools.ts registry
  (knowledge, task, agent, model, web, shell, filesystem tools)
- Add streaming adapters for Anthropic and OpenAI APIs (raw fetch, no SDK)
- Add POST /api/chat SSE route with tool-use loop (max 10 rounds)
- Rewrite chat-tab.tsx as message-based UI with model selector,
  streaming text, and collapsible tool call blocks
- Refactor mcp-server.ts to consume shared tool registry
2026-03-22 10:42:48 +00:00
Julia McGhee
c718b67772 Add ESLint config to platform-dash
Some checks failed
CI / lint-and-test (push) Successful in 36s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
2026-03-22 10:40:39 +00:00
gitea-actions[bot]
eedf0deadd deploy: update production images to 83bb1f56aa 2026-03-22 10:39:42 +00:00
Julia McGhee
83bb1f56aa Add .gitkeep to platform-dash public dir for Docker COPY
Some checks failed
CI / lint-and-test (push) Failing after 28s
CI / build (push) Has been skipped
Deploy Production / deploy (push) Successful in 1m21s
2026-03-22 10:37:52 +00:00
Julia McGhee
970154769c Add platform-dash: S3 artifact browser for Garage object store
Some checks failed
CI / lint-and-test (push) Failing after 30s
CI / build (push) Has been skipped
Deploy Production / deploy (push) Failing after 1m31s
Lightweight Next.js app for browsing, uploading, and downloading
artifacts from the cluster-local Garage S3 bucket. Uses the harness
design system. Features:
- File/folder browser with breadcrumb navigation
- Drag-and-drop upload
- Download and delete
- Ingress at platform.coreworlds.io (internal-only)

Also adds platform-dash to CI/deploy workflows.
2026-03-22 10:34:14 +00:00
gitea-actions[bot]
a37a1a6e65 deploy: update production images to 56e24e3802 2026-03-22 10:07:31 +00:00
Julia McGhee
56e24e3802 Switch opencode download to cluster-local Garage object store
All checks were successful
CI / lint-and-test (push) Successful in 36s
Deploy Production / deploy (push) Successful in 1m40s
CI / build (push) Successful in 1m52s
Download from garage.platform.svc:3902 (web gateway) instead of
GitHub releases. Eliminates external network dependency during builds.
Verified download works from inside DinD-spawned containers.
2026-03-22 10:05:14 +00:00
Julia McGhee
a3e6faee29 Add web gateway port (3902) to garage service for anonymous reads
Some checks failed
CI / lint-and-test (push) Successful in 36s
Deploy Production / deploy (push) Successful in 22s
CI / build (push) Has been cancelled
2026-03-22 10:03:49 +00:00
Julia McGhee
9d11765405 Fix Garage config: use top-level rpc fields, template admin_token
All checks were successful
CI / lint-and-test (push) Successful in 35s
Deploy Production / deploy (push) Successful in 31s
CI / build (push) Successful in 33s
Garage v1.0.x uses top-level rpc_bind_addr/rpc_secret, not a [rpc]
section. Also template admin_token into [admin] from the sealed secret.
2026-03-22 09:42:26 +00:00
Julia McGhee
3c4ff6fb9f Add Garage S3-compatible object store to platform
All checks were successful
CI / lint-and-test (push) Successful in 30s
Deploy Production / deploy (push) Successful in 31s
CI / build (push) Successful in 29s
Cluster-local object store for build artifacts (CLI binaries etc.)
so Docker builds don't depend on flaky external downloads.

- Single-node Garage v1.0.1 StatefulSet (LMDB, replication=1)
- Metadata on longhorn-nvme (1Gi), data on longhorn HDD (20Gi)
- S3 API at garage.platform.svc:3900
- External ingress at s3.coreworlds.io (internal-only)
- SealedSecret for admin token and RPC secret
2026-03-22 09:38:47 +00:00
Julia McGhee
325c88103f Fix opencode download: save to disk before extracting
Some checks failed
CI / lint-and-test (push) Successful in 35s
Deploy Production / deploy (push) Failing after 3m3s
CI / build (push) Failing after 3m29s
Piping curl directly to tar fails in CI when the download is chunked,
causing "not found in archive". Download to a temp file first.
Verified on linux/amd64.
2026-03-21 23:15:00 +00:00
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
gitea-actions[bot]
d1639f1bbe deploy: update production images to 30ce05f9d7 2026-03-21 22:37:17 +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
gitea-actions[bot]
d9b72d95c0 deploy: update production images to 96cd8dfed9 2026-03-21 22:23:28 +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
ce58800b36 Fix Gitea repo search: correct service name and add UI support
Some checks failed
CI / lint-and-test (push) Successful in 39s
Deploy Production / deploy (push) Failing after 51s
CI / build (push) Failing after 46s
- GITEA_URL was pointing to gitea.platform.svc but the Helm chart
  names the HTTP service gitea-helm-http.platform.svc
- Add Gitea badge (GT, green) to repo search results UI
- Update placeholder and credential hint to mention Gitea
- Rewrite internal service URLs to external gitea.coreworlds.io in
  search results so agents can clone from outside the cluster
- Add error logging to diagnose search failures
2026-03-21 22:15:18 +00:00
gitea-actions[bot]
4192a29962 deploy: update production images to bf67446480 2026-03-21 22:12:16 +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
gitea-actions[bot]
0906efe60e deploy: update production images to b981cc0926 2026-03-21 22:01:37 +00:00
Julia McGhee
b981cc0926 Fix harness forbidden error: use internal token instead of host check
All checks were successful
CI / lint-and-test (push) Successful in 32s
Deploy Production / deploy (push) Successful in 1m20s
CI / build (push) Successful in 1m55s
The localhost check using host header and x-forwarded-for was unreliable
in the standalone Next.js server which may inject forwarded headers
internally. Replace with a per-process random token shared between the
PTY server and the API route via env var.
2026-03-21 21:59:45 +00:00
gitea-actions[bot]
88496cb908 deploy: update production images to 58c12a8d77 2026-03-21 21:53:14 +00:00
Julia McGhee
58c12a8d77 Fix harness PTY: bind to 0.0.0.0 instead of HOSTNAME
All checks were successful
CI / lint-and-test (push) Successful in 36s
Deploy Production / deploy (push) Successful in 1m19s
CI / build (push) Successful in 1m51s
In K8s, HOSTNAME is set to the pod name, so the server only listened
on that interface. The PTY server's loopback fetch to 127.0.0.1 was
connection-refused. Always bind to 0.0.0.0 so loopback works.
2026-03-21 21:51:18 +00:00
gitea-actions[bot]
9fe5b395ca deploy: update production images to 548b0fde98 2026-03-21 21:46:19 +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
gitea-actions[bot]
c135a15306 deploy: update production images to 4b517958aa 2026-03-21 21:36:00 +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
gitea-actions[bot]
53b9cd826a deploy: update production images to 58cd9e21db 2026-03-21 21:31:20 +00:00
Julia McGhee
58cd9e21db Fix deploy: use if/then instead of && to avoid pipefail exit
All checks were successful
CI / lint-and-test (push) Successful in 30s
Deploy Production / deploy (push) Successful in 34s
CI / build (push) Successful in 33s
The Dockerfile check in the while-read loop used `[ -f ... ] && echo`,
which exits non-zero for packages without Dockerfiles. With bash's
pipefail, this killed the entire step. Also remove unused GitHub
workflow copies since CI runs on Gitea only.
2026-03-21 21:26:23 +00:00
Julia McGhee
34e629d955 Fix deploy: filter out non-app packages from build matrix
Some checks failed
CI / lint-and-test (push) Successful in 37s
CI / build (push) Successful in 27s
Deploy Production / deploy (push) Failing after 27s
Turbo's change detection includes shared packages like @homelab/db,
which don't have Dockerfiles. Filter to only apps with a Dockerfile
to prevent 'path not found' errors during docker build.
2026-03-21 21:19:15 +00:00
Julia McGhee
eeb87018d7 Add event-driven tasks via Gitea webhooks
Some checks failed
Deploy Production / deploy (push) Failing after 35s
CI / lint-and-test (push) Successful in 33s
CI / build (push) Has been cancelled
Webhook endpoint at /api/webhooks/gitea receives Gitea status events,
matches them against configurable event triggers with conditions
(event type, repo glob, state, context), renders task templates with
{{variable}} substitution, and creates harness tasks automatically.

Includes circuit breaker: after N consecutive task failures from the
same trigger (default 3), the trigger auto-disables. Re-enable
manually via PATCH /api/event-triggers/:id.

New tables: harness_event_triggers (rules + circuit breaker state),
harness_event_log (audit trail + dedup via X-Gitea-Delivery).
2026-03-21 21:15:15 +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
a5ef56b052 Fix input focus loss in NewTaskTab form fields
Some checks failed
CI / lint-and-test (push) Successful in 32s
Deploy Production / deploy (push) Failing after 2m49s
CI / build (push) Failing after 3m32s
Move Field component out of NewTaskTab to prevent React from
remounting input wrappers on every keystroke. Same root cause as
the ProjectsTab DetailView fix.
2026-03-21 20:46:06 +00:00
Julia McGhee
af090b1de2 Fix input focus loss when creating a project
Some checks failed
CI / lint-and-test (push) Successful in 36s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
DetailView was defined as a component inside ProjectsTab's render,
causing React to unmount/remount it on every keystroke. Replace with
inline JSX so the input element identity stays stable across renders.
2026-03-21 20:45:12 +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
gitea-actions[bot]
f45fa64855 deploy: update production images to ff0573703f 2026-03-21 20:36:48 +00:00