Files
rea/src/process/CurrentEntrypointPath.ts
T
morluto 187f113f79 fix(identity)!: preserve invocation uncertainty and advertised catalogs
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>
2026-10-14 16:10:46 +08:00

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]);