sessions: Kimi Code's own calls reach Usage, read from its wire files (#1607, infinitr0us)
Usage counts the gateway's calls and the calls the agents' own session files record (sessions.Calls). Kimi Code had no reader, so its calls straight to api.kimi.com on Kimi's own sign-in never showed (the reporter's 47 k3 calls of one session on 2026-10-11). The reader (calls_kimi.go) is built from the redacted real wire files infinitr0us shared from two machines (protocols 1.0, 1.4, 1.5; text replaced, every id, model and number kept) and their notes from Kimi Code's source. It reads every agents/*/wire.jsonl under $KIMI_CODE_HOME/sessions, else ~/.kimi-code/sessions (as agent.KimiDir finds the new Kimi Code), main and subagents, ses_* folders included. One call per usage.record: inputOther, inputCacheRead and inputCacheCreation go to Input, CacheRead and CacheWrite, output as is, the record's own model and time. Nothing is paired with step.end, since 1.4 and 1.5 write them in opposite orders and the June 1.4 build has no messageId or llm.request. A model beginning "magpie/" (magpie's own entry in Kimi's config) is skipped: the gateway counted it. kimi fork copies the parent's records unchanged, so a call is keyed by agent (agentId, else its agents/<id> folder), time, model and usage, and Calls counts a key once. It is a whole-file call source (callSources, wholeCallReaders) and the folder is watched (Dirs). The subsystem page gets the list of call readers. Fixtures (testdata/kimi-code) are the reporter's files cut to the lines a call is read from, each line verbatim (50 KB; one of the July session's eight agents kept). Run: the reader over the reporter's whole, untrimmed files gives exactly their README's totals (32/2,841,972/12,283; 151/7,025,587/122,782; 6/147,822/2,009; 10/338,328/2,176; 0 for the four others). TestKimiCodeCalls (both homes), TestKimiCodeSkipsCallsThroughMagpie, TestKimiCodeForkCountsOnce, TestKimiCodeBrokenFiles (cut mid-record, empty, junk, null/negative/timeless usage) pass. Broken by hand, each goes red: no magpie skip, no key, key without agent, no negative or time guard, main only, KIMI_CODE_HOME ignored, cache read dropped. go test -tags nogui ./internal/sessions ./internal/usage ./internal/cli ./internal/gui under a sandbox HOME, gofmt -l, go vet (darwin), GOOS=linux go vet -tags nogui, GOOS=windows go vet. Not tried: a live Kimi Code run (fixtures are the reporter's real files, not a sandbox capture), a successful call through magpie (the magpie-routed record in the test is the reporter's quoted 1.5 line with a magpie/ model), a compaction record (usageScope "session", none in the files), Kimi Code in WSL (not read), Windows paths at runtime. A subagent's calls carry the session but no Subagent field. Thanks to infinitr0us for the write-up from Kimi's source and the redacted wire files. Reported-by: infinitr0us
This commit is contained in:
@@ -210,6 +210,28 @@ lists cut to its own rows (`usageapi.OwnPage`): the ledger's facets are drawn
|
||||
from every call in the period, so without the cut they would name other keys.
|
||||
`TestUsageOverGateway` covers both, and a red when either cut is removed.
|
||||
|
||||
### Calls read from the agents' own files
|
||||
|
||||
A call an agent made without magpie reaches Usage only when its own files
|
||||
are read (`sessions.Calls`, from `callSources` in
|
||||
[`calls.go`](../../internal/sessions/calls.go)). The readers are Claude
|
||||
Code's, Claude Desktop's and Cowork's, Codex's (and both in WSL), and,
|
||||
read a file at a time (`wholeCallReaders` in
|
||||
[`call_cache.go`](../../internal/sessions/call_cache.go)), OpenCode's
|
||||
(#680), ZCode's, DeepSeek Harness's (`dsh`), WorkBuddy's, CodeBuddy
|
||||
Code's (#1779), MiniMax Code's (#1605) and Kimi Code's (#1607,
|
||||
[`calls_kimi.go`](../../internal/sessions/calls_kimi.go)). Each skips the
|
||||
calls the agent made through magpie's own entry, which the gateway logged
|
||||
with the account that answered: Kimi Code's are the ones whose
|
||||
`usage.record` model begins `magpie/`. Kimi Code's calls are its
|
||||
`usage.record`s in every agent's `wire.jsonl` under
|
||||
`$KIMI_CODE_HOME/sessions` (else `~/.kimi-code`), protocols 1.4 and 1.5;
|
||||
a fork repeats its parent's records, so each is keyed by agent, time,
|
||||
model and usage and counted once. The other agents the Sessions page reads
|
||||
(pi, Cline, Qoder, Grok, Droid, omp, Cursor, Hermes, Alma) have no reader
|
||||
yet (#1607). Verification: `TestMiniMaxCodeCalls`, `TestKimiCode*` (the
|
||||
reporter's real wire files), `TestCodeBuddyCalls`, `TestWorkBuddyCalls*`.
|
||||
|
||||
### Calls an app reports itself
|
||||
|
||||
`POST /v1/magpie/usage/requests`
|
||||
|
||||
@@ -178,6 +178,7 @@ var wholeCallReaders = map[string]func(file) (*callFile, bool){
|
||||
"codebuddy": readWorkBuddyCalls, // #1779
|
||||
// #1605
|
||||
"minimax-code": readMiniMaxCalls,
|
||||
"kimi": readKimiCalls, // #1607
|
||||
}
|
||||
|
||||
func readCalls(f file) *callFile {
|
||||
|
||||
@@ -222,14 +222,16 @@ func callFiles() []file {
|
||||
// session file is packed in frames and so cannot be read on from the middle
|
||||
// of one; and WorkBuddy's, whose usage lines repeat a reply's id as it goes
|
||||
// on, as CodeBuddy Code's do (#1779); and MiniMax Code's, whose messages
|
||||
// file a later generation of its history may replace (#1605). Every agent here needs an entry in
|
||||
// wholeCallReaders.
|
||||
// file a later generation of its history may replace (#1605); and Kimi
|
||||
// Code's, whose forks copy their parent's records (#1607). Every agent here
|
||||
// needs an entry in wholeCallReaders.
|
||||
func callSources() []file {
|
||||
out := callFiles()
|
||||
out = append(out, openCodeCallFiles()...)
|
||||
out = append(out, zcodeCallFiles()...)
|
||||
out = append(out, dshCallFiles()...)
|
||||
out = append(out, minimaxCallFiles()...)
|
||||
out = append(out, kimiCallFiles()...)
|
||||
out = append(out, codebuddyCallFiles()...)
|
||||
return append(out, workbuddyCallFiles()...)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
package sessions
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"cmp"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/yetone/magpie/internal/appdir"
|
||||
)
|
||||
|
||||
// Kimi Code's calls (#1607, infinitr0us: its direct calls to api.kimi.com
|
||||
// never reached Usage). Read from the wire files the reporter shared from
|
||||
// two machines (protocols 1.0, 1.4 and 1.5, redacted, every number kept)
|
||||
// and Kimi Code's own source as they quoted it. Each session is a folder
|
||||
// sessions/<workdir slug>/<session id>/ of Kimi's home, each of its agents
|
||||
// (main, and agent-N for a subagent, whose calls are written only in its
|
||||
// own file) writing agents/<agent>/wire.jsonl. Every model response that
|
||||
// came back with usage writes one usage.record:
|
||||
//
|
||||
// {"type":"usage.record","agentId":"main","model":"kimi-code/k3",
|
||||
// "usage":{"inputOther":20257,"output":230,"inputCacheRead":0,
|
||||
// "inputCacheCreation":0},"usageScope":"turn","time":1791696952640}
|
||||
//
|
||||
// model is the key of the [models."<key>"] table the call used. Input is
|
||||
// inputOther plus the cache's read and creation, kept apart here as the
|
||||
// ledger keeps them; output includes the thinking. usageScope "session" is
|
||||
// a call outside a turn (compaction), counted all the same. A failed or
|
||||
// interrupted call writes none, only a step.end with usage null.
|
||||
//
|
||||
// What changed between versions, and why nothing here pairs a record with
|
||||
// its step.end: 1.4 writes the step.end first and the usage.record after
|
||||
// it, 1.5 the other way round; the June 1.4 build writes no messageId and no
|
||||
// llm.request; 1.4 and the 1.5 builds before late August write no agentId.
|
||||
// The record alone carries everything a call needs.
|
||||
//
|
||||
// A call Kimi made through magpie's own entry (internal/agent's kimi.go
|
||||
// writes it as the provider "magpie", its model tables keyed
|
||||
// "magpie/<provider>/<model>") is the gateway's to count: it logged the
|
||||
// call itself, with the provider and account that answered.
|
||||
//
|
||||
// kimi fork copies the parent's records into the new session unchanged,
|
||||
// times included, so a call is keyed by its agent, time, model and usage
|
||||
// (kimiCallKey), and Calls counts each key once. Among the reporter's
|
||||
// 5,190 records no two calls share one.
|
||||
|
||||
// KimiCodeDir is Kimi Code's folder: $KIMI_CODE_HOME, else ~/.kimi-code, as
|
||||
// internal/agent's KimiDir finds the new Kimi Code's (which this package
|
||||
// cannot import). The old Python kimi-cli's ~/.kimi has no usage records.
|
||||
func KimiCodeDir() string {
|
||||
if d := strings.TrimSpace(appdir.Getenv("KIMI_CODE_HOME")); d != "" {
|
||||
return expandHome(d)
|
||||
}
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, ".kimi-code")
|
||||
}
|
||||
|
||||
func kimiSessions() string { return filepath.Join(KimiCodeDir(), "sessions") }
|
||||
|
||||
// kimiGateway is how the model of a call to magpie's entry begins.
|
||||
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
|
||||
}
|
||||
|
||||
type kimiUsage struct {
|
||||
InputOther int `json:"inputOther"`
|
||||
Output int `json:"output"`
|
||||
InputCacheRead int `json:"inputCacheRead"`
|
||||
InputCacheCreation int `json:"inputCacheCreation"`
|
||||
}
|
||||
|
||||
type kimiRecord struct {
|
||||
Type string `json:"type"`
|
||||
AgentID string `json:"agentId"`
|
||||
Model string `json:"model"`
|
||||
Usage *kimiUsage `json:"usage"`
|
||||
Time int64 `json:"time"`
|
||||
}
|
||||
|
||||
var kimiUsageRecord = []byte(`"usage.record"`)
|
||||
|
||||
// readKimiCalls reads one agent's wire file whole.
|
||||
func readKimiCalls(f file) (*callFile, bool) {
|
||||
r, err := os.Open(f.path)
|
||||
if err != nil {
|
||||
return &callFile{Path: f.path, Agent: "kimi"}, false
|
||||
}
|
||||
defer r.Close()
|
||||
agentDir := filepath.Base(filepath.Dir(f.path))
|
||||
st := &callFile{Agent: "kimi", Path: f.path, Session: strings.TrimPrefix(f.key, "kimi:")}
|
||||
br := bufio.NewReaderSize(r, 1<<20)
|
||||
for {
|
||||
b, err := br.ReadBytes('\n')
|
||||
if err != nil && (!errors.Is(err, io.EOF) || len(bytes.TrimSpace(b)) == 0) {
|
||||
break
|
||||
}
|
||||
b = bytes.TrimSpace(b)
|
||||
if len(b) > 0 && len(b) <= maxLine && bytes.Contains(b, kimiUsageRecord) {
|
||||
var rec kimiRecord
|
||||
if json.Unmarshal(b, &rec) == nil {
|
||||
if c, ok := kimiCall(st, agentDir, rec); ok {
|
||||
st.Calls = append(st.Calls, c)
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
return st, true
|
||||
}
|
||||
|
||||
// kimiCall is a usage.record as a call.
|
||||
func kimiCall(st *callFile, agentDir string, rec kimiRecord) (Call, bool) {
|
||||
u := rec.Usage
|
||||
if rec.Type != "usage.record" || u == nil || strings.HasPrefix(rec.Model, kimiGateway) {
|
||||
return Call{}, false
|
||||
}
|
||||
if u.InputOther < 0 || u.Output < 0 || u.InputCacheRead < 0 || u.InputCacheCreation < 0 {
|
||||
return Call{}, false
|
||||
}
|
||||
at := ms(rec.Time)
|
||||
if at.IsZero() {
|
||||
return Call{}, false
|
||||
}
|
||||
c := Call{
|
||||
Agent: "kimi",
|
||||
Time: at,
|
||||
Session: st.Session,
|
||||
Model: st.str(rec.Model),
|
||||
Tokens: Tokens{Input: u.InputOther, Output: u.Output, CacheRead: u.InputCacheRead, CacheWrite: u.InputCacheCreation},
|
||||
}
|
||||
if c.Tokens.zero() {
|
||||
return Call{}, false
|
||||
}
|
||||
agent := cmp.Or(rec.AgentID, agentDir)
|
||||
c.Msg = st.str(kimiCallKey(agent, rec.Time, rec.Model, *u))
|
||||
return c, true
|
||||
}
|
||||
|
||||
// kimiCallKey is what tells one call from another across sessions: a fork
|
||||
// repeats its parent's records byte for byte.
|
||||
func kimiCallKey(agent string, t int64, model string, u kimiUsage) string {
|
||||
return "kimi:" + agent + ":" + strconv.FormatInt(t, 10) + ":" + model + ":" +
|
||||
strconv.Itoa(u.InputOther) + "/" + strconv.Itoa(u.Output) + "/" +
|
||||
strconv.Itoa(u.InputCacheRead) + "/" + strconv.Itoa(u.InputCacheCreation)
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
package sessions
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// #1607 (infinitr0us): Kimi Code's own calls reach the usage ledger. The
|
||||
// sessions in testdata/kimi-code are the reporter's real wire files from
|
||||
// two machines (redacted by them: text replaced, every id, model and number
|
||||
// kept), cut down to the lines a call is read from (metadata, llm.request,
|
||||
// step.end, usage.record, turn.cancel), each line as it was:
|
||||
//
|
||||
// - wd_v14-june-subagent: the June 1.4 build, no llm.request and no
|
||||
// messageId; main and one subagent (agent-0), 25 + 7 calls
|
||||
// - wd_v14-july-subagents: a July 1.4 subagent's file (agent-0), 10 calls
|
||||
// - wd_v14-cancel: a turn cancelled mid-request, whose last llm.request
|
||||
// has no usage.record, 6 calls
|
||||
// - wd_v15-early-no-agentid: 1.5 records written before agentId, 10 calls
|
||||
// - wd_v15-magpie-failed: a failed call through magpie, no usage.record
|
||||
// - wd_v14-no-turn, wd_v14-reopened-ses, wd_v10-migrated: no calls
|
||||
//
|
||||
// The totals for the whole files (32, 151, 6 and 10 calls) are the
|
||||
// reporter's README's, and the reader gives the same on them.
|
||||
type kimiTotal struct{ n, input, cacheRead, cacheWrite, output int }
|
||||
|
||||
var kimiWant = map[string]kimiTotal{
|
||||
"session_a0a7c8d3-2a5a-480d-9d42-740257598abd": {32, 132475 + 68345, 2399488 + 241664, 0, 12283},
|
||||
"session_1e5ea5b2-382a-4788-aa81-dc0e5b99f818": {10, 48900, 312832, 0, 9249},
|
||||
"session_169766c9-86f5-4577-97a3-a51d402db5b9": {6, 15726, 132096, 0, 2009},
|
||||
"session_fc16731e-2bfe-4873-a6cb-4b9e73280360": {10, 20888, 317440, 0, 2176},
|
||||
}
|
||||
|
||||
func kimiCalls() []Call {
|
||||
var out []Call
|
||||
for _, c := range Calls(time.Time{}) {
|
||||
if c.Agent == "kimi" {
|
||||
out = append(out, c)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func kimiTotals(cs []Call) map[string]kimiTotal {
|
||||
out := map[string]kimiTotal{}
|
||||
for _, c := range cs {
|
||||
t := out[c.Session]
|
||||
t.n++
|
||||
t.input += c.Input
|
||||
t.cacheRead += c.CacheRead
|
||||
t.cacheWrite += c.CacheWrite
|
||||
t.output += c.Output
|
||||
out[c.Session] = t
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// kimiHome is a sandbox's Kimi Code folder holding the reporter's sessions.
|
||||
func kimiHome(t *testing.T) string {
|
||||
claude, _ := setup(t)
|
||||
dir := filepath.Join(filepath.Dir(claude), "home", ".kimi-code")
|
||||
copyTree(t, "testdata/kimi-code", dir)
|
||||
return dir
|
||||
}
|
||||
|
||||
func TestKimiCodeCalls(t *testing.T) {
|
||||
for _, viaEnv := range []bool{false, true} {
|
||||
name := "~/.kimi-code"
|
||||
if viaEnv {
|
||||
name = "KIMI_CODE_HOME"
|
||||
}
|
||||
t.Run(name, func(t *testing.T) {
|
||||
claude, _ := setup(t)
|
||||
dir := filepath.Join(filepath.Dir(claude), "home", ".kimi-code")
|
||||
if viaEnv {
|
||||
dir = filepath.Join(filepath.Dir(claude), "elsewhere")
|
||||
t.Setenv("KIMI_CODE_HOME", dir)
|
||||
}
|
||||
copyTree(t, "testdata/kimi-code", dir)
|
||||
got := kimiCalls()
|
||||
if tot := kimiTotals(got); !equalTotals(tot, kimiWant) {
|
||||
t.Fatalf("totals by session\n got %+v\nwant %+v", tot, kimiWant)
|
||||
}
|
||||
var first *Call
|
||||
for i, c := range got {
|
||||
if c.Msg == "" {
|
||||
t.Errorf("call %+v has no key to count it once by", c)
|
||||
}
|
||||
if c.Time.Equal(time.UnixMilli(1781503063433)) {
|
||||
first = &got[i]
|
||||
}
|
||||
}
|
||||
if first == nil {
|
||||
t.Fatal("the June subagent's first call is missing")
|
||||
}
|
||||
if first.Model != "kimi-code/kimi-for-coding" || first.Session != "session_a0a7c8d3-2a5a-480d-9d42-740257598abd" ||
|
||||
first.Tokens != (Tokens{Input: 2823, Output: 253, CacheRead: 6400}) {
|
||||
t.Errorf("first call %+v", *first)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func equalTotals(a, b map[string]kimiTotal) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
for k, v := range a {
|
||||
if b[k] != v {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// kimiRecordLine is a 1.5 usage.record with agentId, as the reporter quoted
|
||||
// it from their own file on the issue.
|
||||
const kimiRecordLine = `{"type":"usage.record","agentId":"main","model":"kimi-code/k3","usage":{"inputOther":20257,"output":230,"inputCacheRead":0,"inputCacheCreation":0},"usageScope":"turn","time":1791696952640}`
|
||||
|
||||
func writeKimiWire(t *testing.T, home, session, agent string, lines ...string) {
|
||||
t.Helper()
|
||||
p := filepath.Join(home, "sessions", "wd_test_000000000009", session, "agents", agent, "wire.jsonl")
|
||||
if err := os.MkdirAll(filepath.Dir(p), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(p, []byte(strings.Join(lines, "\n")), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// A call Kimi made through magpie's own entry (a model table keyed
|
||||
// magpie/<provider>/<model>, as the reporter's failed call's modelAlias
|
||||
// is) is the gateway's to count. The record is the quoted one with that
|
||||
// model: no successful call through magpie was in the files shared.
|
||||
func TestKimiCodeSkipsCallsThroughMagpie(t *testing.T) {
|
||||
home := kimiHome(t)
|
||||
viaMagpie := strings.Replace(kimiRecordLine, `"kimi-code/k3"`, `"magpie/mistral/zai-glm-5-3"`, 1)
|
||||
viaMagpie = strings.Replace(viaMagpie, `1791696952640`, `1791696960000`, 1)
|
||||
writeKimiWire(t, home, "session_through-magpie", "main", kimiRecordLine, viaMagpie, "")
|
||||
var got []Call
|
||||
for _, c := range kimiCalls() {
|
||||
if c.Session == "session_through-magpie" {
|
||||
got = append(got, c)
|
||||
}
|
||||
}
|
||||
if len(got) != 1 || got[0].Model != "kimi-code/k3" {
|
||||
t.Fatalf("want only the call on Kimi's own sign-in, got %+v", got)
|
||||
}
|
||||
if want := (Tokens{Input: 20257, Output: 230}); got[0].Tokens != want || !got[0].Time.Equal(time.UnixMilli(1791696952640)) {
|
||||
t.Errorf("call %+v", got[0])
|
||||
}
|
||||
}
|
||||
|
||||
// kimi fork copies its parent's records into the new session unchanged:
|
||||
// each call counts once, in the session that made it.
|
||||
func TestKimiCodeForkCountsOnce(t *testing.T) {
|
||||
home := kimiHome(t)
|
||||
parent := filepath.Join(home, "sessions", "wd_v14-cancel_000000000003", "session_169766c9-86f5-4577-97a3-a51d402db5b9", "agents", "main", "wire.jsonl")
|
||||
b, err := os.ReadFile(parent)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// a fork of a 1.4 session, then a 1.5 call of its own
|
||||
own := strings.Replace(kimiRecordLine, `1791696952640`, `1791696970000`, 1)
|
||||
writeKimiWire(t, home, "session_fork", "main", strings.TrimRight(string(b), "\n"), `{"type":"forked","time":1791696950000}`, own, "")
|
||||
later := time.Now().Add(time.Hour)
|
||||
fork := filepath.Join(home, "sessions", "wd_test_000000000009", "session_fork", "agents", "main", "wire.jsonl")
|
||||
if err := os.Chtimes(fork, later, later); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// and two subagents of one session whose 1.5 records name themselves:
|
||||
// the same call in two agents' files is two calls
|
||||
sub := strings.Replace(kimiRecordLine, `"agentId":"main"`, `"agentId":"agent-0"`, 1)
|
||||
writeKimiWire(t, home, "session_agents", "agent-0", sub)
|
||||
writeKimiWire(t, home, "session_agents", "main", kimiRecordLine)
|
||||
|
||||
tot := kimiTotals(kimiCalls())
|
||||
if got := tot["session_169766c9-86f5-4577-97a3-a51d402db5b9"]; got != kimiWant["session_169766c9-86f5-4577-97a3-a51d402db5b9"] {
|
||||
t.Errorf("the parent's calls %+v", got)
|
||||
}
|
||||
if got := tot["session_fork"]; got.n != 1 || got.input != 20257 {
|
||||
t.Errorf("the fork's own calls %+v, want its one call after the fork", got)
|
||||
}
|
||||
if got := tot["session_agents"]; got.n != 2 {
|
||||
t.Errorf("two agents' calls at one time %+v, want 2", got)
|
||||
}
|
||||
}
|
||||
|
||||
// A file cut short, empty or holding lines that aren't records reads as
|
||||
// what it holds: no crash, and no call made up.
|
||||
func TestKimiCodeBrokenFiles(t *testing.T) {
|
||||
home := kimiHome(t)
|
||||
src := filepath.Join(home, "sessions", "wd_v14-cancel_000000000003", "session_169766c9-86f5-4577-97a3-a51d402db5b9", "agents", "main", "wire.jsonl")
|
||||
b, err := os.ReadFile(src)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// the copy below would count once with its original: take that away
|
||||
if err := os.RemoveAll(filepath.Dir(filepath.Dir(filepath.Dir(src)))); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// cut in the middle of the last usage.record: 5 whole calls are left
|
||||
last := bytes.LastIndex(b, []byte(`{"type":"usage.record"`))
|
||||
if last < 0 {
|
||||
t.Fatal("no usage.record in the fixture")
|
||||
}
|
||||
writeKimiWire(t, home, "session_cut", "main", string(b[:last+60]))
|
||||
writeKimiWire(t, home, "session_empty", "main")
|
||||
writeKimiWire(t, home, "session_junk", "main",
|
||||
"\x00\xff not json",
|
||||
`{"type":"usage.record"`,
|
||||
`{"type":"usage.record","model":"kimi-code/k3","usage":null,"time":1791696952640}`,
|
||||
`{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":-5,"output":3},"time":1791696952641}`,
|
||||
`{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":5,"output":3}}`,
|
||||
`{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":0,"output":0},"time":1791696952642}`,
|
||||
`{"type":"context.append_loop_event","event":{"type":"step.end","usage":{"inputOther":7,"output":1},"messageId":"usage.record"},"time":1791696952643}`,
|
||||
`["usage.record"]`,
|
||||
strings.Replace(kimiRecordLine, `"agentId":"main"`, `"agentId":"main","usage":"x"`, 1),
|
||||
)
|
||||
tot := kimiTotals(kimiCalls())
|
||||
if got := tot["session_cut"]; got.n != 5 || got.input+got.cacheRead != 147822-(468+25856) {
|
||||
// the last record of the cancel session: inputOther 468, cache 25856
|
||||
t.Errorf("cut file %+v, want its 5 whole calls", got)
|
||||
}
|
||||
for _, s := range []string{"session_empty", "session_junk"} {
|
||||
if got, ok := tot[s]; ok {
|
||||
t.Errorf("%s: %+v, want no calls", s, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,6 +458,7 @@ func Dirs() []string {
|
||||
{filepath.Dir(cursorEditorDB()), cursorEditorDB()},
|
||||
{AlmaDir(), almaDB()},
|
||||
{MiniMaxDir(), minimaxSessions()},
|
||||
{KimiCodeDir(), kimiSessions()},
|
||||
} {
|
||||
if _, err := os.Stat(d.sessions); err == nil {
|
||||
out = append(out, d.dir)
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"type":"metadata","protocol_version":"1.0","created_at":1772252308186}
|
||||
+22
@@ -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
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1784687076903}
|
||||
{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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}
|
||||
+16
@@ -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]"
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1784695864961}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1048576,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":1,"turnStep":"[redacted]","time":1784695865096}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"0f8bc45a-7021-4e05-974e-aae9ed7196f8","turnId":"0","step":1,"usage":{"inputOther":2358,"output":322,"inputCacheRead":7936,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":4822,"llmStreamDurationMs":5946,"llmRequestBuildMs":0,"llmServerFirstTokenMs":4822,"llmServerDecodeMs":5945,"llmClientConsumeMs":1,"messageId":"chatcmpl-GBv2dEXrJyFES7yb0oanzzlG","traceId":"d1e66abe8789586d8322cbc35261e150"},"time":1784695876078}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":2358,"output":322,"inputCacheRead":7936,"inputCacheCreation":0},"usageScope":"turn","time":1784695876078}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1037960,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":7,"turnStep":"[redacted]","time":1784695876080}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"5f770e2d-2da2-4282-8235-7911a65546e7","turnId":"0","step":2,"usage":{"inputOther":6105,"output":156,"inputCacheRead":10240,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5153,"llmStreamDurationMs":3275,"llmRequestBuildMs":1,"llmServerFirstTokenMs":5152,"llmServerDecodeMs":3271,"llmClientConsumeMs":4,"messageId":"chatcmpl-pVJhQyO8YqEt9TWr94KkCdab","traceId":"3efb33094b4e2f885697ec41ab173720"},"time":1784695884630}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":6105,"output":156,"inputCacheRead":10240,"inputCacheCreation":0},"usageScope":"turn","time":1784695884630}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1032075,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":9,"turnStep":"[redacted]","time":1784695884631}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"52786bd6-5ad9-41cb-a5b7-cd3c66a309b9","turnId":"0","step":3,"usage":{"inputOther":462,"output":129,"inputCacheRead":16128,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":6973,"llmStreamDurationMs":1461,"llmRequestBuildMs":0,"llmServerFirstTokenMs":6973,"llmServerDecodeMs":1461,"llmClientConsumeMs":0,"messageId":"chatcmpl-a4DS4IQ1xkhkTSWyU8UQ5925","traceId":"29ca83ed105696d02aad03d8f274a5f1"},"time":1784695893125}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":462,"output":129,"inputCacheRead":16128,"inputCacheCreation":0},"usageScope":"turn","time":1784695893125}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1031857,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":12,"turnStep":"[redacted]","time":1784695893127}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"601d4788-8d92-490e-9ecb-574fa8cbcb30","turnId":"0","step":4,"usage":{"inputOther":10369,"output":137,"inputCacheRead":16384,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5884,"llmStreamDurationMs":2708,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5884,"llmServerDecodeMs":2705,"llmClientConsumeMs":3,"messageId":"chatcmpl-Ebnn8fAYWvWUGwIfzb1U22jA","traceId":"1d672fda09f20892f80ee632dbb07fa3"},"time":1784695901756}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":10369,"output":137,"inputCacheRead":16384,"inputCacheCreation":0},"usageScope":"turn","time":1784695901756}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1021686,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":14,"turnStep":"[redacted]","time":1784695901757}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"801fd61a-ff80-4f7b-9ad7-a1b2c229bfcf","turnId":"0","step":5,"usage":{"inputOther":7583,"output":269,"inputCacheRead":26624,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5672,"llmStreamDurationMs":5032,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5672,"llmServerDecodeMs":5028,"llmClientConsumeMs":4,"messageId":"chatcmpl-OMr0oVleS07PB2sh2McnW40A","traceId":"2d7314d4175ea3806ec5e0b31535083a"},"time":1784695912632}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":7583,"output":269,"inputCacheRead":26624,"inputCacheCreation":0},"usageScope":"turn","time":1784695912632}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1014100,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":18,"turnStep":"[redacted]","time":1784695912634}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"02c00cfd-8619-4605-a0f9-6239b7418f90","turnId":"0","step":6,"usage":{"inputOther":10025,"output":263,"inputCacheRead":34048,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5483,"llmStreamDurationMs":5491,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5483,"llmServerDecodeMs":5490,"llmClientConsumeMs":1,"messageId":"chatcmpl-hBxAXUIIGNQFt9gjGmbrCIoJ","traceId":"2ac5bef80c2cc87e6fd65f62f35b95c3"},"time":1784695923753}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":10025,"output":263,"inputCacheRead":34048,"inputCacheCreation":0},"usageScope":"turn","time":1784695923753}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":1004240,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":22,"turnStep":"[redacted]","time":1784695923754}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"8bcdf670-8a5f-4197-98f6-92981730ceae","turnId":"0","step":7,"usage":{"inputOther":7149,"output":581,"inputCacheRead":44032,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5783,"llmStreamDurationMs":12933,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5783,"llmServerDecodeMs":12927,"llmClientConsumeMs":6,"messageId":"chatcmpl-FkamKls0cqWJuquJb2hXnGgh","traceId":"12081f2523c99411fe304b1ec037911c"},"time":1784695942907}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":7149,"output":581,"inputCacheRead":44032,"inputCacheCreation":0},"usageScope":"turn","time":1784695942907}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":996814,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":28,"turnStep":"[redacted]","time":1784695942909}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"0d8d741f-8647-41cf-9d18-77348a89a366","turnId":"0","step":8,"usage":{"inputOther":1726,"output":359,"inputCacheRead":50944,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5642,"llmStreamDurationMs":7712,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5642,"llmServerDecodeMs":7711,"llmClientConsumeMs":1,"messageId":"chatcmpl-xlAZH2Dly800kAOVpOOQPuqi","traceId":"3c70a5e0cab88732f02130539db68c54"},"time":1784695956433}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":1726,"output":359,"inputCacheRead":50944,"inputCacheCreation":0},"usageScope":"turn","time":1784695956434}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":995547,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":32,"turnStep":"[redacted]","time":1784695956435}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"5bea4d6f-4393-4d7a-a9a1-bf9b06c0ab03","turnId":"0","step":9,"usage":{"inputOther":1774,"output":470,"inputCacheRead":52480,"inputCacheCreation":0},"finishReason":"tool_use","llmFirstTokenLatencyMs":5767,"llmStreamDurationMs":11761,"llmRequestBuildMs":0,"llmServerFirstTokenMs":5767,"llmServerDecodeMs":11747,"llmClientConsumeMs":14,"messageId":"chatcmpl-2Dw6xtk3xbhlGAvfPXf2VxSc","traceId":"f742cdef485a4428fcae7931fa8d14d2"},"time":1784695974290}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":1774,"output":470,"inputCacheRead":52480,"inputCacheCreation":0},"usageScope":"turn","time":1784695974290}
|
||||
{"type":"llm.request","kind":"loop","provider":"kimi","model":"k3","modelAlias":"kimi-code/k3","thinkingEffort":"max","thinkingKeep":"all","maxTokens":993852,"toolSelect":false,"systemPromptHash":"592614e744c4f7503c473dc24589a20e9a808c9517a2764c7838781464c56037","toolsHash":"[redacted]","messageCount":35,"turnStep":"[redacted]","time":1784695974291}
|
||||
{"type":"context.append_loop_event","event":{"type":"step.end","uuid":"40ec8550-e049-4e26-a5a8-2b1bba5f4fc4","turnId":"0","step":10,"usage":{"inputOther":1349,"output":6563,"inputCacheRead":54016,"inputCacheCreation":0},"finishReason":"end_turn","llmFirstTokenLatencyMs":5677,"llmStreamDurationMs":150860,"llmRequestBuildMs":1,"llmServerFirstTokenMs":5676,"llmServerDecodeMs":150724,"llmClientConsumeMs":136,"messageId":"chatcmpl-WTLXnsVmhwiHSBPWZKNxnygw","traceId":"0106ca9b44c34a9beda4f1db1f55f991"},"time":1784696130829}
|
||||
{"type":"usage.record","model":"kimi-code/k3","usage":{"inputOther":1349,"output":6563,"inputCacheRead":54016,"inputCacheCreation":0},"usageScope":"turn","time":1784696130829}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"createdAt": "2026-07-22T04:48:58.143Z",
|
||||
"updatedAt": "2026-07-22T05:35:06.502Z",
|
||||
"title": "[redacted]",
|
||||
"isCustomTitle": false,
|
||||
"agents": {
|
||||
"main": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "main",
|
||||
"parentAgentId": null
|
||||
},
|
||||
"agent-0": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]"
|
||||
},
|
||||
"agent-1": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
},
|
||||
"agent-2": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
},
|
||||
"agent-3": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
},
|
||||
"agent-4": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
},
|
||||
"agent-5": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
},
|
||||
"agent-6": {
|
||||
"homedir": "[redacted]",
|
||||
"type": "sub",
|
||||
"parentAgentId": "[redacted]",
|
||||
"swarmItem": "[redacted]"
|
||||
}
|
||||
},
|
||||
"custom": {},
|
||||
"workDir": "[redacted]",
|
||||
"lastPrompt": "[redacted]"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1781503056907,"app_version":"[redacted]"}
|
||||
{"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.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.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.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.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.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.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":"turn.cancel","turnId":0,"time":1781503510015}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1781502566345,"app_version":"[redacted]"}
|
||||
{"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.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":"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.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.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.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.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.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.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.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_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.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.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.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.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.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.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.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.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.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.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_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":"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.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.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}
|
||||
+20
@@ -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]"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1783026547038,"app_version":"[redacted]"}
|
||||
+14
@@ -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": {}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"type":"metadata","protocol_version":"1.4","created_at":1772085117694}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"createdAt": "2026-02-26T05:51:57.694Z",
|
||||
"updatedAt": "2026-02-26T05:51:57.694Z",
|
||||
"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
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{"type":"metadata","protocol_version":"1.5","created_at":1786134177406}
|
||||
{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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}
|
||||
+19
@@ -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]"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{"type":"metadata","protocol_version":"1.5","created_at":1790830444486}
|
||||
{"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}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"enabled": false
|
||||
}
|
||||
+20
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user