managed-deepagents 0.6.2-dev.7 → 0.6.2-dev.9

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.
Files changed (72) hide show
  1. package/dist/channels/schedule-delivery.d.ts +2 -0
  2. package/dist/channels/schedule-delivery.d.ts.map +1 -1
  3. package/dist/channels/schedule-delivery.js +40 -4
  4. package/dist/channels/schedule-delivery.js.map +1 -1
  5. package/dist/channels/trigger/client.d.ts +1 -0
  6. package/dist/channels/trigger/client.d.ts.map +1 -1
  7. package/dist/channels/trigger/client.js +19 -8
  8. package/dist/channels/trigger/client.js.map +1 -1
  9. package/dist/channels/trigger/types.d.ts +1 -1
  10. package/dist/channels/trigger/types.d.ts.map +1 -1
  11. package/dist/connectors/mcp/index.d.ts +89 -29
  12. package/dist/connectors/mcp/index.d.ts.map +1 -1
  13. package/dist/connectors/mcp/index.js +50 -227
  14. package/dist/connectors/mcp/index.js.map +1 -1
  15. package/dist/connectors/mcp/load.d.ts +12 -0
  16. package/dist/connectors/mcp/load.d.ts.map +1 -0
  17. package/dist/connectors/mcp/load.js +122 -0
  18. package/dist/connectors/mcp/load.js.map +1 -0
  19. package/dist/connectors/tool-selection.d.ts +18 -9
  20. package/dist/connectors/tool-selection.d.ts.map +1 -1
  21. package/dist/connectors/tool-selection.js +58 -32
  22. package/dist/connectors/tool-selection.js.map +1 -1
  23. package/dist/identity/index.d.ts +1 -1
  24. package/dist/identity/index.d.ts.map +1 -1
  25. package/dist/identity/index.js.map +1 -1
  26. package/dist/identity/types.d.ts +5 -45
  27. package/dist/identity/types.d.ts.map +1 -1
  28. package/dist/index.d.ts +3 -6
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +0 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/runtime/auth.d.ts +4 -9
  33. package/dist/runtime/auth.d.ts.map +1 -1
  34. package/dist/runtime/auth.js.map +1 -1
  35. package/dist/runtime/http.d.ts +1 -1
  36. package/dist/runtime/http.d.ts.map +1 -1
  37. package/dist/runtime/http.js.map +1 -1
  38. package/dist/runtime/identity-runtime.d.ts +5 -55
  39. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  40. package/dist/runtime/identity-runtime.js +0 -107
  41. package/dist/runtime/identity-runtime.js.map +1 -1
  42. package/dist/runtime/index.d.ts.map +1 -1
  43. package/dist/runtime/index.js +7 -12
  44. package/dist/runtime/index.js.map +1 -1
  45. package/dist/runtime/managed-middleware.d.ts +2 -2
  46. package/dist/runtime/managed-middleware.js +6 -6
  47. package/dist/runtime/managed-tools.d.ts +15 -19
  48. package/dist/runtime/managed-tools.d.ts.map +1 -1
  49. package/dist/runtime/managed-tools.js +13 -14
  50. package/dist/runtime/managed-tools.js.map +1 -1
  51. package/dist/runtime/types.d.ts +2 -2
  52. package/package.json +7 -7
  53. package/dist/agent-auth.d.ts +0 -104
  54. package/dist/agent-auth.d.ts.map +0 -1
  55. package/dist/agent-auth.js +0 -224
  56. package/dist/agent-auth.js.map +0 -1
  57. package/dist/connectors/mcp/schema.d.ts +0 -12
  58. package/dist/connectors/mcp/schema.d.ts.map +0 -1
  59. package/dist/connectors/mcp/schema.js +0 -55
  60. package/dist/connectors/mcp/schema.js.map +0 -1
  61. package/dist/connectors/mcp/types.d.ts +0 -62
  62. package/dist/connectors/mcp/types.d.ts.map +0 -1
  63. package/dist/connectors/mcp/types.js +0 -2
  64. package/dist/connectors/mcp/types.js.map +0 -1
  65. package/dist/credential-gate.d.ts +0 -39
  66. package/dist/credential-gate.d.ts.map +0 -1
  67. package/dist/credential-gate.js +0 -209
  68. package/dist/credential-gate.js.map +0 -1
  69. package/dist/credentials.d.ts +0 -88
  70. package/dist/credentials.d.ts.map +0 -1
  71. package/dist/credentials.js +0 -246
  72. package/dist/credentials.js.map +0 -1
@@ -1,246 +0,0 @@
1
- /**
2
- * `credentials.get(...)` — read a managed credential from a tool.
3
- *
4
- * `owner` is the scope the credential resolves under, and names the same axis as
5
- * Agent Auth's `owner_type` / `owner_id`. `{ type: "agent" }` is the deployment,
6
- * so every caller resolves the same static secret. `{ type: "user" }` is the
7
- * current caller, always backed by an OAuth grant. Resolution reads Agent Auth
8
- * on every await and never caches.
9
- */
10
- import { AGENT_AUTH_TIMEOUT_MS, AgentAuth, CredentialAuthorizationRequiredError, CredentialStoreError, } from "./agent-auth.js";
11
- import { buildRuntimeIdentity, resolveRuntimeConfigurable, } from "./runtime/identity-runtime.js";
12
- export { AGENT_AUTH_TIMEOUT_MS, AgentAuthUnknownProviderError, CredentialAuthorizationRequiredError, CredentialStoreError, } from "./agent-auth.js";
13
- const CREDENTIAL_REFERENCE = Symbol("managed-deepagents.credential");
14
- const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
15
- const MAX_SLUG_LENGTH = 64;
16
- const DEFAULT_LANGSMITH_ENDPOINT = "https://api.smith.langchain.com";
17
- /** Agent Auth credential kinds, one per owner type. */
18
- const CREDENTIAL_KIND = { agent: "secret", user: "oauth2" };
19
- export class CredentialNotFoundError extends Error {
20
- slug;
21
- ownerType;
22
- constructor(slug, ownerType) {
23
- super(`no ${ownerType} credential is set for slug ${JSON.stringify(slug)}`);
24
- this.name = "CredentialNotFoundError";
25
- this.slug = slug;
26
- this.ownerType = ownerType;
27
- }
28
- }
29
- /**
30
- * A declarative credential handle. Connector declarations inspect its owner;
31
- * awaiting the same handle inside a tool resolves fresh material every time.
32
- */
33
- export class CredentialReference {
34
- slug;
35
- owner;
36
- accessor;
37
- [CREDENTIAL_REFERENCE] = true;
38
- constructor(slug, owner, accessor) {
39
- this.slug = slug;
40
- this.owner = owner;
41
- this.accessor = accessor;
42
- }
43
- then(onfulfilled, onrejected) {
44
- return this.accessor
45
- .resolve(this.slug, this.owner)
46
- .then(onfulfilled, onrejected);
47
- }
48
- }
49
- export function isCredentialReference(value) {
50
- return (value instanceof CredentialReference ||
51
- (typeof value === "object" &&
52
- value !== null &&
53
- CREDENTIAL_REFERENCE in value));
54
- }
55
- export class AgentAuthCredentialStore {
56
- env;
57
- fetchImpl;
58
- timeoutMs;
59
- constructor(env = process.env, fetchImpl = fetch, timeoutMs = AGENT_AUTH_TIMEOUT_MS) {
60
- this.env = env;
61
- this.fetchImpl = fetchImpl;
62
- this.timeoutMs = timeoutMs;
63
- }
64
- async fetch(request) {
65
- const config = resolveAgentAuthConfig(this.env);
66
- const ownerId = resolveOwnerId(request.owner, request.identity, config.deploymentId);
67
- const client = new AgentAuth({
68
- baseUrl: config.baseUrl,
69
- agentId: config.deploymentId ?? ownerId,
70
- principalId: ownerId,
71
- apiKey: config.apiKey,
72
- workspaceId: config.workspaceId,
73
- }, this.fetchImpl, this.timeoutMs);
74
- if (request.owner.type === "user") {
75
- return await client.readUserAccessToken(request.slug);
76
- }
77
- const credentialId = await client.findCredentialId({
78
- ownerType: "agent",
79
- ownerId,
80
- kind: CREDENTIAL_KIND.agent,
81
- slug: request.slug,
82
- });
83
- if (!credentialId)
84
- return undefined;
85
- return await client.readSecret(credentialId);
86
- }
87
- }
88
- export class Credentials {
89
- store;
90
- constructor(store = new AgentAuthCredentialStore()) {
91
- this.store = store;
92
- }
93
- get(slug, owner) {
94
- return new CredentialReference(normalizeSlug(slug), normalizeOwner(owner), this);
95
- }
96
- async resolve(slug, owner) {
97
- const configurable = resolveRuntimeConfigurable(undefined);
98
- if (!configurable) {
99
- throw new Error("credentials.get(...) must be awaited inside a run: resolve a credential in a tool or middleware, not at import time");
100
- }
101
- const value = await this.store.fetch({
102
- slug,
103
- owner,
104
- identity: buildRuntimeIdentity(configurable),
105
- });
106
- if (value === undefined) {
107
- throw owner.type === "user"
108
- ? new CredentialAuthorizationRequiredError([slug])
109
- : new CredentialNotFoundError(slug, owner.type);
110
- }
111
- return value;
112
- }
113
- /**
114
- * Read an agent-owned secret outside a run.
115
- *
116
- * Connector declarations are loaded once per deployment, before any caller
117
- * exists. An agent-owned secret is deployment-scoped, so it is the one lookup
118
- * that carries no caller and can be resolved there.
119
- */
120
- async resolveDeploymentSecret(slug) {
121
- const value = await this.store.fetch({
122
- slug,
123
- owner: { type: "agent" },
124
- });
125
- if (value === undefined) {
126
- throw new CredentialNotFoundError(slug, "agent");
127
- }
128
- return value;
129
- }
130
- }
131
- function normalizeSlug(slug) {
132
- if (typeof slug !== "string") {
133
- throw new TypeError("credential slug must be a string");
134
- }
135
- const canonical = slug.trim();
136
- if (!canonical ||
137
- canonical.length > MAX_SLUG_LENGTH ||
138
- !SLUG_PATTERN.test(canonical)) {
139
- throw new TypeError(`credential slug ${JSON.stringify(slug)} is invalid: use lowercase letters, digits, and single hyphens, at most ${MAX_SLUG_LENGTH} characters`);
140
- }
141
- return canonical;
142
- }
143
- function normalizeOwner(owner) {
144
- if (!owner || typeof owner !== "object") {
145
- throw new TypeError('credential owner is required: pass { type: "agent" } or { type: "user" }');
146
- }
147
- const keys = Object.keys(owner);
148
- if (keys.some((key) => key !== "type" && key !== "id")) {
149
- throw new TypeError("credential owner has an unknown key");
150
- }
151
- if (owner.type === "agent") {
152
- if ("id" in owner) {
153
- throw new TypeError('credential owner "id" is not accepted for { type: "agent" }');
154
- }
155
- return { type: "agent" };
156
- }
157
- if (owner.type === "user") {
158
- if (owner.id === undefined)
159
- return { type: "user" };
160
- if (typeof owner.id !== "string" || !owner.id.trim()) {
161
- throw new TypeError('credential owner "id" must be a non-empty string');
162
- }
163
- return { type: "user", id: owner.id.trim() };
164
- }
165
- throw new TypeError("credential owner type is not supported");
166
- }
167
- /**
168
- * The `owner_id` a lookup is keyed by: the caller for a user, else the
169
- * deployment. Shared with the credential gate so a declared owner is checked
170
- * the same way wherever it is resolved.
171
- */
172
- export function resolveOwnerId(owner, identity, deploymentId) {
173
- if (owner.type === "user") {
174
- const authenticated = identity?.user.id;
175
- if (!authenticated) {
176
- throw new CredentialStoreError("user credentials require an authenticated user principal");
177
- }
178
- if (owner.id !== undefined && owner.id !== authenticated) {
179
- throw new CredentialStoreError("user credential owner id must match the authenticated principal");
180
- }
181
- return authenticated;
182
- }
183
- if (!deploymentId) {
184
- throw new CredentialStoreError("credentials are not configured: LANGSMITH_HOST_PROJECT_ID is not set");
185
- }
186
- return deploymentId;
187
- }
188
- /**
189
- * The Agent Auth binding for one caller.
190
- *
191
- * `credentials.get` and the pre-run credential gate both resolve their owner id
192
- * here, so a slug addresses the same Agent Auth row on either path.
193
- */
194
- export function resolveAgentAuthContext(identity, env = process.env) {
195
- const config = resolveAgentAuthConfig(env);
196
- if (!config.deploymentId) {
197
- throw new CredentialStoreError("credentials are not configured: LANGSMITH_HOST_PROJECT_ID is not set");
198
- }
199
- return {
200
- baseUrl: config.baseUrl,
201
- agentId: config.deploymentId,
202
- principalId: resolveOwnerId({ type: "user" }, identity, config.deploymentId),
203
- apiKey: config.apiKey,
204
- workspaceId: config.workspaceId,
205
- };
206
- }
207
- function resolveAgentAuthConfig(env) {
208
- const apiKey = env.LANGSMITH_API_KEY?.trim();
209
- if (!apiKey) {
210
- throw new CredentialStoreError("credentials are not configured: LANGSMITH_API_KEY is not set");
211
- }
212
- return {
213
- baseUrl: resolveAgentAuthBaseUrl(env),
214
- apiKey,
215
- deploymentId: env.LANGSMITH_HOST_PROJECT_ID?.trim() || undefined,
216
- workspaceId: env.LANGSMITH_WORKSPACE_ID?.trim() || undefined,
217
- };
218
- }
219
- /**
220
- * Agent Auth is served by the LangSmith API.
221
- *
222
- * Rejects a URL that carries a path, query, or userinfo, so a misconfigured
223
- * endpoint cannot send the API key at a different service.
224
- */
225
- export function resolveAgentAuthBaseUrl(env = process.env) {
226
- const raw = env.LANGSMITH_ENDPOINT?.trim() || DEFAULT_LANGSMITH_ENDPOINT;
227
- let parsed;
228
- try {
229
- parsed = new URL(raw);
230
- }
231
- catch {
232
- throw new CredentialStoreError("LANGSMITH_ENDPOINT is not a valid URL");
233
- }
234
- if (!["http:", "https:"].includes(parsed.protocol) ||
235
- !parsed.hostname ||
236
- parsed.username ||
237
- parsed.password ||
238
- (parsed.pathname !== "/" && parsed.pathname !== "") ||
239
- parsed.search ||
240
- parsed.hash) {
241
- throw new CredentialStoreError("LANGSMITH_ENDPOINT is not a valid URL");
242
- }
243
- return parsed.origin;
244
- }
245
- export const credentials = new Credentials();
246
- //# sourceMappingURL=credentials.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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;AAEvC,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,oCAAoC,EACpC,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAazB,MAAM,oBAAoB,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AACrE,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAErE,uDAAuD;AACvD,MAAM,eAAe,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAC;AAErE,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,CAAS;IACb,SAAS,CAA0B;IAE5C,YAAY,IAAY,EAAE,SAAkC;QAC1D,KAAK,CAAC,MAAM,SAAS,+BAA+B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAInB,IAAI;IACJ,KAAK;IACG,QAAQ;IALlB,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC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