@tarcisiopgs/lisa 1.20.2 → 1.21.0

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.
@@ -777,6 +777,9 @@ function useKanbanState(bellEnabled, initialCards = []) {
777
777
  (prev) => prev.map((c) => c.id === issueId ? { ...c, outputLog: c.outputLog + text } : c)
778
778
  );
779
779
  };
780
+ const onReconcileRemove = (issueId) => {
781
+ setCards((prev) => prev.filter((c) => c.id !== issueId));
782
+ };
780
783
  kanbanEmitter.on("issue:queued", onQueued);
781
784
  kanbanEmitter.on("issue:started", onStarted);
782
785
  kanbanEmitter.on("issue:done", onDone);
@@ -784,6 +787,7 @@ function useKanbanState(bellEnabled, initialCards = []) {
784
787
  kanbanEmitter.on("issue:reverted", onReverted);
785
788
  kanbanEmitter.on("issue:skipped", onSkipped);
786
789
  kanbanEmitter.on("issue:killed", onKilled);
790
+ kanbanEmitter.on("issue:reconcile-remove", onReconcileRemove);
787
791
  kanbanEmitter.on("provider:paused", onProviderPaused);
788
792
  kanbanEmitter.on("provider:resumed", onProviderResumed);
789
793
  kanbanEmitter.on("issue:log-file", onLogFile);
@@ -814,6 +818,7 @@ function useKanbanState(bellEnabled, initialCards = []) {
814
818
  kanbanEmitter.off("issue:reverted", onReverted);
815
819
  kanbanEmitter.off("issue:skipped", onSkipped);
816
820
  kanbanEmitter.off("issue:killed", onKilled);
821
+ kanbanEmitter.off("issue:reconcile-remove", onReconcileRemove);
817
822
  kanbanEmitter.off("provider:paused", onProviderPaused);
818
823
  kanbanEmitter.off("provider:resumed", onProviderResumed);
819
824
  kanbanEmitter.off("issue:log-file", onLogFile);
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  setOutputMode,
48
48
  updateNotice,
49
49
  warn
50
- } from "./chunk-HDOVPYNL.js";
50
+ } from "./chunk-XE35VI6S.js";
51
51
  import {
52
52
  notify,
53
53
  resetTitle,
@@ -406,7 +406,7 @@ import { promisify } from "util";
406
406
  var execFileAsync = promisify(execFile);
407
407
  var STUCK_MESSAGE = "\n[lisa-overseer] Provider killed: no git changes detected within the stuck threshold. Eligible for fallback.\n";
408
408
  var STALL_MESSAGE = "\n[lisa-stall] Provider killed: no output received within the stall timeout. Eligible for fallback.\n";
409
- var DEFAULT_OUTPUT_STALL_TIMEOUT = 120;
409
+ var DEFAULT_OUTPUT_STALL_TIMEOUT = 300;
410
410
  function createOutputStallDetector(proc, timeoutSeconds) {
411
411
  const timeout = timeoutSeconds ?? DEFAULT_OUTPUT_STALL_TIMEOUT;
412
412
  if (timeout <= 0) {
@@ -7045,6 +7045,17 @@ async function runLoop(config2, opts) {
7045
7045
  if (kanbanEmitter.listenerCount("issue:queued") > 0) {
7046
7046
  try {
7047
7047
  const allIssues = await source.listIssues(config2.source_config);
7048
+ const activeIssueIds = new Set(allIssues.map((i) => i.id));
7049
+ if (opts.initialCards) {
7050
+ for (const card of opts.initialCards) {
7051
+ if (card.column === "backlog" && (card.hasError || card.skipped || card.killed)) {
7052
+ if (!activeIssueIds.has(card.id)) {
7053
+ kanbanEmitter.emit("issue:reconcile-remove", card.id);
7054
+ log(`Reconciled ${card.id}: no longer in source queue \u2014 removed from kanban`);
7055
+ }
7056
+ }
7057
+ }
7058
+ }
7048
7059
  for (const issue2 of allIssues) {
7049
7060
  kanbanEmitter.emit("issue:queued", issue2);
7050
7061
  }
@@ -7180,6 +7191,10 @@ var KanbanPersistence = class {
7180
7191
  this.updateCard(issueId, { column: "backlog", startedAt: void 0, killed: true });
7181
7192
  this.scheduleFlush();
7182
7193
  });
7194
+ on("issue:reconcile-remove", (issueId) => {
7195
+ this.removeCard(issueId);
7196
+ this.scheduleFlush();
7197
+ });
7183
7198
  on("issue:log-file", (issueId, logFile) => {
7184
7199
  this.updateCard(issueId, { logFile });
7185
7200
  this.scheduleFlush();
@@ -7213,6 +7228,9 @@ var KanbanPersistence = class {
7213
7228
  if (!existsSync9(dir)) mkdirSync4(dir, { recursive: true });
7214
7229
  writeFileSync12(this.statePath, JSON.stringify(this.state));
7215
7230
  }
7231
+ removeCard(id) {
7232
+ this.state.cards = this.state.cards.filter((c) => c.id !== id);
7233
+ }
7216
7234
  upsertCard(id, title) {
7217
7235
  if (!this.state.cards.some((c) => c.id === id)) {
7218
7236
  this.state.cards.push({ id, title, column: "backlog", prUrls: [], outputLogTail: [] });
@@ -7297,7 +7315,7 @@ var run = defineCommand6({
7297
7315
  if (isTTY) {
7298
7316
  const { render } = await import("ink");
7299
7317
  const { createElement } = await import("react");
7300
- const { KanbanApp } = await import("./kanban-TOKVY5AS.js");
7318
+ const { KanbanApp } = await import("./kanban-VOOYRIWF.js");
7301
7319
  const demoConfig = {
7302
7320
  provider: "claude",
7303
7321
  source: "linear",
@@ -7370,15 +7388,17 @@ Add them to your ${shell} and run: source ${shell}`));
7370
7388
  merged.workflow = "worktree";
7371
7389
  }
7372
7390
  let onBeforeExit;
7391
+ let persistedCards;
7373
7392
  if (isTTY) {
7374
7393
  const workspace = resolve15(merged.workspace);
7375
7394
  const persistence = createKanbanPersistence(workspace);
7376
7395
  const initialCards = persistence.load();
7396
+ persistedCards = initialCards;
7377
7397
  persistence.start();
7378
7398
  onBeforeExit = () => persistence.stop();
7379
7399
  const { render } = await import("ink");
7380
7400
  const { createElement } = await import("react");
7381
- const { KanbanApp } = await import("./kanban-TOKVY5AS.js");
7401
+ const { KanbanApp } = await import("./kanban-VOOYRIWF.js");
7382
7402
  render(createElement(KanbanApp, { config: merged, initialCards }), { exitOnCtrlC: false });
7383
7403
  }
7384
7404
  await runLoop(merged, {
@@ -7388,7 +7408,8 @@ Add them to your ${shell} and run: source ${shell}`));
7388
7408
  dryRun: args["dry-run"],
7389
7409
  issueId: args.issue,
7390
7410
  concurrency,
7391
- onBeforeExit
7411
+ onBeforeExit,
7412
+ initialCards: persistedCards
7392
7413
  });
7393
7414
  }
7394
7415
  });
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  kanbanEmitter,
4
4
  useKanbanState
5
- } from "./chunk-HDOVPYNL.js";
5
+ } from "./chunk-XE35VI6S.js";
6
6
  import {
7
7
  resetTitle,
8
8
  startSpinner,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarcisiopgs/lisa",
3
- "version": "1.20.2",
3
+ "version": "1.21.0",
4
4
  "description": "Autonomous issue resolver",
5
5
  "keywords": [
6
6
  "loop",