clew-code 0.2.13 → 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.
Files changed (52) hide show
  1. package/dist/main.js +2596 -2527
  2. package/docs/architecture.html +148 -148
  3. package/docs/architecture.th.html +79 -79
  4. package/docs/clew-code-architecture.html +6 -6
  5. package/docs/commands.html +225 -224
  6. package/docs/commands.th.html +132 -131
  7. package/docs/configuration.html +147 -147
  8. package/docs/configuration.th.html +108 -108
  9. package/docs/daemon.html +129 -129
  10. package/docs/daemon.th.html +73 -73
  11. package/docs/features/bridge-mode.html +99 -99
  12. package/docs/features/bridge-mode.th.html +90 -90
  13. package/docs/features/evals.html +182 -182
  14. package/docs/features/evals.th.html +90 -90
  15. package/docs/features/peer.html +178 -178
  16. package/docs/features/searxng-search.html +151 -151
  17. package/docs/features/searxng-search.th.html +95 -95
  18. package/docs/features/sentry-setup.html +157 -157
  19. package/docs/features/sentry-setup.th.html +97 -97
  20. package/docs/index.html +298 -299
  21. package/docs/index.th.html +292 -292
  22. package/docs/installation.html +105 -105
  23. package/docs/installation.th.html +105 -105
  24. package/docs/internals/growthbook-ab-testing.html +113 -113
  25. package/docs/internals/growthbook-ab-testing.th.html +81 -81
  26. package/docs/internals/hidden-features.html +175 -149
  27. package/docs/internals/hidden-features.th.html +135 -109
  28. package/docs/loop.html +181 -181
  29. package/docs/loop.th.html +227 -227
  30. package/docs/mcp.html +247 -247
  31. package/docs/mcp.th.html +207 -207
  32. package/docs/models.html +110 -111
  33. package/docs/models.th.html +61 -61
  34. package/docs/peer.html +236 -236
  35. package/docs/peer.th.html +280 -280
  36. package/docs/permission-model.html +102 -102
  37. package/docs/permission-model.th.html +67 -67
  38. package/docs/plugins.html +102 -102
  39. package/docs/plugins.th.html +79 -79
  40. package/docs/providers.html +126 -126
  41. package/docs/providers.th.html +80 -80
  42. package/docs/quick-start.html +93 -93
  43. package/docs/quick-start.th.html +1 -1
  44. package/docs/research-memory.html +82 -82
  45. package/docs/research-memory.th.html +72 -72
  46. package/docs/skills.html +117 -117
  47. package/docs/skills.th.html +90 -90
  48. package/docs/tools.html +170 -170
  49. package/docs/tools.th.html +84 -84
  50. package/docs/troubleshooting.html +106 -106
  51. package/docs/troubleshooting.th.html +85 -85
  52. 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 &lt;mode&gt;</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 &lt;tools...&gt;</code></td><td>Allowlist specific tools with patterns</td></tr>
71
- <tr><td><code>--disallowedTools, --disallowed-tools &lt;tools...&gt;</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 v0.2.7 — 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</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 &lt;mode&gt;</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 &lt;tools...&gt;</code></td><td>Allowlist specific tools with patterns</td></tr>
71
+ <tr><td><code>--disallowedTools, --disallowed-tools &lt;tools...&gt;</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 v0.2.7 — โอเพนซอร์ส</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
-
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 &lt;path&gt;</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 v0.2.7 — 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</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 &lt;path&gt;</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
+