@teamvibe/poller 0.1.20 → 0.1.22
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.
- package/dist/brain-manager.d.ts +3 -2
- package/dist/brain-manager.js +12 -17
- package/dist/poller.js +2 -2
- package/package.json +1 -1
package/dist/brain-manager.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Configure git auth using `gh auth setup-git`.
|
|
3
|
+
* Finds gh binary in PATH or common locations (/data/bin).
|
|
3
4
|
*/
|
|
4
|
-
export declare function
|
|
5
|
+
export declare function configureGitAuth(): Promise<void>;
|
|
5
6
|
interface BrainConfig {
|
|
6
7
|
brainId: string;
|
|
7
8
|
gitRepoUrl: string;
|
package/dist/brain-manager.js
CHANGED
|
@@ -13,27 +13,22 @@ function gitExec(command, options) {
|
|
|
13
13
|
return execAsync(command, { ...options, env: gitEnv });
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Configure git auth using `gh auth setup-git`.
|
|
17
|
+
* Finds gh binary in PATH or common locations (/data/bin).
|
|
17
18
|
*/
|
|
18
|
-
export async function
|
|
19
|
-
const
|
|
19
|
+
export async function configureGitAuth() {
|
|
20
|
+
const ghPaths = ['gh', '/data/bin/gh'];
|
|
21
|
+
for (const gh of ghPaths) {
|
|
20
22
|
try {
|
|
21
|
-
|
|
22
|
-
logger.info(`
|
|
23
|
+
await execAsync(`${gh} auth setup-git`);
|
|
24
|
+
logger.info(`Git authentication configured via ${gh}`);
|
|
25
|
+
return;
|
|
23
26
|
}
|
|
24
|
-
catch
|
|
25
|
-
|
|
27
|
+
catch {
|
|
28
|
+
// try next path
|
|
26
29
|
}
|
|
27
|
-
}
|
|
28
|
-
logger.
|
|
29
|
-
logger.info(`[git-diag] GIT_TERMINAL_PROMPT=${process.env['GIT_TERMINAL_PROMPT'] ?? '(unset)'}`);
|
|
30
|
-
logger.info(`[git-diag] GITHUB_TOKEN=${process.env['GITHUB_TOKEN'] ? '***set***' : '(unset)'}`);
|
|
31
|
-
logger.info(`[git-diag] HOME=${process.env['HOME'] ?? '(unset)'}`);
|
|
32
|
-
await diag('git version', 'git --version');
|
|
33
|
-
await diag('gh version', 'gh --version | head -1');
|
|
34
|
-
await diag('credential.helper', 'git config --global credential.helper || echo "(not set)"');
|
|
35
|
-
await diag('credential.github', 'git config --global --get-regexp "credential.*github" || echo "(not set)"');
|
|
36
|
-
await diag('gh auth status', 'gh auth status 2>&1 || true');
|
|
30
|
+
}
|
|
31
|
+
logger.warn('Could not configure git auth: gh not found in PATH or /data/bin');
|
|
37
32
|
}
|
|
38
33
|
// Cooldown tracker per brain
|
|
39
34
|
const lastUpdateTimes = new Map();
|
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,
|
|
7
|
+
import { getBrainPath, ensureDirectories, ensureBaseBrain, pushBrainChanges, configureGitAuth } 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,7 @@ 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
|
|
257
|
+
await configureGitAuth();
|
|
258
258
|
await ensureDirectories();
|
|
259
259
|
await ensureBaseBrain();
|
|
260
260
|
await pollLoop();
|