@scalar/cli 2.10.0 → 2.12.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 -1289
- package/chunks/action-2OPUQFUY.js +164 -0
- package/chunks/{action-4GZI2M5B.js → action-36LZ6XXE.js} +19 -17
- package/chunks/{action-KDUFU7TZ.js → action-3XMTJJRT.js} +19 -16
- package/chunks/{action-R4PGILN4.js → action-6CLEENBI.js} +47 -36
- package/chunks/{action-ZFI77WA5.js → action-7HXYZPOT.js} +10 -10
- package/chunks/{action-X7BA7PQQ.js → action-AC5ENU6Z.js} +20 -18
- package/chunks/{action-PPTFYZWD.js → action-ADGLTNFC.js} +28 -22
- package/chunks/{action-7XOHYWYM.js → action-AOKHLTZ6.js} +25 -21
- package/chunks/{action-XOADBXSX.js → action-AVSJ3AJY.js} +17 -16
- package/chunks/{action-GFLRD7LO.js → action-D3IVCY24.js} +8 -8
- package/chunks/action-EBZJS367.js +130 -0
- package/chunks/{action-ZKA3RR3S.js → action-EZXHSAJ2.js} +18 -17
- package/chunks/{action-5LF4XYHX.js → action-FDTVHVHF.js} +12 -12
- package/chunks/{action-JEYDBB3P.js → action-FUO5F7NV.js} +15 -15
- package/chunks/{action-DKDRAIKV.js → action-HA3CMV3P.js} +13 -15
- package/chunks/{action-YSVTZVKV.js → action-IG3BK2LF.js} +37 -26
- package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
- package/chunks/{action-DTEO4YNX.js → action-JT6C472I.js} +13 -11
- package/chunks/{action-UUL6SWV4.js → action-KDT6H6ML.js} +12 -14
- package/chunks/{action-PAM2EZ22.js → action-KJDIJQ3A.js} +8 -7
- package/chunks/{action-HT42NUUX.js → action-NF5E7JKA.js} +40 -38
- package/chunks/{action-EAUTQ77U.js → action-NIZBME45.js} +26 -24
- package/chunks/{action-CB55NWAU.js → action-O757TFA2.js} +9 -9
- package/chunks/{action-XLE37MZL.js → action-ONR7QSN7.js} +23 -22
- package/chunks/{action-5RL4NWUZ.js → action-QM2BMMHG.js} +33 -30
- package/chunks/{action-GWYYTUTM.js → action-QVTAZCKY.js} +5 -5
- package/chunks/action-SLB52XRG.js +65 -0
- package/chunks/{action-CABLS46Q.js → action-UTFRCKGE.js} +11 -11
- package/chunks/{action-4W5GUGEG.js → action-VESBFIP3.js} +20 -19
- package/chunks/{action-657A4K2D.js → action-VGFAIFYE.js} +26 -23
- package/chunks/action-WCU5O2VT.js +100 -0
- package/chunks/{action-TOBU74JH.js → action-XS5EESHW.js} +51 -27
- package/chunks/action-XVNRZ5VX.js +38 -0
- package/chunks/action-Y7EBKCUU.js +16 -0
- package/chunks/{action-5N3P43MD.js → action-YWQ2OKS3.js} +16 -15
- package/chunks/{actions-3SAMH7A5.js → actions-6QG7LH7P.js} +23 -20
- package/chunks/{agent-2ESZI7NO.js → agent-ONXROEAE.js} +44 -9
- package/chunks/{asyncapi-4HGVM3PR.js → asyncapi-7IFXAIE3.js} +13 -12
- package/chunks/{build.action-VBGFGACM.js → build.action-FI4OWY3T.js} +28 -26
- package/chunks/{chunk-ZGNDXPLU.js → chunk-26VIHQGL.js} +3 -3
- package/chunks/{chunk-JXGF5EHC.js → chunk-3HCEUGOE.js} +42 -13
- package/chunks/{chunk-G4HRW2FZ.js → chunk-5TNKTLQP.js} +370 -254
- package/chunks/{chunk-XAGJJNQW.js → chunk-BB6WWG25.js} +10 -10
- package/chunks/{chunk-K2HIB5BA.js → chunk-BCFUMXMC.js} +3 -3
- package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
- package/chunks/{chunk-MC4EMNOR.js → chunk-EJSGWV2K.js} +7 -6
- package/chunks/{chunk-GYRQPDTK.js → chunk-FJCOYEKT.js} +139 -3
- package/chunks/{chunk-ZKJPLWRJ.js → chunk-HU47OMI4.js} +4 -4
- package/chunks/{chunk-VVRUSQCY.js → chunk-I57ID5K7.js} +13 -0
- package/chunks/{chunk-43WALAW3.js → chunk-JLNHOA5Z.js} +64 -115
- package/chunks/{chunk-5SMP756H.js → chunk-LCSU43NJ.js} +2 -2
- package/chunks/{chunk-KHF2QXBG.js → chunk-N645RGAB.js} +1853 -683
- package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
- package/chunks/{chunk-H467HDVV.js → chunk-PERC34BV.js} +1 -1
- package/chunks/chunk-Q26DFKTY.js +37 -0
- package/chunks/{chunk-MMWSCTDB.js → chunk-QJQTSRU4.js} +19 -19
- package/chunks/{chunk-WDIWLXLV.js → chunk-RLBS4HJT.js} +3 -3
- package/chunks/{chunk-ATNTXKMS.js → chunk-RNZVZMYC.js} +198 -42
- package/chunks/{chunk-IPZP3VRA.js → chunk-RYWXF3LO.js} +12 -21
- package/chunks/{chunk-CWVYOXXM.js → chunk-SNOAL2C5.js} +11 -7
- package/chunks/{chunk-UDBSV3CK.js → chunk-T3R66THO.js} +6085 -4167
- package/chunks/{chunk-VYFGRLVQ.js → chunk-U73OW57G.js} +1 -1
- package/chunks/chunk-U764PQUA.js +1034 -0
- package/chunks/{chunk-KZNRQVMY.js → chunk-UAFCSWQ6.js} +1 -1
- package/chunks/{chunk-WB6PWTMU.js → chunk-UBLFIMUA.js} +1 -1
- package/chunks/{chunk-WIEXQUTD.js → chunk-UODTHS76.js} +1 -1
- package/chunks/chunk-V3MYP5SQ.js +247 -0
- package/chunks/{chunk-36LXIJIZ.js → chunk-V6LUKXBV.js} +1 -16
- package/chunks/{chunk-6M7TL2G2.js → chunk-VRZSDUZK.js} +45 -5
- package/chunks/{chunk-GLWTVLKM.js → chunk-VUNOOPEG.js} +9 -2
- package/chunks/chunk-VUXPDHTQ.js +22 -0
- package/chunks/{chunk-DHZW7Q7U.js → chunk-VVQOFG76.js} +2 -4
- package/chunks/chunk-XP5UM7SF.js +21 -0
- package/chunks/{chunk-ZYBLQ5CT.js → chunk-Y6C3H27E.js} +9 -4
- package/chunks/{chunk-35Z7VTJT.js → chunk-YTFFBGNQ.js} +52 -38
- package/chunks/{chunk-BIMLCGKS.js → chunk-ZNLMQKDU.js} +1 -1
- package/chunks/{create.action-DBNIS665.js → create.action-PPMZEMZL.js} +34 -32
- package/chunks/{delete.action-GBOZC45K.js → delete.action-GDOHATRZ.js} +30 -28
- package/chunks/{delete.action-K7BLK7DK.js → delete.action-VAHKEHEU.js} +29 -27
- package/chunks/{get.action-QHKMYZBK.js → get.action-UXFTGO7W.js} +24 -20
- package/chunks/{get.action-N3JOY3OU.js → get.action-XON3EZDT.js} +16 -15
- package/chunks/{list.action-TJCS6UEY.js → list.action-24F5WDGR.js} +37 -26
- package/chunks/{list.action-6SSO3JVN.js → list.action-OQEAEJ5U.js} +39 -29
- package/chunks/{publish.action-T24VHRMR.js → publish.action-G7FPDRBZ.js} +45 -43
- package/chunks/{scripts-VIBLGKYG.js → scripts-6CI6U32J.js} +1 -1
- package/chunks/{update.action-VOE6PH5F.js → update.action-IFIFXZWA.js} +29 -27
- package/chunks/{update.action-OGYNBXRU.js → update.action-MJDHVVR3.js} +30 -28
- package/index.js +290 -284
- package/package.json +2 -2
- package/skills/scalar-cli/SKILL.md +49 -49
- package/template.md +68 -252
- package/chunks/action-FBRY5JKU.js +0 -37
- package/chunks/action-LYCNT3KA.js +0 -73
- package/chunks/action-OJ2NK25F.js +0 -121
- package/chunks/action-U2L5DCFG.js +0 -91
- package/chunks/chunk-MNNGUUKJ.js +0 -405
- package/chunks/chunk-ZGVZU6L2.js +0 -422
- package/docs.html +0 -6977
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
mcpEnvironmentSchema
|
|
4
|
+
} from "./chunk-V3MYP5SQ.js";
|
|
2
5
|
import {
|
|
3
6
|
billingPlanSchema
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FJCOYEKT.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
|
+
mcpChannelModes,
|
|
19
|
+
mcpClientCredentialSchema,
|
|
15
20
|
mcpDocsProjectTrackModes,
|
|
16
21
|
mcpDocumentTrackModes,
|
|
17
22
|
mcpInstallationSchema,
|
|
23
|
+
mcpServerChannelSchema,
|
|
18
24
|
mcpServerDocsPageToolSchema,
|
|
19
|
-
|
|
25
|
+
mcpServerHistorySchema,
|
|
20
26
|
mcpServerSchema,
|
|
21
|
-
mcpServerToolModes,
|
|
22
27
|
mcpServerVersionSchema,
|
|
23
28
|
monthlyUsageSchema
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-U764PQUA.js";
|
|
30
|
+
import {
|
|
31
|
+
environmentSlugSchema
|
|
32
|
+
} from "./chunk-Q26DFKTY.js";
|
|
25
33
|
import {
|
|
26
34
|
external_exports,
|
|
27
35
|
namespaceSchema,
|
|
28
36
|
nanoidSchema,
|
|
29
37
|
slugSchema
|
|
30
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-I57ID5K7.js";
|
|
31
39
|
|
|
32
40
|
// ../../packages/entities/dist/api/agent/shared.js
|
|
33
41
|
var agentApiErrorSchema = external_exports.object({
|
|
@@ -48,7 +56,7 @@ var pubsubPushMessageSchema = external_exports.object({
|
|
|
48
56
|
});
|
|
49
57
|
var bumpKindSchema = external_exports.enum(["patch", "minor", "major"]);
|
|
50
58
|
var bumpStrategySchema = external_exports.enum(["new-version", "in-place"]);
|
|
51
|
-
var
|
|
59
|
+
var versionLabelParamSchema = external_exports.string().min(1).regex(/^[^/]+$/, 'a version label without "/"');
|
|
52
60
|
var installationParamSchema = external_exports.string().regex(/^[^@/]+(@[^@/]+)?$/, "installationId or installationId@version");
|
|
53
61
|
|
|
54
62
|
// ../../packages/entities/dist/api/agent/analytics.js
|
|
@@ -324,10 +332,20 @@ var dashboardRoutes = {
|
|
|
324
332
|
var docsProjectAgentInfoSchema = external_exports.object({
|
|
325
333
|
id: external_exports.string(),
|
|
326
334
|
mcpServerId: external_exports.string().nullable(),
|
|
327
|
-
|
|
335
|
+
/**
|
|
336
|
+
* The environment of `mcpServerId` docs chat calls. Defaulted so a
|
|
337
|
+
* not-yet-redeployed agent service still parses.
|
|
338
|
+
*/
|
|
339
|
+
mcpEnvironment: external_exports.string().nullish().default(null),
|
|
328
340
|
mcpServerName: external_exports.string().nullable(),
|
|
329
341
|
mcpServerSlug: external_exports.string().nullable(),
|
|
330
|
-
|
|
342
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
343
|
+
mcpServerNamespace: external_exports.string().nullish().default(null),
|
|
344
|
+
/**
|
|
345
|
+
* The record uid of `mcpServerId`. Defaulted so a not-yet-redeployed agent
|
|
346
|
+
* service still parses.
|
|
347
|
+
*/
|
|
348
|
+
mcpServerUid: external_exports.string().nullish().default(null)
|
|
331
349
|
});
|
|
332
350
|
var docsChatContextSchema = external_exports.object({
|
|
333
351
|
/** The Vue-router path of the current page, without the hash. */
|
|
@@ -357,7 +375,8 @@ var docsRoutes = {
|
|
|
357
375
|
params: external_exports.object({ projectUid: external_exports.string() }),
|
|
358
376
|
body: external_exports.object({
|
|
359
377
|
mcpServerId: external_exports.string().nullable(),
|
|
360
|
-
|
|
378
|
+
/** An environment slug of the bound server. */
|
|
379
|
+
mcpEnvironment: external_exports.string().nullable()
|
|
361
380
|
}).partial(),
|
|
362
381
|
response: agentDocsProjectSchema,
|
|
363
382
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
@@ -485,18 +504,22 @@ var internalRoutes = {
|
|
|
485
504
|
*/
|
|
486
505
|
namespace: namespaceSchema.optional(),
|
|
487
506
|
serverSlug: slugSchema,
|
|
488
|
-
installationSlug
|
|
507
|
+
/** The environment slug; one of this or `installationSlug` is required. */
|
|
508
|
+
environment: slugSchema.optional(),
|
|
509
|
+
/** The name `environment` had in scalar configs, kept as an alias. */
|
|
510
|
+
installationSlug: slugSchema.optional()
|
|
489
511
|
}),
|
|
490
512
|
response: external_exports.object({
|
|
491
513
|
mcpServerId: external_exports.string(),
|
|
492
|
-
|
|
514
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
515
|
+
environment: external_exports.string().nullish().default(null)
|
|
493
516
|
}),
|
|
494
517
|
responses: {
|
|
495
518
|
400: agentApiErrorSchema,
|
|
496
519
|
404: agentApiErrorSchema,
|
|
497
520
|
409: agentApiErrorSchema
|
|
498
521
|
},
|
|
499
|
-
summary: "Resolve an MCP
|
|
522
|
+
summary: "Resolve an MCP environment by team and slugs"
|
|
500
523
|
},
|
|
501
524
|
createDocsProject: {
|
|
502
525
|
method: "POST",
|
|
@@ -519,8 +542,9 @@ var internalRoutes = {
|
|
|
519
542
|
},
|
|
520
543
|
/**
|
|
521
544
|
* Which of the given record uids have a Postgres row, with the identity
|
|
522
|
-
* fields the row holds. Core's reconcile sweep deletes the
|
|
523
|
-
* agent does not know and patches the ones whose fields
|
|
545
|
+
* and channel fields the row holds. Core's reconcile sweep deletes the
|
|
546
|
+
* records the agent does not know and patches the ones whose fields
|
|
547
|
+
* drifted.
|
|
524
548
|
*/
|
|
525
549
|
knownMcpServers: {
|
|
526
550
|
method: "POST",
|
|
@@ -531,7 +555,11 @@ var internalRoutes = {
|
|
|
531
555
|
uid: external_exports.string(),
|
|
532
556
|
namespace: external_exports.string(),
|
|
533
557
|
name: external_exports.string(),
|
|
534
|
-
slug: external_exports.string()
|
|
558
|
+
slug: external_exports.string(),
|
|
559
|
+
/** Omitted by an agent that predates channels. */
|
|
560
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
561
|
+
/** Omitted by an agent that predates channels. */
|
|
562
|
+
channels: mcpServerChannelSchema.array().optional()
|
|
535
563
|
}).array()
|
|
536
564
|
}),
|
|
537
565
|
summary: "The MCP server rows behind the given record uids"
|
|
@@ -564,19 +592,99 @@ var internalRoutes = {
|
|
|
564
592
|
}
|
|
565
593
|
};
|
|
566
594
|
|
|
595
|
+
// ../../packages/entities/dist/api/agent/mcp-environments.js
|
|
596
|
+
var mcpSettingsRefusalSchema = external_exports.object({
|
|
597
|
+
path: external_exports.union([external_exports.string(), external_exports.number()]).array(),
|
|
598
|
+
message: external_exports.string()
|
|
599
|
+
});
|
|
600
|
+
var mcpEnvironmentsRefusedSchema = agentApiErrorSchema.extend({
|
|
601
|
+
refusals: mcpSettingsRefusalSchema.array()
|
|
602
|
+
});
|
|
603
|
+
var mcpEnvironmentRoutes = {
|
|
604
|
+
provisionMcpEnvironments: {
|
|
605
|
+
method: "PUT",
|
|
606
|
+
path: (p) => `/internal/mcp/servers/${p.uid}/environments`,
|
|
607
|
+
params: external_exports.object({ uid: external_exports.string() }),
|
|
608
|
+
body: external_exports.object({
|
|
609
|
+
teamUid: external_exports.string(),
|
|
610
|
+
recordBuilds: external_exports.boolean().optional(),
|
|
611
|
+
/**
|
|
612
|
+
* Skip the save-time refusals: the save is the agent's own write of
|
|
613
|
+
* what a description says today (a tool selection with the Config
|
|
614
|
+
* defaults), relayed back by core, not a Config edit.
|
|
615
|
+
*/
|
|
616
|
+
unchecked: external_exports.boolean().optional(),
|
|
617
|
+
userUid: external_exports.string().optional(),
|
|
618
|
+
environments: external_exports.record(environmentSlugSchema, mcpEnvironmentSchema)
|
|
619
|
+
}),
|
|
620
|
+
response: external_exports.object({
|
|
621
|
+
environments: external_exports.object({ slug: external_exports.string(), id: external_exports.string() }).array()
|
|
622
|
+
}),
|
|
623
|
+
responses: {
|
|
624
|
+
403: agentApiErrorSchema,
|
|
625
|
+
404: agentApiErrorSchema,
|
|
626
|
+
422: mcpEnvironmentsRefusedSchema
|
|
627
|
+
},
|
|
628
|
+
summary: "Sync an MCP server's environment rows with its record"
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
var mcpChannelOverridesSchema = external_exports.object({
|
|
632
|
+
/**
|
|
633
|
+
* The channel's Config as parsed from JSON or YAML: an OpenAPI-shaped patch
|
|
634
|
+
* over the API description, replacing the environment's own whole; `{}`
|
|
635
|
+
* clears it. Its root `x-scalar-access` sets the environment's login
|
|
636
|
+
* portal, access groups and access group secrets by slug. The agent
|
|
637
|
+
* validates it with `validateMcpConfig` and answers 422 with the refusals.
|
|
638
|
+
*/
|
|
639
|
+
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
640
|
+
});
|
|
641
|
+
var mcpChannelOverrideRoutes = {
|
|
642
|
+
saveChannelOverrides: {
|
|
643
|
+
method: "PUT",
|
|
644
|
+
path: (p) => `/mcp/servers/${p.id}/environments/${p.env}/channels/${p.documentUid}`,
|
|
645
|
+
params: external_exports.object({
|
|
646
|
+
id: external_exports.uuid(),
|
|
647
|
+
env: environmentSlugSchema,
|
|
648
|
+
documentUid: external_exports.string().min(1)
|
|
649
|
+
}),
|
|
650
|
+
body: mcpChannelOverridesSchema,
|
|
651
|
+
response: external_exports.object({
|
|
652
|
+
/** The environment's entry as written; null when the record was left as it was. */
|
|
653
|
+
environment: mcpEnvironmentSchema.nullable(),
|
|
654
|
+
/** The build the save recorded and made active; null when nothing serves the environment yet. */
|
|
655
|
+
buildId: external_exports.string().nullable()
|
|
656
|
+
}),
|
|
657
|
+
responses: {
|
|
658
|
+
403: agentApiErrorSchema,
|
|
659
|
+
404: agentApiErrorSchema,
|
|
660
|
+
409: agentApiErrorSchema,
|
|
661
|
+
422: mcpEnvironmentsRefusedSchema,
|
|
662
|
+
502: agentApiErrorSchema
|
|
663
|
+
},
|
|
664
|
+
summary: "Save one channel's Config in one environment and record one build"
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
567
668
|
// ../../packages/entities/dist/api/agent/mcp-installations.js
|
|
568
669
|
var installationToolSchema = external_exports.object({
|
|
569
670
|
name: external_exports.string(),
|
|
570
671
|
description: external_exports.string().optional(),
|
|
571
672
|
inputSchema: external_exports.unknown()
|
|
572
673
|
});
|
|
674
|
+
var legacyAddressSchema = external_exports.object({
|
|
675
|
+
/** The last hour a UUID request arrived in; null when none has since the map was filled. */
|
|
676
|
+
lastHitAt: external_exports.string().nullable(),
|
|
677
|
+
expiresAt: external_exports.string()
|
|
678
|
+
});
|
|
573
679
|
var installationSummarySchema = external_exports.object({
|
|
574
680
|
id: external_exports.string(),
|
|
575
681
|
name: external_exports.string(),
|
|
576
682
|
slug: external_exports.string(),
|
|
577
683
|
isPrivate: external_exports.boolean(),
|
|
578
684
|
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
579
|
-
mcpVersion: external_exports.string().nullable().default(null)
|
|
685
|
+
mcpVersion: external_exports.string().nullable().default(null),
|
|
686
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
687
|
+
legacyAddress: legacyAddressSchema.nullish().default(null)
|
|
580
688
|
});
|
|
581
689
|
var serverParams = external_exports.object({ id: external_exports.uuid() });
|
|
582
690
|
var installationParams = external_exports.object({
|
|
@@ -596,24 +704,29 @@ var mcpInstallationRoutes = {
|
|
|
596
704
|
method: "GET",
|
|
597
705
|
path: (p) => `/mcp/servers/${p.id}/installations/${p.installationId}`,
|
|
598
706
|
params: installationParams,
|
|
599
|
-
response: mcpInstallationSchema
|
|
707
|
+
response: mcpInstallationSchema.extend({
|
|
708
|
+
/** Defaulted so a not-yet-redeployed agent service still parses. */
|
|
709
|
+
legacyAddress: legacyAddressSchema.nullish().default(null),
|
|
710
|
+
/**
|
|
711
|
+
* The one credential the environment asks an MCP client for, which the
|
|
712
|
+
* install snippets offer. Null while no version serves the environment,
|
|
713
|
+
* and defaulted so a not-yet-redeployed agent service still parses.
|
|
714
|
+
*/
|
|
715
|
+
clientCredential: mcpClientCredentialSchema.nullish().default(null)
|
|
716
|
+
}),
|
|
600
717
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
601
718
|
summary: "Get an MCP installation"
|
|
602
719
|
},
|
|
603
|
-
|
|
604
|
-
method: "
|
|
605
|
-
path: (p) => `/mcp/servers/${p.id}/
|
|
606
|
-
params:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}),
|
|
614
|
-
response: mcpInstallationSchema,
|
|
615
|
-
responses: { 400: agentApiErrorSchema },
|
|
616
|
-
summary: "Create an MCP installation"
|
|
720
|
+
getLegacyAddress: {
|
|
721
|
+
method: "GET",
|
|
722
|
+
path: (p) => `/mcp/servers/${p.id}/legacy-addresses/${p.installationId}`,
|
|
723
|
+
params: installationParams,
|
|
724
|
+
response: external_exports.object({ environment: external_exports.string() }),
|
|
725
|
+
responses: {
|
|
726
|
+
404: agentApiErrorSchema,
|
|
727
|
+
410: agentApiErrorSchema.extend({ address: external_exports.string() })
|
|
728
|
+
},
|
|
729
|
+
summary: "Resolve an installation id to its environment through the legacy address map"
|
|
617
730
|
},
|
|
618
731
|
updateInstallation: {
|
|
619
732
|
method: "PATCH",
|
|
@@ -622,11 +735,7 @@ var mcpInstallationRoutes = {
|
|
|
622
735
|
body: external_exports.object({
|
|
623
736
|
name: external_exports.string().min(1).max(100),
|
|
624
737
|
slug: slugSchema,
|
|
625
|
-
|
|
626
|
-
isPrivate: external_exports.boolean(),
|
|
627
|
-
loginPortalUid: external_exports.string().nullable(),
|
|
628
|
-
authConfig: mcpAuthConfigSchema,
|
|
629
|
-
mcpVersion: semverParamSchema.nullable()
|
|
738
|
+
mcpVersion: versionLabelParamSchema.nullable()
|
|
630
739
|
}).partial(),
|
|
631
740
|
response: mcpInstallationSchema,
|
|
632
741
|
responses: { 400: agentApiErrorSchema },
|
|
@@ -697,7 +806,13 @@ var mcpServerWithInstallationsSchema = mcpServerSchema.extend({
|
|
|
697
806
|
slug: external_exports.string(),
|
|
698
807
|
mcpServerId: external_exports.string(),
|
|
699
808
|
isPrivate: external_exports.boolean()
|
|
700
|
-
}).array()
|
|
809
|
+
}).array(),
|
|
810
|
+
/**
|
|
811
|
+
* The docs project this server was created for, the server its docs site's
|
|
812
|
+
* Ask AI and `/mcp` answer from; null for a server the team built, even one
|
|
813
|
+
* a docs project was later pointed at.
|
|
814
|
+
*/
|
|
815
|
+
docsProjectUid: external_exports.string().nullish()
|
|
701
816
|
});
|
|
702
817
|
var mcpOperationToolDetailSchema = external_exports.object({
|
|
703
818
|
id: external_exports.string(),
|
|
@@ -764,12 +879,17 @@ var mcpServerRoutes = {
|
|
|
764
879
|
projectUid: external_exports.string(),
|
|
765
880
|
trackMode: external_exports.enum(mcpDocsProjectTrackModes)
|
|
766
881
|
})).optional(),
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
882
|
+
/** Single when omitted and exactly one API document is linked. */
|
|
883
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
884
|
+
/**
|
|
885
|
+
* Write every operation of the linked versions into production's Config
|
|
886
|
+
* with the state its description gives it, so a root
|
|
887
|
+
* `x-scalar-expose.enabled: false` holds back only operations a document
|
|
888
|
+
* gains later.
|
|
889
|
+
*/
|
|
890
|
+
pinCurrentOperations: external_exports.boolean().optional()
|
|
772
891
|
}),
|
|
892
|
+
response: createdMcpServerSchema,
|
|
773
893
|
responses: { 400: agentApiErrorSchema },
|
|
774
894
|
summary: "Create an MCP server",
|
|
775
895
|
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."
|
|
@@ -785,16 +905,17 @@ var mcpServerRoutes = {
|
|
|
785
905
|
name: external_exports.string().min(1).max(100),
|
|
786
906
|
slug: slugSchema,
|
|
787
907
|
versionUid: external_exports.string(),
|
|
788
|
-
/**
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
908
|
+
/** Single when omitted and the API document is linked. */
|
|
909
|
+
channelMode: external_exports.enum(mcpChannelModes).optional(),
|
|
910
|
+
/**
|
|
911
|
+
* Write every operation of the linked version into production's Config
|
|
912
|
+
* with the state its description gives it, so a root
|
|
913
|
+
* `x-scalar-expose.enabled: false` holds back only operations the
|
|
914
|
+
* document gains later.
|
|
915
|
+
*/
|
|
916
|
+
pinCurrentOperations: external_exports.boolean().optional()
|
|
797
917
|
}),
|
|
918
|
+
response: createdMcpServerSchema,
|
|
798
919
|
responses: { 400: agentApiErrorSchema },
|
|
799
920
|
summary: "Create an MCP server with an installation in one call"
|
|
800
921
|
},
|
|
@@ -805,7 +926,12 @@ var mcpServerRoutes = {
|
|
|
805
926
|
body: external_exports.object({
|
|
806
927
|
name: external_exports.string().min(1).max(100),
|
|
807
928
|
slug: slugSchema,
|
|
808
|
-
|
|
929
|
+
/**
|
|
930
|
+
* Operations to expose as tools: their API document versions are
|
|
931
|
+
* linked, then production's Config is written with each as a tool. A
|
|
932
|
+
* version this call links for the first time has its other operations
|
|
933
|
+
* written as not tools; a version already linked keeps its other tools.
|
|
934
|
+
*/
|
|
809
935
|
operations: external_exports.array(external_exports.uuid()),
|
|
810
936
|
docsPages: external_exports.array(external_exports.uuid()),
|
|
811
937
|
bumpStrategy: bumpStrategySchema,
|
|
@@ -819,6 +945,16 @@ var mcpServerRoutes = {
|
|
|
819
945
|
},
|
|
820
946
|
summary: "Update an MCP server"
|
|
821
947
|
},
|
|
948
|
+
setChannelMode: {
|
|
949
|
+
method: "POST",
|
|
950
|
+
path: (p) => `/mcp/servers/${p.id}/channel-mode`,
|
|
951
|
+
params: serverParams2,
|
|
952
|
+
body: external_exports.object({ to: external_exports.enum(mcpChannelModes) }),
|
|
953
|
+
response: mcpServerSchema,
|
|
954
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
955
|
+
summary: "Convert an MCP server to multi-channel",
|
|
956
|
+
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."
|
|
957
|
+
},
|
|
822
958
|
deleteServer: {
|
|
823
959
|
method: "DELETE",
|
|
824
960
|
path: (p) => `/mcp/servers/${p.id}`,
|
|
@@ -835,68 +971,6 @@ var mcpServerRoutes = {
|
|
|
835
971
|
responses: { 400: agentApiErrorSchema },
|
|
836
972
|
summary: "List operation tools for a linked document version"
|
|
837
973
|
},
|
|
838
|
-
updateOperationTools: {
|
|
839
|
-
method: "PATCH",
|
|
840
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools`,
|
|
841
|
-
params: serverParams2,
|
|
842
|
-
body: external_exports.object({
|
|
843
|
-
operationTools: external_exports.array(external_exports.object({
|
|
844
|
-
operationId: external_exports.uuid(),
|
|
845
|
-
searchToolEnabled: external_exports.boolean(),
|
|
846
|
-
executeRequestToolEnabled: external_exports.boolean(),
|
|
847
|
-
curatedToolEnabled: external_exports.boolean()
|
|
848
|
-
}).partial({
|
|
849
|
-
searchToolEnabled: true,
|
|
850
|
-
executeRequestToolEnabled: true,
|
|
851
|
-
curatedToolEnabled: true
|
|
852
|
-
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0 || tool.curatedToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1),
|
|
853
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
854
|
-
bumpKind: bumpKindSchema.optional()
|
|
855
|
-
}),
|
|
856
|
-
response: external_exports.array(mcpServerOperationToolSchema),
|
|
857
|
-
responses: {
|
|
858
|
-
400: agentApiErrorSchema,
|
|
859
|
-
403: agentApiErrorSchema,
|
|
860
|
-
409: agentApiErrorSchema
|
|
861
|
-
},
|
|
862
|
-
summary: "Update operation tool flags"
|
|
863
|
-
},
|
|
864
|
-
deleteOperationTool: {
|
|
865
|
-
method: "DELETE",
|
|
866
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.toolId}`,
|
|
867
|
-
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
868
|
-
response: external_exports.null(),
|
|
869
|
-
responses: { 400: agentApiErrorSchema },
|
|
870
|
-
summary: "Delete an operation tool"
|
|
871
|
-
},
|
|
872
|
-
deleteOperationToolsByVersion: {
|
|
873
|
-
method: "DELETE",
|
|
874
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/versions/${p.versionId}`,
|
|
875
|
-
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
876
|
-
response: external_exports.null(),
|
|
877
|
-
responses: { 400: agentApiErrorSchema },
|
|
878
|
-
summary: "Delete all operation tools of a linked version"
|
|
879
|
-
},
|
|
880
|
-
setOperationToolMetadata: {
|
|
881
|
-
method: "PATCH",
|
|
882
|
-
path: (p) => `/mcp/servers/${p.id}/operation-tools/${p.operationToolId}/metadata`,
|
|
883
|
-
params: external_exports.object({ id: external_exports.uuid(), operationToolId: external_exports.uuid() }),
|
|
884
|
-
body: external_exports.object({
|
|
885
|
-
name: external_exports.string().nullable().optional(),
|
|
886
|
-
description: external_exports.string().nullable().optional(),
|
|
887
|
-
deprecated: external_exports.boolean().optional(),
|
|
888
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
889
|
-
}),
|
|
890
|
-
response: external_exports.object({
|
|
891
|
-
operationToolId: external_exports.string(),
|
|
892
|
-
name: external_exports.string().nullable().optional(),
|
|
893
|
-
description: external_exports.string().nullable().optional(),
|
|
894
|
-
deprecated: external_exports.boolean().optional(),
|
|
895
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
896
|
-
}),
|
|
897
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
898
|
-
summary: "Set custom name and description on an operation tool"
|
|
899
|
-
},
|
|
900
974
|
getDocsPageToolsByPublish: {
|
|
901
975
|
method: "GET",
|
|
902
976
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.publishId}`,
|
|
@@ -917,16 +991,10 @@ var mcpServerRoutes = {
|
|
|
917
991
|
}).partial({
|
|
918
992
|
searchToolEnabled: true,
|
|
919
993
|
executeRequestToolEnabled: true
|
|
920
|
-
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1)
|
|
921
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
922
|
-
bumpKind: bumpKindSchema.optional()
|
|
994
|
+
}).refine((tool) => tool.searchToolEnabled !== void 0 || tool.executeRequestToolEnabled !== void 0, { message: "At least one flag must be provided." })).min(1)
|
|
923
995
|
}),
|
|
924
996
|
response: external_exports.array(mcpServerDocsPageToolSchema),
|
|
925
|
-
responses: {
|
|
926
|
-
400: agentApiErrorSchema,
|
|
927
|
-
403: agentApiErrorSchema,
|
|
928
|
-
409: agentApiErrorSchema
|
|
929
|
-
},
|
|
997
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
930
998
|
summary: "Update docs page tool flags"
|
|
931
999
|
},
|
|
932
1000
|
deleteDocsPageTool: {
|
|
@@ -934,7 +1002,7 @@ var mcpServerRoutes = {
|
|
|
934
1002
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/${p.toolId}`,
|
|
935
1003
|
params: external_exports.object({ id: external_exports.uuid(), toolId: external_exports.uuid() }),
|
|
936
1004
|
response: external_exports.null(),
|
|
937
|
-
responses: { 400: agentApiErrorSchema },
|
|
1005
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
938
1006
|
summary: "Delete a docs page tool"
|
|
939
1007
|
},
|
|
940
1008
|
deleteDocsPageToolsByPublish: {
|
|
@@ -942,7 +1010,7 @@ var mcpServerRoutes = {
|
|
|
942
1010
|
path: (p) => `/mcp/servers/${p.id}/docs-page-tools/publishes/${p.publishId}`,
|
|
943
1011
|
params: external_exports.object({ id: external_exports.uuid(), publishId: external_exports.uuid() }),
|
|
944
1012
|
response: external_exports.null(),
|
|
945
|
-
responses: { 400: agentApiErrorSchema },
|
|
1013
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
946
1014
|
summary: "Delete all docs page tools of a publish"
|
|
947
1015
|
},
|
|
948
1016
|
listServerPublishes: {
|
|
@@ -978,8 +1046,7 @@ var mcpServerRoutes = {
|
|
|
978
1046
|
slug: external_exports.string(),
|
|
979
1047
|
namespace: external_exports.string(),
|
|
980
1048
|
createdAt: external_exports.date(),
|
|
981
|
-
updatedAt: external_exports.date()
|
|
982
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1049
|
+
updatedAt: external_exports.date()
|
|
983
1050
|
}).array(),
|
|
984
1051
|
responses: { 400: agentApiErrorSchema },
|
|
985
1052
|
summary: "List document versions linked to an MCP server"
|
|
@@ -1025,31 +1092,17 @@ var mcpServerRoutes = {
|
|
|
1025
1092
|
responses: { 400: agentApiErrorSchema },
|
|
1026
1093
|
summary: "List docs pages available to link for a project"
|
|
1027
1094
|
},
|
|
1028
|
-
setDocumentToolMode: {
|
|
1029
|
-
method: "PATCH",
|
|
1030
|
-
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionId}/tool-mode`,
|
|
1031
|
-
params: external_exports.object({ id: external_exports.uuid(), versionId: external_exports.uuid() }),
|
|
1032
|
-
body: external_exports.object({
|
|
1033
|
-
toolMode: external_exports.enum(mcpServerToolModes),
|
|
1034
|
-
bumpStrategy: bumpStrategySchema.optional(),
|
|
1035
|
-
bumpKind: bumpKindSchema.optional()
|
|
1036
|
-
}),
|
|
1037
|
-
response: external_exports.object({
|
|
1038
|
-
documentVersionId: external_exports.string(),
|
|
1039
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1040
|
-
}),
|
|
1041
|
-
responses: {
|
|
1042
|
-
400: agentApiErrorSchema,
|
|
1043
|
-
403: agentApiErrorSchema,
|
|
1044
|
-
409: agentApiErrorSchema
|
|
1045
|
-
},
|
|
1046
|
-
summary: "Set the tool mode of a linked document version"
|
|
1047
|
-
},
|
|
1048
1095
|
linkDocumentVersion: {
|
|
1049
1096
|
method: "POST",
|
|
1050
1097
|
path: (p) => `/mcp/servers/${p.id}/document-versions/${p.versionUid}`,
|
|
1051
1098
|
params: external_exports.object({ id: external_exports.uuid(), versionUid: external_exports.string() }),
|
|
1052
1099
|
body: external_exports.object({
|
|
1100
|
+
/**
|
|
1101
|
+
* The linked version's operations to expose as tools, written into
|
|
1102
|
+
* production's Config as `x-scalar-expose.enabled`; its other operations
|
|
1103
|
+
* are written as not tools. Empty or absent leaves production's Config as
|
|
1104
|
+
* it is. A version already linked is left as it is.
|
|
1105
|
+
*/
|
|
1053
1106
|
operationIds: external_exports.array(external_exports.uuid()).optional(),
|
|
1054
1107
|
bumpKind: bumpKindSchema.optional()
|
|
1055
1108
|
}),
|
|
@@ -1143,8 +1196,7 @@ var mcpVersionToolsSchema = external_exports.object({
|
|
|
1143
1196
|
slug: external_exports.string(),
|
|
1144
1197
|
title: external_exports.string(),
|
|
1145
1198
|
documentUid: external_exports.string(),
|
|
1146
|
-
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
1147
|
-
toolMode: external_exports.enum(mcpServerToolModes)
|
|
1199
|
+
trackMode: external_exports.enum(mcpDocumentTrackModes)
|
|
1148
1200
|
})),
|
|
1149
1201
|
linkedDocsPublishes: external_exports.array(external_exports.object({
|
|
1150
1202
|
id: external_exports.string(),
|
|
@@ -1157,7 +1209,11 @@ var mcpVersionToolsSchema = external_exports.object({
|
|
|
1157
1209
|
}))
|
|
1158
1210
|
});
|
|
1159
1211
|
var serverParams3 = external_exports.object({ id: external_exports.uuid() });
|
|
1160
|
-
var versionParams = external_exports.object({
|
|
1212
|
+
var versionParams = external_exports.object({
|
|
1213
|
+
id: external_exports.uuid(),
|
|
1214
|
+
semver: versionLabelParamSchema
|
|
1215
|
+
});
|
|
1216
|
+
var environmentParams = external_exports.object({ id: external_exports.uuid(), env: slugSchema });
|
|
1161
1217
|
var mcpVersionRoutes = {
|
|
1162
1218
|
listVersions: {
|
|
1163
1219
|
method: "GET",
|
|
@@ -1172,7 +1228,7 @@ var mcpVersionRoutes = {
|
|
|
1172
1228
|
},
|
|
1173
1229
|
getVersion: {
|
|
1174
1230
|
method: "GET",
|
|
1175
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1231
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}`,
|
|
1176
1232
|
params: versionParams,
|
|
1177
1233
|
response: mcpServerVersionSchema,
|
|
1178
1234
|
responses: { 400: agentApiErrorSchema },
|
|
@@ -1180,97 +1236,23 @@ var mcpVersionRoutes = {
|
|
|
1180
1236
|
},
|
|
1181
1237
|
getVersionTools: {
|
|
1182
1238
|
method: "GET",
|
|
1183
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1239
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/tools`,
|
|
1184
1240
|
params: versionParams,
|
|
1185
1241
|
response: mcpVersionToolsSchema,
|
|
1186
1242
|
responses: { 400: agentApiErrorSchema },
|
|
1187
1243
|
summary: "Get the tools and links of a version"
|
|
1188
1244
|
},
|
|
1189
|
-
updateVersionTools: {
|
|
1190
|
-
method: "PATCH",
|
|
1191
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/tools`,
|
|
1192
|
-
params: versionParams,
|
|
1193
|
-
body: external_exports.object({
|
|
1194
|
-
operationTools: external_exports.array(external_exports.object({
|
|
1195
|
-
operationId: external_exports.uuid(),
|
|
1196
|
-
searchToolEnabled: external_exports.boolean().optional(),
|
|
1197
|
-
executeRequestToolEnabled: external_exports.boolean().optional(),
|
|
1198
|
-
curatedToolEnabled: external_exports.boolean().optional(),
|
|
1199
|
-
name: external_exports.string().nullable().optional(),
|
|
1200
|
-
description: external_exports.string().nullable().optional(),
|
|
1201
|
-
deprecated: external_exports.boolean().optional(),
|
|
1202
|
-
deprecationMessage: external_exports.string().nullable().optional()
|
|
1203
|
-
})).optional(),
|
|
1204
|
-
docsPageTools: external_exports.array(external_exports.object({
|
|
1205
|
-
docsPageId: external_exports.uuid(),
|
|
1206
|
-
searchToolEnabled: external_exports.boolean().optional(),
|
|
1207
|
-
executeRequestToolEnabled: external_exports.boolean().optional()
|
|
1208
|
-
})).optional()
|
|
1209
|
-
}),
|
|
1210
|
-
response: mcpServerVersionSchema,
|
|
1211
|
-
responses: {
|
|
1212
|
-
400: agentApiErrorSchema,
|
|
1213
|
-
403: agentApiErrorSchema,
|
|
1214
|
-
409: agentApiErrorSchema
|
|
1215
|
-
},
|
|
1216
|
-
summary: "Update tool flags and metadata on a version"
|
|
1217
|
-
},
|
|
1218
|
-
updateVersion: {
|
|
1219
|
-
method: "PATCH",
|
|
1220
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1221
|
-
params: versionParams,
|
|
1222
|
-
body: external_exports.object({ changeNote: external_exports.string().nullable().optional() }),
|
|
1223
|
-
response: mcpServerVersionSchema,
|
|
1224
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1225
|
-
summary: "Update a draft version"
|
|
1226
|
-
},
|
|
1227
1245
|
deleteVersion: {
|
|
1228
1246
|
method: "DELETE",
|
|
1229
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}`,
|
|
1247
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}`,
|
|
1230
1248
|
params: versionParams,
|
|
1231
1249
|
response: external_exports.null(),
|
|
1232
1250
|
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1233
1251
|
summary: "Delete an MCP server version"
|
|
1234
1252
|
},
|
|
1235
|
-
approveVersion: {
|
|
1236
|
-
method: "POST",
|
|
1237
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/approve`,
|
|
1238
|
-
params: versionParams,
|
|
1239
|
-
response: mcpServerVersionSchema,
|
|
1240
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1241
|
-
summary: "Approve a draft version"
|
|
1242
|
-
},
|
|
1243
|
-
requestVersionApproval: {
|
|
1244
|
-
method: "POST",
|
|
1245
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/request-approval`,
|
|
1246
|
-
params: versionParams,
|
|
1247
|
-
response: mcpServerVersionSchema,
|
|
1248
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1249
|
-
summary: "Send a draft version for approval"
|
|
1250
|
-
},
|
|
1251
|
-
getOpenDraft: {
|
|
1252
|
-
method: "GET",
|
|
1253
|
-
path: (p) => `/mcp/servers/${p.id}/draft`,
|
|
1254
|
-
params: serverParams3,
|
|
1255
|
-
response: mcpServerVersionSchema.nullable(),
|
|
1256
|
-
responses: { 400: agentApiErrorSchema },
|
|
1257
|
-
summary: "Get the open draft version, if any"
|
|
1258
|
-
},
|
|
1259
|
-
publishDraft: {
|
|
1260
|
-
method: "POST",
|
|
1261
|
-
path: (p) => `/mcp/servers/${p.id}/draft/publish`,
|
|
1262
|
-
params: serverParams3,
|
|
1263
|
-
body: external_exports.object({
|
|
1264
|
-
bumpKind: bumpKindSchema.optional(),
|
|
1265
|
-
customSemver: external_exports.string().optional()
|
|
1266
|
-
}),
|
|
1267
|
-
response: mcpServerVersionSchema,
|
|
1268
|
-
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1269
|
-
summary: "Publish the open draft version"
|
|
1270
|
-
},
|
|
1271
1253
|
getVersionSuggestedTools: {
|
|
1272
1254
|
method: "GET",
|
|
1273
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/suggested-tools`,
|
|
1255
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/suggested-tools`,
|
|
1274
1256
|
params: versionParams,
|
|
1275
1257
|
response: external_exports.object({
|
|
1276
1258
|
suggestions: external_exports.array(external_exports.object({
|
|
@@ -1288,33 +1270,12 @@ var mcpVersionRoutes = {
|
|
|
1288
1270
|
},
|
|
1289
1271
|
dismissVersionSuggestions: {
|
|
1290
1272
|
method: "POST",
|
|
1291
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/dismiss-suggestions`,
|
|
1273
|
+
path: (p) => `/mcp/servers/${p.id}/versions/${encodeURIComponent(p.semver)}/dismiss-suggestions`,
|
|
1292
1274
|
params: versionParams,
|
|
1293
1275
|
response: external_exports.null(),
|
|
1294
1276
|
responses: { 400: agentApiErrorSchema },
|
|
1295
1277
|
summary: "Dismiss tool suggestions for a version"
|
|
1296
1278
|
},
|
|
1297
|
-
setVersionDocumentToolMode: {
|
|
1298
|
-
method: "PATCH",
|
|
1299
|
-
path: (p) => `/mcp/servers/${p.id}/versions/${p.semver}/document-versions/${p.documentVersionId}/tool-mode`,
|
|
1300
|
-
params: external_exports.object({
|
|
1301
|
-
id: external_exports.uuid(),
|
|
1302
|
-
semver: semverParamSchema,
|
|
1303
|
-
documentVersionId: external_exports.uuid()
|
|
1304
|
-
}),
|
|
1305
|
-
body: external_exports.object({ toolMode: external_exports.enum(mcpServerToolModes) }),
|
|
1306
|
-
response: external_exports.object({
|
|
1307
|
-
documentVersionId: external_exports.string(),
|
|
1308
|
-
toolMode: external_exports.enum(mcpServerToolModes),
|
|
1309
|
-
semver: external_exports.string()
|
|
1310
|
-
}),
|
|
1311
|
-
responses: {
|
|
1312
|
-
400: agentApiErrorSchema,
|
|
1313
|
-
403: agentApiErrorSchema,
|
|
1314
|
-
409: agentApiErrorSchema
|
|
1315
|
-
},
|
|
1316
|
-
summary: "Set the tool mode of a document version within a version"
|
|
1317
|
-
},
|
|
1318
1279
|
listDocumentTracking: {
|
|
1319
1280
|
method: "GET",
|
|
1320
1281
|
path: (p) => `/mcp/servers/${p.id}/document-tracking`,
|
|
@@ -1388,6 +1349,24 @@ var mcpVersionRoutes = {
|
|
|
1388
1349
|
}),
|
|
1389
1350
|
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1390
1351
|
summary: "Set how a docs project is tracked"
|
|
1352
|
+
},
|
|
1353
|
+
getHistory: {
|
|
1354
|
+
method: "GET",
|
|
1355
|
+
path: (p) => `/mcp/servers/${p.id}/history`,
|
|
1356
|
+
params: serverParams3,
|
|
1357
|
+
query: external_exports.object({ env: slugSchema.default("production") }),
|
|
1358
|
+
response: mcpServerHistorySchema,
|
|
1359
|
+
responses: { 400: agentApiErrorSchema },
|
|
1360
|
+
summary: "List the builds of an environment's line"
|
|
1361
|
+
},
|
|
1362
|
+
setActiveBuild: {
|
|
1363
|
+
method: "PUT",
|
|
1364
|
+
path: (p) => `/mcp/servers/${p.id}/environments/${p.env}/active`,
|
|
1365
|
+
params: environmentParams,
|
|
1366
|
+
body: external_exports.object({ buildId: external_exports.uuid() }),
|
|
1367
|
+
response: mcpServerHistorySchema,
|
|
1368
|
+
responses: { 400: agentApiErrorSchema, 403: agentApiErrorSchema },
|
|
1369
|
+
summary: "Make a build the one an environment serves"
|
|
1391
1370
|
}
|
|
1392
1371
|
};
|
|
1393
1372
|
|
|
@@ -1532,6 +1511,108 @@ var registrySearchResultSchema = external_exports.object({
|
|
|
1532
1511
|
searchEnabled: external_exports.boolean(),
|
|
1533
1512
|
rank: external_exports.number()
|
|
1534
1513
|
});
|
|
1514
|
+
var mcpDocumentServerSchema = external_exports.object({
|
|
1515
|
+
url: external_exports.string(),
|
|
1516
|
+
variables: external_exports.record(external_exports.string(), external_exports.object({
|
|
1517
|
+
default: external_exports.string().optional(),
|
|
1518
|
+
enum: external_exports.string().array().optional()
|
|
1519
|
+
})).optional()
|
|
1520
|
+
});
|
|
1521
|
+
var mcpDocumentSecurityRequirementSchema = external_exports.record(external_exports.string(), external_exports.string().array());
|
|
1522
|
+
var mcpDocumentParameterSchema = external_exports.object({
|
|
1523
|
+
name: external_exports.string(),
|
|
1524
|
+
in: external_exports.string(),
|
|
1525
|
+
required: external_exports.boolean().optional()
|
|
1526
|
+
});
|
|
1527
|
+
var mcpDocumentExposeSchema = external_exports.union([
|
|
1528
|
+
external_exports.boolean(),
|
|
1529
|
+
external_exports.object({
|
|
1530
|
+
enabled: external_exports.union([
|
|
1531
|
+
external_exports.boolean(),
|
|
1532
|
+
external_exports.object({ sdk: external_exports.boolean().optional(), mcp: external_exports.boolean().optional() })
|
|
1533
|
+
]).optional(),
|
|
1534
|
+
name: external_exports.string().optional(),
|
|
1535
|
+
description: external_exports.string().optional(),
|
|
1536
|
+
deprecated: external_exports.boolean().optional(),
|
|
1537
|
+
deprecationMessage: external_exports.string().optional(),
|
|
1538
|
+
toolMode: external_exports.string().optional()
|
|
1539
|
+
})
|
|
1540
|
+
]);
|
|
1541
|
+
var mcpDocumentOperationSchema = external_exports.object({
|
|
1542
|
+
operationId: external_exports.string().optional(),
|
|
1543
|
+
summary: external_exports.string().optional(),
|
|
1544
|
+
deprecated: external_exports.boolean().optional(),
|
|
1545
|
+
tags: external_exports.string().array().optional(),
|
|
1546
|
+
security: mcpDocumentSecurityRequirementSchema.array().optional(),
|
|
1547
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1548
|
+
parameters: mcpDocumentParameterSchema.array().optional(),
|
|
1549
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional(),
|
|
1550
|
+
"x-scalar-ignore": external_exports.boolean().optional(),
|
|
1551
|
+
"x-internal": external_exports.boolean().optional(),
|
|
1552
|
+
"x-scalar-stability": external_exports.string().optional(),
|
|
1553
|
+
/** The message, or the per-target object the SDK config also takes. */
|
|
1554
|
+
"x-scalar-deprecation-message": external_exports.union([external_exports.string(), external_exports.record(external_exports.string(), external_exports.string())]).optional()
|
|
1555
|
+
});
|
|
1556
|
+
var mcpDocumentPathItemSchema = external_exports.object({
|
|
1557
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1558
|
+
parameters: mcpDocumentParameterSchema.array().optional(),
|
|
1559
|
+
get: mcpDocumentOperationSchema.optional(),
|
|
1560
|
+
put: mcpDocumentOperationSchema.optional(),
|
|
1561
|
+
post: mcpDocumentOperationSchema.optional(),
|
|
1562
|
+
delete: mcpDocumentOperationSchema.optional(),
|
|
1563
|
+
options: mcpDocumentOperationSchema.optional(),
|
|
1564
|
+
head: mcpDocumentOperationSchema.optional(),
|
|
1565
|
+
patch: mcpDocumentOperationSchema.optional(),
|
|
1566
|
+
trace: mcpDocumentOperationSchema.optional()
|
|
1567
|
+
});
|
|
1568
|
+
var mcpDocumentOAuthFlowSchema = external_exports.object({
|
|
1569
|
+
authorizationUrl: external_exports.string().optional(),
|
|
1570
|
+
deviceAuthorizationUrl: external_exports.string().optional(),
|
|
1571
|
+
tokenUrl: external_exports.string().optional(),
|
|
1572
|
+
refreshUrl: external_exports.string().optional(),
|
|
1573
|
+
scopes: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
1574
|
+
});
|
|
1575
|
+
var mcpDocumentSecuritySchemeSchema = external_exports.object({
|
|
1576
|
+
type: external_exports.string().optional(),
|
|
1577
|
+
name: external_exports.string().optional(),
|
|
1578
|
+
in: external_exports.string().optional(),
|
|
1579
|
+
scheme: external_exports.string().optional(),
|
|
1580
|
+
bearerFormat: external_exports.string().optional(),
|
|
1581
|
+
openIdConnectUrl: external_exports.string().optional(),
|
|
1582
|
+
oauth2MetadataUrl: external_exports.string().optional(),
|
|
1583
|
+
deprecated: external_exports.boolean().optional(),
|
|
1584
|
+
flows: external_exports.object({
|
|
1585
|
+
implicit: mcpDocumentOAuthFlowSchema.optional(),
|
|
1586
|
+
password: mcpDocumentOAuthFlowSchema.optional(),
|
|
1587
|
+
clientCredentials: mcpDocumentOAuthFlowSchema.optional(),
|
|
1588
|
+
authorizationCode: mcpDocumentOAuthFlowSchema.optional(),
|
|
1589
|
+
deviceAuthorization: mcpDocumentOAuthFlowSchema.optional()
|
|
1590
|
+
}).optional(),
|
|
1591
|
+
"x-scalar-access": external_exports.boolean().optional()
|
|
1592
|
+
});
|
|
1593
|
+
var mcpDocumentStripIssueSchema = external_exports.object({
|
|
1594
|
+
/** JSON pointer of the dropped node in the source document. */
|
|
1595
|
+
pointer: external_exports.string(),
|
|
1596
|
+
/** The `$ref` that could not be followed. */
|
|
1597
|
+
ref: external_exports.string(),
|
|
1598
|
+
reason: external_exports.enum(["dangling", "cyclic", "external"])
|
|
1599
|
+
});
|
|
1600
|
+
var mcpStrippedDocumentSchema = external_exports.object({
|
|
1601
|
+
openapi: external_exports.string().optional(),
|
|
1602
|
+
info: external_exports.object({ title: external_exports.string().optional(), version: external_exports.string().optional() }).optional(),
|
|
1603
|
+
servers: mcpDocumentServerSchema.array().optional(),
|
|
1604
|
+
security: mcpDocumentSecurityRequirementSchema.array().optional(),
|
|
1605
|
+
tags: external_exports.object({
|
|
1606
|
+
name: external_exports.string(),
|
|
1607
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional()
|
|
1608
|
+
}).array().optional(),
|
|
1609
|
+
paths: external_exports.record(external_exports.string(), mcpDocumentPathItemSchema),
|
|
1610
|
+
components: external_exports.object({
|
|
1611
|
+
securitySchemes: external_exports.record(external_exports.string(), mcpDocumentSecuritySchemeSchema).optional()
|
|
1612
|
+
}).optional(),
|
|
1613
|
+
"x-scalar-expose": mcpDocumentExposeSchema.optional(),
|
|
1614
|
+
"x-scalar-strip-issues": mcpDocumentStripIssueSchema.array().optional()
|
|
1615
|
+
});
|
|
1535
1616
|
var registryRoutes = {
|
|
1536
1617
|
getDocument: {
|
|
1537
1618
|
method: "GET",
|
|
@@ -1588,6 +1669,20 @@ var registryRoutes = {
|
|
|
1588
1669
|
responses: { 400: agentApiErrorSchema, 404: agentApiErrorSchema },
|
|
1589
1670
|
summary: "List the operations of a document version"
|
|
1590
1671
|
},
|
|
1672
|
+
getVersionMcpDocument: {
|
|
1673
|
+
method: "GET",
|
|
1674
|
+
path: (p) => `/registry/versions/${p.versionUid}/mcp-document`,
|
|
1675
|
+
params: external_exports.object({ versionUid: external_exports.string() }),
|
|
1676
|
+
response: mcpStrippedDocumentSchema,
|
|
1677
|
+
responses: {
|
|
1678
|
+
400: agentApiErrorSchema,
|
|
1679
|
+
404: agentApiErrorSchema,
|
|
1680
|
+
413: agentApiErrorSchema,
|
|
1681
|
+
422: agentApiErrorSchema
|
|
1682
|
+
},
|
|
1683
|
+
summary: "Get the stripped MCP document of a document version",
|
|
1684
|
+
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."
|
|
1685
|
+
},
|
|
1591
1686
|
updateVersionOperations: {
|
|
1592
1687
|
method: "PATCH",
|
|
1593
1688
|
path: (p) => `/registry/versions/${p.versionUid}/operations`,
|
|
@@ -1677,6 +1772,11 @@ var registryRoutes = {
|
|
|
1677
1772
|
|
|
1678
1773
|
// ../../packages/entities/dist/api/agent/usage.js
|
|
1679
1774
|
var usageRecordSchema = monthlyUsageSchema.extend({
|
|
1775
|
+
/**
|
|
1776
|
+
* What the row is for, by name; null when that is gone. An MCP row, of type
|
|
1777
|
+
* `mcp-environment` or `mcp-installation`, names its server, with the
|
|
1778
|
+
* environment in parentheses outside production.
|
|
1779
|
+
*/
|
|
1680
1780
|
name: external_exports.string().nullable(),
|
|
1681
1781
|
projectType: external_exports.string().nullable(),
|
|
1682
1782
|
documentUid: external_exports.string().nullable(),
|
|
@@ -1705,7 +1805,8 @@ var agentApi = {
|
|
|
1705
1805
|
mcp: {
|
|
1706
1806
|
...mcpServerRoutes,
|
|
1707
1807
|
...mcpVersionRoutes,
|
|
1708
|
-
...mcpInstallationRoutes
|
|
1808
|
+
...mcpInstallationRoutes,
|
|
1809
|
+
...mcpChannelOverrideRoutes
|
|
1709
1810
|
},
|
|
1710
1811
|
registry: registryRoutes,
|
|
1711
1812
|
docs: docsRoutes,
|
|
@@ -1714,7 +1815,7 @@ var agentApi = {
|
|
|
1714
1815
|
openapi: openapiRoutes,
|
|
1715
1816
|
analytics: analyticsRoutes,
|
|
1716
1817
|
usage: usageRoutes,
|
|
1717
|
-
internal: internalRoutes,
|
|
1818
|
+
internal: { ...internalRoutes, ...mcpEnvironmentRoutes },
|
|
1718
1819
|
pubsub: pubsubRoutes
|
|
1719
1820
|
};
|
|
1720
1821
|
|
|
@@ -1723,7 +1824,7 @@ export {
|
|
|
1723
1824
|
pubsubPushMessageSchema,
|
|
1724
1825
|
bumpKindSchema,
|
|
1725
1826
|
bumpStrategySchema,
|
|
1726
|
-
|
|
1827
|
+
versionLabelParamSchema,
|
|
1727
1828
|
installationParamSchema,
|
|
1728
1829
|
analyticsRangeSchema,
|
|
1729
1830
|
analyticsGranularitySchema,
|
|
@@ -1762,7 +1863,13 @@ export {
|
|
|
1762
1863
|
pullRequestDescriptionBodySchema,
|
|
1763
1864
|
editorRoutes,
|
|
1764
1865
|
internalRoutes,
|
|
1866
|
+
mcpSettingsRefusalSchema,
|
|
1867
|
+
mcpEnvironmentsRefusedSchema,
|
|
1868
|
+
mcpEnvironmentRoutes,
|
|
1869
|
+
mcpChannelOverridesSchema,
|
|
1870
|
+
mcpChannelOverrideRoutes,
|
|
1765
1871
|
installationToolSchema,
|
|
1872
|
+
legacyAddressSchema,
|
|
1766
1873
|
installationSummarySchema,
|
|
1767
1874
|
mcpInstallationRoutes,
|
|
1768
1875
|
mcpServerWithInstallationsSchema,
|
|
@@ -1776,6 +1883,15 @@ export {
|
|
|
1776
1883
|
registryDocumentSchema,
|
|
1777
1884
|
registryVersionOperationSchema,
|
|
1778
1885
|
registrySearchResultSchema,
|
|
1886
|
+
mcpDocumentServerSchema,
|
|
1887
|
+
mcpDocumentSecurityRequirementSchema,
|
|
1888
|
+
mcpDocumentParameterSchema,
|
|
1889
|
+
mcpDocumentExposeSchema,
|
|
1890
|
+
mcpDocumentOperationSchema,
|
|
1891
|
+
mcpDocumentPathItemSchema,
|
|
1892
|
+
mcpDocumentSecuritySchemeSchema,
|
|
1893
|
+
mcpDocumentStripIssueSchema,
|
|
1894
|
+
mcpStrippedDocumentSchema,
|
|
1779
1895
|
registryRoutes,
|
|
1780
1896
|
usageRecordSchema,
|
|
1781
1897
|
teamUsageResponseSchema,
|