ai-kanban-terminal 0.3.0 → 0.7.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/dist/assets/index-CXyv9MVx.js +102 -0
- package/dist/assets/index-CvNpFeWU.css +47 -0
- package/dist/index.html +2 -2
- package/package.json +6 -5
- package/server.js +105 -23
- package/dist/assets/index-CMu989wp.js +0 -91
- package/dist/assets/index-DCBCU9ry.css +0 -32
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}/**
|
|
33
|
+
* @license
|
|
34
|
+
* Copyright 2019 Kevin Verdieck, originally developed at Palantir Technologies, Inc.
|
|
35
|
+
*
|
|
36
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
37
|
+
* you may not use this file except in compliance with the License.
|
|
38
|
+
* You may obtain a copy of the License at
|
|
39
|
+
*
|
|
40
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
41
|
+
*
|
|
42
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
43
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45
|
+
* See the License for the specific language governing permissions and
|
|
46
|
+
* limitations under the License.
|
|
47
|
+
*/.mosaic{height:100%;width:100%}.mosaic,.mosaic>*{box-sizing:border-box}.mosaic .mosaic-zero-state{position:absolute;top:6px;right:6px;bottom:6px;left:6px;width:auto;height:auto;z-index:1}.mosaic-root{position:absolute;top:3px;right:3px;bottom:3px;left:3px}.mosaic-split{position:absolute;z-index:1;touch-action:none}.mosaic-split:hover{background:#000}.mosaic-split .mosaic-split-line{position:absolute}.mosaic-split.-row{margin-left:-3px;width:6px;cursor:ew-resize}.mosaic-split.-row .mosaic-split-line{top:0;bottom:0;left:3px;right:3px}.mosaic-split.-column{margin-top:-3px;height:6px;cursor:ns-resize}.mosaic-split.-column .mosaic-split-line{top:3px;bottom:3px;left:0;right:0}.mosaic-tile{position:absolute;margin:3px}.mosaic-tile>*{height:100%;width:100%}.mosaic-drop-target{position:relative}.mosaic-drop-target.drop-target-hover .drop-target-container{display:block}.mosaic-drop-target.mosaic>.drop-target-container .drop-target.left{right:calc(100% - 10px)}.mosaic-drop-target.mosaic>.drop-target-container .drop-target.right{left:calc(100% - 10px)}.mosaic-drop-target.mosaic>.drop-target-container .drop-target.bottom{top:calc(100% - 10px)}.mosaic-drop-target.mosaic>.drop-target-container .drop-target.top{bottom:calc(100% - 10px)}.mosaic-drop-target .drop-target-container{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.mosaic-drop-target .drop-target-container.-dragging{display:block}.mosaic-drop-target .drop-target-container .drop-target{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;border:2px solid black;opacity:0;z-index:5}.mosaic-drop-target .drop-target-container .drop-target.left{right:70%}.mosaic-drop-target .drop-target-container .drop-target.right{left:70%}.mosaic-drop-target .drop-target-container .drop-target.bottom{top:70%}.mosaic-drop-target .drop-target-container .drop-target.top{bottom:70%}.mosaic-drop-target .drop-target-container .drop-target.drop-target-hover{opacity:1}.mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.left{right:50%}.mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.right{left:50%}.mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.bottom{top:50%}.mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.top{bottom:50%}.mosaic-window,.mosaic-preview{position:relative;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 1px #0003}.mosaic-window .mosaic-window-toolbar,.mosaic-preview .mosaic-window-toolbar{z-index:4;display:flex;justify-content:space-between;align-items:center;flex-shrink:0;height:30px;background:#fff;box-shadow:0 1px 1px #0003}.mosaic-window .mosaic-window-toolbar.draggable,.mosaic-preview .mosaic-window-toolbar.draggable{cursor:move}.mosaic-window .mosaic-window-title,.mosaic-preview .mosaic-window-title{display:flex;align-items:center;height:100%;padding-left:15px;flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-height:18px}.mosaic-window .mosaic-window-controls,.mosaic-preview .mosaic-window-controls{display:flex;height:100%}.mosaic-window .mosaic-window-controls .separator,.mosaic-preview .mosaic-window-controls .separator{height:20px;border-left:1px solid black;margin:5px 4px}.mosaic-window .mosaic-window-body,.mosaic-preview .mosaic-window-body{position:relative;flex:1;height:0;background:#fff;z-index:1;overflow:hidden}.mosaic-window .mosaic-window-additional-actions-bar,.mosaic-preview .mosaic-window-additional-actions-bar{position:absolute;top:30px;right:0;bottom:initial;left:0;height:0;overflow:hidden;background:#fff;justify-content:flex-end;display:flex;z-index:3}.mosaic-window .mosaic-window-additional-actions-bar .bp4-button,.mosaic-preview .mosaic-window-additional-actions-bar .bp4-button{margin:0}.mosaic-window .mosaic-window-additional-actions-bar .bp4-button:after,.mosaic-preview .mosaic-window-additional-actions-bar .bp4-button:after{display:none}.mosaic-window .mosaic-window-body-overlay,.mosaic-preview .mosaic-window-body-overlay{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background:#fff;display:none;z-index:2}.mosaic-window.additional-controls-open .mosaic-window-additional-actions-bar,.mosaic-preview.additional-controls-open .mosaic-window-additional-actions-bar{height:30px}.mosaic-window.additional-controls-open .mosaic-window-body-overlay,.mosaic-preview.additional-controls-open .mosaic-window-body-overlay{display:block}.mosaic-window .mosaic-preview,.mosaic-preview .mosaic-preview{height:100%;width:100%;position:absolute;z-index:0;border:1px solid black;max-height:400px}.mosaic-window .mosaic-preview .mosaic-window-body,.mosaic-preview .mosaic-preview .mosaic-window-body{display:flex;flex-direction:column;align-items:center;justify-content:center}.mosaic-window .mosaic-preview h4,.mosaic-preview .mosaic-preview h4{margin-bottom:10px}.mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.close-button:before{content:"Close"}.mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.split-button:before{content:"Split"}.mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.replace-button:before{content:"Replace"}.mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.expand-button:before{content:"Expand"}.mosaic.mosaic-blueprint-theme{background:#abb3bf}.mosaic.mosaic-blueprint-theme .mosaic-zero-state{background:#e5e8eb;border-radius:2px;box-shadow:0 0 0 1px #11141826}.mosaic.mosaic-blueprint-theme .mosaic-zero-state .default-zero-state-icon{font-size:120px}.mosaic.mosaic-blueprint-theme .mosaic-split:hover{background:none}.mosaic.mosaic-blueprint-theme .mosaic-split:hover .mosaic-split-line{box-shadow:0 0 0 1px #4c90f0}.mosaic.mosaic-blueprint-theme.mosaic-drop-target .drop-target-container .drop-target,.mosaic.mosaic-blueprint-theme .mosaic-drop-target .drop-target-container .drop-target{background:#8abbff33;border:2px solid #4c90f0;transition:opacity .1s;border-radius:2px}.mosaic.mosaic-blueprint-theme .mosaic-window,.mosaic.mosaic-blueprint-theme .mosaic-preview{box-shadow:0 0 0 1px #11141826;border-radius:2px}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-toolbar,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-toolbar{box-shadow:0 1px 1px #11141826;border-top-right-radius:2px;border-top-left-radius:2px}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-toolbar.draggable:hover,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-toolbar.draggable:hover{background:linear-gradient(to bottom,#fff,#f6f7f9)}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-toolbar.draggable:hover .mosaic-window-title,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-toolbar.draggable:hover .mosaic-window-title{color:#111418}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-title,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-title{font-weight:600;color:#404854}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-controls .separator,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-controls .separator{border-left:1px solid #dce0e5}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-controls .bp4-button,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-controls .bp4-button,.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-controls .bp4-button:before,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-controls .bp4-button:before{color:#738091}.mosaic.mosaic-blueprint-theme .mosaic-window .default-preview-icon,.mosaic.mosaic-blueprint-theme .mosaic-preview .default-preview-icon{font-size:72px}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-body,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-body{border-top-width:0;background:#f6f7f9;border-bottom-right-radius:2px;border-bottom-left-radius:2px}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-additional-actions-bar,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-additional-actions-bar{transition:height .25s;box-shadow:0 1px 1px #11141826}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-additional-actions-bar .bp4-button,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-additional-actions-bar .bp4-button,.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-window-additional-actions-bar .bp4-button:before,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-window-additional-actions-bar .bp4-button:before{color:#738091}.mosaic.mosaic-blueprint-theme .mosaic-window.additional-controls-open .mosaic-window-toolbar,.mosaic.mosaic-blueprint-theme .mosaic-preview.additional-controls-open .mosaic-window-toolbar{box-shadow:0 1px 0 0 0 0 1px #11141826}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-preview,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-preview{border:1px solid #8f99a8}.mosaic.mosaic-blueprint-theme .mosaic-window .mosaic-preview h4,.mosaic.mosaic-blueprint-theme .mosaic-preview .mosaic-preview h4{color:#404854}.mosaic.mosaic-blueprint-theme.bp4-dark{background:#252a31}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-zero-state{background:#383e47;box-shadow:inset 0 0 0 1px #fff3}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-split:hover .mosaic-split-line{box-shadow:0 0 0 1px #2d72d2}.mosaic.mosaic-blueprint-theme.bp4-dark.mosaic-drop-target .drop-target-container .drop-target,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-drop-target .drop-target-container .drop-target{background:#215db033;border-color:#2d72d2}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window-toolbar,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window-additional-actions-bar{background:#383e47;box-shadow:0 1px 1px #11141866}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview{box-shadow:inset 0 0 0 1px #fff3}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-toolbar.draggable:hover,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-toolbar.draggable:hover{background:linear-gradient(to bottom,#404854,#383e47)}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-toolbar.draggable:hover .mosaic-window-title,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-toolbar.draggable:hover .mosaic-window-title{color:#fff}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-title,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-title{color:#dce0e5}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-controls .separator,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-controls .separator{border-color:#5f6b7c}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-controls .bp4-button,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-controls .bp4-button,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-controls .bp4-button:before,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-controls .bp4-button:before{color:#abb3bf}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-body,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-body{background:#252a31}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-additional-actions-bar .bp4-button,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-additional-actions-bar .bp4-button,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-window-additional-actions-bar .bp4-button:before,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-window-additional-actions-bar .bp4-button:before{color:#c5cbd3}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window.additional-controls-open .mosaic-window-toolbar,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview.additional-controls-open .mosaic-window-toolbar{box-shadow:inset 0 0 0 1px #fff3}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-preview,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-preview{border-color:#5f6b7c}.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-window .mosaic-preview h4,.mosaic.mosaic-blueprint-theme.bp4-dark .mosaic-preview .mosaic-preview h4{color:#edeff2}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.app-container{height:100vh;display:flex;flex-direction:column;background:#1e1e1e;color:#d4d4d4}.app-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#252526;border-bottom:1px solid #3e3e42;z-index:100}.app-header h1{font-size:1.25rem;font-weight:600;color:#ccc;margin:0}.connection-status{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:#ccc}.status-indicator{width:10px;height:10px;border-radius:50%;transition:background-color .3s ease}.status-indicator.connected{background-color:#0dbc79;box-shadow:0 0 8px #0dbc7980}.status-indicator.disconnected{background-color:#cd3131;box-shadow:0 0 8px #cd313180}.mosaic-container{flex:1;position:relative;overflow:hidden}.mosaic-controls{display:flex;gap:.25rem}.mosaic-control-button{background:transparent;border:1px solid #3e3e42;color:#ccc;cursor:pointer;padding:.25rem .5rem;font-size:1rem;border-radius:3px;transition:background-color .2s ease}.mosaic-control-button:hover{background:#3e3e42}.mosaic-control-button:active{background:#505050}.mosaic-blueprint-theme.mosaic{background:#1e1e1e}.mosaic-blueprint-theme .mosaic-window{box-shadow:none;background:#1e1e1e}.mosaic-blueprint-theme .mosaic-window-toolbar{background:#252526;border-bottom:1px solid #3e3e42;height:32px;padding:0 .5rem}.mosaic-blueprint-theme .mosaic-window-title{color:#ccc;font-size:.875rem;font-weight:500}.mosaic-blueprint-theme .mosaic-window-controls{color:#ccc}.mosaic-blueprint-theme .mosaic-window-body{background:#1e1e1e;padding:0}.mosaic-blueprint-theme .mosaic-split{background:#3e3e42}.mosaic-blueprint-theme .mosaic-split:hover{background:#505050}.mosaic-blueprint-theme .mosaic-preview{background:#0078d433;border:2px solid #0078d4}.terminal-pane{height:100%;display:flex;flex-direction:column;background:#1e1e1e}.terminal-pane-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background:#252526;border-bottom:1px solid #3e3e42}.terminal-id{font-size:.75rem;color:#888;font-weight:500}.terminal-status{font-size:.875rem}.terminal-status.ready{color:#0dbc79}.terminal-status.loading{color:#888}.terminal-content{flex:1;padding:.5rem;overflow:hidden;outline:none}.terminal-content:focus{box-shadow:inset 0 0 0 2px #0078d4}.terminal-content .xterm{height:100%;width:100%}@media(prefers-contrast:high){.app-container{border:2px solid #ffffff}.app-header{border-bottom:2px solid #ffffff}.status-indicator.connected,.status-indicator.disconnected{border:2px solid #ffffff}}@media(prefers-reduced-motion:reduce){.status-indicator{transition:none}}@media(max-width:768px){.app-header{padding:.75rem 1rem}.app-header h1{font-size:1rem}.connection-status{font-size:.75rem}.terminal-content{padding:.25rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}main{height:100vh;display:flex;flex-direction:column}.terminal-container{display:flex;flex-direction:column;height:100%;background:#1e1e1e;color:#d4d4d4}.terminal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#252526;border-bottom:1px solid #3e3e42}.terminal-header h1{font-size:1.25rem;font-weight:600;color:#ccc;margin:0}.terminal{flex:1;padding:1rem;overflow:hidden;outline:none}.terminal:focus{box-shadow:inset 0 0 0 2px #0078d4}.terminal .xterm{height:100%;width:100%}
|
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="description" content="Browser-based terminal with bidirectional shell" />
|
|
7
7
|
<title>AI Kanban Terminal</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CXyv9MVx.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CvNpFeWU.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-kanban-terminal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Browser-based terminal with bidirectional shell using Vite, Express, node-pty, xterm.js, and Socket.IO",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -39,18 +39,19 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"express": "^4.22.1",
|
|
41
41
|
"node-pty": "^1.1.0",
|
|
42
|
+
"react-mosaic-component": "^6.1.1",
|
|
42
43
|
"socket.io": "^4.8.3",
|
|
43
44
|
"socket.io-client": "^4.8.3"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@types/node": "^25.0.9",
|
|
47
|
-
"@types/react": "^
|
|
48
|
-
"@types/react-dom": "^
|
|
48
|
+
"@types/react": "^18.3.27",
|
|
49
|
+
"@types/react-dom": "^18.3.7",
|
|
49
50
|
"@vitejs/plugin-react": "^4.3.4",
|
|
50
51
|
"@xterm/addon-fit": "^0.11.0",
|
|
51
52
|
"@xterm/xterm": "^6.0.0",
|
|
52
|
-
"react": "^
|
|
53
|
-
"react-dom": "^
|
|
53
|
+
"react": "^18.3.1",
|
|
54
|
+
"react-dom": "^18.3.1",
|
|
54
55
|
"typescript": "^5.9.3",
|
|
55
56
|
"vite": "^6.0.7"
|
|
56
57
|
}
|
package/server.js
CHANGED
|
@@ -37,18 +37,72 @@ if (!fs.existsSync(distPath)) {
|
|
|
37
37
|
|
|
38
38
|
expressApp.use(express.static(distPath));
|
|
39
39
|
|
|
40
|
-
// Store terminal instances per socket
|
|
40
|
+
// Store terminal instances per socket and terminal ID
|
|
41
|
+
// Structure: Map<socketId, Map<terminalId, ptyProcess>>
|
|
41
42
|
const terminals = new Map();
|
|
42
43
|
|
|
43
44
|
io.on('connection', (socket) => {
|
|
44
45
|
console.log('Client connected:', socket.id);
|
|
46
|
+
|
|
47
|
+
// Initialize terminal map for this socket
|
|
48
|
+
terminals.set(socket.id, new Map());
|
|
49
|
+
|
|
50
|
+
// Helper function to find an available shell
|
|
51
|
+
const findAvailableShell = () => {
|
|
52
|
+
if (os.platform() === 'win32') {
|
|
53
|
+
// Windows: Try common shells
|
|
54
|
+
const windowsShells = [
|
|
55
|
+
process.env.COMSPEC,
|
|
56
|
+
'C:\\Windows\\System32\\cmd.exe',
|
|
57
|
+
'cmd.exe',
|
|
58
|
+
'powershell.exe'
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
for (const shell of windowsShells) {
|
|
62
|
+
if (shell && fs.existsSync(shell)) {
|
|
63
|
+
return shell;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// If no shell found, try cmd.exe without path (let OS find it)
|
|
67
|
+
return 'cmd.exe';
|
|
68
|
+
} else {
|
|
69
|
+
// Unix-like systems: Try to find an available shell
|
|
70
|
+
const unixShells = [
|
|
71
|
+
process.env.SHELL,
|
|
72
|
+
'/bin/bash',
|
|
73
|
+
'/usr/bin/bash',
|
|
74
|
+
'/bin/sh',
|
|
75
|
+
'/usr/bin/sh',
|
|
76
|
+
'/bin/zsh',
|
|
77
|
+
'/usr/bin/zsh'
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
for (const shell of unixShells) {
|
|
81
|
+
if (shell && fs.existsSync(shell)) {
|
|
82
|
+
return shell;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// If no shell found, try /bin/sh anyway (most minimal fallback)
|
|
87
|
+
// This will fail with a clear error if it doesn't exist
|
|
88
|
+
return '/bin/sh';
|
|
89
|
+
}
|
|
90
|
+
};
|
|
45
91
|
|
|
46
|
-
socket.on('create-terminal', ({ cols, rows }) => {
|
|
47
|
-
console.log('Creating terminal for socket:', socket.id);
|
|
92
|
+
socket.on('create-terminal', ({ terminalId, cols, rows }) => {
|
|
93
|
+
console.log('Creating terminal for socket:', socket.id, 'terminalId:', terminalId);
|
|
94
|
+
|
|
95
|
+
const socketTerminals = terminals.get(socket.id);
|
|
96
|
+
if (!socketTerminals) {
|
|
97
|
+
console.error('Socket terminals map not found for:', socket.id);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Determine shell based on OS
|
|
102
|
+
const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
|
|
48
103
|
|
|
49
104
|
try {
|
|
50
|
-
|
|
51
|
-
const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
|
|
105
|
+
console.log('Using shell:', shell);
|
|
52
106
|
|
|
53
107
|
// Create pseudo-terminal
|
|
54
108
|
// NOTE: Uses HOME directory as working directory for development.
|
|
@@ -63,49 +117,77 @@ io.on('connection', (socket) => {
|
|
|
63
117
|
});
|
|
64
118
|
|
|
65
119
|
// Store terminal instance
|
|
66
|
-
|
|
120
|
+
socketTerminals.set(terminalId, ptyProcess);
|
|
67
121
|
|
|
68
122
|
// Send data from terminal to client
|
|
69
123
|
ptyProcess.onData((data) => {
|
|
70
|
-
socket.emit('terminal-output', data);
|
|
124
|
+
socket.emit('terminal-output', { terminalId, data });
|
|
71
125
|
});
|
|
72
126
|
|
|
73
127
|
// Handle terminal exit
|
|
74
128
|
ptyProcess.onExit(({ exitCode, signal }) => {
|
|
75
|
-
console.log(`Terminal exited for ${socket.id}:`, exitCode, signal);
|
|
76
|
-
|
|
77
|
-
socket.emit('terminal-exit', { exitCode, signal });
|
|
129
|
+
console.log(`Terminal exited for ${socket.id}/${terminalId}:`, exitCode, signal);
|
|
130
|
+
socketTerminals.delete(terminalId);
|
|
131
|
+
socket.emit('terminal-exit', { terminalId, exitCode, signal });
|
|
78
132
|
});
|
|
79
133
|
|
|
80
|
-
socket.emit('terminal-ready');
|
|
134
|
+
socket.emit('terminal-ready', { terminalId });
|
|
81
135
|
} catch (err) {
|
|
82
136
|
console.error('Failed to create terminal:', err);
|
|
83
|
-
|
|
137
|
+
console.error('Shell attempted:', shell);
|
|
138
|
+
console.error('Please ensure a compatible shell is installed on your system.');
|
|
139
|
+
socket.emit('terminal-error', {
|
|
140
|
+
terminalId,
|
|
141
|
+
message: "Failed to create terminal. Please ensure a compatible shell (bash, sh, zsh) is installed on your system."
|
|
142
|
+
});
|
|
84
143
|
}
|
|
85
144
|
});
|
|
86
145
|
|
|
87
146
|
// Handle input from client
|
|
88
|
-
socket.on('terminal-input', (data) => {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
terminal.
|
|
147
|
+
socket.on('terminal-input', ({ terminalId, data }) => {
|
|
148
|
+
const socketTerminals = terminals.get(socket.id);
|
|
149
|
+
if (socketTerminals) {
|
|
150
|
+
const terminal = socketTerminals.get(terminalId);
|
|
151
|
+
if (terminal) {
|
|
152
|
+
terminal.write(data);
|
|
153
|
+
}
|
|
92
154
|
}
|
|
93
155
|
});
|
|
94
156
|
|
|
95
157
|
// Handle terminal resize
|
|
96
|
-
socket.on('terminal-resize', ({ cols, rows }) => {
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
terminal.
|
|
158
|
+
socket.on('terminal-resize', ({ terminalId, cols, rows }) => {
|
|
159
|
+
const socketTerminals = terminals.get(socket.id);
|
|
160
|
+
if (socketTerminals) {
|
|
161
|
+
const terminal = socketTerminals.get(terminalId);
|
|
162
|
+
if (terminal) {
|
|
163
|
+
terminal.resize(cols, rows);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Handle terminal close
|
|
169
|
+
socket.on('close-terminal', ({ terminalId }) => {
|
|
170
|
+
const socketTerminals = terminals.get(socket.id);
|
|
171
|
+
if (socketTerminals) {
|
|
172
|
+
const terminal = socketTerminals.get(terminalId);
|
|
173
|
+
if (terminal) {
|
|
174
|
+
terminal.kill();
|
|
175
|
+
socketTerminals.delete(terminalId);
|
|
176
|
+
console.log(`Terminal closed for ${socket.id}/${terminalId}`);
|
|
177
|
+
}
|
|
100
178
|
}
|
|
101
179
|
});
|
|
102
180
|
|
|
103
181
|
// Clean up on disconnect
|
|
104
182
|
socket.on('disconnect', () => {
|
|
105
183
|
console.log('Client disconnected:', socket.id);
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
|
|
184
|
+
const socketTerminals = terminals.get(socket.id);
|
|
185
|
+
if (socketTerminals) {
|
|
186
|
+
// Kill all terminals for this socket
|
|
187
|
+
socketTerminals.forEach((terminal, terminalId) => {
|
|
188
|
+
console.log(`Cleaning up terminal ${terminalId} for socket ${socket.id}`);
|
|
189
|
+
terminal.kill();
|
|
190
|
+
});
|
|
109
191
|
terminals.delete(socket.id);
|
|
110
192
|
}
|
|
111
193
|
});
|