///
import { describe, expect, test } from "bun:test"
import { tmpdir } from "node:os"
import type { PluginInput } from "@opencode-ai/plugin"
import { BackgroundManager } from "./manager"
import { MIN_SESSION_GONE_POLLS } from "./session-existence"
import type { BackgroundTask } from "./types"
type SessionStatus = { type: string }
type SessionStatusResponse = { data: Record }
type SessionOverrides = {
status?: (() => Promise) | undefined
abort?: () => Promise