Add M2b plan: ten tasks, tests, recordings and the first system prompt

The tasks build the agent loop on M2a's client: channel messages and
the usage record in proto, four config tables, the tool port and
registry with find_tool and call_tool, the baseline and replay, the
session store, the turn loop with its limits and the append-only
property test, the channel server, loopd serve, bxctl chat, and the
device checks including a four-turn conversation with a restart.

Checked against a private reference implementation: the gate passes
after every task in order, the new suites pass under CPU load, and the
reference passes make verify-device on straylight with no cache loss.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-18 17:19:02 -07:00
co-authored by Claude Fable 5.1
parent f238e6a260
commit e156975649
41 changed files with 4883 additions and 3 deletions
@@ -0,0 +1,7 @@
{"type":"session_start","time":"2026-09-18T08:05:00.000Z","session":"chat-1789700000-42","epoch":0,"slot":0,"baseline":"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"}
{"type":"user","time":"2026-09-18T08:05:01.000Z","content":"What time is it?"}
{"type":"assistant","time":"2026-09-18T08:05:03.000Z","content":null,"reasoning_content":null,"tool_calls":[{"id":"call_a1","name":"clock","arguments":"{}"}]}
{"type":"usage","time":"2026-09-18T08:05:03.000Z","cache_n":539,"prompt_n":27,"predicted_n":24,"reasoning_tokens":8,"thinking_capped":false}
{"type":"tool_result","time":"2026-09-18T08:05:03.100Z","call":1,"tool_call_id":"call_a1","content":"2026-09-18T08:05:03.000Z","class":"public","untrusted":false,"truncated":false}
{"type":"assistant","time":"2026-09-18T08:05:05.000Z","content":"It is five past eight.","reasoning_content":null,"tool_calls":[]}
{"type":"usage","time":"2026-09-18T08:05:05.000Z","cache_n":589,"prompt_n":40,"predicted_n":64,"reasoning_tokens":27,"thinking_capped":true}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":true,"msg":{"kind":"error","body":{"code":"session_full","detail":"this conversation is full; start a new one"}}}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":true,"msg":{"kind":"turn","body":{"session":"chat-1789700000-42","content":"What time is it?","resume":false}}}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":true,"msg":{"kind":"turn_done","body":{"content":"It is noon.","usage":{"cache_n":539,"prompt_n":27,"predicted_n":24,"reasoning_tokens":8,"thinking_capped":false}}}}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":false,"msg":{"kind":"turn_event","body":{"event":"content","text":"It is "}}}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":false,"msg":{"kind":"turn_event","body":{"event":"retrying","attempt":2,"after_ms":1500,"error":"the server went silent"}}}
@@ -0,0 +1 @@
{"v":1,"id":3,"final":false,"msg":{"kind":"turn_event","body":{"event":"tool_result","name":"clock","class":"public","truncated":false}}}