Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

ci(tui): build the TUI bundle for the e2e matrix with an esbuild installed on its own (RUFLO_ESBUILD_DIR)

r9cf03b3ab9b5
diff --git a/.github/workflows/e2e-host-matrix.yml b/.github/workflows/e2e-host-matrix.yml
index dc452b7493..5bed3ab340 100644
--- a/.github/workflows/e2e-host-matrix.yml
+++ b/.github/workflows/e2e-host-matrix.yml
@@ -43,8 +43,9 @@ jobs:
test -f @claude-flow/cli/dist/src/index.js || { echo "::error::the CLI did not build"; exit 1; }
- name: Build the TUI bundle (esbuild only, no root install; the tui leg skips cleanly without it)
run: |
- npm install --no-save --no-package-lock --ignore-scripts --workspaces=false [email protected]
- node plugins/ruflo-console/scripts/build-tui.mjs
+ mkdir -p "$RUNNER_TEMP/esb"
+ npm install --prefix "$RUNNER_TEMP/esb" --ignore-scripts [email protected]
+ RUFLO_ESBUILD_DIR="$RUNNER_TEMP/esb" node plugins/ruflo-console/scripts/build-tui.mjs
- name: Install the pinned Codex (0.162.0)
run: |
npm install -g @openai/[email protected]
diff --git a/plugins/ruflo-console/scripts/build-tui.mjs b/plugins/ruflo-console/scripts/build-tui.mjs
index ab953e146a..bb2e5dbd86 100644
--- a/plugins/ruflo-console/scripts/build-tui.mjs
+++ b/plugins/ruflo-console/scripts/build-tui.mjs
@@ -11,11 +11,18 @@ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
const flag = name => process.argv.includes(name) ? process.argv[process.argv.indexOf(name) + 1] : undefined
const outfile = resolve(flag('--outfile') ?? join(root, 'dist', 'tui.mjs'))
+// The repo's own esbuild (npm install at the root), or the one in RUFLO_ESBUILD_DIR (a directory with node_modules/esbuild: CI installs it alone, since a root install is heavy).
let esbuild
-try {
- esbuild = createRequire(join(root, '..', '..', 'package.json'))('esbuild')
-} catch {
- console.error('build-tui: esbuild is not installed (run npm install at the repo root).')
+for (const base of [join(root, '..', '..', 'package.json'), ...(process.env.RUFLO_ESBUILD_DIR ? [join(process.env.RUFLO_ESBUILD_DIR, 'package.json')] : [])]) {
+ try {
+ esbuild = createRequire(base)('esbuild')
+ break
+ } catch {
+ // try the next place
+ }
+}
+if (esbuild === undefined) {
+ console.error('build-tui: esbuild is not installed (run npm install at the repo root, or set RUFLO_ESBUILD_DIR to a directory that has node_modules/esbuild).')
process.exit(1)
}