Commit Graph

163 Commits

Author SHA1 Message Date
gitea-actions[bot]
38c1a48f64 deploy: update production images to e6a13bd0dc 2026-03-22 11:32:33 +00:00
Julia McGhee
e6a13bd0dc Fix Gitea credential baseUrl: always sync from GITEA_URL env var
All checks were successful
CI / lint-and-test (push) Successful in 42s
Deploy Production / deploy (push) Successful in 1m25s
CI / build (push) Successful in 2m5s
The boot code only set baseUrl when it was empty, so a stale value
(gitea.platform.svc vs gitea-helm-http.platform.svc) was never
corrected. Now always updates to match the env var.
2026-03-22 11:30:22 +00:00
Julia McGhee
3288d69f9b Persist harness projects to database
Some checks failed
CI / lint-and-test (push) Successful in 35s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
Projects were stored purely in useState — lost on every page refresh.
- Add harness_projects table (id, name, workspaces jsonb)
- Add /api/projects CRUD route (GET/POST/PUT/DELETE)
- Load projects from DB on dashboard mount
- All project mutations (create, delete, add/remove repo) now
  persist via API calls
2026-03-22 11:28:24 +00:00
Julia McGhee
2d359c2eb3 Refine chat UI: editable tabs, project selector, layout tweaks
Some checks failed
CI / lint-and-test (push) Successful in 38s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled
- Close last tab shows empty state with "Start new chat" button
  instead of auto-creating a new conversation
- Double-click tab label to rename conversations inline
- Replace workspace repo search with project dropdown using same
  SearchableDropdown component (projects passed from dashboard)
- Move context bar from top to bottom, above text input
- Use sentence case "Thinking..." instead of all-caps
2026-03-22 11:27:21 +00:00
gitea-actions[bot]
6c16045ade deploy: update production images to e23e948bc3 2026-03-22 11:22:04 +00:00
Julia McGhee
e23e948bc3 Add diagnostic logging to repo search for Gitea
All checks were successful
CI / lint-and-test (push) Successful in 40s
Deploy Production / deploy (push) Successful in 1m20s
CI / build (push) Successful in 2m11s
Log the Gitea search URL, response status, body on failure, and result
count to help debug why repos aren't being found. Also handle both
data.data and direct array response formats.
2026-03-22 11:19:57 +00:00
gitea-actions[bot]
0d8aac043e deploy: update production images to 9830a1b742 2026-03-22 11:19:30 +00:00
Julia McGhee
9830a1b742 Add persistent knowledge volume and enhance chat UI
Some checks failed
CI / lint-and-test (push) Successful in 38s
Deploy Production / deploy (push) Successful in 1m15s
CI / build (push) Has been cancelled
Infrastructure:
- Add Longhorn PVCs for knowledge store (1Gi) and workspace (10Gi),
  replacing ephemeral emptyDir for workspace
- Set HARNESS_KNOWLEDGE_DIR=/data/knowledge env var in deployment

Chat UI improvements:
- Thinking ticker: pulsing indicator while waiting for model response
  and between tool-use rounds
- Context bar: message count, estimated token usage, color-coded fill
  bar against model context window
- Multiple conversation tabs: independent state per conversation with
  create/close/switch, model selection inherited on new tabs
- Workspace binding: per-conversation repo search that injects project
  context into the system prompt
2026-03-22 11:17:37 +00:00
gitea-actions[bot]
642f14dd3e deploy: update production images to 7f8981658a 2026-03-22 11:12:38 +00:00
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