"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../../_virtual/_rolldown/runtime.js');
const require_bin_which = require('../../bin/which.js');
let node_path = require("node:path");
node_path = require_runtime.__toESM(node_path);

//#region src/external-tools/skillspector/from-path.ts
/**
* @file `skillspectorFromPath()` — `which skillspector` lookup. Reports
*   `source: 'pipx'` when the resolved path lives under a `pipx/venvs/`
*   directory (the dev's `pipx install skillspector` path); reports `source:
*   'path'` otherwise (a one-off binary on PATH).
*/
const PIPX_PATH_SEGMENT_RE = /pipx[/\\]venvs[/\\]/;
async function skillspectorFromPath() {
	const resolved = await require_bin_which.which("skillspector", { nothrow: true });
	if (typeof resolved !== "string") return;
	const normalized = node_path.default.normalize(resolved);
	if (PIPX_PATH_SEGMENT_RE.test(normalized)) return {
		path: normalized,
		source: "pipx"
	};
	return {
		path: normalized,
		source: "path"
	};
}

//#endregion
exports.skillspectorFromPath = skillspectorFromPath;