@sliday/tamp 0.5.5 → 0.5.7
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 +49 -0
- package/bin/tamp.js +3 -2
- package/bin/ui/Banner.js +2 -2
- package/metadata.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,55 @@ wire_api = "responses"
|
|
|
80
80
|
|
|
81
81
|
Then `export OPENAI_API_KEY=sk-...` and run `codex` or `codex exec "..."` as usual. Tamp routes `/v1/responses` through the `openai-responses` adapter and compresses every `function_call_output` block.
|
|
82
82
|
|
|
83
|
+
### Cursor
|
|
84
|
+
|
|
85
|
+
1. Start Tamp: `npx @sliday/tamp -y`
|
|
86
|
+
2. Open Cursor → **Settings** (`⌘,`) → **Models**
|
|
87
|
+
3. Scroll to **OpenAI API Key**, paste your `sk-...` key
|
|
88
|
+
4. Click **"Override OpenAI Base URL"**, paste `http://localhost:7778/v1`
|
|
89
|
+
5. Click **Verify**, then enable any OpenAI-family model (`gpt-4o`, `gpt-5-codex`, etc.)
|
|
90
|
+
6. Use Cursor as normal — Tamp compresses every tool call
|
|
91
|
+
|
|
92
|
+
> Cursor's bundled `cursor-*` and `claude-*` models go through Cursor's own servers and bypass the override. Pick an OpenAI model to route through Tamp.
|
|
93
|
+
|
|
94
|
+
### VS Code
|
|
95
|
+
|
|
96
|
+
#### Cline (recommended)
|
|
97
|
+
|
|
98
|
+
1. Install [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) from the VS Code marketplace
|
|
99
|
+
2. Start Tamp: `npx @sliday/tamp -y`
|
|
100
|
+
3. Click the Cline icon in the activity bar → **Settings** (⚙️)
|
|
101
|
+
4. **API Provider**: `OpenAI Compatible`
|
|
102
|
+
5. **Base URL**: `http://localhost:7778/v1`
|
|
103
|
+
6. **API Key**: your `sk-...`
|
|
104
|
+
7. **Model ID**: `gpt-4o`, `claude-sonnet-4-5`, or any model your key supports
|
|
105
|
+
|
|
106
|
+
Cline talks directly to the configured base URL for every request — works seamlessly through Tamp.
|
|
107
|
+
|
|
108
|
+
#### Continue
|
|
109
|
+
|
|
110
|
+
1. Install [Continue](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
|
|
111
|
+
2. Start Tamp: `npx @sliday/tamp -y`
|
|
112
|
+
3. Open `~/.continue/config.json` and add:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"models": [
|
|
117
|
+
{
|
|
118
|
+
"title": "GPT-4o (via Tamp)",
|
|
119
|
+
"provider": "openai",
|
|
120
|
+
"model": "gpt-4o",
|
|
121
|
+
"apiKey": "sk-...",
|
|
122
|
+
"apiBase": "http://localhost:7778/v1"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### GitHub Copilot
|
|
129
|
+
|
|
130
|
+
Copilot does not expose a base URL setting and routes everything through GitHub's servers. Tamp **cannot** intercept Copilot traffic. Use Cline or Continue instead if you want compression in VS Code.
|
|
131
|
+
|
|
83
132
|
## Configuration
|
|
84
133
|
|
|
85
134
|
Run `tamp init` to create `~/.config/tamp/config`. All variables work via env or config file.
|
package/bin/tamp.js
CHANGED
|
@@ -5,7 +5,7 @@ import { spawn, execFileSync } from 'node:child_process'
|
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
6
|
import { dirname, join } from 'node:path'
|
|
7
7
|
import { homedir } from 'node:os'
|
|
8
|
-
import { DEFAULT_STAGES, EXTRA_STAGES, STAGE_DESCRIPTIONS, VERSION } from '../metadata.js'
|
|
8
|
+
import { DEFAULT_STAGES, EXTRA_STAGES, STAGE_DESCRIPTIONS, VERSION, isLossy } from '../metadata.js'
|
|
9
9
|
import { CONFIG_PATH, CONFIG_TEMPLATE } from '../config.js'
|
|
10
10
|
import {
|
|
11
11
|
checkPort,
|
|
@@ -301,7 +301,8 @@ if (skipPrompt) {
|
|
|
301
301
|
console.error(` ${c.green}\u2713${c.reset} ${c.cyan}${s}${c.reset}${extra}`)
|
|
302
302
|
}
|
|
303
303
|
for (const s of extraActive) {
|
|
304
|
-
|
|
304
|
+
const tag = isLossy(s) ? '(lossy)' : '(opt-in)'
|
|
305
|
+
console.error(` ${c.yellow}\u2713${c.reset} ${c.yellow}${s}${c.reset} ${c.dim}${tag}${c.reset}`)
|
|
305
306
|
}
|
|
306
307
|
const disabled = [...DEFAULT_STAGES, ...EXTRA_STAGES].filter(s => !active.includes(s))
|
|
307
308
|
if (disabled.length && disabled.length <= 4) {
|
package/bin/ui/Banner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Box, Text } from 'ink'
|
|
3
3
|
import { Badge } from '@inkjs/ui'
|
|
4
|
-
import { ALL_STAGES, DEFAULT_STAGES, EXTRA_STAGES } from '../../metadata.js'
|
|
4
|
+
import { ALL_STAGES, DEFAULT_STAGES, EXTRA_STAGES, isLossy } from '../../metadata.js'
|
|
5
5
|
|
|
6
6
|
const h = React.createElement
|
|
7
7
|
|
|
@@ -47,7 +47,7 @@ export function Banner({ version, port, stages, llmLinguaUrl }) {
|
|
|
47
47
|
h(Text, { key: s },
|
|
48
48
|
h(Text, { color: 'yellow' }, '\u2713 '),
|
|
49
49
|
h(Text, { color: 'yellow' }, s),
|
|
50
|
-
h(Text, { dimColor: true }, ' (lossy)'),
|
|
50
|
+
h(Text, { dimColor: true }, isLossy(s) ? ' (lossy)' : ' (opt-in)'),
|
|
51
51
|
)
|
|
52
52
|
),
|
|
53
53
|
...(disabled.length && disabled.length <= 4
|
package/metadata.js
CHANGED
|
@@ -27,6 +27,20 @@ export const ALL_STAGES = Object.freeze([
|
|
|
27
27
|
...EXTRA_STAGES,
|
|
28
28
|
])
|
|
29
29
|
|
|
30
|
+
// Stages that can drop or paraphrase content (semantic/neural/comment removal).
|
|
31
|
+
// `graph` is opt-in but fully lossless — it substitutes a reference marker for
|
|
32
|
+
// content the model has already seen earlier in the same session.
|
|
33
|
+
export const LOSSY_STAGES = Object.freeze(new Set([
|
|
34
|
+
'llmlingua',
|
|
35
|
+
'foundation-models',
|
|
36
|
+
'textpress',
|
|
37
|
+
'strip-comments',
|
|
38
|
+
]))
|
|
39
|
+
|
|
40
|
+
export function isLossy(stage) {
|
|
41
|
+
return LOSSY_STAGES.has(stage)
|
|
42
|
+
}
|
|
43
|
+
|
|
30
44
|
export const STAGE_DESCRIPTIONS = Object.freeze({
|
|
31
45
|
minify: 'Strip JSON whitespace (lossless)',
|
|
32
46
|
toon: 'Columnar array encoding (lossless)',
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"stats.js",
|
|
13
13
|
"lib/"
|
|
14
14
|
],
|
|
15
|
-
"version": "0.5.
|
|
15
|
+
"version": "0.5.7",
|
|
16
16
|
"description": "Token compression proxy for coding agents. Works with Claude Code, Aider, Cursor, Cline, Windsurf. 60-70% combined input+output savings with Caveman-integrated presets.",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "index.js",
|