runline 0.5.0 → 0.5.1

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,5 +1,4 @@
1
1
  import { readFileSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
2
  import { getQuickJS, shouldInterruptAfterDeadline, } from "quickjs-emscripten";
4
3
  import { applyEnvOverrides, updateConnectionConfig } from "../config/loader.js";
5
4
  export class ExecutionEngine {
@@ -217,15 +216,14 @@ function formatError(cause) {
217
216
  }
218
217
  return String(cause);
219
218
  }
220
- // MiniSearch UMD bundle, loaded once and inlined into the sandbox source.
221
- // UMD assigns to globalThis.MiniSearch when run in a non-CJS / non-AMD env
222
- // (which QuickJS is), so we just paste the file in and use the global.
223
- const __minisearchSource = (() => {
224
- const req = createRequire(import.meta.url);
225
- const pkg = req.resolve("minisearch/package.json");
226
- const path = pkg.replace(/package\.json$/, "dist/umd/index.js");
227
- return readFileSync(path, "utf8");
228
- })();
219
+ // MiniSearch UMD bundle, vendored at the package root and inlined into the
220
+ // sandbox source. UMD attaches `MiniSearch` to globalThis in a non-CJS /
221
+ // non-AMD env (QuickJS), so pasting the file is enough.
222
+ //
223
+ // `../../vendor/...` resolves identically from src/core/engine.ts (dev) and
224
+ // dist/core/engine.js (published) because tsc preserves the `core/` subdir.
225
+ // See vendor/README.md for the upgrade procedure.
226
+ const __minisearchSource = readFileSync(new URL("../../vendor/minisearch.umd.js", import.meta.url), "utf8");
229
227
  function buildHelpData(plugins) {
230
228
  const data = {};
231
229
  for (const p of plugins) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runline",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Code mode for agents — turn any API or command into a callable action",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,7 +25,8 @@
25
25
  "runline": "./dist/main.js"
26
26
  },
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "vendor"
29
30
  ],
30
31
  "scripts": {
31
32
  "build": "tsc && bun --filter runline-plugins build && rm -rf dist/plugins && cp -R ../runline-plugins/dist dist/plugins",
@@ -58,12 +59,12 @@
58
59
  "@types/bun": "^1.2.17",
59
60
  "@types/node": "^25.5.0",
60
61
  "@types/proper-lockfile": "^4.1.4",
62
+ "minisearch": "^7.2.0",
61
63
  "typescript": "^5.8.0"
62
64
  },
63
65
  "dependencies": {
64
66
  "chalk": "^5.6.2",
65
67
  "commander": "^14.0.3",
66
- "minisearch": "^7.2.0",
67
68
  "proper-lockfile": "^4.1.2",
68
69
  "quickjs-emscripten": "^0.32.0",
69
70
  "rrule": "^2.8.1"
@@ -0,0 +1,19 @@
1
+ # vendor
2
+
3
+ Third-party bundles inlined into the QuickJS sandbox at runtime.
4
+
5
+ These files are committed deliberately: the sandbox eval'd source is part of runline's behavior, and PR diffs should show exactly what changes when a bundle is bumped.
6
+
7
+ ## minisearch.umd.js
8
+
9
+ UMD build of [minisearch](https://github.com/lucaong/minisearch). Read by `src/core/engine.ts` and inlined into the sandbox so `MiniSearch` is available as a global to agent code (powers `actions.find()`).
10
+
11
+ To upgrade:
12
+
13
+ ```bash
14
+ npm i -D minisearch@latest
15
+ cp node_modules/minisearch/dist/umd/index.js vendor/minisearch.umd.js
16
+ git commit -am "vendor: bump minisearch"
17
+ ```
18
+
19
+ The `minisearch` devDependency exists only as a convenience for that `cp` — nothing imports it at runtime.