@scalar/cli 2.0.1 → 2.5.1
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/README.md +68 -24
- package/chunks/action-37EV4UHW.js +125 -0
- package/chunks/action-4XI7XJR4.js +204 -0
- package/chunks/action-5IU77OII.js +60 -0
- package/chunks/action-B3KKREWQ.js +64 -0
- package/chunks/action-CH24QGTE.js +86 -0
- package/chunks/action-F3UX5E3M.js +522 -0
- package/chunks/action-FDB7NEOK.js +81 -0
- package/chunks/action-FIXBOJEW.js +244 -0
- package/chunks/action-G26LSVZ7.js +40 -0
- package/chunks/action-H3RTILLM.js +46 -0
- package/chunks/action-HGBBV353.js +86 -0
- package/chunks/action-IUE4IOWO.js +2142 -0
- package/chunks/action-JZLZ7ZAD.js +110 -0
- package/chunks/action-LA6KVAXQ.js +374 -0
- package/chunks/action-M7RQKBSB.js +169 -0
- package/chunks/action-MSLBC2SO.js +92 -0
- package/chunks/action-NVSZT2ZD.js +37 -0
- package/chunks/action-OGQSTRMX.js +37 -0
- package/chunks/action-PAGJ5PWC.js +60 -0
- package/chunks/action-QE2ZQQX7.js +250 -0
- package/chunks/action-QPUSPD5M.js +54 -0
- package/chunks/action-R7IMFHQ5.js +147 -0
- package/chunks/action-SH4UUXPL.js +60 -0
- package/chunks/action-SNLCIBQC.js +84 -0
- package/chunks/action-SQG3JAII.js +150 -0
- package/chunks/action-UZQJNYK4.js +18 -0
- package/chunks/action-VC4DCVST.js +68 -0
- package/chunks/action-VTVFY2MP.js +181 -0
- package/chunks/action-WFWYGY7O.js +67 -0
- package/chunks/action-XMNX5ZYT.js +197 -0
- package/chunks/agent-HCQRMHQ5.js +132 -0
- package/chunks/asyncapi-QM76O55R.js +105 -0
- package/chunks/build.action-P7FCIMYU.js +108 -0
- package/chunks/chunk-24WAOKGG.js +105 -0
- package/chunks/chunk-3L6DLIXJ.js +25530 -0
- package/chunks/chunk-3MZYUBJ6.js +49 -0
- package/chunks/chunk-3ZJYGGAA.js +30 -0
- package/chunks/chunk-4NHMAG6F.js +21 -0
- package/chunks/chunk-4ORL4MST.js +16 -0
- package/chunks/chunk-4ZDQXWBT.js +26 -0
- package/chunks/chunk-6ZMT63IV.js +19 -0
- package/chunks/chunk-7AGLC7WV.js +107 -0
- package/chunks/chunk-AEFPCC4U.js +16 -0
- package/chunks/chunk-AO3F5XWR.js +3147 -0
- package/chunks/chunk-B2MHTD3R.js +90 -0
- package/chunks/chunk-CISTON3A.js +153 -0
- package/chunks/chunk-COBPBRQF.js +25 -0
- package/chunks/chunk-F467BYYR.js +568 -0
- package/chunks/chunk-GSGZHE26.js +352 -0
- package/chunks/chunk-HCPN3KNF.js +637 -0
- package/chunks/chunk-HPL3ZZ2P.js +1726 -0
- package/chunks/chunk-IKT5F47M.js +17344 -0
- package/chunks/chunk-JFIXNSPP.js +26 -0
- package/chunks/chunk-K4DTP5TV.js +32 -0
- package/chunks/chunk-K74E42RV.js +7311 -0
- package/chunks/chunk-KHDYYVYF.js +16 -0
- package/chunks/chunk-LFU5ZUAP.js +350 -0
- package/chunks/chunk-M37TP6U2.js +445 -0
- package/chunks/chunk-OQKDBLOZ.js +741 -0
- package/chunks/chunk-P7H7GY5A.js +14 -0
- package/chunks/chunk-PBXZN65A.js +63911 -0
- package/chunks/chunk-PT5TI77I.js +34 -0
- package/chunks/chunk-Q7DOQHZN.js +404 -0
- package/chunks/chunk-T5HJUAWB.js +242 -0
- package/chunks/chunk-T7B6WNZC.js +18 -0
- package/chunks/chunk-UGGNHILG.js +38 -0
- package/chunks/chunk-VNYE4R7N.js +499 -0
- package/chunks/chunk-X5T526CE.js +23 -0
- package/chunks/chunk-XCSR4RIT.js +210 -0
- package/chunks/chunk-Z2KMGFE6.js +295 -0
- package/chunks/create.action-HDD2WUON.js +108 -0
- package/chunks/delete.action-7GOZY7ID.js +88 -0
- package/chunks/delete.action-VE66JFDS.js +96 -0
- package/chunks/get.action-2745EB4N.js +86 -0
- package/chunks/list.action-3VTXQJRA.js +116 -0
- package/chunks/list.action-4QDCZLSZ.js +95 -0
- package/chunks/publish.action-ULQLZKWU.js +190 -0
- package/chunks/update.action-6QEFP7NA.js +95 -0
- package/chunks/update.action-OROQSP2S.js +101 -0
- package/docs.html +352 -250
- package/index.js +664 -99064
- package/package.json +17 -11
|
@@ -0,0 +1,1726 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
billingPlanSchema
|
|
4
|
+
} from "./chunk-VNYE4R7N.js";
|
|
5
|
+
import {
|
|
6
|
+
sharedProjectSchema
|
|
7
|
+
} from "./chunk-OQKDBLOZ.js";
|
|
8
|
+
import {
|
|
9
|
+
SCALAR_AGENT_KEY_HEADER,
|
|
10
|
+
agentDocsProjectSchema,
|
|
11
|
+
agentKeySchema,
|
|
12
|
+
docsProjectTypes,
|
|
13
|
+
embedStatuses,
|
|
14
|
+
mcpAuthConfigSchema,
|
|
15
|
+
mcpDocsProjectTrackModes,
|
|
16
|
+
mcpDocumentTrackModes,
|
|
17
|
+
mcpInstallationSchema,
|
|
18
|
+
mcpServerDocsPageToolSchema,
|
|
19
|
+
mcpServerOperationToolSchema,
|
|
20
|
+
mcpServerSchema,
|
|
21
|
+
mcpServerToolModes,
|
|
22
|
+
mcpServerVersionSchema,
|
|
23
|
+
monthlyUsageSchema
|
|
24
|
+
} from "./chunk-GSGZHE26.js";
|
|
25
|
+
import {
|
|
26
|
+
external_exports,
|
|
27
|
+
nanoidSchema,
|
|
28
|
+
slugSchema
|
|
29
|
+
} from "./chunk-IKT5F47M.js";
|
|
30
|
+
|
|
31
|
+
// ../../packages/entities/dist/api/agent/shared.js
|
|
32
|
+
var agentApiErrorSchema = external_exports.object({
|
|
33
|
+
code: external_exports.string(),
|
|
34
|
+
message: external_exports.string(),
|
|
35
|
+
detail: external_exports.unknown().optional()
|
|
36
|
+
});
|
|
37
|
+
var pubsubPushMessageSchema = external_exports.object({
|
|
38
|
+
deliveryAttempt: external_exports.number().optional(),
|
|
39
|
+
message: external_exports.object({
|
|
40
|
+
data: external_exports.string(),
|
|
41
|
+
messageId: external_exports.string(),
|
|
42
|
+
publishTime: external_exports.coerce.date(),
|
|
43
|
+
attributes: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
44
|
+
orderingKey: external_exports.string().optional()
|
|
45
|
+
}),
|
|
46
|
+
subscription: external_exports.string()
|
|
47
|
+
});
|
|
48
|
+
var bumpKindSchema = external_exports.enum(["patch", "minor", "major"]);
|
|
49
|
+
var bumpStrategySchema = external_exports.enum(["new-version", "in-place"]);
|
|
50
|
+
var semverParamSchema = external_exports.string().regex(/^\d+\.\d+\.\d+$/, "semver MAJOR.MINOR.PATCH");
|
|
51
|
+
var installationParamSchema = external_exports.string().regex(/^[^@/]+(@[^@/]+)?$/, "installationId or installationId@version");
|
|
52
|
+
|
|
53
|
+
// ../../packages/entities/dist/api/agent/analytics.js
|
|
54
|
+
var analyticsRangeSchema = external_exports.enum(["24h", "7d", "30d", "90d"]);
|
|
55
|
+
var analyticsGranularitySchema = external_exports.enum(["hour", "day"]);
|
|
56
|
+
var mcpConsumerKindSchema = external_exports.enum([
|
|
57
|
+
"oauth",
|
|
58
|
+
"personal_token",
|
|
59
|
+
"docs_agent_token",
|
|
60
|
+
"anonymous"
|
|
61
|
+
]);
|
|
62
|
+
var mcpToolKindSchema = external_exports.enum(["generic", "curated"]);
|
|
63
|
+
var mcpToolCategorySchema = external_exports.enum(["openapi", "docs"]);
|
|
64
|
+
var mcpExportDatasetSchema = external_exports.enum([
|
|
65
|
+
"tools",
|
|
66
|
+
"consumers",
|
|
67
|
+
"timeseries"
|
|
68
|
+
]);
|
|
69
|
+
var mcpAnalyticsParamsSchema = external_exports.object({
|
|
70
|
+
range: analyticsRangeSchema.default("7d"),
|
|
71
|
+
granularity: analyticsGranularitySchema.optional(),
|
|
72
|
+
installationId: external_exports.string().optional(),
|
|
73
|
+
clientName: external_exports.string().optional(),
|
|
74
|
+
/** Registered-client identity, not a person — see `CLIENT_ID_SQL`. */
|
|
75
|
+
clientId: external_exports.string().optional()
|
|
76
|
+
});
|
|
77
|
+
var mcpTimeseriesPointSchema = external_exports.object({
|
|
78
|
+
bucket: external_exports.string(),
|
|
79
|
+
calls: external_exports.number().int().nonnegative(),
|
|
80
|
+
errors: external_exports.number().int().nonnegative(),
|
|
81
|
+
p50_ms: external_exports.number().nonnegative(),
|
|
82
|
+
p95_ms: external_exports.number().nonnegative(),
|
|
83
|
+
p99_ms: external_exports.number().nonnegative(),
|
|
84
|
+
/**
|
|
85
|
+
* Exact per bucket: the rotating pseudonym is stable within a UTC day, and
|
|
86
|
+
* both the hour and day granularities sit inside one.
|
|
87
|
+
*/
|
|
88
|
+
unique_consumers: external_exports.number().int().nonnegative()
|
|
89
|
+
});
|
|
90
|
+
var mcpCategoryTotalsSchema = external_exports.object({
|
|
91
|
+
openapi: external_exports.number().int().nonnegative(),
|
|
92
|
+
docs: external_exports.number().int().nonnegative()
|
|
93
|
+
});
|
|
94
|
+
var mcpOverviewTotalsSchema = external_exports.object({
|
|
95
|
+
calls: external_exports.number().int().nonnegative(),
|
|
96
|
+
errors: external_exports.number().int().nonnegative(),
|
|
97
|
+
/**
|
|
98
|
+
* The busiest single UTC day in the range, not a range-wide unique count.
|
|
99
|
+
* `distinct_id` rotates daily, so summing across days would overcount a
|
|
100
|
+
* returning caller once per day.
|
|
101
|
+
*/
|
|
102
|
+
peak_daily_consumers: external_exports.number().int().nonnegative(),
|
|
103
|
+
p50_ms: external_exports.number().nonnegative(),
|
|
104
|
+
p95_ms: external_exports.number().nonnegative(),
|
|
105
|
+
p99_ms: external_exports.number().nonnegative(),
|
|
106
|
+
error_rate: external_exports.number().min(0).max(1)
|
|
107
|
+
});
|
|
108
|
+
var mcpOverviewResultSchema = external_exports.object({
|
|
109
|
+
totals: mcpOverviewTotalsSchema,
|
|
110
|
+
timeseries: external_exports.array(mcpTimeseriesPointSchema),
|
|
111
|
+
byCategory: mcpCategoryTotalsSchema
|
|
112
|
+
});
|
|
113
|
+
var mcpToolStatSchema = external_exports.object({
|
|
114
|
+
tool_name: external_exports.string(),
|
|
115
|
+
tool_kind: mcpToolKindSchema,
|
|
116
|
+
tool_category: mcpToolCategorySchema.nullable(),
|
|
117
|
+
operation_id: external_exports.string().nullable(),
|
|
118
|
+
calls: external_exports.number().int().nonnegative(),
|
|
119
|
+
errors: external_exports.number().int().nonnegative(),
|
|
120
|
+
p50_ms: external_exports.number().nonnegative(),
|
|
121
|
+
p95_ms: external_exports.number().nonnegative(),
|
|
122
|
+
p99_ms: external_exports.number().nonnegative(),
|
|
123
|
+
error_rate: external_exports.number().min(0).max(1),
|
|
124
|
+
/** Busiest single UTC day, for the same reason as the overview total. */
|
|
125
|
+
peak_daily_consumers: external_exports.number().int().nonnegative()
|
|
126
|
+
});
|
|
127
|
+
var mcpToolsResultSchema = external_exports.object({
|
|
128
|
+
tools: external_exports.array(mcpToolStatSchema)
|
|
129
|
+
});
|
|
130
|
+
var mcpConsumerStatSchema = external_exports.object({
|
|
131
|
+
client_id: external_exports.string(),
|
|
132
|
+
client_label: external_exports.string(),
|
|
133
|
+
client_name: external_exports.string(),
|
|
134
|
+
consumer_kind: mcpConsumerKindSchema,
|
|
135
|
+
calls: external_exports.number().int().nonnegative(),
|
|
136
|
+
errors: external_exports.number().int().nonnegative(),
|
|
137
|
+
first_seen: external_exports.string(),
|
|
138
|
+
last_seen: external_exports.string(),
|
|
139
|
+
top_tool: external_exports.string().nullable()
|
|
140
|
+
});
|
|
141
|
+
var mcpConsumersResultSchema = external_exports.object({
|
|
142
|
+
consumers: external_exports.array(mcpConsumerStatSchema)
|
|
143
|
+
});
|
|
144
|
+
var mcpLatencyByToolEntrySchema = external_exports.object({
|
|
145
|
+
tool_name: external_exports.string(),
|
|
146
|
+
calls: external_exports.number().int().nonnegative(),
|
|
147
|
+
p50_ms: external_exports.number().nonnegative(),
|
|
148
|
+
p95_ms: external_exports.number().nonnegative(),
|
|
149
|
+
p99_ms: external_exports.number().nonnegative()
|
|
150
|
+
});
|
|
151
|
+
var mcpLatencyResultSchema = external_exports.object({
|
|
152
|
+
tools: external_exports.array(mcpLatencyByToolEntrySchema)
|
|
153
|
+
});
|
|
154
|
+
var mcpErrorEntrySchema = external_exports.object({
|
|
155
|
+
error_code: external_exports.string(),
|
|
156
|
+
count: external_exports.number().int().nonnegative()
|
|
157
|
+
});
|
|
158
|
+
var mcpErrorsResultSchema = external_exports.object({
|
|
159
|
+
totals: external_exports.object({
|
|
160
|
+
calls: external_exports.number().int().nonnegative(),
|
|
161
|
+
errors: external_exports.number().int().nonnegative(),
|
|
162
|
+
error_rate: external_exports.number().min(0).max(1)
|
|
163
|
+
}),
|
|
164
|
+
byCode: external_exports.array(mcpErrorEntrySchema)
|
|
165
|
+
});
|
|
166
|
+
var analyticsServerParams = external_exports.object({ mcpServerId: external_exports.uuid() });
|
|
167
|
+
var analyticsListQuerySchema = external_exports.object({
|
|
168
|
+
range: analyticsRangeSchema.default("7d"),
|
|
169
|
+
limit: external_exports.coerce.number().int().min(1).max(100).default(20),
|
|
170
|
+
installationId: external_exports.string().optional(),
|
|
171
|
+
clientName: external_exports.string().optional(),
|
|
172
|
+
clientId: external_exports.string().optional()
|
|
173
|
+
});
|
|
174
|
+
var analyticsRoutes = {
|
|
175
|
+
overview: {
|
|
176
|
+
method: "GET",
|
|
177
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/overview`,
|
|
178
|
+
params: analyticsServerParams,
|
|
179
|
+
query: mcpAnalyticsParamsSchema,
|
|
180
|
+
response: mcpOverviewResultSchema,
|
|
181
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
182
|
+
summary: "Get MCP server analytics overview"
|
|
183
|
+
},
|
|
184
|
+
tools: {
|
|
185
|
+
method: "GET",
|
|
186
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/tools`,
|
|
187
|
+
params: analyticsServerParams,
|
|
188
|
+
query: analyticsListQuerySchema,
|
|
189
|
+
response: mcpToolsResultSchema,
|
|
190
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
191
|
+
summary: "Get MCP server tool analytics"
|
|
192
|
+
},
|
|
193
|
+
consumers: {
|
|
194
|
+
method: "GET",
|
|
195
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/consumers`,
|
|
196
|
+
params: analyticsServerParams,
|
|
197
|
+
query: analyticsListQuerySchema,
|
|
198
|
+
response: mcpConsumersResultSchema,
|
|
199
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
200
|
+
summary: "Get MCP server consumer analytics"
|
|
201
|
+
},
|
|
202
|
+
latency: {
|
|
203
|
+
method: "GET",
|
|
204
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/latency`,
|
|
205
|
+
params: analyticsServerParams,
|
|
206
|
+
query: analyticsListQuerySchema,
|
|
207
|
+
response: mcpLatencyResultSchema,
|
|
208
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
209
|
+
summary: "Get MCP server latency analytics"
|
|
210
|
+
},
|
|
211
|
+
errors: {
|
|
212
|
+
method: "GET",
|
|
213
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/errors`,
|
|
214
|
+
params: analyticsServerParams,
|
|
215
|
+
query: external_exports.object({
|
|
216
|
+
range: analyticsRangeSchema.default("7d"),
|
|
217
|
+
limit: external_exports.coerce.number().int().min(1).max(100).default(10),
|
|
218
|
+
installationId: external_exports.string().optional(),
|
|
219
|
+
clientName: external_exports.string().optional(),
|
|
220
|
+
clientId: external_exports.string().optional()
|
|
221
|
+
}),
|
|
222
|
+
response: mcpErrorsResultSchema,
|
|
223
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
224
|
+
summary: "Get MCP server error analytics"
|
|
225
|
+
},
|
|
226
|
+
export: {
|
|
227
|
+
method: "GET",
|
|
228
|
+
path: (p) => `/analytics/mcp-servers/${p.mcpServerId}/export`,
|
|
229
|
+
params: analyticsServerParams,
|
|
230
|
+
query: external_exports.object({
|
|
231
|
+
range: analyticsRangeSchema.default("7d"),
|
|
232
|
+
dataset: mcpExportDatasetSchema,
|
|
233
|
+
installationId: external_exports.string().optional(),
|
|
234
|
+
clientName: external_exports.string().optional(),
|
|
235
|
+
clientId: external_exports.string().optional()
|
|
236
|
+
}),
|
|
237
|
+
responses: { 403: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
238
|
+
responseMediaType: "text/csv",
|
|
239
|
+
summary: "Export MCP server analytics as CSV"
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// ../../packages/entities/dist/api/agent/dashboard.js
|
|
244
|
+
var DASHBOARD_EDITOR_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
245
|
+
"read_file",
|
|
246
|
+
"list_files",
|
|
247
|
+
"glob",
|
|
248
|
+
"grep",
|
|
249
|
+
"write_file",
|
|
250
|
+
"edit_file",
|
|
251
|
+
"get_current_file",
|
|
252
|
+
"validate_openapi",
|
|
253
|
+
"summarize_openapi",
|
|
254
|
+
"validate_config"
|
|
255
|
+
]);
|
|
256
|
+
var DASHBOARD_SDK_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
257
|
+
"get_sdk_config",
|
|
258
|
+
"set_sdk_config"
|
|
259
|
+
]);
|
|
260
|
+
var DASHBOARD_SDK_CONTEXT_KEY = "sdk-studio";
|
|
261
|
+
var DASHBOARD_EDITOR_CONTEXT_KEY = "docs-editor";
|
|
262
|
+
var DASHBOARD_CHAT_CONTEXT_MAX_CHARS = 12e4;
|
|
263
|
+
var DASHBOARD_CHAT_MAX_MESSAGES = 400;
|
|
264
|
+
var dashboardChatSettingsSchema = external_exports.object({
|
|
265
|
+
mode: external_exports.enum(["fast", "medium", "max"]).default("medium")
|
|
266
|
+
});
|
|
267
|
+
var dashboardChatBodySchema = external_exports.object({
|
|
268
|
+
id: external_exports.string(),
|
|
269
|
+
/**
|
|
270
|
+
* Only what the browser composed or the model answered. A `system`
|
|
271
|
+
* message is the server's alone, so one a client stamps is refused at
|
|
272
|
+
* the door rather than joined to the real system prompt.
|
|
273
|
+
*/
|
|
274
|
+
messages: external_exports.array(external_exports.object({ role: external_exports.enum(["user", "assistant"]) }).loose()).max(DASHBOARD_CHAT_MAX_MESSAGES),
|
|
275
|
+
/**
|
|
276
|
+
* `{ [pluginId]: slice }` — opaque here. Each server tool pack validates
|
|
277
|
+
* its own key and ignores the rest, so a client ahead of the server can
|
|
278
|
+
* send a slice nothing reads yet.
|
|
279
|
+
*/
|
|
280
|
+
context: external_exports.record(external_exports.string(), external_exports.unknown()).default({}),
|
|
281
|
+
settings: dashboardChatSettingsSchema.default({ mode: "medium" }),
|
|
282
|
+
/**
|
|
283
|
+
* Wire names the browser can execute this turn. The server offers a
|
|
284
|
+
* client-executed tool only when it is named here, so a call the browser
|
|
285
|
+
* cannot answer never reaches the model.
|
|
286
|
+
*/
|
|
287
|
+
clientTools: external_exports.array(external_exports.string().max(64)).max(64).default([])
|
|
288
|
+
}).superRefine((body, ctx) => {
|
|
289
|
+
if (JSON.stringify(body.context).length > DASHBOARD_CHAT_CONTEXT_MAX_CHARS) {
|
|
290
|
+
ctx.addIssue({ code: "custom", message: "context too large" });
|
|
291
|
+
}
|
|
292
|
+
if (body.clientTools.some((name) => DASHBOARD_SDK_TOOL_NAMES.has(name)) && !body.context[DASHBOARD_SDK_CONTEXT_KEY]) {
|
|
293
|
+
ctx.addIssue({
|
|
294
|
+
code: "custom",
|
|
295
|
+
message: "sdk tools require the sdk-studio context slice"
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
if (body.clientTools.some((name) => DASHBOARD_EDITOR_TOOL_NAMES.has(name)) && !body.context[DASHBOARD_EDITOR_CONTEXT_KEY]) {
|
|
299
|
+
ctx.addIssue({
|
|
300
|
+
code: "custom",
|
|
301
|
+
message: "editor tools require docs-editor context"
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
var dashboardRoutes = {
|
|
306
|
+
chat: {
|
|
307
|
+
method: "POST",
|
|
308
|
+
path: () => "/dashboard/chat",
|
|
309
|
+
body: dashboardChatBodySchema,
|
|
310
|
+
responses: {
|
|
311
|
+
400: agentApiErrorSchema,
|
|
312
|
+
402: agentApiErrorSchema,
|
|
313
|
+
403: agentApiErrorSchema
|
|
314
|
+
},
|
|
315
|
+
responseMediaType: "text/event-stream",
|
|
316
|
+
summary: "Chat with the dashboard assistant"
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// ../../packages/entities/dist/api/agent/docs.js
|
|
321
|
+
var docsProjectAgentInfoSchema = external_exports.object({
|
|
322
|
+
id: external_exports.string(),
|
|
323
|
+
mcpServerId: external_exports.string().nullable(),
|
|
324
|
+
mcpInstallationId: external_exports.string().nullable(),
|
|
325
|
+
mcpServerName: external_exports.string().nullable(),
|
|
326
|
+
mcpServerSlug: external_exports.string().nullable(),
|
|
327
|
+
mcpInstallationSlug: external_exports.string().nullable()
|
|
328
|
+
});
|
|
329
|
+
var docsChatContextSchema = external_exports.object({
|
|
330
|
+
/** The Vue-router path of the current page, without the hash. */
|
|
331
|
+
path: external_exports.string().max(2048),
|
|
332
|
+
/** The `route.meta.page` type (e.g. `page`, `openapi-single`), for phrasing. */
|
|
333
|
+
kind: external_exports.string().max(64).optional(),
|
|
334
|
+
/** The OpenAPI/AsyncAPI document the page belongs to, when it is a reference. */
|
|
335
|
+
documentUid: external_exports.string().max(256).optional(),
|
|
336
|
+
/**
|
|
337
|
+
* Full navigation id of the entity in view. Lets the server rebuild the
|
|
338
|
+
* anchored `to` for a single-page reference operation and match it.
|
|
339
|
+
*/
|
|
340
|
+
navId: external_exports.string().max(2048).optional()
|
|
341
|
+
});
|
|
342
|
+
var docsRoutes = {
|
|
343
|
+
getProject: {
|
|
344
|
+
method: "GET",
|
|
345
|
+
path: (p) => `/docs/projects/${p.projectUid}`,
|
|
346
|
+
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
347
|
+
response: docsProjectAgentInfoSchema,
|
|
348
|
+
responses: { 404: agentApiErrorSchema },
|
|
349
|
+
summary: "Get the agent info for a docs project"
|
|
350
|
+
},
|
|
351
|
+
updateProject: {
|
|
352
|
+
method: "PATCH",
|
|
353
|
+
path: (p) => `/docs/projects/${p.projectUid}`,
|
|
354
|
+
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
355
|
+
body: external_exports.object({
|
|
356
|
+
mcpServerId: external_exports.string().nullable(),
|
|
357
|
+
mcpInstallationId: external_exports.string().nullable()
|
|
358
|
+
}).partial(),
|
|
359
|
+
response: agentDocsProjectSchema,
|
|
360
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
361
|
+
summary: "Update the MCP links of a docs project"
|
|
362
|
+
},
|
|
363
|
+
initAgentInProject: {
|
|
364
|
+
method: "POST",
|
|
365
|
+
path: (p) => `/docs/projects/${p.projectUid}/init`,
|
|
366
|
+
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
367
|
+
response: external_exports.null(),
|
|
368
|
+
responses: { 400: agentApiErrorSchema },
|
|
369
|
+
summary: "Initialize the agent for a docs project"
|
|
370
|
+
},
|
|
371
|
+
embedPublish: {
|
|
372
|
+
method: "POST",
|
|
373
|
+
path: (p) => `/docs/publishes/${p.publishUid}/embed`,
|
|
374
|
+
params: external_exports.object({ publishUid: nanoidSchema }),
|
|
375
|
+
response: external_exports.null(),
|
|
376
|
+
responses: { 404: agentApiErrorSchema, 500: agentApiErrorSchema },
|
|
377
|
+
summary: "Embed a docs publish (internal)"
|
|
378
|
+
},
|
|
379
|
+
chat: {
|
|
380
|
+
method: "POST",
|
|
381
|
+
path: () => "/docs/chat",
|
|
382
|
+
body: external_exports.object({
|
|
383
|
+
id: external_exports.string(),
|
|
384
|
+
messages: external_exports.any().array(),
|
|
385
|
+
// What the visitor is currently viewing, so the agent can answer about it.
|
|
386
|
+
// Optional so a docs bundle that sends no context keeps working unchanged.
|
|
387
|
+
context: docsChatContextSchema.optional()
|
|
388
|
+
}),
|
|
389
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
390
|
+
responseMediaType: "text/event-stream",
|
|
391
|
+
summary: "Chat with the docs agent"
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// ../../packages/entities/dist/api/agent/editor.js
|
|
396
|
+
var editorChatBodySchema = external_exports.object({
|
|
397
|
+
id: external_exports.string(),
|
|
398
|
+
projectUid: external_exports.string(),
|
|
399
|
+
mode: external_exports.enum(["fast", "medium", "max"]).default("medium"),
|
|
400
|
+
messages: external_exports.any().array(),
|
|
401
|
+
context: external_exports.object({
|
|
402
|
+
openFile: external_exports.object({
|
|
403
|
+
path: external_exports.string(),
|
|
404
|
+
content: external_exports.string(),
|
|
405
|
+
isDirty: external_exports.boolean()
|
|
406
|
+
}).nullable().optional(),
|
|
407
|
+
pinnedFiles: external_exports.array(external_exports.object({
|
|
408
|
+
path: external_exports.string(),
|
|
409
|
+
content: external_exports.string()
|
|
410
|
+
})).default([]),
|
|
411
|
+
repoMetadata: external_exports.object({
|
|
412
|
+
topLevelDirs: external_exports.array(external_exports.string()).default([]),
|
|
413
|
+
totalFileCount: external_exports.number().int().nonnegative().default(0),
|
|
414
|
+
depthOneListing: external_exports.array(external_exports.object({
|
|
415
|
+
path: external_exports.string(),
|
|
416
|
+
type: external_exports.enum(["file", "directory"])
|
|
417
|
+
})).optional()
|
|
418
|
+
}).default({ topLevelDirs: [], totalFileCount: 0 }),
|
|
419
|
+
scalarConfig: external_exports.object({
|
|
420
|
+
path: external_exports.string(),
|
|
421
|
+
content: external_exports.string()
|
|
422
|
+
}).nullable().optional()
|
|
423
|
+
}).default({
|
|
424
|
+
pinnedFiles: [],
|
|
425
|
+
repoMetadata: { topLevelDirs: [], totalFileCount: 0 }
|
|
426
|
+
})
|
|
427
|
+
});
|
|
428
|
+
var MAX_TOTAL_DIFF_CHARS = 8e4;
|
|
429
|
+
var pullRequestDescriptionBodySchema = external_exports.object({
|
|
430
|
+
projectUid: external_exports.string(),
|
|
431
|
+
title: external_exports.string().max(300).default(""),
|
|
432
|
+
baseBranch: external_exports.string().max(250),
|
|
433
|
+
files: external_exports.array(external_exports.object({
|
|
434
|
+
path: external_exports.string().max(500),
|
|
435
|
+
status: external_exports.enum(["added", "modified", "deleted"]),
|
|
436
|
+
additions: external_exports.number().int().nonnegative(),
|
|
437
|
+
deletions: external_exports.number().int().nonnegative(),
|
|
438
|
+
diff: external_exports.string().max(16e3).nullable()
|
|
439
|
+
})).min(1).max(60),
|
|
440
|
+
truncated: external_exports.boolean().default(false)
|
|
441
|
+
}).refine((body) => body.files.reduce((total, file) => total + (file.diff?.length ?? 0), 0) <= MAX_TOTAL_DIFF_CHARS, { message: "Combined diff content is too large." });
|
|
442
|
+
var editorRoutes = {
|
|
443
|
+
chat: {
|
|
444
|
+
method: "POST",
|
|
445
|
+
path: () => "/editor/chat",
|
|
446
|
+
body: editorChatBodySchema,
|
|
447
|
+
responses: {
|
|
448
|
+
400: agentApiErrorSchema,
|
|
449
|
+
402: agentApiErrorSchema,
|
|
450
|
+
403: agentApiErrorSchema,
|
|
451
|
+
404: agentApiErrorSchema
|
|
452
|
+
},
|
|
453
|
+
responseMediaType: "text/event-stream",
|
|
454
|
+
summary: "Chat with the docs editor agent"
|
|
455
|
+
},
|
|
456
|
+
pullRequestDescription: {
|
|
457
|
+
method: "POST",
|
|
458
|
+
path: () => "/editor/pull-request-description",
|
|
459
|
+
body: pullRequestDescriptionBodySchema,
|
|
460
|
+
response: external_exports.object({ title: external_exports.string(), description: external_exports.string() }),
|
|
461
|
+
responses: {
|
|
462
|
+
400: agentApiErrorSchema,
|
|
463
|
+
402: agentApiErrorSchema,
|
|
464
|
+
403: agentApiErrorSchema,
|
|
465
|
+
404: agentApiErrorSchema
|
|
466
|
+
},
|
|
467
|
+
summary: "Generate a pull request title and description"
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
// ../../packages/entities/dist/api/agent/internal.js
|
|
472
|
+
var internalRoutes = {
|
|
473
|
+
getMcpInstallationBySlugs: {
|
|
474
|
+
method: "GET",
|
|
475
|
+
path: () => "/internal/mcp/by-slug",
|
|
476
|
+
query: external_exports.object({
|
|
477
|
+
teamUid: external_exports.string(),
|
|
478
|
+
serverSlug: slugSchema,
|
|
479
|
+
installationSlug: slugSchema
|
|
480
|
+
}),
|
|
481
|
+
response: external_exports.object({
|
|
482
|
+
mcpServerId: external_exports.string(),
|
|
483
|
+
mcpInstallationId: external_exports.string()
|
|
484
|
+
}),
|
|
485
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
486
|
+
summary: "Resolve an MCP installation by team and slugs"
|
|
487
|
+
},
|
|
488
|
+
createDocsProject: {
|
|
489
|
+
method: "POST",
|
|
490
|
+
path: () => "/internal/docs/projects",
|
|
491
|
+
body: external_exports.object({
|
|
492
|
+
project: sharedProjectSchema,
|
|
493
|
+
teamUid: external_exports.string(),
|
|
494
|
+
type: external_exports.enum(docsProjectTypes)
|
|
495
|
+
}),
|
|
496
|
+
response: external_exports.null(),
|
|
497
|
+
responses: { 400: agentApiErrorSchema },
|
|
498
|
+
summary: "Create a docs project synchronously"
|
|
499
|
+
},
|
|
500
|
+
migrateDocsProjectToUnifiedDocs: {
|
|
501
|
+
method: "POST",
|
|
502
|
+
path: (p) => `/internal/docs/projects/${p.projectUid}/migrate-to-unified-docs`,
|
|
503
|
+
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
504
|
+
response: external_exports.null(),
|
|
505
|
+
summary: "Reclassify a docs project as unified docs"
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
// ../../packages/entities/dist/api/agent/mcp-installations.js
|
|
510
|
+
var installationToolSchema = external_exports.object({
|
|
511
|
+
name: external_exports.string(),
|
|
512
|
+
description: external_exports.string().optional(),
|
|
513
|
+
inputSchema: external_exports.unknown()
|
|
514
|
+
});
|
|
515
|
+
var installationSummarySchema = external_exports.object({
|
|
516
|
+
id: external_exports.string(),
|
|
517
|
+
name: external_exports.string(),
|
|
518
|
+
slug: external_exports.string(),
|
|
519
|
+
isPrivate: external_exports.boolean(),
|
|
520
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
521
|
+
mcpVersion: external_exports.string().nullable().default(null)
|
|
522
|
+
});
|
|
523
|
+
var serverParams = external_exports.object({ id: external_exports.uuid() });
|
|
524
|
+
var installationParams = external_exports.object({
|
|
525
|
+
id: external_exports.uuid(),
|
|
526
|
+
installationId: external_exports.uuid()
|
|
527
|
+
});
|
|
528
|
+
var mcpInstallationRoutes = {
|
|
529
|
+
listInstallations: {
|
|
530
|
+
method: "GET",
|
|
531
|
+
path: (p) => `/mcp/servers/${p.id}/installations`,
|
|
532
|
+
params: serverParams,
|
|
533
|
+
response: installationSummarySchema.array(),
|
|
534
|
+
responses: { 400: agentApiErrorSchema },
|
|
535
|
+
summary: "List the installations of an MCP server"
|
|
536
|
+
},
|
|
537
|
+
getInstallation: {
|
|
538
|
+
method: "GET",
|
|
539
|
+
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}`,
|
|
540
|
+
params: installationParams,
|
|
541
|
+
response: mcpInstallationSchema,
|
|
542
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
543
|
+
summary: "Get an MCP installation"
|
|
544
|
+
},
|
|
545
|
+
createInstallation: {
|
|
546
|
+
method: "POST",
|
|
547
|
+
path: (p) => `/mcp/servers/${p.id}/installations`,
|
|
548
|
+
params: external_exports.object({ id: external_exports.string() }),
|
|
549
|
+
body: external_exports.object({
|
|
550
|
+
name: external_exports.string().min(1).max(100),
|
|
551
|
+
slug: slugSchema.optional(),
|
|
552
|
+
documentAuth: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
553
|
+
}),
|
|
554
|
+
response: mcpInstallationSchema,
|
|
555
|
+
responses: { 400: agentApiErrorSchema },
|
|
556
|
+
summary: "Create an MCP installation"
|
|
557
|
+
},
|
|
558
|
+
updateInstallation: {
|
|
559
|
+
method: "PATCH",
|
|
560
|
+
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}`,
|
|
561
|
+
params: installationParams,
|
|
562
|
+
body: external_exports.object({
|
|
563
|
+
name: external_exports.string().min(1).max(100),
|
|
564
|
+
slug: slugSchema,
|
|
565
|
+
documentAuth: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
566
|
+
isPrivate: external_exports.boolean(),
|
|
567
|
+
loginPortalUid: external_exports.string().nullable(),
|
|
568
|
+
authConfig: mcpAuthConfigSchema,
|
|
569
|
+
mcpVersion: semverParamSchema.nullable()
|
|
570
|
+
}).partial(),
|
|
571
|
+
response: mcpInstallationSchema,
|
|
572
|
+
responses: { 400: agentApiErrorSchema },
|
|
573
|
+
summary: "Update an MCP installation"
|
|
574
|
+
},
|
|
575
|
+
deleteInstallation: {
|
|
576
|
+
method: "DELETE",
|
|
577
|
+
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}`,
|
|
578
|
+
params: installationParams,
|
|
579
|
+
response: external_exports.null(),
|
|
580
|
+
responses: { 400: agentApiErrorSchema },
|
|
581
|
+
summary: "Delete an MCP installation"
|
|
582
|
+
},
|
|
583
|
+
addInstallationAccessGroup: {
|
|
584
|
+
method: "POST",
|
|
585
|
+
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}/access-group`,
|
|
586
|
+
params: installationParams,
|
|
587
|
+
body: external_exports.object({ groupUid: external_exports.string() }),
|
|
588
|
+
response: mcpInstallationSchema,
|
|
589
|
+
responses: { 400: agentApiErrorSchema },
|
|
590
|
+
summary: "Add an access group to an installation"
|
|
591
|
+
},
|
|
592
|
+
removeInstallationAccessGroup: {
|
|
593
|
+
method: "DELETE",
|
|
594
|
+
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}/access-group`,
|
|
595
|
+
params: installationParams,
|
|
596
|
+
body: external_exports.object({ groupUid: external_exports.string() }),
|
|
597
|
+
response: mcpInstallationSchema,
|
|
598
|
+
responses: { 400: agentApiErrorSchema },
|
|
599
|
+
summary: "Remove an access group from an installation"
|
|
600
|
+
},
|
|
601
|
+
getDefinition: {
|
|
602
|
+
method: "GET",
|
|
603
|
+
path: (p) => `/mcp/${p.installationId}`,
|
|
604
|
+
params: external_exports.object({ installationId: installationParamSchema }),
|
|
605
|
+
auth: false,
|
|
606
|
+
summary: "Get the public MCP server definition",
|
|
607
|
+
description: "Public MCP discovery endpoint. The `installationId` accepts `id` or `id@version`. The response shape is owned by the MCP protocol layer, so the contract declares no schema."
|
|
608
|
+
},
|
|
609
|
+
rpc: {
|
|
610
|
+
method: "POST",
|
|
611
|
+
path: (p) => `/mcp/${p.installationId}`,
|
|
612
|
+
params: external_exports.object({ installationId: installationParamSchema }),
|
|
613
|
+
headers: external_exports.object({
|
|
614
|
+
"X-Scalar-SDK-Provider": external_exports.enum(["VERCEL", "OPENAI", "ANTHROPIC"]).optional()
|
|
615
|
+
}),
|
|
616
|
+
auth: false,
|
|
617
|
+
responseMediaType: "text/event-stream",
|
|
618
|
+
requestBodyMediaType: "application/json",
|
|
619
|
+
requestBodyDescription: "JSON-RPC request handled by the MCP Streamable HTTP transport.",
|
|
620
|
+
summary: "Public MCP endpoint (JSON-RPC over Streamable HTTP)"
|
|
621
|
+
},
|
|
622
|
+
installationChat: {
|
|
623
|
+
method: "POST",
|
|
624
|
+
path: (p) => `/mcp/installations/${p.installationId}/chat`,
|
|
625
|
+
params: external_exports.object({ installationId: external_exports.uuid() }),
|
|
626
|
+
body: external_exports.object({
|
|
627
|
+
id: external_exports.string(),
|
|
628
|
+
messages: external_exports.any().array(),
|
|
629
|
+
system: external_exports.string().max(1e4).optional()
|
|
630
|
+
}),
|
|
631
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
632
|
+
responseMediaType: "text/event-stream",
|
|
633
|
+
summary: "Chat with an MCP installation"
|
|
634
|
+
},
|
|
635
|
+
installationTools: {
|
|
636
|
+
method: "GET",
|
|
637
|
+
path: (p) => `/mcp/installations/${p.installationId}/tools`,
|
|
638
|
+
params: external_exports.object({ installationId: external_exports.uuid() }),
|
|
639
|
+
response: external_exports.object({ tools: installationToolSchema.array() }),
|
|
640
|
+
responses: { 404: agentApiErrorSchema },
|
|
641
|
+
summary: "List the tools of an MCP installation"
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
// ../../packages/entities/dist/api/agent/mcp-servers.js
|
|
646
|
+
var mcpServerWithInstallationsSchema = mcpServerSchema.extend({
|
|
647
|
+
installations: external_exports.object({
|
|
648
|
+
id: external_exports.string(),
|
|
649
|
+
name: external_exports.string(),
|
|
650
|
+
slug: external_exports.string(),
|
|
651
|
+
mcpServerId: external_exports.string(),
|
|
652
|
+
isPrivate: external_exports.boolean()
|
|
653
|
+
}).array()
|
|
654
|
+
});
|
|
655
|
+
var mcpOperationToolDetailSchema = external_exports.object({
|
|
656
|
+
id: external_exports.string(),
|
|
657
|
+
mcpServerId: external_exports.string(),
|
|
658
|
+
operationId: external_exports.string(),
|
|
659
|
+
path: external_exports.string(),
|
|
660
|
+
method: external_exports.string(),
|
|
661
|
+
versionId: external_exports.string(),
|
|
662
|
+
searchToolEnabled: external_exports.boolean(),
|
|
663
|
+
executeRequestToolEnabled: external_exports.boolean(),
|
|
664
|
+
curatedToolEnabled: external_exports.boolean(),
|
|
665
|
+
name: external_exports.string().nullable(),
|
|
666
|
+
description: external_exports.string().nullable(),
|
|
667
|
+
deprecated: external_exports.boolean(),
|
|
668
|
+
deprecationMessage: external_exports.string().nullable(),
|
|
669
|
+
openApiOperationId: external_exports.string().nullable(),
|
|
670
|
+
operationSummary: external_exports.string().nullable()
|
|
671
|
+
});
|
|
672
|
+
var mcpDocsPageToolDetailSchema = external_exports.object({
|
|
673
|
+
id: external_exports.string(),
|
|
674
|
+
mcpServerId: external_exports.string(),
|
|
675
|
+
docsPageId: external_exports.string(),
|
|
676
|
+
title: external_exports.string(),
|
|
677
|
+
to: external_exports.string(),
|
|
678
|
+
filepath: external_exports.string(),
|
|
679
|
+
publishId: external_exports.string(),
|
|
680
|
+
searchToolEnabled: external_exports.boolean(),
|
|
681
|
+
executeRequestToolEnabled: external_exports.boolean()
|
|
682
|
+
});
|
|
683
|
+
var serverParams2 = external_exports.object({ id: external_exports.uuid() });
|
|
684
|
+
var mcpServerRoutes = {
|
|
685
|
+
listServers: {
|
|
686
|
+
method: "GET",
|
|
687
|
+
path: () => "/mcp/servers",
|
|
688
|
+
response: mcpServerWithInstallationsSchema.array(),
|
|
689
|
+
responses: { 400: agentApiErrorSchema },
|
|
690
|
+
summary: "List MCP servers for the team"
|
|
691
|
+
},
|
|
692
|
+
getServer: {
|
|
693
|
+
method: "GET",
|
|
694
|
+
path: (p) => `/mcp/servers/${p.id}`,
|
|
695
|
+
params: serverParams2,
|
|
696
|
+
response: mcpServerSchema,
|
|
697
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
698
|
+
summary: "Get an MCP server"
|
|
699
|
+
},
|
|
700
|
+
createServer: {
|
|
701
|
+
method: "POST",
|
|
702
|
+
path: () => "/mcp/servers",
|
|
703
|
+
body: external_exports.object({
|
|
704
|
+
name: external_exports.string().min(1).max(100),
|
|
705
|
+
slug: slugSchema.optional(),
|
|
706
|
+
versionUids: external_exports.array(external_exports.string()).optional(),
|
|
707
|
+
projectUids: external_exports.array(external_exports.string()).optional(),
|
|
708
|
+
documentTracking: external_exports.array(external_exports.object({
|
|
709
|
+
versionUid: external_exports.string(),
|
|
710
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
711
|
+
})).optional(),
|
|
712
|
+
docsProjectTracking: external_exports.array(external_exports.object({
|
|
713
|
+
projectUid: external_exports.string(),
|
|
714
|
+
trackMode: external_exports.enum(mcpDocsProjectTrackModes)
|
|
715
|
+
})).optional(),
|
|
716
|
+
toolMode: external_exports.enum(mcpServerToolModes).optional()
|
|
717
|
+
}),
|
|
718
|
+
response: external_exports.object({
|
|
719
|
+
server: mcpServerSchema,
|
|
720
|
+
installation: mcpInstallationSchema
|
|
721
|
+
}),
|
|
722
|
+
responses: { 400: agentApiErrorSchema },
|
|
723
|
+
summary: "Create an MCP server"
|
|
724
|
+
},
|
|
725
|
+
createInstantServer: {
|
|
726
|
+
method: "POST",
|
|
727
|
+
path: () => "/mcp/servers/instant",
|
|
728
|
+
body: external_exports.object({
|
|
729
|
+
name: external_exports.string().min(1).max(100),
|
|
730
|
+
slug: slugSchema.optional(),
|
|
731
|
+
versionUid: external_exports.string(),
|
|
732
|
+
installationName: external_exports.string().min(1).max(100),
|
|
733
|
+
installationSlug: slugSchema.optional(),
|
|
734
|
+
documentAuth: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
735
|
+
toolMode: external_exports.enum(mcpServerToolModes).optional()
|
|
736
|
+
}),
|
|
737
|
+
response: external_exports.object({
|
|
738
|
+
server: mcpServerSchema,
|
|
739
|
+
installation: mcpInstallationSchema
|
|
740
|
+
}),
|
|
741
|
+
responses: { 400: agentApiErrorSchema },
|
|
742
|
+
summary: "Create an MCP server with an installation in one call"
|
|
743
|
+
},
|
|
744
|
+
updateServer: {
|
|
745
|
+
method: "PATCH",
|
|
746
|
+
path: (p) => `/mcp/servers/${p.id}`,
|
|
747
|
+
params: serverParams2,
|
|
748
|
+
body: external_exports.object({
|
|
749
|
+
name: external_exports.string().min(1).max(100),
|
|
750
|
+
slug: slugSchema,
|
|
751
|
+
autoAddOperations: external_exports.boolean(),
|
|
752
|
+
operations: external_exports.array(external_exports.uuid()),
|
|
753
|
+
docsPages: external_exports.array(external_exports.uuid()),
|
|
754
|
+
bumpStrategy: bumpStrategySchema,
|
|
755
|
+
bumpKind: bumpKindSchema
|
|
756
|
+
}).partial(),
|
|
757
|
+
response: mcpServerSchema,
|
|
758
|
+
responses: {
|
|
759
|
+
400: agentApiErrorSchema,
|
|
760
|
+
403: agentApiErrorSchema,
|
|
761
|
+
409: agentApiErrorSchema
|
|
762
|
+
},
|
|
763
|
+
summary: "Update an MCP server"
|
|
764
|
+
},
|
|
765
|
+
deleteServer: {
|
|
766
|
+
method: "DELETE",
|
|
767
|
+
path: (p) => `/mcp/servers/${p.id}`,
|
|
768
|
+
params: serverParams2,
|
|
769
|
+
response: external_exports.null(),
|
|
770
|
+
responses: { 400: agentApiErrorSchema },
|
|
771
|
+
summary: "Delete an MCP server"
|
|
772
|
+
},
|
|
773
|
+
getOperationToolsByVersion: {
|
|
774
|
+
method: "GET",
|
|
775
|
+
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.versionId}`,
|
|
776
|
+
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
777
|
+
response: mcpOperationToolDetailSchema.array(),
|
|
778
|
+
responses: { 400: agentApiErrorSchema },
|
|
779
|
+
summary: "List operation tools for a linked document version"
|
|
780
|
+
},
|
|
781
|
+
updateOperationTools: {
|
|
782
|
+
method: "PATCH",
|
|
783
|
+
path: (p) => `/mcp/servers/${p.id}/operation-tools`,
|
|
784
|
+
params: serverParams2,
|
|
785
|
+
body: external_exports.object({
|
|
786
|
+
operationTools: external_exports.array(external_exports.object({
|
|
787
|
+
operationId: external_exports.uuid(),
|
|
788
|
+
searchToolEnabled: external_exports.boolean(),
|
|
789
|
+
executeRequestToolEnabled: external_exports.boolean(),
|
|
790
|
+
curatedToolEnabled: external_exports.boolean()
|
|
791
|
+
}).partial({
|
|
792
|
+
searchToolEnabled: true,
|
|
793
|
+
executeRequestToolEnabled: true,
|
|
794
|
+
curatedToolEnabled: true
|
|
795
|
+
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0 || tool.curatedToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1),
|
|
796
|
+
bumpStrategy: bumpStrategySchema.optional(),
|
|
797
|
+
bumpKind: bumpKindSchema.optional()
|
|
798
|
+
}),
|
|
799
|
+
response: external_exports.array(mcpServerOperationToolSchema),
|
|
800
|
+
responses: {
|
|
801
|
+
400: agentApiErrorSchema,
|
|
802
|
+
403: agentApiErrorSchema,
|
|
803
|
+
409: agentApiErrorSchema
|
|
804
|
+
},
|
|
805
|
+
summary: "Update operation tool flags"
|
|
806
|
+
},
|
|
807
|
+
deleteOperationTool: {
|
|
808
|
+
method: "DELETE",
|
|
809
|
+
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.toolId}`,
|
|
810
|
+
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
811
|
+
response: external_exports.null(),
|
|
812
|
+
responses: { 400: agentApiErrorSchema },
|
|
813
|
+
summary: "Delete an operation tool"
|
|
814
|
+
},
|
|
815
|
+
deleteOperationToolsByVersion: {
|
|
816
|
+
method: "DELETE",
|
|
817
|
+
path: (p) => `/mcp/servers/${p.id}/operation-tools/versions/${p.versionId}`,
|
|
818
|
+
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
819
|
+
response: external_exports.null(),
|
|
820
|
+
responses: { 400: agentApiErrorSchema },
|
|
821
|
+
summary: "Delete all operation tools of a linked version"
|
|
822
|
+
},
|
|
823
|
+
setOperationToolMetadata: {
|
|
824
|
+
method: "PATCH",
|
|
825
|
+
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.operationToolId}/metadata`,
|
|
826
|
+
params: external_exports.object({ id: external_exports.uuid(), operationToolId: external_exports.uuid() }),
|
|
827
|
+
body: external_exports.object({
|
|
828
|
+
name: external_exports.string().nullable().optional(),
|
|
829
|
+
description: external_exports.string().nullable().optional(),
|
|
830
|
+
deprecated: external_exports.boolean().optional(),
|
|
831
|
+
deprecationMessage: external_exports.string().nullable().optional()
|
|
832
|
+
}),
|
|
833
|
+
response: external_exports.object({
|
|
834
|
+
operationToolId: external_exports.string(),
|
|
835
|
+
name: external_exports.string().nullable().optional(),
|
|
836
|
+
description: external_exports.string().nullable().optional(),
|
|
837
|
+
deprecated: external_exports.boolean().optional(),
|
|
838
|
+
deprecationMessage: external_exports.string().nullable().optional()
|
|
839
|
+
}),
|
|
840
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
841
|
+
summary: "Set custom name and description on an operation tool"
|
|
842
|
+
},
|
|
843
|
+
getDocsPageToolsByPublish: {
|
|
844
|
+
method: "GET",
|
|
845
|
+
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.publishId}`,
|
|
846
|
+
params: external_exports.object({ id: external_exports.uuid(), publishId: external_exports.uuid() }),
|
|
847
|
+
response: mcpDocsPageToolDetailSchema.array(),
|
|
848
|
+
responses: { 400: agentApiErrorSchema },
|
|
849
|
+
summary: "List docs page tools for a linked publish"
|
|
850
|
+
},
|
|
851
|
+
updateDocsPageTools: {
|
|
852
|
+
method: "PATCH",
|
|
853
|
+
path: (p) => `/mcp/servers/${p.id}/docs-page-tools`,
|
|
854
|
+
params: serverParams2,
|
|
855
|
+
body: external_exports.object({
|
|
856
|
+
docsPageTools: external_exports.array(external_exports.object({
|
|
857
|
+
docsPageId: external_exports.uuid(),
|
|
858
|
+
searchToolEnabled: external_exports.boolean(),
|
|
859
|
+
executeRequestToolEnabled: external_exports.boolean()
|
|
860
|
+
}).partial({
|
|
861
|
+
searchToolEnabled: true,
|
|
862
|
+
executeRequestToolEnabled: true
|
|
863
|
+
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1),
|
|
864
|
+
bumpStrategy: bumpStrategySchema.optional(),
|
|
865
|
+
bumpKind: bumpKindSchema.optional()
|
|
866
|
+
}),
|
|
867
|
+
response: external_exports.array(mcpServerDocsPageToolSchema),
|
|
868
|
+
responses: {
|
|
869
|
+
400: agentApiErrorSchema,
|
|
870
|
+
403: agentApiErrorSchema,
|
|
871
|
+
409: agentApiErrorSchema
|
|
872
|
+
},
|
|
873
|
+
summary: "Update docs page tool flags"
|
|
874
|
+
},
|
|
875
|
+
deleteDocsPageTool: {
|
|
876
|
+
method: "DELETE",
|
|
877
|
+
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.toolId}`,
|
|
878
|
+
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
879
|
+
response: external_exports.null(),
|
|
880
|
+
responses: { 400: agentApiErrorSchema },
|
|
881
|
+
summary: "Delete a docs page tool"
|
|
882
|
+
},
|
|
883
|
+
deleteDocsPageToolsByPublish: {
|
|
884
|
+
method: "DELETE",
|
|
885
|
+
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/publishes/${p.publishId}`,
|
|
886
|
+
params: external_exports.object({ id: external_exports.uuid(), publishId: external_exports.uuid() }),
|
|
887
|
+
response: external_exports.null(),
|
|
888
|
+
responses: { 400: agentApiErrorSchema },
|
|
889
|
+
summary: "Delete all docs page tools of a publish"
|
|
890
|
+
},
|
|
891
|
+
listServerPublishes: {
|
|
892
|
+
method: "GET",
|
|
893
|
+
path: (p) => `/mcp/servers/${p.id}/docs-publishes`,
|
|
894
|
+
params: serverParams2,
|
|
895
|
+
response: external_exports.object({
|
|
896
|
+
id: external_exports.string(),
|
|
897
|
+
uid: external_exports.string(),
|
|
898
|
+
name: external_exports.string(),
|
|
899
|
+
projectId: external_exports.string(),
|
|
900
|
+
projectUid: external_exports.string(),
|
|
901
|
+
projectType: external_exports.enum(docsProjectTypes),
|
|
902
|
+
domain: external_exports.string(),
|
|
903
|
+
embedStatus: external_exports.enum(embedStatuses),
|
|
904
|
+
createdAt: external_exports.date(),
|
|
905
|
+
updatedAt: external_exports.date()
|
|
906
|
+
}).array(),
|
|
907
|
+
responses: { 400: agentApiErrorSchema },
|
|
908
|
+
summary: "List docs publishes linked to an MCP server"
|
|
909
|
+
},
|
|
910
|
+
listDocumentVersions: {
|
|
911
|
+
method: "GET",
|
|
912
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions`,
|
|
913
|
+
params: serverParams2,
|
|
914
|
+
response: external_exports.object({
|
|
915
|
+
id: external_exports.string(),
|
|
916
|
+
uid: external_exports.string(),
|
|
917
|
+
semver: external_exports.string(),
|
|
918
|
+
documentId: external_exports.string(),
|
|
919
|
+
documentUid: external_exports.string(),
|
|
920
|
+
embedStatus: external_exports.string(),
|
|
921
|
+
slug: external_exports.string(),
|
|
922
|
+
namespace: external_exports.string(),
|
|
923
|
+
createdAt: external_exports.date(),
|
|
924
|
+
updatedAt: external_exports.date(),
|
|
925
|
+
toolMode: external_exports.enum(mcpServerToolModes)
|
|
926
|
+
}).array(),
|
|
927
|
+
responses: { 400: agentApiErrorSchema },
|
|
928
|
+
summary: "List document versions linked to an MCP server"
|
|
929
|
+
},
|
|
930
|
+
getDocumentVersionSpec: {
|
|
931
|
+
method: "GET",
|
|
932
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionId}/spec`,
|
|
933
|
+
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
934
|
+
response: external_exports.string(),
|
|
935
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
936
|
+
responseMediaType: "text/plain",
|
|
937
|
+
summary: "Get the raw spec of a linked document version"
|
|
938
|
+
},
|
|
939
|
+
getAvailableOperationsForVersion: {
|
|
940
|
+
method: "GET",
|
|
941
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionUid}/available-operations`,
|
|
942
|
+
params: external_exports.object({ id: external_exports.uuid(), versionUid: external_exports.string() }),
|
|
943
|
+
response: external_exports.object({
|
|
944
|
+
id: external_exports.string(),
|
|
945
|
+
path: external_exports.string(),
|
|
946
|
+
method: external_exports.string(),
|
|
947
|
+
versionId: external_exports.string(),
|
|
948
|
+
searchToolEnabled: external_exports.boolean(),
|
|
949
|
+
executeRequestToolEnabled: external_exports.boolean()
|
|
950
|
+
}).array(),
|
|
951
|
+
responses: { 400: agentApiErrorSchema },
|
|
952
|
+
summary: "List operations available to link for a version"
|
|
953
|
+
},
|
|
954
|
+
getAvailablePagesForProject: {
|
|
955
|
+
method: "GET",
|
|
956
|
+
path: (p) => `/mcp/servers/${p.id}/projects/${p.projectUid}/available-pages`,
|
|
957
|
+
params: external_exports.object({ id: external_exports.uuid(), projectUid: external_exports.string() }),
|
|
958
|
+
response: external_exports.object({
|
|
959
|
+
id: external_exports.string(),
|
|
960
|
+
publishId: external_exports.string(),
|
|
961
|
+
searchToolEnabled: external_exports.boolean(),
|
|
962
|
+
executeRequestToolEnabled: external_exports.boolean(),
|
|
963
|
+
title: external_exports.string(),
|
|
964
|
+
to: external_exports.string(),
|
|
965
|
+
filepath: external_exports.string(),
|
|
966
|
+
createdAt: external_exports.string()
|
|
967
|
+
}).array(),
|
|
968
|
+
responses: { 400: agentApiErrorSchema },
|
|
969
|
+
summary: "List docs pages available to link for a project"
|
|
970
|
+
},
|
|
971
|
+
setDocumentToolMode: {
|
|
972
|
+
method: "PATCH",
|
|
973
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionId}/tool-mode`,
|
|
974
|
+
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
975
|
+
body: external_exports.object({
|
|
976
|
+
toolMode: external_exports.enum(mcpServerToolModes),
|
|
977
|
+
bumpStrategy: bumpStrategySchema.optional(),
|
|
978
|
+
bumpKind: bumpKindSchema.optional()
|
|
979
|
+
}),
|
|
980
|
+
response: external_exports.object({
|
|
981
|
+
documentVersionId: external_exports.string(),
|
|
982
|
+
toolMode: external_exports.enum(mcpServerToolModes)
|
|
983
|
+
}),
|
|
984
|
+
responses: {
|
|
985
|
+
400: agentApiErrorSchema,
|
|
986
|
+
403: agentApiErrorSchema,
|
|
987
|
+
409: agentApiErrorSchema
|
|
988
|
+
},
|
|
989
|
+
summary: "Set the tool mode of a linked document version"
|
|
990
|
+
},
|
|
991
|
+
linkDocumentVersion: {
|
|
992
|
+
method: "POST",
|
|
993
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionUid}`,
|
|
994
|
+
params: external_exports.object({ id: external_exports.uuid(), versionUid: external_exports.string() }),
|
|
995
|
+
body: external_exports.object({
|
|
996
|
+
operationIds: external_exports.array(external_exports.uuid()).optional(),
|
|
997
|
+
bumpKind: bumpKindSchema.optional()
|
|
998
|
+
}),
|
|
999
|
+
response: external_exports.null(),
|
|
1000
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1001
|
+
summary: "Link a document version to an MCP server"
|
|
1002
|
+
},
|
|
1003
|
+
unlinkDocumentVersion: {
|
|
1004
|
+
method: "DELETE",
|
|
1005
|
+
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionId}`,
|
|
1006
|
+
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
1007
|
+
response: external_exports.null(),
|
|
1008
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1009
|
+
summary: "Unlink a document version from an MCP server"
|
|
1010
|
+
},
|
|
1011
|
+
linkDocsPublish: {
|
|
1012
|
+
method: "POST",
|
|
1013
|
+
path: (p) => `/mcp/servers/${p.id}/docs-publishes/${p.publishUid}`,
|
|
1014
|
+
params: external_exports.object({ id: external_exports.uuid(), publishUid: external_exports.string() }),
|
|
1015
|
+
body: external_exports.object({
|
|
1016
|
+
docsPageIds: external_exports.array(external_exports.uuid()).optional(),
|
|
1017
|
+
bumpKind: bumpKindSchema.optional()
|
|
1018
|
+
}),
|
|
1019
|
+
response: external_exports.null(),
|
|
1020
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1021
|
+
summary: "Link a docs publish to an MCP server"
|
|
1022
|
+
},
|
|
1023
|
+
linkDocsPublishByProject: {
|
|
1024
|
+
method: "POST",
|
|
1025
|
+
path: (p) => `/mcp/servers/${p.id}/docs-publishes/by-project/${p.projectUid}`,
|
|
1026
|
+
params: external_exports.object({ id: external_exports.uuid(), projectUid: external_exports.string() }),
|
|
1027
|
+
body: external_exports.object({
|
|
1028
|
+
docsPageIds: external_exports.array(external_exports.uuid()).optional(),
|
|
1029
|
+
bumpKind: bumpKindSchema.optional()
|
|
1030
|
+
}),
|
|
1031
|
+
response: external_exports.null(),
|
|
1032
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1033
|
+
summary: "Link the active publish of a project to an MCP server"
|
|
1034
|
+
},
|
|
1035
|
+
unlinkDocsPublish: {
|
|
1036
|
+
method: "DELETE",
|
|
1037
|
+
path: (p) => `/mcp/servers/${p.id}/docs-publishes/${p.publishId}`,
|
|
1038
|
+
params: external_exports.object({ id: external_exports.uuid(), publishId: external_exports.uuid() }),
|
|
1039
|
+
response: external_exports.null(),
|
|
1040
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1041
|
+
summary: "Unlink a docs publish from an MCP server"
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
// ../../packages/entities/dist/api/agent/mcp-versions.js
|
|
1046
|
+
var mcpVersionToolsSchema = external_exports.object({
|
|
1047
|
+
version: mcpServerVersionSchema,
|
|
1048
|
+
operationTools: external_exports.array(external_exports.object({
|
|
1049
|
+
id: external_exports.string(),
|
|
1050
|
+
operationId: external_exports.string(),
|
|
1051
|
+
searchToolEnabled: external_exports.boolean(),
|
|
1052
|
+
executeRequestToolEnabled: external_exports.boolean(),
|
|
1053
|
+
curatedToolEnabled: external_exports.boolean(),
|
|
1054
|
+
name: external_exports.string().nullable(),
|
|
1055
|
+
description: external_exports.string().nullable(),
|
|
1056
|
+
deprecated: external_exports.boolean(),
|
|
1057
|
+
deprecationMessage: external_exports.string().nullable(),
|
|
1058
|
+
path: external_exports.string(),
|
|
1059
|
+
method: external_exports.string(),
|
|
1060
|
+
versionId: external_exports.string(),
|
|
1061
|
+
openApiOperationId: external_exports.string().nullable(),
|
|
1062
|
+
operationSummary: external_exports.string().nullable(),
|
|
1063
|
+
semver: external_exports.string(),
|
|
1064
|
+
documentId: external_exports.string(),
|
|
1065
|
+
namespace: external_exports.string(),
|
|
1066
|
+
slug: external_exports.string(),
|
|
1067
|
+
title: external_exports.string()
|
|
1068
|
+
})),
|
|
1069
|
+
docsPageTools: external_exports.array(external_exports.object({
|
|
1070
|
+
id: external_exports.string(),
|
|
1071
|
+
docsPageId: external_exports.string(),
|
|
1072
|
+
searchToolEnabled: external_exports.boolean(),
|
|
1073
|
+
executeRequestToolEnabled: external_exports.boolean(),
|
|
1074
|
+
title: external_exports.string(),
|
|
1075
|
+
to: external_exports.string(),
|
|
1076
|
+
publishId: external_exports.string(),
|
|
1077
|
+
projectId: external_exports.string(),
|
|
1078
|
+
projectName: external_exports.string(),
|
|
1079
|
+
projectUid: external_exports.string()
|
|
1080
|
+
})),
|
|
1081
|
+
linkedDocumentVersions: external_exports.array(external_exports.object({
|
|
1082
|
+
id: external_exports.string(),
|
|
1083
|
+
uid: external_exports.string(),
|
|
1084
|
+
semver: external_exports.string(),
|
|
1085
|
+
namespace: external_exports.string(),
|
|
1086
|
+
slug: external_exports.string(),
|
|
1087
|
+
title: external_exports.string(),
|
|
1088
|
+
documentUid: external_exports.string(),
|
|
1089
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes),
|
|
1090
|
+
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1091
|
+
})),
|
|
1092
|
+
linkedDocsPublishes: external_exports.array(external_exports.object({
|
|
1093
|
+
id: external_exports.string(),
|
|
1094
|
+
uid: external_exports.string(),
|
|
1095
|
+
createdAt: external_exports.string(),
|
|
1096
|
+
projectName: external_exports.string(),
|
|
1097
|
+
projectUid: external_exports.string(),
|
|
1098
|
+
projectType: external_exports.string(),
|
|
1099
|
+
trackMode: external_exports.enum(mcpDocsProjectTrackModes)
|
|
1100
|
+
}))
|
|
1101
|
+
});
|
|
1102
|
+
var serverParams3 = external_exports.object({ id: external_exports.uuid() });
|
|
1103
|
+
var versionParams = external_exports.object({ id: external_exports.uuid(), semver: semverParamSchema });
|
|
1104
|
+
var mcpVersionRoutes = {
|
|
1105
|
+
listVersions: {
|
|
1106
|
+
method: "GET",
|
|
1107
|
+
path: (p) => `/mcp/servers/${p.id}/versions`,
|
|
1108
|
+
params: serverParams3,
|
|
1109
|
+
response: external_exports.object({
|
|
1110
|
+
versions: external_exports.array(mcpServerVersionSchema),
|
|
1111
|
+
latestVersionId: external_exports.string().nullable()
|
|
1112
|
+
}),
|
|
1113
|
+
responses: { 400: agentApiErrorSchema },
|
|
1114
|
+
summary: "List the versions of an MCP server"
|
|
1115
|
+
},
|
|
1116
|
+
getVersion: {
|
|
1117
|
+
method: "GET",
|
|
1118
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1119
|
+
params: versionParams,
|
|
1120
|
+
response: mcpServerVersionSchema,
|
|
1121
|
+
responses: { 400: agentApiErrorSchema },
|
|
1122
|
+
summary: "Get one MCP server version"
|
|
1123
|
+
},
|
|
1124
|
+
getVersionTools: {
|
|
1125
|
+
method: "GET",
|
|
1126
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1127
|
+
params: versionParams,
|
|
1128
|
+
response: mcpVersionToolsSchema,
|
|
1129
|
+
responses: { 400: agentApiErrorSchema },
|
|
1130
|
+
summary: "Get the tools and links of a version"
|
|
1131
|
+
},
|
|
1132
|
+
updateVersionTools: {
|
|
1133
|
+
method: "PATCH",
|
|
1134
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1135
|
+
params: versionParams,
|
|
1136
|
+
body: external_exports.object({
|
|
1137
|
+
operationTools: external_exports.array(external_exports.object({
|
|
1138
|
+
operationId: external_exports.uuid(),
|
|
1139
|
+
searchToolEnabled: external_exports.boolean().optional(),
|
|
1140
|
+
executeRequestToolEnabled: external_exports.boolean().optional(),
|
|
1141
|
+
curatedToolEnabled: external_exports.boolean().optional(),
|
|
1142
|
+
name: external_exports.string().nullable().optional(),
|
|
1143
|
+
description: external_exports.string().nullable().optional(),
|
|
1144
|
+
deprecated: external_exports.boolean().optional(),
|
|
1145
|
+
deprecationMessage: external_exports.string().nullable().optional()
|
|
1146
|
+
})).optional(),
|
|
1147
|
+
docsPageTools: external_exports.array(external_exports.object({
|
|
1148
|
+
docsPageId: external_exports.uuid(),
|
|
1149
|
+
searchToolEnabled: external_exports.boolean().optional(),
|
|
1150
|
+
executeRequestToolEnabled: external_exports.boolean().optional()
|
|
1151
|
+
})).optional()
|
|
1152
|
+
}),
|
|
1153
|
+
response: mcpServerVersionSchema,
|
|
1154
|
+
responses: {
|
|
1155
|
+
400: agentApiErrorSchema,
|
|
1156
|
+
403: agentApiErrorSchema,
|
|
1157
|
+
409: agentApiErrorSchema
|
|
1158
|
+
},
|
|
1159
|
+
summary: "Update tool flags and metadata on a version"
|
|
1160
|
+
},
|
|
1161
|
+
updateVersion: {
|
|
1162
|
+
method: "PATCH",
|
|
1163
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1164
|
+
params: versionParams,
|
|
1165
|
+
body: external_exports.object({ changeNote: external_exports.string().nullable().optional() }),
|
|
1166
|
+
response: mcpServerVersionSchema,
|
|
1167
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1168
|
+
summary: "Update a draft version"
|
|
1169
|
+
},
|
|
1170
|
+
deleteVersion: {
|
|
1171
|
+
method: "DELETE",
|
|
1172
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1173
|
+
params: versionParams,
|
|
1174
|
+
response: external_exports.null(),
|
|
1175
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1176
|
+
summary: "Delete an MCP server version"
|
|
1177
|
+
},
|
|
1178
|
+
approveVersion: {
|
|
1179
|
+
method: "POST",
|
|
1180
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/approve`,
|
|
1181
|
+
params: versionParams,
|
|
1182
|
+
response: mcpServerVersionSchema,
|
|
1183
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1184
|
+
summary: "Approve a draft version"
|
|
1185
|
+
},
|
|
1186
|
+
requestVersionApproval: {
|
|
1187
|
+
method: "POST",
|
|
1188
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/request-approval`,
|
|
1189
|
+
params: versionParams,
|
|
1190
|
+
response: mcpServerVersionSchema,
|
|
1191
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1192
|
+
summary: "Send a draft version for approval"
|
|
1193
|
+
},
|
|
1194
|
+
getOpenDraft: {
|
|
1195
|
+
method: "GET",
|
|
1196
|
+
path: (p) => `/mcp/servers/${p.id}/draft`,
|
|
1197
|
+
params: serverParams3,
|
|
1198
|
+
response: mcpServerVersionSchema.nullable(),
|
|
1199
|
+
responses: { 400: agentApiErrorSchema },
|
|
1200
|
+
summary: "Get the open draft version, if any"
|
|
1201
|
+
},
|
|
1202
|
+
publishDraft: {
|
|
1203
|
+
method: "POST",
|
|
1204
|
+
path: (p) => `/mcp/servers/${p.id}/draft/publish`,
|
|
1205
|
+
params: serverParams3,
|
|
1206
|
+
body: external_exports.object({
|
|
1207
|
+
bumpKind: bumpKindSchema.optional(),
|
|
1208
|
+
customSemver: external_exports.string().optional()
|
|
1209
|
+
}),
|
|
1210
|
+
response: mcpServerVersionSchema,
|
|
1211
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1212
|
+
summary: "Publish the open draft version"
|
|
1213
|
+
},
|
|
1214
|
+
getVersionSuggestedTools: {
|
|
1215
|
+
method: "GET",
|
|
1216
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/suggested-tools`,
|
|
1217
|
+
params: versionParams,
|
|
1218
|
+
response: external_exports.object({
|
|
1219
|
+
suggestions: external_exports.array(external_exports.object({
|
|
1220
|
+
id: external_exports.string(),
|
|
1221
|
+
path: external_exports.string(),
|
|
1222
|
+
method: external_exports.string(),
|
|
1223
|
+
versionId: external_exports.string(),
|
|
1224
|
+
semver: external_exports.string(),
|
|
1225
|
+
documentId: external_exports.string()
|
|
1226
|
+
})),
|
|
1227
|
+
dismissed: external_exports.boolean()
|
|
1228
|
+
}),
|
|
1229
|
+
responses: { 400: agentApiErrorSchema },
|
|
1230
|
+
summary: "List suggested tools for a version"
|
|
1231
|
+
},
|
|
1232
|
+
dismissVersionSuggestions: {
|
|
1233
|
+
method: "POST",
|
|
1234
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/dismiss-suggestions`,
|
|
1235
|
+
params: versionParams,
|
|
1236
|
+
response: external_exports.null(),
|
|
1237
|
+
responses: { 400: agentApiErrorSchema },
|
|
1238
|
+
summary: "Dismiss tool suggestions for a version"
|
|
1239
|
+
},
|
|
1240
|
+
setVersionDocumentToolMode: {
|
|
1241
|
+
method: "PATCH",
|
|
1242
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/document-versions/${p.documentVersionId}/tool-mode`,
|
|
1243
|
+
params: external_exports.object({
|
|
1244
|
+
id: external_exports.uuid(),
|
|
1245
|
+
semver: semverParamSchema,
|
|
1246
|
+
documentVersionId: external_exports.uuid()
|
|
1247
|
+
}),
|
|
1248
|
+
body: external_exports.object({ toolMode: external_exports.enum(mcpServerToolModes) }),
|
|
1249
|
+
response: external_exports.object({
|
|
1250
|
+
documentVersionId: external_exports.string(),
|
|
1251
|
+
toolMode: external_exports.enum(mcpServerToolModes),
|
|
1252
|
+
semver: external_exports.string()
|
|
1253
|
+
}),
|
|
1254
|
+
responses: {
|
|
1255
|
+
400: agentApiErrorSchema,
|
|
1256
|
+
403: agentApiErrorSchema,
|
|
1257
|
+
409: agentApiErrorSchema
|
|
1258
|
+
},
|
|
1259
|
+
summary: "Set the tool mode of a document version within a version"
|
|
1260
|
+
},
|
|
1261
|
+
listDocumentTracking: {
|
|
1262
|
+
method: "GET",
|
|
1263
|
+
path: (p) => `/mcp/servers/${p.id}/document-tracking`,
|
|
1264
|
+
params: serverParams3,
|
|
1265
|
+
response: external_exports.array(external_exports.object({
|
|
1266
|
+
id: external_exports.string(),
|
|
1267
|
+
mcpServerId: external_exports.string(),
|
|
1268
|
+
versionId: external_exports.string(),
|
|
1269
|
+
documentId: external_exports.string(),
|
|
1270
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes),
|
|
1271
|
+
documentUid: external_exports.string(),
|
|
1272
|
+
namespace: external_exports.string(),
|
|
1273
|
+
slug: external_exports.string(),
|
|
1274
|
+
title: external_exports.string(),
|
|
1275
|
+
currentVersion: external_exports.string(),
|
|
1276
|
+
latestVersion: external_exports.string()
|
|
1277
|
+
})),
|
|
1278
|
+
responses: { 400: agentApiErrorSchema },
|
|
1279
|
+
summary: "List document tracking entries"
|
|
1280
|
+
},
|
|
1281
|
+
setDocumentTracking: {
|
|
1282
|
+
method: "POST",
|
|
1283
|
+
path: (p) => `/mcp/servers/${p.id}/document-tracking`,
|
|
1284
|
+
params: serverParams3,
|
|
1285
|
+
body: external_exports.object({
|
|
1286
|
+
documentId: external_exports.uuid(),
|
|
1287
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes),
|
|
1288
|
+
pinnedVersionId: external_exports.uuid().optional(),
|
|
1289
|
+
bumpKind: bumpKindSchema.optional()
|
|
1290
|
+
}),
|
|
1291
|
+
response: external_exports.object({
|
|
1292
|
+
mcpServerId: external_exports.string(),
|
|
1293
|
+
documentId: external_exports.string(),
|
|
1294
|
+
versionId: external_exports.string(),
|
|
1295
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
1296
|
+
}),
|
|
1297
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1298
|
+
summary: "Set how a document is tracked"
|
|
1299
|
+
},
|
|
1300
|
+
listDocsProjectTracking: {
|
|
1301
|
+
method: "GET",
|
|
1302
|
+
path: (p) => `/mcp/servers/${p.id}/docs-project-tracking`,
|
|
1303
|
+
params: serverParams3,
|
|
1304
|
+
response: external_exports.array(external_exports.object({
|
|
1305
|
+
id: external_exports.string(),
|
|
1306
|
+
mcpServerId: external_exports.string(),
|
|
1307
|
+
docsProjectId: external_exports.string(),
|
|
1308
|
+
docsPublishId: external_exports.string(),
|
|
1309
|
+
trackMode: external_exports.enum(mcpDocsProjectTrackModes),
|
|
1310
|
+
projectUid: external_exports.string(),
|
|
1311
|
+
name: external_exports.string(),
|
|
1312
|
+
activePublishId: external_exports.string().nullable()
|
|
1313
|
+
})),
|
|
1314
|
+
responses: { 400: agentApiErrorSchema },
|
|
1315
|
+
summary: "List docs project tracking entries"
|
|
1316
|
+
},
|
|
1317
|
+
setDocsProjectTracking: {
|
|
1318
|
+
method: "POST",
|
|
1319
|
+
path: (p) => `/mcp/servers/${p.id}/docs-project-tracking`,
|
|
1320
|
+
params: serverParams3,
|
|
1321
|
+
body: external_exports.object({
|
|
1322
|
+
docsProjectId: external_exports.uuid(),
|
|
1323
|
+
trackMode: external_exports.enum(mcpDocsProjectTrackModes),
|
|
1324
|
+
bumpKind: bumpKindSchema.optional()
|
|
1325
|
+
}),
|
|
1326
|
+
response: external_exports.object({
|
|
1327
|
+
mcpServerId: external_exports.string(),
|
|
1328
|
+
docsProjectId: external_exports.string(),
|
|
1329
|
+
docsPublishId: external_exports.string(),
|
|
1330
|
+
trackMode: external_exports.enum(mcpDocsProjectTrackModes)
|
|
1331
|
+
}),
|
|
1332
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1333
|
+
summary: "Set how a docs project is tracked"
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
// ../../packages/entities/dist/api/agent/openapi.js
|
|
1338
|
+
var openapiRoutes = {
|
|
1339
|
+
chat: {
|
|
1340
|
+
method: "POST",
|
|
1341
|
+
path: () => "/openapi/chat",
|
|
1342
|
+
body: external_exports.object({
|
|
1343
|
+
id: external_exports.string(),
|
|
1344
|
+
messages: external_exports.any().array(),
|
|
1345
|
+
registryDocuments: external_exports.object({ namespace: external_exports.string(), slug: external_exports.string() }).array()
|
|
1346
|
+
}),
|
|
1347
|
+
responses: {
|
|
1348
|
+
400: agentApiErrorSchema,
|
|
1349
|
+
402: agentApiErrorSchema,
|
|
1350
|
+
403: agentApiErrorSchema
|
|
1351
|
+
},
|
|
1352
|
+
responseMediaType: "text/event-stream",
|
|
1353
|
+
summary: "Chat about OpenAPI documents"
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
// ../../packages/entities/dist/api/agent/pubsub.js
|
|
1358
|
+
var pubsubRoutes = {
|
|
1359
|
+
apiVersionCreated: {
|
|
1360
|
+
method: "POST",
|
|
1361
|
+
path: () => "/pubsub/api-version-created",
|
|
1362
|
+
body: pubsubPushMessageSchema,
|
|
1363
|
+
responses: { 400: agentApiErrorSchema },
|
|
1364
|
+
auth: false,
|
|
1365
|
+
summary: "Handle core api-version-created events"
|
|
1366
|
+
},
|
|
1367
|
+
apiShared: {
|
|
1368
|
+
method: "POST",
|
|
1369
|
+
path: () => "/pubsub/api-shared",
|
|
1370
|
+
body: pubsubPushMessageSchema,
|
|
1371
|
+
responses: { 400: agentApiErrorSchema },
|
|
1372
|
+
auth: false,
|
|
1373
|
+
summary: "Handle core api-shared events"
|
|
1374
|
+
},
|
|
1375
|
+
apiUpdated: {
|
|
1376
|
+
method: "POST",
|
|
1377
|
+
path: () => "/pubsub/api-updated",
|
|
1378
|
+
body: pubsubPushMessageSchema,
|
|
1379
|
+
responses: { 400: agentApiErrorSchema },
|
|
1380
|
+
auth: false,
|
|
1381
|
+
summary: "Handle core api-updated events"
|
|
1382
|
+
},
|
|
1383
|
+
apiVersionUpserted: {
|
|
1384
|
+
method: "POST",
|
|
1385
|
+
path: () => "/pubsub/api-version-upserted",
|
|
1386
|
+
body: pubsubPushMessageSchema,
|
|
1387
|
+
responses: { 400: agentApiErrorSchema },
|
|
1388
|
+
auth: false,
|
|
1389
|
+
summary: "Handle core api-version-upserted events"
|
|
1390
|
+
},
|
|
1391
|
+
apiDeleted: {
|
|
1392
|
+
method: "POST",
|
|
1393
|
+
path: () => "/pubsub/api-deleted",
|
|
1394
|
+
body: pubsubPushMessageSchema,
|
|
1395
|
+
responses: { 400: agentApiErrorSchema },
|
|
1396
|
+
auth: false,
|
|
1397
|
+
summary: "Handle core api-deleted events"
|
|
1398
|
+
},
|
|
1399
|
+
apiVersionDeleted: {
|
|
1400
|
+
method: "POST",
|
|
1401
|
+
path: () => "/pubsub/api-version-deleted",
|
|
1402
|
+
body: pubsubPushMessageSchema,
|
|
1403
|
+
responses: { 400: agentApiErrorSchema },
|
|
1404
|
+
auth: false,
|
|
1405
|
+
summary: "Handle core api-version-deleted events"
|
|
1406
|
+
},
|
|
1407
|
+
projectCreated: {
|
|
1408
|
+
method: "POST",
|
|
1409
|
+
path: () => "/pubsub/project-created",
|
|
1410
|
+
body: pubsubPushMessageSchema,
|
|
1411
|
+
response: external_exports.null(),
|
|
1412
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1413
|
+
auth: false,
|
|
1414
|
+
summary: "Handle project-created events"
|
|
1415
|
+
},
|
|
1416
|
+
projectUpdated: {
|
|
1417
|
+
method: "POST",
|
|
1418
|
+
path: () => "/pubsub/project-updated",
|
|
1419
|
+
body: pubsubPushMessageSchema,
|
|
1420
|
+
response: external_exports.null(),
|
|
1421
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1422
|
+
auth: false,
|
|
1423
|
+
summary: "Handle project-updated events"
|
|
1424
|
+
},
|
|
1425
|
+
projectDeleted: {
|
|
1426
|
+
method: "POST",
|
|
1427
|
+
path: () => "/pubsub/project-deleted",
|
|
1428
|
+
body: pubsubPushMessageSchema,
|
|
1429
|
+
response: external_exports.null(),
|
|
1430
|
+
auth: false,
|
|
1431
|
+
summary: "Handle project-deleted events"
|
|
1432
|
+
},
|
|
1433
|
+
publishCreated: {
|
|
1434
|
+
method: "POST",
|
|
1435
|
+
path: () => "/pubsub/publish-created",
|
|
1436
|
+
body: pubsubPushMessageSchema,
|
|
1437
|
+
response: external_exports.null(),
|
|
1438
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1439
|
+
auth: false,
|
|
1440
|
+
summary: "Handle publish-created events"
|
|
1441
|
+
},
|
|
1442
|
+
publishDeleted: {
|
|
1443
|
+
method: "POST",
|
|
1444
|
+
path: () => "/pubsub/publish-deleted",
|
|
1445
|
+
body: pubsubPushMessageSchema,
|
|
1446
|
+
response: external_exports.null(),
|
|
1447
|
+
auth: false,
|
|
1448
|
+
summary: "Handle publish-deleted events"
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1452
|
+
// ../../packages/entities/dist/api/agent/registry.js
|
|
1453
|
+
var registryDocumentSchema = external_exports.object({
|
|
1454
|
+
id: external_exports.string(),
|
|
1455
|
+
title: external_exports.string(),
|
|
1456
|
+
namespace: external_exports.string(),
|
|
1457
|
+
currentVersion: external_exports.string(),
|
|
1458
|
+
slug: external_exports.string(),
|
|
1459
|
+
logoUrl: external_exports.string().nullable()
|
|
1460
|
+
});
|
|
1461
|
+
var registryVersionOperationSchema = external_exports.object({
|
|
1462
|
+
id: external_exports.string(),
|
|
1463
|
+
path: external_exports.string(),
|
|
1464
|
+
method: external_exports.string(),
|
|
1465
|
+
searchToolEnabled: external_exports.boolean(),
|
|
1466
|
+
executeRequestToolEnabled: external_exports.boolean()
|
|
1467
|
+
});
|
|
1468
|
+
var registrySearchResultSchema = external_exports.object({
|
|
1469
|
+
id: external_exports.string(),
|
|
1470
|
+
title: external_exports.string(),
|
|
1471
|
+
slug: external_exports.string(),
|
|
1472
|
+
namespace: external_exports.string(),
|
|
1473
|
+
currentVersion: external_exports.string(),
|
|
1474
|
+
logoUrl: external_exports.string().nullable(),
|
|
1475
|
+
searchEnabled: external_exports.boolean(),
|
|
1476
|
+
rank: external_exports.number()
|
|
1477
|
+
});
|
|
1478
|
+
var registryRoutes = {
|
|
1479
|
+
getDocument: {
|
|
1480
|
+
method: "GET",
|
|
1481
|
+
path: (p) => `/registry/document/${p.namespace}/${p.slug}`,
|
|
1482
|
+
params: external_exports.object({ namespace: external_exports.string(), slug: external_exports.string() }),
|
|
1483
|
+
response: registryDocumentSchema,
|
|
1484
|
+
responses: { 400: agentApiErrorSchema },
|
|
1485
|
+
summary: "Get a registry document"
|
|
1486
|
+
},
|
|
1487
|
+
listKeyDocuments: {
|
|
1488
|
+
method: "GET",
|
|
1489
|
+
path: () => "/registry/documents",
|
|
1490
|
+
headers: external_exports.object({ [SCALAR_AGENT_KEY_HEADER]: external_exports.string().optional() }),
|
|
1491
|
+
response: external_exports.object({ documents: registryDocumentSchema.array() }),
|
|
1492
|
+
responses: { 400: agentApiErrorSchema },
|
|
1493
|
+
summary: "List the documents accessible with an agent key"
|
|
1494
|
+
},
|
|
1495
|
+
waitForEmbed: {
|
|
1496
|
+
method: "GET",
|
|
1497
|
+
path: (p) => `/registry/embeddings/${p.namespace}/${p.slug}`,
|
|
1498
|
+
params: external_exports.object({ namespace: external_exports.string(), slug: external_exports.string() }),
|
|
1499
|
+
query: external_exports.object({ version: external_exports.string().optional() }),
|
|
1500
|
+
response: external_exports.null(),
|
|
1501
|
+
responses: {
|
|
1502
|
+
400: agentApiErrorSchema,
|
|
1503
|
+
403: agentApiErrorSchema,
|
|
1504
|
+
408: agentApiErrorSchema
|
|
1505
|
+
},
|
|
1506
|
+
summary: "Wait for a document embedding to complete (long poll)"
|
|
1507
|
+
},
|
|
1508
|
+
listCuratedDocs: {
|
|
1509
|
+
method: "GET",
|
|
1510
|
+
path: () => "/registry/curated",
|
|
1511
|
+
query: external_exports.object({ limit: external_exports.coerce.number().max(100).default(10) }),
|
|
1512
|
+
response: external_exports.object({ results: registryDocumentSchema.array() }),
|
|
1513
|
+
summary: "List curated registry documents"
|
|
1514
|
+
},
|
|
1515
|
+
search: {
|
|
1516
|
+
method: "GET",
|
|
1517
|
+
path: () => "/registry/search",
|
|
1518
|
+
query: external_exports.object({ query: external_exports.string().max(30) }),
|
|
1519
|
+
response: external_exports.object({ results: registrySearchResultSchema.array() }),
|
|
1520
|
+
responses: { 400: agentApiErrorSchema },
|
|
1521
|
+
summary: "Search registry documents"
|
|
1522
|
+
},
|
|
1523
|
+
getVersionOperations: {
|
|
1524
|
+
method: "GET",
|
|
1525
|
+
path: (p) => `/registry/versions/${p.versionUid}/operations`,
|
|
1526
|
+
params: external_exports.object({ versionUid: external_exports.string() }),
|
|
1527
|
+
response: external_exports.object({
|
|
1528
|
+
operations: registryVersionOperationSchema.array(),
|
|
1529
|
+
embedStatus: external_exports.enum(embedStatuses)
|
|
1530
|
+
}),
|
|
1531
|
+
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1532
|
+
summary: "List the operations of a document version"
|
|
1533
|
+
},
|
|
1534
|
+
updateVersionOperations: {
|
|
1535
|
+
method: "PATCH",
|
|
1536
|
+
path: (p) => `/registry/versions/${p.versionUid}/operations`,
|
|
1537
|
+
params: external_exports.object({ versionUid: external_exports.string() }),
|
|
1538
|
+
body: external_exports.object({
|
|
1539
|
+
operations: external_exports.object({
|
|
1540
|
+
id: external_exports.uuid(),
|
|
1541
|
+
searchToolEnabled: external_exports.boolean(),
|
|
1542
|
+
executeRequestToolEnabled: external_exports.boolean()
|
|
1543
|
+
}).array().min(1)
|
|
1544
|
+
}),
|
|
1545
|
+
response: external_exports.object({
|
|
1546
|
+
operations: registryVersionOperationSchema.array()
|
|
1547
|
+
}),
|
|
1548
|
+
responses: { 400: agentApiErrorSchema },
|
|
1549
|
+
summary: "Update tool flags on version operations"
|
|
1550
|
+
},
|
|
1551
|
+
embedVersion: {
|
|
1552
|
+
method: "POST",
|
|
1553
|
+
path: (p) => `/registry/versions/${p.versionUid}/embed`,
|
|
1554
|
+
params: external_exports.object({ versionUid: external_exports.string() }),
|
|
1555
|
+
body: external_exports.object({
|
|
1556
|
+
title: external_exports.string(),
|
|
1557
|
+
description: external_exports.string(),
|
|
1558
|
+
version: external_exports.string(),
|
|
1559
|
+
versionUid: external_exports.string(),
|
|
1560
|
+
apiUid: external_exports.string(),
|
|
1561
|
+
namespace: external_exports.string(),
|
|
1562
|
+
slug: external_exports.string(),
|
|
1563
|
+
isLatest: external_exports.boolean(),
|
|
1564
|
+
isPrivate: external_exports.boolean()
|
|
1565
|
+
}),
|
|
1566
|
+
response: external_exports.null(),
|
|
1567
|
+
responses: { 400: agentApiErrorSchema },
|
|
1568
|
+
summary: "Embed a document version"
|
|
1569
|
+
},
|
|
1570
|
+
setDocumentCurrentVersion: {
|
|
1571
|
+
method: "PATCH",
|
|
1572
|
+
path: (p) => `/registry/documents/${p.uid}/current-version`,
|
|
1573
|
+
params: external_exports.object({ uid: external_exports.string() }),
|
|
1574
|
+
body: external_exports.object({ version: external_exports.string() }),
|
|
1575
|
+
response: external_exports.object({ id: external_exports.string() }),
|
|
1576
|
+
responses: { 400: agentApiErrorSchema },
|
|
1577
|
+
summary: "Set the current version of a document"
|
|
1578
|
+
},
|
|
1579
|
+
createKey: {
|
|
1580
|
+
method: "POST",
|
|
1581
|
+
path: () => "/registry/keys",
|
|
1582
|
+
body: external_exports.object({
|
|
1583
|
+
name: external_exports.string().max(50).optional(),
|
|
1584
|
+
description: external_exports.string().max(200).optional(),
|
|
1585
|
+
documentUids: external_exports.string().array().min(1)
|
|
1586
|
+
}),
|
|
1587
|
+
response: agentKeySchema.extend({ signedKey: external_exports.string() }),
|
|
1588
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1589
|
+
summary: "Create an agent key"
|
|
1590
|
+
},
|
|
1591
|
+
listKeys: {
|
|
1592
|
+
method: "GET",
|
|
1593
|
+
path: (p) => `/registry/keys/${p.documentUid}`,
|
|
1594
|
+
params: external_exports.object({ documentUid: external_exports.string() }),
|
|
1595
|
+
response: agentKeySchema.array(),
|
|
1596
|
+
responses: { 400: agentApiErrorSchema },
|
|
1597
|
+
summary: "List the agent keys for a document"
|
|
1598
|
+
},
|
|
1599
|
+
updateKey: {
|
|
1600
|
+
method: "PATCH",
|
|
1601
|
+
path: (p) => `/registry/keys/${p.id}`,
|
|
1602
|
+
params: external_exports.object({ id: external_exports.string() }),
|
|
1603
|
+
body: external_exports.object({
|
|
1604
|
+
name: external_exports.string().min(1).max(50),
|
|
1605
|
+
description: external_exports.string().max(200)
|
|
1606
|
+
}).partial(),
|
|
1607
|
+
response: agentKeySchema,
|
|
1608
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1609
|
+
summary: "Update an agent key"
|
|
1610
|
+
},
|
|
1611
|
+
deleteKey: {
|
|
1612
|
+
method: "DELETE",
|
|
1613
|
+
path: (p) => `/registry/keys/${p.id}`,
|
|
1614
|
+
params: external_exports.object({ id: external_exports.string() }),
|
|
1615
|
+
response: external_exports.null(),
|
|
1616
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1617
|
+
summary: "Delete an agent key"
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
// ../../packages/entities/dist/api/agent/usage.js
|
|
1622
|
+
var usageRecordSchema = monthlyUsageSchema.extend({
|
|
1623
|
+
name: external_exports.string().nullable(),
|
|
1624
|
+
projectType: external_exports.string().nullable(),
|
|
1625
|
+
documentUid: external_exports.string().nullable(),
|
|
1626
|
+
/** microCredits converted to credits, for display. */
|
|
1627
|
+
credits: external_exports.number()
|
|
1628
|
+
});
|
|
1629
|
+
var teamUsageResponseSchema = external_exports.object({
|
|
1630
|
+
usage: usageRecordSchema.array(),
|
|
1631
|
+
plan: billingPlanSchema,
|
|
1632
|
+
includedCredits: external_exports.number(),
|
|
1633
|
+
usedCredits: external_exports.number(),
|
|
1634
|
+
overageCredits: external_exports.number()
|
|
1635
|
+
});
|
|
1636
|
+
var usageRoutes = {
|
|
1637
|
+
getTeamUsage: {
|
|
1638
|
+
method: "GET",
|
|
1639
|
+
path: () => "/usage",
|
|
1640
|
+
query: external_exports.object({ month: external_exports.string().date().optional() }),
|
|
1641
|
+
response: teamUsageResponseSchema,
|
|
1642
|
+
summary: "Get usage for the current team"
|
|
1643
|
+
}
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1646
|
+
// ../../packages/entities/dist/api/agent/index.js
|
|
1647
|
+
var agentApi = {
|
|
1648
|
+
mcp: {
|
|
1649
|
+
...mcpServerRoutes,
|
|
1650
|
+
...mcpVersionRoutes,
|
|
1651
|
+
...mcpInstallationRoutes
|
|
1652
|
+
},
|
|
1653
|
+
registry: registryRoutes,
|
|
1654
|
+
docs: docsRoutes,
|
|
1655
|
+
dashboard: dashboardRoutes,
|
|
1656
|
+
editor: editorRoutes,
|
|
1657
|
+
openapi: openapiRoutes,
|
|
1658
|
+
analytics: analyticsRoutes,
|
|
1659
|
+
usage: usageRoutes,
|
|
1660
|
+
internal: internalRoutes,
|
|
1661
|
+
pubsub: pubsubRoutes
|
|
1662
|
+
};
|
|
1663
|
+
|
|
1664
|
+
export {
|
|
1665
|
+
agentApiErrorSchema,
|
|
1666
|
+
pubsubPushMessageSchema,
|
|
1667
|
+
bumpKindSchema,
|
|
1668
|
+
bumpStrategySchema,
|
|
1669
|
+
semverParamSchema,
|
|
1670
|
+
installationParamSchema,
|
|
1671
|
+
analyticsRangeSchema,
|
|
1672
|
+
analyticsGranularitySchema,
|
|
1673
|
+
mcpConsumerKindSchema,
|
|
1674
|
+
mcpToolKindSchema,
|
|
1675
|
+
mcpToolCategorySchema,
|
|
1676
|
+
mcpExportDatasetSchema,
|
|
1677
|
+
mcpAnalyticsParamsSchema,
|
|
1678
|
+
mcpTimeseriesPointSchema,
|
|
1679
|
+
mcpCategoryTotalsSchema,
|
|
1680
|
+
mcpOverviewTotalsSchema,
|
|
1681
|
+
mcpOverviewResultSchema,
|
|
1682
|
+
mcpToolStatSchema,
|
|
1683
|
+
mcpToolsResultSchema,
|
|
1684
|
+
mcpConsumerStatSchema,
|
|
1685
|
+
mcpConsumersResultSchema,
|
|
1686
|
+
mcpLatencyByToolEntrySchema,
|
|
1687
|
+
mcpLatencyResultSchema,
|
|
1688
|
+
mcpErrorEntrySchema,
|
|
1689
|
+
mcpErrorsResultSchema,
|
|
1690
|
+
analyticsRoutes,
|
|
1691
|
+
DASHBOARD_EDITOR_TOOL_NAMES,
|
|
1692
|
+
DASHBOARD_SDK_TOOL_NAMES,
|
|
1693
|
+
DASHBOARD_SDK_CONTEXT_KEY,
|
|
1694
|
+
DASHBOARD_EDITOR_CONTEXT_KEY,
|
|
1695
|
+
DASHBOARD_CHAT_CONTEXT_MAX_CHARS,
|
|
1696
|
+
DASHBOARD_CHAT_MAX_MESSAGES,
|
|
1697
|
+
dashboardChatSettingsSchema,
|
|
1698
|
+
dashboardChatBodySchema,
|
|
1699
|
+
dashboardRoutes,
|
|
1700
|
+
docsProjectAgentInfoSchema,
|
|
1701
|
+
docsChatContextSchema,
|
|
1702
|
+
docsRoutes,
|
|
1703
|
+
editorChatBodySchema,
|
|
1704
|
+
pullRequestDescriptionBodySchema,
|
|
1705
|
+
editorRoutes,
|
|
1706
|
+
internalRoutes,
|
|
1707
|
+
installationToolSchema,
|
|
1708
|
+
installationSummarySchema,
|
|
1709
|
+
mcpInstallationRoutes,
|
|
1710
|
+
mcpServerWithInstallationsSchema,
|
|
1711
|
+
mcpOperationToolDetailSchema,
|
|
1712
|
+
mcpDocsPageToolDetailSchema,
|
|
1713
|
+
mcpServerRoutes,
|
|
1714
|
+
mcpVersionToolsSchema,
|
|
1715
|
+
mcpVersionRoutes,
|
|
1716
|
+
openapiRoutes,
|
|
1717
|
+
pubsubRoutes,
|
|
1718
|
+
registryDocumentSchema,
|
|
1719
|
+
registryVersionOperationSchema,
|
|
1720
|
+
registrySearchResultSchema,
|
|
1721
|
+
registryRoutes,
|
|
1722
|
+
usageRecordSchema,
|
|
1723
|
+
teamUsageResponseSchema,
|
|
1724
|
+
usageRoutes,
|
|
1725
|
+
agentApi
|
|
1726
|
+
};
|