# @oh-my-pi/pi-wire

> Shared wire protocol types for omp packages

Latest version **18.3.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @oh-my-pi/pi-wire
pnpm add @oh-my-pi/pi-wire
yarn add @oh-my-pi/pi-wire
bun add @oh-my-pi/pi-wire
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 18.3.0 |
| Published | 2026-09-24 |
| First published | 2026-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31838 |
| Author | Stencil Labs, Inc. |
| Maintainers | can1357 |
| Keywords | wire, protocol, types, collab |

## Links

- npm: https://www.npmjs.com/package/@oh-my-pi/pi-wire
- Repository: https://github.com/can1357/oh-my-pi
- Homepage: https://omp.sh
- Issues: https://github.com/can1357/oh-my-pi/issues
- npm.io page: https://npm.io/package/@oh-my-pi/pi-wire

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 18.3.0 (latest) — 2026-09-24
- 18.2.11 — 2026-09-23
- 18.2.10 — 2026-09-22
- 18.2.9 — 2026-09-22
- 18.2.8 — 2026-09-21
- 18.2.7 — 2026-09-21
- 18.2.6 — 2026-09-18
- 18.2.5 — 2026-09-17
- 18.2.4 — 2026-09-17
- 18.2.3 — 2026-09-17
- 18.2.2 — 2026-09-16
- 18.2.1 — 2026-09-15
- 18.2.0 — 2026-09-15
- 18.1.22 — 2026-09-14
- 18.1.21 — 2026-09-14
- … 162 more at https://npm.io/package/@oh-my-pi/pi-wire/versions

## README

# @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

```ts
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`, and `WireFrame` unions 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:

1. callers build a `GuestFrame` or `HostFrame`,
2. transport code serializes it as JSON inside an encrypted payload,
3. relay code routes opaque envelopes using the plaintext peer-id prefix,
4. receivers switch on `frame.t` and tolerate unknown future fields.

Keep protocol changes backward-aware: bump `COLLAB_PROTO` only when old hosts and guests must reject each other.

---
_Source: https://npm.io/package/@oh-my-pi/pi-wire · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
