Skip to content

refactor: extract BaseAdapter from @perstack/core to @perstack/adapter-base#402

Merged
FL4TLiN3 merged 2 commits intomainfrom
refactor/extract-base-adapter-from-core
Jan 9, 2026
Merged

refactor: extract BaseAdapter from @perstack/core to @perstack/adapter-base#402
FL4TLiN3 merged 2 commits intomainfrom
refactor/extract-base-adapter-from-core

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Jan 9, 2026

Summary

  • @perstack/core から BaseAdapter クラスを分離し、新パッケージ @perstack/adapter-base に移動
  • @perstack/core がクライアントセーフになった(child_process 依存を除去)
  • Next.js などのクライアント環境で @perstack/core を安全にインポート可能

Background

@perstack/core に含まれていた BaseAdapterchild_process をインポートしており、Next.js のクライアントバンドルで問題が発生していた:

apps/studio → @repo/api-client → @repo/models → @perstack/core → child_process

Changes

  • 新パッケージ packages/runtimes/adapter-base/ を作成
  • BaseAdapterExecResult を新パッケージに移動
  • 以下のパッケージの依存関係とインポートを更新:
    • packages/runtimes/docker
    • packages/runtimes/claude-code
    • packages/runtimes/cursor
    • packages/runtimes/gemini
    • apps/runtime

Test plan

  • pnpm typecheck - 成功
  • pnpm format-and-lint - 成功
  • pnpm test - 成功
  • pnpm build - 成功

🤖 Generated with Claude Code

…r-base

This change makes @perstack/core client-safe by removing the child_process
dependency. The BaseAdapter class and ExecResult type are now exported from
a new package @perstack/adapter-base.

Changes:
- Create new package packages/runtimes/adapter-base
- Move BaseAdapter and ExecResult from @perstack/core
- Update all runtime packages to depend on @perstack/adapter-base
- Update imports in docker, claude-code, cursor, gemini adapters and apps/runtime

This resolves issues where importing @perstack/core in Next.js client bundles
would fail due to child_process not being available in browser environments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 merged commit 0946b78 into main Jan 9, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Jan 9, 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.

1 participant