mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-21 04:10:47 +02:00
feat: componentize GStack 2 runtime and release integrity
This commit is contained in:
@@ -145,8 +145,8 @@ export function resolveBrowseBin(env: NodeJS.ProcessEnv = process.env): string {
|
||||
` - global: ${globalPath}`,
|
||||
" - PATH: `browse`",
|
||||
"",
|
||||
"To fix: run gstack setup from the gstack repo:",
|
||||
" cd ~/.claude/skills/gstack && ./setup",
|
||||
"Run `gstack doctor --skill-api 2.0` to inspect readiness.",
|
||||
"If browser is uninstalled, explicitly approve the current skill's runtime bootstrap for `--capability pdf`; PDF also selects browser and diagram.",
|
||||
"",
|
||||
"Or set GSTACK_BROWSE_BIN explicitly:",
|
||||
process.platform === "win32"
|
||||
|
||||
@@ -450,7 +450,7 @@ export function resolveBundlePath(env: NodeJS.ProcessEnv = process.env): string
|
||||
throw new Error(
|
||||
"diagram-render bundle not found. Tried:\n" +
|
||||
candidates.map((c) => ` - ${c}`).join("\n") +
|
||||
"\nRun `bun run build:diagram-render` (repo) or re-run ./setup (install).",
|
||||
"\nRun `bun run build:diagram-render` in a reviewed checkout, or run `gstack doctor --skill-api 2.0` and explicitly approve the current skill's runtime bootstrap for `--capability pdf`.",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ export async function runSetup(): Promise<void> {
|
||||
} catch (err: any) {
|
||||
process.stderr.write(" FAIL\n");
|
||||
process.stderr.write(`\nChromium failed to launch: ${err.message}\n`);
|
||||
process.stderr.write("\nTo fix: run gstack setup from the gstack repo:\n");
|
||||
process.stderr.write(" cd ~/.claude/skills/gstack && ./setup\n");
|
||||
process.stderr.write("\nRun `gstack doctor --skill-api 2.0` to inspect readiness.\n");
|
||||
process.stderr.write("If browser is uninstalled, explicitly approve the current skill's runtime bootstrap for `--capability pdf`; PDF also selects browser and diagram.\n");
|
||||
process.exit(4);
|
||||
} finally {
|
||||
if (chromiumTab !== null) {
|
||||
|
||||
@@ -85,7 +85,8 @@ describe("resolveBrowseBin", () => {
|
||||
if (thrown) {
|
||||
expect(thrown).toBeInstanceOf(BrowseClientError);
|
||||
expect((thrown as BrowseClientError).message).toContain("browse binary not found");
|
||||
expect((thrown as BrowseClientError).message).toContain("./setup");
|
||||
expect((thrown as BrowseClientError).message).toContain("gstack doctor --skill-api 2.0");
|
||||
expect((thrown as BrowseClientError).message).toContain("--capability pdf");
|
||||
expect((thrown as BrowseClientError).message).toContain("GSTACK_BROWSE_BIN");
|
||||
// Back-compat alias still surfaces in the diagnostic.
|
||||
expect((thrown as BrowseClientError).message).toContain("BROWSE_BIN");
|
||||
|
||||
Reference in New Issue
Block a user