@claude-flow/cli 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 (372) hide show
  1. package/.claude/helpers/helpers.manifest.json +2 -2
  2. package/catalog-manifest.json +2 -2
  3. package/dist/src/init/claudemd-generator.js +53 -2
  4. package/dist/src/mcp-tools/capability-brain.js +22 -22
  5. package/dist/src/mcp-tools/guidance-tools.js +1 -1
  6. package/node_modules/@claude-flow/codex/.agents/skills/memory-management/SKILL.md +45 -0
  7. package/node_modules/@claude-flow/codex/.agents/skills/security-audit/SKILL.md +46 -0
  8. package/node_modules/@claude-flow/codex/.agents/skills/sparc-methodology/SKILL.md +46 -0
  9. package/node_modules/@claude-flow/codex/.agents/skills/swarm-orchestration/SKILL.md +53 -0
  10. package/node_modules/@claude-flow/codex/README.md +1044 -0
  11. package/node_modules/@claude-flow/codex/dist/cli.d.ts +9 -0
  12. package/node_modules/@claude-flow/codex/dist/cli.d.ts.map +1 -0
  13. package/node_modules/@claude-flow/codex/dist/cli.js +686 -0
  14. package/node_modules/@claude-flow/codex/dist/cli.js.map +1 -0
  15. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts +17 -0
  16. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts.map +1 -0
  17. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js +278 -0
  18. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js.map +1 -0
  19. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts +8 -0
  20. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts.map +1 -0
  21. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js +7 -0
  22. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js.map +1 -0
  23. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts +143 -0
  24. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts.map +1 -0
  25. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js +621 -0
  26. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js.map +1 -0
  27. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts +12 -0
  28. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts.map +1 -0
  29. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js +730 -0
  30. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js.map +1 -0
  31. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts +74 -0
  32. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts.map +1 -0
  33. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js +922 -0
  34. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js.map +1 -0
  35. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts +9 -0
  36. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts.map +1 -0
  37. package/node_modules/@claude-flow/codex/dist/generators/index.js +9 -0
  38. package/node_modules/@claude-flow/codex/dist/generators/index.js.map +1 -0
  39. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts +20 -0
  40. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts.map +1 -0
  41. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js +951 -0
  42. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js.map +1 -0
  43. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts +46 -0
  44. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts.map +1 -0
  45. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js +126 -0
  46. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js.map +1 -0
  47. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts +153 -0
  48. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts.map +1 -0
  49. package/node_modules/@claude-flow/codex/dist/harness/contract.js +44 -0
  50. package/node_modules/@claude-flow/codex/dist/harness/contract.js.map +1 -0
  51. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts +33 -0
  52. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts.map +1 -0
  53. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js +175 -0
  54. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js.map +1 -0
  55. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts +42 -0
  56. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts.map +1 -0
  57. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js +140 -0
  58. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js.map +1 -0
  59. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts +19 -0
  60. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts.map +1 -0
  61. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js +79 -0
  62. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js.map +1 -0
  63. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts +9 -0
  64. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts.map +1 -0
  65. package/node_modules/@claude-flow/codex/dist/harness/index.js +9 -0
  66. package/node_modules/@claude-flow/codex/dist/harness/index.js.map +1 -0
  67. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts +8 -0
  68. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts.map +1 -0
  69. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js +10 -0
  70. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js.map +1 -0
  71. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts +68 -0
  72. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts.map +1 -0
  73. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js +403 -0
  74. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js.map +1 -0
  75. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts +3 -0
  76. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts.map +1 -0
  77. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js +14 -0
  78. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js.map +1 -0
  79. package/node_modules/@claude-flow/codex/dist/index.d.ts +53 -0
  80. package/node_modules/@claude-flow/codex/dist/index.d.ts.map +1 -0
  81. package/node_modules/@claude-flow/codex/dist/index.js +54 -0
  82. package/node_modules/@claude-flow/codex/dist/index.js.map +1 -0
  83. package/node_modules/@claude-flow/codex/dist/initializer.d.ts +98 -0
  84. package/node_modules/@claude-flow/codex/dist/initializer.d.ts.map +1 -0
  85. package/node_modules/@claude-flow/codex/dist/initializer.js +795 -0
  86. package/node_modules/@claude-flow/codex/dist/initializer.js.map +1 -0
  87. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts +3 -0
  88. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts.map +1 -0
  89. package/node_modules/@claude-flow/codex/dist/loop/cli.js +123 -0
  90. package/node_modules/@claude-flow/codex/dist/loop/cli.js.map +1 -0
  91. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts +58 -0
  92. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts.map +1 -0
  93. package/node_modules/@claude-flow/codex/dist/loop/index.js +230 -0
  94. package/node_modules/@claude-flow/codex/dist/loop/index.js.map +1 -0
  95. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts +28 -0
  96. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts.map +1 -0
  97. package/node_modules/@claude-flow/codex/dist/mcp-config.js +121 -0
  98. package/node_modules/@claude-flow/codex/dist/mcp-config.js.map +1 -0
  99. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts +114 -0
  100. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts.map +1 -0
  101. package/node_modules/@claude-flow/codex/dist/migrations/index.js +880 -0
  102. package/node_modules/@claude-flow/codex/dist/migrations/index.js.map +1 -0
  103. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts +92 -0
  104. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts.map +1 -0
  105. package/node_modules/@claude-flow/codex/dist/templates/index.js +284 -0
  106. package/node_modules/@claude-flow/codex/dist/templates/index.js.map +1 -0
  107. package/node_modules/@claude-flow/codex/dist/types.d.ts +240 -0
  108. package/node_modules/@claude-flow/codex/dist/types.d.ts.map +1 -0
  109. package/node_modules/@claude-flow/codex/dist/types.js +8 -0
  110. package/node_modules/@claude-flow/codex/dist/types.js.map +1 -0
  111. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts +42 -0
  112. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts.map +1 -0
  113. package/node_modules/@claude-flow/codex/dist/validators/index.js +929 -0
  114. package/node_modules/@claude-flow/codex/dist/validators/index.js.map +1 -0
  115. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts +37 -0
  116. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts.map +1 -0
  117. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js +137 -0
  118. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js.map +1 -0
  119. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts +2 -0
  120. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts.map +1 -0
  121. package/node_modules/@claude-flow/codex/dist/worktrees/index.js +2 -0
  122. package/node_modules/@claude-flow/codex/dist/worktrees/index.js.map +1 -0
  123. package/node_modules/@claude-flow/codex/package.json +122 -0
  124. package/node_modules/@claude-flow/plugin-agent-federation/README.md +49 -0
  125. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts +130 -0
  126. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts.map +1 -0
  127. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js +239 -0
  128. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js.map +1 -0
  129. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts +34 -0
  130. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts.map +1 -0
  131. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js +69 -0
  132. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js.map +1 -0
  133. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts +46 -0
  134. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts.map +1 -0
  135. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js +84 -0
  136. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js.map +1 -0
  137. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts +27 -0
  138. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts.map +1 -0
  139. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js +46 -0
  140. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js.map +1 -0
  141. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts +192 -0
  142. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts.map +1 -0
  143. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js +253 -0
  144. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js.map +1 -0
  145. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts +211 -0
  146. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts.map +1 -0
  147. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js +501 -0
  148. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js.map +1 -0
  149. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts +114 -0
  150. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts.map +1 -0
  151. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js +356 -0
  152. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js.map +1 -0
  153. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts +41 -0
  154. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -0
  155. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +184 -0
  156. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -0
  157. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts +150 -0
  158. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts.map +1 -0
  159. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js +128 -0
  160. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js.map +1 -0
  161. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts +74 -0
  162. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts.map +1 -0
  163. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js +179 -0
  164. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js.map +1 -0
  165. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts +13 -0
  166. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts.map +1 -0
  167. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +189 -0
  168. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js.map +1 -0
  169. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts +7 -0
  170. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts.map +1 -0
  171. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js +317 -0
  172. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js.map +1 -0
  173. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts +45 -0
  174. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts.map +1 -0
  175. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js +71 -0
  176. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js.map +1 -0
  177. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts +104 -0
  178. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts.map +1 -0
  179. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js +152 -0
  180. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js.map +1 -0
  181. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts +55 -0
  182. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts.map +1 -0
  183. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js +105 -0
  184. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js.map +1 -0
  185. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts +17 -0
  186. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts.map +1 -0
  187. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js +35 -0
  188. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js.map +1 -0
  189. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts +69 -0
  190. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts.map +1 -0
  191. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js +149 -0
  192. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js.map +1 -0
  193. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts +68 -0
  194. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts.map +1 -0
  195. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js +161 -0
  196. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js.map +1 -0
  197. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts +58 -0
  198. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts.map +1 -0
  199. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js +122 -0
  200. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js.map +1 -0
  201. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts +65 -0
  202. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts.map +1 -0
  203. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js +208 -0
  204. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js.map +1 -0
  205. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts +51 -0
  206. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts.map +1 -0
  207. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js +147 -0
  208. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js.map +1 -0
  209. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts +71 -0
  210. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts.map +1 -0
  211. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js +194 -0
  212. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js.map +1 -0
  213. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts +156 -0
  214. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts.map +1 -0
  215. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js +292 -0
  216. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js.map +1 -0
  217. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts +98 -0
  218. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts.map +1 -0
  219. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js +122 -0
  220. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js.map +1 -0
  221. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts +89 -0
  222. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts.map +1 -0
  223. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js +165 -0
  224. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js.map +1 -0
  225. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts +92 -0
  226. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts.map +1 -0
  227. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js +100 -0
  228. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js.map +1 -0
  229. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts +70 -0
  230. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts.map +1 -0
  231. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js +104 -0
  232. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js.map +1 -0
  233. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +23 -0
  234. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts.map +1 -0
  235. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js +24 -0
  236. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js.map +1 -0
  237. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts +10 -0
  238. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts.map +1 -0
  239. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js +439 -0
  240. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js.map +1 -0
  241. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts +19 -0
  242. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts.map +1 -0
  243. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js +515 -0
  244. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js.map +1 -0
  245. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts +72 -0
  246. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts.map +1 -0
  247. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js +269 -0
  248. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js.map +1 -0
  249. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts +3 -0
  250. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts.map +1 -0
  251. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js +3 -0
  252. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js.map +1 -0
  253. package/node_modules/@claude-flow/plugin-agent-federation/package.json +64 -0
  254. package/node_modules/@claude-flow/security/README.md +292 -0
  255. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts +97 -0
  256. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts.map +1 -0
  257. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js +537 -0
  258. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js.map +1 -0
  259. package/node_modules/@claude-flow/security/dist/application/index.d.ts +7 -0
  260. package/node_modules/@claude-flow/security/dist/application/index.d.ts.map +1 -0
  261. package/node_modules/@claude-flow/security/dist/application/index.js +7 -0
  262. package/node_modules/@claude-flow/security/dist/application/index.js.map +1 -0
  263. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts +71 -0
  264. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts.map +1 -0
  265. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js +153 -0
  266. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js.map +1 -0
  267. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts +148 -0
  268. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts.map +1 -0
  269. package/node_modules/@claude-flow/security/dist/authorization/propagator.js +182 -0
  270. package/node_modules/@claude-flow/security/dist/authorization/propagator.js.map +1 -0
  271. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts +176 -0
  272. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts.map +1 -0
  273. package/node_modules/@claude-flow/security/dist/credential-generator.js +272 -0
  274. package/node_modules/@claude-flow/security/dist/credential-generator.js.map +1 -0
  275. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts +68 -0
  276. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts.map +1 -0
  277. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js +132 -0
  278. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js.map +1 -0
  279. package/node_modules/@claude-flow/security/dist/domain/index.d.ts +8 -0
  280. package/node_modules/@claude-flow/security/dist/domain/index.d.ts.map +1 -0
  281. package/node_modules/@claude-flow/security/dist/domain/index.js +8 -0
  282. package/node_modules/@claude-flow/security/dist/domain/index.js.map +1 -0
  283. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts +71 -0
  284. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts.map +1 -0
  285. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js +237 -0
  286. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js.map +1 -0
  287. package/node_modules/@claude-flow/security/dist/index.d.ts +129 -0
  288. package/node_modules/@claude-flow/security/dist/index.d.ts.map +1 -0
  289. package/node_modules/@claude-flow/security/dist/index.js +176 -0
  290. package/node_modules/@claude-flow/security/dist/index.js.map +1 -0
  291. package/node_modules/@claude-flow/security/dist/input-validator.d.ts +306 -0
  292. package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -0
  293. package/node_modules/@claude-flow/security/dist/input-validator.js +393 -0
  294. package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -0
  295. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts +48 -0
  296. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts.map +1 -0
  297. package/node_modules/@claude-flow/security/dist/keychain-adapter.js +0 -0
  298. package/node_modules/@claude-flow/security/dist/keychain-adapter.js.map +1 -0
  299. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts +133 -0
  300. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts.map +1 -0
  301. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js +254 -0
  302. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js.map +1 -0
  303. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts +31 -0
  304. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts.map +1 -0
  305. package/node_modules/@claude-flow/security/dist/oauth/browser.js +55 -0
  306. package/node_modules/@claude-flow/security/dist/oauth/browser.js.map +1 -0
  307. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts +37 -0
  308. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts.map +1 -0
  309. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js +86 -0
  310. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js.map +1 -0
  311. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts +57 -0
  312. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts.map +1 -0
  313. package/node_modules/@claude-flow/security/dist/oauth/client.js +120 -0
  314. package/node_modules/@claude-flow/security/dist/oauth/client.js.map +1 -0
  315. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts +25 -0
  316. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts.map +1 -0
  317. package/node_modules/@claude-flow/security/dist/oauth/pkce.js +36 -0
  318. package/node_modules/@claude-flow/security/dist/oauth/pkce.js.map +1 -0
  319. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts +128 -0
  320. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts.map +1 -0
  321. package/node_modules/@claude-flow/security/dist/password-hasher.js +190 -0
  322. package/node_modules/@claude-flow/security/dist/password-hasher.js.map +1 -0
  323. package/node_modules/@claude-flow/security/dist/path-validator.d.ts +148 -0
  324. package/node_modules/@claude-flow/security/dist/path-validator.d.ts.map +1 -0
  325. package/node_modules/@claude-flow/security/dist/path-validator.js +421 -0
  326. package/node_modules/@claude-flow/security/dist/path-validator.js.map +1 -0
  327. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts +125 -0
  328. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts.map +1 -0
  329. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js +186 -0
  330. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js.map +1 -0
  331. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts +5 -0
  332. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts.map +1 -0
  333. package/node_modules/@claude-flow/security/dist/policy/canonical.js +30 -0
  334. package/node_modules/@claude-flow/security/dist/policy/canonical.js.map +1 -0
  335. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts +34 -0
  336. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts.map +1 -0
  337. package/node_modules/@claude-flow/security/dist/policy/engine.js +285 -0
  338. package/node_modules/@claude-flow/security/dist/policy/engine.js.map +1 -0
  339. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts +9 -0
  340. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts.map +1 -0
  341. package/node_modules/@claude-flow/security/dist/policy/envelope.js +90 -0
  342. package/node_modules/@claude-flow/security/dist/policy/envelope.js.map +1 -0
  343. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts +4 -0
  344. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts.map +1 -0
  345. package/node_modules/@claude-flow/security/dist/policy/evaluator.js +119 -0
  346. package/node_modules/@claude-flow/security/dist/policy/evaluator.js.map +1 -0
  347. package/node_modules/@claude-flow/security/dist/policy/index.d.ts +7 -0
  348. package/node_modules/@claude-flow/security/dist/policy/index.d.ts.map +1 -0
  349. package/node_modules/@claude-flow/security/dist/policy/index.js +7 -0
  350. package/node_modules/@claude-flow/security/dist/policy/index.js.map +1 -0
  351. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts +238 -0
  352. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts.map +1 -0
  353. package/node_modules/@claude-flow/security/dist/policy/product-plane.js +1022 -0
  354. package/node_modules/@claude-flow/security/dist/policy/product-plane.js.map +1 -0
  355. package/node_modules/@claude-flow/security/dist/policy/types.d.ts +169 -0
  356. package/node_modules/@claude-flow/security/dist/policy/types.d.ts.map +1 -0
  357. package/node_modules/@claude-flow/security/dist/policy/types.js +2 -0
  358. package/node_modules/@claude-flow/security/dist/policy/types.js.map +1 -0
  359. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts +180 -0
  360. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts.map +1 -0
  361. package/node_modules/@claude-flow/security/dist/safe-executor.js +390 -0
  362. package/node_modules/@claude-flow/security/dist/safe-executor.js.map +1 -0
  363. package/node_modules/@claude-flow/security/dist/token-generator.d.ts +224 -0
  364. package/node_modules/@claude-flow/security/dist/token-generator.d.ts.map +1 -0
  365. package/node_modules/@claude-flow/security/dist/token-generator.js +351 -0
  366. package/node_modules/@claude-flow/security/dist/token-generator.js.map +1 -0
  367. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts +126 -0
  368. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts.map +1 -0
  369. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js +257 -0
  370. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js.map +1 -0
  371. package/node_modules/@claude-flow/security/package.json +44 -0
  372. package/package.json +24 -8
@@ -0,0 +1,403 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { createHash } from 'node:crypto';
3
+ import { lstatSync, readFileSync, readlinkSync, realpathSync, } from 'node:fs';
4
+ import { isAbsolute, relative, resolve, sep } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { portableCaseFold } from './portable-case-fold.js';
7
+ const SHA256_PREFIX = 'sha256:';
8
+ const MAX_GIT_BUFFER = 128 * 1024 * 1024;
9
+ function digest(value) {
10
+ return `${SHA256_PREFIX}${createHash('sha256').update(value).digest('hex')}`;
11
+ }
12
+ function assertUnicodeScalarString(value) {
13
+ for (let index = 0; index < value.length; index += 1) {
14
+ const unit = value.charCodeAt(index);
15
+ if (unit >= 0xd800 && unit <= 0xdbff) {
16
+ const next = value.charCodeAt(index + 1);
17
+ if (!(next >= 0xdc00 && next <= 0xdfff)) {
18
+ throw new Error('canonical JSON does not support lone UTF-16 surrogates');
19
+ }
20
+ index += 1;
21
+ }
22
+ else if (unit >= 0xdc00 && unit <= 0xdfff) {
23
+ throw new Error('canonical JSON does not support lone UTF-16 surrogates');
24
+ }
25
+ }
26
+ }
27
+ function codeUnitCompare(left, right) {
28
+ return left < right ? -1 : left > right ? 1 : 0;
29
+ }
30
+ /** Recursive, locale-independent canonical JSON for JSON-safe contract values. */
31
+ export function canonicalJson(value) {
32
+ const ancestors = new Set();
33
+ const encode = (item) => {
34
+ if (item === null || typeof item === 'boolean')
35
+ return JSON.stringify(item);
36
+ if (typeof item === 'string') {
37
+ assertUnicodeScalarString(item);
38
+ return JSON.stringify(item);
39
+ }
40
+ if (typeof item === 'number') {
41
+ if (!Number.isFinite(item)
42
+ || Object.is(item, -0)
43
+ || (Number.isInteger(item) && !Number.isSafeInteger(item))) {
44
+ throw new Error('canonical JSON requires finite, safe, non-negative-zero numbers');
45
+ }
46
+ return JSON.stringify(item);
47
+ }
48
+ if (item === undefined)
49
+ throw new Error('canonical JSON does not support undefined');
50
+ if (typeof item !== 'object') {
51
+ throw new Error(`canonical JSON does not support ${typeof item}`);
52
+ }
53
+ if (ancestors.has(item))
54
+ throw new Error('canonical JSON does not support cycles');
55
+ ancestors.add(item);
56
+ try {
57
+ if (Array.isArray(item))
58
+ return `[${item.map(encode).join(',')}]`;
59
+ const prototype = Object.getPrototypeOf(item);
60
+ if (prototype !== Object.prototype && prototype !== null) {
61
+ throw new Error('canonical JSON supports only arrays and plain objects');
62
+ }
63
+ const entries = Object.entries(item)
64
+ .sort(([left], [right]) => codeUnitCompare(left, right));
65
+ return `{${entries.map(([key, child]) => {
66
+ assertUnicodeScalarString(key);
67
+ return `${JSON.stringify(key)}:${encode(child)}`;
68
+ }).join(',')}}`;
69
+ }
70
+ finally {
71
+ ancestors.delete(item);
72
+ }
73
+ };
74
+ return encode(value);
75
+ }
76
+ function gitBuffer(repoRoot, args) {
77
+ return execFileSync('git', ['-C', repoRoot, ...args], {
78
+ encoding: 'buffer',
79
+ stdio: ['ignore', 'pipe', 'pipe'],
80
+ maxBuffer: MAX_GIT_BUFFER,
81
+ });
82
+ }
83
+ function gitText(repoRoot, args) {
84
+ return gitBuffer(repoRoot, args).toString('utf8').trim();
85
+ }
86
+ function optionalGitText(repoRoot, args) {
87
+ try {
88
+ const value = gitText(repoRoot, args);
89
+ return value.length > 0 ? value : undefined;
90
+ }
91
+ catch {
92
+ return undefined;
93
+ }
94
+ }
95
+ function splitNul(output) {
96
+ const records = [];
97
+ let start = 0;
98
+ for (let index = 0; index < output.length; index += 1) {
99
+ if (output[index] !== 0)
100
+ continue;
101
+ if (index > start)
102
+ records.push(output.subarray(start, index));
103
+ start = index + 1;
104
+ }
105
+ if (start !== output.length)
106
+ throw new Error('Git returned a non-NUL-terminated path list');
107
+ return records;
108
+ }
109
+ function decodeGitPath(bytes) {
110
+ const path = bytes.toString('utf8');
111
+ if (!Buffer.from(path, 'utf8').equals(bytes)) {
112
+ throw new Error('Git path is not valid round-trip UTF-8');
113
+ }
114
+ assertUnicodeScalarString(path);
115
+ if (path !== path.normalize('NFC')) {
116
+ throw new Error(`Git path is not NFC-normalized: ${path}`);
117
+ }
118
+ return normalizeRelativePath(path);
119
+ }
120
+ function normalizeRelativePath(path) {
121
+ assertUnicodeScalarString(path);
122
+ if (path.includes('\\'))
123
+ throw new Error(`ambiguous repository path separator: ${path}`);
124
+ const normalized = path.normalize('NFC');
125
+ if (normalized.length === 0
126
+ || isAbsolute(normalized)
127
+ || normalized.startsWith('-')
128
+ || normalized.split('/').some((part) => part === '' || part === '.' || part === '..')) {
129
+ throw new Error(`unsafe repository-relative path: ${path}`);
130
+ }
131
+ return normalized;
132
+ }
133
+ function assertNoPathCollisions(paths) {
134
+ const exact = new Set();
135
+ const folded = new Map();
136
+ for (const path of paths) {
137
+ if (exact.has(path))
138
+ throw new Error(`duplicate repository path: ${path}`);
139
+ exact.add(path);
140
+ const key = portableCaseFold(path);
141
+ const prior = folded.get(key);
142
+ if (prior !== undefined && prior !== path) {
143
+ throw new Error(`case-fold repository path collision: ${prior} and ${path}`);
144
+ }
145
+ folded.set(key, path);
146
+ }
147
+ }
148
+ function repositoryPaths(repoRoot, includeUntracked) {
149
+ const tracked = splitNul(gitBuffer(repoRoot, ['ls-files', '-z'])).map(decodeGitPath);
150
+ const untracked = includeUntracked
151
+ ? splitNul(gitBuffer(repoRoot, ['ls-files', '--others', '--exclude-standard', '-z'])).map(decodeGitPath)
152
+ : [];
153
+ const paths = [...tracked, ...untracked].sort(codeUnitCompare);
154
+ assertNoPathCollisions(paths);
155
+ return paths;
156
+ }
157
+ function assertInsideRepository(repoRoot, candidate) {
158
+ const rel = relative(repoRoot, candidate);
159
+ if (rel === '..' || rel.startsWith(`..${sep}`) || isAbsolute(rel)) {
160
+ throw new Error(`repository path escapes root: ${candidate}`);
161
+ }
162
+ }
163
+ function contentDigest(content) {
164
+ return { algorithm: 'sha256', digest: digest(content), bytes: content.byteLength };
165
+ }
166
+ function untrackedManifest(repoRoot) {
167
+ const output = gitBuffer(repoRoot, ['ls-files', '--others', '--exclude-standard', '-z']);
168
+ const paths = splitNul(output).map(decodeGitPath).sort(codeUnitCompare);
169
+ assertNoPathCollisions(paths);
170
+ const entries = paths.map((path) => {
171
+ const absolute = resolve(repoRoot, path);
172
+ assertInsideRepository(repoRoot, absolute);
173
+ const before = lstatSync(absolute);
174
+ let kind;
175
+ let content;
176
+ if (before.isSymbolicLink()) {
177
+ kind = 'symlink';
178
+ content = Buffer.from(readlinkSync(absolute), 'utf8');
179
+ }
180
+ else if (before.isFile()) {
181
+ kind = 'file';
182
+ content = readFileSync(absolute);
183
+ }
184
+ else {
185
+ throw new Error(`unsupported untracked repository entry: ${path}`);
186
+ }
187
+ const after = lstatSync(absolute);
188
+ if (before.mode !== after.mode
189
+ || before.size !== after.size
190
+ || before.mtimeMs !== after.mtimeMs
191
+ || before.ino !== after.ino) {
192
+ throw new Error(`repository changed while hashing untracked entry: ${path}`);
193
+ }
194
+ return {
195
+ path,
196
+ kind,
197
+ mode: before.mode & 0o7777,
198
+ bytes: content.byteLength,
199
+ digest: digest(content),
200
+ };
201
+ });
202
+ return { digest: digest(canonicalJson(entries)), entries };
203
+ }
204
+ function trackedPatch(repoRoot) {
205
+ return contentDigest(gitBuffer(repoRoot, [
206
+ 'diff',
207
+ '--binary',
208
+ '--full-index',
209
+ '--no-ext-diff',
210
+ 'HEAD',
211
+ '--',
212
+ ]));
213
+ }
214
+ function submoduleStates(repoRoot) {
215
+ const staged = splitNul(gitBuffer(repoRoot, ['ls-files', '--stage', '-z']));
216
+ const submodules = staged.flatMap((entry) => {
217
+ const tab = entry.indexOf(0x09);
218
+ if (tab < 0)
219
+ throw new Error('malformed Git index record');
220
+ const metadata = entry.subarray(0, tab).toString('ascii');
221
+ const match = /^160000 ([0-9a-f]+) [0-3]$/.exec(metadata);
222
+ return match?.[1]
223
+ ? [{ path: decodeGitPath(entry.subarray(tab + 1)), commit: match[1] }]
224
+ : [];
225
+ });
226
+ assertNoPathCollisions(submodules.map(({ path }) => path));
227
+ return submodules.map(({ path, commit }) => {
228
+ const absolute = resolve(repoRoot, path);
229
+ assertInsideRepository(repoRoot, absolute);
230
+ const actualCommit = optionalGitText(absolute, ['rev-parse', '--verify', 'HEAD']);
231
+ if (!actualCommit) {
232
+ return {
233
+ path,
234
+ initialized: false,
235
+ expectedCommit: commit,
236
+ trackedPatch: contentDigest(Buffer.alloc(0)),
237
+ untrackedManifest: { digest: digest('[]'), entries: [] },
238
+ submodules: [],
239
+ };
240
+ }
241
+ repositoryPaths(absolute, true);
242
+ return {
243
+ path,
244
+ initialized: true,
245
+ expectedCommit: commit,
246
+ commit: actualCommit,
247
+ trackedPatch: trackedPatch(absolute),
248
+ untrackedManifest: untrackedManifest(absolute),
249
+ submodules: submoduleStates(absolute),
250
+ };
251
+ });
252
+ }
253
+ function captureContentState(repoRoot) {
254
+ const baseCommit = gitText(repoRoot, ['rev-parse', '--verify', 'HEAD']);
255
+ const treeId = gitText(repoRoot, ['rev-parse', '--verify', 'HEAD^{tree}']);
256
+ return {
257
+ baseCommit,
258
+ treeId,
259
+ trackedPatch: trackedPatch(repoRoot),
260
+ untrackedManifest: untrackedManifest(repoRoot),
261
+ submodules: submoduleStates(repoRoot),
262
+ };
263
+ }
264
+ function canonicalizeRemote(remote) {
265
+ const trimmed = remote.trim();
266
+ const scp = /^([^/@:]+@)?([^/:]+):(.+)$/.exec(trimmed);
267
+ if (scp?.[2] && scp[3] && !trimmed.includes('://')) {
268
+ return `ssh://${scp[2].toLowerCase()}/${scp[3].replace(/^\/+|\/+$/g, '').replace(/\.git$/i, '')}`;
269
+ }
270
+ try {
271
+ const url = new URL(trimmed);
272
+ url.username = '';
273
+ url.password = '';
274
+ url.hostname = url.hostname.toLowerCase();
275
+ url.pathname = url.pathname.replace(/\.git$/i, '').replace(/\/+$/g, '');
276
+ url.hash = '';
277
+ url.search = '';
278
+ return url.toString().replace(/\/$/, '');
279
+ }
280
+ catch {
281
+ return trimmed.replace(/\.git$/i, '').replace(/\/+$/g, '');
282
+ }
283
+ }
284
+ function repositoryIdentity(repoRoot) {
285
+ const commonDirRaw = gitText(repoRoot, ['rev-parse', '--git-common-dir']);
286
+ const commonDir = realpathSync(resolve(repoRoot, commonDirRaw));
287
+ const canonicalRemoteRaw = optionalGitText(repoRoot, ['remote', 'get-url', 'origin']);
288
+ const canonicalRemote = canonicalRemoteRaw ? canonicalizeRemote(canonicalRemoteRaw) : undefined;
289
+ const rootCommits = gitText(repoRoot, ['rev-list', '--max-parents=0', 'HEAD']).split(/\s+/).sort();
290
+ const rootTrees = rootCommits.map((commit) => gitText(repoRoot, ['rev-parse', `${commit}^{tree}`]));
291
+ const rootTreeId = rootTrees.length === 1 ? rootTrees[0] : digest(canonicalJson(rootTrees));
292
+ const gitCommonDirId = digest(commonDir);
293
+ const repositoryId = digest(canonicalJson({
294
+ anchor: canonicalRemote ?? gitCommonDirId,
295
+ rootTreeId,
296
+ }));
297
+ return {
298
+ repositoryId,
299
+ ...(canonicalRemote ? { canonicalRemote } : {}),
300
+ gitCommonDirId,
301
+ rootTreeId,
302
+ };
303
+ }
304
+ function hasDirtySubmodule(submodule) {
305
+ return !submodule.initialized
306
+ || submodule.commit !== submodule.expectedCommit
307
+ || submodule.trackedPatch.bytes > 0
308
+ || submodule.untrackedManifest.entries.length > 0
309
+ || submodule.submodules.some(hasDirtySubmodule);
310
+ }
311
+ /**
312
+ * Capture a stable, content-addressed Git source state.
313
+ *
314
+ * The collector performs two complete reads and refuses a moving worktree.
315
+ * Ignored files are intentionally excluded because Git does not treat them as
316
+ * repository source. Untracked symlinks bind their link target text without
317
+ * following the target outside the worktree.
318
+ */
319
+ export function captureRepositorySourceState(repoPath) {
320
+ const requested = repoPath instanceof URL ? fileURLToPath(repoPath) : repoPath;
321
+ const repoRoot = realpathSync(resolve(requested));
322
+ const top = realpathSync(gitText(repoRoot, ['rev-parse', '--show-toplevel']));
323
+ if (top !== repoRoot)
324
+ throw new Error(`repoPath must be the Git top-level: ${top}`);
325
+ const cleanStatus = () => gitBuffer(repoRoot, [
326
+ 'status',
327
+ '--porcelain=v1',
328
+ '-z',
329
+ '--untracked-files=all',
330
+ '--ignore-submodules=none',
331
+ ]);
332
+ const initialStatus = cleanStatus();
333
+ if (initialStatus.length === 0) {
334
+ repositoryPaths(repoRoot, false);
335
+ const baseCommit = gitText(repoRoot, ['rev-parse', '--verify', 'HEAD']);
336
+ const treeId = gitText(repoRoot, ['rev-parse', '--verify', 'HEAD^{tree}']);
337
+ if (cleanStatus().length !== 0 || gitText(repoRoot, ['rev-parse', '--verify', 'HEAD']) !== baseCommit) {
338
+ throw new Error('repository changed while capturing exact source state');
339
+ }
340
+ const repository = repositoryIdentity(repoRoot);
341
+ const identity = {
342
+ version: 1,
343
+ scope: 'git-visible',
344
+ repositoryId: repository.repositoryId,
345
+ commit: baseCommit,
346
+ tree: treeId,
347
+ };
348
+ return {
349
+ version: 1,
350
+ scope: 'git-visible',
351
+ kind: 'clean',
352
+ clean: true,
353
+ repository,
354
+ baseCommit,
355
+ treeId,
356
+ sourceStateId: digest(canonicalJson(identity)),
357
+ };
358
+ }
359
+ repositoryPaths(repoRoot, true);
360
+ const first = captureContentState(repoRoot);
361
+ const second = captureContentState(repoRoot);
362
+ if (canonicalJson(first) !== canonicalJson(second)) {
363
+ throw new Error('repository changed while capturing exact source state');
364
+ }
365
+ const repository = repositoryIdentity(repoRoot);
366
+ const dirty = second.trackedPatch.bytes > 0
367
+ || second.untrackedManifest.entries.length > 0
368
+ || second.submodules.some(hasDirtySubmodule);
369
+ if (!dirty)
370
+ throw new Error('Git status reported changes that exact-state capture could not identify');
371
+ const identity = {
372
+ version: 1,
373
+ scope: 'git-visible',
374
+ repositoryId: repository.repositoryId,
375
+ baseCommit: second.baseCommit,
376
+ tree: second.treeId,
377
+ trackedPatch: second.trackedPatch,
378
+ untrackedManifest: second.untrackedManifest,
379
+ submodules: second.submodules,
380
+ };
381
+ return {
382
+ version: 1,
383
+ scope: 'git-visible',
384
+ kind: 'dirty',
385
+ clean: false,
386
+ repository,
387
+ baseCommit: second.baseCommit,
388
+ treeId: second.treeId,
389
+ trackedPatch: second.trackedPatch,
390
+ untrackedManifest: second.untrackedManifest,
391
+ submodules: second.submodules,
392
+ sourceStateId: digest(canonicalJson(identity)),
393
+ };
394
+ }
395
+ export function sourceStateMatches(left, right) {
396
+ return left.sourceStateId === right.sourceStateId
397
+ && left.repository.repositoryId === right.repository.repositoryId;
398
+ }
399
+ /** Release receipts default to the stronger committed-state requirement. */
400
+ export function isReleaseEligibleSourceState(state) {
401
+ return state.clean;
402
+ }
403
+ //# sourceMappingURL=repository-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-state.js","sourceRoot":"","sources":["../../src/harness/repository-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OA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AAI,EAAE,MAAM,CAAC,MAAM;QACnB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC;IACF,OAAO;QACL,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,KAAK;QACZ,UAAU;QACV,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAsB,EAAE,KAAuB;IAChF,OAAO,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;WAC5C,IAAI,CAAC,UAAU,CAAC,YAAY,KAAK,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC;AACtE,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,4BAA4B,CAAC,KAAuB;IAClE,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Parse a decimal unsigned integer without accepting aliases such as +1, 01, hex, or whitespace. */
2
+ export declare function parseCanonicalUnsigned(value: string, label: string): bigint;
3
+ //# sourceMappingURL=unsigned-integer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsigned-integer.d.ts","sourceRoot":"","sources":["../../src/harness/unsigned-integer.ts"],"names":[],"mappings":"AAGA,qGAAqG;AACrG,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3E"}
@@ -0,0 +1,14 @@
1
+ const CANONICAL_UNSIGNED = /^(?:0|[1-9][0-9]*)$/;
2
+ const MAX_UNSIGNED_64 = (1n << 64n) - 1n;
3
+ /** Parse a decimal unsigned integer without accepting aliases such as +1, 01, hex, or whitespace. */
4
+ export function parseCanonicalUnsigned(value, label) {
5
+ if (!CANONICAL_UNSIGNED.test(value)) {
6
+ throw new Error(`${label} must be a canonical unsigned decimal integer`);
7
+ }
8
+ const parsed = BigInt(value);
9
+ if (parsed > MAX_UNSIGNED_64) {
10
+ throw new Error(`${label} exceeds unsigned 64-bit range`);
11
+ }
12
+ return parsed;
13
+ }
14
+ //# sourceMappingURL=unsigned-integer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsigned-integer.js","sourceRoot":"","sources":["../../src/harness/unsigned-integer.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AACjD,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;AAEzC,qGAAqG;AACrG,MAAM,UAAU,sBAAsB,CAAC,KAAa,EAAE,KAAa;IACjE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,+CAA+C,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,MAAM,GAAG,eAAe,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,gCAAgC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @claude-flow/codex
3
+ *
4
+ * OpenAI Codex platform adapter for Claude Flow
5
+ * First step in the coflow rebranding initiative
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export * from './types.js';
10
+ export { generateAgentsMd, generateSkillMd, generateConfigToml, } from './generators/index.js';
11
+ export { generateBuiltInSkill } from './generators/skill-md.js';
12
+ export { generateMinimalConfigToml, generateCIConfigToml } from './generators/config-toml.js';
13
+ export { migrateFromClaudeCode, analyzeClaudeMd, generateMigrationReport, convertSkillSyntax, convertSettingsToToml, FEATURE_MAPPINGS, } from './migrations/index.js';
14
+ export { validateAgentsMd, validateSkillMd, validateConfigToml, } from './validators/index.js';
15
+ export { CodexInitializer, initializeCodexProject } from './initializer.js';
16
+ export { DualModeOrchestrator, CollaborationTemplates, createDualModeCommand, loadSwarmAutomationConfig, } from './dual-mode/index.js';
17
+ export type { DualModeConfig, WorkerConfig, WorkerResult, CollaborationResult, LoadedSwarmAutomationConfig, WorkerCapabilityEnvelope, } from './dual-mode/index.js';
18
+ export { CodexWorktreeCoordinator } from './worktrees/index.js';
19
+ export type { WorktreeAssignment, WorktreeRunRecord } from './worktrees/index.js';
20
+ export * from './harness/index.js';
21
+ export { buildCodexLoopPrompt, loadLoopState, normalizeLoopName, requestLoopStop, resolveLoopPaths, runCodexLoop, } from './loop/index.js';
22
+ export { createLoopCommand } from './loop/cli.js';
23
+ export type { LoopCommandResult, LoopEvent, LoopPaths, LoopRunOptions, LoopState } from './loop/index.js';
24
+ export { getTemplate, listTemplates, BUILT_IN_SKILLS, TEMPLATES, DEFAULT_SKILLS_BY_TEMPLATE, DIRECTORY_STRUCTURE, PLATFORM_MAPPING, GITIGNORE_ENTRIES, AGENTS_OVERRIDE_TEMPLATE, } from './templates/index.js';
25
+ /**
26
+ * Package version
27
+ */
28
+ export declare const VERSION = "3.0.3";
29
+ /**
30
+ * Package metadata
31
+ */
32
+ export declare const PACKAGE_INFO: {
33
+ readonly name: "@claude-flow/codex";
34
+ readonly version: "3.0.3";
35
+ readonly description: "Codex CLI integration for Claude Flow";
36
+ readonly futureUmbrella: "coflow";
37
+ readonly repository: "https://github.com/ruvnet/ruflo";
38
+ };
39
+ /**
40
+ * Default export for convenient imports
41
+ */
42
+ declare const _default: {
43
+ VERSION: string;
44
+ PACKAGE_INFO: {
45
+ readonly name: "@claude-flow/codex";
46
+ readonly version: "3.0.3";
47
+ readonly description: "Codex CLI integration for Claude Flow";
48
+ readonly futureUmbrella: "coflow";
49
+ readonly repository: "https://github.com/ruvnet/ruflo";
50
+ };
51
+ };
52
+ export default _default;
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,YAAY,CAAC;AAG3B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAG9F,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGlF,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG1G,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,SAAS,EACT,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX;;GAEG;;;;;;;;;;;AACH,wBAGE"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @claude-flow/codex
3
+ *
4
+ * OpenAI Codex platform adapter for Claude Flow
5
+ * First step in the coflow rebranding initiative
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ // Re-export all types
10
+ export * from './types.js';
11
+ // Re-export generators
12
+ export { generateAgentsMd, generateSkillMd, generateConfigToml, } from './generators/index.js';
13
+ // Re-export skill generator helper
14
+ export { generateBuiltInSkill } from './generators/skill-md.js';
15
+ // Re-export config generator helpers
16
+ export { generateMinimalConfigToml, generateCIConfigToml } from './generators/config-toml.js';
17
+ // Re-export migrations
18
+ export { migrateFromClaudeCode, analyzeClaudeMd, generateMigrationReport, convertSkillSyntax, convertSettingsToToml, FEATURE_MAPPINGS, } from './migrations/index.js';
19
+ // Re-export validators
20
+ export { validateAgentsMd, validateSkillMd, validateConfigToml, } from './validators/index.js';
21
+ // Main initializer class and helper function
22
+ export { CodexInitializer, initializeCodexProject } from './initializer.js';
23
+ // Dual-mode collaborative execution
24
+ export { DualModeOrchestrator, CollaborationTemplates, createDualModeCommand, loadSwarmAutomationConfig, } from './dual-mode/index.js';
25
+ export { CodexWorktreeCoordinator } from './worktrees/index.js';
26
+ // Repository harness contracts and in-memory reference implementations.
27
+ export * from './harness/index.js';
28
+ // Codex /loop-compatible runner
29
+ export { buildCodexLoopPrompt, loadLoopState, normalizeLoopName, requestLoopStop, resolveLoopPaths, runCodexLoop, } from './loop/index.js';
30
+ export { createLoopCommand } from './loop/cli.js';
31
+ // Template utilities
32
+ export { getTemplate, listTemplates, BUILT_IN_SKILLS, TEMPLATES, DEFAULT_SKILLS_BY_TEMPLATE, DIRECTORY_STRUCTURE, PLATFORM_MAPPING, GITIGNORE_ENTRIES, AGENTS_OVERRIDE_TEMPLATE, } from './templates/index.js';
33
+ /**
34
+ * Package version
35
+ */
36
+ export const VERSION = '3.0.3';
37
+ /**
38
+ * Package metadata
39
+ */
40
+ export const PACKAGE_INFO = {
41
+ name: '@claude-flow/codex',
42
+ version: VERSION,
43
+ description: 'Codex CLI integration for Claude Flow',
44
+ futureUmbrella: 'coflow',
45
+ repository: 'https://github.com/ruvnet/ruflo',
46
+ };
47
+ /**
48
+ * Default export for convenient imports
49
+ */
50
+ export default {
51
+ VERSION,
52
+ PACKAGE_INFO,
53
+ };
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sBAAsB;AACtB,cAAc,YAAY,CAAC;AAE3B,uBAAuB;AACvB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,mCAAmC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qCAAqC;AACrC,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE9F,uBAAuB;AACvB,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE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