managed-deepagents 0.9.0-dev.1 → 0.9.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -36
- package/dist/agent-entry.d.ts +6 -0
- package/dist/agent-entry.d.ts.map +1 -0
- package/dist/agent-entry.js +2 -0
- package/dist/agent-entry.js.map +1 -0
- package/dist/channels/binding.d.ts +5 -0
- package/dist/channels/binding.d.ts.map +1 -1
- package/dist/channels/binding.js +4 -1
- package/dist/channels/binding.js.map +1 -1
- package/dist/channels/messaging-registry.d.ts +2 -0
- package/dist/channels/messaging-registry.d.ts.map +1 -1
- package/dist/channels/messaging-registry.js +10 -0
- package/dist/channels/messaging-registry.js.map +1 -1
- package/dist/channels/reactions.d.ts +32 -0
- package/dist/channels/reactions.d.ts.map +1 -0
- package/dist/channels/reactions.js +53 -0
- package/dist/channels/reactions.js.map +1 -0
- package/dist/channels/response-format.d.ts +1 -0
- package/dist/channels/response-format.d.ts.map +1 -1
- package/dist/channels/response-format.js +30 -4
- package/dist/channels/response-format.js.map +1 -1
- package/dist/channels/slack/files-middleware.d.ts +4 -4
- package/dist/channels/slack/files-middleware.d.ts.map +1 -1
- package/dist/channels/slack/files-middleware.js +11 -9
- package/dist/channels/slack/files-middleware.js.map +1 -1
- package/dist/channels/slack/files.d.ts +3 -2
- package/dist/channels/slack/files.d.ts.map +1 -1
- package/dist/channels/slack/files.js +35 -15
- package/dist/channels/slack/files.js.map +1 -1
- package/dist/channels/slack/index.d.ts +8 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +10 -0
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/channels/trigger/http.d.ts +3 -0
- package/dist/channels/trigger/http.d.ts.map +1 -1
- package/dist/channels/trigger/http.js +84 -37
- package/dist/channels/trigger/http.js.map +1 -1
- package/dist/channels/trigger/types.d.ts +21 -2
- package/dist/channels/trigger/types.d.ts.map +1 -1
- package/dist/channels/trigger/types.js.map +1 -1
- package/dist/connection-authorization.d.ts +7 -0
- package/dist/connection-authorization.d.ts.map +1 -1
- package/dist/connection-authorization.js +1 -1
- package/dist/connection-authorization.js.map +1 -1
- package/dist/connectors/mcp/index.d.ts +12 -12
- package/dist/connectors/mcp/index.d.ts.map +1 -1
- package/dist/connectors/mcp/index.js +85 -125
- package/dist/connectors/mcp/index.js.map +1 -1
- package/dist/connectors/mcp/langsmith-url.js +2 -2
- package/dist/connectors/mcp/langsmith-url.js.map +1 -1
- package/dist/connectors/mcp/schema.d.ts +4 -13
- package/dist/connectors/mcp/schema.d.ts.map +1 -1
- package/dist/connectors/mcp/schema.js +57 -96
- package/dist/connectors/mcp/schema.js.map +1 -1
- package/dist/connectors/mcp/types.d.ts +17 -51
- package/dist/connectors/mcp/types.d.ts.map +1 -1
- package/dist/credential-gate.d.ts.map +1 -1
- package/dist/credential-gate.js +2 -4
- package/dist/credential-gate.js.map +1 -1
- package/dist/define-deep-agent.d.ts +7 -5
- package/dist/define-deep-agent.d.ts.map +1 -1
- package/dist/define-deep-agent.js +13 -17
- package/dist/define-deep-agent.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/managed-composition.d.ts +21 -0
- package/dist/managed-composition.d.ts.map +1 -0
- package/dist/managed-composition.js +244 -0
- package/dist/managed-composition.js.map +1 -0
- package/dist/memory/define-memory.d.ts.map +1 -1
- package/dist/memory/define-memory.js +4 -5
- package/dist/memory/define-memory.js.map +1 -1
- package/dist/memory/types.d.ts +18 -3
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/runtime/agent-entry.d.ts +6 -0
- package/dist/runtime/agent-entry.d.ts.map +1 -0
- package/dist/runtime/agent-entry.js +38 -0
- package/dist/runtime/agent-entry.js.map +1 -0
- package/dist/runtime/auth.d.ts +2 -0
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/backend.d.ts +1 -0
- package/dist/runtime/backend.d.ts.map +1 -1
- package/dist/runtime/backend.js +9 -6
- package/dist/runtime/backend.js.map +1 -1
- package/dist/runtime/eval-filesystem.d.ts +4 -2
- package/dist/runtime/eval-filesystem.d.ts.map +1 -1
- package/dist/runtime/eval-filesystem.js +134 -8
- package/dist/runtime/eval-filesystem.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +6 -8
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +12 -8
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -221
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +163 -47
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/managed-tools.d.ts +7 -9
- package/dist/runtime/managed-tools.d.ts.map +1 -1
- package/dist/runtime/managed-tools.js +1 -11
- package/dist/runtime/managed-tools.js.map +1 -1
- package/dist/runtime/memory/index.d.ts +1 -1
- package/dist/runtime/memory/index.d.ts.map +1 -1
- package/dist/runtime/memory/index.js +1 -1
- package/dist/runtime/memory/index.js.map +1 -1
- package/dist/runtime/memory/mounts.d.ts +3 -2
- package/dist/runtime/memory/mounts.d.ts.map +1 -1
- package/dist/runtime/memory/mounts.js +11 -15
- package/dist/runtime/memory/mounts.js.map +1 -1
- package/dist/runtime/memory/paths.d.ts +1 -0
- package/dist/runtime/memory/paths.d.ts.map +1 -1
- package/dist/runtime/memory/paths.js +10 -0
- package/dist/runtime/memory/paths.js.map +1 -1
- package/dist/runtime/memory/policy.d.ts +1 -1
- package/dist/runtime/memory/policy.d.ts.map +1 -1
- package/dist/runtime/memory/policy.js +6 -2
- package/dist/runtime/memory/policy.js.map +1 -1
- package/dist/runtime/run-input.d.ts +35 -31
- package/dist/runtime/run-input.d.ts.map +1 -1
- package/dist/runtime/run-input.js +64 -8
- package/dist/runtime/run-input.js.map +1 -1
- package/dist/runtime/sandbox-manager.d.ts +14 -2
- package/dist/runtime/sandbox-manager.d.ts.map +1 -1
- package/dist/runtime/sandbox-manager.js +90 -12
- package/dist/runtime/sandbox-manager.js.map +1 -1
- package/dist/runtime/schedule-auth.d.ts +2 -0
- package/dist/runtime/schedule-auth.d.ts.map +1 -1
- package/dist/runtime/schedule-auth.js +3 -0
- package/dist/runtime/schedule-auth.js.map +1 -1
- package/dist/runtime/selected-skills-backend.d.ts +22 -0
- package/dist/runtime/selected-skills-backend.d.ts.map +1 -0
- package/dist/runtime/selected-skills-backend.js +238 -0
- package/dist/runtime/selected-skills-backend.js.map +1 -0
- package/dist/runtime/selected-skills.d.ts +13 -0
- package/dist/runtime/selected-skills.d.ts.map +1 -0
- package/dist/runtime/selected-skills.js +257 -0
- package/dist/runtime/selected-skills.js.map +1 -0
- package/dist/runtime/static-entry.d.ts +4 -0
- package/dist/runtime/static-entry.d.ts.map +1 -0
- package/dist/runtime/static-entry.js +16 -0
- package/dist/runtime/static-entry.js.map +1 -0
- package/dist/runtime/types.d.ts +6 -8
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime-schedules.d.ts.map +1 -1
- package/dist/runtime-schedules.js +12 -1
- package/dist/runtime-schedules.js.map +1 -1
- package/dist/sandbox.d.ts +2 -1
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sandbox.js.map +1 -1
- package/dist/types.d.ts +39 -16
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HTTPConnectionSchema } from "@langchain/mcp-adapters";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { appendToolSelectionOverlapIssue, optionalToolNameListSchema, } from "../tool-selection.js";
|
|
3
4
|
import { isConnectionReference, } from "../../connections.js";
|
|
@@ -6,138 +7,98 @@ import { isLangSmithManagedToolsPath } from "./langsmith-url.js";
|
|
|
6
7
|
const STDIO_REJECTION = "uses a stdio transport, which is not supported. Managed Deep Agents " +
|
|
7
8
|
"support remote MCP servers over HTTP/SSE only; expose the server over HTTP " +
|
|
8
9
|
"or write a normal authored tool instead.";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
export const MCP_SERVERS_KEY_DEPRECATION = "mcpServers is deprecated; use servers instead. It will be removed in 0.8.0.";
|
|
10
|
+
const AUTH_PROVIDER_REJECTION = "authProvider is set by Managed Deep Agents from connection: connections.get(slug, owner); remove it";
|
|
11
|
+
const TYPE_KEY_REJECTION = '"type" was renamed "transport"; use transport';
|
|
12
12
|
const SERVERS_MAP_ERROR = "must be an object mapping server names to remote MCP server configs";
|
|
13
|
-
const SERVERS_KEY_CONFLICT = 'use either "servers" or "mcpServers", not both';
|
|
14
13
|
const LANGSMITH_MANAGED_CONFLICT = "a LangSmith managed-tools URL cannot declare headers or connection";
|
|
15
14
|
const LANGSMITH_MANAGED_TRANSPORT = 'a LangSmith managed-tools URL must declare transport "http"';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
code: "MDA_MCP_SERVERS",
|
|
22
|
-
});
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
console.warn(MCP_SERVERS_KEY_DEPRECATION);
|
|
26
|
-
}
|
|
27
|
-
/** Raw MCP tool names, before the managed `{server}__` prefix is applied. */
|
|
15
|
+
const [streamableHttpSchema, sseSchema] = HTTPConnectionSchema.options;
|
|
16
|
+
/**
|
|
17
|
+
* A remote MCP server: MDA's fields and rules here, everything else validated
|
|
18
|
+
* by `@langchain/mcp-adapters`' own `HTTPConnectionSchema`.
|
|
19
|
+
*/
|
|
28
20
|
const remoteMcpServer = z
|
|
29
21
|
.looseObject({
|
|
30
|
-
/**
|
|
31
|
-
* Present only to reject it: a `command` is how a stdio server is defined,
|
|
32
|
-
* which we don't support.
|
|
33
|
-
*/
|
|
34
|
-
command: z.never({ error: STDIO_REJECTION }).optional(),
|
|
35
|
-
transport: z.enum(["http", "sse"], {
|
|
36
|
-
error: (issue) => issue.input === "stdio"
|
|
37
|
-
? STDIO_REJECTION
|
|
38
|
-
: 'must declare a remote transport ("http" or "sse")',
|
|
39
|
-
}),
|
|
40
|
-
url: z
|
|
41
|
-
.string("must be a non-empty URL")
|
|
42
|
-
.refine((url) => url.trim().length > 0, "must be a non-empty URL"),
|
|
43
|
-
headers: z.record(z.string(), z.string()).optional(),
|
|
44
|
-
defaultToolTimeout: z
|
|
45
|
-
.number("defaultToolTimeout must be a positive number")
|
|
46
|
-
.positive("defaultToolTimeout must be a positive number")
|
|
47
|
-
.optional(),
|
|
48
22
|
includeTools: optionalToolNameListSchema,
|
|
49
23
|
excludeTools: optionalToolNameListSchema,
|
|
50
|
-
credential: z.never({ error: CREDENTIAL_FIELD_REJECTION }).optional(),
|
|
51
24
|
connection: z
|
|
52
25
|
.custom(isConnectionReference, "must be a connections.get(slug, owner) reference")
|
|
53
26
|
.optional(),
|
|
54
27
|
})
|
|
55
28
|
.check(appendToolSelectionOverlapIssue)
|
|
56
29
|
.check((ctx) => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (ctx.value.transport !== "http") {
|
|
30
|
+
const hasCommand = "command" in ctx.value;
|
|
31
|
+
if (ctx.value.transport === "stdio" || hasCommand) {
|
|
60
32
|
ctx.issues.push({
|
|
61
33
|
code: "custom",
|
|
62
34
|
input: ctx.value,
|
|
63
|
-
|
|
35
|
+
path: [hasCommand ? "command" : "transport"],
|
|
36
|
+
message: STDIO_REJECTION,
|
|
64
37
|
});
|
|
38
|
+
return;
|
|
65
39
|
}
|
|
66
|
-
if (
|
|
40
|
+
if ("authProvider" in ctx.value) {
|
|
67
41
|
ctx.issues.push({
|
|
68
42
|
code: "custom",
|
|
69
43
|
input: ctx.value,
|
|
70
|
-
|
|
44
|
+
path: ["authProvider"],
|
|
45
|
+
message: AUTH_PROVIDER_REJECTION,
|
|
71
46
|
});
|
|
47
|
+
return;
|
|
72
48
|
}
|
|
73
|
-
|
|
74
|
-
const serverMap = z
|
|
75
|
-
.record(z.string(), remoteMcpServer, {
|
|
76
|
-
error: SERVERS_MAP_ERROR,
|
|
77
|
-
})
|
|
78
|
-
.refine((servers) => Object.keys(servers).length > 0, "requires at least one entry");
|
|
79
|
-
/**
|
|
80
|
-
* The MCP connector's arguments.
|
|
81
|
-
*
|
|
82
|
-
* Shape, types, and tool-name lists are the schema's job; the rules that need
|
|
83
|
-
* more than one field — a stdio server, a tool selected and deselected at once
|
|
84
|
-
* — are checks with hand-written messages. Server configs stay loose because
|
|
85
|
-
* `@langchain/mcp-adapters` accepts more per-transport options than MDA models.
|
|
86
|
-
*
|
|
87
|
-
* `mcpServers` is accepted as a deprecated alias of `servers` and is rewritten
|
|
88
|
-
* to `servers` so the stored definition has one key.
|
|
89
|
-
*/
|
|
90
|
-
export const mcpServersConfig = z
|
|
91
|
-
.object({
|
|
92
|
-
servers: serverMap.optional(),
|
|
93
|
-
mcpServers: serverMap.optional(),
|
|
94
|
-
prefixToolNameWithServerName: z.boolean().optional(),
|
|
95
|
-
throwOnLoadError: z.boolean().optional(),
|
|
96
|
-
useStandardContentBlocks: z.boolean().optional(),
|
|
97
|
-
onConnectionError: z.literal("throw").optional(),
|
|
98
|
-
})
|
|
99
|
-
.check((ctx) => {
|
|
100
|
-
const { servers, mcpServers } = ctx.value;
|
|
101
|
-
if (servers !== undefined && mcpServers !== undefined) {
|
|
49
|
+
if ("type" in ctx.value) {
|
|
102
50
|
ctx.issues.push({
|
|
103
51
|
code: "custom",
|
|
104
52
|
input: ctx.value,
|
|
105
|
-
|
|
106
|
-
|
|
53
|
+
path: ["type"],
|
|
54
|
+
message: TYPE_KEY_REJECTION,
|
|
107
55
|
});
|
|
108
56
|
return;
|
|
109
57
|
}
|
|
110
|
-
|
|
58
|
+
const { includeTools: _includeTools, excludeTools: _excludeTools, connection: _connection, ...connection } = ctx.value;
|
|
59
|
+
const schema = connection.transport === "sse" ? sseSchema : streamableHttpSchema;
|
|
60
|
+
for (const issue of schema.safeParse(connection).error?.issues ?? []) {
|
|
111
61
|
ctx.issues.push({
|
|
112
62
|
code: "custom",
|
|
113
63
|
input: ctx.value,
|
|
114
|
-
|
|
115
|
-
|
|
64
|
+
path: [...issue.path],
|
|
65
|
+
message: issue.message,
|
|
116
66
|
});
|
|
117
67
|
}
|
|
118
68
|
})
|
|
119
|
-
.
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (value.prefixToolNameWithServerName !== undefined) {
|
|
130
|
-
args.prefixToolNameWithServerName = value.prefixToolNameWithServerName;
|
|
131
|
-
}
|
|
132
|
-
if (value.throwOnLoadError !== undefined) {
|
|
133
|
-
args.throwOnLoadError = value.throwOnLoadError;
|
|
134
|
-
}
|
|
135
|
-
if (value.useStandardContentBlocks !== undefined) {
|
|
136
|
-
args.useStandardContentBlocks = value.useStandardContentBlocks;
|
|
69
|
+
.check((ctx) => {
|
|
70
|
+
const { url, transport, headers, connection } = ctx.value;
|
|
71
|
+
if (typeof url !== "string" || !isLangSmithManagedToolsPath(url))
|
|
72
|
+
return;
|
|
73
|
+
if ((transport ?? "http") !== "http") {
|
|
74
|
+
ctx.issues.push({
|
|
75
|
+
code: "custom",
|
|
76
|
+
input: ctx.value,
|
|
77
|
+
message: LANGSMITH_MANAGED_TRANSPORT,
|
|
78
|
+
});
|
|
137
79
|
}
|
|
138
|
-
if (
|
|
139
|
-
|
|
80
|
+
if (headers !== undefined || connection !== undefined) {
|
|
81
|
+
ctx.issues.push({
|
|
82
|
+
code: "custom",
|
|
83
|
+
input: ctx.value,
|
|
84
|
+
message: LANGSMITH_MANAGED_CONFLICT,
|
|
85
|
+
});
|
|
140
86
|
}
|
|
141
|
-
|
|
87
|
+
})
|
|
88
|
+
.transform((server) => server);
|
|
89
|
+
const serverMap = z
|
|
90
|
+
.record(z.string(), remoteMcpServer, {
|
|
91
|
+
error: SERVERS_MAP_ERROR,
|
|
92
|
+
})
|
|
93
|
+
.refine((servers) => Object.keys(servers).length > 0, "requires at least one entry");
|
|
94
|
+
/**
|
|
95
|
+
* The MCP connector's arguments. Each server is validated by the adapter's own
|
|
96
|
+
* schema (`remoteMcpServer`); the top level is MDA's and strict.
|
|
97
|
+
*/
|
|
98
|
+
export const mcpServersConfig = z.strictObject({
|
|
99
|
+
servers: serverMap,
|
|
100
|
+
prefixToolNameWithServerName: z.boolean().optional(),
|
|
101
|
+
throwOnLoadError: z.boolean().optional(),
|
|
102
|
+
onConnectionError: z.literal("throw").optional(),
|
|
142
103
|
});
|
|
143
104
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/connectors/mcp/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,8EAA8E;AAC9E,MAAM,eAAe,GACnB,sEAAsE;IACtE,6EAA6E;IAC7E,0CAA0C,CAAC;AAE7C,MAAM,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/connectors/mcp/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,8EAA8E;AAC9E,MAAM,eAAe,GACnB,sEAAsE;IACtE,6EA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AK,EAAE,GAAG,CAAC,KAAK;YAChB,OAAO,EAAE,2BAA2B;SACrC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QACtD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,OAAO,EAAE,0BAA0B;SACpC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;KACD,SAAS,CACR,CAAC,MAAM,EAAyB,EAAE,CAChC,MAA0C,CAC7C,CAAC;AAEJ,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,EAAE;IACnC,KAAK,EAAE,iBAAiB;CACzB,CAAC;KACD,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAC5C,6BAA6B,CAC9B,CAAC;AAEJ;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAgC,CAAC,CAAC,YAAY,CAAC;IAC1E,OAAO,EAAE,SAAS;IAClB,4BAA4B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpD,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC"}
|
|
@@ -1,81 +1,47 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTTPConnection, MCPAdapterConfig } from "@langchain/mcp-adapters";
|
|
2
2
|
import type { Connector } from "../../runtime/connector.js";
|
|
3
3
|
import type { ConnectionReference } from "../../connections.js";
|
|
4
4
|
/** Per-server MCP tool selection. Names are raw, unprefixed MCP tool names. */
|
|
5
5
|
export interface McpToolSelectionConfig {
|
|
6
6
|
/**
|
|
7
7
|
* Raw MCP tool names to expose from this server. Names are matched before any
|
|
8
|
-
* managed `{server}
|
|
8
|
+
* managed `{server}_` prefix is applied.
|
|
9
9
|
*/
|
|
10
10
|
includeTools?: string[];
|
|
11
11
|
/**
|
|
12
12
|
* Raw MCP tool names to hide from this server. Names are matched before any
|
|
13
|
-
* managed `{server}
|
|
13
|
+
* managed `{server}_` prefix is applied.
|
|
14
14
|
*/
|
|
15
15
|
excludeTools?: string[];
|
|
16
16
|
}
|
|
17
17
|
/** A connection reference resolved through Agent Auth at run time. */
|
|
18
18
|
export type McpServerConnection = ConnectionReference;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
export type RemoteMcpServerBaseConfig = AdapterRemoteConnection & McpToolSelectionConfig & {
|
|
23
|
-
/**
|
|
24
|
-
* Bearer connection for this server, declared with `connections.get(...)`.
|
|
25
|
-
* An agent owner is a workspace-shared secret read once at load; a user
|
|
26
|
-
* owner is the caller's grant, loaded per caller after the gate.
|
|
27
|
-
*/
|
|
19
|
+
/** The fields MDA adds to an adapter connection; the adapter never sees them. */
|
|
20
|
+
export interface McpServerFields extends McpToolSelectionConfig {
|
|
21
|
+
/** Bearer connection (`connections.get(...)`); an agent owner loads once, a user owner loads per caller after the gate. */
|
|
28
22
|
connection?: McpServerConnection;
|
|
23
|
+
}
|
|
24
|
+
/** An adapter HTTP/SSE connection plus MDA's fields. MDA sets `authProvider` from `connection`; `type` is now `transport`. */
|
|
25
|
+
export type RemoteMcpServerConfig = HTTPConnection & McpServerFields & {
|
|
26
|
+
authProvider?: never;
|
|
27
|
+
type?: never;
|
|
29
28
|
};
|
|
30
|
-
/** Streamable HTTP MCP server connection. */
|
|
31
|
-
export type HttpMcpServerConfig = RemoteMcpServerBaseConfig & {
|
|
32
|
-
/** Remote transport. `"http"` selects Streamable HTTP. */
|
|
33
|
-
transport: "http";
|
|
34
|
-
};
|
|
35
|
-
/** Legacy SSE MCP server connection. */
|
|
36
|
-
export type SseMcpServerConfig = RemoteMcpServerBaseConfig & {
|
|
37
|
-
/** Remote transport. `"sse"` selects legacy SSE. */
|
|
38
|
-
transport: "sse";
|
|
39
|
-
};
|
|
40
|
-
/** A remote MCP server connection. Stdio servers are intentionally excluded. */
|
|
41
|
-
export type RemoteMcpServerConfig = HttpMcpServerConfig | SseMcpServerConfig;
|
|
42
|
-
/** {@link MultiServerMCPClient} options MDA exposes on `defineMcp`. */
|
|
43
|
-
type McpClientOptions = Pick<ClientConfig, "prefixToolNameWithServerName" | "throwOnLoadError" | "useStandardContentBlocks" | "onConnectionError">;
|
|
44
29
|
/** Named remote MCP servers. Each key is the logical server name. */
|
|
45
30
|
export type McpServerMap = Record<string, RemoteMcpServerConfig>;
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* Prefer `servers`. `mcpServers` is a deprecated alias and will be removed in
|
|
50
|
-
* 0.8.0.
|
|
51
|
-
*/
|
|
52
|
-
export type McpServersConfig = McpClientOptions & ({
|
|
53
|
-
/**
|
|
54
|
-
* MCP servers to connect to. Each key is the logical server name MDA
|
|
55
|
-
* uses for validation, tracing metadata, and tool-name prefixing.
|
|
56
|
-
*/
|
|
57
|
-
servers: McpServerMap;
|
|
58
|
-
mcpServers?: never;
|
|
59
|
-
} | {
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Use {@link McpServersConfig} `servers` instead.
|
|
62
|
-
* `mcpServers` will be removed in 0.8.0.
|
|
63
|
-
*/
|
|
64
|
-
mcpServers: McpServerMap;
|
|
65
|
-
servers?: never;
|
|
66
|
-
});
|
|
67
|
-
/** Parsed `defineMcp` arguments stored on the connector. Always `servers`. */
|
|
68
|
-
export interface McpServersArgs extends McpClientOptions {
|
|
31
|
+
/** Configuration accepted by `defineMcp`. */
|
|
32
|
+
export interface McpServersConfig extends Pick<MCPAdapterConfig, "prefixToolNameWithServerName" | "throwOnLoadError"> {
|
|
33
|
+
/** MCP servers to connect to, keyed by logical server name. */
|
|
69
34
|
servers: McpServerMap;
|
|
35
|
+
/** Managed agents fail loudly on a connection error. */
|
|
36
|
+
onConnectionError?: "throw";
|
|
70
37
|
}
|
|
71
38
|
/**
|
|
72
39
|
* The connector exported from a `connectors/` module for MCP. It is a branded
|
|
73
40
|
* managed {@link Connector} whose `tools` hook loads the declared MCP tools at
|
|
74
41
|
* runtime, plus the raw config the loader reads.
|
|
75
42
|
*/
|
|
76
|
-
export interface McpServersDefinition extends
|
|
43
|
+
export interface McpServersDefinition extends McpServersConfig, Connector {
|
|
77
44
|
/** Internal discriminator used by the MDA loader. */
|
|
78
45
|
readonly kind: "mcp_servers";
|
|
79
46
|
}
|
|
80
|
-
export {};
|
|
81
47
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connectors/mcp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connectors/mcp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,+EAA+E;AAC/E,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,iFAAiF;AACjF,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,2HAA2H;IAC3H,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED,8HAA8H;AAC9H,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAChD,eAAe,GAAG;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE3D,qEAAqE;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAEjE,6CAA6C;AAC7C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,gBAAgB,EAChB,8BAA8B,GAAG,kBAAkB,CACpD;IACC,+DAA+D;IAC/D,OAAO,EAAE,YAAY,CAAC;IACtB,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB,EAAE,SAAS;IACvE,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-gate.d.ts","sourceRoot":"","sources":["../src/credential-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAY1B,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"credential-gate.d.ts","sourceRoot":"","sources":["../src/credential-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAY1B,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;AAQrE,4EAA4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,WAAW,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC5C,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,CAC1B,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAClC,IAAI,EAAE,CACJ,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrC;AA6BD,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,SAAS,kBAAkB,EAAE,GACvC,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAAG,SAAS,CAuEjD;AA6KD,0EAA0E;AAC1E,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAStE"}
|
package/dist/credential-gate.js
CHANGED
|
@@ -16,10 +16,8 @@ import { buildRuntimeIdentity, resolveRuntimeConfigurable, } from "./runtime/ide
|
|
|
16
16
|
import { wrapToolsWithManagedRuntime, } from "./runtime/managed-tools.js";
|
|
17
17
|
export const CREDENTIAL_GATE_MIDDLEWARE_NAME = "mda-credential-gate";
|
|
18
18
|
/**
|
|
19
|
-
* How long a caller's loaded tools stay cached.
|
|
20
|
-
*
|
|
21
|
-
* The access token is bound into the transport when the tools are built, so the
|
|
22
|
-
* entry has to lapse well before the token does.
|
|
19
|
+
* How long a caller's loaded tools stay cached. MCP re-reads a rejected token,
|
|
20
|
+
* so this bounds how long a caller's adapter lives, not token lifetime.
|
|
23
21
|
*/
|
|
24
22
|
const TOOL_CACHE_TTL_MS = 5 * 60_000;
|
|
25
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-gate.js","sourceRoot":"","sources":["../src/credential-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,uCAAuC,EACvC,oCAAoC,EACpC,2BAA2B,GAE5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAE3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,+BAA+B,GAAG,qBAAqB,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"credential-gate.js","sourceRoot":"","sources":["../src/credential-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,uCAAuC,EACvC,oCAAoC,EACpC,2BAA2B,GAE5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAE3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM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AA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,gCAAgC;IACpD,MAAM,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,SAAS,CAAC,KAAK,EAAE,CAAC;IAClB,MAAM,OAAO,CAAC,GAAG,CACf,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAC1B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACpD,MAAM,QAAQ,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -2,10 +2,12 @@ import type { DeepAgentDefinition, DefineDeepAgentConfig } from "./types.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Define a Managed Deep Agent.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Accepts the `createDeepAgent` surface except MDA-owned runtime keys, plus
|
|
6
|
+
* authored selections of managed instructions, MCP servers, sandboxes, and
|
|
7
|
+
* skills when returned from a factory entrypoint.
|
|
8
|
+
* Static exported definitions use the discovered resources and cannot set
|
|
9
|
+
* those fields.
|
|
10
|
+
* Returns a pre-runtime spec — not a compiled graph.
|
|
9
11
|
*
|
|
10
12
|
* The return type carries `~agentTypes` / `~deepAgentTypes` phantoms and
|
|
11
13
|
* preserves the authored config type, so evaluators and `useStream` can take
|
|
@@ -14,7 +16,7 @@ import type { DeepAgentDefinition, DefineDeepAgentConfig } from "./types.js";
|
|
|
14
16
|
* At deploy time, `mda` generates an entry module that hands this definition to
|
|
15
17
|
* the managed runtime, which injects the platform-owned backend/store/
|
|
16
18
|
* checkpointer, embeds the system prompt from `instructions.md`, and compiles
|
|
17
|
-
* it into a Deep Agent.
|
|
19
|
+
* it into a Deep Agent. Factory managed resources resolve once per run.
|
|
18
20
|
*
|
|
19
21
|
* @example
|
|
20
22
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-deep-agent.d.ts","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EAEtB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"define-deep-agent.d.ts","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAcpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,qBAAqB,EACzE,MAAM,EAAE,OAAO,GACd,mBAAmB,CAAC,OAAO,CAAC,CAmC9B"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { snapshotManagedComposition } from "./managed-composition.js";
|
|
1
2
|
const DEFINE_DEEP_AGENT_UNSUPPORTED_KEYS = {
|
|
2
3
|
backend: "Configure the sandbox in sandbox/.",
|
|
3
4
|
store: "MDA provides the store automatically.",
|
|
4
5
|
checkpointer: "MDA provides the checkpointer automatically.",
|
|
5
|
-
|
|
6
|
-
skills: "Put skills in skills/.",
|
|
7
|
-
systemPrompt: "Put the system prompt in instructions.md.",
|
|
6
|
+
systemPrompt: "Use `instructions` in a factory entrypoint or put the static prompt in instructions.md.",
|
|
8
7
|
};
|
|
9
8
|
/**
|
|
10
9
|
* Define a Managed Deep Agent.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* Accepts the `createDeepAgent` surface except MDA-owned runtime keys, plus
|
|
12
|
+
* authored selections of managed instructions, MCP servers, sandboxes, and
|
|
13
|
+
* skills when returned from a factory entrypoint.
|
|
14
|
+
* Static exported definitions use the discovered resources and cannot set
|
|
15
|
+
* those fields.
|
|
16
|
+
* Returns a pre-runtime spec — not a compiled graph.
|
|
16
17
|
*
|
|
17
18
|
* The return type carries `~agentTypes` / `~deepAgentTypes` phantoms and
|
|
18
19
|
* preserves the authored config type, so evaluators and `useStream` can take
|
|
@@ -21,7 +22,7 @@ const DEFINE_DEEP_AGENT_UNSUPPORTED_KEYS = {
|
|
|
21
22
|
* At deploy time, `mda` generates an entry module that hands this definition to
|
|
22
23
|
* the managed runtime, which injects the platform-owned backend/store/
|
|
23
24
|
* checkpointer, embeds the system prompt from `instructions.md`, and compiles
|
|
24
|
-
* it into a Deep Agent.
|
|
25
|
+
* it into a Deep Agent. Factory managed resources resolve once per run.
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
27
28
|
* ```ts
|
|
@@ -40,29 +41,24 @@ export function defineDeepAgent(config) {
|
|
|
40
41
|
// JavaScript callers do not get the TypeScript checks for managed keys.
|
|
41
42
|
const provided = config;
|
|
42
43
|
if (typeof provided.name !== "string" || provided.name.trim() === "") {
|
|
43
|
-
throw new Error(
|
|
44
|
-
'(e.g. name: "research-assistant"); MDA uses it as the LangGraph ' +
|
|
45
|
-
"assistant id and the default LangSmith deployment name.");
|
|
44
|
+
throw new Error('name is required in defineDeepAgent(...). Pass a non-empty string (e.g. name: "research-assistant").');
|
|
46
45
|
}
|
|
47
46
|
for (const [key, guidance] of Object.entries(DEFINE_DEEP_AGENT_UNSUPPORTED_KEYS)) {
|
|
48
47
|
if (key in provided) {
|
|
49
48
|
throw new Error(`Remove \`${key}\` from defineDeepAgent(...). ${guidance}`);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
//
|
|
53
|
-
// `memory.ts`. Rejecting the old flag outright (rather than treating it as a
|
|
54
|
-
// redundant "off") keeps `disableMemory: false` from silently meaning the
|
|
55
|
-
// opposite of what it used to.
|
|
51
|
+
// Keep a focused migration error for the retired flag.
|
|
56
52
|
if ("disableMemory" in provided) {
|
|
57
53
|
throw new Error("disableMemory is no longer supported in defineDeepAgent(...). Durable " +
|
|
58
54
|
"memory is opt-in and declared in memory.ts: export `memory` with " +
|
|
59
|
-
|
|
55
|
+
"`defineMemory({ agent: memoryLayer() })` to enable it, or leave the file out " +
|
|
60
56
|
"to keep no memory (the default). Remove `disableMemory` here.");
|
|
61
57
|
}
|
|
62
58
|
// Brands are type-only; runtime value is still the pre-compile definition.
|
|
63
59
|
return {
|
|
64
60
|
kind: "deep-agent",
|
|
65
|
-
config,
|
|
61
|
+
config: snapshotManagedComposition(config),
|
|
66
62
|
};
|
|
67
63
|
}
|
|
68
64
|
//# sourceMappingURL=define-deep-agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-deep-agent.js","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"define-deep-agent.js","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,MAAM,kCAAkC,GAGpC;IACF,OAAO,EAAE,oCAAoC;IAC7C,KAAK,EAAE,uCAAuC;IAC9C,YAAY,EAAE,8CAA8C;IAC5D,YAAY,EACV,yFAAyF;CAC5F,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAe;IAEf,wEAAwE;IACxE,MAAM,QAAQ,GAAG,MAAiC,CAAC;IAEnD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAC1C,kCAAkC,CACnC,EAAE,CAAC;QACF,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CACb,YAAY,GAAG,iCAAiC,QAAQ,EAAE,CAC3D,CAAC;QACJ,CAAC;IACH,CAAC;IAED,uDAAuD;IACvD,IAAI,eAAe,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,wEAAwE;YACtE,mEAAmE;YACnE,+EAA+E;YAC/E,+DAA+D,CAClE,CAAC;IACJ,CAAC;IAED,2EAA2E;IAC3E,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0BAA0B,CAAC,MAAM,CAAC;KACX,CAAC;AACpC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { defineDeepAgent } from "./define-deep-agent.js";
|
|
2
|
+
export type { AgentEntry, AgentFactory } from "./agent-entry.js";
|
|
2
3
|
export { defineSchedule } from "./schedules.js";
|
|
3
4
|
export { defineIdentity } from "./identity/index.js";
|
|
4
5
|
export { defineMemory, memoryLayer } from "./memory/index.js";
|
|
@@ -8,20 +9,21 @@ export { defineSandbox, bearer, basic } from "./sandbox.js";
|
|
|
8
9
|
export { defineMcp } from "./connectors/mcp/index.js";
|
|
9
10
|
export type { Channels, Connectors } from "./namespaces.js";
|
|
10
11
|
export type { AgentConnectionOwner, ConnectionOwner, ConnectionRequest, UserConnectionOwner, } from "./connections.js";
|
|
11
|
-
export type { DeepAgentDefinition, DefineDeepAgentConfig, ManagedDeepAgentKey, } from "./types.js";
|
|
12
|
+
export type { DeepAgentDefinition, DefineDeepAgentConfig, GeneratedSkill, ManagedDeepAgentKey, ManagedCompositionFields, McpSelection, SkillSelection, } from "./types.js";
|
|
12
13
|
export type { ScheduleConfig, ScheduleDefinition, ScheduleDeliveryTarget, ScheduleThreadConfig, } from "./schedules.js";
|
|
13
14
|
export type { ClaimMapping, CredentialScope, HttpIngress, IdentityAuth, IdentityConfig, IdentityDefinition, IdentityOptions, IdentitySource, LangSmithApiKeyIngress, Link, LinkStatus, Principal, PrincipalClaims, PrincipalEnvelope, PrincipalKind, RuntimeIdentity, Subject, SubjectAuthority, ValidatedTokenIngress, ValidatedTokenProvider, } from "./identity/index.js";
|
|
14
15
|
export type { AgentMemoryLayer, MemoryConfig, MemoryDefinition, MemoryLayer, MemoryLayerDefinition, MemoryLayerOptions, MemoryLayers, MemoryLayerType, MemoryOptions, UserMemoryLayer, } from "./memory/index.js";
|
|
15
|
-
export type {
|
|
16
|
+
export type { McpServerConnection, McpServersConfig, McpServersDefinition, McpToolSelectionConfig, RemoteMcpServerConfig, } from "./connectors/mcp/index.js";
|
|
16
17
|
export type { CredentialAuthorizationRequiredInterrupt, PendingCredential, } from "./connection-authorization.js";
|
|
17
18
|
export type { ChannelManifest } from "./channels/manifest.js";
|
|
18
19
|
export type { RequiredTriggerSlackChannelConfig, SlackChannel, SlackChannelConfig, } from "./channels/slack/index.js";
|
|
19
20
|
export type { HttpChannel, HttpChannelAdapter, HttpChannelInboundMessage, HttpChannelParseResult, HttpChannelRequest, HttpChannelPostInput, HttpPostedMessage, } from "./channels/http/index.js";
|
|
20
21
|
export type { SandboxDefinition, SandboxOptions, SandboxConnectionValue, SandboxProxyConfig, SandboxProxyHeader, SandboxProxyRule, } from "./sandbox.js";
|
|
21
|
-
export type { ManagedDeepAgentRuntime, ManagedServerInfo, } from "./runtime/managed-tools.js";
|
|
22
|
+
export type { ManagedDeepAgentRuntime, ManagedRuntime, ManagedToolRuntime, ManagedServerInfo, } from "./runtime/managed-tools.js";
|
|
22
23
|
export type { ChannelContentMessage, ChannelEvent, ChannelInfo, ChannelMessage, ChannelNativeMessage, JsonValue, MessageContent, OutboundMessage, PostedChannelMessage, RuntimeChannel, } from "./channels/types.js";
|
|
23
24
|
export { INTERRUPT_CORRELATION_KEY, channelContextSchema, managedChannelContextSchema, } from "./run-context.js";
|
|
24
25
|
export type { ManagedRunContext, ManagedChannelContext, ChannelContext, NormalizedChannelEvent, PromptResponse, SlackPromptResponse, } from "./run-context.js";
|
|
25
26
|
export { schedules, ScheduleNotFoundError } from "./runtime-schedules.js";
|
|
26
27
|
export type { ScheduleOwner, ScheduleCreate, SchedulePatch, ScheduleRecord, SchedulePage, ScheduleInput, } from "./runtime-schedules.js";
|
|
28
|
+
export type { ManagedServerRuntime } from "./runtime/types.js";
|
|
27
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,oCAAoC,EACpC,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE5D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CA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,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,oCAAoC,EACpC,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAwHtD,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAU1B,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DefineDeepAgentConfig, McpSelection, SkillSelection } from "./types.js";
|
|
2
|
+
import type { SandboxDefinition } from "./sandbox.js";
|
|
3
|
+
import type { MemoryDefinition } from "./memory/types.js";
|
|
4
|
+
export declare const DYNAMIC_MEMORY_ALLOW_ERROR = "Dynamically selected memory cannot use `allow`. Select memory layers or return null from the dynamic agent resolver instead.";
|
|
5
|
+
/** Validate a run-selected managed sandbox definition. */
|
|
6
|
+
export declare function snapshotSandboxSelection(value: unknown): SandboxDefinition | null;
|
|
7
|
+
/** Validate and snapshot dynamic MCP definitions. */
|
|
8
|
+
export declare function snapshotMcpSelection(value: unknown): McpSelection;
|
|
9
|
+
/** Validate and snapshot a memory definition selected for a run. */
|
|
10
|
+
export declare function snapshotMemorySelection(value: unknown): MemoryDefinition<never>;
|
|
11
|
+
/** Reject the retired policy callback only for explicit dynamic selection. */
|
|
12
|
+
export declare function assertDynamicMemorySelection(memory: MemoryDefinition<never>): void;
|
|
13
|
+
export declare function isValidSkillName(name: string): boolean;
|
|
14
|
+
/** Return the authored skill name from a path ending in `skills/<name>`. */
|
|
15
|
+
export declare function skillNameFromPath(path: string): string | undefined;
|
|
16
|
+
export declare function isValidSkillFilePath(path: string): boolean;
|
|
17
|
+
/** Validate and snapshot a dynamic skill selection. */
|
|
18
|
+
export declare function snapshotSkillSelection(value: unknown): SkillSelection;
|
|
19
|
+
/** Validate MDA fields and snapshot only their mutable selection inputs. */
|
|
20
|
+
export declare function snapshotManagedComposition<TConfig extends DefineDeepAgentConfig>(config: TConfig): TConfig;
|
|
21
|
+
//# sourceMappingURL=managed-composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-composition.d.ts","sourceRoot":"","sources":["../src/managed-composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EAErB,YAAY,EACZ,cAAc,EACf,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAExE,eAAO,MAAM,0BAA0B,iIACyF,CAAC;AAyCjI,0DAA0D;AAC1D,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,iBAAiB,GAAG,IAAI,CAgB1B;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAejE;AAED,oEAAoE;AACpE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,gBAAgB,CAAC,KAAK,CAAC,CAiBzB;AAED,8EAA8E;AAC9E,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAC9B,IAAI,CAIN;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgBlE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAqB1D;AAyCD,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CA4BrE;AAED,4EAA4E;AAC5E,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,qBAAqB,EACrC,MAAM,EAAE,OAAO,GAAG,OAAO,CAuD1B"}
|