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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/identity/github/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAC7D,8CAA8C;AAC9C,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAQzD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAE/C,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAyBD,6DAA6D;AAC7D,eAAO,MAAM,cAAc,EAAE,cAkD3B,CAAC;AAEH,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,4CAAyB,CAAC;AAEzD,eAAO,MAAM,8BAA8B,2DACP,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,iBAAiB,GAAG,IAAI,CAK1B;AAED,eAAO,MAAM,uBAAuB,yFAAmC,CAAC;AAExE;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,OAAO,KAAa,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAqBjC"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub OAuth helpers for Connect-with-GitHub credential binding.
|
|
3
|
-
*
|
|
4
|
-
* Unlike Slack Connect (channel identity remap only), GitHub Connect stores a
|
|
5
|
-
* per-actor OAuth access token so `credentials.github({ write: ["actor"] })`
|
|
6
|
-
* can act as the signed-in user (e.g. open pull requests).
|
|
7
|
-
*
|
|
8
|
-
* Implemented as a {@link createByoOauthClient} descriptor with GitHub-specific
|
|
9
|
-
* token (JSON body) and userinfo (API headers) quirks.
|
|
10
|
-
*/
|
|
11
|
-
import { createByoOauthClient, } from "../byo-oauth.js";
|
|
12
|
-
import { MDA_PUBLIC_APP_URL_ENV } from "../oauth-env.js";
|
|
13
|
-
export const GITHUB_CLIENT_ID_ENV = "GITHUB_CLIENT_ID";
|
|
14
|
-
export const GITHUB_CLIENT_SECRET_ENV = "GITHUB_CLIENT_SECRET";
|
|
15
|
-
/** Space-separated OAuth scopes. Defaults to `repo read:user`. */
|
|
16
|
-
export const GITHUB_OAUTH_SCOPES_ENV = "GITHUB_OAUTH_SCOPES";
|
|
17
|
-
/** Override GitHub OAuth/API base (tests). */
|
|
18
|
-
export const GITHUB_OAUTH_BASE_ENV = "GITHUB_OAUTH_BASE";
|
|
19
|
-
const DEFAULT_OAUTH_BASE = "https://github.com";
|
|
20
|
-
const DEFAULT_API_BASE = "https://api.github.com";
|
|
21
|
-
const DEFAULT_SCOPES = "repo read:user";
|
|
22
|
-
const SUBJECT_METADATA_KEY = "github_user_id";
|
|
23
|
-
const LOGIN_METADATA_KEY = "github_login";
|
|
24
|
-
function githubEndpoints(env) {
|
|
25
|
-
const oauthBase = (env[GITHUB_OAUTH_BASE_ENV]?.trim() || DEFAULT_OAUTH_BASE).replace(/\/$/, "");
|
|
26
|
-
const apiBase = oauthBase === DEFAULT_OAUTH_BASE ? DEFAULT_API_BASE : `${oauthBase}/api/v3`;
|
|
27
|
-
return {
|
|
28
|
-
oauthBase,
|
|
29
|
-
apiBase,
|
|
30
|
-
authUrl: `${oauthBase}/login/oauth/authorize`,
|
|
31
|
-
tokenUrl: `${oauthBase}/login/oauth/access_token`,
|
|
32
|
-
userInfoUrl: `${apiBase}/user`,
|
|
33
|
-
defaultScopes: DEFAULT_SCOPES,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/** GitHub BYO OAuth client (config, authorize, exchange). */
|
|
37
|
-
export const githubByoOauth = createByoOauthClient({
|
|
38
|
-
providerId: "github",
|
|
39
|
-
displayName: "GitHub",
|
|
40
|
-
envPrefix: "GITHUB",
|
|
41
|
-
envKeys: {
|
|
42
|
-
scopes: GITHUB_OAUTH_SCOPES_ENV,
|
|
43
|
-
},
|
|
44
|
-
defaultPrompt: false,
|
|
45
|
-
tokenRequest: {
|
|
46
|
-
format: "json",
|
|
47
|
-
headers: { Accept: "application/json" },
|
|
48
|
-
},
|
|
49
|
-
userInfoRequest: {
|
|
50
|
-
required: true,
|
|
51
|
-
headers: {
|
|
52
|
-
Accept: "application/vnd.github+json",
|
|
53
|
-
"User-Agent": "managed-deepagents",
|
|
54
|
-
"X-GitHub-Api-Version": "2022-11-28",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
defaultEndpoints(env) {
|
|
58
|
-
const endpoints = githubEndpoints(env);
|
|
59
|
-
return {
|
|
60
|
-
authUrl: endpoints.authUrl,
|
|
61
|
-
tokenUrl: endpoints.tokenUrl,
|
|
62
|
-
userInfoUrl: endpoints.userInfoUrl,
|
|
63
|
-
defaultScopes: endpoints.defaultScopes,
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
parseUserInfo(json) {
|
|
67
|
-
const id = json.id;
|
|
68
|
-
const login = typeof json.login === "string" ? json.login : undefined;
|
|
69
|
-
if (id === undefined || !login) {
|
|
70
|
-
throw new Error(typeof json.message === "string"
|
|
71
|
-
? json.message
|
|
72
|
-
: "GitHub /user lookup failed");
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
...(typeof json.email === "string" && json.email
|
|
76
|
-
? { email: json.email }
|
|
77
|
-
: {}),
|
|
78
|
-
subject: String(id),
|
|
79
|
-
metadata: {
|
|
80
|
-
[LOGIN_METADATA_KEY]: login,
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
subjectMetadataKey: SUBJECT_METADATA_KEY,
|
|
85
|
-
});
|
|
86
|
-
/** GitHub-bound OAuth state / connect-ticket helpers. */
|
|
87
|
-
export const githubOauthTickets = githubByoOauth.tickets;
|
|
88
|
-
export const resolveGitHubOauthRedirectBase = githubByoOauth.resolveRedirectBase;
|
|
89
|
-
/**
|
|
90
|
-
* Requires `MDA_PUBLIC_APP_URL` — unlike Fleet BYO readers, do not fall back
|
|
91
|
-
* to `MDA_PUBLIC_API_URL`; post-OAuth redirect targets the managed app
|
|
92
|
-
* (`/settings?github=connected`).
|
|
93
|
-
*/
|
|
94
|
-
export function readGitHubOauthConfig(env = process.env) {
|
|
95
|
-
if (!env[MDA_PUBLIC_APP_URL_ENV]?.trim()) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
return githubByoOauth.readConfig(env);
|
|
99
|
-
}
|
|
100
|
-
export const buildGitHubAuthorizeUrl = githubByoOauth.buildAuthorizeUrl;
|
|
101
|
-
/**
|
|
102
|
-
* Exchange an authorization code for a user access token and profile.
|
|
103
|
-
*
|
|
104
|
-
* GitHub returns `application/x-www-form-urlencoded` unless `Accept:
|
|
105
|
-
* application/json` is set — handled by the BYO tokenRequest config.
|
|
106
|
-
*/
|
|
107
|
-
export async function exchangeGitHubOauthCode(config, code, redirectUri, fetchImpl = fetch) {
|
|
108
|
-
const result = await githubByoOauth.exchangeCode(config, code, redirectUri, fetchImpl);
|
|
109
|
-
const userId = result.metadata?.[SUBJECT_METADATA_KEY];
|
|
110
|
-
const login = result.metadata?.[LOGIN_METADATA_KEY];
|
|
111
|
-
if (typeof userId !== "string" || typeof login !== "string" || !login) {
|
|
112
|
-
throw new Error("GitHub /user lookup failed");
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
accessToken: result.accessToken,
|
|
116
|
-
...(result.tokenType ? { tokenType: result.tokenType } : {}),
|
|
117
|
-
...(result.scope ? { scope: result.scope } : {}),
|
|
118
|
-
...(result.refreshToken ? { refreshToken: result.refreshToken } : {}),
|
|
119
|
-
userId,
|
|
120
|
-
login,
|
|
121
|
-
...(result.accountLabel ? { email: result.accountLabel } : {}),
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=oauth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../src/identity/github/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,oBAAoB,GAGrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAC/D,kEAAkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAC7D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAEzD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAChD,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAClD,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAC9C,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAc1C,SAAS,eAAe,CAAC,GAAsB;IAQ7C,MAAM,SAAS,GAAG,CAChB,GAAG,CAAC,qBAAqB,CAAC,EAAE,IAAI,EAAE,IAAI,kBAAkB,CACzD,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrB,MAAM,OAAO,GACX,SAAS,KAAK,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,SAAS,CAAC;IAC9E,OAAO;QACL,SAAS;QACT,OAAO;QACP,OAAO,EAAE,GAAG,SAAS,wBAAwB;QAC7C,QAAQ,EAAE,GAAG,SAAS,2BAA2B;QACjD,WAAW,EAAE,GAAG,OAAO,OAAO;QAC9B,a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E,CAAC;QACtE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,MAAM;QACN,KAAK;QACL,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/D,CAAC;AACJ,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect-with-Google — thin adapter over {@link defineFleetIntegrationConnect}.
|
|
3
|
-
*
|
|
4
|
-
* Mounted under `/identity/google/*` when listed on `identity.connect`, or
|
|
5
|
-
* inferred from declared Google toolserver connectors on a user-scoped
|
|
6
|
-
* deployment.
|
|
7
|
-
*/
|
|
8
|
-
import type { FleetIntegrationConnectProviderOptions } from "../fleet-integration-connect.js";
|
|
9
|
-
export declare const GOOGLE_CONNECT_STATUS_PATH: string;
|
|
10
|
-
export declare const GOOGLE_CONNECT_START_PATH: string;
|
|
11
|
-
export declare const GOOGLE_CONNECT_CALLBACK_PATH: string;
|
|
12
|
-
export declare const GOOGLE_CONNECT_LINK_PATH: string;
|
|
13
|
-
export declare const isGoogleActorSubjectEnabled: () => boolean;
|
|
14
|
-
export declare const enableGoogleActorSubject: () => void;
|
|
15
|
-
/**
|
|
16
|
-
* Enable actor-subject mode when Google connectors imply per-user vault subjects.
|
|
17
|
-
*
|
|
18
|
-
* Prefer {@link enableActorSubjectIntegrationsFromConnectors} at compile seams.
|
|
19
|
-
*/
|
|
20
|
-
export declare const enableGoogleActorSubjectFromConnectors: (connectorKinds: readonly (string | undefined)[] | undefined, scope?: import("../connect-provider-types.js").IdentityConnectMountContext["scope"]) => void;
|
|
21
|
-
export declare const resetGoogleActorSubjectEnabledForTests: () => void;
|
|
22
|
-
export declare const isGoogleConnectConfigured: (env?: NodeJS.ProcessEnv) => boolean;
|
|
23
|
-
export declare const googleConnectUrl: (publicAppUrl: string) => string;
|
|
24
|
-
/** Options for {@link createGoogleIdentityConnectProvider}. */
|
|
25
|
-
export type GoogleIdentityConnectProviderOptions = FleetIntegrationConnectProviderOptions;
|
|
26
|
-
/** Build a Google connect provider. */
|
|
27
|
-
export declare const createGoogleIdentityConnectProvider: (options?: FleetIntegrationConnectProviderOptions) => import("../connect-provider-types.js").IdentityConnectProvider;
|
|
28
|
-
/** Default Google connect provider used as a built-in mount candidate. */
|
|
29
|
-
export declare const googleIdentityConnectProvider: import("../connect-provider-types.js").IdentityConnectProvider;
|
|
30
|
-
/**
|
|
31
|
-
* Opt into Connect-with-Google on `defineIdentity({ connect: […] })`.
|
|
32
|
-
*
|
|
33
|
-
* Usually unnecessary: declaring Google toolserver connectors on a user-scoped
|
|
34
|
-
* identity deployment mounts this provider and derives OAuth scopes automatically.
|
|
35
|
-
*/
|
|
36
|
-
export declare const connect: (options?: FleetIntegrationConnectProviderOptions) => import("../connect-provider-types.js").IdentityConnectProvider;
|
|
37
|
-
//# sourceMappingURL=connect-http.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.d.ts","sourceRoot":"","sources":["../../../src/identity/google/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAS9F,eAAO,MAAM,0BAA0B,QAAsB,CAAC;AAC9D,eAAO,MAAM,yBAAyB,QAAuB,CAAC;AAC9D,eAAO,MAAM,4BAA4B,QAAwB,CAAC;AAClE,eAAO,MAAM,wBAAwB,QAAoB,CAAC;AAE1D,eAAO,MAAM,2BAA2B,eAA+B,CAAC;AACxE,eAAO,MAAM,wBAAwB,YAA4B,CAAC;AAClE;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,4JACV,CAAC;AAC1C,eAAO,MAAM,sCAAsC,YACV,CAAC;AAC1C,eAAO,MAAM,yBAAyB,sCAA6B,CAAC;AACpE,eAAO,MAAM,gBAAgB,kCAAoB,CAAC;AAElD,+DAA+D;AAC/D,MAAM,MAAM,oCAAoC,GAC9C,sCAAsC,CAAC;AAEzC,uCAAuC;AACvC,eAAO,MAAM,mCAAmC,sHAAwB,CAAC;AAEzE,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,gEAAkB,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,OAAO,sHAAiB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect-with-Google — thin adapter over {@link defineFleetIntegrationConnect}.
|
|
3
|
-
*
|
|
4
|
-
* Mounted under `/identity/google/*` when listed on `identity.connect`, or
|
|
5
|
-
* inferred from declared Google toolserver connectors on a user-scoped
|
|
6
|
-
* deployment.
|
|
7
|
-
*/
|
|
8
|
-
import { GOOGLE_INTEGRATION } from "../../connectors/toolserver/integrations.js";
|
|
9
|
-
import { defineFleetIntegrationConnect } from "../define-fleet-connect.js";
|
|
10
|
-
import { googleByoOauth } from "./oauth.js";
|
|
11
|
-
const google = defineFleetIntegrationConnect({
|
|
12
|
-
integration: GOOGLE_INTEGRATION,
|
|
13
|
-
byoClient: googleByoOauth,
|
|
14
|
-
fallbackScopes: ["openid", "email", "profile"],
|
|
15
|
-
});
|
|
16
|
-
export const GOOGLE_CONNECT_STATUS_PATH = google.paths.status;
|
|
17
|
-
export const GOOGLE_CONNECT_START_PATH = google.paths.connect;
|
|
18
|
-
export const GOOGLE_CONNECT_CALLBACK_PATH = google.paths.callback;
|
|
19
|
-
export const GOOGLE_CONNECT_LINK_PATH = google.paths.link;
|
|
20
|
-
export const isGoogleActorSubjectEnabled = google.isActorSubjectEnabled;
|
|
21
|
-
export const enableGoogleActorSubject = google.enableActorSubject;
|
|
22
|
-
/**
|
|
23
|
-
* Enable actor-subject mode when Google connectors imply per-user vault subjects.
|
|
24
|
-
*
|
|
25
|
-
* Prefer {@link enableActorSubjectIntegrationsFromConnectors} at compile seams.
|
|
26
|
-
*/
|
|
27
|
-
export const enableGoogleActorSubjectFromConnectors = google.enableActorSubjectFromConnectors;
|
|
28
|
-
export const resetGoogleActorSubjectEnabledForTests = google.resetActorSubjectEnabledForTests;
|
|
29
|
-
export const isGoogleConnectConfigured = google.isConnectConfigured;
|
|
30
|
-
export const googleConnectUrl = google.connectUrl;
|
|
31
|
-
/** Build a Google connect provider. */
|
|
32
|
-
export const createGoogleIdentityConnectProvider = google.createProvider;
|
|
33
|
-
/** Default Google connect provider used as a built-in mount candidate. */
|
|
34
|
-
export const googleIdentityConnectProvider = google.provider;
|
|
35
|
-
/**
|
|
36
|
-
* Opt into Connect-with-Google on `defineIdentity({ connect: […] })`.
|
|
37
|
-
*
|
|
38
|
-
* Usually unnecessary: declaring Google toolserver connectors on a user-scoped
|
|
39
|
-
* identity deployment mounts this provider and derives OAuth scopes automatically.
|
|
40
|
-
*/
|
|
41
|
-
export const connect = google.connect;
|
|
42
|
-
//# sourceMappingURL=connect-http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.js","sourceRoot":"","sources":["../../../src/identity/google/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAA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pers — Connect-with-Google.
|
|
3
|
-
*/
|
|
4
|
-
export { connect, createGoogleIdentityConnectProvider, enableGoogleActorSubject, enableGoogleActorSubjectFromConnectors, googleConnectUrl, googleIdentityConnectProvider, isGoogleActorSubjectEnabled, isGoogleConnectConfigured, resetGoogleActorSubjectEnabledForTests, GOOGLE_CONNECT_CALLBACK_PATH, GOOGLE_CONNECT_LINK_PATH, GOOGLE_CONNECT_START_PATH, GOOGLE_CONNECT_STATUS_PATH, } from "./connect-http.js";
|
|
5
|
-
export type { GoogleIdentityConnectProviderOptions } from "./connect-http.js";
|
|
6
|
-
export { googleOauthTickets } from "./oauth.js";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/identity/google/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,mCAAmC,EACnC,wBAAwB,EACxB,sCAAsC,EACtC,gBAAgB,EAChB,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,EACtC,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google identity helpers — Connect-with-Google.
|
|
3
|
-
*/
|
|
4
|
-
export { connect, createGoogleIdentityConnectProvider, enableGoogleActorSubject, enableGoogleActorSubjectFromConnectors, googleConnectUrl, googleIdentityConnectProvider, isGoogleActorSubjectEnabled, isGoogleConnectConfigured, resetGoogleActorSubjectEnabledForTests, GOOGLE_CONNECT_CALLBACK_PATH, GOOGLE_CONNECT_LINK_PATH, GOOGLE_CONNECT_START_PATH, GOOGLE_CONNECT_STATUS_PATH, } from "./connect-http.js";
|
|
5
|
-
export { googleOauthTickets } from "./oauth.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/identity/google/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,mCAAmC,EACnC,wBAAwB,EACxB,sCAAsC,EACtC,gBAAgB,EAChB,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,EACtC,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google BYO OAuth descriptor — optional non-LangSmith Connect-with-Google.
|
|
3
|
-
* The default path uses Fleet auth-sessions instead.
|
|
4
|
-
*/
|
|
5
|
-
import { type ByoOauthConfig, type ByoOauthClient } from "../byo-oauth.js";
|
|
6
|
-
export { MDA_PUBLIC_API_URL_ENV, MDA_PUBLIC_APP_URL_ENV, OAUTH_STATE_SIGNING_KEY_ENV, readOauthStateSigningKey, } from "../byo-oauth.js";
|
|
7
|
-
export type GoogleOauthConfig = ByoOauthConfig;
|
|
8
|
-
/** Google BYO OAuth client (config, authorize, exchange, Fleet adapter). */
|
|
9
|
-
export declare const googleByoOauth: ByoOauthClient;
|
|
10
|
-
export declare const GOOGLE_OAUTH_CLIENT_ID_ENV: string;
|
|
11
|
-
export declare const GOOGLE_OAUTH_CLIENT_SECRET_ENV: string;
|
|
12
|
-
export declare const GOOGLE_OAUTH_SCOPES_ENV: string;
|
|
13
|
-
export declare const GOOGLE_OAUTH_AUTH_URL_ENV: string;
|
|
14
|
-
export declare const GOOGLE_OAUTH_TOKEN_URL_ENV: string;
|
|
15
|
-
export declare const GOOGLE_OAUTH_USERINFO_URL_ENV: string;
|
|
16
|
-
/** Google-bound OAuth state / connect-ticket helpers. */
|
|
17
|
-
export declare const googleOauthTickets: import("../oauth-tickets.js").OauthTickets;
|
|
18
|
-
export declare const resolveGoogleOauthRedirectBase: typeof import("../oauth-env.js").resolveOauthRedirectBase;
|
|
19
|
-
export declare const readGoogleOauthConfig: (env?: NodeJS.ProcessEnv) => ByoOauthConfig | null;
|
|
20
|
-
export declare const buildGoogleAuthorizeUrl: (config: ByoOauthConfig, state: string, redirectUri: string, scopes?: string) => string;
|
|
21
|
-
export declare const exchangeGoogleOauthCode: (config: ByoOauthConfig, code: string, redirectUri: string, fetchImpl?: typeof fetch) => Promise<import("../fleet-connect.js").FleetVaultByoTokenResult>;
|
|
22
|
-
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/identity/google/oauth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAQ/C,4EAA4E;AAC5E,eAAO,MAAM,cAAc,EAAE,cAsB3B,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAA8B,CAAC;AACtE,eAAO,MAAM,8BAA8B,QAAkC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,QAA4B,CAAC;AACjE,eAAO,MAAM,yBAAyB,QAA6B,CAAC;AACpE,eAAO,MAAM,0BAA0B,QAA8B,CAAC;AACtE,eAAO,MAAM,6BAA6B,QAAiC,CAAC;AAE5E,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,4CAAyB,CAAC;AAEzD,eAAO,MAAM,8BAA8B,2DACP,CAAC;AAErC,eAAO,MAAM,qBAAqB,oDAA4B,CAAC;AAC/D,eAAO,MAAM,uBAAuB,yFAAmC,CAAC;AACxE,eAAO,MAAM,uBAAuB,0JAA8B,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google BYO OAuth descriptor — optional non-LangSmith Connect-with-Google.
|
|
3
|
-
* The default path uses Fleet auth-sessions instead.
|
|
4
|
-
*/
|
|
5
|
-
import { createByoOauthClient, } from "../byo-oauth.js";
|
|
6
|
-
export { MDA_PUBLIC_API_URL_ENV, MDA_PUBLIC_APP_URL_ENV, OAUTH_STATE_SIGNING_KEY_ENV, readOauthStateSigningKey, } from "../byo-oauth.js";
|
|
7
|
-
const DEFAULT_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
8
|
-
const DEFAULT_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
9
|
-
const DEFAULT_USERINFO_URL = "https://www.googleapis.com/oauth2/v3/userinfo";
|
|
10
|
-
/** Profile-only default; connector-derived unions replace this at authorize time. */
|
|
11
|
-
const DEFAULT_SCOPES = ["openid", "email", "profile"].join(" ");
|
|
12
|
-
/** Google BYO OAuth client (config, authorize, exchange, Fleet adapter). */
|
|
13
|
-
export const googleByoOauth = createByoOauthClient({
|
|
14
|
-
providerId: "google",
|
|
15
|
-
displayName: "Google",
|
|
16
|
-
envPrefix: "GOOGLE_OAUTH",
|
|
17
|
-
defaultEndpoints: () => ({
|
|
18
|
-
authUrl: DEFAULT_AUTH_URL,
|
|
19
|
-
tokenUrl: DEFAULT_TOKEN_URL,
|
|
20
|
-
userInfoUrl: DEFAULT_USERINFO_URL,
|
|
21
|
-
defaultScopes: DEFAULT_SCOPES,
|
|
22
|
-
}),
|
|
23
|
-
authorizeParams: { access_type: "offline" },
|
|
24
|
-
parseUserInfo(json) {
|
|
25
|
-
return {
|
|
26
|
-
...(typeof json.email === "string" && json.email
|
|
27
|
-
? { email: json.email }
|
|
28
|
-
: {}),
|
|
29
|
-
...(typeof json.sub === "string" && json.sub
|
|
30
|
-
? { subject: json.sub }
|
|
31
|
-
: {}),
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
subjectMetadataKey: "google_sub",
|
|
35
|
-
});
|
|
36
|
-
export const GOOGLE_OAUTH_CLIENT_ID_ENV = googleByoOauth.env.clientId;
|
|
37
|
-
export const GOOGLE_OAUTH_CLIENT_SECRET_ENV = googleByoOauth.env.clientSecret;
|
|
38
|
-
export const GOOGLE_OAUTH_SCOPES_ENV = googleByoOauth.env.scopes;
|
|
39
|
-
export const GOOGLE_OAUTH_AUTH_URL_ENV = googleByoOauth.env.authUrl;
|
|
40
|
-
export const GOOGLE_OAUTH_TOKEN_URL_ENV = googleByoOauth.env.tokenUrl;
|
|
41
|
-
export const GOOGLE_OAUTH_USERINFO_URL_ENV = googleByoOauth.env.userInfoUrl;
|
|
42
|
-
/** Google-bound OAuth state / connect-ticket helpers. */
|
|
43
|
-
export const googleOauthTickets = googleByoOauth.tickets;
|
|
44
|
-
export const resolveGoogleOauthRedirectBase = googleByoOauth.resolveRedirectBase;
|
|
45
|
-
export const readGoogleOauthConfig = googleByoOauth.readConfig;
|
|
46
|
-
export const buildGoogleAuthorizeUrl = googleByoOauth.buildAuthorizeUrl;
|
|
47
|
-
export const exchangeGoogleOauthCode = googleByoOauth.exchangeCode;
|
|
48
|
-
//# sourceMappingURL=oauth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../src/identity/google/oauth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,oBAAoB,GAGrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,gBAAgB,GAAG,8CAA8C,CAAC;AACxE,MAAM,iBAAiB,GAAG,qCAAqC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,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC;AACpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC;AACtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC;AAE5E,yDAAyD;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,CAAC;AAEzD,MAAM,CAAC,MAAM,8BAA8B,GACzC,cAAc,CAAC,mBAAmB,CAAC;AAErC,MAAM,CAAC,MAAM,qBAAqB,GAAG,cAAc,CAAC,UAAU,CAAC;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,cAAc,CAAC,iBAAiB,CAAC;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,cAAc,CAAC,YAAY,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect-with-LinkedIn — thin adapter over {@link defineFleetIntegrationConnect}.
|
|
3
|
-
*
|
|
4
|
-
* Mounted under `/identity/linkedin/*` when listed on `identity.connect`, or
|
|
5
|
-
* inferred from declared LinkedIn toolserver connectors on a user-scoped
|
|
6
|
-
* deployment.
|
|
7
|
-
*/
|
|
8
|
-
import type { FleetIntegrationConnectProviderOptions } from "../fleet-integration-connect.js";
|
|
9
|
-
export declare const LINKEDIN_CONNECT_STATUS_PATH: string;
|
|
10
|
-
export declare const LINKEDIN_CONNECT_START_PATH: string;
|
|
11
|
-
export declare const LINKEDIN_CONNECT_CALLBACK_PATH: string;
|
|
12
|
-
export declare const LINKEDIN_CONNECT_LINK_PATH: string;
|
|
13
|
-
export declare const isLinkedInActorSubjectEnabled: () => boolean;
|
|
14
|
-
export declare const enableLinkedInActorSubject: () => void;
|
|
15
|
-
/**
|
|
16
|
-
* Enable actor-subject mode when LinkedIn connectors imply per-user vault subjects.
|
|
17
|
-
*
|
|
18
|
-
* Prefer {@link enableActorSubjectIntegrationsFromConnectors} at compile seams.
|
|
19
|
-
*/
|
|
20
|
-
export declare const enableLinkedInActorSubjectFromConnectors: (connectorKinds: readonly (string | undefined)[] | undefined, scope?: import("../connect-provider-types.js").IdentityConnectMountContext["scope"]) => void;
|
|
21
|
-
export declare const resetLinkedInActorSubjectEnabledForTests: () => void;
|
|
22
|
-
export declare const isLinkedInConnectConfigured: (env?: NodeJS.ProcessEnv) => boolean;
|
|
23
|
-
export declare const linkedinConnectUrl: (publicAppUrl: string) => string;
|
|
24
|
-
/** Options for {@link createLinkedInIdentityConnectProvider}. */
|
|
25
|
-
export type LinkedInIdentityConnectProviderOptions = FleetIntegrationConnectProviderOptions;
|
|
26
|
-
/** Build a LinkedIn connect provider. */
|
|
27
|
-
export declare const createLinkedInIdentityConnectProvider: (options?: FleetIntegrationConnectProviderOptions) => import("../connect-provider-types.js").IdentityConnectProvider;
|
|
28
|
-
/** Default LinkedIn connect provider used as a built-in mount candidate. */
|
|
29
|
-
export declare const linkedinIdentityConnectProvider: import("../connect-provider-types.js").IdentityConnectProvider;
|
|
30
|
-
/**
|
|
31
|
-
* Opt into Connect-with-LinkedIn on `defineIdentity({ connect: […] })`.
|
|
32
|
-
*
|
|
33
|
-
* Usually unnecessary: declaring `connectors.linkedin` on a user-scoped
|
|
34
|
-
* identity deployment mounts this provider and derives OAuth scopes automatically.
|
|
35
|
-
*/
|
|
36
|
-
export declare const connect: (options?: FleetIntegrationConnectProviderOptions) => import("../connect-provider-types.js").IdentityConnectProvider;
|
|
37
|
-
//# sourceMappingURL=connect-http.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.d.ts","sourceRoot":"","sources":["../../../src/identity/linkedin/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAQ9F,eAAO,MAAM,4BAA4B,QAAwB,CAAC;AAClE,eAAO,MAAM,2BAA2B,QAAyB,CAAC;AAClE,eAAO,MAAM,8BAA8B,QAA0B,CAAC;AACtE,eAAO,MAAM,0BAA0B,QAAsB,CAAC;AAE9D,eAAO,MAAM,6BAA6B,eAAiC,CAAC;AAC5E,eAAO,MAAM,0BAA0B,YAA8B,CAAC;AACtE;;;;GAIG;AACH,eAAO,MAAM,wCAAwC,4JACV,CAAC;AAC5C,eAAO,MAAM,wCAAwC,YACV,CAAC;AAC5C,eAAO,MAAM,2BAA2B,sCAA+B,CAAC;AACxE,eAAO,MAAM,kBAAkB,kCAAsB,CAAC;AAEtD,iEAAiE;AACjE,MAAM,MAAM,sCAAsC,GAChD,sCAAsC,CAAC;AAEzC,yCAAyC;AACzC,eAAO,MAAM,qCAAqC,sHAA0B,CAAC;AAE7E,4EAA4E;AAC5E,eAAO,MAAM,+BAA+B,gEAAoB,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,OAAO,sHAAmB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect-with-LinkedIn — thin adapter over {@link defineFleetIntegrationConnect}.
|
|
3
|
-
*
|
|
4
|
-
* Mounted under `/identity/linkedin/*` when listed on `identity.connect`, or
|
|
5
|
-
* inferred from declared LinkedIn toolserver connectors on a user-scoped
|
|
6
|
-
* deployment.
|
|
7
|
-
*/
|
|
8
|
-
import { LINKEDIN_INTEGRATION } from "../../connectors/toolserver/integrations.js";
|
|
9
|
-
import { defineFleetIntegrationConnect } from "../define-fleet-connect.js";
|
|
10
|
-
import { linkedinByoOauth } from "./oauth.js";
|
|
11
|
-
const linkedin = defineFleetIntegrationConnect({
|
|
12
|
-
integration: LINKEDIN_INTEGRATION,
|
|
13
|
-
byoClient: linkedinByoOauth,
|
|
14
|
-
});
|
|
15
|
-
export const LINKEDIN_CONNECT_STATUS_PATH = linkedin.paths.status;
|
|
16
|
-
export const LINKEDIN_CONNECT_START_PATH = linkedin.paths.connect;
|
|
17
|
-
export const LINKEDIN_CONNECT_CALLBACK_PATH = linkedin.paths.callback;
|
|
18
|
-
export const LINKEDIN_CONNECT_LINK_PATH = linkedin.paths.link;
|
|
19
|
-
export const isLinkedInActorSubjectEnabled = linkedin.isActorSubjectEnabled;
|
|
20
|
-
export const enableLinkedInActorSubject = linkedin.enableActorSubject;
|
|
21
|
-
/**
|
|
22
|
-
* Enable actor-subject mode when LinkedIn connectors imply per-user vault subjects.
|
|
23
|
-
*
|
|
24
|
-
* Prefer {@link enableActorSubjectIntegrationsFromConnectors} at compile seams.
|
|
25
|
-
*/
|
|
26
|
-
export const enableLinkedInActorSubjectFromConnectors = linkedin.enableActorSubjectFromConnectors;
|
|
27
|
-
export const resetLinkedInActorSubjectEnabledForTests = linkedin.resetActorSubjectEnabledForTests;
|
|
28
|
-
export const isLinkedInConnectConfigured = linkedin.isConnectConfigured;
|
|
29
|
-
export const linkedinConnectUrl = linkedin.connectUrl;
|
|
30
|
-
/** Build a LinkedIn connect provider. */
|
|
31
|
-
export const createLinkedInIdentityConnectProvider = linkedin.createProvider;
|
|
32
|
-
/** Default LinkedIn connect provider used as a built-in mount candidate. */
|
|
33
|
-
export const linkedinIdentityConnectProvider = linkedin.provider;
|
|
34
|
-
/**
|
|
35
|
-
* Opt into Connect-with-LinkedIn on `defineIdentity({ connect: […] })`.
|
|
36
|
-
*
|
|
37
|
-
* Usually unnecessary: declaring `connectors.linkedin` on a user-scoped
|
|
38
|
-
* identity deployment mounts this provider and derives OAuth scopes automatically.
|
|
39
|
-
*/
|
|
40
|
-
export const connect = linkedin.connect;
|
|
41
|
-
//# sourceMappingURL=connect-http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.js","sourceRoot":"","sources":["../../../src/identity/linkedin/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAA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export { connect, createLinkedInIdentityConnectProvider, enableLinkedInActorSubject, enableLinkedInActorSubjectFromConnectors, linkedinConnectUrl, linkedinIdentityConnectProvider, isLinkedInActorSubjectEnabled, isLinkedInConnectConfigured, resetLinkedInActorSubjectEnabledForTests, LINKEDIN_CONNECT_CALLBACK_PATH, LINKEDIN_CONNECT_LINK_PATH, LINKEDIN_CONNECT_START_PATH, LINKEDIN_CONNECT_STATUS_PATH, } from "./connect-http.js";
|
|
5
|
-
export type { LinkedInIdentityConnectProviderOptions } from "./connect-http.js";
|
|
6
|
-
export { linkedinOauthTickets } from "./oauth.js";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/identity/linkedin/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,qCAAqC,EACrC,0BAA0B,EAC1B,wCAAwC,EACxC,kBAAkB,EAClB,+BAA+B,EAC/B,6BAA6B,EAC7B,2BAA2B,EAC3B,wCAAwC,EACxC,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,sCAAsC,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LinkedIn identity helpers — Connect-with-LinkedIn (Fleet vault).
|
|
3
|
-
*/
|
|
4
|
-
export { connect, createLinkedInIdentityConnectProvider, enableLinkedInActorSubject, enableLinkedInActorSubjectFromConnectors, linkedinConnectUrl, linkedinIdentityConnectProvider, isLinkedInActorSubjectEnabled, isLinkedInConnectConfigured, resetLinkedInActorSubjectEnabledForTests, LINKEDIN_CONNECT_CALLBACK_PATH, LINKEDIN_CONNECT_LINK_PATH, LINKEDIN_CONNECT_START_PATH, LINKEDIN_CONNECT_STATUS_PATH, } from "./connect-http.js";
|
|
5
|
-
export { linkedinOauthTickets } from "./oauth.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/identity/linkedin/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,qCAAqC,EACrC,0BAA0B,EAC1B,wCAAwC,EACxC,kBAAkB,EAClB,+BAA+B,EAC/B,6BAA6B,EAC7B,2BAA2B,EAC3B,wCAAwC,EACxC,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LinkedIn BYO OAuth descriptor — optional non-LangSmith Connect-with-LinkedIn.
|
|
3
|
-
* The default path uses Fleet auth-sessions instead.
|
|
4
|
-
*/
|
|
5
|
-
import { type ByoOauthConfig, type ByoOauthClient } from "../byo-oauth.js";
|
|
6
|
-
export { MDA_PUBLIC_API_URL_ENV, MDA_PUBLIC_APP_URL_ENV, OAUTH_STATE_SIGNING_KEY_ENV, readOauthStateSigningKey, } from "../byo-oauth.js";
|
|
7
|
-
export type LinkedInOauthConfig = ByoOauthConfig;
|
|
8
|
-
/** LinkedIn BYO OAuth client (config, authorize, exchange, Fleet adapter). */
|
|
9
|
-
export declare const linkedinByoOauth: ByoOauthClient;
|
|
10
|
-
export declare const LINKEDIN_OAUTH_CLIENT_ID_ENV: string;
|
|
11
|
-
export declare const LINKEDIN_OAUTH_CLIENT_SECRET_ENV: string;
|
|
12
|
-
export declare const LINKEDIN_OAUTH_SCOPES_ENV: string;
|
|
13
|
-
export declare const LINKEDIN_OAUTH_AUTH_URL_ENV: string;
|
|
14
|
-
export declare const LINKEDIN_OAUTH_TOKEN_URL_ENV: string;
|
|
15
|
-
export declare const LINKEDIN_OAUTH_USERINFO_URL_ENV: string;
|
|
16
|
-
/** LinkedIn-bound OAuth state / connect-ticket helpers. */
|
|
17
|
-
export declare const linkedinOauthTickets: import("../oauth-tickets.js").OauthTickets;
|
|
18
|
-
export declare const resolveLinkedInOauthRedirectBase: typeof import("../oauth-env.js").resolveOauthRedirectBase;
|
|
19
|
-
export declare const readLinkedInOauthConfig: (env?: NodeJS.ProcessEnv) => ByoOauthConfig | null;
|
|
20
|
-
export declare const buildLinkedInAuthorizeUrl: (config: ByoOauthConfig, state: string, redirectUri: string, scopes?: string) => string;
|
|
21
|
-
export declare const exchangeLinkedInOauthCode: (config: ByoOauthConfig, code: string, redirectUri: string, fetchImpl?: typeof fetch) => Promise<import("../fleet-connect.js").FleetVaultByoTokenResult>;
|
|
22
|
-
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/identity/linkedin/oauth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAUjD,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,EAAE,cAqB7B,CAAC;AAEH,eAAO,MAAM,4BAA4B,QAAgC,CAAC;AAC1E,eAAO,MAAM,gCAAgC,QACV,CAAC;AACpC,eAAO,MAAM,yBAAyB,QAA8B,CAAC;AACrE,eAAO,MAAM,2BAA2B,QAA+B,CAAC;AACxE,eAAO,MAAM,4BAA4B,QAAgC,CAAC;AAC1E,eAAO,MAAM,+BAA+B,QAAmC,CAAC;AAEhF,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,4CAA2B,CAAC;AAE7D,eAAO,MAAM,gCAAgC,2DACP,CAAC;AAEvC,eAAO,MAAM,uBAAuB,oDAA8B,CAAC;AACnE,eAAO,MAAM,yBAAyB,yFAAqC,CAAC;AAC5E,eAAO,MAAM,yBAAyB,0JAAgC,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LinkedIn BYO OAuth descriptor — optional non-LangSmith Connect-with-LinkedIn.
|
|
3
|
-
* The default path uses Fleet auth-sessions instead.
|
|
4
|
-
*/
|
|
5
|
-
import { createByoOauthClient, } from "../byo-oauth.js";
|
|
6
|
-
export { MDA_PUBLIC_API_URL_ENV, MDA_PUBLIC_APP_URL_ENV, OAUTH_STATE_SIGNING_KEY_ENV, readOauthStateSigningKey, } from "../byo-oauth.js";
|
|
7
|
-
const DEFAULT_AUTH_URL = "https://www.linkedin.com/oauth/v2/authorization";
|
|
8
|
-
const DEFAULT_TOKEN_URL = "https://www.linkedin.com/oauth/v2/accessToken";
|
|
9
|
-
const DEFAULT_USERINFO_URL = "https://api.linkedin.com/v2/userinfo";
|
|
10
|
-
/** Profile + Share on LinkedIn; connector-derived unions replace this at authorize time. */
|
|
11
|
-
const DEFAULT_SCOPES = ["openid", "profile", "email", "w_member_social"].join(" ");
|
|
12
|
-
/** LinkedIn BYO OAuth client (config, authorize, exchange, Fleet adapter). */
|
|
13
|
-
export const linkedinByoOauth = createByoOauthClient({
|
|
14
|
-
providerId: "linkedin",
|
|
15
|
-
displayName: "LinkedIn",
|
|
16
|
-
envPrefix: "LINKEDIN_OAUTH",
|
|
17
|
-
defaultEndpoints: () => ({
|
|
18
|
-
authUrl: DEFAULT_AUTH_URL,
|
|
19
|
-
tokenUrl: DEFAULT_TOKEN_URL,
|
|
20
|
-
userInfoUrl: DEFAULT_USERINFO_URL,
|
|
21
|
-
defaultScopes: DEFAULT_SCOPES,
|
|
22
|
-
}),
|
|
23
|
-
parseUserInfo(json) {
|
|
24
|
-
return {
|
|
25
|
-
...(typeof json.email === "string" && json.email
|
|
26
|
-
? { email: json.email }
|
|
27
|
-
: {}),
|
|
28
|
-
...(typeof json.sub === "string" && json.sub
|
|
29
|
-
? { subject: json.sub }
|
|
30
|
-
: {}),
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
subjectMetadataKey: "linkedin_sub",
|
|
34
|
-
});
|
|
35
|
-
export const LINKEDIN_OAUTH_CLIENT_ID_ENV = linkedinByoOauth.env.clientId;
|
|
36
|
-
export const LINKEDIN_OAUTH_CLIENT_SECRET_ENV = linkedinByoOauth.env.clientSecret;
|
|
37
|
-
export const LINKEDIN_OAUTH_SCOPES_ENV = linkedinByoOauth.env.scopes;
|
|
38
|
-
export const LINKEDIN_OAUTH_AUTH_URL_ENV = linkedinByoOauth.env.authUrl;
|
|
39
|
-
export const LINKEDIN_OAUTH_TOKEN_URL_ENV = linkedinByoOauth.env.tokenUrl;
|
|
40
|
-
export const LINKEDIN_OAUTH_USERINFO_URL_ENV = linkedinByoOauth.env.userInfoUrl;
|
|
41
|
-
/** LinkedIn-bound OAuth state / connect-ticket helpers. */
|
|
42
|
-
export const linkedinOauthTickets = linkedinByoOauth.tickets;
|
|
43
|
-
export const resolveLinkedInOauthRedirectBase = linkedinByoOauth.resolveRedirectBase;
|
|
44
|
-
export const readLinkedInOauthConfig = linkedinByoOauth.readConfig;
|
|
45
|
-
export const buildLinkedInAuthorizeUrl = linkedinByoOauth.buildAuthorizeUrl;
|
|
46
|
-
export const exchangeLinkedInOauthCode = linkedinByoOauth.exchangeCode;
|
|
47
|
-
//# sourceMappingURL=oauth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../src/identity/linkedin/oauth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,oBAAoB,GAGrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,sBA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C;AACpC,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC;AACxE,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC;AAEhF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAE7D,MAAM,CAAC,MAAM,gCAAgC,GAC3C,gBAAgB,CAAC,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,UAAU,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,YAAY,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect-hint middleware for Fleet marketplace MCP bridges.
|
|
3
|
-
*
|
|
4
|
-
* Same proactive "not connected yet" system hint as toolserver Fleet OAuth
|
|
5
|
-
* integrations ({@link createFleetConnectHintMiddleware}), but the vault
|
|
6
|
-
* `provider_id` is discovered from the workspace `mcp_servers` row.
|
|
7
|
-
*/
|
|
8
|
-
import type { MarketplaceMcpIntegration } from "../../connectors/marketplace/catalog.js";
|
|
9
|
-
import { resolveMarketplaceMcpServer } from "../../connectors/marketplace/fleet-mcp.js";
|
|
10
|
-
import type { FleetOAuthIntegration } from "../../connectors/toolserver/integrations.js";
|
|
11
|
-
import type { ManagedMiddleware } from "../../runtime/managed-middleware.js";
|
|
12
|
-
import { type FleetConnectHintMiddlewareOptions } from "../fleet-connect-hint.js";
|
|
13
|
-
import { listAgentConnections, type FleetClientOptions } from "../fleet.js";
|
|
14
|
-
/** Adapt a marketplace catalog row to the Fleet Connect / hint integration shape. */
|
|
15
|
-
export declare function marketplaceAsFleetHint(integration: MarketplaceMcpIntegration, providerId?: string): FleetOAuthIntegration;
|
|
16
|
-
export type MarketplaceConnectHintMiddlewareOptions = Omit<FleetConnectHintMiddlewareOptions, "integration" | "providerSlug"> & {
|
|
17
|
-
fleet?: FleetClientOptions & {
|
|
18
|
-
list?: typeof listAgentConnections;
|
|
19
|
-
resolveServer?: typeof resolveMarketplaceMcpServer;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Absolute Connect start URL for a marketplace bridge (with optional ticket).
|
|
24
|
-
*/
|
|
25
|
-
export declare function marketplaceConnectHintUrl(integration: MarketplaceMcpIntegration, env?: NodeJS.ProcessEnv, userId?: string): Promise<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Middleware that injects a system hint when the caller has no vault connection
|
|
28
|
-
* for this marketplace MCP integration.
|
|
29
|
-
*/
|
|
30
|
-
export declare function createMarketplaceConnectHintMiddleware(integration: MarketplaceMcpIntegration, options?: MarketplaceConnectHintMiddlewareOptions): ManagedMiddleware;
|
|
31
|
-
//# sourceMappingURL=connect-hint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-hint.d.ts","sourceRoot":"","sources":["../../../src/identity/marketplace/connect-hint.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAGL,KAAK,iCAAiC,EACvC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE5E,qFAAqF;AACrF,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,yBAAyB,EACtC,UAAU,SAAK,GACd,qBAAqB,CAYvB;AAED,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACxD,iCAAiC,EACjC,aAAa,GAAG,cAAc,CAC/B,GAAG;IACF,KAAK,CAAC,EAAE,kBAAkB,GAAG;QAC3B,IAAI,CAAC,EAAE,OAAO,oBAAoB,CAAC;QACnC,aAAa,CAAC,EAAE,OAAO,2BAA2B,CAAC;KACpD,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,yBAAyB,EACtC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CACpD,WAAW,EAAE,yBAAyB,EACtC,OAAO,GAAE,uCAA4C,GACpD,iBAAiB,CAwBnB"}
|