feat(resolvers): add MAKE_PDF_SETUP + makePdfDir host paths

Skill templates can now embed {{MAKE_PDF_SETUP}} to resolve $P to the
make-pdf binary via the same discovery order as $B / $D: env override
(MAKE_PDF_BIN), local skill root, global install, or PATH.

Mirrors the pattern established by generateBrowseSetup() and
generateDesignSetup() in scripts/resolvers/design.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-20 05:33:30 +08:00
parent 7d89dcb77a
commit 0708273e5a
3 changed files with 55 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ export interface HostPaths {
binDir: string;
browseDir: string;
designDir: string;
makePdfDir: string;
}
/**
@@ -30,6 +31,7 @@ function buildHostPaths(): Record<string, HostPaths> {
binDir: '$GSTACK_BIN',
browseDir: '$GSTACK_BROWSE',
designDir: '$GSTACK_DESIGN',
makePdfDir: '$GSTACK_MAKE_PDF',
};
} else {
const root = `~/${config.globalRoot}`;
@@ -39,6 +41,7 @@ function buildHostPaths(): Record<string, HostPaths> {
binDir: `${root}/bin`,
browseDir: `${root}/browse/dist`,
designDir: `${root}/design/dist`,
makePdfDir: `${root}/make-pdf/dist`,
};
}
}