@relvo/mcp 0.1.1 → 0.1.3
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 +116 -5
- package/bin/relvo-mcp.mjs +1 -1
- package/dist/client/agent-run.js +681 -0
- package/dist/client/browser.js +650 -0
- package/dist/client/evm-wallet.js +214 -0
- package/dist/client/execution-context.js +6 -3
- package/dist/client/index.js +3 -342
- package/dist/client/local-input.js +18 -11
- package/dist/client/local-profile.js +22 -110
- package/dist/client/local-setup.js +0 -1
- package/dist/client/tool-name-hints.js +48 -0
- package/dist/client/wallet-access.js +207 -0
- package/dist/mcp/agent-server.js +237 -0
- package/dist/mcp/context.js +70 -0
- package/dist/mcp/host-schema.js +47 -0
- package/dist/mcp/instructions.js +17 -0
- package/dist/mcp/local-upload.js +12 -4
- package/dist/mcp/operations.js +30 -0
- package/dist/mcp/runtime.js +25 -5
- package/dist/mcp/server.js +293 -69
- package/dist/mcp/version.js +1 -0
- package/dist/schema/accountRequestMethods.js +1 -0
- package/dist/schema/cronValidator.js +150 -0
- package/dist/schema/platformApiKey.js +5 -5
- package/dist/schema/platformBillingConstants.js +3 -0
- package/dist/schema/platformCapabilityFamilies.js +217 -0
- package/dist/schema/platformConnectionCatalog.js +20 -3
- package/dist/schema/platformConnectionPolicy.js +26 -0
- package/dist/schema/platformCustomTools.js +113 -0
- package/dist/schema/platformFunding.js +9 -0
- package/dist/schema/platformHttpConstraints.js +7 -0
- package/dist/schema/platformMcpTools.js +7 -0
- package/dist/schema/platformMetaTools.js +10 -6
- package/dist/schema/platformMonitorSchedule.js +123 -0
- package/dist/schema/platformMonitors.js +159 -0
- package/dist/schema/platformOAuth.js +7 -0
- package/dist/schema/platformPublicExecution.js +72 -25
- package/dist/schema/platformRoutes.js +119 -0
- package/dist/schema/platformSkills.js +1 -1
- package/dist/schema/platformTeamSecretName.js +3 -0
- package/dist/schema/platformTeamSkills.js +49 -0
- package/dist/schema/platformToolAccess.js +13 -0
- package/dist/schema/platformTriggers.js +152 -0
- package/dist/schema/platformWorkflows.js +100 -0
- package/dist/schema/scheduleTimeZone.js +15 -0
- package/dist/schema/toolDiscovery.js +44 -6
- package/dist/schema/toolInputRepair.js +110 -0
- package/dist/schema/toolResultContext.js +33 -1
- package/package.json +1 -1
- package/dist/schema/amazonAds.js +0 -13
- package/dist/schema/oauth2.js +0 -64
package/dist/schema/oauth2.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export const oauth2ProviderSchema = z.enum(["google", "x", "github", "notion", "slack", "linear", "linkedin", "pinterest", "tiktok", "microsoft", "amazon"]);
|
|
3
|
-
export const AMAZON_OAUTH_AUTHORIZATION_URLS = { na: "https://www.amazon.com/ap/oa", eu: "https://eu.account.amazon.com/ap/oa", fe: "https://apac.account.amazon.com/ap/oa" };
|
|
4
|
-
export const oauth2TokenResponseSchema = z.object({
|
|
5
|
-
access_token: z.string().min(1),
|
|
6
|
-
refresh_token: z.string().min(1).optional(),
|
|
7
|
-
expires_in: z.number().positive().finite().optional(),
|
|
8
|
-
scope: z.string().optional(),
|
|
9
|
-
token_type: z.string().optional(),
|
|
10
|
-
error: z.never().optional(),
|
|
11
|
-
});
|
|
12
|
-
export const oauth2ExpiringTokenResponseSchema = oauth2TokenResponseSchema.extend({
|
|
13
|
-
expires_in: oauth2TokenResponseSchema.shape.expires_in.unwrap(),
|
|
14
|
-
});
|
|
15
|
-
export const oauth2ErrorResponseSchema = z.object({
|
|
16
|
-
error: z.string().min(1), error_description: z.string().optional(), log_id: z.string().optional(),
|
|
17
|
-
});
|
|
18
|
-
export const OAUTH2_PROVIDERS = {
|
|
19
|
-
google: { name: "Google", authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth", tokenUrl: "https://oauth2.googleapis.com/token", clientAuth: "body", encoding: "form", scopeSeparator: " ", pkce: true,
|
|
20
|
-
documentation: "https://developers.google.com/identity/protocols/oauth2/web-server" },
|
|
21
|
-
x: { name: "X", authorizeUrl: "https://x.com/i/oauth2/authorize", tokenUrl: "https://api.x.com/2/oauth2/token", clientAuth: "basic", encoding: "form", scopeSeparator: " ", pkce: true,
|
|
22
|
-
documentation: "https://docs.x.com/fundamentals/authentication/oauth-2-0/authorization-code" },
|
|
23
|
-
github: { name: "GitHub", authorizeUrl: "https://github.com/login/oauth/authorize", tokenUrl: "https://github.com/login/oauth/access_token", clientAuth: "body", encoding: "json", scopeSeparator: " ", pkce: true,
|
|
24
|
-
documentation: "https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps" },
|
|
25
|
-
notion: { name: "Notion", authorizeUrl: "https://api.notion.com/v1/oauth/authorize", tokenUrl: "https://api.notion.com/v1/oauth/token", clientAuth: "basic", encoding: "json", scopeSeparator: " ", pkce: false,
|
|
26
|
-
documentation: "https://developers.notion.com/guides/get-started/authorization" },
|
|
27
|
-
slack: { name: "Slack", authorizeUrl: "https://slack.com/oauth/v2/authorize", tokenUrl: "https://slack.com/api/oauth.v2.access", clientAuth: "basic", encoding: "form", scopeSeparator: ",", pkce: false,
|
|
28
|
-
documentation: "https://docs.slack.dev/authentication/installing-with-oauth/" },
|
|
29
|
-
linear: { name: "Linear", authorizeUrl: "https://linear.app/oauth/authorize", tokenUrl: "https://api.linear.app/oauth/token", clientAuth: "body", encoding: "form", scopeSeparator: ",", pkce: true,
|
|
30
|
-
documentation: "https://linear.app/developers/oauth-2-0-authentication" },
|
|
31
|
-
linkedin: { name: "LinkedIn", authorizeUrl: "https://www.linkedin.com/oauth/v2/authorization", tokenUrl: "https://www.linkedin.com/oauth/v2/accessToken", clientAuth: "body", encoding: "form", scopeSeparator: " ", pkce: false,
|
|
32
|
-
documentation: "https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow" },
|
|
33
|
-
pinterest: { name: "Pinterest", authorizeUrl: "https://www.pinterest.com/oauth/", tokenUrl: "https://api.pinterest.com/v5/oauth/token", clientAuth: "basic", encoding: "form", scopeSeparator: ",", pkce: false,
|
|
34
|
-
documentation: "https://developers.pinterest.com/docs/getting-started/set-up-authentication-and-authorization/" },
|
|
35
|
-
tiktok: { name: "TikTok", authorizeUrl: "https://www.tiktok.com/v2/auth/authorize/", tokenUrl: "https://open.tiktokapis.com/v2/oauth/token/", clientAuth: "body", encoding: "form", scopeSeparator: ",", pkce: false,
|
|
36
|
-
documentation: "https://developers.tiktok.com/docs/en/oauth-user-access-token-management" },
|
|
37
|
-
microsoft: { name: "Microsoft Advertising", authorizeUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token", clientAuth: "body", encoding: "form", scopeSeparator: " ", pkce: true,
|
|
38
|
-
documentation: "https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-consent?view=bingads-13" },
|
|
39
|
-
amazon: { name: "Amazon Advertising", authorizeUrl: AMAZON_OAUTH_AUTHORIZATION_URLS.na, tokenUrl: "https://api.amazon.com/auth/o2/token", clientAuth: "body", encoding: "form", scopeSeparator: " ", pkce: true,
|
|
40
|
-
documentation: "https://developer.amazon.com/docs/login-with-amazon/authorization-code-grant.html" },
|
|
41
|
-
};
|
|
42
|
-
export const OAUTH2_TOKEN_PROTOCOLS = {
|
|
43
|
-
...OAUTH2_PROVIDERS,
|
|
44
|
-
wix: { tokenUrl: "https://www.wixapis.com/oauth2/token", clientAuth: "body", encoding: "json",
|
|
45
|
-
documentation: "https://dev.wix.com/docs/build-apps/develop-your-app/auth/authenticate-using-oauth" },
|
|
46
|
-
wordpress: { tokenUrl: "https://public-api.wordpress.com/oauth2/token", clientAuth: "body", encoding: "form",
|
|
47
|
-
documentation: "https://developer.wordpress.com/docs/api/oauth2/" },
|
|
48
|
-
snapchatMarketing: { tokenUrl: "https://accounts.snapchat.com/login/oauth2/access_token", clientAuth: "body", encoding: "form",
|
|
49
|
-
documentation: "https://developers.snap.com/marketing-api/Ads-API/authentication" },
|
|
50
|
-
hubspot: { tokenUrl: "https://api.hubapi.com/oauth/2026-03/token", clientAuth: "body", encoding: "form",
|
|
51
|
-
documentation: "https://developers.hubspot.com/docs/api-reference/legacy/authentication/oauth-tokens/v1/migration-guide" },
|
|
52
|
-
attio: { tokenUrl: "https://app.attio.com/oauth/token", clientAuth: "body", encoding: "form",
|
|
53
|
-
documentation: "https://docs.attio.com/docs/oauth/token" },
|
|
54
|
-
pipedrive: { tokenUrl: "https://oauth.pipedrive.com/oauth/token", clientAuth: "basic", encoding: "form",
|
|
55
|
-
documentation: "https://pipedrive.readme.io/docs/marketplace-oauth-authorization" },
|
|
56
|
-
};
|
|
57
|
-
export function isOAuth2AuthorizationUrl(provider, candidate) {
|
|
58
|
-
const actual = new URL(candidate);
|
|
59
|
-
const allowed = provider === "amazon" ? Object.values(AMAZON_OAUTH_AUTHORIZATION_URLS) : [OAUTH2_PROVIDERS[provider].authorizeUrl];
|
|
60
|
-
return !actual.username && !actual.password && !actual.hash && allowed.some(value => {
|
|
61
|
-
const expected = new URL(value);
|
|
62
|
-
return actual.origin === expected.origin && actual.pathname === expected.pathname;
|
|
63
|
-
});
|
|
64
|
-
}
|