@tarcisiopgs/lisa 1.22.2 → 1.22.3

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1547,7 +1547,7 @@ async function runWithFallback(models, prompt, opts) {
1547
1547
  const guardrailsSection = opts.guardrailsDir ? buildGuardrailsSection(opts.guardrailsDir) : "";
1548
1548
  const fullPrompt = guardrailsSection ? `${prompt}${guardrailsSection}` : prompt;
1549
1549
  const result = await provider.run(fullPrompt, { ...opts, model: spec.model });
1550
- if (result.success) {
1550
+ if (result.success || opts.earlySuccess?.()) {
1551
1551
  attempts.push({
1552
1552
  provider: spec.provider,
1553
1553
  model: spec.model,
@@ -5765,7 +5765,11 @@ async function runWorktreeMultiRepoSession(config2, issue2, logFile, session, mo
5765
5765
  onProcess: (pid) => {
5766
5766
  activeProviderPids.set(issue2.id, pid);
5767
5767
  },
5768
- shouldAbort: () => userKilledSet.has(issue2.id) || userSkippedSet.has(issue2.id)
5768
+ shouldAbort: () => userKilledSet.has(issue2.id) || userSkippedSet.has(issue2.id),
5769
+ earlySuccess: () => {
5770
+ const p = readPlanFile(planPath);
5771
+ return !!(p?.steps && p.steps.length > 0);
5772
+ }
5769
5773
  });
5770
5774
  stopSpinner();
5771
5775
  planProviderUsed = planResult.providerUsed;
@@ -5781,20 +5785,13 @@ ${planResult.output}
5781
5785
  );
5782
5786
  } catch {
5783
5787
  }
5784
- if (!planResult.success) {
5785
- error(`Planning phase failed for ${issue2.id}. Check ${logFile}`);
5786
- cleanupPlanFile(planPath);
5787
- activeProviderPids.delete(issue2.id);
5788
- return {
5789
- success: false,
5790
- providerUsed: planResult.providerUsed,
5791
- prUrls: [],
5792
- fallback: planResult
5793
- };
5794
- }
5795
5788
  const plan = readPlanFile(planPath);
5796
5789
  if (!plan?.steps || plan.steps.length === 0) {
5797
- error(`Agent did not produce a valid execution plan for ${issue2.id}. Aborting.`);
5790
+ if (!planResult.success) {
5791
+ error(`Planning phase failed for ${issue2.id}. Check ${logFile}`);
5792
+ } else {
5793
+ error(`Agent did not produce a valid execution plan for ${issue2.id}. Aborting.`);
5794
+ }
5798
5795
  cleanupPlanFile(planPath);
5799
5796
  activeProviderPids.delete(issue2.id);
5800
5797
  return {
@@ -5804,6 +5801,11 @@ ${planResult.output}
5804
5801
  fallback: planResult
5805
5802
  };
5806
5803
  }
5804
+ if (!planResult.success) {
5805
+ warn(
5806
+ `Planning provider exited with error but plan file was written for ${issue2.id}. Proceeding.`
5807
+ );
5808
+ }
5807
5809
  sortedSteps = [...plan.steps].sort((a, b) => a.order - b.order);
5808
5810
  ok(
5809
5811
  `Plan produced ${sortedSteps.length} step(s): ${sortedSteps.map((s) => s.repoPath).join(" \u2192 ")}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarcisiopgs/lisa",
3
- "version": "1.22.2",
3
+ "version": "1.22.3",
4
4
  "description": "Autonomous issue resolver",
5
5
  "keywords": [
6
6
  "loop",