claudeck 1.0.5 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeck",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "A browser-based UI for Claude Code — chat, run workflows, manage MCP servers, track costs, and orchestrate autonomous agents from a local web interface. Installable as a PWA.",
6
6
  "main": "server.js",
@@ -16,6 +16,9 @@
16
16
  position: relative;
17
17
  }
18
18
 
19
+ .sb-version { color: var(--accent); font-weight: 600; opacity: 0.7; }
20
+ .sb-version:hover { opacity: 1; }
21
+
19
22
  /* Gradient line at top of status bar */
20
23
  .status-bar::before {
21
24
  content: "";
package/public/index.html CHANGED
@@ -1046,6 +1046,8 @@
1046
1046
  <!-- Status Bar -->
1047
1047
  <footer class="status-bar" id="status-bar">
1048
1048
  <div class="status-bar-left">
1049
+ <span class="sb-item sb-version" id="sb-version" title="Claudeck version"></span>
1050
+ <span class="sb-sep"></span>
1049
1051
  <span class="sb-item sb-connection" id="sb-connection" title="Connection status">
1050
1052
  <span class="sb-dot" id="sb-dot"></span>
1051
1053
  <span id="sb-connection-text">connecting</span>
@@ -17,6 +17,16 @@ const sbBgSessions = document.getElementById("sb-bg-sessions");
17
17
  const sbBgSep = document.getElementById("sb-bg-sep");
18
18
  const sbBgCount = document.getElementById("sb-bg-count");
19
19
 
20
+ // ── Version ──
21
+ const sbVersion = document.getElementById("sb-version");
22
+ (async () => {
23
+ try {
24
+ const res = await fetch("/api/version");
25
+ const { version } = await res.json();
26
+ if (sbVersion) sbVersion.textContent = `v${version}`;
27
+ } catch { /* ignore */ }
28
+ })();
29
+
20
30
  // ── Connection status ──
21
31
  on("ws:connected", () => {
22
32
  sbDot.className = "sb-dot connected";
@@ -65,8 +75,8 @@ async function fetchBranch() {
65
75
  return;
66
76
  }
67
77
  try {
68
- const data = await api.execCommand("git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '--'", cwd);
69
- const branch = (data.stdout || data.output || "--").trim();
78
+ const data = await api.execCommand("git rev-parse --abbrev-ref HEAD", cwd);
79
+ const branch = (data.stdout || data.output || "").trim();
70
80
  sbBranchName.textContent = branch || "--";
71
81
  } catch {
72
82
  sbBranchName.textContent = "--";
@@ -28,9 +28,10 @@ function findClaudeBinary() {
28
28
  if (process.platform === "win32") {
29
29
  candidates.push(join(home, "AppData", "Local", "Programs", "claude", "claude.exe"));
30
30
  candidates.push(join(home, ".claude", "local", "claude.exe"));
31
- // npm global installs on Windows use .cmd shims
31
+ // npm global installs on Windows both .cmd shim and plain executable
32
32
  const appData = process.env.APPDATA || join(home, "AppData", "Roaming");
33
33
  candidates.push(join(appData, "npm", "claude.cmd"));
34
+ candidates.push(join(appData, "npm", "claude"));
34
35
  }
35
36
  for (const p of candidates) {
36
37
  if (existsSync(p)) return p;
@@ -45,14 +46,18 @@ router.get("/account", async (req, res) => {
45
46
  }
46
47
  try {
47
48
  const data = await new Promise((resolve, reject) => {
48
- const opts = { timeout: 10000 };
49
- const cb = (err, stdout) => {
49
+ const opts = { timeout: 10000, env: { ...process.env, FORCE_COLOR: "0" } };
50
+ const cb = (err, stdout, stderr) => {
50
51
  if (err) return reject(err);
51
- try { resolve(JSON.parse(stdout)); } catch (e) { reject(e); }
52
+ const out = (stdout || "").trim();
53
+ try { resolve(JSON.parse(out)); } catch {
54
+ // claude auth status may not return JSON — extract what we can
55
+ resolve({ email: null, subscriptionType: null, raw: out });
56
+ }
52
57
  };
53
- // On Windows, use exec so .cmd shims on PATH resolve correctly
58
+ // On Windows, use exec with shell so .cmd shims and PATH resolve correctly
54
59
  if (process.platform === "win32") {
55
- exec("claude auth status", opts, cb);
60
+ exec(`"${claudeBin}" auth status`, { ...opts, shell: true }, cb);
56
61
  } else {
57
62
  execFile(claudeBin, ["auth", "status"], opts, cb);
58
63
  }
package/server.js CHANGED
@@ -105,6 +105,11 @@ app.use("/api/tips", tipsRouter);
105
105
  app.use("/api/bot", botRouter);
106
106
  app.use("/api/telegram", telegramRouter);
107
107
 
108
+ // Version endpoint
109
+ import { readFileSync } from "fs";
110
+ const pkgVersion = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8")).version;
111
+ app.get("/api/version", (_req, res) => res.json({ version: pkgVersion }));
112
+
108
113
  // Serve full-stack plugin client assets
109
114
  const fullStackPluginsDir = join(__dirname, "plugins");
110
115
  app.use("/plugins", express.static(fullStackPluginsDir));