create-walle 0.9.0 → 0.9.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.
Files changed (45) hide show
  1. package/README.md +23 -7
  2. package/package.json +3 -3
  3. package/template/CLAUDE.md +14 -1
  4. package/template/claude-task-manager/bin/restart-ctm.sh +3 -2
  5. package/template/claude-task-manager/db.js +38 -0
  6. package/template/claude-task-manager/public/css/walle.css +123 -0
  7. package/template/claude-task-manager/public/index.html +962 -69
  8. package/template/claude-task-manager/public/js/walle.js +374 -121
  9. package/template/claude-task-manager/public/prompts.html +84 -26
  10. package/template/claude-task-manager/public/walle-icon.svg +45 -0
  11. package/template/claude-task-manager/server.js +69 -4
  12. package/template/docs/openclaw-vs-walle-comparison.md +103 -0
  13. package/template/package.json +1 -1
  14. package/template/wall-e/agent.js +63 -3
  15. package/template/wall-e/api-walle.js +42 -0
  16. package/template/wall-e/brain.js +182 -5
  17. package/template/wall-e/channels/imessage-channel.js +4 -1
  18. package/template/wall-e/channels/slack-channel.js +3 -1
  19. package/template/wall-e/chat.js +106 -224
  20. package/template/wall-e/context/compactor.js +163 -0
  21. package/template/wall-e/context/context-builder.js +355 -0
  22. package/template/wall-e/context/state-snapshot.js +209 -0
  23. package/template/wall-e/context/token-counter.js +55 -0
  24. package/template/wall-e/context/topic-matcher.js +79 -0
  25. package/template/wall-e/core-tasks.js +24 -0
  26. package/template/wall-e/events/event-bus.js +23 -0
  27. package/template/wall-e/loops/ingest.js +4 -0
  28. package/template/wall-e/loops/initiative.js +316 -0
  29. package/template/wall-e/loops/tasks.js +55 -5
  30. package/template/wall-e/skills/_bundled/email-sync/run.js +3 -1
  31. package/template/wall-e/skills/_bundled/morning-briefing/run.js +41 -0
  32. package/template/wall-e/skills/_bundled/proactive-alerts/SKILL.md +20 -0
  33. package/template/wall-e/skills/_bundled/proactive-alerts/run.js +144 -0
  34. package/template/wall-e/skills/_bundled/slack-mentions/.watched-threads.json +18 -0
  35. package/template/wall-e/skills/_bundled/slack-mentions/.watermark.json +4 -0
  36. package/template/wall-e/skills/_bundled/slack-mentions/SKILL.md +52 -0
  37. package/template/wall-e/skills/_bundled/slack-mentions/run.js +470 -0
  38. package/template/wall-e/skills/_bundled/weekly-reflection/SKILL.md +69 -0
  39. package/template/wall-e/tests/brain.test.js +4 -4
  40. package/template/wall-e/tests/compactor.test.js +323 -0
  41. package/template/wall-e/tests/context-builder.test.js +215 -0
  42. package/template/wall-e/tests/event-bus.test.js +74 -0
  43. package/template/wall-e/tests/initiative.test.js +354 -0
  44. package/template/wall-e/tests/proactive-alerts.test.js +140 -0
  45. package/template/wall-e/tests/session-persistence.test.js +335 -0
package/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # create-walle
2
2
 
3
- Set up **Wall-E** your personal digital twin. An AI agent that learns from your Slack, email, and calendar to build a searchable second brain.
3
+ Set up **CTM + Wall-E** in one command.
4
+
5
+ **CTM** (Claude Task Manager) is a web-based dashboard for running and managing Claude Code sessions. It includes a terminal multiplexer, prompt editor, task queue, and code review panel — all in the browser.
6
+
7
+ **Wall-E** is your personal digital twin. An AI agent that learns from your Slack, email, and calendar to build a searchable second brain. It comes with bundled skills (morning briefing, weekly reflection, proactive alerts, and more) and a chat interface with tool-use.
8
+
9
+ Together they run as a single server: CTM on the main port, Wall-E on port+1.
4
10
 
5
11
  ## Install
6
12
 
@@ -13,11 +19,11 @@ This copies the project, installs dependencies, auto-detects your name and timez
13
19
  ## Commands
14
20
 
15
21
  ```bash
16
- npx create-walle install <dir> # Install Wall-E (or update if already installed)
22
+ npx create-walle install <dir> # Install CTM + Wall-E (or update if already installed)
17
23
  npx create-walle update # Update to latest version, keep your config
18
24
  npx create-walle start # Start as background service (auto-restarts on reboot)
19
25
  npx create-walle stop # Stop the service
20
- npx create-walle status # Check if Wall-E is running
26
+ npx create-walle status # Check if running
21
27
  npx create-walle logs # Tail the service logs
22
28
  npx create-walle uninstall # Remove the auto-start service
23
29
  npx create-walle -v # Show version
@@ -62,10 +68,20 @@ Wall-E API runs on `CTM_PORT + 1` (e.g., 5001).
62
68
 
63
69
  ## What's Included
64
70
 
65
- - **CTM Dashboard** — terminal multiplexer, prompt editor, task manager, code review
66
- - **Wall-E Agent**ingest/think/reflect loops, 7 bundled skills, chat with tool-use
67
- - **Brain DB**SQLite with full-text search across Slack, email, calendar
68
- - **Multi-device**share data via Dropbox/iCloud, sessions tagged by hostname
71
+ **CTM Dashboard:**
72
+ - Terminal multiplexerrun multiple Claude Code sessions side by side
73
+ - Prompt editorsave, organize, and queue prompts to Claude
74
+ - Task queue automated prompt execution with auto/manual modes
75
+ - Code review panel — session insights and review workflows
76
+ - Live session status — Running/Waiting/Idle indicators with scroll-up support during active output
77
+
78
+ **Wall-E Agent:**
79
+ - Ingest/think/reflect loops that continuously learn from your data
80
+ - 12 bundled skills (morning briefing, weekly reflection, proactive alerts, slack mentions, email sync, and more)
81
+ - Chat with tool-use — search memories, run skills, call MCP servers
82
+ - Brain DB — SQLite with full-text search across Slack, email, calendar
83
+ - Intelligence engine — context-aware compaction, initiative scoring, proactive briefings
84
+ - Multi-device — share data via Dropbox/iCloud, sessions tagged by hostname
69
85
 
70
86
  ## Links
71
87
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-walle",
3
- "version": "0.9.0",
4
- "description": "Wall-E — your personal digital twin. AI agent that learns from Slack, email & calendar. Includes dashboard, chat, and 7 bundled skills.",
3
+ "version": "0.9.1",
4
+ "description": "CTM + Wall-E — Claude Task Manager dashboard and your personal digital twin AI agent. Terminal multiplexer, prompt editor, task queue, and an agent that learns from Slack, email & calendar.",
5
5
  "bin": {
6
6
  "create-walle": "bin/create-walle.js"
7
7
  },
@@ -15,5 +15,5 @@
15
15
  "prepublishOnly": "bash build.sh"
16
16
  },
17
17
  "license": "MIT",
18
- "keywords": ["wall-e", "ai", "digital-twin", "claude", "personal-assistant"]
18
+ "keywords": ["ctm", "task-manager", "wall-e", "ai", "digital-twin", "claude", "personal-assistant"]
19
19
  }
@@ -5,8 +5,21 @@
5
5
  NEVER kill CTM or Wall-E processes directly (e.g. `kill`, `lsof | xargs kill`, `pkill`).
6
6
  Always use the restart API or helper script — they handle graceful shutdown and auto-respawn.
7
7
 
8
- - **Restart CTM**: `bash claude-task-manager/bin/restart-ctm.sh` or `curl -sX POST http://localhost:3456/api/restart/ctm`
8
+ - **Restart CTM**: `bash claude-task-manager/bin/restart-ctm.sh` or `curl -sX POST http://localhost:3456/api/restart/ctm?force=true`
9
9
  - **Restart Wall-E**: `curl -sX POST http://localhost:3456/api/restart/walle`
10
10
  - **Stop Wall-E**: `curl -sX POST http://localhost:3456/api/stop/walle`
11
11
  - **Start Wall-E**: `curl -sX POST http://localhost:3456/api/start/walle`
12
12
  - **Check status**: `curl -s http://localhost:3456/api/services/status`
13
+
14
+ ## CTM Development — CRITICAL SAFETY RULE
15
+
16
+ **NEVER test code changes against the primary instance (port 3456/3457).**
17
+ The primary instance is the user's live workbench — restarting or testing against it
18
+ kills all active sessions. This applies to ALL operations: curl, fetch, restart, etc.
19
+
20
+ When developing CTM or Wall-E code:
21
+ 1. Use the `/ctm-dev` skill (or run it manually)
22
+ 2. Pick a random port pair: `DEV_CTM_PORT=$((4100 + RANDOM % 900))`
23
+ 3. Start a dev instance: `DEV_CTM_PORT=$port DEV_WALLE_PORT=$((port+1)) bash bin/dev.sh`
24
+ 4. Test ONLY against your dev port, never 3456
25
+ 5. Only restart primary when the user explicitly asks — and ask for confirmation first
@@ -1,12 +1,13 @@
1
1
  #!/bin/bash
2
2
  # Graceful CTM restart — spawns a watcher process, then exits cleanly.
3
3
  # Use this instead of killing the process directly.
4
- curl -s -X POST "http://localhost:3456/api/restart/ctm" | cat
4
+ CTM_PORT="${CTM_PORT:-3456}"
5
+ curl -s -X POST "http://localhost:${CTM_PORT}/api/restart/ctm?force=true" | cat
5
6
  echo ""
6
7
  echo "CTM server restarting... waiting for it to come back."
7
8
  sleep 2
8
9
  for i in $(seq 1 15); do
9
- if curl -sf "http://localhost:3456/api/services/status" > /dev/null 2>&1; then
10
+ if curl -sf "http://localhost:${CTM_PORT}/api/services/status" > /dev/null 2>&1; then
10
11
  echo "CTM server is back up."
11
12
  exit 0
12
13
  fi
@@ -594,6 +594,21 @@ function runMigrations() {
594
594
  if (!scCols2.find(c => c.name === 'hostname')) {
595
595
  getDb().prepare("ALTER TABLE session_conversations ADD COLUMN hostname TEXT DEFAULT ''").run();
596
596
  }
597
+
598
+ // startup_tasks: tracks active sessions for crash-safe restore on restart
599
+ const hasStartupTasks = getDb().prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='startup_tasks'").get();
600
+ if (!hasStartupTasks) {
601
+ getDb().exec(`
602
+ CREATE TABLE startup_tasks (
603
+ session_id TEXT PRIMARY KEY,
604
+ label TEXT NOT NULL DEFAULT '',
605
+ cmd TEXT NOT NULL DEFAULT '',
606
+ args TEXT NOT NULL DEFAULT '[]',
607
+ cwd TEXT NOT NULL DEFAULT '',
608
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
609
+ )
610
+ `);
611
+ }
597
612
  }
598
613
 
599
614
  // --- Settings CRUD ---
@@ -1699,6 +1714,28 @@ function getInsightsData(includeInternal) {
1699
1714
  };
1700
1715
  }
1701
1716
 
1717
+ // --- Startup Tasks (crash-safe session restore) ---
1718
+ function addStartupTask(sessionId, label, cmd, args, cwd) {
1719
+ getDb().prepare(
1720
+ 'INSERT OR REPLACE INTO startup_tasks (session_id, label, cmd, args, cwd) VALUES (?, ?, ?, ?, ?)'
1721
+ ).run(sessionId, label || '', cmd || '', JSON.stringify(args || []), cwd || '');
1722
+ }
1723
+
1724
+ function removeStartupTask(sessionId) {
1725
+ getDb().prepare('DELETE FROM startup_tasks WHERE session_id = ?').run(sessionId);
1726
+ }
1727
+
1728
+ function listStartupTasks() {
1729
+ return getDb().prepare('SELECT * FROM startup_tasks ORDER BY created_at').all().map(row => ({
1730
+ ...row,
1731
+ args: JSON.parse(row.args || '[]'),
1732
+ }));
1733
+ }
1734
+
1735
+ function clearStartupTasks() {
1736
+ getDb().prepare('DELETE FROM startup_tasks').run();
1737
+ }
1738
+
1702
1739
  module.exports = {
1703
1740
  initDb, getDb, closeDb, getDbPath: () => currentDbPath,
1704
1741
  getSetting, getSettingsByPrefix, setSetting,
@@ -1729,5 +1766,6 @@ module.exports = {
1729
1766
  replaceInsightRecommendations, listInsightRecommendations,
1730
1767
  startAnalysisRun, completeAnalysisRun, getLastAnalysisRun,
1731
1768
  getInsightsData,
1769
+ addStartupTask, removeStartupTask, listStartupTasks, clearStartupTasks,
1732
1770
  DEFAULT_IMAGES_DIR, BACKUP_DIR,
1733
1771
  };
@@ -7,6 +7,7 @@
7
7
  border-bottom: 1px solid var(--border); flex-shrink: 0;
8
8
  }
9
9
  .walle-header-title { font-size: 15px; font-weight: 700; color: var(--fg); }
10
+ .walle-avatar { vertical-align: middle; margin-right: 2px; position: relative; top: -1px; }
10
11
 
11
12
  .walle-subnav { display: flex; gap: 4px; margin-left: auto; }
12
13
  .walle-subnav-btn {
@@ -541,6 +542,25 @@
541
542
  .we-task-group[open] > .we-task-group-header::before { transform: rotate(90deg); }
542
543
  .we-task-group-header:hover { background: rgba(255,255,255,0.03); }
543
544
 
545
+ /* View tabs */
546
+ .we-view-tabs {
547
+ display: flex; align-items: center; gap: 2px;
548
+ padding: 4px 10px 0; border-bottom: 1px solid var(--border, #2a2a3e);
549
+ }
550
+ .we-view-tab {
551
+ padding: 6px 14px; border: none; background: transparent;
552
+ color: var(--fg-muted, #888); font-size: 12px; font-weight: 500;
553
+ cursor: pointer; border-bottom: 2px solid transparent;
554
+ border-radius: 4px 4px 0 0; transition: all 0.15s;
555
+ }
556
+ .we-view-tab:hover { color: var(--fg, #e0e0e0); background: rgba(255,255,255,0.04); }
557
+ .we-view-tab.active { color: var(--accent, #60a5fa); border-bottom-color: var(--accent, #60a5fa); font-weight: 600; }
558
+ .we-view-tab-badge {
559
+ display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
560
+ text-align: center; font-size: 10px; font-weight: 700; border-radius: 8px;
561
+ background: #e03131; color: #fff; margin-left: 4px; padding: 0 4px;
562
+ }
563
+
544
564
  /* Task card */
545
565
  .we-task-card {
546
566
  background: var(--bg-lighter, #1e1e2e);
@@ -549,7 +569,10 @@
549
569
  border-radius: 6px;
550
570
  padding: 10px 14px;
551
571
  margin: 6px 10px;
572
+ transition: padding 0.15s;
552
573
  }
574
+ .we-task-card.compact { padding: 6px 14px; }
575
+ .we-task-card.compact .we-task-card-header { margin-bottom: 0; }
553
576
  .we-task-card-header {
554
577
  display: flex; justify-content: space-between; align-items: center;
555
578
  margin-bottom: 4px;
@@ -575,6 +598,106 @@
575
598
  .we-task-meta-extra { display: none; }
576
599
  .we-task-meta.we-meta-expanded .we-task-meta-extra { display: contents; }
577
600
 
601
+ /* Compact metadata line */
602
+ .we-task-meta-compact {
603
+ display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
604
+ font-size: 11px; color: #777; margin-top: 2px;
605
+ }
606
+ .we-task-meta-compact span { white-space: nowrap; }
607
+
608
+ /* Source icons */
609
+ .we-src-icon {
610
+ display: inline-block; padding: 1px 5px; border-radius: 3px;
611
+ font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
612
+ }
613
+ .we-src-icon.slack { background: #1a2e1a; color: #4ade80; }
614
+ .we-src-icon.chat { background: #1a1a3e; color: #60a5fa; }
615
+ .we-src-icon.init { background: #2e1a2e; color: #c084fc; }
616
+ .we-src-link {
617
+ color: #60a5fa; text-decoration: none; font-size: 11px;
618
+ }
619
+ .we-src-link:hover { text-decoration: underline; }
620
+
621
+ /* Slack thread info panel */
622
+ .we-slack-info { margin: 8px 0 4px; }
623
+ .we-slack-thread-status {
624
+ display: flex; align-items: center; gap: 8px;
625
+ padding: 6px 10px; margin-top: 6px;
626
+ background: rgba(255,255,255,0.03); border-radius: 6px;
627
+ font-size: 12px;
628
+ }
629
+ .we-thread-badge {
630
+ font-weight: 600; font-size: 11px;
631
+ padding: 2px 8px; border-radius: 10px;
632
+ }
633
+ .we-thread-badge.active { background: #1a2e1a; color: #4ade80; }
634
+ .we-thread-badge.expired { background: #2a2a2a; color: #888; }
635
+ .we-thread-expires { color: #888; font-size: 11px; }
636
+
637
+ /* Compact inline action buttons */
638
+ .we-compact-actions { display: inline-flex; gap: 4px; margin-left: auto; }
639
+ .we-compact-btn {
640
+ width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);
641
+ background: transparent; color: #888; font-size: 11px; cursor: pointer;
642
+ display: inline-flex; align-items: center; justify-content: center;
643
+ transition: all 0.15s;
644
+ }
645
+ .we-compact-btn:hover { background: rgba(255,255,255,0.08); color: #ccc; }
646
+ .we-compact-btn.run:hover { color: #4ade80; border-color: #4ade80; }
647
+ .we-compact-btn.stop:hover { color: #e03131; border-color: #e03131; }
648
+
649
+ /* Task context menu */
650
+ .we-task-menu {
651
+ background: #1e1e2e; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
652
+ min-width: 140px; padding: 4px 0; z-index: 1000;
653
+ box-shadow: 0 4px 16px rgba(0,0,0,0.5);
654
+ }
655
+ .we-task-menu-item {
656
+ padding: 6px 12px; font-size: 12px; color: #ccc; cursor: pointer;
657
+ white-space: nowrap;
658
+ }
659
+ .we-task-menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
660
+ .we-task-menu-item.danger { color: #e03131; }
661
+ .we-task-menu-item.danger:hover { background: rgba(224,49,49,0.15); }
662
+
663
+ /* Automation table view */
664
+ .we-auto-health {
665
+ display: flex; gap: 12px; padding: 8px 10px; margin-bottom: 4px;
666
+ font-size: 12px; font-weight: 500;
667
+ }
668
+ .we-auto-health-item.ok { color: #5c940d; }
669
+ .we-auto-health-item.paused { color: #888; }
670
+ .we-auto-health-item.failed { color: #e03131; }
671
+
672
+ .we-auto-table {
673
+ width: 100%; border-collapse: collapse; font-size: 12px;
674
+ }
675
+ .we-auto-table th {
676
+ text-align: left; padding: 6px 10px; color: #666; font-weight: 500;
677
+ font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
678
+ border-bottom: 1px solid var(--border, #2a2a3e);
679
+ }
680
+ .we-auto-row {
681
+ cursor: pointer; transition: background 0.1s;
682
+ }
683
+ .we-auto-row:hover { background: rgba(255,255,255,0.03); }
684
+ .we-auto-row.expanded { background: rgba(59,130,246,0.05); }
685
+ .we-auto-row td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); }
686
+ .we-auto-title { color: var(--fg, #e0e0e0); font-weight: 500; }
687
+ .we-auto-sched { color: #888; }
688
+ .we-auto-last { color: #777; }
689
+ .we-auto-actions { text-align: right; }
690
+ .we-auto-btn {
691
+ padding: 2px 8px; font-size: 10px; border-radius: 3px; cursor: pointer;
692
+ border: 1px solid rgba(255,255,255,0.1); background: transparent; color: #888;
693
+ }
694
+ .we-auto-btn:hover { background: rgba(255,255,255,0.08); color: #ccc; }
695
+ .we-auto-detail td {
696
+ padding: 0 10px 12px 10px;
697
+ background: rgba(59,130,246,0.03);
698
+ border-bottom: 1px solid var(--border, #2a2a3e);
699
+ }
700
+
578
701
  /* Chat date separator */
579
702
  .we-chat-date-sep { text-align: center; color: var(--fg-dim, #666); font-size: 11px; padding: 12px 0 4px; position: relative; }
580
703
  .we-chat-date-sep::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255,255,255,0.06); }