troxy-cli 1.4.0 → 1.4.2

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
@@ -240,7 +240,21 @@ switch (command) {
240
240
  // MCP connection info from local config (set by troxy init)
241
241
  const localKey = loadConfig()?.apiKey;
242
242
  if (localKey) {
243
- console.log(` MCP key: ${localKey.substring(0, 12)}... (saved — run \`troxy init\` to change)\n`);
243
+ process.stdout.write(` MCP key: ${localKey.substring(0, 12)}...`);
244
+ try {
245
+ const mcpStatus = await api.mcpStatus(localKey);
246
+ if (mcpStatus.paused) {
247
+ process.stdout.write(` ⏸ PAUSED (run \`troxy resume\` to resume)\n`);
248
+ } else {
249
+ const lastSeen = mcpStatus.mcp_last_seen_at
250
+ ? ` last seen ${new Date(mcpStatus.mcp_last_seen_at).toLocaleString()}`
251
+ : '';
252
+ process.stdout.write(` ✓ active${lastSeen}\n`);
253
+ }
254
+ } catch {
255
+ process.stdout.write('\n');
256
+ }
257
+ console.log();
244
258
  }
245
259
 
246
260
  // Version check
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/api.js CHANGED
@@ -58,7 +58,8 @@ export const api = {
58
58
  // MCP heartbeat (agent API key)
59
59
  mcpHeartbeat: (apiKey, agentName) => request('POST', '/mcp/heartbeat', { apiKey, body: agentName ? { agent_name: agentName } : undefined }),
60
60
 
61
- // MCP pause / resume (agent API key)
61
+ // MCP status / pause / resume (agent API key)
62
+ mcpStatus: (apiKey) => request('GET', '/mcp/status', { apiKey }),
62
63
  mcpPause: (apiKey) => request('POST', '/mcp/pause', { apiKey }),
63
64
  mcpResume: (apiKey) => request('POST', '/mcp/resume', { apiKey }),
64
65