troxy-cli 1.4.12 → 1.4.14

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/bin/troxy.js CHANGED
@@ -361,7 +361,9 @@ switch (command) {
361
361
  throw err;
362
362
  }
363
363
  }
364
- console.log(`✓\n\n Updated to ${latest}. Restart your terminal to use the new version.\n`);
364
+ // Also refresh the npx cache so MCP servers (e.g. OpenClaw) pick up the new version
365
+ try { execSync(`npx --yes troxy-cli@${latest} --version`, { stdio: 'pipe' }); } catch { /* non-fatal */ }
366
+ console.log(`✓\n\n Updated to ${latest}. Restart your terminal and any MCP clients to use the new version.\n`);
365
367
  } catch (err) {
366
368
  const stderr = err.stderr?.toString() || err.message || '';
367
369
  if (stderr.includes('EACCES') || stderr.includes('permission')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.4.12",
3
+ "version": "1.4.14",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/mcp-server.js CHANGED
@@ -13,6 +13,12 @@ export async function runMcp() {
13
13
  const apiKey = process.env.TROXY_API_KEY || config?.apiKey;
14
14
  const agentName = process.env.TROXY_AGENT_NAME || config?.agentName;
15
15
 
16
+ const notifyTelegramToken = process.env.TROXY_NOTIFY_TELEGRAM_TOKEN || config?.notify?.telegram?.botToken;
17
+ const notifyTelegramChatId = process.env.TROXY_NOTIFY_TELEGRAM_CHAT_ID || config?.notify?.telegram?.chatId;
18
+ const notifyConfig = (notifyTelegramToken && notifyTelegramChatId)
19
+ ? { type: 'telegram', bot_token: notifyTelegramToken, chat_id: notifyTelegramChatId }
20
+ : null;
21
+
16
22
  if (!apiKey) {
17
23
  process.stderr.write(
18
24
  'Troxy: no API key found. Run: npx troxy init --key txy-...\n',
@@ -140,6 +146,7 @@ export async function runMcp() {
140
146
  }
141
147
 
142
148
  if (agentName && !args.agent) args.agent = agentName;
149
+ if (notifyConfig && !args.notify) args.notify = notifyConfig;
143
150
  const result = await evaluatePayment(args, apiKey);
144
151
 
145
152
  if (result.error) {