@musnows/scriverse 0.5.9 → 0.5.10

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/app.js CHANGED
@@ -1553,7 +1553,7 @@ export function createRuntime(options) {
1553
1553
  } : undefined), requestPermissions(request)));
1554
1554
  });
1555
1555
  app.post("/api/tasks/:taskId/rerun", (request, response) => {
1556
- parse(z.object({}).strict(), request.body ?? {});
1556
+ const input = parse(z.object({ modelId: identifier.optional() }).strict(), request.body ?? {});
1557
1557
  const task = store.getTask(request.params.taskId);
1558
1558
  const permissions = requestPermissions(request, String(task.workId));
1559
1559
  const deniedModules = analysisTaskReadModules(task.taskType, task.scope).filter((module) => permissions[module] === "none");
@@ -1562,7 +1562,7 @@ export function createRuntime(options) {
1562
1562
  modules: deniedModules
1563
1563
  });
1564
1564
  }
1565
- data(response, redactTaskCharacterNames(ai.rerunTask(request.params.taskId), requestPermissions(request)), 201);
1565
+ data(response, redactTaskCharacterNames(ai.rerunTask(request.params.taskId, input.modelId), requestPermissions(request)), 201);
1566
1566
  });
1567
1567
  app.post("/api/tasks/:taskId/cancel", (request, response) => data(response, redactTaskCharacterNames(ai.cancelTask(request.params.taskId), requestPermissions(request))));
1568
1568
  app.post("/api/tasks/:taskId/relationship-changes/apply", (request, response) => {