Commit Graph

14 Commits

Author SHA1 Message Date
Cameron
fe233b2f8f feat: add e2e tests with Letta Cloud (#149)
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)
2026-02-04 17:51:23 -08:00
Gabriele Sarti
0aef80157a feat: add lettabot-channels CLI for channel discovery (#121)
Allow the agent to discover channel IDs across Discord and Slack so it
can send messages to channels it hasn't received messages from (e.g.
"write something in #announcements"). Updates the system prompt so the
agent knows the command exists.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:02:35 -08:00
github-actions[bot]
41c6e88977 Upgrade Letta Code SDK to 0.0.5 (#117)
Breaking API changes in SDK 0.0.5 require:
- Use createAgent() for new agents with custom systemPrompt and memory
- Remove systemPrompt from createSession()/resumeSession() options

Fixes #116

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Cameron <cpfiffer@users.noreply.github.com>
2026-02-03 18:54:56 -08:00
Cameron
f3e619cd7b Add testing infrastructure with vitest (#67)
- Add vitest as dev dependency
- Add test scripts: `npm test` (watch) and `npm run test:run` (CI)
- Add initial unit tests for pure utility functions:
  - src/utils/phone.test.ts (10 tests)
  - src/utils/server.test.ts (10 tests)
  - src/channels/attachments.test.ts (6 tests)

All 26 tests passing.

Written by Cameron ◯ Letta Code
2026-02-01 22:38:25 -08:00
Cameron
67f0550bd3 Add inbound attachment support with download, metadata, and pruning (#64)
* Add inbound attachment handling and pruning

* Add Signal attachment support and logging

- Implement full Signal attachment collection (copies from signal-cli dir)
- Add logging when attachments are saved to disk for all channels
- Skip audio attachments in Signal (handled by voice transcription)

Written by Cameron ◯ Letta Code

* Gitignore bun.lock

Keep lockfile local, don't track in repo.

Written by Cameron ◯ Letta Code

---------

Co-authored-by: Jason Carreira <jason@visotrust.com>
2026-02-01 22:14:30 -08:00
dependabot[bot]
f27227cfc3 chore(deps): bump @letta-ai/letta-client from 1.7.6 to 1.7.7 (#63)
Bumps [@letta-ai/letta-client](https://github.com/letta-ai/letta-node) from 1.7.6 to 1.7.7.
- [Release notes](https://github.com/letta-ai/letta-node/releases)
- [Changelog](https://github.com/letta-ai/letta-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/letta-ai/letta-node/compare/v1.7.6...v1.7.7)

---
updated-dependencies:
- dependency-name: "@letta-ai/letta-client"
  dependency-version: 1.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-01 20:19:16 -08:00
dependabot[bot]
4b681b0fa4 chore(deps): bump @letta-ai/letta-code-sdk from 0.0.3 to 0.0.4 (#62)
* chore(deps): bump @letta-ai/letta-code-sdk from 0.0.3 to 0.0.4

Bumps [@letta-ai/letta-code-sdk](https://github.com/letta-ai/letta-code-sdk) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/letta-ai/letta-code-sdk/releases)
- [Commits](https://github.com/letta-ai/letta-code-sdk/compare/v0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: "@letta-ai/letta-code-sdk"
  dependency-version: 0.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix SDK 0.0.4 API changes

- createSession() signature changed: (agentId?, options?) instead of (options)
- Remove canUseTool callback - bypassPermissions mode auto-allows all tools

Written by Cameron ◯ Letta Code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cameron Pfiffer <cameron@pfiffer.org>
2026-02-01 20:16:27 -08:00
Cameron
053763bf89 Add voice message transcription support (#54)
* Add voice message transcription support (all channels)

Adds OpenAI Whisper transcription for voice messages across all channels:
- Telegram: ctx.message.voice
- WhatsApp: audioMessage via downloadMediaMessage
- Signal: audio attachments from local files
- Slack: audio files via url_private_download
- Discord: audio attachments

Voice messages sent to agent as "[Voice message]: <transcript>"

Configuration (config takes priority over env):
- lettabot.yaml: transcription.apiKey, transcription.model
- Env: OPENAI_API_KEY, TRANSCRIPTION_MODEL

Closes #47

Written by Cameron ◯ Letta Code

"The best interface is no interface - just talk."

* Add voice message documentation to README

- Add Voice Messages to features list
- Add configuration section for transcription
- Document supported channels

Written by Cameron ◯ Letta Code

* Notify users when voice transcription is not configured

Instead of silently ignoring voice messages, send a helpful message
linking to the documentation.

Written by Cameron ◯ Letta Code

* feat: upgrade to letta-code-sdk main + fix Signal voice transcription

- Switch from published SDK (v0.0.3) to local main branch (file:../letta-code-sdk)
- Update bot.ts for new SDK API: createSession(agentId?, options) signature
- Add conversationId tracking to store for proper conversation persistence
- Fix Signal voice transcription: read attachments from ~/.local/share/signal-cli/attachments/
- Fix Telegram markdown ESM issue: make markdownToTelegramV2 async with dynamic import
- Add transcription config to lettabot.yaml
- Add extensive debug logging for queue and session processing

Signal voice messages now properly transcribe and send to agent.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: update Signal CLI message sender to use daemon JSON-RPC API

- Switch from signal-cli-rest-api to signal-cli daemon (port 8090)
- Use JSON-RPC send method instead of REST /v2/send
- Support group IDs with group: prefix
- Handle 201 responses and empty bodies correctly

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* Add placeholder for untranscribed voice messages on Signal

If a voice-only message arrives and transcription fails or is disabled,
forward a placeholder so the user knows the message was received.

Written by Cameron ◯ Letta Code

---------

Co-authored-by: Letta <noreply@letta.com>
2026-02-01 20:07:57 -08:00
Cameron
8017c4617e Add update-notifier to CLI (#53)
Shows a notification when a new version is available, helping users
stay up to date with security fixes.

Written by Cameron ◯ Letta Code
2026-01-30 17:16:49 -08:00
Sarah Wooders
a41966657a Add Google Workspace setup wizard to onboarding
- Add stepGoogle() wizard that guides users through gog CLI setup
- Check/install gog via Homebrew, guide OAuth credential setup
- Let users select existing accounts or add new ones
- Configure which Google services to enable (gmail, calendar, drive, etc.)
- Add GoogleConfig type and integrations.google to config schema
- Wire GMAIL_ACCOUNT env var from YAML config for polling service
- Add discord.js dependency (fixes build)

🐙 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 22:51:53 -08:00
Jason Carreira
d420e5d3b5 Add reactions CLI for Telegram/Slack/Discord (#20)
* Add lettabot-react CLI and message IDs

* Expose message IDs for reactions

---------

Co-authored-by: Jason Carreira <jason@visotrust.com>
2026-01-29 15:40:50 -08:00
Jason Carreira
0f68b9b52f Add Discord channel support (#16)
* Add Discord channel support and pairing (#15)

* Address Discord adapter review feedback

* Fix stream counter after merge

* Remove stream count logging

---------

Co-authored-by: Jason Carreira <jason@visotrust.com>
2026-01-29 14:11:50 -08:00
Sarah Wooders
b72150c193 Add YAML config system (types and io) 2026-01-28 22:50:49 -08:00
Sarah Wooders
22770e6e88 Initial commit - LettaBot multi-channel AI assistant
Co-authored-by: Cameron Pfiffer <cameron@pfiffer.org>
Co-authored-by: Caren Thomas <carenthomas@gmail.com>
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2026-01-28 18:02:51 -08:00