agent-orchestrator/packages/core/src
prateek 1cb52c122d
refactor: replace magic strings with constants for status enums (#64)
Replaces hardcoded string literals with typed constants for:
- SESSION_STATUS (needs_input, stuck, errored, etc.)
- PR_STATE (merged, closed, open)
- CI_STATUS (passing, failing, pending, none)

Benefits:
- Type safety - IDE catches typos at compile time
- Autocomplete - Better developer experience
- Single source of truth - Easy to add/remove states
- Easier refactoring - Change constant value in one place
- Better git grep - Search for SESSION_STATUS.STUCK vs all "stuck" strings

Files updated:
- packages/core/src/types.ts - Added constants
- packages/core/src/lifecycle-manager.ts - SessionStatus, PRState, CIStatus
- packages/core/src/session-manager.ts - PRState
- packages/web/src/lib/types.ts - SessionStatus, CIStatus
- packages/web/src/components/SessionCard.tsx - CIStatus
- packages/web/src/components/SessionDetail.tsx - CIStatus
- packages/web/src/components/Dashboard.tsx - CIStatus
- packages/plugins/scm-github/src/index.ts - CIStatus
- packages/plugins/notifier-slack/src/index.ts - CIStatus

Follows pattern established in PR #55 for ACTIVITY_STATE constants.

Resolves INT-1368

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 08:53:17 +05:30
..
__tests__ feat: wire up live activity detection for agent sessions (#45) 2026-02-16 05:31:02 +05:30
config.ts feat: layered prompt system for agent sessions (#27) 2026-02-14 20:07:13 +05:30
index.ts feat: wire up live activity detection for agent sessions (#45) 2026-02-16 05:31:02 +05:30
lifecycle-manager.ts refactor: replace magic strings with constants for status enums (#64) 2026-02-16 08:53:17 +05:30
metadata.ts fix: remove sessions/ subdirectory from metadata paths (#24) 2026-02-14 17:28:58 +05:30
orchestrator-prompt.ts feat: implement ao start command for unified orchestrator startup (#42) 2026-02-16 04:58:39 +05:30
plugin-registry.ts feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
prompt-builder.ts feat: layered prompt system for agent sessions (#27) 2026-02-14 20:07:13 +05:30
session-manager.ts refactor: replace magic strings with constants for status enums (#64) 2026-02-16 08:53:17 +05:30
tmux.ts fix: restrict temp file permissions, validate session prefix format 2026-02-14 05:17:53 +05:30
types.ts refactor: replace magic strings with constants for status enums (#64) 2026-02-16 08:53:17 +05:30
utils.ts feat: wire up live activity detection for agent sessions (#45) 2026-02-16 05:31:02 +05:30