#!/usr/bin/env node
// cli/index.ts — Planu Standalone CLI Entry Point (SPEC-609)
//
// This is the dedicated CLI binary entry (bin: "planu" / "cli").
// When invoked with no arguments and stdin is piped (MCP host context),
// we act as the MCP server. Otherwise we run the CLI router.
import { route } from './router.js';
const args = process.argv.slice(2);
// stdin.isTTY is undefined/false when piped (MCP host); true in a terminal.
if (args.length === 0 && !process.stdin.isTTY) {
    // MCP server mode — import side-effectful entry point which calls main()
    await import('../index.js');
}
else {
    await route(args);
}
//# sourceMappingURL=index.js.map