@ryanfw/prompt-orchestration-pipeline 0.13.5 → 0.14.1

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.
@@ -11,7 +11,7 @@
11
11
  />
12
12
  <title>Prompt Pipeline Dashboard</title>
13
13
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
14
- <script type="module" crossorigin src="/assets/index-cjHV9mYW.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-B5HMRkR9.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/style-CoM9SoQF.css">
16
16
  </head>
17
17
  <body>
@@ -18,7 +18,6 @@ import {
18
18
  getJobMetadataPath,
19
19
  getJobPipelinePath,
20
20
  } from "../../config/paths.js";
21
- import { readRawBody } from "../utils/http-utils.js";
22
21
 
23
22
  // Get __dirname equivalent in ES modules
24
23
  const __filename = fileURLToPath(import.meta.url);
@@ -436,21 +435,8 @@ export async function handleJobRestart(req, res, jobId, dataDir, sendJson) {
436
435
  }
437
436
 
438
437
  // Parse optional fromTask from request body for targeted restart
439
- let body = {};
440
- try {
441
- const rawBody = await readRawBody(req);
442
- if (rawBody && rawBody.length > 0) {
443
- const bodyString = rawBody.toString("utf8");
444
- body = JSON.parse(bodyString);
445
- }
446
- } catch (error) {
447
- sendJson(res, 400, {
448
- ok: false,
449
- error: "bad_request",
450
- message: "Invalid JSON in request body",
451
- });
452
- return;
453
- }
438
+ // Note: Express's json() middleware already parsed the body into req.body
439
+ const body = req.body || {};
454
440
 
455
441
  const { fromTask, singleTask } = body;
456
442
 
@@ -462,7 +448,7 @@ export async function handleJobRestart(req, res, jobId, dataDir, sendJson) {
462
448
  if (fromTask && singleTask === true) {
463
449
  await resetSingleTask(jobDir, fromTask, { clearTokenUsage: true });
464
450
  } else if (fromTask) {
465
- await resetJobFromTask(jobDir, fromTask, { clearTokenUsage: true });
451
+ await resetSingleTask(jobDir, fromTask, { clearTokenUsage: true });
466
452
  } else {
467
453
  await resetJobToCleanSlate(jobDir, { clearTokenUsage: true });
468
454
  }