claudeck 1.2.0 → 1.3.0
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 +64 -5
- package/cli.js +53 -4
- package/package.json +3 -2
- package/public/css/core/responsive.css +2 -2
- package/public/css/ui/file-picker.css +243 -17
- package/public/css/ui/messages.css +72 -9
- package/public/css/ui/toolbox.css +43 -0
- package/public/index.html +80 -745
- package/public/js/components/add-project-modal.js +27 -0
- package/public/js/components/agent-modal.js +73 -0
- package/public/js/components/agent-monitor-modal.js +19 -0
- package/public/js/components/bg-confirm-modal.js +22 -0
- package/public/js/components/chain-modal.js +52 -0
- package/public/js/components/cost-dashboard-modal.js +39 -0
- package/public/js/components/dag-editor-modal.js +55 -0
- package/public/js/components/file-picker-modal.js +45 -0
- package/public/js/components/linear-create-modal.js +43 -0
- package/public/js/components/mcp-modal.js +58 -0
- package/public/js/components/orchestrate-modal.js +40 -0
- package/public/js/components/permission-modal.js +30 -0
- package/public/js/components/prompt-modal.js +31 -0
- package/public/js/components/shortcuts-modal.js +45 -0
- package/public/js/components/status-bar.js +97 -0
- package/public/js/components/system-prompt-modal.js +29 -0
- package/public/js/components/telegram-modal.js +84 -0
- package/public/js/components/welcome-overlay.js +60 -0
- package/public/js/components/workflow-modal.js +41 -0
- package/public/js/core/api.js +10 -0
- package/public/js/core/dom.js +3 -2
- package/public/js/core/ws.js +7 -1
- package/public/js/features/attachments.js +226 -23
- package/public/js/features/projects.js +7 -0
- package/public/js/main.js +22 -0
- package/public/js/ui/shortcuts.js +4 -8
- package/public/login.html +470 -0
- package/public/offline.html +300 -168
- package/public/sw.js +10 -2
- package/server/auth.js +141 -0
- package/server.js +14 -3
package/server.js
CHANGED
|
@@ -34,17 +34,28 @@ import worktreesRouter from "./server/routes/worktrees.js";
|
|
|
34
34
|
import skillsRouter from "./server/routes/skills.js";
|
|
35
35
|
import { setupWebSocket } from "./server/ws-handler.js";
|
|
36
36
|
import { setWss } from "./server/notification-logger.js";
|
|
37
|
+
import { authMiddleware, verifyWsClient, isAuthEnabled, getToken, loginHandler, statusHandler } from "./server/auth.js";
|
|
37
38
|
|
|
38
39
|
const __filename = fileURLToPath(import.meta.url);
|
|
39
40
|
const __dirname = dirname(__filename);
|
|
40
41
|
|
|
41
42
|
const app = express();
|
|
42
43
|
const server = createServer(app);
|
|
43
|
-
const wss = new WebSocketServer({ server, path: "/ws" });
|
|
44
|
+
const wss = new WebSocketServer({ server, path: "/ws", verifyClient: verifyWsClient });
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
// ── Middleware ordering: json → auth routes (unauthenticated) → auth middleware → static + API ──
|
|
46
47
|
app.use(express.json());
|
|
47
48
|
|
|
49
|
+
// Auth endpoints (always accessible)
|
|
50
|
+
app.post("/api/auth/login", loginHandler);
|
|
51
|
+
app.get("/api/auth/status", statusHandler);
|
|
52
|
+
app.get("/login", (_req, res) => res.sendFile(join(__dirname, "public", "login.html")));
|
|
53
|
+
|
|
54
|
+
// Auth middleware — everything below is protected when auth is enabled
|
|
55
|
+
app.use(authMiddleware);
|
|
56
|
+
|
|
57
|
+
app.use(express.static(join(__dirname, "public")));
|
|
58
|
+
|
|
48
59
|
// ── Web Push (VAPID) setup ──────────────────────────────────
|
|
49
60
|
{
|
|
50
61
|
let vapidPublic = process.env.VAPID_PUBLIC_KEY;
|
|
@@ -198,7 +209,7 @@ mountPluginRoutes(app, fullStackPluginsDir).then(() => {
|
|
|
198
209
|
\x1b[1m\x1b[32m➜\x1b[0m \x1b[1mReady:\x1b[0m ${url}
|
|
199
210
|
\x1b[2m➜ Port:\x1b[0m ${PORT}
|
|
200
211
|
\x1b[2m➜ Data:\x1b[0m ~/.claudeck/
|
|
201
|
-
`);
|
|
212
|
+
${isAuthEnabled() ? ` \x1b[2m➜ Auth:\x1b[0m \x1b[33menabled\x1b[0m\n \x1b[2m➜ Token:\x1b[0m ${getToken()}\n` : ''}`);
|
|
202
213
|
});
|
|
203
214
|
});
|
|
204
215
|
|