@ottocode/server 0.1.213 → 0.1.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/index.ts +4 -0
- package/src/openapi/paths/auth.ts +497 -0
- package/src/openapi/paths/branch.ts +102 -0
- package/src/openapi/paths/config.ts +43 -0
- package/src/openapi/paths/doctor.ts +165 -0
- package/src/openapi/paths/files.ts +97 -0
- package/src/openapi/paths/git.ts +52 -0
- package/src/openapi/paths/mcp.ts +339 -0
- package/src/openapi/paths/provider-usage.ts +59 -0
- package/src/openapi/paths/research.ts +227 -0
- package/src/openapi/paths/session-approval.ts +93 -0
- package/src/openapi/paths/session-extras.ts +336 -0
- package/src/openapi/paths/session-files.ts +91 -0
- package/src/openapi/paths/setu.ts +258 -0
- package/src/openapi/paths/skills.ts +256 -0
- package/src/openapi/paths/tunnel.ts +163 -0
- package/src/openapi/schemas.ts +36 -0
- package/src/openapi/spec.ts +31 -7
- package/src/routes/doctor.ts +229 -0
- package/src/routes/sessions.ts +55 -0
- package/src/routes/skills.ts +137 -0
- package/src/runtime/agent/runner-setup.ts +3 -2
- package/src/runtime/debug/state.ts +11 -0
- package/src/runtime/message/history-builder.ts +15 -16
- package/src/runtime/provider/setu.ts +2 -2
- package/src/runtime/tools/guards.ts +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { errorResponse, projectQueryParam } from '../helpers';
|
|
2
|
+
|
|
3
|
+
export const doctorPaths = {
|
|
4
|
+
'/v1/doctor': {
|
|
5
|
+
get: {
|
|
6
|
+
tags: ['config'],
|
|
7
|
+
operationId: 'runDoctor',
|
|
8
|
+
summary: 'Run diagnostics on the current configuration',
|
|
9
|
+
parameters: [projectQueryParam()],
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: 'OK',
|
|
13
|
+
content: {
|
|
14
|
+
'application/json': {
|
|
15
|
+
schema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
providers: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
id: { type: 'string' },
|
|
24
|
+
ok: { type: 'boolean' },
|
|
25
|
+
configured: { type: 'boolean' },
|
|
26
|
+
sources: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
items: { type: 'string' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['id', 'ok', 'configured', 'sources'],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaults: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
agent: { type: 'string' },
|
|
38
|
+
provider: { type: 'string' },
|
|
39
|
+
model: { type: 'string' },
|
|
40
|
+
providerAuthorized: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: [
|
|
45
|
+
'agent',
|
|
46
|
+
'provider',
|
|
47
|
+
'model',
|
|
48
|
+
'providerAuthorized',
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
agents: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
globalPath: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
nullable: true,
|
|
57
|
+
},
|
|
58
|
+
localPath: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
nullable: true,
|
|
61
|
+
},
|
|
62
|
+
globalNames: {
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: { type: 'string' },
|
|
65
|
+
},
|
|
66
|
+
localNames: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: { type: 'string' },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: [
|
|
72
|
+
'globalPath',
|
|
73
|
+
'localPath',
|
|
74
|
+
'globalNames',
|
|
75
|
+
'localNames',
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
tools: {
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
defaultNames: {
|
|
82
|
+
type: 'array',
|
|
83
|
+
items: { type: 'string' },
|
|
84
|
+
},
|
|
85
|
+
globalPath: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
nullable: true,
|
|
88
|
+
},
|
|
89
|
+
globalNames: {
|
|
90
|
+
type: 'array',
|
|
91
|
+
items: { type: 'string' },
|
|
92
|
+
},
|
|
93
|
+
localPath: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
nullable: true,
|
|
96
|
+
},
|
|
97
|
+
localNames: {
|
|
98
|
+
type: 'array',
|
|
99
|
+
items: { type: 'string' },
|
|
100
|
+
},
|
|
101
|
+
effectiveNames: {
|
|
102
|
+
type: 'array',
|
|
103
|
+
items: { type: 'string' },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
required: [
|
|
107
|
+
'defaultNames',
|
|
108
|
+
'globalNames',
|
|
109
|
+
'localNames',
|
|
110
|
+
'effectiveNames',
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
commands: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
globalPath: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
nullable: true,
|
|
119
|
+
},
|
|
120
|
+
globalNames: {
|
|
121
|
+
type: 'array',
|
|
122
|
+
items: { type: 'string' },
|
|
123
|
+
},
|
|
124
|
+
localPath: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
nullable: true,
|
|
127
|
+
},
|
|
128
|
+
localNames: {
|
|
129
|
+
type: 'array',
|
|
130
|
+
items: { type: 'string' },
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['globalNames', 'localNames'],
|
|
134
|
+
},
|
|
135
|
+
issues: {
|
|
136
|
+
type: 'array',
|
|
137
|
+
items: { type: 'string' },
|
|
138
|
+
},
|
|
139
|
+
suggestions: {
|
|
140
|
+
type: 'array',
|
|
141
|
+
items: { type: 'string' },
|
|
142
|
+
},
|
|
143
|
+
globalAuthPath: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
nullable: true,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
required: [
|
|
149
|
+
'providers',
|
|
150
|
+
'defaults',
|
|
151
|
+
'agents',
|
|
152
|
+
'tools',
|
|
153
|
+
'commands',
|
|
154
|
+
'issues',
|
|
155
|
+
'suggestions',
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
500: errorResponse(),
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
} as const;
|
|
@@ -69,4 +69,101 @@ export const filesPaths = {
|
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
|
+
'/v1/files/tree': {
|
|
73
|
+
get: {
|
|
74
|
+
tags: ['files'],
|
|
75
|
+
operationId: 'getFileTree',
|
|
76
|
+
summary: 'Get directory tree listing',
|
|
77
|
+
parameters: [
|
|
78
|
+
projectQueryParam(),
|
|
79
|
+
{
|
|
80
|
+
in: 'query',
|
|
81
|
+
name: 'path',
|
|
82
|
+
required: false,
|
|
83
|
+
schema: { type: 'string', default: '.' },
|
|
84
|
+
description: 'Directory path relative to project root',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
responses: {
|
|
88
|
+
200: {
|
|
89
|
+
description: 'OK',
|
|
90
|
+
content: {
|
|
91
|
+
'application/json': {
|
|
92
|
+
schema: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
items: {
|
|
96
|
+
type: 'array',
|
|
97
|
+
items: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
properties: {
|
|
100
|
+
name: { type: 'string' },
|
|
101
|
+
path: { type: 'string' },
|
|
102
|
+
type: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
enum: ['file', 'directory'],
|
|
105
|
+
},
|
|
106
|
+
gitignored: { type: 'boolean' },
|
|
107
|
+
},
|
|
108
|
+
required: ['name', 'path', 'type'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
path: { type: 'string' },
|
|
112
|
+
},
|
|
113
|
+
required: ['items', 'path'],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
'/v1/files/read': {
|
|
122
|
+
get: {
|
|
123
|
+
tags: ['files'],
|
|
124
|
+
operationId: 'readFile',
|
|
125
|
+
summary: 'Read file content',
|
|
126
|
+
parameters: [
|
|
127
|
+
projectQueryParam(),
|
|
128
|
+
{
|
|
129
|
+
in: 'query',
|
|
130
|
+
name: 'path',
|
|
131
|
+
required: true,
|
|
132
|
+
schema: { type: 'string' },
|
|
133
|
+
description: 'File path relative to project root',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
responses: {
|
|
137
|
+
200: {
|
|
138
|
+
description: 'OK',
|
|
139
|
+
content: {
|
|
140
|
+
'application/json': {
|
|
141
|
+
schema: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
content: { type: 'string' },
|
|
145
|
+
path: { type: 'string' },
|
|
146
|
+
extension: { type: 'string' },
|
|
147
|
+
lineCount: { type: 'integer' },
|
|
148
|
+
},
|
|
149
|
+
required: ['content', 'path', 'extension', 'lineCount'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
400: {
|
|
155
|
+
description: 'Bad Request',
|
|
156
|
+
content: {
|
|
157
|
+
'application/json': {
|
|
158
|
+
schema: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
properties: { error: { type: 'string' } },
|
|
161
|
+
required: ['error'],
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
72
169
|
} as const;
|
package/src/openapi/paths/git.ts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { gitErrorResponse, projectQueryParam } from '../helpers';
|
|
2
2
|
|
|
3
3
|
export const gitPaths = {
|
|
4
|
+
'/v1/git/init': {
|
|
5
|
+
post: {
|
|
6
|
+
tags: ['git'],
|
|
7
|
+
operationId: 'initGitRepo',
|
|
8
|
+
summary: 'Initialize a git repository',
|
|
9
|
+
requestBody: {
|
|
10
|
+
required: false,
|
|
11
|
+
content: {
|
|
12
|
+
'application/json': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
project: { type: 'string' },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
responses: {
|
|
23
|
+
200: {
|
|
24
|
+
description: 'OK',
|
|
25
|
+
content: {
|
|
26
|
+
'application/json': {
|
|
27
|
+
schema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
status: { type: 'string', enum: ['ok'] },
|
|
31
|
+
data: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
initialized: { type: 'boolean' },
|
|
35
|
+
path: { type: 'string' },
|
|
36
|
+
},
|
|
37
|
+
required: ['initialized', 'path'],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ['status', 'data'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
500: gitErrorResponse(),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
4
49
|
'/v1/git/status': {
|
|
5
50
|
get: {
|
|
6
51
|
tags: ['git'],
|
|
@@ -51,6 +96,13 @@ export const gitPaths = {
|
|
|
51
96
|
schema: { type: 'string', enum: ['true', 'false'] },
|
|
52
97
|
description: 'Show staged diff (default: unstaged)',
|
|
53
98
|
},
|
|
99
|
+
{
|
|
100
|
+
in: 'query',
|
|
101
|
+
name: 'fullFile',
|
|
102
|
+
required: false,
|
|
103
|
+
schema: { type: 'string', enum: ['true', 'false'] },
|
|
104
|
+
description: 'Include full file content in diff',
|
|
105
|
+
},
|
|
54
106
|
],
|
|
55
107
|
responses: {
|
|
56
108
|
200: {
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { errorResponse } from '../helpers';
|
|
2
|
+
|
|
3
|
+
const nameParam = {
|
|
4
|
+
in: 'path',
|
|
5
|
+
name: 'name',
|
|
6
|
+
required: true,
|
|
7
|
+
schema: { type: 'string' },
|
|
8
|
+
description: 'MCP server name',
|
|
9
|
+
} as const;
|
|
10
|
+
|
|
11
|
+
const okErrorSchema = {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
ok: { type: 'boolean' },
|
|
15
|
+
error: { type: 'string' },
|
|
16
|
+
},
|
|
17
|
+
required: ['ok'],
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
export const mcpPaths = {
|
|
21
|
+
'/v1/mcp/servers': {
|
|
22
|
+
get: {
|
|
23
|
+
tags: ['mcp'],
|
|
24
|
+
operationId: 'listMCPServers',
|
|
25
|
+
summary: 'List configured MCP servers',
|
|
26
|
+
responses: {
|
|
27
|
+
200: {
|
|
28
|
+
description: 'OK',
|
|
29
|
+
content: {
|
|
30
|
+
'application/json': {
|
|
31
|
+
schema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
servers: {
|
|
35
|
+
type: 'array',
|
|
36
|
+
items: { $ref: '#/components/schemas/MCPServer' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: ['servers'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
post: {
|
|
47
|
+
tags: ['mcp'],
|
|
48
|
+
operationId: 'addMCPServer',
|
|
49
|
+
summary: 'Add a new MCP server',
|
|
50
|
+
requestBody: {
|
|
51
|
+
required: true,
|
|
52
|
+
content: {
|
|
53
|
+
'application/json': {
|
|
54
|
+
schema: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
name: { type: 'string' },
|
|
58
|
+
transport: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
enum: ['stdio', 'http', 'sse'],
|
|
61
|
+
default: 'stdio',
|
|
62
|
+
},
|
|
63
|
+
command: { type: 'string' },
|
|
64
|
+
args: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: { type: 'string' },
|
|
67
|
+
},
|
|
68
|
+
env: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
additionalProperties: { type: 'string' },
|
|
71
|
+
},
|
|
72
|
+
url: { type: 'string' },
|
|
73
|
+
headers: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
additionalProperties: { type: 'string' },
|
|
76
|
+
},
|
|
77
|
+
oauth: { type: 'object' },
|
|
78
|
+
scope: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: ['global', 'project'],
|
|
81
|
+
default: 'global',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ['name'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
responses: {
|
|
90
|
+
200: {
|
|
91
|
+
description: 'OK',
|
|
92
|
+
content: { 'application/json': { schema: okErrorSchema } },
|
|
93
|
+
},
|
|
94
|
+
400: errorResponse(),
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
'/v1/mcp/servers/{name}': {
|
|
99
|
+
delete: {
|
|
100
|
+
tags: ['mcp'],
|
|
101
|
+
operationId: 'removeMCPServer',
|
|
102
|
+
summary: 'Remove an MCP server',
|
|
103
|
+
parameters: [nameParam],
|
|
104
|
+
responses: {
|
|
105
|
+
200: {
|
|
106
|
+
description: 'OK',
|
|
107
|
+
content: { 'application/json': { schema: okErrorSchema } },
|
|
108
|
+
},
|
|
109
|
+
404: errorResponse(),
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
'/v1/mcp/servers/{name}/start': {
|
|
114
|
+
post: {
|
|
115
|
+
tags: ['mcp'],
|
|
116
|
+
operationId: 'startMCPServer',
|
|
117
|
+
summary: 'Start an MCP server',
|
|
118
|
+
parameters: [nameParam],
|
|
119
|
+
responses: {
|
|
120
|
+
200: {
|
|
121
|
+
description: 'OK',
|
|
122
|
+
content: {
|
|
123
|
+
'application/json': {
|
|
124
|
+
schema: {
|
|
125
|
+
type: 'object',
|
|
126
|
+
properties: {
|
|
127
|
+
ok: { type: 'boolean' },
|
|
128
|
+
name: { type: 'string' },
|
|
129
|
+
connected: { type: 'boolean' },
|
|
130
|
+
tools: {
|
|
131
|
+
type: 'array',
|
|
132
|
+
items: {
|
|
133
|
+
type: 'object',
|
|
134
|
+
properties: {
|
|
135
|
+
name: { type: 'string' },
|
|
136
|
+
description: { type: 'string' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
authRequired: { type: 'boolean' },
|
|
141
|
+
authType: { type: 'string' },
|
|
142
|
+
sessionId: { type: 'string' },
|
|
143
|
+
userCode: { type: 'string' },
|
|
144
|
+
verificationUri: { type: 'string' },
|
|
145
|
+
interval: { type: 'integer' },
|
|
146
|
+
authUrl: { type: 'string' },
|
|
147
|
+
error: { type: 'string' },
|
|
148
|
+
},
|
|
149
|
+
required: ['ok'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
404: errorResponse(),
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
'/v1/mcp/servers/{name}/stop': {
|
|
159
|
+
post: {
|
|
160
|
+
tags: ['mcp'],
|
|
161
|
+
operationId: 'stopMCPServer',
|
|
162
|
+
summary: 'Stop an MCP server',
|
|
163
|
+
parameters: [nameParam],
|
|
164
|
+
responses: {
|
|
165
|
+
200: {
|
|
166
|
+
description: 'OK',
|
|
167
|
+
content: { 'application/json': { schema: okErrorSchema } },
|
|
168
|
+
},
|
|
169
|
+
400: errorResponse(),
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
'/v1/mcp/servers/{name}/auth': {
|
|
174
|
+
post: {
|
|
175
|
+
tags: ['mcp'],
|
|
176
|
+
operationId: 'initiateMCPAuth',
|
|
177
|
+
summary: 'Initiate auth for an MCP server',
|
|
178
|
+
parameters: [nameParam],
|
|
179
|
+
responses: {
|
|
180
|
+
200: {
|
|
181
|
+
description: 'OK',
|
|
182
|
+
content: {
|
|
183
|
+
'application/json': {
|
|
184
|
+
schema: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
properties: {
|
|
187
|
+
ok: { type: 'boolean' },
|
|
188
|
+
name: { type: 'string' },
|
|
189
|
+
authUrl: { type: 'string' },
|
|
190
|
+
authType: { type: 'string' },
|
|
191
|
+
authenticated: { type: 'boolean' },
|
|
192
|
+
sessionId: { type: 'string' },
|
|
193
|
+
userCode: { type: 'string' },
|
|
194
|
+
verificationUri: { type: 'string' },
|
|
195
|
+
interval: { type: 'integer' },
|
|
196
|
+
message: { type: 'string' },
|
|
197
|
+
error: { type: 'string' },
|
|
198
|
+
},
|
|
199
|
+
required: ['ok'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
404: errorResponse(),
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
delete: {
|
|
208
|
+
tags: ['mcp'],
|
|
209
|
+
operationId: 'revokeMCPAuth',
|
|
210
|
+
summary: 'Revoke auth for an MCP server',
|
|
211
|
+
parameters: [nameParam],
|
|
212
|
+
responses: {
|
|
213
|
+
200: {
|
|
214
|
+
description: 'OK',
|
|
215
|
+
content: { 'application/json': { schema: okErrorSchema } },
|
|
216
|
+
},
|
|
217
|
+
400: errorResponse(),
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
'/v1/mcp/servers/{name}/auth/callback': {
|
|
222
|
+
post: {
|
|
223
|
+
tags: ['mcp'],
|
|
224
|
+
operationId: 'completeMCPAuth',
|
|
225
|
+
summary: 'Complete MCP server auth callback',
|
|
226
|
+
parameters: [nameParam],
|
|
227
|
+
requestBody: {
|
|
228
|
+
required: true,
|
|
229
|
+
content: {
|
|
230
|
+
'application/json': {
|
|
231
|
+
schema: {
|
|
232
|
+
type: 'object',
|
|
233
|
+
properties: {
|
|
234
|
+
code: { type: 'string' },
|
|
235
|
+
sessionId: { type: 'string' },
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
responses: {
|
|
242
|
+
200: {
|
|
243
|
+
description: 'OK',
|
|
244
|
+
content: {
|
|
245
|
+
'application/json': {
|
|
246
|
+
schema: {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {
|
|
249
|
+
ok: { type: 'boolean' },
|
|
250
|
+
status: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
enum: ['complete', 'pending', 'error'],
|
|
253
|
+
},
|
|
254
|
+
name: { type: 'string' },
|
|
255
|
+
connected: { type: 'boolean' },
|
|
256
|
+
tools: {
|
|
257
|
+
type: 'array',
|
|
258
|
+
items: {
|
|
259
|
+
type: 'object',
|
|
260
|
+
properties: {
|
|
261
|
+
name: { type: 'string' },
|
|
262
|
+
description: { type: 'string' },
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
error: { type: 'string' },
|
|
267
|
+
},
|
|
268
|
+
required: ['ok'],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
400: errorResponse(),
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
'/v1/mcp/servers/{name}/auth/status': {
|
|
278
|
+
get: {
|
|
279
|
+
tags: ['mcp'],
|
|
280
|
+
operationId: 'getMCPAuthStatus',
|
|
281
|
+
summary: 'Get auth status for an MCP server',
|
|
282
|
+
parameters: [nameParam],
|
|
283
|
+
responses: {
|
|
284
|
+
200: {
|
|
285
|
+
description: 'OK',
|
|
286
|
+
content: {
|
|
287
|
+
'application/json': {
|
|
288
|
+
schema: {
|
|
289
|
+
type: 'object',
|
|
290
|
+
properties: {
|
|
291
|
+
authenticated: { type: 'boolean' },
|
|
292
|
+
authType: { type: 'string' },
|
|
293
|
+
},
|
|
294
|
+
required: ['authenticated'],
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
'/v1/mcp/servers/{name}/test': {
|
|
303
|
+
post: {
|
|
304
|
+
tags: ['mcp'],
|
|
305
|
+
operationId: 'testMCPServer',
|
|
306
|
+
summary: 'Test connection to an MCP server',
|
|
307
|
+
parameters: [nameParam],
|
|
308
|
+
responses: {
|
|
309
|
+
200: {
|
|
310
|
+
description: 'OK',
|
|
311
|
+
content: {
|
|
312
|
+
'application/json': {
|
|
313
|
+
schema: {
|
|
314
|
+
type: 'object',
|
|
315
|
+
properties: {
|
|
316
|
+
ok: { type: 'boolean' },
|
|
317
|
+
name: { type: 'string' },
|
|
318
|
+
tools: {
|
|
319
|
+
type: 'array',
|
|
320
|
+
items: {
|
|
321
|
+
type: 'object',
|
|
322
|
+
properties: {
|
|
323
|
+
name: { type: 'string' },
|
|
324
|
+
description: { type: 'string' },
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
error: { type: 'string' },
|
|
329
|
+
},
|
|
330
|
+
required: ['ok'],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
404: errorResponse(),
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
} as const;
|