-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
102 lines (102 loc) · 2.53 KB
/
openapi.yaml
File metadata and controls
102 lines (102 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
openapi: 3.1.0
info:
title: GPTSH Exec API
version: 1.0.0
description: |
Thin HTTP API for executing commands inside a persistent bash session
with Landlock sandboxing enforced by the executor process.
servers:
- url: https://ubuntu-lxc8002.ideasmeh.com.es
security:
- bearerAuth: []
paths:
/exec:
post:
summary: Execute a shell command in the persistent bash session
operationId: execCommand
x-openai-isConsequential: false
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExecRequest"
examples:
basic:
value:
cmd: "cd /tmp && export X=1 && echo $X"
timeout_ms: 45000
responses:
"200":
description: Execution result
content:
application/json:
schema:
$ref: "#/components/schemas/ExecResponse"
examples:
success:
value:
id: 1
exit_code: 0
cwd: "/tmp"
stdout: "1\n"
stderr: ""
truncated: false
duration_ms: 12
"400":
description: Bad request (invalid JSON or missing cmd)
"401":
description: Unauthorized (missing/invalid API key)
"500":
description: Internal server error
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
schemas:
ExecRequest:
type: object
required:
- cmd
properties:
cmd:
type: string
description: Command to execute inside bash
timeout_ms:
type: integer
description: Timeout in milliseconds (clamped to 45000)
minimum: 1
maximum: 45000
ExecResponse:
type: object
required:
- id
- exit_code
- cwd
- stdout
- stderr
- truncated
- duration_ms
properties:
id:
type: integer
format: int64
exit_code:
type: integer
cwd:
type: string
stdout:
type: string
stderr:
type: string
truncated:
type: boolean
duration_ms:
type: integer
format: int64
error:
type: string
description: Executor error if one occurred