
import { MaybePromise } from "@copilotkit/shared";
import { RunAgentInput } from "@ag-ui/client";

//#region src/v2/runtime/core/learning.d.ts
/** Application user resolved by an Intelligence runtime. */
interface CopilotRuntimeUser {
  readonly id: string;
  readonly name: string;
}
/** Context for choosing a Learning Container through the public Intelligence SDK. */
type LearningContainerSelectorInput = {
  readonly surface: "web";
  readonly user: CopilotRuntimeUser;
  readonly agentId: string;
  readonly input: Readonly<RunAgentInput>;
} | {
  readonly surface: "channel";
  readonly user: CopilotRuntimeUser | null;
  readonly agentId: string;
  readonly input: Readonly<RunAgentInput>;
};
/** Chooses one developer-created Learning Container for an Intelligence run. */
type GetLearningContainerId = (input: LearningContainerSelectorInput) => MaybePromise<string | null | undefined>;
/** Context for choosing one Learning Container for an Intelligence run. */
type CopilotRuntimeLearningContext = {
  readonly surface: "web";
  readonly request: Request;
  readonly threadId: string;
  readonly runId: string;
  readonly agentId: string;
  readonly userId: string;
} | {
  readonly surface: "channel";
  readonly threadId: string;
  readonly runId: string;
  readonly agentId: string;
  readonly userId: string;
  readonly deliveryId: string;
};
/** Assigns each Intelligence Thread to one developer-created Learning Container. */
interface CopilotRuntimeLearningConfig {
  readonly containerId: string | ((input: CopilotRuntimeLearningContext) => MaybePromise<string | null | undefined>);
}
//#endregion
export { CopilotRuntimeLearningConfig, CopilotRuntimeLearningContext, CopilotRuntimeUser, GetLearningContainerId, LearningContainerSelectorInput };
//# sourceMappingURL=learning.d.mts.map