claude-flow 3.6.10 → 3.6.11
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/.claude/scheduled_tasks.lock +1 -0
- package/README.md +77 -24
- package/package.json +1 -1
- package/v3/@claude-flow/cli/README.md +77 -24
- package/v3/@claude-flow/cli/bin/cli.js +14 -3
- package/v3/@claude-flow/cli/dist/src/commands/memory.js +74 -18
- package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.d.ts +2 -11
- package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.js +227 -409
- package/v3/@claude-flow/cli/dist/src/mcp-client.js +16 -1
- package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +100 -39
- package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.js +47 -4
- package/v3/@claude-flow/cli/package.json +1 -1
- package/v3/@claude-flow/shared/package.json +2 -1
- /package/.claude/{settings copy.json → settings.json.bak} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sessionId":"ea43bca2-cc37-44fb-97ff-f1c914a31fb1","pid":24292,"procStart":"Wed Apr 29 22:31:28 2026","acquiredAt":1777507213673}
|
package/README.md
CHANGED
|
@@ -52,31 +52,84 @@ Install Ruflo as a native Claude Code plugin -- adds skills, commands, agents, a
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
<details>
|
|
55
|
-
<summary><strong>All
|
|
55
|
+
<summary><strong>All 32 plugins</strong></summary>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#### Core & Orchestration
|
|
58
|
+
|
|
59
|
+
| Plugin | What it does |
|
|
60
|
+
|--------|-------------|
|
|
61
|
+
| **ruflo-core** | Foundation — server, health checks, plugin discovery |
|
|
62
|
+
| **ruflo-swarm** | Coordinate multiple agents as a team |
|
|
63
|
+
| **ruflo-autopilot** | Let agents run autonomously in a loop |
|
|
64
|
+
| **ruflo-loop-workers** | Schedule background tasks on a timer |
|
|
65
|
+
| **ruflo-workflows** | Reusable multi-step task templates |
|
|
66
|
+
| **ruflo-federation** | Agents on different machines collaborate securely |
|
|
67
|
+
|
|
68
|
+
#### Memory & Knowledge
|
|
69
|
+
|
|
70
|
+
| Plugin | What it does |
|
|
71
|
+
|--------|-------------|
|
|
72
|
+
| **ruflo-agentdb** | Fast vector database for agent memory |
|
|
73
|
+
| **ruflo-rag-memory** | Smart retrieval — hybrid search, graph hops, diversity ranking |
|
|
74
|
+
| **ruflo-rvf** | Save and restore agent memory across sessions |
|
|
75
|
+
| **ruflo-ruvector** | [`ruvector`](https://npmjs.com/package/ruvector) — GPU-accelerated search, Graph RAG, 103 tools |
|
|
76
|
+
| **ruflo-knowledge-graph** | Build and traverse entity relationship maps |
|
|
77
|
+
|
|
78
|
+
#### Intelligence & Learning
|
|
79
|
+
|
|
80
|
+
| Plugin | What it does |
|
|
81
|
+
|--------|-------------|
|
|
82
|
+
| **ruflo-intelligence** | Agents learn from past successes and get smarter |
|
|
83
|
+
| **ruflo-daa** | Dynamic agent behavior and cognitive patterns |
|
|
84
|
+
| **ruflo-ruvllm** | Run local LLMs (Ollama, etc.) with smart routing |
|
|
85
|
+
| **ruflo-goals** | Break big goals into plans and track progress |
|
|
86
|
+
|
|
87
|
+
#### Code Quality & Testing
|
|
88
|
+
|
|
89
|
+
| Plugin | What it does |
|
|
90
|
+
|--------|-------------|
|
|
91
|
+
| **ruflo-testgen** | Find missing tests and generate them automatically |
|
|
92
|
+
| **ruflo-browser** | Automate browser testing with Playwright |
|
|
93
|
+
| **ruflo-jujutsu** | Analyze git diffs, score risk, suggest reviewers |
|
|
94
|
+
| **ruflo-docs** | Generate and maintain documentation automatically |
|
|
95
|
+
|
|
96
|
+
#### Security & Compliance
|
|
97
|
+
|
|
98
|
+
| Plugin | What it does |
|
|
99
|
+
|--------|-------------|
|
|
100
|
+
| **ruflo-security-audit** | Scan for vulnerabilities and CVEs |
|
|
101
|
+
| **ruflo-aidefence** | Block prompt injection, detect PII, safety scanning |
|
|
102
|
+
|
|
103
|
+
#### Architecture & Methodology
|
|
104
|
+
|
|
105
|
+
| Plugin | What it does |
|
|
106
|
+
|--------|-------------|
|
|
107
|
+
| **ruflo-adr** | Track architecture decisions with a living record |
|
|
108
|
+
| **ruflo-ddd** | Scaffold domain-driven design — contexts, aggregates, events |
|
|
109
|
+
| **ruflo-sparc** | Guided 5-phase development methodology with quality gates |
|
|
110
|
+
|
|
111
|
+
#### DevOps & Observability
|
|
112
|
+
|
|
113
|
+
| Plugin | What it does |
|
|
114
|
+
|--------|-------------|
|
|
115
|
+
| **ruflo-migrations** | Manage database schema changes safely |
|
|
116
|
+
| **ruflo-observability** | Structured logs, traces, and metrics in one place |
|
|
117
|
+
| **ruflo-cost-tracker** | Track token usage, set budgets, get cost alerts |
|
|
118
|
+
|
|
119
|
+
#### Extensibility
|
|
120
|
+
|
|
121
|
+
| Plugin | What it does |
|
|
122
|
+
|--------|-------------|
|
|
123
|
+
| **ruflo-wasm** | Run sandboxed WebAssembly agents |
|
|
124
|
+
| **ruflo-plugin-creator** | Scaffold, validate, and publish your own plugins |
|
|
125
|
+
|
|
126
|
+
#### Domain-Specific
|
|
127
|
+
|
|
128
|
+
| Plugin | What it does |
|
|
58
129
|
|--------|-------------|
|
|
59
|
-
| **ruflo-
|
|
60
|
-
| **ruflo-
|
|
61
|
-
| **ruflo-
|
|
62
|
-
| **ruflo-intelligence** | Self-learning SONA patterns, trajectory learning, model routing |
|
|
63
|
-
| **ruflo-agentdb** | AgentDB controllers, HNSW vector search, RuVector embeddings |
|
|
64
|
-
| **ruflo-aidefence** | AI safety scanning, PII detection, prompt injection defense |
|
|
65
|
-
| **ruflo-browser** | Playwright browser automation for testing and scraping |
|
|
66
|
-
| **ruflo-jujutsu** | Git diff analysis, risk scoring, reviewer recommendations |
|
|
67
|
-
| **ruflo-wasm** | Sandboxed WASM agent creation and gallery sharing |
|
|
68
|
-
| **ruflo-workflows** | Workflow templates, orchestration, lifecycle management |
|
|
69
|
-
| **ruflo-daa** | Dynamic Agentic Architecture, cognitive patterns |
|
|
70
|
-
| **ruflo-ruvllm** | Local LLM inference, MicroLoRA, multi-provider chat |
|
|
71
|
-
| **ruflo-rvf** | RVF portable memory, session persistence, transfer |
|
|
72
|
-
| **ruflo-loop-workers** | Background `/loop` workers, CronCreate scheduling |
|
|
73
|
-
| **ruflo-security-audit** | Security scanning, CVE checks, dependency audit |
|
|
74
|
-
| **ruflo-rag-memory** | Memory bridge, simple store/search/recall interface |
|
|
75
|
-
| **ruflo-testgen** | Test gap detection, TDD workflow, tester agent |
|
|
76
|
-
| **ruflo-docs** | Doc generation, drift detection, docs-writer agent |
|
|
77
|
-
| **ruflo-plugin-creator** | Scaffold, validate, and publish new plugins |
|
|
78
|
-
| **ruflo-federation** | Zero-trust agent federation, PII pipeline, cross-installation comms |
|
|
79
|
-
| **ruflo-goals** | GOAP planning, deep research, long-horizon tracking |
|
|
130
|
+
| **ruflo-iot-cognitum** | IoT device management — trust scoring, anomaly detection, fleets |
|
|
131
|
+
| **ruflo-neural-trader** | [`neural-trader`](https://npmjs.com/package/neural-trader) — AI trading with 4 agents, backtesting, 112+ tools |
|
|
132
|
+
| **ruflo-market-data** | Ingest market data, vectorize OHLCV, detect patterns |
|
|
80
133
|
|
|
81
134
|
</details>
|
|
82
135
|
|
|
@@ -112,7 +165,7 @@ claude mcp add ruflo -- npx -y @claude-flow/cli@latest
|
|
|
112
165
|
| 🧠 **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
|
|
113
166
|
| 💾 **Vector Memory** | HNSW-indexed AgentDB with 150x-12,500x faster search |
|
|
114
167
|
| ⚡ **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
|
|
115
|
-
| 🧩 **Plugin Marketplace** |
|
|
168
|
+
| 🧩 **Plugin Marketplace** | 32 native Claude Code plugins + 21 npm plugins |
|
|
116
169
|
| 🔌 **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
|
|
117
170
|
| 🛡️ **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
|
|
118
171
|
| 🌐 **Agent Federation** | Cross-installation agent collaboration with zero-trust security
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.11",
|
|
4
4
|
"description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -52,31 +52,84 @@ Install Ruflo as a native Claude Code plugin -- adds skills, commands, agents, a
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
<details>
|
|
55
|
-
<summary><strong>All
|
|
55
|
+
<summary><strong>All 32 plugins</strong></summary>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#### Core & Orchestration
|
|
58
|
+
|
|
59
|
+
| Plugin | What it does |
|
|
60
|
+
|--------|-------------|
|
|
61
|
+
| **ruflo-core** | Foundation — server, health checks, plugin discovery |
|
|
62
|
+
| **ruflo-swarm** | Coordinate multiple agents as a team |
|
|
63
|
+
| **ruflo-autopilot** | Let agents run autonomously in a loop |
|
|
64
|
+
| **ruflo-loop-workers** | Schedule background tasks on a timer |
|
|
65
|
+
| **ruflo-workflows** | Reusable multi-step task templates |
|
|
66
|
+
| **ruflo-federation** | Agents on different machines collaborate securely |
|
|
67
|
+
|
|
68
|
+
#### Memory & Knowledge
|
|
69
|
+
|
|
70
|
+
| Plugin | What it does |
|
|
71
|
+
|--------|-------------|
|
|
72
|
+
| **ruflo-agentdb** | Fast vector database for agent memory |
|
|
73
|
+
| **ruflo-rag-memory** | Smart retrieval — hybrid search, graph hops, diversity ranking |
|
|
74
|
+
| **ruflo-rvf** | Save and restore agent memory across sessions |
|
|
75
|
+
| **ruflo-ruvector** | [`ruvector`](https://npmjs.com/package/ruvector) — GPU-accelerated search, Graph RAG, 103 tools |
|
|
76
|
+
| **ruflo-knowledge-graph** | Build and traverse entity relationship maps |
|
|
77
|
+
|
|
78
|
+
#### Intelligence & Learning
|
|
79
|
+
|
|
80
|
+
| Plugin | What it does |
|
|
81
|
+
|--------|-------------|
|
|
82
|
+
| **ruflo-intelligence** | Agents learn from past successes and get smarter |
|
|
83
|
+
| **ruflo-daa** | Dynamic agent behavior and cognitive patterns |
|
|
84
|
+
| **ruflo-ruvllm** | Run local LLMs (Ollama, etc.) with smart routing |
|
|
85
|
+
| **ruflo-goals** | Break big goals into plans and track progress |
|
|
86
|
+
|
|
87
|
+
#### Code Quality & Testing
|
|
88
|
+
|
|
89
|
+
| Plugin | What it does |
|
|
90
|
+
|--------|-------------|
|
|
91
|
+
| **ruflo-testgen** | Find missing tests and generate them automatically |
|
|
92
|
+
| **ruflo-browser** | Automate browser testing with Playwright |
|
|
93
|
+
| **ruflo-jujutsu** | Analyze git diffs, score risk, suggest reviewers |
|
|
94
|
+
| **ruflo-docs** | Generate and maintain documentation automatically |
|
|
95
|
+
|
|
96
|
+
#### Security & Compliance
|
|
97
|
+
|
|
98
|
+
| Plugin | What it does |
|
|
99
|
+
|--------|-------------|
|
|
100
|
+
| **ruflo-security-audit** | Scan for vulnerabilities and CVEs |
|
|
101
|
+
| **ruflo-aidefence** | Block prompt injection, detect PII, safety scanning |
|
|
102
|
+
|
|
103
|
+
#### Architecture & Methodology
|
|
104
|
+
|
|
105
|
+
| Plugin | What it does |
|
|
106
|
+
|--------|-------------|
|
|
107
|
+
| **ruflo-adr** | Track architecture decisions with a living record |
|
|
108
|
+
| **ruflo-ddd** | Scaffold domain-driven design — contexts, aggregates, events |
|
|
109
|
+
| **ruflo-sparc** | Guided 5-phase development methodology with quality gates |
|
|
110
|
+
|
|
111
|
+
#### DevOps & Observability
|
|
112
|
+
|
|
113
|
+
| Plugin | What it does |
|
|
114
|
+
|--------|-------------|
|
|
115
|
+
| **ruflo-migrations** | Manage database schema changes safely |
|
|
116
|
+
| **ruflo-observability** | Structured logs, traces, and metrics in one place |
|
|
117
|
+
| **ruflo-cost-tracker** | Track token usage, set budgets, get cost alerts |
|
|
118
|
+
|
|
119
|
+
#### Extensibility
|
|
120
|
+
|
|
121
|
+
| Plugin | What it does |
|
|
122
|
+
|--------|-------------|
|
|
123
|
+
| **ruflo-wasm** | Run sandboxed WebAssembly agents |
|
|
124
|
+
| **ruflo-plugin-creator** | Scaffold, validate, and publish your own plugins |
|
|
125
|
+
|
|
126
|
+
#### Domain-Specific
|
|
127
|
+
|
|
128
|
+
| Plugin | What it does |
|
|
58
129
|
|--------|-------------|
|
|
59
|
-
| **ruflo-
|
|
60
|
-
| **ruflo-
|
|
61
|
-
| **ruflo-
|
|
62
|
-
| **ruflo-intelligence** | Self-learning SONA patterns, trajectory learning, model routing |
|
|
63
|
-
| **ruflo-agentdb** | AgentDB controllers, HNSW vector search, RuVector embeddings |
|
|
64
|
-
| **ruflo-aidefence** | AI safety scanning, PII detection, prompt injection defense |
|
|
65
|
-
| **ruflo-browser** | Playwright browser automation for testing and scraping |
|
|
66
|
-
| **ruflo-jujutsu** | Git diff analysis, risk scoring, reviewer recommendations |
|
|
67
|
-
| **ruflo-wasm** | Sandboxed WASM agent creation and gallery sharing |
|
|
68
|
-
| **ruflo-workflows** | Workflow templates, orchestration, lifecycle management |
|
|
69
|
-
| **ruflo-daa** | Dynamic Agentic Architecture, cognitive patterns |
|
|
70
|
-
| **ruflo-ruvllm** | Local LLM inference, MicroLoRA, multi-provider chat |
|
|
71
|
-
| **ruflo-rvf** | RVF portable memory, session persistence, transfer |
|
|
72
|
-
| **ruflo-loop-workers** | Background `/loop` workers, CronCreate scheduling |
|
|
73
|
-
| **ruflo-security-audit** | Security scanning, CVE checks, dependency audit |
|
|
74
|
-
| **ruflo-rag-memory** | Memory bridge, simple store/search/recall interface |
|
|
75
|
-
| **ruflo-testgen** | Test gap detection, TDD workflow, tester agent |
|
|
76
|
-
| **ruflo-docs** | Doc generation, drift detection, docs-writer agent |
|
|
77
|
-
| **ruflo-plugin-creator** | Scaffold, validate, and publish new plugins |
|
|
78
|
-
| **ruflo-federation** | Zero-trust agent federation, PII pipeline, cross-installation comms |
|
|
79
|
-
| **ruflo-goals** | GOAP planning, deep research, long-horizon tracking |
|
|
130
|
+
| **ruflo-iot-cognitum** | IoT device management — trust scoring, anomaly detection, fleets |
|
|
131
|
+
| **ruflo-neural-trader** | [`neural-trader`](https://npmjs.com/package/neural-trader) — AI trading with 4 agents, backtesting, 112+ tools |
|
|
132
|
+
| **ruflo-market-data** | Ingest market data, vectorize OHLCV, detect patterns |
|
|
80
133
|
|
|
81
134
|
</details>
|
|
82
135
|
|
|
@@ -112,7 +165,7 @@ claude mcp add ruflo -- npx -y @claude-flow/cli@latest
|
|
|
112
165
|
| 🧠 **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
|
|
113
166
|
| 💾 **Vector Memory** | HNSW-indexed AgentDB with 150x-12,500x faster search |
|
|
114
167
|
| ⚡ **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
|
|
115
|
-
| 🧩 **Plugin Marketplace** |
|
|
168
|
+
| 🧩 **Plugin Marketplace** | 32 native Claude Code plugins + 21 npm plugins |
|
|
116
169
|
| 🔌 **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
|
|
117
170
|
| 🛡️ **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
|
|
118
171
|
| 🌐 **Agent Federation** | Cross-installation agent collaboration with zero-trust security
|
|
@@ -47,17 +47,28 @@ if (isMCPMode) {
|
|
|
47
47
|
|
|
48
48
|
for (const line of lines) {
|
|
49
49
|
if (line.trim()) {
|
|
50
|
+
let message;
|
|
51
|
+
try {
|
|
52
|
+
message = JSON.parse(line);
|
|
53
|
+
} catch {
|
|
54
|
+
console.log(JSON.stringify({
|
|
55
|
+
jsonrpc: '2.0',
|
|
56
|
+
id: null,
|
|
57
|
+
error: { code: -32700, message: 'Parse error' },
|
|
58
|
+
}));
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
50
61
|
try {
|
|
51
|
-
const message = JSON.parse(line);
|
|
52
62
|
const response = await handleMessage(message);
|
|
53
63
|
if (response) {
|
|
54
64
|
console.log(JSON.stringify(response));
|
|
55
65
|
}
|
|
56
66
|
} catch (error) {
|
|
67
|
+
// #1606: Return proper internal error instead of parse error
|
|
57
68
|
console.log(JSON.stringify({
|
|
58
69
|
jsonrpc: '2.0',
|
|
59
|
-
id: null,
|
|
60
|
-
error: { code: -
|
|
70
|
+
id: message.id ?? null,
|
|
71
|
+
error: { code: -32603, message: error instanceof Error ? error.message : 'Internal error' },
|
|
61
72
|
}));
|
|
62
73
|
}
|
|
63
74
|
}
|
|
@@ -252,12 +252,20 @@ const searchCommand = {
|
|
|
252
252
|
description: 'Build/rebuild HNSW index before searching (enables 150x-12,500x speedup)',
|
|
253
253
|
type: 'boolean',
|
|
254
254
|
default: false
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'smart',
|
|
258
|
+
short: 's',
|
|
259
|
+
description: 'Use SmartRetrieval pipeline (query expansion, RRF, MMR, recency)',
|
|
260
|
+
type: 'boolean',
|
|
261
|
+
default: false
|
|
255
262
|
}
|
|
256
263
|
],
|
|
257
264
|
examples: [
|
|
258
265
|
{ command: 'claude-flow memory search -q "authentication patterns"', description: 'Semantic search' },
|
|
259
266
|
{ command: 'claude-flow memory search -q "JWT" -t keyword', description: 'Keyword search' },
|
|
260
|
-
{ command: 'claude-flow memory search -q "test" --build-hnsw', description: 'Build HNSW index and search' }
|
|
267
|
+
{ command: 'claude-flow memory search -q "test" --build-hnsw', description: 'Build HNSW index and search' },
|
|
268
|
+
{ command: 'claude-flow memory search -q "auth patterns" --smart', description: 'SmartRetrieval with RRF + MMR' }
|
|
261
269
|
],
|
|
262
270
|
action: async (ctx) => {
|
|
263
271
|
const query = ctx.flags.query || ctx.args[0];
|
|
@@ -300,28 +308,76 @@ const searchCommand = {
|
|
|
300
308
|
// Use direct sql.js search with vector similarity
|
|
301
309
|
try {
|
|
302
310
|
const { searchEntries } = await import('../memory/memory-initializer.js');
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
const useSmart = (ctx.flags.smart || ctx.flags.s);
|
|
312
|
+
let results;
|
|
313
|
+
let searchTimeMs;
|
|
314
|
+
let smartStats;
|
|
315
|
+
let backendLabel = 'HNSW + sql.js';
|
|
316
|
+
if (useSmart) {
|
|
317
|
+
const { smartSearch } = await import('@claude-flow/memory');
|
|
318
|
+
// Adapt searchEntries to the SearchFn interface
|
|
319
|
+
const rawSearch = async (req) => {
|
|
320
|
+
const r = await searchEntries({
|
|
321
|
+
query: req.query,
|
|
322
|
+
namespace: req.namespace || namespace,
|
|
323
|
+
limit: req.limit || limit * 3,
|
|
324
|
+
threshold: req.threshold ?? threshold,
|
|
325
|
+
});
|
|
326
|
+
return {
|
|
327
|
+
results: r.results.map(e => ({
|
|
328
|
+
id: e.id,
|
|
329
|
+
key: e.key,
|
|
330
|
+
content: e.content,
|
|
331
|
+
score: e.score,
|
|
332
|
+
namespace: e.namespace,
|
|
333
|
+
})),
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
const smartResult = await smartSearch(rawSearch, {
|
|
337
|
+
query,
|
|
338
|
+
namespace,
|
|
339
|
+
limit,
|
|
340
|
+
threshold,
|
|
341
|
+
});
|
|
342
|
+
results = smartResult.results.map(r => ({
|
|
343
|
+
key: r.key,
|
|
344
|
+
score: r.score,
|
|
345
|
+
namespace: r.namespace,
|
|
346
|
+
preview: r.content,
|
|
347
|
+
}));
|
|
348
|
+
searchTimeMs = smartResult.stats.durationMs;
|
|
349
|
+
smartStats = smartResult.stats;
|
|
350
|
+
backendLabel = 'SmartRetrieval (RRF + MMR + Recency)';
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
const searchResult = await searchEntries({
|
|
354
|
+
query,
|
|
355
|
+
namespace,
|
|
356
|
+
limit,
|
|
357
|
+
threshold
|
|
358
|
+
});
|
|
359
|
+
if (!searchResult.success) {
|
|
360
|
+
output.printError(searchResult.error || 'Search failed');
|
|
361
|
+
return { success: false, exitCode: 1 };
|
|
362
|
+
}
|
|
363
|
+
results = searchResult.results.map(r => ({
|
|
364
|
+
key: r.key,
|
|
365
|
+
score: r.score,
|
|
366
|
+
namespace: r.namespace,
|
|
367
|
+
preview: r.content
|
|
368
|
+
}));
|
|
369
|
+
searchTimeMs = searchResult.searchTime;
|
|
312
370
|
}
|
|
313
|
-
const results = searchResult.results.map(r => ({
|
|
314
|
-
key: r.key,
|
|
315
|
-
score: r.score,
|
|
316
|
-
namespace: r.namespace,
|
|
317
|
-
preview: r.content
|
|
318
|
-
}));
|
|
319
371
|
if (ctx.flags.format === 'json') {
|
|
320
|
-
output.printJson({ query, searchType, results, searchTime: `${
|
|
372
|
+
output.printJson({ query, searchType, results, searchTime: `${searchTimeMs}ms`, ...(smartStats ? { stats: smartStats } : {}) });
|
|
321
373
|
return { success: true, data: results };
|
|
322
374
|
}
|
|
323
375
|
// Performance stats
|
|
324
|
-
output.writeln(output.dim(` Search time: ${
|
|
376
|
+
output.writeln(output.dim(` Search time: ${searchTimeMs}ms`));
|
|
377
|
+
if (useSmart && smartStats) {
|
|
378
|
+
output.writeln(output.dim(` Backend: ${backendLabel}`));
|
|
379
|
+
output.writeln(output.dim(` Variants: ${smartStats.variantCount}, Raw candidates: ${smartStats.rawCandidateCount}`));
|
|
380
|
+
}
|
|
325
381
|
output.writeln();
|
|
326
382
|
if (results.length === 0) {
|
|
327
383
|
output.printWarning('No results found');
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLAUDE.md Generator
|
|
3
|
-
* Generates
|
|
4
|
-
* with template variants for different usage patterns.
|
|
3
|
+
* Generates lean, enforceable Claude Code configuration optimized for token efficiency.
|
|
5
4
|
*
|
|
6
5
|
* Templates: minimal | standard | full | security | performance | solo
|
|
7
|
-
* All templates use
|
|
6
|
+
* All templates use imperative rules and agent comms-first coordination.
|
|
8
7
|
*/
|
|
9
8
|
import type { InitOptions, ClaudeMdTemplate } from './types.js';
|
|
10
|
-
/**
|
|
11
|
-
* Generate CLAUDE.md content based on init options and template.
|
|
12
|
-
* Template is determined by: options.runtime.claudeMdTemplate > explicit param > 'standard'
|
|
13
|
-
*/
|
|
14
9
|
export declare function generateClaudeMd(options: InitOptions, template?: ClaudeMdTemplate): string;
|
|
15
|
-
/**
|
|
16
|
-
* Generate minimal CLAUDE.md content (backward-compatible alias).
|
|
17
|
-
*/
|
|
18
10
|
export declare function generateMinimalClaudeMd(options: InitOptions): string;
|
|
19
|
-
/** Available template names for CLI wizard */
|
|
20
11
|
export declare const CLAUDE_MD_TEMPLATES: Array<{
|
|
21
12
|
name: ClaudeMdTemplate;
|
|
22
13
|
description: string;
|