executant 1.4.1 → 1.4.2
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.
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -308,9 +308,10 @@ import { zodToJsonSchema } from "zod-to-json-schema";
|
|
|
308
308
|
|
|
309
309
|
// src/lib/utils.ts
|
|
310
310
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
311
|
-
import { dirname, join } from "node:path";
|
|
311
|
+
import { basename, dirname, join } from "node:path";
|
|
312
312
|
import { fileURLToPath } from "node:url";
|
|
313
|
-
var
|
|
313
|
+
var __dir = dirname(fileURLToPath(import.meta.url));
|
|
314
|
+
var PROMPTS_DIR = basename(__dir) === "lib" ? join(__dir, "..", "prompts") : join(__dir, "prompts");
|
|
314
315
|
function stripPromptHeader(raw) {
|
|
315
316
|
return raw.replace(/^(#[^\n]*\n)+\n?/, "").trim();
|
|
316
317
|
}
|
|
@@ -1970,7 +1971,7 @@ async function* withLogger(gen, logger2) {
|
|
|
1970
1971
|
|
|
1971
1972
|
// src/retrospective.ts
|
|
1972
1973
|
import { existsSync as existsSync3, mkdirSync as mkdirSync4, readdirSync as readdirSync2, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "node:fs";
|
|
1973
|
-
import { basename, dirname as dirname4, join as join4, resolve as resolve3 } from "node:path";
|
|
1974
|
+
import { basename as basename2, dirname as dirname4, join as join4, resolve as resolve3 } from "node:path";
|
|
1974
1975
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
1975
1976
|
import { spawnSync } from "node:child_process";
|
|
1976
1977
|
import { load as parseYaml2 } from "js-yaml";
|
|
@@ -2030,7 +2031,7 @@ ${metrics}
|
|
|
2030
2031
|
${content}`;
|
|
2031
2032
|
}).join("\n\n---\n\n");
|
|
2032
2033
|
const originalYaml = readFileSync5(workflowFilePath, "utf8");
|
|
2033
|
-
const taskName =
|
|
2034
|
+
const taskName = basename2(workflowFilePath, ".yaml");
|
|
2034
2035
|
const prompt = RETROSPECTIVE_PROMPT.replaceAll("{{TASK_NAME}}", taskName).replaceAll("{{ORIGINAL_GOAL}}", workflow2.goal).replaceAll("{{ORIGINAL_YAML}}", originalYaml).replaceAll("{{HIGHLIGHTS}}", highlightContents).replaceAll("{{METRICS}}", metrics);
|
|
2035
2036
|
const result = spawnSync(
|
|
2036
2037
|
"claude",
|