Update runtime checks and installer behavior

This commit is contained in:
Advait Paliwal
2026-03-25 13:55:32 -07:00
parent 572de7ba85
commit f6dbacc9d5
24 changed files with 431 additions and 21 deletions

View File

@@ -2,8 +2,11 @@ import { spawn } from "node:child_process";
import { existsSync } from "node:fs";
import { buildPiArgs, buildPiEnv, type PiRuntimeOptions, resolvePiPaths } from "./runtime.js";
import { ensureSupportedNodeVersion } from "../system/node-version.js";
export async function launchPiChat(options: PiRuntimeOptions): Promise<void> {
ensureSupportedNodeVersion();
const { piCliPath, promisePolyfillPath } = resolvePiPaths(options.appRoot);
if (!existsSync(piCliPath)) {
throw new Error(`Pi CLI not found: ${piCliPath}`);

View File

@@ -1,6 +1,7 @@
import type { PackageSource } from "@mariozechner/pi-coding-agent";
export const CORE_PACKAGE_SOURCES = [
"npm:@companion-ai/alpha-hub",
"npm:pi-subagents",
"npm:pi-btw",
"npm:pi-docparser",

View File

@@ -79,7 +79,8 @@ export function buildPiEnv(options: PiRuntimeOptions): NodeJS.ProcessEnv {
const paths = resolvePiPaths(options.appRoot);
const currentPath = process.env.PATH ?? "";
const binPath = paths.nodeModulesBinPath;
const binEntries = [paths.nodeModulesBinPath, resolve(paths.piWorkspaceNodeModulesPath, ".bin")];
const binPath = binEntries.join(":");
return {
...process.env,