export const REMOTE_RUNTIME_OPERATION_MESSAGE = 'Remote controller mode only supports the current sandbox session.';
export function dispatchRemoteSessionEvent(session, event) {
    if (typeof session._handleAgentEvent !== 'function') {
        throw new Error('Pi AgentSession no longer exposes _handleAgentEvent; remote TUI event dispatch needs an update.');
    }
    session._handleAgentEvent(event);
}
export function installRemoteRuntimeOperationGuards(runtime, onBlocked) {
    const block = (operation) => async () => {
        onBlocked(operation);
        return { cancelled: true };
    };
    runtime.newSession = block('/new');
    runtime.switchSession = block('/resume');
    runtime.fork = block('/fork');
    runtime.importFromJsonl = block('/import');
}
//# sourceMappingURL=remote-runtime.js.map