orstrum_get_imports

Returns all outbound import edges from a file with the resolved target note, imported symbols, and cross-repo flags.

Input

path required
string
File path. Absolute, cwd-relative, repo/relPath shorthand, or repo/relPath.md note form.

Output


  note: "api-service/src/api/auth",
  imports: [
    
      specifier:    "../lib/jwt",
      symbols:      ["verifyJwt", "JwtPayload"],
      isLocal:      true,
      isCrossRepo:  false,
      packageName:  null,
      resolvedNote: "api-service/src/lib/jwt"
    ,
    
      specifier:    "@supabase/supabase-js",
      symbols:      ["createClient"],
      isLocal:      false,
      isCrossRepo:  false,
      packageName:  "@supabase/supabase-js",
      resolvedNote: null
    
  ]

resolvedNote is the target file's note path when the import resolves to a file in the scan set; it is null for external packages and imports that couldn't be resolved. packageName is set for external imports — the npm package name in TS/JS, the top-level module name in Python. isCrossRepo is true when the edge crosses from one indexed repo into another.

Python files

Python edges use the same shape with two differences worth knowing. A whole-module import x has no named bindings, so symbols is ["*"] (as it is for from x import *). And because the standard library is not part of your scan set, stdlib imports are recorded as external packages just like third-party ones:


  specifier:    "argparse",          // import argparse
  symbols:      ["*"],
  isLocal:      false,
  packageName:  "argparse",
  resolvedNote: null
,

  specifier:    "dataclasses",       // from dataclasses import dataclass, field
  symbols:      ["dataclass", "field"],
  isLocal:      false,
  packageName:  "dataclasses",
  resolvedNote: null

Relative imports keep their leading dots in specifier (from ..lib import y"..lib"). See Language support for how each form resolves to a file, and which imports are deliberately not tracked.