Commit graph

6 commits

Author SHA1 Message Date
haozhe.yang
4ee4911162 feat: validate workspace roots and auto-launch task notification turns
- task: idle terminal notifications now use activeOrNewTurn admission,
  launching their own turn instead of waiting for the next user prompt
  (matches v1 turn.steer)
- workspaceRegistry: createOrTouch rejects missing or non-directory roots
  with fs.path_not_found, so a phantom cwd never reaches session creation
- kap-server: map FS_PATH_NOT_FOUND to protocol error 40409 on the session
  and RPC surfaces
- server-e2e: migrate the v2 smoke test from the local ServerClient to the
  typed Klient
- misc: switch loop/prompt clear() iteration to .slice(), align terminal
  event handler names, and tidy klient examples
2026-07-12 11:19:04 +08:00
haozhe.yang
2c5a4a3799 feat(api-v2): add klient SDK and reflection-based channel registry
- replace per-method actionMap (resource:action) with a channel registry: each Service registers once by decorator id and all methods are invoked by reflection
- routes move from /api/v2/:sa to /api/v2/:service/:method across HTTP routes and the WS protocol
- add @moonshot-ai/klient: typed core/session/agent client over the HTTP channel that reuses agent-core-v2 service interfaces
- register klient in flake.nix and pnpm-lock; refresh kap-server tests, e2e, and the apiSurface snapshot
2026-07-11 12:33:48 +08:00
haozhe.yang
79ffb7b347 chore: fix lint issues across packages
- remove unused imports and variables
- add void to floating promises
- drop redundant return-await
- bind unbound method references
- replace == null with strict null/undefined checks
- add explicit sort comparators and Array.from helpers
- rename background_tasks capability to tasks
- migrate event sink to event bus in tests
2026-07-07 23:37:34 +08:00
haozhe.yang
304883ab81 refactor(kap-server): rename server-v2 package to kap-server
- rename packages/server-v2 to packages/kap-server and update every
  @moonshot-ai/server-v2 reference across apps, packages, flake.nix,
  and build scripts
- remove the experimental `kimi v2` CLI prefix and its tests from the
  apps/kimi-code main entry
- add legacy BackgroundTask protocol types and the `blocked` turn
  interrupt reason for cross-engine compatibility
2026-07-07 16:56:19 +08:00
haozhe.yang
a0de7ce2c0 feat(agent-core-v2): drop @moonshot-ai/kosong dependency and internalize providers
- remove @moonshot-ai/kosong from agent-core-v2 dependencies
- add direct deps on @anthropic-ai/sdk, @google/genai, and openai
- update tests and source to import wire types from #/app/llmProtocol/kosong
- update check-domain-layers comment and tsdown/vitest configs
- add agent telemetry context test and workspace query service test
- add server-e2e local token discovery helper and tests
- add close-vs-dispose skill topic and persistence scope authoring rules
- update service-authoring.md for one-service-per-file policy
2026-07-02 21:46:02 +08:00
haozhe.yang
61ef35b302 feat(server-e2e): add typed v2 ServerClient SDK with drift test
- add ServerClient under src/v2: typed /api/v2 resource tree over HTTP
  plus events over WebSocket, with core/session/agent scopes and a v1
  escape hatch for the legacy REST surface
- add resource modules (core/session/agent/events), a manifest mirroring
  the server-v2 actionMap, shared types, and transport (HttpRpc,
  rpcProxy, V2Socket)
- expose @moonshot-ai/server-v2/contract (actionMap + channel helpers)
  so the SDK drift test stays in lockstep with the server surface
- add an in-process smoke test and the vitest raw-text/hash-imports
  plugins needed to import server-v2 source from the e2e tests
- add optional bearer token support to the legacy HttpClient and document
  the two-client package layout
2026-07-02 01:06:16 +08:00