Dashboard › opencode › Distillation
23ceb542-a6d5-4f4e-a346-432601caf0d4["lore_tm_v1_aNHBlWNfkhLBZrg7xVCxEW4J51p1WfLvx3ORm50Qi-o"]
packages/plugin/src/promise/session.ts defines SessionPrompt with readonly sessionID: Session.ID and messageID: SessionMessage.ID, mutable prompt: Types.DeepMutable<PromptInput.Prompt>, optional metadata?: Record<string, unknown>, and delivery: SessionInbox.Delivery.SessionContext contains readonly sessionID: Session.ID, agent: Agent.ID, and model: Model.Ref; mutable system: Array<SystemPart>, messages: Array<Message>, tools: Record<string, { description: string; input: JsonSchema.JsonSchema }>, generation: Types.DeepMutable<GenerationOptionsFields>, and providerOptions: Record<string, unknown>. The generation fields are request overrides, with unset fields retaining route and model defaults.SessionModelRequest contains readonly sessionID, agent, model, and kind, plus optional mutable baseURL?: string and mutable headers: Record<string, string>.SessionHttpRequest contains readonly sessionID, agent, model, and kind, plus mutable request: Request; SessionHttpResponse contains the same readonly identity fields and readonly original request: Request, plus mutable response: Response.SessionRetryDecision is the discriminated union { retry: false } | { retry: true; delay: number }.SessionRetry contains readonly sessionID: Session.ID, agent: Agent.ID, model: Model.Ref, error: SessionError.Error, and attempt: number, with mutable decision: SessionRetryDecision.SessionHooks maps prompt → SessionPrompt, context → SessionContext, "model.request" → SessionModelRequest, "http.request" → SessionHttpRequest, "http.response" → SessionHttpResponse, and retry → SessionRetry.SessionDomain is a Pick<SessionApi, ...> exposing exactly 14 methods in order: 1. create, 2. get, 3. switchAgent, 4. switchModel, 5. prompt, 6. generate, 7. command, 8. synthetic, 9. interrupt, 10. rename, 11. move, 12. wait, 13. context; plus readonly hook: ModelHooks<SessionHooks>.