Files
Reuven a9db4cd3ef fix(plugin-code-intelligence@3.0.0-alpha.3): real import edges in GNN bridge
Followup to #1554 / #1553 (alpha.2 fixed the helper stubs; this addresses
the third stub the issue called out).

src/bridges/gnn-bridge.ts:500 — extractImports now resolves relative
import specifiers via regex against the supplied `allFiles` set instead
of returning `[]`. Result: dependency graphs produced by buildCodeGraph()
finally have real edges, which architecture-analyze, refactor-impact, and
split-suggest all need.

Handles two specifier styles users actually write:
  - bare relative: `./foo`, `../bar/baz`
  - TS module-specifier convention: `./foo.js` (where the on-disk source
    is `./foo.ts` or `./foo.tsx`). The resolver tries the bare path,
    `<base>.<ext>`, `<base>/index.<ext>` for the standard JS/TS extensions,
    AND a stripped variant when the spec ends in `.js`/`.cjs`/`.mjs`. This
    is the common ESM-with-NodeNext pattern in v3 and was the dominant
    miss before this fix.

Live probe (plugin's own src/ — 6 TS files):
  before: { nodes: 6, edges: 0 }
  after:  { nodes: 6, edges: 11 }
  sample: gnn-bridge.ts → types.ts (import)
          index.ts → gnn-bridge.ts (import)
          index.ts → mincut-bridge.ts (import)

Build clean.

Published @claude-flow/plugin-code-intelligence@3.0.0-alpha.3 with
alpha + latest dist-tags.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-08 09:58:09 -04:00
..