@teamvibe/poller 0.1.61 → 0.1.62

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/poller.js +6 -2
  2. package/package.json +1 -1
package/dist/poller.js CHANGED
@@ -43,6 +43,7 @@ async function runInboxLoop(threadId, kbPath, queueMessage, sessionLog) {
43
43
  const typing = hasSlackContext
44
44
  ? startTypingIndicator(queueMessage)
45
45
  : undefined;
46
+ let succeeded = false;
46
47
  try {
47
48
  // Reconstruct queue message from stored inbox data
48
49
  const storedData = JSON.parse(message.content);
@@ -61,6 +62,7 @@ async function runInboxLoop(threadId, kbPath, queueMessage, sessionLog) {
61
62
  `duration: ${result.metrics.duration_ms}ms`);
62
63
  }
63
64
  if (result.success) {
65
+ succeeded = true;
64
66
  sessionLog.info(`[Loop] Claude completed iteration #${iteration}`);
65
67
  if (queueMessage.teamvibe.brain?.brainId) {
66
68
  await pushBrainChanges(kbPath, queueMessage.teamvibe.brain.brainId, queueMessage.teamvibe.workspaceId);
@@ -81,8 +83,10 @@ async function runInboxLoop(threadId, kbPath, queueMessage, sessionLog) {
81
83
  typing?.stop();
82
84
  sessionLog.error(`[Loop] Error in iteration #${iteration}: ${error instanceof Error ? error.message : error}`);
83
85
  }
84
- // Safety net: ensure the processing file is cleaned up
85
- markProcessed(kbPath, threadId, message.filename);
86
+ // Only delete processing file on success — failed/killed sessions get retried
87
+ if (succeeded) {
88
+ markProcessed(kbPath, threadId, message.filename);
89
+ }
86
90
  if (!hasUnprocessed(kbPath, threadId)) {
87
91
  break;
88
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamvibe/poller",
3
- "version": "0.1.61",
3
+ "version": "0.1.62",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {