@scalar/cli 2.8.0 → 2.11.0
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 +84 -1076
- package/chunks/action-25QMCP5G.js +122 -0
- package/chunks/{action-354TUG4H.js → action-2VF6LODL.js} +20 -16
- package/chunks/{action-XIUO64C7.js → action-5I4XDPPG.js} +20 -14
- package/chunks/action-6M5PTDF6.js +100 -0
- package/chunks/{action-NVI5DWFP.js → action-73ELLN3T.js} +8 -11
- package/chunks/{action-Y6NXJQ4H.js → action-7H3AWCHX.js} +21 -16
- package/chunks/{action-LLH4QPXM.js → action-BRSLSOE5.js} +19 -18
- package/chunks/{action-EOAVVL52.js → action-CQQCKSNS.js} +17 -22
- package/chunks/action-D5QWDNQ2.js +65 -0
- package/chunks/{action-Y7OUGD56.js → action-DQDHBOLJ.js} +34 -31
- package/chunks/{action-5SK5NE7E.js → action-EYPYQQVM.js} +18 -23
- package/chunks/{action-YRX6SN5F.js → action-FMA5ECUA.js} +12 -10
- package/chunks/{action-7PEQXDWT.js → action-GXDJLF2G.js} +134 -25
- package/chunks/action-HUICEXJZ.js +75 -0
- package/chunks/action-IH6G77C5.js +38 -0
- package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
- package/chunks/action-IQM54ITT.js +164 -0
- package/chunks/{action-UIKH4SZX.js → action-J5TO3UJW.js} +32 -26
- package/chunks/{action-H6OUJWWM.js → action-KC3ZCNDR.js} +17 -22
- package/chunks/{action-6BYGBXRC.js → action-L7TMS3Q3.js} +44 -37
- package/chunks/{action-GWXLHL2Z.js → action-LAAHRDSR.js} +5 -4
- package/chunks/{action-FCAYFPVR.js → action-LR75GHBA.js} +14 -11
- package/chunks/action-MJMLQFLT.js +1552 -0
- package/chunks/action-NHU4CUKT.js +130 -0
- package/chunks/action-NKTFNFU7.js +64 -0
- package/chunks/{action-F7A2K74G.js → action-NMW5WPD2.js} +12 -16
- package/chunks/{action-VOFDW3U2.js → action-OTPXODUE.js} +8 -7
- package/chunks/{action-43YBNBDR.js → action-RPCDNGCI.js} +54 -39
- package/chunks/{action-QQZLPI42.js → action-RQCXSJPZ.js} +55 -27
- package/chunks/action-SOYSVG67.js +147 -0
- package/chunks/action-Y7EBKCUU.js +16 -0
- package/chunks/{action-WFDNRA7D.js → action-YN4TE7TG.js} +24 -23
- package/chunks/{action-AQRPFQKI.js → action-ZGNVWTHZ.js} +14 -12
- package/chunks/action-ZKKRPLDK.js +64 -0
- package/chunks/{action-HT2DJ34Z.js → action-ZUZL7R3H.js} +20 -15
- package/chunks/{actions-OGIVBQC7.js → actions-S6K76HCW.js} +46 -19
- package/chunks/{agent-ASPV3R5U.js → agent-IRNEV4K5.js} +46 -9
- package/chunks/{asyncapi-QNFKXHEI.js → asyncapi-WQPIQMEZ.js} +15 -10
- package/chunks/{build.action-NM6CAE5F.js → build.action-CLBVKFWD.js} +28 -24
- package/chunks/chunk-25XERWCE.js +1058 -0
- package/chunks/chunk-3RIUDHLG.js +467 -0
- package/chunks/{chunk-MLSZVVTT.js → chunk-3TFOA64C.js} +19 -8
- package/chunks/{chunk-HGOD6THU.js → chunk-4JKXZ5CF.js} +12 -25
- package/chunks/{chunk-C2KAWRIX.js → chunk-5ENKYZA4.js} +1 -1
- package/chunks/{chunk-W24BETFG.js → chunk-5L7V7RCH.js} +10 -10
- package/chunks/chunk-6PSYZO3U.js +24 -0
- package/chunks/{chunk-IMG35UXX.js → chunk-ALYM4ZB2.js} +1 -1
- package/chunks/chunk-AVZFSWPD.js +37 -0
- package/chunks/{chunk-5UHLAJQD.js → chunk-BQYVSPAI.js} +36 -10
- package/chunks/{chunk-XXSQUBXS.js → chunk-CSSTCHHF.js} +6212 -4642
- package/chunks/chunk-DFOZG7ZV.js +15 -0
- package/chunks/{chunk-22HYZ7LE.js → chunk-DQD2753S.js} +3 -3
- package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
- package/chunks/{chunk-EXY3ZTV4.js → chunk-F3OPMYME.js} +143 -301
- package/chunks/{chunk-FDC2IESH.js → chunk-FG5AOTDN.js} +8519 -14702
- package/chunks/chunk-GKCVATQJ.js +92 -0
- package/chunks/{chunk-PH3WFNXJ.js → chunk-GMHIK5K2.js} +1 -1
- package/chunks/{chunk-GTV2BVXV.js → chunk-GYR5E6RB.js} +2 -2
- package/chunks/{chunk-OJ2EWIJH.js → chunk-HZN6IIPZ.js} +11 -6
- package/chunks/{chunk-IKT5F47M.js → chunk-I57ID5K7.js} +24 -11
- package/chunks/{chunk-BPGFSSUH.js → chunk-KOD2HX5I.js} +1 -1
- package/chunks/{chunk-L3UXDCBI.js → chunk-LOLVJNI5.js} +4 -4
- package/chunks/{chunk-KCCFN4F7.js → chunk-MN2AFJXM.js} +36 -29
- package/chunks/{chunk-UXJ753NV.js → chunk-N5CJ5MTY.js} +5 -13
- package/chunks/chunk-NAC63XJF.js +10 -0
- package/chunks/{chunk-2OCWX42S.js → chunk-NWJ37GI2.js} +166 -22
- package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
- package/chunks/chunk-QMLRYD76.js +24 -0
- package/chunks/{chunk-KKRGBXCE.js → chunk-SEURG74P.js} +303 -209
- package/chunks/{chunk-R5LK6VPY.js → chunk-SOV4POMS.js} +370 -264
- package/chunks/chunk-T34TL6KL.js +222 -0
- package/chunks/{chunk-5DEU2DVL.js → chunk-U6VE6JOS.js} +3 -15
- package/chunks/{chunk-YILQODZF.js → chunk-UFSFY7Z4.js} +23 -20
- package/chunks/{chunk-6YPQGVF4.js → chunk-ULRJZXMS.js} +1 -1
- package/chunks/chunk-US54KYOJ.js +131 -0
- package/chunks/chunk-V6LUKXBV.js +37 -0
- package/chunks/{chunk-5JLVQVKO.js → chunk-VRZSDUZK.js} +190 -152
- package/chunks/chunk-VUXPDHTQ.js +22 -0
- package/chunks/chunk-XP5UM7SF.js +21 -0
- package/chunks/chunk-Y6XGC4K5.js +311 -0
- package/chunks/{create.action-FUQ2BVJA.js → create.action-ITEOQ644.js} +34 -30
- package/chunks/{delete.action-47E66R3I.js → delete.action-77MFPLUN.js} +30 -26
- package/chunks/{delete.action-BTDFH7WY.js → delete.action-C6VX4S5Q.js} +30 -26
- package/chunks/{get.action-XC7KC2JO.js → get.action-3BP4FHZC.js} +20 -14
- package/chunks/get.action-LNBOWUVE.js +95 -0
- package/chunks/list.action-6CRFQPJT.js +156 -0
- package/chunks/list.action-KR5YIDR4.js +126 -0
- package/chunks/{publish.action-OS27XOX4.js → publish.action-YBORRPBM.js} +49 -42
- package/chunks/query-WKATAJJ6.js +129 -0
- package/chunks/scripts-6CI6U32J.js +102 -0
- package/chunks/{update.action-AEIBLCWD.js → update.action-O7TSXDGV.js} +34 -27
- package/chunks/{update.action-ZMS4CQ3T.js → update.action-QZI7M2MV.js} +34 -27
- package/index.js +579 -382
- package/package.json +15 -14
- package/skills/scalar-cli/SKILL.md +52 -46
- package/template.md +71 -136
- package/chunks/action-CA4QYPI6.js +0 -125
- package/chunks/action-JAHFRYWZ.js +0 -423
- package/chunks/action-KTYOCA2V.js +0 -229
- package/chunks/action-LEUD5P2U.js +0 -92
- package/chunks/action-LXGXKXZZ.js +0 -72
- package/chunks/action-W3C53GPH.js +0 -54
- package/chunks/action-YLF2G4G5.js +0 -37
- package/chunks/chunk-6XWCMJDB.js +0 -404
- package/chunks/chunk-K74E42RV.js +0 -7311
- package/chunks/chunk-QVQ4PNVL.js +0 -610
- package/chunks/chunk-XEDGMZJD.js +0 -366
- package/chunks/list.action-LXKEUYKO.js +0 -116
- package/chunks/list.action-OFGLMRE7.js +0 -95
- package/docs.html +0 -6245
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
mcpEnvironmentSchema
|
|
4
|
+
} from "./chunk-T34TL6KL.js";
|
|
2
5
|
import {
|
|
3
6
|
billingPlanSchema
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BQYVSPAI.js";
|
|
5
8
|
import {
|
|
6
9
|
sharedProjectSchema
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VRZSDUZK.js";
|
|
8
11
|
import {
|
|
9
12
|
SCALAR_AGENT_KEY_HEADER,
|
|
10
13
|
agentDocsProjectSchema,
|
|
11
14
|
agentKeySchema,
|
|
15
|
+
createdMcpServerSchema,
|
|
12
16
|
docsProjectTypes,
|
|
13
17
|
embedStatuses,
|
|
14
|
-
|
|
18
|
+
emptyDocumentAuthSchema,
|
|
19
|
+
mcpChannelModes,
|
|
20
|
+
mcpClientCredentialSchema,
|
|
15
21
|
mcpDocsProjectTrackModes,
|
|
16
22
|
mcpDocumentTrackModes,
|
|
17
23
|
mcpInstallationSchema,
|
|
24
|
+
mcpServerChannelSchema,
|
|
18
25
|
mcpServerDocsPageToolSchema,
|
|
19
|
-
|
|
26
|
+
mcpServerHistorySchema,
|
|
20
27
|
mcpServerSchema,
|
|
21
|
-
mcpServerToolModes,
|
|
22
28
|
mcpServerVersionSchema,
|
|
23
29
|
monthlyUsageSchema
|
|
24
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-25XERWCE.js";
|
|
31
|
+
import {
|
|
32
|
+
environmentSlugSchema
|
|
33
|
+
} from "./chunk-AVZFSWPD.js";
|
|
25
34
|
import {
|
|
26
35
|
external_exports,
|
|
27
36
|
namespaceSchema,
|
|
28
37
|
nanoidSchema,
|
|
29
38
|
slugSchema
|
|
30
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-I57ID5K7.js";
|
|
31
40
|
|
|
32
41
|
// ../../packages/entities/dist/api/agent/shared.js
|
|
33
42
|
var agentApiErrorSchema = external_exports.object({
|
|
@@ -48,7 +57,7 @@ var pubsubPushMessageSchema = external_exports.object({
|
|
|
48
57
|
});
|
|
49
58
|
var bumpKindSchema = external_exports.enum(["patch", "minor", "major"]);
|
|
50
59
|
var bumpStrategySchema = external_exports.enum(["new-version", "in-place"]);
|
|
51
|
-
var
|
|
60
|
+
var versionLabelParamSchema = external_exports.string().min(1).regex(/^[^/]+$/, 'a version label without "/"');
|
|
52
61
|
var installationParamSchema = external_exports.string().regex(/^[^@/]+(@[^@/]+)?$/, "installationId or installationId@version");
|
|
53
62
|
|
|
54
63
|
// ../../packages/entities/dist/api/agent/analytics.js
|
|
@@ -252,7 +261,8 @@ var DASHBOARD_EDITOR_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
252
261
|
"get_current_file",
|
|
253
262
|
"validate_openapi",
|
|
254
263
|
"summarize_openapi",
|
|
255
|
-
"validate_config"
|
|
264
|
+
"validate_config",
|
|
265
|
+
"render_og_card"
|
|
256
266
|
]);
|
|
257
267
|
var DASHBOARD_SDK_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
258
268
|
"get_sdk_config",
|
|
@@ -260,6 +270,7 @@ var DASHBOARD_SDK_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
260
270
|
]);
|
|
261
271
|
var DASHBOARD_SDK_CONTEXT_KEY = "sdk-studio";
|
|
262
272
|
var DASHBOARD_EDITOR_CONTEXT_KEY = "docs-editor";
|
|
273
|
+
var DASHBOARD_MCP_INSTALLATION_CONTEXT_KEY = "mcp-installation";
|
|
263
274
|
var DASHBOARD_CHAT_CONTEXT_MAX_CHARS = 12e4;
|
|
264
275
|
var DASHBOARD_CHAT_MAX_MESSAGES = 400;
|
|
265
276
|
var dashboardChatSettingsSchema = external_exports.object({
|
|
@@ -322,10 +333,20 @@ var dashboardRoutes = {
|
|
|
322
333
|
var docsProjectAgentInfoSchema = external_exports.object({
|
|
323
334
|
id: external_exports.string(),
|
|
324
335
|
mcpServerId: external_exports.string().nullable(),
|
|
325
|
-
|
|
336
|
+
/**
|
|
337
|
+
* The environment of `mcpServerId` docs chat calls. Defaulted so a
|
|
338
|
+
* not-yet-redeployed agent service still parses.
|
|
339
|
+
*/
|
|
340
|
+
mcpEnvironment: external_exports.string().nullish().default(null),
|
|
326
341
|
mcpServerName: external_exports.string().nullable(),
|
|
327
342
|
mcpServerSlug: external_exports.string().nullable(),
|
|
328
|
-
|
|
343
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
344
|
+
mcpServerNamespace: external_exports.string().nullish().default(null),
|
|
345
|
+
/**
|
|
346
|
+
* The record uid of `mcpServerId`. Defaulted so a not-yet-redeployed agent
|
|
347
|
+
* service still parses.
|
|
348
|
+
*/
|
|
349
|
+
mcpServerUid: external_exports.string().nullish().default(null)
|
|
329
350
|
});
|
|
330
351
|
var docsChatContextSchema = external_exports.object({
|
|
331
352
|
/** The Vue-router path of the current page, without the hash. */
|
|
@@ -355,7 +376,8 @@ var docsRoutes = {
|
|
|
355
376
|
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
356
377
|
body: external_exports.object({
|
|
357
378
|
mcpServerId: external_exports.string().nullable(),
|
|
358
|
-
|
|
379
|
+
/** An environment slug of the bound server. */
|
|
380
|
+
mcpEnvironment: external_exports.string().nullable()
|
|
359
381
|
}).partial(),
|
|
360
382
|
response: agentDocsProjectSchema,
|
|
361
383
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
@@ -483,18 +505,22 @@ var internalRoutes = {
|
|
|
483
505
|
*/
|
|
484
506
|
namespace: namespaceSchema.optional(),
|
|
485
507
|
serverSlug: slugSchema,
|
|
486
|
-
installationSlug
|
|
508
|
+
/** The environment slug; one of this or `installationSlug` is required. */
|
|
509
|
+
environment: slugSchema.optional(),
|
|
510
|
+
/** The name `environment` had in scalar configs, kept as an alias. */
|
|
511
|
+
installationSlug: slugSchema.optional()
|
|
487
512
|
}),
|
|
488
513
|
response: external_exports.object({
|
|
489
514
|
mcpServerId: external_exports.string(),
|
|
490
|
-
|
|
515
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
516
|
+
environment: external_exports.string().nullish().default(null)
|
|
491
517
|
}),
|
|
492
518
|
responses: {
|
|
493
519
|
400: agentApiErrorSchema,
|
|
494
520
|
404: agentApiErrorSchema,
|
|
495
521
|
409: agentApiErrorSchema
|
|
496
522
|
},
|
|
497
|
-
summary: "Resolve an MCP
|
|
523
|
+
summary: "Resolve an MCP environment by team and slugs"
|
|
498
524
|
},
|
|
499
525
|
createDocsProject: {
|
|
500
526
|
method: "POST",
|
|
@@ -517,8 +543,9 @@ var internalRoutes = {
|
|
|
517
543
|
},
|
|
518
544
|
/**
|
|
519
545
|
* Which of the given record uids have a Postgres row, with the identity
|
|
520
|
-
* fields the row holds. Core's reconcile sweep deletes the
|
|
521
|
-
* agent does not know and patches the ones whose fields
|
|
546
|
+
* and channel fields the row holds. Core's reconcile sweep deletes the
|
|
547
|
+
* records the agent does not know and patches the ones whose fields
|
|
548
|
+
* drifted.
|
|
522
549
|
*/
|
|
523
550
|
knownMcpServers: {
|
|
524
551
|
method: "POST",
|
|
@@ -529,7 +556,11 @@ var internalRoutes = {
|
|
|
529
556
|
uid: external_exports.string(),
|
|
530
557
|
namespace: external_exports.string(),
|
|
531
558
|
name: external_exports.string(),
|
|
532
|
-
slug: external_exports.string()
|
|
559
|
+
slug: external_exports.string(),
|
|
560
|
+
/** Omitted by an agent that predates channels. */
|
|
561
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
562
|
+
/** Omitted by an agent that predates channels. */
|
|
563
|
+
channels: mcpServerChannelSchema.array().optional()
|
|
533
564
|
}).array()
|
|
534
565
|
}),
|
|
535
566
|
summary: "The MCP server rows behind the given record uids"
|
|
@@ -562,19 +593,99 @@ var internalRoutes = {
|
|
|
562
593
|
}
|
|
563
594
|
};
|
|
564
595
|
|
|
596
|
+
// ../../packages/entities/dist/api/agent/mcp-environments.js
|
|
597
|
+
var mcpSettingsRefusalSchema = external_exports.object({
|
|
598
|
+
path: external_exports.union([external_exports.string(), external_exports.number()]).array(),
|
|
599
|
+
message: external_exports.string()
|
|
600
|
+
});
|
|
601
|
+
var mcpEnvironmentsRefusedSchema = agentApiErrorSchema.extend({
|
|
602
|
+
refusals: mcpSettingsRefusalSchema.array()
|
|
603
|
+
});
|
|
604
|
+
var mcpEnvironmentRoutes = {
|
|
605
|
+
provisionMcpEnvironments: {
|
|
606
|
+
method: "PUT",
|
|
607
|
+
path: (p) => `/internal/mcp/servers/${p.uid}/environments`,
|
|
608
|
+
params: external_exports.object({ uid: external_exports.string() }),
|
|
609
|
+
body: external_exports.object({
|
|
610
|
+
teamUid: external_exports.string(),
|
|
611
|
+
recordBuilds: external_exports.boolean().optional(),
|
|
612
|
+
/**
|
|
613
|
+
* Skip the save-time refusals: the save is the agent's own write of
|
|
614
|
+
* what a description says today (a tool selection with the Config
|
|
615
|
+
* defaults), relayed back by core, not a Config edit.
|
|
616
|
+
*/
|
|
617
|
+
unchecked: external_exports.boolean().optional(),
|
|
618
|
+
userUid: external_exports.string().optional(),
|
|
619
|
+
environments: external_exports.record(environmentSlugSchema, mcpEnvironmentSchema)
|
|
620
|
+
}),
|
|
621
|
+
response: external_exports.object({
|
|
622
|
+
environments: external_exports.object({ slug: external_exports.string(), id: external_exports.string() }).array()
|
|
623
|
+
}),
|
|
624
|
+
responses: {
|
|
625
|
+
403: agentApiErrorSchema,
|
|
626
|
+
404: agentApiErrorSchema,
|
|
627
|
+
422: mcpEnvironmentsRefusedSchema
|
|
628
|
+
},
|
|
629
|
+
summary: "Sync an MCP server's environment rows with its record"
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
var mcpChannelOverridesSchema = external_exports.object({
|
|
633
|
+
/**
|
|
634
|
+
* The channel's Config as parsed from JSON or YAML: an OpenAPI-shaped patch
|
|
635
|
+
* over the API description, replacing the environment's own whole; `{}`
|
|
636
|
+
* clears it. Its root `x-scalar-access` sets the environment's login portal
|
|
637
|
+
* and access groups by slug. The agent validates it with `validateMcpConfig`
|
|
638
|
+
* and answers 422 with the refusals.
|
|
639
|
+
*/
|
|
640
|
+
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
641
|
+
});
|
|
642
|
+
var mcpChannelOverrideRoutes = {
|
|
643
|
+
saveChannelOverrides: {
|
|
644
|
+
method: "PUT",
|
|
645
|
+
path: (p) => `/mcp/servers/${p.id}/environments/${p.env}/channels/${p.documentUid}`,
|
|
646
|
+
params: external_exports.object({
|
|
647
|
+
id: external_exports.uuid(),
|
|
648
|
+
env: environmentSlugSchema,
|
|
649
|
+
documentUid: external_exports.string().min(1)
|
|
650
|
+
}),
|
|
651
|
+
body: mcpChannelOverridesSchema,
|
|
652
|
+
response: external_exports.object({
|
|
653
|
+
/** The environment's entry as written; null when the record was left as it was. */
|
|
654
|
+
environment: mcpEnvironmentSchema.nullable(),
|
|
655
|
+
/** The build the save recorded and made active; null when nothing serves the environment yet. */
|
|
656
|
+
buildId: external_exports.string().nullable()
|
|
657
|
+
}),
|
|
658
|
+
responses: {
|
|
659
|
+
403: agentApiErrorSchema,
|
|
660
|
+
404: agentApiErrorSchema,
|
|
661
|
+
409: agentApiErrorSchema,
|
|
662
|
+
422: mcpEnvironmentsRefusedSchema,
|
|
663
|
+
502: agentApiErrorSchema
|
|
664
|
+
},
|
|
665
|
+
summary: "Save one channel's Config in one environment and record one build"
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
|
|
565
669
|
// ../../packages/entities/dist/api/agent/mcp-installations.js
|
|
566
670
|
var installationToolSchema = external_exports.object({
|
|
567
671
|
name: external_exports.string(),
|
|
568
672
|
description: external_exports.string().optional(),
|
|
569
673
|
inputSchema: external_exports.unknown()
|
|
570
674
|
});
|
|
675
|
+
var legacyAddressSchema = external_exports.object({
|
|
676
|
+
/** The last hour a UUID request arrived in; null when none has since the map was filled. */
|
|
677
|
+
lastHitAt: external_exports.string().nullable(),
|
|
678
|
+
expiresAt: external_exports.string()
|
|
679
|
+
});
|
|
571
680
|
var installationSummarySchema = external_exports.object({
|
|
572
681
|
id: external_exports.string(),
|
|
573
682
|
name: external_exports.string(),
|
|
574
683
|
slug: external_exports.string(),
|
|
575
684
|
isPrivate: external_exports.boolean(),
|
|
576
685
|
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
577
|
-
mcpVersion: external_exports.string().nullable().default(null)
|
|
686
|
+
mcpVersion: external_exports.string().nullable().default(null),
|
|
687
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
688
|
+
legacyAddress: legacyAddressSchema.nullish().default(null)
|
|
578
689
|
});
|
|
579
690
|
var serverParams = external_exports.object({ id: external_exports.uuid() });
|
|
580
691
|
var installationParams = external_exports.object({
|
|
@@ -594,22 +705,29 @@ var mcpInstallationRoutes = {
|
|
|
594
705
|
method: "GET",
|
|
595
706
|
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}`,
|
|
596
707
|
params: installationParams,
|
|
597
|
-
response: mcpInstallationSchema
|
|
708
|
+
response: mcpInstallationSchema.extend({
|
|
709
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
710
|
+
legacyAddress: legacyAddressSchema.nullish().default(null),
|
|
711
|
+
/**
|
|
712
|
+
* The one credential the environment asks an MCP client for, which the
|
|
713
|
+
* install snippets offer. Null while no version serves the environment,
|
|
714
|
+
* and defaulted so a not-yet-redeployed agent service still parses.
|
|
715
|
+
*/
|
|
716
|
+
clientCredential: mcpClientCredentialSchema.nullish().default(null)
|
|
717
|
+
}),
|
|
598
718
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
599
719
|
summary: "Get an MCP installation"
|
|
600
720
|
},
|
|
601
|
-
|
|
602
|
-
method: "
|
|
603
|
-
path: (p) => `/mcp/servers/${p.id}/
|
|
604
|
-
params:
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
responses: { 400: agentApiErrorSchema },
|
|
612
|
-
summary: "Create an MCP installation"
|
|
721
|
+
getLegacyAddress: {
|
|
722
|
+
method: "GET",
|
|
723
|
+
path: (p) => `/mcp/servers/${p.id}/legacy-addresses/${p.installationId}`,
|
|
724
|
+
params: installationParams,
|
|
725
|
+
response: external_exports.object({ environment: external_exports.string() }),
|
|
726
|
+
responses: {
|
|
727
|
+
404: agentApiErrorSchema,
|
|
728
|
+
410: agentApiErrorSchema.extend({ address: external_exports.string() })
|
|
729
|
+
},
|
|
730
|
+
summary: "Resolve an installation id to its environment through the legacy address map"
|
|
613
731
|
},
|
|
614
732
|
updateInstallation: {
|
|
615
733
|
method: "PATCH",
|
|
@@ -618,11 +736,7 @@ var mcpInstallationRoutes = {
|
|
|
618
736
|
body: external_exports.object({
|
|
619
737
|
name: external_exports.string().min(1).max(100),
|
|
620
738
|
slug: slugSchema,
|
|
621
|
-
|
|
622
|
-
isPrivate: external_exports.boolean(),
|
|
623
|
-
loginPortalUid: external_exports.string().nullable(),
|
|
624
|
-
authConfig: mcpAuthConfigSchema,
|
|
625
|
-
mcpVersion: semverParamSchema.nullable()
|
|
739
|
+
mcpVersion: versionLabelParamSchema.nullable()
|
|
626
740
|
}).partial(),
|
|
627
741
|
response: mcpInstallationSchema,
|
|
628
742
|
responses: { 400: agentApiErrorSchema },
|
|
@@ -675,19 +789,6 @@ var mcpInstallationRoutes = {
|
|
|
675
789
|
requestBodyDescription: "JSON-RPC request handled by the MCP Streamable HTTP transport.",
|
|
676
790
|
summary: "Public MCP endpoint (JSON-RPC over Streamable HTTP)"
|
|
677
791
|
},
|
|
678
|
-
installationChat: {
|
|
679
|
-
method: "POST",
|
|
680
|
-
path: (p) => `/mcp/installations/${p.installationId}/chat`,
|
|
681
|
-
params: external_exports.object({ installationId: external_exports.uuid() }),
|
|
682
|
-
body: external_exports.object({
|
|
683
|
-
id: external_exports.string(),
|
|
684
|
-
messages: external_exports.any().array(),
|
|
685
|
-
system: external_exports.string().max(1e4).optional()
|
|
686
|
-
}),
|
|
687
|
-
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
688
|
-
responseMediaType: "text/event-stream",
|
|
689
|
-
summary: "Chat with an MCP installation"
|
|
690
|
-
},
|
|
691
792
|
installationTools: {
|
|
692
793
|
method: "GET",
|
|
693
794
|
path: (p) => `/mcp/installations/${p.installationId}/tools`,
|
|
@@ -773,12 +874,18 @@ var mcpServerRoutes = {
|
|
|
773
874
|
projectUid: external_exports.string(),
|
|
774
875
|
trackMode: external_exports.enum(mcpDocsProjectTrackModes)
|
|
775
876
|
})).optional(),
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
877
|
+
/** Single when omitted and exactly one API document is linked. */
|
|
878
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
879
|
+
/**
|
|
880
|
+
* Write every operation of the linked versions into production's Config
|
|
881
|
+
* with the state its description gives it, so a root
|
|
882
|
+
* `x-scalar-expose.enabled: false` holds back only operations a document
|
|
883
|
+
* gains later.
|
|
884
|
+
*/
|
|
885
|
+
pinCurrentOperations: external_exports.boolean().optional(),
|
|
886
|
+
documentAuth: emptyDocumentAuthSchema.optional()
|
|
781
887
|
}),
|
|
888
|
+
response: createdMcpServerSchema,
|
|
782
889
|
responses: { 400: agentApiErrorSchema },
|
|
783
890
|
summary: "Create an MCP server",
|
|
784
891
|
description: "Provisions the Postgres half of a server whose identity record core has already written. Called by core with the provision secret header; the dashboard creates servers through core."
|
|
@@ -794,15 +901,18 @@ var mcpServerRoutes = {
|
|
|
794
901
|
name: external_exports.string().min(1).max(100),
|
|
795
902
|
slug: slugSchema,
|
|
796
903
|
versionUid: external_exports.string(),
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
904
|
+
documentAuth: emptyDocumentAuthSchema,
|
|
905
|
+
/** Single when omitted and the API document is linked. */
|
|
906
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
907
|
+
/**
|
|
908
|
+
* Write every operation of the linked version into production's Config
|
|
909
|
+
* with the state its description gives it, so a root
|
|
910
|
+
* `x-scalar-expose.enabled: false` holds back only operations the
|
|
911
|
+
* document gains later.
|
|
912
|
+
*/
|
|
913
|
+
pinCurrentOperations: external_exports.boolean().optional()
|
|
805
914
|
}),
|
|
915
|
+
response: createdMcpServerSchema,
|
|
806
916
|
responses: { 400: agentApiErrorSchema },
|
|
807
917
|
summary: "Create an MCP server with an installation in one call"
|
|
808
918
|
},
|
|
@@ -813,7 +923,12 @@ var mcpServerRoutes = {
|
|
|
813
923
|
body: external_exports.object({
|
|
814
924
|
name: external_exports.string().min(1).max(100),
|
|
815
925
|
slug: slugSchema,
|
|
816
|
-
|
|
926
|
+
/**
|
|
927
|
+
* Operations to expose as tools: their API document versions are
|
|
928
|
+
* linked, then production's Config is written with each as a tool. A
|
|
929
|
+
* version this call links for the first time has its other operations
|
|
930
|
+
* written as not tools; a version already linked keeps its other tools.
|
|
931
|
+
*/
|
|
817
932
|
operations: external_exports.array(external_exports.uuid()),
|
|
818
933
|
docsPages: external_exports.array(external_exports.uuid()),
|
|
819
934
|
bumpStrategy: bumpStrategySchema,
|
|
@@ -827,6 +942,16 @@ var mcpServerRoutes = {
|
|
|
827
942
|
},
|
|
828
943
|
summary: "Update an MCP server"
|
|
829
944
|
},
|
|
945
|
+
setChannelMode: {
|
|
946
|
+
method: "POST",
|
|
947
|
+
path: (p) => `/mcp/servers/${p.id}/channel-mode`,
|
|
948
|
+
params: serverParams2,
|
|
949
|
+
body: external_exports.object({ to: external_exports.enum(mcpChannelModes) }),
|
|
950
|
+
response: mcpServerSchema,
|
|
951
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
952
|
+
summary: "Convert an MCP server to multi-channel",
|
|
953
|
+
description: "One way: a single-channel server becomes multi-channel and keeps its version labels. Asking for single is refused. Each line then serves its highest label rather than the version linked to the document version it tracks, so a server rolled back to an older document version starts serving its highest label. Requires a team admin or owner, and applies at once with no draft or approval."
|
|
954
|
+
},
|
|
830
955
|
deleteServer: {
|
|
831
956
|
method: "DELETE",
|
|
832
957
|
path: (p) => `/mcp/servers/${p.id}`,
|
|
@@ -843,68 +968,6 @@ var mcpServerRoutes = {
|
|
|
843
968
|
responses: { 400: agentApiErrorSchema },
|
|
844
969
|
summary: "List operation tools for a linked document version"
|
|
845
970
|
},
|
|
846
|
-
updateOperationTools: {
|
|
847
|
-
method: "PATCH",
|
|
848
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools`,
|
|
849
|
-
params: serverParams2,
|
|
850
|
-
body: external_exports.object({
|
|
851
|
-
operationTools: external_exports.array(external_exports.object({
|
|
852
|
-
operationId: external_exports.uuid(),
|
|
853
|
-
searchToolEnabled: external_exports.boolean(),
|
|
854
|
-
executeRequestToolEnabled: external_exports.boolean(),
|
|
855
|
-
curatedToolEnabled: external_exports.boolean()
|
|
856
|
-
}).partial({
|
|
857
|
-
searchToolEnabled: true,
|
|
858
|
-
executeRequestToolEnabled: true,
|
|
859
|
-
curatedToolEnabled: true
|
|
860
|
-
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0 || tool.curatedToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1),
|
|
861
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
862
|
-
bumpKind: bumpKindSchema.optional()
|
|
863
|
-
}),
|
|
864
|
-
response: external_exports.array(mcpServerOperationToolSchema),
|
|
865
|
-
responses: {
|
|
866
|
-
400: agentApiErrorSchema,
|
|
867
|
-
403: agentApiErrorSchema,
|
|
868
|
-
409: agentApiErrorSchema
|
|
869
|
-
},
|
|
870
|
-
summary: "Update operation tool flags"
|
|
871
|
-
},
|
|
872
|
-
deleteOperationTool: {
|
|
873
|
-
method: "DELETE",
|
|
874
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.toolId}`,
|
|
875
|
-
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
876
|
-
response: external_exports.null(),
|
|
877
|
-
responses: { 400: agentApiErrorSchema },
|
|
878
|
-
summary: "Delete an operation tool"
|
|
879
|
-
},
|
|
880
|
-
deleteOperationToolsByVersion: {
|
|
881
|
-
method: "DELETE",
|
|
882
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/versions/${p.versionId}`,
|
|
883
|
-
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
884
|
-
response: external_exports.null(),
|
|
885
|
-
responses: { 400: agentApiErrorSchema },
|
|
886
|
-
summary: "Delete all operation tools of a linked version"
|
|
887
|
-
},
|
|
888
|
-
setOperationToolMetadata: {
|
|
889
|
-
method: "PATCH",
|
|
890
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.operationToolId}/metadata`,
|
|
891
|
-
params: external_exports.object({ id: external_exports.uuid(), operationToolId: external_exports.uuid() }),
|
|
892
|
-
body: external_exports.object({
|
|
893
|
-
name: external_exports.string().nullable().optional(),
|
|
894
|
-
description: external_exports.string().nullable().optional(),
|
|
895
|
-
deprecated: external_exports.boolean().optional(),
|
|
896
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
897
|
-
}),
|
|
898
|
-
response: external_exports.object({
|
|
899
|
-
operationToolId: external_exports.string(),
|
|
900
|
-
name: external_exports.string().nullable().optional(),
|
|
901
|
-
description: external_exports.string().nullable().optional(),
|
|
902
|
-
deprecated: external_exports.boolean().optional(),
|
|
903
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
904
|
-
}),
|
|
905
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
906
|
-
summary: "Set custom name and description on an operation tool"
|
|
907
|
-
},
|
|
908
971
|
getDocsPageToolsByPublish: {
|
|
909
972
|
method: "GET",
|
|
910
973
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.publishId}`,
|
|
@@ -925,16 +988,10 @@ var mcpServerRoutes = {
|
|
|
925
988
|
}).partial({
|
|
926
989
|
searchToolEnabled: true,
|
|
927
990
|
executeRequestToolEnabled: true
|
|
928
|
-
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1)
|
|
929
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
930
|
-
bumpKind: bumpKindSchema.optional()
|
|
991
|
+
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1)
|
|
931
992
|
}),
|
|
932
993
|
response: external_exports.array(mcpServerDocsPageToolSchema),
|
|
933
|
-
responses: {
|
|
934
|
-
400: agentApiErrorSchema,
|
|
935
|
-
403: agentApiErrorSchema,
|
|
936
|
-
409: agentApiErrorSchema
|
|
937
|
-
},
|
|
994
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
938
995
|
summary: "Update docs page tool flags"
|
|
939
996
|
},
|
|
940
997
|
deleteDocsPageTool: {
|
|
@@ -942,7 +999,7 @@ var mcpServerRoutes = {
|
|
|
942
999
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.toolId}`,
|
|
943
1000
|
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
944
1001
|
response: external_exports.null(),
|
|
945
|
-
responses: { 400: agentApiErrorSchema },
|
|
1002
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
946
1003
|
summary: "Delete a docs page tool"
|
|
947
1004
|
},
|
|
948
1005
|
deleteDocsPageToolsByPublish: {
|
|
@@ -950,7 +1007,7 @@ var mcpServerRoutes = {
|
|
|
950
1007
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/publishes/${p.publishId}`,
|
|
951
1008
|
params: external_exports.object({ id: external_exports.uuid(), publishId: external_exports.uuid() }),
|
|
952
1009
|
response: external_exports.null(),
|
|
953
|
-
responses: { 400: agentApiErrorSchema },
|
|
1010
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
954
1011
|
summary: "Delete all docs page tools of a publish"
|
|
955
1012
|
},
|
|
956
1013
|
listServerPublishes: {
|
|
@@ -986,8 +1043,7 @@ var mcpServerRoutes = {
|
|
|
986
1043
|
slug: external_exports.string(),
|
|
987
1044
|
namespace: external_exports.string(),
|
|
988
1045
|
createdAt: external_exports.date(),
|
|
989
|
-
updatedAt: external_exports.date()
|
|
990
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1046
|
+
updatedAt: external_exports.date()
|
|
991
1047
|
}).array(),
|
|
992
1048
|
responses: { 400: agentApiErrorSchema },
|
|
993
1049
|
summary: "List document versions linked to an MCP server"
|
|
@@ -1033,31 +1089,17 @@ var mcpServerRoutes = {
|
|
|
1033
1089
|
responses: { 400: agentApiErrorSchema },
|
|
1034
1090
|
summary: "List docs pages available to link for a project"
|
|
1035
1091
|
},
|
|
1036
|
-
setDocumentToolMode: {
|
|
1037
|
-
method: "PATCH",
|
|
1038
|
-
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionId}/tool-mode`,
|
|
1039
|
-
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
1040
|
-
body: external_exports.object({
|
|
1041
|
-
toolMode: external_exports.enum(mcpServerToolModes),
|
|
1042
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
1043
|
-
bumpKind: bumpKindSchema.optional()
|
|
1044
|
-
}),
|
|
1045
|
-
response: external_exports.object({
|
|
1046
|
-
documentVersionId: external_exports.string(),
|
|
1047
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1048
|
-
}),
|
|
1049
|
-
responses: {
|
|
1050
|
-
400: agentApiErrorSchema,
|
|
1051
|
-
403: agentApiErrorSchema,
|
|
1052
|
-
409: agentApiErrorSchema
|
|
1053
|
-
},
|
|
1054
|
-
summary: "Set the tool mode of a linked document version"
|
|
1055
|
-
},
|
|
1056
1092
|
linkDocumentVersion: {
|
|
1057
1093
|
method: "POST",
|
|
1058
1094
|
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionUid}`,
|
|
1059
1095
|
params: external_exports.object({ id: external_exports.uuid(), versionUid: external_exports.string() }),
|
|
1060
1096
|
body: external_exports.object({
|
|
1097
|
+
/**
|
|
1098
|
+
* The linked version's operations to expose as tools, written into
|
|
1099
|
+
* production's Config as `x-scalar-expose.enabled`; its other operations
|
|
1100
|
+
* are written as not tools. Empty or absent leaves production's Config as
|
|
1101
|
+
* it is. A version already linked is left as it is.
|
|
1102
|
+
*/
|
|
1061
1103
|
operationIds: external_exports.array(external_exports.uuid()).optional(),
|
|
1062
1104
|
bumpKind: bumpKindSchema.optional()
|
|
1063
1105
|
}),
|
|
@@ -1151,8 +1193,7 @@ var mcpVersionToolsSchema = external_exports.object({
|
|
|
1151
1193
|
slug: external_exports.string(),
|
|
1152
1194
|
title: external_exports.string(),
|
|
1153
1195
|
documentUid: external_exports.string(),
|
|
1154
|
-
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
1155
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1196
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
1156
1197
|
})),
|
|
1157
1198
|
linkedDocsPublishes: external_exports.array(external_exports.object({
|
|
1158
1199
|
id: external_exports.string(),
|
|
@@ -1165,7 +1206,11 @@ var mcpVersionToolsSchema = external_exports.object({
|
|
|
1165
1206
|
}))
|
|
1166
1207
|
});
|
|
1167
1208
|
var serverParams3 = external_exports.object({ id: external_exports.uuid() });
|
|
1168
|
-
var versionParams = external_exports.object({
|
|
1209
|
+
var versionParams = external_exports.object({
|
|
1210
|
+
id: external_exports.uuid(),
|
|
1211
|
+
semver: versionLabelParamSchema
|
|
1212
|
+
});
|
|
1213
|
+
var environmentParams = external_exports.object({ id: external_exports.uuid(), env: slugSchema });
|
|
1169
1214
|
var mcpVersionRoutes = {
|
|
1170
1215
|
listVersions: {
|
|
1171
1216
|
method: "GET",
|
|
@@ -1180,7 +1225,7 @@ var mcpVersionRoutes = {
|
|
|
1180
1225
|
},
|
|
1181
1226
|
getVersion: {
|
|
1182
1227
|
method: "GET",
|
|
1183
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1228
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}`,
|
|
1184
1229
|
params: versionParams,
|
|
1185
1230
|
response: mcpServerVersionSchema,
|
|
1186
1231
|
responses: { 400: agentApiErrorSchema },
|
|
@@ -1188,97 +1233,23 @@ var mcpVersionRoutes = {
|
|
|
1188
1233
|
},
|
|
1189
1234
|
getVersionTools: {
|
|
1190
1235
|
method: "GET",
|
|
1191
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1236
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/tools`,
|
|
1192
1237
|
params: versionParams,
|
|
1193
1238
|
response: mcpVersionToolsSchema,
|
|
1194
1239
|
responses: { 400: agentApiErrorSchema },
|
|
1195
1240
|
summary: "Get the tools and links of a version"
|
|
1196
1241
|
},
|
|
1197
|
-
updateVersionTools: {
|
|
1198
|
-
method: "PATCH",
|
|
1199
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1200
|
-
params: versionParams,
|
|
1201
|
-
body: external_exports.object({
|
|
1202
|
-
operationTools: external_exports.array(external_exports.object({
|
|
1203
|
-
operationId: external_exports.uuid(),
|
|
1204
|
-
searchToolEnabled: external_exports.boolean().optional(),
|
|
1205
|
-
executeRequestToolEnabled: external_exports.boolean().optional(),
|
|
1206
|
-
curatedToolEnabled: external_exports.boolean().optional(),
|
|
1207
|
-
name: external_exports.string().nullable().optional(),
|
|
1208
|
-
description: external_exports.string().nullable().optional(),
|
|
1209
|
-
deprecated: external_exports.boolean().optional(),
|
|
1210
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
1211
|
-
})).optional(),
|
|
1212
|
-
docsPageTools: external_exports.array(external_exports.object({
|
|
1213
|
-
docsPageId: external_exports.uuid(),
|
|
1214
|
-
searchToolEnabled: external_exports.boolean().optional(),
|
|
1215
|
-
executeRequestToolEnabled: external_exports.boolean().optional()
|
|
1216
|
-
})).optional()
|
|
1217
|
-
}),
|
|
1218
|
-
response: mcpServerVersionSchema,
|
|
1219
|
-
responses: {
|
|
1220
|
-
400: agentApiErrorSchema,
|
|
1221
|
-
403: agentApiErrorSchema,
|
|
1222
|
-
409: agentApiErrorSchema
|
|
1223
|
-
},
|
|
1224
|
-
summary: "Update tool flags and metadata on a version"
|
|
1225
|
-
},
|
|
1226
|
-
updateVersion: {
|
|
1227
|
-
method: "PATCH",
|
|
1228
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1229
|
-
params: versionParams,
|
|
1230
|
-
body: external_exports.object({ changeNote: external_exports.string().nullable().optional() }),
|
|
1231
|
-
response: mcpServerVersionSchema,
|
|
1232
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1233
|
-
summary: "Update a draft version"
|
|
1234
|
-
},
|
|
1235
1242
|
deleteVersion: {
|
|
1236
1243
|
method: "DELETE",
|
|
1237
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1244
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}`,
|
|
1238
1245
|
params: versionParams,
|
|
1239
1246
|
response: external_exports.null(),
|
|
1240
1247
|
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1241
1248
|
summary: "Delete an MCP server version"
|
|
1242
1249
|
},
|
|
1243
|
-
approveVersion: {
|
|
1244
|
-
method: "POST",
|
|
1245
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/approve`,
|
|
1246
|
-
params: versionParams,
|
|
1247
|
-
response: mcpServerVersionSchema,
|
|
1248
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1249
|
-
summary: "Approve a draft version"
|
|
1250
|
-
},
|
|
1251
|
-
requestVersionApproval: {
|
|
1252
|
-
method: "POST",
|
|
1253
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/request-approval`,
|
|
1254
|
-
params: versionParams,
|
|
1255
|
-
response: mcpServerVersionSchema,
|
|
1256
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1257
|
-
summary: "Send a draft version for approval"
|
|
1258
|
-
},
|
|
1259
|
-
getOpenDraft: {
|
|
1260
|
-
method: "GET",
|
|
1261
|
-
path: (p) => `/mcp/servers/${p.id}/draft`,
|
|
1262
|
-
params: serverParams3,
|
|
1263
|
-
response: mcpServerVersionSchema.nullable(),
|
|
1264
|
-
responses: { 400: agentApiErrorSchema },
|
|
1265
|
-
summary: "Get the open draft version, if any"
|
|
1266
|
-
},
|
|
1267
|
-
publishDraft: {
|
|
1268
|
-
method: "POST",
|
|
1269
|
-
path: (p) => `/mcp/servers/${p.id}/draft/publish`,
|
|
1270
|
-
params: serverParams3,
|
|
1271
|
-
body: external_exports.object({
|
|
1272
|
-
bumpKind: bumpKindSchema.optional(),
|
|
1273
|
-
customSemver: external_exports.string().optional()
|
|
1274
|
-
}),
|
|
1275
|
-
response: mcpServerVersionSchema,
|
|
1276
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1277
|
-
summary: "Publish the open draft version"
|
|
1278
|
-
},
|
|
1279
1250
|
getVersionSuggestedTools: {
|
|
1280
1251
|
method: "GET",
|
|
1281
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/suggested-tools`,
|
|
1252
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/suggested-tools`,
|
|
1282
1253
|
params: versionParams,
|
|
1283
1254
|
response: external_exports.object({
|
|
1284
1255
|
suggestions: external_exports.array(external_exports.object({
|
|
@@ -1296,33 +1267,12 @@ var mcpVersionRoutes = {
|
|
|
1296
1267
|
},
|
|
1297
1268
|
dismissVersionSuggestions: {
|
|
1298
1269
|
method: "POST",
|
|
1299
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/dismiss-suggestions`,
|
|
1270
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/dismiss-suggestions`,
|
|
1300
1271
|
params: versionParams,
|
|
1301
1272
|
response: external_exports.null(),
|
|
1302
1273
|
responses: { 400: agentApiErrorSchema },
|
|
1303
1274
|
summary: "Dismiss tool suggestions for a version"
|
|
1304
1275
|
},
|
|
1305
|
-
setVersionDocumentToolMode: {
|
|
1306
|
-
method: "PATCH",
|
|
1307
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/document-versions/${p.documentVersionId}/tool-mode`,
|
|
1308
|
-
params: external_exports.object({
|
|
1309
|
-
id: external_exports.uuid(),
|
|
1310
|
-
semver: semverParamSchema,
|
|
1311
|
-
documentVersionId: external_exports.uuid()
|
|
1312
|
-
}),
|
|
1313
|
-
body: external_exports.object({ toolMode: external_exports.enum(mcpServerToolModes) }),
|
|
1314
|
-
response: external_exports.object({
|
|
1315
|
-
documentVersionId: external_exports.string(),
|
|
1316
|
-
toolMode: external_exports.enum(mcpServerToolModes),
|
|
1317
|
-
semver: external_exports.string()
|
|
1318
|
-
}),
|
|
1319
|
-
responses: {
|
|
1320
|
-
400: agentApiErrorSchema,
|
|
1321
|
-
403: agentApiErrorSchema,
|
|
1322
|
-
409: agentApiErrorSchema
|
|
1323
|
-
},
|
|
1324
|
-
summary: "Set the tool mode of a document version within a version"
|
|
1325
|
-
},
|
|
1326
1276
|
listDocumentTracking: {
|
|
1327
1277
|
method: "GET",
|
|
1328
1278
|
path: (p) => `/mcp/servers/${p.id}/document-tracking`,
|
|
@@ -1396,6 +1346,24 @@ var mcpVersionRoutes = {
|
|
|
1396
1346
|
}),
|
|
1397
1347
|
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1398
1348
|
summary: "Set how a docs project is tracked"
|
|
1349
|
+
},
|
|
1350
|
+
getHistory: {
|
|
1351
|
+
method: "GET",
|
|
1352
|
+
path: (p) => `/mcp/servers/${p.id}/history`,
|
|
1353
|
+
params: serverParams3,
|
|
1354
|
+
query: external_exports.object({ env: slugSchema.default("production") }),
|
|
1355
|
+
response: mcpServerHistorySchema,
|
|
1356
|
+
responses: { 400: agentApiErrorSchema },
|
|
1357
|
+
summary: "List the builds of an environment's line"
|
|
1358
|
+
},
|
|
1359
|
+
setActiveBuild: {
|
|
1360
|
+
method: "PUT",
|
|
1361
|
+
path: (p) => `/mcp/servers/${p.id}/environments/${p.env}/active`,
|
|
1362
|
+
params: environmentParams,
|
|
1363
|
+
body: external_exports.object({ buildId: external_exports.uuid() }),
|
|
1364
|
+
response: mcpServerHistorySchema,
|
|
1365
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1366
|
+
summary: "Make a build the one an environment serves"
|
|
1399
1367
|
}
|
|
1400
1368
|
};
|
|
1401
1369
|
|
|
@@ -1540,6 +1508,108 @@ var registrySearchResultSchema = external_exports.object({
|
|
|
1540
1508
|
searchEnabled: external_exports.boolean(),
|
|
1541
1509
|
rank: external_exports.number()
|
|
1542
1510
|
});
|
|
1511
|
+
var mcpDocumentServerSchema = external_exports.object({
|
|
1512
|
+
url: external_exports.string(),
|
|
1513
|
+
variables: external_exports.record(external_exports.string(), external_exports.object({
|
|
1514
|
+
default: external_exports.string().optional(),
|
|
1515
|
+
enum: external_exports.string().array().optional()
|
|
1516
|
+
})).optional()
|
|
1517
|
+
});
|
|
1518
|
+
var mcpDocumentSecurityRequirementSchema = external_exports.record(external_exports.string(), external_exports.string().array());
|
|
1519
|
+
var mcpDocumentParameterSchema = external_exports.object({
|
|
1520
|
+
name: external_exports.string(),
|
|
1521
|
+
in: external_exports.string(),
|
|
1522
|
+
required: external_exports.boolean().optional()
|
|
1523
|
+
});
|
|
1524
|
+
var mcpDocumentExposeSchema = external_exports.union([
|
|
1525
|
+
external_exports.boolean(),
|
|
1526
|
+
external_exports.object({
|
|
1527
|
+
enabled: external_exports.union([
|
|
1528
|
+
external_exports.boolean(),
|
|
1529
|
+
external_exports.object({ sdk: external_exports.boolean().optional(), mcp: external_exports.boolean().optional() })
|
|
1530
|
+
]).optional(),
|
|
1531
|
+
name: external_exports.string().optional(),
|
|
1532
|
+
description: external_exports.string().optional(),
|
|
1533
|
+
deprecated: external_exports.boolean().optional(),
|
|
1534
|
+
deprecationMessage: external_exports.string().optional(),
|
|
1535
|
+
toolMode: external_exports.string().optional()
|
|
1536
|
+
})
|
|
1537
|
+
]);
|
|
1538
|
+
var mcpDocumentOperationSchema = external_exports.object({
|
|
1539
|
+
operationId: external_exports.string().optional(),
|
|
1540
|
+
summary: external_exports.string().optional(),
|
|
1541
|
+
deprecated: external_exports.boolean().optional(),
|
|
1542
|
+
tags: external_exports.string().array().optional(),
|
|
1543
|
+
security: mcpDocumentSecurityRequirementSchema.array().optional(),
|
|
1544
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1545
|
+
parameters: mcpDocumentParameterSchema.array().optional(),
|
|
1546
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional(),
|
|
1547
|
+
"x-scalar-ignore": external_exports.boolean().optional(),
|
|
1548
|
+
"x-internal": external_exports.boolean().optional(),
|
|
1549
|
+
"x-scalar-stability": external_exports.string().optional(),
|
|
1550
|
+
/** The message, or the per-target object the SDK config also takes. */
|
|
1551
|
+
"x-scalar-deprecation-message": external_exports.union([external_exports.string(), external_exports.record(external_exports.string(), external_exports.string())]).optional()
|
|
1552
|
+
});
|
|
1553
|
+
var mcpDocumentPathItemSchema = external_exports.object({
|
|
1554
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1555
|
+
parameters: mcpDocumentParameterSchema.array().optional(),
|
|
1556
|
+
get: mcpDocumentOperationSchema.optional(),
|
|
1557
|
+
put: mcpDocumentOperationSchema.optional(),
|
|
1558
|
+
post: mcpDocumentOperationSchema.optional(),
|
|
1559
|
+
delete: mcpDocumentOperationSchema.optional(),
|
|
1560
|
+
options: mcpDocumentOperationSchema.optional(),
|
|
1561
|
+
head: mcpDocumentOperationSchema.optional(),
|
|
1562
|
+
patch: mcpDocumentOperationSchema.optional(),
|
|
1563
|
+
trace: mcpDocumentOperationSchema.optional()
|
|
1564
|
+
});
|
|
1565
|
+
var mcpDocumentOAuthFlowSchema = external_exports.object({
|
|
1566
|
+
authorizationUrl: external_exports.string().optional(),
|
|
1567
|
+
deviceAuthorizationUrl: external_exports.string().optional(),
|
|
1568
|
+
tokenUrl: external_exports.string().optional(),
|
|
1569
|
+
refreshUrl: external_exports.string().optional(),
|
|
1570
|
+
scopes: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
1571
|
+
});
|
|
1572
|
+
var mcpDocumentSecuritySchemeSchema = external_exports.object({
|
|
1573
|
+
type: external_exports.string().optional(),
|
|
1574
|
+
name: external_exports.string().optional(),
|
|
1575
|
+
in: external_exports.string().optional(),
|
|
1576
|
+
scheme: external_exports.string().optional(),
|
|
1577
|
+
bearerFormat: external_exports.string().optional(),
|
|
1578
|
+
openIdConnectUrl: external_exports.string().optional(),
|
|
1579
|
+
oauth2MetadataUrl: external_exports.string().optional(),
|
|
1580
|
+
deprecated: external_exports.boolean().optional(),
|
|
1581
|
+
flows: external_exports.object({
|
|
1582
|
+
implicit: mcpDocumentOAuthFlowSchema.optional(),
|
|
1583
|
+
password: mcpDocumentOAuthFlowSchema.optional(),
|
|
1584
|
+
clientCredentials: mcpDocumentOAuthFlowSchema.optional(),
|
|
1585
|
+
authorizationCode: mcpDocumentOAuthFlowSchema.optional(),
|
|
1586
|
+
deviceAuthorization: mcpDocumentOAuthFlowSchema.optional()
|
|
1587
|
+
}).optional(),
|
|
1588
|
+
"x-scalar-access": external_exports.boolean().optional()
|
|
1589
|
+
});
|
|
1590
|
+
var mcpDocumentStripIssueSchema = external_exports.object({
|
|
1591
|
+
/** JSON pointer of the dropped node in the source document. */
|
|
1592
|
+
pointer: external_exports.string(),
|
|
1593
|
+
/** The `$ref` that could not be followed. */
|
|
1594
|
+
ref: external_exports.string(),
|
|
1595
|
+
reason: external_exports.enum(["dangling", "cyclic", "external"])
|
|
1596
|
+
});
|
|
1597
|
+
var mcpStrippedDocumentSchema = external_exports.object({
|
|
1598
|
+
openapi: external_exports.string().optional(),
|
|
1599
|
+
info: external_exports.object({ title: external_exports.string().optional(), version: external_exports.string().optional() }).optional(),
|
|
1600
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1601
|
+
security: mcpDocumentSecurityRequirementSchema.array().optional(),
|
|
1602
|
+
tags: external_exports.object({
|
|
1603
|
+
name: external_exports.string(),
|
|
1604
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional()
|
|
1605
|
+
}).array().optional(),
|
|
1606
|
+
paths: external_exports.record(external_exports.string(), mcpDocumentPathItemSchema),
|
|
1607
|
+
components: external_exports.object({
|
|
1608
|
+
securitySchemes: external_exports.record(external_exports.string(), mcpDocumentSecuritySchemeSchema).optional()
|
|
1609
|
+
}).optional(),
|
|
1610
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional(),
|
|
1611
|
+
"x-scalar-strip-issues": mcpDocumentStripIssueSchema.array().optional()
|
|
1612
|
+
});
|
|
1543
1613
|
var registryRoutes = {
|
|
1544
1614
|
getDocument: {
|
|
1545
1615
|
method: "GET",
|
|
@@ -1596,6 +1666,20 @@ var registryRoutes = {
|
|
|
1596
1666
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1597
1667
|
summary: "List the operations of a document version"
|
|
1598
1668
|
},
|
|
1669
|
+
getVersionMcpDocument: {
|
|
1670
|
+
method: "GET",
|
|
1671
|
+
path: (p) => `/registry/versions/${p.versionUid}/mcp-document`,
|
|
1672
|
+
params: external_exports.object({ versionUid: external_exports.string() }),
|
|
1673
|
+
response: mcpStrippedDocumentSchema,
|
|
1674
|
+
responses: {
|
|
1675
|
+
400: agentApiErrorSchema,
|
|
1676
|
+
404: agentApiErrorSchema,
|
|
1677
|
+
413: agentApiErrorSchema,
|
|
1678
|
+
422: agentApiErrorSchema
|
|
1679
|
+
},
|
|
1680
|
+
summary: "Get the stripped MCP document of a document version",
|
|
1681
|
+
description: "The bundled document reduced to what MCP configuration reads, with every `$ref` resolved. Served with a content `ETag` and `Cache-Control: private, no-cache`; a matching `If-None-Match` answers 304 with no body. 413 when the stripped document is over 5 MB, 422 when the version has external references that could not be fetched."
|
|
1682
|
+
},
|
|
1599
1683
|
updateVersionOperations: {
|
|
1600
1684
|
method: "PATCH",
|
|
1601
1685
|
path: (p) => `/registry/versions/${p.versionUid}/operations`,
|
|
@@ -1685,6 +1769,11 @@ var registryRoutes = {
|
|
|
1685
1769
|
|
|
1686
1770
|
// ../../packages/entities/dist/api/agent/usage.js
|
|
1687
1771
|
var usageRecordSchema = monthlyUsageSchema.extend({
|
|
1772
|
+
/**
|
|
1773
|
+
* What the row is for, by name; null when that is gone. An MCP row, of type
|
|
1774
|
+
* `mcp-environment` or `mcp-installation`, names its server, with the
|
|
1775
|
+
* environment in parentheses outside production.
|
|
1776
|
+
*/
|
|
1688
1777
|
name: external_exports.string().nullable(),
|
|
1689
1778
|
projectType: external_exports.string().nullable(),
|
|
1690
1779
|
documentUid: external_exports.string().nullable(),
|
|
@@ -1713,7 +1802,8 @@ var agentApi = {
|
|
|
1713
1802
|
mcp: {
|
|
1714
1803
|
...mcpServerRoutes,
|
|
1715
1804
|
...mcpVersionRoutes,
|
|
1716
|
-
...mcpInstallationRoutes
|
|
1805
|
+
...mcpInstallationRoutes,
|
|
1806
|
+
...mcpChannelOverrideRoutes
|
|
1717
1807
|
},
|
|
1718
1808
|
registry: registryRoutes,
|
|
1719
1809
|
docs: docsRoutes,
|
|
@@ -1722,7 +1812,7 @@ var agentApi = {
|
|
|
1722
1812
|
openapi: openapiRoutes,
|
|
1723
1813
|
analytics: analyticsRoutes,
|
|
1724
1814
|
usage: usageRoutes,
|
|
1725
|
-
internal: internalRoutes,
|
|
1815
|
+
internal: { ...internalRoutes, ...mcpEnvironmentRoutes },
|
|
1726
1816
|
pubsub: pubsubRoutes
|
|
1727
1817
|
};
|
|
1728
1818
|
|
|
@@ -1731,7 +1821,7 @@ export {
|
|
|
1731
1821
|
pubsubPushMessageSchema,
|
|
1732
1822
|
bumpKindSchema,
|
|
1733
1823
|
bumpStrategySchema,
|
|
1734
|
-
|
|
1824
|
+
versionLabelParamSchema,
|
|
1735
1825
|
installationParamSchema,
|
|
1736
1826
|
analyticsRangeSchema,
|
|
1737
1827
|
analyticsGranularitySchema,
|
|
@@ -1757,6 +1847,7 @@ export {
|
|
|
1757
1847
|
DASHBOARD_SDK_TOOL_NAMES,
|
|
1758
1848
|
DASHBOARD_SDK_CONTEXT_KEY,
|
|
1759
1849
|
DASHBOARD_EDITOR_CONTEXT_KEY,
|
|
1850
|
+
DASHBOARD_MCP_INSTALLATION_CONTEXT_KEY,
|
|
1760
1851
|
DASHBOARD_CHAT_CONTEXT_MAX_CHARS,
|
|
1761
1852
|
DASHBOARD_CHAT_MAX_MESSAGES,
|
|
1762
1853
|
dashboardChatSettingsSchema,
|
|
@@ -1769,7 +1860,13 @@ export {
|
|
|
1769
1860
|
pullRequestDescriptionBodySchema,
|
|
1770
1861
|
editorRoutes,
|
|
1771
1862
|
internalRoutes,
|
|
1863
|
+
mcpSettingsRefusalSchema,
|
|
1864
|
+
mcpEnvironmentsRefusedSchema,
|
|
1865
|
+
mcpEnvironmentRoutes,
|
|
1866
|
+
mcpChannelOverridesSchema,
|
|
1867
|
+
mcpChannelOverrideRoutes,
|
|
1772
1868
|
installationToolSchema,
|
|
1869
|
+
legacyAddressSchema,
|
|
1773
1870
|
installationSummarySchema,
|
|
1774
1871
|
mcpInstallationRoutes,
|
|
1775
1872
|
mcpServerWithInstallationsSchema,
|
|
@@ -1783,6 +1880,15 @@ export {
|
|
|
1783
1880
|
registryDocumentSchema,
|
|
1784
1881
|
registryVersionOperationSchema,
|
|
1785
1882
|
registrySearchResultSchema,
|
|
1883
|
+
mcpDocumentServerSchema,
|
|
1884
|
+
mcpDocumentSecurityRequirementSchema,
|
|
1885
|
+
mcpDocumentParameterSchema,
|
|
1886
|
+
mcpDocumentExposeSchema,
|
|
1887
|
+
mcpDocumentOperationSchema,
|
|
1888
|
+
mcpDocumentPathItemSchema,
|
|
1889
|
+
mcpDocumentSecuritySchemeSchema,
|
|
1890
|
+
mcpDocumentStripIssueSchema,
|
|
1891
|
+
mcpStrippedDocumentSchema,
|
|
1786
1892
|
registryRoutes,
|
|
1787
1893
|
usageRecordSchema,
|
|
1788
1894
|
teamUsageResponseSchema,
|