Files
oh-my-pi/packages/wire/test/constants.test.ts
T
can1357 3ff65ead6b feat(wire): bumped collaborative protocol to version 3
- Bumped the collaborative protocol version (`COLLAB_PROTO`) from 2 to 3.
- Required protocol-3 to coordinate `ui-request`, `ui-request-end`, and `ui-response` frames.
- Rejected older protocol-2 guests at handshake to prevent host-asked requests from hanging.
- Updated verification tests and CI installation check scripts to expect protocol version 3.
2026-07-02 01:51:09 +02:00

19 lines
540 B
TypeScript

import { describe, expect, it } from "bun:test";
import {
COLLAB_PROMPT_MESSAGE_TYPE,
COLLAB_PROTO,
DEFAULT_RELAY_URL,
ENVELOPE_HEADER_LENGTH,
ROOM_ID_BYTES,
} from "../src";
describe("collab wire constants", () => {
it("exports the protocol constants consumed by host, guest, and relay links", () => {
expect(COLLAB_PROTO).toBe(3);
expect(COLLAB_PROMPT_MESSAGE_TYPE).toBe("collab-prompt");
expect(ENVELOPE_HEADER_LENGTH).toBe(4);
expect(ROOM_ID_BYTES).toBe(16);
expect(DEFAULT_RELAY_URL).toBe("wss://my.omp.sh");
});
});