@ekairos/story 1.21.32-beta.0 → 1.21.36-beta.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.
@@ -1,3 +1,5 @@
1
+ import { pathToFileURL } from "node:url";
2
+ import { join } from "node:path";
1
3
  let runtimeResolver = null;
2
4
  function getRuntimeResolver() {
3
5
  return runtimeResolver;
@@ -24,6 +26,28 @@ export async function resolveStoryRuntime(env) {
24
26
  if (runtimeBootstrap) {
25
27
  await runtimeBootstrap();
26
28
  }
29
+ // Convention bootstrap (portable, runtime-resolvable):
30
+ // If the host app provides an `ekairos.bootstrap.js` at the project root, we can load it
31
+ // from the step runtime using a file URL. This avoids relying on bundler-only aliases.
32
+ if (!getRuntimeResolver()) {
33
+ const cwd = typeof process !== "undefined" && process.cwd ? process.cwd() : null;
34
+ if (cwd) {
35
+ const candidates = [
36
+ "ekairos.bootstrap.js",
37
+ "ekairos.bootstrap.cjs",
38
+ "ekairos.bootstrap.mjs",
39
+ ];
40
+ for (const filename of candidates) {
41
+ try {
42
+ await import(pathToFileURL(join(cwd, filename)).href);
43
+ break;
44
+ }
45
+ catch {
46
+ // ignore
47
+ }
48
+ }
49
+ }
50
+ }
27
51
  // Convention bootstrap (Next.js / monorepo apps):
28
52
  // If the app exposes `src/ekairos.ts` and uses the `@/` alias, loading that module will
29
53
  // run `ekairosConfig.setup()` which configures the resolver + bootstrap hook.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekairos/story",
3
- "version": "1.21.32-beta.0",
3
+ "version": "1.21.36-beta.0",
4
4
  "description": "Pulzar Story - Workflow-based AI Stories",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -43,13 +43,12 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ai-sdk/openai": "^2.0.52",
46
- "@ekairos/domain": "^1.21.32-beta.0",
46
+ "@ekairos/domain": "^1.21.36-beta.0",
47
47
  "@instantdb/admin": "^0.22.13",
48
48
  "@instantdb/core": "^0.22.13",
49
49
  "@vercel/sandbox": "^0.0.23",
50
50
  "ai": "^5.0.95",
51
51
  "ajv": "^8.17.1",
52
- "braintrust": "^0.3.7",
53
52
  "llamaindex": "^0.12.0",
54
53
  "workflow": "4.0.1-beta.13",
55
54
  "xmlbuilder2": "^3.1.1",