import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
import { init_artifacts, isCompactionCheckpointTranscriptFileName } from "./artifacts.js";
//#region src/session/parity/session-id.ts
function validateSessionId(sessionId) {
	const trimmed = sessionId.trim();
	if (!SAFE_SESSION_ID_RE.test(trimmed) || isCompactionCheckpointTranscriptFileName(`${trimmed}.jsonl`)) throw new Error(`Invalid session ID: ${sessionId}`);
	return trimmed;
}
var SAFE_SESSION_ID_RE;
var init_session_id = __esmMin((() => {
	init_artifacts();
	SAFE_SESSION_ID_RE = /^[a-z0-9][a-z0-9._-]{0,127}$/i;
}));
//#endregion
init_session_id();
export { SAFE_SESSION_ID_RE, init_session_id, validateSessionId };

//# sourceMappingURL=session-id.js.map