Commit Graph

12 Commits

Author SHA1 Message Date
Cameron
5a58d759e0 refactor: extract SessionManager from bot.ts (#457) 2026-03-02 14:46:00 -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
1c078421c8 docs: add Open WebUI setup guide (#390) 2026-02-24 15:49:23 -08:00
Charles Packer
de1adcf4fe fix: fix server terminology with mode aliases (#277) 2026-02-10 20:34:29 -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
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
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
002fa48b2a docs: add releasing guide (#177)
Documents the automated release workflow:
- How to tag and push releases
- Pre-release detection (alpha/beta/rc)
- Versioning strategy (semver)
- Release checklist
- Links to npm publish tracking issue (#174)

Written by Cameron ◯ Letta Code

"Ship it." - GitHub
2026-02-05 15:13:19 -08:00
Cameron
257da79e94 fix: allow selfhosted mode without LETTA_API_KEY (#160)
Users were confused why selfhosted mode still required an API key.
The validation check now properly skips the API key requirement when
server.mode is 'selfhosted'.

Also adds comprehensive selfhosted-setup.md guide covering:
- Letta Docker server setup
- Network configuration (Docker, remote servers)
- Troubleshooting (connection refused, stuck agent, tool approvals)
- Running as a service (systemd, launchd)
- Hardware requirements

Thanks to oculairthebear for the community guide that inspired this.

Written by Cameron and Letta Code

"I've learned that people will forget what you said, people will forget
what you did, but people will never forget how you made them feel."
- Maya Angelou
2026-02-05 10:27:33 -08:00
Cameron
4dea01406e docs: add Telegram setup guide link to README (#103)
Written by Cameron ◯ Letta Code

"The beginning of wisdom is the definition of terms." - Socrates
2026-02-03 13:39:09 -08:00
Cameron
7b6a730df2 docs: comprehensive documentation audit and improvements (#90)
Fixes and updates:
- README.md: Remove duplicate heartbeat troubleshooting section
- docs/getting-started.md: Fix Node version (18→20), commands, repo URL
- docs/commands.md: Rewrite with accurate command list (/start, /status, /heartbeat)
- docs/README.md: New multi-channel architecture diagram
- docs/whatsapp-setup.md: Add selfChatMode safety docs, media support section
- docs/slack-setup.md: Fix broken links

New documentation:
- docs/configuration.md: Complete YAML config reference
- docs/cron-setup.md: Scheduling guide (cron jobs + heartbeats)

Written by Cameron ◯ Letta Code

"Documentation is a love letter that you write to your future self." - Damian Conway
2026-02-02 22:36:06 -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