pi-gsd 2.0.15 → 2.0.17

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.
@@ -783,7 +783,13 @@ function runLoop(content, filePath, config, projectRoot, pkgRoot, rawArguments,
783
783
  if (inDeadZone(tag.start, extractCodeFenceRegions(current))) continue;
784
784
  const incPath = tag.node.attrs["path"];
785
785
  if (!incPath) continue;
786
- const abs = import_node_path3.default.resolve(projectRoot, incPath);
786
+ const subPath = incPath.replace(/^\.pi\/gsd\//, "");
787
+ const candidates = [
788
+ import_node_path3.default.resolve(projectRoot, incPath),
789
+ import_node_path3.default.resolve(pkgRoot, ".gsd", "harnesses", "pi", "get-shit-done", subPath)
790
+ ];
791
+ const abs = candidates.find((c) => import_node_fs2.default.existsSync(c));
792
+ if (!abs) throw new Error(`Include not found: ${incPath} (tried project + package harness)`);
787
793
  const check = checkTrustedPath(abs, config, projectRoot, pkgRoot);
788
794
  if (!check.ok) throw new Error(`Include rejected: ${check.reason}`);
789
795
  const included = import_node_fs2.default.readFileSync(abs, "utf8");
@@ -924,6 +930,7 @@ function pi_gsd_hooks_default(pi) {
924
930
  }
925
931
  }
926
932
  if (raw === null) {
933
+ errors.push("File not found: " + filePath);
927
934
  return null;
928
935
  }
929
936
  let result = raw;
@@ -980,7 +987,7 @@ function pi_gsd_hooks_default(pi) {
980
987
  pi.on("context", async (event, ctx) => {
981
988
  const includePattern = /<gsd-include\s+path="([^"]+)"(?:\s+select="([^"]*)")?\s*\/>/g;
982
989
  const extFile = typeof __filename !== "undefined" ? __filename : "";
983
- const pkgHarness = extFile ? (0, import_node_path4.join)((0, import_node_path4.dirname)(extFile), "..", "harnesses", "pi", "get-shit-done") : "";
990
+ const pkgHarness = extFile ? (0, import_node_path4.join)((0, import_node_path4.dirname)(extFile), "..", ".gsd", "harnesses", "pi", "get-shit-done") : "";
984
991
  const errors = [];
985
992
  const messages = event.messages;
986
993
  const rawArgsMap = /* @__PURE__ */ new Map();