clew-code 0.2.21 → 0.2.22
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/dist/main.js +1861 -1856
- package/docs/architecture.html +91 -148
- package/docs/assets/clew-agent-loop.png +0 -0
- package/docs/assets/clew-general-architecture.png +0 -0
- package/docs/assets/clew-mcp-architecture.png +0 -0
- package/docs/assets/clew-p2p-swarm.png +0 -0
- package/docs/changelog.html +150 -0
- package/docs/cli-reference.html +90 -0
- package/docs/commands.html +156 -265
- package/docs/configuration.html +85 -147
- package/docs/contributing.html +91 -0
- package/docs/css/styles.css +425 -425
- package/docs/daemon.html +62 -129
- package/docs/features/bridge-mode.html +61 -66
- package/docs/features/evals.html +57 -149
- package/docs/features/searxng-search.html +58 -118
- package/docs/features/sentry-setup.html +61 -124
- package/docs/index.html +137 -125
- package/docs/installation.html +77 -105
- package/docs/internals/growthbook-ab-testing.html +69 -91
- package/docs/internals/hidden-features.html +81 -143
- package/docs/js/main.js +29 -0
- package/docs/loop.html +69 -181
- package/docs/mcp.html +99 -247
- package/docs/models.html +69 -110
- package/docs/permission-model.html +86 -102
- package/docs/plugins.html +84 -102
- package/docs/providers.html +87 -127
- package/docs/quick-start.html +81 -93
- package/docs/research-memory.html +71 -102
- package/docs/security.html +71 -0
- package/docs/skills.html +67 -117
- package/docs/swarm.html +78 -236
- package/docs/tools.html +152 -151
- package/docs/troubleshooting.html +86 -106
- package/docs/voice-mode.html +79 -0
- package/package.json +1 -1
- package/docs/architecture.th.html +0 -79
- package/docs/clew-code-architecture.html +0 -1126
- package/docs/commands.th.html +0 -269
- package/docs/configuration.th.html +0 -108
- package/docs/daemon.th.html +0 -73
- package/docs/features/bridge-mode.th.html +0 -62
- package/docs/features/evals.th.html +0 -62
- package/docs/features/searxng-search.th.html +0 -67
- package/docs/features/sentry-setup.th.html +0 -69
- package/docs/features/swarm.html +0 -156
- package/docs/generated/providers.html +0 -625
- package/docs/generated/tools.html +0 -558
- package/docs/index.th.html +0 -292
- package/docs/installation.th.html +0 -105
- package/docs/internals/growthbook-ab-testing.th.html +0 -60
- package/docs/internals/hidden-features.th.html +0 -107
- package/docs/loop.th.html +0 -227
- package/docs/mcp.th.html +0 -207
- package/docs/models.th.html +0 -61
- package/docs/permission-model.th.html +0 -67
- package/docs/plugins.th.html +0 -79
- package/docs/prompts-and-features.html +0 -806
- package/docs/providers.th.html +0 -81
- package/docs/quick-start.th.html +0 -89
- package/docs/research-memory.th.html +0 -72
- package/docs/skills.th.html +0 -90
- package/docs/swarm.th.html +0 -280
- package/docs/tools.th.html +0 -84
- package/docs/troubleshooting.th.html +0 -85
package/docs/tools.html
CHANGED
|
@@ -1,171 +1,172 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Tools — Clew Code</title>
|
|
7
|
+
<meta name="description" href="50+ built-in tools available in Clew Code.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
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">
|
|
13
12
|
</head>
|
|
14
13
|
<body>
|
|
15
14
|
<header class="header"></header>
|
|
16
|
-
<div
|
|
17
|
-
<
|
|
18
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Tools</span></div>
|
|
19
|
-
<h1>Tools</h1>
|
|
20
|
-
<p class="section-subtitle">Clew provides <strong>76+ built-in tools</strong> (353 files across 76 directories) plus dynamically loaded MCP tools. Tools are invoked by the AI model via <code>tool_use</code> blocks and executed through the <strong>StreamingToolExecutor</strong> with permission gating. The base tool type is defined in <code>src/Tool.ts</code> (782 lines) and tools are registered in <code>src/tools.ts</code>.</p>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
Tool call normalization (toolCallParser.ts)
|
|
27
|
-
Permission check (permissions.ts)
|
|
28
|
-
PreToolUse hooks (plugins)
|
|
29
|
-
Tool execution (StreamingToolExecutor)
|
|
30
|
-
PostToolUse hooks (plugins)
|
|
31
|
-
Result returned as tool_result
|
|
32
|
-
Query loop continues</code></pre>
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Tools</span></div>
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<tr><th>Tool</th><th>Description</th><th>Schemas</th></tr>
|
|
37
|
-
<tr><td><code>Read</code> (FileReadTool)</td><td>Read files with line numbers, supports images, PDFs, Jupyter notebooks</td><td>Zod</td></tr>
|
|
38
|
-
<tr><td><code>Write</code> (FileWriteTool)</td><td>Create new files with full content</td><td>Zod</td></tr>
|
|
39
|
-
<tr><td><code>Edit</code> (FileEditTool)</td><td>Exact string replacement edits (surgical, diff-based)</td><td>Zod</td></tr>
|
|
40
|
-
<tr><td><code>Glob</code> (GlobTool)</td><td>Fast file pattern matching, sorted by modification time</td><td>Zod</td></tr>
|
|
41
|
-
<tr><td><code>Grep</code> (GrepTool)</td><td>Regex content search with context lines and multiline support</td><td>Zod</td></tr>
|
|
42
|
-
<tr><td><code>NotebookEdit</code> (NotebookEditTool)</td><td>Edit Jupyter notebook cells (replace, insert, delete)</td><td>Zod</td></tr>
|
|
43
|
-
<tr><td><code>JsonPath</code> (JsonPathTool)</td><td>Query, validate, format, and transform JSON data</td><td>Zod</td></tr>
|
|
44
|
-
</table>
|
|
23
|
+
<h1>Tools</h1>
|
|
24
|
+
<p class="sub">Clew Code ships with 50+ built-in tools for file operations, code search, shell commands, web access, browser automation, PR management, mesh networking, and more.</p>
|
|
45
25
|
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
<h2 id="file">File Tools</h2>
|
|
27
|
+
<table>
|
|
28
|
+
<thead>
|
|
48
29
|
<tr><th>Tool</th><th>Description</th></tr>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<tr><td
|
|
52
|
-
<tr><td
|
|
53
|
-
<tr><td
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr><td>Read</td><td>Read files (text, images, PDFs, notebooks)</td></tr>
|
|
33
|
+
<tr><td>Write</td><td>Create or overwrite files</td></tr>
|
|
34
|
+
<tr><td>Edit</td><td>Exact string replacements in files</td></tr>
|
|
35
|
+
<tr><td>Glob</td><td>Fast file pattern matching</td></tr>
|
|
36
|
+
<tr><td>Grep</td><td>Content search with ripgrep</td></tr>
|
|
37
|
+
<tr><td>NotebookEdit</td><td>Edit Jupyter notebook cells</td></tr>
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
|
|
41
|
+
<h2 id="shell">Shell & Execution Tools</h2>
|
|
42
|
+
<table>
|
|
43
|
+
<thead>
|
|
58
44
|
<tr><th>Tool</th><th>Description</th></tr>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<tr><td
|
|
62
|
-
<tr><td
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
<tr><td>Bash</td><td>Execute shell commands (with timeout and output cap)</td></tr>
|
|
48
|
+
<tr><td>Monitor</td><td>Stream background task output in real-time</td></tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
|
|
52
|
+
<h2 id="web">Web Tools</h2>
|
|
53
|
+
<table>
|
|
54
|
+
<thead>
|
|
67
55
|
<tr><th>Tool</th><th>Description</th></tr>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
</thead>
|
|
57
|
+
<tbody>
|
|
58
|
+
<tr><td>WebSearch</td><td>Web search with domain filtering</td></tr>
|
|
59
|
+
<tr><td>WebFetch</td><td>Fetch and analyze URL content</td></tr>
|
|
60
|
+
<tr><td>Browser</td><td>Stealth Playwright browser (navigate, click, fill, screenshot, etc.)</td></tr>
|
|
61
|
+
</tbody>
|
|
62
|
+
</table>
|
|
63
|
+
|
|
64
|
+
<h2 id="git">Git & PR Tools</h2>
|
|
65
|
+
<table>
|
|
66
|
+
<thead>
|
|
75
67
|
<tr><th>Tool</th><th>Description</th></tr>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<tr><td
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<tr><td><code>Brief</code> (BriefTool)</td><td>Generate brief summaries</td></tr>
|
|
86
|
-
</table>
|
|
87
|
-
|
|
88
|
-
<h2>Scheduled Tasks</h2>
|
|
89
|
-
<p>Scheduled tasks can be created from the interactive <code>/task</code> form. The form collects a name, project, schedule type, prompt, and storage mode, then creates the matching cron task through the same scheduling runtime used by <code>CronCreate</code>, <code>CronList</code>, and <code>CronDelete</code>.</p>
|
|
90
|
-
|
|
91
|
-
<table>
|
|
92
|
-
<tr><th>User action</th><th>Behavior</th></tr>
|
|
93
|
-
<tr><td><code>/task</code></td><td>Open the interactive scheduled task form</td></tr>
|
|
94
|
-
<tr><td>Select <code>Daily</code> around <code>09:00</code></td><td>Create a recurring daily task</td></tr>
|
|
95
|
-
<tr><td>Select <code>Weekdays</code> around <code>09:00</code></td><td>Create a weekday cron such as <code>0 9 * * 1-5</code></td></tr>
|
|
96
|
-
<tr><td>Select <code>In N minutes</code> with <code>10</code></td><td>Create a one-shot reminder</td></tr>
|
|
97
|
-
<tr><td>Select <code>Custom cron</code></td><td>Use a standard 5-field cron expression</td></tr>
|
|
98
|
-
<tr><td><code>/task scheduled</code></td><td>Open the same form explicitly</td></tr>
|
|
99
|
-
</table>
|
|
100
|
-
|
|
101
|
-
<ul>
|
|
102
|
-
<li><strong>Durable</strong> storage persists tasks to <code>.clew/scheduled_tasks.json</code> across sessions.</li>
|
|
103
|
-
<li><strong>Session-only</strong> storage keeps tasks in memory for the current session only.</li>
|
|
104
|
-
<li>Recurring tasks auto-expire after 30 days unless they are system-created permanent tasks.</li>
|
|
105
|
-
<li>One-shot tasks auto-delete after firing.</li>
|
|
106
|
-
<li>Natural language scheduling can still use the model-facing cron tools directly.</li>
|
|
107
|
-
</ul>
|
|
108
|
-
|
|
109
|
-
<pre><code>/task
|
|
110
|
-
Name: Server status
|
|
111
|
-
Schedule: Daily
|
|
112
|
-
Time: 20:00
|
|
113
|
-
Prompt: Check the server status
|
|
114
|
-
Storage: Durable</code></pre>
|
|
115
|
-
|
|
116
|
-
<h2>MCP (Model Context Protocol)</h2>
|
|
117
|
-
<table>
|
|
68
|
+
</thead>
|
|
69
|
+
<tbody>
|
|
70
|
+
<tr><td>PR</td><td>Full PR lifecycle (create, list, view, review, merge, status)</td></tr>
|
|
71
|
+
</tbody>
|
|
72
|
+
</table>
|
|
73
|
+
|
|
74
|
+
<h2 id="data">Data Tools</h2>
|
|
75
|
+
<table>
|
|
76
|
+
<thead>
|
|
118
77
|
<tr><th>Tool</th><th>Description</th></tr>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<tr><td>
|
|
122
|
-
</
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<tr><
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<tr><td
|
|
133
|
-
<tr><td
|
|
134
|
-
<tr><td
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
</
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
<
|
|
78
|
+
</thead>
|
|
79
|
+
<tbody>
|
|
80
|
+
<tr><td>JsonPath</td><td>Query, validate, format, minify JSON</td></tr>
|
|
81
|
+
</tbody>
|
|
82
|
+
</table>
|
|
83
|
+
|
|
84
|
+
<h2 id="mesh">Mesh Networking Tools</h2>
|
|
85
|
+
<p>15 LAN coordination tools available for agent-to-agent communication:</p>
|
|
86
|
+
<table>
|
|
87
|
+
<thead>
|
|
88
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody>
|
|
91
|
+
<tr><td>mesh_discover</td><td>Scan LAN for Clew instances</td></tr>
|
|
92
|
+
<tr><td>mesh_run</td><td>Execute shell command on a remote peer</td></tr>
|
|
93
|
+
<tr><td>mesh_spawn</td><td>Spawn a new local peer Clew instance</td></tr>
|
|
94
|
+
<tr><td>mesh_share</td><td>Advertise this instance as a worker</td></tr>
|
|
95
|
+
<tr><td>mesh_join</td><td>Connect to a remote peer</td></tr>
|
|
96
|
+
<tr><td>mesh_ping</td><td>Check if a peer is online</td></tr>
|
|
97
|
+
<tr><td>mesh_broadcast</td><td>Send task to all connected peers</td></tr>
|
|
98
|
+
<tr><td>mesh_send_message</td><td>Send a chat message to a peer</td></tr>
|
|
99
|
+
<tr><td>mesh_list_roles</td><td>List all peers with roles</td></tr>
|
|
100
|
+
<tr><td>mesh_list_messages</td><td>List chat history with a peer</td></tr>
|
|
101
|
+
<tr><td>mesh_set_name</td><td>Assign a custom name to a peer</td></tr>
|
|
102
|
+
<tr><td>mesh_set_role</td><td>Assign a role to a peer</td></tr>
|
|
103
|
+
<tr><td>mesh_disconnect</td><td>Remove a peer connection</td></tr>
|
|
104
|
+
<tr><td>mesh_info</td><td>Show detailed peer information</td></tr>
|
|
105
|
+
<tr><td>mesh_help</td><td>Mesh tool reference</td></tr>
|
|
106
|
+
</tbody>
|
|
107
|
+
</table>
|
|
108
|
+
|
|
109
|
+
<h2 id="mcp-tools">MCP Tools</h2>
|
|
110
|
+
<table>
|
|
111
|
+
<thead>
|
|
112
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
113
|
+
</thead>
|
|
114
|
+
<tbody>
|
|
115
|
+
<tr><td>ListMcpResourcesTool</td><td>List available MCP resources</td></tr>
|
|
116
|
+
<tr><td>ReadMcpResourceTool</td><td>Read a specific MCP resource</td></tr>
|
|
117
|
+
</tbody>
|
|
118
|
+
</table>
|
|
119
|
+
|
|
120
|
+
<h2 id="process">Process Mesh Tools</h2>
|
|
121
|
+
<table>
|
|
122
|
+
<thead>
|
|
123
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
124
|
+
</thead>
|
|
125
|
+
<tbody>
|
|
126
|
+
<tr><td>process_mesh</td><td>Run a local process-backed AI worker (Codex exec/pty)</td></tr>
|
|
127
|
+
</tbody>
|
|
128
|
+
</table>
|
|
129
|
+
|
|
130
|
+
<h2 id="task">Task & Planning Tools</h2>
|
|
131
|
+
<table>
|
|
132
|
+
<thead>
|
|
133
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
134
|
+
</thead>
|
|
135
|
+
<tbody>
|
|
136
|
+
<tr><td>TaskCreate</td><td>Create a structured task</td></tr>
|
|
137
|
+
<tr><td>TaskUpdate</td><td>Update task status</td></tr>
|
|
138
|
+
<tr><td>TaskList</td><td>List all tasks</td></tr>
|
|
139
|
+
<tr><td>TaskGet</td><td>Get task details</td></tr>
|
|
140
|
+
<tr><td>TaskStop</td><td>Stop a running task</td></tr>
|
|
141
|
+
<tr><td>EnterPlanMode</td><td>Enter full-access planning mode</td></tr>
|
|
142
|
+
<tr><td>ExitPlanMode</td><td>Exit planning mode with approval</td></tr>
|
|
143
|
+
<tr><td>EnterWorktree</td><td>Create and enter an isolated worktree</td></tr>
|
|
144
|
+
<tr><td>ExitWorktree</td><td>Exit and clean up a worktree</td></tr>
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
|
|
148
|
+
<h2 id="voice">Voice Tools</h2>
|
|
149
|
+
<table>
|
|
150
|
+
<thead>
|
|
151
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
152
|
+
</thead>
|
|
153
|
+
<tbody>
|
|
154
|
+
<tr><td>Voice tools</td><td>Voice recording, transcription (Whisper), session management</td></tr>
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
157
|
+
|
|
158
|
+
<h2 id="skill">Skill Tools</h2>
|
|
159
|
+
<table>
|
|
160
|
+
<thead>
|
|
161
|
+
<tr><th>Tool</th><th>Description</th></tr>
|
|
162
|
+
</thead>
|
|
163
|
+
<tbody>
|
|
164
|
+
<tr><td>Skill</td><td>Execute a skill within the conversation</td></tr>
|
|
165
|
+
</tbody>
|
|
166
|
+
</table>
|
|
165
167
|
</div>
|
|
166
168
|
</div>
|
|
169
|
+
|
|
167
170
|
<script src="js/main.js"></script>
|
|
168
171
|
</body>
|
|
169
172
|
</html>
|
|
170
|
-
|
|
171
|
-
|
|
@@ -1,106 +1,86 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<li><strong>GitHub Issues:</strong> Report bugs and feature requests</li>
|
|
88
|
-
<li><strong>Debug mode:</strong> Run with <code>DEBUG=1</code> or <code>DEBUG=provider:anthropic</code> for detailed logging</li>
|
|
89
|
-
</ul>
|
|
90
|
-
|
|
91
|
-
<footer class="footer">
|
|
92
|
-
<span>Clew Code 0.2.14 — Open Source</span>
|
|
93
|
-
<div class="footer-links">
|
|
94
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
95
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
96
|
-
<a href="https://npmjs.com/package/clew-code">npm</a>
|
|
97
|
-
</div>
|
|
98
|
-
</footer>
|
|
99
|
-
</main>
|
|
100
|
-
<nav class="toc-sidebar"></nav>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
<script src="js/main.js"></script>
|
|
104
|
-
</body>
|
|
105
|
-
</html>
|
|
106
|
-
|
|
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>Troubleshooting — Clew Code</title>
|
|
7
|
+
<meta name="description" href="Common issues and solutions for Clew Code.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"></header>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
+
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
20
|
+
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Troubleshooting</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Troubleshooting</h1>
|
|
24
|
+
|
|
25
|
+
<h2 id="no-provider">No Provider Configured</h2>
|
|
26
|
+
<p>If Clew doesn't start, set at least one provider API key in your environment:</p>
|
|
27
|
+
<pre><code class="language-bash">export ANTHROPIC_API_KEY=sk-ant-...
|
|
28
|
+
clew
|
|
29
|
+
</code></pre>
|
|
30
|
+
<p>Or use the <code>/model</code> command inside the REPL to switch providers.</p>
|
|
31
|
+
|
|
32
|
+
<h2 id="build-errors">Build Errors on Windows</h2>
|
|
33
|
+
<pre><code class="language-powershell">Remove-Item -Recurse -Force node_modules
|
|
34
|
+
bun install
|
|
35
|
+
bun run dev
|
|
36
|
+
</code></pre>
|
|
37
|
+
|
|
38
|
+
<h2 id="mesh-connectivity">Mesh / Peer Discovery Not Working</h2>
|
|
39
|
+
<ul>
|
|
40
|
+
<li>Ensure both instances are on the same LAN</li>
|
|
41
|
+
<li>Check that UDP multicast is not blocked by your firewall</li>
|
|
42
|
+
<li>Run <code>/mesh discover</code> with a longer timeout</li>
|
|
43
|
+
<li>Try sharing via file registry: <code>/mesh share</code></li>
|
|
44
|
+
</ul>
|
|
45
|
+
|
|
46
|
+
<h2 id="mcp-connection">MCP Server Connection Failures</h2>
|
|
47
|
+
<ul>
|
|
48
|
+
<li>Verify the server command exists (<code>which npx</code>, <code>which uvx</code>)</li>
|
|
49
|
+
<li>Check <code>.mcp.json</code> syntax</li>
|
|
50
|
+
<li>Run <code>/mcp list</code> to see all connected servers</li>
|
|
51
|
+
<li>For SSE servers, verify the remote URL is reachable</li>
|
|
52
|
+
</ul>
|
|
53
|
+
|
|
54
|
+
<h2 id="context-limit">Context Limit Reached</h2>
|
|
55
|
+
<p>Use the compact command to compress conversation history:</p>
|
|
56
|
+
<pre><code class="language-bash">❯ /compact
|
|
57
|
+
</code></pre>
|
|
58
|
+
<p>This triggers the multi-pass context compaction system.</p>
|
|
59
|
+
|
|
60
|
+
<h2 id="permission-denied">Permission Denied Errors</h2>
|
|
61
|
+
<p>Switch to a permissive mode or configure allow rules:</p>
|
|
62
|
+
<pre><code class="language-bash">❯ /permissions auto # auto-approve safe tools
|
|
63
|
+
❯ /permissions plan # full bypass for planning
|
|
64
|
+
</code></pre>
|
|
65
|
+
<p>See <a href="permission-model.html">Permission Model</a> for details.</p>
|
|
66
|
+
|
|
67
|
+
<h2 id="provider-switch">Provider Switch Issues</h2>
|
|
68
|
+
<ul>
|
|
69
|
+
<li>Ensure the corresponding API key is set</li>
|
|
70
|
+
<li>Some models have tool-calling limitations</li>
|
|
71
|
+
<li>Run <code>/model list</code> to see available models with capability tags</li>
|
|
72
|
+
</ul>
|
|
73
|
+
|
|
74
|
+
<h2 id="logs">Getting Help</h2>
|
|
75
|
+
<ul>
|
|
76
|
+
<li>Run <code>/doctor</code> for system diagnostics</li>
|
|
77
|
+
<li>Run <code>/status</code> for session info</li>
|
|
78
|
+
<li>Check <code>.session/</code> for session logs</li>
|
|
79
|
+
<li><a href="https://github.com/ClewCode/ClewCode/issues">Open a GitHub issue</a></li>
|
|
80
|
+
</ul>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<script src="js/main.js"></script>
|
|
85
|
+
</body>
|
|
86
|
+
</html>
|
|
@@ -0,0 +1,79 @@
|
|
|
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>Voice Mode — Clew Code</title>
|
|
7
|
+
<meta name="description" content="Voice input mode using microphone and OpenAI Whisper API.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"></header>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
+
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
20
|
+
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Voice Mode</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Voice Mode</h1>
|
|
24
|
+
<p class="sub">Use your voice to interact with Clew Code via microphone input and OpenAI Whisper transcription.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="overview">Overview</h2>
|
|
27
|
+
<p>Voice mode captures audio from your microphone, transcribes it using OpenAI's Whisper API, and feeds the transcribed text to the agent as regular input.</p>
|
|
28
|
+
|
|
29
|
+
<h2 id="setup">Setup</h2>
|
|
30
|
+
<h3>1. Set OpenAI API Key</h3>
|
|
31
|
+
<pre><code class="language-bash">export OPENAI_API_KEY=sk-...
|
|
32
|
+
</code></pre>
|
|
33
|
+
|
|
34
|
+
<h3>2. Install SoX (required for recording)</h3>
|
|
35
|
+
<p><strong>macOS:</strong></p>
|
|
36
|
+
<pre><code class="language-bash">brew install sox
|
|
37
|
+
</code></pre>
|
|
38
|
+
<p><strong>Ubuntu/Debian:</strong></p>
|
|
39
|
+
<pre><code class="language-bash">sudo apt-get install sox
|
|
40
|
+
</code></pre>
|
|
41
|
+
<p><strong>Windows:</strong><br>
|
|
42
|
+
Download from <a href="https://sox.sourceforge.net">sox.sourceforge.net</a></p>
|
|
43
|
+
|
|
44
|
+
<h2 id="usage">Usage</h2>
|
|
45
|
+
<pre><code class="language-bash">❯ /voice # activate voice mode
|
|
46
|
+
❯ /voice status # check voice session status
|
|
47
|
+
❯ /voice off # deactivate voice mode
|
|
48
|
+
</code></pre>
|
|
49
|
+
<p>Once voice mode is active, press <strong>F2</strong> to start/stop recording.</p>
|
|
50
|
+
|
|
51
|
+
<h2 id="how-it-works">How It Works</h2>
|
|
52
|
+
<pre><code>User presses F2
|
|
53
|
+
↓
|
|
54
|
+
VoiceRecorder.start() → Microphone → PCM audio chunks
|
|
55
|
+
↓
|
|
56
|
+
VoiceRecorder.stop() → Buffer.concat → WAV conversion
|
|
57
|
+
↓
|
|
58
|
+
VoiceWhisper.transcribe() → OpenAI Whisper API
|
|
59
|
+
↓
|
|
60
|
+
Session.handleInput(transcribedText) → Normal command flow
|
|
61
|
+
</code></pre>
|
|
62
|
+
|
|
63
|
+
<h2 id="files">Key Files</h2>
|
|
64
|
+
<table>
|
|
65
|
+
<thead>
|
|
66
|
+
<tr><th>File</th><th>Purpose</th></tr>
|
|
67
|
+
</thead>
|
|
68
|
+
<tbody>
|
|
69
|
+
<tr><td><code>src/tools/voiceRecorder.ts</code></td><td>Microphone recording via node-record-lpcm16</td></tr>
|
|
70
|
+
<tr><td><code>src/tools/voiceWhisper.ts</code></td><td>OpenAI Whisper API for speech-to-text</td></tr>
|
|
71
|
+
<tr><td><code>src/tools/voiceTools.ts</code></td><td>Voice session management (start/stop/transcribe)</td></tr>
|
|
72
|
+
</tbody>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<script src="js/main.js"></script>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|