Skip to content

refactor(architecture): add DI container and lifecycle orchestration#1626

Merged
OneStepAt4time merged 1 commit intodevelopfrom
fix/1622-di-container-lifecycle
Apr 10, 2026
Merged

refactor(architecture): add DI container and lifecycle orchestration#1626
OneStepAt4time merged 1 commit intodevelopfrom
fix/1622-di-container-lifecycle

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

  • implement issue refactor(architecture): introduce DI container and formalize service lifecycle #1622 by introducing ServiceContainer with explicit registration and dependency resolution (topological startup)
  • refactor core service wiring in server.ts for TmuxManager, SessionManager, AuthManager, ChannelManager, and SessionMonitor via lifecycle adapters
  • add startup health gate before listenWithRetry and reverse-order timeout-aware shutdown via container lifecycle management
  • document the service dependency graph in architecture docs and add focused container lifecycle tests

Validation

  • npm run lint
  • npm run build
  • npx tsc --noEmit
  • npm test

Closes #1622

Implement issue #1622 by introducing a lightweight service container with explicit dependency registration, topological startup ordering, startup health gate, and reverse-order timeout-aware shutdown for core services.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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