claudeck 1.0.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/LICENSE +21 -0
- package/README.md +233 -0
- package/cli.js +2 -0
- package/config/agent-chains.json +16 -0
- package/config/agent-dags.json +16 -0
- package/config/agents.json +46 -0
- package/config/bot-prompt.json +3 -0
- package/config/folders.json +66 -0
- package/config/prompts.json +92 -0
- package/config/repos.json +86 -0
- package/config/telegram-config.json +17 -0
- package/config/workflows.json +90 -0
- package/db.js +1198 -0
- package/package.json +55 -0
- package/plugins/claude-editor/client.css +171 -0
- package/plugins/claude-editor/client.js +183 -0
- package/plugins/event-stream/client.css +207 -0
- package/plugins/event-stream/client.js +271 -0
- package/plugins/linear/client.css +345 -0
- package/plugins/linear/client.js +380 -0
- package/plugins/linear/config.json +5 -0
- package/plugins/linear/server.js +312 -0
- package/plugins/repos/client.css +549 -0
- package/plugins/repos/client.js +663 -0
- package/plugins/repos/server.js +232 -0
- package/plugins/sudoku/client.css +196 -0
- package/plugins/sudoku/client.js +329 -0
- package/plugins/tasks/client.css +414 -0
- package/plugins/tasks/client.js +394 -0
- package/plugins/tasks/server.js +116 -0
- package/plugins/tic-tac-toe/client.css +167 -0
- package/plugins/tic-tac-toe/client.js +241 -0
- package/public/css/core/components.css +232 -0
- package/public/css/core/layout.css +330 -0
- package/public/css/core/print.css +18 -0
- package/public/css/core/reset.css +36 -0
- package/public/css/core/responsive.css +378 -0
- package/public/css/core/theme.css +116 -0
- package/public/css/core/variables.css +93 -0
- package/public/css/features/agent-monitor.css +297 -0
- package/public/css/features/agent-sidebar.css +525 -0
- package/public/css/features/agents.css +996 -0
- package/public/css/features/analytics.css +181 -0
- package/public/css/features/background-sessions.css +321 -0
- package/public/css/features/cost-dashboard.css +168 -0
- package/public/css/features/home.css +313 -0
- package/public/css/features/retro-terminal.css +88 -0
- package/public/css/features/telegram.css +127 -0
- package/public/css/features/tour.css +148 -0
- package/public/css/features/voice-input.css +60 -0
- package/public/css/features/welcome.css +241 -0
- package/public/css/panels/assistant-bot.css +442 -0
- package/public/css/panels/dev-docs.css +292 -0
- package/public/css/panels/file-explorer.css +322 -0
- package/public/css/panels/git-panel.css +221 -0
- package/public/css/panels/mcp-manager.css +199 -0
- package/public/css/panels/tips-feed.css +353 -0
- package/public/css/ui/commands.css +273 -0
- package/public/css/ui/context-gauge.css +76 -0
- package/public/css/ui/file-picker.css +69 -0
- package/public/css/ui/image-attachments.css +106 -0
- package/public/css/ui/messages.css +884 -0
- package/public/css/ui/modals.css +122 -0
- package/public/css/ui/parallel.css +217 -0
- package/public/css/ui/permissions.css +110 -0
- package/public/css/ui/right-panel.css +481 -0
- package/public/css/ui/sessions.css +689 -0
- package/public/css/ui/status-bar.css +425 -0
- package/public/css/ui/toolbox.css +206 -0
- package/public/data/tips.json +218 -0
- package/public/icons/favicon.png +0 -0
- package/public/icons/icon-192.png +0 -0
- package/public/icons/icon-512.png +0 -0
- package/public/icons/whaly.png +0 -0
- package/public/index.html +1140 -0
- package/public/js/core/api.js +591 -0
- package/public/js/core/constants.js +3 -0
- package/public/js/core/dom.js +270 -0
- package/public/js/core/events.js +10 -0
- package/public/js/core/plugin-loader.js +153 -0
- package/public/js/core/store.js +39 -0
- package/public/js/core/utils.js +25 -0
- package/public/js/core/ws.js +64 -0
- package/public/js/features/agent-monitor.js +222 -0
- package/public/js/features/agents.js +1209 -0
- package/public/js/features/analytics.js +397 -0
- package/public/js/features/attachments.js +251 -0
- package/public/js/features/background-sessions.js +475 -0
- package/public/js/features/chat.js +589 -0
- package/public/js/features/cost-dashboard.js +152 -0
- package/public/js/features/dag-editor.js +399 -0
- package/public/js/features/easter-egg.js +46 -0
- package/public/js/features/home.js +270 -0
- package/public/js/features/projects.js +372 -0
- package/public/js/features/prompts.js +228 -0
- package/public/js/features/sessions.js +332 -0
- package/public/js/features/telegram.js +131 -0
- package/public/js/features/tour.js +210 -0
- package/public/js/features/voice-input.js +185 -0
- package/public/js/features/welcome.js +43 -0
- package/public/js/features/workflows.js +277 -0
- package/public/js/main.js +51 -0
- package/public/js/panels/assistant-bot.js +445 -0
- package/public/js/panels/dev-docs.js +380 -0
- package/public/js/panels/file-explorer.js +486 -0
- package/public/js/panels/git-panel.js +285 -0
- package/public/js/panels/mcp-manager.js +311 -0
- package/public/js/panels/tips-feed.js +303 -0
- package/public/js/ui/commands.js +114 -0
- package/public/js/ui/context-gauge.js +100 -0
- package/public/js/ui/diff.js +124 -0
- package/public/js/ui/disabled-tools.js +36 -0
- package/public/js/ui/export.js +74 -0
- package/public/js/ui/formatting.js +206 -0
- package/public/js/ui/header-dropdowns.js +72 -0
- package/public/js/ui/input-meta.js +71 -0
- package/public/js/ui/max-turns.js +21 -0
- package/public/js/ui/messages.js +387 -0
- package/public/js/ui/model-selector.js +20 -0
- package/public/js/ui/notifications.js +232 -0
- package/public/js/ui/parallel.js +176 -0
- package/public/js/ui/permissions.js +168 -0
- package/public/js/ui/right-panel.js +173 -0
- package/public/js/ui/shortcuts.js +143 -0
- package/public/js/ui/sidebar-toggle.js +29 -0
- package/public/js/ui/status-bar.js +172 -0
- package/public/js/ui/tab-sdk.js +623 -0
- package/public/js/ui/theme.js +38 -0
- package/public/manifest.json +13 -0
- package/public/offline.html +190 -0
- package/public/style.css +42 -0
- package/public/sw.js +91 -0
- package/server/agent-loop.js +385 -0
- package/server/dag-executor.js +265 -0
- package/server/orchestrator.js +514 -0
- package/server/paths.js +61 -0
- package/server/plugin-mount.js +56 -0
- package/server/push-sender.js +31 -0
- package/server/routes/agents.js +294 -0
- package/server/routes/bot.js +45 -0
- package/server/routes/exec.js +35 -0
- package/server/routes/files.js +218 -0
- package/server/routes/mcp.js +82 -0
- package/server/routes/messages.js +36 -0
- package/server/routes/notifications.js +37 -0
- package/server/routes/projects.js +207 -0
- package/server/routes/prompts.js +53 -0
- package/server/routes/sessions.js +103 -0
- package/server/routes/stats.js +143 -0
- package/server/routes/telegram.js +71 -0
- package/server/routes/tips.js +135 -0
- package/server/routes/workflows.js +81 -0
- package/server/summarizer.js +55 -0
- package/server/telegram-poller.js +205 -0
- package/server/telegram-sender.js +304 -0
- package/server/ws-handler.js +926 -0
- package/server.js +179 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Status Bar — VS Code-style bottom bar showing project info, git branch, model, costs
|
|
2
|
+
import { $ } from '../core/dom.js';
|
|
3
|
+
import { getState, on as onState } from '../core/store.js';
|
|
4
|
+
import { on } from '../core/events.js';
|
|
5
|
+
import * as api from '../core/api.js';
|
|
6
|
+
import { openCostDashboard } from '../features/cost-dashboard.js';
|
|
7
|
+
|
|
8
|
+
// ── DOM refs ──
|
|
9
|
+
const sbDot = document.getElementById("sb-dot");
|
|
10
|
+
const sbConnText = document.getElementById("sb-connection-text");
|
|
11
|
+
const sbBranchName = document.getElementById("sb-branch-name");
|
|
12
|
+
const sbProjectName = document.getElementById("sb-project-name");
|
|
13
|
+
const sbActivity = document.getElementById("sb-activity");
|
|
14
|
+
const sbSessionCost = document.getElementById("sb-session-cost");
|
|
15
|
+
const sbTotalCost = document.getElementById("sb-total-cost");
|
|
16
|
+
const sbBgSessions = document.getElementById("sb-bg-sessions");
|
|
17
|
+
const sbBgSep = document.getElementById("sb-bg-sep");
|
|
18
|
+
const sbBgCount = document.getElementById("sb-bg-count");
|
|
19
|
+
|
|
20
|
+
// ── Connection status ──
|
|
21
|
+
on("ws:connected", () => {
|
|
22
|
+
sbDot.className = "sb-dot connected";
|
|
23
|
+
sbConnText.textContent = "connected";
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
on("ws:reconnected", () => {
|
|
27
|
+
sbDot.className = "sb-dot connected";
|
|
28
|
+
sbConnText.textContent = "connected";
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
on("ws:disconnected", () => {
|
|
32
|
+
sbDot.className = "sb-dot reconnecting";
|
|
33
|
+
sbConnText.textContent = "reconnecting";
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// ── Project name ──
|
|
37
|
+
function updateProject() {
|
|
38
|
+
const select = $.projectSelect;
|
|
39
|
+
if (!select) return;
|
|
40
|
+
const opt = select.options[select.selectedIndex];
|
|
41
|
+
const name = opt?.textContent?.trim() || "no project";
|
|
42
|
+
sbProjectName.textContent = name;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Listen for project changes
|
|
46
|
+
if ($.projectSelect) {
|
|
47
|
+
$.projectSelect.addEventListener("change", () => {
|
|
48
|
+
updateProject();
|
|
49
|
+
fetchBranch();
|
|
50
|
+
});
|
|
51
|
+
// Watch for options being added (async project loading on page refresh)
|
|
52
|
+
const selectObserver = new MutationObserver(() => {
|
|
53
|
+
updateProject();
|
|
54
|
+
fetchBranch();
|
|
55
|
+
});
|
|
56
|
+
selectObserver.observe($.projectSelect, { childList: true });
|
|
57
|
+
}
|
|
58
|
+
updateProject();
|
|
59
|
+
|
|
60
|
+
// ── Git branch ──
|
|
61
|
+
async function fetchBranch() {
|
|
62
|
+
const cwd = $.projectSelect?.value;
|
|
63
|
+
if (!cwd) {
|
|
64
|
+
sbBranchName.textContent = "--";
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
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();
|
|
70
|
+
sbBranchName.textContent = branch || "--";
|
|
71
|
+
} catch {
|
|
72
|
+
sbBranchName.textContent = "--";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
// Click branch → open git panel
|
|
78
|
+
document.getElementById("sb-branch")?.addEventListener("click", () => {
|
|
79
|
+
const gitTab = document.querySelector('.right-panel-tab[data-tab="git"]');
|
|
80
|
+
if (gitTab) {
|
|
81
|
+
gitTab.click();
|
|
82
|
+
const panel = document.getElementById("right-panel");
|
|
83
|
+
if (panel?.classList.contains("hidden")) {
|
|
84
|
+
document.getElementById("right-panel-toggle-btn")?.click();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// Click project → focus project selector
|
|
90
|
+
document.getElementById("sb-project")?.addEventListener("click", () => {
|
|
91
|
+
$.projectSelect?.focus();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// ── Costs ──
|
|
95
|
+
// Mirror the header cost values
|
|
96
|
+
function syncCosts() {
|
|
97
|
+
if ($.projectCostEl) sbSessionCost.textContent = $.projectCostEl.textContent;
|
|
98
|
+
if ($.totalCostEl) sbTotalCost.textContent = $.totalCostEl.textContent;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Observe cost changes in header
|
|
102
|
+
if ($.projectCostEl) {
|
|
103
|
+
const obs = new MutationObserver(syncCosts);
|
|
104
|
+
obs.observe($.projectCostEl, { childList: true, characterData: true, subtree: true });
|
|
105
|
+
}
|
|
106
|
+
if ($.totalCostEl) {
|
|
107
|
+
const obs = new MutationObserver(syncCosts);
|
|
108
|
+
obs.observe($.totalCostEl, { childList: true, characterData: true, subtree: true });
|
|
109
|
+
}
|
|
110
|
+
syncCosts();
|
|
111
|
+
|
|
112
|
+
// Click cost → open cost dashboard
|
|
113
|
+
document.getElementById("sb-cost")?.addEventListener("click", () => {
|
|
114
|
+
openCostDashboard();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// ── Background sessions ──
|
|
118
|
+
function updateBgSessions() {
|
|
119
|
+
const bgMap = getState("backgroundSessions");
|
|
120
|
+
const count = bgMap ? bgMap.size : 0;
|
|
121
|
+
if (count > 0) {
|
|
122
|
+
sbBgSessions.classList.remove("hidden");
|
|
123
|
+
sbBgSep.classList.remove("hidden");
|
|
124
|
+
sbBgCount.textContent = count;
|
|
125
|
+
} else {
|
|
126
|
+
sbBgSessions.classList.add("hidden");
|
|
127
|
+
sbBgSep.classList.add("hidden");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
onState("backgroundSessions", updateBgSessions);
|
|
132
|
+
updateBgSessions();
|
|
133
|
+
|
|
134
|
+
// ── Activity indicator ──
|
|
135
|
+
// Listen for streaming state changes
|
|
136
|
+
on("ws:message", (msg) => {
|
|
137
|
+
if (msg.type === "text" || msg.type === "tool") {
|
|
138
|
+
sbActivity.textContent = msg.type === "tool"
|
|
139
|
+
? `running ${msg.name}...`
|
|
140
|
+
: "streaming...";
|
|
141
|
+
}
|
|
142
|
+
if (msg.type === "done" || msg.type === "aborted" || msg.type === "error") {
|
|
143
|
+
sbActivity.textContent = "";
|
|
144
|
+
}
|
|
145
|
+
if (msg.type === "agent_started") {
|
|
146
|
+
sbActivity.textContent = `agent: ${msg.title}...`;
|
|
147
|
+
}
|
|
148
|
+
if (msg.type === "agent_progress") {
|
|
149
|
+
sbActivity.textContent = `agent: ${msg.action}...`;
|
|
150
|
+
}
|
|
151
|
+
if (msg.type === "agent_completed" || msg.type === "agent_error" || msg.type === "agent_aborted") {
|
|
152
|
+
sbActivity.textContent = "";
|
|
153
|
+
}
|
|
154
|
+
if (msg.type === "workflow_step" && msg.status === "running") {
|
|
155
|
+
sbActivity.textContent = "workflow running...";
|
|
156
|
+
}
|
|
157
|
+
if (msg.type === "workflow_completed") {
|
|
158
|
+
sbActivity.textContent = "";
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Sync costs on result messages
|
|
162
|
+
if (msg.type === "result") {
|
|
163
|
+
setTimeout(syncCosts, 100);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// Refresh branch when sessions reload (might have changed branch)
|
|
168
|
+
on("ws:message", (msg) => {
|
|
169
|
+
if (msg.type === "session") {
|
|
170
|
+
setTimeout(fetchBranch, 500);
|
|
171
|
+
}
|
|
172
|
+
});
|