Files
ruflo/v3/@claude-flow/integration/src
Dragan Spiridonov 74669662f7 fix(cli,integration): never import the agentic-flow root entry
agentic-flow 3.0.0-alpha.1/.2 call their CLI main() at the bottom of
dist/index.js with no is-main guard (2.x has one). Importing the root as a
library therefore parses the host's process.argv: with `--help` it prints
agentic-flow's help and exits the host, with `mcp start` it would start its
MCP server, and with no agentic-flow flag it runs its demo agents with
whatever model credentials are in the environment, plus a health server on
:8080 and a runtime patch that rewrites files under node_modules.

The root import was only ever a fallback or a probe for exports that no
published root has (`embeddings`, `createAgenticFlow`, `VERSION`,
`configTuning`; checked 2.0.14, 2.1.4, 3.0.0-alpha.1/.2):

- cli memory-initializer: drop the dead root `embeddings` fallback.
- cli hooks token-optimize: drop the root availability fallback; the root
  re-exports the same reasoningbank module the subpath check already loads.
- integration TokenOptimizer: detect agentic-flow from the reasoningbank /
  agent-booster subpaths instead of the root.
- integration AgentAdapter, SwarmAdapter, AgenticFlowBridge: stop importing
  the root for a `createAgenticFlow` factory no release exports; keep the
  existing local-implementation path and events.
- integration SDKBridge: use the baseline version instead of a root VERSION
  export that does not exist.
- Point the "for ML embeddings" comments at agentic-flow/reasoningbank.

The regression test runs the CLI source in a child process with loader
hooks that replace the root entry with a marker, and scans v3 sources for
any root-entry import.
2026-10-09 20:54:48 +02:00
..
2026-01-05 17:28:09 +00:00
2026-01-12 19:08:26 +00:00
2026-01-04 17:40:48 +00:00