@evandu/super-pi 0.1.20 → 0.1.21
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.
|
@@ -401,6 +401,7 @@ export class RunService {
|
|
|
401
401
|
conversationId: conversation.id,
|
|
402
402
|
cwd,
|
|
403
403
|
plan: validated.plan,
|
|
404
|
+
signal: this.activeRuns.get(conversation.id)?.signal,
|
|
404
405
|
...(conversation.model ? { model: conversation.model } : {}),
|
|
405
406
|
// The same inheritance a single dispatch applies: a parent's DENY reaches its children, its
|
|
406
407
|
// allowlist does not. Every step gets the primary's denials, exactly as one dispatch would.
|
|
@@ -74,6 +74,8 @@ export class WorkflowEngine {
|
|
|
74
74
|
const controller = new AbortController();
|
|
75
75
|
const onCallerAbort = () => controller.abort();
|
|
76
76
|
input.signal?.addEventListener("abort", onCallerAbort, { once: true });
|
|
77
|
+
if (input.signal?.aborted)
|
|
78
|
+
controller.abort();
|
|
77
79
|
this.controllers.set(id, controller);
|
|
78
80
|
this.owners.set(id, input.conversationId);
|
|
79
81
|
// THE WHOLE PLAN, IN FULL, BEFORE STEP ONE RUNS. See `Store.beginWorkflow`: this is the write that
|
|
@@ -168,6 +170,12 @@ export class WorkflowEngine {
|
|
|
168
170
|
// not acceptable, so handing the second attempt the same inputs would make the policy a no-op that
|
|
169
171
|
// burns the same sub-agent's answer twice and reports it as progress.
|
|
170
172
|
const composed = composeStepPrompt(step.prompt, plan.steps.slice(0, step.index));
|
|
173
|
+
// A retry receives the failed attempt's evidence, rather than repeating a blind prompt.
|
|
174
|
+
const previousAttempt = step.attempts.at(-1);
|
|
175
|
+
if (previousAttempt) {
|
|
176
|
+
const evidence = [previousAttempt.error, previousAttempt.output].filter(Boolean).join("\n").slice(-8000);
|
|
177
|
+
composed.prompt += `\n\n[Previous attempt ${previousAttempt.n} failed]\n${evidence}\nAddress the failure above before completing this step.`;
|
|
178
|
+
}
|
|
171
179
|
await this.commit(plan);
|
|
172
180
|
const run = await this.recorder.dispatch({
|
|
173
181
|
conversationId: input.conversationId,
|