import type { CreateSlotEntryRequest, SlotEntry, SlotEntryFilter, UpdateSlotEntryRequest } from "../../protocol/SlotProtocol.js"; import type { CreateAppletRequest, RevertAppletRequest, UpdateAppletRequest, Applet } from "../../protocol/AppletProtocol.js"; import type { FileSystemContext } from "./FileSystemContext.js"; /** * How an agent reaches Happy's UI slots and applets. The author session is baked in by whoever * builds this context; a tool can never claim another agent's authorship through arguments. */ export interface SlotContext { createEntry(request: Omit): Promise; createApplet(request: Omit, sourceFileSystem?: FileSystemContext): Promise; listEntries(filter?: SlotEntryFilter): Promise; listApplets(): Promise; removeEntry(id: string): Promise; revertApplet(name: string, request: RevertAppletRequest): Promise; updateEntry(id: string, request: UpdateSlotEntryRequest): Promise; updateApplet(name: string, request: UpdateAppletRequest, sourceFileSystem?: FileSystemContext): Promise; }