@sliday/tamp 0.2.9 → 0.2.10

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/package.json +1 -1
  2. package/providers.js +13 -0
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "providers.js",
10
10
  "stats.js"
11
11
  ],
12
- "version": "0.2.9",
12
+ "version": "0.2.10",
13
13
  "description": "Token compression proxy for coding agents. Works with Claude Code, Aider, Cursor, Cline, Windsurf. 33.9% fewer input tokens.",
14
14
  "type": "module",
15
15
  "main": "index.js",
package/providers.js CHANGED
@@ -65,6 +65,19 @@ const openai = {
65
65
  },
66
66
  extract(body) {
67
67
  const targets = []
68
+
69
+ // Responses API format: body.input with function_call_output items
70
+ if (body?.input?.length) {
71
+ for (let i = 0; i < body.input.length; i++) {
72
+ const item = body.input[i]
73
+ if (item.type === 'function_call_output' && typeof item.output === 'string') {
74
+ targets.push({ path: ['input', i, 'output'], text: item.output, index: i })
75
+ }
76
+ }
77
+ return targets
78
+ }
79
+
80
+ // Chat Completions format
68
81
  if (!body?.messages?.length) return targets
69
82
 
70
83
  // Find last assistant message with tool_calls