feat(lifeboard): the agent turn, four providers and Connections - #315
Open
ivanmkc wants to merge 1 commit into
Open
feat(lifeboard): the agent turn, four providers and Connections#315ivanmkc wants to merge 1 commit into
ivanmkc wants to merge 1 commit into
Conversation
The envelope is the whole contract: one JSON object carrying what to say, what to change and what to draw. Parsing is deliberately forgiving (models wrap JSON in prose and fences) and rejection is deliberately precise, because the error text is fed straight back as the repair prompt -- "mutations[1].collection" beats "invalid". The repair after a bad board asks for the board alone, never the whole envelope. The mutations have already landed by then, and re-sending them would apply the change twice. Covered by a test, because it is the kind of thing that silently doubles a shopping list. Every failure path still returns something. Two unusable envelopes degrade to whatever the model actually said; two unrenderable boards degrade to a plain list built by code from the reply. A turn that throws leaves someone staring at a spinner with no idea whether their milk got added. The model may write item, recipe, event and contact -- not profile, message or derivation. A model that could rewrite the transcript could rewrite its own history. Connections is furniture rather than a board: it has secrets and text inputs in it, and the agent must never redraw the screen where an API key is typed. Keys live in device preferences and never in the log, which by design cannot forget. OpenRouter signs in by PKCE, so a router works with no backend at all. Departs from the roadmap on few-shot examples: it called for bundling the 70 files in diagram-recipes/examples, which are engineering diagrams that teach the wrong register for a family board and would dominate the context every turn. Two hand-written examples instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stack
localStoragefor the test suite on Node 25@ivanmkc/termchart-canvas; injectable interact transportEvery branch in the stack was checked out on its own and verified independently:
npm install,tsc --noEmitfor every package,npm testacross the workspace, and the offline e2e where it exists. All nineteen are green — no branch depends on a later one to build or pass. Full viewer e2e (11 suites, 106 assertions) was run on #312 as the behaviour-preservation evidence for the extraction.Stack position: 5 of 10. Base:
lifeboard/03-shell.The conversational loop: type a question, get a reply, a change you watch land, or a board.
The envelope is the whole contract — one JSON object carrying what to say, what to change and what to draw. Parsing is deliberately forgiving (models wrap JSON in prose and fences) and rejection is deliberately precise, because the error text is fed straight back as the repair prompt:
mutations[1].collectionbeatsinvalid.The repair after a bad board asks for the board alone, never the whole envelope. The mutations have already landed by then, and re-sending them would apply the change twice. There is a test for exactly this, because it is the kind of thing that silently doubles a shopping list.
Every failure path still returns something. Two unusable envelopes degrade to whatever the model actually said; two unrenderable boards degrade to a plain list built by code from the reply. A turn that throws leaves someone staring at a spinner with no idea whether their milk got added.
The model may write
item,recipe,event,contact— notprofile,messageorderivation. A model that could rewrite the transcript could rewrite its own history.Connections is furniture, not a board. It has secrets and text inputs in it, and the agent must never redraw the screen where an API key is typed. Keys live in device preferences and never in the log, which by design cannot forget. OpenRouter signs in by PKCE, so a router works with no backend at all.
Deviation from the roadmap: it called for bundling the 70 files in
diagram-recipes/examplesas few-shot. Those are engineering diagrams that teach the wrong register for a family board and would dominate the context every turn; two hand-written examples are used instead.Verified: 142 unit tests including the full degradation ladder against a scripted provider; offline e2e still passes.
🤖 Generated with Claude Code