groove-dev 0.27.86 → 0.27.88
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/CLAUDE.md +11 -0
- package/moe-training/client/scrubber.js +4 -2
- package/moe-training/client/step-classifier.js +17 -0
- package/moe-training/client/trajectory-capture.js +80 -6
- package/moe-training/client/transmission-queue.js +11 -0
- package/moe-training/test/client/scrubber.test.js +14 -4
- package/moe-training/test/client/step-classifier.test.js +47 -0
- package/moe-training/test/client/transmission-queue.test.js +33 -0
- package/node_modules/@groove-dev/cli/bin/groove.js +10 -1
- package/node_modules/@groove-dev/cli/package.json +1 -1
- package/node_modules/@groove-dev/cli/src/commands/connect.js +116 -205
- package/node_modules/@groove-dev/cli/src/commands/disconnect.js +38 -62
- package/node_modules/@groove-dev/cli/src/commands/remotes.js +75 -0
- package/node_modules/@groove-dev/daemon/package.json +1 -1
- package/node_modules/@groove-dev/daemon/src/api.js +115 -7
- package/node_modules/@groove-dev/daemon/src/conversations.js +29 -3
- package/node_modules/@groove-dev/daemon/src/process.js +56 -1
- package/node_modules/@groove-dev/daemon/src/providers/codex.js +28 -10
- package/node_modules/@groove-dev/daemon/src/registry.js +30 -0
- package/node_modules/@groove-dev/daemon/src/validate.js +23 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-BSqk8cbI.css +1 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-B_igwWvq.js +8642 -0
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/package.json +2 -1
- package/node_modules/@groove-dev/gui/src/components/agents/agent-file-tree.jsx +254 -0
- package/node_modules/@groove-dev/gui/src/components/agents/code-review.jsx +177 -0
- package/node_modules/@groove-dev/gui/src/components/agents/diff-viewer.jsx +148 -0
- package/node_modules/@groove-dev/gui/src/components/agents/workspace-mode.jsx +377 -0
- package/node_modules/@groove-dev/gui/src/components/chat/chat-input.jsx +117 -40
- package/node_modules/@groove-dev/gui/src/components/chat/chat-messages.jsx +10 -13
- package/node_modules/@groove-dev/gui/src/components/chat/chat-view.jsx +26 -1
- package/node_modules/@groove-dev/gui/src/components/chat/conversation-list.jsx +14 -14
- package/node_modules/@groove-dev/gui/src/components/chat/model-picker.jsx +5 -0
- package/node_modules/@groove-dev/gui/src/components/preview/preview-workspace.jsx +6 -5
- package/node_modules/@groove-dev/gui/src/components/preview/screenshot-overlay.jsx +41 -29
- package/node_modules/@groove-dev/gui/src/stores/groove.js +138 -3
- package/node_modules/@groove-dev/gui/src/views/agents.jsx +36 -3
- package/node_modules/@groove-dev/gui/src/views/settings.jsx +104 -26
- package/node_modules/base64-arraybuffer/CHANGELOG.md +28 -0
- package/node_modules/base64-arraybuffer/LICENSE +22 -0
- package/node_modules/base64-arraybuffer/README.md +27 -0
- package/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js +50 -0
- package/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js.map +1 -0
- package/node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js +61 -0
- package/node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js.map +1 -0
- package/node_modules/base64-arraybuffer/dist/lib/index.js +48 -0
- package/node_modules/base64-arraybuffer/dist/lib/index.js.map +1 -0
- package/node_modules/base64-arraybuffer/dist/types/index.d.ts +2 -0
- package/node_modules/base64-arraybuffer/package.json +54 -0
- package/node_modules/base64-arraybuffer/rollup.config.ts +40 -0
- package/node_modules/css-line-break/CHANGELOG.md +58 -0
- package/node_modules/css-line-break/LICENSE +22 -0
- package/node_modules/css-line-break/README.md +66 -0
- package/node_modules/css-line-break/dist/css-line-break.es5.js +706 -0
- package/node_modules/css-line-break/dist/css-line-break.es5.js.map +1 -0
- package/node_modules/css-line-break/dist/css-line-break.umd.js +718 -0
- package/node_modules/css-line-break/dist/css-line-break.umd.js.map +1 -0
- package/node_modules/css-line-break/dist/lib/LineBreak.js +516 -0
- package/node_modules/css-line-break/dist/lib/LineBreak.js.map +1 -0
- package/node_modules/css-line-break/dist/lib/Util.js +109 -0
- package/node_modules/css-line-break/dist/lib/Util.js.map +1 -0
- package/node_modules/css-line-break/dist/lib/index.js +9 -0
- package/node_modules/css-line-break/dist/lib/index.js.map +1 -0
- package/node_modules/css-line-break/dist/lib/linebreak-trie.js +6 -0
- package/node_modules/css-line-break/dist/lib/linebreak-trie.js.map +1 -0
- package/node_modules/css-line-break/dist/types/LineBreak.d.ts +38 -0
- package/node_modules/css-line-break/dist/types/Util.d.ts +5 -0
- package/node_modules/css-line-break/dist/types/index.d.ts +2 -0
- package/node_modules/css-line-break/dist/types/linebreak-trie.d.ts +2 -0
- package/node_modules/css-line-break/package.json +61 -0
- package/node_modules/css-line-break/rollup.config.ts +40 -0
- package/node_modules/html2canvas/CHANGELOG.md +566 -0
- package/node_modules/html2canvas/LICENSE +22 -0
- package/node_modules/html2canvas/README.md +73 -0
- package/node_modules/html2canvas/dist/html2canvas.esm.js +7822 -0
- package/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -0
- package/node_modules/html2canvas/dist/html2canvas.js +7830 -0
- package/node_modules/html2canvas/dist/html2canvas.js.map +1 -0
- package/node_modules/html2canvas/dist/html2canvas.min.js +20 -0
- package/node_modules/html2canvas/dist/lib/__tests__/index.js +144 -0
- package/node_modules/html2canvas/dist/lib/__tests__/index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js +10 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/context.js +22 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/context.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/features.js +12 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/features.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/logger.js +24 -0
- package/node_modules/html2canvas/dist/lib/core/__mocks__/logger.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js +420 -0
- package/node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/__tests__/logger.js +28 -0
- package/node_modules/html2canvas/dist/lib/core/__tests__/logger.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/bitwise.js +6 -0
- package/node_modules/html2canvas/dist/lib/core/bitwise.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/cache-storage.js +198 -0
- package/node_modules/html2canvas/dist/lib/core/cache-storage.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/context.js +18 -0
- package/node_modules/html2canvas/dist/lib/core/context.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/debugger.js +25 -0
- package/node_modules/html2canvas/dist/lib/core/debugger.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/features.js +193 -0
- package/node_modules/html2canvas/dist/lib/core/features.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/logger.js +88 -0
- package/node_modules/html2canvas/dist/lib/core/logger.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/core/util.js +5 -0
- package/node_modules/html2canvas/dist/lib/core/util.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js +3 -0
- package/node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js +3 -0
- package/node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/index.js +216 -0
- package/node_modules/html2canvas/dist/lib/css/index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js +9 -0
- package/node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/layout/bounds.js +42 -0
- package/node_modules/html2canvas/dist/lib/css/layout/bounds.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/layout/text.js +137 -0
- package/node_modules/html2canvas/dist/lib/css/layout/text.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js +48 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js +25 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js +88 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js +94 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js +18 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js +24 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js +11 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js +24 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js +24 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-position.js +17 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-position.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-repeat.js +36 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-repeat.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-size.js +24 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/background-size.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-color.js +15 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-radius.js +18 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-radius.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-style.js +27 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-style.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-width.js +21 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/border-width.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/box-shadow.js +55 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/box-shadow.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/color.js +11 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/content.js +20 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/content.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/counter-increment.js +31 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/counter-increment.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/counter-reset.js +27 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/counter-reset.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/direction.js +19 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/direction.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/display.js +82 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/display.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/duration.js +15 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/duration.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/float.js +23 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/float.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-family.js +33 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-family.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-size.js +11 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-size.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-style.js +21 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-style.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-variant.js +14 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-variant.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-weight.js +26 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/font-weight.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/letter-spacing.js +22 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/letter-spacing.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/line-break.js +24 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/line-break.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/line-height.js +25 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/line-height.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-image.js +17 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-image.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-position.js +19 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-position.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-type.js +123 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/list-style-type.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/margin.js +14 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/margin.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/opacity.js +17 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/opacity.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/overflow-wrap.js +19 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/overflow-wrap.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/overflow.js +28 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/overflow.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/padding.js +15 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/padding.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/paint-order.js +34 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/paint-order.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/position.js +23 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/position.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/quotes.js +42 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/quotes.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-align.js +22 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-align.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-decoration-color.js +11 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-decoration-color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-decoration-line.js +29 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-decoration-line.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-shadow.js +47 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-shadow.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-transform.js +21 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/text-transform.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/transform-origin.js +25 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/transform-origin.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/transform.js +37 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/transform.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/visibility.js +21 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/visibility.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/webkit-text-stroke-color.js +11 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/webkit-text-stroke-color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/webkit-text-stroke-width.js +17 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/webkit-text-stroke-width.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/word-break.js +27 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/word-break.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/z-index.js +20 -0
- package/node_modules/html2canvas/dist/lib/css/property-descriptors/z-index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/__tests__/tokernizer-tests.js +34 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/__tests__/tokernizer-tests.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/parser.js +147 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/parser.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/tokenizer.js +630 -0
- package/node_modules/html2canvas/dist/lib/css/syntax/tokenizer.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/__tests__/color-tests.js +66 -0
- package/node_modules/html2canvas/dist/lib/css/types/__tests__/color-tests.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/__tests__/image-tests.js +233 -0
- package/node_modules/html2canvas/dist/lib/css/types/__tests__/image-tests.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/angle.js +81 -0
- package/node_modules/html2canvas/dist/lib/css/types/angle.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/color.js +288 -0
- package/node_modules/html2canvas/dist/lib/css/types/color.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-prefix-linear-gradient.js +33 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-prefix-linear-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-prefix-radial-gradient.js +84 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-prefix-radial-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-webkit-gradient.js +60 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/-webkit-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/__tests__/radial-gradient.js +68 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/__tests__/radial-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/counter.js +374 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/counter.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/gradient.js +165 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/linear-gradient.js +28 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/linear-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/radial-gradient.js +91 -0
- package/node_modules/html2canvas/dist/lib/css/types/functions/radial-gradient.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/image.js +53 -0
- package/node_modules/html2canvas/dist/lib/css/types/image.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/index.js +3 -0
- package/node_modules/html2canvas/dist/lib/css/types/index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/length-percentage.js +52 -0
- package/node_modules/html2canvas/dist/lib/css/types/length-percentage.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/length.js +8 -0
- package/node_modules/html2canvas/dist/lib/css/types/length.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/css/types/time.js +18 -0
- package/node_modules/html2canvas/dist/lib/css/types/time.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/__mocks__/document-cloner.js +24 -0
- package/node_modules/html2canvas/dist/lib/dom/__mocks__/document-cloner.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/document-cloner.js +530 -0
- package/node_modules/html2canvas/dist/lib/dom/document-cloner.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/element-container.js +35 -0
- package/node_modules/html2canvas/dist/lib/dom/element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/li-element-container.js +30 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/li-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/ol-element-container.js +31 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/ol-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/select-element-container.js +31 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/select-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/textarea-element-container.js +30 -0
- package/node_modules/html2canvas/dist/lib/dom/elements/textarea-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/node-parser.js +142 -0
- package/node_modules/html2canvas/dist/lib/dom/node-parser.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/canvas-element-container.js +32 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/canvas-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/iframe-element-container.js +55 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/iframe-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/image-element-container.js +33 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/image-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/index.js +3 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/input-element-container.js +102 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/input-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/pseudo-elements.js +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/pseudo-elements.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/svg-element-container.js +38 -0
- package/node_modules/html2canvas/dist/lib/dom/replaced-elements/svg-element-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/dom/text-container.js +32 -0
- package/node_modules/html2canvas/dist/lib/dom/text-container.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/index.js +181 -0
- package/node_modules/html2canvas/dist/lib/index.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/invariant.js +10 -0
- package/node_modules/html2canvas/dist/lib/invariant.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/background.js +187 -0
- package/node_modules/html2canvas/dist/lib/render/background.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/bezier-curve.js +36 -0
- package/node_modules/html2canvas/dist/lib/render/bezier-curve.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/border.js +105 -0
- package/node_modules/html2canvas/dist/lib/render/border.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/bound-curves.js +190 -0
- package/node_modules/html2canvas/dist/lib/render/bound-curves.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/box-sizing.js +21 -0
- package/node_modules/html2canvas/dist/lib/render/box-sizing.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/canvas/canvas-renderer.js +1030 -0
- package/node_modules/html2canvas/dist/lib/render/canvas/canvas-renderer.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js +108 -0
- package/node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/effects.js +41 -0
- package/node_modules/html2canvas/dist/lib/render/effects.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/font-metrics.js +55 -0
- package/node_modules/html2canvas/dist/lib/render/font-metrics.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/path.js +27 -0
- package/node_modules/html2canvas/dist/lib/render/path.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/renderer.js +12 -0
- package/node_modules/html2canvas/dist/lib/render/renderer.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/stacking-context.js +172 -0
- package/node_modules/html2canvas/dist/lib/render/stacking-context.js.map +1 -0
- package/node_modules/html2canvas/dist/lib/render/vector.js +18 -0
- package/node_modules/html2canvas/dist/lib/render/vector.js.map +1 -0
- package/node_modules/html2canvas/dist/types/__tests__/index.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/core/__mocks__/cache-storage.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/core/__mocks__/context.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/core/__mocks__/features.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/core/__mocks__/logger.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/core/__tests__/cache-storage.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/core/__tests__/logger.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/core/bitwise.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/core/cache-storage.d.ts +26 -0
- package/node_modules/html2canvas/dist/types/core/context.d.ts +15 -0
- package/node_modules/html2canvas/dist/types/core/debugger.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/core/features.d.ts +12 -0
- package/node_modules/html2canvas/dist/types/core/logger.d.ts +18 -0
- package/node_modules/html2canvas/dist/types/core/util.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/IPropertyDescriptor.d.ts +36 -0
- package/node_modules/html2canvas/dist/types/css/ITypeDescriptor.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/css/index.d.ts +132 -0
- package/node_modules/html2canvas/dist/types/css/layout/__mocks__/bounds.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/layout/bounds.d.ts +14 -0
- package/node_modules/html2canvas/dist/types/css/layout/text.d.ts +10 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/__tests__/background-tests.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/__tests__/font-family.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/__tests__/paint-order.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/__tests__/text-shadow.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/__tests__/transform-tests.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-clip.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-color.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-image.d.ts +3 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-origin.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-position.d.ts +5 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-repeat.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/background-size.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/border-color.d.ts +5 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/border-radius.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/border-style.d.ts +12 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/border-width.d.ts +5 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/box-shadow.d.ts +14 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/color.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/content.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/counter-increment.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/counter-reset.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/direction.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/display.d.ts +35 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/duration.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/float.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/font-family.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/font-size.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/font-style.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/font-variant.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/font-weight.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/letter-spacing.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/line-break.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/line-height.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/list-style-image.d.ts +3 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/list-style-position.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/list-style-type.d.ts +58 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/margin.d.ts +5 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/opacity.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/overflow-wrap.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/overflow.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/padding.d.ts +5 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/paint-order.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/position.d.ts +9 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/quotes.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/text-align.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/text-decoration-color.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/text-decoration-line.d.ts +10 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/text-shadow.d.ts +12 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/text-transform.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/transform-origin.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/transform.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/visibility.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/webkit-text-stroke-color.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/webkit-text-stroke-width.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/word-break.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/property-descriptors/z-index.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/syntax/__tests__/tokernizer-tests.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/syntax/parser.d.ts +34 -0
- package/node_modules/html2canvas/dist/types/css/syntax/tokenizer.d.ts +94 -0
- package/node_modules/html2canvas/dist/types/css/types/__tests__/color-tests.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/types/__tests__/image-tests.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/types/angle.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/types/color.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/-prefix-linear-gradient.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/-prefix-radial-gradient.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/-webkit-gradient.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/__tests__/radial-gradient.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/counter.d.ts +10 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/gradient.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/linear-gradient.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/types/functions/radial-gradient.d.ts +12 -0
- package/node_modules/html2canvas/dist/types/css/types/image.d.ts +54 -0
- package/node_modules/html2canvas/dist/types/css/types/index.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/css/types/length-percentage.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/css/types/length.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/css/types/time.d.ts +2 -0
- package/node_modules/html2canvas/dist/types/dom/__mocks__/document-cloner.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/dom/document-cloner.d.ts +45 -0
- package/node_modules/html2canvas/dist/types/dom/element-container.d.ts +19 -0
- package/node_modules/html2canvas/dist/types/dom/elements/li-element-container.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/dom/elements/ol-element-container.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/dom/elements/select-element-container.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/dom/elements/textarea-element-container.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/dom/node-parser.d.ts +23 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/canvas-element-container.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/iframe-element-container.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/image-element-container.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/index.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/input-element-container.d.ts +12 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/pseudo-elements.d.ts +0 -0
- package/node_modules/html2canvas/dist/types/dom/replaced-elements/svg-element-container.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/dom/text-container.d.ts +8 -0
- package/node_modules/html2canvas/dist/types/index.d.ts +10 -0
- package/node_modules/html2canvas/dist/types/invariant.d.ts +1 -0
- package/node_modules/html2canvas/dist/types/render/background.d.ts +16 -0
- package/node_modules/html2canvas/dist/types/render/bezier-curve.d.ts +14 -0
- package/node_modules/html2canvas/dist/types/render/border.d.ts +6 -0
- package/node_modules/html2canvas/dist/types/render/bound-curves.d.ts +32 -0
- package/node_modules/html2canvas/dist/types/render/box-sizing.d.ts +4 -0
- package/node_modules/html2canvas/dist/types/render/canvas/canvas-renderer.d.ts +53 -0
- package/node_modules/html2canvas/dist/types/render/canvas/foreignobject-renderer.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/render/effects.d.ts +38 -0
- package/node_modules/html2canvas/dist/types/render/font-metrics.d.ts +11 -0
- package/node_modules/html2canvas/dist/types/render/path.d.ts +13 -0
- package/node_modules/html2canvas/dist/types/render/renderer.d.ts +7 -0
- package/node_modules/html2canvas/dist/types/render/stacking-context.d.ts +24 -0
- package/node_modules/html2canvas/dist/types/render/vector.d.ts +9 -0
- package/node_modules/html2canvas/package.json +124 -0
- package/node_modules/html2canvas/tsconfig.json +21 -0
- package/node_modules/text-segmentation/CHANGELOG.md +43 -0
- package/node_modules/text-segmentation/LICENSE +22 -0
- package/node_modules/text-segmentation/README.md +27 -0
- package/node_modules/text-segmentation/dist/lib/GraphemeBreak.js +218 -0
- package/node_modules/text-segmentation/dist/lib/GraphemeBreak.js.map +1 -0
- package/node_modules/text-segmentation/dist/lib/grapheme-break-trie.js +6 -0
- package/node_modules/text-segmentation/dist/lib/grapheme-break-trie.js.map +1 -0
- package/node_modules/text-segmentation/dist/lib/index.js +9 -0
- package/node_modules/text-segmentation/dist/lib/index.js.map +1 -0
- package/node_modules/text-segmentation/dist/text-segmentation.es5.js +384 -0
- package/node_modules/text-segmentation/dist/text-segmentation.es5.js.map +1 -0
- package/node_modules/text-segmentation/dist/text-segmentation.umd.js +397 -0
- package/node_modules/text-segmentation/dist/text-segmentation.umd.js.map +1 -0
- package/node_modules/text-segmentation/dist/types/GraphemeBreak.d.ts +21 -0
- package/node_modules/text-segmentation/dist/types/grapheme-break-trie.d.ts +2 -0
- package/node_modules/text-segmentation/dist/types/index.d.ts +1 -0
- package/node_modules/text-segmentation/package.json +55 -0
- package/node_modules/text-segmentation/rollup.config.ts +40 -0
- package/node_modules/utrie/CHANGELOG.md +32 -0
- package/node_modules/utrie/LICENSE +22 -0
- package/node_modules/utrie/dist/lib/Trie.js +143 -0
- package/node_modules/utrie/dist/lib/Trie.js.map +1 -0
- package/node_modules/utrie/dist/lib/TrieBuilder.js +888 -0
- package/node_modules/utrie/dist/lib/TrieBuilder.js.map +1 -0
- package/node_modules/utrie/dist/lib/Util.js +54 -0
- package/node_modules/utrie/dist/lib/Util.js.map +1 -0
- package/node_modules/utrie/dist/lib/index.js +10 -0
- package/node_modules/utrie/dist/lib/index.js.map +1 -0
- package/node_modules/utrie/dist/types/Trie.d.ts +76 -0
- package/node_modules/utrie/dist/types/TrieBuilder.d.ts +65 -0
- package/node_modules/utrie/dist/types/Util.d.ts +3 -0
- package/node_modules/utrie/dist/types/index.d.ts +2 -0
- package/node_modules/utrie/dist/utrie.es5.js +1101 -0
- package/node_modules/utrie/dist/utrie.es5.js.map +1 -0
- package/node_modules/utrie/dist/utrie.umd.js +1114 -0
- package/node_modules/utrie/dist/utrie.umd.js.map +1 -0
- package/node_modules/utrie/package.json +53 -0
- package/node_modules/utrie/rollup.config.ts +40 -0
- package/package.json +1 -1
- package/packages/cli/bin/groove.js +10 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/commands/connect.js +116 -205
- package/packages/cli/src/commands/disconnect.js +38 -62
- package/packages/cli/src/commands/remotes.js +75 -0
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/api.js +115 -7
- package/packages/daemon/src/conversations.js +29 -3
- package/packages/daemon/src/process.js +56 -1
- package/packages/daemon/src/providers/codex.js +28 -10
- package/packages/daemon/src/registry.js +30 -0
- package/packages/daemon/src/validate.js +23 -0
- package/packages/gui/dist/assets/index-BSqk8cbI.css +1 -0
- package/packages/gui/dist/assets/index-B_igwWvq.js +8642 -0
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/package.json +2 -1
- package/packages/gui/src/components/agents/agent-file-tree.jsx +254 -0
- package/packages/gui/src/components/agents/code-review.jsx +177 -0
- package/packages/gui/src/components/agents/diff-viewer.jsx +148 -0
- package/packages/gui/src/components/agents/workspace-mode.jsx +377 -0
- package/packages/gui/src/components/chat/chat-input.jsx +117 -40
- package/packages/gui/src/components/chat/chat-messages.jsx +10 -13
- package/packages/gui/src/components/chat/chat-view.jsx +26 -1
- package/packages/gui/src/components/chat/conversation-list.jsx +14 -14
- package/packages/gui/src/components/chat/model-picker.jsx +5 -0
- package/packages/gui/src/components/preview/preview-workspace.jsx +6 -5
- package/packages/gui/src/components/preview/screenshot-overlay.jsx +41 -29
- package/packages/gui/src/stores/groove.js +138 -3
- package/packages/gui/src/views/agents.jsx +36 -3
- package/packages/gui/src/views/settings.jsx +104 -26
- package/test/doomsday-clock/index.html +55 -0
- package/test/doomsday-clock/script.js +66 -0
- package/test/doomsday-clock/style.css +315 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-BbDDgazC.js +0 -8616
- package/node_modules/@groove-dev/gui/dist/assets/index-fhMxiPGp.css +0 -1
- package/packages/gui/dist/assets/index-BbDDgazC.js +0 -8616
- package/packages/gui/dist/assets/index-fhMxiPGp.css +0 -1
|
@@ -1,278 +1,189 @@
|
|
|
1
|
-
// GROOVE CLI — connect command (SSH tunnel
|
|
1
|
+
// GROOVE CLI — connect command (SSH tunnel via daemon TunnelManager)
|
|
2
2
|
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
3
3
|
|
|
4
|
-
import { execFileSync
|
|
5
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
6
|
-
import { resolve } from 'path';
|
|
7
|
-
import { createConnection } from 'net';
|
|
4
|
+
import { execFileSync } from 'child_process';
|
|
8
5
|
import chalk from 'chalk';
|
|
9
6
|
|
|
10
|
-
const
|
|
11
|
-
const DEFAULT_LOCAL_PORT = 31416;
|
|
12
|
-
const MAX_PORT_ATTEMPTS = 10;
|
|
7
|
+
const API = 'http://localhost:31415/api';
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
const SSH_TARGET_PATTERN = /^([a-zA-Z0-9._-]+@)?[a-zA-Z0-9._-]+$/;
|
|
16
|
-
|
|
17
|
-
function validateTarget(target) {
|
|
9
|
+
function parseTarget(target) {
|
|
18
10
|
if (!target || typeof target !== 'string') {
|
|
19
|
-
throw new Error('SSH target is required (e.g., user@host
|
|
11
|
+
throw new Error('SSH target is required (e.g., user@host)');
|
|
20
12
|
}
|
|
21
|
-
// Block injection characters
|
|
22
13
|
if (/[;|&`$(){}[\]<>!#\n\r\\]/.test(target)) {
|
|
23
14
|
throw new Error('Invalid characters in SSH target');
|
|
24
15
|
}
|
|
25
|
-
if (!SSH_TARGET_PATTERN.test(target)) {
|
|
26
|
-
throw new Error('Invalid SSH target format. Expected: user@hostname or ssh-config-alias');
|
|
27
|
-
}
|
|
28
16
|
if (target.length > 253) {
|
|
29
17
|
throw new Error('SSH target too long');
|
|
30
18
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const dir = resolve(process.cwd(), '.groove');
|
|
35
|
-
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
36
|
-
return dir;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function pidFile() {
|
|
40
|
-
return resolve(grooveDir(), 'tunnel.pid');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function tunnelInfoFile() {
|
|
44
|
-
return resolve(grooveDir(), 'tunnel.json');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function isPortInUse(port) {
|
|
48
|
-
return new Promise((resolve) => {
|
|
49
|
-
const conn = createConnection({ host: '127.0.0.1', port });
|
|
50
|
-
conn.setTimeout(3000);
|
|
51
|
-
conn.on('connect', () => { conn.destroy(); resolve(true); });
|
|
52
|
-
conn.on('error', () => resolve(false));
|
|
53
|
-
conn.on('timeout', () => { conn.destroy(); resolve(false); });
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function findAvailablePort() {
|
|
58
|
-
for (let port = DEFAULT_LOCAL_PORT; port < DEFAULT_LOCAL_PORT + MAX_PORT_ATTEMPTS; port++) {
|
|
59
|
-
if (!(await isPortInUse(port))) return port;
|
|
60
|
-
}
|
|
61
|
-
throw new Error(`No available local port found (tried ${DEFAULT_LOCAL_PORT}-${DEFAULT_LOCAL_PORT + MAX_PORT_ATTEMPTS - 1})`);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function preflight(target, keyFile) {
|
|
65
|
-
// SSH in and check if daemon is listening on remote
|
|
66
|
-
// Use curl to health endpoint — works on both Linux and macOS
|
|
67
|
-
const args = [
|
|
68
|
-
...(keyFile ? ['-i', keyFile] : []),
|
|
69
|
-
'-o', 'ConnectTimeout=10',
|
|
70
|
-
'-o', 'StrictHostKeyChecking=accept-new',
|
|
71
|
-
'-o', 'BatchMode=yes',
|
|
72
|
-
target,
|
|
73
|
-
`curl -sf http://localhost:${REMOTE_PORT}/api/health >/dev/null 2>&1 || echo __GROOVE_NOT_RUNNING__`,
|
|
74
|
-
];
|
|
75
|
-
|
|
76
|
-
try {
|
|
77
|
-
const result = execFileSync('ssh', args, {
|
|
78
|
-
encoding: 'utf8',
|
|
79
|
-
timeout: 15000,
|
|
80
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
if (result.includes('__GROOVE_NOT_RUNNING__')) {
|
|
84
|
-
return { running: false };
|
|
85
|
-
}
|
|
86
|
-
return { running: true };
|
|
87
|
-
} catch (err) {
|
|
88
|
-
const stderr = err.stderr?.toString() || '';
|
|
89
|
-
if (stderr.includes('Permission denied')) {
|
|
90
|
-
throw new Error('SSH authentication failed. Check your key or credentials.');
|
|
91
|
-
}
|
|
92
|
-
if (stderr.includes('Connection refused') || stderr.includes('Connection timed out') || stderr.includes('No route to host')) {
|
|
93
|
-
throw new Error(`Cannot reach ${target}. Check the hostname and that SSH is running.`);
|
|
94
|
-
}
|
|
95
|
-
throw new Error(`SSH preflight failed: ${stderr.trim() || err.message}`);
|
|
19
|
+
const atIdx = target.indexOf('@');
|
|
20
|
+
if (atIdx === -1) {
|
|
21
|
+
return { user: null, host: target };
|
|
96
22
|
}
|
|
23
|
+
return { user: target.slice(0, atIdx), host: target.slice(atIdx + 1) };
|
|
97
24
|
}
|
|
98
25
|
|
|
99
|
-
function
|
|
100
|
-
// Verify the PID belongs to an SSH process (not a random reused PID)
|
|
26
|
+
async function daemonRunning() {
|
|
101
27
|
try {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
timeout: 3000,
|
|
105
|
-
}).trim();
|
|
106
|
-
return cmd.includes('ssh');
|
|
28
|
+
const res = await fetch(`${API}/health`, { signal: AbortSignal.timeout(3000) });
|
|
29
|
+
return res.ok;
|
|
107
30
|
} catch {
|
|
108
31
|
return false;
|
|
109
32
|
}
|
|
110
33
|
}
|
|
111
34
|
|
|
112
|
-
function existingTunnel() {
|
|
113
|
-
const pf = pidFile();
|
|
114
|
-
if (!existsSync(pf)) return null;
|
|
115
|
-
const pid = parseInt(readFileSync(pf, 'utf8').trim(), 10);
|
|
116
|
-
if (isNaN(pid)) return null;
|
|
117
|
-
// Check if process is still alive AND is an SSH process
|
|
118
|
-
try {
|
|
119
|
-
process.kill(pid, 0);
|
|
120
|
-
if (!isSshProcess(pid)) {
|
|
121
|
-
// PID was reused by a different process — stale tunnel files
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
// Read tunnel info if available
|
|
125
|
-
const infoPath = tunnelInfoFile();
|
|
126
|
-
if (existsSync(infoPath)) {
|
|
127
|
-
const info = JSON.parse(readFileSync(infoPath, 'utf8'));
|
|
128
|
-
return { pid, ...info };
|
|
129
|
-
}
|
|
130
|
-
return { pid };
|
|
131
|
-
} catch {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
35
|
function openBrowser(url) {
|
|
137
|
-
const platform = process.platform;
|
|
138
36
|
try {
|
|
139
|
-
if (platform === 'darwin') {
|
|
37
|
+
if (process.platform === 'darwin') {
|
|
140
38
|
execFileSync('open', [url], { stdio: 'ignore' });
|
|
141
|
-
} else if (platform === 'win32') {
|
|
39
|
+
} else if (process.platform === 'win32') {
|
|
142
40
|
execFileSync('cmd', ['/c', 'start', '', url], { stdio: 'ignore' });
|
|
143
41
|
} else {
|
|
144
42
|
execFileSync('xdg-open', [url], { stdio: 'ignore' });
|
|
145
43
|
}
|
|
146
44
|
} catch {
|
|
147
|
-
//
|
|
45
|
+
// best-effort
|
|
148
46
|
}
|
|
149
47
|
}
|
|
150
48
|
|
|
49
|
+
function sleep(ms) {
|
|
50
|
+
return new Promise(r => setTimeout(r, ms));
|
|
51
|
+
}
|
|
52
|
+
|
|
151
53
|
export async function connect(target, options) {
|
|
152
54
|
console.log('');
|
|
153
55
|
|
|
154
|
-
|
|
56
|
+
let user, host;
|
|
155
57
|
try {
|
|
156
|
-
|
|
58
|
+
({ user, host } = parseTarget(target));
|
|
157
59
|
} catch (err) {
|
|
158
60
|
console.log(chalk.red(' Error: ') + err.message);
|
|
159
61
|
console.log('');
|
|
160
62
|
return;
|
|
161
63
|
}
|
|
162
64
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
console.log(chalk.yellow(' Tunnel already active') + ` (PID ${existing.pid})`);
|
|
167
|
-
if (existing.target) {
|
|
168
|
-
console.log(` Target: ${existing.target}`);
|
|
169
|
-
}
|
|
170
|
-
if (existing.localPort) {
|
|
171
|
-
console.log(` GUI: ${chalk.cyan(`http://localhost:${existing.localPort}`)}`);
|
|
172
|
-
}
|
|
173
|
-
console.log('');
|
|
174
|
-
console.log(` Run ${chalk.bold('groove disconnect')} first to close it.`);
|
|
65
|
+
if (!(await daemonRunning())) {
|
|
66
|
+
console.log(chalk.red(' Local daemon is not running.'));
|
|
67
|
+
console.log(` Run ${chalk.bold('groove start')} first.`);
|
|
175
68
|
console.log('');
|
|
176
69
|
return;
|
|
177
70
|
}
|
|
178
71
|
|
|
179
|
-
//
|
|
180
|
-
|
|
72
|
+
// Check for existing saved remote matching this host+user
|
|
73
|
+
let tunnelId;
|
|
74
|
+
let tunnels;
|
|
181
75
|
try {
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
console.log(chalk.red(' Daemon not running on remote.'));
|
|
185
|
-
console.log(` SSH into ${chalk.bold(target)} and run ${chalk.bold('groove start')} first.`);
|
|
186
|
-
console.log('');
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
76
|
+
const res = await fetch(`${API}/tunnels`);
|
|
77
|
+
tunnels = await res.json();
|
|
189
78
|
} catch (err) {
|
|
190
|
-
console.log(chalk.red(' ' + err.message)
|
|
79
|
+
console.log(chalk.red(' Failed to query tunnels: ') + err.message);
|
|
191
80
|
console.log('');
|
|
192
81
|
return;
|
|
193
82
|
}
|
|
194
83
|
|
|
195
|
-
|
|
84
|
+
const match = tunnels.find(t =>
|
|
85
|
+
t.host === host && (user ? t.user === user : true)
|
|
86
|
+
);
|
|
196
87
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
88
|
+
if (match) {
|
|
89
|
+
if (match.active) {
|
|
90
|
+
console.log(chalk.yellow(' Tunnel already active') + ` to ${match.name}`);
|
|
91
|
+
if (match.localPort) {
|
|
92
|
+
console.log(` GUI: ${chalk.cyan(`http://localhost:${match.localPort}`)}`);
|
|
93
|
+
}
|
|
94
|
+
console.log('');
|
|
95
|
+
console.log(` Run ${chalk.bold('groove disconnect')} first to close it.`);
|
|
96
|
+
console.log('');
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
tunnelId = match.id;
|
|
100
|
+
console.log(chalk.dim(` Using saved remote: ${match.name}`));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Save new tunnel config if none found
|
|
104
|
+
if (!tunnelId) {
|
|
105
|
+
try {
|
|
106
|
+
const body = {
|
|
107
|
+
name: target,
|
|
108
|
+
host,
|
|
109
|
+
user: user || process.env.USER || 'root',
|
|
110
|
+
port: options.port ? parseInt(options.port, 10) : 22,
|
|
111
|
+
sshKeyPath: options.identity || null,
|
|
112
|
+
autoConnect: options.autoConnect || false,
|
|
113
|
+
projectDir: options.projectDir || null,
|
|
114
|
+
};
|
|
115
|
+
const res = await fetch(`${API}/tunnels`, {
|
|
116
|
+
method: 'POST',
|
|
117
|
+
headers: { 'Content-Type': 'application/json' },
|
|
118
|
+
body: JSON.stringify(body),
|
|
119
|
+
});
|
|
120
|
+
const data = await res.json();
|
|
121
|
+
if (!res.ok) throw new Error(data.error || 'Failed to save tunnel');
|
|
122
|
+
tunnelId = data.id;
|
|
123
|
+
console.log(chalk.dim(` Saved remote: ${data.name} (${data.id})`));
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.log(chalk.red(' ' + err.message));
|
|
126
|
+
console.log('');
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
209
129
|
}
|
|
210
130
|
|
|
211
|
-
//
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
131
|
+
// Fire connect — the daemon handles test, install, upgrade, start, port-forward
|
|
132
|
+
console.log(chalk.dim(' Connecting...'));
|
|
133
|
+
|
|
134
|
+
let connectDone = false;
|
|
135
|
+
let connectResult = null;
|
|
136
|
+
let connectError = null;
|
|
137
|
+
|
|
138
|
+
const connectPromise = fetch(`${API}/tunnels/${tunnelId}/connect`, {
|
|
139
|
+
method: 'POST',
|
|
140
|
+
headers: { 'Content-Type': 'application/json' },
|
|
141
|
+
body: JSON.stringify({}),
|
|
142
|
+
}).then(async r => {
|
|
143
|
+
const data = await r.json();
|
|
144
|
+
if (!r.ok) throw new Error(data.error || 'Connection failed');
|
|
145
|
+
return data;
|
|
146
|
+
}).then(data => { connectResult = data; })
|
|
147
|
+
.catch(err => { connectError = err; })
|
|
148
|
+
.finally(() => { connectDone = true; });
|
|
149
|
+
|
|
150
|
+
// Poll status every 2s while connect is in progress
|
|
151
|
+
let dots = 0;
|
|
152
|
+
while (!connectDone) {
|
|
153
|
+
await sleep(2000);
|
|
154
|
+
if (connectDone) break;
|
|
155
|
+
try {
|
|
156
|
+
const res = await fetch(`${API}/tunnels/${tunnelId}/status`, {
|
|
157
|
+
signal: AbortSignal.timeout(2000),
|
|
158
|
+
});
|
|
159
|
+
const status = await res.json();
|
|
160
|
+
if (status.active) break;
|
|
161
|
+
} catch {
|
|
162
|
+
// status poll failure is non-fatal
|
|
240
163
|
}
|
|
241
|
-
|
|
242
|
-
|
|
164
|
+
dots++;
|
|
165
|
+
process.stdout.write(`\r ${chalk.dim('Connecting' + '.'.repeat((dots % 3) + 1).padEnd(3))} `);
|
|
243
166
|
}
|
|
244
167
|
|
|
245
|
-
//
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
168
|
+
// Ensure connect promise resolves
|
|
169
|
+
await connectPromise;
|
|
170
|
+
process.stdout.write('\r' + ' '.repeat(40) + '\r');
|
|
171
|
+
|
|
172
|
+
if (connectError) {
|
|
173
|
+
console.log(chalk.red(' Connection failed: ') + connectError.message);
|
|
250
174
|
console.log('');
|
|
251
175
|
return;
|
|
252
176
|
}
|
|
253
177
|
|
|
254
|
-
|
|
255
|
-
tunnel.unref();
|
|
256
|
-
writeFileSync(pidFile(), String(tunnel.pid), { mode: 0o600 });
|
|
257
|
-
writeFileSync(tunnelInfoFile(), JSON.stringify({
|
|
258
|
-
target,
|
|
259
|
-
localPort,
|
|
260
|
-
remotePort: REMOTE_PORT,
|
|
261
|
-
startedAt: new Date().toISOString(),
|
|
262
|
-
}), { mode: 0o600 });
|
|
263
|
-
|
|
264
|
-
const url = `http://localhost:${localPort}`;
|
|
178
|
+
const url = connectResult.url || `http://localhost:${connectResult.localPort}`;
|
|
265
179
|
|
|
266
|
-
console.log('');
|
|
267
180
|
console.log(chalk.green(' Connected!'));
|
|
268
181
|
console.log('');
|
|
269
182
|
console.log(` Target: ${chalk.bold(target)}`);
|
|
270
|
-
console.log(` Tunnel: localhost:${localPort} → ${target}
|
|
183
|
+
console.log(` Tunnel: localhost:${connectResult.localPort} → ${target}:31415`);
|
|
271
184
|
console.log(` GUI: ${chalk.cyan(url)}`);
|
|
272
|
-
console.log(` PID: ${tunnel.pid}`);
|
|
273
185
|
console.log('');
|
|
274
186
|
|
|
275
|
-
// Open browser (Commander: --no-browser sets options.browser = false)
|
|
276
187
|
if (options.browser !== false) {
|
|
277
188
|
openBrowser(url);
|
|
278
189
|
}
|
|
@@ -1,91 +1,67 @@
|
|
|
1
|
-
// GROOVE CLI — disconnect command (
|
|
1
|
+
// GROOVE CLI — disconnect command (close SSH tunnel via daemon)
|
|
2
2
|
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
3
3
|
|
|
4
|
-
import { execFileSync } from 'child_process';
|
|
5
|
-
import { existsSync, readFileSync, unlinkSync } from 'fs';
|
|
6
|
-
import { resolve } from 'path';
|
|
7
4
|
import chalk from 'chalk';
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
return resolve(process.cwd(), '.groove', 'tunnel.pid');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function tunnelInfoFile() {
|
|
14
|
-
return resolve(process.cwd(), '.groove', 'tunnel.json');
|
|
15
|
-
}
|
|
6
|
+
const API = 'http://localhost:31415/api';
|
|
16
7
|
|
|
17
|
-
function
|
|
18
|
-
try {
|
|
19
|
-
|
|
8
|
+
async function daemonRunning() {
|
|
9
|
+
try {
|
|
10
|
+
const res = await fetch(`${API}/health`, { signal: AbortSignal.timeout(3000) });
|
|
11
|
+
return res.ok;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
export async function disconnect() {
|
|
17
|
+
export async function disconnect(target) {
|
|
23
18
|
console.log('');
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.log(chalk.yellow(' No active tunnel found.'));
|
|
20
|
+
if (!(await daemonRunning())) {
|
|
21
|
+
console.log(chalk.yellow(' No daemon running.'));
|
|
28
22
|
console.log('');
|
|
29
23
|
return;
|
|
30
24
|
}
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
if (isNaN(pid)) {
|
|
34
|
-
console.log(chalk.yellow(' Invalid tunnel PID file. Cleaning up.'));
|
|
35
|
-
cleanup();
|
|
36
|
-
console.log('');
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Read tunnel info for display
|
|
41
|
-
let info = {};
|
|
42
|
-
try {
|
|
43
|
-
const infoPath = tunnelInfoFile();
|
|
44
|
-
if (existsSync(infoPath)) {
|
|
45
|
-
info = JSON.parse(readFileSync(infoPath, 'utf8'));
|
|
46
|
-
}
|
|
47
|
-
} catch { /* ignore */ }
|
|
48
|
-
|
|
49
|
-
// Check if process is alive
|
|
26
|
+
let tunnels;
|
|
50
27
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
const res = await fetch(`${API}/tunnels`);
|
|
29
|
+
tunnels = await res.json();
|
|
30
|
+
} catch (err) {
|
|
31
|
+
console.log(chalk.red(' Failed to query tunnels: ') + err.message);
|
|
55
32
|
console.log('');
|
|
56
33
|
return;
|
|
57
34
|
}
|
|
58
35
|
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
console.log(
|
|
66
|
-
|
|
36
|
+
// Find the tunnel to disconnect
|
|
37
|
+
let tunnel;
|
|
38
|
+
if (target) {
|
|
39
|
+
tunnel = tunnels.find(t => t.active && (t.name === target || t.host === target || t.id === target));
|
|
40
|
+
if (!tunnel) {
|
|
41
|
+
console.log(chalk.yellow(` No active tunnel matching "${target}".`));
|
|
42
|
+
console.log('');
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
tunnel = tunnels.find(t => t.active);
|
|
47
|
+
if (!tunnel) {
|
|
48
|
+
console.log(chalk.yellow(' No active tunnel found.'));
|
|
67
49
|
console.log('');
|
|
68
50
|
return;
|
|
69
51
|
}
|
|
70
|
-
} catch {
|
|
71
|
-
// ps failed — proceed cautiously, don't kill
|
|
72
|
-
console.log(chalk.yellow(' Cannot verify tunnel process. Cleaning up stale files.'));
|
|
73
|
-
cleanup();
|
|
74
|
-
console.log('');
|
|
75
|
-
return;
|
|
76
52
|
}
|
|
77
53
|
|
|
78
|
-
// Kill the tunnel
|
|
79
54
|
try {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
console.log(` Was connected to: ${chalk.dim(info.target)}`);
|
|
84
|
-
}
|
|
55
|
+
const res = await fetch(`${API}/tunnels/${tunnel.id}/disconnect`, { method: 'POST' });
|
|
56
|
+
const data = await res.json();
|
|
57
|
+
if (!res.ok) throw new Error(data.error || 'Disconnect failed');
|
|
85
58
|
} catch (err) {
|
|
86
|
-
console.log(chalk.red('
|
|
59
|
+
console.log(chalk.red(' Disconnect failed: ') + err.message);
|
|
60
|
+
console.log('');
|
|
61
|
+
return;
|
|
87
62
|
}
|
|
88
63
|
|
|
89
|
-
|
|
64
|
+
console.log(chalk.green(' Tunnel disconnected.'));
|
|
65
|
+
console.log(` Was connected to: ${chalk.dim(tunnel.name)}`);
|
|
90
66
|
console.log('');
|
|
91
67
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// GROOVE CLI — remotes command (list saved SSH tunnels)
|
|
2
|
+
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
3
|
+
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
|
|
6
|
+
const API = 'http://localhost:31415/api';
|
|
7
|
+
|
|
8
|
+
async function daemonRunning() {
|
|
9
|
+
try {
|
|
10
|
+
const res = await fetch(`${API}/health`, { signal: AbortSignal.timeout(3000) });
|
|
11
|
+
return res.ok;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function remotes() {
|
|
18
|
+
console.log('');
|
|
19
|
+
|
|
20
|
+
if (!(await daemonRunning())) {
|
|
21
|
+
console.log(chalk.yellow(' Daemon is not running.'));
|
|
22
|
+
console.log(` Run ${chalk.bold('groove start')} first.`);
|
|
23
|
+
console.log('');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let tunnels;
|
|
28
|
+
try {
|
|
29
|
+
const res = await fetch(`${API}/tunnels`);
|
|
30
|
+
tunnels = await res.json();
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.log(chalk.red(' Failed to query tunnels: ') + err.message);
|
|
33
|
+
console.log('');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!tunnels.length) {
|
|
38
|
+
console.log(chalk.dim(' No saved remotes.'));
|
|
39
|
+
console.log(` Use ${chalk.bold('groove connect user@host')} to add one.`);
|
|
40
|
+
console.log('');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Column headers
|
|
45
|
+
const nameW = Math.max(6, ...tunnels.map(t => t.name.length)) + 2;
|
|
46
|
+
const hostW = Math.max(6, ...tunnels.map(t => t.host.length)) + 2;
|
|
47
|
+
const userW = Math.max(6, ...tunnels.map(t => t.user.length)) + 2;
|
|
48
|
+
|
|
49
|
+
const header =
|
|
50
|
+
chalk.dim(' ' +
|
|
51
|
+
'NAME'.padEnd(nameW) +
|
|
52
|
+
'HOST'.padEnd(hostW) +
|
|
53
|
+
'USER'.padEnd(userW) +
|
|
54
|
+
'STATUS'.padEnd(12) +
|
|
55
|
+
'PORT');
|
|
56
|
+
console.log(header);
|
|
57
|
+
console.log(chalk.dim(' ' + '─'.repeat(nameW + hostW + userW + 12 + 6)));
|
|
58
|
+
|
|
59
|
+
for (const t of tunnels) {
|
|
60
|
+
const statusRaw = t.active ? 'active' : 'inactive';
|
|
61
|
+
const statusCol = t.active ? chalk.green(statusRaw) : chalk.dim(statusRaw);
|
|
62
|
+
const portRaw = t.active && t.localPort ? String(t.localPort) : '—';
|
|
63
|
+
const portCol = t.active && t.localPort ? chalk.cyan(portRaw) : chalk.dim(portRaw);
|
|
64
|
+
console.log(
|
|
65
|
+
' ' +
|
|
66
|
+
t.name.padEnd(nameW) +
|
|
67
|
+
t.host.padEnd(hostW) +
|
|
68
|
+
t.user.padEnd(userW) +
|
|
69
|
+
statusCol + ' '.repeat(Math.max(1, 12 - statusRaw.length)) +
|
|
70
|
+
portCol
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log('');
|
|
75
|
+
}
|