@every-app/sdk 0.3.0-rc.8 → 0.3.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 +75 -74
- package/dist/cloudflare/catalogSettings.generated.d.ts +20 -6
- package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -1
- package/dist/cloudflare/catalogSettings.generated.js +45 -14
- package/dist/cloudflare/index.d.ts +1 -1
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/sentinel.d.ts +3 -0
- package/dist/cloudflare/sentinel.d.ts.map +1 -1
- package/dist/cloudflare/sentinel.js +10 -0
- package/dist/cloudflare/worker.d.ts +67 -23
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/cloudflare/worker.js +68 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/aiDefault.d.ts +36 -79
- package/dist/internal/aiDefault.d.ts.map +1 -1
- package/dist/internal/aiDefault.js +47 -149
- package/dist/internal/aiProviders.d.ts +1 -1
- package/dist/internal/aiProviders.d.ts.map +1 -1
- package/dist/internal/aiProviders.js +2 -2
- package/dist/internal/appSettings.d.ts +140 -89
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +264 -156
- package/dist/internal/capabilities.d.ts +145 -503
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +29 -550
- package/dist/internal/catalog/commerce.js +1 -1
- package/dist/internal/catalog/comms.d.ts +37 -0
- package/dist/internal/catalog/comms.d.ts.map +1 -1
- package/dist/internal/catalog/comms.js +43 -0
- package/dist/internal/catalog/index.d.ts +72 -0
- package/dist/internal/catalog/index.d.ts.map +1 -1
- package/dist/internal/catalog/infra.d.ts +35 -0
- package/dist/internal/catalog/infra.d.ts.map +1 -1
- package/dist/internal/catalog/infra.js +65 -0
- package/dist/internal/devProviders.d.ts +1 -19
- package/dist/internal/devProviders.d.ts.map +1 -1
- package/dist/internal/devProviders.js +7 -1
- package/dist/internal/events.d.ts +52 -1
- package/dist/internal/events.d.ts.map +1 -1
- package/dist/internal/events.js +66 -2
- package/dist/internal/gatewaySettings.d.ts +6 -16
- package/dist/internal/gatewaySettings.d.ts.map +1 -1
- package/dist/internal/gatewaySettings.js +6 -24
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -0
- package/dist/internal/mcpOAuth.d.ts +210 -0
- package/dist/internal/mcpOAuth.d.ts.map +1 -0
- package/dist/internal/mcpOAuth.js +735 -0
- package/dist/internal/oauthClient.d.ts +7 -47
- package/dist/internal/oauthClient.d.ts.map +1 -1
- package/dist/internal/oauthClient.js +1 -115
- package/dist/internal/oauthPresets.d.ts +356 -20
- package/dist/internal/oauthPresets.d.ts.map +1 -1
- package/dist/internal/oauthPresets.js +183 -861
- package/dist/internal/oauthScopes.d.ts +43 -155
- package/dist/internal/oauthScopes.d.ts.map +1 -1
- package/dist/internal/oauthScopes.js +82 -475
- package/dist/internal/oauthSpec.d.ts +28 -71
- package/dist/internal/oauthSpec.d.ts.map +1 -1
- package/dist/internal/oauthSpec.js +172 -448
- package/dist/internal/protocol.d.ts +39 -15
- package/dist/internal/protocol.d.ts.map +1 -1
- package/dist/internal/protocol.js +40 -7
- package/dist/internal/providerApps.d.ts +2 -2
- package/dist/internal/providerApps.js +2 -2
- package/dist/internal/providerRegistry.d.ts +5 -64
- package/dist/internal/providerRegistry.d.ts.map +1 -1
- package/dist/internal/providerRegistry.js +19 -118
- package/dist/internal/providerSpec.d.ts.map +1 -1
- package/dist/internal/providerSpec.js +14 -36
- package/dist/internal/remoteMcp.d.ts +191 -47
- package/dist/internal/remoteMcp.d.ts.map +1 -1
- package/dist/internal/remoteMcp.js +338 -133
- package/dist/internal/signInProviders.d.ts +1 -1
- package/dist/internal/signInProviders.d.ts.map +1 -1
- package/dist/internal/tools.d.ts +15 -8
- package/dist/internal/tools.d.ts.map +1 -1
- package/dist/internal/tools.js +9 -8
- package/dist/manifest.d.ts +96 -28
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +1 -1
- package/dist/server/ai.d.ts +1 -93
- package/dist/server/ai.d.ts.map +1 -1
- package/dist/server/ai.js +17 -111
- package/dist/server/attribution.d.ts +10 -1
- package/dist/server/attribution.d.ts.map +1 -1
- package/dist/server/attribution.js +7 -1
- package/dist/server/connectUrl.d.ts +4 -9
- package/dist/server/connectUrl.d.ts.map +1 -1
- package/dist/server/connectUrl.js +17 -14
- package/dist/server/context.d.ts +12 -14
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/context.js +23 -25
- package/dist/server/emit.d.ts.map +1 -1
- package/dist/server/emit.js +2 -2
- package/dist/server/env.d.ts +3 -0
- package/dist/server/env.d.ts.map +1 -1
- package/dist/server/eventsEndpoint.d.ts +48 -0
- package/dist/server/eventsEndpoint.d.ts.map +1 -0
- package/dist/server/eventsEndpoint.js +145 -0
- package/dist/server/everyApp.d.ts +16 -26
- package/dist/server/everyApp.d.ts.map +1 -1
- package/dist/server/everyApp.js +22 -46
- package/dist/server/gatewayFetch.d.ts +19 -1
- package/dist/server/gatewayFetch.d.ts.map +1 -1
- package/dist/server/gatewayFetch.js +45 -3
- package/dist/server/index.d.ts +6 -9
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +4 -8
- package/dist/server/integrationFetch.d.ts +60 -72
- package/dist/server/integrationFetch.d.ts.map +1 -1
- package/dist/server/integrationFetch.js +124 -397
- package/dist/server/listMembers.d.ts.map +1 -1
- package/dist/server/listMembers.js +2 -2
- package/dist/server/refusal.d.ts +0 -9
- package/dist/server/refusal.d.ts.map +1 -1
- package/dist/server/refusal.js +0 -22
- package/dist/server/sendEmail.d.ts.map +1 -1
- package/dist/server/sendEmail.js +2 -2
- package/dist/server/tools.d.ts +17 -6
- package/dist/server/tools.d.ts.map +1 -1
- package/dist/server/tools.js +14 -4
- package/dist/server/toolsEndpoint.d.ts +2 -1
- package/dist/server/toolsEndpoint.d.ts.map +1 -1
- package/dist/server/toolsEndpoint.js +4 -3
- package/dist/server/webhooks.d.ts +56 -0
- package/dist/server/webhooks.d.ts.map +1 -0
- package/dist/server/webhooks.js +205 -0
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2 -6
- package/package.json +6 -1
- package/dist/server/aiBinding.d.ts +0 -68
- package/dist/server/aiBinding.d.ts.map +0 -1
- package/dist/server/aiBinding.js +0 -294
- package/dist/server/authorizeUrl.d.ts +0 -43
- package/dist/server/authorizeUrl.d.ts.map +0 -1
- package/dist/server/authorizeUrl.js +0 -106
- package/dist/server/emailBinding.d.ts +0 -72
- package/dist/server/emailBinding.d.ts.map +0 -1
- package/dist/server/emailBinding.js +0 -124
- package/dist/server/fromMcpTools.d.ts +0 -89
- package/dist/server/fromMcpTools.d.ts.map +0 -1
- package/dist/server/fromMcpTools.js +0 -192
|
@@ -16,18 +16,15 @@
|
|
|
16
16
|
* proxy's rules: inference routes only, the model allowlist, the usage
|
|
17
17
|
* tap. Never a capability: its key would reach the account's credits
|
|
18
18
|
* and keys on the same host.
|
|
19
|
-
* - `oauth_client`:
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the
|
|
25
|
-
*
|
|
26
|
-
* (./
|
|
27
|
-
*
|
|
28
|
-
* lists in its manifest entry's `scopes`, which ./oauthScopes.ts turns
|
|
29
|
-
* into what the app may ask the provider for and what a token it is
|
|
30
|
-
* handed may carry.
|
|
19
|
+
* - `oauth_client`: an OAuth provider whose client the gateway holds and
|
|
20
|
+
* whose flow it runs. None is in the catalog: each is a registered row,
|
|
21
|
+
* written from a preset (./oauthPresets.ts: Google, Microsoft, Slack,
|
|
22
|
+
* GitHub and the rest) or an operator's spec. A person connects in an app,
|
|
23
|
+
* for exactly the provider scopes the app's manifest entry lists
|
|
24
|
+
* (`scopes`); the gateway keeps the tokens and puts the person's token
|
|
25
|
+
* on the app's calls to the provider's `api` hosts. Each provider is a
|
|
26
|
+
* spec (./oauthSpec.ts), its differences data; ./oauthScopes.ts holds
|
|
27
|
+
* the one set of scope rules.
|
|
31
28
|
* - `service`: something the gateway does itself, with no upstream host
|
|
32
29
|
* an app names (sending email, listing the organization's members). An
|
|
33
30
|
* app lists it the same way and calls its routes,
|
|
@@ -168,7 +165,7 @@ export interface ApiKeyCapability extends ProviderDetails {
|
|
|
168
165
|
auth: ApiKeyAuth;
|
|
169
166
|
/** Where an operator gets the key: the provider's API access page. */
|
|
170
167
|
docs: string;
|
|
171
|
-
/**
|
|
168
|
+
/** Its setup guide, relative to the agent docs (`setup/dataforseo.md`: https://everyapp.com/docs/agent/setup/dataforseo.md); a row has none. */
|
|
172
169
|
setup?: string;
|
|
173
170
|
/** The only hosts the key is ever sent to, always over https; may be empty when `hostSetting` names the host. */
|
|
174
171
|
hosts: readonly string[];
|
|
@@ -205,9 +202,9 @@ export interface ApiKeyCapability extends ProviderDetails {
|
|
|
205
202
|
* An AI provider (OpenAI, OpenRouter, Workers AI): the AI proxy's table as
|
|
206
203
|
* a catalog entry. The app's path is joined onto `origin` and `basePath`
|
|
207
204
|
* (with `{SETTING}` placeholders filled from the Gateway's settings, each
|
|
208
|
-
* URL-encoded) and must be one of `inferenceRoutes` (a POST), unless
|
|
209
|
-
*
|
|
210
|
-
*
|
|
205
|
+
* URL-encoded) and must be one of `inferenceRoutes` (a POST), unless the
|
|
206
|
+
* app's manifest (`ai.routes`) allows more on an entry that takes more
|
|
207
|
+
* (`extraRoutes`). `unstoredRoutes` get `store: false`.
|
|
211
208
|
* `normalize` names the one response rewrite the gateway has.
|
|
212
209
|
*/
|
|
213
210
|
export interface AiProviderCapability extends ProviderDetails {
|
|
@@ -231,6 +228,7 @@ export interface AiProviderCapability extends ProviderDetails {
|
|
|
231
228
|
basePath?: string;
|
|
232
229
|
inferenceRoutes: readonly string[];
|
|
233
230
|
unstoredRoutes?: readonly string[];
|
|
231
|
+
/** Paths beyond inference an app may name in its manifest's `ai.routes`: OpenAI only. */
|
|
234
232
|
extraRoutes?: boolean;
|
|
235
233
|
normalize?: "workers-ai";
|
|
236
234
|
/**
|
|
@@ -288,11 +286,11 @@ export interface AiRoute {
|
|
|
288
286
|
/** One of the entry's `inferenceRoutes`: `/api/v1/chat/completions`. */
|
|
289
287
|
path: string;
|
|
290
288
|
/**
|
|
291
|
-
* The seed: the model the Gateway fills in when
|
|
292
|
-
*
|
|
293
|
-
* cheap, capable one of the provider's.
|
|
294
|
-
*
|
|
295
|
-
*
|
|
289
|
+
* The seed: the model the Gateway fills in when the workspace's default
|
|
290
|
+
* names this provider without a model (or the order picked it), a
|
|
291
|
+
* cheap, capable one of the provider's. Read it through
|
|
292
|
+
* `resolveAiDefault` (./aiDefault.ts), which puts the setting's model
|
|
293
|
+
* first.
|
|
296
294
|
*/
|
|
297
295
|
seedModel: string;
|
|
298
296
|
}
|
|
@@ -314,108 +312,13 @@ export interface GatewayServiceCapability {
|
|
|
314
312
|
settings: readonly string[];
|
|
315
313
|
/** Settings it reads when set (another transport), ready or not. */
|
|
316
314
|
optionalSettings: readonly string[];
|
|
317
|
-
/** The
|
|
315
|
+
/** The setup guide in the agent docs, when there is anything to set up. */
|
|
318
316
|
setup?: string;
|
|
319
317
|
}
|
|
320
|
-
/** Where the
|
|
318
|
+
/** Where the Gateway puts its OAuth client on a token request: the form body or HTTP Basic. */
|
|
321
319
|
export type OAuthClientInjection = "form" | "basic";
|
|
322
|
-
/**
|
|
323
|
-
export
|
|
324
|
-
/** The endpoint's host, always over https. */
|
|
325
|
-
host: string;
|
|
326
|
-
/** The exact pathname. */
|
|
327
|
-
path: string;
|
|
328
|
-
methods: readonly ("GET" | "POST")[];
|
|
329
|
-
/**
|
|
330
|
-
* Where the client goes: the form body or HTTP Basic
|
|
331
|
-
* (injectClientCredentials() in ./oauthClient.ts).
|
|
332
|
-
*/
|
|
333
|
-
inject: OAuthClientInjection;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* One host's allowlist a scope set unlocks. Matched against the raw
|
|
337
|
-
* pathname, case preserved, by `scopeRouteAllows()` in ./oauthScopes.ts:
|
|
338
|
-
* the proxy boundary once the gateway holds tokens, tested data until then.
|
|
339
|
-
*/
|
|
340
|
-
export interface OAuthScopeRoute {
|
|
341
|
-
/** A bare https host, one of the capability's `api` hosts. */
|
|
342
|
-
host: string;
|
|
343
|
-
/**
|
|
344
|
-
* Raw-path entries: exact, or a prefix when the entry ends in `/`. GET
|
|
345
|
-
* and HEAD go through when one matches.
|
|
346
|
-
*/
|
|
347
|
-
paths: readonly string[];
|
|
348
|
-
/**
|
|
349
|
-
* The read-shaped POSTs a read set allows (queries, watches): anchored,
|
|
350
|
-
* flagless RegExps over the raw pathname. Every other POST is refused.
|
|
351
|
-
*/
|
|
352
|
-
posts?: readonly RegExp[];
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* A named bundle an app lists under `scopes`: what it asks the provider for
|
|
356
|
-
* and what that unlocks.
|
|
357
|
-
*/
|
|
358
|
-
export interface OAuthScopeSet {
|
|
359
|
-
/** What Admin → Apps and a consent page call it: "Gmail (read-only)". */
|
|
360
|
-
label: string;
|
|
361
|
-
/**
|
|
362
|
-
* A read set unlocks GET, HEAD and its `posts` only. No write set exists
|
|
363
|
-
* on the shared clients yet; adding one is a reviewed registry change.
|
|
364
|
-
*/
|
|
365
|
-
access: CapabilityAccess;
|
|
366
|
-
/** The provider's scope strings, requested verbatim (Slack: bot scopes). */
|
|
367
|
-
scopes: readonly string[];
|
|
368
|
-
/** Slack's `user_scope` strings, issued to the installing person's own token; absent elsewhere. */
|
|
369
|
-
userScopes?: readonly string[];
|
|
370
|
-
routes: readonly OAuthScopeRoute[];
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* How a provider spells granted scopes in its token response; each has a
|
|
374
|
-
* parser in ./oauthScopes.ts. `space` and `comma` are the plain spellings
|
|
375
|
-
* a registered provider names (`scopeDialect`): a token response without
|
|
376
|
-
* a `scope` field is taken as granted-as-requested (RFC 6749 §5.1).
|
|
377
|
-
*/
|
|
378
|
-
export type OAuthScopeDialect = "google" | "microsoft" | "slack" | "space" | "comma";
|
|
379
|
-
/**
|
|
380
|
-
* Everything the gateway needs to hold an app to its scope sets at the
|
|
381
|
-
* token endpoint. Present means an app's entry must list `scopes` and the
|
|
382
|
-
* gateway refuses tokens outside them. Data only: the dialect selects the
|
|
383
|
-
* parser, so the registry stays a table.
|
|
384
|
-
*/
|
|
385
|
-
export interface OAuthScopePolicy {
|
|
386
|
-
sets: Readonly<Record<string, OAuthScopeSet>>;
|
|
387
|
-
/**
|
|
388
|
-
* Scopes a token may carry beyond the declared sets without refusal:
|
|
389
|
-
* identity and refresh scopes, in every spelling the provider uses.
|
|
390
|
-
* Never a data scope.
|
|
391
|
-
*/
|
|
392
|
-
tolerated: readonly string[];
|
|
393
|
-
/**
|
|
394
|
-
* Scopes every declaring app asks for whatever its sets, on the authorize
|
|
395
|
-
* URL and Microsoft's token leg (`offline_access`). Always tolerated.
|
|
396
|
-
*/
|
|
397
|
-
alwaysRequested: readonly string[];
|
|
398
|
-
dialect: OAuthScopeDialect;
|
|
399
|
-
/**
|
|
400
|
-
* The `tokenGrantType()` values the gateway completes through this
|
|
401
|
-
* client. `null` is a code exchange that carries no `grant_type` (Slack's
|
|
402
|
-
* oauth.v2.access).
|
|
403
|
-
*/
|
|
404
|
-
grantTypes: readonly (string | null)[];
|
|
405
|
-
/**
|
|
406
|
-
* What becomes of the token request's `scope` once it passes the check:
|
|
407
|
-
* `replace` it with the app's requested list (Microsoft's token-leg
|
|
408
|
-
* extension, which keeps a token to one resource), `drop` it (Google
|
|
409
|
-
* documents no `scope` on either token leg), or `keep` it (Slack).
|
|
410
|
-
*/
|
|
411
|
-
requestScope: "replace" | "drop" | "keep";
|
|
412
|
-
/**
|
|
413
|
-
* Decoded path segments no set unlocks on any host, compared
|
|
414
|
-
* case-insensitively: batch tunnels that carry other requests inside, and
|
|
415
|
-
* resources that reveal secrets under a read scope.
|
|
416
|
-
*/
|
|
417
|
-
deniedSegments: readonly string[];
|
|
418
|
-
}
|
|
320
|
+
/** How a provider separates scopes in its `scope` parameter and its token answer. */
|
|
321
|
+
export type OAuthScopeSeparator = "space" | "comma";
|
|
419
322
|
/** How a provider names the account a new connection is for, read once after the exchange. */
|
|
420
323
|
export interface OAuthIdentity {
|
|
421
324
|
/** An https URL on one of the provider's `api` hosts, GET with the new token. */
|
|
@@ -426,94 +329,84 @@ export interface OAuthIdentity {
|
|
|
426
329
|
id?: string;
|
|
427
330
|
}
|
|
428
331
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* registered row's `auth` (`kind: "oauth2-user"`). Absent: the entry
|
|
433
|
-
* keeps the app-driven flow only (the social networks).
|
|
332
|
+
* The provider's authorization-code flow as data, from its spec
|
|
333
|
+
* (./oauthSpec.ts): everything that differs between providers. The
|
|
334
|
+
* Gateway runs it; an app never sees a token or the client.
|
|
434
335
|
*/
|
|
435
336
|
export interface OAuthFlow {
|
|
337
|
+
/** Where the browser goes to consent (https). */
|
|
338
|
+
authorizeUrl: string;
|
|
436
339
|
/** The token endpoint the Gateway posts the code and refresh token to (https). */
|
|
437
340
|
tokenUrl: string;
|
|
438
341
|
/** Where a disconnect revokes the token; absent means the tokens die at their expiry. */
|
|
439
342
|
revokeUrl?: string;
|
|
440
343
|
/** The revoke call's method (default POST). */
|
|
441
344
|
revokeMethod?: "POST" | "DELETE";
|
|
442
|
-
/**
|
|
345
|
+
/** Where the client goes on the token request. */
|
|
346
|
+
inject: OAuthClientInjection;
|
|
347
|
+
/** Whether the authorize request carries a PKCE S256 challenge. */
|
|
443
348
|
pkce: boolean;
|
|
444
|
-
|
|
445
|
-
|
|
349
|
+
scopeSeparator: OAuthScopeSeparator;
|
|
350
|
+
/**
|
|
351
|
+
* Joined onto an app's short scope (`gmail.modify`) for the authorize
|
|
352
|
+
* URL, and taken off a granted one for comparison: Google's
|
|
353
|
+
* `https://www.googleapis.com/auth/`. Absent: scopes as written.
|
|
354
|
+
*/
|
|
355
|
+
scopePrefix?: string;
|
|
446
356
|
/** Extra query on the authorize URL (Google's `access_type=offline`). */
|
|
447
357
|
authorizeParams?: Readonly<Record<string, string>>;
|
|
448
358
|
/** Extra headers on the token request (GitHub's `Accept: application/json`). */
|
|
449
359
|
tokenHeaders?: Readonly<Record<string, string>>;
|
|
450
360
|
identity?: OAuthIdentity;
|
|
361
|
+
/**
|
|
362
|
+
* Scopes the Gateway adds to every connect, whatever the app lists: what
|
|
363
|
+
* the identity URL needs, and a refresh token's (Microsoft's
|
|
364
|
+
* `offline_access`). Tolerated at mint; apps never list them.
|
|
365
|
+
*/
|
|
366
|
+
identityScopes: readonly string[];
|
|
367
|
+
/** Scopes a token may carry beyond what was asked without refusal (another spelling of an identity scope). Never a data scope. */
|
|
368
|
+
tolerated: readonly string[];
|
|
369
|
+
/**
|
|
370
|
+
* The resource the tokens are for (RFC 8707), an https URL: sent as
|
|
371
|
+
* `resource` on the authorize URL, the code exchange and every refresh.
|
|
372
|
+
* An MCP server's row carries its URL here (./mcpOAuth.ts).
|
|
373
|
+
*/
|
|
374
|
+
resource?: string;
|
|
375
|
+
/**
|
|
376
|
+
* The authorization server's issuer (RFC 8414), an https URL: when the
|
|
377
|
+
* callback carries `iss` it must equal this (RFC 9207, the mix-up
|
|
378
|
+
* defense).
|
|
379
|
+
*/
|
|
380
|
+
issuer?: string;
|
|
451
381
|
}
|
|
452
382
|
/**
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
383
|
+
* An OAuth provider the Gateway holds a client for and runs the flow for
|
|
384
|
+
* (docs/design/2026-11-oauth-simplify.md). A person connects in an app;
|
|
385
|
+
* the connection is theirs and that app's, for exactly the scopes the
|
|
386
|
+
* app's `everyapp.config.ts` lists, and the app calls the provider's
|
|
387
|
+
* `api` hosts through the Gateway, which puts the token on.
|
|
457
388
|
*/
|
|
458
389
|
export interface OAuthClientCapability {
|
|
459
390
|
mode: "oauth_client";
|
|
460
|
-
/** The provider's name in errors and logs. */
|
|
391
|
+
/** The provider's name in errors, pages and logs. */
|
|
461
392
|
label: string;
|
|
462
|
-
/** Gateway
|
|
393
|
+
/** Gateway setting names. No `clientSecret`: a public client, the id alone. */
|
|
463
394
|
secrets: {
|
|
464
395
|
clientId: string;
|
|
465
396
|
clientSecret?: string;
|
|
466
397
|
};
|
|
467
|
-
/**
|
|
468
|
-
token: readonly OAuthTokenEndpoint[];
|
|
469
|
-
/**
|
|
470
|
-
* Obtaining and refreshing user tokens with the operator's client
|
|
471
|
-
* writes, so a catalog client is `["write"]`. A registered OAuth
|
|
472
|
-
* provider says what the proxy may do with the held token: read, write
|
|
473
|
-
* or both (docs/design/2026-10-oauth-providers.md section 7).
|
|
474
|
-
*/
|
|
475
|
-
access: readonly CapabilityAccess[];
|
|
476
|
-
/** Where the operator registers the client. */
|
|
398
|
+
/** Where the operator registers the client (the spec's `docs`). */
|
|
477
399
|
console: string;
|
|
478
|
-
/** The
|
|
479
|
-
setup?: string;
|
|
480
|
-
/**
|
|
481
|
-
* The authorize endpoint the app sends people to and the scopes the
|
|
482
|
-
* client must be allowed: the operator's checklist and the docs. With
|
|
483
|
-
* a `scopePolicy`, the union of its sets' scopes and `alwaysRequested`.
|
|
484
|
-
*/
|
|
485
|
-
authorize: {
|
|
486
|
-
url: string;
|
|
487
|
-
scopes: readonly string[];
|
|
488
|
-
};
|
|
489
|
-
/**
|
|
490
|
-
* Named scope sets an app lists in its manifest entry's `scopes`, for a
|
|
491
|
-
* client several apps share with different needs. Absent: the whole
|
|
492
|
-
* client is the grant.
|
|
493
|
-
*/
|
|
494
|
-
scopePolicy?: OAuthScopePolicy;
|
|
495
|
-
/**
|
|
496
|
-
* Hosts the app calls afterwards with the user's token; the Gateway's
|
|
497
|
-
* held-token branch forwards to these alone, and a scope policy's
|
|
498
|
-
* routes are on them.
|
|
499
|
-
*/
|
|
400
|
+
/** The only hosts the held token is ever sent to, over https. */
|
|
500
401
|
api: readonly string[];
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
/** A registered OAuth provider's spec fields (a catalog client has `setup` instead). */
|
|
402
|
+
flow: OAuthFlow;
|
|
403
|
+
/** What it is for, in one line. */
|
|
504
404
|
description?: string;
|
|
505
405
|
/** The API reference (a spec's `api`), optional. */
|
|
506
406
|
reference?: string;
|
|
507
407
|
hint?: string;
|
|
508
408
|
example?: string;
|
|
509
409
|
tags?: readonly string[];
|
|
510
|
-
/**
|
|
511
|
-
* A registered OAuth provider's methods: what a read grant may use
|
|
512
|
-
* (default GET and HEAD) and what a write grant adds (default the
|
|
513
|
-
* API-key default). A catalog client leaves both unset.
|
|
514
|
-
*/
|
|
515
|
-
readMethods?: readonly string[];
|
|
516
|
-
writeMethods?: readonly string[];
|
|
517
410
|
}
|
|
518
411
|
export type Capability = ApiKeyCapability | AiProviderCapability | OAuthClientCapability | GatewayServiceCapability;
|
|
519
412
|
export declare const CAPABILITIES: {
|
|
@@ -1724,6 +1617,41 @@ export declare const CAPABILITIES: {
|
|
|
1724
1617
|
};
|
|
1725
1618
|
readonly tags: readonly ["weather", "forecast"];
|
|
1726
1619
|
};
|
|
1620
|
+
readonly daytona: {
|
|
1621
|
+
readonly mode: "api_key";
|
|
1622
|
+
readonly label: "Daytona";
|
|
1623
|
+
readonly description: "Sandboxes for running code: create, start, stop, archive and delete sandboxes, and manage their snapshots and volumes.";
|
|
1624
|
+
readonly auth: {
|
|
1625
|
+
readonly kind: "bearer";
|
|
1626
|
+
readonly secret: "DAYTONA_API_KEY";
|
|
1627
|
+
};
|
|
1628
|
+
readonly docs: "https://www.daytona.io/docs/en/api-keys/";
|
|
1629
|
+
readonly api: "https://www.daytona.io/docs/en/tools/api/";
|
|
1630
|
+
readonly hosts: readonly ["app.daytona.io"];
|
|
1631
|
+
readonly data: "account";
|
|
1632
|
+
readonly access: readonly ["read", "write"];
|
|
1633
|
+
readonly readMethods: readonly ["GET", "HEAD"];
|
|
1634
|
+
readonly writeMethods: readonly ["POST", "PUT", "PATCH", "DELETE"];
|
|
1635
|
+
readonly accountWidePaths: readonly [readonly ["organizations"], readonly ["organization"], readonly ["billing"], readonly ["api-keys"], readonly ["users"], readonly ["audit"], readonly ["webhooks"], readonly ["secret"], readonly ["docker-registry"], readonly ["object-storage"], readonly ["regions"], readonly ["runners"], readonly ["for-runner"], readonly ["jobs"], readonly ["warm-pools"], readonly ["preview"], readonly ["ssh-access", "validate"]];
|
|
1636
|
+
readonly hint: "An API key from the Daytona dashboard's Keys page, with only the permissions the apps need; the Gateway sends it as a bearer token to app.daytona.io. Any key of an organization reaches every running sandbox in it, so give the Gateway a Daytona organization of its own.";
|
|
1637
|
+
readonly secrets: readonly [{
|
|
1638
|
+
readonly name: "DAYTONA_API_KEY";
|
|
1639
|
+
readonly hint: "An API key from the Daytona dashboard's Keys page: write:sandboxes and delete:sandboxes (and the snapshot or volume ones) only if an app needs them, and never manage:api_keys, manage:secrets, manage:billing or the region and runner permissions.";
|
|
1640
|
+
}];
|
|
1641
|
+
readonly smoke: {
|
|
1642
|
+
readonly method: "GET";
|
|
1643
|
+
readonly path: "/api/sandbox";
|
|
1644
|
+
readonly expect: readonly [200];
|
|
1645
|
+
readonly free: true;
|
|
1646
|
+
readonly note: "Lists the organization's sandboxes; any key may read them.";
|
|
1647
|
+
};
|
|
1648
|
+
readonly example: "start a sandbox from my snapshot and stop it when the run is done";
|
|
1649
|
+
readonly verified: {
|
|
1650
|
+
readonly on: "2026-11-01";
|
|
1651
|
+
readonly how: "docs";
|
|
1652
|
+
};
|
|
1653
|
+
readonly tags: readonly ["sandbox", "compute", "hosting"];
|
|
1654
|
+
};
|
|
1727
1655
|
readonly postmark: {
|
|
1728
1656
|
readonly mode: "api_key";
|
|
1729
1657
|
readonly label: "Postmark";
|
|
@@ -1911,6 +1839,43 @@ export declare const CAPABILITIES: {
|
|
|
1911
1839
|
};
|
|
1912
1840
|
readonly tags: readonly ["support", "chat", "messaging"];
|
|
1913
1841
|
};
|
|
1842
|
+
readonly granola: {
|
|
1843
|
+
readonly mode: "api_key";
|
|
1844
|
+
readonly label: "Granola";
|
|
1845
|
+
readonly description: "Meeting notes: list, search and read notes with their AI summaries, transcripts, folders and spaces.";
|
|
1846
|
+
readonly auth: {
|
|
1847
|
+
readonly kind: "bearer";
|
|
1848
|
+
readonly secret: "GRANOLA_API_KEY";
|
|
1849
|
+
};
|
|
1850
|
+
readonly docs: "https://docs.granola.ai/help-center/sharing/integrations/granola-api";
|
|
1851
|
+
readonly api: "https://docs.granola.ai/introduction";
|
|
1852
|
+
readonly hosts: readonly ["public-api.granola.ai"];
|
|
1853
|
+
readonly data: "account";
|
|
1854
|
+
readonly access: readonly ["read"];
|
|
1855
|
+
readonly readMethods: readonly ["GET", "POST"];
|
|
1856
|
+
readonly accountWidePaths: readonly [readonly ["audit"], readonly ["webhook-endpoints"], readonly ["legal-holds"]];
|
|
1857
|
+
readonly hint: "An API key (grn_...) from the Granola desktop app's Settings > Connectors > API keys, on a Business or Enterprise plan; the Gateway sends it as a bearer token. It reads only the notes its scopes allow.";
|
|
1858
|
+
readonly secrets: readonly [{
|
|
1859
|
+
readonly name: "GRANOLA_API_KEY";
|
|
1860
|
+
readonly hint: "A personal or workspace API key (grn_...), with only the note scopes the apps need.";
|
|
1861
|
+
}];
|
|
1862
|
+
readonly rate: {
|
|
1863
|
+
readonly perSecond: 5;
|
|
1864
|
+
readonly note: "Bursts of 25 requests in 5 seconds; per user or per workspace, by the key's scope.";
|
|
1865
|
+
};
|
|
1866
|
+
readonly smoke: {
|
|
1867
|
+
readonly method: "GET";
|
|
1868
|
+
readonly path: "/v1/notes?page_size=1";
|
|
1869
|
+
readonly expect: readonly [200];
|
|
1870
|
+
readonly free: true;
|
|
1871
|
+
};
|
|
1872
|
+
readonly example: "summarize what we decided in this week's customer calls";
|
|
1873
|
+
readonly verified: {
|
|
1874
|
+
readonly on: "2026-10-30";
|
|
1875
|
+
readonly how: "docs";
|
|
1876
|
+
};
|
|
1877
|
+
readonly tags: readonly ["meetings", "notes", "transcripts"];
|
|
1878
|
+
};
|
|
1914
1879
|
readonly linear: {
|
|
1915
1880
|
readonly mode: "api_key";
|
|
1916
1881
|
readonly label: "Linear";
|
|
@@ -2665,305 +2630,6 @@ export declare const CAPABILITIES: {
|
|
|
2665
2630
|
readonly settings: readonly [];
|
|
2666
2631
|
readonly optionalSettings: readonly [];
|
|
2667
2632
|
};
|
|
2668
|
-
readonly slack: {
|
|
2669
|
-
readonly mode: "oauth_client";
|
|
2670
|
-
readonly label: "Slack";
|
|
2671
|
-
readonly secrets: {
|
|
2672
|
-
readonly clientId: "SLACK_CLIENT_ID";
|
|
2673
|
-
readonly clientSecret: "SLACK_CLIENT_SECRET";
|
|
2674
|
-
};
|
|
2675
|
-
readonly token: readonly [{
|
|
2676
|
-
readonly host: "slack.com";
|
|
2677
|
-
readonly path: "/api/oauth.v2.access";
|
|
2678
|
-
readonly methods: readonly ["POST"];
|
|
2679
|
-
readonly inject: "form";
|
|
2680
|
-
}];
|
|
2681
|
-
readonly access: readonly ["write"];
|
|
2682
|
-
readonly console: "https://api.slack.com/apps";
|
|
2683
|
-
readonly setup: "setup/slack.md";
|
|
2684
|
-
readonly authorize: {
|
|
2685
|
-
readonly url: "https://slack.com/oauth/v2/authorize";
|
|
2686
|
-
readonly scopes: readonly ["channels:read", "groups:read", "users:read", "users:read.email", "chat:write", "chat:write.public", "chat:write.customize", "channels:join", "channels:manage", "groups:write", "channels:write.invites", "groups:write.invites", "im:write", "files:write", "channels:write"];
|
|
2687
|
-
};
|
|
2688
|
-
readonly scopePolicy: {
|
|
2689
|
-
readonly dialect: "slack";
|
|
2690
|
-
readonly grantTypes: readonly [null, "refresh_token"];
|
|
2691
|
-
readonly requestScope: "keep";
|
|
2692
|
-
readonly alwaysRequested: readonly [];
|
|
2693
|
-
readonly tolerated: readonly [];
|
|
2694
|
-
readonly deniedSegments: readonly [];
|
|
2695
|
-
readonly sets: {
|
|
2696
|
-
readonly "channels.read": {
|
|
2697
|
-
readonly label: "Channels (read-only)";
|
|
2698
|
-
readonly access: "read";
|
|
2699
|
-
readonly scopes: readonly ["channels:read", "groups:read"];
|
|
2700
|
-
readonly routes: readonly [{
|
|
2701
|
-
readonly host: "slack.com";
|
|
2702
|
-
readonly paths: readonly ["/api/conversations.list", "/api/conversations.info", "/api/conversations.members", "/api/users.conversations"];
|
|
2703
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2704
|
-
}];
|
|
2705
|
-
};
|
|
2706
|
-
readonly "users.read": {
|
|
2707
|
-
readonly label: "Members (read-only)";
|
|
2708
|
-
readonly access: "read";
|
|
2709
|
-
readonly scopes: readonly ["users:read"];
|
|
2710
|
-
readonly routes: readonly [{
|
|
2711
|
-
readonly host: "slack.com";
|
|
2712
|
-
readonly paths: readonly ["/api/users.list", "/api/users.info", "/api/users.getPresence", "/api/bots.info"];
|
|
2713
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2714
|
-
}];
|
|
2715
|
-
};
|
|
2716
|
-
readonly "users.email": {
|
|
2717
|
-
readonly label: "Members' email addresses (read-only)";
|
|
2718
|
-
readonly access: "read";
|
|
2719
|
-
readonly scopes: readonly ["users:read.email"];
|
|
2720
|
-
readonly routes: readonly [{
|
|
2721
|
-
readonly host: "slack.com";
|
|
2722
|
-
readonly paths: readonly ["/api/users.lookupByEmail"];
|
|
2723
|
-
readonly posts: readonly [RegExp];
|
|
2724
|
-
}];
|
|
2725
|
-
};
|
|
2726
|
-
readonly "messages.write": {
|
|
2727
|
-
readonly label: "Messages (post as the app)";
|
|
2728
|
-
readonly access: "write";
|
|
2729
|
-
readonly scopes: readonly ["chat:write", "chat:write.public", "chat:write.customize"];
|
|
2730
|
-
readonly routes: readonly [{
|
|
2731
|
-
readonly host: "slack.com";
|
|
2732
|
-
readonly paths: readonly ["/api/chat.scheduledMessages.list"];
|
|
2733
|
-
readonly posts: readonly [RegExp];
|
|
2734
|
-
}];
|
|
2735
|
-
};
|
|
2736
|
-
readonly "channels.join": {
|
|
2737
|
-
readonly label: "Channels (join public ones)";
|
|
2738
|
-
readonly access: "write";
|
|
2739
|
-
readonly scopes: readonly ["channels:join"];
|
|
2740
|
-
readonly routes: readonly [{
|
|
2741
|
-
readonly host: "slack.com";
|
|
2742
|
-
readonly paths: readonly [];
|
|
2743
|
-
readonly posts: readonly [RegExp];
|
|
2744
|
-
}];
|
|
2745
|
-
};
|
|
2746
|
-
readonly "channels.manage": {
|
|
2747
|
-
readonly label: "Channels (create, manage and invite to; open DMs)";
|
|
2748
|
-
readonly access: "write";
|
|
2749
|
-
readonly scopes: readonly ["channels:manage", "groups:write", "channels:write.invites", "groups:write.invites", "im:write"];
|
|
2750
|
-
readonly routes: readonly [{
|
|
2751
|
-
readonly host: "slack.com";
|
|
2752
|
-
readonly paths: readonly [];
|
|
2753
|
-
readonly posts: readonly [RegExp];
|
|
2754
|
-
}];
|
|
2755
|
-
};
|
|
2756
|
-
readonly "files.write": {
|
|
2757
|
-
readonly label: "Files (upload)";
|
|
2758
|
-
readonly access: "write";
|
|
2759
|
-
readonly scopes: readonly ["files:write"];
|
|
2760
|
-
readonly routes: readonly [{
|
|
2761
|
-
readonly host: "slack.com";
|
|
2762
|
-
readonly paths: readonly [];
|
|
2763
|
-
readonly posts: readonly [RegExp];
|
|
2764
|
-
}];
|
|
2765
|
-
};
|
|
2766
|
-
readonly "user-channels.manage": {
|
|
2767
|
-
readonly label: "Channels (as the installing person: read, manage, invite to)";
|
|
2768
|
-
readonly access: "write";
|
|
2769
|
-
readonly scopes: readonly [];
|
|
2770
|
-
readonly userScopes: readonly ["channels:read", "channels:write", "groups:read", "groups:write"];
|
|
2771
|
-
readonly routes: readonly [{
|
|
2772
|
-
readonly host: "slack.com";
|
|
2773
|
-
readonly paths: readonly ["/api/conversations.list", "/api/conversations.info", "/api/conversations.members", "/api/users.conversations"];
|
|
2774
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2775
|
-
}];
|
|
2776
|
-
};
|
|
2777
|
-
};
|
|
2778
|
-
};
|
|
2779
|
-
readonly api: readonly ["slack.com"];
|
|
2780
|
-
readonly flow: {
|
|
2781
|
-
readonly tokenUrl: "https://slack.com/api/oauth.v2.access";
|
|
2782
|
-
readonly revokeUrl: "https://slack.com/api/auth.revoke";
|
|
2783
|
-
readonly pkce: false;
|
|
2784
|
-
readonly scopeDialect: "slack";
|
|
2785
|
-
readonly identity: {
|
|
2786
|
-
readonly url: "https://slack.com/api/auth.test";
|
|
2787
|
-
readonly label: "team";
|
|
2788
|
-
readonly id: "user_id";
|
|
2789
|
-
};
|
|
2790
|
-
};
|
|
2791
|
-
};
|
|
2792
|
-
readonly "google-workspace": {
|
|
2793
|
-
readonly mode: "oauth_client";
|
|
2794
|
-
readonly label: "Google (Gmail, Calendar, Search Console and Analytics)";
|
|
2795
|
-
readonly secrets: {
|
|
2796
|
-
readonly clientId: "GOOGLE_WORKSPACE_CLIENT_ID";
|
|
2797
|
-
readonly clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET";
|
|
2798
|
-
};
|
|
2799
|
-
readonly token: readonly [{
|
|
2800
|
-
readonly host: "oauth2.googleapis.com";
|
|
2801
|
-
readonly path: "/token";
|
|
2802
|
-
readonly methods: readonly ["POST"];
|
|
2803
|
-
readonly inject: "form";
|
|
2804
|
-
}];
|
|
2805
|
-
readonly access: readonly ["write"];
|
|
2806
|
-
readonly console: "https://console.cloud.google.com/apis/credentials";
|
|
2807
|
-
readonly setup: "setup/google.md";
|
|
2808
|
-
readonly authorize: {
|
|
2809
|
-
readonly url: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
2810
|
-
readonly scopes: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/gmail.readonly", "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/webmasters.readonly", "https://www.googleapis.com/auth/analytics.readonly"];
|
|
2811
|
-
};
|
|
2812
|
-
readonly scopePolicy: {
|
|
2813
|
-
readonly dialect: "google";
|
|
2814
|
-
readonly grantTypes: readonly ["authorization_code", "refresh_token"];
|
|
2815
|
-
readonly requestScope: "drop";
|
|
2816
|
-
readonly alwaysRequested: readonly [];
|
|
2817
|
-
readonly tolerated: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"];
|
|
2818
|
-
readonly deniedSegments: readonly ["batch", "measurementProtocolSecrets"];
|
|
2819
|
-
readonly sets: {
|
|
2820
|
-
readonly identity: {
|
|
2821
|
-
readonly label: "Google account (who you are)";
|
|
2822
|
-
readonly access: "read";
|
|
2823
|
-
readonly scopes: readonly ["openid", "email", "profile"];
|
|
2824
|
-
readonly routes: readonly [{
|
|
2825
|
-
readonly host: "openidconnect.googleapis.com";
|
|
2826
|
-
readonly paths: readonly ["/v1/userinfo"];
|
|
2827
|
-
}, {
|
|
2828
|
-
readonly host: "www.googleapis.com";
|
|
2829
|
-
readonly paths: readonly ["/oauth2/v2/userinfo", "/oauth2/v3/userinfo", "/userinfo/v2/me"];
|
|
2830
|
-
}];
|
|
2831
|
-
};
|
|
2832
|
-
readonly "gmail.read": {
|
|
2833
|
-
readonly label: "Gmail (read-only)";
|
|
2834
|
-
readonly access: "read";
|
|
2835
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/gmail.readonly"];
|
|
2836
|
-
readonly routes: readonly [{
|
|
2837
|
-
readonly host: "gmail.googleapis.com";
|
|
2838
|
-
readonly paths: readonly ["/gmail/v1/users/"];
|
|
2839
|
-
readonly posts: readonly [RegExp];
|
|
2840
|
-
}];
|
|
2841
|
-
};
|
|
2842
|
-
readonly "calendar.read": {
|
|
2843
|
-
readonly label: "Google Calendar (read-only)";
|
|
2844
|
-
readonly access: "read";
|
|
2845
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/calendar.readonly"];
|
|
2846
|
-
readonly routes: readonly [{
|
|
2847
|
-
readonly host: "www.googleapis.com";
|
|
2848
|
-
readonly paths: readonly ["/calendar/v3/"];
|
|
2849
|
-
readonly posts: readonly [RegExp, RegExp, RegExp, RegExp];
|
|
2850
|
-
}];
|
|
2851
|
-
};
|
|
2852
|
-
readonly "search-console.read": {
|
|
2853
|
-
readonly label: "Search Console (read-only)";
|
|
2854
|
-
readonly access: "read";
|
|
2855
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/webmasters.readonly"];
|
|
2856
|
-
readonly routes: readonly [{
|
|
2857
|
-
readonly host: "www.googleapis.com";
|
|
2858
|
-
readonly paths: readonly ["/webmasters/v3/"];
|
|
2859
|
-
readonly posts: readonly [RegExp];
|
|
2860
|
-
}, {
|
|
2861
|
-
readonly host: "searchconsole.googleapis.com";
|
|
2862
|
-
readonly paths: readonly ["/webmasters/v3/"];
|
|
2863
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2864
|
-
}];
|
|
2865
|
-
};
|
|
2866
|
-
readonly "analytics.read": {
|
|
2867
|
-
readonly label: "Google Analytics (read-only)";
|
|
2868
|
-
readonly access: "read";
|
|
2869
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/analytics.readonly"];
|
|
2870
|
-
readonly routes: readonly [{
|
|
2871
|
-
readonly host: "analyticsdata.googleapis.com";
|
|
2872
|
-
readonly paths: readonly ["/v1beta/properties/"];
|
|
2873
|
-
readonly posts: readonly [RegExp];
|
|
2874
|
-
}, {
|
|
2875
|
-
readonly host: "analyticsadmin.googleapis.com";
|
|
2876
|
-
readonly paths: readonly ["/v1beta/accountSummaries", "/v1beta/accounts", "/v1beta/accounts/", "/v1beta/properties", "/v1beta/properties/", "/v1alpha/properties/"];
|
|
2877
|
-
}];
|
|
2878
|
-
};
|
|
2879
|
-
};
|
|
2880
|
-
};
|
|
2881
|
-
readonly api: readonly ["gmail.googleapis.com", "www.googleapis.com", "searchconsole.googleapis.com", "analyticsdata.googleapis.com", "analyticsadmin.googleapis.com", "openidconnect.googleapis.com"];
|
|
2882
|
-
readonly flow: {
|
|
2883
|
-
readonly tokenUrl: "https://oauth2.googleapis.com/token";
|
|
2884
|
-
readonly pkce: true;
|
|
2885
|
-
readonly scopeDialect: "google";
|
|
2886
|
-
readonly authorizeParams: {
|
|
2887
|
-
readonly access_type: "offline";
|
|
2888
|
-
readonly prompt: "consent";
|
|
2889
|
-
};
|
|
2890
|
-
readonly identity: {
|
|
2891
|
-
readonly url: "https://openidconnect.googleapis.com/v1/userinfo";
|
|
2892
|
-
readonly label: "email";
|
|
2893
|
-
readonly id: "sub";
|
|
2894
|
-
};
|
|
2895
|
-
};
|
|
2896
|
-
};
|
|
2897
|
-
readonly "microsoft-365": {
|
|
2898
|
-
readonly mode: "oauth_client";
|
|
2899
|
-
readonly label: "Microsoft 365 (Outlook mail and calendar)";
|
|
2900
|
-
readonly secrets: {
|
|
2901
|
-
readonly clientId: "MICROSOFT_365_CLIENT_ID";
|
|
2902
|
-
readonly clientSecret: "MICROSOFT_365_CLIENT_SECRET";
|
|
2903
|
-
};
|
|
2904
|
-
readonly token: readonly [{
|
|
2905
|
-
readonly host: "login.microsoftonline.com";
|
|
2906
|
-
readonly path: "/common/oauth2/v2.0/token";
|
|
2907
|
-
readonly methods: readonly ["POST"];
|
|
2908
|
-
readonly inject: "form";
|
|
2909
|
-
}];
|
|
2910
|
-
readonly access: readonly ["write"];
|
|
2911
|
-
readonly console: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade";
|
|
2912
|
-
readonly setup: "setup/microsoft-365.md";
|
|
2913
|
-
readonly authorize: {
|
|
2914
|
-
readonly url: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
|
2915
|
-
readonly scopes: readonly ["offline_access", "User.Read", "Mail.Read", "Calendars.Read"];
|
|
2916
|
-
};
|
|
2917
|
-
readonly scopePolicy: {
|
|
2918
|
-
readonly dialect: "microsoft";
|
|
2919
|
-
readonly grantTypes: readonly ["authorization_code", "refresh_token"];
|
|
2920
|
-
readonly requestScope: "replace";
|
|
2921
|
-
readonly alwaysRequested: readonly ["offline_access"];
|
|
2922
|
-
readonly tolerated: readonly ["openid", "profile", "email", "offline_access", "User.Read"];
|
|
2923
|
-
readonly deniedSegments: readonly ["$batch", "beta"];
|
|
2924
|
-
readonly sets: {
|
|
2925
|
-
readonly identity: {
|
|
2926
|
-
readonly label: "Microsoft account (who you are)";
|
|
2927
|
-
readonly access: "read";
|
|
2928
|
-
readonly scopes: readonly ["User.Read"];
|
|
2929
|
-
readonly routes: readonly [{
|
|
2930
|
-
readonly host: "graph.microsoft.com";
|
|
2931
|
-
readonly paths: readonly ["/v1.0/me", "/oidc/userinfo"];
|
|
2932
|
-
}];
|
|
2933
|
-
};
|
|
2934
|
-
readonly "mail.read": {
|
|
2935
|
-
readonly label: "Outlook mail (read-only)";
|
|
2936
|
-
readonly access: "read";
|
|
2937
|
-
readonly scopes: readonly ["Mail.Read"];
|
|
2938
|
-
readonly routes: readonly [{
|
|
2939
|
-
readonly host: "graph.microsoft.com";
|
|
2940
|
-
readonly paths: readonly ["/v1.0/me/messages", "/v1.0/me/messages/", "/v1.0/me/mailFolders", "/v1.0/me/mailFolders/"];
|
|
2941
|
-
}];
|
|
2942
|
-
};
|
|
2943
|
-
readonly "calendar.read": {
|
|
2944
|
-
readonly label: "Outlook calendar (read-only)";
|
|
2945
|
-
readonly access: "read";
|
|
2946
|
-
readonly scopes: readonly ["Calendars.Read"];
|
|
2947
|
-
readonly routes: readonly [{
|
|
2948
|
-
readonly host: "graph.microsoft.com";
|
|
2949
|
-
readonly paths: readonly ["/v1.0/me/calendar", "/v1.0/me/calendar/", "/v1.0/me/calendars", "/v1.0/me/calendars/", "/v1.0/me/events", "/v1.0/me/events/", "/v1.0/me/calendarView", "/v1.0/me/calendarView/"];
|
|
2950
|
-
readonly posts: readonly [RegExp];
|
|
2951
|
-
}];
|
|
2952
|
-
};
|
|
2953
|
-
};
|
|
2954
|
-
};
|
|
2955
|
-
readonly api: readonly ["graph.microsoft.com"];
|
|
2956
|
-
readonly flow: {
|
|
2957
|
-
readonly tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
|
2958
|
-
readonly pkce: true;
|
|
2959
|
-
readonly scopeDialect: "microsoft";
|
|
2960
|
-
readonly identity: {
|
|
2961
|
-
readonly url: "https://graph.microsoft.com/v1.0/me";
|
|
2962
|
-
readonly label: "userPrincipalName";
|
|
2963
|
-
readonly id: "id";
|
|
2964
|
-
};
|
|
2965
|
-
};
|
|
2966
|
-
};
|
|
2967
2633
|
};
|
|
2968
2634
|
export type CapabilityId = keyof typeof CAPABILITIES;
|
|
2969
2635
|
type CapabilityIdOf<Mode extends Capability["mode"]> = {
|
|
@@ -2975,18 +2641,6 @@ export type ApiKeyCapabilityId = CapabilityIdOf<"api_key">;
|
|
|
2975
2641
|
export type AiProviderId = CapabilityIdOf<"ai">;
|
|
2976
2642
|
/** Capabilities the gateway performs itself, each with its SDK helper. */
|
|
2977
2643
|
export type ServiceCapabilityId = CapabilityIdOf<"service">;
|
|
2978
|
-
/** OAuth clients whose token endpoints apps reach with `integrationFetch()`. */
|
|
2979
|
-
export type OAuthClientCapabilityId = CapabilityIdOf<"oauth_client">;
|
|
2980
|
-
/**
|
|
2981
|
-
* The scope set names an OAuth client offers; `never` for a client without
|
|
2982
|
-
* a scope policy. Distributes over a union of ids, so a generic over two
|
|
2983
|
-
* clients gets every name either offers rather than the names they share.
|
|
2984
|
-
*/
|
|
2985
|
-
export type OAuthScopeSetName<Id extends OAuthClientCapabilityId> = Id extends unknown ? (typeof CAPABILITIES)[Id] extends {
|
|
2986
|
-
scopePolicy: {
|
|
2987
|
-
sets: infer S;
|
|
2988
|
-
};
|
|
2989
|
-
} ? keyof S & string : never : never;
|
|
2990
2644
|
/** The Gateway settings an `auth` block names: the key, and a Basic username held as a setting. */
|
|
2991
2645
|
type AuthSettingsOf<A> = (A extends {
|
|
2992
2646
|
secret: infer S extends string;
|
|
@@ -2999,9 +2653,6 @@ type SettingsOf<C> = C extends {
|
|
|
2999
2653
|
settings: readonly (infer S extends string)[];
|
|
3000
2654
|
optionalSettings: readonly (infer O extends string)[];
|
|
3001
2655
|
} ? S | O : C extends {
|
|
3002
|
-
secrets: infer S;
|
|
3003
|
-
token: unknown;
|
|
3004
|
-
} ? S[keyof S] & string : C extends {
|
|
3005
2656
|
auth: infer A;
|
|
3006
2657
|
} ? AuthSettingsOf<A> | (C extends {
|
|
3007
2658
|
alsoNeeds: readonly (infer N extends string)[];
|
|
@@ -3070,7 +2721,7 @@ export declare const INTEGRATION_PROXY_PREFIX = "/api/integrations";
|
|
|
3070
2721
|
* `/api/integrations/<id>/<host><path>?<query>`. The host is in the path so
|
|
3071
2722
|
* a provider with several API hosts needs no other channel.
|
|
3072
2723
|
*/
|
|
3073
|
-
export declare function integrationProxyPath(id: ApiKeyCapabilityId |
|
|
2724
|
+
export declare function integrationProxyPath(id: ApiKeyCapabilityId | (string & {}), upstream: URL): string;
|
|
3074
2725
|
/** The AppGateway path of a service capability's route: `/api/integrations/<id>/<route>`. */
|
|
3075
2726
|
export declare function serviceRoutePath(id: ServiceCapabilityId, route: string): string;
|
|
3076
2727
|
/** What an AppGateway capability path names. */
|
|
@@ -3082,13 +2733,12 @@ export type IntegrationProxyRoute =
|
|
|
3082
2733
|
capability: ApiKeyCapability;
|
|
3083
2734
|
upstream: URL;
|
|
3084
2735
|
}
|
|
3085
|
-
/** A call to one of an OAuth
|
|
2736
|
+
/** A call to one of an OAuth provider's API hosts, which goes with the person's held token. */
|
|
3086
2737
|
| {
|
|
3087
2738
|
kind: "oauth_client";
|
|
3088
2739
|
id: string;
|
|
3089
2740
|
capability: OAuthClientCapability;
|
|
3090
2741
|
upstream: URL;
|
|
3091
|
-
endpoint: OAuthTokenEndpoint;
|
|
3092
2742
|
}
|
|
3093
2743
|
/** A call to one of the routes a service capability declares. */
|
|
3094
2744
|
| {
|
|
@@ -3102,20 +2752,12 @@ export type CapabilitySettings = Readonly<Record<string, unknown>>;
|
|
|
3102
2752
|
/**
|
|
3103
2753
|
* The capability call an AppGateway path names, or null when the path names
|
|
3104
2754
|
* an unknown capability (or an AI provider, which has its own route), a
|
|
3105
|
-
* host outside the provider's, a path that could leave that host, a
|
|
3106
|
-
*
|
|
3107
|
-
* capability doesn't declare. `settings` resolves an API-key provider's
|
|
2755
|
+
* host outside the provider's, a path that could leave that host, or a
|
|
2756
|
+
* route a service capability doesn't declare. `settings` resolves an API-key provider's
|
|
3108
2757
|
* `hostSetting` (a Shopify store's host); `lookup` is where the id is found,
|
|
3109
2758
|
* the catalog alone by default.
|
|
3110
2759
|
*/
|
|
3111
2760
|
export declare function parseIntegrationProxyPath(pathname: string, search: string, settings?: CapabilitySettings, lookup?: CapabilityLookup): IntegrationProxyRoute | null;
|
|
3112
|
-
/**
|
|
3113
|
-
* The token endpoint `upstream` is, by its exact host and path, or null.
|
|
3114
|
-
* Its method is the caller's to check.
|
|
3115
|
-
*/
|
|
3116
|
-
export declare function tokenEndpointFor(capability: OAuthClientCapability, upstream: URL): OAuthTokenEndpoint | null;
|
|
3117
|
-
/** An OAuth client's token endpoints, as `POST https://host/path` lines for messages. */
|
|
3118
|
-
export declare function describeTokenEndpoints(capability: OAuthClientCapability): string;
|
|
3119
2761
|
/**
|
|
3120
2762
|
* The command that gives the gateway `capability`'s client:
|
|
3121
2763
|
* `pnpm everyapp secret set <ID> <SECRET>`.
|