// @bun
// src/utils/adk-version.ts
import { readFileSync } from "fs";
import { join } from "path";
// package.json
var package_default = {
  name: "@botpress/adk-cli",
  version: "1.19.0-beta.13",
  description: "Command-line interface for the Botpress Agent Development Kit (ADK)",
  keywords: [
    "adk",
    "agent",
    "ai",
    "botpress",
    "chatbot",
    "cli",
    "conversational-ai",
    "development-kit"
  ],
  license: "MIT",
  author: "Botpress",
  repository: {
    type: "git",
    url: "https://github.com/botpress/adk"
  },
  bin: {
    adk: "dist/cli.js"
  },
  files: [
    "dist/**/*",
    "!dist/bp-cli/node_modules",
    "assets/ui-dist/**/*"
  ],
  type: "module",
  main: "dist/index.js",
  scripts: {
    build: "bun run build.ts",
    compile: "bun run build && bun run compile.ts",
    "compile:all": "bun run compile-all.ts",
    watch: "bun build ./src/cli.ts --bundle --outfile=./dist/cli.js --target bun --watch",
    dev: "bun src/cli.ts",
    clean: "rm -rf dist bin",
    prepublishOnly: "bun run clean && bun run build",
    "generate:docs": "bun scripts/generate-commands-json.ts",
    test: "bun test",
    "test:watch": "bun test --watch",
    "check:type": "bun scripts/generate-build-constants.ts >/dev/null && bun scripts/embed-assets.ts >/dev/null && tsc --noEmit"
  },
  dependencies: {
    "@botpress/adk": "^1.19.0-beta.13",
    "@botpress/chat": "~0.5.5",
    "@botpress/cli": "~6.8.6",
    "@botpress/client": "~1.46.0",
    "@botpress/evals": "^1.19.0-beta.13",
    "@botpress/runtime": "^1.19.0-beta.13",
    "@botpress/sdk": "~6.11.1",
    "@botpress/webchat-client": "^0.7.2",
    "@modelcontextprotocol/sdk": "^1.25.1",
    "@opentui/core": "^0.3.0",
    "adm-zip": "^0.5.16",
    chalk: "^5.4.1",
    commander: "^14.0.2",
    debug: "^4.4.3",
    esbuild: "^0.27.4",
    execa: "9.6.1",
    glob: "^11.1.0",
    "highlight.js": "^11.10.0",
    "json-schema": "^0.4.0",
    "jsonc-parser": "^3.3.1",
    open: "^10.2.0",
    "posthog-node": "^5.17.4",
    semver: "^7.7.3",
    tar: "^7.5.2"
  },
  peerDependencies: {
    typescript: ">=4.5.0"
  },
  engines: {
    bun: ">=1.3.14",
    node: ">=22.0.0"
  },
  packageManager: "bun@1.3.14"
};

// src/utils/adk-version.ts
var _cachedVersion;
function getAdkVersion() {
  if (_cachedVersion !== undefined) {
    return _cachedVersion;
  }
  try {
    const adkPackagePath = join(process.cwd(), "node_modules/@botpress/adk/package.json");
    const pkg = JSON.parse(readFileSync(adkPackagePath, "utf-8"));
    _cachedVersion = pkg.version;
  } catch {
    _cachedVersion = package_default.version;
  }
  return _cachedVersion;
}

export { package_default, getAdkVersion };
