Weigh moving the chat bridge to pi's TypeScript SDK and the AI SDK stream helpers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go, node.js, typescript
Direzione di ricerca
Read the comparison and decision recorded in this issue, then inspect internal/chatbridge and the gateway contract in internal/gateway/chat. The issue lists the existing bridge tests to preserve: streaming, stop, reload, canceled dialogs, pi exiting mid-reply, and idle and extra conversations. If the decision is to move, done means the /api/chat routes and UI still work unchanged and those test cases have equivalents.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The chat bridge in the chat pod (internal/chatbridge, from #34) runs pi in RPC mode, one process per active conversation, and translates pi's events into the AI SDK's UI message stream in Go. In review of #34, @aktech suggested using pi's TypeScript SDK with the AI SDK's createUIMessageStream instead. This issue is to weigh that move on its own, after #34 and #46 merge.
- pi SDK: https://github.com/earendil-works/pi/blob/8a2fe6a6d6a86f1524079755e3698d012176e841/packages/coding-agent/docs/sdk.md
createUIMessageStream: https://ai-sdk.dev/docs/reference/ai-sdk-ui/create-ui-message-stream
Motivation
Less code to own. The SDK route would replace the RPC process pool (pi.go, and the pool and its locking in bridge.go), the event translation (translate.go) and the SSE writer: about 1,200 lines of Go, plus their tests. The pool needed a fix for two races in review (72178e2), which an in-process SDK would not have.
What it costs:
- The bridge becomes a Node service in the chat pod instead of a subcommand of the javo binary.
- New npm dependencies, through the DEPS rules (exact pins, at least 14 days old, audit clean).
- The bridge's tests are rewritten, and its contract with the gateway (
internal/gateway/chat) must stay the same: routes, error codes, the stream, and refusing the app proxy.
Acceptance criteria
- A short comparison: lines owned, dependencies added, how conversations are kept and listed, how a reply is stopped, and how memory and processes are bounded per pod.
- A decision recorded here: move, or keep RPC.
- If moving: the gateway's
/api/chatroutes and the UI work unchanged, and the bridge's current tests (streaming, stop, reload, dialogs canceled, pi exiting mid-reply, idle and extra conversations) have equivalents.
Out of scope
- Changes to the chat UI or the
/api/chatcontract.
- Lingua principale
- Go
- Stelle
- 5
- Fork
- 0
- Merge medio
- 21h 13m
- PR unite (30g)
- 53
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nebari-dev/tapas
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
nebari-dev/tapas#124 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nebari-dev/tapas#121 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
nebari-dev/tapas#32 ·
I maintainer di solito rispondono entro 1 giorno
-
Suggest saving a memory when a chat message holds something worth rememberingForse già presa @jbouder l’ha presa oggi. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nebari-dev/tapas#137 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
nebari-dev/tapas#136 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nebari-dev/tapas
Issue simili
-
area: pipeline priority: low type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
prime-radiant-inc/evener#8335 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)Forse già presa @szluyu99 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100