@teamvibe/poller 0.1.32 → 0.1.34
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/claude-spawner.js +9 -0
- package/dist/cli/commands.js +15 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/claude-spawner.js
CHANGED
|
@@ -26,6 +26,8 @@ const TOOL_STATUS_MAP = [
|
|
|
26
26
|
{ pattern: 'Write', status: 'Writing code...' },
|
|
27
27
|
{ pattern: 'Bash', status: 'Running a command...' },
|
|
28
28
|
{ pattern: 'Agent', status: 'Delegating to a sub-agent...' },
|
|
29
|
+
// TeamVibe API tools
|
|
30
|
+
{ pattern: /^mcp__teamvibe-api__/, status: 'Managing schedules...' },
|
|
29
31
|
// Generic MCP fallback
|
|
30
32
|
{ pattern: /^mcp__/, status: 'Using an integration...' },
|
|
31
33
|
];
|
|
@@ -185,9 +187,11 @@ async function runClaudeCode(msg, sessionLog, cwd, sessionId, isFirstMessage = t
|
|
|
185
187
|
const prompt = buildPrompt(msg, resumeHint);
|
|
186
188
|
// MCP server config passed via --mcp-config flag (no temp files needed)
|
|
187
189
|
const mcpServerPath = join(getBaseBrainPath(), 'mcp', 'slack.mjs');
|
|
190
|
+
const teamvibeApiServerPath = join(getBaseBrainPath(), 'mcp', 'teamvibe-api.mjs');
|
|
188
191
|
const mcpConfig = JSON.stringify({
|
|
189
192
|
mcpServers: {
|
|
190
193
|
slack: { command: 'node', args: [mcpServerPath] },
|
|
194
|
+
'teamvibe-api': { command: 'node', args: [teamvibeApiServerPath] },
|
|
191
195
|
},
|
|
192
196
|
});
|
|
193
197
|
const args = [
|
|
@@ -236,6 +240,11 @@ async function runClaudeCode(msg, sessionLog, cwd, sessionId, isFirstMessage = t
|
|
|
236
240
|
SLACK_THREAD_TS: slackContext.thread_ts,
|
|
237
241
|
SLACK_MESSAGE_TS: slackContext.message_ts,
|
|
238
242
|
}),
|
|
243
|
+
// TeamVibe API env vars for scheduled messages MCP server
|
|
244
|
+
TEAMVIBE_API_URL: config.TEAMVIBE_API_URL,
|
|
245
|
+
TEAMVIBE_POLLER_TOKEN: config.TEAMVIBE_POLLER_TOKEN || '',
|
|
246
|
+
TEAMVIBE_WORKSPACE_ID: msg.teamvibe.workspaceId,
|
|
247
|
+
TEAMVIBE_CHANNEL_ID: msg.teamvibe.channelId,
|
|
239
248
|
},
|
|
240
249
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
241
250
|
});
|
package/dist/cli/commands.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
1
2
|
import { install } from './install.js';
|
|
2
3
|
import { uninstall } from './uninstall.js';
|
|
3
4
|
import { update } from './update.js';
|
|
@@ -19,9 +20,18 @@ Commands:
|
|
|
19
20
|
restart Restart the installed service
|
|
20
21
|
status Show service status
|
|
21
22
|
logs Tail service logs
|
|
23
|
+
--version, -v Show version
|
|
22
24
|
--help, -h Show this help message
|
|
23
25
|
`);
|
|
24
26
|
}
|
|
27
|
+
function getVersion() {
|
|
28
|
+
const require = createRequire(import.meta.url);
|
|
29
|
+
const pkg = require('../../package.json');
|
|
30
|
+
return pkg.version;
|
|
31
|
+
}
|
|
32
|
+
function showVersion() {
|
|
33
|
+
console.log(getVersion());
|
|
34
|
+
}
|
|
25
35
|
export async function handleCommand(command) {
|
|
26
36
|
switch (command) {
|
|
27
37
|
case 'install':
|
|
@@ -46,8 +56,13 @@ export async function handleCommand(command) {
|
|
|
46
56
|
restart();
|
|
47
57
|
break;
|
|
48
58
|
case 'status':
|
|
59
|
+
console.log(`Version: ${getVersion()}`);
|
|
49
60
|
status();
|
|
50
61
|
break;
|
|
62
|
+
case '--version':
|
|
63
|
+
case '-v':
|
|
64
|
+
showVersion();
|
|
65
|
+
break;
|
|
51
66
|
case '--help':
|
|
52
67
|
case '-h':
|
|
53
68
|
showHelp();
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const command = process.argv[2];
|
|
3
|
-
if (command && ['install', 'uninstall', 'update', 'logs', 'status', 'start', 'stop', 'restart', '--help', '-h'].includes(command)) {
|
|
3
|
+
if (command && ['install', 'uninstall', 'update', 'logs', 'status', 'start', 'stop', 'restart', '--help', '-h', '--version', '-v'].includes(command)) {
|
|
4
4
|
const { handleCommand } = await import('./cli/commands.js');
|
|
5
5
|
await handleCommand(command);
|
|
6
6
|
}
|