E2E testing infrastructure that tests the full message flow against a real Letta Cloud agent.
Changes:
- Add MockChannelAdapter for simulating inbound/outbound messages
- Add e2e/bot.e2e.test.ts with 4 e2e tests:
- Simple message/response
- /status command
- /help command
- Conversation context retention
- Add 'mock' to ChannelId type
- Update CI workflow with separate e2e job (uses secrets)
- Add npm run test:e2e script
E2E tests require:
- LETTA_API_KEY (already in repo secrets)
- LETTA_E2E_AGENT_ID (needs to be added)
E2E tests are skipped locally without these env vars.
Written by Cameron ◯ Letta Code
"Trust, but verify." - Ronald Reagan (on e2e testing)
Testing infrastructure improvements:
1. Add GitHub Actions workflow (.github/workflows/test.yml)
- Runs on push/PR to main
- Installs deps, builds, runs tests
- Blocks merging broken code
2. Add tests for commands.ts (src/core/commands.test.ts)
- Tests parseCommand() with valid/invalid inputs
- Tests case insensitivity
- Tests COMMANDS array and HELP_TEXT
Now at 231 tests across 17 test files.
Written by Cameron ◯ Letta Code
"Test early, test often." - Software proverb