Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
556 commits
Select commit Hold shift + click to select a range
959717e
feat(v2): add kimi v2 prefix and fold v1 loop events on replay
sailist Jul 6, 2026
fbb4a3a
refactor(agent-core-v2): drop empty args from AgentBlobServiceImpl re…
sailist Jul 6, 2026
b0fafa5
Merge remote-tracking branch 'origin/main' into HEAD
sailist Jul 6, 2026
40cbc1a
refactor(agent-core-v2): replace blob selector with ModelDef.blobs codec
sailist Jul 7, 2026
41ed52c
feat(v2): mirror v1 prompt metadata and sync protocol parity
sailist Jul 7, 2026
b37345e
refactor(agent-core-v2): remove domain barrels via debarrel tool
sailist Jul 7, 2026
339022b
feat(agent-core-v2): add workspace add-dir command
7Sageer Jul 7, 2026
4535802
fix(agent-core-v2): align full compaction handoff with v1
7Sageer Jul 7, 2026
42dd3ef
refactor: allow full agent event types
kermanx Jul 7, 2026
c51d8df
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
898fa70
chore: simplify toolDedupe interface
kermanx Jul 7, 2026
ebe16e3
fix(server-v2): treat already-authenticated OAuth start as success
7Sageer Jul 7, 2026
b6c9413
refactor(agent-core-v2): rename tool dedupe domain
kermanx Jul 7, 2026
b2fe7a7
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
d25cb76
fix: align v2 external hook behavior
kermanx Jul 7, 2026
ec133ce
fix: align plugin session start injection
kermanx Jul 7, 2026
08e7544
refactor(agent-core-v2): localize microCompaction config types
kermanx Jul 7, 2026
8abbfc1
refactor(agent-core-v2): extract workspace local config service
7Sageer Jul 7, 2026
e2cecf6
refactor: simplify full compaction contract
kermanx Jul 7, 2026
226ced3
refactor(agent-core-v2): observe subagent and session hooks via slots
kermanx Jul 7, 2026
db88c75
fix(agent-core-v2): preserve OAuth login across unrelated provider re…
7Sageer Jul 7, 2026
37888e5
feat(agent-core-v2): allow rich context injection content
kermanx Jul 7, 2026
3644b8b
chore: simplify microCompactionOps
kermanx Jul 7, 2026
0df2f2f
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
4ec966f
refactor(agent-core-v2): internalize HookEngine into an App-scope runner
kermanx Jul 7, 2026
1a7b264
refactor: full compaction types
kermanx Jul 7, 2026
cf9bca5
refactor(agent-core-v2): replace contextSize getStatus with ranged get
kermanx Jul 7, 2026
3dcb8ef
refactor(agent-core-v2): remove barrel re-exports in favor of direct …
sailist Jul 7, 2026
1de5e62
fix: align agent-core-v2 llm protocol
7Sageer Jul 7, 2026
5590da3
fix(agent-core-v2): align strict projection and kimi thinking
7Sageer Jul 7, 2026
6dca7ea
Merge remote-tracking branch 'origin/kimi-code-v2' into feat/de-barre…
sailist Jul 7, 2026
957c493
Merge remote-tracking branch 'origin/kimi-code-v2' into feat/de-barre…
sailist Jul 7, 2026
304883a
refactor(kap-server): rename server-v2 package to kap-server
sailist Jul 7, 2026
2a9e219
refactor(agent-core-v2): rename loop context interfaces
kermanx Jul 7, 2026
a3c6968
refactor(agent-core-v2): host agent-run hook slots on IAgentLifecycle…
kermanx Jul 7, 2026
f969147
Merge remote-tracking branch 'origin/kimi-code-v2' into kimi-code-v2
kermanx Jul 7, 2026
60b8a3f
fix(agent-core-v2): minor updates / naming changes
kermanx Jul 7, 2026
e9b9705
chore: remove unused retry trigger
kermanx Jul 7, 2026
f8103e8
docs(agent-core-dev): drop barrels, rename server-v2 to kap-server
sailist Jul 7, 2026
8c47266
refactor(agent-core-v2): remove unused toolState service
kermanx Jul 7, 2026
6710f1e
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
f839095
test(agent-core-v2): port remaining agent swarm tests
kermanx Jul 7, 2026
91374d5
chore: remove unused methods
kermanx Jul 7, 2026
4d23a80
feat(agent-core-v2): cascade context size measurement
sailist Jul 7, 2026
07d631c
refactor(agent-core-v2): extract plan-mode injection and move reminde…
kermanx Jul 7, 2026
d8f54b8
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
a6dad25
fix: align v2 prompt auth readiness
7Sageer Jul 7, 2026
5a7a236
fix: plan service
kermanx Jul 7, 2026
c23e0fc
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx Jul 7, 2026
0157b05
feat(multi-server): add shared-home instance registry behind flag
sailist Jul 7, 2026
e300a89
feat(kap-server): register instances when multi_server flag is on
sailist Jul 7, 2026
554d998
Merge remote-tracking branch 'origin/main' into kimi-code-v2
sailist Jul 7, 2026
22e6413
chore: remove unused file
kermanx Jul 7, 2026
07f3f1c
refactor: align permission mode injection
kermanx Jul 7, 2026
7b041a8
fix: enforce v2 auth readiness checks
7Sageer Jul 7, 2026
e6b90d9
fix(kap-server): route prompt submits by agent_id
sailist Jul 7, 2026
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
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
e44d181
Merge branch 'kimi-code-v2' of https://github.com/MoonshotAI/kimi-cod…
kermanx 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
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
9f1827e
feat: add progressive tool disclosure
7Sageer Jul 9, 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
Loading