This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.covibe: run omp as an omnigent session on omni.lassul.us

+70 -20
+66 -18
tools/covibe/flake-module.nix
··· 1 1 { inputs, ... }: 2 2 { 3 3 perSystem = 4 - { system, ... }: 5 4 { 6 - # Launch omp as a co-vibing session from any machine: `covibe` in a project 7 - # directory announces the session over the dashboard's keyless REST API 8 - # (name + collab links, heartbeat + pane push), so it shows up in the 9 - # covibe.lassul.us overview just like a session started locally on 10 - # neoprism, and is joinable / browser-viewable via the collab relay. The 11 - # dashboard GCs the announcement once the session exits. 5 + pkgs, 6 + self', 7 + system, 8 + ... 9 + }: 10 + let 11 + server = "https://omni.lassul.us"; 12 + omp = inputs.llm-agents.packages.${system}.omp; 13 + 14 + # The agent this machine runs. omp speaks the Agent Client Protocol 15 + # (`omp acp`), so omnigent's generic `acp` harness drives it with no 16 + # adapter code. The command is the absolute store path because the spec 17 + # is consumed by the runner started here, and that path is in this 18 + # wrapper's closure — unlike the server-side catalog entry in 19 + # 2configs/omnigent.nix, which has to stay unqualified. 12 20 # 13 - # The package, the patched omp and the wrapping all come from the covibe 14 - # flake; only the deployment addresses live here. Arguments go to omp, so 15 - # `covibe --continue` resumes in the current directory. 21 + # os_env is what unlocks the dashboard's file panel: without it the 22 + # runner reports no OS environment and the changed-files/diff endpoints 23 + # 404. sandbox none because omp needs its own ~/.omp credential store and 24 + # unrestricted egress to the model APIs; confinement, if we want it, has 25 + # to happen a layer down (a separate uid, or nspawn), not here. 26 + spec = pkgs.writeText "omp-agent.yaml" '' 27 + name: omp 28 + prompt: You are omp (Oh My Pi), a concise coding assistant. 29 + 30 + executor: 31 + harness: acp 32 + acp_agent: 33 + name: Oh My Pi 34 + command: ${omp}/bin/omp acp 35 + 36 + os_env: 37 + type: caller_process 38 + cwd: "." 39 + sandbox: 40 + type: none 41 + ''; 42 + in 43 + { 44 + # Launch omp as a session on the omni.lassul.us dashboard: the agent and 45 + # its runner stay on this machine (local runner + remote server 46 + # topology), while the server holds the transcript, the diff view and the 47 + # per-session ACLs, so a session can be shared read-only or read-write 48 + # with another pocket-id account. The terminal REPL and the browser drive 49 + # the same session. 50 + # 51 + # First use per machine opens a browser for the pocket-id login; the 52 + # session JWT is cached in ~/.omnigent/auth_tokens.json afterwards. 53 + # Arguments go to `omnigent run`, so `covibe -p "fix the tests"` runs one 54 + # non-interactive turn and `covibe --fork <session-id>` continues someone 55 + # else's session here. 16 56 packages.covibe = 17 - (inputs.covibe.packages.${system}.covibe-client.override { 18 - dashboard = "https://covibe.lassul.us"; 19 - relayHost = "covibe.lassul.us"; 20 - webClient = "https://covibe.lassul.us/c"; 21 - localRelay = "wss://covibe.lassul.us"; 22 - defaultArgs = [ 23 - "session" 24 - "--" 57 + (pkgs.writeShellApplication { 58 + name = "covibe"; 59 + runtimeInputs = [ 60 + self'.packages.omnigent 61 + omp 62 + pkgs.jq 63 + pkgs.git 25 64 ]; 65 + text = '' 66 + server=${server} 67 + tokens="$HOME/.omnigent/auth_tokens.json" 68 + if ! jq -e --arg s "$server" '.[$s].token // empty' "$tokens" >/dev/null 2>&1; then 69 + echo "covibe: no session for $server yet, logging in" >&2 70 + omnigent login "$server" 71 + fi 72 + exec omnigent run ${spec} --server "$server" "$@" 73 + ''; 26 74 }).overrideAttrs 27 75 { passthru.usage = builtins.readFile ./usage.kdl; }; 28 76 };
+4 -2
tools/covibe/usage.kdl
··· 1 1 bin "covibe" 2 - about "Launch omp as a co-vibing session that registers in the covibe.lassul.us dashboard (joinable + browser-viewable from any machine)" 2 + about "Run omp as a session on the omni.lassul.us omnigent dashboard (agent stays local, transcript + diff view + sharing live on the server)" 3 3 4 - arg "[omp-args...]" help="Arguments passed through to omp" 4 + flag "-p --prompt" help="Run one non-interactive turn with this prompt and exit" 5 + flag "--fork" help="Continue an existing session id from its fork point on this machine" 6 + arg "[omnigent-run-args...]" help="Arguments passed through to `omnigent run`"