@sliday/tamp 0.3.7 → 0.3.9
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 +18 -2
- package/index.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tamp
|
|
2
2
|
|
|
3
|
-
**Token compression proxy for coding agents.** 52.6% fewer input tokens, zero code changes. Works with Claude Code, Aider, Cursor, Cline, Windsurf, and any OpenAI-compatible agent.
|
|
3
|
+
**Token compression proxy for coding agents.** 52.6% fewer input tokens, zero code changes. Works with Claude Code, Aider, Cursor, Cline, Windsurf, 🦞 [OpenClaw](https://openclaw.app), and any OpenAI-compatible agent.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
npx @sliday/tamp
|
|
@@ -9,9 +9,25 @@ npx @sliday/tamp
|
|
|
9
9
|
Or install globally:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
npm i -g @sliday/tamp@0.3.9
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 🦞 OpenClaw Quick Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 1. Start Tamp
|
|
19
|
+
TAMP_STAGES=minify,toon,strip-lines,whitespace,dedup,diff,prune tamp -y
|
|
20
|
+
|
|
21
|
+
# 2. Add provider to OpenClaw config
|
|
22
|
+
# baseUrl: "http://localhost:7778"
|
|
23
|
+
# apiKey: "${ANTHROPIC_API_KEY}"
|
|
24
|
+
# api: "anthropic-messages"
|
|
25
|
+
|
|
26
|
+
# 3. Set as primary model → done
|
|
13
27
|
```
|
|
14
28
|
|
|
29
|
+
70MB RAM. <5ms latency. No Python needed. Full guide: [docs/openclaw-setup.md](docs/openclaw-setup.md)
|
|
30
|
+
|
|
15
31
|
## How It Works
|
|
16
32
|
|
|
17
33
|
Tamp auto-detects your agent's API format and compresses tool result blocks before forwarding upstream. Source code, error results, and non-JSON content pass through untouched.
|
package/index.js
CHANGED
|
@@ -105,6 +105,13 @@ function pipeRequest(req, res, upstreamUrl, prefixChunks) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
return http.createServer(async (req, res) => {
|
|
108
|
+
// Health check endpoint
|
|
109
|
+
if (req.url === '/health' && (req.method === 'GET' || req.method === 'HEAD')) {
|
|
110
|
+
const body = JSON.stringify({ status: 'ok', version: config.version || '0.3.7', stages: config.stages })
|
|
111
|
+
res.writeHead(200, { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) })
|
|
112
|
+
return res.end(req.method === 'HEAD' ? undefined : body)
|
|
113
|
+
}
|
|
114
|
+
|
|
108
115
|
const provider = detectProvider(req.method, req.url)
|
|
109
116
|
|
|
110
117
|
if (!provider) {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"providers.js",
|
|
10
10
|
"stats.js"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.3.
|
|
12
|
+
"version": "0.3.9",
|
|
13
13
|
"description": "Token compression proxy for coding agents. Works with Claude Code, Aider, Cursor, Cline, Windsurf. 52.6% fewer input tokens.",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"main": "index.js",
|