Skip to content

refactor: extract loop service seam by splitting runtime into dedicated modules#49

Merged
chriswritescode-dev merged 6 commits into
v0.5.0from
refactor/extract-loop-service-seam
Jun 20, 2026
Merged

refactor: extract loop service seam by splitting runtime into dedicated modules#49
chriswritescode-dev merged 6 commits into
v0.5.0from
refactor/extract-loop-service-seam

Conversation

@chriswritescode-dev

Copy link
Copy Markdown
Owner

Summary

Extracts the loop service seam by splitting the monolithic runtime.ts into focused modules for prompt construction, usage tracking, and workspace management. This improves separation of concerns and testability.

Changes

Added

  • src/loop/runtime-prompt.ts — extracted prompt construction logic
  • src/loop/runtime-usage.ts — extracted usage tracking logic
  • src/loop/runtime-workspace.ts — extracted workspace management logic
  • test/loop/runtime-service-seam.test.ts — test coverage for the service seam

Updated

  • src/loop/runtime.ts — refactored to delegate to new modules (-427 lines)
  • src/loop/service.ts — refactored to use extracted modules (-82 lines)
  • src/services/execution.ts — service seam integration
  • src/services/session-loop-resolver.ts — service seam integration
  • Multiple hooks, tools, and test files updated to match new interfaces

Removed

  • Duplicated runtime logic between runtime.ts and service.ts

Breaking changes

None.

@chriswritescode-dev chriswritescode-dev merged commit 32f7300 into v0.5.0 Jun 20, 2026
1 check passed
@chriswritescode-dev chriswritescode-dev deleted the refactor/extract-loop-service-seam branch June 20, 2026 16:07
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