AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-onlyscripts/ensure-running.sh
1#!/usr/bin/env bash2# Idempotent supervisor (cron @reboot + every minute): PostgreSQL, app (127.0.0.1:3000), edge proxy (:8080/:8443), AI worker.3source "$(dirname "$0")/env.sh"4mkdir -p "$ROOT/.runtime"; LOG="$ROOT/.runtime/supervisor.log"5"$ROOT/scripts/pg-ensure.sh"6exec 9>"$ROOT/.runtime/start.lock"; flock -n 9 || exit 07[ -f "$ROOT/app/.next/BUILD_ID" ] || { echo "$(date -Is) no build present" >> "$LOG"; exit 1; }8start() { # name pidfile cmd...9 local name=$1 pf="$ROOT/.runtime/$2.pid"; shift 210 if [ -f "$pf" ] && kill -0 "$(cat "$pf")" 2>/dev/null; then return 0; fi11 # subshell closes the supervisor lock fd and execs, so $! is the service itself (own session/pgid) and never holds the lock12 ( exec 9>&-; cd "$ROOT/app" && exec setsid nohup "$@" >> "$ROOT/.runtime/$name.log" 2>&1 ) &13 echo $! > "$pf"; echo "$(date -Is) started $name pid $!" >> "$LOG"14}15if ! curl -fsS -m 4 "http://127.0.0.1:$APP_PORT/api/health" >/dev/null 2>&1; then16 [ -f "$ROOT/.runtime/app.pid" ] && kill -- -"$(cat "$ROOT/.runtime/app.pid")" 2>/dev/null; rm -f "$ROOT/.runtime/app.pid"; sleep 117 start app app node node_modules/next/dist/bin/next start -H 127.0.0.1 -p "$APP_PORT"18fi19start edge edge node "$ROOT/scripts/edge.mjs"20[ -f "$ROOT/app/scripts/worker.mjs" ] && start worker worker node "$ROOT/app/scripts/worker.mjs"21
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 692573d on master.
Approval requests
None pending.