Update runtime checks and installer behavior
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user