Initial commit: Odin editor client + Kotlin daemon prototype

Native SDL3 editor written in Odin with a piece-table buffer core,
backed by a Kotlin/JVM daemon speaking newline-delimited JSON over
localhost TCP for Gradle import, Kotlin/Java diagnostics, and
heuristic completion/hover/definition/references/rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pavel 2026-07-03 08:37:41 +02:00
commit 4a15350860
21 changed files with 8112 additions and 0 deletions

73
scripts/autopilot-opencode.sh Executable file
View file

@ -0,0 +1,73 @@
#!/usr/bin/env bash
set -euo pipefail
# Repeatedly asks opencode to continue autonomous project work.
#
# Configuration:
# OPENCODE_BIN Command to run. Default: opencode
# OPENCODE_PROJECT Project/workspace path. Default: current directory
# OPENCODE_SESSION Session id to continue. If unset, uses --continue
# OPENCODE_MODEL Optional model, e.g. openai/gpt-5.5
# OPENCODE_AGENT Optional agent name
# OPENCODE_EXTRA_ARGS Optional extra args inserted before the message, shell-split
# AUTOPILOT_MESSAGE Message sent each iteration. Default: keep working prompt below
# AUTOPILOT_INTERVAL Seconds to sleep between successful iterations. Default: 10
# AUTOPILOT_MAX_RUNS Max iterations. 0 means forever. Default: 0
# AUTOPILOT_STOP_FILE Stop when this file exists. Default: .opencode-autopilot-stop
# AUTOPILOT_ALLOW_PERMISSIONS Automatically approve tool permissions. Default: 1
OPENCODE_BIN=${OPENCODE_BIN:-opencode}
OPENCODE_PROJECT=${OPENCODE_PROJECT:-$(pwd)}
AUTOPILOT_INTERVAL=${AUTOPILOT_INTERVAL:-10}
AUTOPILOT_MAX_RUNS=${AUTOPILOT_MAX_RUNS:-0}
AUTOPILOT_STOP_FILE=${AUTOPILOT_STOP_FILE:-.opencode-autopilot-stop}
AUTOPILOT_ALLOW_PERMISSIONS=${AUTOPILOT_ALLOW_PERMISSIONS:-1}
AUTOPILOT_MESSAGE=${AUTOPILOT_MESSAGE:-Continue working autonomously in this configured session. Keep working on the current task list. If every task is finished, inspect the project, decide the next highest-value tasks, add or update the task list, implement them, verify them, and continue until blocked. Do not stop just because one task is complete; stop only for a real blocker that requires user input.}
run_count=0
while true; do
if [[ -e "$AUTOPILOT_STOP_FILE" ]]; then
printf 'stop file exists: %s\n' "$AUTOPILOT_STOP_FILE"
exit 0
fi
if [[ "$AUTOPILOT_MAX_RUNS" != "0" && "$run_count" -ge "$AUTOPILOT_MAX_RUNS" ]]; then
printf 'reached AUTOPILOT_MAX_RUNS=%s\n' "$AUTOPILOT_MAX_RUNS"
exit 0
fi
args=(run --dir "$OPENCODE_PROJECT")
if [[ "$AUTOPILOT_ALLOW_PERMISSIONS" != "0" ]]; then
args+=(--dangerously-skip-permissions)
fi
if [[ -n "${OPENCODE_SESSION:-}" ]]; then
args+=(--session "$OPENCODE_SESSION")
else
args+=(--continue)
fi
if [[ -n "${OPENCODE_MODEL:-}" ]]; then
args+=(--model "$OPENCODE_MODEL")
fi
if [[ -n "${OPENCODE_AGENT:-}" ]]; then
args+=(--agent "$OPENCODE_AGENT")
fi
if [[ -n "${OPENCODE_EXTRA_ARGS:-}" ]]; then
# shellcheck disable=SC2206
extra_args=($OPENCODE_EXTRA_ARGS)
args+=("${extra_args[@]}")
fi
args+=("$AUTOPILOT_MESSAGE")
run_count=$((run_count + 1))
printf '[%s] autopilot iteration %d\n' "$(date -Is)" "$run_count"
"$OPENCODE_BIN" "${args[@]}"
sleep "$AUTOPILOT_INTERVAL"
done

20
scripts/compile-shaders.sh Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SRC="$ROOT/client/odin/shaders"
OUT="$SRC/compiled"
if ! command -v glslc >/dev/null 2>&1; then
printf 'error: glslc not found. Install shaderc/glslc. On Fedora: sudo dnf install glslc\n' >&2
exit 1
fi
mkdir -p "$OUT"
glslc -fshader-stage=vert "$SRC/rect.vert.glsl" -o "$OUT/rect.vert.spv"
glslc -fshader-stage=frag "$SRC/rect.frag.glsl" -o "$OUT/rect.frag.spv"
glslc -fshader-stage=vert "$SRC/text.vert.glsl" -o "$OUT/text.vert.spv"
glslc -fshader-stage=frag "$SRC/text.frag.glsl" -o "$OUT/text.frag.spv"
printf 'compiled SDL3 GPU shaders to %s\n' "$OUT"