managed-deepagents 0.6.2-dev.8 → 0.7.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 +34 -16
- package/dist/agent-auth.d.ts +167 -0
- package/dist/agent-auth.d.ts.map +1 -0
- package/dist/agent-auth.js +520 -0
- package/dist/agent-auth.js.map +1 -0
- package/dist/channels/manifest.d.ts +4 -0
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/channels/response-format.d.ts +1 -1
- package/dist/channels/response-format.d.ts.map +1 -1
- package/dist/channels/response-format.js +1 -1
- package/dist/channels/response-format.js.map +1 -1
- package/dist/channels/trigger/http.d.ts +8 -0
- package/dist/channels/trigger/http.d.ts.map +1 -1
- package/dist/channels/trigger/http.js +56 -6
- package/dist/channels/trigger/http.js.map +1 -1
- package/dist/channels/trigger/identity-context.d.ts +47 -0
- package/dist/channels/trigger/identity-context.d.ts.map +1 -0
- package/dist/channels/trigger/identity-context.js +171 -0
- package/dist/channels/trigger/identity-context.js.map +1 -0
- package/dist/channels/trigger/types.d.ts +10 -0
- package/dist/channels/trigger/types.d.ts.map +1 -1
- package/dist/channels/trigger/types.js +5 -0
- package/dist/channels/trigger/types.js.map +1 -1
- package/dist/connection-authorization.d.ts +17 -0
- package/dist/connection-authorization.d.ts.map +1 -0
- package/dist/connection-authorization.js +46 -0
- package/dist/connection-authorization.js.map +1 -0
- package/dist/connections.d.ts +98 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +339 -0
- package/dist/connections.js.map +1 -0
- package/dist/connectors/mcp/index.d.ts +36 -95
- package/dist/connectors/mcp/index.d.ts.map +1 -1
- package/dist/connectors/mcp/index.js +266 -57
- package/dist/connectors/mcp/index.js.map +1 -1
- package/dist/connectors/mcp/schema.d.ts +17 -0
- package/dist/connectors/mcp/schema.d.ts.map +1 -0
- package/dist/connectors/mcp/schema.js +122 -0
- package/dist/connectors/mcp/schema.js.map +1 -0
- package/dist/connectors/mcp/types.d.ts +81 -0
- package/dist/connectors/mcp/types.d.ts.map +1 -0
- package/dist/connectors/mcp/types.js +2 -0
- package/dist/connectors/mcp/types.js.map +1 -0
- package/dist/connectors/tool-selection.d.ts +10 -19
- package/dist/connectors/tool-selection.d.ts.map +1 -1
- package/dist/connectors/tool-selection.js +33 -59
- package/dist/connectors/tool-selection.js.map +1 -1
- package/dist/credential-gate.d.ts +28 -0
- package/dist/credential-gate.d.ts.map +1 -0
- package/dist/credential-gate.js +179 -0
- package/dist/credential-gate.js.map +1 -0
- package/dist/extension.d.ts +3 -3
- package/dist/extension.js +2 -2
- package/dist/identity/index.d.ts +1 -1
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/types.d.ts +102 -5
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +9 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -6
- package/dist/index.js.map +1 -1
- package/dist/ingress/index.d.ts +10 -2
- package/dist/ingress/index.d.ts.map +1 -1
- package/dist/ingress/index.js +18 -9
- package/dist/ingress/index.js.map +1 -1
- package/dist/namespaces.d.ts +12 -29
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +26 -9
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/auth.d.ts +76 -5
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +114 -6
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/http.d.ts +1 -1
- package/dist/runtime/http.d.ts.map +1 -1
- package/dist/runtime/http.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +65 -5
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +164 -0
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +13 -8
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/managed-middleware.d.ts +2 -2
- package/dist/runtime/managed-middleware.js +6 -6
- package/dist/runtime/managed-tools.d.ts +19 -15
- package/dist/runtime/managed-tools.d.ts.map +1 -1
- package/dist/runtime/managed-tools.js +14 -13
- package/dist/runtime/managed-tools.js.map +1 -1
- package/dist/runtime/types.d.ts +2 -2
- package/dist/runtime/validated-token.d.ts.map +1 -1
- package/dist/runtime/validated-token.js +23 -0
- package/dist/runtime/validated-token.js.map +1 -1
- package/package.json +8 -8
- package/dist/connectors/mcp/load.d.ts +0 -12
- package/dist/connectors/mcp/load.d.ts.map +0 -1
- package/dist/connectors/mcp/load.js +0 -122
- package/dist/connectors/mcp/load.js.map +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `connections.get(...)` — read a managed connection from a tool.
|
|
3
|
+
*
|
|
4
|
+
* `{ type: "agent" }` resolves material owned by the current deployment.
|
|
5
|
+
* `{ type: "user" }` resolves per-caller grants (OAuth or opaque). Resolution
|
|
6
|
+
* reads Agent Auth on every await and never caches material.
|
|
7
|
+
*
|
|
8
|
+
* `mda dev` substitutes local values for agent opaque secrets via `MDA_DEV_*`.
|
|
9
|
+
* User-owned connections talk to Agent Auth in every environment (including
|
|
10
|
+
* `mda dev`) after resolving the caller's Agent Auth principal. Missing grants
|
|
11
|
+
* interrupt at the point of access, including calls from custom tools and
|
|
12
|
+
* middleware.
|
|
13
|
+
*/
|
|
14
|
+
import type { RuntimeIdentity } from "./identity/index.js";
|
|
15
|
+
import { CredentialStoreError, type AgentAuthContext } from "./agent-auth.js";
|
|
16
|
+
export { AGENT_AUTH_TIMEOUT_MS, AgentAuthUnknownProviderError, clearPrincipalResolveCacheForTests, CredentialAuthorizationRequiredError, CredentialStoreError, } from "./agent-auth.js";
|
|
17
|
+
export type { AgentAuthContext, PendingAuthorization, ResolvePrincipalIdentity, } from "./agent-auth.js";
|
|
18
|
+
export type AgentConnectionOwner = {
|
|
19
|
+
type: "agent";
|
|
20
|
+
};
|
|
21
|
+
export type UserConnectionOwner = {
|
|
22
|
+
type: "user";
|
|
23
|
+
id?: string;
|
|
24
|
+
};
|
|
25
|
+
export type ConnectionOwner = AgentConnectionOwner | UserConnectionOwner;
|
|
26
|
+
export interface ConnectionRequest {
|
|
27
|
+
slug: string;
|
|
28
|
+
owner: ConnectionOwner;
|
|
29
|
+
identity?: RuntimeIdentity;
|
|
30
|
+
}
|
|
31
|
+
declare const CONNECTION_REFERENCE: unique symbol;
|
|
32
|
+
export declare class ConnectionNotFoundError extends Error {
|
|
33
|
+
readonly slug: string;
|
|
34
|
+
readonly ownerType: ConnectionOwner["type"];
|
|
35
|
+
constructor(slug: string, ownerType: ConnectionOwner["type"]);
|
|
36
|
+
}
|
|
37
|
+
/** `LANGSMITH_ENDPOINT` is missing a usable Agent Auth origin. */
|
|
38
|
+
export declare class InvalidAgentAuthEndpointError extends CredentialStoreError {
|
|
39
|
+
readonly name = "InvalidAgentAuthEndpointError";
|
|
40
|
+
constructor();
|
|
41
|
+
}
|
|
42
|
+
export declare class ConnectionReference implements PromiseLike<string> {
|
|
43
|
+
readonly slug: string;
|
|
44
|
+
readonly owner: ConnectionOwner;
|
|
45
|
+
private readonly accessor;
|
|
46
|
+
readonly [CONNECTION_REFERENCE] = true;
|
|
47
|
+
constructor(slug: string, owner: ConnectionOwner, accessor: Connections);
|
|
48
|
+
then<TResult1 = string, TResult2 = never>(onfulfilled?: ((value: string) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
|
|
49
|
+
}
|
|
50
|
+
export declare function isConnectionReference(value: unknown): value is ConnectionReference;
|
|
51
|
+
export interface AgentAuthConfig {
|
|
52
|
+
baseUrl: string;
|
|
53
|
+
apiKey: string;
|
|
54
|
+
deploymentId?: string;
|
|
55
|
+
workspaceId?: string;
|
|
56
|
+
localDevPrincipalId?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare class AgentAuthConnectionStore {
|
|
59
|
+
private readonly env;
|
|
60
|
+
private readonly fetchImpl;
|
|
61
|
+
private readonly timeoutMs;
|
|
62
|
+
constructor(env?: NodeJS.ProcessEnv, fetchImpl?: typeof fetch, timeoutMs?: number);
|
|
63
|
+
fetch(request: ConnectionRequest): Promise<string | undefined>;
|
|
64
|
+
}
|
|
65
|
+
export declare class Connections {
|
|
66
|
+
private readonly store;
|
|
67
|
+
constructor(store?: AgentAuthConnectionStore);
|
|
68
|
+
get(slug: string, owner: ConnectionOwner): ConnectionReference;
|
|
69
|
+
resolve(slug: string, owner: ConnectionOwner): Promise<string>;
|
|
70
|
+
resolveDeploymentSecret(slug: string): Promise<string>;
|
|
71
|
+
}
|
|
72
|
+
export declare function agentConnectionEnvKey(slug: string): string;
|
|
73
|
+
export declare function resolveOwnerId(owner: ConnectionOwner, identity: RuntimeIdentity | undefined, deploymentId: string | undefined): string;
|
|
74
|
+
/**
|
|
75
|
+
* Build Agent Auth context for user-owned credential ops (gate + connections).
|
|
76
|
+
*
|
|
77
|
+
* Resolves the Agent Auth principal UUID from channel stamps or
|
|
78
|
+
* `POST /v1/agent-auth/principals`. Works under `mda dev` when workspace
|
|
79
|
+
* Agent Auth env is configured; does not require `LANGSMITH_HOST_PROJECT_ID`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function resolveAgentAuthContext(identity: RuntimeIdentity | undefined, env?: NodeJS.ProcessEnv, fetchImpl?: typeof fetch, timeoutMs?: number): Promise<AgentAuthContext>;
|
|
82
|
+
/**
|
|
83
|
+
* Map a runtime identity to the Agent Auth principal used for user grants.
|
|
84
|
+
*
|
|
85
|
+
* 1. Channel `identity_context` → already-resolved UUID
|
|
86
|
+
* 2. Validated-token → resolve `(provider, iss, subject)`
|
|
87
|
+
* 3. Trusted backend / other person → resolve `trusted_backend` + workspace
|
|
88
|
+
*/
|
|
89
|
+
export declare function resolveCredentialPrincipalId(identity: RuntimeIdentity | undefined, config: AgentAuthConfig, fetchImpl?: typeof fetch, timeoutMs?: number): Promise<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Origin for Agent Auth HTTP calls from `LANGSMITH_ENDPOINT`.
|
|
92
|
+
*
|
|
93
|
+
* Cloud SaaS revisions omit that reserved name and inject `LANGCHAIN_ENDPOINT`
|
|
94
|
+
* instead; read it as the same setting so we do not default to production.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveAgentAuthBaseUrl(env?: NodeJS.ProcessEnv): string;
|
|
97
|
+
export declare const connections: Connections;
|
|
98
|
+
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAIL,oBAAoB,EACpB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,EACpC,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,QAAA,MAAM,oBAAoB,eAA0C,CAAC;AASrE,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,E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M,CAAC,CA2CjB;AAqDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAuBR;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `connections.get(...)` — read a managed connection from a tool.
|
|
3
|
+
*
|
|
4
|
+
* `{ type: "agent" }` resolves material owned by the current deployment.
|
|
5
|
+
* `{ type: "user" }` resolves per-caller grants (OAuth or opaque). Resolution
|
|
6
|
+
* reads Agent Auth on every await and never caches material.
|
|
7
|
+
*
|
|
8
|
+
* `mda dev` substitutes local values for agent opaque secrets via `MDA_DEV_*`.
|
|
9
|
+
* User-owned connections talk to Agent Auth in every environment (including
|
|
10
|
+
* `mda dev`) after resolving the caller's Agent Auth principal. Missing grants
|
|
11
|
+
* interrupt at the point of access, including calls from custom tools and
|
|
12
|
+
* middleware.
|
|
13
|
+
*/
|
|
14
|
+
import { AGENT_AUTH_TIMEOUT_MS, AgentAuth, CredentialAuthorizationRequiredError, CredentialStoreError, } from "./agent-auth.js";
|
|
15
|
+
import { buildRuntimeIdentity, resolveRuntimeConfigurable, } from "./runtime/identity-runtime.js";
|
|
16
|
+
import { resolveUserConnectionGrants } from "./connection-authorization.js";
|
|
17
|
+
export { AGENT_AUTH_TIMEOUT_MS, AgentAuthUnknownProviderError, clearPrincipalResolveCacheForTests, CredentialAuthorizationRequiredError, CredentialStoreError, } from "./agent-auth.js";
|
|
18
|
+
const CONNECTION_REFERENCE = Symbol("managed-deepagents.connection");
|
|
19
|
+
const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
20
|
+
const MAX_SLUG_LENGTH = 64;
|
|
21
|
+
const DEFAULT_LANGSMITH_ENDPOINT = "https://api.smith.langchain.com";
|
|
22
|
+
const DEV_CREDENTIAL_PREFIX = "MDA_DEV_";
|
|
23
|
+
const TRUSTED_BACKEND_PROVIDER = "trusted_backend";
|
|
24
|
+
const LOCAL_DEV_USER = "mda:local-dev";
|
|
25
|
+
const LOCAL_DEV_PRINCIPAL_ENV = "MDA_AGENT_AUTH_PRINCIPAL_ID";
|
|
26
|
+
export class ConnectionNotFoundError extends Error {
|
|
27
|
+
slug;
|
|
28
|
+
ownerType;
|
|
29
|
+
constructor(slug, ownerType) {
|
|
30
|
+
super(`no ${ownerType} connection is set for slug ${JSON.stringify(slug)}`);
|
|
31
|
+
this.name = "ConnectionNotFoundError";
|
|
32
|
+
this.slug = slug;
|
|
33
|
+
this.ownerType = ownerType;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** `LANGSMITH_ENDPOINT` is missing a usable Agent Auth origin. */
|
|
37
|
+
export class InvalidAgentAuthEndpointError extends CredentialStoreError {
|
|
38
|
+
name = "InvalidAgentAuthEndpointError";
|
|
39
|
+
constructor() {
|
|
40
|
+
super("LangSmith Agent Auth endpoint is not a valid URL (set LANGSMITH_ENDPOINT)");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export class ConnectionReference {
|
|
44
|
+
slug;
|
|
45
|
+
owner;
|
|
46
|
+
accessor;
|
|
47
|
+
[CONNECTION_REFERENCE] = true;
|
|
48
|
+
constructor(slug, owner, accessor) {
|
|
49
|
+
this.slug = slug;
|
|
50
|
+
this.owner = owner;
|
|
51
|
+
this.accessor = accessor;
|
|
52
|
+
}
|
|
53
|
+
then(onfulfilled, onrejected) {
|
|
54
|
+
return this.accessor
|
|
55
|
+
.resolve(this.slug, this.owner)
|
|
56
|
+
.then(onfulfilled, onrejected);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function isConnectionReference(value) {
|
|
60
|
+
return (value instanceof ConnectionReference ||
|
|
61
|
+
(typeof value === "object" &&
|
|
62
|
+
value !== null &&
|
|
63
|
+
CONNECTION_REFERENCE in value));
|
|
64
|
+
}
|
|
65
|
+
export class AgentAuthConnectionStore {
|
|
66
|
+
env;
|
|
67
|
+
fetchImpl;
|
|
68
|
+
timeoutMs;
|
|
69
|
+
constructor(env = process.env, fetchImpl = fetch, timeoutMs = AGENT_AUTH_TIMEOUT_MS) {
|
|
70
|
+
this.env = env;
|
|
71
|
+
this.fetchImpl = fetchImpl;
|
|
72
|
+
this.timeoutMs = timeoutMs;
|
|
73
|
+
}
|
|
74
|
+
async fetch(request) {
|
|
75
|
+
if (this.env.MDA_LOCAL_DEV === "1" && request.owner.type === "agent") {
|
|
76
|
+
const value = this.env[agentConnectionEnvKey(request.slug)];
|
|
77
|
+
if (value !== undefined && value.trim()) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
throw new CredentialStoreError(`local agent connection ${JSON.stringify(request.slug)} is not configured; ` +
|
|
81
|
+
`set ${agentConnectionEnvKey(request.slug)}`);
|
|
82
|
+
}
|
|
83
|
+
const config = resolveAgentAuthConfig(this.env);
|
|
84
|
+
if (request.owner.type === "agent" && !config.deploymentId) {
|
|
85
|
+
throw new CredentialStoreError("connections are not configured: LANGSMITH_HOST_PROJECT_ID is not set");
|
|
86
|
+
}
|
|
87
|
+
const principalId = request.owner.type === "user"
|
|
88
|
+
? await resolveCredentialPrincipalId(request.identity, config, this.fetchImpl, this.timeoutMs)
|
|
89
|
+
: resolveOwnerId(request.owner, request.identity, config.deploymentId);
|
|
90
|
+
// Owner id match still uses the source identity (JWT sub / channel actor).
|
|
91
|
+
if (request.owner.type === "user") {
|
|
92
|
+
resolveOwnerId(request.owner, request.identity, config.deploymentId);
|
|
93
|
+
}
|
|
94
|
+
const client = new AgentAuth({
|
|
95
|
+
baseUrl: config.baseUrl,
|
|
96
|
+
agentId: config.deploymentId,
|
|
97
|
+
principalId,
|
|
98
|
+
apiKey: config.apiKey,
|
|
99
|
+
workspaceId: config.workspaceId,
|
|
100
|
+
}, this.fetchImpl, this.timeoutMs);
|
|
101
|
+
if (request.owner.type === "user") {
|
|
102
|
+
return (await resolveUserConnectionGrants(client, [request.slug])).get(request.slug);
|
|
103
|
+
}
|
|
104
|
+
const row = await client.findWorkspaceConnection(request.slug);
|
|
105
|
+
if (!row) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
if (row.kind === "secret") {
|
|
109
|
+
const credentialId = await client.findSecretCredentialId(row, request.slug);
|
|
110
|
+
if (!credentialId) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
return await client.readSecret(credentialId);
|
|
114
|
+
}
|
|
115
|
+
if (row.kind === "oauth2") {
|
|
116
|
+
return await client.readAgentAccessTokenForConnection(row);
|
|
117
|
+
}
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export class Connections {
|
|
122
|
+
store;
|
|
123
|
+
constructor(store = new AgentAuthConnectionStore()) {
|
|
124
|
+
this.store = store;
|
|
125
|
+
}
|
|
126
|
+
get(slug, owner) {
|
|
127
|
+
return new ConnectionReference(normalizeSlug(slug), normalizeOwner(owner), this);
|
|
128
|
+
}
|
|
129
|
+
async resolve(slug, owner) {
|
|
130
|
+
const configurable = resolveRuntimeConfigurable(undefined);
|
|
131
|
+
if (!configurable) {
|
|
132
|
+
throw new Error("connections.get(...) must be awaited inside a run: resolve a connection in a tool or middleware, not at import time");
|
|
133
|
+
}
|
|
134
|
+
const value = await this.store.fetch({
|
|
135
|
+
slug,
|
|
136
|
+
owner,
|
|
137
|
+
identity: buildRuntimeIdentity(configurable),
|
|
138
|
+
});
|
|
139
|
+
if (value === undefined) {
|
|
140
|
+
throw owner.type === "user"
|
|
141
|
+
? new CredentialAuthorizationRequiredError([slug])
|
|
142
|
+
: new ConnectionNotFoundError(slug, owner.type);
|
|
143
|
+
}
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
async resolveDeploymentSecret(slug) {
|
|
147
|
+
const value = await this.store.fetch({
|
|
148
|
+
slug,
|
|
149
|
+
owner: { type: "agent" },
|
|
150
|
+
});
|
|
151
|
+
if (value === undefined) {
|
|
152
|
+
throw new ConnectionNotFoundError(slug, "agent");
|
|
153
|
+
}
|
|
154
|
+
return value;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export function agentConnectionEnvKey(slug) {
|
|
158
|
+
return `${DEV_CREDENTIAL_PREFIX}${normalizeSlug(slug)
|
|
159
|
+
.toUpperCase()
|
|
160
|
+
.replaceAll("-", "_")}`;
|
|
161
|
+
}
|
|
162
|
+
function normalizeSlug(slug) {
|
|
163
|
+
if (typeof slug !== "string") {
|
|
164
|
+
throw new TypeError("connection slug must be a string");
|
|
165
|
+
}
|
|
166
|
+
const canonical = slug.trim();
|
|
167
|
+
if (!canonical ||
|
|
168
|
+
canonical.length > MAX_SLUG_LENGTH ||
|
|
169
|
+
!SLUG_PATTERN.test(canonical)) {
|
|
170
|
+
throw new TypeError(`connection slug ${JSON.stringify(slug)} is invalid: use lowercase letters, digits, and single hyphens, at most ${MAX_SLUG_LENGTH} characters`);
|
|
171
|
+
}
|
|
172
|
+
return canonical;
|
|
173
|
+
}
|
|
174
|
+
function normalizeOwner(owner) {
|
|
175
|
+
if (!owner || typeof owner !== "object") {
|
|
176
|
+
throw new TypeError('connection owner is required: pass { type: "agent" } or { type: "user" }');
|
|
177
|
+
}
|
|
178
|
+
const keys = Object.keys(owner);
|
|
179
|
+
if (keys.some((key) => key !== "type" && key !== "id")) {
|
|
180
|
+
throw new TypeError("connection owner has an unknown key");
|
|
181
|
+
}
|
|
182
|
+
if (owner.type === "agent") {
|
|
183
|
+
if ("id" in owner) {
|
|
184
|
+
throw new TypeError('connection owner "id" is not accepted for { type: "agent" }');
|
|
185
|
+
}
|
|
186
|
+
return { type: "agent" };
|
|
187
|
+
}
|
|
188
|
+
if (owner.type === "user") {
|
|
189
|
+
if (owner.id === undefined)
|
|
190
|
+
return { type: "user" };
|
|
191
|
+
if (typeof owner.id !== "string" || !owner.id.trim()) {
|
|
192
|
+
throw new TypeError('connection owner "id" must be a non-empty string');
|
|
193
|
+
}
|
|
194
|
+
return { type: "user", id: owner.id.trim() };
|
|
195
|
+
}
|
|
196
|
+
throw new TypeError("connection owner type is not supported");
|
|
197
|
+
}
|
|
198
|
+
export function resolveOwnerId(owner, identity, deploymentId) {
|
|
199
|
+
if (owner.type === "user") {
|
|
200
|
+
const authenticated = identity?.user.id;
|
|
201
|
+
if (!authenticated) {
|
|
202
|
+
throw new CredentialStoreError("user connections require an authenticated user principal");
|
|
203
|
+
}
|
|
204
|
+
if (owner.id !== undefined && owner.id !== authenticated) {
|
|
205
|
+
throw new CredentialStoreError("user connection owner id must match the authenticated principal");
|
|
206
|
+
}
|
|
207
|
+
return authenticated;
|
|
208
|
+
}
|
|
209
|
+
if (!deploymentId) {
|
|
210
|
+
throw new CredentialStoreError("connections are not configured: LANGSMITH_HOST_PROJECT_ID is not set");
|
|
211
|
+
}
|
|
212
|
+
return deploymentId;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Build Agent Auth context for user-owned credential ops (gate + connections).
|
|
216
|
+
*
|
|
217
|
+
* Resolves the Agent Auth principal UUID from channel stamps or
|
|
218
|
+
* `POST /v1/agent-auth/principals`. Works under `mda dev` when workspace
|
|
219
|
+
* Agent Auth env is configured; does not require `LANGSMITH_HOST_PROJECT_ID`.
|
|
220
|
+
*/
|
|
221
|
+
export async function resolveAgentAuthContext(identity, env = process.env, fetchImpl = fetch, timeoutMs = AGENT_AUTH_TIMEOUT_MS) {
|
|
222
|
+
const config = resolveAgentAuthConfig(env);
|
|
223
|
+
const principalId = await resolveCredentialPrincipalId(identity, config, fetchImpl, timeoutMs);
|
|
224
|
+
return {
|
|
225
|
+
baseUrl: config.baseUrl,
|
|
226
|
+
agentId: config.deploymentId,
|
|
227
|
+
principalId,
|
|
228
|
+
apiKey: config.apiKey,
|
|
229
|
+
workspaceId: config.workspaceId,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Map a runtime identity to the Agent Auth principal used for user grants.
|
|
234
|
+
*
|
|
235
|
+
* 1. Channel `identity_context` → already-resolved UUID
|
|
236
|
+
* 2. Validated-token → resolve `(provider, iss, subject)`
|
|
237
|
+
* 3. Trusted backend / other person → resolve `trusted_backend` + workspace
|
|
238
|
+
*/
|
|
239
|
+
export async function resolveCredentialPrincipalId(identity, config, fetchImpl = fetch, timeoutMs = AGENT_AUTH_TIMEOUT_MS) {
|
|
240
|
+
if (!identity?.user.id) {
|
|
241
|
+
throw new CredentialStoreError("user connections require an authenticated user principal");
|
|
242
|
+
}
|
|
243
|
+
if (identity.user.kind === "service") {
|
|
244
|
+
if (identity.user.id === LOCAL_DEV_USER &&
|
|
245
|
+
config.localDevPrincipalId?.trim()) {
|
|
246
|
+
return config.localDevPrincipalId.trim();
|
|
247
|
+
}
|
|
248
|
+
throw new CredentialStoreError("user-owned connections require a person principal; " +
|
|
249
|
+
"Studio and other service callers cannot own OAuth grants");
|
|
250
|
+
}
|
|
251
|
+
if (identity.agentAuthPrincipalId?.trim()) {
|
|
252
|
+
return identity.agentAuthPrincipalId.trim();
|
|
253
|
+
}
|
|
254
|
+
const subject = identity.user.id.trim();
|
|
255
|
+
const external = externalIdentityForResolve(identity, config.workspaceId);
|
|
256
|
+
if (!external) {
|
|
257
|
+
throw new CredentialStoreError("user-owned connections need a resolvable identity " +
|
|
258
|
+
"(validated-token issuer/subject, channel identity_context, or trusted backend)");
|
|
259
|
+
}
|
|
260
|
+
const bootstrap = new AgentAuth({
|
|
261
|
+
baseUrl: config.baseUrl,
|
|
262
|
+
principalId: subject,
|
|
263
|
+
apiKey: config.apiKey,
|
|
264
|
+
workspaceId: config.workspaceId,
|
|
265
|
+
agentId: config.deploymentId,
|
|
266
|
+
}, fetchImpl, timeoutMs);
|
|
267
|
+
return await bootstrap.resolvePrincipal(external);
|
|
268
|
+
}
|
|
269
|
+
function externalIdentityForResolve(identity, workspaceId) {
|
|
270
|
+
const provider = identity.identityProvider?.trim();
|
|
271
|
+
const issuer = identity.identityIssuer?.trim();
|
|
272
|
+
const subject = identity.identitySubject?.trim();
|
|
273
|
+
if (provider && issuer && subject) {
|
|
274
|
+
return { provider, issuer, subject };
|
|
275
|
+
}
|
|
276
|
+
// Trusted-backend and other person principals without OIDC stamps.
|
|
277
|
+
const trustedSubject = identity.user.id.trim();
|
|
278
|
+
if (!trustedSubject) {
|
|
279
|
+
return undefined;
|
|
280
|
+
}
|
|
281
|
+
const workspace = workspaceId?.trim();
|
|
282
|
+
if (!workspace) {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
return {
|
|
286
|
+
provider: TRUSTED_BACKEND_PROVIDER,
|
|
287
|
+
issuer: workspace,
|
|
288
|
+
subject: trustedSubject,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function resolveAgentAuthConfig(env) {
|
|
292
|
+
const apiKey = env.LANGSMITH_API_KEY?.trim();
|
|
293
|
+
if (!apiKey) {
|
|
294
|
+
throw new CredentialStoreError("connections are not configured: LANGSMITH_API_KEY is not set");
|
|
295
|
+
}
|
|
296
|
+
const workspaceId = env.LANGSMITH_WORKSPACE_ID?.trim();
|
|
297
|
+
if (!workspaceId) {
|
|
298
|
+
throw new CredentialStoreError("connections are not configured: LANGSMITH_WORKSPACE_ID is not set");
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
baseUrl: resolveAgentAuthBaseUrl(env),
|
|
302
|
+
apiKey,
|
|
303
|
+
deploymentId: env.LANGSMITH_HOST_PROJECT_ID?.trim() || undefined,
|
|
304
|
+
workspaceId,
|
|
305
|
+
localDevPrincipalId: env.MDA_LOCAL_DEV === "1"
|
|
306
|
+
? env[LOCAL_DEV_PRINCIPAL_ENV]?.trim() || undefined
|
|
307
|
+
: undefined,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Origin for Agent Auth HTTP calls from `LANGSMITH_ENDPOINT`.
|
|
312
|
+
*
|
|
313
|
+
* Cloud SaaS revisions omit that reserved name and inject `LANGCHAIN_ENDPOINT`
|
|
314
|
+
* instead; read it as the same setting so we do not default to production.
|
|
315
|
+
*/
|
|
316
|
+
export function resolveAgentAuthBaseUrl(env = process.env) {
|
|
317
|
+
const raw = env.LANGSMITH_ENDPOINT?.trim() ||
|
|
318
|
+
env.LANGCHAIN_ENDPOINT?.trim() ||
|
|
319
|
+
DEFAULT_LANGSMITH_ENDPOINT;
|
|
320
|
+
let parsed;
|
|
321
|
+
try {
|
|
322
|
+
parsed = new URL(raw);
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
throw new InvalidAgentAuthEndpointError();
|
|
326
|
+
}
|
|
327
|
+
if (!["http:", "https:"].includes(parsed.protocol) ||
|
|
328
|
+
!parsed.hostname ||
|
|
329
|
+
parsed.username ||
|
|
330
|
+
parsed.password ||
|
|
331
|
+
(parsed.pathname !== "/" && parsed.pathname !== "") ||
|
|
332
|
+
parsed.search ||
|
|
333
|
+
parsed.hash) {
|
|
334
|
+
throw new InvalidAgentAuthEndpointError();
|
|
335
|
+
}
|
|
336
|
+
return parsed.origin;
|
|
337
|
+
}
|
|
338
|
+
export const connections = new Connections();
|
|
339
|
+
//# sourceMappingURL=connections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../src/connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,oCAAoC,EACpC,oBAAoB,GAErB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,EACpC,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAiBzB,MAAM,oBAAoB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AACrE,MAAM,YAAY,GAAG,4BAA4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CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,6BAA6B,EAAE,CAAC;IAC5C,CAAC;IACD,IACE,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC9C,CAAC,MAAM,CAAC,QAAQ;QAChB,MAAM,CAAC,QAAQ;QACf,MAAM,CAAC,QAAQ;QACf,CAAC,MAAM,CAAC,QAAQ,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,CAAC;QACnD,MAAM,CAAC,MAAM;QACb,MAAM,CAAC,IAAI,EACX,CAAC;QACD,MAAM,IAAI,6BAA6B,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The managed
|
|
2
|
+
* The managed MCP declaration primitive.
|
|
3
3
|
*
|
|
4
4
|
* A Managed Deep Agent declares the remote MCP servers whose tools it wants in
|
|
5
|
-
* `
|
|
5
|
+
* `tools/mcp.ts` with `defineMcp(...)`. MDA discovers that
|
|
6
6
|
* declaration, creates the `@langchain/mcp-adapters` client, loads the tools,
|
|
7
7
|
* and adds them to the Deep Agent at runtime — the author never imports the MCP
|
|
8
8
|
* client or calls `getTools()`.
|
|
@@ -17,111 +17,52 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
|
-
* //
|
|
21
|
-
* import {
|
|
20
|
+
* // tools/mcp.ts
|
|
21
|
+
* import { defineMcp, connections } from "managed-deepagents";
|
|
22
22
|
*
|
|
23
|
-
* export const
|
|
24
|
-
*
|
|
23
|
+
* export const mcp = defineMcp({
|
|
24
|
+
* servers: {
|
|
25
25
|
* docs: {
|
|
26
26
|
* transport: "http",
|
|
27
27
|
* url: "https://docs.example.com/mcp",
|
|
28
28
|
* },
|
|
29
|
+
* notion: {
|
|
30
|
+
* transport: "http",
|
|
31
|
+
* url: "https://mcp.notion.com/mcp",
|
|
32
|
+
* connection: connections.get("notion", { type: "user" }),
|
|
33
|
+
* },
|
|
29
34
|
* },
|
|
30
35
|
* });
|
|
31
36
|
* ```
|
|
32
37
|
*/
|
|
33
|
-
import type {
|
|
34
|
-
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
/** Shared options for all remote MCP server connections. */
|
|
48
|
-
export interface RemoteMcpServerBaseConfig extends McpToolSelectionConfig {
|
|
49
|
-
/** URL of the remote MCP server endpoint. */
|
|
50
|
-
url: string;
|
|
51
|
-
/** Optional static headers sent when connecting to the MCP server. */
|
|
52
|
-
headers?: Record<string, string>;
|
|
53
|
-
/** Default timeout, in milliseconds, for tools loaded from this server. */
|
|
54
|
-
defaultToolTimeout?: number;
|
|
55
|
-
}
|
|
56
|
-
/** Streamable HTTP MCP server connection. */
|
|
57
|
-
export interface HttpMcpServerConfig extends RemoteMcpServerBaseConfig {
|
|
58
|
-
/** Remote transport. `"http"` selects Streamable HTTP. */
|
|
59
|
-
transport: "http";
|
|
60
|
-
/**
|
|
61
|
-
* Whether the client may fall back to SSE if the server does not support
|
|
62
|
-
* Streamable HTTP. Defaults to the behavior of `@langchain/mcp-adapters`.
|
|
63
|
-
*/
|
|
64
|
-
automaticSSEFallback?: boolean;
|
|
65
|
-
}
|
|
66
|
-
/** Legacy SSE MCP server connection. */
|
|
67
|
-
export interface SseMcpServerConfig extends RemoteMcpServerBaseConfig {
|
|
68
|
-
/** Remote transport. `"sse"` selects legacy SSE. */
|
|
69
|
-
transport: "sse";
|
|
70
|
-
/** Reconnection behavior for SSE MCP servers. */
|
|
71
|
-
reconnect?: {
|
|
72
|
-
enabled: boolean;
|
|
73
|
-
maxAttempts?: number;
|
|
74
|
-
delayMs?: number;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/** A remote MCP server connection. Stdio servers are intentionally excluded. */
|
|
78
|
-
export type RemoteMcpServerConfig = HttpMcpServerConfig | SseMcpServerConfig;
|
|
79
|
-
/** Configuration accepted by `connectors.mcp`. */
|
|
80
|
-
export interface McpServersConfig {
|
|
81
|
-
/**
|
|
82
|
-
* MCP servers to connect to. Each key is the logical server name MDA uses
|
|
83
|
-
* for validation, tracing metadata, and tool-name prefixing.
|
|
84
|
-
*/
|
|
85
|
-
mcpServers: Record<string, RemoteMcpServerConfig>;
|
|
86
|
-
/**
|
|
87
|
-
* Whether tool names should be prefixed with the MCP server name (e.g.
|
|
88
|
-
* `docs__search`). Defaults to `true`, which avoids collisions between
|
|
89
|
-
* authored tools and common MCP tool names like `search` or `read`.
|
|
90
|
-
*/
|
|
91
|
-
prefixToolNameWithServerName?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Whether tool loading should fail if a tool cannot be loaded. Defaults to
|
|
94
|
-
* `true` — a managed deployment should fail rather than start with a
|
|
95
|
-
* partially loaded tool surface.
|
|
96
|
-
*/
|
|
97
|
-
throwOnLoadError?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Whether MCP tool outputs should be converted to LangChain standard content
|
|
100
|
-
* blocks. Defaults to `true` for new managed agents.
|
|
101
|
-
*/
|
|
102
|
-
useStandardContentBlocks?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Behavior when an MCP server cannot be connected. Only `"throw"` is
|
|
105
|
-
* supported for the POC — a failed connection fails the deployment.
|
|
106
|
-
*/
|
|
107
|
-
onConnectionError?: "throw";
|
|
108
|
-
}
|
|
38
|
+
import type { CredentialConsumer, LoadedCredentialTools } from "../../credential-gate.js";
|
|
39
|
+
import type { McpServersConfig, McpServersDefinition } from "./types.js";
|
|
40
|
+
export type * from "./types.js";
|
|
41
|
+
/**
|
|
42
|
+
* Load (and cache) the MCP tools for one connector declaration.
|
|
43
|
+
*
|
|
44
|
+
* A failed load is never cached, so a transient connection error on the first
|
|
45
|
+
* run can be retried on the next, but a misconfigured deployment surfaces the
|
|
46
|
+
* error rather than silently starting with no tools.
|
|
47
|
+
*/
|
|
48
|
+
export declare function loadManagedMcpTools(connectors: McpServersDefinition): Promise<unknown[]>;
|
|
49
|
+
/** Clear the process-level MCP tool cache. Test-only. */
|
|
50
|
+
export declare function clearManagedMcpToolsCacheForTests(connectors?: McpServersDefinition): void;
|
|
109
51
|
/**
|
|
110
|
-
* The
|
|
111
|
-
*
|
|
112
|
-
*
|
|
52
|
+
* The credential gate's view of the declared MCP connectors.
|
|
53
|
+
*
|
|
54
|
+
* One consumer per declaration that names a user-owned connection; a
|
|
55
|
+
* declaration that needs no grant never reaches the gate.
|
|
113
56
|
*/
|
|
114
|
-
export
|
|
115
|
-
/** Internal discriminator used by the MDA loader. */
|
|
116
|
-
readonly kind: "mcp_servers";
|
|
117
|
-
}
|
|
57
|
+
export declare function mcpCredentialConsumers(connectors: readonly unknown[] | undefined): CredentialConsumer[];
|
|
118
58
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
59
|
+
* Load tools for user-connection servers, once the gate has confirmed the
|
|
60
|
+
* caller's grants.
|
|
121
61
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* installs never pull in `@langchain/mcp-adapters`.
|
|
62
|
+
* Not process-cached here: the Authorization header is per caller, so the gate
|
|
63
|
+
* owns both the cache and closing the returned transport.
|
|
125
64
|
*/
|
|
126
|
-
export declare
|
|
65
|
+
export declare function loadUserConnectionMcpTools(connectors: McpServersDefinition, accessTokens: ReadonlyMap<string, string>): Promise<LoadedCredentialTools>;
|
|
66
|
+
/** Declare remote MCP servers whose tools load at agent-graph construction. */
|
|
67
|
+
export declare const defineMcp: (config: McpServersConfig) => McpServersDefinition;
|
|
127
68
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/mcp/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAUH,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAEpB,mBAAmB,YAAY,CAAC;AAkBhC;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,oBAAoB,GAC/B,OAAO,CAAC,OAAO,EAAE,CAAC,CAWpB;AAED,yDAAyD;AACzD,wBAAgB,iCAAiC,CAC/C,UAAU,CAAC,EAAE,oBAAoB,GAChC,IAAI,CAMN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GACzC,kBAAkB,EAAE,CAuBtB;AA0ED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,oBAAoB,EAChC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAyBhC;AAsKD,+EAA+E;AAC/E,eAAO,MAAM,SAAS,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,oBAOlD,CAAC"}
|