@teamvibe/poller 0.1.26 → 0.1.27

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.
@@ -145,19 +145,12 @@ export async function pushBrainChanges(brainDir, brainId, workspaceId) {
145
145
  logger.debug(`Brain ${brainId} has no git remote, skipping push`);
146
146
  return;
147
147
  }
148
- // Stage all changes
149
- await gitExec('git add -A', { cwd: brainDir });
150
- // Check if there are staged changes
151
- try {
152
- await gitExec('git diff --cached --quiet', { cwd: brainDir });
153
- // If the command succeeds (exit 0), there are no changes
154
- logger.debug(`Brain ${brainId} has no changes to push`);
148
+ // Check if there are unpushed commits (Claude commits its own changes during the session)
149
+ const { stdout: unpushed } = await gitExec('git log @{u}..HEAD --oneline 2>/dev/null || echo ""', { cwd: brainDir });
150
+ if (!unpushed.trim()) {
151
+ logger.debug(`Brain ${brainId} has no unpushed commits`);
155
152
  return;
156
153
  }
157
- catch {
158
- // Exit code 1 means there are changes — continue
159
- }
160
- await gitExec('git commit -m "auto: session update"', { cwd: brainDir });
161
154
  await gitExec('git push', { cwd: brainDir });
162
155
  logger.info(`Brain ${brainId} changes pushed successfully`);
163
156
  if (workspaceId)
package/dist/poller.js CHANGED
@@ -129,6 +129,8 @@ async function processMessage(received) {
129
129
  ? startTypingIndicator(queueMessage)
130
130
  : undefined;
131
131
  try {
132
+ // Refresh base brain if cooldown has elapsed (5 min default)
133
+ await ensureBaseBrain();
132
134
  const result = await spawnClaudeCode(queueMessage, sessionLog, kbPath, session.session_id || undefined, isFirstMessage, session.last_message_ts, () => stopTyping?.());
133
135
  stopTyping?.();
134
136
  // If Claude generated a new session ID (stale lock recovery), persist it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamvibe/poller",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {