import { defineHandler } from '@kb-labs/sdk';
import { SessionManager } from '@kb-labs/agent-core';

// src/rest/handlers/get-session-handler.ts
var get_session_handler_default = defineHandler({
  async execute(ctx, input) {
    const params = input.params;
    const sessionId = params?.sessionId;
    if (!sessionId) {
      throw new Error("Session ID is required");
    }
    const sessionManager = new SessionManager(ctx.cwd);
    const session = await sessionManager.getSessionInfo(sessionId);
    if (!session) {
      throw new Error(`Session not found: ${sessionId}`);
    }
    return { session };
  }
});

export { get_session_handler_default as default };
//# sourceMappingURL=get-session-handler.js.map
//# sourceMappingURL=get-session-handler.js.map