Commit graph

23 commits

Author SHA1 Message Date
Randall Stillwell
4a1bea95c5 fix(opencode): bind workspace volumes to ZFS on CT 116
Some checks failed
CI / Lint, type-check, test (push) Has been cancelled
Deploy homelab (CT 116) / Deploy to CT 116 (push) Has been cancelled
Keep repos, builds, and worktrees on apps/submatter/* (~890G) instead
of the thin-provisioned 48G root disk.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 13:51:13 -05:00
Randall Stillwell
d90ff11f5b feat(opencode): ship tooling image with git, node, and build deps
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run
Extend the Alpine OpenCode base so agent sessions can clone, npm/pnpm
install, and compile native modules; seed Forgejo HTTPS creds at start.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 12:16:26 -05:00
Randall Stillwell
74f1e9eb0b fix(opencode): escape healthcheck shell vars for Compose
Some checks failed
CI / Lint, type-check, test (push) Has been cancelled
Deploy homelab (CT 116) / Deploy to CT 116 (push) Has been cancelled
Compose was interpolating $AUTH at parse time, breaking the BusyBox probe.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 16:32:15 -05:00
Randall Stillwell
15cd1f55b4 fix(opencode): use Basic Auth header for BusyBox healthcheck
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run
BusyBox wget rejects --user/--password, so the authenticated probe always failed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 16:31:45 -05:00
Randall Stillwell
af676faa97 fix(opencode): authenticate healthcheck against basic-auth server
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run
Password-protected OpenCode returns 401 on /global/health without
credentials, which marked the container unhealthy despite a live server.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 16:27:43 -05:00
Randall Stillwell
ff3bf83afe fix(worker): tolerate OpenCode workspace seed permission errors
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run
Do not abort the entrypoint when the shared volume is not writable; log a
warning and continue so the worker can still start.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 16:27:17 -05:00
Randall Stillwell
9572eac3eb feat(worker): OpenCode harness for Submatter Phase B
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run
Add WORKER_SESSION_TYPE=opencode with a headless OpenCode session adapter,
compose profile, and OmniRoute plugin config. Prefer OpenCode over the
unused OpenHands agent-server path; fix missing yaml runtime dependency.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 12:47:56 -05:00
Randall Stillwell
9bde5960bf fix(deploy): collab URL, CT 116 prod compose, Forgejo migration
Some checks failed
CI / Lint, type-check, test (push) Has been cancelled
Deploy homelab (CT 116) / Deploy to CT 116 (push) Has been cancelled
- Read NEXT_PUBLIC_COLLAB_SERVER_URL in yjs provider; bake NEXT_PUBLIC_* at Docker build
- Add prod compose, deploy scripts, CT 116 proxmox scaffolding
- Forgejo Actions CI/deploy; migrate-origin and post-migration scripts
2026-09-08 22:33:59 -05:00
Randall Stillwell
4efaf6c0c8 docs: add Phase 5 ACP roadmap + deploy OpenHands agent-server on Dokploy
- Added Phase 5: ACP Harness & Runtime Agnosticism to roadmap
- Created docker/docker-compose.agent-server.yml for CT 102 deployment
- Updated worker default AGENT_SERVER_URL to internal Docker DNS (http://agent-server:8001)
- Worker now runs OpenHands sessions directly on the server, no laptop/Traefik needed
2026-09-08 10:13:27 -05:00
Randall Stillwell
b513b3b04f fix(docker): serialize Coolify builds and harden web/worker image inputs
Avoid Coolify OOM crashes by documenting and scripting sequential service builds, and make Docker builds resilient to local-only .env symlinks and missing .cursor agent paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 01:00:21 -05:00
Randall Stillwell
e8074dc5fc fix(docker): unblock orchestrator and worker Coolify builds
Disable inherited incremental compilation for tsup DTS in orchestrator and worker, and align Dockerfile entrypoints with dist/index.js output.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 23:33:31 -05:00
varutasu
8e1ab90fb1
feat(worker): minimal agent runtime for orchestrator jobs (Epic 7) (#11)
* feat(worker): minimal agent runtime for orchestrator jobs (Epic 7)

Adds apps/worker to consume Redis dispatch jobs, run a tool loop with model registry resolution, and record claim/complete + convoy role_complete events.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(deploy): add orchestrator and worker to Coolify compose

Fix CI pnpm setup conflict and ship Docker targets for the automation stack alongside web/collab/mcp.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 15:31:34 -05:00
varutasu
491d196384
fix(docker): reorder build stages so web-build comes after its --from= sources (#2)
Coolify's builder fails the build at parse time with:
  "cannot copy from stage 'collab-build', it needs to be defined before
   current stage 'web-build'"

The previous commit introduced forward COPY --from references that work
on newer BuildKit DAG builders but not on the legacy Docker builder
Coolify uses. Move `collab-build` and `mcp-build` above `web-build` in
lexical order so the references resolve. Functionally identical — the
DAG ordering effect is the same — just expressed in a way the older
builder accepts.

Added a NOTE comment above the stages so the next person who tries to
"clean up" the file order doesn't reintroduce the same regression.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 21:13:39 -05:00
Randall Stillwell
d4e4f9dbf0 fix(docker): serialize build stages so next build doesn't OOM on the 8 GB host
Coolify deploys were failing with exit 255 (kernel OOM, no Docker error)
around the 73s mark of `next build`. Root cause: docker/Dockerfile's three
build stages (web-build, collab-build, mcp-build) all `FROM deps`, and
BuildKit was running them in parallel. The web-build alone wants ~3 GB
heap (capped at 5120 MB) and was racing tsup workers + buildkit + dockerd
on an 8 GB host until the kernel reaped it.

docker-compose.coolify.yml already had a comment claiming `depends_on:
[collab, mcp]` on `web` would serialize the builds. It doesn't —
`depends_on` only orders runtime startup, not `docker compose build`.

Fix: enforce ordering inside the Dockerfile DAG by COPYing one trivial
artifact from each lighter stage into web-build. BuildKit now waits for
collab-build and mcp-build to finish before starting the heavy Next.js
compile, which then gets the host effectively to itself. The copied
files land in /tmp and are never read by the runtime web image.

Also updated the compose comment to reflect the new (and accurate)
ordering mechanism.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 21:02:39 -05:00
Randall Stillwell
3856d11944 docker: raise web build V8 heap to 5 GB to match 8 GB host
CT 107 bumped to 8 GB RAM. Capping the heap below the available memory
makes V8 GC-thrash near the limit and contributes to oom-kills. Set
--max-old-space-size to 5120 MB (~60% of host) so the compile has real
headroom while leaving room for kernel + dockerd + buildkit + tsup workers.

Made-with: Cursor
2026-04-28 13:33:46 -05:00
Randall Stillwell
403437dafc docker: bump web build heap to 2.5GB and serialize behind collab/mcp
The 1.5GB heap cap was actually too aggressive for the Next 15 webpack
compile on this monorepo: V8 spirals into GC churn near the cap, runs
the host out of free memory, and oom-killer SIGKILLs the build (exit 255).

With 4GB on the host now:
  - Cap V8 heap at 2.5GB (~70% of host RAM) — gives the compile real
    headroom while leaving room for kernel + dockerd + concurrent COPY
    layers from the collab/mcp runtime stages.
  - Add depends_on so the lighter collab + mcp services finish building
    before the web target starts its peak-memory compile, instead of
    fighting it for memory in parallel.

Made-with: Cursor
2026-04-27 15:49:41 -05:00
Randall Stillwell
70c9bbf1e5 docker: skip type-check + lint during prod web build
next build was OOM-killed (exit 255) on the Coolify host during
'Linting and checking validity of types' — tsc pulls the whole type graph
into memory and pushes the build past available RAM.

Type-checking and linting belong in CI / pre-commit, not in the prod
container build. Skip them via next.config and cap the Node heap to 1.5 GB
so any future memory blow-up surfaces as a JS OOM instead of a SIGKILL.

Made-with: Cursor
2026-04-27 14:58:12 -05:00
Randall Stillwell
9cdee7f84e docker: unify per-service Dockerfiles into one multi-stage file
Collapse Dockerfile.web / Dockerfile.collab / Dockerfile.mcp into a single
docker/Dockerfile with shared `deps` stage and `web` / `collab` / `mcp`
runtime targets. BuildKit hashes the deps stage identically for all three
targets, so `pnpm install` runs once instead of three times in parallel —
fixes the OOM kill on the Coolify host (CT 107) during `docker compose build`.

Both docker-compose.yml (local dev) and docker-compose.coolify.yml now
select services via `target:` instead of separate dockerfile paths.

Made-with: Cursor
2026-04-27 14:38:39 -05:00
Randall Stillwell
ba519a8b78 fix(web): import @tasks/ai via workspace alias instead of relative path
Two AI components were importing from ../../../../packages/ai/src using
relative paths that escape the workspace root. This worked locally because
all packages are siblings on disk, but failed in Docker where Dockerfile.web
only copies apps/web, packages/database, and packages/shared into the
build context — packages/ai never made it in.

Changes:
- Add @tasks/ai as a workspace dependency in apps/web/package.json
- Switch both imports (command-palette.tsx, ai-block.tsx) to "@tasks/ai"
- Add @tasks/ai to transpilePackages in next.config.ts and the docker variant
- Copy packages/ai into the Docker build context (Dockerfile.web)
- Refresh pnpm-lock.yaml for the new workspace edge

Verified locally: web builds compile cleanly past the previously failing
"Module not found" errors. (Local final step hits an unrelated ENOSPC on
the dev disk; Coolify's volume has plenty of headroom.)

Made-with: Cursor
2026-04-27 12:57:27 -05:00
Randall Stillwell
3ddbb4fb83 fix(deploy): preserve pnpm per-package node_modules in docker builds
The previous multi-stage `deps` → `builder` split copied only the root
/app/node_modules from the deps stage, but pnpm workspaces also create
per-package node_modules directories (e.g. apps/web/node_modules) that
contain the .bin symlinks for `next`, `tsup`, etc. Without those, the
builder stage failed with `sh: tsup: not found` and `sh: next: not found`.

Collapse `deps` and `builder` into a single stage so the per-package
node_modules survive intact. pnpm's content-addressable store keeps
re-installs nearly free on cache hits, and Docker layer caching still
short-circuits the install step when only source files change.

For collab and mcp runner stages, also copy the per-app node_modules
so runtime dependency resolution works.

Made-with: Cursor
2026-04-26 22:52:04 -05:00
Randall Stillwell
0cf1e6f317 fix(deploy): use repo-root build context in coolify compose
Coolify invokes `docker compose` with --project-directory set to the
repository root, not this file's directory. Previous `context: ..` was
resolving to /artifacts (one level above the repo) and failing with
`resolve : lstat /artifacts/docker: no such file or directory`.

Switch all three services (web, collab, mcp) to `context: .` so the
build context is the repo root and `dockerfile: docker/Dockerfile.X`
resolves correctly.

Made-with: Cursor
2026-04-26 21:52:29 -05:00
Randall Stillwell
663bc77afe feat: ECHODO app shell, Coolify deploy, Authentik + Umami
Bundles in-flight ECHODO work with the Coolify deployment configuration:

App
- New routes: ai, forms, planner, settings (templates/types), teams,
  doc detail, whiteboard detail
- New components: app shell rework (icon-rail, top-header), forms
  builder/renderer/responses, types manager, objects creation dialog,
  card primitive, form + overview views
- New tRPC routers: favorites, forms, types, workspaces; updates to
  health and objects routers
- Markdown backlog sync (packages/database) + cursor-sync schema/migrations
- Schema additions: forms, types, favorites, markdown_backlog, cursor_sync
- Initial Drizzle migrations checked in

Deployment
- docker/docker-compose.coolify.yml: drops bundled Postgres/Redis
  (uses CT 102 shared services), removes host port mappings, adds
  Coolify SERVICE_FQDN_* magic vars for web + collab
- .env.example rewritten as the full ECHODO/Coolify variable manifest
- NextAuth gains an Authentik OIDC provider (gated on env presence)
- Root layout injects Umami tracking script when configured;
  metadata title flipped to ECHODO

Security
- .gitignore expanded to exclude AGENT-DEPLOY.md, .env.*, secrets/,
  credentials.*, *.key, *.crt, *.pem, ssh keys

Made-with: Cursor
2026-04-26 14:34:34 -05:00
Randall Stillwell
a508ece6e7 feat: Full project management application scaffold
Complete architecture for a ClickUp/Notion/Miro-class project management app:

- Turborepo monorepo with Next.js 15, TypeScript, PostgreSQL (Drizzle ORM)
- Object-centered database schema (everything is an Object: tasks, projects, docs, whiteboards)
- NextAuth v5 authentication with credentials + OAuth providers
- tRPC v11 API layer with full CRUD for objects, properties, relations, templates, search
- Three-panel UI: collapsible sidebar, center content area, push-in right panel
- Purple/teal theme with light/dark mode via Shadcn/ui + Tailwind CSS
- Multiple views: List, Kanban board (dnd-kit), Table (spreadsheet), Embedded iframe
- TipTap rich text editor with slash commands, custom blocks (callout, toggle, mention, embed, divider), AI block
- Real-time collaboration via Yjs + Hocuspocus with presence/cursors
- tldraw whiteboard with custom shape cards (task, document, project)
- MCP server exposing all app data/tools for AI agents
- AI chat panel, editor AI slash commands, Cmd+K command palette
- Template system with built-in templates (Bug Report, Meeting Notes, Sprint)
- Full-text search with result highlighting
- Docker Compose for full-stack deployment (web + collab + postgres + redis)

Made-with: Cursor
2026-03-26 22:39:16 -05:00