You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Harden the installer with idempotency, comprehensive error messages, config backup/restore, and verbose logging.
Tasks
Task 33: Implement idempotent installation — Review and enhance install() to ensure idempotency. Re-running install should not create duplicate entries, should update existing configs, should handle already-installed state gracefully.
Depends on: Task 28
Files: packages/core/src/index.ts
Testing: Run install twice in integration test. Verify no duplicates, no errors.
Task 34: Add comprehensive error messages — Review all error paths in core installer. Add actionable, platform-aware error messages with specific guidance. Detect OS via process.platform and suggest appropriate remediation. Use error codes for programmatic handling.
Depends on: Task 28
Files: packages/core/src/errors.ts, update all modules to use structured errors
Testing: Trigger each error scenario, verify message clarity and actionability on all platforms.
Task 35: Implement config backup and restore — Before modifying harness configs, create backup at ~/.agents/.config-backup/<harness>/<timestamp>.json. Add restore command to CLI for manual recovery. Document backup location in README.
Task 36: Add verbose logging mode — Add --verbose flag to CLI and environment variable support (NSOLID_PLUGIN_VERBOSE). Log all file operations, API calls, and decisions. Use structured logging with timestamps.
Depends on: Task 30
Files: packages/core/src/utils/logger.ts, update all modules to use logger
Testing: Run install with --verbose, verify detailed output. Run without flag, verify clean output.
Phase 9: Polish and Edge Cases
Harden the installer with idempotency, comprehensive error messages, config backup/restore, and verbose logging.
Tasks
Task 33: Implement idempotent installation — Review and enhance install() to ensure idempotency. Re-running install should not create duplicate entries, should update existing configs, should handle already-installed state gracefully.
packages/core/src/index.tsTask 34: Add comprehensive error messages — Review all error paths in core installer. Add actionable, platform-aware error messages with specific guidance. Detect OS via
process.platformand suggest appropriate remediation. Use error codes for programmatic handling.packages/core/src/errors.ts, update all modules to use structured errorsTask 35: Implement config backup and restore — Before modifying harness configs, create backup at
~/.agents/.config-backup/<harness>/<timestamp>.json. Add restore command to CLI for manual recovery. Document backup location in README.packages/core/src/utils/backup.ts,packages/core/src/cli.ts(add restore command)Task 36: Add verbose logging mode — Add
--verboseflag to CLI and environment variable support (NSOLID_PLUGIN_VERBOSE). Log all file operations, API calls, and decisions. Use structured logging with timestamps.packages/core/src/utils/logger.ts, update all modules to use logger