Skip to content

refactor: rename tools/core/ to tools/shared/ and remove barrel re-exports#497

Closed
jirispilka wants to merge 1 commit intofeat/tool-mode-core-extractionfrom
refactor/rename-core-to-shared
Closed

refactor: rename tools/core/ to tools/shared/ and remove barrel re-exports#497
jirispilka wants to merge 1 commit intofeat/tool-mode-core-extractionfrom
refactor/rename-core-to-shared

Conversation

@jirispilka
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #466 addressing two review comments:

  • Rename src/tools/core/src/tools/shared/core/ is too vague and doesn't describe what the directory actually contains. shared/ communicates the real intent: mode-agnostic logic that is shared across tool variants, without any UI/presentation concerns.
  • Remove re-export shims from actor.ts — the backward-compat re-exports added in refactor: extract shared core logic into src/tools/core/ modules #466 created an unnecessary indirection layer. tools/index.ts now imports directly from shared/, and actor.ts no longer proxies symbols it doesn't own.

Changes

File Change
src/tools/core/src/tools/shared/ Directory rename (3 files, git mv)
src/tools/actor.ts Remove re-export shims; update import paths
src/tools/index.ts Import directly from shared/ instead of via actor.ts
src/mcp/server.ts Update import path
tests/unit/tools.structured-output-schemas.test.ts Update import path

Verification

✅ npm run type-check — passes
✅ npm run lint — passes
✅ npm run test:unit — 248 tests pass

🤖 Generated with Claude Code

…ports

- Rename src/tools/core/ → src/tools/shared/ for a clearer name that
  reflects the actual intent (mode-agnostic logic shared across variants)
- Remove re-export shims from actor.ts that proxied core/ symbols
- Update tools/index.ts to import directly from shared/ instead of
  routing through actor.ts
- Update all import sites: server.ts, actor.ts, index.ts, and unit test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jirispilka jirispilka requested a review from MQ37 February 25, 2026 10:58
@jirispilka jirispilka closed this Feb 25, 2026
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.

2 participants