managed-deepagents 0.5.3-dev.111 → 0.5.3-dev.113
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 +20 -17
- package/dist/channels/manifest.d.ts +0 -2
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/channels/slack/http.d.ts.map +1 -1
- package/dist/channels/slack/http.js +3 -48
- package/dist/channels/slack/http.js.map +1 -1
- package/dist/channels/slack/index.d.ts +2 -3
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +2 -3
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/connectors/mcp/index.d.ts.map +1 -1
- package/dist/connectors/mcp/index.js +5 -1
- package/dist/connectors/mcp/index.js.map +1 -1
- package/dist/connectors/mcp/load.js +3 -0
- package/dist/connectors/mcp/load.js.map +1 -1
- package/dist/connectors/tool-selection.d.ts +13 -18
- package/dist/connectors/tool-selection.d.ts.map +1 -1
- package/dist/connectors/tool-selection.js +10 -13
- package/dist/connectors/tool-selection.js.map +1 -1
- package/dist/extension.d.ts +5 -5
- package/dist/extension.js +5 -5
- package/dist/identity/index.d.ts +2 -11
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +8 -66
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/options.d.ts +3 -3
- package/dist/identity/options.js +7 -8
- package/dist/identity/options.js.map +1 -1
- package/dist/identity/slack/links.d.ts +1 -2
- package/dist/identity/slack/links.d.ts.map +1 -1
- package/dist/identity/slack/links.js +1 -2
- package/dist/identity/slack/links.js.map +1 -1
- package/dist/identity/supabase.d.ts.map +1 -1
- package/dist/identity/supabase.js +2 -0
- package/dist/identity/supabase.js.map +1 -1
- package/dist/identity/types.d.ts +8 -81
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/namespaces.d.ts +5 -183
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +1 -63
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/auth.d.ts +11 -14
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +15 -54
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/cors.d.ts +5 -4
- package/dist/runtime/cors.d.ts.map +1 -1
- package/dist/runtime/cors.js +5 -9
- package/dist/runtime/cors.js.map +1 -1
- package/dist/runtime/identity-http.d.ts.map +1 -1
- package/dist/runtime/identity-http.js +0 -69
- package/dist/runtime/identity-http.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +2 -10
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +2 -38
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +15 -11
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +8 -44
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/managed-middleware.d.ts +2 -3
- package/dist/runtime/managed-middleware.d.ts.map +1 -1
- package/dist/runtime/managed-middleware.js +12 -12
- package/dist/runtime/managed-middleware.js.map +1 -1
- package/dist/runtime/managed-tools.d.ts +4 -11
- package/dist/runtime/managed-tools.d.ts.map +1 -1
- package/dist/runtime/managed-tools.js +11 -18
- package/dist/runtime/managed-tools.js.map +1 -1
- package/dist/runtime/memory/context-io.d.ts +0 -1
- package/dist/runtime/memory/context-io.d.ts.map +1 -1
- package/dist/runtime/memory/context-io.js +0 -10
- package/dist/runtime/memory/context-io.js.map +1 -1
- package/dist/runtime/memory/mounts.d.ts.map +1 -1
- package/dist/runtime/memory/mounts.js +0 -10
- package/dist/runtime/memory/mounts.js.map +1 -1
- package/dist/runtime/validated-token.d.ts.map +1 -1
- package/dist/runtime/validated-token.js +7 -1
- package/dist/runtime/validated-token.js.map +1 -1
- package/package.json +10 -11
- package/dist/channels/index.d.ts +0 -25
- package/dist/channels/index.d.ts.map +0 -1
- package/dist/channels/index.js +0 -18
- package/dist/channels/index.js.map +0 -1
- package/dist/connectors/marketplace/catalog.d.ts +0 -96
- package/dist/connectors/marketplace/catalog.d.ts.map +0 -1
- package/dist/connectors/marketplace/catalog.js +0 -213
- package/dist/connectors/marketplace/catalog.js.map +0 -1
- package/dist/connectors/marketplace/fleet-mcp.d.ts +0 -62
- package/dist/connectors/marketplace/fleet-mcp.d.ts.map +0 -1
- package/dist/connectors/marketplace/fleet-mcp.js +0 -215
- package/dist/connectors/marketplace/fleet-mcp.js.map +0 -1
- package/dist/connectors/marketplace/index.d.ts +0 -31
- package/dist/connectors/marketplace/index.d.ts.map +0 -1
- package/dist/connectors/marketplace/index.js +0 -39
- package/dist/connectors/marketplace/index.js.map +0 -1
- package/dist/connectors/marketplace/load.d.ts +0 -14
- package/dist/connectors/marketplace/load.d.ts.map +0 -1
- package/dist/connectors/marketplace/load.js +0 -206
- package/dist/connectors/marketplace/load.js.map +0 -1
- package/dist/connectors/slack/index.d.ts +0 -24
- package/dist/connectors/slack/index.d.ts.map +0 -1
- package/dist/connectors/slack/index.js +0 -64
- package/dist/connectors/slack/index.js.map +0 -1
- package/dist/connectors/toolserver/catalog.d.ts +0 -326
- package/dist/connectors/toolserver/catalog.d.ts.map +0 -1
- package/dist/connectors/toolserver/catalog.js +0 -415
- package/dist/connectors/toolserver/catalog.js.map +0 -1
- package/dist/connectors/toolserver/connectors.d.ts +0 -698
- package/dist/connectors/toolserver/connectors.d.ts.map +0 -1
- package/dist/connectors/toolserver/connectors.js +0 -13
- package/dist/connectors/toolserver/connectors.js.map +0 -1
- package/dist/connectors/toolserver/index.d.ts +0 -142
- package/dist/connectors/toolserver/index.d.ts.map +0 -1
- package/dist/connectors/toolserver/index.js +0 -105
- package/dist/connectors/toolserver/index.js.map +0 -1
- package/dist/connectors/toolserver/integrations.d.ts +0 -103
- package/dist/connectors/toolserver/integrations.d.ts.map +0 -1
- package/dist/connectors/toolserver/integrations.js +0 -288
- package/dist/connectors/toolserver/integrations.js.map +0 -1
- package/dist/connectors/toolserver/load.d.ts +0 -55
- package/dist/connectors/toolserver/load.d.ts.map +0 -1
- package/dist/connectors/toolserver/load.js +0 -289
- package/dist/connectors/toolserver/load.js.map +0 -1
- package/dist/identity/actor-subject.d.ts +0 -60
- package/dist/identity/actor-subject.d.ts.map +0 -1
- package/dist/identity/actor-subject.js +0 -107
- package/dist/identity/actor-subject.js.map +0 -1
- package/dist/identity/byo-oauth.d.ts +0 -105
- package/dist/identity/byo-oauth.d.ts.map +0 -1
- package/dist/identity/byo-oauth.js +0 -190
- package/dist/identity/byo-oauth.js.map +0 -1
- package/dist/identity/connect-inference.d.ts +0 -37
- package/dist/identity/connect-inference.d.ts.map +0 -1
- package/dist/identity/connect-inference.js +0 -53
- package/dist/identity/connect-inference.js.map +0 -1
- package/dist/identity/connect-paths.d.ts +0 -8
- package/dist/identity/connect-paths.d.ts.map +0 -1
- package/dist/identity/connect-paths.js +0 -11
- package/dist/identity/connect-paths.js.map +0 -1
- package/dist/identity/connect-provider-types.d.ts +0 -97
- package/dist/identity/connect-provider-types.d.ts.map +0 -1
- package/dist/identity/connect-provider-types.js +0 -10
- package/dist/identity/connect-provider-types.js.map +0 -1
- package/dist/identity/connect-provider.d.ts +0 -35
- package/dist/identity/connect-provider.d.ts.map +0 -1
- package/dist/identity/connect-provider.js +0 -148
- package/dist/identity/connect-provider.js.map +0 -1
- package/dist/identity/credential-resolvers.d.ts +0 -33
- package/dist/identity/credential-resolvers.d.ts.map +0 -1
- package/dist/identity/credential-resolvers.js +0 -62
- package/dist/identity/credential-resolvers.js.map +0 -1
- package/dist/identity/define-fleet-connect.d.ts +0 -53
- package/dist/identity/define-fleet-connect.d.ts.map +0 -1
- package/dist/identity/define-fleet-connect.js +0 -76
- package/dist/identity/define-fleet-connect.js.map +0 -1
- package/dist/identity/fleet-connect-hint.d.ts +0 -41
- package/dist/identity/fleet-connect-hint.d.ts.map +0 -1
- package/dist/identity/fleet-connect-hint.js +0 -190
- package/dist/identity/fleet-connect-hint.js.map +0 -1
- package/dist/identity/fleet-connect.d.ts +0 -93
- package/dist/identity/fleet-connect.d.ts.map +0 -1
- package/dist/identity/fleet-connect.js +0 -256
- package/dist/identity/fleet-connect.js.map +0 -1
- package/dist/identity/fleet-integration-connect.d.ts +0 -32
- package/dist/identity/fleet-integration-connect.d.ts.map +0 -1
- package/dist/identity/fleet-integration-connect.js +0 -35
- package/dist/identity/fleet-integration-connect.js.map +0 -1
- package/dist/identity/fleet.d.ts +0 -56
- package/dist/identity/fleet.d.ts.map +0 -1
- package/dist/identity/fleet.js +0 -131
- package/dist/identity/fleet.js.map +0 -1
- package/dist/identity/github/connect-http.d.ts +0 -37
- package/dist/identity/github/connect-http.d.ts.map +0 -1
- package/dist/identity/github/connect-http.js +0 -128
- package/dist/identity/github/connect-http.js.map +0 -1
- package/dist/identity/github/credentials-store.d.ts +0 -76
- package/dist/identity/github/credentials-store.d.ts.map +0 -1
- package/dist/identity/github/credentials-store.js +0 -270
- package/dist/identity/github/credentials-store.js.map +0 -1
- package/dist/identity/github/credentials.d.ts +0 -87
- package/dist/identity/github/credentials.d.ts.map +0 -1
- package/dist/identity/github/credentials.js +0 -201
- package/dist/identity/github/credentials.js.map +0 -1
- package/dist/identity/github/index.d.ts +0 -7
- package/dist/identity/github/index.d.ts.map +0 -1
- package/dist/identity/github/index.js +0 -6
- package/dist/identity/github/index.js.map +0 -1
- package/dist/identity/github/oauth.d.ts +0 -47
- package/dist/identity/github/oauth.d.ts.map +0 -1
- package/dist/identity/github/oauth.js +0 -124
- package/dist/identity/github/oauth.js.map +0 -1
- package/dist/identity/google/connect-http.d.ts +0 -37
- package/dist/identity/google/connect-http.d.ts.map +0 -1
- package/dist/identity/google/connect-http.js +0 -42
- package/dist/identity/google/connect-http.js.map +0 -1
- package/dist/identity/google/index.d.ts +0 -7
- package/dist/identity/google/index.d.ts.map +0 -1
- package/dist/identity/google/index.js +0 -6
- package/dist/identity/google/index.js.map +0 -1
- package/dist/identity/google/oauth.d.ts +0 -22
- package/dist/identity/google/oauth.d.ts.map +0 -1
- package/dist/identity/google/oauth.js +0 -48
- package/dist/identity/google/oauth.js.map +0 -1
- package/dist/identity/linkedin/connect-http.d.ts +0 -37
- package/dist/identity/linkedin/connect-http.d.ts.map +0 -1
- package/dist/identity/linkedin/connect-http.js +0 -41
- package/dist/identity/linkedin/connect-http.js.map +0 -1
- package/dist/identity/linkedin/index.d.ts +0 -7
- package/dist/identity/linkedin/index.d.ts.map +0 -1
- package/dist/identity/linkedin/index.js +0 -6
- package/dist/identity/linkedin/index.js.map +0 -1
- package/dist/identity/linkedin/oauth.d.ts +0 -22
- package/dist/identity/linkedin/oauth.d.ts.map +0 -1
- package/dist/identity/linkedin/oauth.js +0 -47
- package/dist/identity/linkedin/oauth.js.map +0 -1
- package/dist/identity/marketplace/connect-hint.d.ts +0 -31
- package/dist/identity/marketplace/connect-hint.d.ts.map +0 -1
- package/dist/identity/marketplace/connect-hint.js +0 -59
- package/dist/identity/marketplace/connect-hint.js.map +0 -1
- package/dist/identity/marketplace/connect.d.ts +0 -51
- package/dist/identity/marketplace/connect.d.ts.map +0 -1
- package/dist/identity/marketplace/connect.js +0 -88
- package/dist/identity/marketplace/connect.js.map +0 -1
- package/dist/identity/marketplace/index.d.ts +0 -9
- package/dist/identity/marketplace/index.d.ts.map +0 -1
- package/dist/identity/marketplace/index.js +0 -9
- package/dist/identity/marketplace/index.js.map +0 -1
- package/dist/identity/microsoft/connect-http.d.ts +0 -38
- package/dist/identity/microsoft/connect-http.d.ts.map +0 -1
- package/dist/identity/microsoft/connect-http.js +0 -42
- package/dist/identity/microsoft/connect-http.js.map +0 -1
- package/dist/identity/microsoft/index.d.ts +0 -7
- package/dist/identity/microsoft/index.d.ts.map +0 -1
- package/dist/identity/microsoft/index.js +0 -6
- package/dist/identity/microsoft/index.js.map +0 -1
- package/dist/identity/microsoft/oauth.d.ts +0 -24
- package/dist/identity/microsoft/oauth.d.ts.map +0 -1
- package/dist/identity/microsoft/oauth.js +0 -65
- package/dist/identity/microsoft/oauth.js.map +0 -1
- package/dist/identity/oauth-env.d.ts +0 -43
- package/dist/identity/oauth-env.d.ts.map +0 -1
- package/dist/identity/oauth-env.js +0 -66
- package/dist/identity/oauth-env.js.map +0 -1
- package/dist/identity/oauth-tickets.d.ts +0 -37
- package/dist/identity/oauth-tickets.d.ts.map +0 -1
- package/dist/identity/oauth-tickets.js +0 -114
- package/dist/identity/oauth-tickets.js.map +0 -1
- package/dist/identity/slack/connect-http.d.ts +0 -35
- package/dist/identity/slack/connect-http.d.ts.map +0 -1
- package/dist/identity/slack/connect-http.js +0 -115
- package/dist/identity/slack/connect-http.js.map +0 -1
- package/dist/identity/slack/index.d.ts +0 -8
- package/dist/identity/slack/index.d.ts.map +0 -1
- package/dist/identity/slack/index.js +0 -7
- package/dist/identity/slack/index.js.map +0 -1
- package/dist/identity/slack/oauth.d.ts +0 -28
- package/dist/identity/slack/oauth.d.ts.map +0 -1
- package/dist/identity/slack/oauth.js +0 -87
- package/dist/identity/slack/oauth.js.map +0 -1
- package/dist/identity/x/connect-http.d.ts +0 -38
- package/dist/identity/x/connect-http.d.ts.map +0 -1
- package/dist/identity/x/connect-http.js +0 -41
- package/dist/identity/x/connect-http.js.map +0 -1
- package/dist/identity/x/index.d.ts +0 -6
- package/dist/identity/x/index.d.ts.map +0 -1
- package/dist/identity/x/index.js +0 -5
- package/dist/identity/x/index.js.map +0 -1
- package/dist/runtime/credentials.d.ts +0 -68
- package/dist/runtime/credentials.d.ts.map +0 -1
- package/dist/runtime/credentials.js +0 -235
- package/dist/runtime/credentials.js.map +0 -1
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fleet marketplace MCP integrations bridged by MDA.
|
|
3
|
-
*
|
|
4
|
-
* These are third-party remote MCP servers (e.g. Notion at mcp.notion.com),
|
|
5
|
-
* not LangSmith toolserver built-ins. Credentials stay in the LangSmith vault;
|
|
6
|
-
* MDA invokes via `POST /v1/mcp/proxy` with an actor/agent subject.
|
|
7
|
-
*
|
|
8
|
-
* Tool names are vendor-owned and listed here for authoring docs / soft typing.
|
|
9
|
-
* The live MCP server remains the runtime source of truth.
|
|
10
|
-
*
|
|
11
|
-
* Entries mirror the active Fleet marketplace catalog in langchainplus
|
|
12
|
-
* (`smith-frontend/.../marketplace-catalog.ts`). Built-ins (Gmail, Slack, …)
|
|
13
|
-
* stay on the toolserver path — do not duplicate them here.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Built-in marketplace MCP integrations.
|
|
17
|
-
*
|
|
18
|
-
* Adding a row here (npm + PyPI) is the main step for a new marketplace bridge;
|
|
19
|
-
* connector factories, Connect providers, and identity-http candidates are
|
|
20
|
-
* derived from this list.
|
|
21
|
-
*/
|
|
22
|
-
export const MARKETPLACE_MCP_INTEGRATIONS = [
|
|
23
|
-
{
|
|
24
|
-
id: "notion",
|
|
25
|
-
connectId: "notion",
|
|
26
|
-
displayName: "Notion",
|
|
27
|
-
mcpUrl: "https://mcp.notion.com/mcp",
|
|
28
|
-
tools: [
|
|
29
|
-
"notion-search",
|
|
30
|
-
"notion-fetch",
|
|
31
|
-
"notion-create-pages",
|
|
32
|
-
"notion-update-page",
|
|
33
|
-
"notion-create-comment",
|
|
34
|
-
"notion-create-database",
|
|
35
|
-
"notion-update-data-source",
|
|
36
|
-
"notion-query-data-sources",
|
|
37
|
-
"notion-query-database-view",
|
|
38
|
-
"notion-get-comments",
|
|
39
|
-
"notion-get-users",
|
|
40
|
-
"notion-get-teams",
|
|
41
|
-
"notion-create-view",
|
|
42
|
-
"notion-update-view",
|
|
43
|
-
"notion-move-pages",
|
|
44
|
-
"notion-duplicate-page",
|
|
45
|
-
"notion-create-attachment",
|
|
46
|
-
"notion-download-attachment",
|
|
47
|
-
"notion-get-async-task",
|
|
48
|
-
],
|
|
49
|
-
scopes: [],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "cloudflare",
|
|
53
|
-
connectId: "cloudflare",
|
|
54
|
-
displayName: "Cloudflare",
|
|
55
|
-
mcpUrl: "https://bindings.mcp.cloudflare.com/mcp",
|
|
56
|
-
tools: [
|
|
57
|
-
"accounts_list",
|
|
58
|
-
"set_active_account",
|
|
59
|
-
"workers_list",
|
|
60
|
-
"workers_get_worker",
|
|
61
|
-
"workers_get_worker_code",
|
|
62
|
-
"kv_namespaces_list",
|
|
63
|
-
"kv_namespace_create",
|
|
64
|
-
"kv_namespace_delete",
|
|
65
|
-
"kv_namespace_get",
|
|
66
|
-
"kv_namespace_update",
|
|
67
|
-
"r2_buckets_list",
|
|
68
|
-
"r2_bucket_create",
|
|
69
|
-
"r2_bucket_get",
|
|
70
|
-
"r2_bucket_delete",
|
|
71
|
-
"d1_databases_list",
|
|
72
|
-
"d1_database_create",
|
|
73
|
-
"d1_database_delete",
|
|
74
|
-
"d1_database_get",
|
|
75
|
-
"d1_database_query",
|
|
76
|
-
"hyperdrive_configs_list",
|
|
77
|
-
"hyperdrive_config_create",
|
|
78
|
-
"hyperdrive_config_delete",
|
|
79
|
-
"hyperdrive_config_get",
|
|
80
|
-
"hyperdrive_config_edit",
|
|
81
|
-
],
|
|
82
|
-
scopes: [],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: "neon",
|
|
86
|
-
connectId: "neon",
|
|
87
|
-
displayName: "Neon",
|
|
88
|
-
mcpUrl: "https://mcp.neon.tech/mcp",
|
|
89
|
-
tools: [
|
|
90
|
-
"list_projects",
|
|
91
|
-
"list_organizations",
|
|
92
|
-
"list_shared_projects",
|
|
93
|
-
"create_project",
|
|
94
|
-
"delete_project",
|
|
95
|
-
"describe_project",
|
|
96
|
-
"run_sql",
|
|
97
|
-
"run_sql_transaction",
|
|
98
|
-
"describe_table_schema",
|
|
99
|
-
"get_database_tables",
|
|
100
|
-
"create_branch",
|
|
101
|
-
"describe_branch",
|
|
102
|
-
"delete_branch",
|
|
103
|
-
"reset_from_parent",
|
|
104
|
-
"get_connection_string",
|
|
105
|
-
"prepare_database_migration",
|
|
106
|
-
"complete_database_migration",
|
|
107
|
-
"compare_database_schema",
|
|
108
|
-
"search",
|
|
109
|
-
"fetch",
|
|
110
|
-
],
|
|
111
|
-
scopes: [],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "prisma",
|
|
115
|
-
connectId: "prisma",
|
|
116
|
-
displayName: "Prisma",
|
|
117
|
-
mcpUrl: "https://mcp.prisma.io/mcp",
|
|
118
|
-
tools: [
|
|
119
|
-
"CreateBackupTool",
|
|
120
|
-
"CreateConnectionStringTool",
|
|
121
|
-
"CreateRecoveryTool",
|
|
122
|
-
"DeleteConnectionStringTool",
|
|
123
|
-
"DeleteDatabaseTool",
|
|
124
|
-
"ListBackupsTool",
|
|
125
|
-
"ListConnectionStringsTool",
|
|
126
|
-
"ListDatabasesTool",
|
|
127
|
-
"ExecuteSqlQueryTool",
|
|
128
|
-
"IntrospectSchemaTool",
|
|
129
|
-
],
|
|
130
|
-
scopes: [],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: "netlify",
|
|
134
|
-
connectId: "netlify",
|
|
135
|
-
displayName: "Netlify",
|
|
136
|
-
mcpUrl: "https://netlify-mcp.netlify.app/mcp",
|
|
137
|
-
tools: [
|
|
138
|
-
"netlify-deploy-services-reader",
|
|
139
|
-
"netlify-deploy-services-updater",
|
|
140
|
-
"netlify-user-services-reader",
|
|
141
|
-
"netlify-extension-services-reader",
|
|
142
|
-
"netlify-extension-services-updater",
|
|
143
|
-
"netlify-project-services-reader",
|
|
144
|
-
"netlify-project-services-updater",
|
|
145
|
-
"netlify-team-services-reader",
|
|
146
|
-
],
|
|
147
|
-
scopes: [],
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
id: "vanta",
|
|
151
|
-
connectId: "vanta",
|
|
152
|
-
displayName: "Vanta",
|
|
153
|
-
mcpUrl: "https://mcp.vanta.com/mcp",
|
|
154
|
-
// Soft-typed from Vanta's published MCP tool list so a pre-connect
|
|
155
|
-
// 401/428 fallback still builds wrappers (empty catalog → zero tools
|
|
156
|
-
// forever, even after Connect, because nothing is left to re-list).
|
|
157
|
-
tools: [
|
|
158
|
-
"tests",
|
|
159
|
-
"list_test_entities",
|
|
160
|
-
"controls",
|
|
161
|
-
"list_control_tests",
|
|
162
|
-
"list_control_documents",
|
|
163
|
-
"documents",
|
|
164
|
-
"document_resources",
|
|
165
|
-
"integrations",
|
|
166
|
-
"integration_resources",
|
|
167
|
-
"frameworks",
|
|
168
|
-
"list_framework_controls",
|
|
169
|
-
"people",
|
|
170
|
-
"risks",
|
|
171
|
-
"vulnerabilities",
|
|
172
|
-
],
|
|
173
|
-
scopes: [],
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
id: "close",
|
|
177
|
-
connectId: "close",
|
|
178
|
-
displayName: "Close",
|
|
179
|
-
mcpUrl: "https://mcp.close.com/mcp",
|
|
180
|
-
tools: [
|
|
181
|
-
"activity_search",
|
|
182
|
-
"aggregation",
|
|
183
|
-
"close_product_knowledge_search",
|
|
184
|
-
"fetch",
|
|
185
|
-
"fetch_call",
|
|
186
|
-
"fetch_contact",
|
|
187
|
-
"fetch_lead",
|
|
188
|
-
"fetch_note",
|
|
189
|
-
"fetch_opportunity",
|
|
190
|
-
"get_fields",
|
|
191
|
-
"search",
|
|
192
|
-
"create_lead",
|
|
193
|
-
"create_contact",
|
|
194
|
-
"create_note",
|
|
195
|
-
"create_opportunity",
|
|
196
|
-
"update_lead",
|
|
197
|
-
"update_contact",
|
|
198
|
-
"update_opportunity",
|
|
199
|
-
],
|
|
200
|
-
scopes: [],
|
|
201
|
-
},
|
|
202
|
-
];
|
|
203
|
-
const BY_ID = new Map(MARKETPLACE_MCP_INTEGRATIONS.map((entry) => [entry.id, entry]));
|
|
204
|
-
export function marketplaceIntegrationById(id) {
|
|
205
|
-
if (!id) {
|
|
206
|
-
return undefined;
|
|
207
|
-
}
|
|
208
|
-
return BY_ID.get(id);
|
|
209
|
-
}
|
|
210
|
-
export function hasMarketplaceConnector(integrationId, connectorKinds) {
|
|
211
|
-
return (connectorKinds ?? []).some((kind) => kind === integrationId);
|
|
212
|
-
}
|
|
213
|
-
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/connectors/marketplace/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqBH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C;QACE,EAAE,EAAE,QAAQ;QACZ,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,QAAQ;QACrB,MAAM,EAAE,4BAA4B;QACpC,KAAK,EAAE;YACL,eAAe;YACf,cAAc;YACd,qBAAqB;YACrB,oBAAoB;YACpB,uBAAuB;YACvB,wBAAwB;YACxB,2BAA2B;YAC3B,2BAA2B;YAC3B,4BAA4B;YAC5B,qBAAqB;YACrB,kBAAkB;YAClB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mBAAmB;YACnB,uBAAuB;YACvB,0BAA0B;YAC1B,4BAA4B;YAC5B,uBAAuB;SACxB;QACD,MAAM,EAAE,EAAE;KACX;IACD;QACE,EAAE,EAAE,YAAY;QAChB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,YAAY;QACzB,MAAM,EAAE,yCAAyC;QACjD,KAAK,EAAE;YACL,eAAe;YACf,oBAAoB;YACpB,cAAc;YACd,oBAAoB;YACpB,yBAAyB;YACzB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,kBAAkB;YAClB,qBAAqB;YACrB,iBAAiB;YACjB,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,mBAAmB;YACnB,oBAAoB;YACpB,oBAAoB;YACpB,iBAAiB;YACjB,mBAAmB;YACnB,yBAAyB;YACzB,0BAA0B;YAC1B,0BAA0B;YAC1B,uBAAuB;YACvB,wBAAwB;SAC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oBAAoB;YACpB,wBAAwB;YACxB,WAAW;YACX,oBAAoB;YACpB,cAAc;YACd,uBAAuB;YACvB,YAAY;YACZ,yBAAyB;YACzB,QAAQ;YACR,OAAO;YACP,iBAAiB;SAClB;QACD,MAAM,EAAE,EAAE;KACX;IACD;QACE,EAAE,EAAE,OAAO;QACX,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,OAAO;QACpB,MAAM,EAAE,2BAA2B;QACnC,KAAK,EAAE;YACL,iBAAiB;YACjB,aAAa;YACb,gCAAgC;YAChC,OAAO;YACP,YAAY;YACZ,eAAe;YACf,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,YAAY;YACZ,QAAQ;YACR,aAAa;YACb,gBAAgB;YAChB,aAAa;YACb,oBAAoB;YACpB,aAAa;YACb,gBAAgB;YAChB,oBAAoB;SACrB;QACD,MAAM,EAAE,EAAE;KACX;CACsD,CAAC;AAW1D,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,4BAA4B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAC/D,CAAC;AAEF,MAAM,UAAU,0BAA0B,CACxC,EAAsB;IAEtB,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,EAAiC,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,aAAqB,EACrB,cAA2D;IAE3D,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fleet MCP server discovery for marketplace bridges.
|
|
3
|
-
*
|
|
4
|
-
* MDA resolves the workspace `mcp_servers` row by canonical URL so Connect and
|
|
5
|
-
* the proxy loader can use the stable `oauth_provider_id` without hardcoding
|
|
6
|
-
* `notion-mcp-<hash>` in agent source.
|
|
7
|
-
*/
|
|
8
|
-
import { type FleetClientOptions } from "../../identity/fleet.js";
|
|
9
|
-
export interface FleetMcpServer {
|
|
10
|
-
id: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
url: string;
|
|
13
|
-
auth_type?: string;
|
|
14
|
-
oauth_provider_id?: string | null;
|
|
15
|
-
oauth_mode?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ResolveMarketplaceMcpServerOptions extends FleetClientOptions {
|
|
18
|
-
/** Canonical MCP URL to match (e.g. Notion's marketplace URL). */
|
|
19
|
-
mcpUrl: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Build a smith-backend public URL under `/api/v1/{path}`.
|
|
23
|
-
*
|
|
24
|
-
* Marketplace list/invoke live on the Python MCP proxy (`/api/v1/mcp/tools`,
|
|
25
|
-
* `/api/v1/mcp/proxy`), not on smith-go's `/v1/mcp/*` (those 404). Self-hosted
|
|
26
|
-
* often sets `LANGSMITH_ENDPOINT` to a base that already ends in `/api` — same
|
|
27
|
-
* convention as toolserver — so we only insert `/api` when it is missing.
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveSmithBackendV1Url(base: string, path: string): string;
|
|
30
|
-
/** Normalize MCP URLs the way Fleet list filtering does (lowercase, trim slash). */
|
|
31
|
-
export declare function normalizeMcpUrl(url: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Find the workspace MCP server for `mcpUrl`.
|
|
34
|
-
*
|
|
35
|
-
* Prefers Fleet's `?url=` filter; falls back to a full list scan when the
|
|
36
|
-
* filter is unavailable or returns nothing.
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveMarketplaceMcpServer(options: ResolveMarketplaceMcpServerOptions): Promise<FleetMcpServer>;
|
|
39
|
-
/** @internal Exported for unit tests. */
|
|
40
|
-
export declare function missingMarketplaceServerMessage(mcpUrl: string): string;
|
|
41
|
-
/**
|
|
42
|
-
* Parse a smith-backend `POST /v1/mcp/proxy` response body into tool content.
|
|
43
|
-
*
|
|
44
|
-
* Upstream MCP servers may answer with either `application/json` or
|
|
45
|
-
* Streamable HTTP SSE (`text/event-stream` with `data:` JSON-RPC lines). The
|
|
46
|
-
* proxy forwards the vendor body as-is, so callers must accept both.
|
|
47
|
-
*/
|
|
48
|
-
export declare function parseMcpProxyResponseBody(text: string): unknown;
|
|
49
|
-
/** JSON-RPC objects from a direct JSON body or SSE `data:` lines. */
|
|
50
|
-
export declare function extractMcpJsonRpcMessages(text: string): unknown[];
|
|
51
|
-
/**
|
|
52
|
-
* Parse `GET /v1/fleet/mcp-servers` payloads.
|
|
53
|
-
*
|
|
54
|
-
* - Bare array: the live Fleet contract (`render.JSON` of `[]McpServer`).
|
|
55
|
-
* - `{ items }`: Fleet's usual list envelope (e.g. agents / connections). Not
|
|
56
|
-
* used by mcp-servers today; accepted so a future envelope switch does not
|
|
57
|
-
* break discovery.
|
|
58
|
-
* - `{ data }`: host-upstream list shape mirrored elsewhere in Fleet clients.
|
|
59
|
-
* Same defensive fallback; prefer `items` when both are present.
|
|
60
|
-
*/
|
|
61
|
-
export declare function parseMcpServerList(payload: unknown): FleetMcpServer[];
|
|
62
|
-
//# sourceMappingURL=fleet-mcp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fleet-mcp.d.ts","sourceRoot":"","sources":["../../../src/connectors/marketplace/fleet-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAOjC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kCAAmC,SAAQ,kBAAkB;IAC5E,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ3E;AAuBD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,cAAc,CAAC,CAmCzB;AAED,yCAAyC;AACzC,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAStE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuC/D;AAED,qEAAqE;AACrE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CA4BjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,EAAE,CAYrE"}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fleet MCP server discovery for marketplace bridges.
|
|
3
|
-
*
|
|
4
|
-
* MDA resolves the workspace `mcp_servers` row by canonical URL so Connect and
|
|
5
|
-
* the proxy loader can use the stable `oauth_provider_id` without hardcoding
|
|
6
|
-
* `notion-mcp-<hash>` in agent source.
|
|
7
|
-
*/
|
|
8
|
-
import { resolveFleetApiUrl, resolveFleetHeaders, } from "../../identity/fleet.js";
|
|
9
|
-
import { fetchWithTimeout, PROVIDER_HTTP_TIMEOUT_MS, } from "../../runtime/http.js";
|
|
10
|
-
import { MARKETPLACE_MCP_INTEGRATIONS } from "./catalog.js";
|
|
11
|
-
/**
|
|
12
|
-
* Build a smith-backend public URL under `/api/v1/{path}`.
|
|
13
|
-
*
|
|
14
|
-
* Marketplace list/invoke live on the Python MCP proxy (`/api/v1/mcp/tools`,
|
|
15
|
-
* `/api/v1/mcp/proxy`), not on smith-go's `/v1/mcp/*` (those 404). Self-hosted
|
|
16
|
-
* often sets `LANGSMITH_ENDPOINT` to a base that already ends in `/api` — same
|
|
17
|
-
* convention as toolserver — so we only insert `/api` when it is missing.
|
|
18
|
-
*/
|
|
19
|
-
export function resolveSmithBackendV1Url(base, path) {
|
|
20
|
-
const origin = new URL(withScheme(base));
|
|
21
|
-
let prefix = stripTrailingSlashes(origin.pathname);
|
|
22
|
-
if (!prefix.endsWith("/api")) {
|
|
23
|
-
prefix = `${prefix}/api`;
|
|
24
|
-
}
|
|
25
|
-
const normalized = stripLeadingSlashes(path);
|
|
26
|
-
return new URL(`${prefix}/v1/${normalized}`, origin).toString();
|
|
27
|
-
}
|
|
28
|
-
function withScheme(base) {
|
|
29
|
-
return /^[a-z][a-z0-9+.-]*:\/\//i.test(base) ? base : `https://${base}`;
|
|
30
|
-
}
|
|
31
|
-
/** Trim trailing `/` without regex (avoids CodeQL poly-ReDoS alerts). */
|
|
32
|
-
function stripTrailingSlashes(value) {
|
|
33
|
-
let end = value.length;
|
|
34
|
-
while (end > 0 && value.charCodeAt(end - 1) === 47 /* / */) {
|
|
35
|
-
end -= 1;
|
|
36
|
-
}
|
|
37
|
-
return end === value.length ? value : value.slice(0, end);
|
|
38
|
-
}
|
|
39
|
-
function stripLeadingSlashes(value) {
|
|
40
|
-
let start = 0;
|
|
41
|
-
while (start < value.length && value.charCodeAt(start) === 47 /* / */) {
|
|
42
|
-
start += 1;
|
|
43
|
-
}
|
|
44
|
-
return start === 0 ? value : value.slice(start);
|
|
45
|
-
}
|
|
46
|
-
/** Normalize MCP URLs the way Fleet list filtering does (lowercase, trim slash). */
|
|
47
|
-
export function normalizeMcpUrl(url) {
|
|
48
|
-
const trimmed = stripTrailingSlashes(url.trim());
|
|
49
|
-
try {
|
|
50
|
-
const parsed = new URL(trimmed);
|
|
51
|
-
parsed.hash = "";
|
|
52
|
-
parsed.search = "";
|
|
53
|
-
return stripTrailingSlashes(parsed.toString()).toLowerCase();
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
return trimmed.toLowerCase();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Find the workspace MCP server for `mcpUrl`.
|
|
61
|
-
*
|
|
62
|
-
* Prefers Fleet's `?url=` filter; falls back to a full list scan when the
|
|
63
|
-
* filter is unavailable or returns nothing.
|
|
64
|
-
*/
|
|
65
|
-
export async function resolveMarketplaceMcpServer(options) {
|
|
66
|
-
const env = process.env;
|
|
67
|
-
const base = options.apiUrl ?? resolveFleetApiUrl(env);
|
|
68
|
-
const headers = options.apiKey
|
|
69
|
-
? {
|
|
70
|
-
"x-api-key": options.apiKey,
|
|
71
|
-
"Content-Type": "application/json",
|
|
72
|
-
...(options.workspaceId ? { "x-tenant-id": options.workspaceId } : {}),
|
|
73
|
-
}
|
|
74
|
-
: resolveFleetHeaders("fleet mcp-servers", env);
|
|
75
|
-
const target = normalizeMcpUrl(options.mcpUrl);
|
|
76
|
-
const filteredUrl = `${base}/v1/fleet/mcp-servers?url=${encodeURIComponent(options.mcpUrl)}`;
|
|
77
|
-
const filtered = await listMcpServers(filteredUrl, headers, options.fetchImpl);
|
|
78
|
-
const fromFilter = filtered.find((server) => normalizeMcpUrl(server.url) === target);
|
|
79
|
-
if (fromFilter) {
|
|
80
|
-
return assertOAuthProvider(fromFilter, options.mcpUrl);
|
|
81
|
-
}
|
|
82
|
-
const all = await listMcpServers(`${base}/v1/fleet/mcp-servers`, headers, options.fetchImpl);
|
|
83
|
-
const match = all.find((server) => normalizeMcpUrl(server.url) === target);
|
|
84
|
-
if (!match) {
|
|
85
|
-
throw new Error(missingMarketplaceServerMessage(options.mcpUrl));
|
|
86
|
-
}
|
|
87
|
-
return assertOAuthProvider(match, options.mcpUrl);
|
|
88
|
-
}
|
|
89
|
-
/** @internal Exported for unit tests. */
|
|
90
|
-
export function missingMarketplaceServerMessage(mcpUrl) {
|
|
91
|
-
const displayName = MARKETPLACE_MCP_INTEGRATIONS.find((entry) => normalizeMcpUrl(entry.mcpUrl) === normalizeMcpUrl(mcpUrl))?.displayName ?? "this integration";
|
|
92
|
-
return (`No LangSmith MCP server found for ${mcpUrl}. ` +
|
|
93
|
-
`Connect ${displayName} under LangSmith Integrations first.`);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Parse a smith-backend `POST /v1/mcp/proxy` response body into tool content.
|
|
97
|
-
*
|
|
98
|
-
* Upstream MCP servers may answer with either `application/json` or
|
|
99
|
-
* Streamable HTTP SSE (`text/event-stream` with `data:` JSON-RPC lines). The
|
|
100
|
-
* proxy forwards the vendor body as-is, so callers must accept both.
|
|
101
|
-
*/
|
|
102
|
-
export function parseMcpProxyResponseBody(text) {
|
|
103
|
-
const messages = extractMcpJsonRpcMessages(text);
|
|
104
|
-
if (messages.length === 0) {
|
|
105
|
-
return text;
|
|
106
|
-
}
|
|
107
|
-
const response = messages.find((message) => !!message &&
|
|
108
|
-
typeof message === "object" &&
|
|
109
|
-
("result" in message || "error" in message)) ?? messages[messages.length - 1];
|
|
110
|
-
if (!response || typeof response !== "object") {
|
|
111
|
-
return response;
|
|
112
|
-
}
|
|
113
|
-
const json = response;
|
|
114
|
-
if (json.error?.message) {
|
|
115
|
-
throw new Error(json.error.message);
|
|
116
|
-
}
|
|
117
|
-
if (json.result &&
|
|
118
|
-
typeof json.result === "object" &&
|
|
119
|
-
json.result !== null &&
|
|
120
|
-
"content" in json.result &&
|
|
121
|
-
json.result.content !== undefined) {
|
|
122
|
-
return json.result.content;
|
|
123
|
-
}
|
|
124
|
-
if (json.content !== undefined) {
|
|
125
|
-
return json.content;
|
|
126
|
-
}
|
|
127
|
-
if (json.result !== undefined) {
|
|
128
|
-
return json.result;
|
|
129
|
-
}
|
|
130
|
-
return json;
|
|
131
|
-
}
|
|
132
|
-
/** JSON-RPC objects from a direct JSON body or SSE `data:` lines. */
|
|
133
|
-
export function extractMcpJsonRpcMessages(text) {
|
|
134
|
-
const trimmed = text.trim();
|
|
135
|
-
if (!trimmed) {
|
|
136
|
-
return [];
|
|
137
|
-
}
|
|
138
|
-
if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
139
|
-
try {
|
|
140
|
-
return [JSON.parse(trimmed)];
|
|
141
|
-
}
|
|
142
|
-
catch {
|
|
143
|
-
// Fall through — some proxies prefix SSE with noise.
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const out = [];
|
|
147
|
-
for (const line of text.split(/\r?\n/)) {
|
|
148
|
-
if (!line.startsWith("data:")) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
const data = line.slice("data:".length).trim();
|
|
152
|
-
if (!data || data === "[DONE]") {
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
try {
|
|
156
|
-
out.push(JSON.parse(data));
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
// Skip non-JSON data lines.
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return out;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Parse `GET /v1/fleet/mcp-servers` payloads.
|
|
166
|
-
*
|
|
167
|
-
* - Bare array: the live Fleet contract (`render.JSON` of `[]McpServer`).
|
|
168
|
-
* - `{ items }`: Fleet's usual list envelope (e.g. agents / connections). Not
|
|
169
|
-
* used by mcp-servers today; accepted so a future envelope switch does not
|
|
170
|
-
* break discovery.
|
|
171
|
-
* - `{ data }`: host-upstream list shape mirrored elsewhere in Fleet clients.
|
|
172
|
-
* Same defensive fallback; prefer `items` when both are present.
|
|
173
|
-
*/
|
|
174
|
-
export function parseMcpServerList(payload) {
|
|
175
|
-
if (Array.isArray(payload)) {
|
|
176
|
-
return payload.filter(isMcpServerRecord);
|
|
177
|
-
}
|
|
178
|
-
if (payload && typeof payload === "object") {
|
|
179
|
-
const record = payload;
|
|
180
|
-
const nested = record.items ?? record.data;
|
|
181
|
-
if (Array.isArray(nested)) {
|
|
182
|
-
return nested.filter(isMcpServerRecord);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return [];
|
|
186
|
-
}
|
|
187
|
-
function isMcpServerRecord(value) {
|
|
188
|
-
return (!!value &&
|
|
189
|
-
typeof value === "object" &&
|
|
190
|
-
typeof value.url === "string");
|
|
191
|
-
}
|
|
192
|
-
async function listMcpServers(url, headers, fetchImpl) {
|
|
193
|
-
const response = await fetchWithTimeout(url, { method: "GET", headers }, PROVIDER_HTTP_TIMEOUT_MS, fetchImpl ?? fetch);
|
|
194
|
-
if (!response.ok) {
|
|
195
|
-
const text = await response.text().catch(() => "");
|
|
196
|
-
throw new Error(`Fleet list mcp-servers failed (${response.status}): ${text || response.statusText}`);
|
|
197
|
-
}
|
|
198
|
-
return parseMcpServerList(await response.json());
|
|
199
|
-
}
|
|
200
|
-
function assertOAuthProvider(server, mcpUrl) {
|
|
201
|
-
const providerId = server.oauth_provider_id?.trim();
|
|
202
|
-
if (!providerId) {
|
|
203
|
-
throw new Error(`LangSmith MCP server for ${mcpUrl} has no oauth_provider_id. ` +
|
|
204
|
-
"Re-add the integration from the Fleet marketplace using the one-click " +
|
|
205
|
-
"OAuth path (legacy_shared_provider / pinned provider). Per-user " +
|
|
206
|
-
"dynamic client mode is not supported for MDA Connect v1.");
|
|
207
|
-
}
|
|
208
|
-
if (server.oauth_mode === "per_user_dynamic_client") {
|
|
209
|
-
throw new Error(`LangSmith MCP server for ${mcpUrl} uses per_user_dynamic_client. ` +
|
|
210
|
-
"MDA marketplace Connect requires a stable workspace oauth_provider_id " +
|
|
211
|
-
"(marketplace one-click / legacy_shared_provider).");
|
|
212
|
-
}
|
|
213
|
-
return { ...server, oauth_provider_id: providerId };
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=fleet-mcp.js.map
|
|
@@ -1 +0,0 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AC,MAAM,MAAM,IAAI,IAAI,QAAQ,CAAC,UAAU,EAAE,CACrF,CAAC;IACJ,CAAC;IACD,OAAO,kBAAkB,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,mBAAmB,CAC1B,MAAsB,EACtB,MAAc;IAEd,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC;IACpD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,4BAA4B,MAAM,6BAA6B;YAC7D,wEAAwE;YACxE,kEAAkE;YAClE,0DAA0D,CAC7D,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,KAAK,yBAAyB,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CACb,4BAA4B,MAAM,iCAAiC;YACjE,wEAAwE;YACxE,mDAAmD,CACtD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marketplace MCP connectors — third-party MCP servers managed in LangSmith.
|
|
3
|
-
*
|
|
4
|
-
* Unlike {@link ../toolserver}, tools run on the vendor's MCP endpoint and are
|
|
5
|
-
* invoked through `POST /v1/mcp/proxy` with a vault subject. Factories are
|
|
6
|
-
* derived from {@link MARKETPLACE_MCP_INTEGRATIONS} so a new bridge is one
|
|
7
|
-
* catalog row (npm + PyPI).
|
|
8
|
-
*/
|
|
9
|
-
import type { Connector } from "../../runtime/connector.js";
|
|
10
|
-
import { type ToolSelectionConnectorConfig } from "../tool-selection.js";
|
|
11
|
-
import { type MarketplaceMcpIntegrationId, type MarketplaceMcpToolsFor } from "./catalog.js";
|
|
12
|
-
export { MARKETPLACE_MCP_INTEGRATIONS, hasMarketplaceConnector, marketplaceIntegrationById, type MarketplaceMcpIntegration, type MarketplaceMcpIntegrationId, type MarketplaceMcpToolsFor, } from "./catalog.js";
|
|
13
|
-
export { normalizeMcpUrl, resolveMarketplaceMcpServer, type FleetMcpServer, } from "./fleet-mcp.js";
|
|
14
|
-
/** Configuration accepted by every `connectors.<marketplace>` factory. */
|
|
15
|
-
export type MarketplaceConnectorConfig<TTool extends string = string> = ToolSelectionConnectorConfig<TTool>;
|
|
16
|
-
export type MarketplaceConnectorFor<Id extends MarketplaceMcpIntegrationId> = Connector & MarketplaceConnectorConfig<MarketplaceMcpToolsFor<Id>> & {
|
|
17
|
-
kind: Id;
|
|
18
|
-
};
|
|
19
|
-
export type MarketplaceConnectorFactoryFor<Id extends MarketplaceMcpIntegrationId> = (config?: MarketplaceConnectorConfig<MarketplaceMcpToolsFor<Id>>) => MarketplaceConnectorFor<Id>;
|
|
20
|
-
/** `connectors.<id>` factories for every marketplace catalog entry. */
|
|
21
|
-
export type MarketplaceConnectors = {
|
|
22
|
-
[Id in MarketplaceMcpIntegrationId]: MarketplaceConnectorFactoryFor<Id>;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* All marketplace connector factories keyed by integration id.
|
|
26
|
-
*
|
|
27
|
-
* Built from the catalog so a new bridge is one entry there rather than a
|
|
28
|
-
* namespace line that can be forgotten.
|
|
29
|
-
*/
|
|
30
|
-
export declare const marketplaceConnectors: MarketplaceConnectors;
|
|
31
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/marketplace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,GAC5B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AAExB,0EAA0E;AAC1E,MAAM,MAAM,0BAA0B,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAClE,4BAA4B,CAAC,KAAK,CAAC,CAAC;AAEtC,MAAM,MAAM,uBAAuB,CAAC,EAAE,SAAS,2BAA2B,IACxE,SAAS,GACP,0BAA0B,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,GAAG;IACvD,IAAI,EAAE,EAAE,CAAC;CACV,CAAC;AAEN,MAAM,MAAM,8BAA8B,CACxC,EAAE,SAAS,2BAA2B,IACpC,CACF,MAAM,CAAC,EAAE,0BAA0B,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,KAC5D,uBAAuB,CAAC,EAAE,CAAC,CAAC;AAEjC,uEAAuE;AACvE,MAAM,MAAM,qBAAqB,GAAG;KACjC,EAAE,IAAI,2BAA2B,GAAG,8BAA8B,CAAC,EAAE,CAAC;CACxE,CAAC;AA2BF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAKV,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marketplace MCP connectors — third-party MCP servers managed in LangSmith.
|
|
3
|
-
*
|
|
4
|
-
* Unlike {@link ../toolserver}, tools run on the vendor's MCP endpoint and are
|
|
5
|
-
* invoked through `POST /v1/mcp/proxy` with a vault subject. Factories are
|
|
6
|
-
* derived from {@link MARKETPLACE_MCP_INTEGRATIONS} so a new bridge is one
|
|
7
|
-
* catalog row (npm + PyPI).
|
|
8
|
-
*/
|
|
9
|
-
import { defineExtension } from "../../extension.js";
|
|
10
|
-
import { toolSelectionConnectorSchema, } from "../tool-selection.js";
|
|
11
|
-
import { MARKETPLACE_MCP_INTEGRATIONS, } from "./catalog.js";
|
|
12
|
-
export { MARKETPLACE_MCP_INTEGRATIONS, hasMarketplaceConnector, marketplaceIntegrationById, } from "./catalog.js";
|
|
13
|
-
export { normalizeMcpUrl, resolveMarketplaceMcpServer, } from "./fleet-mcp.js";
|
|
14
|
-
function marketplaceTools(integration, label) {
|
|
15
|
-
return async (_ctx, self) => {
|
|
16
|
-
const { loadMarketplaceTools } = await import("./load.js");
|
|
17
|
-
return loadMarketplaceTools(integration, label, self);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function marketplaceConnectorFactory(integration) {
|
|
21
|
-
const label = `connectors.${integration.id}`;
|
|
22
|
-
return defineExtension("connector", {
|
|
23
|
-
kind: integration.id,
|
|
24
|
-
label,
|
|
25
|
-
args: toolSelectionConnectorSchema(),
|
|
26
|
-
tools: marketplaceTools(integration, label),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* All marketplace connector factories keyed by integration id.
|
|
31
|
-
*
|
|
32
|
-
* Built from the catalog so a new bridge is one entry there rather than a
|
|
33
|
-
* namespace line that can be forgotten.
|
|
34
|
-
*/
|
|
35
|
-
export const marketplaceConnectors = Object.fromEntries(MARKETPLACE_MCP_INTEGRATIONS.map((entry) => [
|
|
36
|
-
entry.id,
|
|
37
|
-
marketplaceConnectorFactory(entry),
|
|
38
|
-
]));
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connectors/marketplace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,4BAA4B,GAE7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,4BAA4B,GAI7B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,GAI3B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,eAAe,EACf,2BAA2B,GAE5B,MAAM,gBAAgB,CAAC;AAuBxB,SAAS,gBAAgB,CACvB,WAAsC,EACtC,KAAa;IAEb,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAC1B,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,oBAAoB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAClC,WAAsC;IAEtC,MAAM,KAAK,GAAG,cAAc,WAAW,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,eAAe,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,WAAW,CAAC,EAAE;QACpB,KAAK;QACL,IAAI,EAAE,4BAA4B,EAG/B;QACH,KAAK,EAAE,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAC;KAC5C,CAAuD,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B,MAAM,CAAC,WAAW,CAC5E,4BAA4B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE;IACR,2BAA2B,CAAC,KAAK,CAAC;CACnC,CAAC,CACsB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Load marketplace MCP tools through LangSmith's `POST /api/v1/mcp/proxy`.
|
|
3
|
-
*
|
|
4
|
-
* Unlike toolserver (bare Streamable HTTP to `/v1/toolserver/servers/{slug}/mcp`),
|
|
5
|
-
* marketplace invoke uses an HTTP-over-JSON envelope. Credentials never leave
|
|
6
|
-
* the vault — the proxy mints a bearer for `agent_id` / `ls_user_id`.
|
|
7
|
-
*/
|
|
8
|
-
import { type ToolSelectionConnectorConfig } from "../tool-selection.js";
|
|
9
|
-
import type { MarketplaceMcpIntegration } from "./catalog.js";
|
|
10
|
-
export type MarketplaceConnectorConfig = ToolSelectionConnectorConfig;
|
|
11
|
-
/** Load (and cache) tools for one marketplace connector declaration. */
|
|
12
|
-
export declare function loadMarketplaceTools(integration: MarketplaceMcpIntegration, label: string, connector: MarketplaceConnectorConfig & object): Promise<unknown[]>;
|
|
13
|
-
export declare function clearMarketplaceToolsCacheForTests(connector: object): void;
|
|
14
|
-
//# sourceMappingURL=load.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/connectors/marketplace/load.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAS9D,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AAEtE,wEAAwE;AACxE,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,yBAAyB,EACtC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,0BAA0B,GAAG,MAAM,GAC7C,OAAO,CAAC,OAAO,EAAE,CAAC,CAuBpB;AAED,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE1E"}
|