@claude-flow/cli 3.25.5 → 3.26.0
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/.proven-config-version +1 -0
- package/.claude/helpers/.helpers-version +1 -1
- package/.claude/helpers/helpers.manifest.json +5 -4
- package/.claude/helpers/hook-handler.cjs +129 -0
- package/.claude/helpers/statusline.cjs +771 -505
- package/.claude/proven-config.json +42 -0
- package/catalog-manifest.json +12 -0
- package/dist/src/commands/advisor.d.ts +15 -0
- package/dist/src/commands/advisor.js +94 -0
- package/dist/src/commands/doctor.js +151 -32
- package/dist/src/commands/funnel.d.ts +13 -0
- package/dist/src/commands/funnel.js +103 -0
- package/dist/src/commands/hooks.js +112 -46
- package/dist/src/commands/index.js +10 -0
- package/dist/src/commands/init.js +44 -0
- package/dist/src/commands/proxy.d.ts +21 -0
- package/dist/src/commands/proxy.js +310 -0
- package/dist/src/commands/security.js +29 -0
- package/dist/src/commands/settings.d.ts +19 -0
- package/dist/src/commands/settings.js +180 -0
- package/dist/src/commands/version.d.ts +42 -0
- package/dist/src/commands/version.js +106 -0
- package/dist/src/funnel/advisor-tip.d.ts +58 -0
- package/dist/src/funnel/advisor-tip.js +92 -0
- package/dist/src/funnel/attribution.d.ts +37 -0
- package/dist/src/funnel/attribution.js +101 -0
- package/dist/src/funnel/consent.d.ts +22 -0
- package/dist/src/funnel/consent.js +55 -0
- package/dist/src/funnel/credit-errors.d.ts +31 -0
- package/dist/src/funnel/credit-errors.js +88 -0
- package/dist/src/funnel/credit-notifier.d.ts +44 -0
- package/dist/src/funnel/credit-notifier.js +74 -0
- package/dist/src/funnel/disclosure.d.ts +46 -0
- package/dist/src/funnel/disclosure.js +97 -0
- package/dist/src/funnel/enrollment.d.ts +36 -0
- package/dist/src/funnel/enrollment.js +64 -0
- package/dist/src/funnel/environment.d.ts +17 -0
- package/dist/src/funnel/environment.js +39 -0
- package/dist/src/funnel/event-transport.d.ts +51 -0
- package/dist/src/funnel/event-transport.js +199 -0
- package/dist/src/funnel/events.d.ts +42 -0
- package/dist/src/funnel/events.js +150 -0
- package/dist/src/funnel/index.d.ts +20 -0
- package/dist/src/funnel/index.js +20 -0
- package/dist/src/funnel/insights.d.ts +49 -0
- package/dist/src/funnel/insights.js +120 -0
- package/dist/src/funnel/local-signals.d.ts +15 -0
- package/dist/src/funnel/local-signals.js +68 -0
- package/dist/src/funnel/message-transport.d.ts +51 -0
- package/dist/src/funnel/message-transport.js +149 -0
- package/dist/src/funnel/messages.d.ts +55 -0
- package/dist/src/funnel/messages.js +160 -0
- package/dist/src/funnel/power-saver-notifier.d.ts +44 -0
- package/dist/src/funnel/power-saver-notifier.js +92 -0
- package/dist/src/funnel/precedence.d.ts +16 -0
- package/dist/src/funnel/precedence.js +85 -0
- package/dist/src/funnel/promo.d.ts +41 -0
- package/dist/src/funnel/promo.js +144 -0
- package/dist/src/funnel/rate-limit-notifier.d.ts +55 -0
- package/dist/src/funnel/rate-limit-notifier.js +102 -0
- package/dist/src/funnel/rotation.d.ts +19 -0
- package/dist/src/funnel/rotation.js +70 -0
- package/dist/src/funnel/state.d.ts +13 -0
- package/dist/src/funnel/state.js +52 -0
- package/dist/src/funnel/toggle-cooldown.d.ts +17 -0
- package/dist/src/funnel/toggle-cooldown.js +32 -0
- package/dist/src/funnel/types.d.ts +86 -0
- package/dist/src/funnel/types.js +26 -0
- package/dist/src/init/executor.js +25 -19
- package/dist/src/init/helper-refresh.d.ts +33 -2
- package/dist/src/init/helper-refresh.js +102 -12
- package/dist/src/init/helpers-generator.js +52 -0
- package/dist/src/init/mcp-generator.js +11 -6
- package/dist/src/init/statusline-generator.js +282 -116
- package/dist/src/services/daemon-autostart.js +28 -5
- package/dist/src/services/fable-harness.d.ts +39 -0
- package/dist/src/services/fable-harness.js +41 -0
- package/package.json +16 -4
- package/plugins/ruflo-metaharness/scripts/smoke.sh +18 -5
- package/dist/src/ruvector/lattice-wasm.d.ts +0 -14
- package/dist/src/ruvector/lattice-wasm.js +0 -144
- package/plugins/ruflo-metaharness/.claude-flow/data/pending-insights.jsonl +0 -5
- package/plugins/ruflo-metaharness/.claude-flow/neural/stats.json +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -81,14 +81,18 @@
|
|
|
81
81
|
"scripts/postinstall.cjs",
|
|
82
82
|
".claude",
|
|
83
83
|
"plugins",
|
|
84
|
-
"README.md"
|
|
84
|
+
"README.md",
|
|
85
|
+
"catalog-manifest.json"
|
|
85
86
|
],
|
|
86
87
|
"scripts": {
|
|
87
88
|
"build": "tsc",
|
|
88
89
|
"test": "vitest run",
|
|
89
90
|
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
|
|
90
91
|
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
|
|
91
|
-
"postinstall": "node ./scripts/postinstall.cjs"
|
|
92
|
+
"postinstall": "node ./scripts/postinstall.cjs",
|
|
93
|
+
"prepublishOnly": "cp ../../../README.md ./README.md && rm -rf plugins && mkdir -p plugins && cp -r ../../../plugins/ruflo-metaharness plugins/ && node scripts/generate-catalog-manifest.mjs && node scripts/sign-helpers.mjs && node scripts/verify-helpers.mjs",
|
|
94
|
+
"release": "npm version prerelease --preid=alpha && npm run publish:all",
|
|
95
|
+
"publish:all": "./scripts/publish.sh"
|
|
92
96
|
},
|
|
93
97
|
"devDependencies": {
|
|
94
98
|
"typescript": "^5.3.0",
|
|
@@ -116,6 +120,14 @@
|
|
|
116
120
|
"tag": "latest"
|
|
117
121
|
},
|
|
118
122
|
"overrides": {
|
|
119
|
-
"protobufjs": ">=7.5.6"
|
|
123
|
+
"protobufjs": ">=7.5.6",
|
|
124
|
+
"js-yaml": ">=4.3.0",
|
|
125
|
+
"express": ">=4.22.2",
|
|
126
|
+
"qs": ">=6.15.2",
|
|
127
|
+
"@opentelemetry/core": ">=2.8.0",
|
|
128
|
+
"@opentelemetry/resources": ">=2.8.0",
|
|
129
|
+
"@opentelemetry/sdk-trace-base": ">=2.8.0",
|
|
130
|
+
"@opentelemetry/sdk-node": ">=0.220.0",
|
|
131
|
+
"agentdb": "$agentdb"
|
|
120
132
|
}
|
|
121
133
|
}
|
|
@@ -204,14 +204,27 @@ LOADER="$ROOT/../../v3/@claude-flow/cli/src/commands/index.ts"
|
|
|
204
204
|
grep -q "metaharness: () => import" "$LOADER" 2>/dev/null || miss="$miss not-registered-in-loader"
|
|
205
205
|
[[ -z "$miss" ]] && ok || bad "$miss"
|
|
206
206
|
|
|
207
|
-
step "16. ruflo wrapper
|
|
207
|
+
step "16. ruflo wrapper keeps metaharness out of hard dependencies (ADR-150 constraint #2)"
|
|
208
208
|
F="$ROOT/../../ruflo/package.json"
|
|
209
|
+
# ADR-150 §"Architectural constraint" rule #2 states that when @metaharness/*
|
|
210
|
+
# or `metaharness` appears in a package's dep graph, it MUST be in
|
|
211
|
+
# `optionalDependencies` — never in `dependencies`. It does NOT require
|
|
212
|
+
# ruflo to depend on metaharness at all. Historically this smoke asserted
|
|
213
|
+
# the presence of metaharness in ruflo optionalDeps, which conflicted with
|
|
214
|
+
# the #2561 "guard" budget (RUFLO_MAX=0 for optionalDependencies) that was
|
|
215
|
+
# added to protect the cold `npx -y ruflo@alpha --version` startup path
|
|
216
|
+
# from a heavy optional-dep install. #2561 is stronger evidence: metaharness
|
|
217
|
+
# is on its FORBIDDEN list because installing it during ruflo's postinstall
|
|
218
|
+
# caused a measured `npx --version` timeout. Correct reading of ADR-150 #2:
|
|
219
|
+
# if metaharness IS present anywhere in ruflo's deps, it MUST be optional;
|
|
220
|
+
# absence is fine (ruflo delegates to @claude-flow/cli, which itself keeps
|
|
221
|
+
# metaharness as a runtime dynamic import via ADR-150 rule #1).
|
|
209
222
|
node -e "
|
|
210
223
|
const j = JSON.parse(require('fs').readFileSync('$F','utf-8'));
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
if (
|
|
214
|
-
" 2>/dev/null && ok || bad "ruflo wrapper
|
|
224
|
+
const deps = j.dependencies || {};
|
|
225
|
+
const forbidden = Object.keys(deps).filter(k => k === 'metaharness' || k.startsWith('@metaharness/'));
|
|
226
|
+
if (forbidden.length) { console.error('ADR-150 rule #2 violated: ' + forbidden.join(', ') + ' must be optionalDependencies, not dependencies'); process.exit(1); }
|
|
227
|
+
" 2>/dev/null && ok || bad "metaharness leaked into ruflo wrapper hard dependencies"
|
|
215
228
|
|
|
216
229
|
step "17r. _harness.mjs pinned-version + no-@latest regression guard (supersedes iter 27)"
|
|
217
230
|
F="$ROOT/scripts/_harness.mjs"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** Default package name (ruvnet WASM convention); override with RUFLO_LATTICE_WASM_PKG. */
|
|
2
|
-
export declare const LATTICE_WASM_PKG: string;
|
|
3
|
-
export type LatticeModel = 'minilm' | 'bge' | 'paraphrase-minilm' | 'qwen3-0.6b' | string;
|
|
4
|
-
export declare const DEFAULT_LATTICE_MODEL: LatticeModel;
|
|
5
|
-
/** Is the Lattice WASM embedder installed + initializable? Cached; never throws. */
|
|
6
|
-
export declare function latticeAvailable(): Promise<boolean>;
|
|
7
|
-
/** The models Lattice reports (empty until availability is probed). */
|
|
8
|
-
export declare function latticeModels(): LatticeModel[];
|
|
9
|
-
/**
|
|
10
|
-
* Embed `text` with `model` via Lattice WASM. Returns null on any failure so the
|
|
11
|
-
* caller can fall through to the next tier. Never throws.
|
|
12
|
-
*/
|
|
13
|
-
export declare function latticeEmbed(text: string, model?: LatticeModel): Promise<number[] | null>;
|
|
14
|
-
//# sourceMappingURL=lattice-wasm.d.ts.map
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lattice WASM embedder adapter — the primary embedding tier (ADR: embedding
|
|
3
|
-
* substrate upgrade). Replaces hash placeholders with real semantic embeddings
|
|
4
|
-
* and adds multiple models (miniLM, bge, multi-paraphrase-miniLM, GPU qwen3-0.6B).
|
|
5
|
-
*
|
|
6
|
-
* Built on the proven `@ruvector/ruvllm-wasm` optional-dependency convention:
|
|
7
|
-
* - dynamically imported (never a hard dependency),
|
|
8
|
-
* - WASM initialized from bundled bytes,
|
|
9
|
-
* - fully FAIL-CLOSED: if the package is absent, the WASM fails to init, or the
|
|
10
|
-
* embed API differs, `latticeAvailable()` returns false and callers fall
|
|
11
|
-
* through to the existing ruvector-ONNX → hash tiers with ZERO regression.
|
|
12
|
-
*
|
|
13
|
-
* The package specifier is configurable (`RUFLO_LATTICE_WASM_PKG`) so the exact
|
|
14
|
-
* published name can be set without a code change; the API is probed tolerantly.
|
|
15
|
-
* Opt-in for the GPU model: qwen3 is only selected when explicitly requested.
|
|
16
|
-
*/
|
|
17
|
-
import { createRequire } from 'module';
|
|
18
|
-
import { readFileSync } from 'fs';
|
|
19
|
-
const require_ = createRequire(import.meta.url);
|
|
20
|
-
/** Default package name (ruvnet WASM convention); override with RUFLO_LATTICE_WASM_PKG. */
|
|
21
|
-
export const LATTICE_WASM_PKG = process.env.RUFLO_LATTICE_WASM_PKG || '@ruvector/lattice-wasm';
|
|
22
|
-
export const DEFAULT_LATTICE_MODEL = process.env.RUFLO_EMBED_MODEL || 'minilm';
|
|
23
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
|
-
let _mod = null;
|
|
25
|
-
let _ready = false;
|
|
26
|
-
let _probed = false;
|
|
27
|
-
let _available = false;
|
|
28
|
-
let _models = [];
|
|
29
|
-
async function loadModule() {
|
|
30
|
-
if (_mod)
|
|
31
|
-
return _mod;
|
|
32
|
-
const spec = LATTICE_WASM_PKG;
|
|
33
|
-
_mod = await import(spec).catch(() => null); // optional — absent ⇒ null ⇒ unavailable
|
|
34
|
-
return _mod;
|
|
35
|
-
}
|
|
36
|
-
async function ensureInit() {
|
|
37
|
-
if (_ready)
|
|
38
|
-
return true;
|
|
39
|
-
const mod = await loadModule();
|
|
40
|
-
if (!mod)
|
|
41
|
-
return false;
|
|
42
|
-
try {
|
|
43
|
-
// ruvnet WASM convention: initSync({ module: <wasm bytes> }); tolerate variants.
|
|
44
|
-
if (!_ready && typeof mod.initSync === 'function') {
|
|
45
|
-
let wasmBytes;
|
|
46
|
-
for (const cand of ['lattice_wasm_bg.wasm', 'lattice_bg.wasm', 'index_bg.wasm']) {
|
|
47
|
-
try {
|
|
48
|
-
wasmBytes = readFileSync(require_.resolve(`${LATTICE_WASM_PKG}/${cand}`));
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
catch { /* try next */ }
|
|
52
|
-
}
|
|
53
|
-
mod.initSync(wasmBytes ? { module: wasmBytes } : undefined);
|
|
54
|
-
}
|
|
55
|
-
else if (typeof mod.default === 'function') {
|
|
56
|
-
await mod.default(); // some wasm-bindgen builds export an async default init
|
|
57
|
-
}
|
|
58
|
-
_ready = true;
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
return false; // init failed ⇒ fail closed
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/** Extract a plain number[] from whatever shape the module's embed returns. */
|
|
66
|
-
function toVec(r) {
|
|
67
|
-
const v = (r && typeof r === 'object' && 'embedding' in r) ? r.embedding : r;
|
|
68
|
-
if (!v)
|
|
69
|
-
return null;
|
|
70
|
-
if (Array.isArray(v))
|
|
71
|
-
return v;
|
|
72
|
-
if (v.length !== undefined)
|
|
73
|
-
return Array.from(v);
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
/** Is the Lattice WASM embedder installed + initializable? Cached; never throws. */
|
|
77
|
-
export async function latticeAvailable() {
|
|
78
|
-
if (_probed)
|
|
79
|
-
return _available;
|
|
80
|
-
_probed = true;
|
|
81
|
-
try {
|
|
82
|
-
if (!(await ensureInit())) {
|
|
83
|
-
_available = false;
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
const mod = _mod;
|
|
87
|
-
// discover models (tolerant): listModels() / models / MODELS
|
|
88
|
-
try {
|
|
89
|
-
const list = typeof mod.listModels === 'function' ? mod.listModels() : (mod.models ?? mod.MODELS);
|
|
90
|
-
if (Array.isArray(list) && list.length)
|
|
91
|
-
_models = list;
|
|
92
|
-
}
|
|
93
|
-
catch { /* leave default */ }
|
|
94
|
-
if (!_models.length)
|
|
95
|
-
_models = [DEFAULT_LATTICE_MODEL];
|
|
96
|
-
// verify an actual embed succeeds (the ADR-086 "loads but runtime-fails" trap).
|
|
97
|
-
const probe = await latticeEmbedRaw('probe', DEFAULT_LATTICE_MODEL);
|
|
98
|
-
_available = !!probe && probe.length > 0;
|
|
99
|
-
return _available;
|
|
100
|
-
}
|
|
101
|
-
catch {
|
|
102
|
-
_available = false;
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
/** The models Lattice reports (empty until availability is probed). */
|
|
107
|
-
export function latticeModels() { return [..._models]; }
|
|
108
|
-
async function latticeEmbedRaw(text, model) {
|
|
109
|
-
const mod = _mod;
|
|
110
|
-
if (!mod)
|
|
111
|
-
return null;
|
|
112
|
-
// tolerant API probing across plausible wasm-bindgen surfaces.
|
|
113
|
-
const attempts = [
|
|
114
|
-
() => typeof mod.embed === 'function' ? mod.embed(text, model) : undefined,
|
|
115
|
-
() => typeof mod.embed === 'function' ? mod.embed(text) : undefined,
|
|
116
|
-
() => typeof mod.embedText === 'function' ? mod.embedText(text, model) : undefined,
|
|
117
|
-
() => typeof mod.Embedder === 'function' ? new mod.Embedder(model).embed(text) : undefined,
|
|
118
|
-
];
|
|
119
|
-
for (const a of attempts) {
|
|
120
|
-
try {
|
|
121
|
-
const r = await a();
|
|
122
|
-
const v = toVec(r);
|
|
123
|
-
if (v)
|
|
124
|
-
return v;
|
|
125
|
-
}
|
|
126
|
-
catch { /* try next surface */ }
|
|
127
|
-
}
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Embed `text` with `model` via Lattice WASM. Returns null on any failure so the
|
|
132
|
-
* caller can fall through to the next tier. Never throws.
|
|
133
|
-
*/
|
|
134
|
-
export async function latticeEmbed(text, model = DEFAULT_LATTICE_MODEL) {
|
|
135
|
-
try {
|
|
136
|
-
if (!(await latticeAvailable()))
|
|
137
|
-
return null;
|
|
138
|
-
return await latticeEmbedRaw(text, model);
|
|
139
|
-
}
|
|
140
|
-
catch {
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=lattice-wasm.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
{"type":"edit","file":"/Users/cohen/Projects/ruflo/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs","timestamp":1781649922735}
|
|
2
|
-
{"type":"edit","file":"/Users/cohen/Projects/ruflo/plugins/ruflo-metaharness/scripts/smoke.sh","timestamp":1782427183074}
|
|
3
|
-
{"type":"edit","file":"/Users/cohen/Projects/ruflo/plugins/ruflo-metaharness/scripts/smoke.sh","timestamp":1782427195692}
|
|
4
|
-
{"type":"edit","file":"/Users/cohen/Projects/ruflo/plugins/ruflo-metaharness/scripts/smoke.sh","timestamp":1782427207802}
|
|
5
|
-
{"type":"edit","file":"/Users/cohen/Projects/ruflo/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs","timestamp":1782427272241}
|