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
|
@@ -1,119 +1,59 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<body>
|
|
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>SearXNG Search — Clew Code</title>
|
|
7
|
+
<meta name="description" content="Private, self-hosted web search via SearXNG integration.">
|
|
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>
|
|
15
14
|
<header class="header"></header>
|
|
16
|
-
<div class="
|
|
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
|
-
<tr><td><code>searxng/restart.bat</code></td><td>Restart wrapper</td></tr>
|
|
62
|
-
<tr><td><code>searxng/logs.bat</code></td><td>Log tail wrapper</td></tr>
|
|
63
|
-
</table>
|
|
64
|
-
|
|
65
|
-
<h2>How It Works</h2>
|
|
66
|
-
<ol>
|
|
67
|
-
<li>SearXNG runs in Docker on <code>localhost:18889</code></li>
|
|
68
|
-
<li>The project's <code>.env</code> sets <code>SEARXNG_INSTANCE_URL=http://localhost:18889</code></li>
|
|
69
|
-
<li><code>selectBestDirectProvider()</code> in <code>WebSearchTool.ts</code> auto-detects this and prioritises SearXNG</li>
|
|
70
|
-
<li>The <code>SearXNGProvider</code> sends GET requests with <code>format=json</code> and parses results</li>
|
|
71
|
-
</ol>
|
|
72
|
-
|
|
73
|
-
<h2>Engines Enabled</h2>
|
|
74
|
-
<ul>
|
|
75
|
-
<li><strong>DuckDuckGo</strong> — primary general search (no API key needed)</li>
|
|
76
|
-
<li><strong>Google</strong> — general search</li>
|
|
77
|
-
<li><strong>Wikipedia</strong> — infobox and article results</li>
|
|
78
|
-
<li><strong>StackOverflow</strong> — technical Q&A</li>
|
|
79
|
-
<li><strong>GitHub</strong> — repository search</li>
|
|
80
|
-
<li><strong>Wikidata</strong> — structured data infoboxes</li>
|
|
81
|
-
</ul>
|
|
82
|
-
|
|
83
|
-
<h2>Provider Selection Priority</h2>
|
|
84
|
-
<ol>
|
|
85
|
-
<li><strong>Tavily</strong> — requires <code>TAVILY_API_KEY</code></li>
|
|
86
|
-
<li><strong>Brave</strong> — requires <code>BRAVE_API_KEY</code></li>
|
|
87
|
-
<li><strong>Serper</strong> — requires <code>SERPER_API_KEY</code></li>
|
|
88
|
-
<li><strong>SearXNG</strong> — only if <code>SEARXNG_INSTANCE_URL</code> is explicitly set</li>
|
|
89
|
-
<li><strong>DuckDuckGo</strong> — always available, free, no API key</li>
|
|
90
|
-
</ol>
|
|
91
|
-
|
|
92
|
-
<h2>Troubleshooting</h2>
|
|
93
|
-
<h3>Container won't start</h3>
|
|
94
|
-
<pre><code>docker compose -f searxng/docker-compose.yml logs</code></pre>
|
|
95
|
-
<h3>No results returned</h3>
|
|
96
|
-
<p>Check that engines are not failing by visiting <a href="http://localhost:18889">http://localhost:18889</a> and performing a search in the web UI.</p>
|
|
97
|
-
<h3>Port conflict</h3>
|
|
98
|
-
<p>Change <code>SEARXNG_PORT</code> in <code>searxng/.env</code> and update <code>SEARXNG_INSTANCE_URL</code> in <code>.env</code> to match.</p>
|
|
99
|
-
|
|
100
|
-
<h2>Updating</h2>
|
|
101
|
-
<pre><code>cd searxng
|
|
102
|
-
docker compose pull
|
|
103
|
-
docker compose up -d</code></pre>
|
|
104
|
-
|
|
105
|
-
<footer class="footer">
|
|
106
|
-
<span>Clew Code 0.2.14</span>
|
|
107
|
-
<div class="footer-links">
|
|
108
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
109
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
110
|
-
</div>
|
|
111
|
-
</footer>
|
|
112
|
-
</main>
|
|
113
|
-
<nav class="toc-sidebar"></nav>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<script src="../js/main.js"></script>
|
|
117
|
-
</body>
|
|
118
|
-
</html>
|
|
119
|
-
|
|
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">SearXNG Search</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>SearXNG Search</h1>
|
|
24
|
+
<p class="sub">Private, self-hosted web search integration using SearXNG.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="overview">Overview</h2>
|
|
27
|
+
<p>Clew Code integrates with <a href="https://docs.searxng.org/">SearXNG</a>, a privacy-respecting, self-hosted metasearch engine. This gives the AI access to web search results without relying on third-party search APIs.</p>
|
|
28
|
+
|
|
29
|
+
<h2 id="setup">Setup</h2>
|
|
30
|
+
<ol>
|
|
31
|
+
<li>Deploy SearXNG (Docker is recommended):<pre><code class="language-bash">docker run --name searxng -d -p 8888:8080 \
|
|
32
|
+
-e BASE_URL=http://localhost:8888/ \
|
|
33
|
+
searxng/searxng</code></pre></li>
|
|
34
|
+
<li>Configure SearXNG to enable JSON API:<pre><code class="language-yaml"># /etc/searxng/settings.yml
|
|
35
|
+
search:
|
|
36
|
+
formats:
|
|
37
|
+
- html
|
|
38
|
+
- json</code></pre></li>
|
|
39
|
+
<li>Set the SearXNG URL in Clew Code:<pre><code class="language-bash">export SEARXNG_URL=http://localhost:8888</code></pre></li>
|
|
40
|
+
</ol>
|
|
41
|
+
|
|
42
|
+
<h2 id="using">Using SearXNG</h2>
|
|
43
|
+
<pre><code class="language-bash">❯ /searxng search "your query here"
|
|
44
|
+
</code></pre>
|
|
45
|
+
<p>The search results are automatically available to the AI as context.</p>
|
|
46
|
+
|
|
47
|
+
<h2 id="benefits">Benefits</h2>
|
|
48
|
+
<ul>
|
|
49
|
+
<li>Complete privacy — no search data sent to third parties</li>
|
|
50
|
+
<li>Aggregates results from multiple engines (Google, Bing, DuckDuckGo, etc.)</li>
|
|
51
|
+
<li>Self-hosted and fully可控</li>
|
|
52
|
+
<li>Works offline or on air-gapped networks</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<script src="../js/main.js"></script>
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
@@ -1,125 +1,62 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<body>
|
|
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>Sentry Setup — Clew Code</title>
|
|
7
|
+
<meta name="description" content="Error tracking and performance monitoring with Sentry.">
|
|
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>
|
|
15
14
|
<header class="header"></header>
|
|
16
|
-
<div class="
|
|
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
|
-
<tr><td><strong>File content</strong></td><td>Read/Edit/Write payload, command stdout/stderr</td></tr>
|
|
65
|
-
<tr><td><strong>Credentials</strong></td><td>API keys, tokens, passwords, cookies</td></tr>
|
|
66
|
-
<tr><td><strong>Auth headers</strong></td><td>Authorization, x-api-key, Cookie, Set-Cookie</td></tr>
|
|
67
|
-
<tr><td><strong>OAuth tokens</strong></td><td>access_token, refresh_token, id_token</td></tr>
|
|
68
|
-
<tr><td><strong>Environment dump</strong></td><td>entire env block (individual vars may appear as tags)</td></tr>
|
|
69
|
-
<tr><td><strong>Local paths</strong></td><td>home directory anonymized to <code>[HOME]</code></td></tr>
|
|
70
|
-
<tr><td><strong>Breadcrumbs</strong></td><td>user actions are not tracked</td></tr>
|
|
71
|
-
<tr><td><strong>User identity</strong></td><td>user field stripped from all events</td></tr>
|
|
72
|
-
</table>
|
|
73
|
-
|
|
74
|
-
<h2>Privacy Scrubber</h2>
|
|
75
|
-
<p>Every event passes through a <code>beforeSend</code> hook that:</p>
|
|
76
|
-
<ol>
|
|
77
|
-
<li><strong>Scrubs strings</strong> — removes API key patterns (<code>sk-*</code>, <code>Bearer</code> tokens), auth headers, cookie values</li>
|
|
78
|
-
<li><strong>Strips stack frame variables</strong> — removes <code>vars</code>, <code>pre_context</code>, <code>context_line</code>, <code>post_context</code></li>
|
|
79
|
-
<li><strong>Removes breadcrumbs</strong> — user actions are never tracked</li>
|
|
80
|
-
<li><strong>Cleans request data</strong> — removes headers, cookies, query strings</li>
|
|
81
|
-
<li><strong>Anonymizes home directory</strong> — replaces paths with <code>[HOME]</code></li>
|
|
82
|
-
<li><strong>Drops oversized strings</strong> — over 2000 chars truncated</li>
|
|
83
|
-
<li><strong>Recursively scrubs nested objects</strong> — drops keys named prompt, response, content, message, input, output, text, body, data, payload, token, key, secret, password, auth, cookie</li>
|
|
84
|
-
</ol>
|
|
85
|
-
|
|
86
|
-
<h2>Checking Status</h2>
|
|
87
|
-
<pre><code># When disabled
|
|
88
|
-
Sentry Telemetry: Disabled (set SENTRY_DSN to enable)
|
|
89
|
-
|
|
90
|
-
# When enabled
|
|
91
|
-
Sentry Telemetry: Enabled</code></pre>
|
|
92
|
-
|
|
93
|
-
<div class="callout callout-info">
|
|
94
|
-
<strong>DSN Masking</strong>
|
|
95
|
-
The DSN is masked in the UI — only the first 8 and last 4 characters of the key are shown. The full DSN is never displayed in any output.
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<h2>Files</h2>
|
|
99
|
-
<table>
|
|
100
|
-
<tr><th>File</th><th>Purpose</th></tr>
|
|
101
|
-
<tr><td><code>src/utils/sentry.ts</code></td><td>Core wrapper — init, capture, close, scrubber</td></tr>
|
|
102
|
-
<tr><td><code>src/utils/sentry.test.ts</code></td><td>Unit tests (11 tests)</td></tr>
|
|
103
|
-
<tr><td><code>src/entrypoints/init.ts</code></td><td>Calls <code>initSentry()</code> at startup</td></tr>
|
|
104
|
-
<tr><td><code>src/utils/gracefulShutdown.ts</code></td><td>Calls <code>closeSentry()</code> before exit</td></tr>
|
|
105
|
-
<tr><td><code>src/utils/log.ts</code></td><td><code>logError()</code> sends to Sentry when enabled</td></tr>
|
|
106
|
-
<tr><td><code>src/components/SentryErrorBoundary.tsx</code></td><td>React error boundary for render crashes</td></tr>
|
|
107
|
-
<tr><td><code>src/components/App.tsx</code></td><td>Wraps app tree in <code>SentryErrorBoundary</code></td></tr>
|
|
108
|
-
<tr><td><code>src/utils/doctorDiagnostic.ts</code></td><td><code>/doctor</code> Sentry status display</td></tr>
|
|
109
|
-
</table>
|
|
110
|
-
|
|
111
|
-
<footer class="footer">
|
|
112
|
-
<span>Clew Code 0.2.14</span>
|
|
113
|
-
<div class="footer-links">
|
|
114
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
115
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
116
|
-
</div>
|
|
117
|
-
</footer>
|
|
118
|
-
</main>
|
|
119
|
-
<nav class="toc-sidebar"></nav>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<script src="../js/main.js"></script>
|
|
123
|
-
</body>
|
|
124
|
-
</html>
|
|
125
|
-
|
|
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">Sentry Setup</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Sentry Setup</h1>
|
|
24
|
+
<p class="sub">Error tracking and performance monitoring via Sentry integration.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="overview">Overview</h2>
|
|
27
|
+
<p>Clew Code integrates with <a href="https://sentry.io/">Sentry</a> for error tracking, crash reporting, and performance monitoring. This helps developers identify and fix issues in production deployments.</p>
|
|
28
|
+
|
|
29
|
+
<h2 id="configuration">Configuration</h2>
|
|
30
|
+
<p>Set your Sentry DSN as an environment variable:</p>
|
|
31
|
+
<pre><code class="language-bash">export SENTRY_DSN=https://your-dsn@sentry.io/your-project
|
|
32
|
+
</code></pre>
|
|
33
|
+
|
|
34
|
+
<p>Or configure it in <code>.clew/settings.json</code>:</p>
|
|
35
|
+
<pre><code class="language-json">{
|
|
36
|
+
"sentry": {
|
|
37
|
+
"dsn": "https://your-dsn@sentry.io/your-project",
|
|
38
|
+
"environment": "production",
|
|
39
|
+
"tracesSampleRate": 0.1
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</code></pre>
|
|
43
|
+
|
|
44
|
+
<h2 id="features">What's Tracked</h2>
|
|
45
|
+
<ul>
|
|
46
|
+
<li>Unhandled exceptions and promise rejections</li>
|
|
47
|
+
<li>Provider API errors with contextual information</li>
|
|
48
|
+
<li>Tool execution failures</li>
|
|
49
|
+
<li>Session-level performance traces</li>
|
|
50
|
+
<li>MCP server connection errors</li>
|
|
51
|
+
</ul>
|
|
52
|
+
|
|
53
|
+
<h2 id="verify">Verifying Setup</h2>
|
|
54
|
+
<p>Run the doctor command to verify Sentry is connected:</p>
|
|
55
|
+
<pre><code class="language-bash">❯ /doctor
|
|
56
|
+
</code></pre>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<script src="../js/main.js"></script>
|
|
61
|
+
</body>
|
|
62
|
+
</html>
|