1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Extension\Tasks\Schema\Enum;
15:
16: /**
17: * Lifecycle status of a long-running task.
18: *
19: * @see https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/seps/2663-tasks-extension.md
20: */
21: enum TaskStatus: string
22: {
23: /**
24: * The task's tool call is executing.
25: */
26: case Working = 'working';
27:
28: /**
29: * The task awaits `tasks/update` answers to its pending input requests.
30: */
31: case InputRequired = 'input_required';
32:
33: /**
34: * Terminal: the task finished with a stored result, tool errors included.
35: */
36: case Completed = 'completed';
37:
38: /**
39: * Terminal: the task was cancelled cooperatively.
40: */
41: case Cancelled = 'cancelled';
42:
43: /**
44: * Terminal: a protocol-level error ended the task.
45: */
46: case Failed = 'failed';
47: }
48: