kimi-code/packages/kap-server
qer eba23edb93
feat(agent-core-v2): drop the experimental gate from turn-level file history (#3525)
* feat(agent-core-v2): drop the experimental gate from turn-level file history

The file_history flag and its KIMI_CODE_EXPERIMENTAL_FILE_HISTORY env
var are removed; first-touch baselines, turn checkpoints, and the
changes/turnRecorded/contentAt reads now run unconditionally, so the
per-turn file diffs served by kap-server no longer depend on opt-in
configuration.

The changes REST response drops its enabled field — recorded alone
tells an authoritative empty result apart from a turn whose records
were never made, lost to a crash, or displaced by retention.

* fix(agent-core-v2): probe blob existence with a stat, not a directory listing

turnRecorded always answered false for turns whose snapshots lived under
the file-history/ prefix directory: BlobStoreService.has listed the
scope directory (a shallow readdir) and exact-matched the nested key
against top-level entries, so keyed blobs were never found and the
changes endpoint reported recorded=false for exactly the turns that had
edits. Stat the key through storage.size instead, and pin the
turn-recorded assertions against a real node-fs home so the harness
covers the production layout.

* fix(agent-core-v2): probe every keyed blob before calling a turn recorded

Merging the start and end entries let an end entry with key null (a
deleted or oversize-at-end file) shadow the start baseline, and probing
only one surviving key missed partial loss in the other phase: a
session displaced from the thirty-session window could still claim
authority for turns whose snapshots were gone. turnRecorded now stats
every distinct keyed blob across both checkpoints and reports the turn
unrecorded when any is missing.
2026-09-04 15:57:59 +08:00
..
src feat(agent-core-v2): drop the experimental gate from turn-level file history (#3525) 2026-09-04 15:57:59 +08:00
test feat(agent-core-v2): drop the experimental gate from turn-level file history (#3525) 2026-09-04 15:57:59 +08:00
CHANGELOG.md ci: release packages (#3140) 2026-08-27 19:33:51 +08:00
package.json test: speed up kap-server suite and exclude minidb from default projects (#3504) 2026-09-03 14:32:28 +08:00
tsconfig.dev.json feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
tsconfig.json feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
tsdown.config.ts feat(kap-server): add provider write endpoints and models.dev/registry import (#2110) 2026-07-24 14:00:16 +08:00
vitest.bench.config.ts test: speed up kap-server suite and exclude minidb from default projects (#3504) 2026-09-03 14:32:28 +08:00
vitest.config.ts test: speed up kap-server suite and exclude minidb from default projects (#3504) 2026-09-03 14:32:28 +08:00