clew-code 0.2.30 → 0.2.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clew-code",
3
- "version": "0.2.30",
3
+ "version": "0.2.32",
4
4
  "description": "ClewCode — multi-provider AI coding agent CLI",
5
5
  "main": "./dist/main.js",
6
6
  "type": "module",
@@ -25,10 +25,11 @@
25
25
  },
26
26
  "homepage": "https://github.com/ClewCode/ClewCode#readme",
27
27
  "scripts": {
28
- "dev": "bun --watch run --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' --define.MACRO.FEEDBACK_CHANNEL='\"https://github.com/ClewCode/ClewCode/issues\"' --define.MACRO.ISSUES_EXPLAINER='\"visit https://github.com/ClewCode/ClewCode/issues\"' src/main.tsx",
29
- "start": "bun run --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' src/main.tsx",
30
- "dev:channels": "bun run --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' src/main.tsx -- --dangerously-load-development-channels server:clew-orc",
31
- "build": "NODE_ENV=production bun build --production --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' --define.MACRO.FEEDBACK_CHANNEL='\"https://github.com/ClewCode/ClewCode/issues\"' --define.MACRO.ISSUES_EXPLAINER='\"visit https://github.com/ClewCode/ClewCode/issues\"' src/main.tsx --outdir ./dist --target bun --external electron --external 'chromium-bidi*' --external '@ant/claude-for-chrome-mcp' --external '@anthropic-ai/bedrock-sdk' --external '@anthropic-ai/foundry-sdk' --external '@anthropic-ai/vertex-sdk' --external '@anthropic-ai/mcpb' --external '@aws-sdk/client-bedrock-runtime' --external 'google-auth-library' --external 'sharp' --external 'asciichart' --external 'audio-capture-napi' --external 'modifiers-napi' --external '@xenova/transformers' --external 'onnxruntime-node' --external playwright --external 'playwright-core' --external 'node-pty'",
28
+ "prebuild-version": "node scripts/prebuild-version.mjs",
29
+ "dev": "bun run prebuild-version && bun --watch run --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true src/main.tsx",
30
+ "start": "bun run prebuild-version && bun run --define.VOICE_MODE=true src/main.tsx",
31
+ "dev:channels": "bun run prebuild-version && bun run --define.VOICE_MODE=true src/main.tsx -- --dangerously-load-development-channels server:clew-orc",
32
+ "build": "bun run prebuild-version && NODE_ENV=production bun build --production --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true src/main.tsx --outdir ./dist --target bun --external electron --external 'chromium-bidi*' --external '@ant/claude-for-chrome-mcp' --external '@anthropic-ai/bedrock-sdk' --external '@anthropic-ai/foundry-sdk' --external '@anthropic-ai/vertex-sdk' --external '@anthropic-ai/mcpb' --external '@aws-sdk/client-bedrock-runtime' --external 'google-auth-library' --external 'sharp' --external 'asciichart' --external 'audio-capture-napi' --external 'modifiers-napi' --external '@xenova/transformers' --external 'onnxruntime-node' --external playwright --external 'playwright-core' --external 'node-pty'",
32
33
  "prepublishOnly": "bun run build",
33
34
  "test": "bun test",
34
35
  "lint": "biome lint --write src/",
@@ -34,4 +34,7 @@ Write-Info 'Installing clew-code via bun...'
34
34
  # dynamically — it's only needed for image/ComputerUse features.
35
35
  & bun install -g clew-code --ignore-scripts
36
36
 
37
- Write-Host "`nDone! Run clew to start." -ForegroundColor Green
37
+ Write-Host "`nDone! Opening a new terminal with clew ready..." -ForegroundColor Green
38
+
39
+ # ── Open new terminal with clew ready ──────────────────────────────────────
40
+ Start-Process pwsh -ArgumentList "-NoExit", "clew"
@@ -46,4 +46,20 @@ info "Installing clew-code via bun..."
46
46
  # dynamically — it's only needed for image/ComputerUse features.
47
47
  bun install -g clew-code --ignore-scripts
48
48
 
49
- printf "\n${BOLD}Done!${NC} Run ${BOLD}clew${NC} to start.\n"
49
+ printf "\n${BOLD}Done!${NC} Opening a new terminal with ${BOLD}clew${NC} ready...\n"
50
+
51
+ # ── Open new terminal with clew ready ─────────────────────────────────────
52
+ case "$OS" in
53
+ Darwin)
54
+ osascript -e 'tell application "Terminal" to do script "clew"' &>/dev/null || true
55
+ ;;
56
+ Linux)
57
+ # Try common terminal emulators
58
+ for term in x-terminal-emulator gnome-terminal xterm konsole; do
59
+ if command -v "$term" &>/dev/null; then
60
+ ($term &) 2>/dev/null || true
61
+ break
62
+ fi
63
+ done
64
+ ;;
65
+ esac
@@ -0,0 +1,24 @@
1
+ import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
2
+ import { dirname } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ const root = dirname(__dirname);
7
+
8
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
9
+
10
+ const generatedDir = new URL('../src/generated/', import.meta.url);
11
+ mkdirSync(generatedDir, { recursive: true });
12
+
13
+ writeFileSync(
14
+ new URL('./version.ts', generatedDir),
15
+ [
16
+ '// Auto-generated by scripts/prebuild-version.mjs — do not edit',
17
+ `export const BUILD_VERSION = ${JSON.stringify(pkg.version)};`,
18
+ `export const PACKAGE_URL = ${JSON.stringify(pkg.name)};`,
19
+ 'export const FEEDBACK_CHANNEL = "https://github.com/ClewCode/ClewCode/issues";',
20
+ 'export const ISSUES_EXPLAINER = "visit https://github.com/ClewCode/ClewCode/issues";',
21
+ '',
22
+ ].join('\n'),
23
+ 'utf8',
24
+ );