import type { AnyExecutionContext } from '../execution-context/ExecutionContext'; import type { ThreadState } from '../thread/Thread'; export declare enum PackageState { Pending = "pending", Running = "running", Crashed = "crashed", Removed = "removed" } export type PackageStateValue = PackageState | `${PackageState}`; export type ThreadStateValue = ThreadState | `${ThreadState}`; export type DebuggerTrap = () => void; export interface FrameworkMonitor { thread: { created(id: string, parentId: string | undefined, taskName: string): DebuggerTrap | undefined; stateChanged(id: string, state: ThreadStateValue): void; disposed(id: string, error?: Error): DebuggerTrap | undefined; }; effect: { attached(id: string, effectKeys: readonly string[], ctx: AnyExecutionContext): DebuggerTrap | undefined; removed(id: string): void; }; registry: { created(id: string, parentId: string | undefined): void; destroyed(id: string): void; get(threadId: string, registryId: string, name: string): DebuggerTrap | undefined; set(threadId: string, registryId: string, name: string): DebuggerTrap | undefined; }; package: { added(name: string, deps: readonly string[]): void; stateChanged(name: string, state: PackageStateValue, reason?: Error, missingDeps?: readonly string[]): void; }; onError(error: Error, id: string): DebuggerTrap | undefined; onFork(threadId: string, taskName: string): void | Promise; } export declare function setFrameworkMonitor(next: FrameworkMonitor | undefined): void; export declare function getMonitor(): FrameworkMonitor | undefined;