Boost: build the wire protocol and a remote engine in packages/boost

Abierto
#64 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with the design in issue #54, then read packages/model/src/engine.ts, packages/payments/src/wallet-ipc.ts, and the fake engine examples in packages/model/test/port.test.ts. Implement the protocol and remote engine in packages/boost with tests for codec, client, server, failures, and an in-memory end-to-end exchange. Done means those tests and the listed privacy, typecheck, lint, test, and guard checks pass, with no network API.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

agent-friendly help wanted privacy

Why

Once the protocol is decided, both sides need one tested implementation of it. ADR-010 keeps the cage on the phone, so the computer only answers model requests. Pure code, tested over an in-memory pipe, lets the phone and the desktop app be built in parallel against the same thing.

What to do

In packages/boost (new, if the pairing core hasn't created it yet), pure TypeScript, behind a small duplex byte-stream port (write bytes, receive bytes, closed), shaped like createWalletClient in packages/payments/src/wallet-ipc.ts. The steps below assume the design chose the completion level; follow the design if it chose another.

Tests first:

  1. The codec. The design's message shapes, versioned, with its size limits. Refuse malformed, oversized, unknown-version and out-of-order messages.
  2. The client. boostEngine(stream, options) implements CompletionEngine (packages/model/src/engine.ts). It sends an EngineRequest, streams onToken and onThinking, and resolves an EngineResult with the tool calls unexecuted, the stop reason (stopOf) and stats (engineStats). A stop (signal) cancels at once and rejects, as FR-LOOP-06 says.
  3. The server. serveBoost(stream, engine, options) answers requests with any CompletionEngine, refuses a capability it lacks, and never logs content.
  4. Failures. The link closes mid-stream; a timeout; a capability mismatch, such as another model SHA-256 or profile. Each ends in the outcome the design chose.
  5. End to end. Client and server over an in-memory pipe, with a fake CompletionEngine like the ones in packages/model/test/port.test.ts.

Done when

  • The tests above pass, and they were written first.
  • The gates pass, and the package uses no network API.

How to check

pnpm --filter @hermit/boost test
pnpm check:privacy && pnpm typecheck && pnpm lint && pnpm test
node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt

Depends on

  • Blocked by the design in #54.

Keep in mind

  • Nothing here runs a tool call. The phone's loop and cage do (AGENTS.md rule 4).
  • Send only what the design lists. No device names, contacts, session ids or log entries.
  • Made-up chats in the tests.
  • Open a pull request only once everything under Depends on is accepted or merged, and a maintainer has said so here (AGENTS.md: code for a feature without an accepted issue may be closed).
Lenguaje dominante
TypeScript
Estrellas
11
Forks
0
Merge medio
10 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DojoCodingLabs/hermit

Todos los issues de DojoCodingLabs/hermit

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.