Kobez Technical Cheatsheet

Repository map

/home/loca/dev/kobez/
โ”œโ”€โ”€ kolbez.zip                 read-only received archive
โ”œโ”€โ”€ kolbez-organized/         deterministic governed library
โ”œโ”€โ”€ tools/                    standard-library organizer and validator
โ”œโ”€โ”€ app/                      SvelteKit gallery and deployment files
โ””โ”€โ”€ q5vault/                  this wiki source

Runtime contract

LIB_DIR=/home/loca/dev/kobez/kolbez-organized
DATA_DIR=/home/loca/klbz
HOST=127.0.0.1
PORT=51909
KLBZ_AGENT_BIN=/home/loca/.local/bin/omp
KLBZ_MAX_AGENTS=2
KLBZ_TURN_TIMEOUT_MS=300000

klbz.service runs the adapter-node build. klbz.loca.zone proxies to loopback port 51909; the complete gallery is protected by the Authelia klbz.loca.zone one-factor rule.

API routes

  • GET /api/manifest โ€” twelve gallery groups plus library and generated assets.
  • GET /api/asset/[...path] โ€” contained library/generated file access; ?download=1 forces attachment.
  • POST /api/zip โ€” validates up to 200 selected paths and streams kobez-selection.zip.
  • GET /api/stream โ€” server-sent chat deltas, completion, errors, heartbeats, and manifest invalidation.
  • POST /api/collab โ€” creates a twelve-hex collaboration session.
  • GET /api/collab/[id] โ€” returns parsed transcript and turn status.
  • POST /api/collab/[id] โ€” appends a request and starts one headless OMP turn.
flowchart LR
  B[Browser] --> M[Manifest]
  B --> F[Contained asset route]
  B --> Z[ZIP stream]
  B --> S[SSE stream]
  B --> C[Collab API]
  C --> O[Headless OMP]
  O --> D[DATA_DIR collab out]
  D --> M

Build and validate

cd /home/loca/dev/kobez
python3 -B tools/organize.py --out /tmp/kolbez-check.tmp
python3 -B tools/validate.py --root kolbez-organized
cd app
npm run check
npm run build

The received kolbez.zip is immutable. Never execute packaged Python, JavaScript, or HTML while validating the archive.

Agent invocation

Each turn starts with this direct invocation and ignored stdin:

spawn(KLBZ_AGENT_BIN, ['-p', '--auto-approve', '@'+briefingPath], {cwd: workspace, stdio: ['ignore','pipe','pipe'], env: {...process.env}})

The briefing confines work to the session workspace. Every visible deliverable belongs in out/.

Collaboration storage

/home/loca/klbz/collab/<12-hex>/
โ”œโ”€โ”€ session.json
โ”œโ”€โ”€ chat.md
โ”œโ”€โ”€ briefing.md
โ”œโ”€โ”€ asset/
โ””โ”€โ”€ out/

loca.zone ยท Kobez Gallery