harn-hostlib 0.10.132

Opt-in code-intelligence and deterministic-tool host builtins for the Harn VM
{
  "_comment": "Hostlib import-resolution rules. Strategies and field semantics are documented in src/code_index/imports.rs.",
  "languages": {
    "c": {
      "allowSuffixMatch": true,
      "candidateExtensions": [],
      "kind": "include",
      "skipIfContainsAngleBracket": true,
      "strategy": "relative"
    },
    "cpp": {
      "allowSuffixMatch": true,
      "candidateExtensions": [],
      "kind": "include",
      "skipIfContainsAngleBracket": true,
      "strategy": "relative"
    },
    "csharp": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".cs"
      ],
      "kind": "using",
      "lastSegmentOnly": true,
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "using "
      ],
      "stripSuffixes": [
        ";"
      ]
    },
    "elixir": {
      "allowSuffixMatch": true,
      "camelToSnake": true,
      "candidateSuffixes": [
        ".ex",
        ".exs"
      ],
      "kind": "alias",
      "lastSegmentOnly": true,
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "alias ",
        "import ",
        "require ",
        "use "
      ]
    },
    "go": {
      "kind": "import",
      "strategy": "go-package"
    },
    "harn": {
      "candidateExtensions": [
        "harn"
      ],
      "kind": "import",
      "requirePrefixes": [
        "./",
        "../"
      ],
      "strategy": "relative"
    },
    "haskell": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".hs",
        ".lhs"
      ],
      "kind": "import",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "import ",
        "qualified "
      ],
      "takeFirstAfterStrip": true
    },
    "java": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".java"
      ],
      "kind": "import",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "import ",
        "static "
      ],
      "stripSuffixes": [
        ";",
        ".*"
      ]
    },
    "javascript": {
      "candidateExtensions": [
        "js",
        "jsx",
        "mjs",
        "cjs",
        "ts",
        "tsx"
      ],
      "indexFallbacks": [
        "index.js",
        "index.jsx",
        "index.mjs",
        "index.cjs"
      ],
      "kind": "import",
      "requirePrefixes": [
        "./",
        "../",
        "/"
      ],
      "strategy": "relative"
    },
    "kotlin": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".kt",
        ".kts"
      ],
      "kind": "import",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "import "
      ],
      "stripSuffixes": [
        ";",
        ".*"
      ]
    },
    "lua": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".lua",
        "/init.lua"
      ],
      "kind": "require",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted-literal"
    },
    "php": {
      "aliasSeparator": " as ",
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".php"
      ],
      "kind": "use",
      "replaceSeparator": "/",
      "separator": "\\",
      "strategy": "dotted",
      "stripPrefixes": [
        "use "
      ],
      "stripSuffixes": [
        ";"
      ]
    },
    "python": {
      "allowSuffixMatch": false,
      "candidateSuffixes": [
        ".py",
        "/__init__.py"
      ],
      "kind": "import",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "from ",
        "import "
      ],
      "takeFirstAfterStrip": true
    },
    "r": {
      "allowSuffixMatch": false,
      "candidateExtensions": [],
      "kind": "source",
      "relativeOnlyIfContains": [
        "source"
      ],
      "strategy": "relative"
    },
    "ruby": {
      "allowSuffixMatch": true,
      "appendExtensionIfMissing": "rb",
      "candidateExtensions": [
        "rb"
      ],
      "kind": "require",
      "relativeOnlyIfContains": [
        "require_relative"
      ],
      "strategy": "relative"
    },
    "rust": {
      "kind": "use",
      "strategy": "rust-module"
    },
    "scala": {
      "allowSuffixMatch": true,
      "candidateSuffixes": [
        ".scala"
      ],
      "kind": "import",
      "replaceSeparator": "/",
      "separator": ".",
      "strategy": "dotted",
      "stripPrefixes": [
        "import "
      ],
      "stripSuffixes": [
        ";"
      ]
    },
    "swift": {
      "kind": "import",
      "strategy": "swift-target"
    },
    "typescript": {
      "candidateExtensions": [
        "ts",
        "tsx",
        "js",
        "jsx",
        "mjs",
        "cjs"
      ],
      "indexFallbacks": [
        "index.ts",
        "index.tsx",
        "index.js",
        "index.jsx",
        "index.mjs",
        "index.cjs"
      ],
      "kind": "import",
      "requirePrefixes": [
        "./",
        "../",
        "/"
      ],
      "strategy": "relative"
    },
    "zig": {
      "allowSuffixMatch": false,
      "candidateExtensions": [],
      "kind": "import",
      "requireLiteralContains": [
        ".",
        "/"
      ],
      "strategy": "relative"
    }
  }
}