interfaces.js 568 B

12345678910111213141516
  1. /**
  2. * Experimental task interfaces for MCP SDK.
  3. * WARNING: These APIs are experimental and may change without notice.
  4. */
  5. /**
  6. * Checks if a task status represents a terminal state.
  7. * Terminal states are those where the task has finished and will not change.
  8. *
  9. * @param status - The task status to check
  10. * @returns True if the status is terminal (completed, failed, or cancelled)
  11. * @experimental
  12. */
  13. export function isTerminal(status) {
  14. return status === 'completed' || status === 'failed' || status === 'cancelled';
  15. }
  16. //# sourceMappingURL=interfaces.js.map