orchajs 0.18.0 → 0.20.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 (286) hide show
  1. package/README.md +93 -9
  2. package/dist/amarsia/metadata.d.ts +0 -1
  3. package/dist/amarsia/metadata.js +0 -1
  4. package/dist/amarsia/sync.d.ts +0 -1
  5. package/dist/amarsia/sync.js +0 -1
  6. package/dist/cli-agents-template.d.ts +0 -1
  7. package/dist/cli-agents-template.js +0 -1
  8. package/dist/cli.d.ts +0 -1
  9. package/dist/cli.js +0 -1
  10. package/dist/compiler/build-project.d.ts +0 -1
  11. package/dist/compiler/build-project.js +0 -1
  12. package/dist/compiler/compile.d.ts +0 -1
  13. package/dist/compiler/compile.js +0 -1
  14. package/dist/env.d.ts +0 -1
  15. package/dist/env.js +0 -1
  16. package/dist/errors.d.ts +0 -1
  17. package/dist/errors.js +0 -1
  18. package/dist/file-content.d.ts +0 -1
  19. package/dist/file-content.js +0 -1
  20. package/dist/index.d.ts +0 -1
  21. package/dist/index.js +0 -1
  22. package/dist/integrations/esbuild.d.ts +0 -1
  23. package/dist/integrations/esbuild.js +0 -1
  24. package/dist/integrations/serverless.d.ts +27 -0
  25. package/dist/integrations/serverless.js +78 -0
  26. package/dist/orcha.d.ts +0 -1
  27. package/dist/orcha.js +0 -1
  28. package/dist/playground/public/app.css +0 -1
  29. package/dist/playground/public/app.js +0 -1
  30. package/dist/playground/server.d.ts +0 -1
  31. package/dist/playground/server.js +0 -1
  32. package/dist/playground/source.d.ts +0 -1
  33. package/dist/playground/source.js +0 -1
  34. package/dist/project-loader.d.ts +0 -1
  35. package/dist/project-loader.js +0 -1
  36. package/dist/providers/anthropic.d.ts +0 -1
  37. package/dist/providers/anthropic.js +0 -1
  38. package/dist/providers/bedrock.d.ts +0 -1
  39. package/dist/providers/bedrock.js +0 -1
  40. package/dist/providers/catalog.d.ts +0 -1
  41. package/dist/providers/catalog.js +0 -1
  42. package/dist/providers/deepseek.d.ts +0 -1
  43. package/dist/providers/deepseek.js +0 -1
  44. package/dist/providers/dispatcher.d.ts +0 -1
  45. package/dist/providers/dispatcher.js +0 -1
  46. package/dist/providers/google-gemini.d.ts +0 -1
  47. package/dist/providers/google-gemini.js +0 -1
  48. package/dist/providers/google-genai.d.ts +0 -1
  49. package/dist/providers/google-genai.js +0 -1
  50. package/dist/providers/index.d.ts +0 -1
  51. package/dist/providers/index.js +20 -5
  52. package/dist/providers/openai.d.ts +0 -1
  53. package/dist/providers/openai.js +0 -1
  54. package/dist/providers/sse.d.ts +0 -1
  55. package/dist/providers/sse.js +0 -1
  56. package/dist/providers/types.d.ts +0 -1
  57. package/dist/providers/types.js +0 -1
  58. package/dist/providers/vertex-ai.d.ts +0 -1
  59. package/dist/providers/vertex-ai.js +0 -1
  60. package/dist/runtime/actions/context.d.ts +0 -1
  61. package/dist/runtime/actions/context.js +0 -1
  62. package/dist/runtime/actions/execute.d.ts +0 -1
  63. package/dist/runtime/actions/execute.js +14 -2
  64. package/dist/runtime/actions/native.d.ts +0 -1
  65. package/dist/runtime/actions/native.js +0 -1
  66. package/dist/runtime/actions/sandbox.d.ts +0 -1
  67. package/dist/runtime/actions/sandbox.js +0 -1
  68. package/dist/runtime/agent.d.ts +0 -1
  69. package/dist/runtime/agent.js +0 -1
  70. package/dist/runtime/context.d.ts +0 -1
  71. package/dist/runtime/context.js +0 -1
  72. package/dist/runtime/create-orcha.d.ts +0 -1
  73. package/dist/runtime/create-orcha.js +0 -1
  74. package/dist/runtime/execution.d.ts +0 -1
  75. package/dist/runtime/execution.js +0 -1
  76. package/dist/runtime/session-events.d.ts +0 -1
  77. package/dist/runtime/session-events.js +0 -1
  78. package/dist/runtime/structured-output.d.ts +0 -1
  79. package/dist/runtime/structured-output.js +0 -1
  80. package/dist/storage/browser-indexeddb.d.ts +0 -1
  81. package/dist/storage/browser-indexeddb.js +0 -1
  82. package/dist/storage/create-store.d.ts +0 -1
  83. package/dist/storage/create-store.js +0 -1
  84. package/dist/storage/edge-store.d.ts +0 -1
  85. package/dist/storage/edge-store.js +0 -1
  86. package/dist/storage/migrate.d.ts +0 -1
  87. package/dist/storage/migrate.js +0 -1
  88. package/dist/storage/node-jsonl.d.ts +0 -1
  89. package/dist/storage/node-jsonl.js +0 -1
  90. package/dist/storage/node-sqlite.d.ts +0 -1
  91. package/dist/storage/node-sqlite.js +1 -2
  92. package/dist/storage/react-native-jsonl.d.ts +0 -1
  93. package/dist/storage/react-native-jsonl.js +0 -1
  94. package/dist/testing.d.ts +0 -1
  95. package/dist/testing.js +0 -1
  96. package/dist/types.d.ts +0 -1
  97. package/dist/types.js +0 -1
  98. package/dist-cjs/amarsia/metadata.js +0 -1
  99. package/dist-cjs/amarsia/sync.js +0 -1
  100. package/dist-cjs/cli-agents-template.js +0 -1
  101. package/dist-cjs/compiler/build-project.js +0 -1
  102. package/dist-cjs/compiler/compile.js +0 -1
  103. package/dist-cjs/env.js +0 -1
  104. package/dist-cjs/errors.js +0 -1
  105. package/dist-cjs/file-content.js +0 -1
  106. package/dist-cjs/index.js +0 -1
  107. package/dist-cjs/integrations/esbuild.js +0 -1
  108. package/dist-cjs/integrations/serverless.cjs +2 -0
  109. package/dist-cjs/integrations/serverless.js +125 -0
  110. package/dist-cjs/orcha.js +0 -1
  111. package/dist-cjs/playground/server.js +0 -1
  112. package/dist-cjs/playground/source.js +0 -1
  113. package/dist-cjs/project-loader.js +0 -1
  114. package/dist-cjs/providers/anthropic.js +0 -1
  115. package/dist-cjs/providers/bedrock.js +0 -1
  116. package/dist-cjs/providers/catalog.js +0 -1
  117. package/dist-cjs/providers/deepseek.js +0 -1
  118. package/dist-cjs/providers/dispatcher.js +0 -1
  119. package/dist-cjs/providers/google-gemini.js +0 -1
  120. package/dist-cjs/providers/google-genai.js +0 -1
  121. package/dist-cjs/providers/index.js +16 -3
  122. package/dist-cjs/providers/openai.js +0 -1
  123. package/dist-cjs/providers/sse.js +0 -1
  124. package/dist-cjs/providers/types.js +0 -1
  125. package/dist-cjs/providers/vertex-ai.js +0 -1
  126. package/dist-cjs/runtime/actions/context.js +0 -1
  127. package/dist-cjs/runtime/actions/execute.js +16 -2
  128. package/dist-cjs/runtime/actions/native.js +0 -1
  129. package/dist-cjs/runtime/actions/sandbox.js +0 -1
  130. package/dist-cjs/runtime/agent.js +0 -1
  131. package/dist-cjs/runtime/context.js +0 -1
  132. package/dist-cjs/runtime/create-orcha.js +0 -1
  133. package/dist-cjs/runtime/execution.js +0 -1
  134. package/dist-cjs/runtime/session-events.js +0 -1
  135. package/dist-cjs/runtime/structured-output.js +0 -1
  136. package/dist-cjs/storage/browser-indexeddb.js +0 -1
  137. package/dist-cjs/storage/create-store.js +0 -1
  138. package/dist-cjs/storage/edge-store.js +0 -1
  139. package/dist-cjs/storage/migrate.js +0 -1
  140. package/dist-cjs/storage/node-jsonl.js +0 -1
  141. package/dist-cjs/storage/node-sqlite.js +1 -2
  142. package/dist-cjs/storage/react-native-jsonl.js +0 -1
  143. package/dist-cjs/testing.js +0 -1
  144. package/dist-cjs/types/google-genai-sdk.d.js +0 -1
  145. package/dist-cjs/types.js +0 -1
  146. package/package.json +41 -9
  147. package/dist/amarsia/metadata.d.ts.map +0 -1
  148. package/dist/amarsia/metadata.js.map +0 -1
  149. package/dist/amarsia/sync.d.ts.map +0 -1
  150. package/dist/amarsia/sync.js.map +0 -1
  151. package/dist/cli-agents-template.d.ts.map +0 -1
  152. package/dist/cli-agents-template.js.map +0 -1
  153. package/dist/cli.d.ts.map +0 -1
  154. package/dist/cli.js.map +0 -1
  155. package/dist/compiler/build-project.d.ts.map +0 -1
  156. package/dist/compiler/build-project.js.map +0 -1
  157. package/dist/compiler/compile.d.ts.map +0 -1
  158. package/dist/compiler/compile.js.map +0 -1
  159. package/dist/env.d.ts.map +0 -1
  160. package/dist/env.js.map +0 -1
  161. package/dist/errors.d.ts.map +0 -1
  162. package/dist/errors.js.map +0 -1
  163. package/dist/file-content.d.ts.map +0 -1
  164. package/dist/file-content.js.map +0 -1
  165. package/dist/index.d.ts.map +0 -1
  166. package/dist/index.js.map +0 -1
  167. package/dist/integrations/esbuild.d.ts.map +0 -1
  168. package/dist/integrations/esbuild.js.map +0 -1
  169. package/dist/orcha.d.ts.map +0 -1
  170. package/dist/orcha.js.map +0 -1
  171. package/dist/playground/public/app.css.map +0 -7
  172. package/dist/playground/public/app.js.map +0 -7
  173. package/dist/playground/server.d.ts.map +0 -1
  174. package/dist/playground/server.js.map +0 -1
  175. package/dist/playground/source.d.ts.map +0 -1
  176. package/dist/playground/source.js.map +0 -1
  177. package/dist/project-loader.d.ts.map +0 -1
  178. package/dist/project-loader.js.map +0 -1
  179. package/dist/providers/anthropic.d.ts.map +0 -1
  180. package/dist/providers/anthropic.js.map +0 -1
  181. package/dist/providers/bedrock.d.ts.map +0 -1
  182. package/dist/providers/bedrock.js.map +0 -1
  183. package/dist/providers/catalog.d.ts.map +0 -1
  184. package/dist/providers/catalog.js.map +0 -1
  185. package/dist/providers/deepseek.d.ts.map +0 -1
  186. package/dist/providers/deepseek.js.map +0 -1
  187. package/dist/providers/dispatcher.d.ts.map +0 -1
  188. package/dist/providers/dispatcher.js.map +0 -1
  189. package/dist/providers/google-gemini.d.ts.map +0 -1
  190. package/dist/providers/google-gemini.js.map +0 -1
  191. package/dist/providers/google-genai.d.ts.map +0 -1
  192. package/dist/providers/google-genai.js.map +0 -1
  193. package/dist/providers/index.d.ts.map +0 -1
  194. package/dist/providers/index.js.map +0 -1
  195. package/dist/providers/openai.d.ts.map +0 -1
  196. package/dist/providers/openai.js.map +0 -1
  197. package/dist/providers/sse.d.ts.map +0 -1
  198. package/dist/providers/sse.js.map +0 -1
  199. package/dist/providers/types.d.ts.map +0 -1
  200. package/dist/providers/types.js.map +0 -1
  201. package/dist/providers/vertex-ai.d.ts.map +0 -1
  202. package/dist/providers/vertex-ai.js.map +0 -1
  203. package/dist/runtime/actions/context.d.ts.map +0 -1
  204. package/dist/runtime/actions/context.js.map +0 -1
  205. package/dist/runtime/actions/execute.d.ts.map +0 -1
  206. package/dist/runtime/actions/execute.js.map +0 -1
  207. package/dist/runtime/actions/native.d.ts.map +0 -1
  208. package/dist/runtime/actions/native.js.map +0 -1
  209. package/dist/runtime/actions/sandbox.d.ts.map +0 -1
  210. package/dist/runtime/actions/sandbox.js.map +0 -1
  211. package/dist/runtime/agent.d.ts.map +0 -1
  212. package/dist/runtime/agent.js.map +0 -1
  213. package/dist/runtime/context.d.ts.map +0 -1
  214. package/dist/runtime/context.js.map +0 -1
  215. package/dist/runtime/create-orcha.d.ts.map +0 -1
  216. package/dist/runtime/create-orcha.js.map +0 -1
  217. package/dist/runtime/execution.d.ts.map +0 -1
  218. package/dist/runtime/execution.js.map +0 -1
  219. package/dist/runtime/session-events.d.ts.map +0 -1
  220. package/dist/runtime/session-events.js.map +0 -1
  221. package/dist/runtime/structured-output.d.ts.map +0 -1
  222. package/dist/runtime/structured-output.js.map +0 -1
  223. package/dist/storage/browser-indexeddb.d.ts.map +0 -1
  224. package/dist/storage/browser-indexeddb.js.map +0 -1
  225. package/dist/storage/create-store.d.ts.map +0 -1
  226. package/dist/storage/create-store.js.map +0 -1
  227. package/dist/storage/edge-store.d.ts.map +0 -1
  228. package/dist/storage/edge-store.js.map +0 -1
  229. package/dist/storage/migrate.d.ts.map +0 -1
  230. package/dist/storage/migrate.js.map +0 -1
  231. package/dist/storage/node-jsonl.d.ts.map +0 -1
  232. package/dist/storage/node-jsonl.js.map +0 -1
  233. package/dist/storage/node-sqlite.d.ts.map +0 -1
  234. package/dist/storage/node-sqlite.js.map +0 -1
  235. package/dist/storage/react-native-jsonl.d.ts.map +0 -1
  236. package/dist/storage/react-native-jsonl.js.map +0 -1
  237. package/dist/testing.d.ts.map +0 -1
  238. package/dist/testing.js.map +0 -1
  239. package/dist/types.d.ts.map +0 -1
  240. package/dist/types.js.map +0 -1
  241. package/dist-cjs/amarsia/metadata.js.map +0 -7
  242. package/dist-cjs/amarsia/sync.js.map +0 -7
  243. package/dist-cjs/cli-agents-template.js.map +0 -7
  244. package/dist-cjs/compiler/build-project.js.map +0 -7
  245. package/dist-cjs/compiler/compile.js.map +0 -7
  246. package/dist-cjs/env.js.map +0 -7
  247. package/dist-cjs/errors.js.map +0 -7
  248. package/dist-cjs/file-content.js.map +0 -7
  249. package/dist-cjs/index.js.map +0 -7
  250. package/dist-cjs/integrations/esbuild.js.map +0 -7
  251. package/dist-cjs/orcha.js.map +0 -7
  252. package/dist-cjs/playground/server.js.map +0 -7
  253. package/dist-cjs/playground/source.js.map +0 -7
  254. package/dist-cjs/project-loader.js.map +0 -7
  255. package/dist-cjs/providers/anthropic.js.map +0 -7
  256. package/dist-cjs/providers/bedrock.js.map +0 -7
  257. package/dist-cjs/providers/catalog.js.map +0 -7
  258. package/dist-cjs/providers/deepseek.js.map +0 -7
  259. package/dist-cjs/providers/dispatcher.js.map +0 -7
  260. package/dist-cjs/providers/google-gemini.js.map +0 -7
  261. package/dist-cjs/providers/google-genai.js.map +0 -7
  262. package/dist-cjs/providers/index.js.map +0 -7
  263. package/dist-cjs/providers/openai.js.map +0 -7
  264. package/dist-cjs/providers/sse.js.map +0 -7
  265. package/dist-cjs/providers/types.js.map +0 -7
  266. package/dist-cjs/providers/vertex-ai.js.map +0 -7
  267. package/dist-cjs/runtime/actions/context.js.map +0 -7
  268. package/dist-cjs/runtime/actions/execute.js.map +0 -7
  269. package/dist-cjs/runtime/actions/native.js.map +0 -7
  270. package/dist-cjs/runtime/actions/sandbox.js.map +0 -7
  271. package/dist-cjs/runtime/agent.js.map +0 -7
  272. package/dist-cjs/runtime/context.js.map +0 -7
  273. package/dist-cjs/runtime/create-orcha.js.map +0 -7
  274. package/dist-cjs/runtime/execution.js.map +0 -7
  275. package/dist-cjs/runtime/session-events.js.map +0 -7
  276. package/dist-cjs/runtime/structured-output.js.map +0 -7
  277. package/dist-cjs/storage/browser-indexeddb.js.map +0 -7
  278. package/dist-cjs/storage/create-store.js.map +0 -7
  279. package/dist-cjs/storage/edge-store.js.map +0 -7
  280. package/dist-cjs/storage/migrate.js.map +0 -7
  281. package/dist-cjs/storage/node-jsonl.js.map +0 -7
  282. package/dist-cjs/storage/node-sqlite.js.map +0 -7
  283. package/dist-cjs/storage/react-native-jsonl.js.map +0 -7
  284. package/dist-cjs/testing.js.map +0 -7
  285. package/dist-cjs/types/google-genai-sdk.d.js.map +0 -7
  286. package/dist-cjs/types.js.map +0 -7
@@ -667,4 +667,3 @@ function validateMutationRequest(request, mutationToken) {
667
667
  }
668
668
  }
669
669
  }
670
- //# sourceMappingURL=server.js.map
@@ -32,4 +32,3 @@ export interface PlaygroundAgentSource {
32
32
  }>;
33
33
  }
34
34
  export declare function readPlaygroundAgentSource(orcha: OrchaClient, agentKey: string): Promise<PlaygroundAgentSource>;
35
- //# sourceMappingURL=source.d.ts.map
@@ -110,4 +110,3 @@ function parseObject(source, label) {
110
110
  }
111
111
  return value;
112
112
  }
113
- //# sourceMappingURL=source.js.map
@@ -1,2 +1 @@
1
1
  export declare function loadProject(projectRoot: string): Promise<void>;
2
- //# sourceMappingURL=project-loader.d.ts.map
@@ -56,4 +56,3 @@ function restoreEnvironment(name, value) {
56
56
  process.env[name] = value;
57
57
  }
58
58
  }
59
- //# sourceMappingURL=project-loader.js.map
@@ -11,4 +11,3 @@ export interface AnthropicContentBlock {
11
11
  [key: string]: unknown;
12
12
  }
13
13
  export declare const anthropicProvider: ProviderAdapter;
14
- //# sourceMappingURL=anthropic.d.ts.map
@@ -385,4 +385,3 @@ function getReasoningConfiguration(request) {
385
385
  outputConfig: { effort: request.reasoningLevel },
386
386
  };
387
387
  }
388
- //# sourceMappingURL=anthropic.js.map
@@ -12,4 +12,3 @@ export interface BedrockContentClient {
12
12
  }
13
13
  export declare const bedrockProvider: ProviderAdapter;
14
14
  export declare function generateBedrockContent(client: BedrockContentClient, request: ProviderRequest): Promise<ProviderResponse>;
15
- //# sourceMappingURL=bedrock.d.ts.map
@@ -533,4 +533,3 @@ function isRecord(value) {
533
533
  value !== null &&
534
534
  !Array.isArray(value));
535
535
  }
536
- //# sourceMappingURL=bedrock.js.map
@@ -29,4 +29,3 @@ export declare const builtInProviderCatalog: {
29
29
  };
30
30
  };
31
31
  export declare function isBuiltInProvider(name: string): name is keyof typeof builtInProviderCatalog;
32
- //# sourceMappingURL=catalog.d.ts.map
@@ -27,4 +27,3 @@ export const builtInProviderCatalog = {
27
27
  export function isBuiltInProvider(name) {
28
28
  return Object.hasOwn(builtInProviderCatalog, name);
29
29
  }
30
- //# sourceMappingURL=catalog.js.map
@@ -1,3 +1,2 @@
1
1
  import type { ProviderAdapter } from "./types.js";
2
2
  export declare const deepSeekProvider: ProviderAdapter;
3
- //# sourceMappingURL=deepseek.d.ts.map
@@ -261,4 +261,3 @@ function normalizeUsage(usage) {
261
261
  function isRecord(value) {
262
262
  return typeof value === "object" && value !== null && !Array.isArray(value);
263
263
  }
264
- //# sourceMappingURL=deepseek.js.map
@@ -2,4 +2,3 @@ import type { ProviderName } from "../types.js";
2
2
  import type { ProviderAdapter, ProviderResponseGenerator } from "./types.js";
3
3
  export type ProviderAdapterRegistry = Partial<Record<ProviderName, ProviderAdapter>>;
4
4
  export declare function createProviderResponseGenerator(providers: ProviderAdapterRegistry): ProviderResponseGenerator;
5
- //# sourceMappingURL=dispatcher.d.ts.map
@@ -8,4 +8,3 @@ export function createProviderResponseGenerator(providers) {
8
8
  return provider.generate(configuration, request);
9
9
  };
10
10
  }
11
- //# sourceMappingURL=dispatcher.js.map
@@ -73,4 +73,3 @@ export interface GoogleContentClient {
73
73
  export declare function toGoogleContentClient(client: unknown): GoogleContentClient;
74
74
  export declare function generateGoogleContent(client: GoogleContentClient, request: ProviderRequest, provider: "googlegenai" | "vertexai"): Promise<ProviderResponse>;
75
75
  export {};
76
- //# sourceMappingURL=google-gemini.d.ts.map
@@ -357,4 +357,3 @@ function parseDataUri(uri) {
357
357
  function isRecord(value) {
358
358
  return typeof value === "object" && value !== null && !Array.isArray(value);
359
359
  }
360
- //# sourceMappingURL=google-gemini.js.map
@@ -1,3 +1,2 @@
1
1
  import type { ProviderAdapter } from "./types.js";
2
2
  export declare const googleGenAIProvider: ProviderAdapter;
3
- //# sourceMappingURL=google-genai.d.ts.map
@@ -16,4 +16,3 @@ async function generateGoogleGenAI(configuration, request) {
16
16
  });
17
17
  return generateGoogleContent(toGoogleContentClient(client), request, "googlegenai");
18
18
  }
19
- //# sourceMappingURL=google-genai.js.map
@@ -1,4 +1,3 @@
1
1
  import type { ProviderResponseGenerator } from "./types.js";
2
2
  export { isBuiltInProvider } from "./catalog.js";
3
3
  export declare const generateProviderResponse: ProviderResponseGenerator;
4
- //# sourceMappingURL=index.d.ts.map
@@ -25,16 +25,32 @@ function loadProvider(name) {
25
25
  })
26
26
  .catch((error) => {
27
27
  loadedProviders.delete(name);
28
- if ((name === "googlegenai" || name === "vertexai") &&
29
- error instanceof Error &&
30
- error.message.includes("@google/genai")) {
31
- throw new OrchaError("provider_error", `Provider "${name}" requires Node.js 20 or newer and the optional "@google/genai" package.`, { cause: error });
28
+ const dependency = missingProviderDependency(name, error);
29
+ if (dependency) {
30
+ const nodeRequirement = dependency === "@google/genai"
31
+ ? " Node.js 20 or newer is also required."
32
+ : "";
33
+ throw new OrchaError("provider_error", `Provider "${name}" requires the optional "${dependency}" package.${nodeRequirement} Install it in the application that uses this provider.`, { cause: error });
32
34
  }
33
35
  throw error;
34
36
  });
35
37
  loadedProviders.set(name, loading);
36
38
  return loading;
37
39
  }
40
+ function missingProviderDependency(name, error) {
41
+ if (!(error instanceof Error)) {
42
+ return undefined;
43
+ }
44
+ if (name === "bedrock" &&
45
+ error.message.includes("@aws-sdk/client-bedrock-runtime")) {
46
+ return "@aws-sdk/client-bedrock-runtime";
47
+ }
48
+ if ((name === "googlegenai" || name === "vertexai") &&
49
+ error.message.includes("@google/genai")) {
50
+ return "@google/genai";
51
+ }
52
+ return undefined;
53
+ }
38
54
  function isProviderAdapter(value) {
39
55
  return (typeof value === "object" &&
40
56
  value !== null &&
@@ -42,4 +58,3 @@ function isProviderAdapter(value) {
42
58
  "generate" in value &&
43
59
  typeof value.generate === "function");
44
60
  }
45
- //# sourceMappingURL=index.js.map
@@ -1,3 +1,2 @@
1
1
  import type { ProviderAdapter } from "./types.js";
2
2
  export declare const openAIProvider: ProviderAdapter;
3
- //# sourceMappingURL=openai.d.ts.map
@@ -316,4 +316,3 @@ function normalizeUsage(usage) {
316
316
  function isRecord(value) {
317
317
  return typeof value === "object" && value !== null && !Array.isArray(value);
318
318
  }
319
- //# sourceMappingURL=openai.js.map
@@ -1,2 +1 @@
1
1
  export declare function readServerSentEvents(response: Response): AsyncGenerator<Record<string, unknown>>;
2
- //# sourceMappingURL=sse.d.ts.map
@@ -55,4 +55,3 @@ export async function* readServerSentEvents(response) {
55
55
  reader.releaseLock();
56
56
  }
57
57
  }
58
- //# sourceMappingURL=sse.js.map
@@ -69,4 +69,3 @@ export interface ProviderAdapter {
69
69
  generate(configuration: ProviderConfiguration, request: ProviderRequest): Promise<ProviderResponse>;
70
70
  }
71
71
  export type ProviderResponseGenerator = (name: ProviderName, configuration: ProviderConfiguration, request: ProviderRequest) => Promise<ProviderResponse>;
72
- //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -1,3 +1,2 @@
1
1
  import type { ProviderAdapter } from "./types.js";
2
2
  export declare const vertexAIProvider: ProviderAdapter;
3
- //# sourceMappingURL=vertex-ai.d.ts.map
@@ -37,4 +37,3 @@ async function generateVertexAI(configuration, request) {
37
37
  });
38
38
  return generateGoogleContent(toGoogleContentClient(client), request, "vertexai");
39
39
  }
40
- //# sourceMappingURL=vertex-ai.js.map
@@ -14,4 +14,3 @@ export declare function createLocalActionContext(options: {
14
14
  metadata: SessionMetadata;
15
15
  idempotencyKey: string;
16
16
  }): LocalActionContext;
17
- //# sourceMappingURL=context.d.ts.map
@@ -66,4 +66,3 @@ function isAllowedHost(hostname, allowedHosts) {
66
66
  return hostname === allowed;
67
67
  });
68
68
  }
69
- //# sourceMappingURL=context.js.map
@@ -7,4 +7,3 @@ export declare function executeLocalAction(options: {
7
7
  metadata: SessionMetadata;
8
8
  idempotencyKey: string;
9
9
  }): Promise<unknown>;
10
- //# sourceMappingURL=execute.d.ts.map
@@ -6,9 +6,21 @@ export async function executeLocalAction(options) {
6
6
  return executeNativeAction(options.action, options.parameters, context);
7
7
  }
8
8
  if (process.env.ORCHA_INCLUDE_SANDBOX !== "0") {
9
- const { executeSandboxedAction } = await import("./sandbox.js");
9
+ const { executeSandboxedAction } = await loadSandboxRuntime();
10
10
  return executeSandboxedAction(options.action, options.parameters, context, options.configuration.sandbox);
11
11
  }
12
12
  throw new Error("The production bundle was built without the QuickJS sandbox.");
13
13
  }
14
- //# sourceMappingURL=execute.js.map
14
+ async function loadSandboxRuntime() {
15
+ try {
16
+ return await import("./sandbox.js");
17
+ }
18
+ catch (error) {
19
+ if (error instanceof Error &&
20
+ (error.message.includes("quickjs-emscripten-core") ||
21
+ error.message.includes("@jitl/quickjs-singlefile-cjs-release-sync"))) {
22
+ throw new Error('Sandboxed actions require the optional "quickjs-emscripten-core" and "@jitl/quickjs-singlefile-cjs-release-sync" packages. Install both in the application that selects the sandbox runtime.', { cause: error });
23
+ }
24
+ throw error;
25
+ }
26
+ }
@@ -1,4 +1,3 @@
1
1
  import type { CompiledActionManifest } from "../../types.js";
2
2
  import type { LocalActionContext } from "./context.js";
3
3
  export declare function executeNativeAction(action: CompiledActionManifest, parameters: Record<string, unknown>, context: LocalActionContext): Promise<unknown>;
4
- //# sourceMappingURL=native.d.ts.map
@@ -26,4 +26,3 @@ export async function executeNativeAction(action, parameters, context) {
26
26
  }
27
27
  }
28
28
  }
29
- //# sourceMappingURL=native.js.map
@@ -4,4 +4,3 @@ export declare function executeSandboxedAction(action: CompiledActionManifest, p
4
4
  memoryLimitMb?: number;
5
5
  stackLimitKb?: number;
6
6
  }): Promise<unknown>;
7
- //# sourceMappingURL=sandbox.d.ts.map
@@ -114,4 +114,3 @@ function createSandboxProgram(action, parameters, context) {
114
114
  "})()",
115
115
  ].join("\n");
116
116
  }
117
- //# sourceMappingURL=sandbox.js.map
@@ -39,4 +39,3 @@ export declare class RuntimeAgent implements AgentRuntime {
39
39
  pause(sessionId: string): Promise<SessionSnapshot>;
40
40
  update(sessionId: string, update: SessionUpdate): Promise<SessionSnapshot>;
41
41
  }
42
- //# sourceMappingURL=agent.d.ts.map
@@ -2622,4 +2622,3 @@ function failure(sessionId, code, message, options = {}) {
2622
2622
  },
2623
2623
  };
2624
2624
  }
2625
- //# sourceMappingURL=agent.js.map
@@ -9,4 +9,3 @@ export interface OrchaRuntimeContext {
9
9
  }
10
10
  export declare function setOrchaRuntimeContext(client: object, context: OrchaRuntimeContext): void;
11
11
  export declare function getOrchaRuntimeContext(client: object): OrchaRuntimeContext;
12
- //# sourceMappingURL=context.d.ts.map
@@ -9,4 +9,3 @@ export function getOrchaRuntimeContext(client) {
9
9
  }
10
10
  return context;
11
11
  }
12
- //# sourceMappingURL=context.js.map
@@ -9,4 +9,3 @@ export interface Orcha {
9
9
  export type OrchaClient = Orcha & Record<string, AgentRuntime>;
10
10
  export type BundleResolver = (configuration: OrchaInitConfiguration) => CompiledBundle;
11
11
  export declare function createOrcha(resolveBundle: BundleResolver, generateProviderResponse: ProviderResponseGenerator): OrchaClient;
12
- //# sourceMappingURL=create-orcha.d.ts.map
@@ -120,4 +120,3 @@ export function createOrcha(resolveBundle, generateProviderResponse) {
120
120
  core.attachClient(client);
121
121
  return client;
122
122
  }
123
- //# sourceMappingURL=create-orcha.js.map
@@ -2,4 +2,3 @@ import type { EvaluationResult, Execution, ExecutionSnapshot, RunResult } from "
2
2
  export type OutputSnapshotPublisher<TOutput> = (output: TOutput) => void;
3
3
  export type ExecutionSnapshotPublisher<TOutput> = (snapshot: ExecutionSnapshot<TOutput>) => void;
4
4
  export declare function createExecution<TOutput>(sessionId: string, execute: (publishOutput: OutputSnapshotPublisher<TOutput>, publishSnapshot: ExecutionSnapshotPublisher<TOutput>) => Promise<RunResult<TOutput>>, resolveEvaluations?: () => Promise<EvaluationResult[]>): Execution<TOutput>;
5
- //# sourceMappingURL=execution.d.ts.map
@@ -74,4 +74,3 @@ export function createExecution(sessionId, execute, resolveEvaluations) {
74
74
  evaluations,
75
75
  };
76
76
  }
77
- //# sourceMappingURL=execution.js.map
@@ -9,4 +9,3 @@ export declare class SessionEventWriter {
9
9
  }
10
10
  export declare function messagesFromEvents(events: SessionEvent[], includeRun?: number): ProviderMessage[];
11
11
  export declare function normalizePersistedToolResults(value: unknown[]): ProviderToolResult[] | undefined;
12
- //# sourceMappingURL=session-events.d.ts.map
@@ -237,4 +237,3 @@ function isProviderName(value) {
237
237
  return (value === "amarsia" ||
238
238
  (typeof value === "string" && isBuiltInProvider(value)));
239
239
  }
240
- //# sourceMappingURL=session-events.js.map
@@ -1,3 +1,2 @@
1
1
  export declare function parseStructuredOutput(text: string, schema: Record<string, unknown>): unknown;
2
2
  export declare function validateStructuredValue(value: unknown, schema: Record<string, unknown>): void;
3
- //# sourceMappingURL=structured-output.d.ts.map
@@ -123,4 +123,3 @@ function matchesType(value, type) {
123
123
  function isObject(value) {
124
124
  return typeof value === "object" && value !== null && !Array.isArray(value);
125
125
  }
126
- //# sourceMappingURL=structured-output.js.map
@@ -18,4 +18,3 @@ export declare class BrowserIndexedDbSessionStore implements SessionStore {
18
18
  append(_sessionId: string, _events: SessionEvent[]): Promise<void>;
19
19
  listSessionIds(): Promise<string[]>;
20
20
  }
21
- //# sourceMappingURL=browser-indexeddb.d.ts.map
@@ -23,4 +23,3 @@ export class BrowserIndexedDbSessionStore {
23
23
  throw new Error("Browser IndexedDB session storage is not implemented yet.");
24
24
  }
25
25
  }
26
- //# sourceMappingURL=browser-indexeddb.js.map
@@ -7,4 +7,3 @@ export interface CreateSessionStoreOptions {
7
7
  agentName: string;
8
8
  }
9
9
  export declare function createSessionStore(options: CreateSessionStoreOptions): SessionStore;
10
- //# sourceMappingURL=create-store.d.ts.map
@@ -11,4 +11,3 @@ export function createSessionStore(options) {
11
11
  }
12
12
  throw new Error(`Storage strategy "${String(strategy)}" is not implemented.`);
13
13
  }
14
- //# sourceMappingURL=create-store.js.map
@@ -17,4 +17,3 @@ export declare class EdgeSessionStore implements SessionStore {
17
17
  append(_sessionId: string, _events: SessionEvent[]): Promise<void>;
18
18
  listSessionIds(): Promise<string[]>;
19
19
  }
20
- //# sourceMappingURL=edge-store.d.ts.map
@@ -22,4 +22,3 @@ export class EdgeSessionStore {
22
22
  throw new Error("Edge session storage is not implemented yet.");
23
23
  }
24
24
  }
25
- //# sourceMappingURL=edge-store.js.map
@@ -5,4 +5,3 @@ export interface SessionStoreMigrationResult {
5
5
  }
6
6
  export declare function migrateSessionStore(source: SessionStore, destination: SessionStore): Promise<SessionStoreMigrationResult>;
7
7
  export declare function exportSessionJsonl(store: SessionStore, sessionId: string): Promise<string>;
8
- //# sourceMappingURL=migrate.d.ts.map
@@ -32,4 +32,3 @@ function assertCompatibleHistory(sessionId, source, destination) {
32
32
  function incompatibleHistory(sessionId) {
33
33
  return new Error(`Cannot migrate session "${sessionId}" because the destination contains conflicting history.`);
34
34
  }
35
- //# sourceMappingURL=migrate.js.map
@@ -11,4 +11,3 @@ export declare class NodeJsonlSessionStore implements SessionStore {
11
11
  subscribeAll(listener: (sessionId: string, events: SessionEvent[]) => void): () => void;
12
12
  }
13
13
  export declare function sessionAgentDirectoryName(agent: string): string;
14
- //# sourceMappingURL=node-jsonl.d.ts.map
@@ -239,4 +239,3 @@ function isMissingFileError(error) {
239
239
  "code" in error &&
240
240
  error.code === "ENOENT");
241
241
  }
242
- //# sourceMappingURL=node-jsonl.js.map
@@ -11,4 +11,3 @@ export declare class NodeSqliteSessionStore implements SessionStore {
11
11
  subscribeAll(listener: (sessionId: string, events: SessionEvent[]) => void): () => void;
12
12
  describeLocation(_sessionId: string): Promise<string>;
13
13
  }
14
- //# sourceMappingURL=node-sqlite.d.ts.map
@@ -139,7 +139,7 @@ function loadDatabaseConstructor() {
139
139
  return "default" in loaded ? loaded.default : loaded;
140
140
  }
141
141
  catch (error) {
142
- throw new Error('Orcha\'s optional SQLite dependency is unavailable. Reinstall "orchajs" with optional dependencies enabled or use the "node-jsonl" strategy.', { cause: error });
142
+ throw new Error('SQLite storage requires the optional "better-sqlite3" package. Install it in the application or use the default "node-jsonl" strategy.', { cause: error });
143
143
  }
144
144
  }
145
145
  function validateSessionId(sessionId) {
@@ -155,4 +155,3 @@ function safelyNotify(notify) {
155
155
  // Observers cannot invalidate a durable write.
156
156
  }
157
157
  }
158
- //# sourceMappingURL=node-sqlite.js.map
@@ -18,4 +18,3 @@ export declare class ReactNativeJsonlSessionStore implements SessionStore {
18
18
  append(_sessionId: string, _events: SessionEvent[]): Promise<void>;
19
19
  listSessionIds(): Promise<string[]>;
20
20
  }
21
- //# sourceMappingURL=react-native-jsonl.d.ts.map
@@ -23,4 +23,3 @@ export class ReactNativeJsonlSessionStore {
23
23
  throw new Error("React Native JSONL session storage is not implemented yet.");
24
24
  }
25
25
  }
26
- //# sourceMappingURL=react-native-jsonl.js.map
package/dist/testing.d.ts CHANGED
@@ -2,4 +2,3 @@ import type { OrchaClient } from "./runtime/create-orcha.js";
2
2
  import type { AgentTestCaseSummary, AgentTestReport, RunTestsOptions } from "./types.js";
3
3
  export declare function listTests(orcha: OrchaClient, options?: RunTestsOptions): Promise<AgentTestCaseSummary[]>;
4
4
  export declare function runTests(orcha: OrchaClient, options?: RunTestsOptions): Promise<AgentTestReport>;
5
- //# sourceMappingURL=testing.d.ts.map
package/dist/testing.js CHANGED
@@ -544,4 +544,3 @@ function isRecord(value) {
544
544
  value !== null &&
545
545
  !Array.isArray(value));
546
546
  }
547
- //# sourceMappingURL=testing.js.map
package/dist/types.d.ts CHANGED
@@ -474,4 +474,3 @@ export interface RunTestsOptions {
474
474
  test: string;
475
475
  }) => void;
476
476
  }
477
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -207,4 +207,3 @@ function sortStable(value) {
207
207
  0 && (module.exports = {
208
208
  createAmarsiaProjectMetadata
209
209
  });
210
- //# sourceMappingURL=metadata.js.map
@@ -68,4 +68,3 @@ async function postProjectMetadata(options) {
68
68
  0 && (module.exports = {
69
69
  syncAmarsiaProject
70
70
  });
71
- //# sourceMappingURL=sync.js.map
@@ -1093,4 +1093,3 @@ needed for faithful continuation but are omitted from evaluation transcripts.
1093
1093
  0 && (module.exports = {
1094
1094
  AGENTS_MD
1095
1095
  });
1096
- //# sourceMappingURL=cli-agents-template.js.map
@@ -177,4 +177,3 @@ function createProviderRuntimeSource(providerNames) {
177
177
  0 && (module.exports = {
178
178
  buildProject
179
179
  });
180
- //# sourceMappingURL=build-project.js.map
@@ -555,4 +555,3 @@ function validateNumber(agentName, field, value, constraints) {
555
555
  compileRegistry,
556
556
  serializeBundle
557
557
  });
558
- //# sourceMappingURL=compile.js.map
package/dist-cjs/env.js CHANGED
@@ -38,4 +38,3 @@ function loadProjectEnvironment(projectRoot) {
38
38
  0 && (module.exports = {
39
39
  loadProjectEnvironment
40
40
  });
41
- //# sourceMappingURL=env.js.map
@@ -38,4 +38,3 @@ class OrchaError extends Error {
38
38
  0 && (module.exports = {
39
39
  OrchaError
40
40
  });
41
- //# sourceMappingURL=errors.js.map
@@ -99,4 +99,3 @@ function normalizeMimeType(mimeType, source) {
99
99
  normalizeUrlContent,
100
100
  readLocalFileContent
101
101
  });
102
- //# sourceMappingURL=file-content.js.map
package/dist-cjs/index.js CHANGED
@@ -41,4 +41,3 @@ var import_migrate = require("./storage/migrate.js");
41
41
  migrateSessionStore,
42
42
  orcha
43
43
  });
44
- //# sourceMappingURL=index.js.map
@@ -43,4 +43,3 @@ function orchaPlugin(options = {}) {
43
43
  0 && (module.exports = {
44
44
  orchaPlugin
45
45
  });
46
- //# sourceMappingURL=esbuild.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ module.exports = require("./serverless.js").OrchaServerlessPlugin;