@tractorscorch/clank 1.4.1 → 1.4.4

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/CHANGELOG.md CHANGED
@@ -1,205 +1,223 @@
1
- # Changelog
2
-
3
- All notable changes to Clank will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
-
7
- ---
8
-
9
- ## [1.4.1] — 2026-03-23
10
-
11
- ### Security
12
- - **Config get redaction** — `config get` action now redacts sensitive keys (apiKey, token, botToken) before returning to LLM context
13
- - **Config set protection** — config tool now blocks prototype pollution (`__proto__`, `constructor`, `prototype`)
14
- - **Rate limit streaming path** — `handleInboundMessageStreaming` now enforced (was bypassing rate limiter)
15
- - **SSRF private IPs** — web_fetch now blocks RFC 1918 ranges (10.x, 192.168.x, 172.16-31.x) and IPv4-mapped IPv6
16
- - **STT workspace containment** — speech_to_text tool now uses guardPath() to prevent reading files outside workspace
17
-
18
- ### Audit Result
19
- - 0 dependency vulnerabilities
20
- - 14 PASS, 1 WARN (bash blocklist is defense-in-depth), 0 FAIL
21
- - Grade: A
22
-
23
- ---
24
-
25
- ## [1.4.0] — 2026-03-23
26
-
27
- ### Added
28
- - **Telegram streaming** — responses edit in real-time as tokens arrive (800ms interval, respects rate limits)
29
- - **Telegram image handling** — send photos to the bot, routed to agent with image URL
30
- - **Telegram document handling** — send files to the bot, saved to temp with sanitized filenames, agent can read them
31
- - **File share tool** — `share_file` lets the agent send workspace files through channels (workspace containment enforced)
32
- - **Per-agent voice** — each agent can have its own ElevenLabs voice ID in config
33
- - **Compact prompt mode** — `compactPrompt: true` strips workspace files for small model context optimization
34
- - **Thinking control** — `thinking: "off"` suppresses extended reasoning for faster responses
35
- - **Auto-memory persistence** — "remember X", preference statements, and corrections auto-saved to MEMORY.md
36
- - **Web UI session history** — loads last 50 messages on connect and session switch
37
- - **Rate limiting** — 20 messages per minute per session, prevents model flooding
38
-
39
- ### Improved
40
- - **Model retry** — one retry with 2s backoff on transient connection failures
41
- - **Session resume compaction** — auto-compacts on load if over context budget
42
- - **Memory persistence instruction** — system prompt now encourages the agent to save learnings
43
-
44
- ### Security
45
- - Telegram document uploads: filename sanitized (path traversal protection), 10MB size limit
46
- - File share tool: workspace containment via guardPath
47
- - Rate limiting prevents denial-of-service via message flooding
48
- - Per-agent voice IDs read from config only (not from user input)
49
-
50
- ---
51
-
52
- ## [1.3.1]2026-03-23
53
-
54
- ### Fixed
55
- - **STT not working** — local whisper.cpp was selected by default but not installed. Added Groq as the recommended free STT provider (whisper-large-v3-turbo).
56
- - **STT provider priority:** Groq (free, fast) → OpenAI Whisper → local whisper.cpp
57
- - **Setup wizard:** STT now offers Groq as option 1 (recommended), OpenAI as option 2, local as option 3
58
-
59
- ---
60
-
61
- ## [1.3.0] — 2026-03-23
62
-
63
- ### Added
64
- - **ElevenLabs integration** text-to-speech via ElevenLabs API, configurable during onboarding
65
- - **Whisper integration** speech-to-text via OpenAI Whisper API or local whisper.cpp
66
- - **Voice tools (3):** `text_to_speech`, `speech_to_text`, `list_voices` agent can generate and transcribe audio
67
- - **Telegram voice messages** — send a voice message → auto-transcribed via Whisper → routed to agent → response as voice (ElevenLabs) or text
68
- - **Integrations config section** — unified config for third-party API services (ElevenLabs, Whisper, image gen, extensible)
69
- - **Setup wizard integrations step** — configure ElevenLabs, Whisper, and other API services during onboarding
70
-
71
- ### Changed
72
- - Tool count: 21 total (10 core + 11 self-config/voice)
73
- - Setup wizard now asks about integrations for all users (not just advanced mode)
74
-
75
- ---
76
-
77
- ## [1.2.1] — 2026-03-23
78
-
79
- ### Fixed
80
- - **Gateway crash on restart** — stale Telegram messages queued while offline no longer flood the model. Messages older than 30s before startup are dropped.
81
- - **Parallel model overload** — Telegram messages from the same chat are now processed sequentially (per-chat queue) instead of all at once.
82
-
83
- ---
84
-
85
- ## [1.2.0]2026-03-22
86
-
87
- ### Added
88
- - **Two-tier context compaction** — critical for local model performance:
89
- - Tier 1 (fast): system prompt budgeting, tool result dedup, message truncation, aggressive dropping
90
- - Tier 2 (LLM-summarized): model generates conversation recap replacing oldest messages. Preserves meaning over long sessions.
91
- - Token budgeting: reserves 25% for response, budgets system prompt separately from conversation
92
- - **`clank update`** — update to latest npm version, preserves config/sessions/memory, restarts gateway
93
-
94
- ---
95
-
96
- ## [1.1.0] — 2026-03-22
97
-
98
- ### Security Hardening
99
- - **Bash tool:** expanded blocklist from 5 to 25 patterns covers flag variations, shell-in-shell, encoded payloads, PowerShell, system damage commands
100
- - **Path traversal:** all file tools (read, write, edit, list, search, glob) now enforce workspace containment via `guardPath()` — blocks absolute paths and `../` traversal outside workspace
101
- - **Config redaction:** API keys, bot tokens, and auth tokens are stripped from config before exposing to LLM context or WebSocket clients
102
- - **Prototype pollution:** config.set RPC blocks `__proto__`, `constructor`, `prototype` keys
103
- - **SSRF protection:** web_fetch blocks localhost, cloud metadata endpoints (169.254.169.254), .internal/.local hostnames, file:// protocol
104
- - **Gateway auth:** auto-generates token on startup if mode is "token" but no token configured — prevents accidental open gateways
105
- - **Status endpoint:** /status now requires Bearer token authentication
106
- - **Tool confirmations:** gateway respects autoApprove config instead of blindly approving 30s timeout defaults to deny
107
- - **.gitignore:** added config.json5, *.pem, *.key, credentials.json to prevent accidental secret commits
108
-
109
- ### Bug Fixes
110
- - **Telegram bot not responding:** `bot.start()` was blocking (awaited) which prevented the gateway from finishing startup. Now runs non-blocking with `onStart` callback.
111
- - **Telegram allowFrom:** now matches both `@username` and numeric user IDs (was only matching numeric)
112
- - **grammY missing:** added as real dependency (was dynamic import that failed silently)
113
- - **Local server URL not saved:** setup wizard now saves detected server baseUrl for all local providers (was only saving Ollama)
114
- - **Port conflict:** default port changed to 18790 (was 18789, conflicted with OpenClaw/Claude Code)
115
- - **--web flag:** `clank chat --web` now auto-starts gateway and opens browser
116
- - **Gateway text/message param:** accepts both `message` and `text` fields from clients
117
-
118
- ### Added
119
- - **TUI:** rich terminal UI with streaming, tool cards, thinking blocks, agent/session/model pickers, slash commands, shell integration (`!command`)
120
- - **Web Control UI:** 8-panel dashboard Chat, Agents, Sessions, Config (JSON editor), Pipelines, Cron, Logs, Channels
121
- - **Telegram slash commands:** /help, /status, /agents, /agent, /sessions, /new, /reset, /model, /think
122
- - **CLI commands:** tui, dashboard, pipeline, cron, channels, uninstall
123
- - **Background gateway:** runs as detached process, Telegram/Discord stay alive while CLI/TUI/Web run on top
124
- - **Gateway singleton:** refuses to start if already running on the port
125
- - **Self-config tools (8):** config, manage_channel, manage_agent, manage_model, manage_session, manage_cron, gateway_status, send_message
126
- - **Google Gemini provider** with streaming and function calling
127
- - **Memory system:** TF-IDF cosine similarity with decay scoring, categorized storage
128
- - **Encryption:** AES-256-GCM for API keys, PIN hashing with timing-safe comparison
129
- - **Web search:** Brave Search API integration
130
- - **Config hot-reload:** watches config.json5 for changes
131
- - **`clank uninstall`:** removes all data, daemon, and npm package
132
-
133
- ### Changed
134
- - Default command (`clank` with no args) starts gateway in background then launches TUI
135
- - `clank gateway start` now runs in background by default (`--foreground` for blocking mode)
136
- - `clank gateway restart` fully implemented (stop + start)
137
- - Protocol updated to v1 spec with 17 RPC methods and 11 event types
138
-
139
- ---
140
-
141
- ## [1.0.0] 2026-03-22
142
-
143
- Initial release Clank Gateway foundation.
144
-
145
- ### Architecture
146
- - Single gateway daemon (HTTP + WebSocket on port 18789)
147
- - WebSocket JSON-RPC protocol v1 with 17 RPC methods and 11 event types
148
- - All interfaces are equal CLI, TUI, Web UI, Telegram, Discord
149
-
150
- ### Engine
151
- - AgentEngine with ReAct loop (stream → tool calls → execute → loop, max 50 iterations)
152
- - Pluggable ContextEngine with compaction optimized for local models (60% threshold vs 80% cloud)
153
- - Tool tiering: full/core/auto reduces tool count for smaller models
154
- - PromptFallbackProvider for models without native function calling
155
-
156
- ### Providers
157
- - Ollama (primary) — auto-detect, dynamic context window, tool support checking
158
- - Anthropic Claude — Messages API with SSE streaming
159
- - OpenAIalso covers LM Studio, vLLM, llama.cpp (OpenAI-compatible)
160
- - Google Gemini — streaming with function calling
161
- - Provider router with fallback chain and local server auto-detection
162
- - Reasoning/thinking content support (Qwen, DeepSeek, etc.)
163
-
164
- ### Tools (18 total)
165
- - **Core (10):** read_file, write_file, edit_file, list_directory, search_files, glob_files, bash, git, web_search (Brave), web_fetch
166
- - **Self-config (8):** config, manage_channel, manage_agent, manage_model, manage_session, manage_cron, gateway_status, send_message
167
-
168
- ### Interfaces
169
- - **CLI:** 12 commands chat, gateway, setup, fix, models, agents, daemon, tui, dashboard, pipeline, cron, channels
170
- - **TUI:** Rich terminal UI with streaming, tool cards, thinking blocks, agent/session/model pickers, slash commands, shell integration
171
- - **Web Control UI:** 8-panel SPA Chat, Agents, Sessions, Config (JSON editor), Pipelines, Cron, Logs, Channels
172
- - **Telegram:** Full adapter with slash commands, typing indicators, response chunking, permission allowlists, group mention checking
173
- - **Discord:** Full adapter with typing, reply threading, response chunking
174
-
175
- ### Multi-Agent
176
- - Named agents with separate models, workspaces, and tool access
177
- - Config-driven routing with binding priority tiers (peer guild → team → channel → default)
178
- - Normalized session keys for cross-channel continuity (dm:telegram:123, cli:main, etc.)
179
-
180
- ### Systems
181
- - **Memory:** TF-IDF cosine similarity with decay scoring, categorized storage (identity/knowledge/lessons/context)
182
- - **Sessions:** JSON transcript persistence, prune/cap/reset, cross-channel shared sessions
183
- - **Config:** JSON5 with env var substitution, hot-reload watcher, defaults with deep merge
184
- - **Cron:** JSONL job store, 30s tick interval, run logging, retry tracking
185
- - **Pipelines:** Sequential step execution with agent handoffs, state persistence
186
- - **Plugins:** Discovery (~/.clank/plugins/ + node_modules/clank-plugin-*), 25+ hook types
187
- - **Heartbeat:** Periodic probes from HEARTBEAT.md, quiet hours
188
- - **Voice:** TTS (ElevenLabs + piper), STT (whisper.cpp)
189
- - **Daemon:** Cross-platform servicemacOS (launchd), Windows (Task Scheduler), Linux (systemd)
190
-
191
- ### Security
192
- - AES-256-GCM encryption for API keys (PBKDF2, 100K iterations)
193
- - PIN verification with timing-safe comparison
194
- - 3-tier tool safety system (low/medium/high) with auto-approve settings
195
- - Gateway binds to localhost by default, token-based auth
196
-
197
- ### Onboarding
198
- - `clank setup` wizard — Quick Start (under 2 minutes) and Advanced flows
199
- - Auto-detects local model servers (Ollama, LM Studio, llama.cpp, vLLM)
200
- - Configures cloud providers, Telegram, Discord, Brave Search, voice, agents
201
- - `clank fix` diagnostics with auto-repair
202
-
203
- ### Workspace
204
- - Bootstrap templates: SOUL.md, USER.md, IDENTITY.md, BOOTSTRAP.md, AGENTS.md, TOOLS.md, MEMORY.md, HEARTBEAT.md
205
- - System prompt builder loads workspace files + project context (.clank.md)
1
+ # Changelog
2
+
3
+ All notable changes to Clank will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ ---
8
+
9
+ ## [1.4.4] — 2026-03-22
10
+
11
+ ### Fixed
12
+ - **Gateway crash after 4-5 messages** — confirmation handler WebSocket listeners were never removed on timeout, accumulating orphaned handlers per message until the process crashed
13
+ - **Engine listener limit** — set `maxListeners` to 30 on AgentEngine (Node.js default of 10 was too low since each message cycle wires 10 event listeners)
14
+ - **Rate limiter memory leak** — stale session entries in the rate limiter Map were never purged; added periodic cleanup when map exceeds 100 entries
15
+
16
+ ---
17
+
18
+ ## [1.4.3] — 2026-03-22
19
+
20
+ ### Fixed
21
+ - **Telegram streaming stutter** — fixed race condition where multiple partial messages were sent instead of editing a single message; added synchronous guard flag to prevent duplicate `sendMessage` calls while the initial message promise is in-flight
22
+ - **Gateway killed by `clear` on Windows** — replaced `fork()` with `spawn()` + `windowsHide` for background gateway process; `fork` kept an IPC channel tied to the parent console, so clearing PowerShell killed the gateway
23
+ - **`clank update` fails on Windows** — added `--force` to the npm install command to overwrite locked shim files (`clank.ps1`, `clank.cmd`)
24
+
25
+ ---
26
+
27
+ ## [1.4.1] — 2026-03-23
28
+
29
+ ### Security
30
+ - **Config get redaction** — `config get` action now redacts sensitive keys (apiKey, token, botToken) before returning to LLM context
31
+ - **Config set protection** — config tool now blocks prototype pollution (`__proto__`, `constructor`, `prototype`)
32
+ - **Rate limit streaming path** — `handleInboundMessageStreaming` now enforced (was bypassing rate limiter)
33
+ - **SSRF private IPs** — web_fetch now blocks RFC 1918 ranges (10.x, 192.168.x, 172.16-31.x) and IPv4-mapped IPv6
34
+ - **STT workspace containment** — speech_to_text tool now uses guardPath() to prevent reading files outside workspace
35
+
36
+ ### Audit Result
37
+ - 0 dependency vulnerabilities
38
+ - 14 PASS, 1 WARN (bash blocklist is defense-in-depth), 0 FAIL
39
+ - Grade: A
40
+
41
+ ---
42
+
43
+ ## [1.4.0] — 2026-03-23
44
+
45
+ ### Added
46
+ - **Telegram streaming** responses edit in real-time as tokens arrive (800ms interval, respects rate limits)
47
+ - **Telegram image handling** send photos to the bot, routed to agent with image URL
48
+ - **Telegram document handling** send files to the bot, saved to temp with sanitized filenames, agent can read them
49
+ - **File share tool** — `share_file` lets the agent send workspace files through channels (workspace containment enforced)
50
+ - **Per-agent voice** — each agent can have its own ElevenLabs voice ID in config
51
+ - **Compact prompt mode** — `compactPrompt: true` strips workspace files for small model context optimization
52
+ - **Thinking control** `thinking: "off"` suppresses extended reasoning for faster responses
53
+ - **Auto-memory persistence** — "remember X", preference statements, and corrections auto-saved to MEMORY.md
54
+ - **Web UI session history** — loads last 50 messages on connect and session switch
55
+ - **Rate limiting** — 20 messages per minute per session, prevents model flooding
56
+
57
+ ### Improved
58
+ - **Model retry** — one retry with 2s backoff on transient connection failures
59
+ - **Session resume compaction** — auto-compacts on load if over context budget
60
+ - **Memory persistence instruction** — system prompt now encourages the agent to save learnings
61
+
62
+ ### Security
63
+ - Telegram document uploads: filename sanitized (path traversal protection), 10MB size limit
64
+ - File share tool: workspace containment via guardPath
65
+ - Rate limiting prevents denial-of-service via message flooding
66
+ - Per-agent voice IDs read from config only (not from user input)
67
+
68
+ ---
69
+
70
+ ## [1.3.1] — 2026-03-23
71
+
72
+ ### Fixed
73
+ - **STT not working** local whisper.cpp was selected by default but not installed. Added Groq as the recommended free STT provider (whisper-large-v3-turbo).
74
+ - **STT provider priority:** Groq (free, fast) → OpenAI Whisper → local whisper.cpp
75
+ - **Setup wizard:** STT now offers Groq as option 1 (recommended), OpenAI as option 2, local as option 3
76
+
77
+ ---
78
+
79
+ ## [1.3.0] — 2026-03-23
80
+
81
+ ### Added
82
+ - **ElevenLabs integration** — text-to-speech via ElevenLabs API, configurable during onboarding
83
+ - **Whisper integration** — speech-to-text via OpenAI Whisper API or local whisper.cpp
84
+ - **Voice tools (3):** `text_to_speech`, `speech_to_text`, `list_voices` — agent can generate and transcribe audio
85
+ - **Telegram voice messages** send a voice message → auto-transcribed via Whisper → routed to agent → response as voice (ElevenLabs) or text
86
+ - **Integrations config section** — unified config for third-party API services (ElevenLabs, Whisper, image gen, extensible)
87
+ - **Setup wizard integrations step** — configure ElevenLabs, Whisper, and other API services during onboarding
88
+
89
+ ### Changed
90
+ - Tool count: 21 total (10 core + 11 self-config/voice)
91
+ - Setup wizard now asks about integrations for all users (not just advanced mode)
92
+
93
+ ---
94
+
95
+ ## [1.2.1] — 2026-03-23
96
+
97
+ ### Fixed
98
+ - **Gateway crash on restart** — stale Telegram messages queued while offline no longer flood the model. Messages older than 30s before startup are dropped.
99
+ - **Parallel model overload** Telegram messages from the same chat are now processed sequentially (per-chat queue) instead of all at once.
100
+
101
+ ---
102
+
103
+ ## [1.2.0] 2026-03-22
104
+
105
+ ### Added
106
+ - **Two-tier context compaction**critical for local model performance:
107
+ - Tier 1 (fast): system prompt budgeting, tool result dedup, message truncation, aggressive dropping
108
+ - Tier 2 (LLM-summarized): model generates conversation recap replacing oldest messages. Preserves meaning over long sessions.
109
+ - Token budgeting: reserves 25% for response, budgets system prompt separately from conversation
110
+ - **`clank update`** update to latest npm version, preserves config/sessions/memory, restarts gateway
111
+
112
+ ---
113
+
114
+ ## [1.1.0] 2026-03-22
115
+
116
+ ### Security Hardening
117
+ - **Bash tool:** expanded blocklist from 5 to 25 patterns — covers flag variations, shell-in-shell, encoded payloads, PowerShell, system damage commands
118
+ - **Path traversal:** all file tools (read, write, edit, list, search, glob) now enforce workspace containment via `guardPath()` — blocks absolute paths and `../` traversal outside workspace
119
+ - **Config redaction:** API keys, bot tokens, and auth tokens are stripped from config before exposing to LLM context or WebSocket clients
120
+ - **Prototype pollution:** config.set RPC blocks `__proto__`, `constructor`, `prototype` keys
121
+ - **SSRF protection:** web_fetch blocks localhost, cloud metadata endpoints (169.254.169.254), .internal/.local hostnames, file:// protocol
122
+ - **Gateway auth:** auto-generates token on startup if mode is "token" but no token configured — prevents accidental open gateways
123
+ - **Status endpoint:** /status now requires Bearer token authentication
124
+ - **Tool confirmations:** gateway respects autoApprove config instead of blindly approving — 30s timeout defaults to deny
125
+ - **.gitignore:** added config.json5, *.pem, *.key, credentials.json to prevent accidental secret commits
126
+
127
+ ### Bug Fixes
128
+ - **Telegram bot not responding:** `bot.start()` was blocking (awaited) which prevented the gateway from finishing startup. Now runs non-blocking with `onStart` callback.
129
+ - **Telegram allowFrom:** now matches both `@username` and numeric user IDs (was only matching numeric)
130
+ - **grammY missing:** added as real dependency (was dynamic import that failed silently)
131
+ - **Local server URL not saved:** setup wizard now saves detected server baseUrl for all local providers (was only saving Ollama)
132
+ - **Port conflict:** default port changed to 18790 (was 18789, conflicted with OpenClaw/Claude Code)
133
+ - **--web flag:** `clank chat --web` now auto-starts gateway and opens browser
134
+ - **Gateway text/message param:** accepts both `message` and `text` fields from clients
135
+
136
+ ### Added
137
+ - **TUI:** rich terminal UI with streaming, tool cards, thinking blocks, agent/session/model pickers, slash commands, shell integration (`!command`)
138
+ - **Web Control UI:** 8-panel dashboard — Chat, Agents, Sessions, Config (JSON editor), Pipelines, Cron, Logs, Channels
139
+ - **Telegram slash commands:** /help, /status, /agents, /agent, /sessions, /new, /reset, /model, /think
140
+ - **CLI commands:** tui, dashboard, pipeline, cron, channels, uninstall
141
+ - **Background gateway:** runs as detached process, Telegram/Discord stay alive while CLI/TUI/Web run on top
142
+ - **Gateway singleton:** refuses to start if already running on the port
143
+ - **Self-config tools (8):** config, manage_channel, manage_agent, manage_model, manage_session, manage_cron, gateway_status, send_message
144
+ - **Google Gemini provider** with streaming and function calling
145
+ - **Memory system:** TF-IDF cosine similarity with decay scoring, categorized storage
146
+ - **Encryption:** AES-256-GCM for API keys, PIN hashing with timing-safe comparison
147
+ - **Web search:** Brave Search API integration
148
+ - **Config hot-reload:** watches config.json5 for changes
149
+ - **`clank uninstall`:** removes all data, daemon, and npm package
150
+
151
+ ### Changed
152
+ - Default command (`clank` with no args) starts gateway in background then launches TUI
153
+ - `clank gateway start` now runs in background by default (`--foreground` for blocking mode)
154
+ - `clank gateway restart` fully implemented (stop + start)
155
+ - Protocol updated to v1 spec with 17 RPC methods and 11 event types
156
+
157
+ ---
158
+
159
+ ## [1.0.0]2026-03-22
160
+
161
+ Initial release Clank Gateway foundation.
162
+
163
+ ### Architecture
164
+ - Single gateway daemon (HTTP + WebSocket on port 18789)
165
+ - WebSocket JSON-RPC protocol v1 with 17 RPC methods and 11 event types
166
+ - All interfaces are equal CLI, TUI, Web UI, Telegram, Discord
167
+
168
+ ### Engine
169
+ - AgentEngine with ReAct loop (stream tool calls execute loop, max 50 iterations)
170
+ - Pluggable ContextEngine with compaction optimized for local models (60% threshold vs 80% cloud)
171
+ - Tool tiering: full/core/autoreduces tool count for smaller models
172
+ - PromptFallbackProvider for models without native function calling
173
+
174
+ ### Providers
175
+ - Ollama (primary) — auto-detect, dynamic context window, tool support checking
176
+ - Anthropic Claude Messages API with SSE streaming
177
+ - OpenAI also covers LM Studio, vLLM, llama.cpp (OpenAI-compatible)
178
+ - Google Gemini streaming with function calling
179
+ - Provider router with fallback chain and local server auto-detection
180
+ - Reasoning/thinking content support (Qwen, DeepSeek, etc.)
181
+
182
+ ### Tools (18 total)
183
+ - **Core (10):** read_file, write_file, edit_file, list_directory, search_files, glob_files, bash, git, web_search (Brave), web_fetch
184
+ - **Self-config (8):** config, manage_channel, manage_agent, manage_model, manage_session, manage_cron, gateway_status, send_message
185
+
186
+ ### Interfaces
187
+ - **CLI:** 12 commands chat, gateway, setup, fix, models, agents, daemon, tui, dashboard, pipeline, cron, channels
188
+ - **TUI:** Rich terminal UI with streaming, tool cards, thinking blocks, agent/session/model pickers, slash commands, shell integration
189
+ - **Web Control UI:** 8-panel SPAChat, Agents, Sessions, Config (JSON editor), Pipelines, Cron, Logs, Channels
190
+ - **Telegram:** Full adapter with slash commands, typing indicators, response chunking, permission allowlists, group mention checking
191
+ - **Discord:** Full adapter with typing, reply threading, response chunking
192
+
193
+ ### Multi-Agent
194
+ - Named agents with separate models, workspaces, and tool access
195
+ - Config-driven routing with binding priority tiers (peer → guild → team → channel → default)
196
+ - Normalized session keys for cross-channel continuity (dm:telegram:123, cli:main, etc.)
197
+
198
+ ### Systems
199
+ - **Memory:** TF-IDF cosine similarity with decay scoring, categorized storage (identity/knowledge/lessons/context)
200
+ - **Sessions:** JSON transcript persistence, prune/cap/reset, cross-channel shared sessions
201
+ - **Config:** JSON5 with env var substitution, hot-reload watcher, defaults with deep merge
202
+ - **Cron:** JSONL job store, 30s tick interval, run logging, retry tracking
203
+ - **Pipelines:** Sequential step execution with agent handoffs, state persistence
204
+ - **Plugins:** Discovery (~/.clank/plugins/ + node_modules/clank-plugin-*), 25+ hook types
205
+ - **Heartbeat:** Periodic probes from HEARTBEAT.md, quiet hours
206
+ - **Voice:** TTS (ElevenLabs + piper), STT (whisper.cpp)
207
+ - **Daemon:** Cross-platform service — macOS (launchd), Windows (Task Scheduler), Linux (systemd)
208
+
209
+ ### Security
210
+ - AES-256-GCM encryption for API keys (PBKDF2, 100K iterations)
211
+ - PIN verification with timing-safe comparison
212
+ - 3-tier tool safety system (low/medium/high) with auto-approve settings
213
+ - Gateway binds to localhost by default, token-based auth
214
+
215
+ ### Onboarding
216
+ - `clank setup` wizard — Quick Start (under 2 minutes) and Advanced flows
217
+ - Auto-detects local model servers (Ollama, LM Studio, llama.cpp, vLLM)
218
+ - Configures cloud providers, Telegram, Discord, Brave Search, voice, agents
219
+ - `clank fix` diagnostics with auto-repair
220
+
221
+ ### Workspace
222
+ - Bootstrap templates: SOUL.md, USER.md, IDENTITY.md, BOOTSTRAP.md, AGENTS.md, TOOLS.md, MEMORY.md, HEARTBEAT.md
223
+ - System prompt builder loads workspace files + project context (.clank.md)