[SEP-2663] refactor!: remove 2025-11 experimental tasks (#2128)

This commit is contained in:
Felix Weinberger 2026-06-02 13:04:18 +01:00 • committed by GitHub
commit c8d7401b46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 423 additions and 18280 deletions

View file

@ -1,33 +0,0 @@
import type { Task } from '@modelcontextprotocol/core';
/**
* Polls the provided getTask function until the task reaches the desired status or times out.
*/
export async function waitForTaskStatus(
getTask: (taskId: string) => Promise<Task | null | undefined>,
taskId: string,
desiredStatus: Task['status'],
{
intervalMs = 100,
timeoutMs = 10_000
}: {
intervalMs?: number;
timeoutMs?: number;
} = {}
): Promise<Task> {
const start = Date.now();
// eslint-disable-next-line no-constant-condition
while (true) {
const task = await getTask(taskId);
if (task && task.status === desiredStatus) {
return task;
}
if (Date.now() - start > timeoutMs) {
throw new Error(`Timed out waiting for task ${taskId} to reach status ${desiredStatus}`);
}
await new Promise(resolve => setTimeout(resolve, intervalMs));
}
}

View file

@ -1,3 +1,2 @@
export * from './helpers/http.js';
export * from './helpers/oauth.js';
export * from './helpers/tasks.js';