clew-code 0.2.33 → 0.3.1

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/README.md CHANGED
@@ -25,7 +25,7 @@ A multi-provider AI coding CLI that codes, learns your preferences, coordinates
25
25
 
26
26
  ## Hacking in public
27
27
 
28
- Clew Code is a reverse-engineered reimplementation of [Claude Code](https://github.com/anthropics/claude-code) (Anthropic), rebuilt from the ground up to be **multi-provider** — you're not locked into one API. As of this writing the project ships agent-to-agent LAN peer coordination, a preference-learning engine, autonomous background loops, multi-pass context compaction, MCP integration, plan mode with full bypass permissions, goal verification, Max Mode parallel candidates, structured checkpoints, automated memory consolidation, and 27+ provider adapters.
28
+ Clew Code is a reverse-engineered reimplementation of [Claude Code](https://github.com/anthropics/claude-code) (Anthropic), rebuilt from the ground up to be **multi-provider** — you're not locked into one API. As of this writing the project ships agent-to-agent LAN peer coordination, a preference-learning engine, autonomous background loops, multi-pass context compaction, MCP integration, plan mode with full bypass permissions, goal verification, Max Mode parallel candidates, structured checkpoints, automated memory consolidation, and 26+ provider adapters.
29
29
 
30
30
  > Reverse-engineered from Claude Code. Rebuilt for every provider.
31
31
 
@@ -33,11 +33,11 @@ Clew Code is a reverse-engineered reimplementation of [Claude Code](https://gith
33
33
 
34
34
  ## Features
35
35
 
36
- - **27+ providers** — Anthropic, OpenAI, Google Gemini & Code Assist, DeepSeek, Groq, xAI (Grok), Mistral, Cohere, Perplexity, Cerebras, Moonshot (Kimi), Zhipu (GLM), NVIDIA NIM, OpenRouter, OpenCode, KiloCode, Ollama (local), Together AI, Fireworks AI, Deep Infra, SiliconFlow, Hugging Face, Poe, DigitalOcean, Cline, OpenCode Go. Switch mid-session.
37
- - **Peer-to-peer LAN** — find other Clew instances on the same machine (file registry) or across machines (UDP multicast). Assign tasks, set roles, execute remote commands — 15 peer AI tools let your agent coordinate autonomously via `/peer` commands.
36
+ - **26+ providers** — OpenAI, Google Gemini & Code Assist, DeepSeek, Groq, xAI (Grok), Mistral, Cohere, Perplexity, Cerebras, Moonshot (Kimi), Zhipu (GLM), NVIDIA NIM, OpenRouter, OpenCode, KiloCode, Ollama (local), Together AI, Fireworks AI, Deep Infra, SiliconFlow, Hugging Face, Poe, DigitalOcean, Cline, OpenCode Go. Switch mid-session. *(Anthropic provider removed — use [Claude Code](https://github.com/anthropics/claude-code) directly for Anthropic-first workflows.)*
37
+ - **Peer-to-peer LAN** — find other Clew instances on the same machine (file registry) or across machines (UDP multicast). Assign tasks, set roles, execute remote commands — 15+ peer AI tools let your agent coordinate autonomously via `/peer` commands. **Swarm execution** broadcasts shell commands to all peers in parallel with aggregated results. **Message broker** (in-process queue) enables offline message delivery with correlation IDs.
38
38
 
39
39
  - **Autonomous agent loop** — file-backed persistent task queue, lease-based concurrency, exponential backoff retry, dead-letter management. Cron scheduler for recurring jobs. Max 3 concurrent workers.
40
- - **50+ built-in tools** — Read, Write, Edit, Glob, Grep, Bash, WebSearch, WebFetch, Browser (Playwright), PR (create/list/view/review/merge/status), NotebookEdit, JsonPath, ReadArtifact, peer tools (15 LAN coordination tools), MCP tools, ProcessPeer (exec/pty), plan mode with full bypass permissions, multi-pass context compaction.
40
+ - **55+ built-in tools** — Read, Write, Edit, Glob, Grep, Bash, WebSearch, WebFetch, Browser (Playwright), PR (create/list/view/review/merge/status), NotebookEdit, JsonPath, ReadArtifact, peer tools (15+ LAN coordination tools including swarm + dashboard), MCP tools, ProcessPeer (exec/pty), MemoryFeedback (agent-driven memory curation), plan mode with full bypass permissions, multi-pass context compaction.
41
41
  - **Goal system** — `/goal` tracks task completion with heuristic pre-checks (exit codes, test output, lint results). Goal chains with `then` syntax. Auto-integrates with AFK mode and the autonomous loop.
42
42
  - **Goal Verifier** — When the agent attempts to terminate, an independent LLM verifier reviews the conversation against the goal text. If unsatisfied, the gap is reported as metadata for automatic re-prompting.
43
43
  - **Max Mode** — parallel candidate generation (default 3 per turn) using forked agents. Selects the best response via LLM judge (model-as-judge) with heuristic fallback. Toggle with `/maxmode`.
@@ -45,6 +45,7 @@ Clew Code is a reverse-engineered reimplementation of [Claude Code](https://gith
45
45
  - **Project memory promotion** — at the 70% checkpoint, stable information (active files, persistent decisions, notes) is promoted to `MEMORY.md` for cross-session persistence.
46
46
  - **Automated memory consolidation** — Dream process (7-day cycle) merges duplicate insights and creates weekly digests. Distill process (30-day cycle) extracts reusable patterns and generates skill suggestions.
47
47
  - **MCP — Model Context Protocol** — connect external tools via stdio (local subprocesses), SSE (remote servers with OAuth), or DirectConnect (in-process plugin servers).
48
+ - **Memory system (MiMo-inspired)** — SQLite-backed memory store with importance ranking, confidence scoring, access tracking, and timeline event logging. Auto-init + legacy migration + scan on first use. Budgeted memory injection into system prompt selects memories by importance × recency × confidence to fit the token budget. **In-compact extraction** automatically saves durable facts (`[decision]`, `[architecture]`, `[taste]`, `[bug]`) during context compaction. **Dream** (7-day) + **Distill** (30-day) auto-consolidate. Dream output synced to MemoryDB automatically. Peer-to-peer memory sync across LAN. `/memory dashboard` shows unified status of MemoryDB, Dream, Distill, Peer Sync, and timeline.
48
49
  - **Skills, plugins, hooks** — extend without touching source. Skills via `SKILL.md`, plugins with manifest, hooks at every lifecycle stage (PreToolUse, PostToolUse, PreBash, PostPrompt, PreAcceptEdit).
49
50
  - **8 permission modes** — default, ask, plan, auto, acceptEdits, bypassPermissions, dontAsk, guardian. Granular allow/deny rules with pattern matching.
50
51
 
@@ -94,10 +95,7 @@ Other runtime concepts:
94
95
 
95
96
  ## Profiles: Coding vs Personal
96
97
 
97
- Clew Code has two profiles you switch between with `/profile`:
98
-
99
- - **Coding profile** (`/profile coding`) — default. Directly implement software changes: inspect repo, edit files, run validation.
100
- - **Personal profile** (`/profile personal`) — command center mode. Plan, split tasks, **delegate** code work to a Codex worker via `process_peer`, then review and summarize results.
98
+ Clew Code has a **personal profile** (`/profile personal`) command center mode. Plan, split tasks, **delegate** code work to a Codex worker via `process_peer`, then review and summarize results.
101
99
 
102
100
  ### How personal delegation works
103
101
 
@@ -183,8 +181,17 @@ clew
183
181
  ❯ /goal "tests pass" # track task completion
184
182
  ❯ /maxmode on # parallel candidate generation
185
183
  ❯ /peer discover # find other Clew instances on LAN
184
+ ❯ /peer swarm clew -p "summarize CHANGELOG.md" # run on all peers
185
+ ❯ /peer dashboard # show peer task checklist
186
+ ❯ /peer memory sync # import memories from all peers
187
+ ❯ /peer memory auto on # auto-sync memories every 60 min
186
188
  ❯ /mcp list # connected MCP servers
187
189
  ❯ /daemon # background autonomous loop
190
+ ❯ /compact # compress context + auto-extract durable memories
191
+ ❯ /memory dashboard # unified memory system status
192
+ ❯ /memory init # bootstrap project memory (SQLite + scan)
193
+ ❯ /memory rebuild # reconstruct context from ranked memories
194
+ ❯ /memory recall --verbose # recall ranked memories
188
195
 
189
196
  # One-shot mode (pipe-friendly)
190
197
  clew -p "summarize CHANGELOG.md"
@@ -198,7 +205,6 @@ clew --resume last
198
205
  ## Provider setup
199
206
 
200
207
  ```bash
201
- export ANTHROPIC_API_KEY=sk-ant-...
202
208
  export OPENAI_API_KEY=sk-...
203
209
  export GOOGLE_API_KEY=...
204
210
  export DEEPSEEK_API_KEY=...
@@ -216,27 +222,27 @@ export GEMINI_API_KEY=...
216
222
  <summary><strong>21 slash commands</strong></summary>
217
223
 
218
224
  ```
219
- /model Switch provider or model
220
- /status Provider, session, context info
221
- /doctor Diagnostics
222
- /profile Switch between coding and personal profiles
223
- /context Active context usage
224
- /compact Compress conversation history
225
- /goal Track and verify task completion
226
- /maxmode Toggle parallel candidate generation
227
- /mcp MCP server management
228
- /code-review Review changed files for bugs
229
- /simplify Cleanup-focused review
230
- /plugin Plugin and hook management
231
- /bridge Bridge mode config
232
- /agent Background agent dispatch & subcommands
233
- /agents TUI Agent dashboard (operational view)
234
- /peer Collaborate with Clew instances on LAN
235
- /remote WebSocket remote control
236
- /daemon Autonomous daemon dashboard
237
- /task Scheduled tasks
238
- /memory Long-term memory search and management
239
- /tasks Curated task list management
225
+ /model Switch provider or model
226
+ /status Provider, session, context info
227
+ /doctor Diagnostics
228
+ /profile Personal profile mode
229
+ /context Active context usage
230
+ /compact Compress conversation history
231
+ /goal Track and verify task completion
232
+ /maxmode Toggle parallel candidate generation
233
+ /mcp MCP server management
234
+ /code-review Review changed files for bugs
235
+ /simplify Cleanup-focused review
236
+ /plugin Plugin and hook management
237
+ /bridge Bridge mode config
238
+ /agent Background agent dispatch & subcommands
239
+ /agents TUI Agent dashboard (operational view)
240
+ /peer LAN peers: share, discover, join, send, swarm, dashboard, memory sync/auto
241
+ /remote WebSocket remote control
242
+ /daemon Autonomous daemon dashboard
243
+ /task Scheduled tasks
244
+ /memory Memory system: init, scan, rebuild, recall, feedback, dashboard, search
245
+ /tasks Curated task list management
240
246
  ```
241
247
 
242
248
  </details>
@@ -256,7 +262,7 @@ src/
256
262
  ├── commands/ # Slash command implementations
257
263
  ├── tools/ # 50+ built-in tools
258
264
  ├── services/
259
- │ ├── ai/ # Provider manager + 27+ providers
265
+ │ ├── ai/ # Provider manager + 26+ providers
260
266
  │ ├── mcp/ # MCP client + auth + transports
261
267
  │ ├── plugins/ # Plugin hooks + marketplace
262
268
  │ ├── autonomous/ # Agent loop + task queue + cron
@@ -267,7 +273,7 @@ src/
267
273
  │ ├── lsp/ # LSP integration
268
274
  │ └── Supervisor/ # Agent supervisor IPC
269
275
  ├── peer/ # PeerServer + PeerDiscovery (agent-to-agent)
270
- ├── memory/ # Long-term memory (SQLite, FTS5)
276
+ ├── memory/ # MemoryDB + autoInit + scanner + hierarchy + feedback (MiMo-style)
271
277
  ├── bridge/ # WebSocket bridge + relay
272
278
  ├── components/ # Ink terminal UI components
273
279
  ├── state/ # AppState management
@@ -334,7 +340,7 @@ We welcome contributions. Read [CONTRIBUTING.md](CONTRIBUTING.md), [CODE_OF_COND
334
340
  - **Distill process** — 30-day pattern extraction and reusable skill generation
335
341
  - **Video input** — paste mp4/mov/webm to video-capable models (Gemini, GPT-5.x)
336
342
  - **Image & Video generation** — `GenerateImage` (DALL-E 3, Imagen 3) and `GenerateVideo` (Runway Gen-4)
337
- - **Profile system** — `/profile` switches between `coding` and `personal` profiles
343
+ - **Profile system** — `/profile personal` sets command-center mode with plan/split/delegate workflow
338
344
  - **Execution modes** — `/mode` with `safe`, `yolo`, `afk`, `review-only`, `browser-safe`
339
345
  - **ReadArtifact tool** — read truncated large outputs in chunks
340
346
  - **Bounded tool output** — 200-line cap with disk persistence for large results
@@ -1 +1 @@
1
- {"BUILD_VERSION":"0.2.33","PACKAGE_URL":"clew-code","FEEDBACK_CHANNEL":"https://github.com/ClewCode/ClewCode/issues","ISSUES_EXPLAINER":"visit https://github.com/ClewCode/ClewCode/issues"}
1
+ {"BUILD_VERSION":"0.3.1","PACKAGE_URL":"clew-code","FEEDBACK_CHANNEL":"https://github.com/ClewCode/ClewCode/issues","ISSUES_EXPLAINER":"visit https://github.com/ClewCode/ClewCode/issues"}