claude-flow 3.32.29 → 3.32.30

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 (374) hide show
  1. package/node_modules/@claude-flow/codex/.agents/skills/memory-management/SKILL.md +45 -0
  2. package/node_modules/@claude-flow/codex/.agents/skills/security-audit/SKILL.md +46 -0
  3. package/node_modules/@claude-flow/codex/.agents/skills/sparc-methodology/SKILL.md +46 -0
  4. package/node_modules/@claude-flow/codex/.agents/skills/swarm-orchestration/SKILL.md +53 -0
  5. package/node_modules/@claude-flow/codex/README.md +1044 -0
  6. package/node_modules/@claude-flow/codex/dist/cli.d.ts +9 -0
  7. package/node_modules/@claude-flow/codex/dist/cli.d.ts.map +1 -0
  8. package/node_modules/@claude-flow/codex/dist/cli.js +686 -0
  9. package/node_modules/@claude-flow/codex/dist/cli.js.map +1 -0
  10. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts +17 -0
  11. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts.map +1 -0
  12. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js +278 -0
  13. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js.map +1 -0
  14. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts +8 -0
  15. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts.map +1 -0
  16. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js +7 -0
  17. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js.map +1 -0
  18. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts +143 -0
  19. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts.map +1 -0
  20. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js +621 -0
  21. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js.map +1 -0
  22. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts +12 -0
  23. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts.map +1 -0
  24. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js +730 -0
  25. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js.map +1 -0
  26. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts +74 -0
  27. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts.map +1 -0
  28. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js +922 -0
  29. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js.map +1 -0
  30. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts +9 -0
  31. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts.map +1 -0
  32. package/node_modules/@claude-flow/codex/dist/generators/index.js +9 -0
  33. package/node_modules/@claude-flow/codex/dist/generators/index.js.map +1 -0
  34. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts +20 -0
  35. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts.map +1 -0
  36. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js +951 -0
  37. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js.map +1 -0
  38. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts +46 -0
  39. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts.map +1 -0
  40. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js +126 -0
  41. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js.map +1 -0
  42. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts +153 -0
  43. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts.map +1 -0
  44. package/node_modules/@claude-flow/codex/dist/harness/contract.js +44 -0
  45. package/node_modules/@claude-flow/codex/dist/harness/contract.js.map +1 -0
  46. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts +33 -0
  47. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts.map +1 -0
  48. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js +175 -0
  49. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js.map +1 -0
  50. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts +42 -0
  51. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts.map +1 -0
  52. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js +140 -0
  53. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js.map +1 -0
  54. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts +19 -0
  55. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts.map +1 -0
  56. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js +79 -0
  57. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js.map +1 -0
  58. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts +9 -0
  59. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts.map +1 -0
  60. package/node_modules/@claude-flow/codex/dist/harness/index.js +9 -0
  61. package/node_modules/@claude-flow/codex/dist/harness/index.js.map +1 -0
  62. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts +8 -0
  63. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts.map +1 -0
  64. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js +10 -0
  65. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js.map +1 -0
  66. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts +68 -0
  67. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts.map +1 -0
  68. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js +403 -0
  69. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js.map +1 -0
  70. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts +3 -0
  71. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts.map +1 -0
  72. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js +14 -0
  73. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js.map +1 -0
  74. package/node_modules/@claude-flow/codex/dist/index.d.ts +53 -0
  75. package/node_modules/@claude-flow/codex/dist/index.d.ts.map +1 -0
  76. package/node_modules/@claude-flow/codex/dist/index.js +54 -0
  77. package/node_modules/@claude-flow/codex/dist/index.js.map +1 -0
  78. package/node_modules/@claude-flow/codex/dist/initializer.d.ts +98 -0
  79. package/node_modules/@claude-flow/codex/dist/initializer.d.ts.map +1 -0
  80. package/node_modules/@claude-flow/codex/dist/initializer.js +795 -0
  81. package/node_modules/@claude-flow/codex/dist/initializer.js.map +1 -0
  82. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts +3 -0
  83. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts.map +1 -0
  84. package/node_modules/@claude-flow/codex/dist/loop/cli.js +123 -0
  85. package/node_modules/@claude-flow/codex/dist/loop/cli.js.map +1 -0
  86. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts +58 -0
  87. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts.map +1 -0
  88. package/node_modules/@claude-flow/codex/dist/loop/index.js +230 -0
  89. package/node_modules/@claude-flow/codex/dist/loop/index.js.map +1 -0
  90. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts +28 -0
  91. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts.map +1 -0
  92. package/node_modules/@claude-flow/codex/dist/mcp-config.js +121 -0
  93. package/node_modules/@claude-flow/codex/dist/mcp-config.js.map +1 -0
  94. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts +114 -0
  95. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts.map +1 -0
  96. package/node_modules/@claude-flow/codex/dist/migrations/index.js +880 -0
  97. package/node_modules/@claude-flow/codex/dist/migrations/index.js.map +1 -0
  98. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts +92 -0
  99. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts.map +1 -0
  100. package/node_modules/@claude-flow/codex/dist/templates/index.js +284 -0
  101. package/node_modules/@claude-flow/codex/dist/templates/index.js.map +1 -0
  102. package/node_modules/@claude-flow/codex/dist/types.d.ts +240 -0
  103. package/node_modules/@claude-flow/codex/dist/types.d.ts.map +1 -0
  104. package/node_modules/@claude-flow/codex/dist/types.js +8 -0
  105. package/node_modules/@claude-flow/codex/dist/types.js.map +1 -0
  106. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts +42 -0
  107. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts.map +1 -0
  108. package/node_modules/@claude-flow/codex/dist/validators/index.js +929 -0
  109. package/node_modules/@claude-flow/codex/dist/validators/index.js.map +1 -0
  110. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts +37 -0
  111. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts.map +1 -0
  112. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js +137 -0
  113. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js.map +1 -0
  114. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts +2 -0
  115. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts.map +1 -0
  116. package/node_modules/@claude-flow/codex/dist/worktrees/index.js +2 -0
  117. package/node_modules/@claude-flow/codex/dist/worktrees/index.js.map +1 -0
  118. package/node_modules/@claude-flow/codex/package.json +122 -0
  119. package/node_modules/@claude-flow/plugin-agent-federation/README.md +49 -0
  120. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts +130 -0
  121. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts.map +1 -0
  122. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js +239 -0
  123. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js.map +1 -0
  124. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts +34 -0
  125. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts.map +1 -0
  126. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js +69 -0
  127. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js.map +1 -0
  128. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts +46 -0
  129. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts.map +1 -0
  130. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js +84 -0
  131. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js.map +1 -0
  132. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts +27 -0
  133. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts.map +1 -0
  134. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js +46 -0
  135. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js.map +1 -0
  136. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts +192 -0
  137. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts.map +1 -0
  138. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js +253 -0
  139. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js.map +1 -0
  140. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts +211 -0
  141. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts.map +1 -0
  142. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js +501 -0
  143. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js.map +1 -0
  144. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts +114 -0
  145. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts.map +1 -0
  146. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js +356 -0
  147. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js.map +1 -0
  148. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts +41 -0
  149. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -0
  150. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +184 -0
  151. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -0
  152. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts +150 -0
  153. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts.map +1 -0
  154. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js +128 -0
  155. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js.map +1 -0
  156. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts +74 -0
  157. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts.map +1 -0
  158. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js +179 -0
  159. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js.map +1 -0
  160. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts +13 -0
  161. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts.map +1 -0
  162. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +189 -0
  163. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js.map +1 -0
  164. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts +7 -0
  165. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts.map +1 -0
  166. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js +317 -0
  167. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js.map +1 -0
  168. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts +45 -0
  169. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts.map +1 -0
  170. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js +71 -0
  171. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js.map +1 -0
  172. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts +104 -0
  173. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts.map +1 -0
  174. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js +152 -0
  175. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js.map +1 -0
  176. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts +55 -0
  177. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts.map +1 -0
  178. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js +105 -0
  179. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js.map +1 -0
  180. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts +17 -0
  181. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts.map +1 -0
  182. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js +35 -0
  183. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js.map +1 -0
  184. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts +69 -0
  185. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts.map +1 -0
  186. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js +149 -0
  187. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js.map +1 -0
  188. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts +68 -0
  189. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts.map +1 -0
  190. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js +161 -0
  191. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js.map +1 -0
  192. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts +58 -0
  193. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts.map +1 -0
  194. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js +122 -0
  195. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js.map +1 -0
  196. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts +65 -0
  197. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts.map +1 -0
  198. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js +208 -0
  199. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js.map +1 -0
  200. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts +51 -0
  201. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts.map +1 -0
  202. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js +147 -0
  203. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js.map +1 -0
  204. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts +71 -0
  205. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts.map +1 -0
  206. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js +194 -0
  207. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js.map +1 -0
  208. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts +156 -0
  209. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts.map +1 -0
  210. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js +292 -0
  211. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js.map +1 -0
  212. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts +98 -0
  213. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts.map +1 -0
  214. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js +122 -0
  215. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js.map +1 -0
  216. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts +89 -0
  217. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts.map +1 -0
  218. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js +165 -0
  219. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js.map +1 -0
  220. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts +92 -0
  221. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts.map +1 -0
  222. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js +100 -0
  223. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js.map +1 -0
  224. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts +70 -0
  225. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts.map +1 -0
  226. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js +104 -0
  227. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js.map +1 -0
  228. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +23 -0
  229. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts.map +1 -0
  230. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js +24 -0
  231. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js.map +1 -0
  232. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts +10 -0
  233. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts.map +1 -0
  234. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js +439 -0
  235. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js.map +1 -0
  236. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts +19 -0
  237. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts.map +1 -0
  238. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js +515 -0
  239. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js.map +1 -0
  240. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts +72 -0
  241. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts.map +1 -0
  242. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js +269 -0
  243. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js.map +1 -0
  244. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts +3 -0
  245. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts.map +1 -0
  246. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js +3 -0
  247. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js.map +1 -0
  248. package/node_modules/@claude-flow/plugin-agent-federation/package.json +64 -0
  249. package/node_modules/@claude-flow/security/README.md +292 -0
  250. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts +97 -0
  251. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts.map +1 -0
  252. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js +537 -0
  253. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js.map +1 -0
  254. package/node_modules/@claude-flow/security/dist/application/index.d.ts +7 -0
  255. package/node_modules/@claude-flow/security/dist/application/index.d.ts.map +1 -0
  256. package/node_modules/@claude-flow/security/dist/application/index.js +7 -0
  257. package/node_modules/@claude-flow/security/dist/application/index.js.map +1 -0
  258. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts +71 -0
  259. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts.map +1 -0
  260. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js +153 -0
  261. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js.map +1 -0
  262. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts +148 -0
  263. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts.map +1 -0
  264. package/node_modules/@claude-flow/security/dist/authorization/propagator.js +182 -0
  265. package/node_modules/@claude-flow/security/dist/authorization/propagator.js.map +1 -0
  266. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts +176 -0
  267. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts.map +1 -0
  268. package/node_modules/@claude-flow/security/dist/credential-generator.js +272 -0
  269. package/node_modules/@claude-flow/security/dist/credential-generator.js.map +1 -0
  270. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts +68 -0
  271. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts.map +1 -0
  272. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js +132 -0
  273. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js.map +1 -0
  274. package/node_modules/@claude-flow/security/dist/domain/index.d.ts +8 -0
  275. package/node_modules/@claude-flow/security/dist/domain/index.d.ts.map +1 -0
  276. package/node_modules/@claude-flow/security/dist/domain/index.js +8 -0
  277. package/node_modules/@claude-flow/security/dist/domain/index.js.map +1 -0
  278. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts +71 -0
  279. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts.map +1 -0
  280. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js +237 -0
  281. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js.map +1 -0
  282. package/node_modules/@claude-flow/security/dist/index.d.ts +129 -0
  283. package/node_modules/@claude-flow/security/dist/index.d.ts.map +1 -0
  284. package/node_modules/@claude-flow/security/dist/index.js +176 -0
  285. package/node_modules/@claude-flow/security/dist/index.js.map +1 -0
  286. package/node_modules/@claude-flow/security/dist/input-validator.d.ts +306 -0
  287. package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -0
  288. package/node_modules/@claude-flow/security/dist/input-validator.js +393 -0
  289. package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -0
  290. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts +48 -0
  291. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts.map +1 -0
  292. package/node_modules/@claude-flow/security/dist/keychain-adapter.js +0 -0
  293. package/node_modules/@claude-flow/security/dist/keychain-adapter.js.map +1 -0
  294. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts +133 -0
  295. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts.map +1 -0
  296. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js +254 -0
  297. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js.map +1 -0
  298. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts +31 -0
  299. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts.map +1 -0
  300. package/node_modules/@claude-flow/security/dist/oauth/browser.js +55 -0
  301. package/node_modules/@claude-flow/security/dist/oauth/browser.js.map +1 -0
  302. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts +37 -0
  303. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts.map +1 -0
  304. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js +86 -0
  305. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js.map +1 -0
  306. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts +57 -0
  307. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts.map +1 -0
  308. package/node_modules/@claude-flow/security/dist/oauth/client.js +120 -0
  309. package/node_modules/@claude-flow/security/dist/oauth/client.js.map +1 -0
  310. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts +25 -0
  311. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts.map +1 -0
  312. package/node_modules/@claude-flow/security/dist/oauth/pkce.js +36 -0
  313. package/node_modules/@claude-flow/security/dist/oauth/pkce.js.map +1 -0
  314. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts +128 -0
  315. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts.map +1 -0
  316. package/node_modules/@claude-flow/security/dist/password-hasher.js +190 -0
  317. package/node_modules/@claude-flow/security/dist/password-hasher.js.map +1 -0
  318. package/node_modules/@claude-flow/security/dist/path-validator.d.ts +148 -0
  319. package/node_modules/@claude-flow/security/dist/path-validator.d.ts.map +1 -0
  320. package/node_modules/@claude-flow/security/dist/path-validator.js +421 -0
  321. package/node_modules/@claude-flow/security/dist/path-validator.js.map +1 -0
  322. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts +125 -0
  323. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts.map +1 -0
  324. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js +186 -0
  325. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js.map +1 -0
  326. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts +5 -0
  327. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts.map +1 -0
  328. package/node_modules/@claude-flow/security/dist/policy/canonical.js +30 -0
  329. package/node_modules/@claude-flow/security/dist/policy/canonical.js.map +1 -0
  330. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts +34 -0
  331. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts.map +1 -0
  332. package/node_modules/@claude-flow/security/dist/policy/engine.js +285 -0
  333. package/node_modules/@claude-flow/security/dist/policy/engine.js.map +1 -0
  334. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts +9 -0
  335. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts.map +1 -0
  336. package/node_modules/@claude-flow/security/dist/policy/envelope.js +90 -0
  337. package/node_modules/@claude-flow/security/dist/policy/envelope.js.map +1 -0
  338. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts +4 -0
  339. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts.map +1 -0
  340. package/node_modules/@claude-flow/security/dist/policy/evaluator.js +119 -0
  341. package/node_modules/@claude-flow/security/dist/policy/evaluator.js.map +1 -0
  342. package/node_modules/@claude-flow/security/dist/policy/index.d.ts +7 -0
  343. package/node_modules/@claude-flow/security/dist/policy/index.d.ts.map +1 -0
  344. package/node_modules/@claude-flow/security/dist/policy/index.js +7 -0
  345. package/node_modules/@claude-flow/security/dist/policy/index.js.map +1 -0
  346. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts +238 -0
  347. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts.map +1 -0
  348. package/node_modules/@claude-flow/security/dist/policy/product-plane.js +1022 -0
  349. package/node_modules/@claude-flow/security/dist/policy/product-plane.js.map +1 -0
  350. package/node_modules/@claude-flow/security/dist/policy/types.d.ts +169 -0
  351. package/node_modules/@claude-flow/security/dist/policy/types.d.ts.map +1 -0
  352. package/node_modules/@claude-flow/security/dist/policy/types.js +2 -0
  353. package/node_modules/@claude-flow/security/dist/policy/types.js.map +1 -0
  354. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts +180 -0
  355. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts.map +1 -0
  356. package/node_modules/@claude-flow/security/dist/safe-executor.js +390 -0
  357. package/node_modules/@claude-flow/security/dist/safe-executor.js.map +1 -0
  358. package/node_modules/@claude-flow/security/dist/token-generator.d.ts +224 -0
  359. package/node_modules/@claude-flow/security/dist/token-generator.d.ts.map +1 -0
  360. package/node_modules/@claude-flow/security/dist/token-generator.js +351 -0
  361. package/node_modules/@claude-flow/security/dist/token-generator.js.map +1 -0
  362. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts +126 -0
  363. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts.map +1 -0
  364. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js +257 -0
  365. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js.map +1 -0
  366. package/node_modules/@claude-flow/security/package.json +44 -0
  367. package/package.json +30 -8
  368. package/v3/@claude-flow/cli/catalog-manifest.json +2 -2
  369. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.js +53 -2
  370. package/v3/@claude-flow/cli/dist/src/mcp-tools/capability-brain.js +22 -22
  371. package/v3/@claude-flow/cli/dist/src/mcp-tools/guidance-tools.js +1 -1
  372. package/v3/@claude-flow/cli/package.json +24 -8
  373. package/.claude/.proven-config-version +0 -1
  374. package/.claude/proven-config.json +0 -42
@@ -0,0 +1,257 @@
1
+ /**
2
+ * ToolOutputGuardrail — semantic screening of content returned by MCP tool
3
+ * calls, memory reads, and external API responses before that content enters
4
+ * agent reasoning. Closes the OWASP ASI01 (Agent Goal Hijacking) gap
5
+ * identified in ruvnet/ruflo#2149 / ADR-131.
6
+ *
7
+ * Threat model
8
+ * ------------
9
+ * Attackers embed malicious instructions in content the agent retrieves
10
+ * autonomously (web page, MCP tool response, memory entry). An LLM cannot
11
+ * reliably distinguish instructions from data once both are in the prompt.
12
+ * System-level per-boundary guardrails are the only category with
13
+ * sub-millisecond latency and no model dependency (arXiv:2601.17548,
14
+ * Jan 2026 systematic review).
15
+ *
16
+ * Scope
17
+ * -----
18
+ * - Detection only — does NOT modify the running prompt; callers decide
19
+ * what action to take (allow, flag, redact, reject) via `scanAndEnforce`.
20
+ * - Synchronous pattern match — designed for <1ms p99 on typical tool
21
+ * responses (≤32KB). Large content is capped at `maxScanBytes` and the
22
+ * truncation itself is reported as a low-severity finding.
23
+ * - Pure-function shape — no I/O, no async, no model calls. Safe to invoke
24
+ * in hot paths (every MCP tool result, every memory read).
25
+ *
26
+ * Non-goals
27
+ * ---------
28
+ * - Not a replacement for input validation at HTTP/CLI boundaries
29
+ * (InputValidator handles that). This is the *content* boundary.
30
+ * - Not a model-based classifier. False-positive rate is bounded by
31
+ * pattern specificity; tune via `customPatterns` and `policy`.
32
+ *
33
+ * Reference: ADR-131, OpenAI Agents SDK ToolGuardrail API (March 2025).
34
+ */
35
+ const DEFAULT_POLICY = {
36
+ low: 'allow',
37
+ medium: 'flag',
38
+ high: 'redact',
39
+ critical: 'reject',
40
+ };
41
+ const DEFAULT_MAX_SCAN_BYTES = 1024 * 1024;
42
+ /**
43
+ * Built-in pattern library. Ordered by severity (critical first) so the
44
+ * `highest` field reflects the worst category. Patterns are intentionally
45
+ * conservative — they target the explicit instruction-override / role-hijack
46
+ * shapes that show up in published indirect-injection corpora rather than
47
+ * general "suspicious looking" text.
48
+ */
49
+ const BUILTIN_PATTERNS = [
50
+ // ── critical: instruction override + embedded system frames ──
51
+ {
52
+ label: 'ignore-previous-instructions',
53
+ // Allow optional filler words between the verb and the temporal keyword
54
+ // ("ignore the above", "disregard your earlier", "forget all prior").
55
+ regex: /\b(?:ignore|disregard|forget)\s+(?:all\s+|any\s+|the\s+|my\s+|your\s+|these\s+|those\s+)?(?:previous|prior|above|earlier|preceding|aforementioned)\s+(?:instructions?|prompts?|rules?|directives?)\b/gi,
56
+ severity: 'critical',
57
+ category: 'instruction-override',
58
+ },
59
+ {
60
+ label: 'chatml-frame',
61
+ regex: /<\|(?:im_start|im_end|system|assistant|user|endoftext)\|>/gi,
62
+ severity: 'critical',
63
+ category: 'embedded-system',
64
+ },
65
+ {
66
+ label: 'llama-inst-frame',
67
+ regex: /\[\/?INST\]/g,
68
+ severity: 'critical',
69
+ category: 'embedded-system',
70
+ },
71
+ {
72
+ label: 'exfiltrate-secret',
73
+ regex: /\b(?:exfiltrate|leak|send|post|upload|transmit)\b[^.\n]{0,80}\b(?:secret|token|api[-_\s]?keys?|password|credential|env\s+vars?)\b/gi,
74
+ severity: 'critical',
75
+ category: 'exfiltration',
76
+ },
77
+ // ── high: role hijack + jailbreak + system tags + bidi unicode ──
78
+ {
79
+ label: 'system-tag-injection',
80
+ regex: /<\/?system>/gi,
81
+ severity: 'high',
82
+ category: 'embedded-system',
83
+ },
84
+ {
85
+ label: 'role-hijack-you-are-now',
86
+ regex: /\byou\s+are\s+(?:now|actually|secretly)\s+(?:a|an|the)\s+/gi,
87
+ severity: 'high',
88
+ category: 'role-hijack',
89
+ },
90
+ {
91
+ label: 'jailbreak-dan',
92
+ regex: /\b(?:DAN(?:\s+mode)?|developer\s+mode|jailbreak\s+mode|do\s+anything\s+now)\b/gi,
93
+ severity: 'high',
94
+ category: 'jailbreak',
95
+ },
96
+ {
97
+ label: 'new-instructions-directive',
98
+ regex: /\b(?:new|updated|revised|additional)\s+(?:instructions?|task|directives?|objectives?)\s*[:.]/gi,
99
+ severity: 'high',
100
+ category: 'instruction-override',
101
+ },
102
+ {
103
+ label: 'bidi-override',
104
+ regex: /[‪-‮⁦-⁩]/g,
105
+ severity: 'high',
106
+ category: 'hidden-unicode',
107
+ },
108
+ // ── medium: softer role manipulation + tool spoofing ──
109
+ {
110
+ label: 'role-hijack-act-as',
111
+ regex: /\b(?:act|behave|pretend|role[-\s]?play)\s+as\s+(?:if\s+)?(?:a|an|the)\s+/gi,
112
+ severity: 'medium',
113
+ category: 'role-hijack',
114
+ },
115
+ {
116
+ label: 'tool-call-spoof',
117
+ regex: /\b(?:tool_call|function_call|mcp_tool)\s*[:=]\s*["'{]/gi,
118
+ severity: 'medium',
119
+ category: 'tool-spoofing',
120
+ },
121
+ // ── low: zero-width whitespace (common in copy-paste attacks) ──
122
+ {
123
+ label: 'zero-width-char',
124
+ regex: /[​-‍]/g,
125
+ severity: 'low',
126
+ category: 'hidden-unicode',
127
+ },
128
+ ];
129
+ const SEVERITY_ORDER = {
130
+ none: 0,
131
+ low: 1,
132
+ medium: 2,
133
+ high: 3,
134
+ critical: 4,
135
+ };
136
+ function snippet(text, idx, len) {
137
+ const start = Math.max(0, idx - 24);
138
+ const end = Math.min(text.length, idx + len + 24);
139
+ const head = start > 0 ? '…' : '';
140
+ const tail = end < text.length ? '…' : '';
141
+ return head + text.slice(start, end).replace(/\s+/g, ' ') + tail;
142
+ }
143
+ function maxSeverity(a, b) {
144
+ return SEVERITY_ORDER[a] >= SEVERITY_ORDER[b]
145
+ ? (a === 'none' ? b : a)
146
+ : b;
147
+ }
148
+ export class ToolOutputGuardrail {
149
+ patterns;
150
+ policy;
151
+ maxScanBytes;
152
+ constructor(config = {}) {
153
+ this.patterns = [...BUILTIN_PATTERNS, ...(config.customPatterns ?? [])];
154
+ this.policy = { ...DEFAULT_POLICY, ...(config.policy ?? {}) };
155
+ this.maxScanBytes = config.maxScanBytes ?? DEFAULT_MAX_SCAN_BYTES;
156
+ }
157
+ /**
158
+ * Pure scan — no side effects, no content modification. Useful when the
159
+ * caller wants to log findings but cannot drop the content (e.g. read-only
160
+ * audit mode).
161
+ */
162
+ scan(content) {
163
+ if (typeof content !== 'string') {
164
+ return { safe: true, findings: [], highest: 'none' };
165
+ }
166
+ let scanned = content;
167
+ const findings = [];
168
+ if (this.maxScanBytes > 0 && content.length > this.maxScanBytes) {
169
+ scanned = content.slice(0, this.maxScanBytes);
170
+ findings.push({
171
+ pattern: 'content-truncated',
172
+ severity: 'medium',
173
+ category: 'truncation',
174
+ position: this.maxScanBytes,
175
+ context: `(content truncated at ${this.maxScanBytes} bytes; ${content.length - this.maxScanBytes} bytes unscanned)`,
176
+ });
177
+ }
178
+ for (const { label, regex, severity, category } of this.patterns) {
179
+ // Clone the RegExp so that the global-flag lastIndex state doesn't
180
+ // leak between calls. Built-in patterns are immutable; user-supplied
181
+ // patterns are also defensively cloned.
182
+ const re = new RegExp(regex.source, regex.flags.includes('g') ? regex.flags : regex.flags + 'g');
183
+ let match;
184
+ while ((match = re.exec(scanned)) !== null) {
185
+ findings.push({
186
+ pattern: label,
187
+ severity,
188
+ category,
189
+ position: match.index,
190
+ context: snippet(scanned, match.index, match[0].length),
191
+ });
192
+ // Defensive: zero-length match would loop forever
193
+ if (match[0].length === 0)
194
+ re.lastIndex++;
195
+ }
196
+ }
197
+ let highest = 'none';
198
+ for (const f of findings)
199
+ highest = maxSeverity(highest, f.severity);
200
+ const action = highest === 'none' ? 'allow' : this.policy[highest];
201
+ const safe = action === 'allow' || action === 'flag';
202
+ return { safe, findings, highest };
203
+ }
204
+ /**
205
+ * Scan + enforce policy. Returns the content to pass forward (possibly
206
+ * redacted or empty) plus the scan result and the action that was taken.
207
+ * Callers should treat `reject` as "drop the tool result and signal an
208
+ * error" — do NOT silently substitute empty content.
209
+ */
210
+ scanAndEnforce(content) {
211
+ const result = this.scan(content);
212
+ const action = result.highest === 'none' ? 'allow' : this.policy[result.highest];
213
+ let outgoing = content;
214
+ if (action === 'redact') {
215
+ outgoing = this.redact(content, result.findings);
216
+ }
217
+ else if (action === 'reject') {
218
+ outgoing = '';
219
+ }
220
+ return { content: outgoing, result, action };
221
+ }
222
+ /**
223
+ * Replace each non-truncation finding's matched substring with
224
+ * `[REDACTED:<pattern>]`. Truncation findings have no substring to redact
225
+ * (their `position` is a length, not an offset into the content) and are
226
+ * skipped. Idempotent for already-redacted strings.
227
+ */
228
+ redact(content, findings) {
229
+ if (findings.length === 0)
230
+ return content;
231
+ // Build a single combined regex per pattern label to avoid replacing
232
+ // overlapping matches multiple times.
233
+ const labels = new Set(findings
234
+ .filter((f) => f.category !== 'truncation')
235
+ .map((f) => f.pattern));
236
+ let out = content;
237
+ for (const { label, regex } of this.patterns) {
238
+ if (!labels.has(label))
239
+ continue;
240
+ const re = new RegExp(regex.source, regex.flags.includes('g') ? regex.flags : regex.flags + 'g');
241
+ out = out.replace(re, `[REDACTED:${label}]`);
242
+ }
243
+ return out;
244
+ }
245
+ }
246
+ /** Convenience factory that returns a guardrail with the default policy. */
247
+ export function createToolOutputGuardrail(config) {
248
+ return new ToolOutputGuardrail(config);
249
+ }
250
+ /**
251
+ * One-shot helper for callers that just want a yes/no answer without
252
+ * constructing a guardrail. Uses the default policy.
253
+ */
254
+ export function isToolOutputSafe(content) {
255
+ return createToolOutputGuardrail().scan(content).safe;
256
+ }
257
+ //# sourceMappingURL=tool-output-guardrail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-output-guardrail.js","sourceRoot":"","sources":["../src/tool-output-guardrail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAwEH,MAAM,cAAc,GAAqD;IACvE,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,gBAAgB,GAKjB;IACH,gEAAgE;IAChE;QACE,KAAK,EAAE,8BAA8B;QACrC,wEAAwE;QACxE,sEAAsE;QACtE,KAAK,EAAE,wMAAwM;QAC/M,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,sBAAsB;KACjC;IACD;QACE,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,6DAA6D;QACpE,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,iBAAiB;KAC5B;IACD;QACE,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,iBAAiB;KAC5B;IACD;QACE,KAAK,EAA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AC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,yBAAyB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC"}
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@claude-flow/security",
3
+ "version": "3.0.0-alpha.14",
4
+ "type": "module",
5
+ "description": "Security module - CVE fixes, input validation, path security",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "exports": {
13
+ ".": "./dist/index.js",
14
+ "./*": "./dist/*.js"
15
+ },
16
+ "scripts": {
17
+ "test": "vitest run",
18
+ "benchmark:policy": "npm run build && node scripts/benchmark-policy-engine.mjs",
19
+ "benchmark:product-plane": "npm run build && node scripts/benchmark-product-plane.mjs",
20
+ "test:oauth-surface": "vitest run __tests__/oauth-export-surface.test.ts __tests__/oauth-pkce.test.ts __tests__/oauth-browser.test.ts",
21
+ "build": "tsc && node scripts/verify-oauth-exports.mjs",
22
+ "prepublishOnly": "npm run build && npm run test:oauth-surface"
23
+ },
24
+ "devDependencies": {
25
+ "vitest": "^4.1.0"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "tag": "v3alpha"
30
+ },
31
+ "rufloBundledRuntime": {
32
+ "format": 1,
33
+ "sourceDependencies": {
34
+ "dependencies": {
35
+ "@noble/ed25519": "^2.1.0",
36
+ "bcryptjs": "^3.0.3",
37
+ "zod": "^3.22.0"
38
+ },
39
+ "optionalDependencies": {
40
+ "@napi-rs/keyring": "1.3.0"
41
+ }
42
+ }
43
+ }
44
+ }
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.32.29",
3
+ "version": "3.32.30",
4
+ "workspaces": [
5
+ "v3/@claude-flow/codex",
6
+ "v3/@claude-flow/plugin-agent-federation",
7
+ "v3/@claude-flow/security"
8
+ ],
4
9
  "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
10
  "main": "dist/index.js",
6
11
  "type": "module",
@@ -61,16 +66,28 @@
61
66
  },
62
67
  "dependencies": {
63
68
  "@claude-flow/cli-core": "3.7.0-alpha.5",
69
+ "@claude-flow/codex": "3.0.3",
64
70
  "@claude-flow/mcp": "3.0.0-alpha.9",
65
71
  "@claude-flow/neural": "3.0.0-alpha.9",
72
+ "@claude-flow/plugin-agent-federation": "1.0.0-alpha.18",
73
+ "@claude-flow/security": "3.0.0-alpha.14",
66
74
  "@claude-flow/shared": "3.0.0-alpha.8",
75
+ "@iarna/toml": "^2.2.5",
67
76
  "@noble/ed25519": "2.3.0",
68
77
  "@ruvector/rabitq-wasm": "0.1.0",
78
+ "bcryptjs": "^3.0.3",
79
+ "chalk": "^5.3.0",
80
+ "commander": "^12.0.0",
81
+ "fs-extra": "^11.2.0",
82
+ "inquirer": "^9.2.0",
69
83
  "semver": "7.7.3",
84
+ "toml": "^3.0.0",
85
+ "ws": ">=8.21.0",
86
+ "yaml": "^2.8.0",
70
87
  "zod": "3.25.76"
71
88
  },
72
89
  "optionalDependencies": {
73
- "@claude-flow/codex": "^3.0.1",
90
+ "@napi-rs/keyring": "1.3.0",
74
91
  "@claude-flow/plugin-gastown-bridge": "^0.1.3",
75
92
  "@ruvector/attention": "^0.1.3",
76
93
  "@ruvector/core": "^0.1.30",
@@ -142,7 +159,7 @@
142
159
  },
143
160
  "repository": {
144
161
  "type": "git",
145
- "url": "https://github.com/ruvnet/claude-flow.git"
162
+ "url": "git+https://github.com/ruvnet/claude-flow.git"
146
163
  },
147
164
  "keywords": [
148
165
  "ruvflow",
@@ -179,14 +196,19 @@
179
196
  "consensus",
180
197
  "self-learning"
181
198
  ],
182
- "author": {
183
- "name": "RuvNet",
184
- "email": "ruv@ruv.io",
185
- "url": "https://ruv.io"
186
- },
199
+ "author": "RuvNet <ruv@ruv.io> (https://ruv.io)",
187
200
  "license": "MIT",
188
201
  "publishConfig": {
189
202
  "access": "public",
190
203
  "tag": "latest"
204
+ },
205
+ "bundleDependencies": [
206
+ "@claude-flow/codex",
207
+ "@claude-flow/plugin-agent-federation",
208
+ "@claude-flow/security"
209
+ ],
210
+ "directories": {
211
+ "doc": "docs",
212
+ "test": "tests"
191
213
  }
192
214
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 3,
4
- "generatedAt": "2026-07-29T04:47:25.187Z",
5
- "gitSha": "39bc5fd9",
4
+ "generatedAt": "2026-07-29T05:35:40.000Z",
5
+ "gitSha": "1385e21b",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 395,
@@ -19,6 +19,49 @@ function behavioralRules() {
19
19
  - Keep files under 500 lines
20
20
  - Validate input at system boundaries`;
21
21
  }
22
+ function policyGovernedWorkflow() {
23
+ return `## Ruflo Capability Brain & Implementation Loop
24
+
25
+ Ruflo is the coordination ledger and policy decision point. Claude Code is the
26
+ executor: after a Ruflo coordination call, continue implementing the task.
27
+
28
+ When it is registered, call
29
+ \`guidance_brain({ mode: "recommend", task: "..." })\` before complex Ruflo
30
+ work. Use its live registry instead of guessing tool names. Treat
31
+ \`registered\`, \`configured\`, \`reachable\`, \`healthy\`, and \`authorized\`
32
+ as separate facts. If the brain is unavailable, continue with the compatible
33
+ \`guidance_recommend\` tool, CLI discovery, and repository instructions.
34
+
35
+ Follow the returned loop:
36
+
37
+ 1. Recall memory and ADR constraints.
38
+ 2. Inspect source, runtime, dependencies, policy, and health.
39
+ 3. Route to the smallest capable topology, agents, skills, and tools.
40
+ 4. Plan acceptance criteria, safety envelope, ownership, and validation.
41
+ 5. Execute in isolated scopes; the coding agent performs the work.
42
+ 6. Test focused, regression, and failure paths.
43
+ 7. Validate types, security, policy, compatibility, and artifacts.
44
+ 8. Benchmark a source-bound candidate against a source-bound baseline.
45
+ 9. Optimize measured bottlenecks without weakening safety.
46
+ 10. Bind claims and evidence to exact source/build receipts.
47
+ 11. Reconcile concurrent handoffs and disclose limitations.
48
+ 12. Publish only through a separately authorized release gate.
49
+
50
+ ### Concurrency and authority
51
+
52
+ - Never allow two writers in one worktree; give each writing agent an isolated
53
+ worktree and explicit file ownership.
54
+ - Read-only research may run concurrently and report findings to the owner.
55
+ - Only the integration owner edits shared manifests and lockfiles or reconciles
56
+ overlapping changes.
57
+ - A child may drop capabilities but cannot add tools, network, secrets, spend,
58
+ concurrency, namespaces, or delegation depth.
59
+ - A lease or claim coordinates ownership; it does not authorize a side effect.
60
+ - Darwin, Flywheel, MetaHarness, memory, and neural systems may propose or
61
+ evaluate candidates but cannot self-promote or expand their SafetyEnvelope.
62
+ - Bind tests, benchmarks, policy decisions, and release evidence to an exact
63
+ commit or immutable dirty-worktree snapshot.`;
64
+ }
22
65
  function agentComms() {
23
66
  return `## Agent Comms (SendMessage-First Coordination)
24
67
 
@@ -61,8 +104,10 @@ SendMessage({ to: "researcher", summary: "Start", message: "[task context]" })
61
104
  - ALWAYS name agents — \`name: "role"\` makes them addressable
62
105
  - ALWAYS include comms instructions in prompts — who to message, what to send
63
106
  - Spawn ALL agents in ONE message with \`run_in_background: true\`
64
- - After spawning: STOP, tell user what's running, wait for results
65
- - NEVER poll status — agents message back or complete automatically`;
107
+ - After spawning, continue independent local work; wait only when a dependency
108
+ genuinely blocks progress
109
+ - Do not poll repeatedly — agents message back or complete automatically
110
+ - Give every writing agent an isolated worktree and a non-overlapping file scope`;
66
111
  }
67
112
  function swarmConfig(options) {
68
113
  return `## Swarm & Routing
@@ -283,6 +328,7 @@ CLAUDE_FLOW_MEMORY_PATH=./data/memory
283
328
  const TEMPLATE_SECTIONS = {
284
329
  minimal: [
285
330
  behavioralRules,
331
+ (_opts) => policyGovernedWorkflow(),
286
332
  (_opts) => agentComms(),
287
333
  swarmConfig,
288
334
  (_opts) => buildAndTest(),
@@ -291,6 +337,7 @@ const TEMPLATE_SECTIONS = {
291
337
  ],
292
338
  standard: [
293
339
  behavioralRules,
340
+ (_opts) => policyGovernedWorkflow(),
294
341
  (_opts) => agentComms(),
295
342
  swarmConfig,
296
343
  (_opts) => memoryAndLearning(),
@@ -301,6 +348,7 @@ const TEMPLATE_SECTIONS = {
301
348
  ],
302
349
  full: [
303
350
  behavioralRules,
351
+ (_opts) => policyGovernedWorkflow(),
304
352
  (_opts) => agentComms(),
305
353
  swarmConfig,
306
354
  (_opts) => memoryAndLearning(),
@@ -315,6 +363,7 @@ const TEMPLATE_SECTIONS = {
315
363
  ],
316
364
  security: [
317
365
  behavioralRules,
366
+ (_opts) => policyGovernedWorkflow(),
318
367
  (_opts) => agentComms(),
319
368
  swarmConfig,
320
369
  (_opts) => securitySection(),
@@ -326,6 +375,7 @@ const TEMPLATE_SECTIONS = {
326
375
  ],
327
376
  performance: [
328
377
  behavioralRules,
378
+ (_opts) => policyGovernedWorkflow(),
329
379
  (_opts) => agentComms(),
330
380
  swarmConfig,
331
381
  (_opts) => performanceSection(),
@@ -338,6 +388,7 @@ const TEMPLATE_SECTIONS = {
338
388
  ],
339
389
  solo: [
340
390
  behavioralRules,
391
+ (_opts) => policyGovernedWorkflow(),
341
392
  (_opts) => agentComms(),
342
393
  (_opts) => memoryAndLearning(),
343
394
  (_opts) => buildAndTest(),