claude-flow 3.56.9 → 3.57.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.
Files changed (99) hide show
  1. package/.claude/.proven-config-version +1 -0
  2. package/.claude/helpers/intelligence.cjs +51 -9
  3. package/.claude/proven-config.json +42 -0
  4. package/.claude/skills/verification-quality/SKILL.md +14 -11
  5. package/README.md +1 -1
  6. package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
  7. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
  8. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts +17 -1
  9. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts.map +1 -1
  10. package/node_modules/@claude-flow/security/dist/policy/engine.js +99 -24
  11. package/node_modules/@claude-flow/security/dist/policy/engine.js.map +1 -1
  12. package/node_modules/@claude-flow/security/dist/policy/types.d.ts +14 -1
  13. package/node_modules/@claude-flow/security/dist/policy/types.d.ts.map +1 -1
  14. package/node_modules/@claude-flow/security/dist/policy/types.js +3 -1
  15. package/node_modules/@claude-flow/security/dist/policy/types.js.map +1 -1
  16. package/package.json +2 -2
  17. package/v3/@claude-flow/cli/README.md +164 -62
  18. package/v3/@claude-flow/cli/catalog-manifest.json +5 -5
  19. package/v3/@claude-flow/cli/dist/src/autopilot-state.d.ts +2 -0
  20. package/v3/@claude-flow/cli/dist/src/autopilot-state.js +36 -8
  21. package/v3/@claude-flow/cli/dist/src/command-resolution.d.ts +15 -0
  22. package/v3/@claude-flow/cli/dist/src/command-resolution.js +25 -0
  23. package/v3/@claude-flow/cli/dist/src/commands/agent.js +17 -17
  24. package/v3/@claude-flow/cli/dist/src/commands/claims.js +6 -8
  25. package/v3/@claude-flow/cli/dist/src/commands/daemon.js +94 -33
  26. package/v3/@claude-flow/cli/dist/src/commands/doctor.js +95 -18
  27. package/v3/@claude-flow/cli/dist/src/commands/memory.js +14 -2
  28. package/v3/@claude-flow/cli/dist/src/commands/policy.js +6 -1
  29. package/v3/@claude-flow/cli/dist/src/commands/security-code-patterns.d.ts +2 -2
  30. package/v3/@claude-flow/cli/dist/src/commands/security-code-patterns.js +61 -3
  31. package/v3/@claude-flow/cli/dist/src/commands/security.d.ts +24 -0
  32. package/v3/@claude-flow/cli/dist/src/commands/security.js +81 -35
  33. package/v3/@claude-flow/cli/dist/src/commands/tui.d.ts +9 -0
  34. package/v3/@claude-flow/cli/dist/src/commands/tui.js +29 -3
  35. package/v3/@claude-flow/cli/dist/src/config/proven-config-refresh.d.ts +9 -0
  36. package/v3/@claude-flow/cli/dist/src/config/proven-config-refresh.js +24 -3
  37. package/v3/@claude-flow/cli/dist/src/funnel/local-signals.js +2 -1
  38. package/v3/@claude-flow/cli/dist/src/index.js +11 -47
  39. package/v3/@claude-flow/cli/dist/src/init/settings-generator.js +4 -58
  40. package/v3/@claude-flow/cli/dist/src/init/types.js +1 -1
  41. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-execute-core.d.ts +2 -0
  42. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-execute-core.js +15 -0
  43. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-health-metrics.d.ts +22 -0
  44. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-health-metrics.js +33 -0
  45. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js +45 -22
  46. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentbbs-federation.d.ts +1 -1
  47. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentbbs-federation.js +7 -2
  48. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js +25 -2
  49. package/v3/@claude-flow/cli/dist/src/mcp-tools/aidefence-known-misses.d.ts +22 -0
  50. package/v3/@claude-flow/cli/dist/src/mcp-tools/aidefence-known-misses.js +57 -0
  51. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.js +10 -11
  52. package/v3/@claude-flow/cli/dist/src/mcp-tools/autopilot-tools.js +2 -2
  53. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-intent-tools.js +6 -2
  54. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.js +29 -7
  55. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +4 -0
  56. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.d.ts +1 -1
  57. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +100 -25
  58. package/v3/@claude-flow/cli/dist/src/mcp-tools/metaharness-tools.js +1 -1
  59. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.js +48 -54
  60. package/v3/@claude-flow/cli/dist/src/mcp-tools/policy-tools.js +5 -3
  61. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.js +6 -0
  62. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.js +55 -17
  63. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.js +66 -17
  64. package/v3/@claude-flow/cli/dist/src/memory/intelligence.d.ts +5 -1
  65. package/v3/@claude-flow/cli/dist/src/memory/intelligence.js +158 -35
  66. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +10 -3
  67. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js +2 -1
  68. package/v3/@claude-flow/cli/dist/src/memory/search-defaults.d.ts +54 -0
  69. package/v3/@claude-flow/cli/dist/src/memory/search-defaults.js +37 -0
  70. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.d.ts +28 -0
  71. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.js +59 -2
  72. package/v3/@claude-flow/cli/dist/src/memory/stats-file-lock.d.ts +7 -0
  73. package/v3/@claude-flow/cli/dist/src/memory/stats-file-lock.js +53 -0
  74. package/v3/@claude-flow/cli/dist/src/mods/command-registry/schema.d.ts +24 -24
  75. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.d.ts +10 -0
  76. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.js +27 -1
  77. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.d.ts +2 -4
  78. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.js +202 -69
  79. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.d.ts +4 -0
  80. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.js +12 -1
  81. package/v3/@claude-flow/cli/dist/src/services/distill-oracle.d.ts +1 -1
  82. package/v3/@claude-flow/cli/dist/src/services/distill-oracle.js +2 -2
  83. package/v3/@claude-flow/cli/dist/src/services/policy-anchor-log.d.ts +13 -0
  84. package/v3/@claude-flow/cli/dist/src/services/policy-anchor-log.js +242 -0
  85. package/v3/@claude-flow/cli/dist/src/services/policy-archive-scan.d.ts +7 -0
  86. package/v3/@claude-flow/cli/dist/src/services/policy-archive-scan.js +50 -0
  87. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-anchor.d.ts +14 -8
  88. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-anchor.js +356 -40
  89. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-audit.d.ts +22 -0
  90. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-audit.js +260 -0
  91. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-record.d.ts +3 -0
  92. package/v3/@claude-flow/cli/dist/src/services/policy-ledger-record.js +22 -0
  93. package/v3/@claude-flow/cli/dist/src/services/policy-runtime.d.ts +2 -1
  94. package/v3/@claude-flow/cli/dist/src/services/policy-runtime.js +267 -40
  95. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +11 -0
  96. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js +37 -0
  97. package/v3/@claude-flow/cli/dist/src/transfer/store/discovery.js +16 -17
  98. package/v3/@claude-flow/cli/dist/src/transfer/store/types.d.ts +4 -0
  99. package/v3/@claude-flow/cli/package.json +5 -5
@@ -1,22 +1,89 @@
1
1
  <div align="center">
2
2
 
3
- [![Ruflo Banner](ruflo/assets/ruflo-small.jpeg)](https://cognitum.one/agentic-engineering)
3
+ <a href="https://cognitum.one/agentic-engineering"><img src="ruflo/assets/ruflo-neon-flicker.gif" alt="Ruflo animated neon sign" width="100%"></a>
4
+
5
+ **An agent meta-harness for Claude Code and Codex.**
4
6
 
5
7
  <!-- Try Ruflo — the 3 badges first-time visitors actually act on -->
6
8
  [![npm version (ruflo)](https://img.shields.io/npm/v/ruflo?label=npx%20ruflo&style=for-the-badge&logo=npm&color=cb3837)](https://www.npmjs.com/package/ruflo)
7
9
  [![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](https://opensource.org/licenses/MIT)
8
10
  [![Star on GitHub](https://img.shields.io/github/stars/ruvnet/claude-flow?style=for-the-badge&logo=github&color=gold)](https://github.com/ruvnet/claude-flow)
9
11
 
10
- <!-- Ecosystem strip (collapsed visually with flat-square) -->
11
- [![🕸️ RuVector Agentic DB](https://img.shields.io/badge/RuVector_Agentic-DB-06b6d4?style=flat-square&logoColor=white&logo=graphql)](https://github.com/ruvnet/ruvector)
12
- [![Ecosystem downloads](https://img.shields.io/badge/ecosystem%20downloads-8.1M%2B-blue?style=flat-square&logo=npm)](https://github.com/ruvnet/ruflo/blob/main/data/clone-data.proof.json)
13
- [![Git clones (14d)](https://img.shields.io/badge/git%20clones%2014d-106k-blueviolet?style=flat-square&logo=github)](https://github.com/ruvnet/ruflo/blob/main/data/clone-data.ledger.json)
14
- [![Claude Code](https://img.shields.io/badge/Claude%20Code-Plugin-D97757?style=flat-square&logoColor=white&logo=anthropic)](https://github.com/ruvnet/claude-flow)
15
- [![Codex Plugin](https://img.shields.io/badge/Codex-Plugin-412991?style=flat-square&logoColor=white&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI%2BPHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0yMi4yODIgOS44MjFhNS45ODUgNS45ODUgMCAwIDAtLjUxNi00LjkxIDYuMDQ2IDYuMDQ2IDAgMCAwLTYuNTEtMi45QTYuMDY1IDYuMDY1IDAgMCAwIDQuOTgxIDQuMThhNS45ODUgNS45ODUgMCAwIDAtMy45OTggMi45IDYuMDQ2IDYuMDQ2IDAgMCAwIC43NDMgNy4wOTcgNS45OCA1Ljk4IDAgMCAwIC41MSA0LjkxMSA2LjA1MSA2LjA1MSAwIDAgMCA2LjUxNSAyLjlBNS45ODUgNS45ODUgMCAwIDAgMTMuMjYgMjRhNi4wNTYgNi4wNTYgMCAwIDAgNS43NzItNC4yMDYgNS45OSA1Ljk5IDAgMCAwIDMuOTk4LTIuOSA2LjA1NiA2LjA1NiAwIDAgMC0uNzQ3LTcuMDczek0xMy4yNiAyMi40M2E0LjQ3NiA0LjQ3NiAwIDAgMS0yLjg3Ni0xLjA0bC4xNDItLjA4IDQuNzc4LTIuNzU4YS43OTUuNzk1IDAgMCAwIC4zOTMtLjY4MXYtNi43MzdsMi4wMiAxLjE2OGEuMDcxLjA3MSAwIDAgMSAuMDM4LjA1MnY1LjU4M2E0LjUwNCA0LjUwNCAwIDAgMS00LjQ5NSA0LjQ5NHpNMy42IDE4LjMwNGE0LjQ3IDQuNDcgMCAwIDEtLjUzNS0zLjAxNGwuMTQyLjA4NSA0Ljc4MyAyLjc1OWEuNzcxLjc3MSAwIDAgMCAuNzgxIDBsNS44NDMtMy4zNjl2Mi4zMzJhLjA4LjA4IDAgMCAxLS4wMzMuMDYyTDkuNzQgMTkuOTVhNC41IDQuNSAwIDAgMS02LjE0LTEuNjQ2ek0yLjM0IDcuODk2YTQuNDg1IDQuNDg1IDAgMCAxIDIuMzY2LTEuOTczVjExLjZhLjc2Ni43NjYgMCAwIDAgLjM4OC42NzdsNS44MTUgMy4zNTQtMi4wMiAxLjE2OGEuMDc2LjA3NiAwIDAgMS0uMDcyIDBsLTQuODMtMi43ODZBNC41MDQgNC41MDQgMCAwIDEgMi4zNCA3Ljg3MnptMTYuNTk3IDMuODU1LTUuODMzLTMuMzg3IDIuMDE2LTEuMTY1YS4wNzYuMDc2IDAgMCAxIC4wNzEgMGw0LjgzIDIuNzkxYTQuNDk0IDQuNDk0IDAgMCAxLS42NzYgOC4xMDR2LTUuNjc3YS43OS43OSAwIDAgMC0uNDA3LS42Njd6bTIuMDEtMy4wMjMtLjE0MS0uMDg1LTQuNzc0LTIuNzgyYS43NzYuNzc2IDAgMCAwLS43ODUgMEw5LjQwOSA5LjIzVjYuODk3YS4wNjYuMDY2IDAgMCAxIC4wMjgtLjA2Mmw0LjgzLTIuNzg3YTQuNDk5IDQuNDk5IDAgMCAxIDYuNjggNC42NnpNOC4zMDcgMTIuODYzbC0yLjAyLTEuMTY0YS4wOC4wOCAwIDAgMS0uMDM4LS4wNTdWNi4wNzRhNC40OTkgNC40OTkgMCAwIDEgNy4zNzYtMy40NTRsLS4xNDIuMDgtNC43NzggMi43NThhLjc5NS43OTUgMCAwIDAtLjM5My42ODJ6bTEuMDk3LTIuMzY2IDIuNjAyLTEuNSAyLjYwNyAxLjV2Mi45OTlsLTIuNTk3IDEuNS0yLjYwNy0xLjVaIi8%2BPC9zdmc%2B)](https://www.npmjs.com/package/@claude-flow/codex)
12
+ <p align="center">
13
+ <a href="data/npm-downloads.latest.json"><img src="docs/assets/readme/badges/downloads.svg?v=mobile-readable-3" width="300" alt="Ecosystem npm downloads: 12.52M over 12 months through October 4, 2026"></a>
14
+ <br>
15
+ <a href="https://github.com/ruvnet/claude-flow"><img src="docs/assets/readme/badges/claude.svg?v=mobile-readable-3" width="300" alt="Claude Code"></a>
16
+ <a href="https://www.npmjs.com/package/@claude-flow/codex"><img src="docs/assets/readme/badges/codex.svg?v=mobile-readable-3" width="300" alt="Codex Plugin"></a>
17
+ </p>
18
+
19
+ </div>
20
+
21
+ <a id="start-here"></a>
22
+
23
+ ## <img src="docs/assets/readme/icons/terminal.svg" width="32" height="32" alt=""> Get started with Ruflo
24
+
25
+ <img src="docs/assets/readme/icons/plugins.svg" width="28" height="28" alt=""> **Start in Claude Code** with core tools, the visual console and runtime mods. Requires Claude Code **2.1.287 or later**. Run inside Claude Code:
26
+
27
+ ```text
28
+ /plugin marketplace add ruvnet/ruflo
29
+ /plugin install ruflo-core@ruflo
30
+ /plugin install ruflo-console@ruflo
31
+ /plugin install ruflo-mods@ruflo
32
+ /reload-plugins
33
+ /ruflo
34
+ ```
35
+
36
+ **Core** provides foundation tools. **Console** opens the agent cockpit. **Mods** add routing and policy enforcement inside Claude Code. Mods run with your account's permissions; review their code before installing.
37
+
38
+ <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> **Using Codex or another MCP enabled tool?** Use NPX for Ruflo project setup and connect your client to the Ruflo MCP server. Run the setup wizard in your project terminal:
39
+
40
+ ```bash
41
+ npx ruflo@latest init wizard
42
+ ```
43
+
44
+ For clients that support local stdio MCP servers, configure **command** `npx` and **arguments** `["-y", "ruflo@latest", "mcp", "start"]`. The equivalent server command is:
45
+
46
+ ```bash
47
+ npx -y ruflo@latest mcp start
48
+ ```
49
+
50
+ MCP exposes Ruflo tools to your client. The console and mods above are Claude Code integrations; hook support depends on the client.
51
+
52
+ <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> **Prefer a plain terminal? Optional.** The console also runs on its own, with no Claude Code: `npx ruflo tui` (add `--plain` to print one frame for scripts). It shows Overview, Cost, Swarm, Events and Missions, plus an optional AI page. [Terminal UI guide](docs/USERGUIDE.md#terminal-ui-optional)
53
+
54
+ <p align="center"><img src="docs/assets/ruflo-tui-compact.svg" width="640" alt="Looping recording of the optional ruflo terminal UI with its pictures: Overview in the Classic BBS look, the Orbital look with its moving globe, and the Swarm graph, in a sample project"></p>
55
+
56
+ [Compare install paths](#quick-start) · [Open the console](#console-walkthrough) · [User guide](docs/USERGUIDE.md)
57
+
58
+ <div align="center">
59
+
60
+
61
+ ### Optional: ruOS Desktop
62
+
63
+ <a href="https://ruos.cognitum.one"><img src="ruflo/assets/ruos-animated.svg" alt="ruOS — A desktop that runs itself" width="100%"></a>
64
+
65
+ **Connect ruOS to ChatGPT or Claude via MCP:**
66
+
67
+ ```text
68
+ https://ruos.cognitum.one/mcp
69
+ ```
70
+
71
+
72
+
73
+ <!-- RuVector promo -->
74
+ <a href="https://github.com/ruvnet/ruvector"><img src="docs/assets/readme/ruvector-promo-depth.svg" width="100%" alt="RuVector: Give your agents memory. Local vector search, persistent context, graph relationships and feedback learning. Explore RuVector."></a>
75
+
76
+ ```bash
77
+ npx ruvector
78
+ ```
79
+
80
+
81
+
16
82
 
17
83
  # Ruflo
18
84
 
19
- **An agent meta-harness for Claude Code and Codex.**
85
+ [English](README.md) · [简体中文](README.zh-CN.md)
86
+
20
87
 
21
88
  [![RuFlo Explained — build an AI team that plans, remembers, tests, and improves](docs/assets/ruflo-explained/ch14.jpg)](docs/ruflo-explained.md)
22
89
 
@@ -29,13 +96,16 @@ A 14-chapter guide: from the basic idea to a first useful task, then memory, age
29
96
 
30
97
  One `npx ruflo init` gives Claude Code a nervous system: agents self-organize into swarms, learn from every task, remember across sessions, and — with federation — securely talk to agents on other machines without leaking data. You keep writing code. Ruflo handles the coordination.
31
98
 
32
- ```
33
- Self-Learning / Self-Optimizing Agent Architecture
99
+ <p align="center"><img src="docs/assets/readme/learning-cinematic-compact.svg" width="100%" alt="Ruflo trajectory learning: branching memory paths, outcome feedback, contrastive AI and local learning. No LLM required for local vector retrieval and contrastive updates; agent execution may still use an LLM."></p>
34
100
 
35
- User --> Ruflo (CLI/MCP) --> Router --> Swarm --> Agents --> Memory --> LLM Providers
36
- ^ |
37
- +---- Learning Loop <-------+
38
- ```
101
+ <sub>Conceptual learning loop. Local vector retrieval and contrastive updates can run without an LLM; embeddings and configured learning modules are still required. See the <a href="v3/@claude-flow/cli/src/services/ruvector-training.ts">RuVector training integration</a> and <a href="v3/@claude-flow/neural/src/modes/balanced.ts">trajectory contrastive learning</a>.</sub>
102
+
103
+ <details>
104
+ <summary>Architecture in text</summary>
105
+
106
+ User → Ruflo (CLI/MCP) → Router → Swarm → Agents → Memory → LLM providers. Memory feeds useful experience back into routing. This is a conceptual flow, not a live execution trace.
107
+
108
+ </details>
39
109
 
40
110
  > **New to Ruflo?** You don't need to learn 314 MCP tools or 26 CLI commands. After `init`, just use Claude Code normally — the hooks system automatically routes tasks, learns from successful patterns, and coordinates agents in the background.
41
111
 
@@ -48,10 +118,52 @@ User --> Ruflo (CLI/MCP) --> Router --> Swarm --> Agents --> Memory --> LLM Prov
48
118
 
49
119
  ---
50
120
 
51
- ![Ruflo Plugins](./ruflo-plugins.gif)
121
+ <p align="center"><img src="docs/assets/readme/console.svg" alt="Mission control: inspect agent work" width="100%"></p>
122
+
123
+ <p align="center"><a href="https://raw.githubusercontent.com/ruvnet/ruflo/main/docs/assets/ruflo-console-theme-compact.svg"><img src="docs/assets/ruflo-console-theme-compact.svg" width="100%" alt="Ruflo Orbital theme: animated boot checks, block logo, menu icons, rotating globe, swarm routing, six color palettes and responsive Theme Studio"></a></p>
124
+
125
+ [Open animated demo](https://raw.githubusercontent.com/ruvnet/ruflo/main/docs/assets/ruflo-console-theme-compact.svg) · [Theme Studio guide](plugins/ruflo-console/README.md) · [Workflow demo](docs/assets/ruflo-console-workflows.svg)
126
+
127
+ <img src="docs/assets/readme/console-icon-workflows.svg" width="28" height="28" alt=""> **Your agent cockpit.** Track workflows, agents, models, tokens and cost beside Claude Code. The 38 second animation shows **Orbital and Theme Studio** through actual renderer frames, including boot checks, six palettes, customization, saved themes, JSON import and resizing. This compact 3.84 MB SVG retains all 456 frames. Native host and AI provider execution are not demonstrated.
128
+
129
+ <img src="docs/assets/readme/console-icon-inspect.svg" width="28" height="28" alt=""> **Inspect any run.** Open agent logs and results, search, triage failures, replay and compare. Start with `npx ruflo init`, restart Claude Code, then `/ruflo`. [Full console tour](docs/assets/ruflo-console-walkthrough-wide.gif).
130
+
131
+ <img src="docs/assets/readme/console-icon-control.svg" width="28" height="28" alt=""> **Let Claude drive. You set the limits.** Enable **Settings → Claude control** to navigate and run console actions. Choose `read`, `write`, `manage` or `full`, with `ask` or `auto` approval. The current default is **read + ask**; raising the level is your choice. Actions above your permission level are refused, and network, spending and destructive actions require confirmation even in `auto`. Review the live action log or press **Take back control** to stop Claude control. [Details](v3/docs/adr/ADR-444-claude-controls-the-console.md).
132
+
133
+ <a id="console-walkthrough"></a>
134
+
135
+ ### One task: create a mission with Claude
136
+
137
+ <img src="docs/assets/readme/console-icon-workflows.svg" width="28" height="28" alt=""> **Watch the recorded console session below.** Claude creates a mission, opens the Learning and Security pages, and reports its actions in Overview.
138
+
139
+ 1. **Set the boundary.** Install the console using the commands below, open `/ruflo`, then choose **Settings → Claude control → write + ask**.
140
+ 2. **Give a concrete request.** Try: “Create a mission to add a dark mode toggle. Show me the mission and its status.”
141
+ 3. **Approve creation.** Claude opens Missions and sets the goal. Confirm the pending create action in the console.
142
+ 4. **Verify the result.** Check that Missions contains the goal and Overview records the action. Creating a mission does not mean the feature has been implemented.
143
+ 5. **Keep control.** **Take back control** pauses Claude's console tools. A later call should be refused until you restore control.
144
+
145
+ **What the recording demonstrates:** a real Claude Haiku session with `write + auto`, mission creation, page navigation, a refused swarm stop, and control being taken back. The steps above use `ask` so you approve creation yourself. The linked workflow animation uses sample data, while the theme demo replays renderer frames. Neither is evidence of completed swarm work or memory recall.
146
+
147
+ [Implementation and recorded test findings](v3/docs/adr/ADR-444-claude-controls-the-console.md) · [Reproduction script](plugins/ruflo-console/scripts/e2e-control.sh)
148
+
149
+ <p align="center"><img src="docs/assets/ruflo-console-claude-control.gif" alt="Claude Code with the ruflo console beside it: Claude sets a mission goal, creates the mission and opens the Learning, Security and Overview pages through the console tools; the Claude control dashboard logs each action; swarm-stop is refused because it needs the full level; the person clicks Take back control and the next request is refused"></p>
150
+
151
+
152
+ **Install the mods from the ruflo marketplace** (Claude Code 2.1.287 or later; mods run with your account's permissions and are not sandboxed, so read the code first):
153
+
154
+ ```text
155
+ /plugin marketplace add ruvnet/ruflo
156
+ /plugin install ruflo-console@ruflo
157
+ /plugin install ruflo-mods@ruflo
158
+ /reload-plugins
159
+ ```
160
+
161
+ `ruflo-console` is the cockpit above, `ruflo-mods` routes prompts and enforces policy in-process, `ruflo-swarm` shows the swarm in a pane, and `ruflo-ruos` adds the ruOS status segment. Open `/plugin` to confirm they appear in the active mods line. Inside the console, `/ruflo market` is the Plugin Catalog: every ruflo plugin, mod and skill with what it ships, and buttons to install, enable, disable and update (each asks first).
52
162
 
53
163
  ## Quick Start
54
164
 
165
+ <p align="center"><img src="docs/assets/readme/quick-start.svg" alt="Start building with Ruflo" width="100%"></p>
166
+
55
167
  There are **two different install paths** with very different surface areas. Pick based on what you need (#1744):
56
168
 
57
169
  | | **Claude Code Plugin** | **CLI install (`npx ruflo init`)** |
@@ -162,7 +274,7 @@ This adds slash commands and agent definitions. `ruflo-core` (installed above) d
162
274
 
163
275
  </details>
164
276
 
165
- ### CLI Install
277
+ ### <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> CLI Install
166
278
 
167
279
  **macOS / Linux / WSL / Git-Bash:**
168
280
 
@@ -186,68 +298,50 @@ npm install -g ruflo@latest
186
298
 
187
299
  > 💡 **Windows users:** the `curl ... | bash` form needs a POSIX shell (Git-Bash, WSL, MSYS). The `npx ruflo@latest init wizard` line works natively in PowerShell and cmd. If you hit an `'bash' is not recognized` error, use the `npx` line instead — both end up running the same init flow.
188
300
 
189
- ### MCP Server
301
+ ### <img src="docs/assets/readme/icons/network.svg" width="28" height="28" alt=""> MCP Server
190
302
 
191
303
  ```bash
192
304
  # Add Ruflo as an MCP server in Claude Code
193
305
  claude mcp add claude-flow -- npx ruflo@latest mcp start
194
306
  ```
195
307
 
196
- #### HTTP transport security
197
-
198
- `ruflo mcp start -t http` exposes every registered tool over HTTP (`/rpc`, `/mcp`, `/ws`). The default `stdio` transport is not affected.
199
-
200
- | Setting | Effect |
201
- |---|---|
202
- | `RUFLO_MCP_HTTP_TOKEN=<token>` | Require `Authorization: Bearer <token>` on every request. Failure is a bare `401`. The token is compared in constant time and is never logged. Prefer this over `--auth-token`, which is visible in `ps`. |
203
- | `--auth-token-file <path>` | Read the token from a file (one line). Takes precedence over the env var. |
204
- | `--auth-token <token>` | Same, on the command line (visible in argv; highest precedence). |
205
- | `RUFLO_MCP_ALLOW_UNAUTHENTICATED_HTTP=1` | Allow an unauthenticated bind to a non-loopback `--host`. Only for a trusted network boundary or an authenticating reverse proxy. |
308
+ ---
206
309
 
207
- A token must be 16-512 printable ASCII characters (no spaces). `GET /health` stays public and returns only `{"status":"ok"}` when a token is set. Tokens are supported for `-t http` only; `-t websocket` rejects one.
310
+ ## What You Get
208
311
 
209
- | `--host` | no token | token set |
210
- |---|---|---|
211
- | `localhost`, `127.0.0.1`, `::1` | starts, **unauthenticated** | starts, token required |
212
- | anything else (`0.0.0.0`, `::`, a LAN IP, `127.0.0.2`, `[::1]`, `LOCALHOST`) | **refuses to start** unless `RUFLO_MCP_ALLOW_UNAUTHENTICATED_HTTP=1` | starts, token required |
312
+ <p align="center"><img src="docs/assets/readme/capabilities.svg" alt="Your agent toolkit" width="100%"></p>
213
313
 
214
- Without a token, a loopback server is still unauthenticated: any process on the machine, and any web page that can reach it via DNS rebinding, can call tools. Set `RUFLO_MCP_HTTP_TOKEN` whenever the HTTP transport is used.
314
+ <table>
315
+ <tr><td width="50%"><a href="plugins/ruflo-swarm/README.md"><img src="docs/assets/readme/card-swarm.svg" width="100%" alt="Agent teams"></a></td><td width="50%"><a href="plugins/ruflo-rag-memory/README.md"><img src="docs/assets/readme/card-memory.svg" width="100%" alt="Persistent memory"></a></td></tr>
316
+ <tr><td width="50%"><a href="plugins/ruflo-intelligence/README.md"><img src="docs/assets/readme/card-learning.svg" width="100%" alt="Learning loops"></a></td><td width="50%"><a href="plugins/ruflo-security-audit/README.md"><img src="docs/assets/readme/card-security.svg" width="100%" alt="Security controls"></a></td></tr>
317
+ <tr><td width="50%"><a href="https://ruvnet.github.io/ruflo"><img src="docs/assets/readme/card-plugins.svg" width="100%" alt="Plugin marketplace"></a></td><td width="50%"><a href="plugins/ruflo-ruvllm/README.md"><img src="docs/assets/readme/card-routing.svg" width="100%" alt="Models and routing"></a></td></tr>
318
+ </table>
215
319
 
216
- **Upgrading:** binding off loopback (for example `--host 0.0.0.0` in Docker) now needs a token or the opt-out above; otherwise the server exits with an error.
320
+ | Capability | Description |
321
+ |------------|-------------|
322
+ | <img src="docs/assets/readme/icons/agents.svg" width="28" height="28" alt=""> **100+ Agents** | Specialized agents for coding, testing, security, docs, architecture |
323
+ | <img src="docs/assets/readme/icons/network.svg" width="28" height="28" alt=""> **Comms Layer** | Zero-trust federation — agents across machines/orgs discover, authenticate, and exchange work securely |
324
+ | <img src="docs/assets/readme/icons/swarm.svg" width="28" height="28" alt=""> **Swarm Coordination** | Hierarchical, mesh, and adaptive topologies with consensus |
325
+ | <img src="docs/assets/readme/icons/learning.svg" width="28" height="28" alt=""> **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
326
+ | <img src="docs/assets/readme/icons/memory.svg" width="28" height="28" alt=""> **Vector Memory** | HNSW-indexed AgentDB — measured ~1.9x faster at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99); ANN wins above the crossover, ties/loses at small N. See [audit](docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](scripts/benchmark-intelligence.mjs) |
327
+ | <img src="docs/assets/readme/icons/workers.svg" width="28" height="28" alt=""> **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
328
+ | <img src="docs/assets/readme/icons/plugins.svg" width="28" height="28" alt=""> **Plugin Marketplace** | 33 native Claude Code plugins + 21 npm plugins |
329
+ | <img src="docs/assets/readme/icons/routing.svg" width="28" height="28" alt=""> **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
330
+ | <img src="docs/assets/readme/icons/security.svg" width="28" height="28" alt=""> **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
331
+ | <img src="docs/assets/readme/icons/federation.svg" width="28" height="28" alt=""> **Agent Federation** | Cross-installation agent collaboration with zero-trust security |
332
+ | <img src="docs/assets/readme/icons/audit.svg" width="28" height="28" alt=""> **[MetaHarness](docs/metaharness-user-guide.md)** | Audit your AI agent setup before you ship. Grade readiness (1-100), scan tool configs for security issues, snapshot the whole project to catch regressions over time, and find templates that match your repo. `ruflo eject` turns a ruflo project into a standalone agent toolkit with its own name. [Full guide](docs/metaharness-user-guide.md). |
217
333
 
218
- ---
334
+ ### <img src="docs/assets/readme/icons/learning.svg" width="28" height="28" alt=""> Learning from experience
219
335
 
220
- ## What You Get
336
+ <p align="center"><img src="docs/assets/readme/learning-flow.svg" width="100%" alt="Recall, execute, evaluate, store, adapt and reuse: an illustrative agent learning cycle."></p>
221
337
 
222
- | Capability | Description |
223
- |------------|-------------|
224
- | 🤖 **100+ Agents** | Specialized agents for coding, testing, security, docs, architecture |
225
- | 📡 **Comms Layer** | Zero-trust federation — agents across machines/orgs discover, authenticate, and exchange work securely |
226
- | 🐝 **Swarm Coordination** | Hierarchical, mesh, and adaptive topologies with consensus |
227
- | 🧠 **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
228
- | 💾 **Vector Memory** | HNSW-indexed AgentDB — measured ~1.9x faster at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99); ANN wins above the crossover, ties/loses at small N. See [audit](docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](scripts/benchmark-intelligence.mjs) |
229
- | ⚡ **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
230
- | 🧩 **Plugin Marketplace** | 33 native Claude Code plugins + 21 npm plugins |
231
- | 🔌 **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
232
- | 🛡️ **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
233
- | 🌐 **Agent Federation** | Cross-installation agent collaboration with zero-trust security |
234
- | 🔬 **[MetaHarness](docs/metaharness-user-guide.md)** | Audit your AI agent setup before you ship. Grade readiness (1-100), scan tool configs for security issues, snapshot the whole project to catch regressions over time, and find templates that match your repo. `ruflo eject` turns a ruflo project into a standalone agent toolkit with its own name. [Full guide](docs/metaharness-user-guide.md). |
338
+ Useful trajectories and task feedback can inform future work. Results depend on the configured memory, learning components and quality of feedback. [Learning plugin](plugins/ruflo-intelligence/README.md).
235
339
 
236
340
  ### Agent Federation — Slack for Agents
237
341
 
238
- ```
239
- Your Agent --> [ Remove secrets ] --> [ Sign message ] --> [ Encrypted channel ]
240
- Emails, SSNs, Proves it came No one reads it
241
- keys stripped from you in transit
242
- |
243
- v
244
- Their Agent <-- [ Block attacks ] <-- [ Check identity ] <------+
245
- Stops prompt Rejects forgeries
246
- injection
247
-
248
- Audit trail on both sides.
249
- Trust builds over time. Bad behavior = instant downgrade.
250
- ```
342
+ <p align="center"><img src="docs/assets/readme/federation.svg" alt="Connected intelligence across machines" width="100%"></p>
343
+
344
+ <p align="center"><img src="docs/assets/readme/federation-flow.svg" width="100%" alt="Outbound agent, data filtering, signing and encryption, identity verification, input checks and receiving agent."></p>
251
345
 
252
346
  Slack gave teams channels. Federation gives agents the same thing — **shared workspaces across trust boundaries**, where agents on different machines, orgs, or cloud regions can discover each other, prove who they are, and collaborate on tasks.
253
347
 
@@ -349,6 +443,8 @@ User --> Claude Code / CLI
349
443
 
350
444
  ## Documentation
351
445
 
446
+ <p align="center"><img src="docs/assets/readme/documentation.svg" alt="Guides, architecture and verification" width="100%"></p>
447
+
352
448
  Four docs for four audiences:
353
449
 
354
450
  | Doc | When to read it |
@@ -379,6 +475,8 @@ User Guide section index:
379
475
 
380
476
  ## Support
381
477
 
478
+ <p align="center"><img src="docs/assets/readme/support.svg" alt="Build with the Ruflo community" width="100%"></p>
479
+
382
480
  | Resource | Link |
383
481
  |----------|------|
384
482
  | Documentation | [User Guide](docs/USERGUIDE.md) |
@@ -387,6 +485,10 @@ User Guide section index:
387
485
  | Community | [Agentics Foundation Discord](https://discord.com/invite/dfxmpwkG2D) |
388
486
  | Powered by | [Cognitum.one](https://cognitum.one) |
389
487
 
488
+ <p align="center"><img src="docs/assets/readme/signal-divider.svg" alt="Ruflo" width="100%"></p>
489
+
390
490
  ## License
391
491
 
392
492
  MIT - [RuvNet](https://github.com/ruvnet)
493
+
494
+ <a href="https://cognitum.one"><img src="docs/assets/readme/cognitum-banner-v2.svg" width="100%" alt="Cognitum One: Ambient Intelligence at the edge of the Physical World. Explore cognitum.one."></a>
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generation": 6,
4
- "generatedAt": "2026-09-17T21:28:47.530Z",
5
- "gitSha": "702d1461",
3
+ "generation": 7,
4
+ "generatedAt": "2026-10-17T22:34:44.747Z",
5
+ "gitSha": "e4fb889e",
6
6
  "catalog": {
7
- "agents": 167,
8
- "tools": 418,
7
+ "agents": 176,
8
+ "tools": 423,
9
9
  "skills": 34
10
10
  },
11
11
  "benchmark": null
@@ -80,6 +80,8 @@ export declare function discoverTasks(sources: string[]): TaskInfo[];
80
80
  export declare function isTerminal(status: string): boolean;
81
81
  export declare function getProgress(tasks: TaskInfo[]): TaskProgress;
82
82
  export declare function calculateReward(iterations: number, durationMs: number): number;
83
+ /** Why the last tryLoadLearning() returned null (null when it succeeded or was never called). */
84
+ export declare function getLearningLoadError(): string | null;
83
85
  export declare function tryLoadLearning(): Promise<{
84
86
  initialize: () => Promise<boolean>;
85
87
  [key: string]: unknown;
@@ -9,7 +9,9 @@
9
9
  */
10
10
  import { randomUUID } from 'node:crypto';
11
11
  import { existsSync, readFileSync, mkdirSync, readdirSync } from 'node:fs';
12
- import { resolve, join } from 'node:path';
12
+ import { resolve, join, dirname } from 'node:path';
13
+ import { createRequire } from 'node:module';
14
+ import { pathToFileURL } from 'node:url';
13
15
  import { homedir } from 'node:os';
14
16
  import { writeFileAtomic } from './fs-secure.js';
15
17
  // ── Constants ─────────────────────────────────────────────────
@@ -288,17 +290,43 @@ export function calculateReward(iterations, durationMs) {
288
290
  return Math.round((iterFactor + timeFactor) * 100) / 100;
289
291
  }
290
292
  // ── Learning Integration ──────────────────────────────────────
293
+ let lastLearningLoadError = null;
294
+ /** Why the last tryLoadLearning() returned null (null when it succeeded or was never called). */
295
+ export function getLearningLoadError() {
296
+ return lastLearningLoadError;
297
+ }
298
+ /**
299
+ * agentic-flow's `exports` map does not expose dist/coordination/*, so a bare
300
+ * specifier import throws ERR_PACKAGE_PATH_NOT_EXPORTED (#4146). Resolve the
301
+ * package root through its exported entry point and import the file by URL.
302
+ */
303
+ function resolveAutopilotLearningUrl() {
304
+ const req = createRequire(import.meta.url);
305
+ let dir = dirname(req.resolve('agentic-flow'));
306
+ for (let i = 0; i < 6; i++) {
307
+ if (existsSync(join(dir, 'package.json')) && existsSync(join(dir, 'dist', 'coordination', 'autopilot-learning.js'))) {
308
+ return pathToFileURL(join(dir, 'dist', 'coordination', 'autopilot-learning.js')).href;
309
+ }
310
+ dir = dirname(dir);
311
+ }
312
+ throw new Error('agentic-flow does not ship dist/coordination/autopilot-learning.js');
313
+ }
291
314
  export async function tryLoadLearning() {
315
+ lastLearningLoadError = null;
292
316
  try {
293
- const modPath = 'agentic-flow/dist/coordination/autopilot-learning.js';
294
- const mod = await import(/* webpackIgnore: true */ modPath).catch(() => null);
295
- if (mod?.AutopilotLearning) {
296
- const instance = new mod.AutopilotLearning();
297
- if (await instance.initialize())
298
- return instance;
317
+ const mod = await import(/* webpackIgnore: true */ resolveAutopilotLearningUrl());
318
+ if (!mod?.AutopilotLearning) {
319
+ lastLearningLoadError = 'agentic-flow autopilot-learning module has no AutopilotLearning export';
320
+ return null;
299
321
  }
322
+ const instance = new mod.AutopilotLearning();
323
+ if (await instance.initialize())
324
+ return instance;
325
+ lastLearningLoadError = 'AutopilotLearning.initialize() returned false (AgentDB not initialized)';
326
+ }
327
+ catch (e) {
328
+ lastLearningLoadError = `Could not load agentic-flow autopilot learning: ${e instanceof Error ? e.message : String(e)}`;
300
329
  }
301
- catch { /* not available */ }
302
330
  return null;
303
331
  }
304
332
  //# sourceMappingURL=autopilot-state.js.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Resolve which (sub)command an invocation targets.
3
+ *
4
+ * The parser reports the matched command path (for example
5
+ * ['hooks', 'transfer', 'store', 'search']) and the remaining positional arguments.
6
+ * Resolution walks the whole path through each command's `subcommands`, so a command
7
+ * can sit at any depth. #4157: it used to stop two levels below the top-level command,
8
+ * so `hooks transfer store search` ran the `store` help instead of `search`.
9
+ */
10
+ import type { Command } from './types.js';
11
+ export declare function resolveTargetCommand(command: Command, commandPath: string[], positional: string[]): {
12
+ target: Command;
13
+ args: string[];
14
+ };
15
+ //# sourceMappingURL=command-resolution.d.ts.map
@@ -0,0 +1,25 @@
1
+ const matches = (sc, name) => sc.name === name || !!sc.aliases?.includes(name);
2
+ export function resolveTargetCommand(command, commandPath, positional) {
3
+ let target = command;
4
+ if (commandPath.length > 1 && command.subcommands) {
5
+ // The parser already removed the path from `positional`.
6
+ for (const name of commandPath.slice(1)) {
7
+ const next = target.subcommands?.find((sc) => matches(sc, name));
8
+ if (!next)
9
+ break;
10
+ target = next;
11
+ }
12
+ return { target, args: positional };
13
+ }
14
+ // Positional form: the path only named the top-level command.
15
+ let args = positional;
16
+ while (args.length > 0 && target.subcommands) {
17
+ const next = target.subcommands.find((sc) => matches(sc, args[0]));
18
+ if (!next)
19
+ break;
20
+ target = next;
21
+ args = args.slice(1);
22
+ }
23
+ return { target, args };
24
+ }
25
+ //# sourceMappingURL=command-resolution.js.map
@@ -736,15 +736,16 @@ const healthCommand = {
736
736
  output.writeln(output.bold('Agent Health'));
737
737
  output.writeln();
738
738
  // Overall summary with null checks
739
- const overall = result.overall ?? { healthy: 0, degraded: 0, unhealthy: 0, avgCpu: 0, avgMemory: 0 };
740
- const avgCpu = overall.avgCpu ?? 0;
741
- const avgMemory = overall.avgMemory ?? 0;
739
+ const overall = result.overall ?? { healthy: 0, degraded: 0, unhealthy: 0, unknown: 0 };
740
+ const avgCpu = overall.avgCpu ?? overall.cpu;
741
+ const avgMemory = overall.avgMemory ?? overall.memory;
742
742
  output.printBox([
743
743
  `Healthy: ${output.success(String(overall.healthy ?? 0))}`,
744
744
  `Degraded: ${output.warning(String(overall.degraded ?? 0))}`,
745
745
  `Unhealthy: ${output.error(String(overall.unhealthy ?? 0))}`,
746
- `Avg CPU: ${avgCpu.toFixed(1)}%`,
747
- `Avg Memory: ${(avgMemory * 100).toFixed(1)}%`
746
+ `Unknown: ${String(overall.unknown ?? 0)}`,
747
+ `Avg CPU: ${typeof avgCpu === 'number' ? `${avgCpu.toFixed(1)}%` : 'n/a'}`,
748
+ `Avg Memory: ${typeof avgMemory === 'number' ? `${(avgMemory * 100).toFixed(1)}%` : 'n/a'}`
748
749
  ].join(' | '), 'Overall Status');
749
750
  const healthAgents = result.agents ?? [];
750
751
  output.writeln();
@@ -753,14 +754,14 @@ const healthCommand = {
753
754
  { key: 'id', header: 'Agent ID', width: 18 },
754
755
  { key: 'type', header: 'Type', width: 12 },
755
756
  { key: 'health', header: 'Health', width: 10, format: formatHealthStatus },
756
- { key: 'cpu', header: 'CPU %', width: 8, align: 'right', format: (v) => `${Number(v ?? 0).toFixed(1)}%` },
757
+ { key: 'cpu', header: 'CPU %', width: 8, align: 'right', format: (v) => typeof v === 'number' ? `${v.toFixed(1)}%` : 'n/a' },
757
758
  { key: 'memory', header: 'Memory', width: 10, align: 'right', format: (v) => {
758
759
  const mem = v;
759
- if (!mem)
760
- return '0%';
760
+ if (!mem || !mem.limit)
761
+ return 'n/a';
761
762
  return `${(mem.used / mem.limit * 100).toFixed(0)}%`;
762
763
  } },
763
- { key: 'tasks', header: 'Tasks', width: 12, align: 'right', format: (v) => {
764
+ { key: 'tasks', header: 'Calls', width: 12, align: 'right', format: (v) => {
764
765
  const t = v;
765
766
  if (!t)
766
767
  return '0/0';
@@ -775,15 +776,14 @@ const healthCommand = {
775
776
  for (const agent of healthAgents) {
776
777
  output.writeln();
777
778
  output.writeln(output.highlight(agent.id));
778
- const uptime = agent.uptime ?? 0;
779
- const latency = agent.latency ?? { avg: 0, p99: 0 };
780
- const tasks = agent.tasks ?? { completed: 0, failed: 0, queued: 0 };
781
- const errors = agent.errors ?? { count: 0 };
779
+ const latency = agent.latency;
780
+ const tasks = agent.tasks;
781
+ const errors = agent.errors;
782
782
  output.printList([
783
- `Uptime: ${(uptime / 1000 / 60).toFixed(1)} min`,
784
- `Latency: avg ${(latency.avg ?? 0).toFixed(1)}ms, p99 ${(latency.p99 ?? 0).toFixed(1)}ms`,
785
- `Tasks: ${tasks.completed ?? 0} completed, ${tasks.failed ?? 0} failed, ${tasks.queued ?? 0} queued`,
786
- `Errors: ${errors.count ?? 0}${errors.lastError ? ` (${errors.lastError})` : ''}`
783
+ `Registry age: ${typeof agent.registryAgeMs === 'number' ? `${(agent.registryAgeMs / 1000 / 60).toFixed(1)} min` : 'n/a'}`,
784
+ `Latency: p50 ${typeof latency?.p50 === 'number' ? `${latency.p50.toFixed(1)}ms` : 'n/a'}, p95 ${typeof latency?.p95 === 'number' ? `${latency.p95.toFixed(1)}ms` : 'n/a'}`,
785
+ `Observed provider calls (last 20): ${tasks?.completed ?? 0} API-success, ${tasks?.failed ?? 0} error`,
786
+ `Errors: ${errors?.count ?? 0}${errors?.lastError ? ` (${errors.lastError})` : ''}`
787
787
  ]);
788
788
  }
789
789
  }
@@ -5,7 +5,8 @@
5
5
  * Created with ❤️ by ruv.io
6
6
  */
7
7
  import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync } from 'node:fs';
8
- import { resolve, dirname } from 'node:path';
8
+ import { resolve, dirname, join } from 'node:path';
9
+ import { homedir } from 'node:os';
9
10
  import { output } from '../output.js';
10
11
  const CLAIMS_CONFIG_PATHS = [
11
12
  '.claude-flow/claims.json',
@@ -15,7 +16,9 @@ function getClaimsConfigPaths() {
15
16
  return [
16
17
  resolve(CLAIMS_CONFIG_PATHS[0]),
17
18
  resolve(CLAIMS_CONFIG_PATHS[1]),
18
- resolve(process.env.HOME || '~', '.config/claude-flow/claims.json'),
19
+ // os.homedir(), not $HOME: HOME is normally unset on Windows, and the old
20
+ // `process.env.HOME || '~'` fallback resolved to a literal <cwd>/~ folder.
21
+ join(homedir(), '.config', 'claude-flow', 'claims.json'),
19
22
  ];
20
23
  }
21
24
  function loadClaimsConfig() {
@@ -152,18 +155,13 @@ const checkCommand = {
152
155
  const spinner = output.createSpinner({ text: 'Evaluating claim...', spinner: 'dots' });
153
156
  spinner.start();
154
157
  const fs = await import('fs');
155
- const path = await import('path');
156
158
  // Real claims evaluation from config file
157
159
  let isGranted = false;
158
160
  let reason = 'Claim not found in policy';
159
161
  let policySource = 'default';
160
162
  try {
161
163
  // Check for claims config file
162
- const claimsConfigPaths = [
163
- path.resolve('.claude-flow/claims.json'),
164
- path.resolve('claude-flow.claims.json'),
165
- path.resolve(process.env.HOME || '~', '.config/claude-flow/claims.json'),
166
- ];
164
+ const claimsConfigPaths = getClaimsConfigPaths();
167
165
  let claimsConfig = {
168
166
  // Default policy - allows basic operations
169
167
  roles: {