clew-code 0.2.7 → 0.2.9

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 +292 -299
  2. package/dist/main.js +2745 -2869
  3. package/docs/architecture.html +148 -145
  4. package/docs/architecture.th.html +79 -78
  5. package/docs/clew-code-architecture.html +1125 -0
  6. package/docs/commands.html +224 -223
  7. package/docs/commands.th.html +131 -130
  8. package/docs/configuration.html +147 -145
  9. package/docs/configuration.th.html +108 -106
  10. package/docs/css/styles.css +48 -42
  11. package/docs/daemon.html +129 -128
  12. package/docs/daemon.th.html +73 -72
  13. package/docs/features/bridge-mode.html +99 -98
  14. package/docs/features/bridge-mode.th.html +90 -89
  15. package/docs/features/evals.html +182 -181
  16. package/docs/features/evals.th.html +90 -89
  17. package/docs/features/peer.html +178 -177
  18. package/docs/features/searxng-search.html +151 -150
  19. package/docs/features/searxng-search.th.html +95 -94
  20. package/docs/features/sentry-setup.html +157 -156
  21. package/docs/features/sentry-setup.th.html +97 -96
  22. package/docs/index.html +299 -298
  23. package/docs/index.th.html +292 -290
  24. package/docs/installation.html +105 -103
  25. package/docs/installation.th.html +105 -103
  26. package/docs/internals/growthbook-ab-testing.html +113 -112
  27. package/docs/internals/growthbook-ab-testing.th.html +81 -80
  28. package/docs/internals/hidden-features.html +149 -147
  29. package/docs/internals/hidden-features.th.html +109 -107
  30. package/docs/js/main.js +83 -3
  31. package/docs/loop.html +181 -180
  32. package/docs/loop.th.html +227 -226
  33. package/docs/mcp.html +247 -246
  34. package/docs/mcp.th.html +207 -206
  35. package/docs/models.html +111 -110
  36. package/docs/models.th.html +61 -60
  37. package/docs/peer.html +236 -235
  38. package/docs/peer.th.html +280 -279
  39. package/docs/permission-model.html +102 -101
  40. package/docs/permission-model.th.html +67 -66
  41. package/docs/plugins.html +102 -101
  42. package/docs/plugins.th.html +79 -78
  43. package/docs/providers.html +126 -117
  44. package/docs/providers.th.html +80 -78
  45. package/docs/quick-start.html +93 -92
  46. package/docs/quick-start.th.html +40 -39
  47. package/docs/research-memory.html +82 -79
  48. package/docs/research-memory.th.html +72 -71
  49. package/docs/skills.html +117 -116
  50. package/docs/skills.th.html +90 -89
  51. package/docs/tools.html +170 -169
  52. package/docs/tools.th.html +84 -83
  53. package/docs/troubleshooting.html +106 -105
  54. package/docs/troubleshooting.th.html +85 -84
  55. package/package.json +164 -162
  56. package/docs/taste.html +0 -436
  57. package/docs/taste.th.html +0 -236
@@ -1,177 +1,178 @@
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>Peer-to-Peer LAN Collaboration Clew</title>
7
- <meta name="description" content="LAN peer discovery, task delegation, and autonomous AI peer coordination in 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/ClewCode/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.th.md">ไทย</a>
30
- <a href="../../README.md">English</a>
31
- </div>
32
- </div>
33
- </nav>
34
- <button class="menu-btn" id="menuToggle" aria-label="Toggle navigation">
35
- <span></span><span></span><span></span>
36
- </button>
37
- </div>
38
- </header>
39
-
40
- <div class="app">
41
- <aside class="sidebar" id="sidebar"></aside>
42
- <div class="sidebar-overlay" id="sidebarOverlay"></div>
43
- <div class="content-wrap">
44
- <main class="content">
45
-
46
- <div class="breadcrumbs">
47
- <a href="../index.html">Home</a>
48
- <span>›</span>
49
- <span>Peer-to-Peer</span>
50
- </div>
51
-
52
- <h1>Peer-to-Peer Collaboration</h1>
53
- <p>
54
- Clew supports LAN peer discovery and task delegation, enabling a lead-worker model
55
- where one instance can coordinate multiple worker instances on the same network.
56
- </p>
57
-
58
- <h2>Architecture</h2>
59
- <p>
60
- Each peer runs a lightweight HTTP server (PeerServer) on a random port.
61
- Discovery uses UDP multicast broadcast (239.255.37.37:42069) plus a file-based
62
- registry (<code>~/.claude/peers/</code>) for same-machine peers.
63
- </p>
64
-
65
- <pre><code>Peer A (Lead) Peer B (Worker)
66
- | |
67
- |--- UDP multicast query ------->|
68
- |<--- response (host, port, cwd)-|
69
- | |
70
- |--- HTTP POST /peer-todo ------>| Assign task
71
- |--- HTTP POST /peer-exec ------>| Run command
72
- |<--- response ------------------| Return result</code></pre>
73
-
74
- <h2>Getting Started</h2>
75
-
76
- <h3>Worker Setup</h3>
77
- <pre><code># Start sharing (advertise on LAN)
78
- /peer share
79
-
80
- # Set display name and role
81
- /peer name Build Server
82
- /peer role builder</code></pre>
83
-
84
- <h3>Lead Setup</h3>
85
- <pre><code># Discover available peers
86
- /peer discover
87
-
88
- # Join a specific peer by port
89
- /peer join 127.0.0.1:59421
90
-
91
- # View connected peers
92
- /peer list</code></pre>
93
-
94
- <h3>Assign Tasks</h3>
95
- <pre><code># Direct task assignment
96
- /peer todo Build-Server "run the test suite"
97
-
98
- # Let the AI handle it
99
- > Assign a task to the build server to run all tests</code></pre>
100
-
101
- <h2>Commands</h2>
102
- <table>
103
- <thead>
104
- <tr><th>Command</th><th>Description</th></tr>
105
- </thead>
106
- <tbody>
107
- <tr><td><code>/peer</code></td><td>Open interactive peer menu</td></tr>
108
- <tr><td><code>/peer share</code></td><td>Start advertising as a worker</td></tr>
109
- <tr><td><code>/peer share stop</code></td><td>Stop advertising</td></tr>
110
- <tr><td><code>/peer discover</code></td><td>Scan LAN for peers (5s timeout)</td></tr>
111
- <tr><td><code>/peer join &lt;port&gt;</code></td><td>Connect to a peer by port or host:port</td></tr>
112
- <tr><td><code>/peer list</code></td><td>Open interactive peer list</td></tr>
113
- <tr><td><code>/peer todo &lt;peer&gt; &lt;task&gt;</code></td><td>Assign a task to a worker</td></tr>
114
- <tr><td><code>/peer todos</code></td><td>View received tasks</td></tr>
115
- <tr><td><code>/peer todo done &lt;id&gt;</code></td><td>Mark task as complete</td></tr>
116
- <tr><td><code>/peer name &lt;name&gt;</code></td><td>Set your display name</td></tr>
117
- <tr><td><code>/peer role &lt;role&gt;</code></td><td>Set your role (e.g., builder, tester)</td></tr>
118
- <tr><td><code>/peer inbox</code></td><td>View pending messages</td></tr>
119
- <tr><td><code>/peer spawn [options]</code></td><td>Spawn a new peer shell terminal</td></tr>
120
- <tr><td><code>/peer help</code></td><td>Show help</td></tr>
121
- </tbody>
122
- </table>
123
-
124
- <h2>AI Peer Tools</h2>
125
- <p>
126
- Clew AI can autonomously coordinate peers using these tools:
127
- </p>
128
- <table>
129
- <thead>
130
- <tr><th>Tool</th><th>Description</th></tr>
131
- </thead>
132
- <tbody>
133
- <tr><td><code>peer_discover</code></td><td>Scan for workers on LAN and same machine</td></tr>
134
- <tr><td><code>peer_join</code></td><td>Connect to a remote peer by host:port</td></tr>
135
- <tr><td><code>peer_send_task</code></td><td>Assign a task to a worker via HTTP POST</td></tr>
136
- <tr><td><code>peer_list_tasks</code></td><td>Check pending and completed tasks</td></tr>
137
- <tr><td><code>peer_list_roles</code></td><td>List all peers with names, roles, and IPs</td></tr>
138
- <tr><td><code>peer_run</code></td><td>Execute a shell command on a remote worker</td></tr>
139
- <tr><td><code>peer_share</code></td><td>Start or stop advertising as a worker</td></tr>
140
- <tr><td><code>peer_info</code></td><td>Get detailed info about a specific peer</td></tr>
141
- <tr><td><code>peer_set_name</code></td><td>Set display name for a peer</td></tr>
142
- <tr><td><code>peer_set_role</code></td><td>Set role for a peer</td></tr>
143
- </tbody>
144
- </table>
145
-
146
- <h2>Protocol</h2>
147
- <p>Discovery uses UDP multicast on <code>239.255.37.37:42069</code>. Peer info is broadcast every 30 seconds. Peers are evicted after 90 seconds of inactivity.</p>
148
- <p>Communication uses HTTP POST to registered peer endpoints:</p>
149
- <table>
150
- <thead>
151
- <tr><th>Endpoint</th><th>Method</th><th>Description</th></tr>
152
- </thead>
153
- <tbody>
154
- <tr><td><code>/peer-info</code></td><td>GET</td><td>Get peer metadata (host, port, cwd, name, role)</td></tr>
155
- <tr><td><code>/peer-todo</code></td><td>POST</td><td>Accept inbound task assignment</td></tr>
156
- <tr><td><code>/peer-msg</code></td><td>POST</td><td>Accept inbound message</td></tr>
157
- <tr><td><code>/peer-exec</code></td><td>POST</td><td>Accept shell command execution</td></tr>
158
- </tbody>
159
- </table>
160
-
161
- <!-- ─── Footer ─── -->
162
- <footer class="footer">
163
- <span>Clew v0.2.4 Open Source</span>
164
- <div class="footer-links">
165
- <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
166
- <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
167
- </div>
168
- </footer>
169
-
170
- </main>
171
- <nav class="toc-sidebar"></nav>
172
- </div>
173
- </div>
174
-
175
- <script src="../js/main.js"></script>
176
- </body>
177
- </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>Peer-to-Peer — LAN Collaboration — Clew</title>
7
+ <meta name="description" content="LAN peer discovery, task delegation, and autonomous AI peer coordination in 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/ClewCode/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.th.md">ไทย</a>
30
+ <a href="../../README.md">English</a>
31
+ </div>
32
+ </div>
33
+ </nav>
34
+ <button class="menu-btn" id="menuToggle" aria-label="Toggle navigation">
35
+ <span></span><span></span><span></span>
36
+ </button>
37
+ </div>
38
+ </header>
39
+
40
+ <div class="app">
41
+ <aside class="sidebar" id="sidebar"></aside>
42
+ <div class="sidebar-overlay" id="sidebarOverlay"></div>
43
+ <div class="content-wrap">
44
+ <main class="content">
45
+
46
+ <div class="breadcrumbs">
47
+ <a href="../index.html">Home</a>
48
+ <span>›</span>
49
+ <span>Peer-to-Peer</span>
50
+ </div>
51
+
52
+ <h1>Peer-to-Peer Collaboration</h1>
53
+ <p>
54
+ Clew supports LAN peer discovery and task delegation, enabling a lead-worker model
55
+ where one instance can coordinate multiple worker instances on the same network.
56
+ </p>
57
+
58
+ <h2>Architecture</h2>
59
+ <p>
60
+ Each peer runs a lightweight HTTP server (PeerServer) on a random port.
61
+ Discovery uses UDP multicast broadcast (239.255.37.37:42069) plus a file-based
62
+ registry (<code>~/.claude/peers/</code>) for same-machine peers.
63
+ </p>
64
+
65
+ <pre><code>Peer A (Lead) Peer B (Worker)
66
+ | |
67
+ |--- UDP multicast query ------->|
68
+ |<--- response (host, port, cwd)-|
69
+ | |
70
+ |--- HTTP POST /peer-todo ------>| Assign task
71
+ |--- HTTP POST /peer-exec ------>| Run command
72
+ |<--- response ------------------| Return result</code></pre>
73
+
74
+ <h2>Getting Started</h2>
75
+
76
+ <h3>Worker Setup</h3>
77
+ <pre><code># Start sharing (advertise on LAN)
78
+ /peer share
79
+
80
+ # Set display name and role
81
+ /peer name Build Server
82
+ /peer role builder</code></pre>
83
+
84
+ <h3>Lead Setup</h3>
85
+ <pre><code># Discover available peers
86
+ /peer discover
87
+
88
+ # Join a specific peer by port
89
+ /peer join 127.0.0.1:59421
90
+
91
+ # View connected peers
92
+ /peer list</code></pre>
93
+
94
+ <h3>Assign Tasks</h3>
95
+ <pre><code># Direct task assignment
96
+ /peer todo Build-Server "run the test suite"
97
+
98
+ # Let the AI handle it
99
+ > Assign a task to the build server to run all tests</code></pre>
100
+
101
+ <h2>Commands</h2>
102
+ <table>
103
+ <thead>
104
+ <tr><th>Command</th><th>Description</th></tr>
105
+ </thead>
106
+ <tbody>
107
+ <tr><td><code>/peer</code></td><td>Open interactive peer menu</td></tr>
108
+ <tr><td><code>/peer share</code></td><td>Start advertising as a worker</td></tr>
109
+ <tr><td><code>/peer share stop</code></td><td>Stop advertising</td></tr>
110
+ <tr><td><code>/peer discover</code></td><td>Scan LAN for peers (5s timeout)</td></tr>
111
+ <tr><td><code>/peer join &lt;port&gt;</code></td><td>Connect to a peer by port or host:port</td></tr>
112
+ <tr><td><code>/peer list</code></td><td>Open interactive peer list</td></tr>
113
+ <tr><td><code>/peer todo &lt;peer&gt; &lt;task&gt;</code></td><td>Assign a task to a worker</td></tr>
114
+ <tr><td><code>/peer todos</code></td><td>View received tasks</td></tr>
115
+ <tr><td><code>/peer todo done &lt;id&gt;</code></td><td>Mark task as complete</td></tr>
116
+ <tr><td><code>/peer name &lt;name&gt;</code></td><td>Set your display name</td></tr>
117
+ <tr><td><code>/peer role &lt;role&gt;</code></td><td>Set your role (e.g., builder, tester)</td></tr>
118
+ <tr><td><code>/peer inbox</code></td><td>View pending messages</td></tr>
119
+ <tr><td><code>/peer spawn [options]</code></td><td>Spawn a new peer shell terminal</td></tr>
120
+ <tr><td><code>/peer help</code></td><td>Show help</td></tr>
121
+ </tbody>
122
+ </table>
123
+
124
+ <h2>AI Peer Tools</h2>
125
+ <p>
126
+ Clew AI can autonomously coordinate peers using these tools:
127
+ </p>
128
+ <table>
129
+ <thead>
130
+ <tr><th>Tool</th><th>Description</th></tr>
131
+ </thead>
132
+ <tbody>
133
+ <tr><td><code>peer_discover</code></td><td>Scan for workers on LAN and same machine</td></tr>
134
+ <tr><td><code>peer_join</code></td><td>Connect to a remote peer by host:port</td></tr>
135
+ <tr><td><code>peer_send_task</code></td><td>Assign a task to a worker via HTTP POST</td></tr>
136
+ <tr><td><code>peer_list_tasks</code></td><td>Check pending and completed tasks</td></tr>
137
+ <tr><td><code>peer_list_roles</code></td><td>List all peers with names, roles, and IPs</td></tr>
138
+ <tr><td><code>peer_run</code></td><td>Execute a shell command on a remote worker</td></tr>
139
+ <tr><td><code>peer_share</code></td><td>Start or stop advertising as a worker</td></tr>
140
+ <tr><td><code>peer_info</code></td><td>Get detailed info about a specific peer</td></tr>
141
+ <tr><td><code>peer_set_name</code></td><td>Set display name for a peer</td></tr>
142
+ <tr><td><code>peer_set_role</code></td><td>Set role for a peer</td></tr>
143
+ </tbody>
144
+ </table>
145
+
146
+ <h2>Protocol</h2>
147
+ <p>Discovery uses UDP multicast on <code>239.255.37.37:42069</code>. Peer info is broadcast every 30 seconds. Peers are evicted after 90 seconds of inactivity.</p>
148
+ <p>Communication uses HTTP POST to registered peer endpoints:</p>
149
+ <table>
150
+ <thead>
151
+ <tr><th>Endpoint</th><th>Method</th><th>Description</th></tr>
152
+ </thead>
153
+ <tbody>
154
+ <tr><td><code>/peer-info</code></td><td>GET</td><td>Get peer metadata (host, port, cwd, name, role)</td></tr>
155
+ <tr><td><code>/peer-todo</code></td><td>POST</td><td>Accept inbound task assignment</td></tr>
156
+ <tr><td><code>/peer-msg</code></td><td>POST</td><td>Accept inbound message</td></tr>
157
+ <tr><td><code>/peer-exec</code></td><td>POST</td><td>Accept shell command execution</td></tr>
158
+ </tbody>
159
+ </table>
160
+
161
+ <!-- ─── Footer ─── -->
162
+ <footer class="footer">
163
+ <span>Clew v0.2.7 — Open Source</span>
164
+ <div class="footer-links">
165
+ <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
166
+ <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
167
+ </div>
168
+ </footer>
169
+
170
+ </main>
171
+ <nav class="toc-sidebar"></nav>
172
+ </div>
173
+ </div>
174
+
175
+ <script src="../js/main.js"></script>
176
+ </body>
177
+ </html>
178
+