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/models.html
CHANGED
|
@@ -1,110 +1,69 @@
|
|
|
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
|
-
/model
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<h2>CLI Flags for Models</h2>
|
|
72
|
-
<table>
|
|
73
|
-
<tr><th>Flag</th><th>Description</th></tr>
|
|
74
|
-
<tr><td><code>--model <name></code></td><td>Set model at startup (e.g., <code>--model sonnet</code> or <code>--model claude-opus-4-7</code>)</td></tr>
|
|
75
|
-
<tr><td><code>--effort <level></code></td><td>Set reasoning effort: <code>low</code>, <code>medium</code>, <code>high</code>, <code>max</code></td></tr>
|
|
76
|
-
<tr><td><code>--max-turns <N></code></td><td>Limit agentic turns in non-interactive mode</td></tr>
|
|
77
|
-
<tr><td><code>--thinking <mode></code></td><td>Thinking mode: <code>enabled</code>, <code>adaptive</code>, <code>disabled</code></td></tr>
|
|
78
|
-
<tr><td><code>--fallback-model <model></code></td><td>Fallback when primary model is overloaded (print mode only)</td></tr>
|
|
79
|
-
<tr><td><code>--task-budget <tokens></code></td><td>API-side task budget in tokens</td></tr>
|
|
80
|
-
<tr><td><code>--max-budget-usd <amount></code></td><td>Maximum spend on API calls (print mode only)</td></tr>
|
|
81
|
-
</table>
|
|
82
|
-
|
|
83
|
-
<h2>Model Capabilities</h2>
|
|
84
|
-
<p>Each model declaration in <code>providers.json</code> includes:</p>
|
|
85
|
-
<ul>
|
|
86
|
-
<li>Model ID and display label</li>
|
|
87
|
-
<li>Context window (<code>maxContext</code>) and max output tokens (<code>maxOutput</code>)</li>
|
|
88
|
-
<li>Tool calling type (<code>native</code>, <code>none</code>)</li>
|
|
89
|
-
<li>Vision support</li>
|
|
90
|
-
<li>Streaming mode (<code>full</code>, <code>partial</code>)</li>
|
|
91
|
-
<li>Reasoning support</li>
|
|
92
|
-
<li>System prompt support</li>
|
|
93
|
-
<li>Tags (for filtering): <code>fast</code>, <code>verified</code>, <code>recommended</code>, <code>latest</code>, <code>free</code>, <code>vision</code>, <code>tools</code>, <code>native</code>, <code>moe</code>, <code>local</code></li>
|
|
94
|
-
</ul>
|
|
95
|
-
|
|
96
|
-
<footer class="footer">
|
|
97
|
-
<span>Clew 0.2.14 — Open Source</span>
|
|
98
|
-
<div class="footer-links">
|
|
99
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
100
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
101
|
-
</div>
|
|
102
|
-
</footer>
|
|
103
|
-
</main>
|
|
104
|
-
<nav class="toc-sidebar"></nav>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
<script src="js/main.js"></script>
|
|
108
|
-
</body>
|
|
109
|
-
</html>
|
|
110
|
-
|
|
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>Models — Clew Code</title>
|
|
7
|
+
<meta name="description" href="Model configuration and selection 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">
|
|
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">Models</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Models</h1>
|
|
24
|
+
<p class="sub">Select and configure AI models from any supported provider. Switch mid-session without restarting.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="switching">Switching Models</h2>
|
|
27
|
+
<p>Use the <code>/model</code> command in the REPL:</p>
|
|
28
|
+
<pre><code class="language-bash">❯ /model # interactive provider/model picker
|
|
29
|
+
❯ /model openai # switch to OpenAI provider
|
|
30
|
+
❯ /model gpt-5.5 # set specific model
|
|
31
|
+
❯ /model list # list available models from all providers
|
|
32
|
+
</code></pre>
|
|
33
|
+
|
|
34
|
+
<h2 id="capabilities">Capability Tags</h2>
|
|
35
|
+
<p>The <code>/model list</code> command fetches live model lists from provider APIs and displays capability tags:</p>
|
|
36
|
+
<pre><code>deepseek-v4-flash [200K ctx, tools, reason, free]
|
|
37
|
+
gpt-5.5 [128K ctx, vision, tools]
|
|
38
|
+
claude-sonnet-5 [200K ctx, vision, tools, reason]
|
|
39
|
+
gemini-2.0-flash [1M ctx, vision, tools, free]
|
|
40
|
+
</code></pre>
|
|
41
|
+
<p>Tags include context window size, vision support, tool calling, reasoning, and free tier availability.</p>
|
|
42
|
+
|
|
43
|
+
<h2 id="reasoning">Reasoning Effort</h2>
|
|
44
|
+
<p>For models that support configurable reasoning (DeepSeek, NVIDIA, OpenRouter, etc.):</p>
|
|
45
|
+
<pre><code class="language-bash">❯ /effort low
|
|
46
|
+
❯ /effort medium
|
|
47
|
+
❯ /effort high
|
|
48
|
+
</code></pre>
|
|
49
|
+
|
|
50
|
+
<h2 id="local">Local Models (Ollama)</h2>
|
|
51
|
+
<p>Run models locally with Ollama:</p>
|
|
52
|
+
<pre><code class="language-bash">❯ /model ollama/llama3.3
|
|
53
|
+
❯ /model ollama/mistral
|
|
54
|
+
❯ /model ollama/codellama
|
|
55
|
+
</code></pre>
|
|
56
|
+
<p>Set the Ollama host:</p>
|
|
57
|
+
<pre><code class="language-bash">export OLLAMA_HOST=http://localhost:11434
|
|
58
|
+
</code></pre>
|
|
59
|
+
|
|
60
|
+
<h2 id="provider-defaults">Provider Defaults</h2>
|
|
61
|
+
<p>Each provider has a default model. The first time you switch to a provider, its default model is selected automatically. Override with:</p>
|
|
62
|
+
<pre><code class="language-bash">❯ /model deepseek-v4-flash
|
|
63
|
+
</code></pre>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<script src="js/main.js"></script>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
@@ -1,102 +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
|
-
<tr><
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<tr><td><code>
|
|
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
|
-
|
|
88
|
-
<footer class="footer">
|
|
89
|
-
<span>Clew Code 0.2.14 — Open Source</span>
|
|
90
|
-
<div class="footer-links">
|
|
91
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
92
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
93
|
-
</div>
|
|
94
|
-
</footer>
|
|
95
|
-
</main>
|
|
96
|
-
<nav class="toc-sidebar"></nav>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<script src="js/main.js"></script>
|
|
100
|
-
</body>
|
|
101
|
-
</html>
|
|
102
|
-
|
|
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>Permission Model — Clew Code</title>
|
|
7
|
+
<meta name="description" href="Permission modes and security model 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">
|
|
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">Permission Model</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Permission Model</h1>
|
|
24
|
+
<p class="sub">Clew Code provides 7 permission modes with granular allow/deny rules for safe AI-assisted development.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="modes">Permission Modes</h2>
|
|
27
|
+
<table>
|
|
28
|
+
<thead>
|
|
29
|
+
<tr><th>Mode</th><th>Description</th></tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr><td><code>default</code></td><td>Ask for every tool execution. Maximum safety.</td></tr>
|
|
33
|
+
<tr><td><code>ask</code></td><td>Prompt for confirmation on each action.</td></tr>
|
|
34
|
+
<tr><td><code>plan</code></td><td>Full-access planning with bypass permissions. Read, write, edit freely during planning.</td></tr>
|
|
35
|
+
<tr><td><code>auto</code></td><td>Auto-approve safe tools (read, grep, glob). Ask for destructive operations.</td></tr>
|
|
36
|
+
<tr><td><code>acceptEdits</code></td><td>Auto-approve file edits within allowed patterns.</td></tr>
|
|
37
|
+
<tr><td><code>bypassPermissions</code></td><td>Full access — all tools approved automatically.</td></tr>
|
|
38
|
+
<tr><td><code>dontAsk</code></td><td>Execute everything without prompting. Use with caution.</td></tr>
|
|
39
|
+
</tbody>
|
|
40
|
+
</table>
|
|
41
|
+
|
|
42
|
+
<h2 id="switching">Switching Modes</h2>
|
|
43
|
+
<p>Use the <code>/permissions</code> command in the REPL:</p>
|
|
44
|
+
<pre><code class="language-bash">❯ /permissions plan # enter full-access plan mode
|
|
45
|
+
❯ /permissions auto # auto-approve safe operations
|
|
46
|
+
❯ /permissions default # back to asking for each action
|
|
47
|
+
</code></pre>
|
|
48
|
+
|
|
49
|
+
<h2 id="rules">Allow/Deny Rules</h2>
|
|
50
|
+
<p>Configure granular rules in <code>.clew/settings.json</code>:</p>
|
|
51
|
+
<pre><code class="language-json">{
|
|
52
|
+
"allow": [
|
|
53
|
+
"bash: npm run dev",
|
|
54
|
+
"bash: git status",
|
|
55
|
+
"write: src/**"
|
|
56
|
+
],
|
|
57
|
+
"deny": [
|
|
58
|
+
"bash: rm -rf",
|
|
59
|
+
"bash: git push --force"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
</code></pre>
|
|
63
|
+
<p>Rules support glob pattern matching against tool names and arguments.</p>
|
|
64
|
+
|
|
65
|
+
<h2 id="safety">Safety Gates</h2>
|
|
66
|
+
<p>The <code>safetyGate</code> system validates:</p>
|
|
67
|
+
<ul>
|
|
68
|
+
<li>Command paths — prevents execution of dangerous commands</li>
|
|
69
|
+
<li>File paths — blocks writes outside project boundaries</li>
|
|
70
|
+
<li>Destructive operations — requires explicit approval</li>
|
|
71
|
+
<li>Bash output cap — 100 MB limit to prevent runaway processes</li>
|
|
72
|
+
</ul>
|
|
73
|
+
|
|
74
|
+
<h2 id="plan-mode">Plan Mode</h2>
|
|
75
|
+
<p>Plan mode is a special full-access mode for architectural work:</p>
|
|
76
|
+
<ul>
|
|
77
|
+
<li>Read, write, and edit files without permission prompts</li>
|
|
78
|
+
<li>Plan files persist to <code>.clew/plans/</code> with progress snapshots</li>
|
|
79
|
+
<li>Exit with <code>ExitPlanMode</code> to present the plan for approval</li>
|
|
80
|
+
</ul>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<script src="js/main.js"></script>
|
|
85
|
+
</body>
|
|
86
|
+
</html>
|
package/docs/plugins.html
CHANGED
|
@@ -1,102 +1,84 @@
|
|
|
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
|
-
<tr><td><code>PreToolUse</code></td><td>Before a tool
|
|
37
|
-
<tr><td><code>PostToolUse</code></td><td>After a tool completes
|
|
38
|
-
<tr><td><code>PreBash</code></td><td>Before
|
|
39
|
-
<tr><td><code>PostPrompt</code></td><td>After prompt
|
|
40
|
-
<tr><td><code>PreAcceptEdit</code></td><td>Before
|
|
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
|
-
<h2>Marketplace</h2>
|
|
86
|
-
<p>Plugins can be distributed through marketplaces. The <code>marketplaceManager</code> (<code>src/utils/plugins/marketplaceManager.ts</code>) handles marketplace source discovery, cache management, and plugin installation from remote sources.</p>
|
|
87
|
-
|
|
88
|
-
<footer class="footer">
|
|
89
|
-
<span>Clew Code 0.2.14 — Open Source</span>
|
|
90
|
-
<div class="footer-links">
|
|
91
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
92
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
93
|
-
</div>
|
|
94
|
-
</footer>
|
|
95
|
-
</main>
|
|
96
|
-
<nav class="toc-sidebar"></nav>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<script src="js/main.js"></script>
|
|
100
|
-
</body>
|
|
101
|
-
</html>
|
|
102
|
-
|
|
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>Plugins — Clew Code</title>
|
|
7
|
+
<meta name="description" href="Plugin system, marketplace, and hooks 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">
|
|
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">Plugins</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Plugins</h1>
|
|
24
|
+
<p class="sub">Extend Clew Code without touching source code. Plugins can add tools, hook into lifecycle events, and integrate with external systems.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="overview">Overview</h2>
|
|
27
|
+
<p>Plugins are self-contained packages with a manifest file that declare hooks, tools, and configurations. They are hot-reloadable — no restart needed.</p>
|
|
28
|
+
|
|
29
|
+
<h2 id="lifecycle">Lifecycle Hooks</h2>
|
|
30
|
+
<p>Plugins can hook into every stage of the agent lifecycle:</p>
|
|
31
|
+
<table>
|
|
32
|
+
<thead>
|
|
33
|
+
<tr><th>Hook</th><th>Trigger</th></tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
<tr><td><code>PreToolUse</code></td><td>Before a tool is executed</td></tr>
|
|
37
|
+
<tr><td><code>PostToolUse</code></td><td>After a tool completes</td></tr>
|
|
38
|
+
<tr><td><code>PreBash</code></td><td>Before a bash command runs</td></tr>
|
|
39
|
+
<tr><td><code>PostPrompt</code></td><td>After a prompt is processed</td></tr>
|
|
40
|
+
<tr><td><code>PreAcceptEdit</code></td><td>Before a file edit is applied</td></tr>
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
|
|
44
|
+
<h2 id="commands">Plugin Commands</h2>
|
|
45
|
+
<table>
|
|
46
|
+
<thead>
|
|
47
|
+
<tr><th>Command</th><th>Description</th></tr>
|
|
48
|
+
</thead>
|
|
49
|
+
<tbody>
|
|
50
|
+
<tr><td><code>/plugin install <name></code></td><td>Install a plugin from the marketplace</td></tr>
|
|
51
|
+
<tr><td><code>/plugin list</code></td><td>List installed plugins</td></tr>
|
|
52
|
+
<tr><td><code>/plugin remove <name></code></td><td>Remove a plugin</td></tr>
|
|
53
|
+
<tr><td><code>/plugin marketplace</code></td><td>Browse the plugin marketplace</td></tr>
|
|
54
|
+
<tr><td><code>/hooks</code></td><td>View active hooks</td></tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
|
|
58
|
+
<h2 id="plugin-manifest">Plugin Manifest</h2>
|
|
59
|
+
<p>Plugins declare themselves via a manifest:</p>
|
|
60
|
+
<pre><code class="language-json">{
|
|
61
|
+
"name": "my-plugin",
|
|
62
|
+
"version": "1.0.0",
|
|
63
|
+
"hooks": {
|
|
64
|
+
"PreToolUse": "./pre-tool.js",
|
|
65
|
+
"PostToolUse": "./post-tool.js"
|
|
66
|
+
},
|
|
67
|
+
"tools": [
|
|
68
|
+
{
|
|
69
|
+
"name": "my_custom_tool",
|
|
70
|
+
"description": "A custom tool",
|
|
71
|
+
"schema": { ... }
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
</code></pre>
|
|
76
|
+
|
|
77
|
+
<h2 id="marketplace">Plugin Marketplace</h2>
|
|
78
|
+
<p>Discover and install community plugins via the built-in marketplace browser. Use <code>/plugin marketplace</code> to explore available plugins.</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<script src="js/main.js"></script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|