managed-deepagents 0.6.2-dev.2 → 0.6.2-dev.21

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 (106) hide show
  1. package/README.md +16 -3
  2. package/dist/agent-auth.d.ts +115 -0
  3. package/dist/agent-auth.d.ts.map +1 -0
  4. package/dist/agent-auth.js +282 -0
  5. package/dist/agent-auth.js.map +1 -0
  6. package/dist/channels/errors.d.ts +0 -1
  7. package/dist/channels/errors.d.ts.map +1 -1
  8. package/dist/channels/errors.js +0 -12
  9. package/dist/channels/errors.js.map +1 -1
  10. package/dist/channels/manifest.d.ts +6 -0
  11. package/dist/channels/manifest.d.ts.map +1 -1
  12. package/dist/channels/messaging-registry.d.ts +0 -2
  13. package/dist/channels/messaging-registry.d.ts.map +1 -1
  14. package/dist/channels/messaging-registry.js +0 -6
  15. package/dist/channels/messaging-registry.js.map +1 -1
  16. package/dist/channels/registry-types.d.ts +1 -1
  17. package/dist/channels/schedule-delivery.d.ts +3 -1
  18. package/dist/channels/schedule-delivery.d.ts.map +1 -1
  19. package/dist/channels/schedule-delivery.js +41 -5
  20. package/dist/channels/schedule-delivery.js.map +1 -1
  21. package/dist/channels/slack/http.d.ts +1 -1
  22. package/dist/channels/trigger/client.d.ts +1 -0
  23. package/dist/channels/trigger/client.d.ts.map +1 -1
  24. package/dist/channels/trigger/client.js +19 -8
  25. package/dist/channels/trigger/client.js.map +1 -1
  26. package/dist/channels/trigger/types.d.ts +1 -1
  27. package/dist/channels/trigger/types.d.ts.map +1 -1
  28. package/dist/connections.d.ts +87 -0
  29. package/dist/connections.d.ts.map +1 -0
  30. package/dist/connections.js +296 -0
  31. package/dist/connections.js.map +1 -0
  32. package/dist/connectors/mcp/index.d.ts +31 -89
  33. package/dist/connectors/mcp/index.d.ts.map +1 -1
  34. package/dist/connectors/mcp/index.js +259 -81
  35. package/dist/connectors/mcp/index.js.map +1 -1
  36. package/dist/connectors/mcp/schema.d.ts +12 -0
  37. package/dist/connectors/mcp/schema.d.ts.map +1 -0
  38. package/dist/connectors/mcp/schema.js +57 -0
  39. package/dist/connectors/mcp/schema.js.map +1 -0
  40. package/dist/connectors/mcp/types.d.ts +64 -0
  41. package/dist/connectors/mcp/types.d.ts.map +1 -0
  42. package/dist/connectors/mcp/types.js +2 -0
  43. package/dist/connectors/mcp/types.js.map +1 -0
  44. package/dist/connectors/tool-selection.d.ts +12 -14
  45. package/dist/connectors/tool-selection.d.ts.map +1 -1
  46. package/dist/connectors/tool-selection.js +25 -39
  47. package/dist/connectors/tool-selection.js.map +1 -1
  48. package/dist/credential-gate.d.ts +40 -0
  49. package/dist/credential-gate.d.ts.map +1 -0
  50. package/dist/credential-gate.js +230 -0
  51. package/dist/credential-gate.js.map +1 -0
  52. package/dist/identity/index.d.ts +1 -1
  53. package/dist/identity/index.d.ts.map +1 -1
  54. package/dist/identity/index.js.map +1 -1
  55. package/dist/identity/types.d.ts +79 -5
  56. package/dist/identity/types.d.ts.map +1 -1
  57. package/dist/index.d.ts +11 -6
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +1 -0
  60. package/dist/index.js.map +1 -1
  61. package/dist/runtime/auth.d.ts +31 -4
  62. package/dist/runtime/auth.d.ts.map +1 -1
  63. package/dist/runtime/auth.js +58 -3
  64. package/dist/runtime/auth.js.map +1 -1
  65. package/dist/runtime/channel.d.ts +1 -3
  66. package/dist/runtime/channel.d.ts.map +1 -1
  67. package/dist/runtime/channel.js +0 -4
  68. package/dist/runtime/channel.js.map +1 -1
  69. package/dist/runtime/connector.d.ts +1 -3
  70. package/dist/runtime/connector.d.ts.map +1 -1
  71. package/dist/runtime/connector.js +0 -4
  72. package/dist/runtime/connector.js.map +1 -1
  73. package/dist/runtime/cors.d.ts +8 -6
  74. package/dist/runtime/cors.d.ts.map +1 -1
  75. package/dist/runtime/cors.js +18 -19
  76. package/dist/runtime/cors.js.map +1 -1
  77. package/dist/runtime/http.d.ts +1 -1
  78. package/dist/runtime/http.d.ts.map +1 -1
  79. package/dist/runtime/http.js.map +1 -1
  80. package/dist/runtime/identity-http.d.ts.map +1 -1
  81. package/dist/runtime/identity-http.js +22 -13
  82. package/dist/runtime/identity-http.js.map +1 -1
  83. package/dist/runtime/identity-runtime.d.ts +66 -6
  84. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  85. package/dist/runtime/identity-runtime.js +149 -1
  86. package/dist/runtime/identity-runtime.js.map +1 -1
  87. package/dist/runtime/index.d.ts +3 -8
  88. package/dist/runtime/index.d.ts.map +1 -1
  89. package/dist/runtime/index.js +15 -13
  90. package/dist/runtime/index.js.map +1 -1
  91. package/dist/runtime/managed-middleware.d.ts +2 -2
  92. package/dist/runtime/managed-middleware.js +6 -6
  93. package/dist/runtime/managed-tools.d.ts +19 -15
  94. package/dist/runtime/managed-tools.d.ts.map +1 -1
  95. package/dist/runtime/managed-tools.js +14 -13
  96. package/dist/runtime/managed-tools.js.map +1 -1
  97. package/dist/runtime/sandbox-manager.d.ts +1 -1
  98. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  99. package/dist/runtime/sandbox-manager.js +1 -1
  100. package/dist/runtime/sandbox-manager.js.map +1 -1
  101. package/dist/runtime/types.d.ts +2 -2
  102. package/package.json +8 -8
  103. package/dist/connectors/mcp/load.d.ts +0 -12
  104. package/dist/connectors/mcp/load.d.ts.map +0 -1
  105. package/dist/connectors/mcp/load.js +0 -122
  106. package/dist/connectors/mcp/load.js.map +0 -1
package/README.md CHANGED
@@ -245,11 +245,12 @@ used only to reconcile the registry and never enters the build or snapshot.
245
245
 
246
246
  Add `connectors/mcp.ts` to attach MCP servers. The file must export a named
247
247
  `connector`. By default, MDA exposes every tool loaded from each declared
248
- server. Supply your own auth via static `headers` when the server requires
249
- credentials:
248
+ server. In `mda dev`, an agent-owned connection reads from
249
+ `MDA_DEV_<SLUG>` with the slug uppercased and hyphens changed to underscores.
250
+ Hosted deployments resolve workspace connections from Agent Auth:
250
251
 
251
252
  ```ts
252
- import { connectors } from "managed-deepagents";
253
+ import { connectors, connections } from "managed-deepagents";
253
254
 
254
255
  export const connector = connectors.mcp({
255
256
  mcpServers: {
@@ -257,11 +258,23 @@ export const connector = connectors.mcp({
257
258
  transport: "http",
258
259
  url: "https://docs.langchain.com/mcp",
259
260
  includeTools: ["search", "fetch"],
261
+ connection: connections.get("docs-token", { type: "agent" }),
260
262
  },
261
263
  },
262
264
  });
263
265
  ```
264
266
 
267
+ For this example, set `MDA_DEV_DOCS_TOKEN`.
268
+
269
+ A user-owned connection — `connections.get(slug, { type: "user" })` — resolves
270
+ per caller (OAuth or opaque). The pre-run credential gate interrupts the run
271
+ when a grant is missing. `mda dev` has no deployment to hold user grants, so
272
+ a user-owned connection fails there with an actionable error; deploy the agent
273
+ to exercise one.
274
+
275
+ Provision workspace connections with `mda connection create` before deploy.
276
+ `mda connection check` verifies manifest slugs exist in the workspace.
277
+
265
278
  Use `includeTools` or `excludeTools` inside a server config to select a subset.
266
279
  Tool names are raw MCP tool names before the managed `{server}__` prefix is
267
280
  applied, so `includeTools: ["search"]` on server `langchainDocs` exposes
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Agent Auth client used by `credentials.get` and the pre-run credential gate.
3
+ *
4
+ * Talks to the shipped Agent Auth APIs (credentials + oauth-authorization-sessions),
5
+ * not the aspirational `credentials/mint` endpoint.
6
+ */
7
+ export declare const AGENT_AUTH_TIMEOUT_MS = 10000;
8
+ export declare const AGENT_AUTH_PROVIDER_PAGE_SIZE = 100;
9
+ export declare const AGENT_AUTH_MAX_PROVIDER_PAGES = 20;
10
+ export interface AgentAuthHttpConfig {
11
+ apiKey?: string;
12
+ workspaceId?: string;
13
+ }
14
+ /** Query string that addresses one credential by its natural key. */
15
+ export declare function agentAuthCredentialQuery(options: {
16
+ ownerType: string;
17
+ ownerId: string;
18
+ kind: string;
19
+ slug: string;
20
+ }): string;
21
+ export declare function agentAuthHeaders(config: AgentAuthHttpConfig): Record<string, string>;
22
+ /** One Agent Auth HTTP call: no redirects, bounded timeout, JSON body. */
23
+ export declare function requestAgentAuthJson(options: {
24
+ url: string;
25
+ init?: Omit<RequestInit, "headers" | "signal">;
26
+ config: AgentAuthHttpConfig;
27
+ timeoutMs: number;
28
+ fetchImpl: typeof fetch;
29
+ }): Promise<{
30
+ ok: boolean;
31
+ status: number;
32
+ body: Record<string, unknown>;
33
+ }>;
34
+ export interface AgentAuthContext {
35
+ baseUrl: string;
36
+ /** Deployment id, passed to oauth-authorization-sessions as `agent_id`. */
37
+ agentId: string;
38
+ /** Authenticated caller, used as `owner_id` for user credentials. */
39
+ principalId: string;
40
+ apiKey?: string;
41
+ workspaceId?: string;
42
+ }
43
+ /** One credential slug the caller has not granted, with its connect URL. */
44
+ export interface PendingAuthorization {
45
+ slug: string;
46
+ connectUrl: string;
47
+ authId: string;
48
+ }
49
+ export declare class CredentialAuthorizationRequiredError extends Error {
50
+ readonly slugs: readonly string[];
51
+ readonly name = "CredentialAuthorizationRequiredError";
52
+ constructor(slugs: readonly string[]);
53
+ }
54
+ export declare class AgentAuthUnknownProviderError extends Error {
55
+ readonly slug: string;
56
+ readonly name = "AgentAuthUnknownProviderError";
57
+ constructor(slug: string);
58
+ }
59
+ /**
60
+ * Agent Auth could not answer. Callers pass a fixed message: a response body
61
+ * can quote secret material, so it never reaches this error.
62
+ */
63
+ export declare class CredentialStoreError extends Error {
64
+ readonly status?: number | undefined;
65
+ readonly name = "CredentialStoreError";
66
+ constructor(message: string, status?: number | undefined);
67
+ }
68
+ export interface WorkspaceConnection {
69
+ connectionId: string;
70
+ kind: string;
71
+ ownerPolicy: string;
72
+ }
73
+ /**
74
+ * Bound Agent Auth HTTP client. One instance per caller/run; headers, origin,
75
+ * and the request timeout stay on the instance rather than each call site.
76
+ */
77
+ export declare class AgentAuth {
78
+ #private;
79
+ readonly context: AgentAuthContext;
80
+ constructor(context: AgentAuthContext, fetchImpl?: typeof fetch, timeoutMs?: number);
81
+ /** List workspace connections and return the row for `slug`, if any. */
82
+ findWorkspaceConnection(slug: string): Promise<WorkspaceConnection | undefined>;
83
+ /** Read a caller-owned opaque secret grant for a workspace connection slug. */
84
+ readUserSecret(slug: string): Promise<string | undefined>;
85
+ /** Read an OAuth access token stored on a workspace connection row. */
86
+ readConnectionAccessToken(connectionId: string): Promise<string | undefined>;
87
+ /**
88
+ * Read the caller's OAuth access token for a slug without starting a session.
89
+ *
90
+ * Reads never mint, so a caller can be probed repeatedly — on every replay of
91
+ * an interrupted node, for instance — without leaving authorization sessions
92
+ * behind.
93
+ *
94
+ * @returns The access token, or `undefined` when the caller must connect.
95
+ */
96
+ readUserAccessToken(slug: string): Promise<string | undefined>;
97
+ /**
98
+ * Start an OAuth authorization session for a slug the caller has not granted.
99
+ *
100
+ * @returns The pending session, including the user-facing connect URL.
101
+ */
102
+ startAuthorizationSession(slug: string): Promise<PendingAuthorization>;
103
+ /** oauth-providers has no slug filter, so the match is made across pages. */
104
+ resolveOAuthProviderId(slug: string): Promise<string>;
105
+ /** The credential key is `credential_id`, never `id`. */
106
+ findCredentialId(options: {
107
+ ownerType: string;
108
+ ownerId: string;
109
+ kind: string;
110
+ slug: string;
111
+ }): Promise<string | undefined>;
112
+ /** @returns The secret, or `undefined` when Agent Auth has no value (404). */
113
+ readSecret(credentialId: string): Promise<string | undefined>;
114
+ }
115
+ //# sourceMappingURL=agent-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-auth.d.ts","sourceRoot":"","sources":["../src/agent-auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAC5C,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qEAAqE;AACrE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,SAA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AC,OAAO,EAAE;QAC9B,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc9B;IAED,8EAA8E;IACxE,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAalE;CAqCF"}
@@ -0,0 +1,282 @@
1
+ /**
2
+ * Agent Auth client used by `credentials.get` and the pre-run credential gate.
3
+ *
4
+ * Talks to the shipped Agent Auth APIs (credentials + oauth-authorization-sessions),
5
+ * not the aspirational `credentials/mint` endpoint.
6
+ */
7
+ import { fetchWithTimeout } from "./runtime/http.js";
8
+ export const AGENT_AUTH_TIMEOUT_MS = 10_000;
9
+ export const AGENT_AUTH_PROVIDER_PAGE_SIZE = 100;
10
+ export const AGENT_AUTH_MAX_PROVIDER_PAGES = 20;
11
+ /** Query string that addresses one credential by its natural key. */
12
+ export function agentAuthCredentialQuery(options) {
13
+ return new URLSearchParams({
14
+ owner_type: options.ownerType,
15
+ owner_id: options.ownerId,
16
+ kind: options.kind,
17
+ slug: options.slug,
18
+ }).toString();
19
+ }
20
+ export function agentAuthHeaders(config) {
21
+ const headers = {
22
+ accept: "application/json",
23
+ "content-type": "application/json",
24
+ "x-langsmith-product": "mda",
25
+ };
26
+ const apiKey = config.apiKey?.trim();
27
+ if (apiKey) {
28
+ headers["x-api-key"] = apiKey;
29
+ }
30
+ const workspaceId = config.workspaceId?.trim();
31
+ if (workspaceId) {
32
+ headers["x-tenant-id"] = workspaceId;
33
+ }
34
+ return headers;
35
+ }
36
+ /** One Agent Auth HTTP call: no redirects, bounded timeout, JSON body. */
37
+ export async function requestAgentAuthJson(options) {
38
+ const response = await fetchWithTimeout(options.url, {
39
+ ...options.init,
40
+ redirect: "error",
41
+ headers: agentAuthHeaders(options.config),
42
+ }, options.timeoutMs, options.fetchImpl);
43
+ const decoded = await response.json().catch(() => ({}));
44
+ return {
45
+ ok: response.ok,
46
+ status: response.status,
47
+ body: decoded && typeof decoded === "object"
48
+ ? decoded
49
+ : {},
50
+ };
51
+ }
52
+ export class CredentialAuthorizationRequiredError extends Error {
53
+ slugs;
54
+ name = "CredentialAuthorizationRequiredError";
55
+ constructor(slugs) {
56
+ super(`the caller has not connected: ${slugs.join(", ")}. ` +
57
+ "Declare the credential on a connector so the pre-run gate can request it.");
58
+ this.slugs = slugs;
59
+ }
60
+ }
61
+ export class AgentAuthUnknownProviderError extends Error {
62
+ slug;
63
+ name = "AgentAuthUnknownProviderError";
64
+ constructor(slug) {
65
+ super(`Agent Auth has no OAuth provider registered for slug "${slug}". ` +
66
+ "Register the provider or fix the credential slug.");
67
+ this.slug = slug;
68
+ }
69
+ }
70
+ /**
71
+ * Agent Auth could not answer. Callers pass a fixed message: a response body
72
+ * can quote secret material, so it never reaches this error.
73
+ */
74
+ export class CredentialStoreError extends Error {
75
+ status;
76
+ name = "CredentialStoreError";
77
+ constructor(message, status) {
78
+ super(status === undefined ? message : `${message} (status ${status})`);
79
+ this.status = status;
80
+ }
81
+ }
82
+ /**
83
+ * Bound Agent Auth HTTP client. One instance per caller/run; headers, origin,
84
+ * and the request timeout stay on the instance rather than each call site.
85
+ */
86
+ export class AgentAuth {
87
+ context;
88
+ #fetchImpl;
89
+ #timeoutMs;
90
+ constructor(context, fetchImpl = fetch, timeoutMs = AGENT_AUTH_TIMEOUT_MS) {
91
+ this.context = context;
92
+ this.#fetchImpl = fetchImpl;
93
+ this.#timeoutMs = timeoutMs;
94
+ }
95
+ /** List workspace connections and return the row for `slug`, if any. */
96
+ async findWorkspaceConnection(slug) {
97
+ const workspaceId = this.context.workspaceId?.trim();
98
+ if (!workspaceId) {
99
+ throw new CredentialStoreError("connections are not configured: LANGSMITH_WORKSPACE_ID is not set");
100
+ }
101
+ let cursor;
102
+ for (let page = 0; page < AGENT_AUTH_MAX_PROVIDER_PAGES; page += 1) {
103
+ const params = new URLSearchParams({
104
+ owner_type: "workspace",
105
+ owner_id: workspaceId,
106
+ page_size: String(AGENT_AUTH_PROVIDER_PAGE_SIZE),
107
+ });
108
+ if (cursor) {
109
+ params.set("cursor", cursor);
110
+ }
111
+ const { ok, status, body } = await this.#request(`/v1/agent-auth/credentials?${params.toString()}`, { method: "GET" });
112
+ if (!ok) {
113
+ throw new CredentialStoreError("Agent Auth list connections failed", status);
114
+ }
115
+ const items = Array.isArray(body.items) ? body.items : [];
116
+ const match = items.find((item) => !!item &&
117
+ typeof item === "object" &&
118
+ String(item.slug) === slug);
119
+ if (match) {
120
+ const connectionId = String(match.credential_id ?? match.connection_id ?? match.id ?? "");
121
+ const kind = String(match.kind ?? "");
122
+ const ownerPolicy = String(match.owner_policy ?? "agent");
123
+ if (!connectionId || !kind) {
124
+ throw new CredentialStoreError("Agent Auth connection row missing id or kind");
125
+ }
126
+ return { connectionId, kind, ownerPolicy };
127
+ }
128
+ const next = body.next_cursor;
129
+ if (typeof next !== "string" || !next || next === cursor) {
130
+ return undefined;
131
+ }
132
+ cursor = next;
133
+ }
134
+ throw new CredentialStoreError("Agent Auth connection list returned too many pages");
135
+ }
136
+ /** Read a caller-owned opaque secret grant for a workspace connection slug. */
137
+ async readUserSecret(slug) {
138
+ const credentialId = await this.findCredentialId({
139
+ ownerType: "user",
140
+ ownerId: this.context.principalId,
141
+ kind: "secret",
142
+ slug,
143
+ });
144
+ if (!credentialId) {
145
+ return undefined;
146
+ }
147
+ return await this.readSecret(credentialId);
148
+ }
149
+ /** Read an OAuth access token stored on a workspace connection row. */
150
+ async readConnectionAccessToken(connectionId) {
151
+ return await this.#fetchAccessToken(connectionId);
152
+ }
153
+ /**
154
+ * Read the caller's OAuth access token for a slug without starting a session.
155
+ *
156
+ * Reads never mint, so a caller can be probed repeatedly — on every replay of
157
+ * an interrupted node, for instance — without leaving authorization sessions
158
+ * behind.
159
+ *
160
+ * @returns The access token, or `undefined` when the caller must connect.
161
+ */
162
+ async readUserAccessToken(slug) {
163
+ const credentialId = await this.findCredentialId({
164
+ ownerType: "user",
165
+ ownerId: this.context.principalId,
166
+ kind: "oauth2",
167
+ slug,
168
+ });
169
+ if (!credentialId)
170
+ return undefined;
171
+ return await this.#fetchAccessToken(credentialId);
172
+ }
173
+ /**
174
+ * Start an OAuth authorization session for a slug the caller has not granted.
175
+ *
176
+ * @returns The pending session, including the user-facing connect URL.
177
+ */
178
+ async startAuthorizationSession(slug) {
179
+ const providerId = await this.resolveOAuthProviderId(slug);
180
+ const { ok, status, body } = await this.#request("/v1/agent-auth/oauth-authorization-sessions", {
181
+ method: "POST",
182
+ body: JSON.stringify({
183
+ provider_id: providerId,
184
+ principal_id: this.context.principalId,
185
+ agent_id: this.context.agentId,
186
+ }),
187
+ });
188
+ if (!ok) {
189
+ throw new CredentialStoreError("Agent Auth create oauth-authorization-session failed", status);
190
+ }
191
+ const authId = String(body.id ?? "");
192
+ const connectUrl = String(body.verification_url ?? "");
193
+ if (!authId || !connectUrl) {
194
+ throw new CredentialStoreError("Agent Auth oauth-authorization-session missing id or verification_url");
195
+ }
196
+ return { slug, connectUrl, authId };
197
+ }
198
+ /** oauth-providers has no slug filter, so the match is made across pages. */
199
+ async resolveOAuthProviderId(slug) {
200
+ let cursor;
201
+ for (let page = 0; page < AGENT_AUTH_MAX_PROVIDER_PAGES; page += 1) {
202
+ const params = new URLSearchParams({
203
+ page_size: String(AGENT_AUTH_PROVIDER_PAGE_SIZE),
204
+ });
205
+ if (cursor)
206
+ params.set("cursor", cursor);
207
+ const { ok, status, body } = await this.#request(`/v1/agent-auth/oauth-providers?${params.toString()}`, { method: "GET" });
208
+ if (!ok) {
209
+ throw new CredentialStoreError("Agent Auth list oauth-providers failed", status);
210
+ }
211
+ const items = Array.isArray(body.items) ? body.items : [];
212
+ const match = items.find((item) => !!item &&
213
+ typeof item === "object" &&
214
+ String(item.slug) === slug);
215
+ if (match?.id) {
216
+ return String(match.id);
217
+ }
218
+ const next = body.next_cursor;
219
+ if (typeof next !== "string" || !next || next === cursor) {
220
+ throw new AgentAuthUnknownProviderError(slug);
221
+ }
222
+ cursor = next;
223
+ }
224
+ throw new CredentialStoreError("Agent Auth oauth-provider list returned too many pages");
225
+ }
226
+ /** The credential key is `credential_id`, never `id`. */
227
+ async findCredentialId(options) {
228
+ const { ok, status, body } = await this.#request(`/v1/agent-auth/credentials?${agentAuthCredentialQuery(options)}`, { method: "GET" });
229
+ if (!ok) {
230
+ throw new CredentialStoreError("Agent Auth list credentials failed", status);
231
+ }
232
+ const [row] = Array.isArray(body.items) ? body.items : [];
233
+ const id = row?.credential_id;
234
+ return typeof id === "string" ? id : undefined;
235
+ }
236
+ /** @returns The secret, or `undefined` when Agent Auth has no value (404). */
237
+ async readSecret(credentialId) {
238
+ const { ok, status, body } = await this.#request(`/v1/agent-auth/credentials/${encodeURIComponent(credentialId)}/secret`, { method: "GET" });
239
+ if (status === 404) {
240
+ return undefined;
241
+ }
242
+ if (!ok) {
243
+ throw new CredentialStoreError("Agent Auth get secret failed", status);
244
+ }
245
+ const secret = body.secret;
246
+ return typeof secret === "string" && secret.length > 0 ? secret : undefined;
247
+ }
248
+ async #fetchAccessToken(credentialId) {
249
+ const { ok, status, body } = await this.#request(`/v1/agent-auth/credentials/${encodeURIComponent(credentialId)}/oauth2`, { method: "GET" });
250
+ if (isAuthorizationRequired(status, body)) {
251
+ return undefined;
252
+ }
253
+ if (!ok) {
254
+ throw new CredentialStoreError("Agent Auth get oauth2 failed", status);
255
+ }
256
+ const oauth2 = body.oauth2 && typeof body.oauth2 === "object"
257
+ ? body.oauth2
258
+ : body;
259
+ const token = oauth2.access_token;
260
+ return typeof token === "string" && token ? token : undefined;
261
+ }
262
+ async #request(path, init = {}) {
263
+ return await requestAgentAuthJson({
264
+ url: `${this.context.baseUrl}${path}`,
265
+ init,
266
+ config: this.context,
267
+ timeoutMs: this.#timeoutMs,
268
+ fetchImpl: this.#fetchImpl,
269
+ });
270
+ }
271
+ }
272
+ /** Agent Auth answers 409 when a stored grant has lapsed and needs re-auth. */
273
+ function isAuthorizationRequired(status, body) {
274
+ if (status !== 409) {
275
+ return false;
276
+ }
277
+ const detail = String(body.detail ?? body.title ?? body.error ?? "").toLowerCase();
278
+ return (body.error === "authorization_required" ||
279
+ detail.includes("authorization is required") ||
280
+ detail.includes("oauth authorization"));
281
+ }
282
+ //# sourceMappingURL=agent-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-auth.js","sourceRoot":"","sources":["../src/agent-auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AACjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAOhD,qEAAqE;AACrE,MAAM,UAAU,wBAAwB,CAAC,OAKxC;IACC,OAAO,IAAI,eAAe,CAAC;QACzB,UAAU,EAAE,OAAO,CAAC,SAAS;QAC7B,QAAQ,EAAE,OAAO,CAAC,OAAO;QACzB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC,QAAQ,EAAE,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,MAA2B;IAE3B,MAAM,OAAO,GAA2B;QACtC,MAAM,EAAE,kBAAkB;QAC1B,cAAc,EAAE,kBAAkB;QAClC,qBAAqB,EAAE,KAAK;KAC7B,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;IACrC,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;IAChC,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC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class.
3
3
  */
4
4
  import type { ChannelErrorCode } from "./types.js";
5
- export declare const CHANNEL_ERROR_CODES: readonly ChannelErrorCode[];
6
5
  /** Typed channel failure with a stable machine-readable code. */
7
6
  export declare class ChannelError extends Error {
8
7
  readonly code: ChannelErrorCode;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/channels/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAWjD,CAAC;AAEX,iEAAiE;AACjE,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAEhC,YAAY,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAIlD;CACF"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/channels/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,iEAAiE;AACjE,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAEhC,YAAY,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAIlD;CACF"}
@@ -1,18 +1,6 @@
1
1
  /**
2
2
  * Shared channel error codes and a typed error class.
3
3
  */
4
- export const CHANNEL_ERROR_CODES = [
5
- "channel_invalid_signature",
6
- "channel_replay_rejected",
7
- "channel_installation_not_found",
8
- "channel_event_filtered",
9
- "channel_identity_unresolvable",
10
- "channel_destination_forbidden",
11
- "channel_invocation_rate_limited",
12
- "channel_run_failed",
13
- "channel_provider_rate_limited",
14
- "channel_provider_rejected",
15
- ];
16
4
  /** Typed channel failure with a stable machine-readable code. */
17
5
  export class ChannelError extends Error {
18
6
  code;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/channels/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAgC;IAC9D,2BAA2B;IAC3B,yBAAyB;IACzB,gCAAgC;IAChC,wBAAwB;IACxB,+BAA+B;IAC/B,+BAA+B;IAC/B,iCAAiC;IACjC,oBAAoB;IACpB,+BAA+B;IAC/B,2BAA2B;CACnB,CAAC;AAEX,iEAAiE;AACjE,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,CAAmB;IAEhC,YAAY,IAAsB,EAAE,OAAe;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/channels/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,iEAAiE;AACjE,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,CAAmB;IAEhC,YAAY,IAAsB,EAAE,OAAe;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -31,6 +31,12 @@ export interface ChannelManifest {
31
31
  requiredPermissions: readonly string[];
32
32
  /** Env vars deploy must ensure when this channel is present. */
33
33
  requiredEnv: readonly string[];
34
+ /** User-owned connection slugs that must exist in the workspace vault. */
35
+ userConnections?: readonly string[];
36
+ /** Agent-owned connection slugs referenced by this connector. */
37
+ agentConnections?: readonly string[];
38
+ /** @deprecated Use {@link userConnections}. */
39
+ userCredentials?: readonly string[];
34
40
  /** Opaque-to-core provider config (Slack filters/conversation, …). */
35
41
  providerConfig: JsonObject;
36
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/channels/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,gEAAgE;IAChE,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,sEAAsE;IACtE,cAAc,EAAE,UAAU,CAAC;CAC5B"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/channels/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,gEAAgE;IAChE,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,sEAAsE;IACtE,cAAc,EAAE,UAAU,CAAC;CAC5B"}
@@ -12,8 +12,6 @@ import type { Connector } from "../runtime/connector.js";
12
12
  export declare function registerChannelMessaging(channels: readonly Channel[]): void;
13
13
  /** Register messaging factories from collected connectors (e.g. GitHub). */
14
14
  export declare function registerConnectorMessaging(connectors: readonly Connector[]): void;
15
- /** Clear the registry (tests). */
16
- export declare function clearMessagingRegistry(): void;
17
15
  /** Build a transport for a channel/connector file-stem name. */
18
16
  export declare function messagingTransportForName(name: string, env?: NodeJS.ProcessEnv): ChannelTransport | undefined;
19
17
  /** Providers allowed as trusted source-provider stamps. */
@@ -1 +1 @@
1
- {"version":3,"file":"messaging-registry.d.ts","sourceRoot":"","sources":["../../src/channels/messaging-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoCzD,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAE3E;AAED,4EAA4E;AAC5E,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,SAAS,SAAS,EAAE,GAC/B,IAAI,CAEN;AAED,kCAAkC;AAClC,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C;AAED,gEAAgE;AAChE,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,gBAAgB,GAAG,SAAS,CAE9B;AAED,2DAA2D;AAC3D,wBAAgB,yBAAyB,IAAI,WAAW,CAAC,MAAM,CAAC,CAE/D"}
1
+ {"version":3,"file":"messaging-registry.d.ts","sourceRoot":"","sources":["../../src/channels/messaging-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoCzD,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAE3E;AAED,4EAA4E;AAC5E,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,SAAS,SAAS,EAAE,GAC/B,IAAI,CAEN;AAED,gEAAgE;AAChE,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,gBAAgB,GAAG,SAAS,CAE9B;AAED,2DAA2D;AAC3D,wBAAgB,yBAAyB,IAAI,WAAW,CAAC,MAAM,CAAC,CAE/D"}
@@ -33,12 +33,6 @@ export function registerChannelMessaging(channels) {
33
33
  export function registerConnectorMessaging(connectors) {
34
34
  registerMessagingSources(connectors);
35
35
  }
36
- /** Clear the registry (tests). */
37
- export function clearMessagingRegistry() {
38
- byName.clear();
39
- trustedProviders.clear();
40
- trustedProviders.add("slack");
41
- }
42
36
  /** Build a transport for a channel/connector file-stem name. */
43
37
  export function messagingTransportForName(name, env = process.env) {
44
38
  return byName.get(name)?.(env);
@@ -1 +1 @@
1
- {"version":3,"file":"messaging-registry.js","sourceRoot":"","sources":["../../src/channels/messaging-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,MAAM,MAAM,GAAG,IAAI,GAAG,EAA4B,CAAC;AACnD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AY,EAAE,QAAQ,EAAE,CAAC;YAC3B,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;AACH,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,wBAAwB,CAAC,QAA4B;IACnE,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,0BAA0B,CACxC,UAAgC;IAEhC,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACvC,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,yBAAyB,CACvC,IAAY,EACZ,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,yBAAyB;IACvC,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -16,7 +16,7 @@ export interface ChannelHttpContext {
16
16
  definition?: unknown;
17
17
  /**
18
18
  * Pre-read raw body when the HTTP framework may have consumed `request`
19
- * (Hono mount passes `await c.req.text()`).
19
+ * (the managed mount caps Events bodies at 1 MiB).
20
20
  */
21
21
  rawBody?: string | Uint8Array;
22
22
  }
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { ManagedMiddleware } from "../runtime/managed-middleware.js";
13
13
  import type { ChannelAddress } from "./types.js";
14
- /** Override LangGraph run metadata resolution. Test-only. */
14
+ /** Override LangGraph run metadata resolution. @internal Test-only. */
15
15
  export declare function setScheduleMetadataForTests(loader?: () => {
16
16
  mda_managed?: unknown;
17
17
  mda_schedule?: unknown;
@@ -48,6 +48,8 @@ export interface DeliverScheduleResultInput {
48
48
  threadId?: string;
49
49
  }) => Promise<unknown>;
50
50
  }
51
+ /** Return the deployment ID supplied by the managed runtime. */
52
+ export declare function getDeploymentId(env?: NodeJS.ProcessEnv): string | undefined;
51
53
  /**
52
54
  * Post schedule result text to the configured channel. Soft-fails (logs) on
53
55
  * missing token / provider errors so cron runs are not marked failed.
@@ -1 +1 @@
1
- {"version":3,"file":"schedule-delivery.d.ts","sourceRoot":"","sources":["../../src/channels/schedule-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAK1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,6DAA6D;AAC7D,wBAAgB,2BAA2B,CACzC,MAAM,CAAC,EAAE,MAAM;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAC3E,IAAI,CAEN;AAED,uDAAuD;AACvD,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EACE;QAAE,IAAI,EAAE,uBAAuB,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,GACzD;QAAE,IAAI,EAAE,iBAAiB,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAChD,2BAA2B,GAAG,SAAS,CAoDzC;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,2BAA2B,CAAC,IAAI,CAAC,GACpC,cAAc,CAKhB;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,2BAA2B,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACb,IAAI,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