Commit Graph

93 Commits

Author SHA1 Message Date
cthomas
1d66f42dad feat: add non-interactive onboarding and SKILL.md (#45)
* feat: add non-interactive onboarding and SKILL.md

Add agent-friendly setup flow:
- lettabot onboard --non-interactive flag
- Reads all config from environment variables
- SKILL.md documents env-based setup for agents
- Supports all channels (Telegram, Slack, Discord, WhatsApp, Signal)
- No prompts - ideal for coding agents automating setup

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

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

* fix: address non-interactive setup issues

- Add SLACK_APP_NAME for customizable app name (defaults to LETTA_AGENT_NAME or LettaBot)
- Clarify WhatsApp requires WHATSAPP_ENABLED and WHATSAPP_SELF_CHAT to be explicit
- Document all 5 channels supported (Telegram, Slack, Discord, WhatsApp, Signal)
- Fix WhatsApp selfChat default to be explicit false

* docs: recommend non-interactive setup as primary method

Update README per review feedback to show env-based setup first.
This is simpler for most users and ideal for automation.

* docs: rewrite setup to be AI-first per feedback

Make recommended setup AI-focused:
- Show prompt to paste into AI coding assistants
- AI handles clone/install/config autonomously
- Manual wizard becomes Option 2 for human users

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-30 16:14:29 -08:00
Cameron
76ea0da8fd Send separate assistant messages as separate channel messages (#31)
* Send separate assistant messages as separate channel messages

Track assistant message UUIDs to detect when a new assistant message
starts. This allows the agent to send multiple messages in response
to a single user message, appearing as separate bubbles.

Complements the existing message-type-change detection with UUID-based
separation for consecutive assistant messages.

Written by Cameron ◯ Letta Code

"Communication works best when it's broken into digestible pieces."

* Clean up bot logging and add message bubble separation

- Remove verbose diagnostic logging (API key, base URL, node version)
- Add useful event logging: tool calls, message sends
- Add UUID-based detection for separate assistant messages
- Messages now appear as separate bubbles when UUID changes

Written by Cameron ◯ Letta Code

"Good logging tells you what happened, not what you already know."
2026-01-30 13:45:08 -08:00
Sarah Wooders
c68ead7a40 Fix heartbeat skip logic to only check user messages (#43)
- Previously heartbeats were skipped if agent had ANY recent activity
  (Gmail polling, cron jobs, other heartbeats, etc.)
- Now only skips if user sent a message in the last 5 minutes
- Added getLastUserMessageTime() to LettaBot to track user messages
- Manual /heartbeat command bypasses the skip check
- Discord /heartbeat now replies with confirmation (Telegram stays silent)

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

Co-authored-by: Letta <noreply@letta.com>
2026-01-30 10:41:52 -08:00
Cameron
365d4d00ce Add diagnostic logging for session initialization (#41)
Log API key presence, base URL, and Node version before initializing
session to help debug timeout issues like #38.

Written by Cameron ◯ Letta Code

"Debugging is twice as hard as writing the code in the first place." - Brian Kernighan
2026-01-30 08:10:53 -08:00
Sarah Wooders
d7d4edab85 Merge pull request #33 from letta-ai/caren/slack-wizard-manifest
Add Slack setup wizard with manifest-based creation
2026-01-29 23:00:49 -08:00
Sarah Wooders
f83b554f2b Merge pull request #36 from letta-ai/fix/module-not-found-error
Fix: Resolve main.js path relative to CLI file, not cwd
2026-01-29 22:59:16 -08:00
Sarah Wooders
b64aea9b61 Fix: Resolve main.js path relative to CLI file, not cwd
When running via `npx lettabot server`, the CLI was looking for
main.js/main.ts relative to process.cwd() (user's directory), but
the compiled files are in the npm cache or node_modules.

Now uses import.meta.url to find main.js in the same directory as
cli.js, which works correctly for:
- npx lettabot
- global install (npm install -g)
- local development

Fixes ERR_MODULE_NOT_FOUND error on server restart.

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 22:58:22 -08:00
Sarah Wooders
e3f4d43dc8 Merge pull request #35 from letta-ai/fix/message-bubbles-and-tool-approval
Fix message bubbles and tool approval
2026-01-29 22:58:08 -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
Cameron
fe61c8869f Fix message bubbles and tool approval
- Separate message bubbles when stream message type changes
  (e.g., assistant → tool_call → assistant now sends as separate messages)
- Track sentAnyMessage to avoid spurious "(No response from agent)"
- Add canUseTool workaround for SDK v0.0.3 bypassPermissions bug
  (see letta-ai/letta-code-sdk#10)
- Clean up verbose debug logging

Written by Cameron ◯ Letta Code

"The stream of consciousness is not a river but a series of pools." - William James
2026-01-29 21:58:02 -08:00
Caren Thomas
36ee6d7bd5 chore: update package-lock after merge 2026-01-29 18:29:54 -08:00
Caren Thomas
a7fa850b9c Merge main into slack-wizard-manifest 2026-01-29 18:29:33 -08:00
Caren Thomas
11609ea83e feat: add Slack setup wizard with manifest-based creation
3-step wizard using Slack manifest URL:
- Step 1: Create app from manifest (scopes/events/Socket Mode pre-configured)
- Step 2: Install to workspace + copy Bot Token
- Step 3: Get App-Level Token from Socket Mode
- Token validation with success summary
- Manual entry path also gets validation
- Shared validators between flows
- Total time: ~2 minutes

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 18:23:31 -08:00
Cameron
ba196714cc Fix model being overwritten on every message (#32)
The model option was being passed to resumeSession on every message,
causing the SDK to update the agent's model configuration each time.
This resulted in the agent's model being reset to the config default
(e.g., glm-4.7) on every incoming message.

Now model is only passed when creating a new agent, not when resuming
an existing one.

Written by Cameron ◯ Letta Code

"The best code is no code at all." - Jeff Atwood
2026-01-29 18:06:49 -08:00
Cameron
75d18c70b3 Add Apache 2.0 LICENSE file (#30) 2026-01-29 17:18:26 -08:00
Cameron
10aee9bb4b Add Discord setup documentation (#29)
- Create docs/discord-setup.md with full setup guide
- Update README to include Discord in channel list
- Add Discord to network architecture table
2026-01-29 16:52:47 -08:00
cpacker
c176a74533 fix: use correct path for tsx fallback in server command
When running `lettabot server` without a built dist/ directory, the
fallback to tsx was using a path relative to import.meta.url. This
resolved to dist/main.ts when running from the compiled CLI, but that
file doesn't exist (only dist/main.js exists after compilation).

Changed to use an absolute path to src/main.ts for the development
fallback.

Fixes #28

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 16:39:28 -08:00
Cameron
2b8499a220 Fix WhatsApp self-chat bypassing pairing check (#27)
Self-chat messages were incorrectly triggering pairing requests because
the access check didn't skip for self-chat messages.

Added `&& !isSelfChat` to the access check condition so self-chat
messages bypass pairing entirely.

Written by Cameron ◯ Letta Code

"The simplest solution is usually the correct one." - Occam
2026-01-29 16:37:02 -08:00
Cameron
14b1d82e72 Clarify WhatsApp self-chat mode in onboarding (#23)
* Improve Discord onboarding with detailed setup instructions

- Add step-by-step instructions for creating Discord bot
- Include guidance on enabling Message Content Intent
- Show OAuth2 URL Generator steps with required permissions
- Auto-generate invite URL after user enters bot token
  (extracts application ID from token and builds URL with correct permissions)

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

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

* Clarify WhatsApp and Signal self-chat mode in onboarding

Changed confusing yes/no prompts to clearer selects:

WhatsApp:
- "Dedicated bot number" - Responds to all incoming messages
- "My personal number" - Only responds to "Message Yourself" chat

Signal (new):
- "Dedicated bot number" - Responds to all incoming messages
- "My personal number" - Only responds to "Note to Self" chat

This makes it clear what each option actually does.

Written by Cameron ◯ Letta Code

"The question is not what you look at, but what you see." - Thoreau

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-29 15:41:04 -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
Cameron
ccc13f4242 Improve Discord onboarding with detailed setup instructions (#22)
- Add step-by-step instructions for creating Discord bot
- Include guidance on enabling Message Content Intent
- Show OAuth2 URL Generator steps with required permissions
- Auto-generate invite URL after user enters bot token
  (extracts application ID from token and builds URL with correct permissions)

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

Co-authored-by: Letta <noreply@letta.com>
2026-01-29 15:31:24 -08:00
Cameron
46ba1a26cc Fix onboarding to preserve existing channel selections (#21)
- Pre-select channels that are already enabled when re-running onboarding
- Improves Discord setup instructions with step-by-step guide
- Better placeholder text for Discord bot token

Previously, re-running onboarding would wipe existing channel configs.

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

Co-authored-by: Letta <noreply@letta.com>
2026-01-29 15:09:28 -08:00
Cameron
c3a19584ce Add Home Assistant documentation to README (#18)
Documents how to install and enable the homeassistant skill from ClawdHub.
The skill sync workflow already supports this - just needed documentation.

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

Co-authored-by: Letta <noreply@letta.com>
2026-01-29 14:43:29 -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
Cameron
0804367d4b Merge pull request #17 from letta-ai/fix/remove-debug-logs
Remove debug stream logging
2026-01-29 13:14:12 -08:00
Cameron
fa8b2f0311 Remove debug stream logging from bot.ts
These console.logs were useful during development but are noisy in production.

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 13:13:41 -08:00
Charles Packer
487a735530 Merge pull request #12 from letta-ai/caren/add-slack-setup-wizard
feat: add interactive Slack setup wizard
2026-01-29 12:02:30 -08:00
Charles Packer
5e3c0840a2 Merge pull request #11 from letta-ai/fix/format-hints
Re-add format hints to message envelope
2026-01-29 12:02:20 -08:00
Charles Packer
3c730c9f43 Merge pull request #10 from letta-ai/fix/npx-instructions
Fix CLI instructions to use npx prefix
2026-01-29 12:02:12 -08:00
Caren Thomas
1747347036 feat: add interactive Slack setup wizard
- Step-by-step guided setup through all 7 Slack configuration steps
- Opens browser automatically to api.slack.com/apps
- Clear instructions for each screen (app creation, Socket Mode, scopes, events, App Home, install)
- Token validation with Slack API auth.test endpoint
- Shows bot username and workspace after validation
- Input validation for xapp- and xoxb- token formats
- Option to use wizard or fall back to manual token entry
- Wizard is opt-in during onboarding (defaults yes for new setups)

Improves UX over static docs link - users now get guided through the full process with validation at each step.

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 11:47:08 -08:00
Cameron
732e4826a5 Re-add format hints to message envelope
Shows agent what formatting syntax each channel supports:
- Slack: *bold* _italic_ `code`
- Telegram: *bold* _italic_ `code` [links](url)
- WhatsApp: *bold* _italic_ `code`
- Signal: ONLY *bold* _italic_ `code`

This helps the agent use appropriate formatting for each channel.

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 11:22:17 -08:00
Cameron
9d135f160c Fix CLI instructions to use npx prefix
Changed "lettabot server" to "npx lettabot server" in:
- Onboarding completion message
- Logout completion message

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

Co-Authored-By: Letta <noreply@letta.com>
2026-01-29 10:55:04 -08:00
Sarah Wooders
9a4f104d4e Merge pull request #8 from letta-ai/sarahwooders-patch-3
Update README.md
2026-01-29 10:48:55 -08:00
Sarah Wooders
cb057cc806 Merge pull request #9 from letta-ai/feat/yaml-config-and-skills
cleanup `lettabot skills`
2026-01-29 10:48:37 -08:00
Sarah Wooders
4df4bc7311 Fix: Discover skills in order clawdhub → vercel → builtin (first source wins) 2026-01-29 10:48:03 -08:00
Sarah Wooders
a90ee728b9 Fix: ClawdHub skills dir is ~/clawd/skills 2026-01-29 10:48:03 -08:00
Sarah Wooders
4730b220c7 Reorder skills: ClawdHub, Vercel, Built-in 2026-01-29 10:48:03 -08:00
Sarah Wooders
6c64520694 Fix: ClawdHub skills dir is ~/.letta/skills 2026-01-29 10:48:03 -08:00
Sarah Wooders
cc7d5bedfe Segment skills dropdown by source (builtin, ClawdHub, Vercel) 2026-01-29 10:48:03 -08:00
Sarah Wooders
51c59e4265 Remove format hints from message envelope 2026-01-29 10:48:03 -08:00
Sarah Wooders
8ceb572ae2 Update README.md 2026-01-29 10:29:40 -08:00
Sarah Wooders
9b590d4eb7 Fix: Discover skills in order clawdhub → vercel → builtin (first source wins) 2026-01-29 10:19:36 -08:00
Sarah Wooders
9caade05e3 Fix: ClawdHub skills dir is ~/clawd/skills 2026-01-29 10:09:36 -08:00
Sarah Wooders
3d0025d080 Reorder skills: ClawdHub, Vercel, Built-in 2026-01-29 10:06:29 -08:00
Sarah Wooders
a6b9470218 Fix: ClawdHub skills dir is ~/.letta/skills 2026-01-29 10:05:17 -08:00
Sarah Wooders
f8d4aec60a Update README.md 2026-01-29 09:55:41 -08:00
Sarah Wooders
dc1a6d2a72 Update README.md 2026-01-29 09:54:24 -08:00
Sarah Wooders
4e9a3b2bc1 Segment skills dropdown by source (builtin, ClawdHub, Vercel) 2026-01-29 09:52:51 -08:00
Sarah Wooders
50a3d3ce5e Update README.md 2026-01-29 09:46:38 -08:00
Sarah Wooders
83cf35a88e Merge pull request #7 from letta-ai/sarahwooders-patch-2
Update README.md
2026-01-28 23:59:57 -08:00