Skip to content

refactor(agent-core-v2): extract btw into a features/btw Feature unit - #2724

Open
sailist wants to merge 1 commit into
MoonshotAI:mainfrom
sailist:refactor/btw-feature
Open

refactor(agent-core-v2): extract btw into a features/btw Feature unit#2724
sailist wants to merge 1 commit into
MoonshotAI:mainfrom
sailist:refactor/btw-feature

Conversation

@sailist

@sailist sailist commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

btw (the side-question child-agent capability) still lived in the Session domain (src/session/btw) with a static registerScopedService registration, while src/features/ is the established seam for self-contained built-in capabilities (plan was the first). Staying outside the Feature mechanism means btw is not a named, introspectable, individually retractable unit in IFeatureManager.

What changed

  • Moved src/session/btw/ to src/features/btw/, mirroring the plan feature layout.
  • Added BtwFeature (features/btw/btwFeature.ts), which contributes ISessionBtwService at Session scope through contributeService. Activation stays eager, matching the previous OnScopeCreated behavior; retracting the unit now withdraws the service across the scope tree.
  • Removed the static registerScopedService call from btwService.ts. Package root exports are unchanged, so kap-server / node-sdk consumers are unaffected.
  • Moved the unit test to test/features/btw/.

Verified: lint:imports, typecheck, and the full agent-core-v2 suite (310 files / 4891 tests) all pass. No changeset: internal engine refactor with no user-perceivable change.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

- move session/btw to features/btw, mirroring the plan feature layout
- contribute ISessionBtwService at Session scope through BtwFeature
  (contributeService) instead of a static registerScopedService call
- keep the package root exports unchanged; move the test to
  test/features/btw
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d398042

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@d398042
npx https://pkg.pr.new/@moonshot-ai/kimi-code@d398042

commit: d398042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant