@deepseekharness-mobile/protocol
v0.3.1
Published
Versioned wire contract shared by the DSH Mobile host plugin and PWA
Maintainers
Readme
The contract
The phone never talks to DSH's internals. It talks dsh-mobile/1: a versioned protocol with
one Zod schema per frame, owned by this package and consumed by both ends.
- One schema, two consumers. An incompatible change breaks the build instead of the user.
- Envelopes. Every frame carries
v,id,atandtype; requests pair with*.okresponses and typederrorframes. - Capabilities.
hello.oklists what the host can do; the client gates its UI on that list. - Pairing.
parsePairingUrland the 10-minute, single-use code format live here too.
Install
pnpm add @deepseekharness-mobile/protocolUse
import { ClientMessage, PROTOCOL_VERSION, ServerMessage } from '@deepseekharness-mobile/protocol';
const frame = ClientMessage.safeParse(input);
if (!frame.success) throw new Error('not a dsh-mobile/1 frame');
const reply = ServerMessage.safeParse(output);Inside
| Module | What it holds |
| ------------- | -------------------------------------------------------------- |
| messages.ts | The client and server message unions and the error codes |
| domain.ts | Sessions, transcripts, models, activity, providers and devices |
| pairing.ts | The pairing URL and the code format |
| version.ts | PROTOCOL_VERSION and the dsh-mobile/1 constant |
Links
- Repository — the product and the host plugin.
@deepseekharness-mobile/companion— the plugin that speaks this contract.- Architecture — the layers and the decisions behind them.
License
MIT
