Commit Graph

47 Commits

Author SHA1 Message Date
Cameron
08ee846b71 refactor: extract memfs resolution with server-mode awareness (#560) 2026-03-11 14:51:41 -07:00
Cameron
7f44043962 feat: add Bluesky channel adapter and runtime tooling (supersedes #401) (#486) 2026-03-10 13:59:27 -07:00
dependabot[bot]
03618faf5b chore(deps): bump @letta-ai/letta-client from 1.7.11 to 1.7.12 (#531)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 21:47:37 -07:00
Cameron
7c3ab04494 Low-risk simplification pass: bot pipeline, startup, API, onboarding, provider sync (#520) 2026-03-06 17:20:24 -08:00
Cameron
e80c5b4dd6 fix: prevent non-foreground run events leaking into user response stream (#513) 2026-03-06 11:51:05 -08:00
Cameron
761de6d716 feat: add set-conversation command (CLI, API, channel, portal) (#512) 2026-03-06 11:30:06 -08:00
Cameron
bcbe6dff9b fix: prevent reasoning text from leaking as response on LLM API errors (#509) 2026-03-06 10:14:16 -08:00
dependabot[bot]
ba1ef7ab6e chore(deps): bump @letta-ai/letta-client from 1.7.10 to 1.7.11 (#490)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 09:52:24 -08:00
dependabot[bot]
a2e46f7420 chore(deps): bump @letta-ai/letta-client from 1.7.9 to 1.7.10 (#469)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 11:10:45 -08:00
dependabot[bot]
9cf929a716 chore(deps): bump @letta-ai/letta-client from 1.7.8 to 1.7.9 (#406)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 15:31:02 -08:00
Cameron
d283f837ac refactor: migrate runtime console.log calls to structured logger (#397) 2026-02-26 10:16:38 -08:00
dependabot[bot]
623532292c chore(deps): bump @letta-ai/letta-code-sdk from 0.1.2 to 0.1.6 (#380)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-24 11:22:32 -08:00
Cameron
1cad6e6508 feat(core): structured logging with pino (#368) 2026-02-23 16:35:23 -08:00
Cameron
e7bb2a77f1 feat: community-contributable loom displays (#361) 2026-02-23 12:39:43 -08:00
dependabot[bot]
92d8a0cf10 chore(deps): bump @letta-ai/letta-code-sdk from 0.1.1 to 0.1.2 (#352)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 11:22:07 -08:00
Sarah Wooders
61c2657885 fix(build): normalize executable bits for CLI bin outputs (#334)
Co-authored-by: Letta <noreply@letta.com>
2026-02-18 11:18:12 -08:00
Charles Packer
3e38a35736 chore: bump @letta-ai/letta-code-sdk to 0.1.1 (#315) 2026-02-16 23:48:51 -08:00
Charles Packer
94bd4d2d12 chore(deps): bump @letta-ai/letta-code-sdk to 0.1.0 (#313) 2026-02-16 19:41:11 -08:00
ghosttigerllc-bit
28adc22388 feat: add telegram-mtproto channel for user account messaging (#189)
Co-authored-by: Kai <noreply@gtb.ai>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cameron <cameron@pfiffer.org>
2026-02-10 17:25:44 -08:00
Cameron
8cf9bd230e chore: bump @letta-ai/letta-code-sdk to 0.0.6 (#268) 2026-02-10 16:25:25 -08:00
Charles Packer
c7cb3b723b Merge pull request #260 from letta-ai/feat/disallow-interactive-plan-tools
feat: add disallowed interactive tools config for sessions
2026-02-10 16:20:33 -08:00
cpacker
8a38896928 chore: bump letta code sdk to 0.0.6 and remove stale patches 2026-02-10 16:19:10 -08:00
Cameron
320c1cd6a0 docs: add npm run update script and recommend npm ci (#259)
Users running npm install get a dirty lockfile that blocks git pull.
Add an update script that handles the reset+pull+install+build cycle,
and document npm ci as the recommended install method.

Written by Cameron ◯ Letta Code

"Simplicity is the ultimate sophistication." -- Leonardo da Vinci
2026-02-10 13:25:42 -08:00
Tom Fehring
d12633b792 Convert standard markdown to Slack mrkdwn for Slack messages (#234)
* Slack: convert Markdown to mrkdwn

* Slack: avoid literal dynamic import for optional dep

* Slack formatter: cache optional dependency load state

* fix: remove slackify-markdown from lockfile dependencies

The lockfile had slackify-markdown in both `dependencies` (pinned) and
`optionalDependencies`, but package.json only lists it in
optionalDependencies. This caused npm ci to treat it as required,
defeating the optional dependency pattern.

Regenerated lockfile with clean npm install to fix.

Written by Cameron ◯ Letta Code

"The lockfile giveth, and the lockfile taketh away." - npm, probably

---------

Co-authored-by: Cameron <cameron@pfiffer.org>
2026-02-09 16:59:46 -08:00
Cameron
39fb657494 fix: exclude e2e tests from unit test run (#241)
Unit test job was discovering e2e/*.e2e.test.ts files and reporting
them as skipped, causing misleading "6 skipped" in PR checks.

Now test:run excludes e2e/ directory. E2E tests run separately via
test:e2e with secrets in CI.

Written by Cameron ◯ Letta Code

"Clean signals lead to confident decisions." -- unknown
2026-02-09 15:30:08 -08:00
Jason Carreira
16b5e5b7b7 Add lettabot-history CLI (#211)
* Add lettabot-history CLI

* Document and test lettabot-history

* Validate lettabot-history limit

* fix: address review feedback on history CLI

- Extract shared loadLastTarget into cli/shared.ts (was duplicated in message.ts, react.ts, history-core.ts)
- Clamp --limit to platform maximums (Discord: 100, Slack: 1000)
- Fix Discord author formatting: use globalName/username instead of deprecated discriminator
- Add Slack fetch test

Written by Cameron ◯ Letta Code

"You miss 100% of the shots you don't take." -- Wayne Gretzky -- Michael Scott

---------

Co-authored-by: Jason Carreira <jason@visotrust.com>
Co-authored-by: Cameron <cameron@pfiffer.org>
2026-02-09 10:16:10 -08:00
Cameron
999ee89cb0 feat: prepare package for npm publish (#227)
- Version 0.2.0 (was 1.0.0 -- too early for stable)
- Add files field: only ship dist/, .skills/, patches/
- Add engines: node >= 20
- Add repository, homepage, author metadata
- Add prepublishOnly: build + test gate
- Move patch-package from postinstall to prepare (don't run for end users)
- Add npm publish step to release workflow (requires NPM_TOKEN secret)
- Pre-releases publish with --tag next, stable with --tag latest
- Update release notes install instructions for npm

Closes #174 (once NPM_TOKEN is configured)

Written by Cameron ◯ Letta Code

"Shipping is a feature." -- Jez Humble
2026-02-09 09:52:48 -08:00
Cameron
0d32e05906 fix: orphaned approval recovery, empty-result retry, deploy stability (#183)
Fixes #180. See #194 for full analysis.
2026-02-06 10:42:41 -08:00
Cameron
5dea82acc5 fix: pin baileys to 6.7.21 and fix stale command count test (#193)
The ^6.7.21 caret range resolves to 6.17.16 on fresh npm install, which
ships incompatible TypeScript types (no call signatures on default export).
Pins exact version and adds explicit type annotation on getMessage key param.

Also updates commands.test.ts to expect 5 commands (reset was added but
test still expected 4).

Fixes #192

Written by Cameron ◯ Letta Code

"The caret giveth, and the caret taketh away."
2026-02-06 10:30:04 -08:00
Cameron
2373dbb3b1 fix: add npm overrides for keyv resolution (#162)
* fix: telegram ESM compatibility and improved diagnostics

- Replace telegram-markdown-v2 with telegramify-markdown (ESM compatible)
- Add raw text fallback when Telegram formatting fails, with error notice
- Improve empty response diagnostics: log agent ID, show conversation ID
- Add reset-conversation command hint to user messages
- Add telegram-format.test.ts with 7 tests

Fixes Railway deployment ERR_REQUIRE_ESM error with remark package.

Written by Cameron and Letta Code

"The best error message is the one that never shows up." - Thomas Fuchs

* fix: add npm overrides for keyv resolution

Users were still hitting ERR_MODULE_NOT_FOUND for keyv even after
PR #154 added it as a direct dependency. This happens because npm's
hoisting doesn't always resolve peer deps of optional deps properly.

npm overrides force the package manager to use our root keyv version
for all nested references, which is the idiomatic solution for
transitive peer dependency issues.

Also adds troubleshooting entry to README.

Written by Cameron ◯ Letta Code

"The best error message is the one that never shows up."
- Thomas Fuchs
2026-02-06 10:25:30 -08:00
dependabot[bot]
49db36f52f chore(deps): bump @letta-ai/letta-client from 1.7.7 to 1.7.8 (#186)
Bumps [@letta-ai/letta-client](https://github.com/letta-ai/letta-node) from 1.7.7 to 1.7.8.
- [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.7...v1.7.8)

---
updated-dependencies:
- dependency-name: "@letta-ai/letta-client"
  dependency-version: 1.7.8
  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-06 10:25:27 -08:00
Cameron
c85c4a3272 fix: telegram ESM compatibility and improved diagnostics (#161)
- Replace telegram-markdown-v2 with telegramify-markdown (ESM compatible)
- Add raw text fallback when Telegram formatting fails, with error notice
- Improve empty response diagnostics: log agent ID, show conversation ID
- Add reset-conversation command hint to user messages
- Add telegram-format.test.ts with 7 tests

Fixes Railway deployment ERR_REQUIRE_ESM error with remark package.

Written by Cameron and Letta Code

"The best error message is the one that never shows up." - Thomas Fuchs
2026-02-05 10:31:53 -08:00
Cameron
b4058f17ce fix: add keyv as direct dependency (#154)
keyv is a transitive dependency of Baileys via @cacheable/utils,
but since Baileys is in optionalDependencies, some npm versions
don't properly install its transitive dependencies on fresh installs.

Adding keyv as a direct dependency ensures it's always installed.

Fixes ERR_MODULE_NOT_FOUND: Cannot find package 'keyv' on fresh installs.

Written by Cameron ◯ Letta Code

"The best time to fix a dependency bug is before someone reports it.
The second best time is immediately after." - Ancient npm proverb
2026-02-04 18:43:10 -08:00
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