clew-code 0.2.11 → 0.2.14
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 +2596 -2527
- package/docs/architecture.html +148 -148
- package/docs/architecture.th.html +79 -79
- package/docs/clew-code-architecture.html +6 -6
- package/docs/commands.html +225 -224
- package/docs/commands.th.html +132 -131
- package/docs/configuration.html +147 -147
- package/docs/configuration.th.html +108 -108
- package/docs/daemon.html +129 -129
- package/docs/daemon.th.html +73 -73
- package/docs/features/bridge-mode.html +99 -99
- package/docs/features/bridge-mode.th.html +90 -90
- package/docs/features/evals.html +182 -182
- package/docs/features/evals.th.html +90 -90
- package/docs/features/peer.html +178 -178
- package/docs/features/searxng-search.html +151 -151
- package/docs/features/searxng-search.th.html +95 -95
- package/docs/features/sentry-setup.html +157 -157
- package/docs/features/sentry-setup.th.html +97 -97
- package/docs/index.html +298 -299
- package/docs/index.th.html +292 -292
- package/docs/installation.html +105 -105
- package/docs/installation.th.html +105 -105
- package/docs/internals/growthbook-ab-testing.html +113 -113
- package/docs/internals/growthbook-ab-testing.th.html +81 -81
- package/docs/internals/hidden-features.html +175 -149
- package/docs/internals/hidden-features.th.html +135 -109
- package/docs/loop.html +181 -181
- package/docs/loop.th.html +227 -227
- package/docs/mcp.html +247 -247
- package/docs/mcp.th.html +207 -207
- package/docs/models.html +110 -111
- package/docs/models.th.html +61 -61
- package/docs/peer.html +236 -236
- package/docs/peer.th.html +280 -280
- package/docs/permission-model.html +102 -102
- package/docs/permission-model.th.html +67 -67
- package/docs/plugins.html +102 -102
- package/docs/plugins.th.html +79 -79
- package/docs/providers.html +126 -126
- package/docs/providers.th.html +80 -80
- package/docs/quick-start.html +93 -93
- package/docs/quick-start.th.html +1 -1
- package/docs/research-memory.html +82 -82
- package/docs/research-memory.th.html +72 -72
- package/docs/skills.html +117 -117
- package/docs/skills.th.html +90 -90
- package/docs/tools.html +170 -170
- package/docs/tools.th.html +84 -84
- package/docs/troubleshooting.html +106 -106
- package/docs/troubleshooting.th.html +85 -85
- package/package.json +162 -164
|
@@ -1,102 +1,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</title>
|
|
7
|
-
<meta name="description" content="Tool execution permissions in Clew — modes, rules, and security.">
|
|
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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
-
<div class="content-wrap"><main class="content">
|
|
18
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Permission Model</span></div>
|
|
19
|
-
<h1>Permission Model</h1>
|
|
20
|
-
<p class="section-subtitle">Clew gates tool execution through a tiered permission system with multiple modes, allow/deny rules, and tool-specific checks.</p>
|
|
21
|
-
|
|
22
|
-
<h2>Permission Modes</h2>
|
|
23
|
-
<p>Defined in <code>src/types/permissions.ts</code>. Seven user-addressable modes:</p>
|
|
24
|
-
<table>
|
|
25
|
-
<tr><th>Mode</th><th>Behavior</th></tr>
|
|
26
|
-
<tr><td><code>default</code></td><td>Ask before sensitive tool actions (read/write/bash/network). Safe default.</td></tr>
|
|
27
|
-
<tr><td><code>ask</code></td><td>Always ask before any tool execution.</td></tr>
|
|
28
|
-
<tr><td><code>plan</code></td><td>Prefer planning mode — AI must present a plan before executing tools.</td></tr>
|
|
29
|
-
<tr><td><code>auto</code></td><td>Auto-approve low-risk actions using transcript classifier (requires <code>TRANSCRIPT_CLASSIFIER</code> feature). Prompt for risky operations.</td></tr>
|
|
30
|
-
<tr><td><code>acceptEdits</code></td><td>Auto-approve file edit operations. Useful for rapid iteration.</td></tr>
|
|
31
|
-
<tr><td><code>bypassPermissions</code></td><td>Skip all permission prompts. Use only in trusted sandboxes.</td></tr>
|
|
32
|
-
<tr><td><code>dontAsk</code></td><td>Never ask — auto-deny anything that would require permission.</td></tr>
|
|
33
|
-
</table>
|
|
34
|
-
|
|
35
|
-
<h2>Permission Rules</h2>
|
|
36
|
-
<p>Granular allow/deny rules control specific tools and their arguments:</p>
|
|
37
|
-
<pre><code>/permissions # Open interactive permission rule manager</code></pre>
|
|
38
|
-
<p>Rules can target specific tools with pattern matching:</p>
|
|
39
|
-
<ul>
|
|
40
|
-
<li><code>Bash(git *)</code> — Allow/deny git commands specifically</li>
|
|
41
|
-
<li><code>Edit</code> — Allow/deny all file edits</li>
|
|
42
|
-
<li><code>Bash(rm *)</code> — Warn/block destructive shell commands</li>
|
|
43
|
-
</ul>
|
|
44
|
-
|
|
45
|
-
<h2>Rule Sources</h2>
|
|
46
|
-
<p>Permission rules come from multiple sources (evaluated in order, with later sources overriding earlier ones):</p>
|
|
47
|
-
<ul>
|
|
48
|
-
<li><code>userSettings</code> — From user config file</li>
|
|
49
|
-
<li><code>projectSettings</code> — From project-level settings</li>
|
|
50
|
-
<li><code>localSettings</code> — Local overrides</li>
|
|
51
|
-
<li><code>flagSettings</code> — From CLI flags (<code>--allowedTools</code>, <code>--disallowedTools</code>)</li>
|
|
52
|
-
<li><code>policySettings</code> — Managed/organization policy</li>
|
|
53
|
-
</ul>
|
|
54
|
-
|
|
55
|
-
<h2>Tool Permission Flow</h2>
|
|
56
|
-
<pre><code>1. Tool input validation (validateInput)
|
|
57
|
-
2. Tool-specific checkPermissions()
|
|
58
|
-
3. Deny rule check (permissions.ts getDenyRuleForTool)
|
|
59
|
-
4. Permission mode evaluation (mode-based auto decision)
|
|
60
|
-
5. Plugin hooks (PreToolUse PostToolUse)
|
|
61
|
-
6. Classifier-based auto-approval (auto mode)
|
|
62
|
-
7. User permission dialog (if needed)</code></pre>
|
|
63
|
-
|
|
64
|
-
<h2>CLI Flags for Permissions</h2>
|
|
65
|
-
<table>
|
|
66
|
-
<tr><th>Flag</th><th>Description</th></tr>
|
|
67
|
-
<tr><td><code>--permission-mode <mode></code></td><td>Set session permission mode</td></tr>
|
|
68
|
-
<tr><td><code>--dangerously-skip-permissions</code></td><td>Bypass all checks (sandbox only)</td></tr>
|
|
69
|
-
<tr><td><code>--allow-dangerously-skip-permissions</code></td><td>Enable bypass as optional mode</td></tr>
|
|
70
|
-
<tr><td><code>--allowedTools, --allowed-tools <tools...></code></td><td>Allowlist specific tools with patterns</td></tr>
|
|
71
|
-
<tr><td><code>--disallowedTools, --disallowed-tools <tools...></td><td>Denylist specific tools with patterns</td></tr>
|
|
72
|
-
</table>
|
|
73
|
-
|
|
74
|
-
<h2>Security Best Practices</h2>
|
|
75
|
-
<ul>
|
|
76
|
-
<li><strong>Default mode</strong> for day-to-day development</li>
|
|
77
|
-
<li><strong>Plan mode</strong> for production infrastructure or unfamiliar code</li>
|
|
78
|
-
<li><strong>Bypass modes</strong> only in disposable worktrees or Docker sandboxes</li>
|
|
79
|
-
<li>Use allow/deny rules to permit safe patterns (e.g., <code>Bash(git *)</code>) while blocking dangerous ones</li>
|
|
80
|
-
<li>Run <code>/doctor</code> to audit current permission settings</li>
|
|
81
|
-
</ul>
|
|
82
|
-
|
|
83
|
-
<div class="callout callout-warn">
|
|
84
|
-
<strong>Use Caution</strong>
|
|
85
|
-
<code>bypassPermissions</code> mode executes all tool actions without prompting. Restrict to trusted, sandboxed environments.
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<footer class="footer">
|
|
89
|
-
<span>Clew Code
|
|
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</title>
|
|
7
|
+
<meta name="description" content="Tool execution permissions in Clew — modes, rules, and security.">
|
|
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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
+
<div class="content-wrap"><main class="content">
|
|
18
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Permission Model</span></div>
|
|
19
|
+
<h1>Permission Model</h1>
|
|
20
|
+
<p class="section-subtitle">Clew gates tool execution through a tiered permission system with multiple modes, allow/deny rules, and tool-specific checks.</p>
|
|
21
|
+
|
|
22
|
+
<h2>Permission Modes</h2>
|
|
23
|
+
<p>Defined in <code>src/types/permissions.ts</code>. Seven user-addressable modes:</p>
|
|
24
|
+
<table>
|
|
25
|
+
<tr><th>Mode</th><th>Behavior</th></tr>
|
|
26
|
+
<tr><td><code>default</code></td><td>Ask before sensitive tool actions (read/write/bash/network). Safe default.</td></tr>
|
|
27
|
+
<tr><td><code>ask</code></td><td>Always ask before any tool execution.</td></tr>
|
|
28
|
+
<tr><td><code>plan</code></td><td>Prefer planning mode — AI must present a plan before executing tools.</td></tr>
|
|
29
|
+
<tr><td><code>auto</code></td><td>Auto-approve low-risk actions using transcript classifier (requires <code>TRANSCRIPT_CLASSIFIER</code> feature). Prompt for risky operations.</td></tr>
|
|
30
|
+
<tr><td><code>acceptEdits</code></td><td>Auto-approve file edit operations. Useful for rapid iteration.</td></tr>
|
|
31
|
+
<tr><td><code>bypassPermissions</code></td><td>Skip all permission prompts. Use only in trusted sandboxes.</td></tr>
|
|
32
|
+
<tr><td><code>dontAsk</code></td><td>Never ask — auto-deny anything that would require permission.</td></tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
<h2>Permission Rules</h2>
|
|
36
|
+
<p>Granular allow/deny rules control specific tools and their arguments:</p>
|
|
37
|
+
<pre><code>/permissions # Open interactive permission rule manager</code></pre>
|
|
38
|
+
<p>Rules can target specific tools with pattern matching:</p>
|
|
39
|
+
<ul>
|
|
40
|
+
<li><code>Bash(git *)</code> — Allow/deny git commands specifically</li>
|
|
41
|
+
<li><code>Edit</code> — Allow/deny all file edits</li>
|
|
42
|
+
<li><code>Bash(rm *)</code> — Warn/block destructive shell commands</li>
|
|
43
|
+
</ul>
|
|
44
|
+
|
|
45
|
+
<h2>Rule Sources</h2>
|
|
46
|
+
<p>Permission rules come from multiple sources (evaluated in order, with later sources overriding earlier ones):</p>
|
|
47
|
+
<ul>
|
|
48
|
+
<li><code>userSettings</code> — From user config file</li>
|
|
49
|
+
<li><code>projectSettings</code> — From project-level settings</li>
|
|
50
|
+
<li><code>localSettings</code> — Local overrides</li>
|
|
51
|
+
<li><code>flagSettings</code> — From CLI flags (<code>--allowedTools</code>, <code>--disallowedTools</code>)</li>
|
|
52
|
+
<li><code>policySettings</code> — Managed/organization policy</li>
|
|
53
|
+
</ul>
|
|
54
|
+
|
|
55
|
+
<h2>Tool Permission Flow</h2>
|
|
56
|
+
<pre><code>1. Tool input validation (validateInput)
|
|
57
|
+
2. Tool-specific checkPermissions()
|
|
58
|
+
3. Deny rule check (permissions.ts getDenyRuleForTool)
|
|
59
|
+
4. Permission mode evaluation (mode-based auto decision)
|
|
60
|
+
5. Plugin hooks (PreToolUse PostToolUse)
|
|
61
|
+
6. Classifier-based auto-approval (auto mode)
|
|
62
|
+
7. User permission dialog (if needed)</code></pre>
|
|
63
|
+
|
|
64
|
+
<h2>CLI Flags for Permissions</h2>
|
|
65
|
+
<table>
|
|
66
|
+
<tr><th>Flag</th><th>Description</th></tr>
|
|
67
|
+
<tr><td><code>--permission-mode <mode></code></td><td>Set session permission mode</td></tr>
|
|
68
|
+
<tr><td><code>--dangerously-skip-permissions</code></td><td>Bypass all checks (sandbox only)</td></tr>
|
|
69
|
+
<tr><td><code>--allow-dangerously-skip-permissions</code></td><td>Enable bypass as optional mode</td></tr>
|
|
70
|
+
<tr><td><code>--allowedTools, --allowed-tools <tools...></code></td><td>Allowlist specific tools with patterns</td></tr>
|
|
71
|
+
<tr><td><code>--disallowedTools, --disallowed-tools <tools...></td><td>Denylist specific tools with patterns</td></tr>
|
|
72
|
+
</table>
|
|
73
|
+
|
|
74
|
+
<h2>Security Best Practices</h2>
|
|
75
|
+
<ul>
|
|
76
|
+
<li><strong>Default mode</strong> for day-to-day development</li>
|
|
77
|
+
<li><strong>Plan mode</strong> for production infrastructure or unfamiliar code</li>
|
|
78
|
+
<li><strong>Bypass modes</strong> only in disposable worktrees or Docker sandboxes</li>
|
|
79
|
+
<li>Use allow/deny rules to permit safe patterns (e.g., <code>Bash(git *)</code>) while blocking dangerous ones</li>
|
|
80
|
+
<li>Run <code>/doctor</code> to audit current permission settings</li>
|
|
81
|
+
</ul>
|
|
82
|
+
|
|
83
|
+
<div class="callout callout-warn">
|
|
84
|
+
<strong>Use Caution</strong>
|
|
85
|
+
<code>bypassPermissions</code> mode executes all tool actions without prompting. Restrict to trusted, sandboxed environments.
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<footer class="footer">
|
|
89
|
+
<span>Clew Code 0.2.13 — 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,67 +1,67 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="th">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>โมเดลสิทธิ์ — Clew</title>
|
|
7
|
-
<meta name="description" content="สิทธิ์à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¹ƒà¸™ 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&family=Noto+Sans+Thai: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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
-
<div class="content-wrap"><main class="content">
|
|
18
|
-
<div class="breadcrumbs"><a href="index.th.html">หน้าà¹à¸£à¸</a><span class="sep">/</span><span>โมเดลสิทธิ์</span></div>
|
|
19
|
-
<h1>โมเดลสิทธิ์</h1>
|
|
20
|
-
<p class="section-subtitle">Clew ควบคุมà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¸œà¹ˆà¸²à¸™à¸£à¸°à¸šà¸šà¸ªà¸´à¸—ธิ์à¹à¸šà¸šà¸«à¸¥à¸²à¸¢à¸Šà¸±à¹‰à¸™à¸žà¸£à¹‰à¸à¸¡à¸«à¸¥à¸²à¸¢à¹‚หมด, à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜, à¹à¸¥à¸°à¸à¸²à¸£à¸•รวจสà¸à¸šà¹€à¸‰à¸žà¸²à¸°à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸</p>
|
|
21
|
-
|
|
22
|
-
<h2>โหมดสิทธิ์</h2>
|
|
23
|
-
<p>à¸à¸³à¸«à¸™à¸”ใน <code>src/types/permissions.ts</code> เจ็ดโหมดที่ผู้ใช้เข้าถึงได้:</p>
|
|
24
|
-
<table>
|
|
25
|
-
<tr><th>โหมด</th><th>พฤติà¸à¸£à¸£à¸¡</th></tr>
|
|
26
|
-
<tr><td><code>default</code></td><td>ถามà¸à¹ˆà¸à¸™à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¸—ี่ละเà¸à¸µà¸¢à¸”à¸à¹ˆà¸à¸™ (read/write/bash/network) ค่าเริ่มต้นที่ปลà¸à¸”ภัย</td></tr>
|
|
27
|
-
<tr><td><code>ask</code></td><td>ถามà¸à¹ˆà¸à¸™à¸—ุà¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸</td></tr>
|
|
28
|
-
<tr><td><code>plan</code></td><td>ชà¸à¸šà¹‚หมดวางà¹à¸œà¸™ — AI ต้à¸à¸‡à¸™à¸³à¹€à¸ªà¸™à¸à¹à¸œà¸™à¸à¹ˆà¸à¸™à¸”ำเนินà¸à¸²à¸£</td></tr>
|
|
29
|
-
<tr><td><code>auto</code></td><td>à¸à¸™à¸¸à¸¡à¸±à¸•ิà¸à¸±à¸•โนมัติสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำความเสี่ยงต่ำ ถามสำหรับà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸ªà¸µà¹ˆà¸¢à¸‡</td></tr>
|
|
30
|
-
<tr><td><code>acceptEdits</code></td><td>à¸à¸™à¸¸à¸¡à¸±à¸•ิà¸à¸±à¸•โนมัติสำหรับà¸à¸²à¸£à¹à¸à¹‰à¹„ขไฟล์ มีประโยชน์สำหรับà¸à¸²à¸£à¸žà¸±à¸’นาที่รวดเร็ว</td></tr>
|
|
31
|
-
<tr><td><code>bypassPermissions</code></td><td>ข้ามà¸à¸²à¸£à¸‚à¸à¸ªà¸´à¸—ธิ์ทั้งหมด ใช้ใน sandbox ที่เชื่à¸à¸–ืà¸à¹„ด้เท่านั้น</td></tr>
|
|
32
|
-
<tr><td><code>dontAsk</code></td><td>ไม่ถาม — ปà¸à¸´à¹€à¸ªà¸˜à¸à¸±à¸•โนมัติทุà¸à¸à¸¢à¹ˆà¸²à¸‡à¸—ี่ต้à¸à¸‡à¸‚à¸à¸ªà¸´à¸—ธิ์</td></tr>
|
|
33
|
-
</table>
|
|
34
|
-
|
|
35
|
-
<h2>à¸à¸Žà¸ªà¸´à¸—ธิ์</h2>
|
|
36
|
-
<p>à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¹à¸šà¸šà¸¥à¸°à¹€à¸à¸µà¸¢à¸”ควบคุมเครื่à¸à¸‡à¸¡à¸·à¸à¹à¸¥à¸°à¸à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•์เฉพาะ:</p>
|
|
37
|
-
<pre><code>/permissions # เปิดตัวจัดà¸à¸²à¸£à¸à¸Žà¸ªà¸´à¸—ธิ์à¹à¸šà¸šà¹‚ต้ตà¸à¸š</code></pre>
|
|
38
|
-
<p>à¸à¸Žà¸ªà¸²à¸¡à¸²à¸£à¸–à¸à¸³à¸«à¸™à¸”เป้าหมายเครื่à¸à¸‡à¸¡à¸·à¸à¹€à¸‰à¸žà¸²à¸°à¸”้วยà¸à¸²à¸£à¸ˆà¸±à¸šà¸„ู่รูปà¹à¸šà¸š:</p>
|
|
39
|
-
<ul>
|
|
40
|
-
<li><code>Bash(git *)</code> — à¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¸„ำสั่ง git โดยเฉพาะ</li>
|
|
41
|
-
<li><code>Edit</code> — à¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¸à¸²à¸£à¹à¸à¹‰à¹„ขไฟล์ทั้งหมด</li>
|
|
42
|
-
<li><code>Bash(rm *)</code> — เตืà¸à¸™/บล็à¸à¸à¸„ำสั่ง shell ที่เป็นà¸à¸±à¸™à¸•ราย</li>
|
|
43
|
-
</ul>
|
|
44
|
-
|
|
45
|
-
<h2>à¹à¸™à¸§à¸—างปà¸à¸´à¸šà¸±à¸•ิด้านความปลà¸à¸”ภัย</h2>
|
|
46
|
-
<ul>
|
|
47
|
-
<li><strong>โหมดค่าเริ่มต้น</strong> สำหรับà¸à¸²à¸£à¸žà¸±à¸’นาประจำวัน</li>
|
|
48
|
-
<li><strong>โหมดวางà¹à¸œà¸™</strong> สำหรับโครงสร้างพื้นà¸à¸²à¸™à¸à¸²à¸£à¸œà¸¥à¸´à¸•หรืà¸à¹‚ค้ดที่ไม่คุ้นเคย</li>
|
|
49
|
-
<li><strong>โหมดข้าม</strong> เฉพาะใน worktrees ที่ใช้à¹à¸¥à¹‰à¸§à¸—ิ้งหรืภDocker sandboxes</li>
|
|
50
|
-
<li>ใช้à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¹€à¸žà¸·à¹ˆà¸à¸à¸™à¸¸à¸à¸²à¸•รูปà¹à¸šà¸šà¸—ี่ปลà¸à¸”ภัยขณะบล็à¸à¸à¸£à¸¹à¸›à¹à¸šà¸šà¸à¸±à¸™à¸•ราย</li>
|
|
51
|
-
</ul>
|
|
52
|
-
|
|
53
|
-
<footer class="footer">
|
|
54
|
-
<span>Clew Code
|
|
55
|
-
<div class="footer-links">
|
|
56
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
57
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">ปัà¸à¸«à¸²</a>
|
|
58
|
-
</div>
|
|
59
|
-
</footer>
|
|
60
|
-
</main>
|
|
61
|
-
<nav class="toc-sidebar"></nav>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<script src="js/main.js"></script>
|
|
65
|
-
</body>
|
|
66
|
-
</html>
|
|
67
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="th">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>โมเดลสิทธิ์ — Clew</title>
|
|
7
|
+
<meta name="description" content="สิทธิ์à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¹ƒà¸™ 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&family=Noto+Sans+Thai: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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
+
<div class="content-wrap"><main class="content">
|
|
18
|
+
<div class="breadcrumbs"><a href="index.th.html">หน้าà¹à¸£à¸</a><span class="sep">/</span><span>โมเดลสิทธิ์</span></div>
|
|
19
|
+
<h1>โมเดลสิทธิ์</h1>
|
|
20
|
+
<p class="section-subtitle">Clew ควบคุมà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¸œà¹ˆà¸²à¸™à¸£à¸°à¸šà¸šà¸ªà¸´à¸—ธิ์à¹à¸šà¸šà¸«à¸¥à¸²à¸¢à¸Šà¸±à¹‰à¸™à¸žà¸£à¹‰à¸à¸¡à¸«à¸¥à¸²à¸¢à¹‚หมด, à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜, à¹à¸¥à¸°à¸à¸²à¸£à¸•รวจสà¸à¸šà¹€à¸‰à¸žà¸²à¸°à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸</p>
|
|
21
|
+
|
|
22
|
+
<h2>โหมดสิทธิ์</h2>
|
|
23
|
+
<p>à¸à¸³à¸«à¸™à¸”ใน <code>src/types/permissions.ts</code> เจ็ดโหมดที่ผู้ใช้เข้าถึงได้:</p>
|
|
24
|
+
<table>
|
|
25
|
+
<tr><th>โหมด</th><th>พฤติà¸à¸£à¸£à¸¡</th></tr>
|
|
26
|
+
<tr><td><code>default</code></td><td>ถามà¸à¹ˆà¸à¸™à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¸—ี่ละเà¸à¸µà¸¢à¸”à¸à¹ˆà¸à¸™ (read/write/bash/network) ค่าเริ่มต้นที่ปลà¸à¸”ภัย</td></tr>
|
|
27
|
+
<tr><td><code>ask</code></td><td>ถามà¸à¹ˆà¸à¸™à¸—ุà¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸</td></tr>
|
|
28
|
+
<tr><td><code>plan</code></td><td>ชà¸à¸šà¹‚หมดวางà¹à¸œà¸™ — AI ต้à¸à¸‡à¸™à¸³à¹€à¸ªà¸™à¸à¹à¸œà¸™à¸à¹ˆà¸à¸™à¸”ำเนินà¸à¸²à¸£</td></tr>
|
|
29
|
+
<tr><td><code>auto</code></td><td>à¸à¸™à¸¸à¸¡à¸±à¸•ิà¸à¸±à¸•โนมัติสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำความเสี่ยงต่ำ ถามสำหรับà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¹€à¸ªà¸µà¹ˆà¸¢à¸‡</td></tr>
|
|
30
|
+
<tr><td><code>acceptEdits</code></td><td>à¸à¸™à¸¸à¸¡à¸±à¸•ิà¸à¸±à¸•โนมัติสำหรับà¸à¸²à¸£à¹à¸à¹‰à¹„ขไฟล์ มีประโยชน์สำหรับà¸à¸²à¸£à¸žà¸±à¸’นาที่รวดเร็ว</td></tr>
|
|
31
|
+
<tr><td><code>bypassPermissions</code></td><td>ข้ามà¸à¸²à¸£à¸‚à¸à¸ªà¸´à¸—ธิ์ทั้งหมด ใช้ใน sandbox ที่เชื่à¸à¸–ืà¸à¹„ด้เท่านั้น</td></tr>
|
|
32
|
+
<tr><td><code>dontAsk</code></td><td>ไม่ถาม — ปà¸à¸´à¹€à¸ªà¸˜à¸à¸±à¸•โนมัติทุà¸à¸à¸¢à¹ˆà¸²à¸‡à¸—ี่ต้à¸à¸‡à¸‚à¸à¸ªà¸´à¸—ธิ์</td></tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
<h2>à¸à¸Žà¸ªà¸´à¸—ธิ์</h2>
|
|
36
|
+
<p>à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¹à¸šà¸šà¸¥à¸°à¹€à¸à¸µà¸¢à¸”ควบคุมเครื่à¸à¸‡à¸¡à¸·à¸à¹à¸¥à¸°à¸à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•์เฉพาะ:</p>
|
|
37
|
+
<pre><code>/permissions # เปิดตัวจัดà¸à¸²à¸£à¸à¸Žà¸ªà¸´à¸—ธิ์à¹à¸šà¸šà¹‚ต้ตà¸à¸š</code></pre>
|
|
38
|
+
<p>à¸à¸Žà¸ªà¸²à¸¡à¸²à¸£à¸–à¸à¸³à¸«à¸™à¸”เป้าหมายเครื่à¸à¸‡à¸¡à¸·à¸à¹€à¸‰à¸žà¸²à¸°à¸”้วยà¸à¸²à¸£à¸ˆà¸±à¸šà¸„ู่รูปà¹à¸šà¸š:</p>
|
|
39
|
+
<ul>
|
|
40
|
+
<li><code>Bash(git *)</code> — à¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¸„ำสั่ง git โดยเฉพาะ</li>
|
|
41
|
+
<li><code>Edit</code> — à¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¸à¸²à¸£à¹à¸à¹‰à¹„ขไฟล์ทั้งหมด</li>
|
|
42
|
+
<li><code>Bash(rm *)</code> — เตืà¸à¸™/บล็à¸à¸à¸„ำสั่ง shell ที่เป็นà¸à¸±à¸™à¸•ราย</li>
|
|
43
|
+
</ul>
|
|
44
|
+
|
|
45
|
+
<h2>à¹à¸™à¸§à¸—างปà¸à¸´à¸šà¸±à¸•ิด้านความปลà¸à¸”ภัย</h2>
|
|
46
|
+
<ul>
|
|
47
|
+
<li><strong>โหมดค่าเริ่มต้น</strong> สำหรับà¸à¸²à¸£à¸žà¸±à¸’นาประจำวัน</li>
|
|
48
|
+
<li><strong>โหมดวางà¹à¸œà¸™</strong> สำหรับโครงสร้างพื้นà¸à¸²à¸™à¸à¸²à¸£à¸œà¸¥à¸´à¸•หรืà¸à¹‚ค้ดที่ไม่คุ้นเคย</li>
|
|
49
|
+
<li><strong>โหมดข้าม</strong> เฉพาะใน worktrees ที่ใช้à¹à¸¥à¹‰à¸§à¸—ิ้งหรืภDocker sandboxes</li>
|
|
50
|
+
<li>ใช้à¸à¸Žà¸à¸™à¸¸à¸à¸²à¸•/ปà¸à¸´à¹€à¸ªà¸˜à¹€à¸žà¸·à¹ˆà¸à¸à¸™à¸¸à¸à¸²à¸•รูปà¹à¸šà¸šà¸—ี่ปลà¸à¸”ภัยขณะบล็à¸à¸à¸£à¸¹à¸›à¹à¸šà¸šà¸à¸±à¸™à¸•ราย</li>
|
|
51
|
+
</ul>
|
|
52
|
+
|
|
53
|
+
<footer class="footer">
|
|
54
|
+
<span>Clew Code 0.2.13 — โà¸à¹€à¸žà¸™à¸‹à¸à¸£à¹Œà¸ª</span>
|
|
55
|
+
<div class="footer-links">
|
|
56
|
+
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
57
|
+
<a href="https://github.com/ClewCode/ClewCode/issues">ปัà¸à¸«à¸²</a>
|
|
58
|
+
</div>
|
|
59
|
+
</footer>
|
|
60
|
+
</main>
|
|
61
|
+
<nav class="toc-sidebar"></nav>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<script src="js/main.js"></script>
|
|
65
|
+
</body>
|
|
66
|
+
</html>
|
|
67
|
+
|
package/docs/plugins.html
CHANGED
|
@@ -1,102 +1,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</title>
|
|
7
|
-
<meta name="description" content="Extend Clew with plugins — commands, agents, skills, hooks, MCP servers, and marketplace support.">
|
|
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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
-
<div class="content-wrap"><main class="content">
|
|
18
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Plugins</span></div>
|
|
19
|
-
<h1>Plugins</h1>
|
|
20
|
-
<p class="section-subtitle">Plugins extend Clew with custom commands, agents, skills, execution hooks, MCP servers, and LSP integrations. Plugin management is handled by <code>src/services/plugins/</code> and <code>src/utils/plugins/</code>.</p>
|
|
21
|
-
|
|
22
|
-
<h2>What Plugins Can Provide</h2>
|
|
23
|
-
<table>
|
|
24
|
-
<tr><th>Extension</th><th>Description</th></tr>
|
|
25
|
-
<tr><td>Slash Commands</td><td>Custom <code>/command</code> implementations registered via plugin manifest</td></tr>
|
|
26
|
-
<tr><td>Agents</td><td>Specialized agent configurations with custom prompts and tool access</td></tr>
|
|
27
|
-
<tr><td>Skills</td><td>Reusable task instructions from plugin skill directories</td></tr>
|
|
28
|
-
<tr><td>Execution Hooks</td><td>Pre/post hooks at tool, bash, prompt, and edit stages</td></tr>
|
|
29
|
-
<tr><td>MCP Servers</td><td>Model Context Protocol server definitions bundled with the plugin</td></tr>
|
|
30
|
-
<tr><td>LSP Servers</td><td>Language Server Protocol integration</td></tr>
|
|
31
|
-
</table>
|
|
32
|
-
|
|
33
|
-
<h2>Hook System</h2>
|
|
34
|
-
<table>
|
|
35
|
-
<tr><th>Hook Point</th><th>When It Fires</th></tr>
|
|
36
|
-
<tr><td><code>PreToolUse</code></td><td>Before a tool executes — validation, input modification, logging</td></tr>
|
|
37
|
-
<tr><td><code>PostToolUse</code></td><td>After a tool completes — result transformation, audit</td></tr>
|
|
38
|
-
<tr><td><code>PreBash</code></td><td>Before shell command execution — sanitization, env injection</td></tr>
|
|
39
|
-
<tr><td><code>PostPrompt</code></td><td>After prompt construction — context augmentation</td></tr>
|
|
40
|
-
<tr><td><code>PreAcceptEdit</code></td><td>Before accepting an edit — validation, policy enforcement</td></tr>
|
|
41
|
-
</table>
|
|
42
|
-
|
|
43
|
-
<h2>Plugin Management</h2>
|
|
44
|
-
<pre><code>/plugin # List installed plugins
|
|
45
|
-
/plugin-details # Show detailed plugin information
|
|
46
|
-
/reload-plugins # Activate pending plugin changes
|
|
47
|
-
claude plugin validate /path # Validate a plugin manifest (CLI)</code></pre>
|
|
48
|
-
|
|
49
|
-
<p>Plugins are loaded from these locations:</p>
|
|
50
|
-
<ul>
|
|
51
|
-
<li><strong>Bundled</strong> — Shipped with Clew</li>
|
|
52
|
-
<li><strong>User</strong> — Installed by the user (via marketplace or manual)</li>
|
|
53
|
-
<li><strong>Plugin dir</strong> — Custom directories via <code>--plugin-dir <path></code> (repeatable)</li>
|
|
54
|
-
</ul>
|
|
55
|
-
|
|
56
|
-
<p>The <code>PluginInstallationManager</code> (<code>src/services/plugins/PluginInstallationManager.ts</code>) handles automatic installation, marketplace reconciliation, and plugin refresh. Use <code>/reload-plugins</code> after installing or updating plugins.</p>
|
|
57
|
-
|
|
58
|
-
<h2>Built-in Plugins</h2>
|
|
59
|
-
<table>
|
|
60
|
-
<tr><th>Plugin</th><th>Description</th></tr>
|
|
61
|
-
<tr><td><code>commit-commands</code></td><td>Git workflow — commit, push, PR creation, branch cleanup (<code>clean_gone</code>)</td></tr>
|
|
62
|
-
<tr><td><code>commit-push-pr</code></td><td>Commit, push, and open a PR in one step</td></tr>
|
|
63
|
-
<tr><td><code>code-review</code></td><td>Automated PR code review</td></tr>
|
|
64
|
-
<tr><td><code>feature-dev</code></td><td>Guided feature development with codebase understanding</td></tr>
|
|
65
|
-
<tr><td><code>frontend-design</code></td><td>Production-grade UI/UX generation</td></tr>
|
|
66
|
-
<tr><td><code>verify</code></td><td>Typecheck, lint, build, and test pipeline</td></tr>
|
|
67
|
-
<tr><td><code>precommit</code></td><td>Pre-commit review with full verification</td></tr>
|
|
68
|
-
<tr><td><code>commit</code></td><td>Conventional git commit message generation</td></tr>
|
|
69
|
-
<tr><td><code>simplify</code></td><td>Code quality and reuse review</td></tr>
|
|
70
|
-
<tr><td><code>debug</code></td><td>Debugging assistance and diagnosis</td></tr>
|
|
71
|
-
<tr><td><code>web-search</code></td><td>Multi-provider web search</td></tr>
|
|
72
|
-
<tr><td><code>scrapling</code></td><td>Web scraping with Scrapling framework</td></tr>
|
|
73
|
-
<tr><td><code>skillify</code></td><td>Create reusable skills from workflows</td></tr>
|
|
74
|
-
<tr><td><code>remember</code></td><td>Save user preferences</td></tr>
|
|
75
|
-
</table>
|
|
76
|
-
|
|
77
|
-
<h2>Plugin Structure</h2>
|
|
78
|
-
<pre><code>my-plugin/
|
|
79
|
-
manifest.json # Plugin metadata and capability declarations
|
|
80
|
-
commands/ # Custom slash commands
|
|
81
|
-
skills/ # Reusable task instructions
|
|
82
|
-
agents/ # Agent configurations
|
|
83
|
-
hooks/ # Hook implementations</code></pre>
|
|
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
|
|
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</title>
|
|
7
|
+
<meta name="description" content="Extend Clew with plugins — commands, agents, skills, hooks, MCP servers, and marketplace support.">
|
|
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"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
+
<div class="content-wrap"><main class="content">
|
|
18
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Plugins</span></div>
|
|
19
|
+
<h1>Plugins</h1>
|
|
20
|
+
<p class="section-subtitle">Plugins extend Clew with custom commands, agents, skills, execution hooks, MCP servers, and LSP integrations. Plugin management is handled by <code>src/services/plugins/</code> and <code>src/utils/plugins/</code>.</p>
|
|
21
|
+
|
|
22
|
+
<h2>What Plugins Can Provide</h2>
|
|
23
|
+
<table>
|
|
24
|
+
<tr><th>Extension</th><th>Description</th></tr>
|
|
25
|
+
<tr><td>Slash Commands</td><td>Custom <code>/command</code> implementations registered via plugin manifest</td></tr>
|
|
26
|
+
<tr><td>Agents</td><td>Specialized agent configurations with custom prompts and tool access</td></tr>
|
|
27
|
+
<tr><td>Skills</td><td>Reusable task instructions from plugin skill directories</td></tr>
|
|
28
|
+
<tr><td>Execution Hooks</td><td>Pre/post hooks at tool, bash, prompt, and edit stages</td></tr>
|
|
29
|
+
<tr><td>MCP Servers</td><td>Model Context Protocol server definitions bundled with the plugin</td></tr>
|
|
30
|
+
<tr><td>LSP Servers</td><td>Language Server Protocol integration</td></tr>
|
|
31
|
+
</table>
|
|
32
|
+
|
|
33
|
+
<h2>Hook System</h2>
|
|
34
|
+
<table>
|
|
35
|
+
<tr><th>Hook Point</th><th>When It Fires</th></tr>
|
|
36
|
+
<tr><td><code>PreToolUse</code></td><td>Before a tool executes — validation, input modification, logging</td></tr>
|
|
37
|
+
<tr><td><code>PostToolUse</code></td><td>After a tool completes — result transformation, audit</td></tr>
|
|
38
|
+
<tr><td><code>PreBash</code></td><td>Before shell command execution — sanitization, env injection</td></tr>
|
|
39
|
+
<tr><td><code>PostPrompt</code></td><td>After prompt construction — context augmentation</td></tr>
|
|
40
|
+
<tr><td><code>PreAcceptEdit</code></td><td>Before accepting an edit — validation, policy enforcement</td></tr>
|
|
41
|
+
</table>
|
|
42
|
+
|
|
43
|
+
<h2>Plugin Management</h2>
|
|
44
|
+
<pre><code>/plugin # List installed plugins
|
|
45
|
+
/plugin-details # Show detailed plugin information
|
|
46
|
+
/reload-plugins # Activate pending plugin changes
|
|
47
|
+
claude plugin validate /path # Validate a plugin manifest (CLI)</code></pre>
|
|
48
|
+
|
|
49
|
+
<p>Plugins are loaded from these locations:</p>
|
|
50
|
+
<ul>
|
|
51
|
+
<li><strong>Bundled</strong> — Shipped with Clew</li>
|
|
52
|
+
<li><strong>User</strong> — Installed by the user (via marketplace or manual)</li>
|
|
53
|
+
<li><strong>Plugin dir</strong> — Custom directories via <code>--plugin-dir <path></code> (repeatable)</li>
|
|
54
|
+
</ul>
|
|
55
|
+
|
|
56
|
+
<p>The <code>PluginInstallationManager</code> (<code>src/services/plugins/PluginInstallationManager.ts</code>) handles automatic installation, marketplace reconciliation, and plugin refresh. Use <code>/reload-plugins</code> after installing or updating plugins.</p>
|
|
57
|
+
|
|
58
|
+
<h2>Built-in Plugins</h2>
|
|
59
|
+
<table>
|
|
60
|
+
<tr><th>Plugin</th><th>Description</th></tr>
|
|
61
|
+
<tr><td><code>commit-commands</code></td><td>Git workflow — commit, push, PR creation, branch cleanup (<code>clean_gone</code>)</td></tr>
|
|
62
|
+
<tr><td><code>commit-push-pr</code></td><td>Commit, push, and open a PR in one step</td></tr>
|
|
63
|
+
<tr><td><code>code-review</code></td><td>Automated PR code review</td></tr>
|
|
64
|
+
<tr><td><code>feature-dev</code></td><td>Guided feature development with codebase understanding</td></tr>
|
|
65
|
+
<tr><td><code>frontend-design</code></td><td>Production-grade UI/UX generation</td></tr>
|
|
66
|
+
<tr><td><code>verify</code></td><td>Typecheck, lint, build, and test pipeline</td></tr>
|
|
67
|
+
<tr><td><code>precommit</code></td><td>Pre-commit review with full verification</td></tr>
|
|
68
|
+
<tr><td><code>commit</code></td><td>Conventional git commit message generation</td></tr>
|
|
69
|
+
<tr><td><code>simplify</code></td><td>Code quality and reuse review</td></tr>
|
|
70
|
+
<tr><td><code>debug</code></td><td>Debugging assistance and diagnosis</td></tr>
|
|
71
|
+
<tr><td><code>web-search</code></td><td>Multi-provider web search</td></tr>
|
|
72
|
+
<tr><td><code>scrapling</code></td><td>Web scraping with Scrapling framework</td></tr>
|
|
73
|
+
<tr><td><code>skillify</code></td><td>Create reusable skills from workflows</td></tr>
|
|
74
|
+
<tr><td><code>remember</code></td><td>Save user preferences</td></tr>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
<h2>Plugin Structure</h2>
|
|
78
|
+
<pre><code>my-plugin/
|
|
79
|
+
manifest.json # Plugin metadata and capability declarations
|
|
80
|
+
commands/ # Custom slash commands
|
|
81
|
+
skills/ # Reusable task instructions
|
|
82
|
+
agents/ # Agent configurations
|
|
83
|
+
hooks/ # Hook implementations</code></pre>
|
|
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.13 — 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
|
+
|