Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
12345678910111213141516171819202122232425// A cell's trace reaches the client as JSON the client validates before// drawing it; a kind it does not know drops the whole trace, which no daemon// e2e sees because the daemon passes traces through untouched.package daemon
import "testing"
func TestParseToolTraceKeepsEveryKindTheKernelRecords(t *testing.T) { trace := ParseToolTrace([]byte(`{"activities":[ {"kind":"run","target":"go test","ms":1500,"ok":true}, {"kind":"mcp","target":"fake/echo","ms":3,"ok":false}, {"kind":"cua","target":"click"}, {"kind":"artifact","target":"release timeline","artifact":{"id":"abc","version":2}} ],"changes":[]}`)) if trace == nil || len(trace.Activities) != 4 { t.Fatalf("trace dropped: %+v", trace) } if run := trace.Activities[0]; run.MS == nil || *run.MS != 1500 || run.OK == nil || !*run.OK { t.Fatalf("run lost its outcome: %+v", run) } if ParseToolTrace([]byte(`{"activities":[{"kind":"run","target":"x","ms":-1}],"changes":[]}`)) != nil { t.Fatal("a negative duration was accepted") }}