···11{ inputs, ... }:
22{
33 perSystem =
44- { system, ... }:
54 {
66- # Launch omp as a co-vibing session from any machine: `covibe` in a project
77- # directory announces the session over the dashboard's keyless REST API
88- # (name + collab links, heartbeat + pane push), so it shows up in the
99- # covibe.lassul.us overview just like a session started locally on
1010- # neoprism, and is joinable / browser-viewable via the collab relay. The
1111- # dashboard GCs the announcement once the session exits.
55+ pkgs,
66+ self',
77+ system,
88+ ...
99+ }:
1010+ let
1111+ server = "https://omni.lassul.us";
1212+ omp = inputs.llm-agents.packages.${system}.omp;
1313+1414+ # The agent this machine runs. omp speaks the Agent Client Protocol
1515+ # (`omp acp`), so omnigent's generic `acp` harness drives it with no
1616+ # adapter code. The command is the absolute store path because the spec
1717+ # is consumed by the runner started here, and that path is in this
1818+ # wrapper's closure — unlike the server-side catalog entry in
1919+ # 2configs/omnigent.nix, which has to stay unqualified.
1220 #
1313- # The package, the patched omp and the wrapping all come from the covibe
1414- # flake; only the deployment addresses live here. Arguments go to omp, so
1515- # `covibe --continue` resumes in the current directory.
2121+ # os_env is what unlocks the dashboard's file panel: without it the
2222+ # runner reports no OS environment and the changed-files/diff endpoints
2323+ # 404. sandbox none because omp needs its own ~/.omp credential store and
2424+ # unrestricted egress to the model APIs; confinement, if we want it, has
2525+ # to happen a layer down (a separate uid, or nspawn), not here.
2626+ spec = pkgs.writeText "omp-agent.yaml" ''
2727+ name: omp
2828+ prompt: You are omp (Oh My Pi), a concise coding assistant.
2929+3030+ executor:
3131+ harness: acp
3232+ acp_agent:
3333+ name: Oh My Pi
3434+ command: ${omp}/bin/omp acp
3535+3636+ os_env:
3737+ type: caller_process
3838+ cwd: "."
3939+ sandbox:
4040+ type: none
4141+ '';
4242+ in
4343+ {
4444+ # Launch omp as a session on the omni.lassul.us dashboard: the agent and
4545+ # its runner stay on this machine (local runner + remote server
4646+ # topology), while the server holds the transcript, the diff view and the
4747+ # per-session ACLs, so a session can be shared read-only or read-write
4848+ # with another pocket-id account. The terminal REPL and the browser drive
4949+ # the same session.
5050+ #
5151+ # First use per machine opens a browser for the pocket-id login; the
5252+ # session JWT is cached in ~/.omnigent/auth_tokens.json afterwards.
5353+ # Arguments go to `omnigent run`, so `covibe -p "fix the tests"` runs one
5454+ # non-interactive turn and `covibe --fork <session-id>` continues someone
5555+ # else's session here.
1656 packages.covibe =
1717- (inputs.covibe.packages.${system}.covibe-client.override {
1818- dashboard = "https://covibe.lassul.us";
1919- relayHost = "covibe.lassul.us";
2020- webClient = "https://covibe.lassul.us/c";
2121- localRelay = "wss://covibe.lassul.us";
2222- defaultArgs = [
2323- "session"
2424- "--"
5757+ (pkgs.writeShellApplication {
5858+ name = "covibe";
5959+ runtimeInputs = [
6060+ self'.packages.omnigent
6161+ omp
6262+ pkgs.jq
6363+ pkgs.git
2564 ];
6565+ text = ''
6666+ server=${server}
6767+ tokens="$HOME/.omnigent/auth_tokens.json"
6868+ if ! jq -e --arg s "$server" '.[$s].token // empty' "$tokens" >/dev/null 2>&1; then
6969+ echo "covibe: no session for $server yet, logging in" >&2
7070+ omnigent login "$server"
7171+ fi
7272+ exec omnigent run ${spec} --server "$server" "$@"
7373+ '';
2674 }).overrideAttrs
2775 { passthru.usage = builtins.readFile ./usage.kdl; };
2876 };
···11bin "covibe"
22-about "Launch omp as a co-vibing session that registers in the covibe.lassul.us dashboard (joinable + browser-viewable from any machine)"
22+about "Run omp as a session on the omni.lassul.us omnigent dashboard (agent stays local, transcript + diff view + sharing live on the server)"
3344-arg "[omp-args...]" help="Arguments passed through to omp"
44+flag "-p --prompt" help="Run one non-interactive turn with this prompt and exit"
55+flag "--fork" help="Continue an existing session id from its fork point on this machine"
66+arg "[omnigent-run-args...]" help="Arguments passed through to `omnigent run`"