export const fatalStartupExitCode = 78;
export function validateRuntimeState(config, state) {
    if (config.role === 'secondary') {
        if (!config.agentToken) {
            throw new Error('NTERMINAL_AGENT_TOKEN is required for secondary runtime; run nterminal onboarding');
        }
        return;
    }
    if (!state.passwordCredential) {
        throw new Error(`Main runtime state at ${config.statePath} has no passwordCredential; run nterminal onboarding or restore state.json`);
    }
}
//# sourceMappingURL=runtimeState.js.map