@teamvibe/poller 0.1.23 → 0.1.25

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.
@@ -1,8 +1,3 @@
1
- /**
2
- * Configure git auth using `gh auth setup-git`.
3
- * Uses gitEnv which includes /data/bin in PATH.
4
- */
5
- export declare function configureGitAuth(): Promise<void>;
6
1
  interface BrainConfig {
7
2
  brainId: string;
8
3
  gitRepoUrl: string;
@@ -7,28 +7,18 @@ import { logger } from './logger.js';
7
7
  const execAsync = promisify(exec);
8
8
  // Clean env for git commands:
9
9
  // - npm/npx sets GIT_ASKPASS which prevents credential helpers from working
10
- // - /data/bin may not be in PATH but contains tools like gh
10
+ // - PERSISTENT_STORAGE_PATH/bin may contain tools like gh not in default PATH
11
11
  const gitEnv = { ...process.env };
12
12
  delete gitEnv['GIT_ASKPASS'];
13
- if (gitEnv['PATH'] && !gitEnv['PATH'].includes('/data/bin')) {
14
- gitEnv['PATH'] = `/data/bin:${gitEnv['PATH']}`;
13
+ if (config.PERSISTENT_STORAGE_PATH) {
14
+ const binDir = `${config.PERSISTENT_STORAGE_PATH}/bin`;
15
+ if (!gitEnv['PATH']?.includes(binDir)) {
16
+ gitEnv['PATH'] = `${binDir}:${gitEnv['PATH'] || ''}`;
17
+ }
15
18
  }
16
19
  function gitExec(command, options) {
17
20
  return execAsync(command, { ...options, env: gitEnv });
18
21
  }
19
- /**
20
- * Configure git auth using `gh auth setup-git`.
21
- * Uses gitEnv which includes /data/bin in PATH.
22
- */
23
- export async function configureGitAuth() {
24
- try {
25
- await gitExec('gh auth setup-git');
26
- logger.info('Git authentication configured via gh');
27
- }
28
- catch (error) {
29
- logger.warn(`Could not configure git auth: ${error instanceof Error ? error.message : error}`);
30
- }
31
- }
32
22
  // Cooldown tracker per brain
33
23
  const lastUpdateTimes = new Map();
34
24
  /**
package/dist/poller.js CHANGED
@@ -4,7 +4,7 @@ import { pollMessages, deleteMessage, extendVisibility, } from './sqs-poller.js'
4
4
  import { spawnClaudeCode, isAtCapacity, getActiveProcessCount } from './claude-spawner.js';
5
5
  import { sendSlackError, addReaction, getUserInfo, startTypingIndicator } from './slack-client.js';
6
6
  import { acquireSessionLock, releaseSessionLock, updateSessionId } from './session-store.js';
7
- import { getBrainPath, ensureDirectories, ensureBaseBrain, pushBrainChanges, configureGitAuth } from './brain-manager.js';
7
+ import { getBrainPath, ensureDirectories, ensureBaseBrain, pushBrainChanges } from './brain-manager.js';
8
8
  import { initAuth, stopRefresh } from './auth-provider.js';
9
9
  // Track active message processing
10
10
  const processingMessages = new Set();
@@ -254,7 +254,6 @@ export async function startPoller() {
254
254
  logger.info(` Queue: ${config.SQS_QUEUE_URL}`);
255
255
  logger.info(` Sessions table: ${config.SESSIONS_TABLE}`);
256
256
  }
257
- await configureGitAuth();
258
257
  await ensureDirectories();
259
258
  await ensureBaseBrain();
260
259
  await pollLoop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamvibe/poller",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {