lalph 0.3.18 → 0.3.19
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/cli.mjs +7 -3
- package/package.json +1 -1
- package/src/commands/root.ts +16 -2
package/dist/cli.mjs
CHANGED
|
@@ -152486,6 +152486,10 @@ const run = fnUntraced(function* (options) {
|
|
|
152486
152486
|
yield* fs.writeFileString(pathService.join(worktree.directory, ".lalph", "feedback.md"), feedback);
|
|
152487
152487
|
}
|
|
152488
152488
|
const taskPreset = getOrElse$1(yield* source.issueCliAgentPreset(chosenTask.prd), () => preset);
|
|
152489
|
+
const catchStallInReview = (effect) => catchIf(effect, (u) => u instanceof RunnerStalled, fnUntraced(function* (e) {
|
|
152490
|
+
if ((yield* prd.findById(taskId))?.state === "in-review") return;
|
|
152491
|
+
return yield* e;
|
|
152492
|
+
}));
|
|
152489
152493
|
if (yield* gen(function* () {
|
|
152490
152494
|
registry.update(currentWorker.state, (s) => s.transitionTo(WorkerStatus.Working({ issueId: taskId })));
|
|
152491
152495
|
const instructions = (yield* PromptGen).prompt({
|
|
@@ -152499,7 +152503,7 @@ const run = fnUntraced(function* (options) {
|
|
|
152499
152503
|
stallTimeout: options.stallTimeout,
|
|
152500
152504
|
preset: taskPreset,
|
|
152501
152505
|
prompt: instructions
|
|
152502
|
-
}).pipe(withSpan("Main.agentWorker"));
|
|
152506
|
+
}).pipe(catchStallInReview, withSpan("Main.agentWorker"));
|
|
152503
152507
|
yield* log$1(`Agent exited with code: ${exitCode}`);
|
|
152504
152508
|
if (options.review) {
|
|
152505
152509
|
registry.update(currentWorker.state, (s) => s.transitionTo(WorkerStatus.Reviewing({ issueId: taskId })));
|
|
@@ -152508,7 +152512,7 @@ const run = fnUntraced(function* (options) {
|
|
|
152508
152512
|
stallTimeout: options.stallTimeout,
|
|
152509
152513
|
preset: taskPreset,
|
|
152510
152514
|
instructions
|
|
152511
|
-
}).pipe(withSpan("Main.agentReviewer"));
|
|
152515
|
+
}).pipe(catchStallInReview, withSpan("Main.agentReviewer"));
|
|
152512
152516
|
}
|
|
152513
152517
|
}).pipe(timeout(options.runTimeout), tapErrorTag("TimeoutError", () => agentTimeout({
|
|
152514
152518
|
specsDirectory: options.specsDirectory,
|
|
@@ -152868,7 +152872,7 @@ const commandSource = make$36("source").pipe(withDescription("Select the issue s
|
|
|
152868
152872
|
|
|
152869
152873
|
//#endregion
|
|
152870
152874
|
//#region package.json
|
|
152871
|
-
var version = "0.3.
|
|
152875
|
+
var version = "0.3.19";
|
|
152872
152876
|
|
|
152873
152877
|
//#endregion
|
|
152874
152878
|
//#region src/commands/projects/ls.ts
|
package/package.json
CHANGED
package/src/commands/root.ts
CHANGED
|
@@ -142,6 +142,20 @@ const run = Effect.fnUntraced(
|
|
|
142
142
|
() => preset,
|
|
143
143
|
)
|
|
144
144
|
|
|
145
|
+
const catchStallInReview = <A, E, R>(
|
|
146
|
+
effect: Effect.Effect<A, E | RunnerStalled, R>,
|
|
147
|
+
) =>
|
|
148
|
+
Effect.catchIf(
|
|
149
|
+
effect,
|
|
150
|
+
(u): u is RunnerStalled => u instanceof RunnerStalled,
|
|
151
|
+
Effect.fnUntraced(function* (e) {
|
|
152
|
+
const task = yield* prd.findById(taskId!)
|
|
153
|
+
const inReview = task?.state === "in-review"
|
|
154
|
+
if (inReview) return
|
|
155
|
+
return yield* e
|
|
156
|
+
}),
|
|
157
|
+
)
|
|
158
|
+
|
|
145
159
|
const cancelled = yield* Effect.gen(function* () {
|
|
146
160
|
//
|
|
147
161
|
// 2. Work on task
|
|
@@ -164,7 +178,7 @@ const run = Effect.fnUntraced(
|
|
|
164
178
|
stallTimeout: options.stallTimeout,
|
|
165
179
|
preset: taskPreset,
|
|
166
180
|
prompt: instructions,
|
|
167
|
-
}).pipe(Effect.withSpan("Main.agentWorker"))
|
|
181
|
+
}).pipe(catchStallInReview, Effect.withSpan("Main.agentWorker"))
|
|
168
182
|
yield* Effect.log(`Agent exited with code: ${exitCode}`)
|
|
169
183
|
|
|
170
184
|
// 3. Review task
|
|
@@ -180,7 +194,7 @@ const run = Effect.fnUntraced(
|
|
|
180
194
|
stallTimeout: options.stallTimeout,
|
|
181
195
|
preset: taskPreset,
|
|
182
196
|
instructions,
|
|
183
|
-
}).pipe(Effect.withSpan("Main.agentReviewer"))
|
|
197
|
+
}).pipe(catchStallInReview, Effect.withSpan("Main.agentReviewer"))
|
|
184
198
|
}
|
|
185
199
|
}).pipe(
|
|
186
200
|
Effect.timeout(options.runTimeout),
|