clew-code 0.2.4 → 0.2.5

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 (57) hide show
  1. package/README.md +264 -292
  2. package/dist/clew-dev.js +5118 -2840
  3. package/dist/main.js +2358 -2133
  4. package/docs/_config.yml +1 -1
  5. package/docs/architecture.html +145 -166
  6. package/docs/architecture.th.html +2 -23
  7. package/docs/commands.html +1 -22
  8. package/docs/commands.th.html +1 -22
  9. package/docs/configuration.html +145 -166
  10. package/docs/configuration.th.html +2 -23
  11. package/docs/css/styles.css +22 -0
  12. package/docs/daemon.html +128 -160
  13. package/docs/daemon.th.html +2 -30
  14. package/docs/features/bridge-mode.html +98 -98
  15. package/docs/features/bridge-mode.th.html +1 -1
  16. package/docs/features/evals.html +181 -181
  17. package/docs/features/evals.th.html +1 -1
  18. package/docs/features/searxng-search.html +150 -150
  19. package/docs/features/searxng-search.th.html +1 -1
  20. package/docs/features/sentry-setup.html +156 -156
  21. package/docs/features/sentry-setup.th.html +1 -1
  22. package/docs/index.html +298 -333
  23. package/docs/index.th.html +1 -36
  24. package/docs/installation.html +103 -124
  25. package/docs/installation.th.html +2 -23
  26. package/docs/internals/growthbook-ab-testing.html +112 -112
  27. package/docs/internals/growthbook-ab-testing.th.html +1 -1
  28. package/docs/internals/hidden-features.html +147 -147
  29. package/docs/internals/hidden-features.th.html +1 -1
  30. package/docs/js/main.js +78 -7
  31. package/docs/loop.html +180 -0
  32. package/docs/loop.th.html +226 -0
  33. package/docs/mcp.html +246 -157
  34. package/docs/mcp.th.html +156 -60
  35. package/docs/models.html +1 -22
  36. package/docs/models.th.html +1 -22
  37. package/docs/peer.html +235 -0
  38. package/docs/peer.th.html +279 -0
  39. package/docs/permission-model.html +101 -122
  40. package/docs/permission-model.th.html +2 -23
  41. package/docs/plugins.html +101 -122
  42. package/docs/plugins.th.html +2 -23
  43. package/docs/providers.html +117 -138
  44. package/docs/providers.th.html +2 -23
  45. package/docs/quick-start.html +92 -120
  46. package/docs/quick-start.th.html +1 -29
  47. package/docs/research-memory.html +79 -111
  48. package/docs/research-memory.th.html +2 -30
  49. package/docs/skills.html +116 -137
  50. package/docs/skills.th.html +2 -23
  51. package/docs/taste.html +96 -29
  52. package/docs/taste.th.html +193 -54
  53. package/docs/tools.html +169 -190
  54. package/docs/tools.th.html +2 -23
  55. package/docs/troubleshooting.html +105 -126
  56. package/docs/troubleshooting.th.html +2 -23
  57. package/package.json +2 -2
package/docs/daemon.html CHANGED
@@ -1,160 +1,128 @@
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>Autonomous Daemon — Clew</title>
7
- <meta name="description" content="24/7 autonomous background execution — task queue, agent loop, supervisor integration, and recurring tasks.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header">
16
- <div class="header-inner">
17
- <a href="index.html" class="logo">
18
- <span>Clew Code</span>
19
- </a>
20
- <nav class="header-nav">
21
- <a href="index.html">Home</a>
22
- <a href="index.html#features">Features</a>
23
- <a href="index.html#commands">Commands</a>
24
- <a href="quick-start.html" class="active">Docs</a>
25
- <a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
26
- <div class="lang-wrap">
27
- <button class="lang-btn">🌐</button>
28
- <div class="lang-menu">
29
- <a href="../readme/README.zh.md">中文</a>
30
- <a href="../readme/README.th.md">ไทย</a>
31
- <a href="../readme/README.ja.md">日本語</a>
32
- <a href="../readme/README.ko.md">한국어</a>
33
- <a href="../readme/README.es.md">Español</a>
34
- <a href="../readme/README.fr.md">Français</a>
35
- <a href="../readme/README.de.md">Deutsch</a>
36
- <a href="../readme/README.pt.md">Português</a>
37
- <a href="../readme/README.vi.md">Tiếng Việt</a>
38
- <a href="../readme/README.id.md">Bahasa Indonesia</a>
39
- <a href="../readme/README.ru.md">Русский</a>
40
- <a href="../readme/README.hi.md">हिन्दी</a>
41
- <a href="../README.md">English</a>
42
- </div>
43
- </div>
44
- </nav>
45
- <button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button>
46
- </div>
47
- </header>
48
- <div class="app">
49
- <aside class="sidebar" id="sidebar"></aside>
50
- <div class="sidebar-overlay" id="sidebarOverlay"></div>
51
- <div class="content-wrap">
52
- <main class="content">
53
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Daemon Mode</span></div>
54
- <h1>Autonomous Daemon Mode</h1>
55
- <p class="section-subtitle">Run Clew as a 24/7 background daemon task queue, agent loop, health checks, and supervisor auto-respawn for unattended autonomous operation.</p>
56
-
57
- <p>The autonomous system lives in <code>src/services/autonomous/</code> and consists of four main components: the <strong>task queue</strong>, <strong>agent loop</strong>, <strong>daemon entry point</strong>, and <strong>supervisor integration</strong>.</p>
58
-
59
- <h2>Architecture</h2>
60
- <pre><code> + Task Queue (taskQueue.ts)
61
- | File-backed persistent queue
62
- | Priorities Leases Dead-letter
63
- |
64
- + Agent Loop (agentLoop.ts)
65
- | Dequeue Spawn worker Monitor Retry
66
- |
67
- + Daemon Mode (daemonMode.ts)
68
- | Background process entry point
69
- |
70
- + Supervisor (supervisorIntegration.ts)
71
- Health checks Auto-respawn State tracking</code></pre>
72
-
73
- <h2>Task Queue</h2>
74
- <p>The file-backed persistent queue (<code>src/services/autonomous/taskQueue.ts</code>) is the foundation of the autonomous system:</p>
75
- <ul>
76
- <li><strong>Persistence</strong> — Tasks survive process restarts via on-disk storage</li>
77
- <li><strong>Priorities</strong> — Urgent tasks skip ahead in the queue</li>
78
- <li><strong>Leases</strong> — Tasks are leased to workers with TTL; expired leases are retried</li>
79
- <li><strong>Dead-letter</strong> — Tasks that exhaust retries are moved to dead-letter for inspection</li>
80
- <li><strong>Scheduling</strong> — One-shot and recurring (cron) tasks supported</li>
81
- </ul>
82
-
83
- <h2>Agent Loop</h2>
84
- <p>The continuous agent loop (<code>src/services/autonomous/agentLoop.ts</code>) runs in the background:</p>
85
- <ol>
86
- <li><strong>Dequeue</strong> Pull the highest-priority ready task</li>
87
- <li><strong>Spawn worker</strong> Launch a worker session for the task</li>
88
- <li><strong>Monitor</strong> — Track progress, streaming output, and resource usage</li>
89
- <li><strong>Retry or complete</strong> — On failure, retry with backoff; on success, record result</li>
90
- <li><strong>Repeat</strong> — Check for new tasks and repeat the cycle</li>
91
- </ol>
92
-
93
- <h2>Daemon Entry Point</h2>
94
- <p><code>src/services/autonomous/daemonMode.ts</code> provides the background process entry point. When started in daemon mode, Clew:</p>
95
- <ul>
96
- <li>Detaches from the terminal and runs as a background process</li>
97
- <li>Logs output to a configurable log file</li>
98
- <li>Responds to signals for graceful shutdown</li>
99
- <li>Reports status to the supervisor for health tracking</li>
100
- </ul>
101
-
102
- <h2>Supervisor Integration</h2>
103
- <p><code>src/services/autonomous/supervisorIntegration.ts</code> ensures the daemon stays running:</p>
104
- <ul>
105
- <li><strong>Health checks</strong> — Periodic heartbeat and resource checks</li>
106
- <li><strong>Auto-respawn</strong> — Automatic restart on unexpected exit</li>
107
- <li><strong>State tracking</strong> — Current status, running tasks, error counts</li>
108
- <li><strong>Graceful degradation</strong> — Reduces polling frequency on repeated failures</li>
109
- </ul>
110
-
111
- <h2>Commands</h2>
112
- <table>
113
- <tr><th>Command</th><th>Description</th></tr>
114
- <tr><td><code>/daemon</code></td><td>Open interactive control panel; subcommands: start, stop, status, restart</td></tr>
115
- <tr><td><code>/task</code></td><td>Create scheduled or recurring tasks via interactive form</td></tr>
116
- <tr><td><code>/task list</code></td><td>List queued, running, and completed tasks</td></tr>
117
- <tr><td><code>/loop</code></td><td>Run a prompt or command on a recurring interval (<code>/loop 5m /check-deploy</code>)</td></tr>
118
- <tr><td><code>/agents</code></td><td>Manage agent configurations and daemon worker pools</td></tr>
119
- <tr><td><code>/tasks</code></td><td>List and manage background agent tasks</td></tr>
120
- </table>
121
-
122
- <h2>Task Scheduling</h2>
123
- <p>Scheduled tasks can be created through the interactive <code>/task</code> form or programmatically. Storage modes:</p>
124
- <ul>
125
- <li><strong>Durable</strong> — Persists to <code>.claude/scheduled_tasks.json</code>, survives restarts</li>
126
- <li><strong>Session-only</strong> — Kept in memory for the current session only</li>
127
- </ul>
128
-
129
- <p>Recurring tasks auto-expire after 30 days. One-shot tasks auto-delete after firing. Custom cron expressions are supported (standard 5-field format).</p>
130
-
131
- <pre><code>/task
132
- Name: Deploy health check
133
- Schedule: Daily
134
- Time: 09:00
135
- Prompt: Check deployment status and report
136
- Storage: Durable</code></pre>
137
-
138
- <h2>Architecture Files</h2>
139
- <table>
140
- <tr><th>File</th><th>Role</th></tr>
141
- <tr><td><code>src/services/autonomous/taskQueue.ts</code></td><td>Persistent task queue with priorities, leases, dead-letter</td></tr>
142
- <tr><td><code>src/services/autonomous/agentLoop.ts</code></td><td>Continuous 24/7 agent loop</td></tr>
143
- <tr><td><code>src/services/autonomous/daemonMode.ts</code></td><td>Background daemon entry point</td></tr>
144
- <tr><td><code>src/services/autonomous/supervisorIntegration.ts</code></td><td>Health checks, auto-respawn, state tracking</td></tr>
145
- </table>
146
-
147
- <footer class="footer">
148
- <span>Clew v0.1.2 — Open Source</span>
149
- <div class="footer-links">
150
- <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
151
- <a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
152
- </div>
153
- </footer>
154
- </main>
155
- <nav class="toc-sidebar"></nav>
156
- </div>
157
- </div>
158
- <script src="js/main.js"></script>
159
- </body>
160
- </html>
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>Autonomous Daemon — Clew</title>
7
+ <meta name="description" content="24/7 autonomous background execution — task queue, agent loop, supervisor integration, and recurring tasks.">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="css/styles.css">
12
+ <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
+ </head>
14
+ <body>
15
+ <header class="header"></header>
16
+ <div class="app">
17
+ <aside class="sidebar" id="sidebar"></aside>
18
+ <div class="sidebar-overlay" id="sidebarOverlay"></div>
19
+ <div class="content-wrap">
20
+ <main class="content">
21
+ <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Daemon Mode</span></div>
22
+ <h1>Autonomous Daemon Mode</h1>
23
+ <p class="section-subtitle">Run Clew as a 24/7 background daemon — task queue, agent loop, health checks, and supervisor auto-respawn for unattended autonomous operation.</p>
24
+
25
+ <p>The autonomous system lives in <code>src/services/autonomous/</code> and consists of four main components: the <strong>task queue</strong>, <strong>agent loop</strong>, <strong>daemon entry point</strong>, and <strong>supervisor integration</strong>.</p>
26
+
27
+ <h2>Architecture</h2>
28
+ <pre><code> + Task Queue (taskQueue.ts)
29
+ | File-backed persistent queue
30
+ | Priorities Leases Dead-letter
31
+ |
32
+ + Agent Loop (agentLoop.ts)
33
+ | Dequeue Spawn worker Monitor Retry
34
+ |
35
+ + Daemon Mode (daemonMode.ts)
36
+ | Background process entry point
37
+ |
38
+ + Supervisor (supervisorIntegration.ts)
39
+ Health checks Auto-respawn State tracking</code></pre>
40
+
41
+ <h2>Task Queue</h2>
42
+ <p>The file-backed persistent queue (<code>src/services/autonomous/taskQueue.ts</code>) is the foundation of the autonomous system:</p>
43
+ <ul>
44
+ <li><strong>Persistence</strong> — Tasks survive process restarts via on-disk storage</li>
45
+ <li><strong>Priorities</strong> Urgent tasks skip ahead in the queue</li>
46
+ <li><strong>Leases</strong> — Tasks are leased to workers with TTL; expired leases are retried</li>
47
+ <li><strong>Dead-letter</strong> — Tasks that exhaust retries are moved to dead-letter for inspection</li>
48
+ <li><strong>Scheduling</strong> — One-shot and recurring (cron) tasks supported</li>
49
+ </ul>
50
+
51
+ <h2>Agent Loop</h2>
52
+ <p>The continuous agent loop (<code>src/services/autonomous/agentLoop.ts</code>) runs in the background:</p>
53
+ <ol>
54
+ <li><strong>Dequeue</strong> Pull the highest-priority ready task</li>
55
+ <li><strong>Spawn worker</strong> Launch a worker session for the task</li>
56
+ <li><strong>Monitor</strong> — Track progress, streaming output, and resource usage</li>
57
+ <li><strong>Retry or complete</strong> On failure, retry with backoff; on success, record result</li>
58
+ <li><strong>Repeat</strong> — Check for new tasks and repeat the cycle</li>
59
+ </ol>
60
+
61
+ <h2>Daemon Entry Point</h2>
62
+ <p><code>src/services/autonomous/daemonMode.ts</code> provides the background process entry point. When started in daemon mode, Clew:</p>
63
+ <ul>
64
+ <li>Detaches from the terminal and runs as a background process</li>
65
+ <li>Logs output to a configurable log file</li>
66
+ <li>Responds to signals for graceful shutdown</li>
67
+ <li>Reports status to the supervisor for health tracking</li>
68
+ </ul>
69
+
70
+ <h2>Supervisor Integration</h2>
71
+ <p><code>src/services/autonomous/supervisorIntegration.ts</code> ensures the daemon stays running:</p>
72
+ <ul>
73
+ <li><strong>Health checks</strong> — Periodic heartbeat and resource checks</li>
74
+ <li><strong>Auto-respawn</strong> Automatic restart on unexpected exit</li>
75
+ <li><strong>State tracking</strong> — Current status, running tasks, error counts</li>
76
+ <li><strong>Graceful degradation</strong> — Reduces polling frequency on repeated failures</li>
77
+ </ul>
78
+
79
+ <h2>Commands</h2>
80
+ <table>
81
+ <tr><th>Command</th><th>Description</th></tr>
82
+ <tr><td><code>/daemon</code></td><td>Open interactive control panel; subcommands: start, stop, status, restart</td></tr>
83
+ <tr><td><code>/task</code></td><td>Create scheduled or recurring tasks via interactive form</td></tr>
84
+ <tr><td><code>/task list</code></td><td>List queued, running, and completed tasks</td></tr>
85
+ <tr><td><code>/loop</code></td><td>Run a prompt or command on a recurring interval (<code>/loop 5m /check-deploy</code>)</td></tr>
86
+ <tr><td><code>/agents</code></td><td>Manage agent configurations and daemon worker pools</td></tr>
87
+ <tr><td><code>/tasks</code></td><td>List and manage background agent tasks</td></tr>
88
+ </table>
89
+
90
+ <h2>Task Scheduling</h2>
91
+ <p>Scheduled tasks can be created through the interactive <code>/task</code> form or programmatically. Storage modes:</p>
92
+ <ul>
93
+ <li><strong>Durable</strong> Persists to <code>.claude/scheduled_tasks.json</code>, survives restarts</li>
94
+ <li><strong>Session-only</strong> Kept in memory for the current session only</li>
95
+ </ul>
96
+
97
+ <p>Recurring tasks auto-expire after 30 days. One-shot tasks auto-delete after firing. Custom cron expressions are supported (standard 5-field format).</p>
98
+
99
+ <pre><code>/task
100
+ Name: Deploy health check
101
+ Schedule: Daily
102
+ Time: 09:00
103
+ Prompt: Check deployment status and report
104
+ Storage: Durable</code></pre>
105
+
106
+ <h2>Architecture Files</h2>
107
+ <table>
108
+ <tr><th>File</th><th>Role</th></tr>
109
+ <tr><td><code>src/services/autonomous/taskQueue.ts</code></td><td>Persistent task queue with priorities, leases, dead-letter</td></tr>
110
+ <tr><td><code>src/services/autonomous/agentLoop.ts</code></td><td>Continuous 24/7 agent loop</td></tr>
111
+ <tr><td><code>src/services/autonomous/daemonMode.ts</code></td><td>Background daemon entry point</td></tr>
112
+ <tr><td><code>src/services/autonomous/supervisorIntegration.ts</code></td><td>Health checks, auto-respawn, state tracking</td></tr>
113
+ </table>
114
+
115
+ <footer class="footer">
116
+ <span>Clew Code v0.2.4 Open Source</span>
117
+ <div class="footer-links">
118
+ <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
119
+ <a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
120
+ </div>
121
+ </footer>
122
+ </main>
123
+ <nav class="toc-sidebar"></nav>
124
+ </div>
125
+ </div>
126
+ <script src="js/main.js"></script>
127
+ </body>
128
+ </html>
@@ -12,35 +12,7 @@
12
12
  <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
13
  </head>
14
14
  <body>
15
- <header class="header">
16
- <div class="header-inner">
17
- <a href="index.th.html" class="logo">
18
- <span>Clew Code</span>
19
- </a>
20
- <nav class="header-nav">
21
- <a href="index.th.html">หน้าแรก</a><a href="index.th.html#features">ฟีเจอร์</a><a href="index.th.html#commands">คำสั่ง</a><a href="quick-start.th.html" class="active">เอกสาร</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
22
- <div class="lang-wrap">
23
- <button class="lang-btn">🌐</button>
24
- <div class="lang-menu">
25
- <a href="../readme/README.zh.md">中文</a>
26
- <a href="../readme/README.th.md">ไทย</a>
27
- <a href="../readme/README.ja.md">日本語</a>
28
- <a href="../readme/README.ko.md">한국어</a>
29
- <a href="../readme/README.es.md">Español</a>
30
- <a href="../readme/README.fr.md">Français</a>
31
- <a href="../readme/README.de.md">Deutsch</a>
32
- <a href="../readme/README.pt.md">Português</a>
33
- <a href="../readme/README.vi.md">Tiếng Việt</a>
34
- <a href="../readme/README.id.md">Bahasa Indonesia</a>
35
- <a href="../readme/README.ru.md">Русский</a>
36
- <a href="../readme/README.hi.md">हिन्दी</a>
37
- <a href="daemon.html">English</a>
38
- </div>
39
- </div>
40
- </nav>
41
- <button class="menu-btn" id="menuToggle" aria-label="เปิด/ปิดเมนู"><span></span><span></span><span></span></button>
42
- </div>
43
- </header>
15
+ <header class="header"></header>
44
16
  <div class="app">
45
17
  <aside class="sidebar" id="sidebar"></aside>
46
18
  <div class="sidebar-overlay" id="sidebarOverlay"></div>
@@ -85,7 +57,7 @@
85
57
  </table>
86
58
 
87
59
  <footer class="footer">
88
- <span>Clew v0.1.2 — โอเพนซอร์ส</span>
60
+ <span>Clew Code v0.2.4 — โอเพนซอร์ส</span>
89
61
  <div class="footer-links">
90
62
  <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
91
63
  <a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>
@@ -1,98 +1,98 @@
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>Bridge Mode — Remote Control & Collaboration — Clew</title>
7
- <meta name="description" content="WebSocket remote control and collaboration for Clew.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="../css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="../assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header">
16
- <div class="header-inner">
17
- <a href="../index.html" class="logo">
18
- <span>Clew Code</span>
19
- </a>
20
- <nav class="header-nav">
21
- <a href="../index.html">Home</a>
22
- <a href="../index.html#features">Features</a>
23
- <a href="../index.html#commands">Commands</a>
24
- <a href="../quick-start.html" class="active">Docs</a>
25
- <a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
26
- <div class="lang-wrap">
27
- <button class="lang-btn">🌐</button>
28
- <div class="lang-menu">
29
- <a href="../../readme/README.zh.md">中文</a>
30
- <a href="../../readme/README.th.md">ไทย</a>
31
- <a href="../../readme/README.ja.md">日本語</a>
32
- <a href="../../readme/README.ko.md">한국어</a>
33
- <a href="../../readme/README.es.md">Español</a>
34
- <a href="../../readme/README.fr.md">Français</a>
35
- <a href="../../readme/README.de.md">Deutsch</a>
36
- <a href="../../readme/README.pt.md">Português</a>
37
- <a href="../../readme/README.vi.md">Tiếng Việt</a>
38
- <a href="../../readme/README.id.md">Bahasa Indonesia</a>
39
- <a href="../../readme/README.ru.md">Русский</a>
40
- <a href="../../readme/README.hi.md">हिन्दी</a>
41
- <a href="../../README.md">English</a>
42
- </div>
43
- </div>
44
- </nav>
45
- <button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button>
46
- </div>
47
- </header>
48
- <div class="app">
49
- <aside class="sidebar" id="sidebar"></aside>
50
- <div class="sidebar-overlay" id="sidebarOverlay"></div>
51
- <div class="content-wrap">
52
- <main class="content">
53
- <div class="breadcrumbs"><a href="../index.html">Home</a><span class="sep">/</span><a href="../index.html#features">Features</a><span class="sep">/</span><span>Bridge Mode</span></div>
54
- <h1>Bridge Mode</h1>
55
- <p class="section-subtitle">Remote Control &amp; Remote Collaboration</p>
56
-
57
- <div class="callout callout-info">
58
- <strong>Bridge Mode</strong> exposes a remote control surface over a WebSocket connection. It is designed to be used by a mobile/web app to send commands and receive information from a running Clew session.
59
- </div>
60
-
61
- <h2>Architecture</h2>
62
- <p>Bridge mode creates a WebSocket server that runs alongside the main Clew session. Remote clients connect to this server and can send slash commands, receive responses, and interact with the running session. The bridge also supports session sharing for team collaboration.</p>
63
-
64
- <h2>Quick Start</h2>
65
- <pre><code># Enable bridge mode
66
- export BRIDGE_MODE=1
67
- claude --bridge
68
-
69
- # Connect from another terminal
70
- claude --remote ws://localhost:18790</code></pre>
71
-
72
- <h2>Features</h2>
73
- <ul>
74
- <li><strong>Remote Control</strong> — Send commands from mobile/web/CLI clients</li>
75
- <li><strong>Session Sharing</strong> — Share your session with team members</li>
76
- <li><strong>Team Onboarding</strong> — Invite teammates to collaborate</li>
77
- <li><strong>Secure</strong> — OAuth-based authentication for remote connections</li>
78
- </ul>
79
-
80
- <div class="callout callout-warn">
81
- <strong>Security Note</strong>
82
- Bridge mode is designed for trusted networks. Use appropriate security measures when exposing the WebSocket server to external networks.
83
- </div>
84
-
85
- <footer class="footer">
86
- <span>Clew v0.1.2</span>
87
- <div class="footer-links">
88
- <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
89
- <a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
90
- </div>
91
- </footer>
92
- </main>
93
- <nav class="toc-sidebar"></nav>
94
- </div>
95
- </div>
96
- <script src="../js/main.js"></script>
97
- </body>
98
- </html>
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>Bridge Mode — Remote Control & Collaboration — Clew</title>
7
+ <meta name="description" content="WebSocket remote control and collaboration for Clew.">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="../css/styles.css">
12
+ <link rel="icon" type="image/svg+xml" href="../assets/clew.svg">
13
+ </head>
14
+ <body>
15
+ <header class="header">
16
+ <div class="header-inner">
17
+ <a href="../index.html" class="logo">
18
+ <span>Clew Code</span>
19
+ </a>
20
+ <nav class="header-nav">
21
+ <a href="../index.html">Home</a>
22
+ <a href="../index.html#features">Features</a>
23
+ <a href="../index.html#commands">Commands</a>
24
+ <a href="../quick-start.html" class="active">Docs</a>
25
+ <a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
26
+ <div class="lang-wrap">
27
+ <button class="lang-btn">🌐</button>
28
+ <div class="lang-menu">
29
+ <a href="../../readme/README.zh.md">中文</a>
30
+ <a href="../../readme/README.th.md">ไทย</a>
31
+ <a href="../../readme/README.ja.md">日本語</a>
32
+ <a href="../../readme/README.ko.md">한국어</a>
33
+ <a href="../../readme/README.es.md">Español</a>
34
+ <a href="../../readme/README.fr.md">Français</a>
35
+ <a href="../../readme/README.de.md">Deutsch</a>
36
+ <a href="../../readme/README.pt.md">Português</a>
37
+ <a href="../../readme/README.vi.md">Tiếng Việt</a>
38
+ <a href="../../readme/README.id.md">Bahasa Indonesia</a>
39
+ <a href="../../readme/README.ru.md">Русский</a>
40
+ <a href="../../readme/README.hi.md">हिन्दी</a>
41
+ <a href="../../README.md">English</a>
42
+ </div>
43
+ </div>
44
+ </nav>
45
+ <button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button>
46
+ </div>
47
+ </header>
48
+ <div class="app">
49
+ <aside class="sidebar" id="sidebar"></aside>
50
+ <div class="sidebar-overlay" id="sidebarOverlay"></div>
51
+ <div class="content-wrap">
52
+ <main class="content">
53
+ <div class="breadcrumbs"><a href="../index.html">Home</a><span class="sep">/</span><a href="../index.html#features">Features</a><span class="sep">/</span><span>Bridge Mode</span></div>
54
+ <h1>Bridge Mode</h1>
55
+ <p class="section-subtitle">Remote Control &amp; Remote Collaboration</p>
56
+
57
+ <div class="callout callout-info">
58
+ <strong>Bridge Mode</strong> exposes a remote control surface over a WebSocket connection. It is designed to be used by a mobile/web app to send commands and receive information from a running Clew session.
59
+ </div>
60
+
61
+ <h2>Architecture</h2>
62
+ <p>Bridge mode creates a WebSocket server that runs alongside the main Clew session. Remote clients connect to this server and can send slash commands, receive responses, and interact with the running session. The bridge also supports session sharing for team collaboration.</p>
63
+
64
+ <h2>Quick Start</h2>
65
+ <pre><code># Enable bridge mode
66
+ export BRIDGE_MODE=1
67
+ claude --bridge
68
+
69
+ # Connect from another terminal
70
+ claude --remote ws://localhost:18790</code></pre>
71
+
72
+ <h2>Features</h2>
73
+ <ul>
74
+ <li><strong>Remote Control</strong> — Send commands from mobile/web/CLI clients</li>
75
+ <li><strong>Session Sharing</strong> — Share your session with team members</li>
76
+ <li><strong>Team Onboarding</strong> — Invite teammates to collaborate</li>
77
+ <li><strong>Secure</strong> — OAuth-based authentication for remote connections</li>
78
+ </ul>
79
+
80
+ <div class="callout callout-warn">
81
+ <strong>Security Note</strong>
82
+ Bridge mode is designed for trusted networks. Use appropriate security measures when exposing the WebSocket server to external networks.
83
+ </div>
84
+
85
+ <footer class="footer">
86
+ <span>Clew Code v0.2.4</span>
87
+ <div class="footer-links">
88
+ <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
89
+ <a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
90
+ </div>
91
+ </footer>
92
+ </main>
93
+ <nav class="toc-sidebar"></nav>
94
+ </div>
95
+ </div>
96
+ <script src="../js/main.js"></script>
97
+ </body>
98
+ </html>
@@ -74,7 +74,7 @@ claude --remote ws://localhost:18790</code></pre>
74
74
  </ul>
75
75
 
76
76
  <footer class="footer">
77
- <span>Clew v0.1.2</span>
77
+ <span>Clew Code v0.2.4</span>
78
78
  <div class="footer-links">
79
79
  <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
80
80
  <a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>