emailengine-app 2.79.9 → 2.80.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +73 -0
- package/README.md +6 -0
- package/config/default.toml +5 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +43 -0
- package/lib/account/account-state.js +62 -0
- package/lib/account.js +34 -2
- package/lib/api-routes/account-routes.js +101 -1
- package/lib/api-routes/blocklist-routes.js +24 -0
- package/lib/api-routes/delivery-test-routes.js +6 -0
- package/lib/api-routes/gateway-routes.js +30 -0
- package/lib/api-routes/index.js +1 -1
- package/lib/api-routes/license-routes.js +10 -0
- package/lib/api-routes/mcp-oauth-routes.js +3 -3
- package/lib/api-routes/mcp-routes.js +39 -21
- package/lib/api-routes/oauth2-app-routes.js +38 -1
- package/lib/api-routes/outbox-routes.js +6 -0
- package/lib/api-routes/permission-map.js +208 -43
- package/lib/api-routes/pubsub-routes.js +8 -0
- package/lib/api-routes/route-helpers.js +58 -11
- package/lib/api-routes/settings-routes.js +67 -6
- package/lib/api-routes/stats-routes.js +6 -0
- package/lib/api-routes/template-routes.js +21 -0
- package/lib/api-routes/token-routes.js +34 -2
- package/lib/api-routes/webhook-route-routes.js +13 -0
- package/lib/autodetect-imap-settings.js +349 -47
- package/lib/cert-handler.js +62 -0
- package/lib/consts.js +50 -6
- package/lib/db.js +12 -0
- package/lib/egress-fetch.js +21 -9
- package/lib/email-client/base-client.js +238 -67
- package/lib/email-client/credential-errors.js +122 -0
- package/lib/email-client/gmail/gmail-api.js +2 -1
- package/lib/email-client/gmail-client.js +70 -64
- package/lib/email-client/imap/connection-errors.js +52 -0
- package/lib/email-client/imap/listing-diff.js +47 -6
- package/lib/email-client/imap/login-failure.js +52 -0
- package/lib/email-client/imap/mailbox.js +457 -379
- package/lib/email-client/imap/subconnection.js +17 -12
- package/lib/email-client/imap/sync-operations.js +46 -59
- package/lib/email-client/imap-client.js +139 -101
- package/lib/email-client/message-builder.js +11 -11
- package/lib/email-client/outlook/graph-api.js +2 -1
- package/lib/email-client/outlook-client.js +219 -106
- package/lib/enum-descriptions.js +12 -2
- package/lib/imap-proxy-auth.js +58 -3
- package/lib/imapproxy/imap-server.js +53 -62
- package/lib/lua/h-del-if-equals.lua +39 -0
- package/lib/lua/h-set-if-equals.lua +39 -0
- package/lib/mcp/oauth.js +46 -8
- package/lib/mcp/protocol.js +78 -35
- package/lib/mcp/tools.js +53 -17
- package/lib/privileged-settings.js +147 -0
- package/lib/routes-ui.js +4 -34
- package/lib/schemas.js +92 -16
- package/lib/security-headers.js +15 -0
- package/lib/settings.js +13 -0
- package/lib/tls/catalog.js +428 -0
- package/lib/tls/context.js +302 -0
- package/lib/tls/der.js +223 -0
- package/lib/tls/listeners.js +62 -0
- package/lib/tls/provision.js +555 -0
- package/lib/tls/self-signed.js +282 -0
- package/lib/tls/status.js +480 -0
- package/lib/tls/store.js +667 -0
- package/lib/token-permission-view.js +252 -102
- package/lib/token-permissions.js +176 -26
- package/lib/tokens.js +7 -6
- package/lib/tools.js +73 -27
- package/lib/ui-routes/account-routes.js +43 -30
- package/lib/ui-routes/admin-config-routes.js +63 -22
- package/lib/ui-routes/admin-entities-routes.js +23 -13
- package/lib/ui-routes/auth-routes.js +16 -1
- package/lib/ui-routes/internals-routes.js +3 -5
- package/lib/ui-routes/mcp-consent-routes.js +72 -31
- package/lib/ui-routes/network-config-routes.js +54 -45
- package/lib/ui-routes/tls-config-routes.js +628 -0
- package/lib/utils/mailbox-path.js +51 -0
- package/lib/utils/severity.js +31 -0
- package/package.json +12 -12
- package/sbom.json +1 -1
- package/server.js +23 -1
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +11 -0
- package/static/js/app.js +34 -0
- package/static/js/public.js +6 -2
- package/static/js/ui.js +97 -61
- package/static/licenses.html +341 -1252
- package/translations/messages.pot +62 -56
- package/views/account/login-redirect.hbs +22 -0
- package/views/account/passkeys.hbs +2 -2
- package/views/accounts/account.hbs +2 -2
- package/views/accounts/browse.hbs +1 -1
- package/views/accounts/edit.hbs +1 -1
- package/views/accounts/register/imap-server.hbs +1 -1
- package/views/config/ai.hbs +1 -1
- package/views/config/branding.hbs +2 -2
- package/views/config/document-store/chat.hbs +1 -1
- package/views/config/document-store/index.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -4
- package/views/config/license.hbs +1 -1
- package/views/config/mcp.hbs +88 -52
- package/views/config/network.hbs +1 -1
- package/views/config/oauth/app.hbs +2 -2
- package/views/config/service.hbs +1 -1
- package/views/config/smtp.hbs +1 -4
- package/views/config/tls-upload.hbs +81 -0
- package/views/config/tls.hbs +593 -0
- package/views/config/webhooks.hbs +2 -2
- package/views/internals/index.hbs +1 -1
- package/views/layout/app.hbs +6 -6
- package/views/layout/login.hbs +5 -5
- package/views/layout/main.hbs +2 -2
- package/views/layout/prompt.hbs +3 -3
- package/views/layout/public.hbs +1 -1
- package/views/mcp/authorize.hbs +47 -45
- package/views/partials/ace_assets.hbs +1 -1
- package/views/partials/add_account_modal.hbs +1 -1
- package/views/partials/filter_editor_js.hbs +2 -2
- package/views/partials/gateway_js.hbs +1 -1
- package/views/partials/mcp_access_levels.hbs +16 -9
- package/views/partials/mcp_tool_count.hbs +15 -14
- package/views/partials/oauth_form.hbs +1 -1
- package/views/partials/public_theme_init.hbs +1 -1
- package/views/partials/side_menu.hbs +1 -0
- package/views/partials/template_form.hbs +1 -1
- package/views/partials/theme_init.hbs +1 -1
- package/views/partials/tls_security_card.hbs +25 -53
- package/views/partials/ui/alert-banner.hbs +3 -2
- package/views/partials/ui/badge.hbs +6 -2
- package/views/partials/ui/btn.hbs +5 -2
- package/views/partials/webhooks_editor_functions.hbs +1 -1
- package/views/reference/index.hbs +1 -1
- package/views/reference/redirect.hbs +1 -1
- package/views/reference/tag.hbs +1 -1
- package/views/reference/token.hbs +1 -1
- package/views/templates/template.hbs +1 -1
- package/views/tokens/new.hbs +175 -74
- package/views/unsubscribe.hbs +1 -1
- package/views/webhooks/webhook.hbs +1 -1
- package/workers/api.js +102 -142
- package/workers/imap-proxy.js +4 -1
- package/workers/smtp.js +51 -44
- package/views/partials/tls_security_js.hbs +0 -64
- package/views/partials/tls_security_modal.hbs +0 -22
|
@@ -9,6 +9,7 @@ const { handleError, maskSecrets, MASKED, MASK_NOTE } = require('./route-helpers
|
|
|
9
9
|
const { apiResponses } = require('../schemas');
|
|
10
10
|
const { ENUM_DESCRIPTIONS } = require('../enum-descriptions');
|
|
11
11
|
const { IMPACT } = require('./operation-impact');
|
|
12
|
+
const { MCP_MAX_PAGE_SIZE } = require('../consts');
|
|
12
13
|
|
|
13
14
|
// Gateways store SMTP delivery errors, not OAuth2 errors, so the error shape differs from the
|
|
14
15
|
// account-level lastErrorSchema
|
|
@@ -60,6 +61,13 @@ async function init(args) {
|
|
|
60
61
|
tags: ['api', 'SMTP Gateway'],
|
|
61
62
|
|
|
62
63
|
plugins: {
|
|
64
|
+
mcp: {
|
|
65
|
+
name: 'list_gateways',
|
|
66
|
+
title: 'List SMTP gateways',
|
|
67
|
+
description:
|
|
68
|
+
"List the SMTP gateways (relay servers messages can be sent through instead of the account's own SMTP server), paged. Passwords are masked.",
|
|
69
|
+
bounds: { pageSize: MCP_MAX_PAGE_SIZE }
|
|
70
|
+
},
|
|
63
71
|
openapi: {
|
|
64
72
|
responses: apiResponses('Returns a page of configured SMTP gateways.', 400, 401, 403, 429, 500)
|
|
65
73
|
}
|
|
@@ -156,6 +164,11 @@ async function init(args) {
|
|
|
156
164
|
tags: ['api', 'SMTP Gateway'],
|
|
157
165
|
|
|
158
166
|
plugins: {
|
|
167
|
+
mcp: {
|
|
168
|
+
name: 'get_gateway',
|
|
169
|
+
title: 'Get SMTP gateway',
|
|
170
|
+
description: 'Get one SMTP gateway: host, port, TLS mode, username and the last delivery error. The password is masked.'
|
|
171
|
+
},
|
|
159
172
|
openapi: {
|
|
160
173
|
responses: apiResponses('Returns the gateway configuration. The password is masked.', 400, 401, 403, 404, 429, 500)
|
|
161
174
|
}
|
|
@@ -253,6 +266,12 @@ async function init(args) {
|
|
|
253
266
|
tags: ['api', 'SMTP Gateway'],
|
|
254
267
|
|
|
255
268
|
plugins: {
|
|
269
|
+
mcp: {
|
|
270
|
+
name: 'create_gateway',
|
|
271
|
+
title: 'Create SMTP gateway',
|
|
272
|
+
description:
|
|
273
|
+
'Register an SMTP gateway, a relay server messages can be sent through. Needs an id, a name, the host and the port; a password can be written but never read back.'
|
|
274
|
+
},
|
|
256
275
|
openapi: {
|
|
257
276
|
responses: apiResponses('Returns the registered gateway.', 400, 401, 403, 429, 500)
|
|
258
277
|
}
|
|
@@ -342,6 +361,12 @@ async function init(args) {
|
|
|
342
361
|
tags: ['api', 'SMTP Gateway'],
|
|
343
362
|
|
|
344
363
|
plugins: {
|
|
364
|
+
mcp: {
|
|
365
|
+
name: 'update_gateway',
|
|
366
|
+
title: 'Update SMTP gateway',
|
|
367
|
+
description:
|
|
368
|
+
'Update an SMTP gateway. Send only the fields to change. Changing the host makes the next delivery authenticate to the new host with the stored password, so confirm host changes with the user.'
|
|
369
|
+
},
|
|
345
370
|
openapi: {
|
|
346
371
|
responses: apiResponses('Returns the updated gateway.', 400, 401, 403, 404, 429, 500)
|
|
347
372
|
}
|
|
@@ -429,6 +454,11 @@ async function init(args) {
|
|
|
429
454
|
tags: ['api', 'SMTP Gateway'],
|
|
430
455
|
|
|
431
456
|
plugins: {
|
|
457
|
+
mcp: {
|
|
458
|
+
name: 'delete_gateway',
|
|
459
|
+
title: 'Delete SMTP gateway',
|
|
460
|
+
description: 'Remove an SMTP gateway. Messages queued through it fail to deliver. Confirm with the user before calling this.'
|
|
461
|
+
},
|
|
432
462
|
openapi: {
|
|
433
463
|
'x-ee-impact': IMPACT.DESTRUCTIVE,
|
|
434
464
|
responses: apiResponses('Returns a deletion marker.', 400, 401, 403, 404, 429, 500)
|
package/lib/api-routes/index.js
CHANGED
|
@@ -128,7 +128,7 @@ async function registerApiRoutes(args) {
|
|
|
128
128
|
await mailboxRoutes({ server, call, CORS_CONFIG, FLAG_SORT_ORDER });
|
|
129
129
|
|
|
130
130
|
// setup settings routes
|
|
131
|
-
await settingsRoutes({ server, notify, CORS_CONFIG });
|
|
131
|
+
await settingsRoutes({ server, call, notify, CORS_CONFIG });
|
|
132
132
|
|
|
133
133
|
// setup stats route
|
|
134
134
|
await statsRoutes({ server, call, CORS_CONFIG });
|
|
@@ -32,6 +32,11 @@ async function init(args) {
|
|
|
32
32
|
tags: ['api', 'License'],
|
|
33
33
|
|
|
34
34
|
plugins: {
|
|
35
|
+
mcp: {
|
|
36
|
+
name: 'get_license',
|
|
37
|
+
title: 'Get license',
|
|
38
|
+
description: 'Get the active license: who it is issued to and when it expires, or an empty object when the instance runs unlicensed.'
|
|
39
|
+
},
|
|
35
40
|
openapi: {
|
|
36
41
|
responses: apiResponses('Returns the active license and its expiry, or an empty object when unlicensed.', 401, 403, 429, 500)
|
|
37
42
|
}
|
|
@@ -119,6 +124,11 @@ async function init(args) {
|
|
|
119
124
|
tags: ['api', 'License'],
|
|
120
125
|
|
|
121
126
|
plugins: {
|
|
127
|
+
mcp: {
|
|
128
|
+
name: 'set_license',
|
|
129
|
+
title: 'Apply license',
|
|
130
|
+
description: 'Apply a license key to this instance. Takes the full license text as issued, including its BEGIN and END lines.'
|
|
131
|
+
},
|
|
122
132
|
openapi: {
|
|
123
133
|
responses: apiResponses('Returns the registered license.', 400, 401, 403, 429, 500)
|
|
124
134
|
}
|
|
@@ -19,7 +19,7 @@ const Boom = require('@hapi/boom');
|
|
|
19
19
|
const Joi = require('joi');
|
|
20
20
|
|
|
21
21
|
const { checkRateLimit } = require('../rate-limit');
|
|
22
|
-
const { oauthOrigin, mcpResource, registerClient, redeemAuthorizationCode, MAX_REDIRECT_URIS } = require('../mcp/oauth');
|
|
22
|
+
const { oauthOrigin, mcpResource, registerClient, redeemAuthorizationCode, MAX_REDIRECT_URIS, MCP_OAUTH_SCOPES } = require('../mcp/oauth');
|
|
23
23
|
|
|
24
24
|
const OPEN_CORS = { origin: ['*'] };
|
|
25
25
|
|
|
@@ -95,7 +95,7 @@ async function init(args) {
|
|
|
95
95
|
return {
|
|
96
96
|
resource: mcpResource(origin),
|
|
97
97
|
authorization_servers: [origin],
|
|
98
|
-
scopes_supported:
|
|
98
|
+
scopes_supported: MCP_OAUTH_SCOPES,
|
|
99
99
|
bearer_methods_supported: ['header'],
|
|
100
100
|
resource_name: 'EmailEngine MCP'
|
|
101
101
|
};
|
|
@@ -128,7 +128,7 @@ async function init(args) {
|
|
|
128
128
|
grant_types_supported: ['authorization_code'],
|
|
129
129
|
code_challenge_methods_supported: ['S256'],
|
|
130
130
|
token_endpoint_auth_methods_supported: ['none'],
|
|
131
|
-
scopes_supported:
|
|
131
|
+
scopes_supported: MCP_OAUTH_SCOPES,
|
|
132
132
|
authorization_response_iss_parameter_supported: true
|
|
133
133
|
};
|
|
134
134
|
},
|
|
@@ -21,7 +21,7 @@ const Boom = require('@hapi/boom');
|
|
|
21
21
|
const settings = require('../settings');
|
|
22
22
|
const { isMcpEnabled, MCP_DISABLED_MESSAGE } = require('../mcp');
|
|
23
23
|
const { processMcpRequest, isAllowedOrigin, acceptsEventStream, rpcError, ERROR_CODES, serverInstructions } = require('../mcp/protocol');
|
|
24
|
-
const { getToolRegistry, callTool, listToolsFor } = require('../mcp/tools');
|
|
24
|
+
const { getToolRegistry, callTool, listToolsFor, catalogSurfaces } = require('../mcp/tools');
|
|
25
25
|
const { listResources, readResource } = require('../mcp/resources');
|
|
26
26
|
const { acceptFilter, openListenStream, canOpenListenStream, MAX_STREAMS_PER_CREDENTIAL } = require('../mcp/listen');
|
|
27
27
|
|
|
@@ -56,18 +56,31 @@ async function init(args) {
|
|
|
56
56
|
|
|
57
57
|
const boundAccount = request.app.mcpBoundAccount;
|
|
58
58
|
|
|
59
|
+
// A credential sees the surface it can actually use, so the agent does not plan
|
|
60
|
+
// around tools that would only ever answer it with a 403: a bound credential loses
|
|
61
|
+
// the instance-wide listings (list_accounts, get_outbox) and the `account` argument
|
|
62
|
+
// of everything else, a token holding one MCP scope loses the other scope's tools,
|
|
63
|
+
// and a permission-narrowed token loses the tools whose grant its record refuses -
|
|
64
|
+
// the same checks the injected inner request would enforce, asked ahead of time.
|
|
65
|
+
// Advertisement only: tools/call still dispatches whatever is asked, and the inner
|
|
66
|
+
// request stays the enforcement.
|
|
67
|
+
//
|
|
68
|
+
// Computed on first use and at most once per request: only tools/list and the
|
|
69
|
+
// discovery methods read the catalog, and only the latter read the instructions, so
|
|
70
|
+
// a tools/call or a ping pays for neither.
|
|
71
|
+
//
|
|
72
|
+
// Auth mode is required and every strategy success path sets artifacts (the token
|
|
73
|
+
// record, or {} for the preauth caller).
|
|
74
|
+
let catalog = null;
|
|
75
|
+
const listTools = () => {
|
|
76
|
+
if (!catalog) {
|
|
77
|
+
catalog = listToolsFor(server, { tokenData: request.auth.artifacts, boundAccount });
|
|
78
|
+
}
|
|
79
|
+
return catalog;
|
|
80
|
+
};
|
|
81
|
+
|
|
59
82
|
const ctx = {
|
|
60
|
-
|
|
61
|
-
// around tools that would only ever answer it with a 403: a bound credential
|
|
62
|
-
// loses the instance-wide listings (list_accounts, get_outbox) and the `account`
|
|
63
|
-
// argument of everything else, and a permission-narrowed token loses the tools
|
|
64
|
-
// whose grant its record refuses - the same check the injected inner request
|
|
65
|
-
// would enforce, asked ahead of time. Advertisement only: tools/call still
|
|
66
|
-
// dispatches whatever is asked, and the inner request stays the enforcement.
|
|
67
|
-
//
|
|
68
|
-
// Auth mode is required and every strategy success path sets artifacts (the token
|
|
69
|
-
// record, or {} for the preauth caller).
|
|
70
|
-
listTools: () => listToolsFor(server, { tokenData: request.auth.artifacts, boundAccount }),
|
|
83
|
+
listTools,
|
|
71
84
|
|
|
72
85
|
callTool: async (name, toolArgs) => {
|
|
73
86
|
const tool = getToolRegistry(server).byName.get(name);
|
|
@@ -82,10 +95,15 @@ async function init(args) {
|
|
|
82
95
|
listResources: () => listResources({ server, request }),
|
|
83
96
|
readResource: uri => readResource({ server, request, uri }),
|
|
84
97
|
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
98
|
+
// Written for this credential: which tool sets it holds, read off the catalog it
|
|
99
|
+
// is advertised rather than off its scopes (a narrowed record can empty a scope
|
|
100
|
+
// out, and the instructions should describe the tools the agent will see), and
|
|
101
|
+
// whether it is bound to one account (in which case the generic opening - call
|
|
102
|
+
// list_accounts, then pass the id - describes a workflow it cannot perform)
|
|
103
|
+
get instructions() {
|
|
104
|
+
const advertised = listTools();
|
|
105
|
+
return serverInstructions({ account: boundAccount, surfaces: catalogSurfaces(server, advertised), hasTools: advertised.length > 0 });
|
|
106
|
+
},
|
|
89
107
|
|
|
90
108
|
acceptsEventStream: acceptsEventStream(request.headers.accept)
|
|
91
109
|
};
|
|
@@ -120,11 +138,11 @@ async function init(args) {
|
|
|
120
138
|
description: 'MCP endpoint',
|
|
121
139
|
notes: ['JSON-RPC endpoint implementing the Model Context Protocol Streamable HTTP transport'],
|
|
122
140
|
|
|
123
|
-
// `external`: no CSRF crumb and no OpenAPI operation.
|
|
124
|
-
// do over MCP whatever they can do over REST, and `mcp`
|
|
125
|
-
//
|
|
126
|
-
// workers/api.js).
|
|
127
|
-
tags: ['external', 'scope:api', 'scope:mcp'],
|
|
141
|
+
// `external`: no CSRF crumb and no OpenAPI operation. Three scopes: `api` tokens can
|
|
142
|
+
// do over MCP whatever they can do over REST, and `mcp` (mail) and `mcp-manage`
|
|
143
|
+
// (instance management) tokens are surface-bound credentials this endpoint admits
|
|
144
|
+
// and plain REST refuses (see the scope check in workers/api.js).
|
|
145
|
+
tags: ['external', 'scope:api', 'scope:mcp', 'scope:mcp-manage'],
|
|
128
146
|
|
|
129
147
|
plugins: {
|
|
130
148
|
mcp: { endpoint: true }
|
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
ENUM_DESCRIPTIONS
|
|
17
17
|
} = require('../schemas');
|
|
18
18
|
const { handleError, throwNotFound, flattenOAuthAppMeta, MASKED } = require('./route-helpers');
|
|
19
|
-
const { ENCRYPTED_APP_KEYS } = require('../consts');
|
|
19
|
+
const { ENCRYPTED_APP_KEYS, MCP_MAX_PAGE_SIZE } = require('../consts');
|
|
20
20
|
const { IMPACT } = require('./operation-impact');
|
|
21
21
|
|
|
22
22
|
// Stored fields that are returned on OAuth2 application objects in addition to the basic fields
|
|
@@ -101,6 +101,13 @@ async function init(args) {
|
|
|
101
101
|
tags: ['api', 'OAuth2 Applications'],
|
|
102
102
|
|
|
103
103
|
plugins: {
|
|
104
|
+
mcp: {
|
|
105
|
+
name: 'list_oauth2_apps',
|
|
106
|
+
title: 'List OAuth2 applications',
|
|
107
|
+
description:
|
|
108
|
+
'List the OAuth2 applications (Gmail, Outlook and other providers) that accounts can sign in through, paged. Client secrets are masked.',
|
|
109
|
+
bounds: { pageSize: MCP_MAX_PAGE_SIZE }
|
|
110
|
+
},
|
|
104
111
|
openapi: {
|
|
105
112
|
responses: apiResponses('Returns a page of OAuth2 applications.', 400, 401, 403, 429, 500)
|
|
106
113
|
}
|
|
@@ -249,6 +256,11 @@ async function init(args) {
|
|
|
249
256
|
tags: ['api', 'OAuth2 Applications'],
|
|
250
257
|
|
|
251
258
|
plugins: {
|
|
259
|
+
mcp: {
|
|
260
|
+
name: 'get_oauth2_app',
|
|
261
|
+
title: 'Get OAuth2 application',
|
|
262
|
+
description: 'Get one OAuth2 application: its provider, client id, scopes, redirect URL and Pub/Sub settings. Client secrets are masked.'
|
|
263
|
+
},
|
|
252
264
|
openapi: {
|
|
253
265
|
responses: apiResponses('Returns the OAuth2 application. Client secrets are masked.', 400, 401, 403, 404, 429, 500)
|
|
254
266
|
}
|
|
@@ -359,6 +371,12 @@ async function init(args) {
|
|
|
359
371
|
tags: ['api', 'OAuth2 Applications'],
|
|
360
372
|
|
|
361
373
|
plugins: {
|
|
374
|
+
mcp: {
|
|
375
|
+
name: 'create_oauth2_app',
|
|
376
|
+
title: 'Create OAuth2 application',
|
|
377
|
+
description:
|
|
378
|
+
'Register an OAuth2 application that accounts can sign in through. Needs the provider and the client credentials created at that provider; a client secret or service key can be written but never read back. Confirm the redirect URL with the user: it is where the provider sends authorization codes and has to match what the provider has on file.'
|
|
379
|
+
},
|
|
362
380
|
openapi: {
|
|
363
381
|
responses: apiResponses('Returns the registered OAuth2 application.', 400, 401, 403, 429, 500)
|
|
364
382
|
}
|
|
@@ -409,6 +427,12 @@ async function init(args) {
|
|
|
409
427
|
tags: ['api', 'OAuth2 Applications'],
|
|
410
428
|
|
|
411
429
|
plugins: {
|
|
430
|
+
mcp: {
|
|
431
|
+
name: 'update_oauth2_app',
|
|
432
|
+
title: 'Update OAuth2 application',
|
|
433
|
+
description:
|
|
434
|
+
'Update an OAuth2 application. Send only the fields to change; a client secret can be replaced but not read back. Changing the redirect URL moves where the provider sends authorization codes, so confirm that with the user.'
|
|
435
|
+
},
|
|
412
436
|
openapi: {
|
|
413
437
|
responses: apiResponses('Returns the updated OAuth2 application.', 400, 401, 403, 404, 429, 500)
|
|
414
438
|
}
|
|
@@ -560,6 +584,12 @@ async function init(args) {
|
|
|
560
584
|
tags: ['api', 'OAuth2 Applications'],
|
|
561
585
|
|
|
562
586
|
plugins: {
|
|
587
|
+
mcp: {
|
|
588
|
+
name: 'delete_oauth2_app',
|
|
589
|
+
title: 'Delete OAuth2 application',
|
|
590
|
+
description:
|
|
591
|
+
'Remove an OAuth2 application. Accounts that signed in through it can no longer refresh their access tokens and stop syncing. Confirm with the user before calling this.'
|
|
592
|
+
},
|
|
563
593
|
openapi: {
|
|
564
594
|
'x-ee-impact': IMPACT.DESTRUCTIVE,
|
|
565
595
|
responses: apiResponses('Returns a deletion marker.', 400, 401, 403, 404, 429, 500)
|
|
@@ -616,6 +646,13 @@ async function init(args) {
|
|
|
616
646
|
tags: ['api', 'OAuth2 Applications'],
|
|
617
647
|
|
|
618
648
|
plugins: {
|
|
649
|
+
mcp: {
|
|
650
|
+
name: 'verify_oauth2_app',
|
|
651
|
+
title: 'Verify OAuth2 application',
|
|
652
|
+
description:
|
|
653
|
+
'Check an OAuth2 application against its provider: the credentials, the Pub/Sub setup where it has one, and optionally the connection of one account that uses it.',
|
|
654
|
+
openWorld: true
|
|
655
|
+
},
|
|
619
656
|
openapi: {
|
|
620
657
|
'x-ee-impact': IMPACT.READONLY,
|
|
621
658
|
responses: apiResponses('Returns the outcome of the credential check against the provider.', 400, 401, 403, 404, 429, 500)
|
|
@@ -162,6 +162,12 @@ async function init(args) {
|
|
|
162
162
|
tags: ['api', 'Outbox'],
|
|
163
163
|
|
|
164
164
|
plugins: {
|
|
165
|
+
mcp: {
|
|
166
|
+
name: 'cancel_queued_message',
|
|
167
|
+
title: 'Cancel queued message',
|
|
168
|
+
description:
|
|
169
|
+
'Cancel a message waiting in the sending queue, by the queue id from get_outbox. A message already handed to the mail server cannot be cancelled.'
|
|
170
|
+
},
|
|
165
171
|
openapi: {
|
|
166
172
|
'x-ee-impact': IMPACT.DESTRUCTIVE,
|
|
167
173
|
responses: apiResponses('Returns a deletion marker. A message already being delivered cannot be removed.', 400, 401, 403, 429, 500)
|