alvin-bot 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +43 -0
- package/BACKLOG.md +223 -0
- package/CHANGELOG.md +63 -0
- package/CLAUDE.example.md +152 -0
- package/CODE_OF_CONDUCT.md +52 -0
- package/CONTRIBUTING.md +72 -0
- package/LICENSE +21 -0
- package/README.md +529 -0
- package/SECURITY.md +38 -0
- package/SOUL.example.md +60 -0
- package/TOOLS.example.md +42 -0
- package/alvin-bot.config.example.json +24 -0
- package/bin/cli.js +1088 -0
- package/dist/.metadata_never_index +0 -0
- package/dist/claude.js +102 -0
- package/dist/config.js +65 -0
- package/dist/engine.js +90 -0
- package/dist/find-claude-binary.js +98 -0
- package/dist/handlers/commands.js +1489 -0
- package/dist/handlers/document.js +187 -0
- package/dist/handlers/message.js +200 -0
- package/dist/handlers/photo.js +154 -0
- package/dist/handlers/platform-message.js +275 -0
- package/dist/handlers/video.js +237 -0
- package/dist/handlers/voice.js +148 -0
- package/dist/i18n.js +299 -0
- package/dist/index.js +442 -0
- package/dist/init-data-dir.js +81 -0
- package/dist/middleware/auth.js +215 -0
- package/dist/migrate.js +139 -0
- package/dist/paths.js +87 -0
- package/dist/platforms/discord.js +161 -0
- package/dist/platforms/index.js +130 -0
- package/dist/platforms/signal.js +205 -0
- package/dist/platforms/slack.js +318 -0
- package/dist/platforms/telegram.js +111 -0
- package/dist/platforms/types.js +8 -0
- package/dist/platforms/whatsapp.js +648 -0
- package/dist/providers/claude-sdk-provider.js +173 -0
- package/dist/providers/codex-cli-provider.js +121 -0
- package/dist/providers/index.js +7 -0
- package/dist/providers/openai-compatible.js +388 -0
- package/dist/providers/registry.js +209 -0
- package/dist/providers/tool-executor.js +450 -0
- package/dist/providers/types.js +205 -0
- package/dist/services/access.js +144 -0
- package/dist/services/asset-index.js +230 -0
- package/dist/services/browser-manager.js +161 -0
- package/dist/services/browser.js +121 -0
- package/dist/services/compaction.js +129 -0
- package/dist/services/cron.js +462 -0
- package/dist/services/custom-tools.js +317 -0
- package/dist/services/delivery-queue.js +154 -0
- package/dist/services/elevenlabs.js +58 -0
- package/dist/services/embeddings.js +386 -0
- package/dist/services/exec-guard.js +46 -0
- package/dist/services/fallback-order.js +151 -0
- package/dist/services/heartbeat.js +192 -0
- package/dist/services/hooks.js +44 -0
- package/dist/services/imagegen.js +72 -0
- package/dist/services/language-detect.js +144 -0
- package/dist/services/markdown.js +63 -0
- package/dist/services/mcp.js +252 -0
- package/dist/services/memory.js +133 -0
- package/dist/services/personality.js +227 -0
- package/dist/services/plugins.js +171 -0
- package/dist/services/reminders.js +97 -0
- package/dist/services/restart.js +48 -0
- package/dist/services/security-audit.js +66 -0
- package/dist/services/self-search.js +129 -0
- package/dist/services/session.js +93 -0
- package/dist/services/skills.js +287 -0
- package/dist/services/standing-orders.js +29 -0
- package/dist/services/subagents.js +142 -0
- package/dist/services/sudo.js +243 -0
- package/dist/services/telegram.js +113 -0
- package/dist/services/tool-discovery.js +214 -0
- package/dist/services/usage-tracker.js +137 -0
- package/dist/services/users.js +199 -0
- package/dist/services/voice.js +95 -0
- package/dist/tui/index.js +507 -0
- package/dist/web/canvas.js +30 -0
- package/dist/web/doctor-api.js +606 -0
- package/dist/web/openai-compat.js +252 -0
- package/dist/web/server.js +1351 -0
- package/dist/web/setup-api.js +1078 -0
- package/docs/mcp.example.json +16 -0
- package/docs/screenshots/00-Login.png +0 -0
- package/docs/screenshots/01-Chat-Dark-Conversation.png +0 -0
- package/docs/screenshots/02-Chat.png +0 -0
- package/docs/screenshots/03-Dashboard-Overview.png +0 -0
- package/docs/screenshots/04-AI-Models-and-Providers.png +0 -0
- package/docs/screenshots/05-Personality-Editor.png +0 -0
- package/docs/screenshots/06-Memory-Manager.png +0 -0
- package/docs/screenshots/07-Active-Sessions.png +0 -0
- package/docs/screenshots/08-File-Browser.png +0 -0
- package/docs/screenshots/09-Scheduled-Jobs.png +0 -0
- package/docs/screenshots/10-Custom-Tools.png +0 -0
- package/docs/screenshots/11-Plugins-and-MCP.png +0 -0
- package/docs/screenshots/12-Messaging-Platforms.png +0 -0
- package/docs/screenshots/12.1-Messaging-Platforms-WhatsApp-Groups-List.png +0 -0
- package/docs/screenshots/12.2-Messaging-Platforms-WA-Group-Details.png +0 -0
- package/docs/screenshots/13-User-Management.png +0 -0
- package/docs/screenshots/14-Web-Terminal.png +0 -0
- package/docs/screenshots/15-Maintenance-and-Health.png +0 -0
- package/docs/screenshots/16-Settings-and-Env.png +0 -0
- package/docs/screenshots/TG-commands.png +0 -0
- package/docs/screenshots/TG.png +0 -0
- package/docs/screenshots/_Mac-Installer.png +0 -0
- package/docs/tools.example.json +33 -0
- package/install.sh +165 -0
- package/package.json +190 -0
- package/plugins/calendar/index.js +270 -0
- package/plugins/email/index.js +231 -0
- package/plugins/finance/index.js +254 -0
- package/plugins/notes/index.js +227 -0
- package/plugins/smarthome/index.js +230 -0
- package/plugins/weather/index.js +122 -0
- package/skills/apple-notes/SKILL.md +31 -0
- package/skills/browse/SKILL.md +136 -0
- package/skills/code-project/SKILL.md +43 -0
- package/skills/data-analysis/SKILL.md +39 -0
- package/skills/document-creation/SKILL.md +48 -0
- package/skills/email-summary/SKILL.md +46 -0
- package/skills/github/SKILL.md +42 -0
- package/skills/summarize/SKILL.md +28 -0
- package/skills/system-admin/SKILL.md +39 -0
- package/skills/weather/SKILL.md +34 -0
- package/skills/web-research/SKILL.md +35 -0
- package/web/public/canvas.html +52 -0
- package/web/public/css/style.css +555 -0
- package/web/public/index.html +189 -0
- package/web/public/js/app.js +3102 -0
- package/web/public/js/i18n.js +1048 -0
- package/web/public/js/icons.js +104 -0
- package/web/public/login.html +48 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Email Summary
|
|
3
|
+
description: Create professional email summaries and daily digests
|
|
4
|
+
triggers: email summary, email digest, mail zusammenfassung, mails zusammenfassen, email übersicht, inbox summary, email report
|
|
5
|
+
priority: 5
|
|
6
|
+
category: productivity
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Email Summary Skill
|
|
10
|
+
|
|
11
|
+
When creating email summaries or daily digests:
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
1. **Fetch emails** using available tools (osascript for Apple Mail, himalaya for IMAP)
|
|
15
|
+
2. **Summarize YOURSELF** — you ARE the AI, do NOT call external LLM APIs
|
|
16
|
+
3. **Structure** the output clearly (by account, by priority, by topic)
|
|
17
|
+
4. **Deliver** in the requested format (text, PDF, or both)
|
|
18
|
+
|
|
19
|
+
## Summary Guidelines
|
|
20
|
+
- **1-2 sentences per email** — capture the core message, skip fluff
|
|
21
|
+
- **Language:** Match the user's preferred language
|
|
22
|
+
- **Prioritize:** Flag urgent/action-required emails prominently
|
|
23
|
+
- **Group by:** Account → Read status (unread first) → Time
|
|
24
|
+
|
|
25
|
+
## Apple Mail Access (macOS)
|
|
26
|
+
```bash
|
|
27
|
+
osascript -e '
|
|
28
|
+
tell application "Mail"
|
|
29
|
+
set output to ""
|
|
30
|
+
repeat with acct in accounts
|
|
31
|
+
set acctName to name of acct
|
|
32
|
+
repeat with mb in mailboxes of acct
|
|
33
|
+
if name of mb is "INBOX" then
|
|
34
|
+
set msgs to (messages of mb whose date received > (current date) - 1 * days)
|
|
35
|
+
repeat with m in msgs
|
|
36
|
+
set output to output & acctName & " | " & sender of m & " | " & subject of m & " | " & (date received of m as string) & " | " & (read status of m as string) & linefeed
|
|
37
|
+
end repeat
|
|
38
|
+
end if
|
|
39
|
+
end repeat
|
|
40
|
+
end repeat
|
|
41
|
+
return output
|
|
42
|
+
end tell'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## PDF Generation
|
|
46
|
+
If a PDF is requested, create an HTML file and convert it. Use a clean, professional design.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: GitHub
|
|
3
|
+
description: Manage GitHub issues, PRs, and repos via gh CLI
|
|
4
|
+
triggers: github, gh, issue, pull request, pr, repository, repo, merge, branch
|
|
5
|
+
priority: 6
|
|
6
|
+
category: development
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# GitHub via gh CLI
|
|
10
|
+
|
|
11
|
+
Use the GitHub CLI (`gh`) for all GitHub operations.
|
|
12
|
+
|
|
13
|
+
## Issues
|
|
14
|
+
```bash
|
|
15
|
+
gh issue list
|
|
16
|
+
gh issue create --title "Title" --body "Body"
|
|
17
|
+
gh issue view 123
|
|
18
|
+
gh issue close 123
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Pull Requests
|
|
22
|
+
```bash
|
|
23
|
+
gh pr list
|
|
24
|
+
gh pr create --title "Title" --body "Body"
|
|
25
|
+
gh pr view 123
|
|
26
|
+
gh pr merge 123
|
|
27
|
+
gh pr checks 123
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Repository
|
|
31
|
+
```bash
|
|
32
|
+
gh repo view
|
|
33
|
+
gh repo clone owner/repo
|
|
34
|
+
gh release list
|
|
35
|
+
gh release create v1.0.0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Search
|
|
39
|
+
```bash
|
|
40
|
+
gh search issues "query" --repo owner/repo
|
|
41
|
+
gh search prs "query"
|
|
42
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Summarize
|
|
3
|
+
description: Summarize URLs, documents, PDFs, and long text
|
|
4
|
+
triggers: summarize, zusammenfassen, summary, zusammenfassung, tldr, tl;dr, digest
|
|
5
|
+
priority: 7
|
|
6
|
+
category: research
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Summarization Workflow
|
|
10
|
+
|
|
11
|
+
## URL Summarization
|
|
12
|
+
1. Fetch content: `curl -sL URL | head -c 50000`
|
|
13
|
+
2. Summarize the text directly (YOU are the LLM — no external API needed)
|
|
14
|
+
3. Present: Key points, main arguments, conclusion
|
|
15
|
+
|
|
16
|
+
## PDF Summarization
|
|
17
|
+
1. Extract text: `pdftotext file.pdf -` or `python3 -c "..."`
|
|
18
|
+
2. Summarize directly
|
|
19
|
+
3. If too long: chunk into sections, summarize each, then meta-summarize
|
|
20
|
+
|
|
21
|
+
## Long Text
|
|
22
|
+
1. If under 10,000 chars: summarize directly
|
|
23
|
+
2. If over 10,000 chars: split into logical sections, summarize each, combine
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
- **One-line summary** (1 sentence)
|
|
27
|
+
- **Key Points** (3-5 bullets)
|
|
28
|
+
- **Details** (if requested, 2-3 paragraphs)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: System Administration
|
|
3
|
+
description: Server management, deployment, monitoring
|
|
4
|
+
triggers: server, deploy, deployment, pm2, nginx, ssh, vps, docker, systemctl, service, logs, monitor, disk space, cpu, memory usage
|
|
5
|
+
priority: 3
|
|
6
|
+
category: devops
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# System Administration Skill
|
|
10
|
+
|
|
11
|
+
When managing servers and deployments:
|
|
12
|
+
|
|
13
|
+
## Health Check Pattern
|
|
14
|
+
```bash
|
|
15
|
+
# System overview
|
|
16
|
+
uptime && free -h && df -h / && top -bn1 | head -5
|
|
17
|
+
|
|
18
|
+
# PM2 processes
|
|
19
|
+
pm2 list && pm2 logs --lines 10 --nostream
|
|
20
|
+
|
|
21
|
+
# Nginx
|
|
22
|
+
nginx -t && systemctl status nginx
|
|
23
|
+
|
|
24
|
+
# Docker
|
|
25
|
+
docker ps && docker stats --no-stream
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Deployment Checklist
|
|
29
|
+
1. **Build** locally first — never deploy broken code
|
|
30
|
+
2. **Backup** config files before changing them
|
|
31
|
+
3. **Test** after deploy — check logs, hit endpoints
|
|
32
|
+
4. **Rollback plan** — know how to undo your changes
|
|
33
|
+
|
|
34
|
+
## Guidelines
|
|
35
|
+
- **Always check before changing** — read config files before editing
|
|
36
|
+
- **Backup first** — `cp file file.bak-$(date +%Y%m%d-%H%M%S)`
|
|
37
|
+
- **PM2 env vars** — use `ecosystem.config.cjs` + `--update-env`, never raw `pm2 start`
|
|
38
|
+
- **Logs first** — when debugging, always check logs before guessing
|
|
39
|
+
- **One change at a time** — don't change 5 things and wonder which broke it
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Weather
|
|
3
|
+
description: Get weather forecasts and conditions
|
|
4
|
+
triggers: weather, wetter, forecast, vorhersage, temperature, temperatur, rain, regen, wind
|
|
5
|
+
priority: 4
|
|
6
|
+
category: utility
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Weather
|
|
10
|
+
|
|
11
|
+
## Quick Weather
|
|
12
|
+
```bash
|
|
13
|
+
curl -s "wttr.in/Berlin?format=%l:+%c+%t+%w+%h"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Detailed Forecast
|
|
17
|
+
```bash
|
|
18
|
+
curl -s "wttr.in/Berlin?lang=de"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Specific Location
|
|
22
|
+
```bash
|
|
23
|
+
curl -s "wttr.in/LOCATION?format=3"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Machine-Readable
|
|
27
|
+
```bash
|
|
28
|
+
curl -s "wttr.in/Berlin?format=j1" | python3 -c "import sys,json; d=json.load(sys.stdin); print(json.dumps(d['current_condition'][0], indent=2))"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
- Default city: Berlin (unless user specifies another)
|
|
33
|
+
- Language detection: use `?lang=de` for German users
|
|
34
|
+
- For multi-day: use `wttr.in/CITY?3` for 3-day forecast
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Web Research
|
|
3
|
+
description: Deep web research with source aggregation and summarization
|
|
4
|
+
triggers: research, recherche, find information, look up, search for, herausfinden, web search, deep dive
|
|
5
|
+
priority: 3
|
|
6
|
+
category: research
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web Research Skill
|
|
10
|
+
|
|
11
|
+
When conducting web research:
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
1. **Search** — use curl/web_fetch to search and fetch relevant pages
|
|
15
|
+
2. **Read & extract** — parse the content, extract key information
|
|
16
|
+
3. **Synthesize YOURSELF** — combine findings into a coherent summary
|
|
17
|
+
4. **Cite sources** — always include URLs for claims
|
|
18
|
+
|
|
19
|
+
## Search Pattern
|
|
20
|
+
```bash
|
|
21
|
+
# Google via web scraping
|
|
22
|
+
curl -sL "https://www.google.com/search?q=QUERY&hl=en" | python3 -c "
|
|
23
|
+
import sys, re
|
|
24
|
+
html = sys.stdin.read()
|
|
25
|
+
for m in re.finditer(r'<a href=\"/url\?q=(https?://[^&\"]+)', html):
|
|
26
|
+
print(m.group(1))
|
|
27
|
+
" | head -5
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Guidelines
|
|
31
|
+
- **Multiple sources** — never rely on a single source
|
|
32
|
+
- **Recency** — prefer recent results for time-sensitive topics
|
|
33
|
+
- **Summarize** — don't dump raw page content, distill the key findings
|
|
34
|
+
- **Structure** — organize by subtopic or relevance
|
|
35
|
+
- **Bias check** — note if sources are promotional or one-sided
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Alvin Bot — Canvas</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
9
|
+
body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0a0a0a; color: #e0e0e0; height: 100vh; display: flex; flex-direction: column; }
|
|
10
|
+
#toolbar { background: #1a1a1a; padding: 8px 16px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #333; }
|
|
11
|
+
#toolbar .status { font-size: 12px; color: #888; margin-left: auto; }
|
|
12
|
+
#toolbar .status.connected { color: #4ade80; }
|
|
13
|
+
#canvas-container { flex: 1; position: relative; overflow: auto; }
|
|
14
|
+
#render-frame { width: 100%; height: 100%; border: none; background: white; }
|
|
15
|
+
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: #555; font-size: 18px; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="toolbar">
|
|
20
|
+
<strong>Canvas</strong>
|
|
21
|
+
<span class="status" id="status">Disconnected</span>
|
|
22
|
+
</div>
|
|
23
|
+
<div id="canvas-container">
|
|
24
|
+
<div class="empty-state" id="empty">Waiting for content from Alvin Bot...</div>
|
|
25
|
+
<iframe id="render-frame" style="display:none" sandbox="allow-scripts allow-same-origin"></iframe>
|
|
26
|
+
</div>
|
|
27
|
+
<script>
|
|
28
|
+
const ws = new WebSocket(`ws://${location.host}/canvas/ws`);
|
|
29
|
+
const status = document.getElementById("status");
|
|
30
|
+
const empty = document.getElementById("empty");
|
|
31
|
+
const frame = document.getElementById("render-frame");
|
|
32
|
+
|
|
33
|
+
ws.onopen = () => { status.textContent = "Connected"; status.className = "status connected"; };
|
|
34
|
+
ws.onclose = () => { status.textContent = "Disconnected"; status.className = "status"; };
|
|
35
|
+
|
|
36
|
+
ws.onmessage = (event) => {
|
|
37
|
+
const msg = JSON.parse(event.data);
|
|
38
|
+
if (msg.type === "present") {
|
|
39
|
+
empty.style.display = "none";
|
|
40
|
+
frame.style.display = "block";
|
|
41
|
+
frame.srcdoc = msg.html;
|
|
42
|
+
} else if (msg.type === "eval") {
|
|
43
|
+
try { frame.contentWindow.eval(msg.js); } catch (e) { console.error("Canvas eval error:", e); }
|
|
44
|
+
} else if (msg.type === "clear") {
|
|
45
|
+
frame.style.display = "none";
|
|
46
|
+
empty.style.display = "flex";
|
|
47
|
+
frame.srcdoc = "";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
</script>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|