managed-deepagents 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/connectors/langsmith.d.ts +385 -0
  2. package/dist/connectors/langsmith.d.ts.map +1 -0
  3. package/dist/connectors/langsmith.js +431 -0
  4. package/dist/connectors/langsmith.js.map +1 -0
  5. package/dist/connectors.d.ts +7 -2
  6. package/dist/connectors.d.ts.map +1 -1
  7. package/dist/connectors.js +18 -1
  8. package/dist/connectors.js.map +1 -1
  9. package/dist/identity/index.d.ts +88 -0
  10. package/dist/identity/index.d.ts.map +1 -0
  11. package/dist/identity/index.js +303 -0
  12. package/dist/identity/index.js.map +1 -0
  13. package/dist/identity/supabase.d.ts +48 -0
  14. package/dist/identity/supabase.d.ts.map +1 -0
  15. package/dist/identity/supabase.js +139 -0
  16. package/dist/identity/supabase.js.map +1 -0
  17. package/dist/identity/types.d.ts +185 -0
  18. package/dist/identity/types.d.ts.map +1 -0
  19. package/dist/identity/types.js +8 -0
  20. package/dist/identity/types.js.map +1 -0
  21. package/dist/index.d.ts +5 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/runtime/auth.d.ts +56 -0
  26. package/dist/runtime/auth.d.ts.map +1 -0
  27. package/dist/runtime/auth.js +204 -0
  28. package/dist/runtime/auth.js.map +1 -0
  29. package/dist/runtime/connector.d.ts +138 -0
  30. package/dist/runtime/connector.d.ts.map +1 -0
  31. package/dist/runtime/connector.js +82 -0
  32. package/dist/runtime/connector.js.map +1 -0
  33. package/dist/runtime/credentials.d.ts +68 -0
  34. package/dist/runtime/credentials.d.ts.map +1 -0
  35. package/dist/runtime/credentials.js +212 -0
  36. package/dist/runtime/credentials.js.map +1 -0
  37. package/dist/runtime/identity-http.d.ts +27 -0
  38. package/dist/runtime/identity-http.d.ts.map +1 -0
  39. package/dist/runtime/identity-http.js +159 -0
  40. package/dist/runtime/identity-http.js.map +1 -0
  41. package/dist/runtime/identity-runtime.d.ts +54 -0
  42. package/dist/runtime/identity-runtime.d.ts.map +1 -0
  43. package/dist/runtime/identity-runtime.js +151 -0
  44. package/dist/runtime/identity-runtime.js.map +1 -0
  45. package/dist/runtime/index.d.ts +14 -1
  46. package/dist/runtime/index.d.ts.map +1 -1
  47. package/dist/runtime/index.js +114 -68
  48. package/dist/runtime/index.js.map +1 -1
  49. package/dist/runtime/langsmith-connector.d.ts +247 -0
  50. package/dist/runtime/langsmith-connector.d.ts.map +1 -0
  51. package/dist/runtime/langsmith-connector.js +1175 -0
  52. package/dist/runtime/langsmith-connector.js.map +1 -0
  53. package/dist/runtime/managed-middleware.d.ts +25 -0
  54. package/dist/runtime/managed-middleware.d.ts.map +1 -0
  55. package/dist/runtime/managed-middleware.js +76 -0
  56. package/dist/runtime/managed-middleware.js.map +1 -0
  57. package/dist/runtime/managed-tools.d.ts +61 -0
  58. package/dist/runtime/managed-tools.d.ts.map +1 -0
  59. package/dist/runtime/managed-tools.js +102 -0
  60. package/dist/runtime/managed-tools.js.map +1 -0
  61. package/dist/runtime/sandbox-manager.d.ts +3 -2
  62. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  63. package/dist/runtime/sandbox-manager.js.map +1 -1
  64. package/dist/runtime/setup-script.d.ts +4 -7
  65. package/dist/runtime/setup-script.d.ts.map +1 -1
  66. package/dist/runtime/setup-script.js.map +1 -1
  67. package/dist/runtime/types.d.ts +23 -21
  68. package/dist/runtime/types.d.ts.map +1 -1
  69. package/dist/runtime/validated-token.d.ts +53 -0
  70. package/dist/runtime/validated-token.d.ts.map +1 -0
  71. package/dist/runtime/validated-token.js +411 -0
  72. package/dist/runtime/validated-token.js.map +1 -0
  73. package/dist/types.d.ts +15 -0
  74. package/dist/types.d.ts.map +1 -1
  75. package/package.json +12 -8
@@ -0,0 +1,159 @@
1
+ import { Hono } from "hono";
2
+ import { resolveRequestIdentity } from "./auth.js";
3
+ import { issueGuestToken } from "./validated-token.js";
4
+ /** Signals a secured route was reached but no identity is declared to resolve it. */
5
+ class IdentityNotConfiguredError extends Error {
6
+ status = 401;
7
+ constructor() {
8
+ super("secured connector route requires an identity declaration, but this " +
9
+ "deployment has none");
10
+ }
11
+ }
12
+ /**
13
+ * Build the single managed HTTP app mounted via `langgraph.json` `http.app`.
14
+ *
15
+ * It layers two concerns onto the built-in LangGraph routes:
16
+ * - **identity** — public guest issuance (`POST /identity/guest`) when the
17
+ * declared identity enables a guest provider;
18
+ * - **connectors** — each connector implementing `http` gets a sub-router
19
+ * namespaced under `/connectors/{kind}` and mounts its own routes.
20
+ *
21
+ * Connector routes are **secure by default**: MDA resolves and enforces the
22
+ * caller's identity before the handler runs, and a route must opt out of
23
+ * authentication explicitly (`router.public.*`). The connector HTTP surface is
24
+ * logged at construction so the (especially unauthenticated) routes are never
25
+ * invisible.
26
+ */
27
+ export function buildManagedHttpApp(inputs) {
28
+ const app = new Hono();
29
+ if (inputs.identity) {
30
+ mountIdentityRoutes(app, inputs.identity);
31
+ }
32
+ const mounted = [];
33
+ for (const connector of inputs.connectors ?? []) {
34
+ if (typeof connector.http === "function") {
35
+ mountConnectorRoutes(app, connector, inputs.identity?.config, mounted);
36
+ }
37
+ }
38
+ logConnectorSurface(mounted);
39
+ return app;
40
+ }
41
+ /** Mount the public identity routes (guest issuance) onto `app`. */
42
+ function mountIdentityRoutes(app, identity) {
43
+ const http = identity.config.ingress.http;
44
+ if (http === "trusted_backend") {
45
+ return;
46
+ }
47
+ const guestProvider = http.providers.find((provider) => provider.guest?.issue);
48
+ if (!guestProvider) {
49
+ return;
50
+ }
51
+ app.post("/identity/guest", async (c) => {
52
+ const token = await issueGuestToken(guestProvider);
53
+ return c.json({ token });
54
+ });
55
+ }
56
+ /**
57
+ * Mount a connector's `http` routes on a sub-router namespaced under
58
+ * `/connectors/{kind}`, so connector routes cannot collide with identity/API
59
+ * routes or with each other.
60
+ *
61
+ * The connector's `http` hook must mount synchronously. Async hooks are rejected
62
+ * because LangGraph captures custom routes when the module is imported — a
63
+ * deferred mount leaves those paths as platform 404s.
64
+ */
65
+ function mountConnectorRoutes(app, connector, cfg, mounted) {
66
+ const sub = new Hono();
67
+ const router = honoConnectorRouter(sub, connector.kind, cfg, mounted);
68
+ const ctx = {
69
+ router,
70
+ identity: cfg,
71
+ requireIdentity: (request) => {
72
+ if (!cfg) {
73
+ return Promise.reject(new Error("identity is not configured for this deployment; declare an " +
74
+ "identity to resolve caller identity on connector routes."));
75
+ }
76
+ return resolveRequestIdentity(cfg, request);
77
+ },
78
+ };
79
+ const result = connector.http?.(ctx);
80
+ if (result != null &&
81
+ typeof result.then === "function") {
82
+ throw new Error(`Connector "${connector.kind}" http() returned a Promise. HTTP hooks must ` +
83
+ `mount routes synchronously so LangGraph can capture them at import time.`);
84
+ }
85
+ app.route(`/connectors/${connector.kind}`, sub);
86
+ }
87
+ /**
88
+ * Build the secure-by-default {@link HttpSubRouter} over a Hono sub-app. Secured
89
+ * routes resolve identity (401 on failure) before the handler runs; `public.*`
90
+ * routes skip enforcement. Every registration is recorded in `mounted`.
91
+ */
92
+ function honoConnectorRouter(sub, kind, cfg, mounted) {
93
+ const secured = (method) => (path, handler) => {
94
+ mounted.push({ connector: kind, method, path, secured: true });
95
+ sub[method](path, async (c) => {
96
+ const request = c.req.raw;
97
+ if (!cfg) {
98
+ return unauthorizedResponse(new IdentityNotConfiguredError());
99
+ }
100
+ let identity;
101
+ try {
102
+ identity = await resolveRequestIdentity(cfg, request);
103
+ }
104
+ catch (error) {
105
+ return unauthorizedResponse(error);
106
+ }
107
+ return handler(request, identity);
108
+ });
109
+ };
110
+ const publicRoute = (method) => (path, handler) => {
111
+ mounted.push({ connector: kind, method, path, secured: false });
112
+ sub[method](path, (c) => handler(c.req.raw));
113
+ };
114
+ return {
115
+ get: secured("get"),
116
+ post: secured("post"),
117
+ put: secured("put"),
118
+ delete: secured("delete"),
119
+ public: {
120
+ get: publicRoute("get"),
121
+ post: publicRoute("post"),
122
+ put: publicRoute("put"),
123
+ delete: publicRoute("delete"),
124
+ },
125
+ };
126
+ }
127
+ /** Map a resolution error to a fail-closed JSON response. */
128
+ function unauthorizedResponse(error) {
129
+ const status = typeof error.status === "number"
130
+ ? error.status
131
+ : 401;
132
+ const message = error instanceof Error && error.message ? error.message : "unauthorized";
133
+ return new Response(JSON.stringify({ error: message }), {
134
+ status,
135
+ headers: { "content-type": "application/json" },
136
+ });
137
+ }
138
+ /**
139
+ * Log the connector HTTP surface so both secured and (loudly) public routes are
140
+ * visible in deploy/dev startup logs — the routes are mounted at runtime, so
141
+ * this is where the actual surface can be enumerated.
142
+ */
143
+ function logConnectorSurface(mounted) {
144
+ if (mounted.length === 0) {
145
+ return;
146
+ }
147
+ console.info(`[mda] connector HTTP surface (${mounted.length} route(s)):`);
148
+ for (const route of mounted) {
149
+ const full = `/connectors/${route.connector}${route.path}`;
150
+ const line = `[mda] ${route.method.toUpperCase().padEnd(6)} ${full}`;
151
+ if (route.secured) {
152
+ console.info(`${line} (identity enforced)`);
153
+ }
154
+ else {
155
+ console.warn(`${line} (PUBLIC — no identity enforcement)`);
156
+ }
157
+ }
158
+ }
159
+ //# sourceMappingURL=identity-http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-http.js","sourceRoot":"","sources":["../../src/runtime/identity-http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAQnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAoBvD,qFAAqF;AACrF,MAAM,0BAA2B,SAAQ,KAAK;IACnC,MAAM,GAAG,GAAG,CAAC;IACtB;QACE,KAAK,CACH,qEAAqE;YACnE,qBAAqB,CACxB,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA4B;IAC9D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, RuntimeIdentity, Tenancy } from "../identity/index.js";
2
+ import type { ConfigurableCarrier } from "./types.js";
3
+ /**
4
+ * Resolve the LangGraph `configurable` bag from either a flat runtime or the
5
+ * nested `ToolRuntime` shape LangChain passes to tools (`runtime.config.configurable`).
6
+ */
7
+ export declare function resolveRuntimeConfigurable(runtime: RuntimeConfigLike | undefined): Record<string, unknown> | undefined;
8
+ /**
9
+ * Build the frozen identity envelope for the current run from the trusted
10
+ * `langgraph_auth_user` the custom-auth handler produced. Returns
11
+ * `undefined` when the deployment has no resolvable actor (identity is opt-in).
12
+ */
13
+ export declare function buildRuntimeIdentity(configurable: Record<string, unknown> | undefined): RuntimeIdentity | undefined;
14
+ /**
15
+ * The durable Store namespace for the run, per `scoping.memory`. A
16
+ * `deploymentId` prefix isolates deployments; identity segments follow. Returns
17
+ * `undefined` for `none` (no durable memory). Fail-closed: an `actor` scope with
18
+ * no actor already rejects at ingress, so the segments are never empty here.
19
+ */
20
+ export declare function memoryNamespace(cfg: IdentityConfig, ident: RuntimeIdentity, deploymentId: string): string[] | undefined;
21
+ /**
22
+ * The runtime the managed seam sees: the shared `configurable` carrier, plus the
23
+ * optional nested `config` (e.g. LangGraph `ToolRuntime.config`) and the frozen
24
+ * `identity` envelope the seam layers on. Single source for the tool, middleware,
25
+ * and memory-namespace helpers.
26
+ */
27
+ export interface RuntimeConfigLike extends ConfigurableCarrier {
28
+ identity?: RuntimeIdentity;
29
+ config?: {
30
+ configurable?: Record<string, unknown>;
31
+ };
32
+ }
33
+ /**
34
+ * Resolve the durable memory namespace for a run directly from the runtime the
35
+ * memory `StoreBackend` receives, per `scoping.memory`. This is the
36
+ * plug-in point for the (deferred) Store-backed memory: a `StoreBackend`
37
+ * namespace factory becomes `(ctx) => memoryNamespaceFor(ctx.runtime, cfg, id)`.
38
+ * Returns `undefined` when the run has no durable namespace (`none`, or a
39
+ * per-actor scope with no resolved actor).
40
+ */
41
+ export declare function memoryNamespaceFor(runtime: RuntimeConfigLike | undefined, cfg: IdentityConfig, deploymentId: string): string[] | undefined;
42
+ /**
43
+ * The identity portion of the memory namespace (no deployment prefix), shared by
44
+ * the memory `StoreBackend` and the `@auth.on.store` boundary check so both agree
45
+ * on exactly which segments identify a namespace.
46
+ */
47
+ export declare function memoryIdentitySegments(scope: MemoryScope, tenancy: Tenancy, actorId: string | undefined, tenantId: string | undefined): string[];
48
+ /**
49
+ * Strip client-supplied identity keys from an incoming `configurable` so a
50
+ * request body can never spoof the actor/tenant the handler resolved. The
51
+ * platform-set `langgraph_auth_user` is preserved — it is the only trusted source.
52
+ */
53
+ export declare function sanitizeConfigurable(configurable: Record<string, unknown> | undefined): Record<string, unknown>;
54
+ //# sourceMappingURL=identity-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/identity-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,OAAO,EACR,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA0BtD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iBAAiB,GAAG,SAAS,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAErC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAChD,eAAe,GAAG,SAAS,CAyB7B;AAaD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,MAAM,GACnB,MAAM,EAAE,GAAG,SAAS,CAiBtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,GAAG,EAAE,cAAc,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,EAAE,GAAG,SAAS,CAQtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,EAAE,CAgBV;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAChD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB"}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Identity fields a client must never assert via `config.configurable`; only the
3
+ * custom-auth handler (`langgraph_auth_user`) is trusted.
4
+ */
5
+ const RESERVED_CONFIGURABLE_KEYS = new Set([
6
+ "actor_id",
7
+ "tenant_id",
8
+ "mda_actor_id",
9
+ "mda_tenant_id",
10
+ "mda_actor_email",
11
+ "mda_claims",
12
+ "mda_actor_type",
13
+ "mda_source_thread_id",
14
+ ]);
15
+ /** Source channels a run can originate from (`runtime.identity.source.provider`). */
16
+ const SOURCE_PROVIDERS = new Set([
17
+ "http",
18
+ "slack",
19
+ "schedule",
20
+ "cli",
21
+ "studio",
22
+ ]);
23
+ /**
24
+ * Resolve the LangGraph `configurable` bag from either a flat runtime or the
25
+ * nested `ToolRuntime` shape LangChain passes to tools (`runtime.config.configurable`).
26
+ */
27
+ export function resolveRuntimeConfigurable(runtime) {
28
+ return runtime?.configurable ?? runtime?.config?.configurable;
29
+ }
30
+ /**
31
+ * Build the frozen identity envelope for the current run from the trusted
32
+ * `langgraph_auth_user` the custom-auth handler produced. Returns
33
+ * `undefined` when the deployment has no resolvable actor (identity is opt-in).
34
+ */
35
+ export function buildRuntimeIdentity(configurable) {
36
+ const user = configurable?.langgraph_auth_user;
37
+ const actorId = user?.mda_actor_id;
38
+ if (!user || !actorId) {
39
+ return undefined;
40
+ }
41
+ const identity = {
42
+ actor: {
43
+ type: user.mda_actor_type === "service" ? "service" : "user",
44
+ id: String(actorId),
45
+ ...(user.mda_actor_email ? { email: String(user.mda_actor_email) } : {}),
46
+ },
47
+ source: {
48
+ provider: sourceProvider(configurable),
49
+ ...(threadId(configurable) ? { threadId: threadId(configurable) } : {}),
50
+ },
51
+ };
52
+ if (user.mda_tenant_id) {
53
+ identity.tenant = { id: String(user.mda_tenant_id) };
54
+ }
55
+ if (user.mda_claims && typeof user.mda_claims === "object") {
56
+ identity.claims = user.mda_claims;
57
+ }
58
+ // Immutable: tools/middleware get a read-only view they cannot tamper with.
59
+ return deepFreeze(identity);
60
+ }
61
+ /** Recursively freeze an object graph so the identity envelope is read-only. */
62
+ function deepFreeze(value) {
63
+ if (value && typeof value === "object" && !Object.isFrozen(value)) {
64
+ for (const nested of Object.values(value)) {
65
+ deepFreeze(nested);
66
+ }
67
+ Object.freeze(value);
68
+ }
69
+ return value;
70
+ }
71
+ /**
72
+ * The durable Store namespace for the run, per `scoping.memory`. A
73
+ * `deploymentId` prefix isolates deployments; identity segments follow. Returns
74
+ * `undefined` for `none` (no durable memory). Fail-closed: an `actor` scope with
75
+ * no actor already rejects at ingress, so the segments are never empty here.
76
+ */
77
+ export function memoryNamespace(cfg, ident, deploymentId) {
78
+ const scope = cfg.scoping.memory;
79
+ if (scope === "none") {
80
+ return undefined;
81
+ }
82
+ if (scope === "agent") {
83
+ return [deploymentId, "agent"];
84
+ }
85
+ return [
86
+ deploymentId,
87
+ ...memoryIdentitySegments(scope, cfg.tenancy, ident.actor.id, ident.tenant?.id),
88
+ ];
89
+ }
90
+ /**
91
+ * Resolve the durable memory namespace for a run directly from the runtime the
92
+ * memory `StoreBackend` receives, per `scoping.memory`. This is the
93
+ * plug-in point for the (deferred) Store-backed memory: a `StoreBackend`
94
+ * namespace factory becomes `(ctx) => memoryNamespaceFor(ctx.runtime, cfg, id)`.
95
+ * Returns `undefined` when the run has no durable namespace (`none`, or a
96
+ * per-actor scope with no resolved actor).
97
+ */
98
+ export function memoryNamespaceFor(runtime, cfg, deploymentId) {
99
+ const configurable = runtime?.configurable ?? runtime?.config?.configurable;
100
+ const identity = buildRuntimeIdentity(configurable);
101
+ if (identity) {
102
+ return memoryNamespace(cfg, identity, deploymentId);
103
+ }
104
+ // No resolved actor: only the actor-independent `agent` scope has a namespace.
105
+ return cfg.scoping.memory === "agent" ? [deploymentId, "agent"] : undefined;
106
+ }
107
+ /**
108
+ * The identity portion of the memory namespace (no deployment prefix), shared by
109
+ * the memory `StoreBackend` and the `@auth.on.store` boundary check so both agree
110
+ * on exactly which segments identify a namespace.
111
+ */
112
+ export function memoryIdentitySegments(scope, tenancy, actorId, tenantId) {
113
+ if (scope === "actor") {
114
+ const segments = [];
115
+ if (tenancy === "multi" && tenantId) {
116
+ segments.push(tenantId);
117
+ }
118
+ if (actorId) {
119
+ segments.push(actorId);
120
+ }
121
+ return segments;
122
+ }
123
+ if (scope === "tenant") {
124
+ return tenantId ? [tenantId] : [];
125
+ }
126
+ // "agent" (shared) | "none" (no memory) → no per-identity restriction.
127
+ return [];
128
+ }
129
+ /**
130
+ * Strip client-supplied identity keys from an incoming `configurable` so a
131
+ * request body can never spoof the actor/tenant the handler resolved. The
132
+ * platform-set `langgraph_auth_user` is preserved — it is the only trusted source.
133
+ */
134
+ export function sanitizeConfigurable(configurable) {
135
+ if (!configurable) {
136
+ return {};
137
+ }
138
+ return Object.fromEntries(Object.entries(configurable).filter(([key]) => !RESERVED_CONFIGURABLE_KEYS.has(key)));
139
+ }
140
+ function sourceProvider(configurable) {
141
+ const declared = configurable?.mda_source_provider;
142
+ if (typeof declared === "string" && SOURCE_PROVIDERS.has(declared)) {
143
+ return declared;
144
+ }
145
+ return "http";
146
+ }
147
+ function threadId(configurable) {
148
+ const value = configurable?.thread_id;
149
+ return value == null ? undefined : String(value);
150
+ }
151
+ //# sourceMappingURL=identity-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-runtime.js","sourceRoot":"","sources":["../../src/runtime/identity-runtime.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,UAAU;IACV,WAAW;IACX,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,gBAAgB;IAChB,sBAAsB;CACvB,CAAC,CAAC;AAEH,qFAAqF;AACrF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM;IACN,OAAO;IACP,UAAU;IACV,KAAK;IACL,QAAQ;CACT,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAsC;IAEtC,OAAO,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,YAAiD;IAEjD,MAAM,IAAI,GAAG,YAAY,EAAE,mBAA8C,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAI,EAAE,YAAY,CAAC;IACnC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAoB;QAChC,KAAK,EAAE;YACL,IAAI,EAAE,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;YAC5D,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC;YACnB,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE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;QACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IACD,uEAAuE;IACvE,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,YAAiD;IAEjD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CACjC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC,CAChD,CACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CACrB,YAAiD;IAEjD,MAAM,QAAQ,GAAG,YAAY,EAAE,mBAAmB,CAAC;IACnD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnE,OAAO,QAAiD,CAAC;IAC3D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,QAAQ,CACf,YAAiD;IAEjD,MAAM,KAAK,GAAG,YAAY,EAAE,SAAS,CAAC;IACtC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC"}
@@ -1,6 +1,19 @@
1
1
  import type { DeepAgentDefinition } from "../types.js";
2
2
  import type { ManagedAgentOptions, ManagedRunConfig } from "./types.js";
3
3
  export type { ManagedAgentOptions, ManagedRunConfig } from "./types.js";
4
+ export { buildManagedAuth } from "./auth.js";
5
+ export { buildManagedHttpApp } from "./identity-http.js";
6
+ export { CONNECTOR_BRAND, collectConnectors, isConnector, loadConnectorTools, } from "./connector.js";
7
+ export type { Connector, ConnectorToolList, DiscoveredConnectorModule, HttpContext, HttpSubRouter, PublicRouteHandler, PublicSubRouter, SecuredRouteHandler, ToolContext, } from "./connector.js";
8
+ export type { ManagedUser } from "./auth.js";
9
+ export { CredentialCache, CREDENTIAL_SIGNING_SECRET_ENV, clearCredentialCacheForTests, createCredentialsProvider, } from "./credentials.js";
10
+ export type { CredentialDeps, CredentialForOptions, CredentialsProvider, } from "./credentials.js";
11
+ export { buildRuntimeIdentity, memoryIdentitySegments, memoryNamespace, memoryNamespaceFor, sanitizeConfigurable, } from "./identity-runtime.js";
12
+ export { managedRuntimeExtras, managedRuntimeOverrides, withManagedRuntime, wrapToolsWithManagedRuntime, } from "./managed-tools.js";
13
+ export type { InvokableTool, ManagedDeepAgentRuntime, ManagedRuntimeExtras, } from "./managed-tools.js";
14
+ export { withManagedMiddleware, wrapMiddlewareWithManagedRuntime, } from "./managed-middleware.js";
15
+ export type { ManagedMiddleware } from "./managed-middleware.js";
16
+ export { issueGuestToken } from "./validated-token.js";
4
17
  /**
5
18
  * Compile a {@link DeepAgentDefinition} into a runnable Deep Agent.
6
19
  *
@@ -9,7 +22,7 @@ export type { ManagedAgentOptions, ManagedRunConfig } from "./types.js";
9
22
  * scratch fallback, and managed memory/skills. It is consumed only by the
10
23
  * generated entry module; agent authors never call it.
11
24
  */
12
- export declare function compileManagedAgent(definition: DeepAgentDefinition, config?: ManagedRunConfig, options?: ManagedAgentOptions): Promise<import("deepagents").DeepAgent<import("deepagents").DeepAgentTypeConfig<import("langchain").ResponseFormatUndefined, undefined, import("@langchain/core/utils/types").InteropZodObject, readonly [import("langchain").AgentMiddleware<import("zod/v3").ZodObject<{
25
+ export declare function compileManagedAgent(definition: DeepAgentDefinition, config?: ManagedRunConfig, options?: ManagedAgentOptions): Promise<import("langchain").ReactAgent<import("deepagents").DeepAgentTypeConfig<import("langchain").ResponseFormatUndefined, undefined, import("@langchain/core/utils/types").InteropZodObject, readonly [import("langchain").AgentMiddleware<import("zod/v3").ZodObject<{
13
26
  todos: import("zod/v3").ZodDefault<import("zod/v3").ZodArray<import("zod/v3").ZodObject<{
14
27
  content: import("zod/v3").ZodString;
15
28
  status: import("zod/v3").ZodEnum<["pending", "in_progress", "completed"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA4HxE;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,mBAAmB,EAC/B,MAAM,CAAC,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2YA4D9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAWvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAExE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,iBAAiB,EACj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