← Back to Kontasks
L3 Tool Execution Architecture Plan
Design decision needed for implementing tool execution from kontask cards
Output
🛠️ L3 Tool Execution - Architecture Plan
The Challenge
Claude CLI tools (Read, Grep, Glob) are NOT an HTTP API - they're internal to Claude's subprocess. We need to build a proxy layer to expose them safely.
🏛️ Recommended Architecture
Browser (kontask.tools.read)
↓
Konui Proxy (/api/tools/read)
↓
Konsole Tool Endpoints (NEW)
↓
Deno Runtime (fs, glob, grep)Tools execute in Deno directly (not through Claude CLI) for speed and simplicity.
✅ Safe Tools to Expose (Read-Only)
| Tool | Endpoint | Safeguards |
|---|---|---|
| Read | POST /tools/read | Path ACL, size limit (1MB) |
| Glob | POST /tools/glob | Path ACL, result limit (100) |
| Grep | POST /tools/grep | Path ACL, regex validation, timeout |
⛔ NOT Exposed (Dangerous)
- Edit/Write - Modifies source code (requires approval workflow)
- Bash - Arbitrary command execution (requires allowlist)
🔐 Security Model
- Path ACL: Only
/konnectvol/prefix allowed - Auth: Requires valid session token
- Rate limit: 10 requests/second per session
- Size limits: Max 1MB per file, 100 results per glob
- Audit: All calls logged with session/kontask ID
💻 Client SDK Design
// In kontask inline script
const file = await kontask.tools.read('/konnectvol/konui/src/main.ts');
const files = await kontask.tools.glob('**/*.ts');
const matches = await kontask.tools.grep('TODO', { path: '/konnectvol' });Implementation Phases
| Phase | Work | Effort |
|---|---|---|
| 1 | Add konsole tool endpoints (Read only) | ~1 hour |
| 2 | Add konui proxy + client SDK | ~30 min |
| 3 | Add Glob + Grep endpoints | ~1 hour |
| 4 | Test with interactive kontask | ~30 min |
❓ Decision Needed
Should we proceed with this architecture? Start with Read-only, add Glob/Grep later?
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
kontasksapiarchitectureplanning
Created
7 Jan 2026, 9:42 pm
Updated
7 Jan 2026, 9:42 pm
Timing
⏱️ 138.4s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
Raw Data
{
"id": "0ee900c0-fa6e-4612-a588-d76f03f0ff64",
"type": "general",
"status": "completed",
"title": "L3 Tool Execution Architecture Plan",
"description": "Design decision needed for implementing tool execution from kontask cards",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:system-ui,-apple-system,sans-serif;\"><h2 style=\"color:#c678dd;margin:0 0 16px 0;\">🛠️ L3 Tool Execution - Architecture Plan</h2><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#fff;margin:0 0 12px 0;\">The Challenge</h3><p style=\"color:#e0e0e0;margin:0;\">Claude CLI tools (Read, Grep, Glob) are <strong>NOT an HTTP API</strong> - they're internal to Claude's subprocess. We need to build a proxy layer to expose them safely.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#61afef;margin:0 0 12px 0;\">🏛️ Recommended Architecture</h3><pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;overflow-x:auto;font-size:0.85rem;color:#e0e0e0;\">Browser (kontask.tools.read)\n ↓\nKonui Proxy (/api/tools/read)\n ↓\nKonsole Tool Endpoints (NEW)\n ↓\nDeno Runtime (fs, glob, grep)</pre><p style=\"color:#9ca3af;margin:12px 0 0 0;font-size:0.85rem;\">Tools execute in Deno directly (not through Claude CLI) for speed and simplicity.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#22c55e;margin:0 0 12px 0;\">✅ Safe Tools to Expose (Read-Only)</h3><table style=\"width:100%;border-collapse:collapse;font-size:0.9rem;\"><tr style=\"border-bottom:1px solid #444;\"><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Tool</th><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Endpoint</th><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Safeguards</th></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:10px;color:#98c379;\">Read</td><td style=\"padding:10px;font-family:monospace;\">POST /tools/read</td><td style=\"padding:10px;color:#7f848e;\">Path ACL, size limit (1MB)</td></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:10px;color:#98c379;\">Glob</td><td style=\"padding:10px;font-family:monospace;\">POST /tools/glob</td><td style=\"padding:10px;color:#7f848e;\">Path ACL, result limit (100)</td></tr><tr><td style=\"padding:10px;color:#98c379;\">Grep</td><td style=\"padding:10px;font-family:monospace;\">POST /tools/grep</td><td style=\"padding:10px;color:#7f848e;\">Path ACL, regex validation, timeout</td></tr></table></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#ef4444;margin:0 0 12px 0;\">⛔ NOT Exposed (Dangerous)</h3><ul style=\"color:#e0e0e0;margin:0;padding-left:20px;line-height:1.8;\"><li><strong>Edit/Write</strong> - Modifies source code (requires approval workflow)</li><li><strong>Bash</strong> - Arbitrary command execution (requires allowlist)</li></ul></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#e5c07b;margin:0 0 12px 0;\">🔐 Security Model</h3><ul style=\"color:#e0e0e0;margin:0;padding-left:20px;line-height:1.8;\"><li><strong>Path ACL:</strong> Only <code style=\"background:#3d3d3d;padding:2px 4px;border-radius:3px;\">/konnectvol/</code> prefix allowed</li><li><strong>Auth:</strong> Requires valid session token</li><li><strong>Rate limit:</strong> 10 requests/second per session</li><li><strong>Size limits:</strong> Max 1MB per file, 100 results per glob</li><li><strong>Audit:</strong> All calls logged with session/kontask ID</li></ul></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#c678dd;margin:0 0 12px 0;\">💻 Client SDK Design</h3><pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;overflow-x:auto;font-size:0.85rem;color:#e0e0e0;\">// In kontask inline script\nconst file = await kontask.tools.read('/konnectvol/konui/src/main.ts');\nconst files = await kontask.tools.glob('**/*.ts');\nconst matches = await kontask.tools.grep('TODO', { path: '/konnectvol' });</pre></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#fff;margin:0 0 12px 0;\">Implementation Phases</h3><table style=\"width:100%;border-collapse:collapse;font-size:0.9rem;\"><tr style=\"border-bottom:1px solid #444;\"><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Phase</th><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Work</th><th style=\"text-align:left;padding:10px;color:#9ca3af;\">Effort</th></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:10px;\">1</td><td style=\"padding:10px;color:#e0e0e0;\">Add konsole tool endpoints (Read only)</td><td style=\"padding:10px;color:#98c379;\">~1 hour</td></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:10px;\">2</td><td style=\"padding:10px;color:#e0e0e0;\">Add konui proxy + client SDK</td><td style=\"padding:10px;color:#98c379;\">~30 min</td></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:10px;\">3</td><td style=\"padding:10px;color:#e0e0e0;\">Add Glob + Grep endpoints</td><td style=\"padding:10px;color:#e5c07b;\">~1 hour</td></tr><tr><td style=\"padding:10px;\">4</td><td style=\"padding:10px;color:#e0e0e0;\">Test with interactive kontask</td><td style=\"padding:10px;color:#98c379;\">~30 min</td></tr></table></div><div style=\"background:#1a3d5c;border:1px solid #3b82f6;padding:16px;border-radius:6px;\"><h4 style=\"margin:0 0 8px 0;color:#3b82f6;\">❓ Decision Needed</h4><p style=\"color:#e0e0e0;margin:0;\">Should we proceed with this architecture? Start with Read-only, add Glob/Grep later?</p></div></div>",
"requestedAt": "2026-01-07T11:50:00.000Z",
"requestId": "104c9479-c601-43c1-95ae-297cb2ab90eb",
"choices": [
{
"label": "Start Phase 1",
"value": "Yes, let's implement L3 Phase 1 - add the Read tool endpoint to konsole",
"primary": true
},
{
"label": "All at once",
"value": "Implement all 3 tools (Read, Glob, Grep) in one go"
},
{
"label": "Need more info",
"value": "I have questions about the architecture before proceeding"
},
{
"label": "Skip L3",
"value": "L3 is too complex right now, let's work on something else"
}
],
"turnTiming": {
"totalMs": 138403,
"ttfeMs": 47,
"thinkingMs": 138356,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-07T11:42:30.723Z",
"updatedAt": "2026-01-07T11:42:37.290Z",
"requestId": "104c9479-c601-43c1-95ae-297cb2ab90eb",
"scope": "vibetools",
"tags": [
"kontasks",
"api",
"architecture",
"planning"
],
"targetUser": "claude"
}