Submatter/docker/worker-entrypoint.sh
Randall Stillwell 9572eac3eb
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
feat(worker): OpenCode harness for Submatter Phase B
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

22 lines
711 B
Bash
Executable file

#!/bin/sh
set -eu
# When a remote harness shares a workspace volume, seed it from the deploy
# snapshot baked into the image (/app/repo).
session_type="${WORKER_SESSION_TYPE:-minimal}"
if [ "$session_type" = "openhands" ] || [ "$session_type" = "opencode" ]; then
if [ "$session_type" = "opencode" ]; then
target="${WORKER_OPENCODE_WORKSPACE:-/workspace/repo}"
else
target="${WORKER_OPENHANDS_WORKSPACE:-/workspace/repo}"
fi
mkdir -p "$(dirname "$target")"
if [ ! -f "$target/pnpm-workspace.yaml" ]; then
echo "[worker-entrypoint] seeding ${session_type} workspace at ${target}"
mkdir -p "$target"
cp -a /app/repo/. "$target/"
fi
fi
cd /app/apps/worker
exec node dist/index.js