interfaces.js 671 B

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