@bakapiano/ccsm 0.14.0 → 0.15.1

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 (53) 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 +205 -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 +173 -165
  43. package/public/js/pages/ConfigurePage.js +513 -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 +96 -0
  50. package/scripts/upgrade-helper.js +6 -1
  51. package/server.js +1282 -1254
  52. package/lib/cliSessionWatcher.js +0 -275
  53. package/public/manifest.webmanifest +0 -15
@@ -1,81 +1,81 @@
1
- /* ccsm · design tokens · v0.6 */
2
-
3
- :root {
4
- /* Surfaces — pale near-white tinted with the default Ocean accent.
5
- These match what state.js · applyAccentCssVars computes for the
6
- #2f6fa3 default, so the first paint (before the inline accent
7
- script in index.html runs) never flashes the old warm-cream bg. */
8
- --bg: #f6f8fa;
9
- --bg-elev: #ffffff;
10
- --sidebar-bg: #f6f8fa;
11
- --sidebar-hover: #e2ebf3;
12
- --sidebar-active: #d3e1ed;
13
-
14
- /* Neutral UI chrome — borders, footer strip, etc. These are NEVER
15
- re-derived from the accent so dividers stay calm regardless of
16
- theme choice. */
17
- --ui-border: #d8d4c6;
18
- --ui-border-soft: #e6e2d4;
19
- --ui-bg: #e2ebf3;
20
-
21
- /* Borders & rules — tinted with the default Ocean accent to match
22
- what state.js writes at boot. */
23
- --border: #d3e1ed;
24
- --border-soft: #d8e4ee;
25
- --border-strong: #c0d5e5;
26
-
27
- /* Ink */
28
- --ink: #1a1815;
29
- --ink-mid: #534e44;
30
- --ink-muted: #8a8475;
31
- --ink-faint: #b5af9d;
32
-
33
- /* Accent — Ocean blue. Calm and content-first. Users can override via
34
- the Theme accent picker in Settings; that flow rewrites these vars
35
- at runtime (state.js · applyAccentCssVars). */
36
- --accent: #2f6fa3;
37
- --accent-deep: #25577f;
38
- --accent-soft: rgba(47, 111, 163, 0.10);
39
- --accent-softer: rgba(47, 111, 163, 0.04);
40
-
41
- /* Status */
42
- --green: #4a8a4a;
43
- --yellow: #c4892b;
44
- --red: #b73f3f;
45
- --blue: #4a73a5;
46
-
47
- /* Type */
48
- --body: "Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
49
- --display: "Geist", ui-sans-serif, system-ui, sans-serif;
50
- --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
51
-
52
- /* Scale */
53
- --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
54
- --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
55
- --s-12: 48px; --s-16: 64px;
56
-
57
- /* Radius — tightened in v1.0 for a more codex-like crisp feel.
58
- 999px stays in code where pills are intentional (status dots etc). */
59
- --r-sm: 3px;
60
- --r: 4px;
61
- --r-md: 5px;
62
- --r-lg: 6px;
63
-
64
- /* Shadow — soft, like print on cream */
65
- --shadow-sm: 0 1px 0 rgba(26, 24, 21, 0.04);
66
- --shadow: 0 1px 2px rgba(26, 24, 21, 0.04),
67
- 0 1px 0 rgba(26, 24, 21, 0.03);
68
- --shadow-md: 0 4px 12px -2px rgba(26, 24, 21, 0.08),
69
- 0 1px 0 rgba(26, 24, 21, 0.04);
70
- --shadow-lg: 0 18px 40px -16px rgba(26, 24, 21, 0.18),
71
- 0 4px 12px -4px rgba(26, 24, 21, 0.10);
72
-
73
- /* Subtle paper grain — applied as a layered background on .app to give
74
- surfaces the texture of laid paper rather than flat color. SVG noise
75
- keeps it crisp at any zoom level. */
76
- --paper-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
77
-
78
- /* Sidebar geometry */
79
- --sidebar-w: 232px;
80
- --sidebar-w-collapsed: 44px;
81
- }
1
+ /* ccsm · design tokens · v0.6 */
2
+
3
+ :root {
4
+ /* Surfaces — pale near-white tinted with the default Ocean accent.
5
+ These match what state.js · applyAccentCssVars computes for the
6
+ #2f6fa3 default, so the first paint (before the inline accent
7
+ script in index.html runs) never flashes the old warm-cream bg. */
8
+ --bg: #f6f8fa;
9
+ --bg-elev: #ffffff;
10
+ --sidebar-bg: #f6f8fa;
11
+ --sidebar-hover: #e2ebf3;
12
+ --sidebar-active: #d3e1ed;
13
+
14
+ /* Neutral UI chrome — borders, footer strip, etc. These are NEVER
15
+ re-derived from the accent so dividers stay calm regardless of
16
+ theme choice. */
17
+ --ui-border: #d8d4c6;
18
+ --ui-border-soft: #e6e2d4;
19
+ --ui-bg: #e2ebf3;
20
+
21
+ /* Borders & rules — tinted with the default Ocean accent to match
22
+ what state.js writes at boot. */
23
+ --border: #d3e1ed;
24
+ --border-soft: #d8e4ee;
25
+ --border-strong: #c0d5e5;
26
+
27
+ /* Ink */
28
+ --ink: #1a1815;
29
+ --ink-mid: #534e44;
30
+ --ink-muted: #8a8475;
31
+ --ink-faint: #b5af9d;
32
+
33
+ /* Accent — Ocean blue. Calm and content-first. Users can override via
34
+ the Theme accent picker in Settings; that flow rewrites these vars
35
+ at runtime (state.js · applyAccentCssVars). */
36
+ --accent: #2f6fa3;
37
+ --accent-deep: #25577f;
38
+ --accent-soft: rgba(47, 111, 163, 0.10);
39
+ --accent-softer: rgba(47, 111, 163, 0.04);
40
+
41
+ /* Status */
42
+ --green: #4a8a4a;
43
+ --yellow: #c4892b;
44
+ --red: #b73f3f;
45
+ --blue: #4a73a5;
46
+
47
+ /* Type */
48
+ --body: "Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
49
+ --display: "Geist", ui-sans-serif, system-ui, sans-serif;
50
+ --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
51
+
52
+ /* Scale */
53
+ --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
54
+ --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
55
+ --s-12: 48px; --s-16: 64px;
56
+
57
+ /* Radius — tightened in v1.0 for a more codex-like crisp feel.
58
+ 999px stays in code where pills are intentional (status dots etc). */
59
+ --r-sm: 3px;
60
+ --r: 4px;
61
+ --r-md: 5px;
62
+ --r-lg: 6px;
63
+
64
+ /* Shadow — soft, like print on cream */
65
+ --shadow-sm: 0 1px 0 rgba(26, 24, 21, 0.04);
66
+ --shadow: 0 1px 2px rgba(26, 24, 21, 0.04),
67
+ 0 1px 0 rgba(26, 24, 21, 0.03);
68
+ --shadow-md: 0 4px 12px -2px rgba(26, 24, 21, 0.08),
69
+ 0 1px 0 rgba(26, 24, 21, 0.04);
70
+ --shadow-lg: 0 18px 40px -16px rgba(26, 24, 21, 0.18),
71
+ 0 4px 12px -4px rgba(26, 24, 21, 0.10);
72
+
73
+ /* Subtle paper grain — applied as a layered background on .app to give
74
+ surfaces the texture of laid paper rather than flat color. SVG noise
75
+ keeps it crisp at any zoom level. */
76
+ --paper-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
77
+
78
+ /* Sidebar geometry */
79
+ --sidebar-w: 232px;
80
+ --sidebar-w-collapsed: 44px;
81
+ }
@@ -1,98 +1,98 @@
1
- /* PWA / --app= window drag regions.
2
- *
3
- * `-webkit-app-region: drag` is a Chromium-only property; it has effect in
4
- * Electron, installed PWA windows, AND in `--app=` chromeless mode where
5
- * the manifest's display_override unlocks WCO-ish behaviour. In a plain
6
- * browser tab it's silently ignored. We therefore apply it *unconditionally*
7
- * (no `@media (display-mode: …)` gate) so any surface that does honour it
8
- * gets the drag handles — particularly the case where Edge `--app=` reads
9
- * our manifest, hides its own OS title bar, but still reports
10
- * display-mode: browser. Without unconditional rules, that window has
11
- * neither a native title bar to grab NOR app-region drag → undraggable.
12
- */
13
-
14
- .sidebar-brand,
15
- .sidebar-top,
16
- .page-title-bar,
17
- .page-head,
18
- .page-head-inner,
19
- .page-title,
20
- .page-subtitle {
21
- -webkit-app-region: drag;
22
- app-region: drag;
23
- }
24
-
25
- /* Any interactive element opts out of drag so click / focus / scroll
26
- still reach the page. */
27
- button, a, input, select, textarea, label,
28
- .nav-item, .util-item, .collapse-toggle,
29
- .action, .server-status,
30
- .star-btn, .rename-btn, .card-fold, .modal-close,
31
- .chip, .radio, .fab,
32
- .ph-stat, .ph-divider,
33
- .page-title-bar-actions,
34
- .session-title-action {
35
- -webkit-app-region: no-drag;
36
- app-region: no-drag;
37
- }
38
-
39
- body.is-app .sidebar-brand,
40
- body.is-app .sidebar-top,
41
- body.is-app .page-title-bar,
42
- body.is-app .page-head,
43
- body.is-app .page-head-inner,
44
- body.is-app .page-title,
45
- body.is-app .page-subtitle {
46
- user-select: none;
47
- -webkit-user-select: none;
48
- }
49
-
50
- /* In an app/PWA window, the OS title bar is hidden and only floating
51
- close/max/min controls remain in the top-right. The 40px top band of
52
- ccsm (sidebar-top + page-title-bar) IS that title bar — it's already
53
- tall enough, sits at y=0 with no extra padding, and gets a drag region
54
- so the user can grab anywhere along it to move the window. */
55
- body.is-app .sidebar { padding-top: 0; }
56
- body.is-app .main { padding-top: 0; }
57
-
58
- /* Reserve room on the right of page-title-bar so its action buttons don't
59
- slide under the floating OS controls. 150px covers Windows controls
60
- (~46px each × 3) with breathing room; macOS traffic lights are on the
61
- left so this padding is harmless there. WCO override below uses the
62
- precise env() value when available. */
63
- body.is-app .page-title-bar {
64
- padding-right: calc(var(--s-4) + 150px);
65
- }
66
-
67
- body.is-app .page-title,
68
- body.is-app .page-subtitle {
69
- display: none;
70
- }
71
- body.is-app .page-head {
72
- padding-bottom: 0;
73
- border-bottom: 0;
74
- align-items: center;
75
- min-height: 28px;
76
- }
77
-
78
- /* PWA / WCO / --app= mode: shrink the top band to 32px so its mid-line
79
- matches the OS-floated close/max/min icons (which sit in a fixed ~32px
80
- bar at y=0 and can't be moved). Outside app mode we keep the roomier
81
- 40px band — see sidebar.css / layout.css. */
82
- body.is-app .page-title-bar,
83
- body.is-app .sidebar-top {
84
- height: 32px;
85
- min-height: 32px;
86
- }
87
- body.is-app .sidebar-brand,
88
- body.is-app .sidebar-brand-button,
89
- body.is-app .collapse-toggle {
90
- height: 32px;
91
- min-height: 32px;
92
- }
93
-
94
- @media (display-mode: window-controls-overlay) {
95
- body.is-app .page-title-bar {
96
- padding-right: calc(var(--s-4) + 100vw - env(titlebar-area-width, 100vw));
97
- }
98
- }
1
+ /* PWA / --app= window drag regions.
2
+ *
3
+ * `-webkit-app-region: drag` is a Chromium-only property; it has effect in
4
+ * Electron, installed PWA windows, AND in `--app=` chromeless mode where
5
+ * the manifest's display_override unlocks WCO-ish behaviour. In a plain
6
+ * browser tab it's silently ignored. We therefore apply it *unconditionally*
7
+ * (no `@media (display-mode: …)` gate) so any surface that does honour it
8
+ * gets the drag handles — particularly the case where Edge `--app=` reads
9
+ * our manifest, hides its own OS title bar, but still reports
10
+ * display-mode: browser. Without unconditional rules, that window has
11
+ * neither a native title bar to grab NOR app-region drag → undraggable.
12
+ */
13
+
14
+ .sidebar-brand,
15
+ .sidebar-top,
16
+ .page-title-bar,
17
+ .page-head,
18
+ .page-head-inner,
19
+ .page-title,
20
+ .page-subtitle {
21
+ -webkit-app-region: drag;
22
+ app-region: drag;
23
+ }
24
+
25
+ /* Any interactive element opts out of drag so click / focus / scroll
26
+ still reach the page. */
27
+ button, a, input, select, textarea, label,
28
+ .nav-item, .util-item, .collapse-toggle,
29
+ .action, .server-status,
30
+ .star-btn, .rename-btn, .card-fold, .modal-close,
31
+ .chip, .radio, .fab,
32
+ .ph-stat, .ph-divider,
33
+ .page-title-bar-actions,
34
+ .session-title-action {
35
+ -webkit-app-region: no-drag;
36
+ app-region: no-drag;
37
+ }
38
+
39
+ body.is-app .sidebar-brand,
40
+ body.is-app .sidebar-top,
41
+ body.is-app .page-title-bar,
42
+ body.is-app .page-head,
43
+ body.is-app .page-head-inner,
44
+ body.is-app .page-title,
45
+ body.is-app .page-subtitle {
46
+ user-select: none;
47
+ -webkit-user-select: none;
48
+ }
49
+
50
+ /* In an app/PWA window, the OS title bar is hidden and only floating
51
+ close/max/min controls remain in the top-right. The 40px top band of
52
+ ccsm (sidebar-top + page-title-bar) IS that title bar — it's already
53
+ tall enough, sits at y=0 with no extra padding, and gets a drag region
54
+ so the user can grab anywhere along it to move the window. */
55
+ body.is-app .sidebar { padding-top: 0; }
56
+ body.is-app .main { padding-top: 0; }
57
+
58
+ /* Reserve room on the right of page-title-bar so its action buttons don't
59
+ slide under the floating OS controls. 150px covers Windows controls
60
+ (~46px each × 3) with breathing room; macOS traffic lights are on the
61
+ left so this padding is harmless there. WCO override below uses the
62
+ precise env() value when available. */
63
+ body.is-app .page-title-bar {
64
+ padding-right: calc(var(--s-4) + 150px);
65
+ }
66
+
67
+ body.is-app .page-title,
68
+ body.is-app .page-subtitle {
69
+ display: none;
70
+ }
71
+ body.is-app .page-head {
72
+ padding-bottom: 0;
73
+ border-bottom: 0;
74
+ align-items: center;
75
+ min-height: 28px;
76
+ }
77
+
78
+ /* PWA / WCO / --app= mode: shrink the top band to 32px so its mid-line
79
+ matches the OS-floated close/max/min icons (which sit in a fixed ~32px
80
+ bar at y=0 and can't be moved). Outside app mode we keep the roomier
81
+ 40px band — see sidebar.css / layout.css. */
82
+ body.is-app .page-title-bar,
83
+ body.is-app .sidebar-top {
84
+ height: 32px;
85
+ min-height: 32px;
86
+ }
87
+ body.is-app .sidebar-brand,
88
+ body.is-app .sidebar-brand-button,
89
+ body.is-app .collapse-toggle {
90
+ height: 32px;
91
+ min-height: 32px;
92
+ }
93
+
94
+ @media (display-mode: window-controls-overlay) {
95
+ body.is-app .page-title-bar {
96
+ padding-right: calc(var(--s-4) + 100vw - env(titlebar-area-width, 100vw));
97
+ }
98
+ }