|
715 | 715 | "schema": { |
716 | 716 | "$ref": "#/components/schemas/ExecListResponse" |
717 | 717 | } |
718 | | - }, |
719 | | - "text/event-stream": { |
720 | | - "schema": { |
721 | | - "type": "string", |
722 | | - "description": "Server-Sent Events stream of exec updates" |
723 | | - } |
724 | 718 | } |
725 | 719 | } |
726 | 720 | }, |
|
1042 | 1036 | "200": { |
1043 | 1037 | "description": "Exec output retrieved successfully", |
1044 | 1038 | "content": { |
1045 | | - "text/plain": { |
1046 | | - "schema": { |
1047 | | - "$ref": "#/components/schemas/ExecStdout", |
1048 | | - "description": "Plain text exec output" |
1049 | | - } |
1050 | | - }, |
1051 | 1039 | "text/event-stream": { |
1052 | 1040 | "schema": { |
1053 | 1041 | "type": "string", |
|
1638 | 1626 | } |
1639 | 1627 | } |
1640 | 1628 | }, |
1641 | | - "/api/v1/ports/stream": { |
| 1629 | + "/api/v1/stream/execs": { |
| 1630 | + "get": { |
| 1631 | + "summary": "List all execs", |
| 1632 | + "tags": [ |
| 1633 | + "execs" |
| 1634 | + ], |
| 1635 | + "description": "Returns a list of all active execs using SSE.", |
| 1636 | + "operationId": "StreamExecsList", |
| 1637 | + "security": [ |
| 1638 | + { |
| 1639 | + "bearerAuth": [] |
| 1640 | + } |
| 1641 | + ], |
| 1642 | + "responses": { |
| 1643 | + "200": { |
| 1644 | + "description": "Execs retrieved successfully", |
| 1645 | + "content": { |
| 1646 | + "text/event-stream": { |
| 1647 | + "schema": { |
| 1648 | + "type": "string", |
| 1649 | + "description": "Server-Sent Events stream of exec updates" |
| 1650 | + } |
| 1651 | + } |
| 1652 | + } |
| 1653 | + }, |
| 1654 | + "401": { |
| 1655 | + "description": "Unauthorized", |
| 1656 | + "content": { |
| 1657 | + "application/json": { |
| 1658 | + "schema": { |
| 1659 | + "$ref": "#/components/schemas/Error" |
| 1660 | + } |
| 1661 | + } |
| 1662 | + } |
| 1663 | + }, |
| 1664 | + "default": { |
| 1665 | + "description": "Unexpected Error", |
| 1666 | + "content": { |
| 1667 | + "application/json": { |
| 1668 | + "schema": { |
| 1669 | + "$ref": "#/components/schemas/Error" |
| 1670 | + } |
| 1671 | + } |
| 1672 | + } |
| 1673 | + } |
| 1674 | + } |
| 1675 | + } |
| 1676 | + }, |
| 1677 | + "/api/v1/stream/ports": { |
1642 | 1678 | "get": { |
1643 | 1679 | "summary": "List open ports using Server-Sent Events (SSE)", |
1644 | 1680 | "tags": [ |
1645 | 1681 | "ports" |
1646 | 1682 | ], |
1647 | 1683 | "description": "Lists all open TCP ports on the system AND LISTEN TO THE CHANGES, excluding ignored ports configured in the server.", |
1648 | | - "operationId": "ListPortsSSE", |
| 1684 | + "operationId": "StreamPortsList", |
1649 | 1685 | "security": [ |
1650 | 1686 | { |
1651 | 1687 | "bearerAuth": [] |
|
1889 | 1925 | "pid": { |
1890 | 1926 | "type": "integer", |
1891 | 1927 | "description": "Process ID of the exec" |
| 1928 | + }, |
| 1929 | + "interactive": { |
| 1930 | + "type": "boolean", |
| 1931 | + "description": "Whether the exec is interactive" |
| 1932 | + }, |
| 1933 | + "exitCode": { |
| 1934 | + "type": "integer", |
| 1935 | + "description": "Exit code of the process (only present when process has exited)" |
1892 | 1936 | } |
1893 | 1937 | }, |
1894 | 1938 | "required": [ |
1895 | 1939 | "id", |
1896 | 1940 | "command", |
1897 | 1941 | "args", |
1898 | 1942 | "status", |
1899 | | - "pid" |
| 1943 | + "pid", |
| 1944 | + "interactive", |
| 1945 | + "exitCode" |
1900 | 1946 | ] |
1901 | 1947 | }, |
1902 | 1948 | "ExecListResponse": { |
|
1969 | 2015 | "message" |
1970 | 2016 | ] |
1971 | 2017 | }, |
1972 | | - "ExecStdout": { |
1973 | | - "type": "object", |
1974 | | - "properties": { |
1975 | | - "type": { |
1976 | | - "type": "string", |
1977 | | - "description": "Type of the exec output", |
1978 | | - "enum": [ |
1979 | | - "stdout", |
1980 | | - "stderr" |
1981 | | - ] |
1982 | | - }, |
1983 | | - "output": { |
1984 | | - "type": "string", |
1985 | | - "description": "Data associated with the exec output" |
1986 | | - }, |
1987 | | - "sequence": { |
1988 | | - "type": "integer", |
1989 | | - "format": "int32", |
1990 | | - "description": "Sequence number of the output message" |
1991 | | - }, |
1992 | | - "timestamp": { |
1993 | | - "type": "string", |
1994 | | - "format": "date-time", |
1995 | | - "description": "Timestamp of when the output was generated" |
1996 | | - } |
1997 | | - }, |
1998 | | - "required": [ |
1999 | | - "type", |
2000 | | - "output", |
2001 | | - "sequence" |
2002 | | - ] |
2003 | | - }, |
2004 | 2018 | "ExecStdin": { |
2005 | 2019 | "type": "object", |
2006 | 2020 | "properties": { |
|
2296 | 2310 | "ports" |
2297 | 2311 | ] |
2298 | 2312 | }, |
| 2313 | + "ExecStdout": { |
| 2314 | + "type": "object", |
| 2315 | + "properties": { |
| 2316 | + "type": { |
| 2317 | + "type": "string", |
| 2318 | + "description": "Type of the exec output", |
| 2319 | + "enum": [ |
| 2320 | + "stdout", |
| 2321 | + "stderr" |
| 2322 | + ] |
| 2323 | + }, |
| 2324 | + "output": { |
| 2325 | + "type": "string", |
| 2326 | + "description": "Data associated with the exec output" |
| 2327 | + }, |
| 2328 | + "sequence": { |
| 2329 | + "type": "integer", |
| 2330 | + "format": "int32", |
| 2331 | + "description": "Sequence number of the output message" |
| 2332 | + }, |
| 2333 | + "timestamp": { |
| 2334 | + "type": "string", |
| 2335 | + "format": "date-time", |
| 2336 | + "description": "Timestamp of when the output was generated" |
| 2337 | + }, |
| 2338 | + "exitCode": { |
| 2339 | + "type": "integer", |
| 2340 | + "description": "Exit code of the process (only present when process has exited)" |
| 2341 | + } |
| 2342 | + }, |
| 2343 | + "required": [ |
| 2344 | + "type", |
| 2345 | + "output", |
| 2346 | + "sequence", |
| 2347 | + "exitCode" |
| 2348 | + ] |
| 2349 | + }, |
2299 | 2350 | "Task": { |
2300 | 2351 | "$ref": "#/components/schemas/TaskItem" |
2301 | 2352 | } |
|
0 commit comments