Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
612 commits
Select commit Hold shift + click to select a range
0e286cb
fix(agent-core-v2): anchor plan path to workDir when profile cwd is e…
sailist Jul 7, 2026
8706bed
fix(kap-server): restore session lifecycle broadcasts
sailist Jul 7, 2026
5b57a32
feat(cli): run kimi -p on agent-core-v2 behind experimental flag
sailist Jul 7, 2026
79ffb7b
chore: fix lint issues across packages
sailist Jul 7, 2026
c7ea60a
fix(kap-server): buffer and coalesce outbound ws deltas
sailist Jul 8, 2026
b71cf5e
feat(status): restore consistent session status context window
sailist Jul 8, 2026
f054fe9
feat(kap-server): log envelope code instead of HTTP status
sailist Jul 8, 2026
07f3460
fix(nix): update pnpmDeps hash
sailist Jul 8, 2026
a8b83e9
chore: reference @moonshot-ai/kap-server in v2 changesets
sailist Jul 8, 2026
40f871f
chore: remove unused permission rules hooks
kermanx Jul 8, 2026
bc04379
fix(agent-core-v2): inherit caller permission mode for subagents
kermanx Jul 8, 2026
2c4e99e
fix: align v2 grep behavior with v1
kermanx Jul 8, 2026
d3c101e
fix(kap-server): serve full wire transcript in snapshot and messages
sailist Jul 8, 2026
5c33f54
fix(server): cold-load persisted sessions for v1 session commands
sailist Jul 8, 2026
202556e
fix: avoid record empty usage
kermanx Jul 8, 2026
bc84b2e
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
d5e1d76
fix(agent-core-v2): align v1.4 wire parity
7Sageer Jul 8, 2026
f362ef3
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
19f90df
feat(agent-core): track agent live phase in a single runtime model field
sailist Jul 8, 2026
0cb2648
fix(agent-core-v2): align plan mode guidance with v1
7Sageer Jul 8, 2026
e204e88
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
69df799
fix(agent-core-v2): preserve swarm metadata compatibility
kermanx Jul 8, 2026
9dd8ab3
fix(agent-core-v2): restore glob rg bootstrap
kermanx Jul 8, 2026
5a256ac
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
8a9277a
fix(agent-core-v2): align task tool behavior
kermanx Jul 8, 2026
4658f23
fix: align v2 glob behavior with v1
kermanx Jul 8, 2026
2ebaf72
feat(cli): emit version first in experimental v2 prompt mode
sailist Jul 8, 2026
536757b
fix(agent-core): report EXIF-rotated image dimensions and raise edge …
RealKai42 Jul 7, 2026
7418427
fix: count goal creation turn (#1477)
chengluyu Jul 7, 2026
13c915c
feat(kosong): support structured response formats (#1397)
kermanx Jul 7, 2026
f2a8c30
fix: clarify goal blocked audit guidance (#1481)
chengluyu Jul 7, 2026
74cee9b
feat(agent-core): discard loaded tool schemas on compaction (#1471)
starquakee Jul 7, 2026
ca09e31
fix(kimi-code): exit 1 when a headless (-p) turn fails (#1483)
wbxl2000 Jul 7, 2026
c40362e
feat(plugins): add Vercel plugin to marketplace (#1489)
wbxl2000 Jul 8, 2026
27b0237
feat(web): support Enter key to confirm archive and other dialogs (#1…
wbxl2000 Jul 8, 2026
bec7319
feat(web): redesign cron reminder as a message bubble (#1480)
liruifengv Jul 8, 2026
e9369ce
fix(web): composer model switch also updates global default model (#1…
wbxl2000 Jul 8, 2026
2632ab4
chore: copy v1 grep baseline into v2
kermanx Jul 8, 2026
d3242db
fix: adapt grep tool to agent-core-v2
kermanx Jul 8, 2026
dbccb1c
fix(agent-core-v2): enrich PATH from the user's login shell at startup
sailist Jul 8, 2026
c7746dc
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
e70d7db
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
ca87296
fix(agent-core-v2): prefer persisted cwd on resume
7Sageer Jul 8, 2026
6cf6117
feat(agent-core-v2): support structured response formats
kermanx Jul 8, 2026
b2c8033
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
5eef0a6
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
e39cebd
fix: restore v2 grep telemetry and tests
kermanx Jul 8, 2026
94b9439
fix: preserve v2 compaction boundary
kermanx Jul 8, 2026
d082afb
fix(agent-core-v2): align agent and swarm tool behavior
kermanx Jul 8, 2026
fdb65be
feat(ws-v1): add per-agent event subscription filter
sailist Jul 8, 2026
0a8fcea
feat(web): prefix skill slash commands with skill: to distinguish the…
wbxl2000 Jul 8, 2026
8e00de7
ci: release packages (#1468)
github-actions[bot] Jul 8, 2026
bf886de
docs(changelog): sync 0.23.2 from apps/kimi-code/CHANGELOG.md (#1496)
wbxl2000 Jul 8, 2026
d966865
chore: add changeset for agent swarm parity
kermanx Jul 8, 2026
f5a63cc
fix: align v2 compaction prompt
kermanx Jul 8, 2026
b676635
fix: recover v2 compaction from plain 413
kermanx Jul 8, 2026
c34eeb7
fix: report v2 compaction retry telemetry
kermanx Jul 8, 2026
b9362cc
fix: align MCP discovery and output with v1
7Sageer Jul 8, 2026
e3fb6d2
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
ca237a0
fix: align v2 compaction auth guards
kermanx Jul 8, 2026
d1a275d
fix: align v2 grep behavior with v1
kermanx Jul 8, 2026
d1c70e5
chore: remove agent swarm changeset
kermanx Jul 8, 2026
65ad6ab
fix(agent-core-v2): restore task resume parity
kermanx Jul 8, 2026
8bd9dcd
feat(agent-core-v2): record llm request traces
7Sageer Jul 8, 2026
4977ccb
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
0dfc99d
fix(agent-core-v2): align AskUserQuestion tool chain with v1
RealKai42 Jul 8, 2026
5c07618
fix(agent-core-v2): preserve compaction hook session
kermanx Jul 8, 2026
f3adee7
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
31d8ade
test(agent-core-v2): cover concurrent agent background limit
kermanx Jul 8, 2026
e9b34ad
fix(agent-core): report EXIF-rotated image dimensions and raise edge …
RealKai42 Jul 7, 2026
a7a4a1d
fix: count goal creation turn (#1477)
chengluyu Jul 7, 2026
42d648e
feat(kosong): support structured response formats (#1397)
kermanx Jul 7, 2026
5c760be
fix: clarify goal blocked audit guidance (#1481)
chengluyu Jul 7, 2026
11cdf2e
feat(agent-core): discard loaded tool schemas on compaction (#1471)
starquakee Jul 7, 2026
58d923f
fix(kimi-code): exit 1 when a headless (-p) turn fails (#1483)
wbxl2000 Jul 7, 2026
a26f00e
feat(plugins): add Vercel plugin to marketplace (#1489)
wbxl2000 Jul 8, 2026
597b227
feat(web): support Enter key to confirm archive and other dialogs (#1…
wbxl2000 Jul 8, 2026
4f1f603
feat(web): redesign cron reminder as a message bubble (#1480)
liruifengv Jul 8, 2026
839715f
fix(web): composer model switch also updates global default model (#1…
wbxl2000 Jul 8, 2026
fbedbcd
feat(web): prefix skill slash commands with skill: to distinguish the…
wbxl2000 Jul 8, 2026
989ca43
ci: release packages (#1468)
github-actions[bot] Jul 8, 2026
c6b6c30
fix(agent-core-v2): restore native append for Write append mode
sailist Jul 8, 2026
6113184
fix(agent-core-v2): align task tool prompts with v1
kermanx Jul 8, 2026
b1cdaf4
fix(agent-core-v2): align compaction empty retry
kermanx Jul 8, 2026
3272e22
fix(agent-core-v2): restore web search source site and citation remin…
sailist Jul 8, 2026
d11d9b8
fix(agent-core-v2): route task timeouts through SIGTERM grace + SIGKILL
sailist Jul 8, 2026
dd162c7
fix(agent-core-v2): restore fs.grep streaming early-kill and symlink …
sailist Jul 8, 2026
c91c03d
test(agent-core-v2): align truncated compaction retry
kermanx Jul 8, 2026
a6b05b2
fix(agent-core-v2): align MCP tool results with v1
7Sageer Jul 8, 2026
e6d3b37
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
ad38fd1
fix(agent-core-v2): align blocked compaction failures
kermanx Jul 8, 2026
9b00e79
fix(agent-core-v2): align manual compaction tool projection
kermanx Jul 8, 2026
157704b
fix(agent-core-v2): preserve tail in windowed compaction
kermanx Jul 8, 2026
de8a489
fix(agent-core-v2): read todos from wire model, sanitize replay
sailist Jul 8, 2026
a3f738d
fix(agent-core-v2): port v1 Bash tool output cap, saved-output refere…
RealKai42 Jul 8, 2026
f6aa8a8
fix: align v2 task observable behavior
kermanx Jul 8, 2026
d0af37b
fix: v2 full compaction
kermanx Jul 8, 2026
3bbb8b6
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
1be4e0b
fix(agent-core-v2): align task wait timeout behavior
kermanx Jul 8, 2026
6bdad13
chore: webSearch & FetchUrl Sync #1260
wbxl2000 Jul 8, 2026
8072f6e
fix: align background agent guidance
kermanx Jul 8, 2026
3ea9f84
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
a8a134f
fix(agent-core-v2): align full compaction with v1
kermanx Jul 8, 2026
e5ec0fb
fix(agent-core-v2): align v1 wire records
7Sageer Jul 8, 2026
68e07c9
fix(agent-core-v2): remember observed compaction context window
kermanx Jul 8, 2026
214def9
fix(agent-core-v2): use domain errors for wire replay conflicts
7Sageer Jul 8, 2026
b619c18
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
7Sageer Jul 8, 2026
c9d2469
fix: align Agent / AgentSwarm
kermanx Jul 8, 2026
f16cffd
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
44e922b
fix(agent-core-v2): port v1 parity fixes for hooks, anthropic, thinki…
liruifengv Jul 8, 2026
dd9a2fa
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 8, 2026
7b003d8
fix(agent-core-v2): align full compaction observability
kermanx Jul 8, 2026
a47ad20
fix(agent-core-v2): remove compact hook trigger state
kermanx Jul 8, 2026
d659cec
feat(agent-core-v2): enhance agent lifecycle with context size tracki…
kermanx Jul 8, 2026
55b206d
fix(agent-core-v2): align media reads with v1 note channel and EXIF h…
RealKai42 Jul 8, 2026
248b30e
refactor(agent-core-v2): remove the microCompaction domain
sailist Jul 8, 2026
2a822ab
fix(contextProjector): surface projection repairs via log warning
sailist Jul 8, 2026
295950f
fix(agent-core-v2): fix cron killswitch, lost deliveries, id clashes
sailist Jul 8, 2026
84b2989
feat(fs-watch): add workspace fs watch with v1-compatible WS delivery
sailist Jul 8, 2026
7fdddbb
refactor(agent-core-v2): run external hooks through IHostProcessService
sailist Jul 8, 2026
3678dad
fix(agent-core-v2): strict-decode Edit reads, align with v1
sailist Jul 8, 2026
221e5da
fix(agent-core-v2): dedupe AgentMeta legacy field declarations
7Sageer Jul 8, 2026
ad9cf87
refactor(agent-core-v2): persist wire records natively in the v1 voca…
7Sageer Jul 8, 2026
5355756
refactor(agent-core-v2): move ReadTool status block to note side channel
sailist Jul 9, 2026
667898b
refactor(agent-core-v2): split blob service helpers, rewrite tests
sailist Jul 9, 2026
ec9dae7
fix: make release-e2e scenarios pass under agent-core-v2
7Sageer Jul 9, 2026
c377ab2
refactor(agent-core-v2): drop replay-only wire ops
7Sageer Jul 9, 2026
193d441
Revert "fix: make release-e2e scenarios pass under agent-core-v2"
7Sageer Jul 9, 2026
f397a3c
fix(agent-core-v2): use a fresh TextDecoder per append-log read
wbxl2000 Jul 9, 2026
d13d92c
fix(agent-core-v2): register KIMI_MODEL env overlay statically
7Sageer Jul 9, 2026
87b3e3b
docs(agent-core-v2): clarify live-only op semantics
7Sageer Jul 9, 2026
c724a74
fix(agent-core-v2): preserve oversized tool results
kermanx Jul 9, 2026
2e8d75b
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
d98d151
chore: remove full compaction complete data type
kermanx Jul 9, 2026
1f530d4
fix(agent-core-v2): align foreground output cap
kermanx Jul 9, 2026
1462623
fix(agent-core-v2): gate skill prompt injection
kermanx Jul 9, 2026
f85dbdb
chore(skills): bundle review and test lenses into kc-review
sailist Jul 9, 2026
536c4c0
feat(v2): auto-mint session ids and harden print-mode background drain
sailist Jul 9, 2026
b159946
fix(agent-core-v2): refresh system prompt after compaction
kermanx Jul 9, 2026
dcb58b7
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
1f4dfce
docs(agent-core-review): limit kc-review skill to agent-core-v2
sailist Jul 9, 2026
3635b4c
fix(agent-core-v2): align model-facing prompts
kermanx Jul 9, 2026
0829601
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
238f774
fix(agent-core): report EXIF-rotated image dimensions and raise edge …
RealKai42 Jul 7, 2026
65e46a2
fix: count goal creation turn (#1477)
chengluyu Jul 7, 2026
c920c2e
feat(kosong): support structured response formats (#1397)
kermanx Jul 7, 2026
58b81ed
fix: clarify goal blocked audit guidance (#1481)
chengluyu Jul 7, 2026
528e224
feat(agent-core): discard loaded tool schemas on compaction (#1471)
starquakee Jul 7, 2026
89f09b5
fix(kimi-code): exit 1 when a headless (-p) turn fails (#1483)
wbxl2000 Jul 7, 2026
4683710
feat(plugins): add Vercel plugin to marketplace (#1489)
wbxl2000 Jul 8, 2026
90642aa
feat(web): support Enter key to confirm archive and other dialogs (#1…
wbxl2000 Jul 8, 2026
e954b36
feat(web): redesign cron reminder as a message bubble (#1480)
liruifengv Jul 8, 2026
3b1896d
fix(web): composer model switch also updates global default model (#1…
wbxl2000 Jul 8, 2026
066f54a
feat(web): prefix skill slash commands with skill: to distinguish the…
wbxl2000 Jul 8, 2026
f6f0ddd
ci: release packages (#1468)
github-actions[bot] Jul 8, 2026
760b922
fix: surface provider auth error for unavailable models (#1506)
7Sageer Jul 8, 2026
ebb3c8f
ci: release packages (#1507)
github-actions[bot] Jul 8, 2026
4d60160
docs(changelog): sync 0.23.3 and shorten OAuth error entry (#1509)
liruifengv Jul 8, 2026
79a4125
feat(kimi-web): add status-aware browser notifications (#1479)
liruifengv Jul 9, 2026
d0f969b
fix(agent-core-v2): serialize concurrent model catalog refreshes
kermanx Jul 9, 2026
7c094d8
fix(agent-core-v2): dedupe workspace registry entries by root
kermanx Jul 9, 2026
a2cb30b
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
d69ed4b
fix(agent-core-v2): apply KIMI_CODE_CUSTOM_HEADERS and host identity …
kermanx Jul 9, 2026
bf976f4
chore(agent-core-review): rename skill from kc-review to agent-core-r…
sailist Jul 9, 2026
b51d775
feat(kap-server): surface originating stack trace on error envelopes
sailist Jul 9, 2026
65f5d24
fix: align v2 media and task compaction handling
kermanx Jul 9, 2026
dabf807
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
2f48932
feat(agent-core-v2): sync shell mode and skill config parity (#1514)
liruifengv Jul 9, 2026
951c15d
fix(agent-core-v2): align goal budget handling
kermanx Jul 9, 2026
6ad2edc
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
2e2ca03
fix(agent-core-v2): forbid model goal pauses
kermanx Jul 9, 2026
3e8fca3
fix(agent-core-v2): cap detached process output
kermanx Jul 9, 2026
0235e0f
fix(kimi-code): drain v2 print subagents before exit
kermanx Jul 9, 2026
acfa0d2
fix: restore kap-server video upload compatibility
kermanx Jul 9, 2026
ac2fab9
fix(agent-core-v2): charge only output tokens against goal token budgets
chengluyu Jul 9, 2026
fc1d04e
fix: align server-v2 media file handling
kermanx Jul 9, 2026
35cd4a0
feat(agent-core-v2): allow coder profile to use MCP tools
sailist Jul 9, 2026
e778954
refactor(agent-core): introduce activity kernel and migrate turn lane
sailist Jul 9, 2026
f215b8f
refactor(sessionLegacy): remove fork/compact/abort/archive pass-throughs
sailist Jul 9, 2026
7c18025
refactor(cli): run print-mode v2 on native agent-core-v2 services
sailist Jul 9, 2026
c278cbb
refactor(session): serve v1 undo and children via native v2 services
sailist Jul 9, 2026
ec50813
refactor(cli): drop v1 sdk and telemetry deps from v2 print
sailist Jul 9, 2026
1a7d5b6
feat(activity): add session lane machine and agent snapshot projector
sailist Jul 9, 2026
5dd87ea
fix(agent-core-v2): truncate over-long goal completion criteria
chengluyu Jul 9, 2026
e44d181
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
8c73bc6
fix(agent-core-v2): add goal error catalog info metadata
chengluyu Jul 9, 2026
a729657
Merge remote-tracking branch 'origin/main' into kimi-code-v2
sailist Jul 9, 2026
b3d8e2c
Merge remote-tracking branch 'origin/kimi-code-v2' into kimi-code-v2
sailist Jul 9, 2026
5726366
Merge remote-tracking branch 'origin/main' into kimi-code-v2
sailist Jul 9, 2026
14346b1
chore(nix): update pnpm deps hash
sailist Jul 9, 2026
3aac2b5
fix(agent-core-v2): retain queued steers when a turn ends cancelled o…
chengluyu Jul 9, 2026
d2985e1
fix(agent-core-v2): remove ask-user background mode
kermanx Jul 9, 2026
f91b34d
fix(kap-server): align archived session restore
kermanx Jul 9, 2026
8d2cfd1
chore(lint): fix type-aware lint errors
sailist Jul 9, 2026
a3df053
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
e9f4096
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 9, 2026
643e585
chore(agent-core-v2): drop stray doResume debug log
sailist Jul 9, 2026
9261ef3
fix(agent-core-v2): defer prompts and steers while a full compaction …
chengluyu Jul 9, 2026
bbc0030
fix(agent-core-v2): re-inject the goal reminder after full compaction
chengluyu Jul 9, 2026
a6ca138
test(agent-core-v2): cover goal pause classification for provider errors
chengluyu Jul 9, 2026
9f1827e
feat: add progressive tool disclosure
7Sageer Jul 9, 2026
ecf105e
feat(cli): gate print-mode v2 behind KIMI_MODEL_EXPERIMENT_FLAG
sailist Jul 10, 2026
f0ad730
feat(cli): add KIMI_MODEL_OUTPUT_FORMAT for print-mode default
sailist Jul 10, 2026
8ec9515
fix(agent-core-v2): count the goal-creating turn as the first goal turn
chengluyu Jul 9, 2026
2fb3a35
fix(agent-core-v2): remove model-initiated paused status from UpdateGoal
chengluyu Jul 9, 2026
e468ee3
fix(agent-core-v2): deliver goal outcome prompts through the UpdateGo…
chengluyu Jul 9, 2026
2d10b3e
fix(agent-core-v2): fail UpdateGoal as a tool error when no goal matches
chengluyu Jul 9, 2026
76edf15
fix(agent-core-v2): settle active goals when the continuation relaunc…
chengluyu Jul 9, 2026
76aa56f
fix(agent-core-v2): restore the fork-cleared goal system reminder
chengluyu Jul 9, 2026
7bba5f4
fix(agent-core-v2): preserve turn result details (#1531)
kermanx Jul 10, 2026
a757742
feat(agent-core-v2): align defaultProvider fallback and clear-on-delete
sailist Jul 10, 2026
e3c5137
feat(agent-core-v2): synthesize legacy prompt lifecycle events
sailist Jul 10, 2026
e99e64d
chore(agent-core-v2): align cron and skill prompts with agent-core
kermanx Jul 10, 2026
517aeb5
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 10, 2026
5cc8e52
chore(agent-core-v2): drop legacy 8-hex mention from cron prompts
kermanx Jul 10, 2026
f8ebe5b
chore(agent-core-v2): reorganize tests to mirror src layout
kermanx Jul 10, 2026
3034a18
feat(config): add default permission/plan mode and yolo alias
sailist Jul 10, 2026
9bdd456
feat(agent-core-v2): add background mode to AskUserQuestion
kermanx Jul 10, 2026
ff14e51
fix(agent-core-v2): synthesize default baseUrl for env-model provider
kermanx Jul 10, 2026
d9e411f
fix(agent-core-v2): restore UpdateGoal completion/blocked prompts and…
kermanx Jul 10, 2026
9dd100c
feat(agent-core-v2): add [image] config section for image compression
sailist Jul 10, 2026
8ce1400
Resolve goal mode's parity
chengluyu Jul 10, 2026
ac7eb6c
fix(agent-core-v2): align image compression defaults with v1 (#1508)
kermanx Jul 10, 2026
13c502b
fix(agent-core-v2): restore HEIC/HEIF conversion guidance in ReadMedi…
kermanx Jul 10, 2026
f1b1e25
feat(agent-core-v2): wire startBtw into the agent RPC API
kermanx Jul 10, 2026
4e7cde2
chore(agent-core-v2): tidy misplaced and throwaway test files
kermanx Jul 10, 2026
8eba63d
fix(agent-core-v2): restore JSON Schema format validation in tool-args
kermanx Jul 10, 2026
4bc65ed
fix(agent-core-v2): restore JSON Schema format validation in tool-args
kermanx Jul 10, 2026
03418e8
chore(agent-core-v2): drop legacy 8-hex mention from CronDelete/CronL…
kermanx Jul 10, 2026
5233665
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 10, 2026
8968167
Merge origin/kimi-code-v2 into goal parity
chengluyu Jul 10, 2026
2e8f22a
Merge origin/kimi-code-v2 (JSON schema validation, cron/test tidy)
chengluyu Jul 10, 2026
5f28312
Merge remote-tracking branch 'origin/kimi-code-v2' into kimi-code-v2
sailist Jul 10, 2026
6de716f
Merge remote-tracking branch 'origin/kimi-code-v2' into kimi-code-v2
sailist Jul 10, 2026
5c65388
chore(agent-core-v2): remove resume-roundtrip test
kermanx Jul 10, 2026
58dda3d
test(agent-core-v2): raise timeout for slow image-compress invariant …
kermanx Jul 10, 2026
8124bf0
chore(agent-core-v2): rename ambiguous test files
kermanx Jul 10, 2026
5c353b2
fix(agent-core-v2): preserve usage for aborted steps
kermanx Jul 10, 2026
f0e671f
fix(agent-core-v2): resume-safe session reads and in-memory transcript
sailist Jul 10, 2026
2a7e137
chore(agent-core-v2): drop stale micro-compaction references in comments
kermanx Jul 10, 2026
cb00b38
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 10, 2026
f93b69d
fix(agent-core-v2): report skill discovery diagnostics
7Sageer Jul 10, 2026
cde9263
test(agent-core-v2): align plan mode parity fixtures
kermanx Jul 10, 2026
8e584ee
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 10, 2026
c8ac129
fix: distinguish task output timeout from cancellation
kermanx Jul 10, 2026
60b6b94
chore: fix test name
kermanx Jul 10, 2026
bfbd7cb
fix(agent-core-v2): flush the wire persist queue before the record log
chengluyu Jul 10, 2026
5d3b395
test(agent-core-v2): align the goal reminder boundary test with the c…
chengluyu Jul 10, 2026
184a52f
fix(agent-core-v2): stop goal turns gracefully when a hard budget is …
chengluyu Jul 10, 2026
2975437
Merge remote-tracking branch 'origin/kimi-code-v2' into kimi-code-v2
chengluyu Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 69 additions & 0 deletions .agents/skills/agent-core-dev/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: agent-core-dev
description: Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI dependencies, splitting a domain across scopes, owning or migrating a config section, gating behavior behind an experimental flag, raising coded errors, working on the permission system, writing DI/Scope tests, porting business logic from agent-core (v1) to v2, or exposing a v2 domain over server-v2 while keeping the wire contract compatible with packages/server. Self-contained guide organized by development stage (orient → design → implement → test → verify) plus align workflows for v1→v2 migration and server-v2 wire exposure; each file carries the rules, examples, and red lines for its step.
---

# agent-core-dev

> Develop `packages/agent-core-v2` by lifecycle stage. This skill is **self-contained**: every rule, recipe, and red line lives in the stage files below — it does not delegate to `packages/agent-core-v2/docs/`.

`agent-core-v2` is the new agent engine built on the **DI × Scope** architecture (a port of `packages/agent-core`). Everything resolves through the container: a service declares an **identity**, its **dependencies**, and a **lifetime**; the container decides construction, singleton-per-scope, ordering, and disposal. The stage files restate the rules in imperative form so you can work without reading the source docs.

## Lifecycle at a glance

```text
Orient → Design → Implement → Test → Verify
│ │ │ │ │
│ │ │ │ └─ lint:domain · typecheck · test · dep graph · red lines
│ │ │ └─ test.md
│ │ └─ implement.md (+ errors.md · flags.md · permission.md)
│ └─ design.md
└─ orient.md
```

Stages are ordered but not strictly linear: a test failure (stage 4) that reveals a wrong scope sends you back to design (stage 2); a `CyclicDependencyError` sends you to `design.md` §dependency-direction and `implement.md` §cycles.

## Workflows

End-to-end procedures that span the stages. Reach for these before reading the stage files individually.

- [Align (port `agent-core` → `agent-core-v2`)](align.md): split a v1 class into semantic units, fix each unit's domain / scope / Service / dependencies, then migrate the logic and tests. Use when the task is "move feature X from v1 to v2" or "port `IXxxService` to v2".
- [Server align (expose `agent-core-v2` over `server-v2`)](server-align.md): wire a v2 domain into `packages/kap-server` over `/api/v2` (native) and `/api/v1` (v1-compatible mirror), keep the wire schema byte-compatible with `packages/server` by sharing the `@moonshot-ai/protocol` schema, and isolate v1-only behavior in a `<domain>Legacy` edge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "port the v1 `/api/v1` routes to server-v2", or "keep server-v2 wire-compatible with `packages/server`".

## Stages

- [Stage 1 — Orient](orient.md): the DI black box (identity / dependencies / lifetime), the four `LifecycleScope` tiers and visibility, and the file-header comment convention. Read before touching business code.
- [Stage 2 — Design a service](design.md): pick a scope, split a domain across scopes, choose a calling style (direct call vs event vs hook), and direct dependencies. Decide *where things live and who knows whom* before coding.
- Topic: [Domain boundaries vs Scope](domain-boundaries.md) — keep `session` / `agent` / `turn` from becoming god objects; data-ownership test and their split conclusions.
- Topic: [Persistence layering](persistence.md) — the three-layer `Store → Storage → backend` model, naming Stores by access pattern, and which layer business code should depend on.
- Topic: [Edge exposure — `resource:action` + WS events](edge-exposure.md) — which Services are exposed over `/api/v2` (per-scope action map) and which events stream over WS; what to wrap in a facade.
- [Stage 3 — Implement](implement.md): the standard Service recipe and the DI building blocks — interface + identity, constructor injection, scoped registration, `Disposable`, eager vs delayed, `invokeFunction`, `createInstance`, child scopes, and the cycle-refactor playbook.
- Topic: [Service authoring](service-authoring.md) — file layout, naming, contract vs impl contents, interface style, constructor/field conventions, events, multi-Service domains, comment rules.
- Topic: [Config](config.md) — the section-registry model, App vs Session split, owning a config section, the TOML format, and the env overlay.
- Topic: [Errors](errors.md) — co-located `XxxError`, the central code registry, wire serialization, boundary translation.
- Topic: [Flags](flags.md) — `registerFlagDefinition`, `IFlagService.enabled(id)`, the `[experimental]` config section, resolution precedence.
- Topic: [Permission](permission.md) — composable chain-of-responsibility kernel, policy registry + composer, `modes`/`agentTypes` metadata, `resolveExecution`/`accesses`.
- Topic: [Telemetry](telemetry.md) — emitting events via `ITelemetryService`, context propagation, and appender destinations (`ConsoleAppender` / `CloudAppender`).
- [Stage 4 — Test](test.md): resolve the system under test by interface, pick `TestInstantiationService` vs `createScopedTestHost`, shared stubs, service groups, teardown.
- [Stage 5 — Verify & submit](verify.md): `lint:domain`, `typecheck`, `test`, updating the DI × Scope dependency map, and the pre-submit checklist.

## How to use this skill

Jump to the stage you are in and read that one file; each is self-contained and ends with its own red lines. Skim the global red lines below before submitting — they catch most mistakes across every stage. The repo's source of truth remains the code in `packages/agent-core-v2/src/`; this skill codifies the same rules so you do not have to re-derive them.

## Global red lines

Invariants that hold across every stage. Each is expanded in the stage file noted.

1. No `new` on a class whose constructor carries `@IService` deps — inject with `@IX` or `accessor.get(IX)`. (implement.md)
2. `@IX` decorates constructor parameters only; parameter order depends on construction (static-first for `createInstance`, `@IX`-first for scoped services). (service-authoring.md)
3. Both interface and impl carry `_serviceBrand`; the `createDecorator` name is globally unique. (implement.md)
4. Parent scope never depends on child scope — short-lived may inject long-lived, never the reverse. (orient.md)
5. No cyclic dependencies — refactor (extract a third Service / use an event / re-scope); do not break the cycle with `Delayed`. (design.md, implement.md)
6. `ServicesAccessor` is valid only during `invokeFunction` — never stash it for async use. (implement.md)
7. Scope follows state identity — no `Map<sessionId, …>` at `App` to fake per-session state. (design.md)
8. Foundational layers never know upstream ones; business code never depends on the edge layer (`gateway`/`rpc`). (design.md)
9. Throw coded errors; register codes centrally; branch on `code` across the wire, never `instanceof`. (errors.md)
10. Gate unreleased behavior behind a flag contributed via `registerFlagDefinition` and resolved through `IFlagService.enabled(id)`; no ad-hoc env toggles. (flags.md)
11. Tests resolve the SUT by interface; shared stubs live under `test/`, never `src/`. (test.md)
12. Config is the preference registry: only preferences that are persistable, schema'd, and user/operator-facing go in `IConfigService`. Domain-specific config (including env-only operational toggles) goes through `registerSection` + `envOverlay`. Facts → `IBootstrapService` (kept domain-agnostic — never add cron/flags/model state); session state → Session scope; constants → code. Business domains never call `IBootstrapService.getEnv()` directly. (config.md)
Loading