()
| 20 | * github-pr-media) while skill-off trials do not. They also expose a path inside the checkout. |
| 21 | */ |
| 22 | export function builtinSkillNames(): string[] { |
| 23 | try { |
| 24 | const manifest = createRequire(import.meta.url) |
| 25 | .resolve(`@github/copilot-sdk-${process.platform}-${process.arch}/package.json`); |
| 26 | return readdirSync(join(dirname(manifest), "builtin"), { withFileTypes: true }) |
| 27 | .filter(entry => entry.isDirectory()).map(entry => entry.name).sort(); |
| 28 | } catch (error) { |
| 29 | if (error instanceof Error && "code" in error |
| 30 | && (error.code === "MODULE_NOT_FOUND" || error.code === "ENOENT")) return []; |
| 31 | throw error; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export function inside(path: string, root: string): boolean { |
| 36 | const rel = relative(root, path); |
no test coverage detected