@claude-flow/cli 3.7.0-alpha.8 → 3.7.0-alpha.80
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/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/release-swarm.md +1 -1
- package/.claude/agents/github/repo-architect.md +2 -2
- package/.claude/agents/github/swarm-pr.md +1 -1
- package/.claude/agents/github/workflow-automation.md +2 -2
- package/.claude/commands/github/code-review-swarm.md +1 -1
- package/.claude/commands/github/issue-tracker.md +3 -3
- package/.claude/commands/github/release-manager.md +5 -3
- package/.claude/commands/github/release-swarm.md +1 -1
- package/.claude/commands/github/repo-architect.md +2 -2
- package/.claude/commands/github/swarm-issue.md +4 -1
- package/.claude/commands/github/swarm-pr.md +6 -3
- package/.claude/commands/github/sync-coordinator.md +3 -1
- package/.claude/commands/github/workflow-automation.md +2 -2
- package/.claude/helpers/github-safe.js +95 -60
- package/.claude/helpers/github-setup.sh +26 -9
- package/.claude/helpers/hook-handler.cjs +12 -4
- package/.claude/helpers/statusline.cjs +31 -2
- package/.claude/helpers/statusline.js +35 -4
- package/.claude/settings.json +1 -1
- package/.claude/skills/dual-mode/README.md +71 -0
- package/.claude/skills/dual-mode/dual-collect.md +103 -0
- package/.claude/skills/dual-mode/dual-coordinate.md +85 -0
- package/.claude/skills/dual-mode/dual-spawn.md +81 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +0 -11
- package/.claude/skills/flow-nexus-platform/SKILL.md +2 -5
- package/.claude/skills/flow-nexus-swarm/SKILL.md +0 -6
- package/.claude/skills/github-code-review/SKILL.md +2 -17
- package/.claude/skills/github-multi-repo/SKILL.md +4 -16
- package/.claude/skills/github-project-management/SKILL.md +18 -33
- package/.claude/skills/github-release-management/SKILL.md +4 -21
- package/.claude/skills/github-workflow-automation/SKILL.md +8 -26
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/sparc-methodology/SKILL.md +2 -11
- package/.claude/skills/stream-chain/SKILL.md +0 -3
- package/.claude/skills/swarm-advanced/SKILL.md +2 -5
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/.claude/skills/verification-quality/SKILL.md +120 -78
- package/README.md +57 -38
- package/bin/cli.js +15 -2
- package/bin/mcp-server.js +1 -1
- package/dist/src/__probe.d.ts +2 -0
- package/dist/src/__probe.d.ts.map +1 -0
- package/dist/src/__probe.js +5 -0
- package/dist/src/__probe.js.map +1 -0
- package/dist/src/commands/agent-wasm.js +2 -2
- package/dist/src/commands/agent-wasm.js.map +1 -1
- package/dist/src/commands/benchmark-cosign.d.ts +29 -0
- package/dist/src/commands/benchmark-cosign.d.ts.map +1 -0
- package/dist/src/commands/benchmark-cosign.js +222 -0
- package/dist/src/commands/benchmark-cosign.js.map +1 -0
- package/dist/src/commands/benchmark-verify.d.ts +21 -0
- package/dist/src/commands/benchmark-verify.d.ts.map +1 -0
- package/dist/src/commands/benchmark-verify.js +202 -0
- package/dist/src/commands/benchmark-verify.js.map +1 -0
- package/dist/src/commands/daemon.d.ts +20 -0
- package/dist/src/commands/daemon.d.ts.map +1 -1
- package/dist/src/commands/daemon.js +366 -7
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +224 -46
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.d.ts.map +1 -1
- package/dist/src/commands/embeddings.js +18 -9
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/hive-mind.d.ts.map +1 -1
- package/dist/src/commands/hive-mind.js +25 -7
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +56 -29
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +21 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +128 -3
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/start.js +1 -1
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/swarm.js +1 -1
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.d.ts.map +1 -1
- package/dist/src/commands/task.js +8 -4
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/config-adapter.js +1 -1
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +5 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +61 -18
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +1 -0
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +133 -0
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +1 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +19 -2
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/mcp-generator.js +4 -4
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +84 -19
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +75 -31
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +30 -0
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +18 -5
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +12 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +38 -5
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-execute-core.d.ts +3 -2
- package/dist/src/mcp-tools/agent-execute-core.d.ts.map +1 -1
- package/dist/src/mcp-tools/agent-execute-core.js +157 -83
- package/dist/src/mcp-tools/agent-execute-core.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +119 -11
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.js +101 -24
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +6 -6
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/autopilot-tools.js +10 -10
- package/dist/src/mcp-tools/autopilot-tools.js.map +1 -1
- package/dist/src/mcp-tools/browser-session-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/browser-session-tools.js +18 -7
- package/dist/src/mcp-tools/browser-session-tools.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +23 -23
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +12 -12
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +6 -6
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +7 -7
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +8 -8
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +10 -10
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +5 -5
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +21 -21
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-consensus-runtime.d.ts +149 -0
- package/dist/src/mcp-tools/hive-consensus-runtime.d.ts.map +1 -0
- package/dist/src/mcp-tools/hive-consensus-runtime.js +296 -0
- package/dist/src/mcp-tools/hive-consensus-runtime.js.map +1 -0
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +53 -9
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts +2 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +179 -46
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/managed-agent-tools.d.ts +22 -0
- package/dist/src/mcp-tools/managed-agent-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/managed-agent-tools.js +357 -0
- package/dist/src/mcp-tools/managed-agent-tools.js.map +1 -0
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +499 -68
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +6 -6
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +6 -6
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +4 -4
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.js +27 -11
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +34 -9
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +130 -6
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts +28 -0
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +80 -9
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +91 -18
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +55 -7
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +5 -5
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +11 -11
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/wasm-agent-tools.js +11 -11
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +118 -10
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ann-router-registry.d.ts +61 -0
- package/dist/src/memory/ann-router-registry.d.ts.map +1 -0
- package/dist/src/memory/ann-router-registry.js +72 -0
- package/dist/src/memory/ann-router-registry.js.map +1 -0
- package/dist/src/memory/diskann-registry.d.ts +56 -0
- package/dist/src/memory/diskann-registry.d.ts.map +1 -0
- package/dist/src/memory/diskann-registry.js +88 -0
- package/dist/src/memory/diskann-registry.js.map +1 -0
- package/dist/src/memory/memory-bridge.d.ts +4 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +49 -8
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +12 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -1
- package/dist/src/memory/memory-initializer.js +98 -19
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
- package/dist/src/memory/sona-optimizer.js +3 -0
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/parser.d.ts +9 -0
- package/dist/src/parser.d.ts.map +1 -1
- package/dist/src/parser.js +11 -0
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts +15 -4
- package/dist/src/plugins/store/discovery.d.ts.map +1 -1
- package/dist/src/plugins/store/discovery.js +40 -18
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.d.ts.map +1 -1
- package/dist/src/ruvector/agent-wasm.js +4 -1
- package/dist/src/ruvector/agent-wasm.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +6 -6
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts +6 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -1
- package/dist/src/services/headless-worker-executor.js +63 -6
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts +80 -2
- package/dist/src/services/worker-daemon.d.ts.map +1 -1
- package/dist/src/services/worker-daemon.js +372 -11
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -8
- package/.claude/agents/core/coder.md +0 -453
- package/.claude/agents/core/researcher.md +0 -369
- package/.claude/agents/core/reviewer.md +0 -520
- package/.claude/agents/core/tester.md +0 -512
- package/.claude/agents/goal/goal-planner.md +0 -73
- package/.claude/agents/v3/adr-architect.md +0 -184
- package/.claude/agents/v3/memory-specialist.md +0 -995
- package/.claude/agents/v3/security-auditor.md +0 -771
- package/.claude/agents/v3/sparc-orchestrator.md +0 -182
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/.claude/skills/aidefence-scan.md +0 -151
- package/.claude/skills/aidefence.yaml +0 -297
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
- package/.claude/skills/performance-analysis/SKILL.md +0 -563
- package/.claude/skills/secure-review.md +0 -181
- package/.claude/skills/worker-benchmarks/skill.md +0 -135
- package/.claude/skills/worker-integration/skill.md +0 -154
- package/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/dist/src/ruvector/flash-attention.d.ts.map +0 -1
- package/dist/src/ruvector/flash-attention.js +0 -643
- package/dist/src/ruvector/flash-attention.js.map +0 -1
- package/dist/src/ruvector/moe-router.d.ts +0 -206
- package/dist/src/ruvector/moe-router.d.ts.map +0 -1
- package/dist/src/ruvector/moe-router.js +0 -626
- package/dist/src/ruvector/moe-router.js.map +0 -1
- package/dist/src/services/event-stream.d.ts +0 -25
- package/dist/src/services/event-stream.d.ts.map +0 -1
- package/dist/src/services/event-stream.js +0 -27
- package/dist/src/services/event-stream.js.map +0 -1
- package/dist/src/services/loop-worker-runner.d.ts +0 -16
- package/dist/src/services/loop-worker-runner.d.ts.map +0 -1
- package/dist/src/services/loop-worker-runner.js +0 -34
- package/dist/src/services/loop-worker-runner.js.map +0 -1
- package/dist/src/services/runtime-capabilities.d.ts +0 -22
- package/dist/src/services/runtime-capabilities.d.ts.map +0 -1
- package/dist/src/services/runtime-capabilities.js +0 -45
- package/dist/src/services/runtime-capabilities.js.map +0 -1
|
@@ -577,9 +577,9 @@ jobs:
|
|
|
577
577
|
release-validation:
|
|
578
578
|
runs-on: ubuntu-latest
|
|
579
579
|
steps:
|
|
580
|
-
- uses: actions/checkout@
|
|
580
|
+
- uses: actions/checkout@v4
|
|
581
581
|
- name: Setup Node.js
|
|
582
|
-
uses: actions/setup-node@
|
|
582
|
+
uses: actions/setup-node@v4
|
|
583
583
|
with:
|
|
584
584
|
node-version: '20'
|
|
585
585
|
- name: Install and Test
|
|
@@ -184,8 +184,8 @@ jobs:
|
|
|
184
184
|
test:
|
|
185
185
|
runs-on: ubuntu-latest
|
|
186
186
|
steps:
|
|
187
|
-
- uses: actions/checkout@
|
|
188
|
-
- uses: actions/setup-node@
|
|
187
|
+
- uses: actions/checkout@v4
|
|
188
|
+
- uses: actions/setup-node@v4
|
|
189
189
|
with: { node-version: '20' }
|
|
190
190
|
- run: npm install && npm test`,
|
|
191
191
|
message: "ci: Standardize integration workflow across repositories",
|
|
@@ -320,7 +320,7 @@ jobs:
|
|
|
320
320
|
swarm-analysis:
|
|
321
321
|
runs-on: ubuntu-latest
|
|
322
322
|
steps:
|
|
323
|
-
- uses: actions/checkout@
|
|
323
|
+
- uses: actions/checkout@v4
|
|
324
324
|
|
|
325
325
|
- name: Initialize Swarm
|
|
326
326
|
uses: ruvnet/swarm-action@v1
|
|
@@ -368,7 +368,7 @@ jobs:
|
|
|
368
368
|
detect-and-build:
|
|
369
369
|
runs-on: ubuntu-latest
|
|
370
370
|
steps:
|
|
371
|
-
- uses: actions/checkout@
|
|
371
|
+
- uses: actions/checkout@v4
|
|
372
372
|
|
|
373
373
|
- name: Detect Languages
|
|
374
374
|
id: detect
|
|
@@ -88,7 +88,7 @@ mcp__github__add_issue_comment {
|
|
|
88
88
|
- Final validation and merge preparation
|
|
89
89
|
|
|
90
90
|
---
|
|
91
|
-
|
|
91
|
+
`
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Store progress in swarm memory
|
|
@@ -206,9 +206,10 @@ mcp__github__update_issue {
|
|
|
206
206
|
Updates will be posted automatically by swarm agents during implementation.
|
|
207
207
|
|
|
208
208
|
---
|
|
209
|
-
🤖 Generated with Claude Code
|
|
210
209
|
```
|
|
211
210
|
|
|
211
|
+
<!-- last-updated: 2026-05-21 — ADR-127 -->
|
|
212
|
+
|
|
212
213
|
### Bug Report Template:
|
|
213
214
|
```markdown
|
|
214
215
|
## 🐛 Bug Report
|
|
@@ -244,7 +245,6 @@ Updates will be posted automatically by swarm agents during implementation.
|
|
|
244
245
|
- **Tester**: Validation and testing
|
|
245
246
|
|
|
246
247
|
---
|
|
247
|
-
🤖 Generated with Claude Code
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
## Best Practices
|
|
@@ -167,10 +167,12 @@ This release was coordinated using ruv-swarm agents:
|
|
|
167
167
|
This release is production-ready with comprehensive validation and testing.
|
|
168
168
|
|
|
169
169
|
---
|
|
170
|
-
|
|
170
|
+
`
|
|
171
171
|
}
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
<!-- last-updated: 2026-05-21 — ADR-127 -->
|
|
175
|
+
|
|
174
176
|
## Batch Release Workflow
|
|
175
177
|
|
|
176
178
|
### Complete Release Pipeline:
|
|
@@ -310,9 +312,9 @@ jobs:
|
|
|
310
312
|
release-validation:
|
|
311
313
|
runs-on: ubuntu-latest
|
|
312
314
|
steps:
|
|
313
|
-
- uses: actions/checkout@
|
|
315
|
+
- uses: actions/checkout@v4
|
|
314
316
|
- name: Setup Node.js
|
|
315
|
-
uses: actions/setup-node@
|
|
317
|
+
uses: actions/setup-node@v4
|
|
316
318
|
with:
|
|
317
319
|
node-version: '20'
|
|
318
320
|
- name: Install and Test
|
|
@@ -153,8 +153,8 @@ jobs:
|
|
|
153
153
|
test:
|
|
154
154
|
runs-on: ubuntu-latest
|
|
155
155
|
steps:
|
|
156
|
-
- uses: actions/checkout@
|
|
157
|
-
- uses: actions/setup-node@
|
|
156
|
+
- uses: actions/checkout@v4
|
|
157
|
+
- uses: actions/setup-node@v4
|
|
158
158
|
with: { node-version: '20' }
|
|
159
159
|
- run: npm install && npm test`,
|
|
160
160
|
message: "ci: Standardize integration workflow across repositories",
|
|
@@ -259,9 +259,12 @@ jobs:
|
|
|
259
259
|
uses: ruvnet/swarm-action@v1
|
|
260
260
|
with:
|
|
261
261
|
command: |
|
|
262
|
-
|
|
262
|
+
LABEL_NAME_FILE=$(mktemp)
|
|
263
|
+
printf '%s' "${{ github.event.label.name }}" > "$LABEL_NAME_FILE"
|
|
264
|
+
if grep -qx 'swarm-ready' "$LABEL_NAME_FILE"; then
|
|
263
265
|
npx ruv-swarm github issue-init ${{ github.event.issue.number }}
|
|
264
266
|
fi
|
|
267
|
+
rm -f "$LABEL_NAME_FILE"
|
|
265
268
|
```
|
|
266
269
|
|
|
267
270
|
### Issue Board Integration
|
|
@@ -44,14 +44,17 @@ jobs:
|
|
|
44
44
|
swarm-handler:
|
|
45
45
|
runs-on: ubuntu-latest
|
|
46
46
|
steps:
|
|
47
|
-
- uses: actions/checkout@
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
48
|
- name: Handle Swarm Command
|
|
49
49
|
run: |
|
|
50
|
-
|
|
50
|
+
COMMENT_BODY_FILE=$(mktemp)
|
|
51
|
+
printf '%s' "${{ github.event.comment.body }}" > "$COMMENT_BODY_FILE"
|
|
52
|
+
if grep -q '^/swarm' "$COMMENT_BODY_FILE"; then
|
|
51
53
|
npx ruv-swarm github handle-comment \
|
|
52
54
|
--pr ${{ github.event.pull_request.number }} \
|
|
53
|
-
--comment "$
|
|
55
|
+
--comment-file "$COMMENT_BODY_FILE"
|
|
54
56
|
fi
|
|
57
|
+
rm -f "$COMMENT_BODY_FILE"
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
## PR Label Integration
|
|
@@ -137,10 +137,12 @@ This integration uses ruv-swarm agents for:
|
|
|
137
137
|
- Memory-based state management
|
|
138
138
|
|
|
139
139
|
---
|
|
140
|
-
|
|
140
|
+
`
|
|
141
141
|
}
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
+
<!-- last-updated: 2026-05-21 — ADR-127 -->
|
|
145
|
+
|
|
144
146
|
## Batch Synchronization Example
|
|
145
147
|
|
|
146
148
|
### Complete Package Sync Workflow:
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
swarm-analysis:
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
|
|
20
20
|
- name: Initialize Swarm
|
|
21
21
|
uses: ruvnet/swarm-action@v1
|
|
@@ -63,7 +63,7 @@ jobs:
|
|
|
63
63
|
detect-and-build:
|
|
64
64
|
runs-on: ubuntu-latest
|
|
65
65
|
steps:
|
|
66
|
-
- uses: actions/checkout@
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
67
|
|
|
68
68
|
- name: Detect Languages
|
|
69
69
|
id: detect
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
|
-
* Safe GitHub CLI Helper
|
|
3
|
+
* Safe GitHub CLI Helper — v1.0.0
|
|
4
|
+
*
|
|
5
|
+
* Prevents injection issues when using `gh` commands with untrusted content
|
|
6
|
+
* (PR bodies, issue bodies, comment bodies) by routing the body through a
|
|
7
|
+
* temp file and using `--body-file` rather than interpolating into shell args.
|
|
5
8
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* executed by /bin/sh. Now uses `execFileSync('gh', argArray)`
|
|
14
|
-
* which goes through execve directly with no shell interpretation.
|
|
9
|
+
* ADR-127 Phase 2 hardening:
|
|
10
|
+
* - GITHUB_SAFE_VERSION exported for smoke assertions.
|
|
11
|
+
* - Explicit 256KB body cap: rejects oversized bodies before any temp-file
|
|
12
|
+
* write, matching the GitHub API `body` field limit.
|
|
13
|
+
* - Strict error handling: all execSync calls inside try/catch; cleanup in
|
|
14
|
+
* finally; non-zero exit on any error.
|
|
15
|
+
* - GITHUB_SAFE_DRY_RUN=1 env-var skips the actual `gh` exec for testing.
|
|
15
16
|
*
|
|
16
17
|
* Usage:
|
|
17
|
-
* ./github-safe.js issue comment 123 "Message with
|
|
18
|
+
* ./github-safe.js issue comment 123 "Message with \`backticks\`"
|
|
18
19
|
* ./github-safe.js pr create --title "Title" --body "Complex body"
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
|
-
import { execFileSync } from 'child_process';
|
|
22
|
+
import { execSync, execFileSync } from 'child_process';
|
|
22
23
|
import { writeFileSync, unlinkSync } from 'fs';
|
|
23
24
|
import { tmpdir } from 'os';
|
|
24
25
|
import { join } from 'path';
|
|
25
26
|
import { randomBytes } from 'crypto';
|
|
26
27
|
|
|
28
|
+
// Version constant — asserted by smoke-github-safe-injection.mjs.
|
|
29
|
+
export const GITHUB_SAFE_VERSION = '1.0.0';
|
|
30
|
+
|
|
31
|
+
// Maximum body size allowed (bytes). The GitHub API enforces 65536 chars for
|
|
32
|
+
// issue/PR bodies; the CLI is more lenient but the 256KB limit is a
|
|
33
|
+
// conservative safety cap that prevents accidental oversized writes.
|
|
34
|
+
const MAX_BODY_BYTES = 256 * 1024;
|
|
35
|
+
|
|
27
36
|
const args = process.argv.slice(2);
|
|
28
37
|
|
|
29
38
|
if (args.length < 2) {
|
|
30
39
|
console.log(`
|
|
31
|
-
Safe GitHub CLI Helper
|
|
40
|
+
Safe GitHub CLI Helper v${GITHUB_SAFE_VERSION}
|
|
32
41
|
|
|
33
42
|
Usage:
|
|
34
43
|
./github-safe.js issue comment <number> <body>
|
|
@@ -36,44 +45,18 @@ Usage:
|
|
|
36
45
|
./github-safe.js issue create --title <title> --body <body>
|
|
37
46
|
./github-safe.js pr create --title <title> --body <body>
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
This helper prevents injection issues with special characters:
|
|
49
|
+
- Backticks in code examples
|
|
50
|
+
- Command substitution $(...)
|
|
51
|
+
- Semicolons and other shell metacharacters
|
|
52
|
+
- Oversized bodies (> 256 KB rejected)
|
|
42
53
|
`);
|
|
43
54
|
process.exit(1);
|
|
44
55
|
}
|
|
45
56
|
|
|
46
|
-
// Whitelist of gh top-level commands we forward. Restricting this is
|
|
47
|
-
// defense-in-depth even though execFileSync would already block shell
|
|
48
|
-
// metacharacters in args.
|
|
49
|
-
const ALLOWED_COMMANDS = new Set(['issue', 'pr', 'repo', 'api', 'workflow', 'run', 'release', 'auth', 'gist']);
|
|
50
|
-
|
|
51
57
|
const [command, subcommand, ...restArgs] = args;
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
console.error(`Refusing to forward unknown gh command: ${command}`);
|
|
55
|
-
console.error(`Allowed: ${Array.from(ALLOWED_COMMANDS).join(', ')}`);
|
|
56
|
-
process.exit(1);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Build the final argv that gets passed to execFileSync.
|
|
60
|
-
// IMPORTANT: never join into a shell string. Each element is one argv slot.
|
|
61
|
-
function runGh(argv) {
|
|
62
|
-
try {
|
|
63
|
-
execFileSync('gh', argv, {
|
|
64
|
-
stdio: 'inherit',
|
|
65
|
-
timeout: 30000,
|
|
66
|
-
// shell:false is the default — kept explicit so a future refactor
|
|
67
|
-
// doesn't accidentally turn it on.
|
|
68
|
-
shell: false,
|
|
69
|
-
});
|
|
70
|
-
} catch (error) {
|
|
71
|
-
console.error('Error:', error?.message ?? String(error));
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Handle commands that take body content
|
|
59
|
+
// Handle commands that need body content
|
|
77
60
|
if ((command === 'issue' || command === 'pr') &&
|
|
78
61
|
(subcommand === 'comment' || subcommand === 'create')) {
|
|
79
62
|
|
|
@@ -81,10 +64,11 @@ if ((command === 'issue' || command === 'pr') &&
|
|
|
81
64
|
let body = '';
|
|
82
65
|
|
|
83
66
|
if (subcommand === 'comment' && restArgs.length >= 2) {
|
|
84
|
-
//
|
|
67
|
+
// Simple format: github-safe.js issue comment 123 "body"
|
|
85
68
|
body = restArgs[1];
|
|
86
69
|
bodyIndex = 1;
|
|
87
70
|
} else {
|
|
71
|
+
// Flag format: --body "content"
|
|
88
72
|
bodyIndex = restArgs.indexOf('--body');
|
|
89
73
|
if (bodyIndex !== -1 && bodyIndex < restArgs.length - 1) {
|
|
90
74
|
body = restArgs[bodyIndex + 1];
|
|
@@ -92,30 +76,81 @@ if ((command === 'issue' || command === 'pr') &&
|
|
|
92
76
|
}
|
|
93
77
|
|
|
94
78
|
if (body) {
|
|
79
|
+
// Enforce 256KB cap before any file I/O.
|
|
80
|
+
const bodyBytes = Buffer.byteLength(body, 'utf8');
|
|
81
|
+
if (bodyBytes > MAX_BODY_BYTES) {
|
|
82
|
+
console.error(
|
|
83
|
+
`[ERROR] Body exceeds maximum allowed size (${bodyBytes} bytes > ${MAX_BODY_BYTES} bytes). ` +
|
|
84
|
+
'GitHub API body fields are capped at 256KB. Truncate the body before passing it to github-safe.js.'
|
|
85
|
+
);
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Use temporary file for body content — never interpolate into argv.
|
|
95
90
|
const tmpFile = join(tmpdir(), `gh-body-${randomBytes(8).toString('hex')}.tmp`);
|
|
91
|
+
|
|
96
92
|
try {
|
|
97
93
|
writeFileSync(tmpFile, body, 'utf8');
|
|
98
94
|
|
|
99
|
-
// Build
|
|
100
|
-
const
|
|
101
|
-
const offset = 2; // command + subcommand
|
|
95
|
+
// Build new command with --body-file
|
|
96
|
+
const newArgs = [...restArgs];
|
|
102
97
|
if (subcommand === 'comment' && bodyIndex === 1) {
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
// Replace positional body arg with --body-file
|
|
99
|
+
newArgs[1] = '--body-file';
|
|
100
|
+
newArgs.push(tmpFile);
|
|
105
101
|
} else if (bodyIndex !== -1) {
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
// Replace --body flag pair with --body-file
|
|
103
|
+
newArgs[bodyIndex] = '--body-file';
|
|
104
|
+
newArgs[bodyIndex + 1] = tmpFile;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Skip actual gh exec in dry-run mode (used by smoke tests).
|
|
108
|
+
if (process.env.GITHUB_SAFE_DRY_RUN === '1') {
|
|
109
|
+
const ghArgs = [command, subcommand, ...newArgs];
|
|
110
|
+
console.log(`[DRY-RUN] gh ${ghArgs.join(' ')}`);
|
|
111
|
+
process.exit(0);
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
|
|
114
|
+
const ghArgv = [command, subcommand, ...newArgs];
|
|
115
|
+
console.log(`Executing: gh ${ghArgv.join(' ')}`);
|
|
116
|
+
|
|
117
|
+
// Use execFileSync to avoid shell interpolation — args are passed as an
|
|
118
|
+
// array so shell metacharacters in tmpFile path cannot be exploited.
|
|
119
|
+
execFileSync('gh', ghArgv, {
|
|
120
|
+
stdio: 'inherit',
|
|
121
|
+
timeout: 30000,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error('[ERROR]', error.message);
|
|
126
|
+
process.exit(1);
|
|
111
127
|
} finally {
|
|
112
|
-
|
|
128
|
+
// Always clean up the temp file.
|
|
129
|
+
try { unlinkSync(tmpFile); } catch (_) { /* ignore cleanup errors */ }
|
|
113
130
|
}
|
|
114
131
|
} else {
|
|
115
|
-
// No body —
|
|
116
|
-
|
|
132
|
+
// No body content — execute normally (no injection risk for args).
|
|
133
|
+
if (process.env.GITHUB_SAFE_DRY_RUN === '1') {
|
|
134
|
+
console.log(`[DRY-RUN] gh ${args.join(' ')}`);
|
|
135
|
+
process.exit(0);
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
execFileSync('gh', args, { stdio: 'inherit' });
|
|
139
|
+
} catch (error) {
|
|
140
|
+
console.error('[ERROR]', error.message);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
117
143
|
}
|
|
118
144
|
} else {
|
|
119
|
-
//
|
|
120
|
-
|
|
145
|
+
// Non-body commands — execute normally.
|
|
146
|
+
if (process.env.GITHUB_SAFE_DRY_RUN === '1') {
|
|
147
|
+
console.log(`[DRY-RUN] gh ${args.join(' ')}`);
|
|
148
|
+
process.exit(0);
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
execFileSync('gh', args, { stdio: 'inherit' });
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.error('[ERROR]', error.message);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
121
156
|
}
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
# Security rationale: set -euo pipefail ensures that:
|
|
3
|
+
# -e — exit immediately if any command fails (no silent failures)
|
|
4
|
+
# -u — treat unset variables as errors (prevents empty-string expansion bugs)
|
|
5
|
+
# -o pipefail — pipeline fails if any command in it fails (not just last)
|
|
6
|
+
# This matches the ADR-127 Phase 2 requirement for github-setup.sh hardening.
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
2
9
|
# Setup GitHub integration for Claude Flow
|
|
3
10
|
|
|
4
|
-
echo "
|
|
11
|
+
echo "Setting up GitHub integration..."
|
|
5
12
|
|
|
6
13
|
# Check for gh CLI
|
|
7
14
|
if ! command -v gh &> /dev/null; then
|
|
8
|
-
echo "
|
|
15
|
+
echo "WARNING: GitHub CLI (gh) not found"
|
|
9
16
|
echo "Install from: https://cli.github.com/"
|
|
10
17
|
echo "Continuing without GitHub features..."
|
|
11
18
|
else
|
|
12
|
-
echo "
|
|
13
|
-
|
|
14
|
-
# Check auth status
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
echo "OK: GitHub CLI found"
|
|
20
|
+
|
|
21
|
+
# Check auth status and scope sufficiency.
|
|
22
|
+
# `gh auth status` exits non-zero when not authenticated.
|
|
23
|
+
# We additionally parse for "Token scopes" to verify we have at least
|
|
24
|
+
# 'repo' scope, which is required for PR/issue operations.
|
|
25
|
+
if gh auth status 2>&1 | grep -q "Logged in"; then
|
|
26
|
+
echo "OK: GitHub authentication active"
|
|
27
|
+
# Verify repo scope is present for PR/issue operations.
|
|
28
|
+
if gh auth status 2>&1 | grep -q "repo"; then
|
|
29
|
+
echo "OK: 'repo' scope available"
|
|
30
|
+
else
|
|
31
|
+
echo "WARNING: 'repo' scope not confirmed — PR/issue operations may fail"
|
|
32
|
+
echo "Run: gh auth login --scopes repo,read:org"
|
|
33
|
+
fi
|
|
17
34
|
else
|
|
18
|
-
echo "
|
|
35
|
+
echo "WARNING: Not authenticated with GitHub"
|
|
19
36
|
echo "Run: gh auth login"
|
|
20
37
|
fi
|
|
21
38
|
fi
|
|
22
39
|
|
|
23
40
|
echo ""
|
|
24
|
-
echo "
|
|
41
|
+
echo "GitHub swarm commands available:"
|
|
25
42
|
echo " - npx claude-flow github swarm"
|
|
26
43
|
echo " - npx claude-flow repo analyze"
|
|
27
44
|
echo " - npx claude-flow pr enhance"
|
|
@@ -112,8 +112,12 @@ async function main() {
|
|
|
112
112
|
const toolInput = hookInput.toolInput || hookInput.tool_input || {};
|
|
113
113
|
const toolName = hookInput.toolName || hookInput.tool_name || '';
|
|
114
114
|
|
|
115
|
-
// Merge stdin data into prompt resolution: prefer stdin fields, then env, then argv
|
|
116
|
-
|
|
115
|
+
// Merge stdin data into prompt resolution: prefer stdin fields, then env, then argv.
|
|
116
|
+
// `toolInput` is an object (e.g. {command:"ls"}) — it's truthy but not a string,
|
|
117
|
+
// so falling back to it directly bound `prompt` to the object and tripped
|
|
118
|
+
// `.toLowerCase()` / `.substring()` on every Bash hook (#1944). Use the
|
|
119
|
+
// `.command` field instead, which is the actual string the hook needs.
|
|
120
|
+
const prompt = hookInput.prompt || hookInput.command || toolInput.command
|
|
117
121
|
|| process.env.PROMPT || process.env.TOOL_INPUT_command || args.join(' ') || '';
|
|
118
122
|
|
|
119
123
|
const handlers = {
|
|
@@ -144,8 +148,12 @@ const handlers = {
|
|
|
144
148
|
},
|
|
145
149
|
|
|
146
150
|
'pre-bash': () => {
|
|
147
|
-
// Basic command safety check — prefer stdin command data from Claude Code
|
|
148
|
-
|
|
151
|
+
// Basic command safety check — prefer stdin command data from Claude Code.
|
|
152
|
+
// String() wrap is belt-and-suspenders for #2017: even if a future regression
|
|
153
|
+
// re-binds `prompt` or `hookInput.command` to a non-string, `.toLowerCase()`
|
|
154
|
+
// can no longer throw a TypeError that the global try/catch would swallow
|
|
155
|
+
// (silently exiting 0 and letting the dangerous command through).
|
|
156
|
+
const cmd = String(hookInput.command || toolInput.command || prompt || '').toLowerCase();
|
|
149
157
|
const dangerous = ['rm -rf /', 'format c:', 'del /s /q c:\\', ':(){:|:&};:'];
|
|
150
158
|
for (const d of dangerous) {
|
|
151
159
|
if (cmd.includes(d)) {
|
|
@@ -25,8 +25,37 @@
|
|
|
25
25
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
26
26
|
const fs = require('fs');
|
|
27
27
|
const path = require('path');
|
|
28
|
+
const os = require('os');
|
|
28
29
|
const { execSync, execFileSync } = require('child_process');
|
|
29
30
|
|
|
31
|
+
// Read the installed plugin version once at startup. Probe the plugin's own
|
|
32
|
+
// install location first (`~/.claude/plugins/marketplaces/ruflo/package.json`),
|
|
33
|
+
// then npm-style installs, then the source-checkout location. The previous
|
|
34
|
+
// code hardcoded `RuFlo V3.5` in the header — so users on alpha.27+ still
|
|
35
|
+
// saw V3.5 in the statusline even though `ruflo doctor` reported the real
|
|
36
|
+
// version (#1951).
|
|
37
|
+
let RUFLO_VERSION = '3.6';
|
|
38
|
+
try {
|
|
39
|
+
const home = os.homedir();
|
|
40
|
+
const cwd = process.cwd();
|
|
41
|
+
const pkgPaths = [
|
|
42
|
+
path.join(home, '.claude', 'plugins', 'marketplaces', 'ruflo', 'package.json'),
|
|
43
|
+
path.join(cwd, 'node_modules', '@claude-flow', 'cli', 'package.json'),
|
|
44
|
+
path.join(cwd, 'node_modules', 'ruflo', 'package.json'),
|
|
45
|
+
path.join(cwd, 'v3', '@claude-flow', 'cli', 'package.json'),
|
|
46
|
+
];
|
|
47
|
+
for (const p of pkgPaths) {
|
|
48
|
+
if (!fs.existsSync(p)) continue;
|
|
49
|
+
try {
|
|
50
|
+
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
51
|
+
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
52
|
+
RUFLO_VERSION = pkg.version;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
} catch { /* malformed package.json — try next */ }
|
|
56
|
+
}
|
|
57
|
+
} catch { /* fall through to the hardcoded default */ }
|
|
58
|
+
|
|
30
59
|
// Configuration
|
|
31
60
|
const CONFIG = {
|
|
32
61
|
enabled: true,
|
|
@@ -402,7 +431,7 @@ function generateStatusline() {
|
|
|
402
431
|
const lines = [];
|
|
403
432
|
|
|
404
433
|
// Header Line
|
|
405
|
-
let header = `${c.bold}${c.brightPurple}▊ RuFlo
|
|
434
|
+
let header = `${c.bold}${c.brightPurple}▊ RuFlo V${RUFLO_VERSION} ${c.reset}`;
|
|
406
435
|
header += `${swarm.coordinationActive ? c.brightCyan : c.dim}● ${c.brightCyan}${user.name}${c.reset}`;
|
|
407
436
|
if (user.gitBranch) {
|
|
408
437
|
header += ` ${c.dim}│${c.reset} ${c.brightBlue}⎇ ${user.gitBranch}${c.reset}`;
|
|
@@ -508,7 +537,7 @@ function generateSafeStatusline() {
|
|
|
508
537
|
const lines = [];
|
|
509
538
|
|
|
510
539
|
// Header Line
|
|
511
|
-
let header = `${c.bold}${c.brightPurple}▊ RuFlo
|
|
540
|
+
let header = `${c.bold}${c.brightPurple}▊ RuFlo V${RUFLO_VERSION} ${c.reset}`;
|
|
512
541
|
header += `${swarm.coordinationActive ? c.brightCyan : c.dim}● ${c.brightCyan}${user.name}${c.reset}`;
|
|
513
542
|
if (user.gitBranch) {
|
|
514
543
|
header += ` ${c.dim}│${c.reset} ${c.brightBlue}⎇ ${user.gitBranch}${c.reset}`;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* RuFlo
|
|
4
|
-
* Displays real-time V3 implementation progress and system status
|
|
3
|
+
* RuFlo Statusline Generator
|
|
4
|
+
* Displays real-time V3 implementation progress and system status.
|
|
5
|
+
* Version is read from the installed @claude-flow/cli package.json at
|
|
6
|
+
* runtime — #1892 fix: previously hardcoded to V3.5 which drifted from
|
|
7
|
+
* the actual installed alpha series.
|
|
5
8
|
*
|
|
6
9
|
* Usage: node statusline.js [--json] [--compact]
|
|
7
10
|
*/
|
|
@@ -10,6 +13,34 @@ const fs = require('fs');
|
|
|
10
13
|
const path = require('path');
|
|
11
14
|
const { execSync, execFileSync } = require('child_process');
|
|
12
15
|
|
|
16
|
+
// #1892 — derive RuFlo banner version from the installed cli package.json
|
|
17
|
+
// so the statusline never drifts from `ruflo doctor`. Falls back to a
|
|
18
|
+
// generic "RuFlo" label only if every resolution path fails.
|
|
19
|
+
function resolveBannerVersion() {
|
|
20
|
+
const candidates = [
|
|
21
|
+
// Local-checkout / monorepo case
|
|
22
|
+
path.join(__dirname, '..', '..', 'package.json'),
|
|
23
|
+
// npm-installed-as-dep case
|
|
24
|
+
path.join(__dirname, '..', '..', '..', '@claude-flow', 'cli', 'package.json'),
|
|
25
|
+
// npm-installed-globally case
|
|
26
|
+
path.join(__dirname, '..', '..', '..', 'cli', 'package.json'),
|
|
27
|
+
];
|
|
28
|
+
for (const p of candidates) {
|
|
29
|
+
try {
|
|
30
|
+
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
31
|
+
if (pkg.name && pkg.name.includes('claude-flow') && typeof pkg.version === 'string') {
|
|
32
|
+
// Render as "V<major>.<minor>" so the banner stays compact —
|
|
33
|
+
// patch+pre-release detail still shows under `doctor`.
|
|
34
|
+
const m = pkg.version.match(/^(\d+)\.(\d+)/);
|
|
35
|
+
if (m) return `V${m[1]}.${m[2]}`;
|
|
36
|
+
return `V${pkg.version}`;
|
|
37
|
+
}
|
|
38
|
+
} catch {/* try next */}
|
|
39
|
+
}
|
|
40
|
+
return ''; // empty → header just says "RuFlo"
|
|
41
|
+
}
|
|
42
|
+
const BANNER_VERSION = resolveBannerVersion();
|
|
43
|
+
|
|
13
44
|
// Configuration
|
|
14
45
|
const CONFIG = {
|
|
15
46
|
enabled: true,
|
|
@@ -246,8 +277,8 @@ function generateStatusline() {
|
|
|
246
277
|
const system = getSystemMetrics();
|
|
247
278
|
const lines = [];
|
|
248
279
|
|
|
249
|
-
// Header Line
|
|
250
|
-
let header = `${c.bold}${c.brightPurple}▊ RuFlo
|
|
280
|
+
// Header Line — #1892: BANNER_VERSION resolved at module load from package.json
|
|
281
|
+
let header = `${c.bold}${c.brightPurple}▊ RuFlo${BANNER_VERSION ? ' ' + BANNER_VERSION : ''} ${c.reset}`;
|
|
251
282
|
header += `${swarm.coordinationActive ? c.brightCyan : c.dim}● ${c.brightCyan}${user.name}${c.reset}`;
|
|
252
283
|
if (user.gitBranch) {
|
|
253
284
|
header += ` ${c.dim}│${c.reset} ${c.brightBlue}⎇ ${user.gitBranch}${c.reset}`;
|
package/.claude/settings.json
CHANGED
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
117
|
"attribution": {
|
|
118
|
-
"commit": "Co-Authored-By:
|
|
118
|
+
"commit": "Co-Authored-By: ruflo-bot <ruflo-bot@users.noreply.github.com>",
|
|
119
119
|
"pr": "Generated with [claude-flow](https://github.com/ruvnet/claude-flow)"
|
|
120
120
|
},
|
|
121
121
|
"claudeFlow": {
|