export type SupenThreadEventType = 'turn.started' | 'turn.completed' | 'turn.failed' | 'turn.cancelled' | 'text.delta' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'control.command.received' | 'control.command.dispatched' | 'control.command.completed' | 'control.command.failed' | 'approval.requested' | 'approval.responded' | 'folder_access.requested' | 'folder_access.approved' | 'folder_access.denied' | 'github.linked' | 'github.mcp.action' | 'github.api.fallback' | 'github.sync.status' | 'github.review.feedback' | 'plugin.snapshot' | 'plugin.command' | 'artifact.emitted' | 'warning.emitted'; export type SupenThreadEventSource = 'engine' | 'supen'; export type SupenFactOwner = 'runtime' | 'supen'; export type SupenEventPersistence = 'execution-cache' | 'control-log'; export type SupenEventVisibility = 'developer' | 'user' | 'raw'; export type SupenControlSurface = 'web' | 'cli' | 'dingtalk' | 'github' | 'system'; export type SupenControlCommandType = 'thread.start' | 'thread.resume' | 'thread.instruct' | 'thread.stop' | 'thread.interrupt' | 'approval.respond' | 'input.respond' | 'folder_access.request' | 'plugin.install' | 'plugin.configure' | 'github.link_pr' | 'github.sync' | 'github.resume_from_feedback' | 'thread.runtime.update'; export type SupenThreadStatus = 'active' | 'completed' | 'failed' | 'cancelled'; export type SupenThread = { id: string; status: SupenThreadStatus; createdAt: string; completedAt?: string; metadata?: Record; }; export type SupenTurnStatus = 'started' | 'completed' | 'failed' | 'cancelled'; export type SupenTurn = { id: string; threadId: string; status: SupenTurnStatus; createdAt: string; completedAt?: string; metadata?: Record; }; export type SupenThreadEvent = { id: string; threadId: string; turnId: string; source: SupenThreadEventSource; type: SupenThreadEventType; timestamp: string; owner?: SupenFactOwner; persistence?: SupenEventPersistence; payload: Record; }; export type SupenNormalizedThreadEvent = SupenThreadEvent & { owner: SupenFactOwner; persistence: SupenEventPersistence; visibility: SupenEventVisibility; rawEventId?: string; }; export type SupenControlLogEntry = { id: string; threadId: string; turnId?: string; timestamp: string; surface: SupenControlSurface; commandType: SupenControlCommandType; method?: string; actor?: string; correlationId?: string; status: 'received' | 'dispatched' | 'completed' | 'failed'; params?: Record; payload: Record; }; export type SupenTurnItemType = 'message' | 'tool-call' | 'tool-result' | 'reasoning' | 'artifact' | 'approval' | 'warning' | 'event-envelope'; export type SupenTurnItem = { id: string; threadId: string; turnId: string; type: SupenTurnItemType; role?: 'user' | 'assistant' | 'system'; payload: Record; }; export type SupenDriverOutput = { kind: 'thread-event'; event: SupenThreadEvent; } | { kind: 'turn-item'; item: SupenTurnItem; } | { kind: 'app-server-event'; event: SupenAppServerEvent; } | { kind: 'raw'; raw: unknown; }; export type SupenAppServerEvent = { method: string; params?: Record; }; export type BackendMcpServerConfig = { type?: 'stdio'; command: string; args?: string[]; env?: Record; }; export type ThreadMemoryRecord = { id: string; kind: 'working-note' | 'retrieval-cache' | 'draft-synthesis'; scope: 'thread' | 'task'; canonical: false; content: string; }; export type KnowledgeNoteRecord = { id: string; repoId: string; title: string; kind: 'decision' | 'workflow' | 'invariant' | 'incident' | 'architecture'; canonical: true; markdownPath: string; }; export type RuleDocumentRecord = { id: string; repoId: string; targetPath: string; canonical: true; derivedFromKnowledgeIds: string[]; }; //# sourceMappingURL=types.d.ts.map