terminal-pilot 0.0.32 → 0.0.33

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.
@@ -2,7 +2,6 @@
2
2
  import os2 from "node:os";
3
3
  import path9 from "node:path";
4
4
  import * as nodeFs from "node:fs/promises";
5
- import { readFile as readFile2 } from "node:fs/promises";
6
5
 
7
6
  // ../toolcraft/src/index.ts
8
7
  import { fileURLToPath as fileURLToPath2 } from "node:url";
@@ -1064,19 +1063,15 @@ async function loadTerminalPilotTemplate() {
1064
1063
  if (terminalPilotTemplateCache !== void 0) {
1065
1064
  return terminalPilotTemplateCache;
1066
1065
  }
1067
- const candidates = [
1068
- new URL("./templates/terminal-pilot.md", import.meta.url),
1069
- new URL("../templates/terminal-pilot.md", import.meta.url),
1070
- new URL("../../../agent-skill-config/src/templates/terminal-pilot.md", import.meta.url)
1071
- ];
1072
- for (const candidate of candidates) {
1073
- try {
1074
- terminalPilotTemplateCache = await readFile2(candidate, "utf8");
1075
- return terminalPilotTemplateCache;
1076
- } catch (error2) {
1077
- if (!isNotFoundError(error2)) {
1078
- throw error2;
1079
- }
1066
+ try {
1067
+ terminalPilotTemplateCache = await nodeFs.readFile(
1068
+ new URL("../templates/terminal-pilot.md", import.meta.url),
1069
+ "utf8"
1070
+ );
1071
+ return terminalPilotTemplateCache;
1072
+ } catch (error2) {
1073
+ if (!isNotFoundError(error2)) {
1074
+ throw error2;
1080
1075
  }
1081
1076
  }
1082
1077
  throw new UserError("terminal-pilot skill template is missing.");