@bakapiano/ccsm 0.14.0 → 0.15.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 (52) hide show
  1. package/CLAUDE.md +474 -475
  2. package/README.md +189 -190
  3. package/bin/ccsm.js +194 -194
  4. package/lib/cliActivity.js +118 -0
  5. package/lib/codexSeed.js +147 -0
  6. package/lib/config.js +211 -188
  7. package/lib/folders.js +105 -105
  8. package/lib/localCliSessions.js +489 -489
  9. package/lib/persistedSessions.js +144 -142
  10. package/lib/webTerminal.js +224 -224
  11. package/lib/workspace.js +230 -230
  12. package/package.json +57 -57
  13. package/public/css/base.css +99 -99
  14. package/public/css/cards.css +183 -183
  15. package/public/css/feedback.css +303 -303
  16. package/public/css/forms.css +405 -405
  17. package/public/css/layout.css +160 -160
  18. package/public/css/modal.css +190 -190
  19. package/public/css/responsive.css +10 -10
  20. package/public/css/sidebar.css +613 -608
  21. package/public/css/terminals.css +294 -294
  22. package/public/css/tokens.css +81 -81
  23. package/public/css/wco.css +98 -98
  24. package/public/css/widgets.css +1628 -1628
  25. package/public/index.html +111 -105
  26. package/public/js/api.js +296 -280
  27. package/public/js/components/AdoptModal.js +343 -343
  28. package/public/js/components/App.js +35 -35
  29. package/public/js/components/DirectoryPicker.js +203 -203
  30. package/public/js/components/EntityFormModal.js +141 -141
  31. package/public/js/components/Modal.js +51 -51
  32. package/public/js/components/OfflineBanner.js +93 -93
  33. package/public/js/components/PageTitleBar.js +13 -13
  34. package/public/js/components/Picker.js +179 -179
  35. package/public/js/components/Popover.js +55 -55
  36. package/public/js/components/Sidebar.js +299 -299
  37. package/public/js/components/TerminalView.js +314 -314
  38. package/public/js/components/useDragSort.js +67 -67
  39. package/public/js/dialog.js +67 -67
  40. package/public/js/icons.js +177 -177
  41. package/public/js/main.js +132 -132
  42. package/public/js/pages/AboutPage.js +165 -165
  43. package/public/js/pages/ConfigurePage.js +505 -475
  44. package/public/js/pages/LaunchPage.js +369 -369
  45. package/public/js/pages/SessionsPage.js +101 -97
  46. package/public/js/state.js +231 -231
  47. package/scripts/dev.js +44 -11
  48. package/scripts/install.js +158 -158
  49. package/scripts/restart-helper.js +91 -0
  50. package/server.js +1278 -1254
  51. package/lib/cliSessionWatcher.js +0 -275
  52. package/public/manifest.webmanifest +0 -15
package/public/index.html CHANGED
@@ -1,105 +1,111 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <!-- Bleeds the cream surface into the Edge/Chrome --app= title bar
7
- so it visually disappears against the body. The browser does
8
- honor this in standalone app windows. -->
9
- <meta name="theme-color" content="#f6f8fa" />
10
- <meta name="color-scheme" content="light" />
11
- <title>CCSM</title>
12
- <!-- All asset paths are RELATIVE so the same index.html works when
13
- served from localhost:7777/ (backend bundle) AND from
14
- https://bakapiano.github.io/ccsm/v1/ (GH Pages hosted). -->
15
- <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
16
- <link rel="manifest" href="./manifest.webmanifest" />
17
- <!-- Apply accent color BEFORE stylesheets/paint to avoid a flash
18
- of the default warm-cream tokens.css bg. Mirrors
19
- applyAccentCssVars() in state.js. Falls back to the Ocean
20
- default (#2f6fa3) when no accent is saved so first-time
21
- visitors also see the correct bg from the first frame. -->
22
- <script>
23
- (function () {
24
- try {
25
- var hex = localStorage.getItem('ccsm.accent');
26
- if (!/^#[0-9a-fA-F]{6}$/.test(hex || '')) hex = '#2f6fa3';
27
- var n = parseInt(hex.slice(1), 16);
28
- var r = (n >> 16) & 255, g = (n >> 8) & 255, b = n & 255;
29
- var toHex = function (v) { v = Math.max(0, Math.min(255, Math.round(v))); var s = v.toString(16); return s.length < 2 ? '0' + s : s; };
30
- var mix = function (t) { return '#' + toHex(r * t + 255 * (1 - t)) + toHex(g * t + 255 * (1 - t)) + toHex(b * t + 255 * (1 - t)); };
31
- var darken = function (a) { return '#' + toHex(r * (1 - a)) + toHex(g * (1 - a)) + toHex(b * (1 - a)); };
32
- var bg = mix(0.04);
33
- var root = document.documentElement.style;
34
- root.setProperty('--accent', hex);
35
- root.setProperty('--accent-deep', darken(0.2));
36
- root.setProperty('--accent-soft', 'rgba(' + r + ',' + g + ',' + b + ',0.10)');
37
- root.setProperty('--accent-softer', 'rgba(' + r + ',' + g + ',' + b + ',0.04)');
38
- root.setProperty('--bg', bg);
39
- root.setProperty('--sidebar-bg', bg);
40
- root.setProperty('--sidebar-hover', mix(0.10));
41
- root.setProperty('--sidebar-active', mix(0.15));
42
- root.setProperty('--border', mix(0.15));
43
- root.setProperty('--border-soft', mix(0.12));
44
- root.setProperty('--border-strong', mix(0.25));
45
- root.setProperty('--ui-bg', mix(0.10));
46
- var meta = document.querySelector('meta[name="theme-color"]');
47
- if (meta) meta.setAttribute('content', bg);
48
- } catch (_) {}
49
- })();
50
- </script>
51
- <link rel="preconnect" href="https://fonts.googleapis.com" />
52
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
53
- <link
54
- rel="stylesheet"
55
- href="https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&family=JetBrains+Mono:wght@400..600&display=swap"
56
- />
57
- <link rel="stylesheet" href="./css/tokens.css" />
58
- <link rel="stylesheet" href="./css/base.css" />
59
- <link rel="stylesheet" href="./css/layout.css" />
60
- <link rel="stylesheet" href="./css/sidebar.css" />
61
- <link rel="stylesheet" href="./css/cards.css" />
62
- <link rel="stylesheet" href="./css/tables.css" />
63
- <link rel="stylesheet" href="./css/forms.css" />
64
- <link rel="stylesheet" href="./css/widgets.css" />
65
- <link rel="stylesheet" href="./css/feedback.css" />
66
- <link rel="stylesheet" href="./css/modal.css" />
67
- <link rel="stylesheet" href="./css/terminals.css" />
68
- <link rel="stylesheet" href="./css/wco.css" />
69
- <link rel="stylesheet" href="./css/responsive.css" />
70
-
71
- <script type="importmap">
72
- {
73
- "imports": {
74
- "preact": "https://esm.sh/preact@10.27.0",
75
- "preact/hooks": "https://esm.sh/preact@10.27.0/hooks",
76
- "preact/compat": "https://esm.sh/preact@10.27.0/compat",
77
- "@preact/signals": "https://esm.sh/@preact/signals@1.3.2?deps=preact@10.27.0",
78
- "htm": "https://esm.sh/htm@3.1.1",
79
- "@xterm/xterm": "https://esm.sh/@xterm/xterm@5.5.0",
80
- "@xterm/addon-fit": "https://esm.sh/@xterm/addon-fit@0.10.0?deps=@xterm/xterm@5.5.0",
81
- "@xterm/addon-web-links": "https://esm.sh/@xterm/addon-web-links@0.11.0?deps=@xterm/xterm@5.5.0",
82
- "@xterm/addon-clipboard": "https://esm.sh/@xterm/addon-clipboard@0.1.0?deps=@xterm/xterm@5.5.0",
83
- "@xterm/addon-webgl": "https://esm.sh/@xterm/addon-webgl@0.18.0?deps=@xterm/xterm@5.5.0"
84
- }
85
- }
86
- </script>
87
- <link rel="stylesheet" href="https://esm.sh/@xterm/xterm@5.5.0/css/xterm.css" />
88
- </head>
89
- <body>
90
- <div id="app"></div>
91
- <script type="module" src="./js/main.js"></script>
92
- <script>
93
- // Dev hot-reload — only active when the page itself loads from a
94
- // local backend (the /api/dev/ping endpoint exists only on a dev
95
- // checkout). On the GH Pages copy this skips entirely.
96
- if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
97
- fetch('/api/dev/ping', { cache: 'no-store' }).then((r) => {
98
- if (!r.ok) return;
99
- const es = new EventSource('/api/dev/reload');
100
- es.addEventListener('reload', () => location.reload());
101
- }).catch(() => {});
102
- }
103
- </script>
104
- </body>
105
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <!-- Bleeds the cream surface into the Edge/Chrome --app= title bar
7
+ so it visually disappears against the body. The browser does
8
+ honor this in standalone app windows. -->
9
+ <meta name="theme-color" content="#f6f8fa" />
10
+ <meta name="color-scheme" content="light" />
11
+ <title>CCSM</title>
12
+ <!-- All asset paths are RELATIVE so the same index.html works when
13
+ served from localhost:7777/ (backend bundle) AND from
14
+ https://bakapiano.github.io/ccsm/v1/ (GH Pages hosted). -->
15
+ <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
16
+ <!-- Point at the ROOT manifest (/ccsm/manifest.webmanifest) so the
17
+ installable PWA is scoped to /ccsm/, covering every per-version
18
+ subdir. If we shipped a per-version manifest the browser would
19
+ scope the PWA to /ccsm/X.Y.Z/ then the version-guard's
20
+ redirect to ../ on backend upgrade would fall out of scope and
21
+ the OS would re-show an address bar. -->
22
+ <link rel="manifest" href="../manifest.webmanifest" />
23
+ <!-- Apply accent color BEFORE stylesheets/paint to avoid a flash
24
+ of the default warm-cream tokens.css bg. Mirrors
25
+ applyAccentCssVars() in state.js. Falls back to the Ocean
26
+ default (#2f6fa3) when no accent is saved so first-time
27
+ visitors also see the correct bg from the first frame. -->
28
+ <script>
29
+ (function () {
30
+ try {
31
+ var hex = localStorage.getItem('ccsm.accent');
32
+ if (!/^#[0-9a-fA-F]{6}$/.test(hex || '')) hex = '#2f6fa3';
33
+ var n = parseInt(hex.slice(1), 16);
34
+ var r = (n >> 16) & 255, g = (n >> 8) & 255, b = n & 255;
35
+ var toHex = function (v) { v = Math.max(0, Math.min(255, Math.round(v))); var s = v.toString(16); return s.length < 2 ? '0' + s : s; };
36
+ var mix = function (t) { return '#' + toHex(r * t + 255 * (1 - t)) + toHex(g * t + 255 * (1 - t)) + toHex(b * t + 255 * (1 - t)); };
37
+ var darken = function (a) { return '#' + toHex(r * (1 - a)) + toHex(g * (1 - a)) + toHex(b * (1 - a)); };
38
+ var bg = mix(0.04);
39
+ var root = document.documentElement.style;
40
+ root.setProperty('--accent', hex);
41
+ root.setProperty('--accent-deep', darken(0.2));
42
+ root.setProperty('--accent-soft', 'rgba(' + r + ',' + g + ',' + b + ',0.10)');
43
+ root.setProperty('--accent-softer', 'rgba(' + r + ',' + g + ',' + b + ',0.04)');
44
+ root.setProperty('--bg', bg);
45
+ root.setProperty('--sidebar-bg', bg);
46
+ root.setProperty('--sidebar-hover', mix(0.10));
47
+ root.setProperty('--sidebar-active', mix(0.15));
48
+ root.setProperty('--border', mix(0.15));
49
+ root.setProperty('--border-soft', mix(0.12));
50
+ root.setProperty('--border-strong', mix(0.25));
51
+ root.setProperty('--ui-bg', mix(0.10));
52
+ var meta = document.querySelector('meta[name="theme-color"]');
53
+ if (meta) meta.setAttribute('content', bg);
54
+ } catch (_) {}
55
+ })();
56
+ </script>
57
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
58
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
59
+ <link
60
+ rel="stylesheet"
61
+ href="https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&family=JetBrains+Mono:wght@400..600&display=swap"
62
+ />
63
+ <link rel="stylesheet" href="./css/tokens.css" />
64
+ <link rel="stylesheet" href="./css/base.css" />
65
+ <link rel="stylesheet" href="./css/layout.css" />
66
+ <link rel="stylesheet" href="./css/sidebar.css" />
67
+ <link rel="stylesheet" href="./css/cards.css" />
68
+ <link rel="stylesheet" href="./css/tables.css" />
69
+ <link rel="stylesheet" href="./css/forms.css" />
70
+ <link rel="stylesheet" href="./css/widgets.css" />
71
+ <link rel="stylesheet" href="./css/feedback.css" />
72
+ <link rel="stylesheet" href="./css/modal.css" />
73
+ <link rel="stylesheet" href="./css/terminals.css" />
74
+ <link rel="stylesheet" href="./css/wco.css" />
75
+ <link rel="stylesheet" href="./css/responsive.css" />
76
+
77
+ <script type="importmap">
78
+ {
79
+ "imports": {
80
+ "preact": "https://esm.sh/preact@10.27.0",
81
+ "preact/hooks": "https://esm.sh/preact@10.27.0/hooks",
82
+ "preact/compat": "https://esm.sh/preact@10.27.0/compat",
83
+ "@preact/signals": "https://esm.sh/@preact/signals@1.3.2?deps=preact@10.27.0",
84
+ "htm": "https://esm.sh/htm@3.1.1",
85
+ "@xterm/xterm": "https://esm.sh/@xterm/xterm@5.5.0",
86
+ "@xterm/addon-fit": "https://esm.sh/@xterm/addon-fit@0.10.0?deps=@xterm/xterm@5.5.0",
87
+ "@xterm/addon-web-links": "https://esm.sh/@xterm/addon-web-links@0.11.0?deps=@xterm/xterm@5.5.0",
88
+ "@xterm/addon-clipboard": "https://esm.sh/@xterm/addon-clipboard@0.1.0?deps=@xterm/xterm@5.5.0",
89
+ "@xterm/addon-webgl": "https://esm.sh/@xterm/addon-webgl@0.18.0?deps=@xterm/xterm@5.5.0"
90
+ }
91
+ }
92
+ </script>
93
+ <link rel="stylesheet" href="https://esm.sh/@xterm/xterm@5.5.0/css/xterm.css" />
94
+ </head>
95
+ <body>
96
+ <div id="app"></div>
97
+ <script type="module" src="./js/main.js"></script>
98
+ <script>
99
+ // Dev hot-reload only active when the page itself loads from a
100
+ // local backend (the /api/dev/ping endpoint exists only on a dev
101
+ // checkout). On the GH Pages copy this skips entirely.
102
+ if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
103
+ fetch('/api/dev/ping', { cache: 'no-store' }).then((r) => {
104
+ if (!r.ok) return;
105
+ const es = new EventSource('/api/dev/reload');
106
+ es.addEventListener('reload', () => location.reload());
107
+ }).catch(() => {});
108
+ }
109
+ </script>
110
+ </body>
111
+ </html>