Skip to content

fix: address review follow-up findings (#13, #14, #15, #16) - #17

Merged
zicochaos merged 5 commits into
mainfrom
fix/review-follow-ups
Jul 29, 2026
Merged

fix: address review follow-up findings (#13, #14, #15, #16)#17
zicochaos merged 5 commits into
mainfrom
fix/review-follow-ups

Conversation

@zicochaos

Copy link
Copy Markdown
Owner

Problem

Follow-up issues filed from the PR #12 review (pre-existing findings, not merge fallout): #13, #14, #15, #16.

What changed

One commit per issue:

  • node-sdk v2 config-mapper drops newer config domains #13 fix(node-sdk): KIMI_CONFIG_DOMAINS in the v2 config mapper now keeps disabledSkills, extraAgentDirs, secondaryModel, persistDefaultModel and agentsMdExpandIncludes — both engines know them under identical names, so the field pick just needed the entries. v2's materialized section defaults for the newly mapped domains (incl. env-binding secondaryModel: {}) are pinned in the parity V2_INJECTED_SECTION_DEFAULTS projection.
  • node-sdk v2 skill listing may race catalog reload #14 fix(node-sdk): listSkills awaits awaitPendingReloads() instead of ready, per the ISessionSkillCatalog contract — a config-driven reload can no longer race the listing with a stale view.
  • REST config schemas missing newer config keys #15 fix(protocol): extra_agent_dirs added to the kap-server and public protocol REST config schemas; secondary_model added to the protocol one. No handler change needed — the routes map config domains generically (camel↔snake).
  • Nits: managed-usage footer label + agent-core-v2 tool.test.ts lint/noise #16 fix(tui) + test(agent-core-v2): compactRowLabel renders the actual window duration (2w instead of a hardcoded 1w); the agent-tool suite's modelCatalogResolving fake gained a stub getRequester (silences the [unexpected] TypeError noise), and the two expected runnable execution throws stringify non-string output — clearing the last 4 repo-wide lint errors.

Verification

  • pnpm run lint: 0 errors repo-wide (was 4); 0 warnings on touched files
  • node-sdk 329, agent-core-v2 4230 (tool.test.ts 94/94), kap-server 925, protocol 525, TUI footer tests 21 — all green
  • tsc --noEmit clean in node-sdk, protocol, kap-server, kimi-code

Note: one unrelated pre-existing stderr trace remains in tool.test.ts ("renders global tool restrictions…", harness ConfigBackedModelCatalog with an unconfigured model) — out of scope here.

Closes #13, closes #14, closes #15, closes #16.

KIMI_CONFIG_DOMAINS dropped disabledSkills, extraAgentDirs, secondaryModel,
persistDefaultModel and agentsMdExpandIncludes even though both the v1
KimiConfig schema and the v2 config sections know them under the same
names, so SDK consumers on the v2 engine silently lost those settings.
Pin v2's materialized section defaults for the newly mapped domains in
the parity projection.

Closes #13
The v2 session skill catalog's ready promise only covers the initial
load; a config-driven source reload could race the listing and serve a
partially-merged view. Await awaitPendingReloads() instead, as the
ISessionSkillCatalog contract requires of listing route handlers.

Closes #14
…fig schemas

extra_agent_dirs was missing from both the kap-server and the public
protocol REST config schemas, and secondary_model from the protocol one,
so REST clients could not round-trip keys the engine already supports
(the routes map domains generically, so no handler change is needed).

Closes #15
compactRowLabel hardcoded 1w for every weekly window, so a two-week
quota window rendered as 1w. Render the duration like every other unit.

Refs #16
…r noise

The modelCatalogResolving fake lacked getRequester, so requester
resolution crashed with a TypeError logged as [unexpected] across the
agent tool suite; give it a stub requester. Stringify the error output
in the two expected-runnable-execution throws, clearing the last four
repo-wide lint errors (no-base-to-string/restrict-template-expressions).

Closes #16
@zicochaos
zicochaos merged commit b4d2855 into main Jul 29, 2026
13 of 14 checks passed
@zicochaos
zicochaos deleted the fix/review-follow-ups branch July 30, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant