kimi-code/packages/agent-core/test
Kai 7c889f3a96
fix(agent-core): mark auto-approved plan exits as not user-reviewed (#1638)
* fix(agent-core): mark auto-approved plan exits as not user-reviewed

In auto permission mode ExitPlanMode is approved without user
involvement, but its result read "## Approved Plan:" exactly like a
genuine user approval and the transcript showed a green "Approved"
chip. The model treated that as a signal to start executing, even
when the user had asked it to stop after planning.

- Emit an "auto-approved, not user-reviewed" result with a note that
  execution follows the user's original instructions (v1 + v2).
- Extend the auto-mode reminder: plan approvals are automatic and are
  not a user signal to proceed (v1 + v2).
- Render an "Auto-approved" warning-toned chip in the TUI, keeping
  backward compatibility with the old result marker.
- Document the Auto mode plan-exit behavior in interaction guides.

* fix(agent-core): only mark plan exits as auto-approved in auto permission mode

Address review feedback on the auto-approved plan exit change:

- Branch the direct-execution output on the permission mode in both
  engines: only auto mode yields the "auto-approved, not
  user-reviewed" result and telemetry outcome. In manual / yolo modes
  the direct path means a configured or session allow/ask rule let the
  call through — an explicit user decision that keeps the user-approved
  output, the Approved transcript chip, and the approved outcome.
- Move the v2 rationale out of the method body into the file header,
  per the agent-core-v2 comment convention.
- Drop the absolute "only Auto mode" wording from the interaction
  guides (en/zh).
2026-07-14 11:30:47 +08:00
..
agent fix(agent-core): mark auto-approved plan exits as not user-reviewed (#1638) 2026-07-14 11:30:47 +08:00
base/common feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
config feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
di feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
errors fix: render provider HTML error messages instead of blank lines (#1191) 2026-06-29 15:49:48 +08:00
fixtures refactor(kaos): move Environment into kaos, slim package API (#147) 2026-05-28 16:50:10 +08:00
flags fix: allow obsolete experimental config entries (#584) 2026-06-09 17:00:48 +08:00
harness feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
hooks test: cut slow suite runtimes and isolate experimental flag from host env (#1595) 2026-07-13 17:45:22 +08:00
logging fix(agent-core): route session logs exclusively to session sink (#102) 2026-05-27 13:00:17 +08:00
loop feat: harden LLM API fault tolerance against 429 and overload (#1530) 2026-07-10 15:47:12 +08:00
mcp test: cut slow suite runtimes and isolate experimental flag from host env (#1595) 2026-07-13 17:45:22 +08:00
plugin feat: support plugin slash commands (#1204) 2026-06-30 19:38:01 +08:00
profile fix(agent-core): harden goal-mode budget and outcome flow (#1456) 2026-07-07 15:23:57 +08:00
rpc fix(agent-core): scope [image] config limits to the owning core (#1521) 2026-07-09 20:55:52 +08:00
services fix: send the product User-Agent on provider registry and catalog fetches (#1597) 2026-07-13 17:45:34 +08:00
session test: cut slow suite runtimes and isolate experimental flag from host env (#1595) 2026-07-13 17:45:22 +08:00
skill ci: run unit tests on windows (#1037) 2026-06-26 11:56:41 +08:00
tools fix(agent-core): mark auto-approved plan exits as not user-reviewed (#1638) 2026-07-14 11:30:47 +08:00
utils feat(agent-core): progressive tool disclosure via select_tools (#1369) 2026-07-06 15:51:08 +08:00
prompt-placeholders.test.ts feat(agent-core): rework compaction to keep only user prompts and summary (#1214) 2026-07-01 01:17:30 +08:00