mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
187f113f79
Capture the current entrypoint once without inventing a path. Preserve unknown registration ownership through setup and doctor, refuse unsafe registration plans, and retain exact pinned-launcher readiness checks. Hash the same full or compact schema projection advertised by each MCP server and use that identity in doctor comparisons. BREAKING CHANGE: server.command_path may be null when the invocation path is unavailable. Registration and setup statuses, and doctor classifications, may report unknown. Reviewed-PR: #3230, #3015 Co-authored-by: qorvr <330186599+qorvr@users.noreply.github.com> Co-authored-by: Hemang Varshney <218273197+hemv-857@users.noreply.github.com>
12 lines
400 B
TypeScript
12 lines
400 B
TypeScript
import { resolve } from "node:path";
|
|
|
|
/** Absolute argv entrypoint, or undefined when the process did not supply one. */
|
|
export const normalizeEntrypointPath = (
|
|
entrypoint: string | undefined,
|
|
): string | undefined =>
|
|
entrypoint === undefined || entrypoint.length === 0
|
|
? undefined
|
|
: resolve(entrypoint);
|
|
|
|
export const CURRENT_ENTRYPOINT_PATH = normalizeEntrypointPath(process.argv[1]);
|