Commit Graph

1 Commits

Author SHA1 Message Date
Nick DiMoro
9eafc6a9f0 Unify random code generation system (Jadis via orchestration)
- Created src/infra/random-codes.ts with unified utilities:
  - generateHumanCode() for human-friendly codes (no ambiguous chars)
  - generateSecureToken() for tokens/secrets (base64url)
  - generateUUID() wrapper for consistency
  - generateTempSuffix() for temp file names

- Refactored existing code to use new utilities:
  - src/pairing/pairing-store.ts
  - src/infra/exec-approvals.ts
  - src/infra/node-pairing.ts
  - src/infra/device-pairing.ts
  - src/infra/voicewake.ts
  - src/infra/exec-host.ts

- Added comprehensive tests in src/infra/random-codes.test.ts
- Updated pairing-store tests to mock the new module

All tests passing.
2026-01-25 04:39:05 -07:00