telegram-claude-mcp 1.4.1 → 1.5.0
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/README.md +8 -6
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/providers/index.ts +3 -1
- package/src/telegram.ts +2 -2
package/README.md
CHANGED
|
@@ -225,12 +225,14 @@ Replace `YOUR_BOT_TOKEN` and `YOUR_CHAT_ID` in `~/.claude/settings.json`
|
|
|
225
225
|
|
|
226
226
|
## Environment Variables
|
|
227
227
|
|
|
228
|
-
| Variable | Description |
|
|
229
|
-
|
|
230
|
-
| `TELEGRAM_BOT_TOKEN` | Bot token from @BotFather |
|
|
231
|
-
| `TELEGRAM_CHAT_ID` | Your Telegram chat ID |
|
|
232
|
-
| `SESSION_NAME` | Session identifier (for multi-instance) |
|
|
233
|
-
| `SESSION_PORT` | Preferred HTTP port
|
|
228
|
+
| Variable | Description | Default |
|
|
229
|
+
|----------|-------------|---------|
|
|
230
|
+
| `TELEGRAM_BOT_TOKEN` | Bot token from @BotFather | Required |
|
|
231
|
+
| `TELEGRAM_CHAT_ID` | Your Telegram chat ID | Required |
|
|
232
|
+
| `SESSION_NAME` | Session identifier (for multi-instance) | "default" |
|
|
233
|
+
| `SESSION_PORT` | Preferred HTTP port (auto-finds if busy) | 3333 |
|
|
234
|
+
| `CHAT_RESPONSE_TIMEOUT_MS` | Timeout for message responses | 600000 (10 min) |
|
|
235
|
+
| `PERMISSION_TIMEOUT_MS` | Timeout for permission decisions | 600000 (10 min) |
|
|
234
236
|
|
|
235
237
|
## How It Works
|
|
236
238
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/providers/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface AppConfig {
|
|
|
25
25
|
|
|
26
26
|
// Chat settings
|
|
27
27
|
responseTimeoutMs: number;
|
|
28
|
+
permissionTimeoutMs: number;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export function loadAppConfig(): AppConfig {
|
|
@@ -48,7 +49,8 @@ export function loadAppConfig(): AppConfig {
|
|
|
48
49
|
sessionPort: parseInt(sessionPort, 10),
|
|
49
50
|
openrouterApiKey: process.env.OPENROUTER_API_KEY,
|
|
50
51
|
openrouterModel: process.env.OPENROUTER_MODEL || 'openai/gpt-oss-120b',
|
|
51
|
-
responseTimeoutMs: parseInt(process.env.CHAT_RESPONSE_TIMEOUT_MS || '
|
|
52
|
+
responseTimeoutMs: parseInt(process.env.CHAT_RESPONSE_TIMEOUT_MS || '600000', 10),
|
|
53
|
+
permissionTimeoutMs: parseInt(process.env.PERMISSION_TIMEOUT_MS || '600000', 10),
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
|
package/src/telegram.ts
CHANGED
|
@@ -70,8 +70,8 @@ export class TelegramManager {
|
|
|
70
70
|
|
|
71
71
|
constructor(config: TelegramConfig) {
|
|
72
72
|
this.config = {
|
|
73
|
-
responseTimeoutMs:
|
|
74
|
-
permissionTimeoutMs:
|
|
73
|
+
responseTimeoutMs: 600000, // 10 minutes default
|
|
74
|
+
permissionTimeoutMs: 600000, // 10 minutes for permissions
|
|
75
75
|
...config,
|
|
76
76
|
};
|
|
77
77
|
|