mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(cli): add Bun single executable binary support
Enables building hapi as standalone Bun-compiled executables for macOS, Linux, and Windows (x64/arm64). Adds build script, bootstrap entry point, runtime asset management, and automatic deployment of bundled tools (ripgrep, difftastic). Includes MCP stdio bridge support and proper environment handling for compiled binaries. Updates documentation with build and installation instructions for single executable distribution.
This commit is contained in:
@@ -16,6 +16,7 @@ import os from 'node:os';
|
||||
import { MessageQueue2 } from '@/utils/MessageQueue2';
|
||||
import { hashObject } from '@/utils/deterministicJson';
|
||||
import { runtimePath } from '@/projectPath';
|
||||
import { getHappyCliCommand } from '@/utils/spawnHappyCLI';
|
||||
import { resolve, join } from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import { startHappyServer } from '@/claude/utils/startHappyServer';
|
||||
@@ -521,11 +522,11 @@ export async function runCodex(opts: {
|
||||
|
||||
// Start Happy MCP server (HTTP) and prepare STDIO bridge config for Codex
|
||||
const happyServer = await startHappyServer(session);
|
||||
const bridgeCommand = join(runtimePath(), 'bin', 'happy-mcp.mjs');
|
||||
const bridgeCommand = getHappyCliCommand(['mcp', '--url', happyServer.url]);
|
||||
const mcpServers = {
|
||||
happy: {
|
||||
command: bridgeCommand,
|
||||
args: ['--url', happyServer.url]
|
||||
command: bridgeCommand.command,
|
||||
args: bridgeCommand.args
|
||||
}
|
||||
} as const;
|
||||
let first = true;
|
||||
|
||||
Reference in New Issue
Block a user