@bakapiano/ccsm 0.22.2 → 0.22.4

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 (60) hide show
  1. package/CLAUDE.md +538 -538
  2. package/README.md +189 -189
  3. package/bin/ccsm.js +235 -235
  4. package/lib/cliActivity.js +139 -139
  5. package/lib/codexSeed.js +183 -183
  6. package/lib/config.js +274 -274
  7. package/lib/devices.js +229 -229
  8. package/lib/folders.js +124 -124
  9. package/lib/localCliSessions.js +519 -519
  10. package/lib/persistedSessions.js +129 -129
  11. package/lib/tunnel.js +621 -621
  12. package/lib/webTerminal.js +233 -231
  13. package/lib/workspace.js +233 -233
  14. package/package.json +57 -57
  15. package/public/css/base.css +99 -99
  16. package/public/css/cards.css +183 -183
  17. package/public/css/feedback.css +504 -504
  18. package/public/css/forms.css +453 -453
  19. package/public/css/layout.css +176 -176
  20. package/public/css/modal.css +190 -190
  21. package/public/css/responsive.css +176 -176
  22. package/public/css/sidebar.css +707 -707
  23. package/public/css/terminals.css +592 -592
  24. package/public/css/tokens.css +81 -81
  25. package/public/css/wco.css +196 -196
  26. package/public/css/widgets.css +2725 -2725
  27. package/public/index.html +152 -152
  28. package/public/js/api.js +371 -371
  29. package/public/js/backend.js +149 -149
  30. package/public/js/components/App.js +73 -73
  31. package/public/js/components/DirectoryPicker.js +203 -203
  32. package/public/js/components/EntityFormModal.js +153 -153
  33. package/public/js/components/Modal.js +57 -57
  34. package/public/js/components/OfflineBanner.js +67 -67
  35. package/public/js/components/PageTitleBar.js +13 -13
  36. package/public/js/components/PendingApprovalOverlay.js +128 -128
  37. package/public/js/components/Picker.js +179 -179
  38. package/public/js/components/Popover.js +55 -55
  39. package/public/js/components/RestartOverlay.js +36 -36
  40. package/public/js/components/Sidebar.js +380 -380
  41. package/public/js/components/TerminalInstance.js +187 -15
  42. package/public/js/components/TerminalResizeDebouncer.js +126 -0
  43. package/public/js/components/XtermTerminal.js +148 -14
  44. package/public/js/components/useDragSort.js +67 -67
  45. package/public/js/dialog.js +67 -67
  46. package/public/js/icons.js +212 -212
  47. package/public/js/main.js +296 -296
  48. package/public/js/pages/AboutPage.js +90 -90
  49. package/public/js/pages/ConfigurePage.js +713 -713
  50. package/public/js/pages/LaunchPage.js +421 -421
  51. package/public/js/pages/RemotePage.js +743 -743
  52. package/public/js/pages/SessionsPage.js +100 -100
  53. package/public/js/state.js +335 -335
  54. package/public/manifest.webmanifest +25 -0
  55. package/public/setup/index.html +567 -0
  56. package/scripts/dev.js +149 -149
  57. package/scripts/install.js +153 -153
  58. package/scripts/restart-helper.js +96 -96
  59. package/scripts/upgrade-helper.js +687 -687
  60. package/server.js +1807 -1807
@@ -1,90 +1,90 @@
1
- import { html } from '../html.js';
2
- import { serverHealth, installPrompt, isInstalledPwa } from '../state.js';
3
- import { setToast } from '../toast.js';
4
- import { Card } from '../components/Card.js';
5
- import { PageTitleBar } from '../components/PageTitleBar.js';
6
- import { BrandMark, IconGithub, IconExternal } from '../icons.js';
7
-
8
- const REPO_URL = 'https://github.com/bakapiano/ccsm';
9
- const NPM_URL = 'https://www.npmjs.com/package/@bakapiano/ccsm';
10
-
11
- async function onInstall() {
12
- const ev = installPrompt.value;
13
- if (!ev) return setToast('install prompt not available right now · try opening this URL in a regular Edge tab', 'error');
14
- ev.prompt();
15
- const { outcome } = await ev.userChoice;
16
- installPrompt.value = null;
17
- if (outcome === 'accepted') {
18
- setToast('installed · close + relaunch via npx ccsm to enable Window Controls Overlay');
19
- }
20
- }
21
-
22
- function InstallCard() {
23
- if (isInstalledPwa.value) return null;
24
- const canPrompt = !!installPrompt.value;
25
- return html`
26
- <${Card} title="Install as app">
27
- <p class="about-copy" style="margin-bottom: var(--s-3);">
28
- ccsm runs best as a Chromium PWA — title bar collapses into the page (Window Controls Overlay),
29
- and the launch shortcut becomes a standalone app. One-click install on supported browsers below.
30
- </p>
31
- <div class="about-links">
32
- <button class="action ${canPrompt ? 'primary' : 'subtle'}" onClick=${onInstall} disabled=${!canPrompt}>
33
- ${canPrompt ? 'Install ccsm' : 'Install not available'}
34
- </button>
35
- </div>
36
- ${!canPrompt ? html`
37
- <p class="muted-text" style="margin-top: var(--s-3);">
38
- If the button stays disabled: open <code>http://localhost:7777</code> in a regular Edge tab,
39
- click the address-bar install icon (⊕), then re-launch via <code>npx ccsm</code>.
40
- </p>` : null}
41
- </${Card}>`;
42
- }
43
-
44
- export function AboutPage() {
45
- const version = serverHealth.value.version;
46
-
47
- return html`
48
- <${PageTitleBar} title="About" />
49
- <${InstallCard} />
50
- <${Card} title="ccsm">
51
- <div class="about-block">
52
- <div class="about-hero">
53
- <span class="about-mark"><${BrandMark} /></span>
54
- <div>
55
- <div class="about-name">ccsm <span class="about-version">${version ? `v${version}` : ''}</span></div>
56
- <div class="about-tagline">Claude Code Session Manager · a single pane over every live <code>claude</code> session on this box.</div>
57
- </div>
58
- </div>
59
-
60
- <p class="about-copy">
61
- Lists live and recently-closed sessions, snapshots them every minute, restores them through Windows Terminal,
62
- and launches fresh sessions inside isolated workspaces. Designed for running 8–10 concurrent sessions across
63
- ad-hoc repo clones.
64
- </p>
65
-
66
- <div class="about-links">
67
- <a class="action" href=${REPO_URL} target="_blank" rel="noopener">
68
- <${IconGithub} /> GitHub <${IconExternal} />
69
- </a>
70
- <a class="action subtle" href=${NPM_URL} target="_blank" rel="noopener">
71
- npm <${IconExternal} />
72
- </a>
73
- </div>
74
-
75
- <dl class="about-meta">
76
- <dt>Install</dt>
77
- <dd><code>npx @bakapiano/ccsm</code></dd>
78
- <dt>Data directory</dt>
79
- <dd><code>~/.ccsm/</code> (override with <code>CCSM_HOME</code>)</dd>
80
- <dt>Platform</dt>
81
- <dd>Windows · Node 18+</dd>
82
- <dt>License</dt>
83
- <dd>MIT</dd>
84
- </dl>
85
- </div>
86
- </${Card}>
87
- <p class="muted-text" style="margin-top: var(--s-3); text-align:center;">
88
- Looking for upgrade controls? They moved to <strong>Settings → General → Version</strong>.
89
- </p>`;
90
- }
1
+ import { html } from '../html.js';
2
+ import { serverHealth, installPrompt, isInstalledPwa } from '../state.js';
3
+ import { setToast } from '../toast.js';
4
+ import { Card } from '../components/Card.js';
5
+ import { PageTitleBar } from '../components/PageTitleBar.js';
6
+ import { BrandMark, IconGithub, IconExternal } from '../icons.js';
7
+
8
+ const REPO_URL = 'https://github.com/bakapiano/ccsm';
9
+ const NPM_URL = 'https://www.npmjs.com/package/@bakapiano/ccsm';
10
+
11
+ async function onInstall() {
12
+ const ev = installPrompt.value;
13
+ if (!ev) return setToast('install prompt not available right now · try opening this URL in a regular Edge tab', 'error');
14
+ ev.prompt();
15
+ const { outcome } = await ev.userChoice;
16
+ installPrompt.value = null;
17
+ if (outcome === 'accepted') {
18
+ setToast('installed · close + relaunch via npx ccsm to enable Window Controls Overlay');
19
+ }
20
+ }
21
+
22
+ function InstallCard() {
23
+ if (isInstalledPwa.value) return null;
24
+ const canPrompt = !!installPrompt.value;
25
+ return html`
26
+ <${Card} title="Install as app">
27
+ <p class="about-copy" style="margin-bottom: var(--s-3);">
28
+ ccsm runs best as a Chromium PWA — title bar collapses into the page (Window Controls Overlay),
29
+ and the launch shortcut becomes a standalone app. One-click install on supported browsers below.
30
+ </p>
31
+ <div class="about-links">
32
+ <button class="action ${canPrompt ? 'primary' : 'subtle'}" onClick=${onInstall} disabled=${!canPrompt}>
33
+ ${canPrompt ? 'Install ccsm' : 'Install not available'}
34
+ </button>
35
+ </div>
36
+ ${!canPrompt ? html`
37
+ <p class="muted-text" style="margin-top: var(--s-3);">
38
+ If the button stays disabled: open <code>http://localhost:7777</code> in a regular Edge tab,
39
+ click the address-bar install icon (⊕), then re-launch via <code>npx ccsm</code>.
40
+ </p>` : null}
41
+ </${Card}>`;
42
+ }
43
+
44
+ export function AboutPage() {
45
+ const version = serverHealth.value.version;
46
+
47
+ return html`
48
+ <${PageTitleBar} title="About" />
49
+ <${InstallCard} />
50
+ <${Card} title="ccsm">
51
+ <div class="about-block">
52
+ <div class="about-hero">
53
+ <span class="about-mark"><${BrandMark} /></span>
54
+ <div>
55
+ <div class="about-name">ccsm <span class="about-version">${version ? `v${version}` : ''}</span></div>
56
+ <div class="about-tagline">Claude Code Session Manager · a single pane over every live <code>claude</code> session on this box.</div>
57
+ </div>
58
+ </div>
59
+
60
+ <p class="about-copy">
61
+ Lists live and recently-closed sessions, snapshots them every minute, restores them through Windows Terminal,
62
+ and launches fresh sessions inside isolated workspaces. Designed for running 8–10 concurrent sessions across
63
+ ad-hoc repo clones.
64
+ </p>
65
+
66
+ <div class="about-links">
67
+ <a class="action" href=${REPO_URL} target="_blank" rel="noopener">
68
+ <${IconGithub} /> GitHub <${IconExternal} />
69
+ </a>
70
+ <a class="action subtle" href=${NPM_URL} target="_blank" rel="noopener">
71
+ npm <${IconExternal} />
72
+ </a>
73
+ </div>
74
+
75
+ <dl class="about-meta">
76
+ <dt>Install</dt>
77
+ <dd><code>npx @bakapiano/ccsm</code></dd>
78
+ <dt>Data directory</dt>
79
+ <dd><code>~/.ccsm/</code> (override with <code>CCSM_HOME</code>)</dd>
80
+ <dt>Platform</dt>
81
+ <dd>Windows · Node 18+</dd>
82
+ <dt>License</dt>
83
+ <dd>MIT</dd>
84
+ </dl>
85
+ </div>
86
+ </${Card}>
87
+ <p class="muted-text" style="margin-top: var(--s-3); text-align:center;">
88
+ Looking for upgrade controls? They moved to <strong>Settings → General → Version</strong>.
89
+ </p>`;
90
+ }