@1presence/bridge 0.1.15 → 0.1.16

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.
Files changed (2) hide show
  1. package/dist/claude.js +11 -1
  2. package/package.json +1 -2
package/dist/claude.js CHANGED
@@ -66,7 +66,7 @@ function spawnClaude(params) {
66
66
  process.stderr.write(`[bridge] model: ${model ?? 'unknown'} apiKeySource: ${keySource ?? 'none'}\n`);
67
67
  sessionIdExtracted = true;
68
68
  }
69
- // Count complete assistant turns + accumulate token usage
69
+ // Count complete assistant turns + accumulate token usage + log tool calls
70
70
  if (type === 'assistant') {
71
71
  messageCount++;
72
72
  const msg = event['message'];
@@ -77,6 +77,16 @@ function spawnClaude(params) {
77
77
  output_tokens: (usage?.output_tokens ?? 0) + (u['output_tokens'] ?? 0),
78
78
  };
79
79
  }
80
+ const content = msg?.['content'];
81
+ if (Array.isArray(content)) {
82
+ for (const block of content) {
83
+ if (block['type'] === 'tool_use') {
84
+ const toolName = block['name'];
85
+ const prefix = toolName.startsWith('mcp__') ? '[mcp]' : '[tool]';
86
+ process.stderr.write(`[bridge] ${prefix} ${toolName}\n`);
87
+ }
88
+ }
89
+ }
80
90
  }
81
91
  // Extract cost from the final result event
82
92
  if (type === 'result') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1presence/bridge",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Run 1Presence on your Mac and use your Claude.ai Pro subscription from any device",
5
5
  "bin": {
6
6
  "1presence-bridge": "dist/index.js"
@@ -11,7 +11,6 @@
11
11
  "README.md"
12
12
  ],
13
13
  "scripts": {
14
- "prepublishOnly": "npm version patch --no-git-tag-version",
15
14
  "prepack": "tsc",
16
15
  "build": "tsc",
17
16
  "dev": "tsx src/index.ts",