@mongodb-js/agent-engine-runner-shared 0.11.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.
Files changed (220) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE.md +201 -0
  3. package/README.md +29 -0
  4. package/dist/agent_config.d.ts +167 -0
  5. package/dist/agent_config.d.ts.map +1 -0
  6. package/dist/agent_config.js +544 -0
  7. package/dist/call_interrupted.d.ts +12 -0
  8. package/dist/call_interrupted.d.ts.map +1 -0
  9. package/dist/call_interrupted.js +11 -0
  10. package/dist/checkpoint_workspace.d.ts +25 -0
  11. package/dist/checkpoint_workspace.d.ts.map +1 -0
  12. package/dist/checkpoint_workspace.js +44 -0
  13. package/dist/context.d.ts +235 -0
  14. package/dist/context.d.ts.map +1 -0
  15. package/dist/context.js +322 -0
  16. package/dist/db_config.d.ts +28 -0
  17. package/dist/db_config.d.ts.map +1 -0
  18. package/dist/db_config.js +66 -0
  19. package/dist/db_naming.d.ts +54 -0
  20. package/dist/db_naming.d.ts.map +1 -0
  21. package/dist/db_naming.js +94 -0
  22. package/dist/error_reporting.d.ts +67 -0
  23. package/dist/error_reporting.d.ts.map +1 -0
  24. package/dist/error_reporting.js +311 -0
  25. package/dist/generated/workflow/v1/activity_pb.d.ts +342 -0
  26. package/dist/generated/workflow/v1/activity_pb.d.ts.map +1 -0
  27. package/dist/generated/workflow/v1/activity_pb.js +115 -0
  28. package/dist/generated/workflow/v1/common_pb.d.ts +184 -0
  29. package/dist/generated/workflow/v1/common_pb.d.ts.map +1 -0
  30. package/dist/generated/workflow/v1/common_pb.js +86 -0
  31. package/dist/generated/workflow/v1/runtime_pb.d.ts +200 -0
  32. package/dist/generated/workflow/v1/runtime_pb.d.ts.map +1 -0
  33. package/dist/generated/workflow/v1/runtime_pb.js +40 -0
  34. package/dist/generated/workflow/v1/state_pb.d.ts +254 -0
  35. package/dist/generated/workflow/v1/state_pb.d.ts.map +1 -0
  36. package/dist/generated/workflow/v1/state_pb.js +68 -0
  37. package/dist/guardrails_evaluator/core.d.ts +23 -0
  38. package/dist/guardrails_evaluator/core.d.ts.map +1 -0
  39. package/dist/guardrails_evaluator/core.js +122 -0
  40. package/dist/guardrails_evaluator/index.d.ts +10 -0
  41. package/dist/guardrails_evaluator/index.d.ts.map +1 -0
  42. package/dist/guardrails_evaluator/index.js +11 -0
  43. package/dist/guardrails_evaluator/regex.d.ts +20 -0
  44. package/dist/guardrails_evaluator/regex.d.ts.map +1 -0
  45. package/dist/guardrails_evaluator/regex.js +233 -0
  46. package/dist/hooks.d.ts +109 -0
  47. package/dist/hooks.d.ts.map +1 -0
  48. package/dist/hooks.js +216 -0
  49. package/dist/http_path.d.ts +18 -0
  50. package/dist/http_path.d.ts.map +1 -0
  51. package/dist/http_path.js +53 -0
  52. package/dist/index.d.ts +35 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +41 -0
  55. package/dist/launcher.d.ts +130 -0
  56. package/dist/launcher.d.ts.map +1 -0
  57. package/dist/launcher.js +325 -0
  58. package/dist/logger.d.ts +96 -0
  59. package/dist/logger.d.ts.map +1 -0
  60. package/dist/logger.js +204 -0
  61. package/dist/mcp_oauth.d.ts +51 -0
  62. package/dist/mcp_oauth.d.ts.map +1 -0
  63. package/dist/mcp_oauth.js +389 -0
  64. package/dist/mcp_oauth_secret.d.ts +21 -0
  65. package/dist/mcp_oauth_secret.d.ts.map +1 -0
  66. package/dist/mcp_oauth_secret.js +122 -0
  67. package/dist/mcp_tools.d.ts +71 -0
  68. package/dist/mcp_tools.d.ts.map +1 -0
  69. package/dist/mcp_tools.js +301 -0
  70. package/dist/memory_appbound.d.ts +42 -0
  71. package/dist/memory_appbound.d.ts.map +1 -0
  72. package/dist/memory_appbound.js +159 -0
  73. package/dist/memory_writer.d.ts +49 -0
  74. package/dist/memory_writer.d.ts.map +1 -0
  75. package/dist/memory_writer.js +171 -0
  76. package/dist/metrics.d.ts +84 -0
  77. package/dist/metrics.d.ts.map +1 -0
  78. package/dist/metrics.js +205 -0
  79. package/dist/models.d.ts +1458 -0
  80. package/dist/models.d.ts.map +1 -0
  81. package/dist/models.js +1726 -0
  82. package/dist/node_logger.d.ts +43 -0
  83. package/dist/node_logger.d.ts.map +1 -0
  84. package/dist/node_logger.js +158 -0
  85. package/dist/owner_callback.d.ts +16 -0
  86. package/dist/owner_callback.d.ts.map +1 -0
  87. package/dist/owner_callback.js +40 -0
  88. package/dist/progress.d.ts +57 -0
  89. package/dist/progress.d.ts.map +1 -0
  90. package/dist/progress.js +140 -0
  91. package/dist/runtime.d.ts +131 -0
  92. package/dist/runtime.d.ts.map +1 -0
  93. package/dist/runtime.js +351 -0
  94. package/dist/secure_llm_proxy.d.ts +115 -0
  95. package/dist/secure_llm_proxy.d.ts.map +1 -0
  96. package/dist/secure_llm_proxy.js +922 -0
  97. package/dist/secure_wrapper.d.ts +332 -0
  98. package/dist/secure_wrapper.d.ts.map +1 -0
  99. package/dist/secure_wrapper.js +1249 -0
  100. package/dist/server/aer.d.ts +61 -0
  101. package/dist/server/aer.d.ts.map +1 -0
  102. package/dist/server/aer.js +1124 -0
  103. package/dist/server/auth.d.ts +56 -0
  104. package/dist/server/auth.d.ts.map +1 -0
  105. package/dist/server/auth.js +132 -0
  106. package/dist/server/base.d.ts +104 -0
  107. package/dist/server/base.d.ts.map +1 -0
  108. package/dist/server/base.js +150 -0
  109. package/dist/server/callInterrupt.d.ts +49 -0
  110. package/dist/server/callInterrupt.d.ts.map +1 -0
  111. package/dist/server/callInterrupt.js +68 -0
  112. package/dist/server/callback_delivery.d.ts +14 -0
  113. package/dist/server/callback_delivery.d.ts.map +1 -0
  114. package/dist/server/callback_delivery.js +141 -0
  115. package/dist/server/chunk_types.d.ts +50 -0
  116. package/dist/server/chunk_types.d.ts.map +1 -0
  117. package/dist/server/chunk_types.js +62 -0
  118. package/dist/server/cors.d.ts +52 -0
  119. package/dist/server/cors.d.ts.map +1 -0
  120. package/dist/server/cors.js +107 -0
  121. package/dist/server/drain.d.ts +169 -0
  122. package/dist/server/drain.d.ts.map +1 -0
  123. package/dist/server/drain.js +455 -0
  124. package/dist/server/function.d.ts +77 -0
  125. package/dist/server/function.d.ts.map +1 -0
  126. package/dist/server/function.js +337 -0
  127. package/dist/server/http_retry.d.ts +37 -0
  128. package/dist/server/http_retry.d.ts.map +1 -0
  129. package/dist/server/http_retry.js +157 -0
  130. package/dist/server/index.d.ts +7 -0
  131. package/dist/server/index.d.ts.map +1 -0
  132. package/dist/server/index.js +5 -0
  133. package/dist/server/metadata.d.ts +50 -0
  134. package/dist/server/metadata.d.ts.map +1 -0
  135. package/dist/server/metadata.js +193 -0
  136. package/dist/server/oe_url.d.ts +36 -0
  137. package/dist/server/oe_url.d.ts.map +1 -0
  138. package/dist/server/oe_url.js +50 -0
  139. package/dist/server/owner_url.d.ts +35 -0
  140. package/dist/server/owner_url.d.ts.map +1 -0
  141. package/dist/server/owner_url.js +146 -0
  142. package/dist/server/query.d.ts +42 -0
  143. package/dist/server/query.d.ts.map +1 -0
  144. package/dist/server/query.js +28 -0
  145. package/dist/server/tool.d.ts +138 -0
  146. package/dist/server/tool.d.ts.map +1 -0
  147. package/dist/server/tool.js +1017 -0
  148. package/dist/span_names.d.ts +21 -0
  149. package/dist/span_names.d.ts.map +1 -0
  150. package/dist/span_names.js +31 -0
  151. package/dist/structured_logging/constants.d.ts +17 -0
  152. package/dist/structured_logging/constants.d.ts.map +1 -0
  153. package/dist/structured_logging/constants.js +71 -0
  154. package/dist/structured_logging/env.d.ts +18 -0
  155. package/dist/structured_logging/env.d.ts.map +1 -0
  156. package/dist/structured_logging/env.js +39 -0
  157. package/dist/structured_logging/install.d.ts +56 -0
  158. package/dist/structured_logging/install.d.ts.map +1 -0
  159. package/dist/structured_logging/install.js +107 -0
  160. package/dist/structured_logging/layout.d.ts +9 -0
  161. package/dist/structured_logging/layout.d.ts.map +1 -0
  162. package/dist/structured_logging/layout.js +144 -0
  163. package/dist/structured_logging/serialize.d.ts +27 -0
  164. package/dist/structured_logging/serialize.d.ts.map +1 -0
  165. package/dist/structured_logging/serialize.js +61 -0
  166. package/dist/structured_logging/stdio_capture.d.ts +59 -0
  167. package/dist/structured_logging/stdio_capture.d.ts.map +1 -0
  168. package/dist/structured_logging/stdio_capture.js +164 -0
  169. package/dist/structured_logging/uncaught.d.ts +14 -0
  170. package/dist/structured_logging/uncaught.d.ts.map +1 -0
  171. package/dist/structured_logging/uncaught.js +58 -0
  172. package/dist/structured_logging.d.ts +48 -0
  173. package/dist/structured_logging.d.ts.map +1 -0
  174. package/dist/structured_logging.js +47 -0
  175. package/dist/tls_client.d.ts +61 -0
  176. package/dist/tls_client.d.ts.map +1 -0
  177. package/dist/tls_client.js +298 -0
  178. package/dist/tool_api_error.d.ts +62 -0
  179. package/dist/tool_api_error.d.ts.map +1 -0
  180. package/dist/tool_api_error.js +399 -0
  181. package/dist/tool_memory_ownership.d.ts +10 -0
  182. package/dist/tool_memory_ownership.d.ts.map +1 -0
  183. package/dist/tool_memory_ownership.js +36 -0
  184. package/dist/toolpod_handlers.d.ts +126 -0
  185. package/dist/toolpod_handlers.d.ts.map +1 -0
  186. package/dist/toolpod_handlers.js +1016 -0
  187. package/dist/tracing/exporters.d.ts +51 -0
  188. package/dist/tracing/exporters.d.ts.map +1 -0
  189. package/dist/tracing/exporters.js +327 -0
  190. package/dist/tracing/index.d.ts +3 -0
  191. package/dist/tracing/index.d.ts.map +1 -0
  192. package/dist/tracing/index.js +2 -0
  193. package/dist/tracing/setup.d.ts +76 -0
  194. package/dist/tracing/setup.d.ts.map +1 -0
  195. package/dist/tracing/setup.js +436 -0
  196. package/dist/utils.d.ts +204 -0
  197. package/dist/utils.d.ts.map +1 -0
  198. package/dist/utils.js +867 -0
  199. package/dist/workflow/activity.d.ts +71 -0
  200. package/dist/workflow/activity.d.ts.map +1 -0
  201. package/dist/workflow/activity.js +357 -0
  202. package/dist/workflow/attempt.d.ts +12 -0
  203. package/dist/workflow/attempt.d.ts.map +1 -0
  204. package/dist/workflow/attempt.js +96 -0
  205. package/dist/workflow/client.d.ts +46 -0
  206. package/dist/workflow/client.d.ts.map +1 -0
  207. package/dist/workflow/client.js +299 -0
  208. package/dist/workflow/context.d.ts +37 -0
  209. package/dist/workflow/context.d.ts.map +1 -0
  210. package/dist/workflow/context.js +350 -0
  211. package/dist/workflow/heartbeat.d.ts +15 -0
  212. package/dist/workflow/heartbeat.d.ts.map +1 -0
  213. package/dist/workflow/heartbeat.js +78 -0
  214. package/dist/workflow/index.d.ts +14 -0
  215. package/dist/workflow/index.d.ts.map +1 -0
  216. package/dist/workflow/index.js +10 -0
  217. package/dist/workflow/memory.d.ts +17 -0
  218. package/dist/workflow/memory.d.ts.map +1 -0
  219. package/dist/workflow/memory.js +184 -0
  220. package/package.json +73 -0
package/dist/hooks.js ADDED
@@ -0,0 +1,216 @@
1
+ /**
2
+ * Framework hook registry for runner-shared.
3
+ *
4
+ * Most hooks are registered once at process startup by the framework SDK
5
+ * before the server starts. The workflow adapter is the exception: it is
6
+ * register-or-clear on every graph materialization so eligibility cannot
7
+ * leak from a durable graph into a later native one. Consumers in
8
+ * runner-shared call `get*()` instead of importing framework-specific
9
+ * modules directly.
10
+ *
11
+ * Type aliases use sdk-core interfaces where possible. The suspend handler
12
+ * remains loosely typed because its signature is framework-specific
13
+ * (e.g. langgraph's `interrupt` returns whatever the resume caller provides).
14
+ */
15
+ import { resetCheckpointWorkspaceState } from "./checkpoint_workspace.js";
16
+ let suspendHandler = null;
17
+ let llmAdapterFactory = null;
18
+ let instrumentor = null;
19
+ let queryPlugin = null;
20
+ let workflowAdapter = null;
21
+ const llmRegistry = new Map();
22
+ // Set while the framework SDK is executing the user's @app.entrypoint
23
+ // builder function (see entrypointScope()). app.llm() must only be called
24
+ // while this is true -- it must be reproducibly re-derivable by the Tool
25
+ // Pod's startup registry construction (see docs/runner/README.md
26
+ // "Execution lifecycle & secret availability"), so calls from module top
27
+ // level, tool bodies, or any other function are rejected at the call site.
28
+ let entrypointActive = false;
29
+ /**
30
+ * Mark the dynamic extent of the user's @app.entrypoint call.
31
+ *
32
+ * **Framework-internal — user agent code must never call this.** Users only
33
+ * declare an entrypoint (`app.entrypoint(fn)`); the framework SDK wraps its
34
+ * own evaluation of that function (during AER graph construction and
35
+ * during Tool preparation, retried after failure) in this helper so
36
+ * that `registerLlm()` can reject `app.llm()` calls made outside the
37
+ * entrypoint. Tests that call `app.llm()`/`registerLlm()` directly (bypassing
38
+ * `app.entrypoint` + `getAgent()`) use it to simulate that framework
39
+ * evaluation.
40
+ */
41
+ export function entrypointScope(fn) {
42
+ const previous = entrypointActive;
43
+ entrypointActive = true;
44
+ try {
45
+ return fn();
46
+ }
47
+ finally {
48
+ entrypointActive = previous;
49
+ }
50
+ }
51
+ export function registerSuspendHandler(handler) {
52
+ suspendHandler = handler;
53
+ }
54
+ export function getSuspendHandler() {
55
+ return suspendHandler;
56
+ }
57
+ export function registerLLMAdapterFactory(factory) {
58
+ llmAdapterFactory = factory;
59
+ }
60
+ export function getLLMAdapterFactory() {
61
+ if (llmAdapterFactory === null) {
62
+ throw new Error("No LLM adapter factory registered. Ensure the framework SDK calls registerLLMAdapterFactory() before run().");
63
+ }
64
+ return llmAdapterFactory;
65
+ }
66
+ export function registerInstrumentor(fn) {
67
+ instrumentor = fn;
68
+ }
69
+ export function getInstrumentor() {
70
+ return instrumentor;
71
+ }
72
+ /**
73
+ * Register the framework adapter's `AERQueryPlugin`.
74
+ *
75
+ * Mirrors Python's `TenantRuntime.register_query_plugin`. The AER's
76
+ * `/query/sessions` routes return 501 until a plugin is registered.
77
+ */
78
+ export function registerQueryPlugin(plugin) {
79
+ queryPlugin = plugin;
80
+ }
81
+ /** Return the registered `AERQueryPlugin`, or `null` if none has been registered. */
82
+ export function getQueryPlugin() {
83
+ return queryPlugin;
84
+ }
85
+ /**
86
+ * Declare that the materialized graph supports OE durable workflow routing.
87
+ *
88
+ * Call this or {@link clearWorkflowAdapter} on every `getAgent()` materialization
89
+ * so a later ineligible graph cannot reuse the previous request's identity.
90
+ */
91
+ export function registerWorkflowAdapter(name, version) {
92
+ if (!name.trim() || !version.trim()) {
93
+ throw new Error("workflow adapter name and version must be non-empty");
94
+ }
95
+ workflowAdapter = { name, version };
96
+ }
97
+ /** Drop durable eligibility for the latest materialized graph. */
98
+ export function clearWorkflowAdapter() {
99
+ workflowAdapter = null;
100
+ }
101
+ export function getWorkflowAdapter() {
102
+ return workflowAdapter;
103
+ }
104
+ /**
105
+ * Register an LLM by id. Throws on duplicate id.
106
+ *
107
+ * Framework SDKs call this from `app.llm()` for every LLM the agent uses.
108
+ * The unnamed-LLM convenience case is represented by registering under the
109
+ * sentinel id `"__default__"`; a second unnamed call therefore raises the
110
+ * same duplicate-id error as a second named call with the same id.
111
+ */
112
+ export function registerLlm(llmId, llm) {
113
+ if (!entrypointActive) {
114
+ throw new Error("app.llm(...) must be called inside the function decorated with " +
115
+ "@app.entrypoint. It was called outside the entrypoint's dynamic " +
116
+ "extent. Move this call inside your @app.entrypoint builder function.");
117
+ }
118
+ if (llmRegistry.has(llmId)) {
119
+ throw new Error(`llm_id ${JSON.stringify(llmId)} is already registered. ` +
120
+ "Each LLM must have a unique llm_id; pass app.llm(llm, llm_id='...') for each.");
121
+ }
122
+ llmRegistry.set(llmId, llm);
123
+ }
124
+ export function getNamedLlm(llmId) {
125
+ if (!llmRegistry.has(llmId)) {
126
+ throw new Error(`llm_id ${JSON.stringify(llmId)} not registered. ` +
127
+ "Call app.llm(llm, llm_id=...) for each LLM before run().");
128
+ }
129
+ return llmRegistry.get(llmId);
130
+ }
131
+ export function hasNamedLlms() {
132
+ return llmRegistry.size > 0;
133
+ }
134
+ export function resetLlmRegistry() {
135
+ llmRegistry.clear();
136
+ }
137
+ /** Return a shallow copy of the current registry. */
138
+ export function snapshotLlmRegistry() {
139
+ return new Map(llmRegistry);
140
+ }
141
+ export function resetHooks() {
142
+ suspendHandler = null;
143
+ llmAdapterFactory = null;
144
+ instrumentor = null;
145
+ queryPlugin = null;
146
+ workflowAdapter = null;
147
+ llmRegistry.clear();
148
+ entrypointActive = false;
149
+ resetCheckpointWorkspaceState();
150
+ }
151
+ /**
152
+ * Run the user's agent entrypoint to populate the named-LLM registry.
153
+ *
154
+ * Resets the registry before invoking `graphBuilder.getAgent()` so
155
+ * import-time registrations don't collide if the entrypoint re-registers
156
+ * them. If the entrypoint registers nothing, restores the pre-reset snapshot
157
+ * so import-time-only agents still work.
158
+ *
159
+ * Returns false after failed construction, including when a snapshot is restored.
160
+ * Successful construction with no named LLMs is still complete.
161
+ *
162
+ * `onEntrypointError`, when supplied, receives the thrown value on that same
163
+ * path so the caller can attribute a later registry lookup miss to its real
164
+ * cause rather than to a missing `app.llm()` call.
165
+ *
166
+ * Shared by ToolServer.onStartup and ToolFunctionRunner._prepare — mirrors
167
+ * Python's ToolExecution.prepare() which both inherit.
168
+ *
169
+ * @internal — exported for server/ consumers; not part of the public API.
170
+ */
171
+ export function populateLlmRegistryFromEntrypoint(graphBuilder, logger, warnings, onEntrypointError) {
172
+ if (graphBuilder === null || typeof graphBuilder.getAgent !== "function")
173
+ return true;
174
+ const preSnapshot = snapshotLlmRegistry();
175
+ resetLlmRegistry();
176
+ try {
177
+ // Call through the receiver -- graphBuilder.getAgent() (e.g. App.getAgent())
178
+ // reads its own instance state (e.g. `this.builderFn`), so storing the
179
+ // method in a local and invoking it unbound would drop `this` and throw.
180
+ entrypointScope(() => graphBuilder.getAgent?.());
181
+ }
182
+ catch (error) {
183
+ logger.warn(warnings.entrypointFailed);
184
+ // Discard partial registrations before restoring the last snapshot.
185
+ resetLlmRegistry();
186
+ if (preSnapshot.size > 0) {
187
+ // Runtime-owned restoration, not a user app.llm() call -- exempt from
188
+ // the entrypoint-scope requirement.
189
+ entrypointScope(() => {
190
+ for (const [llmId, llm] of preSnapshot)
191
+ registerLlm(llmId, llm);
192
+ });
193
+ logger.info(`Entrypoint failed; restored ${preSnapshot.size} import-time registration(s)`);
194
+ }
195
+ // Let the caller remember the cause: a later lookup miss inside the LLM
196
+ // route is a symptom of this failure, and reporting it as a missing
197
+ // app.llm() call would misdirect the agent developer. Mirrors Python's
198
+ // _llm_registry_load_error.
199
+ onEntrypointError?.(error);
200
+ return false;
201
+ }
202
+ if (hasNamedLlms()) {
203
+ logger.info("Named LLM registry populated from user entrypoint");
204
+ }
205
+ else if (preSnapshot.size > 0) {
206
+ entrypointScope(() => {
207
+ for (const [llmId, llm] of preSnapshot)
208
+ registerLlm(llmId, llm);
209
+ });
210
+ logger.info(`Entrypoint registered no LLMs; restored ${preSnapshot.size} import-time registration(s)`);
211
+ }
212
+ else {
213
+ logger.warn(warnings.noLlmRegistered);
214
+ }
215
+ return true;
216
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * URL path helpers for outbound platform HTTP calls.
3
+ *
4
+ * Shared choke point for percent-encoding one path segment. Framework adapters
5
+ * must route every interpolated identifier through {@link quotePathSegment}
6
+ * instead of hand-rolling quoting: bare `encodeURIComponent` leaves
7
+ * `.`/`..` untouched and string-concatenated identifiers forge paths.
8
+ *
9
+ * Port of Python's `agent_engine_runner_shared/http_path.py`.
10
+ */
11
+ /**
12
+ * Percent-encode one path segment; reject separators and `.` / `..`.
13
+ *
14
+ * Decode repeatedly before quoting so encoded, double-encoded, and mixed
15
+ * traversal forms cannot survive a later routing decode.
16
+ */
17
+ export declare function quotePathSegment(value: string): string;
18
+ //# sourceMappingURL=http_path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http_path.d.ts","sourceRoot":"","sources":["../src/http_path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBtD"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * URL path helpers for outbound platform HTTP calls.
3
+ *
4
+ * Shared choke point for percent-encoding one path segment. Framework adapters
5
+ * must route every interpolated identifier through {@link quotePathSegment}
6
+ * instead of hand-rolling quoting: bare `encodeURIComponent` leaves
7
+ * `.`/`..` untouched and string-concatenated identifiers forge paths.
8
+ *
9
+ * Port of Python's `agent_engine_runner_shared/http_path.py`.
10
+ */
11
+ const MAX_DECODE_ROUNDS = 8;
12
+ function fullyDecode(value) {
13
+ let decoded = value;
14
+ for (let round = 0; round < MAX_DECODE_ROUNDS; round++) {
15
+ let next;
16
+ try {
17
+ next = decodeURIComponent(decoded);
18
+ }
19
+ catch {
20
+ // Malformed `%` sequences and invalid UTF-8 escapes are rejected the
21
+ // same as Python's `unquote(..., errors="strict")`.
22
+ throw new Error("URL path segment is invalid");
23
+ }
24
+ if (next === decoded)
25
+ return decoded;
26
+ decoded = next;
27
+ }
28
+ throw new Error("URL path segment is invalid");
29
+ }
30
+ /**
31
+ * Percent-encode one path segment; reject separators and `.` / `..`.
32
+ *
33
+ * Decode repeatedly before quoting so encoded, double-encoded, and mixed
34
+ * traversal forms cannot survive a later routing decode.
35
+ */
36
+ export function quotePathSegment(value) {
37
+ const decoded = fullyDecode(value);
38
+ if (!decoded ||
39
+ decoded === "." ||
40
+ decoded === ".." ||
41
+ /[/\\?#]/.test(decoded)) {
42
+ throw new Error("URL path segment is invalid");
43
+ }
44
+ // `encodeURIComponent` keeps `! ' ( ) *` unescaped; Python's
45
+ // `quote(decoded, safe="")` does not. Match it so both runtimes produce
46
+ // byte-identical paths.
47
+ return encodeURIComponent(decoded)
48
+ .replaceAll("!", "%21")
49
+ .replaceAll("'", "%27")
50
+ .replaceAll("(", "%28")
51
+ .replaceAll(")", "%29")
52
+ .replaceAll("*", "%2A");
53
+ }
@@ -0,0 +1,35 @@
1
+ export * from "./utils.js";
2
+ export { getStoreDbName, resolveStoreDbName, resetStoreDbCache, } from "./db_config.js";
3
+ export { resolveProjectScopedDb, resolveEffectiveDb, projectScopingRequired, } from "./db_naming.js";
4
+ export { getLogger, setupLogging, type SetupLoggingArgs } from "./logger.js";
5
+ export type { Logger } from "log4js";
6
+ export { AERServer, ToolServer, LLMRegistryLoadError, ToolFunctionRunner, ToolFunctionRequestSchema, buildResultPayload, DEFAULT_PORTS, type ToolFunctionRequest, type ITenantRuntime, type GraphBuilderLike, type ServerToolFn, type AERQueryPlugin, } from "./server/index.js";
7
+ export { chunkTypes } from "./server/index.js";
8
+ export * from "./models.js";
9
+ export * from "./guardrails_evaluator/index.js";
10
+ export * from "./agent_config.js";
11
+ export * from "./mcp_tools.js";
12
+ export { DEFAULT_MCP_OAUTH_CLIENT_NAME, DEFAULT_MCP_OAUTH_REDIRECT_URI, mcpOauthCacheDir, mcpOauthCacheName, makeMcpOauthAuth, makeMcpClientCredentialsAuth, } from "./mcp_oauth.js";
13
+ export { materializeMcpOauthSecretCache } from "./mcp_oauth_secret.js";
14
+ export * from "./context.js";
15
+ export { BUILTIN_TOOL_NAMES, registerBuiltinTools, WORKSPACE_DIR, filesystemLs, filesystemRead, filesystemWrite, filesystemEdit, filesystemGlob, filesystemGrep, filesystemDownload, shellExecute, } from "./toolpod_handlers.js";
16
+ export * from "./hooks.js";
17
+ export * from "./workflow/index.js";
18
+ export { fetchPlatform, getFetchOptionsWithTLS } from "./tls_client.js";
19
+ export { quotePathSegment } from "./http_path.js";
20
+ export { resolveOeUrl } from "./server/oe_url.js";
21
+ export { getCheckpointWorkspaceId, noteCheckpointWireWorkspaceId, resolveCheckpointWorkspaceId, resetCheckpointWorkspaceState, } from "./checkpoint_workspace.js";
22
+ export { TenantRuntime, resolveListenHost, type TenantRuntimeOptions, type RegisterAndRunOptions, } from "./runtime.js";
23
+ export { resolveEntrypoint, resolveImportTarget, runLauncher, boundText, writeTerminationMessage, setTerminationLogPathForTest, EXIT_IMPORT_ERROR, EXIT_NO_ENTRYPOINT, EXIT_STARTUP_CRASH, type ResolvedEntrypoint, } from "./launcher.js";
24
+ export { PolicyDeniedException, TerminalExecutionError, ToolCallTimeoutError, ToolExecutionError, ExternalAPICallError, LLMInvocationError, OperationalStepAllocator, SecureToolWrapper, createSecureToolFunction, requestOeApproval, reportOeResult, extractUsage, extractPodUsage, type RequestOeApprovalArgs, type ReportOeResultArgs, type ExtractedUsage, type ToolResponseFormat, type OperationalStepSource, CALL_INTERRUPTED_ARTIFACT_KEY, } from "./secure_wrapper.js";
25
+ export { SecureLLMProxy } from "./secure_llm_proxy.js";
26
+ export { initErrorReporting, captureException, captureMessage, flush as flushErrorReporting, summarizeSubprocessFailure, subprocessOutputTail, type InitErrorReportingArgs, type CaptureExceptionArgs, type SubprocessFailure, } from "./error_reporting.js";
27
+ export { emit, emitStep } from "./progress.js";
28
+ export { Metrics, recordLatency, withMetrics, type LatencyStatsJson, } from "./metrics.js";
29
+ export * from "./node_logger.js";
30
+ export * from "./structured_logging.js";
31
+ export * from "./tracing/index.js";
32
+ export * from "./span_names.js";
33
+ export { AppBoundRuntime, AppBoundCrudClient } from "./memory_appbound.js";
34
+ export { ToolAPIErrorSchema, type ToolAPIError } from "./tool_api_error.js";
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ // Copyright 2026 MongoDB, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // agent-engine-runner-shared public API barrel
4
+ export * from "./utils.js";
5
+ export { getStoreDbName, resolveStoreDbName, resetStoreDbCache, } from "./db_config.js";
6
+ export { resolveProjectScopedDb, resolveEffectiveDb, projectScopingRequired, } from "./db_naming.js";
7
+ export { getLogger, setupLogging } from "./logger.js";
8
+ export { AERServer, ToolServer, LLMRegistryLoadError, ToolFunctionRunner, ToolFunctionRequestSchema, buildResultPayload, DEFAULT_PORTS, } from "./server/index.js";
9
+ export { chunkTypes } from "./server/index.js";
10
+ export * from "./models.js";
11
+ export * from "./guardrails_evaluator/index.js";
12
+ export * from "./agent_config.js";
13
+ export * from "./mcp_tools.js";
14
+ export { DEFAULT_MCP_OAUTH_CLIENT_NAME, DEFAULT_MCP_OAUTH_REDIRECT_URI, mcpOauthCacheDir, mcpOauthCacheName, makeMcpOauthAuth, makeMcpClientCredentialsAuth, } from "./mcp_oauth.js";
15
+ export { materializeMcpOauthSecretCache } from "./mcp_oauth_secret.js";
16
+ export * from "./context.js";
17
+ export { BUILTIN_TOOL_NAMES, registerBuiltinTools, WORKSPACE_DIR, filesystemLs, filesystemRead, filesystemWrite, filesystemEdit, filesystemGlob, filesystemGrep, filesystemDownload, shellExecute, } from "./toolpod_handlers.js";
18
+ export * from "./hooks.js";
19
+ export * from "./workflow/index.js";
20
+ export { fetchPlatform, getFetchOptionsWithTLS } from "./tls_client.js";
21
+ export { quotePathSegment } from "./http_path.js";
22
+ export { resolveOeUrl } from "./server/oe_url.js";
23
+ export { getCheckpointWorkspaceId, noteCheckpointWireWorkspaceId, resolveCheckpointWorkspaceId, resetCheckpointWorkspaceState, } from "./checkpoint_workspace.js";
24
+ export { TenantRuntime, resolveListenHost, } from "./runtime.js";
25
+ export { resolveEntrypoint, resolveImportTarget, runLauncher, boundText, writeTerminationMessage, setTerminationLogPathForTest, EXIT_IMPORT_ERROR, EXIT_NO_ENTRYPOINT, EXIT_STARTUP_CRASH, } from "./launcher.js";
26
+ export { PolicyDeniedException, TerminalExecutionError, ToolCallTimeoutError, ToolExecutionError, ExternalAPICallError, LLMInvocationError, OperationalStepAllocator, SecureToolWrapper, createSecureToolFunction, requestOeApproval, reportOeResult, extractUsage, extractPodUsage, CALL_INTERRUPTED_ARTIFACT_KEY, } from "./secure_wrapper.js";
27
+ export { SecureLLMProxy } from "./secure_llm_proxy.js";
28
+ export { initErrorReporting, captureException, captureMessage, flush as flushErrorReporting, summarizeSubprocessFailure, subprocessOutputTail, } from "./error_reporting.js";
29
+ export { emit, emitStep } from "./progress.js";
30
+ // `metrics.ts` defines `logToolResult`/`logToolCall`/etc which collide with
31
+ // the human-readable versions in `utils.ts`. Export the metrics surface
32
+ // explicitly to keep the API surface clear: `Metrics`, `recordLatency`,
33
+ // `withMetrics` are the canonical names; the structured `log*` helpers stay
34
+ // internal (imported directly from `agent-engine-runner-shared/metrics`).
35
+ export { Metrics, recordLatency, withMetrics, } from "./metrics.js";
36
+ export * from "./node_logger.js";
37
+ export * from "./structured_logging.js";
38
+ export * from "./tracing/index.js";
39
+ export * from "./span_names.js";
40
+ export { AppBoundRuntime, AppBoundCrudClient } from "./memory_appbound.js";
41
+ export { ToolAPIErrorSchema } from "./tool_api_error.js";
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Launcher module for pipeline-built agent containers (TS port of
3
+ * `agent_engine_runner_shared/launcher.py`).
4
+ *
5
+ * Reads `AGENT_ENTRYPOINT` and starts the user's agent code. The generated
6
+ * Dockerfile CMD invokes this file directly:
7
+ *
8
+ * CMD ["node", "/app/node_modules/@mongodb-js/agent-engine-runner-shared/dist/launcher.js"]
9
+ *
10
+ * Environment variables:
11
+ * AGENT_ENTRYPOINT Startup target in one of these forms:
12
+ * 1) `<module-specifier>:<export-name>` — module is dynamically
13
+ * imported and the named export is invoked.
14
+ * 2) `<module-specifier>:<export-name>` where the export is not a
15
+ * function but has a callable `run()` method — `.run()` is invoked.
16
+ * 3) `<module-specifier>` (no colon) — defaults to `:main`.
17
+ *
18
+ * Structured logging is installed at the start of `runLauncher()` (before
19
+ * import) so import-time and entrypoint failures emit `ERROR` records
20
+ * instead of raw stderr stacks. `TenantRuntime` re-installs later; that
21
+ * call is idempotent. After install, `console.error` is captured as
22
+ * WARNING, so failure paths must use the logger.
23
+ *
24
+ * Security note: `AGENT_ENTRYPOINT` is baked into the Dockerfile ENV at
25
+ * image-build time by the platform pipeline, not supplied by the user at
26
+ * container runtime. The dynamic `import()` here serves the same role as
27
+ * `node -e "import('module')"` — bootstrapping a known, pre-installed
28
+ * module — and is an intentional exception to the "no dynamic code
29
+ * execution in platform code" guideline.
30
+ */
31
+ /**
32
+ * Kubernetes' default termination-message path (the "File"
33
+ * TerminationMessagePolicy Kubelet always checks first, before falling back
34
+ * to log-tail capture). Nothing in the deployed pod spec sets a custom
35
+ * terminationMessagePath, so the default applies. A mutable binding so tests
36
+ * can redirect it to a temp file.
37
+ */
38
+ export declare let terminationLogPath: string;
39
+ /** Test-only override, mirroring `setHomeDirForTest` in error_reporting.ts. */
40
+ export declare function setTerminationLogPathForTest(path: string): void;
41
+ /**
42
+ * Truncate `text` to at most `maxLines` lines or `maxBytes` UTF-8 bytes,
43
+ * whichever limit is hit first, appending a truncation marker when either
44
+ * limit was hit.
45
+ */
46
+ export declare function boundText(text: string, maxBytes?: number, maxLines?: number): string;
47
+ /**
48
+ * Record a bounded, redacted summary of a fatal startup error to the
49
+ * container's termination message before the process exits, so the real
50
+ * cause of the crash survives past this process's own stdout into
51
+ * `ContainerStatus.LastTerminationState.Terminated.Message` — the field the
52
+ * platform's crash diagnostics read, and from there into the
53
+ * customer-facing deploy timeline.
54
+ *
55
+ * This is customer code (container mode), so unlike the platform's own
56
+ * components the design intentionally keeps the full exception name,
57
+ * message, and stack — redacted, not summarized away — since that detail is
58
+ * what the customer needs to fix their own agent. Best-effort: if the write
59
+ * fails, nothing is lost beyond what
60
+ * `TerminationMessagePolicy: FallbackToLogsOnError` already provides.
61
+ */
62
+ export declare function writeTerminationMessage(summary: string, err?: Error): void;
63
+ /**
64
+ * Startup-failure exit codes. OE's readiness wait can observe a
65
+ * workload's real exit code once it exits (via fctr's Wait RPC) but not the
66
+ * exception that caused it, so the exit code itself is the only signal that
67
+ * reliably survives a startup crash to reach OE. Chosen to avoid every range
68
+ * fctr's own const.go already claims: 0/1 (generic), 64-78 (sysexits.h), and
69
+ * 128+signal (signal deaths, e.g. 137=SIGKILL, 143=SIGTERM).
70
+ *
71
+ * Frozen wire contract: OE's classification of a startup failure depends on
72
+ * these exact values, and they are duplicated in
73
+ * runner-shared/src/agent_engine_runner_shared/launcher.py. Changing either file breaks
74
+ * OE's ability to distinguish failure causes and/or cross-language parity —
75
+ * keep the two in lockstep.
76
+ */
77
+ export declare const EXIT_IMPORT_ERROR = 82;
78
+ export declare const EXIT_NO_ENTRYPOINT = 83;
79
+ export declare const EXIT_STARTUP_CRASH = 84;
80
+ export interface ResolvedEntrypoint {
81
+ modulePath: string;
82
+ exportName: string;
83
+ }
84
+ /**
85
+ * Resolve an AGENT_ENTRYPOINT module path to a value Node's dynamic `import()`
86
+ * can load.
87
+ *
88
+ * The platform bakes the `agent.yaml` `entrypoint` verbatim into
89
+ * AGENT_ENTRYPOINT (same contract as the Python launcher), so the common form
90
+ * is a dotted, Python-style module path — e.g. `agent_pkg.main` — that maps to
91
+ * the agent's *compiled* output `<agentRoot>/dist/agent_pkg/main.js`. Node ESM
92
+ * `import()` treats a dotted string as a bare package specifier and cannot
93
+ * resolve it, so we translate it here: dots → path separators, under the
94
+ * compiled `dist/` directory, with a `.js` suffix, returned as a `file://` URL
95
+ * (the portable form for importing an absolute path across platforms).
96
+ *
97
+ * `agentRoot` defaults to `process.cwd()`, which at runtime is the agent
98
+ * package root: the generated Dockerfile sets `WORKDIR` to the install target
99
+ * and the `CMD` runs the launcher from there. It is injectable for tests.
100
+ *
101
+ * A value that is already directly importable — a relative path, an absolute
102
+ * path, or any path-bearing specifier (one that contains a `/`) — is returned
103
+ * unchanged, so a pre-resolved entrypoint (or a test passing an absolute file
104
+ * path) still works and is never double-translated. A path-shape signal (not a
105
+ * file extension) is used deliberately: a dotted module path whose final
106
+ * segment happens to be `js`/`mjs`/`cjs` (e.g. `agent_pkg.cjs`) must still be
107
+ * translated, not mistaken for an already-importable file.
108
+ */
109
+ export declare function resolveImportTarget(modulePath: string, agentRoot?: string): string;
110
+ /**
111
+ * Parse `AGENT_ENTRYPOINT` into `{ modulePath, exportName }`.
112
+ *
113
+ * Exits the process with `EXIT_NO_ENTRYPOINT` if the env var is unset or
114
+ * malformed — matches Python `_resolve_entrypoint`'s equivalent exit code.
115
+ * Exported so tests can spawn this in a subprocess and assert on exit
116
+ * code / stderr.
117
+ */
118
+ export declare function resolveEntrypoint(): ResolvedEntrypoint;
119
+ /**
120
+ * Entry point invoked when this file is run directly:
121
+ *
122
+ * `node /app/node_modules/@mongodb-js/agent-engine-runner-shared/dist/launcher.js`
123
+ *
124
+ * Exits the process with the exit code matching the failure category
125
+ * (see `EXIT_IMPORT_ERROR`/`EXIT_NO_ENTRYPOINT`/`EXIT_STARTUP_CRASH` above)
126
+ * on any error path; resolves normally after the user's target function or
127
+ * `.run()` returns.
128
+ */
129
+ export declare function runLauncher(): Promise<void>;
130
+ //# sourceMappingURL=launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAcH;;;;;;GAMG;AACH,eAAO,IAAI,kBAAkB,QAAyB,CAAC;AAEvD,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE/D;AAYD;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAsC,EAChD,QAAQ,GAAE,MAAsC,GAC/C,MAAM,CA+BR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAY1E;AAmBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,SAAS,GAAE,MAAsB,GAChC,MAAM,CAWR;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,kBAAkB,CAkCtD;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAoFjD"}