kimi-code/packages/agent-core/test/agent
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
..
background feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
compaction feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
config feat: add model alias overrides (#1262) 2026-07-01 19:57:13 +08:00
context feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
cron feat(cli): keep kimi -p running while a goal is active or cron tasks are pending (#1555) 2026-07-11 21:16:27 +08:00
harness refactor(kosong): rename select_tools capability to dynamically_loaded_tools (#1488) 2026-07-10 22:12:54 +08:00
injection fix: clarify goal blocked audit guidance (#1481) 2026-07-07 22:29:40 +08:00
permission feat(goal): support guided goal authoring (#839) 2026-06-18 18:48:23 +08:00
records refactor: move tool-result metadata into a structured note side channel (#1437) 2026-07-07 11:40:27 +08:00
turn fix: rewrite repeated tool call reminders to redirect instead of prohibit (#1518) 2026-07-09 17:06:19 +08:00
basic.test.ts feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
bg-idle-notification-repro.test.ts fix: preserve long tool output (#1062) 2026-06-24 14:42:11 +08:00
config-state.test.ts fix: resume sessions with missing workdir (#1517) 2026-07-09 16:46:57 +08:00
config.test.ts feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
context.test.ts refactor: move tool-result metadata into a structured note side channel (#1437) 2026-07-07 11:40:27 +08:00
dynamic-tools.test.ts feat(agent-core): progressive tool disclosure via select_tools (#1369) 2026-07-06 15:51:08 +08:00
goal-outcome.test.ts fix: polish goal lifecycle messaging (#555) 2026-06-09 11:47:00 +08:00
goal.test.ts fix(agent-core): harden goal-mode budget and outcome flow (#1456) 2026-07-07 15:23:57 +08:00
image-caption-injection.test.ts fix(agent-core): route image-compression captions through hidden system reminders (#1348) 2026-07-03 16:21:10 +08:00
kosong-llm.test.ts feat: record model response id in wire logs (#1349) 2026-07-03 17:15:04 +08:00
llm-request-recorder.test.ts feat(agent-core): record llm request trace in wire.jsonl (#1448) 2026-07-07 14:09:19 +08:00
permission.test.ts fix(agent-core): mark auto-approved plan exits as not user-reviewed (#1638) 2026-07-14 11:30:47 +08:00
plan.test.ts feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
question.test.ts feat(agent-core): ModelProvider interface and SingleModelProvider (#167) 2026-05-28 22:27:09 +08:00
resume.test.ts refactor: move tool-result metadata into a structured note side channel (#1437) 2026-07-07 11:40:27 +08:00
skill-prompt.test.ts fix: surface skill directory in the loaded-skill context block (#785) 2026-06-15 22:29:00 +08:00
skill-tool-manager.test.ts fix: surface skill directory in the loaded-skill context block (#785) 2026-06-15 22:29:00 +08:00
tool-result-render.test.ts refactor: move tool-result metadata into a structured note side channel (#1437) 2026-07-07 11:40:27 +08:00
tool-select.e2e.test.ts refactor(kosong): rename select_tools capability to dynamically_loaded_tools (#1488) 2026-07-10 22:12:54 +08:00
tool.test.ts fix(agent-core): mark auto-approved plan exits as not user-reviewed (#1638) 2026-07-14 11:30:47 +08:00
turn.test.ts feat: auto-background timed-out foreground bash commands (#1591) 2026-07-13 21:08:21 +08:00
usage.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00