* feat: select org
* feat: make it possible to use org by slug
* improv: clean up
* fix: types
* improv: comment
* fix: add discriminator
* improv: comment
* fix: types
* improv: clean up
* test: org flag
* improv: clean up
* fix: test
* improv: clean up
* Update src/shared-options.ts
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
---------
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
The initializeServices tests were failing in CI with "Response returned an
error code" because the refactored function now calls onboarding/auth modules
that make real API calls.
Changes:
- Added mocks for onboarding.js and auth/workos.js modules
- Enhanced modeService mock to include getToolPermissionService method
- Added serviceContainer mocks to prevent real service initialization
- Updated all test cases to use headless: true to skip onboarding flow
- Fixed test expectations to include isHeadless parameter
This ensures tests run in isolation without making network requests,
preventing CI failures due to authentication or network issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced isFilePath function to properly detect Windows absolute paths,
UNC paths, and paths with file extensions. This fixes test failures on
Windows where paths like "C:\Users\..." were incorrectly treated as
assistant slugs instead of file paths.
Changes:
- Added Windows drive letter pattern detection (C:\, D:\, etc.)
- Added UNC path detection (\\server\share)
- Added file extension detection (.yaml, .yml, .json)
Fixes Windows CI test failure: "Invalid assistant slug format" error
when --config points to non-existent Windows file paths.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive environment detection in runOnboardingFlow to skip
interactive prompts in test/CI environments. Detects:
- NODE_ENV=test
- CI=true
- VITEST=true
- GITHUB_ACTIONS=true
- \!process.stdin.isTTY
This prevents "The current environment doesn't support interactive
reading from TTY" errors in GitHub Actions CI.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add environment detection in runOnboardingFlow to skip interactive prompts in CI/test environments
- Check for NODE_ENV=test, CI=true, VITEST=true, or lack of TTY
- Prevents "The current environment doesn't support interactive reading from TTY" errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix import order issues across multiple files
- Remove unused imports (loadAuthConfig, ValidationOptions)
- Add proper import group separations
- All lint checks and tests now pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
ESLint was reporting import order violations. Fixed by running
eslint --fix which properly ordered the imports according to
the project's import order rules.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>