Commit Graph

62 Commits

Author SHA1 Message Date
Cameron
f7d8005be4 feat: add <send-message> directive and cross-channel targeting for <send-file>
Adds a new `<send-message>` directive that lets the agent proactively
send text messages to any connected channel:chat, and extends
`<send-file>` with optional `channel`/`chat` attributes for targeted
file delivery. Both work from any context including heartbeats and cron.

Written by Cameron ◯ Letta Code

"The question of whether a computer can think is no more interesting
than the question of whether a submarine can swim." -- Edsger Dijkstra
2026-03-09 12:01:53 -07:00
Cameron
467f890371 docs: document /api/v1/chat/async endpoint (#518) 2026-03-06 17:39:20 -08:00
Cameron
7c3ab04494 Low-risk simplification pass: bot pipeline, startup, API, onboarding, provider sync (#520) 2026-03-06 17:20:24 -08:00
Cameron
9bf19ebab4 feat: ChatGPT subscription connect flow (#487) 2026-03-05 10:16:35 -08:00
Cameron
bb0ccd65e1 docs: consolidate voice documentation into docs/voice.md (#485) 2026-03-04 16:18:37 -08:00
Jason Carreira
e7f6e85880 feat(polling): add custom prompt support for Gmail email polling (#471)
Co-authored-by: Letta Code <noreply@letta.com>
2026-03-03 11:24:58 -08:00
Cameron
3b23777b02 docs: note that skills CLI commands are directory-scoped (#473) 2026-03-03 11:16:29 -08:00
Cameron
355c96a493 fix: include WORKING_DIR/.skills/ in PATH when spawning session subprocess (#462) 2026-03-02 17:08:16 -08:00
Cameron
01edde976a docs: add skills architecture and authoring guide (#455) 2026-03-02 15:41:19 -08:00
Cameron
5a58d759e0 refactor: extract SessionManager from bot.ts (#457) 2026-03-02 14:46:00 -08:00
Cameron
b3366228ef feat: add disabled conversation mode (#453) 2026-03-02 13:01:38 -08:00
Cameron
db5630740f fix: default cron job delivery to last message target (#454) 2026-03-02 12:53:18 -08:00
Cameron
6a2493da5c feat: make streaming edits toggleable per-channel, disabled by default (#436) 2026-02-27 16:08:51 -08:00
Cameron
481b458af1 feat: cloud deployment support with inline config, Dockerfile, and admin portal (#434) 2026-02-27 15:24:17 -08:00
Cameron
35dad4dedc docs: consolidate conversation routing and document per-chat mode (#426) 2026-02-27 11:30:14 -08:00
Cameron
d11777a1a2 feat: per-agent workingDir config (#412) 2026-02-26 14:22:16 -08:00
Cameron
955bdacab7 fix: merge env var credentials into YAML channel blocks and warn on silent skip (#408) 2026-02-26 10:48:14 -08:00
Cameron
e96ddc1db1 feat: add voice memo responses via TTS (#394) 2026-02-25 16:47:33 -08:00
Cameron
cdfb7e1cd5 docs: add OpenAI-compatible API documentation (#395) 2026-02-25 10:40:41 -08:00
Cameron
1c078421c8 docs: add Open WebUI setup guide (#390) 2026-02-24 15:49:23 -08:00
Jason Carreira
69b3d165d6 Add per-channel conversation overrides (#340)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Cameron <cameron@pfiffer.org>
2026-02-24 11:14:26 -08:00
Cameron
1cad6e6508 feat(core): structured logging with pino (#368) 2026-02-23 16:35:23 -08:00
Jason Carreira
1fbd6d5a2e Add send-file directive and Discord/CLI file support (#319)
Co-authored-by: Jason Carreira <jason@visotrust.com>
Co-authored-by: Cameron <cameron@pfiffer.org>
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 15:44:34 -08:00
Cameron
7028f042af fix: display-reasoning stream fixes and Signal compatibility (#355) 2026-02-23 15:00:17 -08:00
jamesdanielwhitford
cae5b104b3 feat: add Mistral Voxtral transcription support (#228) 2026-02-23 13:37:12 -08:00
github-actions[bot]
a3c944bd13 feat: expose memfs (memory filesystem) option in lettabot config and SDK session (#336)
Adds features.memfs config key that controls whether the Letta Code CLI
receives --memfs or --no-memfs when creating/resuming SDK sessions. This
enables lettabot users to opt into git-backed memory filesystem (context
repositories) for persistent local memory sync.

- Config types: memfs?: boolean on AgentConfig.features, LettaBotConfig.features, BotConfig
- Bot wiring: baseSessionOptions() and createAgent() pass memfs to SDK when defined
- Main wiring: YAML config takes precedence, LETTABOT_MEMFS env var as fallback
- Legacy fix: conversations passthrough in single-agent normalization
- Tests: 3 memfs wiring tests (true/false/undefined), 2 conversations passthrough tests
- Docs: configuration.md section with known limitations, example YAML

Fixes #335

Written by Cameron and Letta Code

"The best way to predict the future is to implement it." -- David Heinemeier Hansson
2026-02-22 05:37:01 +01:00
Jason Carreira
4e697001c0 docs: update conversation routing and group config documentation (#318)
Adds documentation for per-channel conversation routing and updated group configuration options. Fills the gap left by the implementation PRs.

Closes #304

Written by Cameron and Letta Code

"Documentation is a love letter that you write to your future self." -- Damian Conway
2026-02-21 12:38:06 +01:00
Cameron
c083638be1 feat: remote pairing approval via API (#301) 2026-02-13 17:35:56 -08:00
Cameron
01ed38a15d feat: per-agent todo system with heartbeat integration (#288) 2026-02-12 10:23:14 -08:00
Cameron
c405c96c9d feat: add per-group allowedUsers filtering for all channels (#283) 2026-02-11 15:20:01 -08:00
Cameron
9550fc0c03 Fix cron-jobs path mismatch between CronService and lettabot-schedule (#284) 2026-02-11 14:04:26 -08:00
Cameron
e395dc58a4 docs: add group behavior and multi-bot sections to Discord setup (#282) 2026-02-11 12:23:32 -08:00
Cameron
c0f82ccd63 Merge remote-tracking branch 'origin/fix/server-api-config' into HEAD
# Conflicts:
#	docs/configuration.md
#	src/config/io.ts
#	src/main.ts
2026-02-10 20:39:54 -08:00
Charles Packer
de1adcf4fe fix: fix server terminology with mode aliases (#277) 2026-02-10 20:34:29 -08:00
Cameron
c4c8b17018 fix: support server.api config, preserve api across onboard, fix load error logging
Three bugs fixed:

1. server.api is now the canonical location for API server config (port,
   host, CORS). Users naturally nest api under server -- this now works.
   Top-level api still accepted with a deprecation warning.

2. Onboarding no longer silently drops api and attachments config when
   saving. Both interactive and non-interactive paths now preserve
   unmanaged top-level fields from the existing config.

3. When YAML parsing fails, the log no longer misleadingly says
   "Loaded from lettabot.yaml". A didLoadFail() flag enables accurate
   status reporting without changing 17+ loadConfig() call sites.

Written by Cameron ◯ Letta Code

"The map is not the territory, but a good map sure helps you find port 6702."
2026-02-10 20:16:36 -08:00
Cameron
83569d968e fix: add LETTA_AGENT_NAME env var and improve Railway docs (#275) 2026-02-10 19:55:16 -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
c410decd18 feat: unified group modes (open/listen/mention-only) (#267)
Consolidates listeningGroups and groups.requireMention into a single
groups config with explicit mode per group. Backward compatible --
legacy formats auto-normalize with deprecation warnings.

- Add shared group-mode.ts with isGroupAllowed/resolveGroupMode helpers
- Update all 5 channel adapters to use mode-based gating
- Default to mention-only for configured entries (safe), open when no config
- Listening mode now set at adapter level, bot.ts has legacy fallback
- Fix YAML large-ID parsing for groups map keys (Discord snowflakes)
- Add migration in normalizeAgents for listeningGroups + requireMention
- Add unit tests for group-mode helpers + update all gating tests
- Update docs, README, and example config

Closes #266

Written by Cameron and Letta Code

"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
2026-02-10 16:01:21 -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
Cameron
df18cba565 feat: configurable displayName prefix for agent messages in group chats (#255)
Add optional displayName field to agent config. When set, outbound
agent responses are prefixed (e.g. "💜 Signo: Hello!").

Useful in multi-agent group chats where multiple bots share a channel
and users need to tell them apart.

Closes #252

Written by Cameron ◯ Letta Code

"The details are not the details. They make the design." -- Charles Eames
2026-02-10 12:08:45 -08:00
Jason Carreira
a4934a77d4 Fix action directives parsing and reactions (#248)
* Fix action directives and reactions

* revert package-lock.json to main

Drop unrelated lockfile churn from this PR -- the peer dependency
flag changes were artifacts of a different npm version.

Written by Cameron ◯ Letta Code

"The lockfile is a contract, not a suggestion." -- every CI pipeline ever

* docs: add response directives documentation

Document the XML action directives system (introduced in #239, parsing
fixes in #248): <actions> block format, <react> directive, attribute
quoting rules, channel support matrix, emoji alias tables, streaming
holdback behavior, and extension guide.

Written by Cameron ◯ Letta Code

"Documentation is a love letter to your future self." -- Damian Conway

---------

Co-authored-by: Jason Carreira <jason@visotrust.com>
Co-authored-by: Cameron <cameron@pfiffer.org>
2026-02-10 11:40:23 -08:00
Cameron
f2ec8f60c2 feat: support multiple Gmail accounts for polling (#244)
Add multi-account Gmail polling with per-account seen tracking, updated
onboarding flow, and config/env resolution.

Based on jasoncarreira's work in #214, rebased onto current main and
cleaned up:
- parseGmailAccounts() extracted to polling/service.ts with 10 unit tests
- Per-account seen email tracking (Map<string, Set<string>>) with legacy
  migration from single-account format
- Onboarding supports multi-select for existing accounts + add new
- Config resolution: polling.gmail.accounts > integrations.google.accounts
  (legacy) > GMAIL_ACCOUNT env (comma-separated)
- GoogleAccountConfig type for per-account service selection
- Updated docs/configuration.md

Closes #214.

Written by Cameron ◯ Letta Code

"Good artists copy, great artists steal." - Pablo Picasso
2026-02-09 16:58:34 -08:00
Cameron
deb1c4532a feat: add POST /api/v1/chat endpoint for agent messaging (#242)
* feat: add POST /api/v1/chat endpoint for sending messages to agents

Adds an HTTP endpoint that accepts a JSON message, sends it to the
lettabot agent via sendToAgent(), and returns the agent's response.
This enables external systems (e.g. server-side tools in other agents)
to communicate with lettabot programmatically.

- Add ChatRequest/ChatResponse types
- Add AgentRouter interface extending MessageDeliverer with sendToAgent()
- Implement AgentRouter on LettaGateway with agent-name routing
- Add POST /api/v1/chat route with auth, validation, and JSON body parsing

Written by Cameron ◯ Letta Code

"The most profound technologies are those that disappear." -- Mark Weiser

* feat: add SSE streaming support to /api/v1/chat endpoint

When the client sends Accept: text/event-stream, the chat endpoint
streams SDK messages as SSE events instead of waiting for the full
response. Each event is a JSON StreamMsg (assistant, tool_call,
tool_result, reasoning, result). The result event signals end-of-stream.

- Export StreamMsg type from bot.ts
- Add streamToAgent() to AgentSession interface and LettaBot
- Wire streamToAgent() through LettaGateway with agent-name routing
- Add SSE path in chat route (Accept header content negotiation)
- Handle client disconnect mid-stream gracefully

Written by Cameron ◯ Letta Code

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke

* test+docs: add chat endpoint tests and API documentation

- 10 tests for POST /api/v1/chat: auth, validation, sync response,
  agent routing, SSE streaming, stream error handling
- 6 tests for gateway sendToAgent/streamToAgent routing
- Fix timingSafeEqual crash on mismatched key lengths (return 401, not 500)
- Document chat endpoint in configuration.md with sync and SSE examples
- Add Chat API link to docs/README.md index

Written by Cameron ◯ Letta Code

"First, solve the problem. Then, write the code." -- John Johnson
2026-02-09 16:53:31 -08:00
Cameron
a966315c92 fix: switch group batching from fixed timer to 5-second debounce (#237)
* fix: switch group batching from fixed timer to 5-second debounce

The old 10-minute fixed timer caused groups to feel unresponsive after
inactivity. Now uses debounce: timer resets on every new message, flushes
after 5 seconds of quiet. @mentions still flush immediately.

New config: groupDebounceSec (default 5). Old groupPollIntervalMin still
works (converted to ms) for backward compatibility.

Fixes #229

Written by Cameron ◯ Letta Code

"The user is always right. If there is a problem with the use of the system, it's the system that's wrong, not the user." -- Don Norman

* docs: add group debounce configuration reference

Document groupDebounceSec, instantGroups, and debounce behavior
in the channel configuration section.

Written by Cameron ◯ Letta Code

"Good documentation is like a good joke: if you have to explain it, it's not that good." -- Kelsey Hightower
2026-02-09 11:14:30 -08:00
Cameron
4effadccb9 merge: resolve conflict with main (multi-agent architecture)
- Keep multi-agent normalizeAgents() flow from main
- Integrate deprecation warning for agent.model from PR
- Remove model from LettaBot constructor (server-side property)
- Remove Model: display from single-agent startup log

Written by Cameron ◯ Letta Code

"The best interface is no interface." -- Golden Krishna
2026-02-09 10:52:32 -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
673f247793 feat: custom heartbeat prompt via YAML config or file (#233)
* feat: custom heartbeat prompt via YAML config or file

Wire up the existing but unused HeartbeatConfig.prompt field so users
can customize what the agent sees during heartbeats. Adds three ways
to set it: inline YAML (prompt), file-based (promptFile, re-read each
tick for live editing), and env var (HEARTBEAT_PROMPT). Also documents
the <no-reply/> opt-out behavior.

Fixes #232

Written by Cameron ◯ Letta Code

"The only way to do great work is to love what you do." -- Steve Jobs

* test: add coverage for heartbeat prompt resolution

Tests buildCustomHeartbeatPrompt and HeartbeatService prompt resolution:
- default prompt fallback
- inline prompt usage
- promptFile loading
- inline > promptFile precedence
- live reload (file re-read each tick)
- graceful fallback on missing file
- empty file falls back to default

Written by Cameron ◯ Letta Code

"The only way to do great work is to love what you do." -- Steve Jobs
2026-02-09 10:01:15 -08:00
Cameron
61a7450106 docs: multi-agent configuration reference (#223)
* docs: add multi-agent configuration reference

Document the agents[] YAML config, per-agent options, migration path
from single to multi-agent, and known limitations (#219, #220, #221).

Written by Cameron ◯ Letta Code

"Documentation is a love letter that you write to your future self." -- Damian Conway

* docs: fix channels required claim and soften isolation wording

- channels is not strictly required per-agent (validation is global)
- isolation has known exceptions, don't claim "fully isolated"

Written by Cameron ◯ Letta Code

"Clear is kind." -- Brene Brown
2026-02-08 22:36:25 -08:00
Cameron
64f12be6cd docs: add api.port config reference + Telegram message splitting note (#206)
- Document api.port/host/corsOrigin in configuration.md (example,
  reference table, and env var mapping)
- Add "Long Messages" section to telegram-setup.md noting the
  automatic 4096-char splitting behavior

Written by Cameron ◯ Letta Code

"The best time to plant a tree was 20 years ago. The second best time is now." - Chinese Proverb
2026-02-08 16:48:32 -08:00
github-actions[bot]
2fe5ebe06d feat: expose polling configuration in lettabot.yaml (#202)
Add a top-level `polling` section to lettabot.yaml for configuring
background polling (Gmail, etc.) instead of relying solely on env vars.

- Add `PollingYamlConfig` type with `enabled`, `intervalMs`, and `gmail` subsection
- Update `configToEnv()` to map new polling config to env vars
- Update `main.ts` to read from YAML config with env var fallback
- Maintain backward compat with `integrations.google` legacy path
- Document polling config in docs/configuration.md

Fixes #201

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Cameron <cpfiffer@users.noreply.github.com>
2026-02-07 13:09:05 -08:00