This repository has no description
0

Configure Feed

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

covibe: omp-native collab — self-hosted relay + patched omp (6eeb17b)

- ompPackage: llm.omp + omp-collab-autostart.patch (env-driven headless
collab autostart; covibe owns the room id/key).
- relayHost = covibe.lassul.us; browser links use omp's hosted collab-web,
terminal guests use 'omp join'. Sessions enumerable + killable by id.

+98 -5
+3 -3
flake.lock
··· 87 87 ] 88 88 }, 89 89 "locked": { 90 - "lastModified": 1784717878, 91 - "narHash": "sha256-CTxuWS0dk3mtMRDjzP/diCH3ULbqnWmtnuezZ8+vdsU=", 90 + "lastModified": 1784722309, 91 + "narHash": "sha256-Y3825eUZWMCkOqQw9glLbpomh7w+EWxFsJ4TdGMockM=", 92 92 "owner": "lassulus", 93 93 "repo": "covibe", 94 - "rev": "2c9c14b22c6bca02cca882da9d3a163d1c875332", 94 + "rev": "6eeb17be9d1e27f6c1564d46d11960f03012f7f4", 95 95 "type": "github" 96 96 }, 97 97 "original": {
+4 -2
2configs/covibe.nix
··· 40 40 services.covibe = { 41 41 enable = true; 42 42 user = "pairprogramming"; 43 - ompPackage = self.legacyPackages.${pkgs.stdenv.hostPlatform.system}.llm.omp; 44 - webUrl = "https://${domain}"; 43 + ompPackage = (self.legacyPackages.${pkgs.stdenv.hostPlatform.system}.llm.omp).overrideAttrs (o: { 44 + patches = (o.patches or [ ]) ++ [ ./omp-collab-autostart.patch ]; 45 + }); 46 + relayHost = domain; 45 47 dashboard = { 46 48 addr = "127.0.0.1:${toString port}"; 47 49 workspaceRoot = "/home/pairprogramming/covibe";
+91
2configs/omp-collab-autostart.patch
··· 1 + diff --git a/packages/coding-agent/src/collab/host.ts b/packages/coding-agent/src/collab/host.ts 2 + index 74a021a..45df271 100644 3 + --- a/packages/coding-agent/src/collab/host.ts 4 + +++ b/packages/coding-agent/src/collab/host.ts 5 + @@ -21,6 +21,7 @@ import type { 6 + AgentEvent as WireAgentEvent, 7 + SessionEntry as WireSessionEntry, 8 + } from "@oh-my-pi/pi-wire"; 9 + +import { ROOM_KEY_BYTES, WRITE_TOKEN_BYTES } from "@oh-my-pi/pi-wire"; 10 + import type { InteractiveModeContext } from "../modes/types"; 11 + import { AgentLifecycleManager } from "../registry/agent-lifecycle"; 12 + import { type AgentRef, AgentRegistry } from "../registry/agent-registry"; 13 + @@ -207,10 +208,14 @@ export class CollabHost { 14 + } 15 + } 16 + 17 + - async start(relayUrl: string, webUrl = ""): Promise<void> { 18 + - const rawKey = generateRoomKey(); 19 + - const writeToken = generateWriteToken(); 20 + - const roomId = generateRoomId(); 21 + + async start( 22 + + relayUrl: string, 23 + + webUrl = "", 24 + + preset?: { roomId: string; key: Uint8Array; writeToken: Uint8Array }, 25 + + ): Promise<void> { 26 + + const rawKey = preset?.key ?? generateRoomKey(); 27 + + const writeToken = preset?.writeToken ?? generateWriteToken(); 28 + + const roomId = preset?.roomId ?? generateRoomId(); 29 + this.#writeToken = writeToken; 30 + this.#link = formatCollabLink(relayUrl, roomId, rawKey, writeToken); 31 + this.#webLink = formatCollabWebLink(relayUrl, roomId, rawKey, writeToken, webUrl); 32 + @@ -688,3 +693,32 @@ export class CollabHost { 33 + this.#ctx.ui.requestRender(); 34 + } 35 + } 36 + + 37 + +/** 38 + + * covibe integration: when OMP_COLLAB_RELAY is set, start hosting headlessly on 39 + + * boot using a caller-provided room id + key (OMP_COLLAB_ROOM / OMP_COLLAB_KEY, 40 + + * base64url of key‖writeToken) so the orchestrator owns a stable, enumerable 41 + + * link with no minting or scraping. Returns the live host, or undefined when no 42 + + * relay is configured. 43 + + */ 44 + +export async function maybeAutostartCollab(ctx: InteractiveModeContext): Promise<CollabHost | undefined> { 45 + + const relay = process.env.OMP_COLLAB_RELAY; 46 + + if (!relay) return undefined; 47 + + const webUrl = process.env.OMP_COLLAB_WEB ?? ""; 48 + + const roomId = process.env.OMP_COLLAB_ROOM; 49 + + const keyB64 = process.env.OMP_COLLAB_KEY; 50 + + let preset: { roomId: string; key: Uint8Array; writeToken: Uint8Array } | undefined; 51 + + if (roomId && keyB64) { 52 + + const secret = new Uint8Array(Buffer.from(keyB64, "base64url")); 53 + + if (secret.byteLength === ROOM_KEY_BYTES + WRITE_TOKEN_BYTES) { 54 + + preset = { 55 + + roomId, 56 + + key: secret.subarray(0, ROOM_KEY_BYTES), 57 + + writeToken: secret.subarray(ROOM_KEY_BYTES), 58 + + }; 59 + + } 60 + + } 61 + + const host = new CollabHost(ctx); 62 + + await host.start(relay, webUrl, preset); 63 + + return host; 64 + +} 65 + diff --git a/packages/coding-agent/src/modes/interactive-mode.ts b/packages/coding-agent/src/modes/interactive-mode.ts 66 + index c2008d5..447f69b 100644 67 + --- a/packages/coding-agent/src/modes/interactive-mode.ts 68 + +++ b/packages/coding-agent/src/modes/interactive-mode.ts 69 + @@ -54,6 +54,7 @@ import chalk from "chalk"; 70 + import { reset as resetCapabilities } from "../capability"; 71 + import type { CollabGuestLink } from "../collab/guest"; 72 + import type { CollabHost } from "../collab/host"; 73 + +import { maybeAutostartCollab } from "../collab/host"; 74 + import { KeybindingsManager } from "../config/keybindings"; 75 + import type { ResolvedModelRoleValue } from "../config/model-resolver"; 76 + import { applyProviderGlobalsFromSettings } from "../config/provider-globals"; 77 + @@ -1091,6 +1092,14 @@ export class InteractiveMode implements InteractiveModeContext { 78 + this.statusLine.watchBranch(() => { 79 + this.ui.requestRender(); 80 + }); 81 + + 82 + + // covibe: headless collab autostart from env (OMP_COLLAB_*). Fire-and-forget 83 + + // so the TUI is not blocked on the relay connect; attaches when it opens. 84 + + void maybeAutostartCollab(this) 85 + + .then(host => { 86 + + if (host) this.collabHost = host; 87 + + }) 88 + + .catch((err: unknown) => logger.warn(`collab autostart failed: ${String(err)}`)); 89 + } 90 + 91 + /** Reload the title-generation system prompt override for the provided working