@sliday/tamp 0.3.6 → 0.3.8

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 (3) hide show
  1. package/bin/tamp.js +9 -6
  2. package/index.js +7 -0
  3. package/package.json +1 -1
package/bin/tamp.js CHANGED
@@ -38,10 +38,13 @@ const STAGE_DESC = {
38
38
  const skipPrompt = process.argv.includes('-y') || process.argv.includes('--no-interactive') || !process.stdin.isTTY
39
39
  let selectedStages
40
40
 
41
- if (process.env.TAMP_STAGES) {
42
- selectedStages = process.env.TAMP_STAGES.split(',').map(s => s.trim()).filter(Boolean)
43
- } else if (skipPrompt) {
44
- selectedStages = [...DEFAULT_STAGES]
41
+ // Determine pre-checked stages from env var (if set)
42
+ const envStages = process.env.TAMP_STAGES
43
+ ? new Set(process.env.TAMP_STAGES.split(',').map(s => s.trim()).filter(Boolean))
44
+ : null
45
+
46
+ if (skipPrompt) {
47
+ selectedStages = envStages ? [...envStages] : [...DEFAULT_STAGES]
45
48
  } else {
46
49
  log('')
47
50
  log(` ${c.bold}${c.cyan}Tamp${c.reset} ${c.dim}v${pkg.version}${c.reset}`)
@@ -55,13 +58,13 @@ if (process.env.TAMP_STAGES) {
55
58
  ...DEFAULT_STAGES.map(s => ({
56
59
  name: `${c.cyan}${s.padEnd(15)}${c.reset} ${c.dim}${STAGE_DESC[s]}${c.reset}`,
57
60
  value: s,
58
- checked: true,
61
+ checked: envStages ? envStages.has(s) : true,
59
62
  })),
60
63
  new Separator(`${c.dim}── Extra (lossy, opt-in) ──${c.reset}`),
61
64
  ...EXTRA_STAGES.map(s => ({
62
65
  name: `${c.yellow}${s.padEnd(15)}${c.reset} ${c.dim}${STAGE_DESC[s]}${c.reset}`,
63
66
  value: s,
64
- checked: false,
67
+ checked: envStages ? envStages.has(s) : false,
65
68
  })),
66
69
  ],
67
70
  pageSize: 15,
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.6",
12
+ "version": "0.3.8",
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",