diff --git a/internal/sessions/calls.go b/internal/sessions/calls.go index ab1cb6e1b..4e9022ebb 100644 --- a/internal/sessions/calls.go +++ b/internal/sessions/calls.go @@ -232,6 +232,7 @@ func callSources() []file { out = append(out, dshCallFiles()...) out = append(out, minimaxCallFiles()...) out = append(out, kimiCallFiles()...) + out = append(out, wslFiles("kimi")...) out = append(out, codebuddyCallFiles()...) return append(out, workbuddyCallFiles()...) } diff --git a/internal/sessions/calls_kimi.go b/internal/sessions/calls_kimi.go index b7af0e575..d0c1c45ce 100644 --- a/internal/sessions/calls_kimi.go +++ b/internal/sessions/calls_kimi.go @@ -69,19 +69,7 @@ const kimiGateway = "magpie/" // kimiCallFiles are every agent's wire.jsonl of every session. A session // migrated from the Python kimi-cli (a ses_* folder) is read too: one Kimi // Code opened again writes its own records there. -func kimiCallFiles() []file { - paths, _ := SessionGlob(filepath.Join(kimiSessions(), "*", "*", "agents", "*", "wire.jsonl")) - var out []file - for _, p := range paths { - agentDir := filepath.Dir(p) - session := filepath.Base(filepath.Dir(filepath.Dir(agentDir))) - f := file{agent: "kimi", key: "kimi:" + session, path: p, main: filepath.Base(agentDir) == "main"} - if stat(&f) { - out = append(out, f) - } - } - return out -} +func kimiCallFiles() []file { return kimiFilesIn(kimiSessions()) } type kimiUsage struct { InputOther int `json:"inputOther"` diff --git a/internal/sessions/kimi.go b/internal/sessions/kimi.go new file mode 100644 index 000000000..800a656fc --- /dev/null +++ b/internal/sessions/kimi.go @@ -0,0 +1,255 @@ +package sessions + +import ( + "bytes" + "cmp" + "encoding/json" + "os" + "path/filepath" + "strings" + "time" +) + +// Kimi Code's sessions (#1913, infinitr0us; the reader follows ggbdpq's +// notes on the issue). A session is the folder sessions// +// / of Kimi's home (KimiCodeDir), the same one its calls are +// read from (calls_kimi.go): each of its agents writes +// agents//wire.jsonl, and state.json beside agents/ holds what the +// session is called. As Kimi Code's own normalizeSessionMeta +// (packages/agent-core-v2/src/session/sessionMetadata) reads it: +// +// - title, a name the user gave when isCustomTitle is true (or titleKind +// is "custom", or an old customTitle is set), else Kimi's own; +// - cwd, or workDir before protocol 1.5; +// - createdAt and updatedAt, epoch milliseconds from 1.5 on, RFC 3339 +// strings before; +// - forkedFrom, the session a fork was made from. +// +// The session's id is its folder's name: 1.4's state.json has no id. A +// session archived in Kimi is listed all the same, as Codex's archived +// rollouts are. +// +// The wire records counted: usage.record (one a model response, the same +// tokens Usage counts, a subagent's in its own file), turn.prompt whose +// origin is the user (a prompt typed; a subagent's are its parent's +// system_trigger), a loop step.end that ends the turn (a reply) and a loop +// tool.call. Every record from 1.4 on carries its time in ms; 1.0's (a +// session migrated from the Python kimi-cli) carry none, and its state.json +// dates it. +// +// A fork copies its source's wire records into its own files unchanged, +// times included, then appends {"type":"forked","agentId":…,"time":…} +// (copyAgentWire / appendForkedMarker in Kimi's sessionLifecycleService): +// only the records after the last such marker are the fork's own. A fork +// written without one (forkedFrom set, no marker) counts from its createdAt, +// which Kimi sets after the copy. +// +// Unlike the call reader, a call made through magpie's own entry (a model +// keyed magpie//) counts here, as the session's own spend, +// under /. +// +// `kimi --session ` picks one up again (apps/kimi-code/src/cli). + +// kimiFilesIn are the wire files of every session under a Kimi Code home's +// sessions folder, one file an agent; the session's own is its main. A +// session migrated from the Python kimi-cli (a ses_* folder) is read too. +// state.json is part of the main file, so a title changed there reads the +// session again. +func kimiFilesIn(sessions string) []file { + paths, _ := SessionGlob(filepath.Join(sessions, "*", "*", "agents", "*", "wire.jsonl")) + var out []file + for _, p := range paths { + agentDir := filepath.Dir(p) + dir := filepath.Dir(filepath.Dir(agentDir)) + f := file{agent: "kimi", key: "kimi:" + filepath.Base(dir), path: p, main: filepath.Base(agentDir) == "main"} + if !stat(&f) { + continue + } + if f.main { + m := file{path: filepath.Join(dir, "state.json")} + if stat(&m) { + f.size += m.size + if m.mod.After(f.mod) { + f.mod = m.mod + } + } + } + out = append(out, f) + } + return out +} + +// kimiFiles are Kimi Code's sessions on this computer. +func kimiFiles() []file { return kimiFilesIn(kimiSessions()) } + +// kimiState is what state.json says of a session. +type kimiState struct { + Title string `json:"title"` + TitleKind string `json:"titleKind"` + IsCustomTitle *bool `json:"isCustomTitle"` + CustomTitle string `json:"customTitle"` + Cwd string `json:"cwd"` + WorkDir string `json:"workDir"` + CreatedAt json.RawMessage `json:"createdAt"` + ForkedFrom string `json:"forkedFrom"` +} + +// kimiStateOf reads the state.json of the session a main wire file is in. +func kimiStateOf(wire string) (kimiState, bool) { + var st kimiState + b, err := os.ReadFile(filepath.Join(filepath.Dir(filepath.Dir(filepath.Dir(wire))), "state.json")) + return st, err == nil && json.Unmarshal(b, &st) == nil +} + +// names are the user's name for the session and Kimi's own, as Kimi's +// normalizeSessionTitle tells them apart. +func (st kimiState) names() (custom, named string) { + switch { + case st.Title != "" && st.IsCustomTitle != nil && *st.IsCustomTitle: + return st.Title, "" + case st.Title != "" && st.TitleKind == "custom" && st.IsCustomTitle == nil: + return st.Title, "" + case st.Title != "": + return "", st.Title + } + return st.CustomTitle, "" +} + +// kimiTime is a state.json date: epoch ms, or an RFC 3339 string. +func kimiTime(raw json.RawMessage) time.Time { + var n int64 + if json.Unmarshal(raw, &n) == nil { + return ms(n) + } + var s string + if json.Unmarshal(raw, &s) == nil { + t, _ := time.Parse(time.RFC3339Nano, s) + return t + } + return time.Time{} +} + +type kimiWire struct { + Type string `json:"type"` + Time int64 `json:"time"` + Model string `json:"model"` + Usage *kimiUsage `json:"usage"` + Input []struct { + Type string `json:"type"` + Text string `json:"text"` + } `json:"input"` + Origin struct { + Kind string `json:"kind"` + } `json:"origin"` + Event struct { + Type string `json:"type"` + Name string `json:"name"` + FinishReason string `json:"finishReason"` + } `json:"event"` +} + +var ( + kimiForked = []byte(`"type":"forked"`) + kimiCounts = [][]byte{kimiUsageRecord, []byte(`"turn.prompt"`), []byte(`"step.end"`), []byte(`"tool.call"`)} +) + +// parseKimi reads one agent's wire file of a session whole, with the +// session's state.json for its own. +func parseKimi(f file) *state { + s := &state{Size: f.size, Mod: f.mod.UnixNano()} + var since time.Time + forked := false + if st, ok := kimiStateOf(f.path); ok { + created := kimiTime(st.CreatedAt) + forked = st.ForkedFrom != "" + if forked { + since = created + } + if f.main { + s.Cwd = cmp.Or(st.Cwd, st.WorkDir) + s.Custom, s.Named = st.names() + s.Custom, s.Named = title(s.Custom), title(s.Named) + s.saw(created, true) + } + } + // a fork's copy of its source ends at its last marker + skip := 0 + if forked { + n := 0 + scan(f.path, 0, func(b []byte) { + n++ + if bytes.Contains(b, kimiForked) { + var r kimiWire + if json.Unmarshal(b, &r) == nil && r.Type == "forked" { + skip, since = n, time.Time{} + } + } + }) + } + n := 0 + scan(f.path, 0, func(b []byte) { + n++ + if n <= skip { + return + } + count := false + for _, k := range kimiCounts { + if bytes.Contains(b, k) { + count = true + break + } + } + var r kimiWire + if !count { + // only its time: a light read of the rest + var t struct { + Time int64 `json:"time"` + } + if json.Unmarshal(b, &t) == nil { + if at := ms(t.Time); !at.IsZero() && !at.Before(since) { + s.saw(at, f.main) + } + } + return + } + if json.Unmarshal(b, &r) != nil { + return + } + at := ms(r.Time) + if at.IsZero() || at.Before(since) { + return + } + s.saw(at, f.main) + switch r.Type { + case "usage.record": + if u := r.Usage; u != nil && u.InputOther >= 0 && u.Output >= 0 && u.InputCacheRead >= 0 && u.InputCacheCreation >= 0 { + model := cmp.Or(strings.TrimPrefix(r.Model, kimiGateway), "kimi") + s.use(dateOf(at), model, Tokens{Input: u.InputOther, Output: u.Output, CacheRead: u.InputCacheRead, CacheWrite: u.InputCacheCreation}) + } + case "turn.prompt": + if !f.main || r.Origin.Kind != "user" { + return + } + s.day(dateOf(at)).Prompts++ + if s.Title == "" { + var text []string + for _, p := range r.Input { + if p.Type == "text" { + text = append(text, p.Text) + } + } + s.Title = title(strings.Join(text, " ")) + } + case "context.append_loop_event": + switch r.Event.Type { + case "step.end": + if f.main && r.Event.FinishReason == "end_turn" { + s.day(dateOf(at)).Replies++ + } + case "tool.call": + s.tool(at, r.Event.Name, "") + } + } + }) + return s +} diff --git a/internal/sessions/kimi_test.go b/internal/sessions/kimi_test.go new file mode 100644 index 000000000..07ef72236 --- /dev/null +++ b/internal/sessions/kimi_test.go @@ -0,0 +1,298 @@ +package sessions + +import ( + "encoding/json" + "os" + "path/filepath" + "runtime" + "strings" + "testing" + "time" +) + +// #1913 (infinitr0us): Kimi Code's sessions are listed. The sessions in +// testdata/kimi-code-sessions are the #1607 reporter's whole real files +// (wire.jsonl and state.json as Kimi Code wrote them, text redacted by the +// reporter, every id, time and number kept); testdata/kimi-code holds the +// same sessions cut to the lines a call is read from. Their totals are the +// reporter's README's: +// +// - wd_v14-june-subagent: 1.4, main and one subagent, 32 calls, input +// 200,820 + 2,641,152 cache read, output 12,283; no cwd in state.json +// - wd_v14-cancel: 1.4, cwd as workDir, 6 calls, 15,726 + 132,096, 2,009 +// - wd_v15-early-no-agentid: 1.5, cwd and createdAt in ms, 10 calls, +// 20,888 + 317,440, 2,176 +// - wd_v15-magpie-failed: 1.5, one failed call through magpie, no tokens +// - wd_v14-no-turn: opened and closed without a prompt +// - wd_v10-migrated: from the Python kimi-cli, no time on any record, a +// title the user gave (isCustomTitle) +const ( + kimiJune = "session_a0a7c8d3-2a5a-480d-9d42-740257598abd" + kimiCancel = "session_169766c9-86f5-4577-97a3-a51d402db5b9" + kimiEarly = "session_fc16731e-2bfe-4873-a6cb-4b9e73280360" + kimiOld = "ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9" +) + +// kimiSessionsIn copies the reporter's sessions into a Kimi Code home and +// gives the redacted titles and folders names to tell them by. +func kimiSessionsIn(t *testing.T, dir string) { + t.Helper() + copyTree(t, "testdata/kimi-code-sessions", dir) + sessions := filepath.Join(dir, "sessions") + kimiSetState(t, sessions, "wd_v14-june-subagent_000000000001", kimiJune, map[string]any{"title": "Port the parser"}) + kimiSetState(t, sessions, "wd_v14-cancel_000000000003", kimiCancel, map[string]any{"title": "Cancelled", "workDir": "/work/kimi-old"}) + kimiSetState(t, sessions, "wd_v15-early-no-agentid_000000000007", kimiEarly, map[string]any{"title": "Review the diff", "cwd": "/work/kimi"}) + kimiSetState(t, sessions, "wd_v10-migrated_000000000006", kimiOld, map[string]any{"title": "Old chat"}) +} + +// kimiSetState sets fields of a session's state.json, keeping the rest as +// Kimi wrote it. +func kimiSetState(t *testing.T, sessions, slug, id string, set map[string]any) { + t.Helper() + p := filepath.Join(sessions, slug, id, "state.json") + st := map[string]any{} + if b, err := os.ReadFile(p); err == nil { + if err := json.Unmarshal(b, &st); err != nil { + t.Fatal(err) + } + } + for k, v := range set { + st[k] = v + } + b, _ := json.MarshalIndent(st, "", " ") + os.MkdirAll(filepath.Dir(p), 0o755) + if err := os.WriteFile(p, b, 0o644); err != nil { + t.Fatal(err) + } +} + +func TestKimiCodeSessions(t *testing.T) { + inZone(t, 0) + claude, _ := setup(t) + dir := filepath.Join(filepath.Dir(claude), "home", ".kimi-code") + kimiSessionsIn(t, dir) + ss := List(0) + if n := count(ss, "kimi"); n != 6 { + t.Fatalf("want the 6 Kimi Code sessions, got %d", n) + } + + // main and its subagent in one session, from state.json's createdAt + j := find(t, ss, "kimi", kimiJune) + if j.Title != "Port the parser" || j.Cwd != "" { + t.Fatalf("june: %+v", j) + } + if j.Tokens != (Tokens{200820, 12283, 2641152, 0, 0}) { + t.Fatalf("june tokens %+v", j.Tokens) + } + if m := model(j, "kimi-code/kimi-for-coding"); m.Tokens != j.Tokens { + t.Fatalf("june model %+v", j.Models) + } + if !j.Start.Equal(at("2026-06-15T05:49:26.333Z")) || !j.Last.Equal(at("2026-06-15T06:05:10.030Z")) { + t.Fatalf("june times %s %s", j.Start, j.Last) + } + // no folder known: the command alone + if j.Resume != "kimi --session "+kimiJune { + t.Fatalf("june resume %q", j.Resume) + } + if !strings.HasSuffix(j.Path, filepath.Join(kimiJune, "agents", "main", "wire.jsonl")) { + t.Fatalf("june path %s", j.Path) + } + + // 1.4's workDir + c := find(t, ss, "kimi", kimiCancel) + if c.Cwd != "/work/kimi-old" || c.Tokens != (Tokens{15726, 2009, 132096, 0, 0}) { + t.Fatalf("cancel: %+v", c) + } + + // 1.5's cwd, createdAt in ms + e := find(t, ss, "kimi", kimiEarly) + if e.Cwd != "/work/kimi" || e.Title != "Review the diff" || e.Tokens != (Tokens{20888, 2176, 317440, 0, 0}) { + t.Fatalf("early: %+v", e) + } + if !e.Start.Equal(time.UnixMilli(1786134177385)) || !e.Last.Equal(at("2026-08-07T20:25:57.753Z")) { + t.Fatalf("early times %s %s", e.Start, e.Last) + } + want := "cd '/work/kimi' && kimi --session " + kimiEarly + if runtime.GOOS == "windows" { + want = "Set-Location -LiteralPath '/work/kimi'; kimi --session " + kimiEarly + } + if e.Resume != want { + t.Fatalf("early resume %q", e.Resume) + } + + // no time in its records: dated by state.json + o := find(t, ss, "kimi", kimiOld) + if o.Title != "Old chat" || !o.Start.Equal(at("2026-02-28T04:18:28.186Z")) || !o.Tokens.zero() { + t.Fatalf("migrated: %+v", o) + } +} + +// The prompts typed (not a subagent's task, not a skill's), the replies that +// end a turn and the name the user gave, from the main file. +func TestKimiCodeSessionCounts(t *testing.T) { + inZone(t, 0) + claude, _ := setup(t) + dir := filepath.Join(filepath.Dir(claude), "home", ".kimi-code") + kimiSessionsIn(t, dir) + byKey := map[string][]file{} + for _, f := range kimiFiles() { + byKey[f.key] = append(byKey[f.key], f) + } + sum := func(id string) (prompts, replies, tools int, custom, named string) { + for _, f := range byKey["kimi:"+id] { + s := parseKimi(f) + for _, d := range s.Days { + prompts += d.Prompts + replies += d.Replies + for _, n := range d.Tools { + tools += n + } + } + if f.main { + custom, named = s.Custom, s.Named + } + } + return + } + if p, r, tl, cu, na := sum(kimiJune); p != 3 || r != 3 || tl != 56 || cu != "" || na != "Port the parser" { + t.Fatalf("june: prompts %d replies %d tools %d custom %q named %q", p, r, tl, cu, na) + } + // a skill's turn isn't a prompt typed + if p, r, tl, _, _ := sum(kimiEarly); p != 0 || r != 1 || tl != 10 { + t.Fatalf("early: prompts %d replies %d tools %d", p, r, tl) + } + if _, _, _, cu, na := sum(kimiOld); cu != "Old chat" || na != "" { + t.Fatalf("migrated: custom %q named %q", cu, na) + } + // 1.5's titleKind + for _, c := range []struct { + st string + custom, name string + }{ + {`{"title":"a","titleKind":"custom"}`, "a", ""}, + {`{"title":"a","titleKind":"generated"}`, "", "a"}, + {`{"title":"a","titleKind":"custom","isCustomTitle":false}`, "", "a"}, + {`{"customTitle":"b"}`, "b", ""}, + } { + var st kimiState + json.Unmarshal([]byte(c.st), &st) + if cu, na := st.names(); cu != c.custom || na != c.name { + t.Errorf("%s: custom %q named %q", c.st, cu, na) + } + } +} + +// A fork copies its source's records, then marks where it begins +// (Kimi Code's sessionLifecycleService.fork): what it copied is counted in +// the session it came from, and the fork starts when it was made. +func TestKimiCodeSessionFork(t *testing.T) { + inZone(t, 0) + claude, _ := setup(t) + dir := filepath.Join(filepath.Dir(claude), "home", ".kimi-code") + kimiSessionsIn(t, dir) + slug := "wd_v14-cancel_000000000003" + src := filepath.Join(dir, "sessions", slug, kimiCancel, "agents", "main", "wire.jsonl") + b, err := os.ReadFile(src) + if err != nil { + t.Fatal(err) + } + // one of the source's own calls and its prompt, made again after the fork + var call, prompt string + for _, l := range strings.Split(string(b), "\n") { + if call == "" && strings.Contains(l, `"type":"usage.record"`) { + call = l + } + if prompt == "" && strings.Contains(l, `"type":"turn.prompt"`) { + prompt = l + } + } + const made = int64(1791700000000) + retime := func(l string, when int64) string { + var r map[string]any + if err := json.Unmarshal([]byte(l), &r); err != nil { + t.Fatal(err) + } + r["time"] = when + out, _ := json.Marshal(r) + return string(out) + } + var u struct { + Usage kimiUsage `json:"usage"` + } + json.Unmarshal([]byte(call), &u) + own := Tokens{Input: u.Usage.InputOther, Output: u.Usage.Output, CacheRead: u.Usage.InputCacheRead, CacheWrite: u.Usage.InputCacheCreation} + + fork := func(id string, marker bool, created int64) { + w := filepath.Join(dir, "sessions", slug, id, "agents", "main", "wire.jsonl") + os.MkdirAll(filepath.Dir(w), 0o755) + body := strings.TrimRight(string(b), "\n") + "\n" + if marker { + body += `{"type":"forked","agentId":"main","time":` + jsonInt(made) + "}\n" + } + body += retime(prompt, made+1000) + "\n" + retime(call, made+5000) + "\n" + if err := os.WriteFile(w, []byte(body), 0o644); err != nil { + t.Fatal(err) + } + kimiSetState(t, filepath.Join(dir, "sessions"), slug, id, map[string]any{ + "id": id, "version": 2, "cwd": "/work/kimi-old", "createdAt": created, "updatedAt": made + 5000, + "title": "Cancelled, again", "titleKind": "generated", "isCustomTitle": false, "forkedFrom": kimiCancel, + }) + } + fork("session_f0000000-0000-4000-8000-000000000001", true, made) + // written without its marker: cut at when it was made + fork("session_f0000000-0000-4000-8000-000000000002", false, made) + // the marker cuts where the time can't: a clock set back when it was made + fork("session_f0000000-0000-4000-8000-000000000003", true, at("2026-07-01T00:00:00Z").UnixMilli()) + + ss := List(0) + if s := find(t, ss, "kimi", kimiCancel); s.Tokens != (Tokens{15726, 2009, 132096, 0, 0}) { + t.Fatalf("the source changed: %+v", s.Tokens) + } + for _, id := range []string{"session_f0000000-0000-4000-8000-000000000001", "session_f0000000-0000-4000-8000-000000000002", "session_f0000000-0000-4000-8000-000000000003"} { + f := find(t, ss, "kimi", id) + if f.Tokens != own || f.Title != "Cancelled, again" { + t.Fatalf("fork %s: %+v, want its own call %+v", id, f, own) + } + if strings.HasSuffix(id, "3") { + continue + } + if !f.Start.Equal(time.UnixMilli(made)) || !f.Last.Equal(time.UnixMilli(made+5000)) { + t.Fatalf("fork %s times %s %s", id, f.Start, f.Last) + } + } +} + +func jsonInt(n int64) string { b, _ := json.Marshal(n); return string(b) } + +// Kimi Code in a WSL distro: its sessions listed with the distro and its +// calls counted (#1607's reader reaches the distro too). +func TestWSLKimiCode(t *testing.T) { + home, _ := wslDistro(t) + kimiSessionsIn(t, filepath.Join(home, ".kimi-code")) + Reset() + var e *Session + for _, s := range List(0) { + if s.Agent == "kimi" && s.ID == kimiEarly { + e = &s + } + } + if e == nil || e.WSL != "Ubuntu" || e.Tokens != (Tokens{20888, 2176, 317440, 0, 0}) { + t.Fatalf("the distro's Kimi session: %+v", e) + } + want := `wsl.exe -d 'Ubuntu' --cd '/work/kimi' -e sh -lc 'exec ${SHELL:-sh} -lic ''kimi --session ` + kimiEarly + `'''` + if e.Resume != want { + t.Fatalf("resume\n got %s\nwant %s", e.Resume, want) + } + n := 0 + for _, c := range Calls(time.Time{}) { + if c.Agent == "kimi" { + n++ + } + } + if n != 32+6+10 { + t.Fatalf("the distro's Kimi calls: %d, want 48", n) + } + if !strings.Contains(strings.Join(Dirs(), "\n"), filepath.Join(home, ".kimi-code")) { + t.Fatalf("Kimi's folder in the distro isn't listed: %v", Dirs()) + } +} diff --git a/internal/sessions/sessions.go b/internal/sessions/sessions.go index a8add787a..070b64bb8 100644 --- a/internal/sessions/sessions.go +++ b/internal/sessions/sessions.go @@ -97,7 +97,7 @@ type Session struct { // Gateway: seen only through magpie's gateway, with no file of the // agent's on this computer (external.go) Gateway bool `json:"gateway,omitempty"` - Agent string `json:"agent"` // magpie agent id: claude, codex, opencode, pi, omp, zcode, dsh, cline, qoder, qoder-cn, grok, workbuddy, droid, cursor, hermes, alma + Agent string `json:"agent"` // magpie agent id: claude, codex, opencode, pi, omp, zcode, dsh, cline, qoder, qoder-cn, grok, workbuddy, droid, cursor, hermes, alma, kimi ID string `json:"id"` Cwd string `json:"cwd"` Title string `json:"title"` // the name it was given, else the agent's own title, else the first prompt @@ -430,8 +430,8 @@ func ccFiles(agent, dir string) []file { func allFiles() []file { var out []file for _, fs := range [][]file{callFiles(), openCodeFiles(), piFiles(), - wslFiles("pi", "omp"), zcodeFiles(), dshFiles(), clineFiles(), ccFiles("qoder", QoderDir("qoder")), ccFiles("qoder-cn", QoderDir("qoder-cn")), - grokFiles(), workbuddyFiles(), droidFiles(), ompFiles(), cursorFiles(), hermesFiles(), almaFiles()} { + wslFiles("pi", "omp", "kimi"), zcodeFiles(), dshFiles(), clineFiles(), ccFiles("qoder", QoderDir("qoder")), ccFiles("qoder-cn", QoderDir("qoder-cn")), + grokFiles(), workbuddyFiles(), droidFiles(), ompFiles(), cursorFiles(), hermesFiles(), almaFiles(), kimiFiles()} { out = append(out, fs...) } return out @@ -1084,6 +1084,8 @@ func parserFor(agent string) sessionParser { return sessionParser{whole: parseCline} case "grok": return sessionParser{whole: parseGrok} + case "kimi": + return sessionParser{whole: parseKimi} case "droid": return sessionParser{whole: parseDroid} case "cursor": @@ -1396,6 +1398,8 @@ func resumeCommand(distro, agent, id, cwd, path string) string { } case "droid": run = "droid --resume " + id + case "kimi": + run = "kimi --session " + id case "cursor": // its chats are looked up by the folder it runs in if cwd == "" { diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/agents/main/wire.jsonl new file mode 100644 index 000000000..9b2e0034d --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/agents/main/wire.jsonl @@ -0,0 +1,3 @@ +{"type":"metadata","protocol_version":"1.0","created_at":1772252308186} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[]}} +{"type":"context.append_message","message":{"role":"assistant","content":[{"type":"think","think":"[redacted]"},{"type":"text","text":"[redacted]"}],"toolCalls":[]}} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/state.json new file mode 100644 index 000000000..643fdf9fb --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v10-migrated_000000000006/ses_16cb5fd4-22a9-4c92-9468-19f44eacaea9/state.json @@ -0,0 +1,22 @@ +{ + "createdAt": "2026-02-28T04:18:28.186Z", + "updatedAt": "2026-02-28T04:18:28.186Z", + "title": "[redacted]", + "isCustomTitle": true, + "lastPrompt": "[redacted]", + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main", + "parentAgentId": null + } + }, + "custom": { + "imported_from_kimi_cli": true, + "kimi_cli_source_path": "[redacted]", + "kimi_cli_session_id": "[redacted]", + "kimi_cli_wire_protocol": "[redacted]", + "imported_at": "[redacted]", + "archived": false + } +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/agents/main/wire.jsonl new file mode 100644 index 000000000..24ee6a4ca --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/agents/main/wire.jsonl @@ -0,0 +1,61 @@ +{"type":"metadata","protocol_version":"1.4","created_at":1784687076903} +{"type":"config.update","profileName":"agent","systemPrompt":"[redacted]","time":1784687076903} +{"type":"tools.set_active_tools","names":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"time":1784687076903} +{"type":"config.update","modelAlias":"kimi-code/k3","thinkingEffort":"max","time":1784687076905} +{"type":"permission.set_mode","mode":"yolo","time":1784687076909} +{"type":"mcp.tools_discovered","serverName":"[redacted]","hash":"[redacted]","tools":[{"name":"[redacted]","description":"[redacted]","inputSchema":{"type":"object","properties":{"data_source_name":{"type":"string","description":"[redacted]"},"api_name":{"type":"string","description":"[redacted]"},"params":{"type":"object","description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]"]}},{"name":"[redacted]","description":"[redacted]","inputSchema":{"type":"object","properties":{"name":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"]}}],"enabledNames":["[redacted]","[redacted]"],"time":1784687077260} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"user"},"time":1784687220650} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"user"}},"time":1784687220651} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"3805bc58-85d1-4205-93e7-b0924a475ee2","turnId":"0","step":1},"time":1784687220681} +{"type":"llm.tools_snapshot","hash":"[redacted]","tools":[{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"prompt":{"type":"string","description":"[redacted]"},"description":{"type":"string","description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string"},"resume":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"description":{"type":"string","minLength":1,"description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string","minLength":1},"prompt_template":{"description":"[redacted]","type":"string","minLength":1},"items":{"description":"[redacted]","maxItems":128,"type":"array","items":{"type":"string","minLength":1}},"resume_agent_ids":{"description":"[redacted]","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"questions":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"description":"[redacted]"},"header":{"default":"[redacted]","description":"[redacted]","type":"string"},"options":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false},"description":"[redacted]"},"multi_select":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false},"description":"[redacted]"},"background":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"command":{"type":"string","minLength":1,"description":"[redacted]"},"cwd":{"description":"[redacted]","type":"string"},"timeout":{"default":60,"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"},"disable_timeout":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"objective":{"type":"string","minLength":1,"description":"[redacted]"},"completionCriterion":{"description":"[redacted]","type":"string"},"replace":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"cron":{"type":"string","description":"[redacted]"},"prompt":{"type":"string","minLength":1,"maxLength":8192,"description":"[redacted]"},"recurring":{"default":true,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"id":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"old_string":{"type":"string","minLength":1,"description":"[redacted]"},"new_string":{"type":"string","description":"[redacted]"},"replace_all":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"options":{"description":"[redacted]","minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"url":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"path":{"description":"[redacted]","type":"string"},"include_ignored":{"description":"[redacted]","type":"boolean"},"include_dirs":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"path":{"description":"[redacted]","type":"string"},"glob":{"description":"[redacted]","type":"string"},"type":{"description":"[redacted]","type":"string"},"output_mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]","[redacted]"]},"-i":{"description":"[redacted]","type":"boolean"},"-n":{"description":"[redacted]","type":"boolean"},"-A":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-B":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-C":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"head_limit":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"offset":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"multiline":{"description":"[redacted]","type":"boolean"},"include_ignored":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"type":"object","properties":{"data_source_name":{"type":"string","description":"[redacted]"},"api_name":{"type":"string","description":"[redacted]"},"params":{"type":"object","description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]"]}},{"name":"[redacted]","description":"[redacted]","parameters":{"type":"object","properties":{"name":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"]}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"line_offset":{"description":"[redacted]","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-1000,"maximum":-1}]},"n_lines":{"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"region":{"description":"[redacted]","type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"[redacted]"},"y":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"[redacted]"},"width":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"[redacted]"},"height":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]","[redacted]"],"additionalProperties":false},"full_resolution":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"description":"[redacted]"},"unit":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"skill":{"type":"string","description":"[redacted]"},"args":{"description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"active_only":{"default":true,"description":"[redacted]","type":"boolean"},"limit":{"default":20,"description":"[redacted]","type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"},"block":{"default":false,"description":"[redacted]","type":"boolean"},"timeout":{"default":30,"description":"[redacted]","type":"integer","minimum":0,"maximum":3600}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"},"reason":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"todos":{"description":"[redacted]","type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"[redacted]"},"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"query":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"content":{"type":"string","description":"[redacted]"},"mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}],"time":1784687220684} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":1,"turnStep":"[redacted]","time":1784687220684} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0851b6bf-8849-4311-af48-2f9e65001cc1","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687237778} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"71bf52a9-3bd1-4d0f-a79b-d61735a6d022","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1784687237778} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_cWnRiVwcrUCSlUQIq5cwADPv","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_cWnRiVwcrUCSlUQIq5cwADPv","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"e71f748ccd410397ba650bb304a94744"},"time":1784687237816} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_XaBlQJ3SlwXYy98P9zKs6WpI","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_XaBlQJ3SlwXYy98P9zKs6WpI","name":"[redacted]","args":{"pattern":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]","detail":"[redacted]"},"traceId":"e71f748ccd410397ba650bb304a94744"},"time":1784687237844} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_cWnRiVwcrUCSlUQIq5cwADPv","result":{"output":"[redacted]"},"traceId":"e71f748ccd410397ba650bb304a94744"},"time":1784687237891} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_XaBlQJ3SlwXYy98P9zKs6WpI","result":{"output":"[redacted]"},"traceId":"e71f748ccd410397ba650bb304a94744"},"time":1784687237937} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"3805bc58-85d1-4205-93e7-b0924a475ee2","turnId":"0","step":1,"usage":{"inputOther":10759,"output":230,"inputCacheRead":11264,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":11175,"llmStreamDurationMs":5919,"llmRequestBuildMs":3,"llmServerFirstTokenMs":11172,"llmServerDecodeMs":5914,"llmClientConsumeMs":5,"messageId":"chatcmpl-sR4Sh1rUcESyVhKMwbbD52ND","traceId":"e71f748ccd410397ba650bb304a94744"},"time":1784687237937} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":10759,"output":230,"inputCacheRead":11264,"inputCacheCreation":0},"usageScope":"turn","time":1784687237937} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"89e72ecc-a10f-45e5-8afc-d3b35eb6e7df","turnId":"0","step":2},"time":1784687237938} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1026323,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":4,"turnStep":"[redacted]","time":1784687237939} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"bbb9faad-3897-4ceb-bb28-96de4840c441","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687252543} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_TDUg4mScWMQPve6qxEIb597P","turnId":"0","step":2,"stepUuid":"[redacted]","toolCallId":"tool_TDUg4mScWMQPve6qxEIb597P","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"4480f8759189e95b8ce5ac71d94a5070"},"time":1784687252570} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_0cnKMdRUZEWiVCLZE9AMVFjS","turnId":"0","step":2,"stepUuid":"[redacted]","toolCallId":"tool_0cnKMdRUZEWiVCLZE9AMVFjS","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"},"traceId":"4480f8759189e95b8ce5ac71d94a5070"},"time":1784687252600} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_TDUg4mScWMQPve6qxEIb597P","result":{"output":"[redacted]"},"traceId":"4480f8759189e95b8ce5ac71d94a5070"},"time":1784687252701} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_0cnKMdRUZEWiVCLZE9AMVFjS","result":{"output":"[redacted]","note":"[redacted]"},"traceId":"4480f8759189e95b8ce5ac71d94a5070"},"time":1784687252708} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"89e72ecc-a10f-45e5-8afc-d3b35eb6e7df","turnId":"0","step":2,"usage":{"inputOther":921,"output":287,"inputCacheRead":22016,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6074,"llmStreamDurationMs":8530,"llmRequestBuildMs":1,"llmServerFirstTokenMs":6073,"llmServerDecodeMs":8528,"llmClientConsumeMs":2,"messageId":"chatcmpl-pqzHp4tUbBZJhe3SD2kYxzRs","traceId":"4480f8759189e95b8ce5ac71d94a5070"},"time":1784687252708} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":921,"output":287,"inputCacheRead":22016,"inputCacheCreation":0},"usageScope":"turn","time":1784687252709} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"981943b0-bef7-49e4-a37f-4cb1aefe2437","turnId":"0","step":3},"time":1784687252709} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1025352,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":7,"turnStep":"[redacted]","time":1784687252711} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"24ecf1b0-d6e6-411a-a92c-d7b869cdad17","turnId":"0","step":3,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687273116} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_F6yW0zaRu4lvLBvF3ji8p4nG","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_F6yW0zaRu4lvLBvF3ji8p4nG","name":"[redacted]","args":{"pattern":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]","detail":"[redacted]"},"traceId":"ef444fbdf576b94dc725180206e0ac38"},"time":1784687273144} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_isV9e4LmGU0HamOmK7kE4oNp","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_isV9e4LmGU0HamOmK7kE4oNp","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"ef444fbdf576b94dc725180206e0ac38"},"time":1784687273170} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_F6yW0zaRu4lvLBvF3ji8p4nG","result":{"output":"[redacted]"},"traceId":"ef444fbdf576b94dc725180206e0ac38"},"time":1784687273196} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_isV9e4LmGU0HamOmK7kE4oNp","result":{"output":"[redacted]"},"traceId":"ef444fbdf576b94dc725180206e0ac38"},"time":1784687273298} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"981943b0-bef7-49e4-a37f-4cb1aefe2437","turnId":"0","step":3,"usage":{"inputOther":2201,"output":347,"inputCacheRead":22784,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":10184,"llmStreamDurationMs":10221,"llmRequestBuildMs":1,"llmServerFirstTokenMs":10183,"llmServerDecodeMs":10217,"llmClientConsumeMs":4,"messageId":"chatcmpl-JQDl8VtwGeGWaReu6TnfTNv5","traceId":"ef444fbdf576b94dc725180206e0ac38"},"time":1784687273298} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":2201,"output":347,"inputCacheRead":22784,"inputCacheCreation":0},"usageScope":"turn","time":1784687273298} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"09062ac5-2893-4c00-8382-1fc99155b4f8","turnId":"0","step":4},"time":1784687273299} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1023244,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":10,"turnStep":"[redacted]","time":1784687273300} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"818dc353-b615-47d1-8ab7-8ec44e96ff4c","turnId":"0","step":4,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687288747} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_KWV6tOlKCgut8mIWb6LwdxfI","turnId":"0","step":4,"stepUuid":"[redacted]","toolCallId":"tool_KWV6tOlKCgut8mIWb6LwdxfI","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"5c2ec05b1155036e12e8bf0eaac2e3bd"},"time":1784687288774} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_KWV6tOlKCgut8mIWb6LwdxfI","result":{"output":"[redacted]"},"traceId":"5c2ec05b1155036e12e8bf0eaac2e3bd"},"time":1784687290969} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"09062ac5-2893-4c00-8382-1fc99155b4f8","turnId":"0","step":4,"usage":{"inputOther":736,"output":369,"inputCacheRead":24832,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4593,"llmStreamDurationMs":10854,"llmRequestBuildMs":1,"llmServerFirstTokenMs":4592,"llmServerDecodeMs":10848,"llmClientConsumeMs":6,"messageId":"chatcmpl-kvfaxd9iWYlGu6ksBttIoN3i","traceId":"5c2ec05b1155036e12e8bf0eaac2e3bd"},"time":1784687290969} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":736,"output":369,"inputCacheRead":24832,"inputCacheCreation":0},"usageScope":"turn","time":1784687290970} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"d78f0d11-c959-47c2-81ce-1015cd5fab50","turnId":"0","step":5},"time":1784687290970} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1022639,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":12,"turnStep":"[redacted]","time":1784687291589} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"71a04a33-5a25-4bbd-a56d-1b000a3f36b7","turnId":"0","step":5,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687302911} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_iFjJcXYNIQOT51usQ06UHtcx","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_iFjJcXYNIQOT51usQ06UHtcx","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"372b66fe96232dca6a3c6787ab319a95"},"time":1784687302946} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_iFjJcXYNIQOT51usQ06UHtcx","result":{"output":"[redacted]"},"traceId":"372b66fe96232dca6a3c6787ab319a95"},"time":1784687303115} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"d78f0d11-c959-47c2-81ce-1015cd5fab50","turnId":"0","step":5,"usage":{"inputOther":641,"output":208,"inputCacheRead":25344,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5534,"llmStreamDurationMs":5788,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5534,"llmServerDecodeMs":5784,"llmClientConsumeMs":4,"messageId":"chatcmpl-UY13Fv5wmiJoN9ZiQXsYvqQA","traceId":"372b66fe96232dca6a3c6787ab319a95"},"time":1784687303115} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":641,"output":208,"inputCacheRead":25344,"inputCacheCreation":0},"usageScope":"turn","time":1784687303115} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"e807408a-2f28-42db-b6ba-fdf08c9b5b8d","turnId":"0","step":6},"time":1784687303116} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1022383,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":14,"turnStep":"[redacted]","time":1784687303117} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"24bc9dac-d78b-46d3-aabc-bb5a53f2fadf","turnId":"0","step":6,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1784687325130} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_NA7KfTf1u9egJ4SqMpS2rEoa","turnId":"0","step":6,"stepUuid":"[redacted]","toolCallId":"tool_NA7KfTf1u9egJ4SqMpS2rEoa","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"},"traceId":"828298188a6b9d655e5897e413f42ca6"},"time":1784687325156} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_NA7KfTf1u9egJ4SqMpS2rEoa","result":{"output":"[redacted]"},"traceId":"828298188a6b9d655e5897e413f42ca6"},"time":1784687325336} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"e807408a-2f28-42db-b6ba-fdf08c9b5b8d","turnId":"0","step":6,"usage":{"inputOther":468,"output":568,"inputCacheRead":25856,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5715,"llmStreamDurationMs":16298,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5715,"llmServerDecodeMs":16291,"llmClientConsumeMs":7,"messageId":"chatcmpl-IUxRkwKU11ne1fqdiDVYhb8s","traceId":"828298188a6b9d655e5897e413f42ca6"},"time":1784687325336} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":468,"output":568,"inputCacheRead":25856,"inputCacheCreation":0},"usageScope":"turn","time":1784687325336} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"fcd6cb09-3931-494b-9425-8c1dd76268eb","turnId":"0","step":7},"time":1784687325336} +{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1021684,"toolSelect":false,"systemPromptHash":"74cb30addf4a6be7d483d2a8b2e6f89ac7833c6726065be91840904c19222799","toolsHash":"[redacted]","messageCount":16,"turnStep":"[redacted]","time":1784687325337} +{"type":"turn.cancel","time":1784687336625} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/state.json new file mode 100644 index 000000000..c561c7d77 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-cancel_000000000003/session_169766c9-86f5-4577-97a3-a51d402db5b9/state.json @@ -0,0 +1,16 @@ +{ + "createdAt": "2026-07-22T02:24:36.705Z", + "updatedAt": "2026-07-22T02:27:00.637Z", + "title": "[redacted]", + "isCustomTitle": false, + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main", + "parentAgentId": null + } + }, + "custom": {}, + "workDir": "[redacted]", + "lastPrompt": "[redacted]" +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/agent-0/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/agent-0/wire.jsonl new file mode 100644 index 000000000..7610af523 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/agent-0/wire.jsonl @@ -0,0 +1,78 @@ +{"type":"metadata","protocol_version":"1.4","created_at":1781503056907,"app_version":"[redacted]"} +{"type":"config.update","cwd":"[redacted]","modelAlias":"kimi-code/kimi-for-coding","thinkingLevel":"high","time":1781503056907} +{"type":"config.update","profileName":"coder","systemPrompt":"[redacted]","time":1781503056937} +{"type":"tools.set_active_tools","names":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"time":1781503056938} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"system_trigger","name":"[redacted]"},"time":1781503056938} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"system_trigger","name":"[redacted]"}},"time":1781503056938} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"60a0906f-ad15-4ead-abf5-653a6e9c0765","turnId":"0","step":1},"time":1781503056938} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"8d4502a9-9c74-4d7a-ad31-d15a63f1e927","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503063426} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_UM0tGWIUSVRo6rE920kp0E7t","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_UM0tGWIUSVRo6rE920kp0E7t","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503063431} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_3ralLeUtmiUXX2zTSBaSfQzV","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_3ralLeUtmiUXX2zTSBaSfQzV","name":"[redacted]","args":{"path":"[redacted]","n_lines":200},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503063432} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_GOCsduaKfIX5C2S2Ni4VdK7f","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_GOCsduaKfIX5C2S2Ni4VdK7f","name":"[redacted]","args":{"path":"[redacted]","n_lines":50},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503063432} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_UM0tGWIUSVRo6rE920kp0E7t","result":{"output":"[redacted]"}},"time":1781503063432} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_3ralLeUtmiUXX2zTSBaSfQzV","result":{"output":"[redacted]"}},"time":1781503063432} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_GOCsduaKfIX5C2S2Ni4VdK7f","result":{"output":"[redacted]"}},"time":1781503063433} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"60a0906f-ad15-4ead-abf5-653a6e9c0765","turnId":"0","step":1,"usage":{"inputOther":2823,"output":253,"inputCacheRead":6400,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":2134,"llmStreamDurationMs":4353},"time":1781503063433} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":2823,"output":253,"inputCacheRead":6400,"inputCacheCreation":0},"usageScope":"turn","time":1781503063433} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"2ade0747-6f64-47c5-9065-f7bed0f2b097","turnId":"0","step":2},"time":1781503063433} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"193e7c79-806b-4d5f-bf67-d7cd7537b1d7","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503068263} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_py8a8kfDUWLrQ9GGtzQkWKh1","turnId":"0","step":2,"stepUuid":"[redacted]","toolCallId":"tool_py8a8kfDUWLrQ9GGtzQkWKh1","name":"[redacted]","args":{"path":"[redacted]","n_lines":760},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503068266} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_py8a8kfDUWLrQ9GGtzQkWKh1","result":{"output":"[redacted]"}},"time":1781503068274} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"2ade0747-6f64-47c5-9065-f7bed0f2b097","turnId":"0","step":2,"usage":{"inputOther":8758,"output":139,"inputCacheRead":9216,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":2982,"llmStreamDurationMs":1847},"time":1781503068274} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":8758,"output":139,"inputCacheRead":9216,"inputCacheCreation":0},"usageScope":"turn","time":1781503068274} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"1c805128-6b45-4caf-84d5-26b93362eb25","turnId":"0","step":3},"time":1781503068274} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"6e75408e-be77-45ec-8b67-a5b6ef70cf92","turnId":"0","step":3,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503078028} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_RQKeARNNitaDHaHhBLAPRLXJ","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_RQKeARNNitaDHaHhBLAPRLXJ","name":"[redacted]","args":{"path":"[redacted]","line_offset":761,"n_lines":80},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503078032} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_ARtjA4nTYTTGHUyBHnxnseNL","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_ARtjA4nTYTTGHUyBHnxnseNL","name":"[redacted]","args":{"path":"[redacted]","line_offset":3420,"n_lines":260},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503078034} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_7NCDAQ7nFBgiGUpAXRVDy8OP","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_7NCDAQ7nFBgiGUpAXRVDy8OP","name":"[redacted]","args":{"path":"[redacted]","line_offset":3680,"n_lines":300},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503078039} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_5qpv2vRwDEmCJceTxKI34m1P","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_5qpv2vRwDEmCJceTxKI34m1P","name":"[redacted]","args":{"path":"[redacted]","line_offset":3980,"n_lines":300},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503078042} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_RQKeARNNitaDHaHhBLAPRLXJ","result":{"output":"[redacted]"}},"time":1781503078042} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_ARtjA4nTYTTGHUyBHnxnseNL","result":{"output":"[redacted]"}},"time":1781503078042} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_7NCDAQ7nFBgiGUpAXRVDy8OP","result":{"output":"[redacted]"}},"time":1781503078046} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_5qpv2vRwDEmCJceTxKI34m1P","result":{"output":"[redacted]"}},"time":1781503078049} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"1c805128-6b45-4caf-84d5-26b93362eb25","turnId":"0","step":3,"usage":{"inputOther":14522,"output":246,"inputCacheRead":17920,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4756,"llmStreamDurationMs":4997},"time":1781503078049} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":14522,"output":246,"inputCacheRead":17920,"inputCacheCreation":0},"usageScope":"turn","time":1781503078049} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"5b072e3b-01ba-4707-a573-2db1f8cb772e","turnId":"0","step":4},"time":1781503078050} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"2eb1c39b-f0fc-45e2-9c2f-976bc2e9b3bb","turnId":"0","step":4,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503086110} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_SuYplt719OPSNrmEuAM5hUrX","turnId":"0","step":4,"stepUuid":"[redacted]","toolCallId":"tool_SuYplt719OPSNrmEuAM5hUrX","name":"[redacted]","args":{"path":"[redacted]","line_offset":4280,"n_lines":250},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503086113} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_ZOqFW2xrWmETW9k1L6BIu9Xj","turnId":"0","step":4,"stepUuid":"[redacted]","toolCallId":"tool_ZOqFW2xrWmETW9k1L6BIu9Xj","name":"[redacted]","args":{"path":"[redacted]","line_offset":4530,"n_lines":250},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503086114} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_fIXoR1QTDpwhGDbTOB5mHpwo","turnId":"0","step":4,"stepUuid":"[redacted]","toolCallId":"tool_fIXoR1QTDpwhGDbTOB5mHpwo","name":"[redacted]","args":{"path":"[redacted]","line_offset":4390,"n_lines":140},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503086120} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_SuYplt719OPSNrmEuAM5hUrX","result":{"output":"[redacted]"}},"time":1781503086120} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_ZOqFW2xrWmETW9k1L6BIu9Xj","result":{"output":"[redacted]"}},"time":1781503086124} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_fIXoR1QTDpwhGDbTOB5mHpwo","result":{"output":"[redacted]"}},"time":1781503086128} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"5b072e3b-01ba-4707-a573-2db1f8cb772e","turnId":"0","step":4,"usage":{"inputOther":14769,"output":146,"inputCacheRead":32256,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5205,"llmStreamDurationMs":2855},"time":1781503086128} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":14769,"output":146,"inputCacheRead":32256,"inputCacheCreation":0},"usageScope":"turn","time":1781503086128} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"e351f383-1bcd-4f37-adac-aecbecdeb79f","turnId":"0","step":5},"time":1781503086128} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"58aec1f5-1aec-4479-bcdd-830685b70736","turnId":"0","step":5,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503097317} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_5pNLhw1Vc26d4fBtn51dlxKv","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_5pNLhw1Vc26d4fBtn51dlxKv","name":"[redacted]","args":{"path":"[redacted]","line_offset":5010,"n_lines":25},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503097319} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_lstt9R21itBICNWI6jdNelGW","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_lstt9R21itBICNWI6jdNelGW","name":"[redacted]","args":{"path":"[redacted]","line_offset":6018,"n_lines":90},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503097320} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_BD82JzzfNNCrAQ2wKPxZbVqX","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_BD82JzzfNNCrAQ2wKPxZbVqX","name":"[redacted]","args":{"path":"[redacted]","line_offset":7535,"n_lines":140},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503097325} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_qprEE2sz7vDNANyWGPxNeYvF","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_qprEE2sz7vDNANyWGPxNeYvF","name":"[redacted]","args":{"path":"[redacted]","line_offset":7665,"n_lines":330},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503097337} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_5pNLhw1Vc26d4fBtn51dlxKv","result":{"output":"[redacted]"}},"time":1781503097337} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_lstt9R21itBICNWI6jdNelGW","result":{"output":"[redacted]"}},"time":1781503097337} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_BD82JzzfNNCrAQ2wKPxZbVqX","result":{"output":"[redacted]"}},"time":1781503097340} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_qprEE2sz7vDNANyWGPxNeYvF","result":{"output":"[redacted]"}},"time":1781503097346} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"e351f383-1bcd-4f37-adac-aecbecdeb79f","turnId":"0","step":5,"usage":{"inputOther":11522,"output":250,"inputCacheRead":46848,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6498,"llmStreamDurationMs":4689},"time":1781503097346} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":11522,"output":250,"inputCacheRead":46848,"inputCacheCreation":0},"usageScope":"turn","time":1781503097346} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"38fbfcaa-00af-4d3f-abc5-ec9d942909d9","turnId":"0","step":6},"time":1781503097346} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"9eaef072-bd54-43aa-ab7f-37f8b1e9f940","turnId":"0","step":6,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503106009} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_YIZiKUtmm0X7BlwpehDaeF1t","turnId":"0","step":6,"stepUuid":"[redacted]","toolCallId":"tool_YIZiKUtmm0X7BlwpehDaeF1t","name":"[redacted]","args":{"path":"[redacted]","line_offset":7410,"n_lines":25},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503106011} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_b2Pg8b6MLXP8xmxJyeiLfuSL","turnId":"0","step":6,"stepUuid":"[redacted]","toolCallId":"tool_b2Pg8b6MLXP8xmxJyeiLfuSL","name":"[redacted]","args":{"path":"[redacted]","line_offset":8620,"n_lines":170},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503106012} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_YIZiKUtmm0X7BlwpehDaeF1t","result":{"output":"[redacted]"}},"time":1781503106019} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_b2Pg8b6MLXP8xmxJyeiLfuSL","result":{"output":"[redacted]"}},"time":1781503106023} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"38fbfcaa-00af-4d3f-abc5-ec9d942909d9","turnId":"0","step":6,"usage":{"inputOther":12345,"output":138,"inputCacheRead":58368,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6140,"llmStreamDurationMs":2522},"time":1781503106023} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":12345,"output":138,"inputCacheRead":58368,"inputCacheCreation":0},"usageScope":"turn","time":1781503106023} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"bf651cc4-2ff0-40d9-b3e1-4ae4c0c881b5","turnId":"0","step":7},"time":1781503106024} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"cfaa7ede-95db-4517-9414-f1806cef3fcf","turnId":"0","step":7,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503112394} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_rGyezGstrs43d2Nq6yHZeibe","turnId":"0","step":7,"stepUuid":"[redacted]","toolCallId":"tool_rGyezGstrs43d2Nq6yHZeibe","name":"[redacted]","args":{"path":"[redacted]","n_lines":80},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503112396} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_FieKasmibdGmYmlVKTx1owhO","turnId":"0","step":7,"stepUuid":"[redacted]","toolCallId":"tool_FieKasmibdGmYmlVKTx1owhO","name":"[redacted]","args":{"path":"[redacted]","n_lines":80},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503112398} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_ZOdpPhrfxoJ30VRrDKkAiEo0","turnId":"0","step":7,"stepUuid":"[redacted]","toolCallId":"tool_ZOdpPhrfxoJ30VRrDKkAiEo0","name":"[redacted]","args":{"path":"[redacted]","n_lines":10},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503112399} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_duHPE1EwU8zMbxTAGAscmDNx","turnId":"0","step":7,"stepUuid":"[redacted]","toolCallId":"tool_duHPE1EwU8zMbxTAGAscmDNx","name":"[redacted]","args":{"path":"[redacted]","n_lines":10},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503112400} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_rGyezGstrs43d2Nq6yHZeibe","result":{"output":"[redacted]"}},"time":1781503112400} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_FieKasmibdGmYmlVKTx1owhO","result":{"output":"[redacted]"}},"time":1781503112400} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_ZOdpPhrfxoJ30VRrDKkAiEo0","result":{"output":"[redacted]"}},"time":1781503112401} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_duHPE1EwU8zMbxTAGAscmDNx","result":{"output":"[redacted]"}},"time":1781503112401} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"bf651cc4-2ff0-40d9-b3e1-4ae4c0c881b5","turnId":"0","step":7,"usage":{"inputOther":3606,"output":174,"inputCacheRead":70656,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3352,"llmStreamDurationMs":3017},"time":1781503112401} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":3606,"output":174,"inputCacheRead":70656,"inputCacheCreation":0},"usageScope":"turn","time":1781503112401} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"8c9fe842-4be2-4625-98b8-748f55dfe498","turnId":"0","step":8},"time":1781503112402} +{"type":"turn.cancel","turnId":0,"time":1781503510015} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/main/wire.jsonl new file mode 100644 index 000000000..3be3648d8 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/agents/main/wire.jsonl @@ -0,0 +1,196 @@ +{"type":"metadata","protocol_version":"1.4","created_at":1781502566345,"app_version":"[redacted]"} +{"type":"config.update","profileName":"agent","systemPrompt":"[redacted]","time":1781502566345} +{"type":"tools.set_active_tools","names":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"time":1781502566345} +{"type":"config.update","modelAlias":"kimi-code/kimi-for-coding","thinkingLevel":"high","time":1781502566345} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"user"},"time":1781502649636} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"user"}},"time":1781502649636} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"a02da944-1046-428c-891e-0c8f11546f68","turnId":"0","step":1},"time":1781502649640} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"e37890eb-fa57-4738-9298-c646b56e2b27","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502654379} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"9256f497-c634-46af-834b-4d20b6653d58","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781502654379} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_4GyQtahwzKgQO9RMioIfPw46","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_4GyQtahwzKgQO9RMioIfPw46","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502654398} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_zwA0tmlRVBNn0GJ5vocAtjXm","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_zwA0tmlRVBNn0GJ5vocAtjXm","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502654400} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_4GyQtahwzKgQO9RMioIfPw46","result":{"output":"[redacted]"}},"time":1781502654401} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_zwA0tmlRVBNn0GJ5vocAtjXm","result":{"output":"[redacted]"}},"time":1781502654406} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"a02da944-1046-428c-891e-0c8f11546f68","turnId":"0","step":1,"usage":{"inputOther":1358,"output":105,"inputCacheRead":14848,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":2211,"llmStreamDurationMs":2526},"time":1781502654406} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":1358,"output":105,"inputCacheRead":14848,"inputCacheCreation":0},"usageScope":"turn","time":1781502654406} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"46a9b736-408f-4b73-b277-d61cf3e802e5","turnId":"0","step":2},"time":1781502654408} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"cd1e9972-39fc-45e7-9936-7cf656856fad","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502681014} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"93b076aa-208e-4103-b7f1-dacddd23619d","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781502681014} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"46a9b736-408f-4b73-b277-d61cf3e802e5","turnId":"0","step":2,"usage":{"inputOther":22697,"output":862,"inputCacheRead":16128,"inputCacheCreation":0},"finishReason":"end_turn","llmFirstTokenLatencyMs":7496,"llmStreamDurationMs":19109},"time":1781502681015} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":22697,"output":862,"inputCacheRead":16128,"inputCacheCreation":0},"usageScope":"turn","time":1781502681015} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"user"},"time":1781502805495} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"user"}},"time":1781502805495} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"ddacbb4f-696d-4baf-b348-c47a5aa1b6ec","turnId":"1","step":1},"time":1781502805496} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0e71107d-91e4-4480-81c2-4ca82daa05e9","turnId":"1","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502819559} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"575617ff-40c6-4a31-9316-978c13aeeb99","turnId":"1","step":1,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781502819559} +{"type":"permission.record_approval_result","turnId":1,"toolCallId":"tool_VaNEe2JUnJ8UXnIAdegacQHl","toolName":"[redacted]","action":"[redacted]","sessionApprovalRule":"[redacted]","result":{"decision":"approved","scope":"session"},"time":1781502827924} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_VaNEe2JUnJ8UXnIAdegacQHl","turnId":"1","step":1,"stepUuid":"[redacted]","toolCallId":"tool_VaNEe2JUnJ8UXnIAdegacQHl","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"}},"time":1781502827924} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_DrBsui33WsWQCmcaCOUjOk4G","turnId":"1","step":1,"stepUuid":"[redacted]","toolCallId":"tool_DrBsui33WsWQCmcaCOUjOk4G","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502828036} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_ym0sWp5pXFcGt2wL7hrlTAYc","turnId":"1","step":1,"stepUuid":"[redacted]","toolCallId":"tool_ym0sWp5pXFcGt2wL7hrlTAYc","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502828037} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_VaNEe2JUnJ8UXnIAdegacQHl","result":{"output":"[redacted]","isError":true}},"time":1781502831188} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_DrBsui33WsWQCmcaCOUjOk4G","result":{"output":"[redacted]"}},"time":1781502831189} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_ym0sWp5pXFcGt2wL7hrlTAYc","result":{"output":"[redacted]"}},"time":1781502831189} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"ddacbb4f-696d-4baf-b348-c47a5aa1b6ec","turnId":"1","step":1,"usage":{"inputOther":1114,"output":479,"inputCacheRead":38656,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3559,"llmStreamDurationMs":10502},"time":1781502831189} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":1114,"output":479,"inputCacheRead":38656,"inputCacheCreation":0},"usageScope":"turn","time":1781502831189} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"53ecd4c7-5277-47ef-89d1-09b92dc0a622","turnId":"1","step":2},"time":1781502831190} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"bd9ea400-932e-4873-822e-ad741f6d1b79","turnId":"1","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502843856} +{"type":"permission.record_approval_result","turnId":1,"toolCallId":"tool_e94W8UrS2uMUZPgn4jEIS1cz","toolName":"[redacted]","action":"[redacted]","sessionApprovalRule":"[redacted]","result":{"decision":"approved","scope":"session"},"time":1781502850343} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_e94W8UrS2uMUZPgn4jEIS1cz","turnId":"1","step":2,"stepUuid":"[redacted]","toolCallId":"tool_e94W8UrS2uMUZPgn4jEIS1cz","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"}},"time":1781502850343} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_rWoWup34IryDSfGoInj9CzMZ","turnId":"1","step":2,"stepUuid":"[redacted]","toolCallId":"tool_rWoWup34IryDSfGoInj9CzMZ","name":"[redacted]","args":{"path":"[redacted]","line_offset":3430,"n_lines":1235},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502850347} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_e94W8UrS2uMUZPgn4jEIS1cz","result":{"output":"[redacted]","isError":true}},"time":1781502851296} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_rWoWup34IryDSfGoInj9CzMZ","result":{"output":"[redacted]"}},"time":1781502851301} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"53ecd4c7-5277-47ef-89d1-09b92dc0a622","turnId":"1","step":2,"usage":{"inputOther":10116,"output":426,"inputCacheRead":39680,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4849,"llmStreamDurationMs":7816},"time":1781502851301} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":10116,"output":426,"inputCacheRead":39680,"inputCacheCreation":0},"usageScope":"turn","time":1781502851301} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"60ab1525-8150-4e01-9d43-4cd690d923d1","turnId":"1","step":3},"time":1781502851302} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0b725a2b-d772-4dc6-a7a8-2e8bb362db57","turnId":"1","step":3,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502861935} +{"type":"permission.record_approval_result","turnId":1,"toolCallId":"tool_QSvlfC3UxpiTiTVGGH5YGAiO","toolName":"[redacted]","action":"[redacted]","sessionApprovalRule":"[redacted]","result":{"decision":"approved","scope":"session"},"time":1781502865163} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_QSvlfC3UxpiTiTVGGH5YGAiO","turnId":"1","step":3,"stepUuid":"[redacted]","toolCallId":"tool_QSvlfC3UxpiTiTVGGH5YGAiO","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"}},"time":1781502865163} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_L8HOxNlJ81aLCUfxOH92HY9X","turnId":"1","step":3,"stepUuid":"[redacted]","toolCallId":"tool_L8HOxNlJ81aLCUfxOH92HY9X","name":"[redacted]","args":{"path":"[redacted]","line_offset":4416,"n_lines":250},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502865168} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_EKIlKWdTXzAwrprtqQUU1F2K","turnId":"1","step":3,"stepUuid":"[redacted]","toolCallId":"tool_EKIlKWdTXzAwrprtqQUU1F2K","name":"[redacted]","args":{"path":"[redacted]","line_offset":7541,"n_lines":450},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502865169} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_QSvlfC3UxpiTiTVGGH5YGAiO","result":{"output":"[redacted]"}},"time":1781502867612} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_L8HOxNlJ81aLCUfxOH92HY9X","result":{"output":"[redacted]"}},"time":1781502867616} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_EKIlKWdTXzAwrprtqQUU1F2K","result":{"output":"[redacted]"}},"time":1781502867619} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"60ab1525-8150-4e01-9d43-4cd690d923d1","turnId":"1","step":3,"usage":{"inputOther":16308,"output":161,"inputCacheRead":49664,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":7188,"llmStreamDurationMs":3444},"time":1781502867619} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":16308,"output":161,"inputCacheRead":49664,"inputCacheCreation":0},"usageScope":"turn","time":1781502867619} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"98116185-b91a-4e69-adc1-c922fe86aa1d","turnId":"1","step":4},"time":1781502867620} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"b8e91ff9-5320-4ea3-b86e-afb6fb1c7723","turnId":"1","step":4,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502881250} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_LFrjyYTOcECXCgaZlDRwAhS5","turnId":"1","step":4,"stepUuid":"[redacted]","toolCallId":"tool_LFrjyYTOcECXCgaZlDRwAhS5","name":"[redacted]","args":{"path":"[redacted]","line_offset":7500,"n_lines":45},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502881253} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_PGZCn7XugDAG3426ICbVYnsi","turnId":"1","step":4,"stepUuid":"[redacted]","toolCallId":"tool_PGZCn7XugDAG3426ICbVYnsi","name":"[redacted]","args":{"path":"[redacted]","line_offset":5016,"n_lines":90},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502881259} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_XdaeSo6uedVnYjtkp7JA6c0m","turnId":"1","step":4,"stepUuid":"[redacted]","toolCallId":"tool_XdaeSo6uedVnYjtkp7JA6c0m","name":"[redacted]","args":{"path":"[redacted]","line_offset":8629,"n_lines":160},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502881263} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_XSBwKXubo3elHu8TGPYz0fwT","turnId":"1","step":4,"stepUuid":"[redacted]","toolCallId":"tool_XSBwKXubo3elHu8TGPYz0fwT","name":"[redacted]","args":{"path":"[redacted]","line_offset":7272,"n_lines":270},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502881267} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_LFrjyYTOcECXCgaZlDRwAhS5","result":{"output":"[redacted]"}},"time":1781502881267} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_PGZCn7XugDAG3426ICbVYnsi","result":{"output":"[redacted]"}},"time":1781502881267} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_XdaeSo6uedVnYjtkp7JA6c0m","result":{"output":"[redacted]"}},"time":1781502881270} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_XSBwKXubo3elHu8TGPYz0fwT","result":{"output":"[redacted]"}},"time":1781502881276} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"98116185-b91a-4e69-adc1-c922fe86aa1d","turnId":"1","step":4,"usage":{"inputOther":14349,"output":240,"inputCacheRead":65792,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":8218,"llmStreamDurationMs":5411},"time":1781502881276} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":14349,"output":240,"inputCacheRead":65792,"inputCacheCreation":0},"usageScope":"turn","time":1781502881276} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"d35af31f-4103-49e9-a723-bb7682ecb344","turnId":"1","step":5},"time":1781502881276} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"886fe5d0-abca-4143-a0c6-b7e02dde8cf1","turnId":"1","step":5,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502888561} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_PabOQ2JAXaXLCqKfVAU1RfZd","turnId":"1","step":5,"stepUuid":"[redacted]","toolCallId":"tool_PabOQ2JAXaXLCqKfVAU1RfZd","name":"[redacted]","args":{"path":"[redacted]","line_offset":7400,"n_lines":150},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502888563} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_PabOQ2JAXaXLCqKfVAU1RfZd","result":{"output":"[redacted]"}},"time":1781502888568} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"d35af31f-4103-49e9-a723-bb7682ecb344","turnId":"1","step":5,"usage":{"inputOther":11152,"output":50,"inputCacheRead":80128,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6412,"llmStreamDurationMs":872},"time":1781502888568} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":11152,"output":50,"inputCacheRead":80128,"inputCacheCreation":0},"usageScope":"turn","time":1781502888568} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"7066ee06-8d25-43a1-85f5-6d08ba429ac5","turnId":"1","step":6},"time":1781502888568} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"26f9194f-b168-4eae-92a9-340a839aa7bb","turnId":"1","step":6,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502893131} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_J6aBZRP37V5CF1KFqXPEPLK3","turnId":"1","step":6,"stepUuid":"[redacted]","toolCallId":"tool_J6aBZRP37V5CF1KFqXPEPLK3","name":"[redacted]","args":{"pattern":"[redacted]","path":"[redacted]","output_mode":"[redacted]","-n":true,"-A":60},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502893138} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_J6aBZRP37V5CF1KFqXPEPLK3","result":{"output":"[redacted]"}},"time":1781502893686} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"7066ee06-8d25-43a1-85f5-6d08ba429ac5","turnId":"1","step":6,"usage":{"inputOther":3239,"output":62,"inputCacheRead":91136,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3668,"llmStreamDurationMs":893},"time":1781502893686} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":3239,"output":62,"inputCacheRead":91136,"inputCacheCreation":0},"usageScope":"turn","time":1781502893686} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"7184d560-bd97-469f-944b-1263d19a8bb5","turnId":"1","step":7},"time":1781502893686} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"31facc7f-33a3-4189-bfc9-469b1960d050","turnId":"1","step":7,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502897846} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_666XSFl58Ys2xNcdXYqIWT9M","turnId":"1","step":7,"stepUuid":"[redacted]","toolCallId":"tool_666XSFl58Ys2xNcdXYqIWT9M","name":"[redacted]","args":{"path":"[redacted]","line_offset":6083,"n_lines":60},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502897849} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_666XSFl58Ys2xNcdXYqIWT9M","result":{"output":"[redacted]"}},"time":1781502897855} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"7184d560-bd97-469f-944b-1263d19a8bb5","turnId":"1","step":7,"usage":{"inputOther":1968,"output":40,"inputCacheRead":94208,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3533,"llmStreamDurationMs":626},"time":1781502897855} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":1968,"output":40,"inputCacheRead":94208,"inputCacheCreation":0},"usageScope":"turn","time":1781502897855} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"28b7249f-05b4-42b7-9bd6-db607609e78d","turnId":"1","step":8},"time":1781502897855} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"436422bf-b8dd-424a-8bf5-90230a63479d","turnId":"1","step":8,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502949822} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_08kMs0qoxYBsiERGv9DYgjuA","turnId":"1","step":8,"stepUuid":"[redacted]","toolCallId":"tool_08kMs0qoxYBsiERGv9DYgjuA","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502949825} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_rG38I1HF2de7YaIGLx4wtq7s","turnId":"1","step":8,"stepUuid":"[redacted]","toolCallId":"tool_rG38I1HF2de7YaIGLx4wtq7s","name":"[redacted]","args":{"path":"[redacted]"},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781502949826} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_08kMs0qoxYBsiERGv9DYgjuA","result":{"output":"[redacted]"}},"time":1781502949827} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_rG38I1HF2de7YaIGLx4wtq7s","result":{"output":"[redacted]"}},"time":1781502949827} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"28b7249f-05b4-42b7-9bd6-db607609e78d","turnId":"1","step":8,"usage":{"inputOther":1500,"output":2369,"inputCacheRead":96000,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3218,"llmStreamDurationMs":48094},"time":1781502949827} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":1500,"output":2369,"inputCacheRead":96000,"inputCacheCreation":0},"usageScope":"turn","time":1781502949827} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"injection","variant":"[redacted]"}},"time":1781502949828} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"6f444d18-0fb9-436a-99d7-7e441a3fd938","turnId":"1","step":9},"time":1781502949828} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"f0f0e954-9bc9-458c-8878-9f37526d6c31","turnId":"1","step":9,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781502956942} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_pqzMWqk9MvfnUt72m9drj4xz","turnId":"1","step":9,"stepUuid":"[redacted]","toolCallId":"tool_pqzMWqk9MvfnUt72m9drj4xz","name":"[redacted]","args":{"todos":[{"title":"[redacted]","status":"in_progress"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"}]},"description":"[redacted]"},"time":1781502956946} +{"type":"tools.update_store","key":"[redacted]","value":[{"title":"[redacted]","status":"in_progress"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"},{"title":"[redacted]","status":"pending"}],"time":1781502956946} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_pqzMWqk9MvfnUt72m9drj4xz","result":{"output":"[redacted]"}},"time":1781502956946} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"6f444d18-0fb9-436a-99d7-7e441a3fd938","turnId":"1","step":9,"usage":{"inputOther":4932,"output":142,"inputCacheRead":97280,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4381,"llmStreamDurationMs":2732},"time":1781502956946} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":4932,"output":142,"inputCacheRead":97280,"inputCacheCreation":0},"usageScope":"turn","time":1781502956946} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"9bf761c5-98ba-4f66-8345-ecf0e0f6a2b0","turnId":"1","step":10},"time":1781502956946} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"eb4c9063-c21e-4f94-8974-63a51d1030b3","turnId":"1","step":10,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503056902} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"a1ec75e0-55e2-4417-bec5-4efb20bc6b2a","turnId":"1","step":10,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781503056902} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_SqzUhI4JbF8PRZPLzNGeS5VT","turnId":"1","step":10,"stepUuid":"[redacted]","toolCallId":"tool_SqzUhI4JbF8PRZPLzNGeS5VT","name":"[redacted]","args":{"description":"[redacted]","subagent_type":"[redacted]","prompt":"[redacted]","run_in_background":true},"description":"[redacted]","display":{"kind":"agent_call","agent_name":"[redacted]","prompt":"[redacted]","background":true}},"time":1781503056904} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_SqzUhI4JbF8PRZPLzNGeS5VT","result":{"output":"[redacted]"}},"time":1781503056914} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"9bf761c5-98ba-4f66-8345-ecf0e0f6a2b0","turnId":"1","step":10,"usage":{"inputOther":322,"output":4809,"inputCacheRead":102144,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":2857,"llmStreamDurationMs":97097},"time":1781503056914} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":322,"output":4809,"inputCacheRead":102144,"inputCacheCreation":0},"usageScope":"turn","time":1781503056914} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"2535556d-940b-47f2-bb30-b07004235372","turnId":"1","step":11},"time":1781503056914} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"58f44fc6-1ed9-4fb7-bb27-8dacdd14688e","turnId":"1","step":11,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503064360} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_C6qL3GNmHF2HXWADoEpoBPHG","turnId":"1","step":11,"stepUuid":"[redacted]","toolCallId":"tool_C6qL3GNmHF2HXWADoEpoBPHG","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503064361} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_C6qL3GNmHF2HXWADoEpoBPHG","result":{"output":"[redacted]"}},"time":1781503064362} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"2535556d-940b-47f2-bb30-b07004235372","turnId":"1","step":11,"usage":{"inputOther":5072,"output":119,"inputCacheRead":102400,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4877,"llmStreamDurationMs":2568},"time":1781503064362} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":5072,"output":119,"inputCacheRead":102400,"inputCacheCreation":0},"usageScope":"turn","time":1781503064362} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"e9621f31-e033-4dd2-bd4d-a17d5d1b6edc","turnId":"1","step":12},"time":1781503064363} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"3d46a9d0-1bea-451a-9ebf-3f5f32d53c7b","turnId":"1","step":12,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503072310} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_qaIDIasL9FhqesjkMXdO2DpM","turnId":"1","step":12,"stepUuid":"[redacted]","toolCallId":"tool_qaIDIasL9FhqesjkMXdO2DpM","name":"[redacted]","args":{"path":"[redacted]","line_offset":823,"n_lines":80},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503072312} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_65T5lTVKKVxQ1c1Axg6x0IGe","turnId":"1","step":12,"stepUuid":"[redacted]","toolCallId":"tool_65T5lTVKKVxQ1c1Axg6x0IGe","name":"[redacted]","args":{"path":"[redacted]","line_offset":4875,"n_lines":170},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503072313} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_qaIDIasL9FhqesjkMXdO2DpM","result":{"output":"[redacted]"}},"time":1781503072316} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_65T5lTVKKVxQ1c1Axg6x0IGe","result":{"output":"[redacted]"}},"time":1781503072322} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"e9621f31-e033-4dd2-bd4d-a17d5d1b6edc","turnId":"1","step":12,"usage":{"inputOther":443,"output":212,"inputCacheRead":107264,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3038,"llmStreamDurationMs":4908},"time":1781503072322} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":443,"output":212,"inputCacheRead":107264,"inputCacheCreation":0},"usageScope":"turn","time":1781503072322} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"7546e457-92bb-4778-a12a-779450082e9f","turnId":"1","step":13},"time":1781503072322} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"14cff20e-8b20-4eed-a1f6-995a61b6ac26","turnId":"1","step":13,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503079957} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_OJyjnVUFzMA8ndsQ6GbcY53w","turnId":"1","step":13,"stepUuid":"[redacted]","toolCallId":"tool_OJyjnVUFzMA8ndsQ6GbcY53w","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503079958} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_OJyjnVUFzMA8ndsQ6GbcY53w","result":{"output":"[redacted]"}},"time":1781503079958} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"7546e457-92bb-4778-a12a-779450082e9f","turnId":"1","step":13,"usage":{"inputOther":6674,"output":57,"inputCacheRead":107520,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6625,"llmStreamDurationMs":1008},"time":1781503079959} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":6674,"output":57,"inputCacheRead":107520,"inputCacheCreation":0},"usageScope":"turn","time":1781503079959} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"0ca0d989-01e8-40b1-a05e-e7bc8742bf65","turnId":"1","step":14},"time":1781503079960} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"1f460226-b5b2-480d-8351-67f79550efe2","turnId":"1","step":14,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503084834} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_FAB5JWvhGbHScKBoxqe50LE5","turnId":"1","step":14,"stepUuid":"[redacted]","toolCallId":"tool_FAB5JWvhGbHScKBoxqe50LE5","name":"[redacted]","args":{"path":"[redacted]","line_offset":4665,"n_lines":170},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503084835} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_QmagySnTLqsxsCri5OCU0ngb","turnId":"1","step":14,"stepUuid":"[redacted]","toolCallId":"tool_QmagySnTLqsxsCri5OCU0ngb","name":"[redacted]","args":{"path":"[redacted]","line_offset":8416,"n_lines":150},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503084840} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_FAB5JWvhGbHScKBoxqe50LE5","result":{"output":"[redacted]"}},"time":1781503084844} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_QmagySnTLqsxsCri5OCU0ngb","result":{"output":"[redacted]"}},"time":1781503084848} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"0ca0d989-01e8-40b1-a05e-e7bc8742bf65","turnId":"1","step":14,"usage":{"inputOther":193,"output":88,"inputCacheRead":114176,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3129,"llmStreamDurationMs":1742},"time":1781503084848} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":193,"output":88,"inputCacheRead":114176,"inputCacheCreation":0},"usageScope":"turn","time":1781503084848} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"82b18436-3332-4619-9955-1025065958ef","turnId":"1","step":15},"time":1781503084849} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0c4fc6ef-71b3-46da-be1e-850b0475b42e","turnId":"1","step":15,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503090986} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_DwNr1bRM0fsYoUyCrRfKKnfH","turnId":"1","step":15,"stepUuid":"[redacted]","toolCallId":"tool_DwNr1bRM0fsYoUyCrRfKKnfH","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503090987} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_DwNr1bRM0fsYoUyCrRfKKnfH","result":{"output":"[redacted]"}},"time":1781503090987} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"82b18436-3332-4619-9955-1025065958ef","turnId":"1","step":15,"usage":{"inputOther":5891,"output":41,"inputCacheRead":114176,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5389,"llmStreamDurationMs":747},"time":1781503090987} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":5891,"output":41,"inputCacheRead":114176,"inputCacheCreation":0},"usageScope":"turn","time":1781503090987} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"823607a3-d22e-4433-b270-28a9822f9f78","turnId":"1","step":16},"time":1781503090988} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0b6d7a3c-66be-4933-a4d4-b23efd00ddb1","turnId":"1","step":16,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503095471} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_q71WhLknHh0TKF9tI45DZl2l","turnId":"1","step":16,"stepUuid":"[redacted]","toolCallId":"tool_q71WhLknHh0TKF9tI45DZl2l","name":"[redacted]","args":{"path":"[redacted]","line_offset":3168,"n_lines":270},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503095474} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_g6O74zjAdM7wIPtI1zfaSWqM","turnId":"1","step":16,"stepUuid":"[redacted]","toolCallId":"tool_g6O74zjAdM7wIPtI1zfaSWqM","name":"[redacted]","args":{"pattern":"[redacted]","path":"[redacted]","output_mode":"[redacted]","-n":true,"-A":80},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503095477} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_q71WhLknHh0TKF9tI45DZl2l","result":{"output":"[redacted]"}},"time":1781503095480} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_g6O74zjAdM7wIPtI1zfaSWqM","result":{"output":"[redacted]"}},"time":1781503095523} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"823607a3-d22e-4433-b270-28a9822f9f78","turnId":"1","step":16,"usage":{"inputOther":162,"output":95,"inputCacheRead":120064,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":2800,"llmStreamDurationMs":1679},"time":1781503095523} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":162,"output":95,"inputCacheRead":120064,"inputCacheCreation":0},"usageScope":"turn","time":1781503095523} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"d3b7e111-8a0f-450c-ba42-8e4de0659cba","turnId":"1","step":17},"time":1781503095524} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"52561176-6f75-4b24-af1c-1fa493111333","turnId":"1","step":17,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503102318} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_5AVNgMpNgUB5OqmIZsLlXLyB","turnId":"1","step":17,"stepUuid":"[redacted]","toolCallId":"tool_5AVNgMpNgUB5OqmIZsLlXLyB","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503102319} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_5AVNgMpNgUB5OqmIZsLlXLyB","result":{"output":"[redacted]"}},"time":1781503102320} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"d3b7e111-8a0f-450c-ba42-8e4de0659cba","turnId":"1","step":17,"usage":{"inputOther":6631,"output":42,"inputCacheRead":120064,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6146,"llmStreamDurationMs":647},"time":1781503102320} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":6631,"output":42,"inputCacheRead":120064,"inputCacheCreation":0},"usageScope":"turn","time":1781503102320} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"1deedc1e-d6ad-4982-a530-7d7a8c148837","turnId":"1","step":18},"time":1781503102320} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"8b3412aa-e298-4bc2-807a-51dde1977428","turnId":"1","step":18,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503107319} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_fVoAQUFfafe2n7xqgk4eJOtZ","turnId":"1","step":18,"stepUuid":"[redacted]","toolCallId":"tool_fVoAQUFfafe2n7xqgk4eJOtZ","name":"[redacted]","args":{"path":"[redacted]","line_offset":6439,"n_lines":840},"description":"[redacted]","display":{"kind":"file_io","operation":"[redacted]","path":"[redacted]"}},"time":1781503107323} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_fVoAQUFfafe2n7xqgk4eJOtZ","result":{"output":"[redacted]"}},"time":1781503107327} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"1deedc1e-d6ad-4982-a530-7d7a8c148837","turnId":"1","step":18,"usage":{"inputOther":391,"output":85,"inputCacheRead":126464,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3263,"llmStreamDurationMs":1734},"time":1781503107327} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":391,"output":85,"inputCacheRead":126464,"inputCacheCreation":0},"usageScope":"turn","time":1781503107327} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"40c3c29d-5e95-4aeb-b4be-b3a7aeb17f86","turnId":"1","step":19},"time":1781503107328} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"7e11b6b8-3273-4376-8898-1f5594a10177","turnId":"1","step":19,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503119177} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_hls6YS4NeTX1Jd66Rr9PxxR0","turnId":"1","step":19,"stepUuid":"[redacted]","toolCallId":"tool_hls6YS4NeTX1Jd66Rr9PxxR0","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503119177} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_hls6YS4NeTX1Jd66Rr9PxxR0","result":{"output":"[redacted]"}},"time":1781503119179} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"40c3c29d-5e95-4aeb-b4be-b3a7aeb17f86","turnId":"1","step":19,"usage":{"inputOther":16730,"output":45,"inputCacheRead":126720,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":11005,"llmStreamDurationMs":841},"time":1781503119179} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":16730,"output":45,"inputCacheRead":126720,"inputCacheCreation":0},"usageScope":"turn","time":1781503119179} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"injection","variant":"[redacted]"}},"time":1781503119180} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"8c0c07b9-82fe-4de7-8723-d66c9d68f169","turnId":"1","step":20},"time":1781503119180} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"ddcf6b47-079d-4560-94e8-99176f710274","turnId":"1","step":20,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503127044} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"6d4330c4-9dca-48e1-929d-268ca6c2caa8","turnId":"1","step":20,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781503127044} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"8c0c07b9-82fe-4de7-8723-d66c9d68f169","turnId":"1","step":20,"usage":{"inputOther":431,"output":177,"inputCacheRead":143360,"inputCacheCreation":0},"finishReason":"end_turn","llmFirstTokenLatencyMs":3631,"llmStreamDurationMs":4232},"time":1781503127044} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":431,"output":177,"inputCacheRead":143360,"inputCacheCreation":0},"usageScope":"turn","time":1781503127044} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"user"},"time":1781503467122} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"user"}},"time":1781503467122} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"3ad7e208-5ea2-454b-8f5b-859e01deec1c","turnId":"2","step":1},"time":1781503467122} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0d7b80fc-5017-4e93-ac8a-2fa26a423d9d","turnId":"2","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503471979} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_WTf8fErGWAerIJLLOQd4R0i6","turnId":"2","step":1,"stepUuid":"[redacted]","toolCallId":"tool_WTf8fErGWAerIJLLOQd4R0i6","name":"[redacted]","args":{"task_id":"[redacted]","block":false},"description":"[redacted]"},"time":1781503471980} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_WTf8fErGWAerIJLLOQd4R0i6","result":{"output":"[redacted]"}},"time":1781503471980} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"3ad7e208-5ea2-454b-8f5b-859e01deec1c","turnId":"2","step":1,"usage":{"inputOther":365,"output":48,"inputCacheRead":143616,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3323,"llmStreamDurationMs":975},"time":1781503471980} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":365,"output":48,"inputCacheRead":143616,"inputCacheCreation":0},"usageScope":"turn","time":1781503471980} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"ad088d6e-b414-4be1-a655-df1c79479380","turnId":"2","step":2},"time":1781503471981} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"1415c57e-f80e-4e09-a04c-d15022555a3c","turnId":"2","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503478032} +{"type":"permission.record_approval_result","turnId":2,"toolCallId":"tool_30lDYOswq37nnfUomzs1BRi7","toolName":"[redacted]","action":"[redacted]","sessionApprovalRule":"[redacted]","result":{"decision":"approved","scope":"session"},"time":1781503485502} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"tool_30lDYOswq37nnfUomzs1BRi7","turnId":"2","step":2,"stepUuid":"[redacted]","toolCallId":"tool_30lDYOswq37nnfUomzs1BRi7","name":"[redacted]","args":{"command":"[redacted]"},"description":"[redacted]","display":{"kind":"command","command":"[redacted]","cwd":"[redacted]","language":"[redacted]"}},"time":1781503485502} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_30lDYOswq37nnfUomzs1BRi7","result":{"output":"[redacted]"}},"time":1781503486702} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"ad088d6e-b414-4be1-a655-df1c79479380","turnId":"2","step":2,"usage":{"inputOther":275,"output":119,"inputCacheRead":143872,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":3324,"llmStreamDurationMs":2725},"time":1781503486703} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":275,"output":119,"inputCacheRead":143872,"inputCacheCreation":0},"usageScope":"turn","time":1781503486703} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"ef13bed2-c2bf-430e-8715-a712be60faa1","turnId":"2","step":3},"time":1781503486703} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"bcb30f03-e9c9-4f34-a627-8884923cf88c","turnId":"2","step":3,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1781503492159} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"11459d46-7059-4191-9e06-fc7f4b1d6c76","turnId":"2","step":3,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1781503492160} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"ef13bed2-c2bf-430e-8715-a712be60faa1","turnId":"2","step":3,"usage":{"inputOther":162,"output":64,"inputCacheRead":144128,"inputCacheCreation":0},"finishReason":"end_turn","llmFirstTokenLatencyMs":4028,"llmStreamDurationMs":1427},"time":1781503492160} +{"type":"usage.record","model":"kimi-code/kimi-for-coding","usage":{"inputOther":162,"output":64,"inputCacheRead":144128,"inputCacheCreation":0},"usageScope":"turn","time":1781503492160} +{"type":"turn.steer","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"background_task","taskId":"[redacted]","status":"killed","notificationId":"[redacted]"},"time":1781503510029} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"background_task","taskId":"[redacted]","status":"killed","notificationId":"[redacted]"}},"time":1781503510030} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"5561d5f2-439a-4804-989e-818c3555224e","turnId":"3","step":1},"time":1781503510030} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/state.json new file mode 100644 index 000000000..02515a3f9 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-june-subagent_000000000001/session_a0a7c8d3-2a5a-480d-9d42-740257598abd/state.json @@ -0,0 +1,20 @@ +{ + "createdAt": "2026-06-15T05:49:26.333Z", + "updatedAt": "2026-06-15T06:04:27.094Z", + "title": "[redacted]", + "isCustomTitle": false, + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main", + "parentAgentId": null + }, + "agent-0": { + "homedir": "[redacted]", + "type": "sub", + "parentAgentId": "[redacted]" + } + }, + "custom": {}, + "lastPrompt": "[redacted]" +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/agents/main/wire.jsonl new file mode 100644 index 000000000..f5d2f8e82 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/agents/main/wire.jsonl @@ -0,0 +1,4 @@ +{"type":"metadata","protocol_version":"1.4","created_at":1783026547038,"app_version":"[redacted]"} +{"type":"config.update","profileName":"agent","systemPrompt":"[redacted]","time":1783026547038} +{"type":"tools.set_active_tools","names":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"time":1783026547039} +{"type":"config.update","modelAlias":"kimi-code/kimi-for-coding","thinkingLevel":"high","time":1783026547039} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/state.json new file mode 100644 index 000000000..ae7599b45 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v14-no-turn_000000000004/session_7d423a2a-9c30-4478-8fb0-ceb78f9dbb6a/state.json @@ -0,0 +1,14 @@ +{ + "createdAt": "2026-07-02T21:09:07.020Z", + "updatedAt": "2026-07-02T21:09:07.020Z", + "title": "[redacted]", + "isCustomTitle": false, + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main", + "parentAgentId": null + } + }, + "custom": {} +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/agents/main/wire.jsonl new file mode 100644 index 000000000..a2d2f3e07 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/agents/main/wire.jsonl @@ -0,0 +1,83 @@ +{"type":"metadata","protocol_version":"1.5","created_at":1786134177406} +{"type":"mcp.tools_discovered","serverName":"[redacted]","hash":"[redacted]","tools":[{"name":"[redacted]","description":"[redacted]","inputSchema":{"type":"object","properties":{"data_source_name":{"type":"string","description":"[redacted]"},"api_name":{"type":"string","description":"[redacted]"},"params":{"type":"object","description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]"]}},{"name":"[redacted]","description":"[redacted]","inputSchema":{"type":"object","properties":{"name":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"]}}],"enabledNames":["[redacted]","[redacted]"],"time":1786134177423} +{"type":"permission.set_mode","mode":"yolo","time":1786134177424} +{"type":"profile.bind","modelAlias":"kimi-code/k3","profileName":"agent","thinkingEffort":"max","systemPrompt":"[redacted]","environmentDisclosure":{"cwd":"[redacted]","date":{"disclosed":true,"value":{"localDate":"[redacted]","timeZone":"[redacted]"}}},"agentsMdPaths":[],"activeToolNames":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"disallowedTools":[],"time":1786134177435} +{"type":"turn.prompt","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"skill_activation","activationId":"[redacted]","skillName":"[redacted]","trigger":"[redacted]","skillType":"[redacted]","skillPath":"[redacted]","skillSource":"[redacted]"},"time":1786134177442} +{"type":"context.append_message","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"skill_activation","activationId":"[redacted]","skillName":"[redacted]","trigger":"[redacted]","skillType":"[redacted]","skillPath":"[redacted]","skillSource":"[redacted]"},"id":"msg_01KZEY99N1EEBR9RYT8GW3AE0B"},"time":1786134177443} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"d2c4648a-d8f7-4548-9a61-c302ab39a5b7","turnId":"0","step":1},"time":1786134177447} +{"type":"llm.tools_snapshot","hash":"[redacted]","tools":[{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"prompt":{"type":"string","description":"[redacted]"},"description":{"type":"string","description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string"},"resume":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"description":{"type":"string","minLength":1,"description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string","minLength":1},"prompt_template":{"description":"[redacted]","type":"string","minLength":1},"items":{"description":"[redacted]","maxItems":128,"type":"array","items":{"type":"string","minLength":1}},"resume_agent_ids":{"description":"[redacted]","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"questions":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"description":"[redacted]"},"header":{"default":"[redacted]","description":"[redacted]","type":"string"},"options":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false},"description":"[redacted]"},"multi_select":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false},"description":"[redacted]"},"background":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"command":{"type":"string","minLength":1,"description":"[redacted]"},"cwd":{"description":"[redacted]","type":"string"},"timeout":{"default":60,"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"},"disable_timeout":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"objective":{"type":"string","minLength":1,"description":"[redacted]"},"completionCriterion":{"description":"[redacted]","type":"string"},"replace":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"cron":{"type":"string","description":"[redacted]"},"prompt":{"type":"string","minLength":1,"maxLength":8192,"description":"[redacted]"},"recurring":{"default":true,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"id":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"old_string":{"type":"string","minLength":1,"description":"[redacted]"},"new_string":{"type":"string","description":"[redacted]"},"replace_all":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"options":{"description":"[redacted]","minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"url":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"path":{"description":"[redacted]","type":"string"},"include_ignored":{"description":"[redacted]","type":"boolean"},"include_dirs":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"path":{"description":"[redacted]","type":"string"},"glob":{"description":"[redacted]","type":"string"},"type":{"description":"[redacted]","type":"string"},"output_mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]","[redacted]"]},"-i":{"description":"[redacted]","type":"boolean"},"-n":{"description":"[redacted]","type":"boolean"},"-A":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-B":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-C":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"head_limit":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"offset":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"multiline":{"description":"[redacted]","type":"boolean"},"include_ignored":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"type":"object","properties":{"data_source_name":{"type":"string","description":"[redacted]"},"api_name":{"type":"string","description":"[redacted]"},"params":{"type":"object","description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]"]}},{"name":"[redacted]","description":"[redacted]","parameters":{"type":"object","properties":{"name":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"]}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"line_offset":{"description":"[redacted]","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-1000,"maximum":-1}]},"n_lines":{"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"region":{"description":"[redacted]","type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"[redacted]"},"y":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"[redacted]"},"width":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"[redacted]"},"height":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"[redacted]"}},"required":["[redacted]","[redacted]","[redacted]","[redacted]"],"additionalProperties":false},"full_resolution":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"description":"[redacted]"},"unit":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"skill":{"type":"string","description":"[redacted]"},"args":{"description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"active_only":{"default":true,"description":"[redacted]","type":"boolean"},"limit":{"default":20,"description":"[redacted]","type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"},"reason":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"todos":{"description":"[redacted]","type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"[redacted]"},"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"query":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"content":{"type":"string","description":"[redacted]"},"mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}],"time":1786134177456} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":1,"turnStep":"[redacted]","time":1786134177456} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":5076,"output":237,"inputCacheRead":19456,"inputCacheCreation":0},"usageScope":"turn","time":1786134194752} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"d4a8b543-c040-481c-9a19-9208ba13df01","turnId":"0","step":1,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134194756} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"81ba8d0f-46ba-4e82-a7f5-52da02c50a0a","turnId":"0","step":1,"stepUuid":"[redacted]","toolCallId":"tool_m0SvffpZeJ5fbBGo2DO9u7f3","name":"[redacted]","args":{"command":"[redacted]"}},"time":1786134194801} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_m0SvffpZeJ5fbBGo2DO9u7f3","result":{"output":"[redacted]"}},"time":1786134194901} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"d2c4648a-d8f7-4548-9a61-c302ab39a5b7","turnId":"0","step":1,"finishReason":"tool_use","usage":{"inputOther":5076,"output":237,"inputCacheRead":19456,"inputCacheCreation":0},"llmFirstTokenLatencyMs":13698,"llmStreamDurationMs":3596,"llmRequestBuildMs":2,"llmServerFirstTokenMs":13696,"llmServerDecodeMs":3587,"llmClientConsumeMs":10,"messageId":"chatcmpl-MUTJJrhml6Gzyw8lSe43261a","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134194902} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"d720f7a8-529c-43fc-8e2d-ca24661af494","turnId":"0","step":2},"time":1786134194903} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":3,"turnStep":"[redacted]","time":1786134194909} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":607,"output":215,"inputCacheRead":24320,"inputCacheCreation":0},"usageScope":"turn","time":1786134204959} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"bd8cb273-af9d-4d3d-9ebc-1ae512eb55e6","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134204961} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"c8f2acec-afbc-44b6-90a8-312023e7588a","turnId":"0","step":2,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1786134204961} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"fee55ba6-4e26-4aea-997a-d5b1b045932b","turnId":"0","step":2,"stepUuid":"[redacted]","toolCallId":"tool_INNfUVIZuIOjkOs0AoWH2QHc","name":"[redacted]","args":{"path":"[redacted]"}},"time":1786134205000} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"60087f95-6a17-4bde-8f90-286f8ba2d321","turnId":"0","step":2,"stepUuid":"[redacted]","toolCallId":"tool_s5UD8K6mmP9mrKOllXyrGCFZ","name":"[redacted]","args":{"path":"[redacted]"}},"time":1786134205027} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_s5UD8K6mmP9mrKOllXyrGCFZ","result":{"output":"[redacted]","note":"[redacted]"}},"time":1786134205040} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_INNfUVIZuIOjkOs0AoWH2QHc","result":{"output":"[redacted]","note":"[redacted]"}},"time":1786134205050} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"d720f7a8-529c-43fc-8e2d-ca24661af494","turnId":"0","step":2,"finishReason":"tool_use","usage":{"inputOther":607,"output":215,"inputCacheRead":24320,"inputCacheCreation":0},"llmFirstTokenLatencyMs":7293,"llmStreamDurationMs":2757,"llmRequestBuildMs":1,"llmServerFirstTokenMs":7292,"llmServerDecodeMs":2749,"llmClientConsumeMs":8,"messageId":"chatcmpl-ekQU4XbMN1hiS3eo4MQrhfBB","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134205050} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"17f2294e-c8e6-4653-8d0e-673d09634724","turnId":"0","step":3},"time":1786134205051} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":6,"turnStep":"[redacted]","time":1786134205056} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":3192,"output":540,"inputCacheRead":24832,"inputCacheCreation":0},"usageScope":"turn","time":1786134223942} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"e0ad5a95-daf6-487a-a627-2ad8bfb06e9d","turnId":"0","step":3,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134223943} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"99437ce6-21df-4192-9a62-bb812f30b24a","turnId":"0","step":3,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1786134223943} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"e57d3919-7c4e-4628-ae1d-1e4ec5ae98c3","turnId":"0","step":3,"stepUuid":"[redacted]","toolCallId":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","name":"[redacted]","args":{"questions":[{"options":[{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"}],"question":"[redacted]","header":"[redacted]"}]}},"time":1786134223979} +{"type":"interaction.request","id":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","kind":"question","toolCallId":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","agentId":"main","request":{"turnId":0,"toolCallId":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","questions":[{"question":"[redacted]","header":"[redacted]","options":[{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"},{"label":"[redacted]","description":"[redacted]"}]}]},"time":1786134223979} +{"type":"interaction.resolved","id":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","response":{"answers":{"想对 kimi-code 配置做什么操作?":"[redacted]"},"method":"[redacted]"},"time":1786134241502} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_FiJlqqcBbZ4wityyrGDt6lcQ","result":{"output":"[redacted]"}},"time":1786134241513} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"17f2294e-c8e6-4653-8d0e-673d09634724","turnId":"0","step":3,"finishReason":"tool_use","usage":{"inputOther":3192,"output":540,"inputCacheRead":24832,"inputCacheCreation":0},"llmFirstTokenLatencyMs":11270,"llmStreamDurationMs":7616,"llmRequestBuildMs":1,"llmServerFirstTokenMs":11269,"llmServerDecodeMs":7603,"llmClientConsumeMs":13,"messageId":"chatcmpl-inlblRJHPEk7YsqHHQ3UCDhL","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134241513} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"0e968358-ebe0-4597-b007-49a312abe0eb","turnId":"0","step":4},"time":1786134241514} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":8,"turnStep":"[redacted]","time":1786134241519} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":691,"output":230,"inputCacheRead":27904,"inputCacheCreation":0},"usageScope":"turn","time":1786134254672} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"b7e7c3ec-cd9f-4d3a-b175-70986b901b8b","turnId":"0","step":4,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134254673} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"0622b02b-265a-46d1-a1fc-cbd43513d462","turnId":"0","step":4,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1786134254673} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"ab56fbea-4ced-41fd-b72c-35f04eefe1b9","turnId":"0","step":4,"stepUuid":"[redacted]","toolCallId":"tool_6X64OVMXpV34TiG2gUcEm3C4","name":"[redacted]","args":{"url":"[redacted]"}},"time":1786134254707} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_6X64OVMXpV34TiG2gUcEm3C4","result":{"output":"[redacted]"}},"time":1786134264303} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"0e968358-ebe0-4597-b007-49a312abe0eb","turnId":"0","step":4,"finishReason":"tool_use","usage":{"inputOther":691,"output":230,"inputCacheRead":27904,"inputCacheCreation":0},"llmFirstTokenLatencyMs":10738,"llmStreamDurationMs":2413,"llmRequestBuildMs":0,"llmServerFirstTokenMs":10738,"llmServerDecodeMs":2406,"llmClientConsumeMs":7,"messageId":"chatcmpl-l37EUAdYjUg9KWRyXGLTZUuF","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134264304} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"24314ba5-fd49-4b93-9772-1106e349a036","turnId":"0","step":5},"time":1786134264306} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":10,"turnStep":"[redacted]","time":1786134264310} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":9743,"output":285,"inputCacheRead":28416,"inputCacheCreation":0},"usageScope":"turn","time":1786134292926} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"5c159e5d-b367-48ea-8d7c-8e07ab4d243d","turnId":"0","step":5,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134292928} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"2b5384a0-c5ed-4553-b627-e0f44238c4cb","turnId":"0","step":5,"stepUuid":"[redacted]","toolCallId":"tool_vYapAfITivRLoqcAGNWBvjne","name":"[redacted]","args":{"command":"[redacted]","cwd":"[redacted]"}},"time":1786134292960} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_vYapAfITivRLoqcAGNWBvjne","result":{"output":"[redacted]"}},"time":1786134293031} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"24314ba5-fd49-4b93-9772-1106e349a036","turnId":"0","step":5,"finishReason":"tool_use","usage":{"inputOther":9743,"output":285,"inputCacheRead":28416,"inputCacheCreation":0},"llmFirstTokenLatencyMs":24483,"llmStreamDurationMs":4133,"llmRequestBuildMs":1,"llmServerFirstTokenMs":24482,"llmServerDecodeMs":4126,"llmClientConsumeMs":7,"messageId":"chatcmpl-n1yHhklUkMcPlOx5zAPvVXTo","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134293031} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"7adc5868-c4dc-47e2-8962-9d37dd282a1d","turnId":"0","step":6},"time":1786134293032} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":12,"turnStep":"[redacted]","time":1786134293036} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":334,"output":105,"inputCacheRead":38144,"inputCacheCreation":0},"usageScope":"turn","time":1786134305815} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"86b55097-d73a-48e1-901b-2081c5a070ed","turnId":"0","step":6,"stepUuid":"[redacted]","toolCallId":"tool_HXpNdLFqjOjdjrdvSPh466ss","name":"[redacted]","args":{"path":"[redacted]","old_string":"[redacted]","new_string":"[redacted]"}},"time":1786134305851} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_HXpNdLFqjOjdjrdvSPh466ss","result":{"output":"[redacted]"}},"time":1786134305871} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"7adc5868-c4dc-47e2-8962-9d37dd282a1d","turnId":"0","step":6,"finishReason":"tool_use","usage":{"inputOther":334,"output":105,"inputCacheRead":38144,"inputCacheCreation":0},"llmFirstTokenLatencyMs":12186,"llmStreamDurationMs":592,"llmRequestBuildMs":0,"llmServerFirstTokenMs":12186,"llmServerDecodeMs":590,"llmClientConsumeMs":2,"messageId":"chatcmpl-W5pxIJ2UUhdmQmsteOZhFYb7","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134305871} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"524845c2-b578-4a68-affe-65cda80ab30c","turnId":"0","step":7},"time":1786134305872} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":14,"turnStep":"[redacted]","time":1786134305877} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":231,"output":76,"inputCacheRead":38400,"inputCacheCreation":0},"usageScope":"turn","time":1786134319558} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"2eac1781-4b59-4165-b003-2e272d472799","turnId":"0","step":7,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1786134319560} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"3a5d2952-3d08-40dc-86ce-60fa1e4144b2","turnId":"0","step":7,"stepUuid":"[redacted]","toolCallId":"tool_lbvOxykFpCnHD43rgifwReci","name":"[redacted]","args":{"command":"[redacted]"}},"time":1786134319594} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_lbvOxykFpCnHD43rgifwReci","result":{"output":"[redacted]"}},"time":1786134320244} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"524845c2-b578-4a68-affe-65cda80ab30c","turnId":"0","step":7,"finishReason":"tool_use","usage":{"inputOther":231,"output":76,"inputCacheRead":38400,"inputCacheCreation":0},"llmFirstTokenLatencyMs":13195,"llmStreamDurationMs":486,"llmRequestBuildMs":1,"llmServerFirstTokenMs":13194,"llmServerDecodeMs":483,"llmClientConsumeMs":3,"messageId":"chatcmpl-aM1JmsNjkJSkEppWIhtmOSTX","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134320244} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"46fc4fe7-e787-4f5f-8127-c44a7c388a6a","turnId":"0","step":8},"time":1786134320245} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":16,"turnStep":"[redacted]","time":1786134320250} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":370,"output":148,"inputCacheRead":38400,"inputCacheCreation":0},"usageScope":"turn","time":1786134336053} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"b8432fad-3e2f-415d-ab3e-dd5bc9d7dc84","turnId":"0","step":8,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134336055} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"e6eac126-0894-4e82-b452-45045d04412c","turnId":"0","step":8,"stepUuid":"[redacted]","toolCallId":"tool_TAQDOSySTre2ImF3X6O4LUjF","name":"[redacted]","args":{"command":"[redacted]","cwd":"[redacted]"}},"time":1786134336090} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_TAQDOSySTre2ImF3X6O4LUjF","result":{"output":"[redacted]","isError":true}},"time":1786134336224} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"46fc4fe7-e787-4f5f-8127-c44a7c388a6a","turnId":"0","step":8,"finishReason":"tool_use","usage":{"inputOther":370,"output":148,"inputCacheRead":38400,"inputCacheCreation":0},"llmFirstTokenLatencyMs":13845,"llmStreamDurationMs":1958,"llmRequestBuildMs":0,"llmServerFirstTokenMs":13845,"llmServerDecodeMs":1955,"llmClientConsumeMs":3,"messageId":"chatcmpl-rZJ62GarvNMWcnVRcvGGeiwj","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134336224} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"465c7e23-b714-4713-a851-65c6f4bd01d3","turnId":"0","step":9},"time":1786134336225} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":18,"turnStep":"[redacted]","time":1786134336229} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":336,"output":141,"inputCacheRead":38656,"inputCacheCreation":0},"usageScope":"turn","time":1786134350317} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"63db1fd2-362a-421e-aae5-af10ed673f98","turnId":"0","step":9,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134350318} +{"type":"context.append_loop_event","event":{"type":"tool.call","uuid":"e8240086-b9e1-4c4b-aa0a-56331e0930a1","turnId":"0","step":9,"stepUuid":"[redacted]","toolCallId":"tool_lajkvwgCM2wOB0xQb6Rrjxbv","name":"[redacted]","args":{"command":"[redacted]","cwd":"[redacted]"}},"time":1786134350350} +{"type":"context.append_loop_event","event":{"type":"tool.result","parentUuid":"[redacted]","toolCallId":"tool_lajkvwgCM2wOB0xQb6Rrjxbv","result":{"output":"[redacted]"}},"time":1786134350534} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"465c7e23-b714-4713-a851-65c6f4bd01d3","turnId":"0","step":9,"finishReason":"tool_use","usage":{"inputOther":336,"output":141,"inputCacheRead":38656,"inputCacheCreation":0},"llmFirstTokenLatencyMs":11940,"llmStreamDurationMs":2147,"llmRequestBuildMs":0,"llmServerFirstTokenMs":11940,"llmServerDecodeMs":2145,"llmClientConsumeMs":2,"messageId":"chatcmpl-YadNDFayJqMe6ERsLUSYpACk","providerFinishReason":"tool_calls","rawFinishReason":"tool_calls"},"time":1786134350534} +{"type":"context.append_loop_event","event":{"type":"step.begin","uuid":"dd538318-7680-463c-b671-2fca9e64bf65","turnId":"0","step":10},"time":1786134350536} +{"type":"llm.request","kind":"loop","provider":"openai","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"eccbe4a4b347ee3a247997b4b9b89f4ae17e4e1613ca14e55cae0b988d9333f0","toolsHash":"[redacted]","messageCount":20,"turnStep":"[redacted]","time":1786134350540} +{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":308,"output":199,"inputCacheRead":38912,"inputCacheCreation":0},"usageScope":"turn","time":1786134357723} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"63412f56-ebd7-4be7-8a59-932829e3ce3e","turnId":"0","step":10,"stepUuid":"[redacted]","part":{"type":"think","think":"[redacted]"}},"time":1786134357724} +{"type":"context.append_loop_event","event":{"type":"content.part","uuid":"be384e5b-b80e-49d8-9d73-3f74344905af","turnId":"0","step":10,"stepUuid":"[redacted]","part":{"type":"text","text":"[redacted]"}},"time":1786134357724} +{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"dd538318-7680-463c-b671-2fca9e64bf65","turnId":"0","step":10,"finishReason":"end_turn","usage":{"inputOther":308,"output":199,"inputCacheRead":38912,"inputCacheCreation":0},"llmFirstTokenLatencyMs":5002,"llmStreamDurationMs":2181,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5002,"llmServerDecodeMs":2180,"llmClientConsumeMs":1,"messageId":"chatcmpl-YlcOB5QXaxsglyC2TJx3V4F7","providerFinishReason":"completed","rawFinishReason":"stop"},"time":1786134357724} +{"type":"turn.ended","turnId":0,"reason":"[redacted]","durationMs":180311,"time":1786134357753} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/state.json new file mode 100644 index 000000000..df477725b --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-early-no-agentid_000000000007/session_fc16731e-2bfe-4873-a6cb-4b9e73280360/state.json @@ -0,0 +1,19 @@ +{ + "id": "session_fc16731e-2bfe-4873-a6cb-4b9e73280360", + "version": 2, + "cwd": "[redacted]", + "createdAt": 1786134177385, + "updatedAt": 1786134357754, + "archived": false, + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main" + } + }, + "custom": {}, + "lastPrompt": "[redacted]", + "title": "[redacted]", + "isCustomTitle": false, + "lastTurnReason": "[redacted]" +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/agents/main/wire.jsonl b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/agents/main/wire.jsonl new file mode 100644 index 000000000..1bc893127 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/agents/main/wire.jsonl @@ -0,0 +1,19 @@ +{"type":"metadata","protocol_version":"1.5","created_at":1790830444486} +{"type":"runtime.set_binding","workspaceId":"wd_v15-magpie-failed_000000000008","runtimeId":"local","agentId":"main","time":1790830444500} +{"type":"profile.bind","agentId":"main","modelAlias":"magpie/mistral/zai-glm-5-3","profileName":"agent","thinkingEffort":"max","systemPrompt":"[redacted]","environmentDisclosure":{"cwd":"[redacted]"},"agentsMdPaths":[],"activeToolNames":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"],"disallowedTools":[],"subagents":["[redacted]","[redacted]","[redacted]"],"time":1790830444515} +{"type":"permission.set_mode","agentId":"main","mode":"manual","time":1790830444516} +{"type":"turn.prompt","agentId":"main","input":[{"type":"text","text":"[redacted]"}],"origin":{"kind":"user"},"promptId":"[redacted]","turnId":0,"time":1790830444536} +{"type":"context.append_message","agentId":"main","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"id":"msg_01M3TWZZZJP7DRJN9CSHPP7PW8","toolCalls":[],"origin":{"kind":"user"}},"time":1790830444536} +{"message":{"message":{"role":"user","content":[{"type":"text","text":"[redacted]"}]},"meta":{"source":"[redacted]","promptId":"[redacted]","origin":{"kind":"user"},"tracked":true,"createdAt":"2026-10-01T04:54:04.531Z","userMessageId":"[redacted]"}},"type":"agent.message.appended","time":1790830444532,"kind":"event"} +{"type":"context.append_message","agentId":"main","message":{"role":"user","content":[{"type":"text","text":"[redacted]"}],"toolCalls":[],"origin":{"kind":"injection","variant":"[redacted]","disclosure":{"kind":"date","renderGeneration":1,"localDate":"[redacted]","timeZone":"[redacted]"}}},"time":1790830444552} +{"turnId":0,"queueItemId":"[redacted]","type":"agent.turn.started","time":1790830444532,"kind":"event"} +{"type":"plugin.session_start","agentId":"main","content":null,"time":1790830444552} +{"type":"context.append_loop_event","agentId":"main","event":{"type":"step.begin","uuid":"49fd6cf7-94b4-4050-b78f-f5348291cc69","turnId":"0","step":1},"time":1790830444553} +{"type":"llm.tools_snapshot","agentId":"main","hash":"[redacted]","tools":[{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"prompt":{"type":"string","description":"[redacted]"},"description":{"type":"string","description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string"},"resume":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"description":{"type":"string","minLength":1,"description":"[redacted]"},"subagent_type":{"description":"[redacted]","type":"string","minLength":1},"prompt_template":{"description":"[redacted]","type":"string","minLength":1},"items":{"description":"[redacted]","maxItems":128,"type":"array","items":{"type":"string","minLength":1}},"resume_agent_ids":{"description":"[redacted]","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"questions":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"description":"[redacted]"},"header":{"default":"[redacted]","description":"[redacted]","type":"string"},"options":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false},"description":"[redacted]"},"multi_select":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false},"description":"[redacted]"},"background":{"default":false,"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"command":{"type":"string","minLength":1,"description":"[redacted]"},"cwd":{"description":"[redacted]","type":"string"},"timeout":{"default":60,"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":{"description":"[redacted]","type":"string"},"run_in_background":{"description":"[redacted]","type":"boolean"},"disable_timeout":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"objective":{"type":"string","minLength":1,"description":"[redacted]"},"completionCriterion":{"description":"[redacted]","type":"string"},"replace":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"cron":{"type":"string","description":"[redacted]"},"prompt":{"type":"string","minLength":1,"maxLength":8192,"description":"[redacted]"},"recurring":{"default":true,"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"id":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"old_string":{"type":"string","minLength":1,"description":"[redacted]"},"new_string":{"type":"string","description":"[redacted]"},"replace_all":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]","[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"options":{"description":"[redacted]","minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"[redacted]"},"description":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"url":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"head_limit":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"offset":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"path":{"description":"[redacted]","type":"string"},"include_ignored":{"description":"[redacted]","type":"boolean"},"include_dirs":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"pattern":{"type":"string","description":"[redacted]"},"path":{"description":"[redacted]","type":"string"},"glob":{"description":"[redacted]","type":"string"},"type":{"description":"[redacted]","type":"string"},"output_mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]","[redacted]"]},"-i":{"description":"[redacted]","type":"boolean"},"-n":{"description":"[redacted]","type":"boolean"},"-A":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-B":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"-C":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"head_limit":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"offset":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"multiline":{"description":"[redacted]","type":"boolean"},"include_ignored":{"description":"[redacted]","type":"boolean"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"line_offset":{"description":"[redacted]","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"exclusiveMaximum":0}]},"column_offset":{"description":"[redacted]","type":"integer","minimum":0,"maximum":9007199254740991},"n_lines":{"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_chars":{"description":"[redacted]","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"description":"[redacted]"},"unit":{"type":"string","enum":["[redacted]","[redacted]","[redacted]","[redacted]","[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"skill":{"type":"string","description":"[redacted]"},"args":{"description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"active_only":{"default":true,"description":"[redacted]","type":"boolean"},"limit":{"default":20,"description":"[redacted]","type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"task_id":{"type":"string","description":"[redacted]"},"reason":{"default":"[redacted]","description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"todos":{"description":"[redacted]","type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"[redacted]"},"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}},"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"status":{"type":"string","enum":["[redacted]","[redacted]","[redacted]"],"description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"timeout":{"type":"integer","exclusiveMinimum":0,"maximum":600,"description":"[redacted]"},"task_id":{"description":"[redacted]","type":"string"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"query":{"type":"string","description":"[redacted]"}},"required":["[redacted]"],"additionalProperties":false}},{"name":"[redacted]","description":"[redacted]","parameters":{"$schema":"[redacted]","type":"object","properties":{"path":{"type":"string","description":"[redacted]"},"content":{"type":"string","description":"[redacted]"},"mode":{"description":"[redacted]","type":"string","enum":["[redacted]","[redacted]"]}},"required":["[redacted]","[redacted]"],"additionalProperties":false}}],"time":1790830444556} +{"type":"llm.request","agentId":"main","kind":"loop","provider":"openai","model":"mistral/zai-glm-5-3","modelAlias":"magpie/mistral/zai-glm-5-3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1000000,"toolSelect":false,"systemPromptHash":"ad571d7df7e3e53b2ced6258ef0db4c8c34bd06f60abfdaa4ea8a6a190b1096d","toolsHash":"[redacted]","messageCount":2,"turnStep":"[redacted]","time":1790830444556} +{"type":"context.append_loop_event","agentId":"main","event":{"type":"step.end","uuid":"49fd6cf7-94b4-4050-b78f-f5348291cc69","turnId":"0","step":1,"finishReason":"error"},"time":1790830445331} +{"type":"turn.step.interrupted","agentId":"main","turnId":0,"step":1,"reason":"[redacted]","message":"[redacted]","time":1790830445337} +{"turnId":0,"outcome":"[redacted]","errorMessage":"[redacted]","type":"agent.turn.ended","time":1790830445331,"kind":"event"} +{"type":"turn.ended","agentId":"main","turnId":0,"reason":"[redacted]","error":{"code":"[redacted]","message":"[redacted]","name":"[redacted]","details":{"statusCode":422,"requestId":null,"traceId":null},"retryable":false},"durationMs":803,"time":1790830445339} +{"type":"token_counting.turn_recorded","agentId":"main","turnId":0,"length":3,"tokens":124,"time":1790830445340} +{"type":"prompt.completed","agentId":"main","promptId":"[redacted]","finishedAt":"[redacted]","reason":"[redacted]","time":1790830445343} diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/notify/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/notify/state.json new file mode 100644 index 000000000..c994fef1c --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/notify/state.json @@ -0,0 +1,3 @@ +{ + "enabled": false +} \ No newline at end of file diff --git a/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/state.json b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/state.json new file mode 100644 index 000000000..850fa3204 --- /dev/null +++ b/internal/sessions/testdata/kimi-code-sessions/sessions/wd_v15-magpie-failed_000000000008/session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c/state.json @@ -0,0 +1,20 @@ +{ + "id": "session_0f2d1067-903e-4a6a-9f1f-df1f0b0e606c", + "version": 2, + "cwd": "[redacted]", + "createdAt": 1790830444445, + "updatedAt": 1790830445343, + "archived": false, + "agents": { + "main": { + "homedir": "[redacted]", + "type": "main" + } + }, + "custom": {}, + "lastPrompt": "[redacted]", + "title": "[redacted]", + "titleKind": "[redacted]", + "lastTurnReason": "[redacted]", + "isCustomTitle": false +} \ No newline at end of file diff --git a/internal/sessions/wsl.go b/internal/sessions/wsl.go index 921075530..ae90b967a 100644 --- a/internal/sessions/wsl.go +++ b/internal/sessions/wsl.go @@ -65,6 +65,7 @@ var wslAgents = []struct{ agent, dir string }{ {"codex", ".codex"}, {"pi", filepath.Join(".pi", "agent")}, {"omp", filepath.Join(".omp", "agent")}, + {"kimi", ".kimi-code"}, } // wslScan lists the session files under a distro's home. @@ -81,6 +82,8 @@ func wslScan(home string) []file { out = append(out, piFilesIn(dir, "")...) case "omp": out = append(out, ompFilesIn(dir)...) + case "kimi": + out = append(out, kimiFilesIn(filepath.Join(dir, "sessions"))...) } } return out