@chrysb/alphaclaw 0.3.2 → 0.3.4-beta.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.
Files changed (54) hide show
  1. package/bin/alphaclaw.js +47 -2
  2. package/lib/cli/git-sync.js +25 -0
  3. package/lib/plugin/usage-tracker/index.js +308 -0
  4. package/lib/plugin/usage-tracker/openclaw.plugin.json +8 -0
  5. package/lib/public/css/explorer.css +1033 -0
  6. package/lib/public/css/shell.css +50 -4
  7. package/lib/public/css/theme.css +41 -1
  8. package/lib/public/icons/folder-line.svg +1 -0
  9. package/lib/public/icons/hashtag.svg +3 -0
  10. package/lib/public/icons/home-5-line.svg +1 -0
  11. package/lib/public/icons/save-fill.svg +3 -0
  12. package/lib/public/js/app.js +310 -160
  13. package/lib/public/js/components/action-button.js +12 -1
  14. package/lib/public/js/components/file-tree.js +497 -0
  15. package/lib/public/js/components/file-viewer.js +714 -0
  16. package/lib/public/js/components/icons.js +182 -0
  17. package/lib/public/js/components/segmented-control.js +33 -0
  18. package/lib/public/js/components/sidebar-git-panel.js +149 -0
  19. package/lib/public/js/components/sidebar.js +254 -0
  20. package/lib/public/js/components/telegram-workspace/index.js +353 -0
  21. package/lib/public/js/components/telegram-workspace/manage.js +397 -0
  22. package/lib/public/js/components/telegram-workspace/onboarding.js +616 -0
  23. package/lib/public/js/components/usage-tab.js +528 -0
  24. package/lib/public/js/components/watchdog-tab.js +1 -1
  25. package/lib/public/js/lib/api.js +51 -1
  26. package/lib/public/js/lib/browse-draft-state.js +109 -0
  27. package/lib/public/js/lib/file-highlighting.js +6 -0
  28. package/lib/public/js/lib/file-tree-utils.js +12 -0
  29. package/lib/public/js/lib/syntax-highlighters/css.js +124 -0
  30. package/lib/public/js/lib/syntax-highlighters/frontmatter.js +49 -0
  31. package/lib/public/js/lib/syntax-highlighters/html.js +209 -0
  32. package/lib/public/js/lib/syntax-highlighters/index.js +28 -0
  33. package/lib/public/js/lib/syntax-highlighters/javascript.js +134 -0
  34. package/lib/public/js/lib/syntax-highlighters/json.js +61 -0
  35. package/lib/public/js/lib/syntax-highlighters/markdown.js +37 -0
  36. package/lib/public/js/lib/syntax-highlighters/utils.js +13 -0
  37. package/lib/public/js/lib/telegram-api.js +78 -0
  38. package/lib/public/js/lib/ui-settings.js +38 -0
  39. package/lib/public/setup.html +34 -29
  40. package/lib/server/alphaclaw-version.js +3 -3
  41. package/lib/server/constants.js +2 -0
  42. package/lib/server/onboarding/openclaw.js +15 -0
  43. package/lib/server/onboarding/workspace.js +3 -2
  44. package/lib/server/routes/auth.js +5 -1
  45. package/lib/server/routes/browse.js +295 -0
  46. package/lib/server/routes/telegram.js +185 -60
  47. package/lib/server/routes/usage.js +133 -0
  48. package/lib/server/usage-db.js +570 -0
  49. package/lib/server.js +45 -4
  50. package/lib/setup/core-prompts/AGENTS.md +0 -101
  51. package/lib/setup/core-prompts/TOOLS.md +3 -1
  52. package/lib/setup/skills/control-ui/SKILL.md +12 -20
  53. package/package.json +1 -1
  54. package/lib/public/js/components/telegram-workspace.js +0 -1365
@@ -1,8 +1,9 @@
1
1
  /* ── App shell grid ─────────────────────────────── */
2
2
 
3
3
  .app-shell {
4
+ --sidebar-width: 220px;
4
5
  display: grid;
5
- grid-template-columns: 220px 1fr;
6
+ grid-template-columns: var(--sidebar-width) 0px minmax(0, 1fr);
6
7
  grid-template-rows: auto 1fr 24px;
7
8
  height: 100vh;
8
9
  position: relative;
@@ -42,6 +43,7 @@
42
43
  }
43
44
 
44
45
  .app-content {
46
+ grid-column: 3;
45
47
  grid-row: 2;
46
48
  overflow-y: auto;
47
49
  padding: 24px 32px;
@@ -52,16 +54,54 @@
52
54
  /* ── Sidebar ───────────────────────────────────── */
53
55
 
54
56
  .app-sidebar {
57
+ grid-column: 1;
55
58
  grid-row: 2;
56
59
  background:
57
- linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.012) 100%),
60
+ linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0%, rgba(255, 255, 255, 0.006) 100%),
61
+ linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.16) 100%),
58
62
  var(--bg-sidebar);
59
- border-right: 1px solid var(--border-strong);
63
+ border-right: 1px solid var(--border);
60
64
  overflow-y: auto;
61
65
  display: flex;
62
66
  flex-direction: column;
63
67
  }
64
68
 
69
+ .sidebar-resizer {
70
+ grid-column: 2;
71
+ grid-row: 2;
72
+ cursor: col-resize;
73
+ position: relative;
74
+ width: 6px;
75
+ margin-left: -3px;
76
+ z-index: 4;
77
+ }
78
+
79
+ .sidebar-resizer::before {
80
+ content: "";
81
+ position: absolute;
82
+ left: 0;
83
+ top: 0;
84
+ bottom: 0;
85
+ width: 6px;
86
+ background: transparent;
87
+ }
88
+
89
+ .sidebar-resizer::after {
90
+ content: "";
91
+ position: absolute;
92
+ left: 2px;
93
+ top: 0;
94
+ bottom: 0;
95
+ width: 2px;
96
+ background: transparent;
97
+ transition: background 0.12s;
98
+ }
99
+
100
+ .sidebar-resizer:hover::after,
101
+ .sidebar-resizer.is-resizing::after {
102
+ background: rgba(99, 235, 255, 0.55);
103
+ }
104
+
65
105
  .sidebar-brand {
66
106
  padding: 16px;
67
107
  font-size: 14px;
@@ -122,7 +162,7 @@
122
162
  .sidebar-footer:empty { display: none; }
123
163
 
124
164
  .sidebar-footer:not(:empty) {
125
- padding: 12px 16px;
165
+ padding: 0 16px 12px 16px;
126
166
  border-top: 1px solid var(--border);
127
167
  }
128
168
 
@@ -247,6 +287,7 @@
247
287
 
248
288
  @media (max-width: 768px) {
249
289
  .app-shell {
290
+ --sidebar-width: 0px !important;
250
291
  grid-template-columns: 1fr;
251
292
  grid-template-rows: auto 1fr 24px;
252
293
  }
@@ -267,10 +308,15 @@
267
308
  transform: none;
268
309
  }
269
310
  .app-content {
311
+ grid-column: 1;
270
312
  grid-row: 2;
271
313
  padding: 0 14px 12px;
272
314
  }
273
315
 
316
+ .sidebar-resizer {
317
+ display: none;
318
+ }
319
+
274
320
  .mobile-topbar {
275
321
  display: flex;
276
322
  align-items: center;
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  --bg: #0d121b;
3
- --bg-sidebar: #111826;
3
+ --bg-sidebar: #0f141f;
4
4
  --bg-content: #0f1521;
5
5
  --bg-hover: rgba(99, 235, 255, 0.05);
6
6
  --bg-active: rgba(99, 235, 255, 0.08);
@@ -12,6 +12,11 @@
12
12
  --accent: #63ebff;
13
13
  --accent-dim: rgba(99, 235, 255, 0.4);
14
14
  --accent-link: rgba(99, 235, 255, 0.6);
15
+ --orange: #d98a58;
16
+ --comment: #6a737d;
17
+ --keyword: #ff7b72;
18
+ --string: #a5d6ff;
19
+ --number: #79c0ff;
15
20
  --panel-bg-contrast: rgba(255, 255, 255, 0.028);
16
21
  --panel-border-contrast: rgba(255, 255, 255, 0.11);
17
22
  --field-bg-contrast: rgba(0, 0, 0, 0.3);
@@ -446,3 +451,38 @@ textarea:focus {
446
451
  animation-timing-function: linear;
447
452
  }
448
453
  }
454
+
455
+ /* Reusable segmented control (pill toggle). */
456
+ .ac-segmented-control {
457
+ display: inline-flex;
458
+ align-items: center;
459
+ border: 1px solid var(--panel-border-contrast);
460
+ border-radius: 8px;
461
+ overflow: hidden;
462
+ background: rgba(255, 255, 255, 0.02);
463
+ height: 28px;
464
+ }
465
+
466
+ .ac-segmented-control-button {
467
+ border: 0;
468
+ background: transparent;
469
+ color: var(--text-muted);
470
+ font-family: inherit;
471
+ font-size: 12px;
472
+ letter-spacing: 0.03em;
473
+ height: 100%;
474
+ line-height: 1;
475
+ padding: 0 10px;
476
+ cursor: pointer;
477
+ transition: color 0.12s, background 0.12s;
478
+ }
479
+
480
+ .ac-segmented-control-button:hover {
481
+ color: var(--text);
482
+ background: rgba(255, 255, 255, 0.03);
483
+ }
484
+
485
+ .ac-segmented-control-button.active {
486
+ color: var(--accent);
487
+ background: var(--bg-active);
488
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 5V19H20V7H11.5858L9.58579 5H4ZM12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5Z"></path></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
+ <path d="M7.78428 14L8.2047 10H4V8H8.41491L8.94043 3H10.9514L10.4259 8H14.4149L14.9404 3H16.9514L16.4259 8H20V10H16.2157L15.7953 14H20V16H15.5851L15.0596 21H13.0486L13.5741 16H9.58509L9.05957 21H7.04855L7.57407 16H4V14H7.78428ZM9.7953 14H13.7843L14.2047 10H10.2157L9.7953 14Z"></path>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13 19H19V9.97815L12 4.53371L5 9.97815V19H11V13H13V19ZM21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V9.48907C3 9.18048 3.14247 8.88917 3.38606 8.69972L11.3861 2.47749C11.7472 2.19663 12.2528 2.19663 12.6139 2.47749L20.6139 8.69972C20.8575 8.88917 21 9.18048 21 9.48907V20Z"></path></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
+ <path d="M18 21V13H6V21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H17L21 7V20C21 20.5523 20.5523 21 20 21H18ZM16 21H8V15H16V21Z"></path>
3
+ </svg>