feat: standalone binary support with Bun

- Add build:binary script for Bun compilation
- Add paths.ts for cross-platform asset resolution (npm/bun/tsx)
- Add GitHub Actions workflow for automated binary releases
- Update README with installation options

Based on #89 by @steipete
This commit is contained in:
Mario Zechner 2025-12-02 12:18:42 +01:00
parent 4a60bffe3b
commit c4a65ad8b9
17 changed files with 626 additions and 65 deletions

View file

@ -2,14 +2,12 @@ import type { AgentState } from "@mariozechner/pi-agent-core";
import type { AssistantMessage, Message, ToolResultMessage, UserMessage } from "@mariozechner/pi-ai";
import { existsSync, readFileSync, writeFileSync } from "fs";
import { homedir } from "os";
import { basename, dirname, join } from "path";
import { fileURLToPath } from "url";
import { basename } from "path";
import { getPackageJsonPath } from "./paths.js";
import type { SessionManager } from "./session-manager.js";
// Get version from package.json
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
const packageJson = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8"));
const VERSION = packageJson.version;
/**