export class TestOpenCodeServerManager {
    constructor() {
        this.acquisitions = [];
        this.server = { port: 1234, url: "http://127.0.0.1:1234" };
        this.ensureRunningCount = 0;
    }
    async ensureRunning() {
        this.ensureRunningCount += 1;
        return this.server;
    }
    async acquire(options) {
        const acquisition = {
            force: options.force,
            env: options.env,
            released: false,
        };
        this.acquisitions.push(acquisition);
        return {
            server: this.server,
            release: () => {
                acquisition.released = true;
            },
        };
    }
}
export function createTestOpenCodeServerManager() {
    return new TestOpenCodeServerManager();
}
//# sourceMappingURL=test-server-manager.js.map