@inceptionstack/roundhouse 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/setup.ts +40 -6
package/package.json
CHANGED
package/src/cli/setup.ts
CHANGED
|
@@ -319,8 +319,7 @@ async function stepInstallPackages(opts: SetupOptions): Promise<void> {
|
|
|
319
319
|
// Roundhouse
|
|
320
320
|
const rhInstalled = whichSync("roundhouse");
|
|
321
321
|
if (rhInstalled && !opts.force) {
|
|
322
|
-
|
|
323
|
-
ok(`@inceptionstack/roundhouse (${ver}, already installed)`);
|
|
322
|
+
ok(`@inceptionstack/roundhouse (already installed)`);
|
|
324
323
|
} else {
|
|
325
324
|
log(" Installing @inceptionstack/roundhouse...");
|
|
326
325
|
execOrFail("npm", ["install", "-g", "@inceptionstack/roundhouse"], "roundhouse install");
|
|
@@ -330,14 +329,37 @@ async function stepInstallPackages(opts: SetupOptions): Promise<void> {
|
|
|
330
329
|
// Pi agent
|
|
331
330
|
const piInstalled = whichSync("pi");
|
|
332
331
|
if (piInstalled && !opts.force) {
|
|
333
|
-
|
|
334
|
-
ok(`@mariozechner/pi-coding-agent (${ver}, already installed)`);
|
|
332
|
+
ok(`@mariozechner/pi-coding-agent (already installed)`);
|
|
335
333
|
} else {
|
|
336
334
|
log(" Installing @mariozechner/pi-coding-agent...");
|
|
337
335
|
execOrFail("npm", ["install", "-g", "@mariozechner/pi-coding-agent"], "pi install");
|
|
338
336
|
ok("@mariozechner/pi-coding-agent");
|
|
339
337
|
}
|
|
340
338
|
|
|
339
|
+
// psst-cli (requires bun runtime)
|
|
340
|
+
if (opts.psst) {
|
|
341
|
+
// Install bun if not present (psst-cli shebang is #!/usr/bin/env bun)
|
|
342
|
+
if (!whichSync("bun")) {
|
|
343
|
+
log(" Installing bun runtime (required by psst)...");
|
|
344
|
+
try {
|
|
345
|
+
execFileSync("bash", ["-c", "curl -fsSL https://bun.sh/install | bash"], {
|
|
346
|
+
encoding: "utf8", stdio: "pipe", timeout: 120_000,
|
|
347
|
+
env: { ...process.env, HOME: homedir() },
|
|
348
|
+
});
|
|
349
|
+
// bun installs to ~/.bun/bin/bun
|
|
350
|
+
const bunPath = resolve(homedir(), ".bun", "bin");
|
|
351
|
+
process.env.PATH = `${bunPath}:${process.env.PATH}`;
|
|
352
|
+
ok("bun runtime");
|
|
353
|
+
} catch (err: any) {
|
|
354
|
+
warn(`bun install failed: ${err.message}`);
|
|
355
|
+
warn("psst requires bun — install manually: curl -fsSL https://bun.sh/install | bash");
|
|
356
|
+
opts.psst = false;
|
|
357
|
+
}
|
|
358
|
+
} else {
|
|
359
|
+
ok("bun runtime (already installed)");
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
341
363
|
// psst-cli
|
|
342
364
|
if (opts.psst) {
|
|
343
365
|
const psstInstalled = whichSync("psst");
|
|
@@ -345,8 +367,19 @@ async function stepInstallPackages(opts: SetupOptions): Promise<void> {
|
|
|
345
367
|
ok(`psst-cli (already installed)`);
|
|
346
368
|
} else {
|
|
347
369
|
log(" Installing psst-cli...");
|
|
348
|
-
|
|
349
|
-
|
|
370
|
+
try {
|
|
371
|
+
execFileSync("npm", ["install", "-g", "psst-cli"], {
|
|
372
|
+
encoding: "utf8", stdio: "pipe", timeout: 120_000,
|
|
373
|
+
});
|
|
374
|
+
} catch {
|
|
375
|
+
// npm may exit non-zero due to postinstall warnings — check if binary exists
|
|
376
|
+
}
|
|
377
|
+
if (whichSync("psst")) {
|
|
378
|
+
ok("psst-cli");
|
|
379
|
+
} else {
|
|
380
|
+
warn("psst-cli install failed");
|
|
381
|
+
opts.psst = false;
|
|
382
|
+
}
|
|
350
383
|
}
|
|
351
384
|
|
|
352
385
|
// Initialize psst vault
|
|
@@ -880,6 +913,7 @@ function printDryRun(opts: SetupOptions): void {
|
|
|
880
913
|
log(`Would install: npm install -g @inceptionstack/roundhouse`);
|
|
881
914
|
log(`Would install: npm install -g @mariozechner/pi-coding-agent`);
|
|
882
915
|
if (opts.psst) {
|
|
916
|
+
log(`Would install: bun runtime (if not present)`);
|
|
883
917
|
log(`Would install: npm install -g psst-cli`);
|
|
884
918
|
log(`Would initialize psst vault`);
|
|
885
919
|
log(`Would install: pi-psst extension`);
|