// ---------------------------------------------------------------------------
// Studio detect-engines route — GET /api/studio/detect-engines
// ---------------------------------------------------------------------------
// Reports availability of the two skill-authoring engines so the Studio
// CreateSkillPage can render its EngineSelector with accurate state.
//
// Both engines are first-class peer choices:
//   - VSkill skill-builder = cross-universal across 8 agents
//   - Anthropic skill-creator = richer Claude-native schema, Claude-only
//
// Ref: .specweave/increments/0734-studio-create-skill-engine-selector
// ACs: AC-US1-01, AC-US1-02, AC-US1-05
// ---------------------------------------------------------------------------
import { sendJson } from "./router.js";
import { isSkillCreatorInstalled, findSkillCreatorPath } from "../utils/skill-creator-detection.js";
import { isSkillBuilderInstalled } from "../utils/skill-builder-detection.js";
export function registerDetectEnginesRoute(router, root) {
    router.get("/api/studio/detect-engines", async (req, res) => {
        const skillBuilder = isSkillBuilderInstalled(root);
        const skillCreator = isSkillCreatorInstalled(root);
        const skillCreatorPath = skillCreator ? findSkillCreatorPath(root) : null;
        const body = {
            vskillSkillBuilder: skillBuilder.installed,
            anthropicSkillCreator: skillCreator,
            vskillVersion: skillBuilder.version,
            anthropicPath: skillCreatorPath,
        };
        sendJson(res, body, 200, req);
    });
}
//# sourceMappingURL=detect-engines-route.js.map