kimi-code/packages
7Sageer c27a9f93a6
Some checks are pending
CI / typecheck (push) Waiting to run
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-windows (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
feat(agent-core-v2): add AGENTS.md discovery reminder (#2545)
* feat(agent-core-v2): add AGENTS.md discovery reminder behind experimental flag

When a tool call touches a directory whose AGENTS.md was not part of the
injected instructions (the init-time load only covers the project-root to
cwd chain), append a system reminder to the tool result suggesting the
model read it, at most once per file per agent.

The new agentsMdReminder domain (Agent scope, gated by the
agents-md-reminder experimental flag, default off) hooks
toolExecutor.onDidExecuteTool: Read/Edit/Write contribute their path,
Glob/Grep their search root, and Bash its structured cwd plus literal
directory operands extracted from the command's syntax tree via the
in-repo bash parser (listing commands only, bare names, conservative
skips). Probing walks projectRoot to the touched dir with the same
candidate rules as the init-time load (shared helpers in
profile/context), skipping fully-known directories and blank files.
The known-set is seeded by profileService after each successful
bind/apply/refresh and by sessionInit after /init, claimed
synchronously per discovered file, and published as a whole value only
after the reminder is attached, so parallel calls never duplicate a
reminder and failures leave files eligible for the next touch.

* fix(agent-core-v2): keep the AGENTS.md reminder on visible results and seed restored agents

A same-step duplicate vetoed by toolDedupe carries a placeholder result
that the dedupe hook swaps for the original's deferred result; attaching
the reminder there discarded it while the file was already counted as
reminded, and the telemetry still claimed it was shown. Skip the
placeholder (the call id sits in toolDedupe.syntheticCallIds until the
dedupe hook consumes it) so the reminder, telemetry, and known-set only
advance on results that reach the model; the original call then carries
the reminder for both by the time the deferred resolves.

Session resume and forks commit an already-rendered system prompt
(AGENTS.md content included) without going through bind/apply/refresh,
so no seed point fired and the known-set lagged behind the injected
set, producing false "not part of the injected instructions"
reminders. The first qualifying call of a never-seeded agent now
re-runs the init-time discovery with the same inputs (agent cwd, os
home, brand home) and seeds from it, once per agent; a discovery
failure leaves the agent unseeded so the next touch retries.

* refactor(agent-core-v2): fold agentsMdReminder inline rationale into file headers

The package comment convention keeps rationale in the top-of-file block
only; move the inline blocks' unique increments there (hook-order
fallback mechanics, synthetic-key existence condition, frozen-vs-live
Bash base, operand-less vs failed-resolution listings) and derive
AGENTS_MD_BASENAMES from AGENTS_MD_PLAIN_NAMES so the candidate names
stay single-sourced.

* fix(agent-core-v2): use resolved accesses for AGENTS reminders

* feat(agent-core-v2): drop the agentsMdReminder experimental gate

* fix(agent-core-v2): harden AGENTS reminder tool outcomes

* fix(agent-core-v2): preserve actual tool execution outcomes

* Persist AGENTS.md paths across profile restoration

* test(agent-core-v2): update useProfile snapshot for agentsMdPaths
2026-08-03 22:02:01 +08:00
..
acp-adapter feat(agent-core-v2): introduce the Workspace domain and the agent-profile registry extension point (#2366) 2026-07-31 00:38:11 +08:00
agent-core fix(agent-core): replay v2 profile.bind records so resumed sessions keep their tools (#2567) 2026-08-03 20:59:46 +08:00
agent-core-v2 feat(agent-core-v2): add AGENTS.md discovery reminder (#2545) 2026-08-03 22:02:01 +08:00
kaos chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
kap-server feat(config): add deprecation mechanism and rename loop retry limit (#2572) 2026-08-03 20:17:01 +08:00
klient feat(config): add deprecation mechanism and rename loop retry limit (#2572) 2026-08-03 20:17:01 +08:00
kosong Revert "fix(kosong): match Kimi's standalone "Unsupported image." rejection (…" (#2368) 2026-07-29 20:56:41 +08:00
migration-legacy ci: release packages (#1767) 2026-07-16 18:54:29 +08:00
minidb feat(kap-server): add session-less POST /workspace/fs:search route (#2437) 2026-07-31 12:11:26 +08:00
node-sdk feat(agent-core-v2): add lifecycle hook events and enrich hook payloads (#2558) 2026-08-03 17:14:34 +08:00
oauth feat(kap-server): expose the managed-account profile at GET /oauth/userinfo (#2363) 2026-07-30 15:05:55 +08:00
pi-tui ci: release packages (#1989) 2026-07-22 17:24:39 +08:00
protocol refactor(agent-core-v2): code all domain failure modes as Error2 (#2552) 2026-08-03 15:31:57 +08:00
telemetry fix: close two silent-exit vectors around unhandled rejections (#1758) 2026-07-16 02:14:14 +08:00
transcript feat(agent-core-v2): interruption reminder for user-cancelled turns (#2400) 2026-07-31 18:17:14 +08:00
tree-sitter-bash feat(tree-sitter-bash): add a pure-TypeScript bash parser and an agent-core-v2 bashParser service (#2016) 2026-07-28 14:29:08 +08:00