Boost: decide the wire protocol between phone and computer

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read the listed constraints and entry points: packages/model/src/port.ts, packages/model/src/engine.ts, packages/core/src/ports.ts, packages/core/src/errors.ts, and section 2.16 of docs/prd/hermit-prd.md. Compare the protocol options against the phone-side cage, privacy, streaming, failure, and trust requirements; the issue says #60 and #61 will provide sizes and latencies. Done means a maintainer resolves every listed decision and an ADR records message shapes, example calls, and any new CT-04 outcome.

Written by the indexing model from the issue text.

Description

model-path privacy proposal

Why

Once paired, the phone and the computer need a protocol for Boost turns. ADR-010 keeps the cage on the phone, AGENTS.md says tool calls come back unexecuted, and US-BOOST-02 says approvals and the signed log stay on the phone. The docs point at three levels and don't choose one. This decision blocks the wire protocol core, serving turns on the computer and the phone side of a Boost turn.

What to do

  1. The level.
    • Completion. The phone builds every prompt with createModelPort (packages/model/src/port.ts) and sends an EngineRequest. The computer runs it and streams back an EngineResult: text, tool calls (unexecuted), the stop reason and stats (packages/model/src/engine.ts). The eval lab already maps this seam to llama-server (packages/eval/src/llama-engine.ts), and docs/research/qvac.md suggests tunneling qvac serve --openai the same way. The loop, the router and the cage stay on the phone.
    • Model port. The phone sends pick, fill and respond (ModelPort in packages/core/src/ports.ts), and the computer builds prompts with its own copy of packages/model.
    • Task. A2A 1.0 objects (Task, Message, Artifact), which the multi-bot design names for Boost (docs/superpowers/specs/2026-11-25-multi-bot-design.md, section 6.3). The computer would run a loop and come back to the phone for every decision.
  2. Framing. protomux-rpc over the secret stream (docs/research/vault-p2p.md), or newline-delimited JSON with a line limit, like the wallet worklet's protocol (createLineSplitter and createWalletClient in packages/payments/src/wallet-ipc.ts).
  3. Versions and capabilities. The protocol version, and what the computer runs: the model file's SHA-256, the profile id, the context size, and whether it supports thinking, JSON schema constraints, native tools and a prompt cache. What the phone does on a mismatch.
  4. Streaming and stop. Tokens and thinking arrive as they are written (onToken, onThinking). A stop on the phone (FR-LOOP-06, US-CHAT-06) cancels the computer's run at once.
  5. Failures. A dropped link, a laptop gone to sleep, a timeout. CT-04 (OUTCOMES in packages/core/src/errors.ts) has no Boost outcome. Propose one, or reuse offline or model_error, with copy.
  6. Limits. The largest message, tokens per request, requests at a time.
  7. What crosses the wire. Only what the completion needs. No device names, contact data, session ids or log entries.
  8. What the computer may keep. Prompt caches keyed by cacheKey save prompt reading, but they hold conversation content. Options: none; memory only, for one session; encrypted at rest.
  9. Trust. Boost's output is model output: a request the cage decides, never the user's words. Decide whether it also taints the session. The multi-bot design treats another bot's words as untrusted, and a compromised computer can write anything.
  10. Order and replay. Request ids, sequence numbers, and refusing a replayed message.
  11. Where the code lives. A pure package, packages/boost (new), behind a duplex byte-stream port, with no network APIs, like packages/payments/src/wallet-ipc.ts.

Done when

  • A maintainer decides every point in this issue.
  • A pull request records it as an ADR in docs/prd/hermit-prd.md (section 2.16), with the message shapes written out, and adds any new CT-04 outcome.

How to check

  • The ADR shows one made-up request and answer for each kind of call the protocol carries, including a streamed reply and a stop.
  • The guard passes on that pull request.

Depends on

Nothing. When they land, the findings of #60 and #61 give sizes and latencies to check the limits against.

Keep in mind

  • The phone runs every tool call through decide() and the signed log (AGENTS.md rules 4 and 6). Keys, approvals and log entries never cross the wire.
  • The quarantined reader (FR-WEB-03) reads untrusted text, so its calls stay on the phone while US-BOOST-03 keeps tainted turns off Boost.
  • No telemetry, and no hosted relay.
Dominant language
TypeScript
Stars
11
Forks
0
Avg merge
10m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DojoCodingLabs/hermit

All issues in DojoCodingLabs/hermit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.