0d49f94418
- Changed the link grammar from `<roomId>#<key>` / `host[:port]/r/<roomId>#<key>` to dot-joined `<roomId>.<key>` in `formatCollabLink`/`parseCollabLink` (`packages/coding-agent/src/collab/protocol.ts`) and the collab-web mirror (`packages/collab-web/src/lib/link.ts`): RFC 3986 forbids a raw `#` inside a fragment, so strict URL stacks (macOS Foundation behind terminal click-to-open) percent-encoded the second `#`. - Kept legacy `#`-joined links parseable via `BARE_LINK_RE` and added lenient `%23` → `#` decoding for mangled deep links. - Updated the `ConnectScreen` placeholder, `app.tsx` deep-link comment, `DEFAULT_RELAY_URL` doc in `packages/wire`, `docs/collab.md` examples, and both package CHANGELOGs. - Extended `crypto.test.ts` and `link.test.ts` with dot-joined, legacy-hash, and `%23`-mangled link coverage.
@oh-my-pi/pi-wire
Shared TypeScript wire contracts for omp collab live sessions.
The package contains only JSON-safe protocol shapes and constants. It has no runtime dependencies and is consumed by both the host CLI (@oh-my-pi/pi-coding-agent) and browser guest (@oh-my-pi/collab-web).
Exports
import type { GuestFrame, HostFrame, SessionEntry } from "@oh-my-pi/pi-wire";
import { COLLAB_PROTO, DEFAULT_RELAY_URL, ENVELOPE_HEADER_LENGTH } from "@oh-my-pi/pi-wire";
Key groups:
- message and transcript entry shapes rendered by collab guests,
- live agent event and task-subagent bus payload shapes,
GuestFrame,HostFrame, andWireFrameunions for AES-GCM sealed payloads,- relay control TEXT messages,
- link/envelope constants shared by host, guest, and local relay code.
Protocol boundary
pi-wire does not encode, decode, validate, encrypt, or route frames. It defines the shared contract used at those boundaries:
- callers build a
GuestFrameorHostFrame, - transport code serializes it as JSON inside an encrypted payload,
- relay code routes opaque envelopes using the plaintext peer-id prefix,
- receivers switch on
frame.tand tolerate unknown future fields.
Keep protocol changes backward-aware: bump COLLAB_PROTO only when old hosts and guests must reject each other.