diff --git a/README.md b/README.md index 8b7fa44cb..38b4afa75 100644 --- a/README.md +++ b/README.md @@ -435,7 +435,9 @@ Interested in a paid placement to support development? Email [mail@termix.site]( ## Support -Need help or want to request a feature? Open a [new issue](https://github.com/Termix-SSH/Support/issues) and add as much detail as you can, in English if possible. You can also ask in the support channel on [Discord](https://discord.gg/jVQGdvHDrf), though replies there can take longer. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server.
@@ -501,4 +503,4 @@ See [Projects](https://github.com/orgs/Termix-SSH/projects/5) for all planned fe ## License -Distributed under the Apache License Version 2.0. See `LICENSE` for more information. +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/docs/readme/README-AR.md b/docs/readme/README-AR.md index 50dd79058..c34a2749a 100644 --- a/docs/readme/README-AR.md +++ b/docs/readme/README-AR.md @@ -440,7 +440,9 @@ Termix مجاني ومفتوح المصدر، بلا اشتراكات ولا خ ## الدعم -تحتاج مساعدة أو تريد طلب ميزة؟ افتح [مشكلة جديدة](https://github.com/Termix-SSH/Support/issues) واذكر أكبر قدر ممكن من التفاصيل، بالإنجليزية إن أمكن. يمكنك أيضًا السؤال في قناة الدعم على [Discord](https://discord.gg/jVQGdvHDrf)، وإن كانت الردود هناك قد تتأخر. +للإبلاغ عن خطأ أو طلب ميزة، افتح [تذكرة دعم](https://github.com/Termix-SSH/Support/issues/new/choose). يجب أن تكون مسجلًا الدخول إلى GitHub. اذكر أكبر قدر ممكن من التفاصيل، ويفضل بالإنجليزية. + +للنقاشات والأسئلة، انضم إلى خادم [Discord](https://discord.gg/jVQGdvHDrf).
@@ -506,4 +508,4 @@ Termix مجاني ومفتوح المصدر، بلا اشتراكات ولا خ ## الترخيص -يوزَّع بموجب ترخيص Apache الإصدار 2.0. راجع ملف `LICENSE` لمزيد من المعلومات. +يوزَّع بموجب ترخيص Apache الإصدار 2.0. راجع ملف [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) لمزيد من المعلومات. diff --git a/docs/readme/README-CN.md b/docs/readme/README-CN.md index 4a2f33d70..9fe873303 100644 --- a/docs/readme/README-CN.md +++ b/docs/readme/README-CN.md @@ -434,7 +434,9 @@ Termix 免费且开源,没有订阅也没有付费方案。如果你觉得它 ## 支持 -需要帮助或想提功能建议?可以[新建一个 issue](https://github.com/Termix-SSH/Support/issues),尽量写清楚细节,如果方便请用英文。你也可以在 [Discord](https://discord.gg/jVQGdvHDrf) 的支持频道提问,不过那边回复可能会慢一些。 +要报告 bug 或提功能建议,请提交一个[支持工单](https://github.com/Termix-SSH/Support/issues/new/choose)。你需要先登录 GitHub。请尽量写清楚细节,最好用英文。 + +讨论和提问请加入 [Discord](https://discord.gg/jVQGdvHDrf) 服务器。
@@ -500,5 +502,5 @@ Termix 免费且开源,没有订阅也没有付费方案。如果你觉得它 ## 许可证 -基于 Apache License 2.0 发布。详见 `LICENSE`。 +基于 Apache License 2.0 发布。详见 [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE)。 diff --git a/docs/readme/README-DE.md b/docs/readme/README-DE.md index 1155c9a4b..d00d66a0b 100644 --- a/docs/readme/README-DE.md +++ b/docs/readme/README-DE.md @@ -435,7 +435,9 @@ Interesse an einer bezahlten Platzierung zur Unterstützung der Entwicklung? Sch ## Support -Brauchst du Hilfe oder möchtest du eine Funktion vorschlagen? Erstelle ein [neues Issue](https://github.com/Termix-SSH/Support/issues) und beschreibe es so genau wie möglich, nach Möglichkeit auf Englisch. Du kannst auch im Support-Kanal auf [Discord](https://discord.gg/jVQGdvHDrf) fragen, dort dauern Antworten aber manchmal länger. +Um einen Fehler zu melden oder eine Funktion vorzuschlagen, erstelle ein [Support-Ticket](https://github.com/Termix-SSH/Support/issues/new/choose). Du musst bei GitHub angemeldet sein. Beschreibe alles so genau wie möglich, am besten auf Englisch. + +Für Diskussionen und Fragen tritt dem [Discord](https://discord.gg/jVQGdvHDrf)-Server bei.
@@ -501,4 +503,4 @@ Alle geplanten Funktionen stehen unter [Projects](https://github.com/orgs/Termix ## Lizenz -Veröffentlicht unter der Apache-Lizenz Version 2.0. Mehr dazu in `LICENSE`. +Veröffentlicht unter der Apache-Lizenz Version 2.0. Mehr dazu in [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE). diff --git a/docs/readme/README-ES.md b/docs/readme/README-ES.md index d59a642f6..97708d966 100644 --- a/docs/readme/README-ES.md +++ b/docs/readme/README-ES.md @@ -435,7 +435,9 @@ Termix es gratuito y de código abierto, sin suscripciones ni planes de pago. Si ## Soporte -¿Necesitas ayuda o quieres pedir una función? Abre una [nueva incidencia](https://github.com/Termix-SSH/Support/issues) y añade todo el detalle que puedas, en inglés si te es posible. También puedes preguntar en el canal de soporte de [Discord](https://discord.gg/jVQGdvHDrf), aunque allí las respuestas pueden tardar más. +Para informar de un error o pedir una función, abre un [ticket de soporte](https://github.com/Termix-SSH/Support/issues/new/choose). Necesitas haber iniciado sesión en GitHub. Añade todo el detalle que puedas, preferiblemente en inglés. + +Para debates y preguntas, únete al servidor de [Discord](https://discord.gg/jVQGdvHDrf).
@@ -501,4 +503,4 @@ Todas las funciones planeadas están en [Projects](https://github.com/orgs/Termi ## Licencia -Distribuido bajo la Licencia Apache versión 2.0. Consulta `LICENSE` para más información. +Distribuido bajo la Licencia Apache versión 2.0. Consulta [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) para más información. diff --git a/docs/readme/README-FR.md b/docs/readme/README-FR.md index f99b2997e..9a1f7a087 100644 --- a/docs/readme/README-FR.md +++ b/docs/readme/README-FR.md @@ -433,7 +433,9 @@ Intéressé par un emplacement payant pour soutenir le développement ? Écrivez ## Support -Besoin d'aide ou envie de proposer une fonctionnalité ? Ouvrez un [nouveau ticket](https://github.com/Termix-SSH/Support/issues) avec le plus de détails possible, en anglais si vous le pouvez. Vous pouvez aussi demander dans le canal support sur [Discord](https://discord.gg/jVQGdvHDrf), même si les réponses y prennent parfois plus de temps. +Pour signaler un bug ou proposer une fonctionnalité, ouvrez un [ticket de support](https://github.com/Termix-SSH/Support/issues/new/choose). Vous devez être connecté à GitHub. Donnez le plus de détails possible, de préférence en anglais. + +Pour les discussions et les questions, rejoignez le serveur [Discord](https://discord.gg/jVQGdvHDrf).
@@ -499,4 +501,4 @@ Toutes les fonctionnalités prévues sont dans [Projects](https://github.com/org ## Licence -Distribué sous licence Apache version 2.0. Voir `LICENSE` pour plus d'informations. +Distribué sous licence Apache version 2.0. Voir [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) pour plus d'informations. diff --git a/docs/readme/README-HI.md b/docs/readme/README-HI.md index aea110a31..3e8c14711 100644 --- a/docs/readme/README-HI.md +++ b/docs/readme/README-HI.md @@ -440,7 +440,9 @@ Termix मुफ़्त और ओपन सोर्स है, न कोई ## सहायता -मदद चाहिए या कोई सुविधा माँगनी है? एक [नया issue](https://github.com/Termix-SSH/Support/issues) खोलें और जितना हो सके विस्तार से लिखें, हो सके तो अंग्रेज़ी में। आप [Discord](https://discord.gg/jVQGdvHDrf) के सपोर्ट चैनल में भी पूछ सकते हैं, हालाँकि वहाँ जवाब आने में ज़्यादा समय लग सकता है। +बग रिपोर्ट करने या कोई सुविधा माँगने के लिए एक [सपोर्ट टिकट](https://github.com/Termix-SSH/Support/issues/new/choose) खोलें। इसके लिए GitHub में लॉग इन होना ज़रूरी है। जितना हो सके विस्तार से लिखें, हो सके तो अंग्रेज़ी में। + +चर्चा और सवालों के लिए [Discord](https://discord.gg/jVQGdvHDrf) सर्वर से जुड़ें।
@@ -506,4 +508,4 @@ Termix मुफ़्त और ओपन सोर्स है, न कोई ## लाइसेंस -Apache License संस्करण 2.0 के तहत वितरित। अधिक जानकारी के लिए `LICENSE` देखें। +Apache License संस्करण 2.0 के तहत वितरित। अधिक जानकारी के लिए [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) देखें। diff --git a/docs/readme/README-IT.md b/docs/readme/README-IT.md index d67e120af..f57e27814 100644 --- a/docs/readme/README-IT.md +++ b/docs/readme/README-IT.md @@ -435,7 +435,9 @@ Ti interessa uno spazio a pagamento per sostenere lo sviluppo? Scrivi a [mail@te ## Supporto -Ti serve aiuto o vuoi proporre una funzionalità? Apri una [nuova issue](https://github.com/Termix-SSH/Support/issues) con più dettagli possibile, in inglese se ci riesci. Puoi anche chiedere nel canale di supporto su [Discord](https://discord.gg/jVQGdvHDrf), anche se lì le risposte possono richiedere più tempo. +Per segnalare un bug o proporre una funzionalità, apri un [ticket di supporto](https://github.com/Termix-SSH/Support/issues/new/choose). Devi aver effettuato l'accesso a GitHub. Aggiungi più dettagli possibile, preferibilmente in inglese. + +Per discussioni e domande, unisciti al server [Discord](https://discord.gg/jVQGdvHDrf).
@@ -501,6 +503,6 @@ Tutte le funzionalità pianificate sono su [Projects](https://github.com/orgs/Te ## Licenza -Distribuito con licenza Apache versione 2.0. Vedi `LICENSE` per maggiori informazioni. +Distribuito con licenza Apache versione 2.0. Vedi [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) per maggiori informazioni. diff --git a/docs/readme/README-JA.md b/docs/readme/README-JA.md index c0ec71279..a36e744d8 100644 --- a/docs/readme/README-JA.md +++ b/docs/readme/README-JA.md @@ -435,7 +435,9 @@ Termix は無料でオープンソースで、サブスクリプションも有 ## サポート -困ったときや機能の要望があるときは、[新しい issue](https://github.com/Termix-SSH/Support/issues) を作って、できるだけ詳しく、できれば英語で書いてください。[Discord](https://discord.gg/jVQGdvHDrf) のサポートチャンネルでも質問できますが、返信には時間がかかることがあります。 +バグの報告や機能の要望は、[サポートチケット](https://github.com/Termix-SSH/Support/issues/new/choose)を作成してください。GitHub へのログインが必要です。できるだけ詳しく、できれば英語で書いてください。 + +議論や質問は [Discord](https://discord.gg/jVQGdvHDrf) サーバーに参加してください。
@@ -501,5 +503,5 @@ Termix は無料でオープンソースで、サブスクリプションも有 ## ライセンス -Apache License 2.0 のもとで配布しています。詳しくは `LICENSE` をご覧ください。 +Apache License 2.0 のもとで配布しています。詳しくは [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) をご覧ください。 diff --git a/docs/readme/README-KO.md b/docs/readme/README-KO.md index e359b0746..c0ddf5c8f 100644 --- a/docs/readme/README-KO.md +++ b/docs/readme/README-KO.md @@ -433,7 +433,9 @@ Termix는 무료 오픈 소스이고 구독이나 유료 요금제가 없습니 ## 지원 -도움이 필요하거나 기능을 제안하고 싶으신가요? [새 이슈](https://github.com/Termix-SSH/Support/issues)를 올리면서 되도록 자세히, 가능하면 영어로 적어 주세요. [Discord](https://discord.gg/jVQGdvHDrf) 지원 채널에서 물어봐도 되지만 답변이 늦을 수 있습니다. +버그를 신고하거나 기능을 요청하려면 [지원 티켓](https://github.com/Termix-SSH/Support/issues/new/choose)을 여세요. GitHub에 로그인되어 있어야 합니다. 되도록 자세히, 가능하면 영어로 적어 주세요. + +토론과 질문은 [Discord](https://discord.gg/jVQGdvHDrf) 서버에 참여해 주세요.
@@ -499,4 +501,4 @@ Termix는 무료 오픈 소스이고 구독이나 유료 요금제가 없습니 ## 라이선스 -Apache License 2.0에 따라 배포합니다. 자세한 내용은 `LICENSE`를 참고하세요. +Apache License 2.0에 따라 배포합니다. 자세한 내용은 [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE)를 참고하세요. diff --git a/docs/readme/README-PT.md b/docs/readme/README-PT.md index f76761a48..bdda2c282 100644 --- a/docs/readme/README-PT.md +++ b/docs/readme/README-PT.md @@ -431,7 +431,9 @@ Tens interesse num espaço pago para apoiar o desenvolvimento? Escreve para [mai ## Suporte -Precisas de ajuda ou queres pedir uma funcionalidade? Abre uma [nova issue](https://github.com/Termix-SSH/Support/issues) com o máximo de detalhes possível, em inglês se der. Também podes perguntar no canal de suporte do [Discord](https://discord.gg/jVQGdvHDrf), embora as respostas por lá possam demorar mais. +Para reportar um bug ou pedir uma funcionalidade, abre um [ticket de suporte](https://github.com/Termix-SSH/Support/issues/new/choose). Precisas de ter sessão iniciada no GitHub. Dá o máximo de detalhes possível, de preferência em inglês. + +Para discussões e perguntas, junta-te ao servidor do [Discord](https://discord.gg/jVQGdvHDrf).
@@ -497,4 +499,4 @@ Todas as funcionalidades planejadas estão em [Projects](https://github.com/orgs ## Licença -Distribuído sob a Licença Apache versão 2.0. Vê `LICENSE` para mais informações. +Distribuído sob a Licença Apache versão 2.0. Vê [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) para mais informações. diff --git a/docs/readme/README-RU.md b/docs/readme/README-RU.md index 6be533190..6aec9e39d 100644 --- a/docs/readme/README-RU.md +++ b/docs/readme/README-RU.md @@ -431,7 +431,9 @@ Termix бесплатен и открыт, без подписок и платн ## Поддержка -Нужна помощь или хотите предложить функцию? Создайте [новое обращение](https://github.com/Termix-SSH/Support/issues) и опишите всё как можно подробнее, по возможности на английском. Ещё можно спросить в канале поддержки в [Discord](https://discord.gg/jVQGdvHDrf), хотя там ответа иногда приходится ждать дольше. +Чтобы сообщить об ошибке или предложить функцию, создайте [обращение в поддержку](https://github.com/Termix-SSH/Support/issues/new/choose). Нужно войти в GitHub. Опишите всё как можно подробнее, желательно на английском. + +Для обсуждений и вопросов присоединяйтесь к серверу [Discord](https://discord.gg/jVQGdvHDrf).
@@ -497,4 +499,4 @@ Termix бесплатен и открыт, без подписок и платн ## Лицензия -Распространяется по лицензии Apache версии 2.0. Подробности в файле `LICENSE`. +Распространяется по лицензии Apache версии 2.0. Подробности в файле [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE). diff --git a/docs/readme/README-TR.md b/docs/readme/README-TR.md index 3b10c0bb1..593b0e2b0 100644 --- a/docs/readme/README-TR.md +++ b/docs/readme/README-TR.md @@ -431,7 +431,9 @@ Geliştirmeyi desteklemek için ücretli bir yerleşim ilginizi çeker mi? [mail ## Destek -Yardıma mı ihtiyacınız var ya da bir özellik mi istiyorsunuz? [Yeni bir konu](https://github.com/Termix-SSH/Support/issues) açın ve olabildiğince ayrıntı ekleyin, mümkünse İngilizce yazın. [Discord](https://discord.gg/jVQGdvHDrf) üzerindeki destek kanalında da sorabilirsiniz, ancak oradaki yanıtlar daha uzun sürebilir. +Bir hata bildirmek veya özellik istemek için bir [destek talebi](https://github.com/Termix-SSH/Support/issues/new/choose) açın. GitHub'a giriş yapmış olmanız gerekir. Olabildiğince ayrıntılı yazın, mümkünse İngilizce. + +Tartışmalar ve sorular için [Discord](https://discord.gg/jVQGdvHDrf) sunucusuna katılın.
@@ -497,4 +499,4 @@ Planlanan tüm özellikler [Projects](https://github.com/orgs/Termix-SSH/project ## Lisans -Apache Lisansı Sürüm 2.0 ile dağıtılır. Ayrıntılar için `LICENSE` dosyasına bakın. +Apache Lisansı Sürüm 2.0 ile dağıtılır. Ayrıntılar için [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) dosyasına bakın. diff --git a/docs/readme/README-VI.md b/docs/readme/README-VI.md index beb822aad..f206d36c6 100644 --- a/docs/readme/README-VI.md +++ b/docs/readme/README-VI.md @@ -431,7 +431,9 @@ Bạn muốn đặt quảng cáo trả phí để ủng hộ việc phát triể ## Hỗ trợ -Cần giúp đỡ hoặc muốn đề xuất tính năng? Hãy mở một [issue mới](https://github.com/Termix-SSH/Support/issues) và mô tả càng chi tiết càng tốt, bằng tiếng Anh nếu được. Bạn cũng có thể hỏi trong kênh hỗ trợ trên [Discord](https://discord.gg/jVQGdvHDrf), tuy nhiên ở đó có thể lâu được trả lời hơn. +Để báo lỗi hoặc đề xuất tính năng, hãy mở một [phiếu hỗ trợ](https://github.com/Termix-SSH/Support/issues/new/choose). Bạn cần đăng nhập GitHub. Hãy mô tả càng chi tiết càng tốt, ưu tiên bằng tiếng Anh. + +Để thảo luận và đặt câu hỏi, hãy tham gia máy chủ [Discord](https://discord.gg/jVQGdvHDrf).
@@ -497,4 +499,4 @@ Toàn bộ tính năng dự kiến nằm ở [Projects](https://github.com/orgs/ ## Giấy phép -Phát hành theo Giấy phép Apache phiên bản 2.0. Xem `LICENSE` để biết thêm chi tiết. +Phát hành theo Giấy phép Apache phiên bản 2.0. Xem [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) để biết thêm chi tiết. diff --git a/package-lock.json b/package-lock.json index cc237dbf9..5754f8430 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18568,7 +18568,7 @@ "packages/plugin-sdk": { "name": "@termix/plugin-sdk", "version": "1.0.0", - "license": "MIT", + "license": "Apache-2.0", "dependencies": { "@tailwindcss/node": "^4.2.4", "@tailwindcss/oxide": "^4.2.4", @@ -18623,13 +18623,18 @@ "acme-client": "^5.4.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18649,6 +18654,8 @@ "remark-gfm": "^4.0.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18656,7 +18663,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18676,6 +18686,8 @@ "nodemailer": "^10.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18683,7 +18695,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18701,6 +18716,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18708,7 +18725,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18732,13 +18752,18 @@ "react-xtermjs": "^1.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18777,6 +18802,8 @@ "remark-gfm": "^4.0.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -18786,7 +18813,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18813,12 +18843,17 @@ "tailwind-merge": "^3.5.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18838,6 +18873,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18845,7 +18882,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18862,6 +18902,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -18870,7 +18912,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18890,6 +18935,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18897,7 +18944,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18917,12 +18967,17 @@ "react-cytoscapejs": "^2.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18940,6 +18995,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -18947,7 +19004,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -18988,12 +19048,17 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19014,13 +19079,18 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19039,6 +19109,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19046,7 +19118,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19068,13 +19143,18 @@ "serialport": "^13.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19093,12 +19173,17 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19119,6 +19204,8 @@ "redis": "^6.2.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19126,7 +19213,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19145,6 +19235,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19152,7 +19244,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19178,6 +19273,8 @@ "react-xtermjs": "^1.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -19187,7 +19284,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19212,6 +19312,8 @@ "undici": "^8.10.2" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19219,7 +19321,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19238,6 +19343,8 @@ "redis": "^6.2.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19245,7 +19352,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19263,6 +19373,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19270,7 +19382,10 @@ "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19288,13 +19403,18 @@ "drizzle-orm": "^0.45.2" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19311,6 +19431,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19318,7 +19440,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19337,6 +19462,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19344,7 +19471,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19364,6 +19494,8 @@ "speakeasy": "^2.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19371,7 +19503,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19389,6 +19524,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19396,7 +19533,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19416,6 +19556,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19423,7 +19565,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19442,11 +19587,16 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19459,10 +19609,15 @@ "name": "@termix-plugin/warpgate", "version": "1.0.0", "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19476,6 +19631,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -19483,7 +19640,10 @@ "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19504,6 +19664,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19511,7 +19673,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -19529,6 +19694,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -19536,7 +19703,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { diff --git a/packages/plugin-sdk/README.md b/packages/plugin-sdk/README.md index 6fcb25e1d..51076531e 100644 --- a/packages/plugin-sdk/README.md +++ b/packages/plugin-sdk/README.md @@ -1,18 +1,62 @@ -# @termix/plugin-sdk +
-Everything a [Termix](https://github.com/Termix-SSH/Termix) plugin builds -against: the types for `activate(ctx)` and `activate(app)`, table -definitions, the manifest schema, test helpers, a vitest preset and the -`termix-plugin` CLI. +Termix Logo + +

Termix Plugin SDK

+ +

Everything you need to build a Termix plugin

+ +
+ +
+ +## Overview + +`@termix/plugin-sdk` is what every [Termix](https://github.com/Termix-SSH/Termix) plugin builds against, including the ones that ship with Termix. It has the types for a plugin's backend and frontend, table definitions, the manifest schema, test helpers, and the `termix-plugin` CLI. The easiest way to start is the [Termix Plugin Template](https://github.com/Termix-SSH/Termix-Plugin-Template). + +
+ +## What's Inside + +- **Backend:** the types for `activate(ctx)`, database and table helpers, host commands and SSH certificates +- **Frontend:** the types for `activate(app)`, plus `@termix/plugin-sdk/ui`, the components and theme Termix serves to plugins +- **Manifest:** the manifest schema, the capability catalog and settings types +- **Testing:** `createMockCtx()`, `createTestDb()`, `renderWithApp()` and a Vitest preset +- **CLI:** `termix-plugin`, which builds, tests, validates, packs and signs a plugin and writes its migrations + +
+ +## Installation ```bash npm install --save-dev @termix/plugin-sdk -npx termix-plugin build # bundle dist/backend.js and dist/frontend.js -npx termix-plugin test # run the plugin's vitest suite -npx termix-plugin validate # check manifest.json and the files it names -npx termix-plugin pack # write -.tmxplug -npx termix-plugin sign # needs TERMIX_PLUGIN_SIGNING_KEY ``` -Start from -[Termix-Plugin-Template](https://github.com/Termix-SSH/Termix-Plugin-Template). +
+ +## CLI + +```bash +npx termix-plugin build # bundle dist/backend.js and dist/frontend.js +npx termix-plugin test # run the plugin's Vitest suite +npx termix-plugin validate # check manifest.json and the files it names +npx termix-plugin migrations # write migrations from the table definitions +npx termix-plugin pack # write -.tmxplug +npx termix-plugin sign # sign it, needs TERMIX_PLUGIN_SIGNING_KEY +npx termix-plugin verify --key # check a signature +npx termix-plugin keygen --out # make a new signing key pair +``` + +
+ +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/packages/plugin-sdk/cli/commands/validate.mjs b/packages/plugin-sdk/cli/commands/validate.mjs index df9fd1ecc..64ce5f2ec 100644 --- a/packages/plugin-sdk/cli/commands/validate.mjs +++ b/packages/plugin-sdk/cli/commands/validate.mjs @@ -2,6 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; import { readManifest } from "../lib/plugin-dir.mjs"; +import { validateChangelog } from "../lib/changelog.mjs"; /** * The manifest rules live in src/manifest.ts, which the server uses too, so @@ -40,6 +41,7 @@ export async function validate({ cwd }) { ); problems.push(...validateNativeDependencies(cwd, raw)); problems.push(...validatePackage(cwd, raw)); + problems.push(...validateChangelogFile(cwd, raw)); if (problems.length > 0) { for (const problem of problems) console.error(` ${problem}`); @@ -79,6 +81,30 @@ function validatePackage(cwd, raw) { return problems; } +/** + * CHANGELOG.json is optional, but when it is there it has to parse and its + * newest release has to match the manifest version. + */ +function validateChangelogFile(cwd, raw) { + const jsonPath = path.join(cwd, "CHANGELOG.json"); + if (!fs.existsSync(jsonPath)) { + return fs.existsSync(path.join(cwd, "CHANGELOG.md")) + ? [ + "CHANGELOG.md is no longer shipped; move the release notes to CHANGELOG.json", + ] + : []; + } + let changelog; + try { + changelog = JSON.parse(fs.readFileSync(jsonPath, "utf8")); + } catch (error) { + return [`CHANGELOG.json is not valid JSON: ${error.message}`]; + } + return validateChangelog(changelog, raw.version).map( + (problem) => `CHANGELOG.json: ${problem}`, + ); +} + /** * A native dependency has to actually be a real dependency of the plugin, or * the build's external declaration points at nothing node_modules can diff --git a/packages/plugin-sdk/cli/lib/changelog.mjs b/packages/plugin-sdk/cli/lib/changelog.mjs new file mode 100644 index 000000000..6eae9e149 --- /dev/null +++ b/packages/plugin-sdk/cli/lib/changelog.mjs @@ -0,0 +1,126 @@ +export const CHANGE_TYPES = [ + "added", + "changed", + "fixed", + "removed", + "deprecated", + "security", +]; + +const SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/; +const DATE = /^\d{4}-\d{2}-\d{2}$/; +const TOP_KEYS = ["$schema", "unreleased", "releases"]; +const RELEASE_KEYS = ["version", "date", "notes", "changes"]; +const CHANGE_KEYS = ["type", "text"]; + +function compareVersions(a, b) { + const pa = SEMVER.exec(a); + const pb = SEMVER.exec(b); + for (let i = 1; i <= 3; i++) { + const diff = Number(pa[i]) - Number(pb[i]); + if (diff !== 0) return diff; + } + if (pa[4] === pb[4]) return 0; + if (!pa[4]) return 1; + if (!pb[4]) return -1; + return pa[4] < pb[4] ? -1 : 1; +} + +function unknownKeys(value, allowed, where, problems) { + for (const key of Object.keys(value)) { + if (!allowed.includes(key)) + problems.push(`${where} has unknown key "${key}"`); + } +} + +function checkChanges(changes, where, problems) { + if (!Array.isArray(changes)) { + problems.push(`${where} must be an array`); + return; + } + changes.forEach((change, i) => { + const at = `${where}[${i}]`; + if (!change || typeof change !== "object" || Array.isArray(change)) { + problems.push(`${at} must be an object`); + return; + } + unknownKeys(change, CHANGE_KEYS, at, problems); + if (!CHANGE_TYPES.includes(change.type)) { + problems.push(`${at}.type must be one of ${CHANGE_TYPES.join(", ")}`); + } + if (typeof change.text !== "string" || change.text.trim() === "") { + problems.push(`${at}.text must be a non-empty string`); + } + }); +} + +/** + * Checks a parsed CHANGELOG.json. The newest release has to be the version + * in the manifest, so a release never ships without its notes. + */ +export function validateChangelog(changelog, manifestVersion) { + const problems = []; + if (!changelog || typeof changelog !== "object" || Array.isArray(changelog)) { + return ["CHANGELOG.json must be an object"]; + } + unknownKeys(changelog, TOP_KEYS, "CHANGELOG.json", problems); + + if (changelog.unreleased !== undefined) { + checkChanges(changelog.unreleased, "unreleased", problems); + } + + const releases = changelog.releases; + if (!Array.isArray(releases) || releases.length === 0) { + problems.push("releases must be a non-empty array"); + return problems; + } + + const seen = new Set(); + releases.forEach((release, i) => { + const at = `releases[${i}]`; + if (!release || typeof release !== "object" || Array.isArray(release)) { + problems.push(`${at} must be an object`); + return; + } + unknownKeys(release, RELEASE_KEYS, at, problems); + if (typeof release.version !== "string" || !SEMVER.test(release.version)) { + problems.push(`${at}.version must be a version like 1.2.3`); + } else if (seen.has(release.version)) { + problems.push(`${at}.version ${release.version} is listed twice`); + } else { + seen.add(release.version); + } + if ( + release.date !== undefined && + (typeof release.date !== "string" || !DATE.test(release.date)) + ) { + problems.push(`${at}.date must be a date like 2026-10-01`); + } + if (release.notes !== undefined && typeof release.notes !== "string") { + problems.push(`${at}.notes must be a string`); + } + checkChanges(release.changes, `${at}.changes`, problems); + if (Array.isArray(release.changes) && release.changes.length === 0) { + problems.push(`${at}.changes must list at least one change`); + } + }); + + const versions = releases + .map((release) => release?.version) + .filter((v) => typeof v === "string" && SEMVER.test(v)); + for (let i = 1; i < versions.length; i++) { + if (compareVersions(versions[i - 1], versions[i]) < 0) { + problems.push("releases must be listed newest first"); + break; + } + } + + const newest = releases[0]?.version; + if (manifestVersion && newest !== manifestVersion) { + problems.push( + `the newest release is ${newest}, but manifest version is ${manifestVersion}`, + ); + } + + return problems; +} diff --git a/packages/plugin-sdk/cli/lib/tmxplug.mjs b/packages/plugin-sdk/cli/lib/tmxplug.mjs index d44d44fc6..065098f6b 100644 --- a/packages/plugin-sdk/cli/lib/tmxplug.mjs +++ b/packages/plugin-sdk/cli/lib/tmxplug.mjs @@ -9,7 +9,7 @@ export const TMXPLUG_CONTENTS = [ "locales", "migrations", "README.md", - "CHANGELOG.md", + "CHANGELOG.json", "icon.svg", ]; diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index dd2695db1..0414552a9 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -2,7 +2,7 @@ "name": "@termix/plugin-sdk", "version": "1.0.0", "description": "The contract between Termix core and a plugin: types, the capability catalog and the manifest schema.", - "license": "MIT", + "license": "Apache-2.0", "repository": { "type": "git", "url": "git+https://github.com/Termix-SSH/Termix.git", @@ -75,6 +75,7 @@ }, "./tsconfig.plugin.json": "./tsconfig.plugin.json", "./schema/manifest.schema.json": "./schema/manifest.schema.json", + "./schema/changelog.schema.json": "./schema/changelog.schema.json", "./ui": { "types": "./dist/host/ui.d.ts", "default": "./dist/host/ui.js" diff --git a/packages/plugin-sdk/schema/changelog.schema.json b/packages/plugin-sdk/schema/changelog.schema.json new file mode 100644 index 000000000..66a6119f1 --- /dev/null +++ b/packages/plugin-sdk/schema/changelog.schema.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "title": "Termix plugin changelog", + "description": "Every release of a plugin, newest first. The newest release must match the manifest version.", + "type": "object", + "additionalProperties": false, + "required": ["releases"], + "properties": { + "$schema": { "type": "string" }, + "unreleased": { + "description": "Changes that are merged but not released yet.", + "type": "array", + "items": { "$ref": "#/$defs/change" } + }, + "releases": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#/$defs/release" } + } + }, + "$defs": { + "release": { + "type": "object", + "additionalProperties": false, + "required": ["version", "changes"], + "properties": { + "version": { + "type": "string", + "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$" + }, + "date": { + "description": "When the version was released. Leave it out until it ships.", + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + }, + "notes": { + "description": "A short line shown above the list of changes.", + "type": "string" + }, + "changes": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#/$defs/change" } + } + } + }, + "change": { + "type": "object", + "additionalProperties": false, + "required": ["type", "text"], + "properties": { + "type": { + "enum": [ + "added", + "changed", + "fixed", + "removed", + "deprecated", + "security" + ] + }, + "text": { "type": "string", "minLength": 1 } + } + } + } +} diff --git a/plugins/acme-ssl/.commitlintrc.json b/plugins/acme-ssl/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/acme-ssl/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/acme-ssl/.github/funding.yml b/plugins/acme-ssl/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/acme-ssl/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/acme-ssl/.github/pull_request_template.md b/plugins/acme-ssl/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/acme-ssl/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/acme-ssl/.gitignore b/plugins/acme-ssl/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/acme-ssl/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/acme-ssl/.husky/commit-msg b/plugins/acme-ssl/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/acme-ssl/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/acme-ssl/.husky/pre-commit b/plugins/acme-ssl/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/acme-ssl/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/acme-ssl/.prettierignore b/plugins/acme-ssl/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/acme-ssl/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/acme-ssl/.prettierrc b/plugins/acme-ssl/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/acme-ssl/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/acme-ssl/CHANGELOG.json b/plugins/acme-ssl/CHANGELOG.json new file mode 100644 index 000000000..8521464fe --- /dev/null +++ b/plugins/acme-ssl/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Certificates from Let's Encrypt or any ACME directory" + }, + { + "type": "added", + "text": "HTTP challenge on port 80, or a Cloudflare DNS challenge when port 80 is closed" + }, + { + "type": "added", + "text": "Renews before the certificate expires" + }, + { + "type": "added", + "text": "Swaps in the new certificate without a restart" + } + ] + } + ] +} diff --git a/plugins/acme-ssl/CHANGELOG.md b/plugins/acme-ssl/CHANGELOG.md deleted file mode 100644 index 733c94e9f..000000000 --- a/plugins/acme-ssl/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Gets the HTTPS certificate Termix serves from Let's Encrypt or another ACME provider and renews it before it expires. Supports the HTTP challenge and the Cloudflare DNS challenge. diff --git a/plugins/acme-ssl/CONTRIBUTING.md b/plugins/acme-ssl/CONTRIBUTING.md new file mode 100644 index 000000000..e887072a5 --- /dev/null +++ b/plugins/acme-ssl/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to ACME Certificates + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Renew automatically:** checks twice a day and renews when there is no certificate, it is self-signed, it does not cover the domain, or it expires within 30 days +- **Domain:** the public domain name the certificate covers +- **Email:** the contact email for the ACME account +- **Certificate authority:** Let's Encrypt, Let's Encrypt staging, or a custom ACME directory +- **ACME directory URL:** only for a custom authority, and must be https +- **Challenge type:** HTTP or DNS (Cloudflare) +- **Cloudflare API token:** used by the DNS challenge, stored encrypted + +## Permissions + +- `acme-ssl.manage`: see the certificate status and request a new certificate. Only admins have it by default. diff --git a/plugins/acme-ssl/README.md b/plugins/acme-ssl/README.md index 4f510fe65..f418624ab 100644 --- a/plugins/acme-ssl/README.md +++ b/plugins/acme-ssl/README.md @@ -1,41 +1,38 @@ -# ACME Certificates +
-Gets and renews the Termix HTTPS certificate from Let's Encrypt or another ACME provider. +Termix Logo + +

ACME Certificates

+ +

Free HTTPS certificates for your Termix server, renewed for you

+ +
+ +
+ +## Overview + +ACME Certificates gets the HTTPS certificate Termix serves from Let's Encrypt or any other ACME provider and keeps it renewed. + +
## Features -- Gets a certificate from Let's Encrypt, Let's Encrypt staging or any ACME directory URL. -- Checks twice a day and renews when there is no certificate, the current one is self-signed, it does not cover the domain or it expires within 30 days. -- Swaps in the new certificate without a restart. -- Shows the current certificate and the last attempt, with a button to request one now. +- Certificates from Let's Encrypt or any ACME directory +- HTTP challenge on port 80, or a Cloudflare DNS challenge when port 80 is closed +- Renews before the certificate expires +- Swaps in the new certificate without a restart -## Setup +
-Pick a challenge type: +## Support -- HTTP: the provider fetches `http:///.well-known/acme-challenge/...`, so port 80 must reach Termix. -- DNS (Cloudflare): needs a Cloudflare API token with Zone:DNS:Edit. Works when port 80 is closed. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -If you turn this plugin off, Termix keeps serving the current certificate but nothing renews it. Admin Settings > HTTPS certificate warns you before it expires. Uploading your own certificate is still done there. +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -## Settings +
-### Admin +## License -- Renew automatically: turn automatic renewal on or off. -- Domain and Email: the domain to cover and the contact email for the provider. -- Certificate authority: Let's Encrypt, Let's Encrypt staging or a custom ACME directory URL. -- Challenge type: HTTP or DNS (Cloudflare). -- Cloudflare API token: used by the DNS challenge. Stored encrypted. - -## Permissions - -- `acme-ssl.manage`: Manage ACME certificates. Only admins have it by default. - -## Development - -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/acme-ssl/manifest.json b/plugins/acme-ssl/manifest.json index b568e13cf..af58690fe 100644 --- a/plugins/acme-ssl/manifest.json +++ b/plugins/acme-ssl/manifest.json @@ -2,16 +2,16 @@ "id": "acme-ssl", "name": "ACME Certificates", "version": "1.0.0", - "description": "Gets and renews the Termix HTTPS certificate from Let's Encrypt or another ACME provider.", + "description": "Gets the Termix HTTPS certificate from Let's Encrypt or any ACME provider and renews it for you.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "Lock", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/acme-ssl/package.json b/plugins/acme-ssl/package.json index 636f11e92..23dc55ca1 100644 --- a/plugins/acme-ssl/package.json +++ b/plugins/acme-ssl/package.json @@ -7,19 +7,27 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "acme-client": "^5.4.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -27,5 +35,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/ai/.commitlintrc.json b/plugins/ai/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/ai/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/ai/.github/funding.yml b/plugins/ai/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/ai/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/ai/.github/pull_request_template.md b/plugins/ai/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/ai/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/ai/.gitignore b/plugins/ai/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/ai/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/ai/.husky/commit-msg b/plugins/ai/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/ai/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/ai/.husky/pre-commit b/plugins/ai/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/ai/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/ai/.prettierignore b/plugins/ai/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/ai/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/ai/.prettierrc b/plugins/ai/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/ai/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/ai/CHANGELOG.json b/plugins/ai/CHANGELOG.json new file mode 100644 index 000000000..6aa54bef8 --- /dev/null +++ b/plugins/ai/CHANGELOG.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Ask about your hosts, snippets, fleets, alerts, automations and more" + }, + { + "type": "added", + "text": "Proposes changes instead of making them, and nothing runs until you approve it" + }, + { + "type": "added", + "text": "Can run safe read-only commands like `df` and `uptime` if you allow it" + }, + { + "type": "added", + "text": "Ask about a host right from its terminal" + }, + { + "type": "added", + "text": "Works with Ollama, Anthropic, OpenAI, Google Gemini and any OpenAI compatible endpoint" + }, + { + "type": "added", + "text": "AI Agents: run Pi, OpenCode, Claude Code or Codex on an SSH host using one of your Termix providers, with tool approvals, queued messages, attachments, Git diffs and worktrees" + }, + { + "type": "added", + "text": "One-click install of the selected agent and Node.js, and a button to set up SSH loopback forwarding" + } + ] + } + ] +} diff --git a/plugins/ai/CHANGELOG.md b/plugins/ai/CHANGELOG.md deleted file mode 100644 index 2c06df521..000000000 --- a/plugins/ai/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds an AI assistant that can read your hosts, snippets, fleets, alerts and automations and suggest changes for you to approve. Works with Ollama, Anthropic, OpenAI, Google Gemini and any OpenAI compatible provider. diff --git a/plugins/ai/CONTRIBUTING.md b/plugins/ai/CONTRIBUTING.md new file mode 100644 index 000000000..ea43ef867 --- /dev/null +++ b/plugins/ai/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to AI Assistant + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **AI assistant:** let users turn the assistant on. While this is off it is hidden and blocked for everyone +- **Allowed private AI hosts:** hosts on your private network a provider may point at, such as a self-hosted Ollama + +### User + +- **Enable the AI assistant:** turn the assistant on for yourself +- **Allow read-only diagnostic commands:** let the assistant run safe commands without asking +- **Providers:** your AI providers, models and API keys + +### Host + +- **Enable AI Assistant:** let the assistant help in this host's terminal. Off by default + +## Permissions + +- `ai.use`: use the assistant. Admins and users have it by default. +- `ai.manage_providers`: add, edit and remove AI providers and their API keys. Admins and users have it by default. +- `ai.apply_proposals`: let the assistant carry out the changes it suggests. Admins and users have it by default. +- `ai.services.use`: let other features call the assistant for you. Admins and users have it by default. +- `ai.secrets.share`: let other features use the stored API key without seeing it. Admins and users have it by default. +- `ai.agents`: run coding agents on SSH hosts. Only admins have it by default. diff --git a/plugins/ai/README.md b/plugins/ai/README.md index 2d072244e..5171eddba 100644 --- a/plugins/ai/README.md +++ b/plugins/ai/README.md @@ -1,50 +1,48 @@ -# AI Assistant +
-An AI assistant that can read your hosts, snippets, fleets, alerts and automations, and suggest changes for you to approve. +Termix Logo + +

AI Assistant

+ +

An optional AI assistant that knows your servers

+ +
+ +
+ +## Overview + +AI Assistant is a chat that can read your Termix setup and propose changes for you to approve. It can also run coding agents on your SSH hosts. + +
## Features -- Chat with an assistant that can read your hosts, snippets, fleets, alerts, automations, workspaces, network graph and homepage. -- The assistant suggests changes, and nothing is applied until you approve it. -- Can run read-only diagnostic commands on a host if you allow it. -- Open the assistant from the terminal toolbar with the current session as context. -- Works with Ollama, Anthropic, OpenAI, Google Gemini and any OpenAI compatible provider. +- Ask about your hosts, snippets, fleets, alerts, automations and more +- Proposes changes instead of making them, and nothing runs until you approve it +- Can run safe read-only commands like `df` and `uptime` if you allow it +- Ask about a host right from its terminal +- Works with Ollama, Anthropic, OpenAI, Google Gemini and any OpenAI compatible endpoint +- Run Pi, OpenCode, Claude Code or Codex as a coding agent on an SSH host, using your own provider -## Settings - -### Admin - -- AI assistant: let users turn the assistant on. While this is off it is hidden for everyone. -- Allowed private AI hosts: hosts on your private network a provider may point at, such as a self-hosted Ollama. - -### User - -- Enable the AI assistant: turn the assistant on for yourself. -- Allow read-only diagnostic commands: let the assistant run safe commands on your hosts. -- Providers: the AI providers, models and API keys you use. - -### Host - -- Enable AI Assistant: allow the assistant to work with this host. - -## Permissions - -- `ai.use`: Open the assistant and ask it things. Admins and users have it by default. -- `ai.manage_providers`: Add, edit and remove AI providers and their API keys. Admins and users have it by default. -- `ai.apply_proposals`: Let the assistant carry out the changes it suggests. Admins and users have it by default. -- `ai.services.use`: Let other features call the assistant for you. Admins and users have it by default. -- `ai.secrets.share`: Let other features use the stored AI API key without seeing it. Admins and users have it by default. +
## Services -Uses from other plugins: +Uses from other plugins, each one optional: -- `workspaces.saved`, `network-topology.graph`, `snippets.access`, `fleets.access`, `terminal.history`, `automations.access` and `homepage.items` to read your data. Each one is optional. +- `workspaces.saved`, `network-topology.graph`, `snippets.access`, `fleets.access`, `terminal.history`, `automations.access` and `homepage.items` to read your data -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/ai/manifest.json b/plugins/ai/manifest.json index 22801d41b..c74c31b8a 100644 --- a/plugins/ai/manifest.json +++ b/plugins/ai/manifest.json @@ -2,16 +2,16 @@ "id": "ai", "name": "AI Assistant", "version": "1.0.0", - "description": "An AI assistant that can read your hosts, snippets, fleets, alerts and automations, and suggest changes for you to approve.", + "description": "An optional AI assistant that reads your setup and proposes changes for you to approve.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Productivity", "icon": "Sparkles", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/ai/package.json b/plugins/ai/package.json index 0ea2606b0..0936b5db5 100644 --- a/plugins/ai/package.json +++ b/plugins/ai/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@anthropic-ai/sdk": "^0.120.0", @@ -16,6 +19,8 @@ "remark-gfm": "^4.0.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -23,7 +28,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -33,5 +41,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/alerts/.commitlintrc.json b/plugins/alerts/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/alerts/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/alerts/.github/funding.yml b/plugins/alerts/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/alerts/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/alerts/.github/pull_request_template.md b/plugins/alerts/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/alerts/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/alerts/.gitignore b/plugins/alerts/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/alerts/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/alerts/.husky/commit-msg b/plugins/alerts/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/alerts/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/alerts/.husky/pre-commit b/plugins/alerts/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/alerts/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/alerts/.prettierignore b/plugins/alerts/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/alerts/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/alerts/.prettierrc b/plugins/alerts/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/alerts/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/alerts/CHANGELOG.json b/plugins/alerts/CHANGELOG.json new file mode 100644 index 000000000..ae4043e55 --- /dev/null +++ b/plugins/alerts/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "One inbox for alerts from every part of Termix" + }, + { + "type": "added", + "text": "Popups for new alerts" + }, + { + "type": "added", + "text": "Send alerts to Discord, ntfy, email or a webhook" + }, + { + "type": "added", + "text": "Rules that pick which alerts go where" + }, + { + "type": "added", + "text": "Optional news from the Termix team, like security notices and releases" + } + ] + } + ] +} diff --git a/plugins/alerts/CHANGELOG.md b/plugins/alerts/CHANGELOG.md deleted file mode 100644 index c67627315..000000000 --- a/plugins/alerts/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds one inbox for every alert in Termix. Alerts can also be sent to webhooks, ntfy, Discord and email, with delivery rules to pick what goes where. diff --git a/plugins/alerts/CONTRIBUTING.md b/plugins/alerts/CONTRIBUTING.md new file mode 100644 index 000000000..766e2e77b --- /dev/null +++ b/plugins/alerts/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to Alerts + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Termix announcements:** show news from the Termix team in everyone's inbox +- **Keep alerts for (days):** older alerts are removed from every inbox +- **SMTP server, port, TLS, username, password and from address:** needed for email channels. Leave the server empty to turn email off + +### User + +- **Alert popups:** all alerts, warnings and critical, critical only, or none + +## Permissions + +- `alerts.use`: get alerts in the inbox and send them to your own channels. Admins and users have it by default. diff --git a/plugins/alerts/README.md b/plugins/alerts/README.md index 75d25acac..1c99421f5 100644 --- a/plugins/alerts/README.md +++ b/plugins/alerts/README.md @@ -1,39 +1,39 @@ -# Alerts +
-One inbox for every alert, with delivery to webhooks, ntfy, Discord and email. +Termix Logo + +

Alerts

+ +

One inbox for every alert in Termix

+ +
+ +
+ +## Overview + +Alerts is the inbox every Termix alert lands in, with delivery to Discord, ntfy, email or a webhook. + +
## Features -- One inbox for alerts from every part of Termix. -- Popups for new alerts, filtered by severity. -- Channels that send alerts to webhooks, ntfy, Discord and email. -- Delivery rules that pick which alerts go to which channel. -- Optional news from the Termix team, like security notices and new releases. +- One inbox for alerts from every part of Termix +- Popups for new alerts +- Send alerts to Discord, ntfy, email or a webhook +- Rules that pick which alerts go where +- Optional news from the Termix team, like security notices and releases -## Settings +
-### Admin +## Support -- Termix announcements: show news from the Termix team in everyone's inbox. -- Keep alerts for (days): older alerts are removed from every inbox. -- SMTP server, port, TLS, username, password and from address: needed for email channels. Leave the server empty to turn email off. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -### User +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- Alert popups: all alerts, warnings and critical, critical only, or none. +
-## Permissions +## License -- `alerts.use`: Get alerts in the inbox and send them to your own channels. Admins and users have it by default. - -## For plugin authors - -Send an alert from any plugin with `ctx.notify.send()`. This plugin stores it and delivers it. Do not build a separate notification system into a plugin. - -## Development - -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/alerts/manifest.json b/plugins/alerts/manifest.json index c96c97764..05c38fe29 100644 --- a/plugins/alerts/manifest.json +++ b/plugins/alerts/manifest.json @@ -2,16 +2,16 @@ "id": "alerts", "name": "Alerts", "version": "1.0.0", - "description": "One inbox for every alert, with delivery to webhooks, ntfy, Discord and email.", + "description": "One inbox for every alert in Termix, with delivery to webhooks, ntfy, Discord and email.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Monitoring", "icon": "Bell", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/alerts/package.json b/plugins/alerts/package.json index 8ee908026..45d4f0b39 100644 --- a/plugins/alerts/package.json +++ b/plugins/alerts/package.json @@ -7,13 +7,18 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0", "nodemailer": "^10.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -21,7 +26,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/automations/.commitlintrc.json b/plugins/automations/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/automations/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/automations/.github/funding.yml b/plugins/automations/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/automations/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/automations/.github/pull_request_template.md b/plugins/automations/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/automations/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/automations/.gitignore b/plugins/automations/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/automations/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/automations/.husky/commit-msg b/plugins/automations/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/automations/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/automations/.husky/pre-commit b/plugins/automations/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/automations/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/automations/.prettierignore b/plugins/automations/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/automations/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/automations/.prettierrc b/plugins/automations/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/automations/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/automations/CHANGELOG.json b/plugins/automations/CHANGELOG.json new file mode 100644 index 000000000..018bc41d2 --- /dev/null +++ b/plugins/automations/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Triggers for metrics, hosts going up or down, health checks, schedules, container events and webhooks" + }, + { + "type": "added", + "text": "Steps that run commands and snippets, control containers and tunnels, wake hosts, call URLs and send alerts" + }, + { + "type": "added", + "text": "Conditions, waits and variables for more complex flows" + }, + { + "type": "added", + "text": "Run on one host, a fleet or every host" + }, + { + "type": "added", + "text": "Test runs and a history of every run" + }, + { + "type": "added", + "text": "Maintenance windows that pause automations while you work on a host" + } + ] + } + ] +} diff --git a/plugins/automations/CHANGELOG.md b/plugins/automations/CHANGELOG.md deleted file mode 100644 index a53371a29..000000000 --- a/plugins/automations/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Runs actions on your hosts on a schedule or when something happens, like a host going down, a metric crossing a limit, a container event or an incoming webhook. Each automation is a list of steps, such as running a command, sending an alert or calling a URL. diff --git a/plugins/automations/CONTRIBUTING.md b/plugins/automations/CONTRIBUTING.md new file mode 100644 index 000000000..9f2435ed5 --- /dev/null +++ b/plugins/automations/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing to Automations + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Permissions + +- `automations.view`: see automations and their runs. Admins and users have it by default. +- `automations.create`: create automations. Admins and users have it by default. +- `automations.edit`: change automations. Admins and users have it by default. +- `automations.delete`: delete automations. Admins and users have it by default. +- `automations.run`: run automations by hand. Admins and users have it by default. diff --git a/plugins/automations/README.md b/plugins/automations/README.md index 1fdeb8cf6..6f873692e 100644 --- a/plugins/automations/README.md +++ b/plugins/automations/README.md @@ -1,51 +1,53 @@ -# Automations +
-Run actions on your hosts on a schedule or when something happens, like a host going down or a metric crossing a limit. +Termix Logo + +

Automations

+ +

Make your servers react on their own

+ +
+ +
+ +## Overview + +Automations runs steps on your hosts when something happens, like cleaning up a disk when it fills or restarting a container when it stops. + +
## Features -- Triggers: a schedule, a host going up or down, a metric crossing a limit, a health check change, a container event, a Termix event or an incoming webhook. -- Steps: send an alert, call a URL, run a snippet or command, control a container or tunnel, wake a host, wait, set a variable, branch with if / otherwise, run another automation or stop. -- Run an automation on the host that triggered it or on any host or fleet you pick. -- See the output and errors of each step for every run. +- Triggers for metrics, hosts going up or down, health checks, schedules, container events and webhooks +- Steps that run commands and snippets, control containers and tunnels, wake hosts, call URLs and send alerts +- Conditions, waits and variables for more complex flows +- Run on one host, a fleet or every host +- Test runs and a history of every run +- Maintenance windows that pause automations while you work on a host -## Permissions - -- `automations.view`: See automations and their runs. Admins and users have it by default. -- `automations.create`: Create automations. Admins and users have it by default. -- `automations.edit`: Change automations. Admins and users have it by default. -- `automations.delete`: Delete automations. Admins and users have it by default. -- `automations.run`: Run automations by hand. Admins and users have it by default. +
## Services Provides to other plugins: -- `automations.access`: list and run automations. +- `automations.access`: list and run automations Uses from other plugins: -- `snippets.access` for the run snippet step. Required. -- `fleets.access`, `tunnels.access`, `docker.containers`, `docker.events`, `host-metrics.viewers` and `wake-on-lan.send` for their steps and triggers. Each one is optional. +- `snippets.access` for the run snippet step. Required +- `fleets.access`, `tunnels.access`, `docker.containers`, `docker.events`, `host-metrics.viewers` and `wake-on-lan.send` for their steps and triggers. Each one is optional -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support -## Host maintenance +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -Open **Maintenance** from a saved host's actions. Its owner can start maintenance now, record a reason and estimated duration, or add a one-time, weekly or monthly schedule. Viewing requires `automations.view`; changes require `automations.edit`. Active maintenance appears as a host badge. The Automations plugin must remain enabled for maintenance scheduling and suppression to operate. +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -Schedules use UTC, including through daylight-saving changes. A monthly schedule for a day missing from a month skips that month. Up to 20 plans per host are stored; remove completed one-time plans when no longer needed. Planned windows cannot overlap (touching endpoints are allowed), and recurring conflicts are checked over the Gregorian calendar cycle. Removing a plan cancels future occurrences, not maintenance already in progress. +
-The estimated completion time is informational. Maintenance **only ends when its owner explicitly ends it**. If work overruns into another scheduled window, the host stays in maintenance and the estimate extends to the later planned end. After server downtime, due plans are caught up without briefly exposing an outage between maintenance windows. Each plan's next occurrence and the active state survive restarts. +## License -While active, maintenance suppresses new host-status, health-check, metric-threshold, container-event and tunnel-disconnection automation runs for that host. This pauses the entire triggered automation, including any remediation steps. Monitoring continues to report the real status; observed status/health baselines still advance and metric dwell windows are reset. Manual runs, schedules, webhooks, security login events and runs already in progress continue normally. Maintenance does not globally silence alerts from unrelated plugins. - -An optional overdue reminder uses the estimate plus a configurable grace period (20 minutes by default). It only sends after core has observed the host offline at or after that deadline; an unknown, online or older cached status does not qualify. Enable host status checks to supply those observations. Reminders use the Alerts hub and category `automations.maintenance_overdue`, which can be routed through the user's notification rules. A successful reminder is remembered across restarts; an extended estimate permits another reminder for the new deadline. No reminder automatically ends maintenance. - -Maintenance rows reference their owner and host with cascading deletion. SQLite, PostgreSQL and MySQL migrations add only the new maintenance table. +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/automations/manifest.json b/plugins/automations/manifest.json index 0da548831..7c1a71197 100644 --- a/plugins/automations/manifest.json +++ b/plugins/automations/manifest.json @@ -2,16 +2,16 @@ "id": "automations", "name": "Automations", "version": "1.0.0", - "description": "Run actions on your hosts on a schedule or when something happens, like a host going down or a metric crossing a limit.", + "description": "Run steps on your hosts on a schedule or when something happens, like a host going down or a metric crossing a limit.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Infrastructure", "icon": "Workflow", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/automations/package.json b/plugins/automations/package.json index 5ad39445a..a782a08f6 100644 --- a/plugins/automations/package.json +++ b/plugins/automations/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/docker/.commitlintrc.json b/plugins/docker/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/docker/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/docker/.github/funding.yml b/plugins/docker/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/docker/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/docker/.github/pull_request_template.md b/plugins/docker/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/docker/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/docker/.gitignore b/plugins/docker/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/docker/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/docker/.husky/commit-msg b/plugins/docker/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/docker/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/docker/.husky/pre-commit b/plugins/docker/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/docker/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/docker/.prettierignore b/plugins/docker/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/docker/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/docker/.prettierrc b/plugins/docker/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/docker/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/docker/CHANGELOG.json b/plugins/docker/CHANGELOG.json new file mode 100644 index 000000000..78ee5de25 --- /dev/null +++ b/plugins/docker/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Start, stop, restart, pause and remove containers" + }, + { + "type": "added", + "text": "Live CPU, memory, network and disk stats" + }, + { + "type": "added", + "text": "Read and download container logs" + }, + { + "type": "added", + "text": "Open a shell inside a container" + }, + { + "type": "added", + "text": "Works with Docker and Podman" + } + ] + } + ] +} diff --git a/plugins/docker/CHANGELOG.md b/plugins/docker/CHANGELOG.md deleted file mode 100644 index 997d01d5d..000000000 --- a/plugins/docker/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Manages Docker and Podman containers over SSH. List, inspect, start, stop and remove containers, read their logs and open a console inside them. diff --git a/plugins/docker/CONTRIBUTING.md b/plugins/docker/CONTRIBUTING.md new file mode 100644 index 000000000..e3200af9a --- /dev/null +++ b/plugins/docker/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Docker + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Enable Docker:** show the Docker tab for this host +- **Container Runtime:** Docker or Podman + +## Permissions + +- `docker.use`: open the Docker manager and container consoles on hosts with Docker turned on. Admins and users have it by default. diff --git a/plugins/docker/README.md b/plugins/docker/README.md index 3cd0b37bf..b4d5f9888 100644 --- a/plugins/docker/README.md +++ b/plugins/docker/README.md @@ -1,37 +1,48 @@ -# Docker +
-Manage Docker and Podman containers over SSH, with logs and a container console. +Termix Logo + +

Docker

+ +

Manage Docker and Podman containers on your hosts

+ +
+ +
+ +## Overview + +Docker manages the containers running on your hosts over SSH. It is not meant to replace Portainer or Dockge, just to handle the containers you already have. + +
## Features -- List, inspect, start, stop, restart, pause and remove containers. -- Read and download container logs. -- Open an interactive console inside a container. -- Works with Docker or Podman. -- Adds a Docker widget to the homepage. +- Start, stop, restart, pause and remove containers +- Live CPU, memory, network and disk stats +- Read and download container logs +- Open a shell inside a container +- Works with Docker and Podman -## Settings - -### Host - -- Enable Docker: show the Docker tab for this host. -- Container Runtime: Docker or Podman. - -## Permissions - -- `docker.use`: Use Docker. Admins and users have it by default. +
## Services Provides to other plugins: -- `docker.containers`: list containers and start, stop, restart, pause, unpause or remove them. -- `docker.events`: get notified when a container starts, exits, restarts or turns unhealthy. +- `docker.containers`: list containers and start, stop, restart, pause, unpause or remove them +- `docker.events`: get notified when a container starts, exits, restarts or turns unhealthy -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/docker/manifest.json b/plugins/docker/manifest.json index f2a37c77b..7664d1a54 100644 --- a/plugins/docker/manifest.json +++ b/plugins/docker/manifest.json @@ -2,16 +2,16 @@ "id": "docker", "name": "Docker", "version": "1.0.0", - "description": "Manage Docker and Podman containers over SSH, with logs and a container console.", + "description": "Manage Docker and Podman containers on your hosts over SSH, with logs, stats and a console.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Infrastructure", "icon": "Box", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/docker/package.json b/plugins/docker/package.json index bdbb083c7..a1f758ae5 100644 --- a/plugins/docker/package.json +++ b/plugins/docker/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@xterm/addon-clipboard": "^0.2.0", @@ -18,13 +21,18 @@ "react-xtermjs": "^1.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -44,5 +52,10 @@ "react-xtermjs": { "@xterm/xterm": "$@xterm/xterm" } + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/file-manager/.commitlintrc.json b/plugins/file-manager/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/file-manager/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/file-manager/.github/funding.yml b/plugins/file-manager/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/file-manager/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/file-manager/.github/pull_request_template.md b/plugins/file-manager/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/file-manager/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/file-manager/.gitignore b/plugins/file-manager/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/file-manager/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/file-manager/.husky/commit-msg b/plugins/file-manager/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/file-manager/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/file-manager/.husky/pre-commit b/plugins/file-manager/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/file-manager/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/file-manager/.prettierignore b/plugins/file-manager/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/file-manager/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/file-manager/.prettierrc b/plugins/file-manager/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/file-manager/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/file-manager/CHANGELOG.json b/plugins/file-manager/CHANGELOG.json new file mode 100644 index 000000000..896227b83 --- /dev/null +++ b/plugins/file-manager/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Browse, upload, download, rename, move and delete files, with sudo support" + }, + { + "type": "added", + "text": "Edit files in a built-in code editor" + }, + { + "type": "added", + "text": "Preview images, PDFs, audio and video" + }, + { + "type": "added", + "text": "A trash you can restore deleted files from" + }, + { + "type": "added", + "text": "Copy files between two hosts, with the fastest route picked for you and an integrity check" + }, + { + "type": "added", + "text": "A side by side local and remote view in the desktop app" + } + ] + } + ] +} diff --git a/plugins/file-manager/CHANGELOG.md b/plugins/file-manager/CHANGELOG.md deleted file mode 100644 index 2ea4ae7ea..000000000 --- a/plugins/file-manager/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Browse, edit and transfer files over SFTP. Includes a code editor, a trash you can restore from, bookmarks and transfers between two hosts. diff --git a/plugins/file-manager/CONTRIBUTING.md b/plugins/file-manager/CONTRIBUTING.md new file mode 100644 index 000000000..20d2400fb --- /dev/null +++ b/plugins/file-manager/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing to File Manager + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### User + +- **Simultaneous File Transfers:** how many uploads and downloads run at once +- **Confirm before moving files to trash:** ask before a delete. Permanent deletes always ask + +### Host + +- **Enable File Manager:** show the file manager for this host +- **Default Path:** the folder to open first +- **SCP Legacy Mode:** use SCP for hosts without a working SFTP server + +## Permissions + +- `file-manager.use`: browse, edit and transfer files. Admins and users have it by default. diff --git a/plugins/file-manager/README.md b/plugins/file-manager/README.md index 4a4b0064f..7c1f13d42 100644 --- a/plugins/file-manager/README.md +++ b/plugins/file-manager/README.md @@ -1,38 +1,48 @@ -# File Manager +
-Browse, edit and transfer files over SFTP, including between two hosts. +Termix Logo + +

File Manager

+ +

Browse, edit and move files on your servers over SFTP

+ +
+ +
+ +## Overview + +File Manager lets you work with the files on your hosts over SFTP, and copy files straight from one server to another. + +
## Features -- Browse, upload, download, rename, move and delete files over SFTP. -- Edit files in a built-in code editor. -- Transfer files between two hosts in the SFTP tab. -- Restore deleted files from the trash until they are cleaned up. -- Save bookmarks to folders you use often. -- Browse local files in the desktop app. +- Browse, upload, download, rename, move and delete files, with sudo support +- Edit files in a built-in code editor +- Preview images, PDFs, audio and video +- A trash you can restore deleted files from +- Copy files between two hosts, with the fastest route picked for you and an integrity check +- A side by side local and remote view in the desktop app -## Settings - -### Host - -- Enable File Manager: show the file manager for this host. -- Default Path: the folder to open first. -- SCP Legacy Mode: use SCP for hosts without a working SFTP server. - -## Permissions - -- `file-manager.use`: Browse, edit and transfer files. Admins and users have it by default. +
## Services Provides to other plugins: -- `files.sftp`: read and write files on a host. +- `files.sftp`: read and write files on a host -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/file-manager/manifest.json b/plugins/file-manager/manifest.json index ea2b837e0..d495a8378 100644 --- a/plugins/file-manager/manifest.json +++ b/plugins/file-manager/manifest.json @@ -2,16 +2,16 @@ "id": "file-manager", "name": "File Manager", "version": "1.0.0", - "description": "Browse, edit and transfer files over SFTP, including between two hosts.", + "description": "Browse, edit and move files over SFTP, including straight from one server to another.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Files & Transfer", "icon": "FolderSearch", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/file-manager/package.json b/plugins/file-manager/package.json index ff03ff847..cb872f382 100644 --- a/plugins/file-manager/package.json +++ b/plugins/file-manager/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@codemirror/autocomplete": "^6.20.3", @@ -33,6 +36,8 @@ "remark-gfm": "^4.0.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -42,7 +47,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -57,5 +65,10 @@ "react-i18next": "^17.0.14", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/fleets/.commitlintrc.json b/plugins/fleets/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/fleets/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/fleets/.github/funding.yml b/plugins/fleets/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/fleets/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/fleets/.github/pull_request_template.md b/plugins/fleets/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/fleets/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/fleets/.gitignore b/plugins/fleets/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/fleets/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/fleets/.husky/commit-msg b/plugins/fleets/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/fleets/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/fleets/.husky/pre-commit b/plugins/fleets/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/fleets/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/fleets/.prettierignore b/plugins/fleets/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/fleets/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/fleets/.prettierrc b/plugins/fleets/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/fleets/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/fleets/CHANGELOG.json b/plugins/fleets/CHANGELOG.json new file mode 100644 index 000000000..1d15ca477 --- /dev/null +++ b/plugins/fleets/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Group hosts by hand or with tag rules, so new hosts join on their own" + }, + { + "type": "added", + "text": "Run one command on every host and see each result" + }, + { + "type": "added", + "text": "Install, remove or upgrade packages across the fleet" + }, + { + "type": "added", + "text": "Push and pull files on every host" + }, + { + "type": "added", + "text": "Collect an inventory of OS, kernel, architecture and uptime" + }, + { + "type": "added", + "text": "Share a fleet with users or roles" + } + ] + } + ] +} diff --git a/plugins/fleets/CHANGELOG.md b/plugins/fleets/CHANGELOG.md deleted file mode 100644 index 1db7b7c57..000000000 --- a/plugins/fleets/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Groups hosts into fleets, either by hand or by tag. Run commands, package actions and file transfers on every host in a fleet at once, and see an inventory of its hosts. diff --git a/plugins/fleets/CONTRIBUTING.md b/plugins/fleets/CONTRIBUTING.md new file mode 100644 index 000000000..3e37da00d --- /dev/null +++ b/plugins/fleets/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to Fleets + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Permissions + +- `fleets.view`: see fleets, their hosts and their inventory. Admins and users have it by default. +- `fleets.manage`: create, edit, delete and share fleets. Admins and users have it by default. +- `fleets.execute`: run commands, package actions and file transfers on a fleet. Admins and users have it by default. diff --git a/plugins/fleets/README.md b/plugins/fleets/README.md index 651814268..b97969aea 100644 --- a/plugins/fleets/README.md +++ b/plugins/fleets/README.md @@ -1,32 +1,48 @@ -# Fleets +
-Group hosts into fleets and run commands, package actions and file transfers on all of them at once. +Termix Logo + +

Fleets

+ +

Run commands and actions across many hosts at once

+ +
+ +
+ +## Overview + +Fleets groups your hosts so you can act on all of them together. + +
## Features -- Group hosts into fleets by hand or by tag. Hosts with a matching tag join on their own. -- Run a command on every host in a fleet at once and see each result. -- Run package actions, like updates, across a fleet. -- Transfer files to and from every host in a fleet. -- See an inventory of the hosts in a fleet. -- Share fleets with other users or roles. +- Group hosts by hand or with tag rules, so new hosts join on their own +- Run one command on every host and see each result +- Install, remove or upgrade packages across the fleet +- Push and pull files on every host +- Collect an inventory of OS, kernel, architecture and uptime +- Share a fleet with users or roles -## Permissions - -- `fleets.view`: See fleets, their hosts and inventory. Admins and users have it by default. -- `fleets.manage`: Create, edit, delete and share fleets. Admins and users have it by default. -- `fleets.execute`: Run commands, package actions and file transfers on a fleet. Admins and users have it by default. +
## Services Provides to other plugins: -- `fleets.access`: list fleets and run actions on them. +- `fleets.access`: list fleets and run actions on them -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/fleets/manifest.json b/plugins/fleets/manifest.json index e11eab9d8..baa2a6ff2 100644 --- a/plugins/fleets/manifest.json +++ b/plugins/fleets/manifest.json @@ -6,12 +6,12 @@ "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Infrastructure", "icon": "Boxes", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/fleets/package.json b/plugins/fleets/package.json index 32b03b5a3..568d1bd75 100644 --- a/plugins/fleets/package.json +++ b/plugins/fleets/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "clsx": "^2.1.1", @@ -16,12 +19,17 @@ "tailwind-merge": "^3.5.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -32,5 +40,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/homepage/.commitlintrc.json b/plugins/homepage/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/homepage/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/homepage/.github/funding.yml b/plugins/homepage/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/homepage/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/homepage/.github/pull_request_template.md b/plugins/homepage/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/homepage/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/homepage/.gitignore b/plugins/homepage/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/homepage/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/homepage/.husky/commit-msg b/plugins/homepage/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/homepage/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/homepage/.husky/pre-commit b/plugins/homepage/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/homepage/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/homepage/.prettierignore b/plugins/homepage/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/homepage/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/homepage/.prettierrc b/plugins/homepage/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/homepage/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/homepage/CHANGELOG.json b/plugins/homepage/CHANGELOG.json new file mode 100644 index 000000000..433c13bb4 --- /dev/null +++ b/plugins/homepage/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Drag, resize and arrange widgets on a canvas" + }, + { + "type": "added", + "text": "Widgets for host status, pings, service links, bookmarks, search, clocks, calendars, weather, RSS, notes, images, iframes, custom APIs and a live terminal" + }, + { + "type": "added", + "text": "Other features add their own widgets, like Docker, Tunnels and Host Metrics" + }, + { + "type": "added", + "text": "Service links and a homepage preview on the dashboard" + }, + { + "type": "added", + "text": "Syncs between the desktop app and a Termix server" + } + ] + } + ] +} diff --git a/plugins/homepage/CHANGELOG.md b/plugins/homepage/CHANGELOG.md deleted file mode 100644 index 6dfde6621..000000000 --- a/plugins/homepage/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds a custom page of widgets, like clocks, notes, host status, RSS feeds and an embedded terminal. Also adds service link buttons to the dashboard. diff --git a/plugins/homepage/CONTRIBUTING.md b/plugins/homepage/CONTRIBUTING.md new file mode 100644 index 000000000..9f6ef94d3 --- /dev/null +++ b/plugins/homepage/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Homepage + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Allowed private hosts:** private or loopback addresses the Ping Status and Custom API widgets may reach. Empty blocks every private address +- **Private certificate authority (PEM):** an optional CA bundle trusted for those hosts + +## Permissions + +- `homepage.use`: view and edit the homepage and dashboard service links. Admins and users have it by default. diff --git a/plugins/homepage/README.md b/plugins/homepage/README.md index 05d5e9a95..6d0e5a174 100644 --- a/plugins/homepage/README.md +++ b/plugins/homepage/README.md @@ -1,29 +1,47 @@ -# Homepage +
-A custom widget page and service links for your servers and services. +Termix Logo + +

Homepage

+ +

A widget page you build yourself

+ +
+ +
+ +## Overview + +Homepage is a drag and drop page of widgets for your servers, services and anything else you want to keep an eye on. + +
## Features -- A page of widgets you can move, resize, pan and zoom. Open it from the command palette. -- Widgets for clocks, notes, folders, host status, bookmarks, weather, RSS feeds, ping checks, calendars, countdowns, search, images, custom APIs, an embedded terminal and more. -- Other features can add their own widgets, like Docker, Tunnels, File Manager and Host Metrics. -- Service link buttons and a homepage preview for the dashboard. -- Widgets and service links sync between the desktop app and a server. +- Drag, resize and arrange widgets on a canvas +- Widgets for host status, pings, service links, bookmarks, search, clocks, calendars, weather, RSS, notes, images, iframes, custom APIs and a live terminal +- Other features add their own widgets, like Docker, Tunnels and Host Metrics +- Service links and a homepage preview on the dashboard +- Syncs between the desktop app and a Termix server -## Permissions - -- `homepage.use`: Use the homepage. Admins and users have it by default. +
## Services Provides to other plugins: -- `homepage.items`: list a user's homepage widgets. +- `homepage.items`: list a user's homepage widgets -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/homepage/manifest.json b/plugins/homepage/manifest.json index d1130f13a..8b2081eaf 100644 --- a/plugins/homepage/manifest.json +++ b/plugins/homepage/manifest.json @@ -2,16 +2,16 @@ "id": "homepage", "name": "Homepage", "version": "1.0.0", - "description": "A custom widget page and service links for your servers and services.", + "description": "A drag and drop widget page for your servers and services, plus service links for the dashboard.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Productivity", "icon": "LayoutGrid", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": ["db:own", "network:serve", "network:outbound", "ui:surface"], diff --git a/plugins/homepage/package.json b/plugins/homepage/package.json index 5df858d22..be09b640b 100644 --- a/plugins/homepage/package.json +++ b/plugins/homepage/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -28,5 +36,10 @@ "drizzle-orm": "^0.45.2", "express": "^5.2.1", "react": "^19.2.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/host-metrics/.commitlintrc.json b/plugins/host-metrics/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/host-metrics/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/host-metrics/.github/funding.yml b/plugins/host-metrics/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/host-metrics/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/host-metrics/.github/pull_request_template.md b/plugins/host-metrics/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/host-metrics/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/host-metrics/.gitignore b/plugins/host-metrics/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/host-metrics/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/host-metrics/.husky/commit-msg b/plugins/host-metrics/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/host-metrics/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/host-metrics/.husky/pre-commit b/plugins/host-metrics/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/host-metrics/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/host-metrics/.prettierignore b/plugins/host-metrics/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/host-metrics/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/host-metrics/.prettierrc b/plugins/host-metrics/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/host-metrics/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/host-metrics/CHANGELOG.json b/plugins/host-metrics/CHANGELOG.json new file mode 100644 index 000000000..ab20b10b6 --- /dev/null +++ b/plugins/host-metrics/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "CPU, memory, disk, network, temperature, NVIDIA GPU, processes, ports and logins" + }, + { + "type": "added", + "text": "History charts for each host" + }, + { + "type": "added", + "text": "Manage services, packages, cron jobs, firewall rules, users, SSL certificates, logs and WireGuard" + }, + { + "type": "added", + "text": "Health checks for your hosts and services" + }, + { + "type": "added", + "text": "A layout you can rearrange per host" + }, + { + "type": "added", + "text": "Live stats in the terminal toolbar" + } + ] + } + ] +} diff --git a/plugins/host-metrics/CHANGELOG.md b/plugins/host-metrics/CHANGELOG.md deleted file mode 100644 index 096c84fa3..000000000 --- a/plugins/host-metrics/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Shows live CPU, memory, disk, network and process stats for your hosts, with history charts. Also adds tools to manage services, packages, firewall rules, cron jobs, users, SSL certificates, logs and WireGuard. diff --git a/plugins/host-metrics/CONTRIBUTING.md b/plugins/host-metrics/CONTRIBUTING.md new file mode 100644 index 000000000..93217b462 --- /dev/null +++ b/plugins/host-metrics/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing to Host Metrics + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Metrics interval (seconds):** how often a host is checked while someone views it +- **History retention (days):** how long history is kept for the charts +- **Metrics on for new hosts:** whether new hosts start with metrics turned on + +### User + +- **Temperature unit:** Celsius or Fahrenheit + +### Host + +- **Collect metrics:** turn metrics on for this host +- **Metrics interval (seconds):** use a different interval for this host +- **Excluded mounts:** mount points or filesystem types to hide +- **Monitored paths:** extra paths to watch that are not separate mounts + +## Permissions + +- `host-metrics.use`: view metrics and use the manager cards. Admins and users have it by default. diff --git a/plugins/host-metrics/README.md b/plugins/host-metrics/README.md index 0d40ede3c..c2a7fef7c 100644 --- a/plugins/host-metrics/README.md +++ b/plugins/host-metrics/README.md @@ -1,52 +1,48 @@ -# Host Metrics +
-Live CPU, memory, disk, network and process stats, plus tools to manage services, packages, firewall rules, cron jobs, users and more. +Termix Logo + +

Host Metrics

+ +

Live stats for your servers, plus tools to manage them

+ +
+ +
+ +## Overview + +Host Metrics shows what is happening on your servers, live and over time, and lets you manage common things on them without opening a terminal. It works over SSH on most Linux servers with nothing to install. + +
## Features -- Live CPU, memory, disk, network, temperature and process stats. -- History charts for each host. -- Tools to manage services, packages, firewall rules, cron jobs, users, SSL certificates, logs and WireGuard. -- A drag and drop layout you can change per host. -- Other features can add their own tools. Tailscale does. +- CPU, memory, disk, network, temperature, NVIDIA GPU, processes, ports and logins +- History charts for each host +- Manage services, packages, cron jobs, firewall rules, users, SSL certificates, logs and WireGuard +- Health checks for your hosts and services +- A layout you can rearrange per host +- Live stats in the terminal toolbar -## Setup - -The online dot in the host list comes from Termix itself, not this plugin. A working metrics login is what marks a reachable host as online. - -## Settings - -### Admin - -- Metrics interval (seconds): how often a host is checked while someone views it. -- History retention (days): how long history is kept. -- Metrics on for new hosts: whether new hosts start with metrics turned on. - -### User - -- Temperature unit: Celsius or Fahrenheit. - -### Host - -- Collect metrics: turn metrics on for this host. -- Metrics interval (seconds): override the admin interval. -- Enabled widgets: which widgets to show. -- Excluded mounts and Monitored paths: which disks to hide or watch. - -## Permissions - -- `host-metrics.use`: View metrics and use the host tools. Admins and users have it by default. +
## Services Provides to other plugins: -- `host-metrics.viewers`: read a host's current metrics. +- `host-metrics.viewers`: read a host's current metrics -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/host-metrics/manifest.json b/plugins/host-metrics/manifest.json index 2e1592d36..b4211ada0 100644 --- a/plugins/host-metrics/manifest.json +++ b/plugins/host-metrics/manifest.json @@ -2,16 +2,16 @@ "id": "host-metrics", "name": "Host Metrics", "version": "1.0.0", - "description": "Live CPU, memory, disk, network and process stats, plus tools to manage services, packages, firewall rules, cron jobs, users and more.", + "description": "Live CPU, memory, disk, network and GPU stats, plus cards to manage services, packages, firewall rules and more.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Monitoring", "icon": "Activity", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/host-metrics/package.json b/plugins/host-metrics/package.json index b14dba5d4..68e36a23a 100644 --- a/plugins/host-metrics/package.json +++ b/plugins/host-metrics/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -21,7 +26,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/ldap/.commitlintrc.json b/plugins/ldap/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/ldap/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/ldap/.github/funding.yml b/plugins/ldap/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/ldap/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/ldap/.github/pull_request_template.md b/plugins/ldap/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/ldap/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/ldap/.gitignore b/plugins/ldap/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/ldap/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/ldap/.husky/commit-msg b/plugins/ldap/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/ldap/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/ldap/.husky/pre-commit b/plugins/ldap/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/ldap/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/ldap/.prettierignore b/plugins/ldap/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/ldap/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/ldap/.prettierrc b/plugins/ldap/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/ldap/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/ldap/CHANGELOG.json b/plugins/ldap/CHANGELOG.json new file mode 100644 index 000000000..34b10e8d3 --- /dev/null +++ b/plugins/ldap/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Sign in against LDAP or Active Directory" + }, + { + "type": "added", + "text": "More than one directory, each with its own login button" + }, + { + "type": "added", + "text": "LDAPS for encrypted connections" + }, + { + "type": "added", + "text": "Make members of an admin group Termix admins" + } + ] + } + ] +} diff --git a/plugins/ldap/CHANGELOG.md b/plugins/ldap/CHANGELOG.md deleted file mode 100644 index eb8e5ac51..000000000 --- a/plugins/ldap/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Lets users sign in with a username and password checked against an LDAP or Active Directory server. Members of an admin group can be made admins. diff --git a/plugins/ldap/CONTRIBUTING.md b/plugins/ldap/CONTRIBUTING.md new file mode 100644 index 000000000..4c3c8aa41 --- /dev/null +++ b/plugins/ldap/CONTRIBUTING.md @@ -0,0 +1,21 @@ +# Contributing to LDAP + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Directories:** the LDAP servers people can sign in with. Each has a display name, host and port, TLS, bind DN and password, user and group search settings, an admin group and an allowed users list. The bind password is stored encrypted + +## Permissions + +- `ldap.manage`: add, edit and remove LDAP directories. Only admins have it by default. diff --git a/plugins/ldap/README.md b/plugins/ldap/README.md index aad1b98eb..ac1efd183 100644 --- a/plugins/ldap/README.md +++ b/plugins/ldap/README.md @@ -1,27 +1,38 @@ -# LDAP +
-Sign in with a username and password checked against an LDAP or Active Directory server. +Termix Logo + +

LDAP

+ +

Sign in with your LDAP or Active Directory account

+ +
+ +
+ +## Overview + +LDAP lets people sign in to Termix with their LDAP or Active Directory username and password. + +
## Features -- Sign in with a username and password checked against an LDAP or Active Directory server. -- Add more than one directory. Each gets its own option on the login screen. -- Make members of an admin group Termix admins. +- Sign in against LDAP or Active Directory +- More than one directory, each with its own login button +- LDAPS for encrypted connections +- Make members of an admin group Termix admins -## Settings +
-### Admin +## Support -- Directories: the LDAP servers, search bases and admin group for each directory. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Permissions +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- `ldap.manage`: Add, edit and remove LDAP directories. Only admins have it by default. +
-## Development +## License -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/ldap/manifest.json b/plugins/ldap/manifest.json index 0c32c1e1a..da5462d6e 100644 --- a/plugins/ldap/manifest.json +++ b/plugins/ldap/manifest.json @@ -2,16 +2,16 @@ "id": "ldap", "name": "LDAP", "version": "1.0.0", - "description": "Sign in with a username and password checked against an LDAP or Active Directory server.", + "description": "Sign in with your LDAP or Active Directory username and password.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "Server", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/ldap/package.json b/plugins/ldap/package.json index 70fda63d3..1e3582738 100644 --- a/plugins/ldap/package.json +++ b/plugins/ldap/package.json @@ -7,13 +7,18 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "ldapjs": "^3.0.7", "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -21,7 +26,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/network-topology/.commitlintrc.json b/plugins/network-topology/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/network-topology/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/network-topology/.github/funding.yml b/plugins/network-topology/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/network-topology/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/network-topology/.github/pull_request_template.md b/plugins/network-topology/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/network-topology/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/network-topology/.gitignore b/plugins/network-topology/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/network-topology/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/network-topology/.husky/commit-msg b/plugins/network-topology/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/network-topology/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/network-topology/.husky/pre-commit b/plugins/network-topology/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/network-topology/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/network-topology/.prettierignore b/plugins/network-topology/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/network-topology/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/network-topology/.prettierrc b/plugins/network-topology/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/network-topology/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/network-topology/CHANGELOG.json b/plugins/network-topology/CHANGELOG.json new file mode 100644 index 000000000..5cdcb2328 --- /dev/null +++ b/plugins/network-topology/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Add hosts and draw links between them" + }, + { + "type": "added", + "text": "Live status for each host" + }, + { + "type": "added", + "text": "Nested, colored groups" + }, + { + "type": "added", + "text": "Import and export as JSON" + }, + { + "type": "added", + "text": "A dashboard card for the graph" + } + ] + } + ] +} diff --git a/plugins/network-topology/CHANGELOG.md b/plugins/network-topology/CHANGELOG.md deleted file mode 100644 index 2d661ff55..000000000 --- a/plugins/network-topology/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Shows your hosts and how they connect as an interactive graph. Hosts can be grouped, and each user's graph is saved. diff --git a/plugins/network-topology/CONTRIBUTING.md b/plugins/network-topology/CONTRIBUTING.md new file mode 100644 index 000000000..43c0ad45a --- /dev/null +++ b/plugins/network-topology/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing to Network Topology + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Permissions + +- `network-topology.use`: view and edit the network graph. Admins and users have it by default. diff --git a/plugins/network-topology/README.md b/plugins/network-topology/README.md index 0e80064ee..5b4045238 100644 --- a/plugins/network-topology/README.md +++ b/plugins/network-topology/README.md @@ -1,29 +1,47 @@ -# Network Topology +
-Show your hosts and how they connect as an interactive graph. +Termix Logo + +

Network Topology

+ +

See your homelab drawn out as a live graph

+ +
+ +
+ +## Overview + +Network Topology draws your hosts and the links between them as an interactive graph with live status. + +
## Features -- Show your hosts and the links between them as an interactive graph. -- Put hosts into groups, and groups inside other groups. -- Import and export the graph as JSON. -- Add the graph to the dashboard as a card. -- Each user's graph is saved and syncs between the desktop app and a server. +- Add hosts and draw links between them +- Live status for each host +- Nested, colored groups +- Import and export as JSON +- A dashboard card for the graph -## Permissions - -- `network-topology.use`: Use the network graph. Admins and users have it by default. +
## Services Provides to other plugins: -- `network-topology.graph`: read a user's graph. +- `network-topology.graph`: read a user's graph -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/network-topology/manifest.json b/plugins/network-topology/manifest.json index 69e2e8403..34d0b3fd3 100644 --- a/plugins/network-topology/manifest.json +++ b/plugins/network-topology/manifest.json @@ -2,16 +2,16 @@ "id": "network-topology", "name": "Network Topology", "version": "1.0.0", - "description": "Show your hosts and how they connect as an interactive graph.", + "description": "Draws your hosts and the links between them as a live, interactive graph.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Infrastructure", "icon": "Network", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": ["db:own", "network:serve", "ui:surface"], diff --git a/plugins/network-topology/package.json b/plugins/network-topology/package.json index 7b582db90..e861eff64 100644 --- a/plugins/network-topology/package.json +++ b/plugins/network-topology/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "cytoscape": "^3.34.3", @@ -15,12 +18,17 @@ "react-cytoscapejs": "^2.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -28,5 +36,10 @@ "drizzle-orm": "^0.45.2", "express": "^5.2.1", "react": "^19.2.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/opkssh/.commitlintrc.json b/plugins/opkssh/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/opkssh/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/opkssh/.github/funding.yml b/plugins/opkssh/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/opkssh/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/opkssh/.github/pull_request_template.md b/plugins/opkssh/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/opkssh/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/opkssh/.gitignore b/plugins/opkssh/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/opkssh/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/opkssh/.husky/commit-msg b/plugins/opkssh/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/opkssh/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/opkssh/.husky/pre-commit b/plugins/opkssh/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/opkssh/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/opkssh/.prettierignore b/plugins/opkssh/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/opkssh/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/opkssh/.prettierrc b/plugins/opkssh/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/opkssh/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/opkssh/CHANGELOG.json b/plugins/opkssh/CHANGELOG.json new file mode 100644 index 000000000..e4adc179d --- /dev/null +++ b/plugins/opkssh/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Adds the OPKSSH auth type to hosts" + }, + { + "type": "added", + "text": "Sign in with your identity provider in the browser" + }, + { + "type": "added", + "text": "Certificates last 24 hours, so you sign in once a day" + }, + { + "type": "added", + "text": "Uses a pinned, checksum verified `opkssh` release" + } + ] + } + ] +} diff --git a/plugins/opkssh/CHANGELOG.md b/plugins/opkssh/CHANGELOG.md deleted file mode 100644 index 5c818c00c..000000000 --- a/plugins/opkssh/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds the OPKSSH login type. Termix signs you in with your identity provider in the browser and gets a short-lived SSH certificate from OpenPubkey SSH. diff --git a/plugins/opkssh/CONTRIBUTING.md b/plugins/opkssh/CONTRIBUTING.md new file mode 100644 index 000000000..76b1803ee --- /dev/null +++ b/plugins/opkssh/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing to OPKSSH + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Redirect URI:** register `/plugin-api/opkssh/callback` with every identity provider in your OPKSSH config +- **Use the old redirect URI:** keep sending the 2.8 URI `/host/opkssh-callback`. Upgraded installs keep this on until you turn it off diff --git a/plugins/opkssh/README.md b/plugins/opkssh/README.md index 2403cc451..d3dfc274b 100644 --- a/plugins/opkssh/README.md +++ b/plugins/opkssh/README.md @@ -1,40 +1,38 @@ -# OPKSSH +
-Connect to hosts with short-lived SSH certificates from OpenPubkey SSH, after signing in with your identity provider. +Termix Logo + +

OPKSSH

+ +

Sign in to your hosts with your identity provider

+ +
+ +
+ +## Overview + +OPKSSH lets you connect to hosts with short-lived SSH certificates from [OpenPubkey SSH](https://github.com/openpubkey/opkssh), after signing in with your identity provider. + +
## Features -- Adds the OPKSSH login type to the host editor. -- Signs you in with your identity provider in the browser and gets a short-lived SSH certificate from [OpenPubkey SSH](https://github.com/openpubkey/opkssh). -- Keeps the certificate for 24 hours. +- Adds the OPKSSH auth type to hosts +- Sign in with your identity provider in the browser +- Certificates last 24 hours, so you sign in once a day +- Uses a pinned, checksum verified `opkssh` release -## Setup +
-The config file lives at `/plugins/opkssh/config.yml` and uses the OPKSSH config format. A template is written there the first time someone signs in without one. Installs upgraded from 2.8 have their old `/.opk/config.yml` copied here. +## Support -`redirect_uris` in that file is the local listener OPKSSH opens on the Termix server. It must be localhost or left out. Register the public callback shown in the admin settings with your identity provider instead. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -### Binary +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -The plugin runs one pinned release of `opkssh` and checks its SHA-256. It looks for the binary in this order: +
-1. `OPKSSH_BUNDLED_DIR/`, which defaults to `/opkssh-bundled`. The Docker image ships it at `/app/opkssh-bundled`, so offline installs never download it. -2. `/plugins/opkssh/bin/`, a copy downloaded earlier. -3. A download from the GitHub release. +## License -A copy with the wrong checksum is ignored. Set `OPKSSH_VERSION` to use another release, and `OPKSSH_SHA256` to its checksum. - -## Settings - -### Admin - -- Redirect URI: register `/plugin-api/opkssh/callback` with your identity provider. -- Use the old redirect URI: keep sending the 2.8 URI `/host/opkssh-callback`. Upgraded installs keep this on until you turn it off. - -## Development - -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/opkssh/manifest.json b/plugins/opkssh/manifest.json index f5c1c076b..4800f0961 100644 --- a/plugins/opkssh/manifest.json +++ b/plugins/opkssh/manifest.json @@ -2,16 +2,16 @@ "id": "opkssh", "name": "OPKSSH", "version": "1.0.0", - "description": "Connect to hosts with short-lived SSH certificates from OpenPubkey SSH, after signing in with your identity provider.", + "description": "Connect to hosts with short-lived OpenPubkey SSH certificates after signing in with your identity provider.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "ShieldCheck", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/opkssh/package.json b/plugins/opkssh/package.json index d9f4a65f7..7fdaad6a6 100644 --- a/plugins/opkssh/package.json +++ b/plugins/opkssh/package.json @@ -7,13 +7,18 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "js-yaml": "^5.2.3", "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -21,7 +26,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/proxmox/.commitlintrc.json b/plugins/proxmox/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/proxmox/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/proxmox/.github/funding.yml b/plugins/proxmox/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/proxmox/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/proxmox/.github/pull_request_template.md b/plugins/proxmox/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/proxmox/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/proxmox/.gitignore b/plugins/proxmox/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/proxmox/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/proxmox/.husky/commit-msg b/plugins/proxmox/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/proxmox/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/proxmox/.husky/pre-commit b/plugins/proxmox/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/proxmox/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/proxmox/.prettierignore b/plugins/proxmox/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/proxmox/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/proxmox/.prettierrc b/plugins/proxmox/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/proxmox/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/proxmox/CHANGELOG.json b/plugins/proxmox/CHANGELOG.json new file mode 100644 index 000000000..01ec442cb --- /dev/null +++ b/plugins/proxmox/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Find and import VMs and LXC containers from a node" + }, + { + "type": "added", + "text": "Keep imported hosts in sync on a schedule" + }, + { + "type": "added", + "text": "Set up Windows guests for RDP and turn on Docker for guests by name" + }, + { + "type": "added", + "text": "Node, guest, storage and cluster stats in their own tab" + } + ] + } + ] +} diff --git a/plugins/proxmox/CHANGELOG.md b/plugins/proxmox/CHANGELOG.md deleted file mode 100644 index 95d41f13e..000000000 --- a/plugins/proxmox/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Finds the VMs and containers on a Proxmox VE node through an SSH host and imports them as Termix hosts. Can keep them in sync on a schedule and shows node stats. diff --git a/plugins/proxmox/CONTRIBUTING.md b/plugins/proxmox/CONTRIBUTING.md new file mode 100644 index 000000000..a1f2046e4 --- /dev/null +++ b/plugins/proxmox/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing to Proxmox + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Enable Proxmox:** mark this host as a Proxmox node so its guests can be imported +- **Default Auth Type and Default Credential:** the login given to imported guests +- **Windows / RDP detection and Docker detection:** name patterns that switch guests to RDP or turn on Docker +- **Preferred IP ranges:** IP prefixes to prefer, in order +- **Auto sync guests and Sync interval (minutes):** check the node for changes on a schedule, at least every 5 minutes +- **Mark missing guests:** tag guests that disappear as `proxmox-missing` instead of deleting them +- **Enable Proxmox Stats:** show the Proxmox Stats tab for this host +- **Poll interval (seconds):** how often stats refresh, at least 15 seconds +- **Node name override:** use this node name instead of the detected one diff --git a/plugins/proxmox/README.md b/plugins/proxmox/README.md index 4df68d975..8be1644ea 100644 --- a/plugins/proxmox/README.md +++ b/plugins/proxmox/README.md @@ -1,27 +1,38 @@ -# Proxmox +
-Find Proxmox VE guests through an SSH host, import them as hosts and keep them in sync. +Termix Logo + +

Proxmox

+ +

Import Proxmox guests as hosts and watch your nodes

+ +
+ +
+ +## Overview + +Proxmox imports the VMs and containers on a Proxmox VE node as Termix hosts and shows stats for the node. It works over SSH, so no API token is needed. + +
## Features -- Find the VMs and containers on a Proxmox VE node through an SSH host you already have. -- Import them as Termix hosts with the login type you choose. -- Keep imported hosts in sync on a schedule. -- Show node and guest stats in the Proxmox tab. +- Find and import VMs and LXC containers from a node +- Keep imported hosts in sync on a schedule +- Set up Windows guests for RDP and turn on Docker for guests by name +- Node, guest, storage and cluster stats in their own tab -## Settings +
-### Host +## Support -- Proxmox: mark this host as a Proxmox node and set how guests are imported. -- Default Auth Type: the login type given to imported guests. -- Auto sync guests and Sync interval (minutes): check the node for changes on a schedule. The minimum is 5 minutes. -- Proxmox stats: show the stats tab for this host. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Development +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/proxmox/manifest.json b/plugins/proxmox/manifest.json index 7a1a6af5f..1a25bf2e1 100644 --- a/plugins/proxmox/manifest.json +++ b/plugins/proxmox/manifest.json @@ -2,16 +2,16 @@ "id": "proxmox", "name": "Proxmox", "version": "1.0.0", - "description": "Find Proxmox VE guests through an SSH host, import them as hosts and keep them in sync.", + "description": "Import Proxmox VE guests as hosts, keep them in sync and watch node stats.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Infrastructure", "icon": "Server", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/proxmox/package.json b/plugins/proxmox/package.json index d3a7d9e01..9d32a645d 100644 --- a/plugins/proxmox/package.json +++ b/plugins/proxmox/package.json @@ -7,18 +7,26 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -28,5 +36,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/remote-desktop/.commitlintrc.json b/plugins/remote-desktop/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/remote-desktop/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/remote-desktop/.github/funding.yml b/plugins/remote-desktop/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/remote-desktop/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/remote-desktop/.github/pull_request_template.md b/plugins/remote-desktop/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/remote-desktop/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/remote-desktop/.gitignore b/plugins/remote-desktop/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/remote-desktop/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/remote-desktop/.husky/commit-msg b/plugins/remote-desktop/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/remote-desktop/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/remote-desktop/.husky/pre-commit b/plugins/remote-desktop/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/remote-desktop/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/remote-desktop/.prettierignore b/plugins/remote-desktop/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/remote-desktop/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/remote-desktop/.prettierrc b/plugins/remote-desktop/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/remote-desktop/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/remote-desktop/CHANGELOG.json b/plugins/remote-desktop/CHANGELOG.json new file mode 100644 index 000000000..262066d7c --- /dev/null +++ b/plugins/remote-desktop/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "RDP, VNC and Telnet from any browser" + }, + { + "type": "added", + "text": "Tabs and split screen like any other session" + }, + { + "type": "added", + "text": "Clipboard sync and file transfer through RDP drives" + }, + { + "type": "added", + "text": "Jump host support" + }, + { + "type": "added", + "text": "Session sharing and recording" + }, + { + "type": "added", + "text": "Open a host in the native Windows Remote Desktop client from the desktop app" + } + ] + } + ] +} diff --git a/plugins/remote-desktop/CHANGELOG.md b/plugins/remote-desktop/CHANGELOG.md deleted file mode 100644 index 0b364ff91..000000000 --- a/plugins/remote-desktop/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds RDP, VNC and Telnet sessions in the browser through guacd. Supports clipboard, file transfer through RDP drive redirection, session recording and session sharing. diff --git a/plugins/remote-desktop/CONTRIBUTING.md b/plugins/remote-desktop/CONTRIBUTING.md new file mode 100644 index 000000000..713abcc69 --- /dev/null +++ b/plugins/remote-desktop/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing to Remote Desktop + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Enable Remote Desktop:** turn remote desktop on or off for everyone +- **guacd URL:** where guacd runs, as `host:port`. Changes apply without a restart + +### Host + +- **RDP, VNC and Telnet:** turn each protocol on and set its port +- **Display, audio, device and performance options:** values left alone follow the host defaults +- **guacd settings:** use a different guacd for this host +- **Remote desktop toolbar:** show the toolbar in the session + +## Permissions + +- `remote-desktop.sessions`: let session sharing and recording reach your remote desktop sessions. Admins and users have it by default. diff --git a/plugins/remote-desktop/README.md b/plugins/remote-desktop/README.md index 148596406..7f7f6ac8a 100644 --- a/plugins/remote-desktop/README.md +++ b/plugins/remote-desktop/README.md @@ -1,68 +1,53 @@ -# Remote Desktop +
-RDP, VNC and Telnet sessions in the browser, with clipboard, file transfer, recording and sharing. +Termix Logo + +

Remote Desktop

+ +

RDP, VNC and Telnet in your browser

+ +
+ +
+ +## Overview + +Remote Desktop opens RDP, VNC and Telnet sessions in a tab, just like an SSH terminal. + +
## Features -- Connect to hosts over RDP, VNC or Telnet from any browser. -- Clipboard sync and file transfer through RDP drive redirection. -- Session recording and session sharing, when those plugins are on. -- Jump host support. -- Opens the Windows Remote Desktop client from the desktop app. +- RDP, VNC and Telnet from any browser +- Tabs and split screen like any other session +- Clipboard sync and file transfer through RDP drives +- Jump host support +- Session sharing and recording +- Open a host in the native Windows Remote Desktop client from the desktop app -## Setup - -This plugin needs guacd, the Apache Guacamole proxy that speaks RDP, VNC and Telnet. The Docker compose file runs it as its own `guacamole/guacd` container. This plugin never starts guacd itself. - -Set where guacd runs with the guacd URL admin setting. The `GUACD_URL`, or `GUACD_HOST` and `GUACD_PORT`, environment variables override that setting. - -Other environment variables: - -| Variable | What it sets | -| ------------------------------ | --------------------------------------------------------------------------------- | -| `GUACD_TUNNEL_HOST` | The name guacd uses to reach Termix for a jump host tunnel. Defaults to `termix`. | -| `GUACD_RECORDING_PATH` | Where guacd writes recordings, as guacd sees it. | -| `GUACD_RECORDING_BACKEND_PATH` | The same folder, as Termix sees it. | -| `GUACD_DRIVE_PATH` | The root of each user's RDP drive folder on the guacd host. | -| `GUACAMOLE_ENCRYPTION_KEY` | The connection token key. Made from `JWT_SECRET` when not set. | - -## Settings - -### Admin - -- Enable Remote Desktop: turn remote desktop on or off. -- guacd URL: where guacd runs, as `host:port`. Changes apply without a restart. - -### User - -- RDP defaults: color depth, resize method, wallpaper, font smoothing, audio, printing, drive redirection and clipboard. A host's own values win over these. - -### Host - -- RDP, VNC and Telnet: turn each protocol on and set its port. -- RDP security mode and Ignore certificate errors. -- guacd settings: every other guacd option. -- Remote desktop toolbar: show the toolbar in the session. - -## Permissions - -- `remote-desktop.sessions`: Let session sharing and recording reach your remote desktop sessions. Admins and users have it by default. +
## Services Provides to other plugins: -- `sessions.live` as `rdp`, `vnc` and `telnet`: find a live session so it can be shared. +- `sessions.live` as `rdp`, `vnc` and `telnet`: find a live session so it can be shared Uses from other plugins: -- `recordings.writer` to record sessions. Optional. -- `tunnels.access` for single-hop jump host tunnels. Optional. +- `recordings.writer` to record sessions. Optional +- `tunnels.access` for jump host tunnels. Optional -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/remote-desktop/manifest.json b/plugins/remote-desktop/manifest.json index 57660e4fa..1a4142e1f 100644 --- a/plugins/remote-desktop/manifest.json +++ b/plugins/remote-desktop/manifest.json @@ -2,16 +2,16 @@ "id": "remote-desktop", "name": "Remote Desktop", "version": "1.0.0", - "description": "RDP, VNC and Telnet sessions in the browser, with clipboard, file transfer, recording and sharing.", + "description": "RDP, VNC and Telnet sessions in your browser, with clipboard, file transfer, sharing and recording.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Terminal", "icon": "Monitor", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/remote-desktop/package.json b/plugins/remote-desktop/package.json index 2f0604f47..d9be6d2f9 100644 --- a/plugins/remote-desktop/package.json +++ b/plugins/remote-desktop/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "guacamole-common-js": "^1.5.0", @@ -15,13 +18,18 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -36,5 +44,10 @@ "patches": [ "guacamole-common-js-flush" ] + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/secret-sources/.commitlintrc.json b/plugins/secret-sources/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/secret-sources/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/secret-sources/.github/funding.yml b/plugins/secret-sources/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/secret-sources/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/secret-sources/.github/pull_request_template.md b/plugins/secret-sources/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/secret-sources/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/secret-sources/.gitignore b/plugins/secret-sources/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/secret-sources/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/secret-sources/.husky/commit-msg b/plugins/secret-sources/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/secret-sources/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/secret-sources/.husky/pre-commit b/plugins/secret-sources/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/secret-sources/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/secret-sources/.prettierignore b/plugins/secret-sources/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/secret-sources/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/secret-sources/.prettierrc b/plugins/secret-sources/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/secret-sources/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/secret-sources/CHANGELOG.json b/plugins/secret-sources/CHANGELOG.json new file mode 100644 index 000000000..ce09bb4a8 --- /dev/null +++ b/plugins/secret-sources/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Works with a self-hosted 1Password Connect server" + }, + { + "type": "added", + "text": "Use `op://vault/item/field` references in a host's password or key fields" + }, + { + "type": "added", + "text": "Secrets are fetched each time you connect and never stored in Termix" + } + ] + } + ] +} diff --git a/plugins/secret-sources/CHANGELOG.md b/plugins/secret-sources/CHANGELOG.md deleted file mode 100644 index 3e2bbb6b0..000000000 --- a/plugins/secret-sources/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Fetches host passwords and keys from 1Password when you connect, using op:// references, so they are not stored in Termix. diff --git a/plugins/secret-sources/CONTRIBUTING.md b/plugins/secret-sources/CONTRIBUTING.md new file mode 100644 index 000000000..117232c30 --- /dev/null +++ b/plugins/secret-sources/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to Secret Sources + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Private endpoint allowlist:** private or loopback hosts a secret source may reach, one per line. A self-hosted 1Password Connect server usually needs its address listed here diff --git a/plugins/secret-sources/README.md b/plugins/secret-sources/README.md index 933ee3975..bb83e9aa0 100644 --- a/plugins/secret-sources/README.md +++ b/plugins/secret-sources/README.md @@ -1,23 +1,37 @@ -# Secret Sources +
-Fetch host secrets from 1Password when you connect instead of storing them in Termix. +Termix Logo + +

Secret Sources

+ +

Pull host secrets from 1Password when you connect

+ +
+ +
+ +## Overview + +Secret Sources reads host passwords and keys from 1Password when you connect, instead of storing them in Termix. + +
## Features -- Connect a 1Password Connect server as a secret source. -- Use `op://` references in a host's password or key fields instead of the secret itself. -- Secrets are fetched each time you connect and are not stored in Termix. +- Works with a self-hosted 1Password Connect server +- Use `op://vault/item/field` references in a host's password or key fields +- Secrets are fetched each time you connect and never stored in Termix -## Settings +
-### Admin +## Support -- Private endpoint allowlist: private or loopback hosts a secret source may reach, one per line. A self-hosted 1Password Connect server usually needs its address listed here. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Development +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/secret-sources/manifest.json b/plugins/secret-sources/manifest.json index 0ed2eef67..83b9726bc 100644 --- a/plugins/secret-sources/manifest.json +++ b/plugins/secret-sources/manifest.json @@ -2,16 +2,16 @@ "id": "secret-sources", "name": "Secret Sources", "version": "1.0.0", - "description": "Fetch host secrets from 1Password when you connect instead of storing them in Termix.", + "description": "Pull host passwords and keys from 1Password when you connect instead of storing them in Termix.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "KeyRound", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/secret-sources/package.json b/plugins/secret-sources/package.json index 11dfff5d7..f881fee38 100644 --- a/plugins/secret-sources/package.json +++ b/plugins/secret-sources/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -29,5 +37,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/serial/.commitlintrc.json b/plugins/serial/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/serial/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/serial/.github/funding.yml b/plugins/serial/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/serial/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/serial/.github/pull_request_template.md b/plugins/serial/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/serial/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/serial/.gitignore b/plugins/serial/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/serial/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/serial/.husky/commit-msg b/plugins/serial/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/serial/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/serial/.husky/pre-commit b/plugins/serial/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/serial/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/serial/.prettierignore b/plugins/serial/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/serial/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/serial/.prettierrc b/plugins/serial/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/serial/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/serial/CHANGELOG.json b/plugins/serial/CHANGELOG.json new file mode 100644 index 000000000..9ba0f7b91 --- /dev/null +++ b/plugins/serial/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Set the baud rate, data bits, stop bits and parity" + }, + { + "type": "added", + "text": "The desktop app talks to the device directly" + }, + { + "type": "added", + "text": "Browsers use the Web Serial API (Chrome, Edge or Firefox 151 and newer)" + } + ] + } + ] +} diff --git a/plugins/serial/CHANGELOG.md b/plugins/serial/CHANGELOG.md deleted file mode 100644 index c55fc4d0e..000000000 --- a/plugins/serial/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Opens a serial console to a device plugged into your computer. The desktop app talks to the device directly, and the browser uses Web Serial. diff --git a/plugins/serial/CONTRIBUTING.md b/plugins/serial/CONTRIBUTING.md new file mode 100644 index 000000000..65c47fb0a --- /dev/null +++ b/plugins/serial/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to Serial + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` diff --git a/plugins/serial/README.md b/plugins/serial/README.md index 57680eb47..ac4c026f7 100644 --- a/plugins/serial/README.md +++ b/plugins/serial/README.md @@ -1,21 +1,37 @@ -# Serial +
-Open a serial console to a device plugged into your computer. +Termix Logo + +

Serial

+ +

Talk to serial devices from Termix

+ +
+ +
+ +## Overview + +Serial opens a console to a device plugged into your computer, like a router, switch or microcontroller. + +
## Features -- Open a serial console to a device plugged into your computer. -- The desktop app talks to the device directly. -- In a browser, the plugin uses Web Serial. +- Set the baud rate, data bits, stop bits and parity +- The desktop app talks to the device directly +- Browsers use the Web Serial API (Chrome, Edge or Firefox 151 and newer) -## Setup +
-The desktop app uses the `serialport` npm package, which has a native binary. The build does not bundle it. +## Support -## Development +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/serial/manifest.json b/plugins/serial/manifest.json index bca945f96..e859a9cd4 100644 --- a/plugins/serial/manifest.json +++ b/plugins/serial/manifest.json @@ -2,16 +2,16 @@ "id": "serial", "name": "Serial", "version": "1.0.0", - "description": "Open a serial console to a device plugged into your computer.", + "description": "Open a serial console to a router, switch or other device plugged into your computer.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Terminal", "icon": "Usb", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": ["network:serve", "device:serial", "ui:surface"], diff --git a/plugins/serial/package.json b/plugins/serial/package.json index 314fec69f..bbc88fdfc 100644 --- a/plugins/serial/package.json +++ b/plugins/serial/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@xterm/addon-fit": "^0.11.0", @@ -17,13 +20,18 @@ "serialport": "^13.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -40,5 +48,10 @@ "react-xtermjs": { "@xterm/xterm": "$@xterm/xterm" } + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/session-recording/.commitlintrc.json b/plugins/session-recording/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/session-recording/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/session-recording/.github/funding.yml b/plugins/session-recording/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/session-recording/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/session-recording/.github/pull_request_template.md b/plugins/session-recording/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/session-recording/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/session-recording/.gitignore b/plugins/session-recording/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/session-recording/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/session-recording/.husky/commit-msg b/plugins/session-recording/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/session-recording/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/session-recording/.husky/pre-commit b/plugins/session-recording/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/session-recording/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/session-recording/.prettierignore b/plugins/session-recording/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/session-recording/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/session-recording/.prettierrc b/plugins/session-recording/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/session-recording/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/session-recording/CHANGELOG.json b/plugins/session-recording/CHANGELOG.json new file mode 100644 index 000000000..d7d145e9d --- /dev/null +++ b/plugins/session-recording/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Record SSH, RDP and VNC sessions" + }, + { + "type": "added", + "text": "Play recordings back at any speed" + }, + { + "type": "added", + "text": "Download a recording as a file or plain text" + }, + { + "type": "added", + "text": "Old recordings are removed after a number of days you choose" + } + ] + } + ] +} diff --git a/plugins/session-recording/CHANGELOG.md b/plugins/session-recording/CHANGELOG.md deleted file mode 100644 index a4e735e92..000000000 --- a/plugins/session-recording/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Records SSH terminal sessions so you can play them back, copy their text or download them. Old recordings are removed after a set number of days. diff --git a/plugins/session-recording/CONTRIBUTING.md b/plugins/session-recording/CONTRIBUTING.md new file mode 100644 index 000000000..6a340c43a --- /dev/null +++ b/plugins/session-recording/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing to Session Recording + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Retention (days):** remove recordings older than this. Checked at startup and once a day + +### Host + +- **Enable session recording:** record sessions on this host + +## Permissions + +- `session-recording.view`: view and play back your own session recordings. Admins and users have it by default. diff --git a/plugins/session-recording/README.md b/plugins/session-recording/README.md index cd4e575c2..cbd4a25ad 100644 --- a/plugins/session-recording/README.md +++ b/plugins/session-recording/README.md @@ -1,39 +1,46 @@ -# Session Recording +
-Record terminal sessions and play them back or download them later. +Termix Logo + +

Session Recording

+ +

Record sessions and play them back later

+ +
+ +
+ +## Overview + +Session Recording records your terminal and remote desktop sessions so you can watch them again later. + +
## Features -- Records SSH terminal sessions as they happen. -- Play a recording back, skip through it and copy its text. -- Download a recording as a file or as plain text. -- Removes recordings older than a set number of days. -- Keeps recordings when a user is deleted, with the user's name removed. +- Record SSH, RDP and VNC sessions +- Play recordings back at any speed +- Download a recording as a file or plain text +- Old recordings are removed after a number of days you choose -## Settings - -### Admin - -- Retention (days): remove recordings older than this. Checked at startup and once a day. - -### Host - -- Enable session recording: record sessions on this host. - -## Permissions - -- `session-recording.view`: View and download session recordings. Admins and users have it by default. +
## Services Provides to other plugins: -- `recordings.writer`: start a recording and add to it as a session runs, or save a recording that is already finished. +- `recordings.writer`: start a recording and add to it as a session runs, or save a recording that is already finished -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/session-recording/manifest.json b/plugins/session-recording/manifest.json index bf19a807f..59f218aad 100644 --- a/plugins/session-recording/manifest.json +++ b/plugins/session-recording/manifest.json @@ -2,16 +2,16 @@ "id": "session-recording", "name": "Session Recording", "version": "1.0.0", - "description": "Record terminal sessions and play them back or download them later.", + "description": "Record terminal and remote desktop sessions and play them back or download them later.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Terminal", "icon": "ScrollText", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/session-recording/package.json b/plugins/session-recording/package.json index ce4fb7e10..de87c8c0a 100644 --- a/plugins/session-recording/package.json +++ b/plugins/session-recording/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@xterm/addon-fit": "^0.11.0", @@ -16,12 +19,17 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -35,5 +43,10 @@ "xterm-android-ime", "guacamole-common-js-flush" ] + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/session-sharing/.commitlintrc.json b/plugins/session-sharing/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/session-sharing/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/session-sharing/.github/funding.yml b/plugins/session-sharing/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/session-sharing/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/session-sharing/.github/pull_request_template.md b/plugins/session-sharing/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/session-sharing/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/session-sharing/.gitignore b/plugins/session-sharing/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/session-sharing/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/session-sharing/.husky/commit-msg b/plugins/session-sharing/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/session-sharing/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/session-sharing/.husky/pre-commit b/plugins/session-sharing/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/session-sharing/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/session-sharing/.prettierignore b/plugins/session-sharing/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/session-sharing/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/session-sharing/.prettierrc b/plugins/session-sharing/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/session-sharing/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/session-sharing/CHANGELOG.json b/plugins/session-sharing/CHANGELOG.json new file mode 100644 index 000000000..309c256c2 --- /dev/null +++ b/plugins/session-sharing/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Share terminal, RDP, VNC and Telnet sessions" + }, + { + "type": "added", + "text": "Share by link with anyone, or with a Termix user" + }, + { + "type": "added", + "text": "Read-only or read and write" + }, + { + "type": "added", + "text": "Links that expire or can be revoked" + }, + { + "type": "added", + "text": "Meeting rooms where a presenter shows a session and can hand over control" + }, + { + "type": "added", + "text": "Guest links for people without an account" + } + ] + } + ] +} diff --git a/plugins/session-sharing/CHANGELOG.md b/plugins/session-sharing/CHANGELOG.md deleted file mode 100644 index f9e465f00..000000000 --- a/plugins/session-sharing/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Share a live terminal or remote desktop session by link or with another user, read-only or with input. Collaboration rooms let a presenter show sessions to a group. diff --git a/plugins/session-sharing/CONTRIBUTING.md b/plugins/session-sharing/CONTRIBUTING.md new file mode 100644 index 000000000..c5ae5ec66 --- /dev/null +++ b/plugins/session-sharing/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing to Session Sharing + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Allow Session Sharing:** turn sharing on or off for everyone. When off, it overrides every host setting + +### Host + +- **Allow Session Sharing:** allow sharing sessions on this host + +## Permissions + +- `session-sharing.use`: share sessions and create and join meeting rooms. Admins and users have it by default. diff --git a/plugins/session-sharing/README.md b/plugins/session-sharing/README.md index 6b253d9e9..9fe84ea87 100644 --- a/plugins/session-sharing/README.md +++ b/plugins/session-sharing/README.md @@ -1,43 +1,52 @@ -# Session Sharing +
-Share a live terminal or remote desktop session by link or with another user, and present sessions in collaboration rooms. +Termix Logo + +

Session Sharing

+ +

Share live sessions and run meetings together

+ +
+ +
+ +## Overview + +Session Sharing lets you share a live terminal or remote desktop session with someone else, and present sessions to a group in meeting rooms. + +
## Features -- Share a live terminal or remote desktop session by link or with one user. -- Pick read-only or read and write, and set when the share expires. -- Collaboration rooms where a presenter shows a session to a group and can hand control to a member. -- Guest links for people without a Termix account. -- The share button is in the terminal and remote desktop toolbars. +- Share terminal, RDP, VNC and Telnet sessions +- Share by link with anyone, or with a Termix user +- Read-only or read and write +- Links that expire or can be revoked +- Meeting rooms where a presenter shows a session and can hand over control +- Guest links for people without an account -## Settings - -### Admin - -- Allow Session Sharing: turn sharing on or off for everyone. - -### Host - -- Allow Session Sharing: allow sharing sessions on this host. - -## Permissions - -- `session-sharing.use`: Share sessions and join rooms. Admins and users have it by default. +
## Services Provides to other plugins: -- `sessions.sharing`: join a shared session or room from the terminal. +- `sessions.sharing`: join a shared session or room from the terminal Uses from other plugins: -- `sessions.live` to reach live SSH, RDP, VNC and Telnet sessions. +- `sessions.live` to reach live SSH, RDP, VNC and Telnet sessions -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/session-sharing/manifest.json b/plugins/session-sharing/manifest.json index c80f1764e..265e7ae64 100644 --- a/plugins/session-sharing/manifest.json +++ b/plugins/session-sharing/manifest.json @@ -2,16 +2,16 @@ "id": "session-sharing", "name": "Session Sharing", "version": "1.0.0", - "description": "Share a live terminal or remote desktop session by link or with another user, and present sessions in collaboration rooms.", + "description": "Share live sessions by link or with another user, and present sessions to a group in meeting rooms.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Productivity", "icon": "Presentation", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/session-sharing/package.json b/plugins/session-sharing/package.json index 8f6971a04..333853a02 100644 --- a/plugins/session-sharing/package.json +++ b/plugins/session-sharing/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@xterm/addon-fit": "^0.11.0", @@ -17,6 +20,8 @@ "redis": "^6.2.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -24,7 +29,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -44,5 +52,10 @@ "react-xtermjs": { "@xterm/xterm": "$@xterm/xterm" } + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/snippets/.commitlintrc.json b/plugins/snippets/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/snippets/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/snippets/.github/funding.yml b/plugins/snippets/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/snippets/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/snippets/.github/pull_request_template.md b/plugins/snippets/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/snippets/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/snippets/.gitignore b/plugins/snippets/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/snippets/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/snippets/.husky/commit-msg b/plugins/snippets/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/snippets/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/snippets/.husky/pre-commit b/plugins/snippets/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/snippets/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/snippets/.prettierignore b/plugins/snippets/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/snippets/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/snippets/.prettierrc b/plugins/snippets/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/snippets/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/snippets/CHANGELOG.json b/plugins/snippets/CHANGELOG.json new file mode 100644 index 000000000..6a8aeb8fe --- /dev/null +++ b/plugins/snippets/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Save commands and notes in folders" + }, + { + "type": "added", + "text": "Run them in one or more terminals, or straight on a set of hosts" + }, + { + "type": "added", + "text": "Variables for the host and your own inputs" + }, + { + "type": "added", + "text": "Run a snippet each time you connect to a host" + }, + { + "type": "added", + "text": "Share snippets with users or roles" + }, + { + "type": "added", + "text": "Import and export as JSON" + } + ] + } + ] +} diff --git a/plugins/snippets/CHANGELOG.md b/plugins/snippets/CHANGELOG.md deleted file mode 100644 index 8774d7fe6..000000000 --- a/plugins/snippets/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Save commands and notes in folders, then run or paste them into a terminal. Snippets support variables and can be shared with other users or roles. diff --git a/plugins/snippets/CONTRIBUTING.md b/plugins/snippets/CONTRIBUTING.md new file mode 100644 index 000000000..4ed5dd026 --- /dev/null +++ b/plugins/snippets/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to Snippets + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### User + +- **Collapse folders by default:** start each folder closed in the Snippets panel +- **Show commands:** show the first line of each command under its name +- **Confirm before running:** ask before a command snippet runs in a terminal + +## Permissions + +- `snippets.view`: see your own and shared snippets. Admins and users have it by default. +- `snippets.create`: create snippets, notes and folders. Admins and users have it by default. +- `snippets.edit`: change snippets and folders. Admins and users have it by default. +- `snippets.delete`: delete snippets and folders. Admins and users have it by default. +- `snippets.share`: share snippets and folders. Admins and users have it by default. diff --git a/plugins/snippets/README.md b/plugins/snippets/README.md index fe4a582b7..d4f35aaeb 100644 --- a/plugins/snippets/README.md +++ b/plugins/snippets/README.md @@ -1,39 +1,48 @@ -# Snippets +
-Save commands and notes, then run or paste them into a terminal. Supports variables and sharing. +Termix Logo + +

Snippets

+ +

Save the commands you run often and run them in one click

+ +
+ +
+ +## Overview + +Snippets keeps the commands and text you use often in one place, ready to run in a terminal. + +
## Features -- Save commands and notes and sort them into folders. -- Run a snippet or paste it into a terminal. -- Use variables like `$HOST` and `$INPUT_1` that are filled in when the snippet runs. -- Share snippets and folders with other users or roles. -- Snippets sync between the desktop app and a server. +- Save commands and notes in folders +- Run them in one or more terminals, or straight on a set of hosts +- Variables for the host and your own inputs +- Run a snippet each time you connect to a host +- Share snippets with users or roles +- Import and export as JSON -## Settings - -### User - -- Collapse folders by default: start each folder closed when you open the Snippets panel. - -## Permissions - -- `snippets.view`: See your own and shared snippets. Admins and users have it by default. -- `snippets.create`: Create snippets, notes and folders. Admins and users have it by default. -- `snippets.edit`: Change snippets and folders. Admins and users have it by default. -- `snippets.delete`: Delete snippets and folders. Admins and users have it by default. -- `snippets.share`: Share snippets and folders. Admins and users have it by default. +
## Services Provides to other plugins: -- `snippets.access`: read and run snippets. +- `snippets.access`: read and run snippets -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/snippets/manifest.json b/plugins/snippets/manifest.json index 7f6a2ad76..0ba45ac90 100644 --- a/plugins/snippets/manifest.json +++ b/plugins/snippets/manifest.json @@ -2,16 +2,16 @@ "id": "snippets", "name": "Snippets", "version": "1.0.0", - "description": "Save commands and notes, then run or paste them into a terminal. Supports variables and sharing.", + "description": "Save the commands you run often and run them in a terminal or on many hosts in one click.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Productivity", "icon": "Play", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/snippets/package.json b/plugins/snippets/package.json index 57452fa3d..6434d6f0a 100644 --- a/plugins/snippets/package.json +++ b/plugins/snippets/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/ssh-terminal/.commitlintrc.json b/plugins/ssh-terminal/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/ssh-terminal/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/ssh-terminal/.github/funding.yml b/plugins/ssh-terminal/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/ssh-terminal/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/ssh-terminal/.github/pull_request_template.md b/plugins/ssh-terminal/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/ssh-terminal/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/ssh-terminal/.gitignore b/plugins/ssh-terminal/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/ssh-terminal/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/ssh-terminal/.husky/commit-msg b/plugins/ssh-terminal/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/ssh-terminal/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/ssh-terminal/.husky/pre-commit b/plugins/ssh-terminal/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/ssh-terminal/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/ssh-terminal/.prettierignore b/plugins/ssh-terminal/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/ssh-terminal/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/ssh-terminal/.prettierrc b/plugins/ssh-terminal/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/ssh-terminal/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/ssh-terminal/CHANGELOG.json b/plugins/ssh-terminal/CHANGELOG.json new file mode 100644 index 000000000..d808da2b0 --- /dev/null +++ b/plugins/ssh-terminal/CHANGELOG.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Tabs and split screen" + }, + { + "type": "added", + "text": "Jump hosts and host key verification" + }, + { + "type": "added", + "text": "Sessions stay alive after a disconnect and reconnect on their own" + }, + { + "type": "added", + "text": "Tmux and Mosh support" + }, + { + "type": "added", + "text": "Themes, fonts and syntax highlighting" + }, + { + "type": "added", + "text": "A toolbar with live stats and quick links to the host's other tools" + }, + { + "type": "added", + "text": "Command history with autocomplete" + }, + { + "type": "added", + "text": "Macros that automate logins and prompts" + }, + { + "type": "added", + "text": "Send keystrokes to several terminals at once" + }, + { + "type": "added", + "text": "A local terminal in the desktop app" + } + ] + } + ] +} diff --git a/plugins/ssh-terminal/CHANGELOG.md b/plugins/ssh-terminal/CHANGELOG.md deleted file mode 100644 index fa20f92b8..000000000 --- a/plugins/ssh-terminal/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds SSH terminal sessions with jump hosts, host key checks, command history and a terminal toolbar. Sessions can stay alive after a disconnect, and the desktop app gets a local terminal. diff --git a/plugins/ssh-terminal/CONTRIBUTING.md b/plugins/ssh-terminal/CONTRIBUTING.md new file mode 100644 index 000000000..3ae2c5c89 --- /dev/null +++ b/plugins/ssh-terminal/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to SSH Terminal + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Keep sessions after disconnect and Terminal Session Persistence:** keep a disconnected terminal alive, and for how long +- **Command History:** allow command history at all +- **Touch Input:** options for using the terminal on a touch screen +- **Image Storage:** where pasted and uploaded images are kept, and how many and how large + +### User + +- **Command Autocomplete:** show suggestions from your history while you type + +### Host + +- **Enable Terminal:** offer an SSH terminal for this host +- **Enable Terminal Toolbar:** show the toolbar for this host +- **Command History:** record commands run on this host +- **Appearance:** theme, colors, font, cursor and syntax highlighting +- **Behavior:** Auto-Tmux, Auto-Mosh, local echo, auto reconnect, password and sudo auto-fill, and scrollback size + +## Permissions + +- `ssh-terminal.sessions`: let other features, like session sharing and recording, reach your live terminal sessions. Admins and users have it by default. +- `ssh-terminal.history`: let other features, like the AI assistant, read your command history. Admins and users have it by default. diff --git a/plugins/ssh-terminal/README.md b/plugins/ssh-terminal/README.md index 0f169082d..0b8134ec4 100644 --- a/plugins/ssh-terminal/README.md +++ b/plugins/ssh-terminal/README.md @@ -1,60 +1,59 @@ -# SSH Terminal +
-SSH terminal sessions with jump hosts, host key checks, command history and a local terminal in the desktop app. +Termix Logo + +

SSH Terminal

+ +

A full SSH terminal in your browser, desktop and phone

+ +
+ +
+ +## Overview + +SSH Terminal is the terminal in Termix. It opens SSH sessions in tabs and split screen, and the desktop app also gets a local terminal. + +
## Features -- SSH terminal sessions with jump hosts and host key checks. -- Keeps a session alive on the server after a disconnect, so reopening the tab picks up where you left off. -- Command history with autocomplete. -- A toolbar docked to the terminal with host tools and live stats. -- Paste or upload images to the host from the terminal. -- A local terminal in the desktop app. -- Attaches to tmux sessions when Tmux Monitor is on. +- Tabs and split screen +- Jump hosts and host key verification +- Sessions stay alive after a disconnect and reconnect on their own +- Tmux and Mosh support +- Themes, fonts and syntax highlighting +- A toolbar with live stats and quick links to the host's other tools +- Command history with autocomplete +- Macros that automate logins and prompts +- Send keystrokes to several terminals at once +- A local terminal in the desktop app -## Settings - -### Admin - -- Keep sessions after disconnect and Terminal Session Persistence: keep a disconnected terminal alive, and for how long. -- Command History and Command history for new hosts: allow history, and whether new hosts start with it on. -- Touch Input: options for using the terminal on a touch screen. -- Image Storage: where pasted and uploaded images are kept, and how many and how large. - -### Host - -- Enable Terminal: offer an SSH terminal for this host. -- Enable Terminal Toolbar: show the toolbar for this host. -- Command History: record commands run on this host. - -## Permissions - -- `ssh-terminal.sessions`: Let other features, like session sharing and recording, reach your live terminal sessions. Admins and users have it by default. -- `ssh-terminal.history`: Read command history. Admins and users have it by default. +
## Services Provides to other plugins: -- `sessions.live` as `ssh`: find a live terminal session so it can be shared. -- `terminal.history`: read a user's command history. +- `sessions.live` as `ssh`: find a live terminal session so it can be shared +- `terminal.history`: read a user's command history Uses from other plugins: -- `tmux.sessions` to attach to tmux. Optional. -- `sessions.sharing` for shared sessions. Optional. -- `recordings.writer` to record sessions. Optional. +- `tmux.sessions` to attach to tmux. Optional +- `sessions.sharing` for shared sessions. Optional +- `recordings.writer` to record sessions. Optional -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support -## Reconnecting a workspace +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -Use **Reconnect all disconnected terminals** from a tab's context menu or the command palette after a network interruption. It retries mounted SSH terminal tabs, including hidden tabs and split panes, through their existing manual reconnect flow. Connected terminals and terminals already connecting or waiting for an automatic retry are skipped. Invoking the action again does not interrupt an in-flight connection; failures in one tab do not stop the others. The notification counts reconnect attempts started, not successful connections. +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -This is a manual workspace action. It does not add automatic SSH-error retries, resume/network listeners, tmux-session restoration or scrollback preservation. Existing authentication prompts, host-key validation and manual-reconnect behavior still apply. Other session plugins participate only if they expose the SDK's optional `reconnectIfDisconnected` handle method. +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/ssh-terminal/manifest.json b/plugins/ssh-terminal/manifest.json index 1684e7ddc..b741a2f83 100644 --- a/plugins/ssh-terminal/manifest.json +++ b/plugins/ssh-terminal/manifest.json @@ -2,16 +2,16 @@ "id": "ssh-terminal", "name": "SSH Terminal", "version": "1.0.0", - "description": "SSH terminal sessions with jump hosts, host key checks, command history and a local terminal in the desktop app.", + "description": "SSH terminal sessions with tabs, split screen, history, macros and a local terminal in the desktop app.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Terminal", "icon": "SquareTerminal", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/ssh-terminal/package.json b/plugins/ssh-terminal/package.json index 2064cb0b4..32fe5de3c 100644 --- a/plugins/ssh-terminal/package.json +++ b/plugins/ssh-terminal/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@xterm/addon-clipboard": "^0.2.0", @@ -20,6 +23,8 @@ "react-xtermjs": "^1.0.10" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -29,7 +34,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -53,5 +61,10 @@ "react-xtermjs": { "@xterm/xterm": "$@xterm/xterm" } + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/sso/.commitlintrc.json b/plugins/sso/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/sso/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/sso/.github/funding.yml b/plugins/sso/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/sso/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/sso/.github/pull_request_template.md b/plugins/sso/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/sso/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/sso/.gitignore b/plugins/sso/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/sso/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/sso/.husky/commit-msg b/plugins/sso/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/sso/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/sso/.husky/pre-commit b/plugins/sso/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/sso/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/sso/.prettierignore b/plugins/sso/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/sso/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/sso/.prettierrc b/plugins/sso/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/sso/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/sso/CHANGELOG.json b/plugins/sso/CHANGELOG.json new file mode 100644 index 000000000..3e3ee6527 --- /dev/null +++ b/plugins/sso/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Any OpenID Connect provider, plus GitHub and Google" + }, + { + "type": "added", + "text": "More than one provider, each with its own login button" + }, + { + "type": "added", + "text": "Make members of an admin group Termix admins" + }, + { + "type": "added", + "text": "Limit sign in to certain users" + }, + { + "type": "added", + "text": "Back-channel logout" + } + ] + } + ] +} diff --git a/plugins/sso/CHANGELOG.md b/plugins/sso/CHANGELOG.md deleted file mode 100644 index 481314832..000000000 --- a/plugins/sso/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Lets users sign in with an OpenID Connect provider, GitHub or Google. Each provider gets its own login button, and group claims can make users admins. diff --git a/plugins/sso/CONTRIBUTING.md b/plugins/sso/CONTRIBUTING.md new file mode 100644 index 000000000..dd653e4b4 --- /dev/null +++ b/plugins/sso/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Single sign-on + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Providers:** add a provider, then register the redirect URI it shows with your identity provider. The client secret is stored encrypted. Providers set up before 2.9 keep the old redirect URI until you turn it off +- **Sign in with SSO automatically:** skip the login form and go to the first provider. The `OIDC_SILENT_LOGIN_DEFAULT` environment variable overrides this + +## Permissions + +- `sso.manage`: add, edit and remove SSO providers. Only admins have it by default. diff --git a/plugins/sso/README.md b/plugins/sso/README.md index 2daad778b..fda217071 100644 --- a/plugins/sso/README.md +++ b/plugins/sso/README.md @@ -1,28 +1,39 @@ -# Single sign-on +
-Sign in with an OpenID Connect provider, GitHub or Google. Each provider gets its own button on the login screen. +Termix Logo + +

Single sign-on

+ +

Sign in with OpenID Connect, GitHub or Google

+ +
+ +
+ +## Overview + +Single sign-on lets people sign in to Termix with an identity provider instead of a password. + +
## Features -- Sign in with any OpenID Connect provider, GitHub or Google. -- Each provider gets its own button on the login screen. -- Make members of an admin group Termix admins, read from a group claim. -- Supports back-channel logout. +- Any OpenID Connect provider, plus GitHub and Google +- More than one provider, each with its own login button +- Make members of an admin group Termix admins +- Limit sign in to certain users +- Back-channel logout -## Settings +
-### Admin +## Support -- Providers: add a provider, then register the redirect URI it shows with your identity provider. Providers set up before 2.9 keep the old redirect URI until you turn it off. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Permissions +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- `sso.manage`: Add, edit and remove SSO providers. Only admins have it by default. +
-## Development +## License -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/sso/manifest.json b/plugins/sso/manifest.json index dc0eb7c5d..1fc02b317 100644 --- a/plugins/sso/manifest.json +++ b/plugins/sso/manifest.json @@ -2,16 +2,16 @@ "id": "sso", "name": "Single sign-on", "version": "1.0.0", - "description": "Sign in with an OpenID Connect provider, GitHub or Google. Each provider gets its own button on the login screen.", + "description": "Sign in with any OpenID Connect provider, GitHub or Google.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "KeyRound", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/sso/package.json b/plugins/sso/package.json index d80b5bdd2..433a7612f 100644 --- a/plugins/sso/package.json +++ b/plugins/sso/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "jose": "^6.2.12", @@ -15,6 +18,8 @@ "undici": "^8.10.2" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -22,7 +27,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/step-ca/.commitlintrc.json b/plugins/step-ca/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/step-ca/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/step-ca/.github/funding.yml b/plugins/step-ca/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/step-ca/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/step-ca/.github/pull_request_template.md b/plugins/step-ca/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/step-ca/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/step-ca/.gitignore b/plugins/step-ca/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/step-ca/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/step-ca/.husky/commit-msg b/plugins/step-ca/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/step-ca/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/step-ca/.husky/pre-commit b/plugins/step-ca/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/step-ca/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/step-ca/.prettierignore b/plugins/step-ca/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/step-ca/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/step-ca/.prettierrc b/plugins/step-ca/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/step-ca/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/step-ca/CHANGELOG.json b/plugins/step-ca/CHANGELOG.json new file mode 100644 index 000000000..d4024b932 --- /dev/null +++ b/plugins/step-ca/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Adds the Step CA auth type to hosts" + }, + { + "type": "added", + "text": "Sign in with your identity provider in the browser" + }, + { + "type": "added", + "text": "Certificates are kept until they expire" + }, + { + "type": "added", + "text": "No `step` binary needed" + } + ] + } + ] +} diff --git a/plugins/step-ca/CHANGELOG.md b/plugins/step-ca/CHANGELOG.md deleted file mode 100644 index d2c370f96..000000000 --- a/plugins/step-ca/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds the Step CA login type. Termix signs you in through a smallstep step-ca OIDC provisioner and gets a short-lived SSH certificate from the CA. diff --git a/plugins/step-ca/CONTRIBUTING.md b/plugins/step-ca/CONTRIBUTING.md new file mode 100644 index 000000000..b52f1af14 --- /dev/null +++ b/plugins/step-ca/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# Contributing to Step CA + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **CA URL, Root fingerprint and OIDC provisioner name:** leave all three empty to turn Step CA off +- **Allowed private Step CA hosts:** the CA and, if it is internal, the identity provider. Private hosts not on this list are refused +- **Redirect URI:** register `/plugin-api/step-ca/callback` with your identity provider +- **Use the old redirect URI:** keep sending the 2.8 URI `/host/step-ca-callback`. Upgraded installs keep this on until you turn it off diff --git a/plugins/step-ca/README.md b/plugins/step-ca/README.md index 26ad7f607..22b416446 100644 --- a/plugins/step-ca/README.md +++ b/plugins/step-ca/README.md @@ -1,31 +1,38 @@ -# Step CA +
-Connect to hosts with short-lived SSH certificates from a smallstep step-ca server, after signing in through its OIDC provisioner. +Termix Logo + +

Step CA

+ +

Short-lived SSH certificates from your own step-ca server

+ +
+ +
+ +## Overview + +Step CA lets you connect to hosts with short-lived SSH certificates from a [smallstep step-ca](https://smallstep.com/docs/step-ca/) server, after signing in through its OIDC provisioner. + +
## Features -- Adds the Step CA login type to the host editor. -- Signs you in through the identity provider behind a [smallstep step-ca](https://smallstep.com/docs/step-ca/) OIDC provisioner. -- Has the CA sign a fresh key and keeps the certificate until it expires. -- Talks to the CA's HTTPS API directly, so the `step` binary is never needed. +- Adds the Step CA auth type to hosts +- Sign in with your identity provider in the browser +- Certificates are kept until they expire +- No `step` binary needed -## Setup +
-When `REDIS_URL` is set and you run more than one Termix instance, a callback that reaches the wrong instance is handed to the one that started the sign-in. `TERMIX_STEP_CA_REDIS_PREFIX` changes the key prefix, which defaults to `termix:step-ca`. +## Support -## Settings +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -### Admin +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- CA URL, Root fingerprint and OIDC provisioner name: leave all three empty to turn Step CA off. -- Allowed private Step CA hosts: the CA and, if it is internal, the identity provider. Private hosts not on this list are refused. -- Redirect URI: register `/plugin-api/step-ca/callback` with your identity provider. -- Use the old redirect URI: keep sending the 2.8 URI `/host/step-ca-callback`. Upgraded installs keep this on until you turn it off. +
-## Development +## License -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/step-ca/manifest.json b/plugins/step-ca/manifest.json index 26f888767..a27e83593 100644 --- a/plugins/step-ca/manifest.json +++ b/plugins/step-ca/manifest.json @@ -2,16 +2,16 @@ "id": "step-ca", "name": "Step CA", "version": "1.0.0", - "description": "Connect to hosts with short-lived SSH certificates from a smallstep step-ca server, after signing in through its OIDC provisioner.", + "description": "Connect to hosts with short-lived SSH certificates from a smallstep step-ca server.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "ShieldCheck", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/step-ca/package.json b/plugins/step-ca/package.json index 28828bd1f..575f0bfee 100644 --- a/plugins/step-ca/package.json +++ b/plugins/step-ca/package.json @@ -7,13 +7,18 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0", "redis": "^6.2.1" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -21,7 +26,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/tailscale/.commitlintrc.json b/plugins/tailscale/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/tailscale/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/tailscale/.github/funding.yml b/plugins/tailscale/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/tailscale/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/tailscale/.github/pull_request_template.md b/plugins/tailscale/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/tailscale/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/tailscale/.gitignore b/plugins/tailscale/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/tailscale/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/tailscale/.husky/commit-msg b/plugins/tailscale/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/tailscale/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/tailscale/.husky/pre-commit b/plugins/tailscale/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/tailscale/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/tailscale/.prettierignore b/plugins/tailscale/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/tailscale/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/tailscale/.prettierrc b/plugins/tailscale/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/tailscale/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/tailscale/CHANGELOG.json b/plugins/tailscale/CHANGELOG.json new file mode 100644 index 000000000..8e66c34b4 --- /dev/null +++ b/plugins/tailscale/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Add tailnet devices as hosts in a couple of clicks" + }, + { + "type": "added", + "text": "Connect with Tailscale SSH, with no credentials stored" + }, + { + "type": "added", + "text": "Works with Headscale" + }, + { + "type": "added", + "text": "A Tailscale card in Host Metrics" + } + ] + } + ] +} diff --git a/plugins/tailscale/CHANGELOG.md b/plugins/tailscale/CHANGELOG.md deleted file mode 100644 index ec3d7e98f..000000000 --- a/plugins/tailscale/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Lets you browse devices on your tailnet and pick one when adding a host. Also shows the Tailscale SSH sign-in check when a host asks for it. diff --git a/plugins/tailscale/CONTRIBUTING.md b/plugins/tailscale/CONTRIBUTING.md new file mode 100644 index 000000000..927b9588a --- /dev/null +++ b/plugins/tailscale/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing to Tailscale + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **API key:** a Tailscale or Headscale API key for your tailnet +- **API base URL:** leave empty for Tailscale, or point it at a Headscale instance +- **Device list:** check that the key works and see how many devices are reachable + +## Permissions + +- `tailscale.devices.view`: see the devices on the tailnet. Only admins have it by default. diff --git a/plugins/tailscale/README.md b/plugins/tailscale/README.md index e85eee27b..a041d34be 100644 --- a/plugins/tailscale/README.md +++ b/plugins/tailscale/README.md @@ -1,30 +1,38 @@ -# Tailscale +
-Browse and connect to devices on your tailnet, and handle Tailscale SSH sign-in checks. +Termix Logo + +

Tailscale

+ +

Add tailnet devices as hosts and connect with Tailscale SSH

+ +
+ +
+ +## Overview + +Tailscale pulls the devices on your tailnet into Termix and lets you connect to them with Tailscale SSH, so your tailnet ACLs handle access. + +
## Features -- Browse the devices on your Tailscale or Headscale tailnet. -- Pick a device when adding a host to fill in its address. -- Shows the Tailscale SSH sign-in check when a host asks for it. -- Adds a Tailscale tool to Host Metrics. +- Add tailnet devices as hosts in a couple of clicks +- Connect with Tailscale SSH, with no credentials stored +- Works with Headscale +- A Tailscale card in Host Metrics -## Settings +
-### Admin +## Support -- API key: a Tailscale or Headscale API key for your tailnet. -- API base URL: leave empty for Tailscale, or point it at a Headscale instance. -- Device list: check that the key works and see how many devices are reachable. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Permissions +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- `tailscale.devices.view`: See the devices on the tailnet. Only admins have it by default. +
-## Development +## License -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/tailscale/manifest.json b/plugins/tailscale/manifest.json index a14dcbf3b..92c5d0898 100644 --- a/plugins/tailscale/manifest.json +++ b/plugins/tailscale/manifest.json @@ -2,16 +2,16 @@ "id": "tailscale", "name": "Tailscale", "version": "1.0.0", - "description": "Browse and connect to devices on your tailnet, and handle Tailscale SSH sign-in checks.", + "description": "Add tailnet devices as hosts and connect with Tailscale SSH.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Networking", "icon": "Network", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/tailscale/package.json b/plugins/tailscale/package.json index dbdf408a6..1b1d9a3ae 100644 --- a/plugins/tailscale/package.json +++ b/plugins/tailscale/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -29,5 +37,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/telemetry/.commitlintrc.json b/plugins/telemetry/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/telemetry/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/telemetry/.github/funding.yml b/plugins/telemetry/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/telemetry/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/telemetry/.github/pull_request_template.md b/plugins/telemetry/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/telemetry/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/telemetry/.gitignore b/plugins/telemetry/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/telemetry/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/telemetry/.husky/commit-msg b/plugins/telemetry/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/telemetry/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/telemetry/.husky/pre-commit b/plugins/telemetry/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/telemetry/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/telemetry/.prettierignore b/plugins/telemetry/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/telemetry/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/telemetry/.prettierrc b/plugins/telemetry/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/telemetry/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/telemetry/CHANGELOG.json b/plugins/telemetry/CHANGELOG.json new file mode 100644 index 000000000..c42dd4dd5 --- /dev/null +++ b/plugins/telemetry/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Never sends usernames, hostnames, IP addresses or credentials" + }, + { + "type": "added", + "text": "Choose what the report includes, or turn it off" + }, + { + "type": "added", + "text": "Preview the exact report before it is sent" + } + ] + } + ] +} diff --git a/plugins/telemetry/CHANGELOG.md b/plugins/telemetry/CHANGELOG.md deleted file mode 100644 index dc39a5321..000000000 --- a/plugins/telemetry/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Moves the daily anonymous usage report out of Termix core. Adds platform info, feature usage counts and the list of running features, each with its own switch, a per-user opt-out, a preview of the exact report and a button to send it now. diff --git a/plugins/telemetry/CONTRIBUTING.md b/plugins/telemetry/CONTRIBUTING.md new file mode 100644 index 000000000..f9f102aa5 --- /dev/null +++ b/plugins/telemetry/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to Usage Statistics + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Share anonymous usage statistics:** turn the daily report on or off +- **Include platform info, Include feature usage and Include installed features:** choose what the report includes + +### User + +- **Include my feature usage:** count which kinds of tabs you open in the report + +## Permissions + +- `telemetry.manage`: see what is sent, send it now and reset the instance ID. Only admins have it by default. diff --git a/plugins/telemetry/README.md b/plugins/telemetry/README.md index effefb226..40cb7110b 100644 --- a/plugins/telemetry/README.md +++ b/plugins/telemetry/README.md @@ -1,29 +1,37 @@ -# Usage Statistics +
-Sends a small anonymous report once a day so the Termix developers can see how many instances run and which features get used. +Termix Logo -## What is sent +

Usage Statistics

-Always, while it is on: +

A small anonymous report that helps improve Termix

-- A random instance ID, the Termix version, and how many users and hosts exist. +
-Each of these has its own switch in Admin Settings > Usage Statistics: +
-- Platform info: operating system, CPU architecture, Node.js version, database type, and whether Termix runs in Docker, the desktop app or as a plain server. -- Feature usage: how many times each kind of tab was opened, plus SSH logins and host connections, since the last report. -- Installed features: the ids of the running built-in features. +## Overview -It never sends usernames, hostnames, IP addresses, credentials or anything else that identifies you or your servers. Admins can preview the exact report before it is sent. +Usage Statistics sends a small anonymous report once a day so the Termix developers can see how many instances are running and which features get used. -## Turning it off +
-- Admin Settings > Usage Statistics > Share anonymous usage statistics. -- Each user can leave their own feature usage out in User Profile > Usage Statistics. -- `ENABLE_TELEMETRY=false` turns it off and locks the switch. `ENABLE_TELEMETRY=true` locks it on. +## Features -## Environment +- Never sends usernames, hostnames, IP addresses or credentials +- Choose what the report includes, or turn it off +- Preview the exact report before it is sent -- `ENABLE_TELEMETRY`: `true` or `false` overrides the admin switch. -- `POSTHOG_API_KEY`: the PostHog project key. Defaults to the Termix project. -- `POSTHOG_HOST`: the PostHog host. Defaults to `https://us.i.posthog.com`. +
+ +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/telemetry/manifest.json b/plugins/telemetry/manifest.json index c20ec8236..a3c4d6fb6 100644 --- a/plugins/telemetry/manifest.json +++ b/plugins/telemetry/manifest.json @@ -2,16 +2,16 @@ "id": "telemetry", "name": "Usage Statistics", "version": "1.0.0", - "description": "Sends an anonymous daily summary of how Termix is used, to help decide what to work on next.", + "description": "Sends a small anonymous report once a day so the Termix developers can see how many instances run and which features get used.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Monitoring", "icon": "ChartNoAxesColumn", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/telemetry/package.json b/plugins/telemetry/package.json index a228cdb63..1342cd290 100644 --- a/plugins/telemetry/package.json +++ b/plugins/telemetry/package.json @@ -7,19 +7,27 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "drizzle-orm": "^0.45.2" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -27,5 +35,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/termix-identity/.commitlintrc.json b/plugins/termix-identity/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/termix-identity/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/termix-identity/.github/funding.yml b/plugins/termix-identity/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/termix-identity/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/termix-identity/.github/pull_request_template.md b/plugins/termix-identity/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/termix-identity/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/termix-identity/.gitignore b/plugins/termix-identity/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/termix-identity/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/termix-identity/.husky/commit-msg b/plugins/termix-identity/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/termix-identity/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/termix-identity/.husky/pre-commit b/plugins/termix-identity/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/termix-identity/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/termix-identity/.prettierignore b/plugins/termix-identity/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/termix-identity/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/termix-identity/.prettierrc b/plugins/termix-identity/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/termix-identity/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/termix-identity/CHANGELOG.json b/plugins/termix-identity/CHANGELOG.json new file mode 100644 index 000000000..53b5800ab --- /dev/null +++ b/plugins/termix-identity/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Publish your public keys under a handle" + }, + { + "type": "added", + "text": "Add your keys to any server with one command" + }, + { + "type": "added", + "text": "Generate new keys or import saved ones" + }, + { + "type": "added", + "text": "Your own SSH certificate authority" + } + ] + } + ] +} diff --git a/plugins/termix-identity/CHANGELOG.md b/plugins/termix-identity/CHANGELOG.md deleted file mode 100644 index ef7f79dcc..000000000 --- a/plugins/termix-identity/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Publish your SSH public keys under a public handle that servers can fetch into authorized_keys. Each handle can also run its own SSH certificate authority. diff --git a/plugins/termix-identity/CONTRIBUTING.md b/plugins/termix-identity/CONTRIBUTING.md new file mode 100644 index 000000000..69e592f7f --- /dev/null +++ b/plugins/termix-identity/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing to Termix Identity + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Permissions + +- `termix-identity.use`: claim a handle, publish keys and run a CA. Admins and users have it by default. diff --git a/plugins/termix-identity/README.md b/plugins/termix-identity/README.md index 7e1dbf799..6db6bf1bd 100644 --- a/plugins/termix-identity/README.md +++ b/plugins/termix-identity/README.md @@ -1,35 +1,38 @@ -# Termix Identity +
-Publish your SSH public keys under a public handle and run your own SSH certificate authority. +Termix Logo + +

Termix Identity

+ +

Publish your SSH keys and run your own SSH certificate authority

+ +
+ +
+ +## Overview + +Termix Identity is a built-in take on sshid.io. Claim a handle, publish your SSH public keys at a public URL, and issue SSH certificates from your own certificate authority. + +
## Features -- Claim a public handle and publish your SSH public keys under it. -- Run your own SSH certificate authority for each handle. -- Issue short-lived certificates for your Ed25519 keys. +- Publish your public keys under a handle +- Add your keys to any server with one command +- Generate new keys or import saved ones +- Your own SSH certificate authority -## Setup +
-Any server can pull your keys into `authorized_keys`: +## Support -```bash -curl -fsSL https:///plugin-api/termix-identity/u/ >> ~/.ssh/authorized_keys -``` +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -Add `/`, for example `/ED25519`, to get only one key type. This URL needs no login and is never cached. +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -To use the certificate authority, point `TrustedUserCAKeys` on your servers at the public key from `/u//ca`. Rotating the CA revokes every certificate it issued. Certificates are downloaded once and not stored, so Termix hosts do not use them to connect. +
-The 2.8 URLs under `/termix-id/u/` redirect here, so existing scripts keep working. Use `curl -L` to follow the redirect. +## License -## Permissions - -- `termix-identity.use`: Claim a handle, publish keys and run a CA. Admins and users have it by default. - -## Development - -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/termix-identity/manifest.json b/plugins/termix-identity/manifest.json index ae39d0e64..353a29e0f 100644 --- a/plugins/termix-identity/manifest.json +++ b/plugins/termix-identity/manifest.json @@ -6,12 +6,12 @@ "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "Fingerprint", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/termix-identity/package.json b/plugins/termix-identity/package.json index 525715d19..f3795bc0a 100644 --- a/plugins/termix-identity/package.json +++ b/plugins/termix-identity/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/tmux-monitor/.commitlintrc.json b/plugins/tmux-monitor/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/tmux-monitor/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/tmux-monitor/.github/funding.yml b/plugins/tmux-monitor/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/tmux-monitor/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/tmux-monitor/.github/pull_request_template.md b/plugins/tmux-monitor/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/tmux-monitor/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/tmux-monitor/.gitignore b/plugins/tmux-monitor/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/tmux-monitor/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/tmux-monitor/.husky/commit-msg b/plugins/tmux-monitor/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/tmux-monitor/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/tmux-monitor/.husky/pre-commit b/plugins/tmux-monitor/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/tmux-monitor/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/tmux-monitor/.prettierignore b/plugins/tmux-monitor/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/tmux-monitor/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/tmux-monitor/.prettierrc b/plugins/tmux-monitor/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/tmux-monitor/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/tmux-monitor/CHANGELOG.json b/plugins/tmux-monitor/CHANGELOG.json new file mode 100644 index 000000000..abe154905 --- /dev/null +++ b/plugins/tmux-monitor/CHANGELOG.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Every host's tmux sessions in one place" + }, + { + "type": "added", + "text": "Live pane previews" + }, + { + "type": "added", + "text": "Resource use for each session" + }, + { + "type": "added", + "text": "Search across every pane" + }, + { + "type": "added", + "text": "Create, rename, split and kill sessions, windows and panes" + }, + { + "type": "added", + "text": "Attach a terminal in one click" + } + ] + } + ] +} diff --git a/plugins/tmux-monitor/CHANGELOG.md b/plugins/tmux-monitor/CHANGELOG.md deleted file mode 100644 index 2b8c9ae63..000000000 --- a/plugins/tmux-monitor/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Browse and control tmux sessions, windows and panes across your hosts. Create, rename and close them, tag sessions and attach a terminal to any pane. diff --git a/plugins/tmux-monitor/CONTRIBUTING.md b/plugins/tmux-monitor/CONTRIBUTING.md new file mode 100644 index 000000000..0fcfd5f7a --- /dev/null +++ b/plugins/tmux-monitor/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Tmux Monitor + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Enable Tmux Monitor:** show this host in the monitor and add its tmux actions to the sidebar +- **Enable tmux mouse support:** turn on mouse support when attaching or creating a session + +## Permissions + +- `tmux-monitor.use`: browse and control tmux sessions on hosts with the monitor on. Admins and users have it by default. diff --git a/plugins/tmux-monitor/README.md b/plugins/tmux-monitor/README.md index bb4b5bb1b..31128dbc6 100644 --- a/plugins/tmux-monitor/README.md +++ b/plugins/tmux-monitor/README.md @@ -1,58 +1,48 @@ -# Tmux Monitor +
-Browse and control tmux sessions, windows and panes across your hosts. +Termix Logo + +

Tmux Monitor

+ +

Browse and control tmux sessions across your hosts

+ +
+ +
+ +## Overview + +Tmux Monitor shows the tmux sessions, windows and panes on your hosts and lets you manage them without attaching first. + +
## Features -- See the tmux sessions, windows and panes on every host with the monitor on. -- CPU, memory and GPU use for each pane, and search across pane history. -- Create, rename and close sessions and windows, and split and close panes. -- Attach a terminal to any pane. -- Tag sessions with your own labels. +- Every host's tmux sessions in one place +- Live pane previews +- Resource use for each session +- Search across every pane +- Create, rename, split and kill sessions, windows and panes +- Attach a terminal in one click -## Unified monitor - -Open Tmux Monitor from a host action or the command palette. **All hosts** -shows an expandable tree for each SSH host with the monitor enabled. Filter -by host name or address, or choose **Single host** to use one host at a time. -Click a session name or pane to switch the live preview. The tree actions -continue to target the host containing that session, even when two hosts -have identical session names or pane IDs. The toolbar and output search -operate on the selected host. - -The monitor remembers its mode, filter, collapsed hosts, expanded sessions, -last host and selected pane locally. An explicit host action takes precedence -over the saved host and clears the filter. A saved pane is restored only if -it still exists in the host's latest overview. - -Expanded background hosts poll overview and resource metrics independently, -with at most four background hosts loading at once. Collapsing or filtering -out a background host stops its polling; switching away from the monitor -stops all overview/metrics polling. The selected host keeps polling while -its preview is active, including when its tree is collapsed. These controls -use the existing SSH APIs and require only tmux on the remote hosts, not -Auto Tmux. - -## Settings - -### Host - -- Enable Tmux Monitor: show this host in the monitor. - -## Permissions - -- `tmux-monitor.use`: Use Tmux Monitor. Admins and users have it by default. +
## Services Provides to other plugins: -- `tmux.sessions`: find, attach to and create tmux sessions. The terminal uses this to attach to tmux on connect. +- `tmux.sessions`: find, attach to and create tmux sessions -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/tmux-monitor/manifest.json b/plugins/tmux-monitor/manifest.json index 210f51fcf..f21bcd6f9 100644 --- a/plugins/tmux-monitor/manifest.json +++ b/plugins/tmux-monitor/manifest.json @@ -6,12 +6,12 @@ "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Terminal", "icon": "Layers", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/tmux-monitor/package.json b/plugins/tmux-monitor/package.json index a64c022b8..967b93249 100644 --- a/plugins/tmux-monitor/package.json +++ b/plugins/tmux-monitor/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -29,5 +37,10 @@ "express": "^5.2.1", "react": "^19.2.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/totp/.commitlintrc.json b/plugins/totp/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/totp/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/totp/.github/funding.yml b/plugins/totp/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/totp/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/totp/.github/pull_request_template.md b/plugins/totp/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/totp/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/totp/.gitignore b/plugins/totp/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/totp/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/totp/.husky/commit-msg b/plugins/totp/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/totp/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/totp/.husky/pre-commit b/plugins/totp/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/totp/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/totp/.prettierignore b/plugins/totp/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/totp/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/totp/.prettierrc b/plugins/totp/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/totp/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/totp/CHANGELOG.json b/plugins/totp/CHANGELOG.json new file mode 100644 index 000000000..a32694a35 --- /dev/null +++ b/plugins/totp/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Works with any authenticator app" + }, + { + "type": "added", + "text": "Backup codes in case you lose your phone" + }, + { + "type": "added", + "text": "More than one device" + } + ] + } + ] +} diff --git a/plugins/totp/CHANGELOG.md b/plugins/totp/CHANGELOG.md deleted file mode 100644 index 9715975fa..000000000 --- a/plugins/totp/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Asks for a code from an authenticator app after signing in. Comes with backup codes in case you lose your phone. diff --git a/plugins/totp/CONTRIBUTING.md b/plugins/totp/CONTRIBUTING.md new file mode 100644 index 000000000..3f16a272a --- /dev/null +++ b/plugins/totp/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to TOTP + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` diff --git a/plugins/totp/README.md b/plugins/totp/README.md index 1d7e68c09..a8b48b567 100644 --- a/plugins/totp/README.md +++ b/plugins/totp/README.md @@ -1,17 +1,37 @@ -# TOTP +
-Ask for a code from an authenticator app after signing in, with backup codes in case you lose your phone. +Termix Logo + +

TOTP

+ +

Two-factor sign in with an authenticator app

+ +
+ +
+ +## Overview + +TOTP asks for a code from an authenticator app after you sign in. + +
## Features -- Ask for a code from an authenticator app after signing in. -- Backup codes you can download and use if you lose your phone. -- Add more than one device. +- Works with any authenticator app +- Backup codes in case you lose your phone +- More than one device -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/totp/manifest.json b/plugins/totp/manifest.json index 8487c1c62..2b5f50350 100644 --- a/plugins/totp/manifest.json +++ b/plugins/totp/manifest.json @@ -2,16 +2,16 @@ "id": "totp", "name": "TOTP", "version": "1.0.0", - "description": "Ask for a code from an authenticator app after signing in, with backup codes in case you lose your phone.", + "description": "Two-factor sign in with a code from an authenticator app, with backup codes.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "ShieldCheck", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/totp/package.json b/plugins/totp/package.json index 5616bfde9..3521506a5 100644 --- a/plugins/totp/package.json +++ b/plugins/totp/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0", @@ -15,6 +18,8 @@ "speakeasy": "^2.0.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -22,7 +27,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/tunnels/.commitlintrc.json b/plugins/tunnels/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/tunnels/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/tunnels/.github/funding.yml b/plugins/tunnels/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/tunnels/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/tunnels/.github/pull_request_template.md b/plugins/tunnels/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/tunnels/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/tunnels/.gitignore b/plugins/tunnels/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/tunnels/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/tunnels/.husky/commit-msg b/plugins/tunnels/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/tunnels/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/tunnels/.husky/pre-commit b/plugins/tunnels/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/tunnels/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/tunnels/.prettierignore b/plugins/tunnels/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/tunnels/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/tunnels/.prettierrc b/plugins/tunnels/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/tunnels/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/tunnels/CHANGELOG.json b/plugins/tunnels/CHANGELOG.json new file mode 100644 index 000000000..4328e8845 --- /dev/null +++ b/plugins/tunnels/CHANGELOG.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Local, remote and dynamic SOCKS5 forwarding" + }, + { + "type": "added", + "text": "Reconnects on its own when a tunnel drops" + }, + { + "type": "added", + "text": "Start tunnels on boot" + }, + { + "type": "added", + "text": "Route a tunnel through a second host" + }, + { + "type": "added", + "text": "Client tunnels on your own computer from the desktop app, with presets you can save to the server" + } + ] + } + ] +} diff --git a/plugins/tunnels/CHANGELOG.md b/plugins/tunnels/CHANGELOG.md deleted file mode 100644 index 89ca44180..000000000 --- a/plugins/tunnels/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds SSH port forwarding between servers, with local, remote and SOCKS5 tunnels that can start on boot. The desktop app can also open local tunnels. diff --git a/plugins/tunnels/CONTRIBUTING.md b/plugins/tunnels/CONTRIBUTING.md new file mode 100644 index 000000000..36deb2ca2 --- /dev/null +++ b/plugins/tunnels/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Tunnels + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Enable tunnels:** set up SSH tunnels through this host +- **Tunnels:** the type, ports, endpoint host, auto start, max retries and retry interval for each tunnel + +## Permissions + +- `tunnels.use`: start, stop and watch tunnels, and save client tunnel presets. Admins and users have it by default. diff --git a/plugins/tunnels/README.md b/plugins/tunnels/README.md index 92369548f..4e7472814 100644 --- a/plugins/tunnels/README.md +++ b/plugins/tunnels/README.md @@ -1,35 +1,47 @@ -# Tunnels +
-SSH port forwarding between servers, plus local tunnels from the desktop app. +Termix Logo + +

Tunnels

+ +

SSH port forwarding that stays connected

+ +
+ +
+ +## Overview + +Tunnels forwards ports through your servers so you can reach services that are not exposed. + +
## Features -- Local, remote and dynamic (SOCKS5) SSH tunnels saved on a host. -- Start tunnels from the Tunnels tab or the host editor, or on boot. -- Route a tunnel through a second host. -- Local tunnels from the desktop app, with saved presets. -- Adds a tunnels widget to the homepage. +- Local, remote and dynamic SOCKS5 forwarding +- Reconnects on its own when a tunnel drops +- Start tunnels on boot +- Route a tunnel through a second host +- Client tunnels on your own computer from the desktop app, with presets you can save to the server -## Settings - -### Host - -- Enable tunnels and the list of saved tunnels for this host. - -## Permissions - -- `tunnels.use`: Use tunnels. Admins and users have it by default. +
## Services Provides to other plugins: -- `tunnels.access`: open a tunnel on demand, or start, stop and check saved tunnels. +- `tunnels.access`: open a tunnel on demand, or start, stop and check saved tunnels -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/tunnels/manifest.json b/plugins/tunnels/manifest.json index ee319b25a..81d8ea1ce 100644 --- a/plugins/tunnels/manifest.json +++ b/plugins/tunnels/manifest.json @@ -2,16 +2,16 @@ "id": "tunnels", "name": "Tunnels", "version": "1.0.0", - "description": "SSH port forwarding between servers, plus local tunnels from the desktop app.", + "description": "SSH port forwarding that reconnects on its own, plus client tunnels from the desktop app.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Networking", "icon": "ArrowLeftRight", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/tunnels/package.json b/plugins/tunnels/package.json index 1be544b2b..55b8f1a14 100644 --- a/plugins/tunnels/package.json +++ b/plugins/tunnels/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "sonner": "^2.0.8", "ssh2": "^1.17.0", "ws": "^8.21.3" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/vault/.commitlintrc.json b/plugins/vault/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/vault/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/vault/.github/funding.yml b/plugins/vault/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/vault/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/vault/.github/pull_request_template.md b/plugins/vault/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/vault/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/vault/.gitignore b/plugins/vault/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/vault/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/vault/.husky/commit-msg b/plugins/vault/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/vault/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/vault/.husky/pre-commit b/plugins/vault/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/vault/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/vault/.prettierignore b/plugins/vault/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/vault/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/vault/.prettierrc b/plugins/vault/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/vault/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/vault/CHANGELOG.json b/plugins/vault/CHANGELOG.json new file mode 100644 index 000000000..8430a5713 --- /dev/null +++ b/plugins/vault/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Adds the Vault auth type to hosts" + }, + { + "type": "added", + "text": "Sign in to Vault with OIDC when you connect" + }, + { + "type": "added", + "text": "Never stores a Vault token or long-lived key" + }, + { + "type": "added", + "text": "Reusable signer profiles you can share with everyone" + } + ] + } + ] +} diff --git a/plugins/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md deleted file mode 100644 index 7602aa48b..000000000 --- a/plugins/vault/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Adds the Vault login type. Termix signs you in to Vault with OIDC in the browser and gets a short-lived SSH certificate from Vault's SSH secrets engine. diff --git a/plugins/vault/CONTRIBUTING.md b/plugins/vault/CONTRIBUTING.md new file mode 100644 index 000000000..8129774aa --- /dev/null +++ b/plugins/vault/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to HashiCorp Vault + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Admin + +- **Redirect URI:** add `/plugin-api/vault/oidc/callback` to `allowed_redirect_uris` in each Vault OIDC role +- **Use the old redirect URI:** keep sending the 2.8 URI `/vault/oidc/callback`. Upgraded installs keep this on until you turn it off + +### Host + +- **Vault signer profile:** the profile this host uses + +## Permissions + +- `vault.use`: create signer profiles and connect to hosts that use Vault. Admins and users have it by default. +- `vault.share`: share a profile so every user can pick it. Only admins have it by default. diff --git a/plugins/vault/README.md b/plugins/vault/README.md index 753e7820b..484443a2e 100644 --- a/plugins/vault/README.md +++ b/plugins/vault/README.md @@ -1,38 +1,38 @@ -# HashiCorp Vault +
-Connect to hosts with short-lived SSH certificates from HashiCorp Vault, after signing in to Vault with OIDC. +Termix Logo + +

HashiCorp Vault

+ +

Short-lived SSH certificates signed by HashiCorp Vault

+ +
+ +
+ +## Overview + +HashiCorp Vault lets you connect to hosts with SSH certificates signed by Vault, after signing in to Vault with OIDC. + +
## Features -- Adds the Vault login type to the host editor. -- Signs you in to Vault with OIDC in the browser. -- Has Vault's SSH secrets engine sign a fresh key and keeps the certificate until it expires. -- Never stores a Vault token, AppRole secret or long-lived key. +- Adds the Vault auth type to hosts +- Sign in to Vault with OIDC when you connect +- Never stores a Vault token or long-lived key +- Reusable signer profiles you can share with everyone -## Setup +
-A profile holds the Vault address and namespace, the OIDC mount and role, the SSH secrets mount and signer role, the valid principals and the key type. Pick Vault as the login type in the host editor, then choose or create a profile there. Profiles sync between the desktop app and a server. +## Support -## Settings +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -### Admin +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -- Redirect URI: add `/plugin-api/vault/oidc/callback` to `allowed_redirect_uris` in each Vault OIDC role. -- Use the old redirect URI: keep sending the 2.8 URI `/vault/oidc/callback`. Upgraded installs keep this on until you turn it off. +
-### Host +## License -- Vault signer profile: the profile this host uses. - -## Permissions - -- `vault.use`: Sign in to hosts with Vault. Admins and users have it by default. -- `vault.share`: Share Vault profiles with everyone. Only admins have it by default. - -## Development - -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/vault/manifest.json b/plugins/vault/manifest.json index 6f49163f8..e9b062719 100644 --- a/plugins/vault/manifest.json +++ b/plugins/vault/manifest.json @@ -2,16 +2,16 @@ "id": "vault", "name": "HashiCorp Vault", "version": "1.0.0", - "description": "Connect to hosts with short-lived SSH certificates from HashiCorp Vault, after signing in to Vault with OIDC.", + "description": "Connect to hosts with short-lived SSH certificates signed by HashiCorp Vault.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "KeyRound", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/vault/package.json b/plugins/vault/package.json index dba545cb5..8b5945ac0 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "react": "^19.2.8", "sonner": "^2.0.8", "ssh2": "^1.17.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/wake-on-lan/.commitlintrc.json b/plugins/wake-on-lan/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/wake-on-lan/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/wake-on-lan/.github/funding.yml b/plugins/wake-on-lan/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/wake-on-lan/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/wake-on-lan/.github/pull_request_template.md b/plugins/wake-on-lan/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/wake-on-lan/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/wake-on-lan/.gitignore b/plugins/wake-on-lan/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/wake-on-lan/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/wake-on-lan/.husky/commit-msg b/plugins/wake-on-lan/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/wake-on-lan/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/wake-on-lan/.husky/pre-commit b/plugins/wake-on-lan/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/wake-on-lan/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/wake-on-lan/.prettierignore b/plugins/wake-on-lan/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/wake-on-lan/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/wake-on-lan/.prettierrc b/plugins/wake-on-lan/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/wake-on-lan/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/wake-on-lan/CHANGELOG.json b/plugins/wake-on-lan/CHANGELOG.json new file mode 100644 index 000000000..4c553a5a7 --- /dev/null +++ b/plugins/wake-on-lan/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Wake a host in one click" + }, + { + "type": "added", + "text": "Wake a host before a remote desktop connection" + }, + { + "type": "added", + "text": "Wake a host from an automation" + } + ] + } + ] +} diff --git a/plugins/wake-on-lan/CHANGELOG.md b/plugins/wake-on-lan/CHANGELOG.md deleted file mode 100644 index 0ff114a90..000000000 --- a/plugins/wake-on-lan/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Wakes a sleeping host by sending a Wake-on-LAN packet to its MAC address. diff --git a/plugins/wake-on-lan/CONTRIBUTING.md b/plugins/wake-on-lan/CONTRIBUTING.md new file mode 100644 index 000000000..bde88c97a --- /dev/null +++ b/plugins/wake-on-lan/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to Wake-on-LAN + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **MAC address:** the network card to wake +- **Broadcast address:** where to send the packet. Leave it blank for 255.255.255.255 + +## Permissions + +- `wake-on-lan.send`: send Wake-on-LAN packets. Admins and users have it by default. diff --git a/plugins/wake-on-lan/README.md b/plugins/wake-on-lan/README.md index dcf43af66..6951ea521 100644 --- a/plugins/wake-on-lan/README.md +++ b/plugins/wake-on-lan/README.md @@ -1,33 +1,45 @@ -# Wake-on-LAN +
-Wake a sleeping host by sending a Wake-on-LAN packet to its MAC address. +Termix Logo + +

Wake-on-LAN

+ +

Wake up sleeping machines from Termix

+ +
+ +
+ +## Overview + +Wake-on-LAN sends a magic packet to wake a host up. + +
## Features -- Wake a sleeping host by sending a Wake-on-LAN packet to its MAC address. -- Automations can wake a host as one of their steps. +- Wake a host in one click +- Wake a host before a remote desktop connection +- Wake a host from an automation -## Settings - -### Host - -- MAC address: the network card to wake. -- Broadcast address: where to send the packet. - -## Permissions - -- `wake-on-lan.send`: Send Wake-on-LAN packets. Admins and users have it by default. +
## Services Provides to other plugins: -- `wake-on-lan.send`: wake a host. +- `wake-on-lan.send`: wake a host -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/wake-on-lan/manifest.json b/plugins/wake-on-lan/manifest.json index 1a0889689..361cd50ba 100644 --- a/plugins/wake-on-lan/manifest.json +++ b/plugins/wake-on-lan/manifest.json @@ -2,16 +2,16 @@ "id": "wake-on-lan", "name": "Wake-on-LAN", "version": "1.0.0", - "description": "Wake a sleeping host by sending a Wake-on-LAN packet to its MAC address.", + "description": "Wake sleeping machines by sending a Wake-on-LAN packet to their MAC address.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Networking", "icon": "Zap", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/wake-on-lan/package.json b/plugins/wake-on-lan/package.json index 565ddb111..84bbb3e5c 100644 --- a/plugins/wake-on-lan/package.json +++ b/plugins/wake-on-lan/package.json @@ -7,22 +7,35 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { "@termix/plugin-sdk": "^1.0.0", "express": "^5.2.1", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/warpgate/.commitlintrc.json b/plugins/warpgate/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/warpgate/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/warpgate/.github/funding.yml b/plugins/warpgate/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/warpgate/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/warpgate/.github/pull_request_template.md b/plugins/warpgate/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/warpgate/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/warpgate/.gitignore b/plugins/warpgate/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/warpgate/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/warpgate/.husky/commit-msg b/plugins/warpgate/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/warpgate/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/warpgate/.husky/pre-commit b/plugins/warpgate/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/warpgate/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/warpgate/.prettierignore b/plugins/warpgate/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/warpgate/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/warpgate/.prettierrc b/plugins/warpgate/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/warpgate/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/warpgate/CHANGELOG.json b/plugins/warpgate/CHANGELOG.json new file mode 100644 index 000000000..834e507bd --- /dev/null +++ b/plugins/warpgate/CHANGELOG.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Warpgate's browser approval shows as a sign in dialog" + }, + { + "type": "added", + "text": "Your saved password is sent to Warpgate for you" + } + ] + } + ] +} diff --git a/plugins/warpgate/CHANGELOG.md b/plugins/warpgate/CHANGELOG.md deleted file mode 100644 index 75468638b..000000000 --- a/plugins/warpgate/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Lets you connect through a Warpgate SSH bastion. Its browser approval shows as a sign-in dialog, and your saved password is sent for you. diff --git a/plugins/warpgate/CONTRIBUTING.md b/plugins/warpgate/CONTRIBUTING.md new file mode 100644 index 000000000..b3528ce45 --- /dev/null +++ b/plugins/warpgate/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to Warpgate + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Warpgate Gateway:** this host connects through Warpgate diff --git a/plugins/warpgate/README.md b/plugins/warpgate/README.md index b50904d78..c9b65d963 100644 --- a/plugins/warpgate/README.md +++ b/plugins/warpgate/README.md @@ -1,23 +1,36 @@ -# Warpgate +
-Connect through a Warpgate SSH bastion. Its browser approval shows as a sign-in dialog and your saved password is sent for you. +Termix Logo + +

Warpgate

+ +

Connect through a Warpgate SSH bastion

+ +
+ +
+ +## Overview + +Warpgate lets you connect to hosts through a [Warpgate](https://github.com/warp-tech/warpgate) SSH bastion. + +
## Features -- Connect through a [Warpgate](https://github.com/warp-tech/warpgate) SSH bastion. -- Warpgate's browser approval shows as a sign-in dialog. -- Your saved password is sent to Warpgate for you. +- Warpgate's browser approval shows as a sign in dialog +- Your saved password is sent to Warpgate for you -## Settings +
-### Host +## Support -- Warpgate Gateway: this host connects through Warpgate. +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. -## Development +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. -```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/warpgate/manifest.json b/plugins/warpgate/manifest.json index c2b570c7e..2d9d78bd7 100644 --- a/plugins/warpgate/manifest.json +++ b/plugins/warpgate/manifest.json @@ -2,16 +2,16 @@ "id": "warpgate", "name": "Warpgate", "version": "1.0.0", - "description": "Connect through a Warpgate SSH bastion. Its browser approval shows as a sign-in dialog and your saved password is sent for you.", + "description": "Connect through a Warpgate SSH bastion, with its browser approval shown as a sign in dialog.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "DoorOpen", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": ["auth:provide"], diff --git a/plugins/warpgate/package.json b/plugins/warpgate/package.json index 593a4892b..e51fc5dd6 100644 --- a/plugins/warpgate/package.json +++ b/plugins/warpgate/package.json @@ -7,16 +7,29 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { "@termix/plugin-sdk": "^1.0.0" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/web-endpoint/.commitlintrc.json b/plugins/web-endpoint/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/web-endpoint/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/web-endpoint/.github/funding.yml b/plugins/web-endpoint/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/web-endpoint/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/web-endpoint/.github/pull_request_template.md b/plugins/web-endpoint/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/web-endpoint/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/web-endpoint/.gitignore b/plugins/web-endpoint/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/web-endpoint/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/web-endpoint/.husky/commit-msg b/plugins/web-endpoint/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/web-endpoint/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/web-endpoint/.husky/pre-commit b/plugins/web-endpoint/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/web-endpoint/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/web-endpoint/.prettierignore b/plugins/web-endpoint/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/web-endpoint/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/web-endpoint/.prettierrc b/plugins/web-endpoint/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/web-endpoint/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/web-endpoint/CHANGELOG.json b/plugins/web-endpoint/CHANGELOG.json new file mode 100644 index 000000000..b8d2c3989 --- /dev/null +++ b/plugins/web-endpoint/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Open a web UI in a Termix tab or its own desktop window" + }, + { + "type": "added", + "text": "Connect directly, or over an SSH tunnel through the host" + }, + { + "type": "added", + "text": "Embedded pages never see your Termix login" + } + ] + } + ] +} diff --git a/plugins/web-endpoint/CHANGELOG.md b/plugins/web-endpoint/CHANGELOG.md deleted file mode 100644 index 30b7265a2..000000000 --- a/plugins/web-endpoint/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Opens a host's web UI in a tab or a separate desktop window, either directly or over an SSH tunnel. diff --git a/plugins/web-endpoint/CONTRIBUTING.md b/plugins/web-endpoint/CONTRIBUTING.md new file mode 100644 index 000000000..2c4cdc13c --- /dev/null +++ b/plugins/web-endpoint/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing to Web Endpoint + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Settings + +### Host + +- **Enable web endpoints:** open this host's web interfaces from the sidebar +- **Endpoints:** up to 16 endpoints for this host diff --git a/plugins/web-endpoint/README.md b/plugins/web-endpoint/README.md index 6552da6ea..13873ac72 100644 --- a/plugins/web-endpoint/README.md +++ b/plugins/web-endpoint/README.md @@ -1,38 +1,45 @@ -# Web Endpoint +
-Open a host's web UI in a tab or a separate desktop window, directly or over an SSH tunnel. +Termix Logo + +

Web Endpoint

+ +

Open a host's web UI inside Termix

+ +
+ +
+ +## Overview + +Web Endpoint opens a host's own web interface, like a router admin page, inside Termix instead of a separate browser tab. + +
## Features -- Open a host's web UI in a tab or a separate desktop window. -- Connect directly, or over an SSH tunnel when the web UI is only reachable from the host. -- Up to 16 endpoints per host. +- Open a web UI in a Termix tab or its own desktop window +- Connect directly, or over an SSH tunnel through the host +- Embedded pages never see your Termix login -## Setup - -Each endpoint is one of two kinds: - -- Direct: your browser loads `scheme://host:port/path` itself. -- Tunnel: Termix opens an SSH tunnel to the port and loads it from there. Unused tunnels close after ten minutes. - -Tunnel endpoints need the Tunnels plugin. - -## Settings - -### Host - -- Enable web endpoints and the list of endpoints for this host. +
## Services Uses from other plugins: -- `tunnels.access` to open tunnels. Required. +- `tunnels.access` to open tunnels. Required -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/web-endpoint/manifest.json b/plugins/web-endpoint/manifest.json index 18c2c058a..72821ee03 100644 --- a/plugins/web-endpoint/manifest.json +++ b/plugins/web-endpoint/manifest.json @@ -2,16 +2,16 @@ "id": "web-endpoint", "name": "Web Endpoint", "version": "1.0.0", - "description": "Open a host's web UI in a tab or a separate desktop window, directly or over an SSH tunnel.", + "description": "Open a host's web UI inside Termix, directly or over an SSH tunnel.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Networking", "icon": "Globe", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/web-endpoint/package.json b/plugins/web-endpoint/package.json index 075c91f32..40cd7f5c0 100644 --- a/plugins/web-endpoint/package.json +++ b/plugins/web-endpoint/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -20,7 +25,10 @@ "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -30,5 +38,10 @@ "i18next": "^26.4.2", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/webauthn/.commitlintrc.json b/plugins/webauthn/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/webauthn/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/webauthn/.github/funding.yml b/plugins/webauthn/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/webauthn/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/webauthn/.github/pull_request_template.md b/plugins/webauthn/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/webauthn/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/webauthn/.gitignore b/plugins/webauthn/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/webauthn/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/webauthn/.husky/commit-msg b/plugins/webauthn/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/webauthn/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/webauthn/.husky/pre-commit b/plugins/webauthn/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/webauthn/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/webauthn/.prettierignore b/plugins/webauthn/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/webauthn/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/webauthn/.prettierrc b/plugins/webauthn/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/webauthn/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/webauthn/CHANGELOG.json b/plugins/webauthn/CHANGELOG.json new file mode 100644 index 000000000..f8289767d --- /dev/null +++ b/plugins/webauthn/CHANGELOG.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Passkeys and security keys" + }, + { + "type": "added", + "text": "Counts as a second factor when it checks your PIN or fingerprint" + }, + { + "type": "added", + "text": "More than one passkey, including synced ones" + } + ] + } + ] +} diff --git a/plugins/webauthn/CHANGELOG.md b/plugins/webauthn/CHANGELOG.md deleted file mode 100644 index 785187ffc..000000000 --- a/plugins/webauthn/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Lets users sign in with a passkey or security key instead of a password. A passkey that checks your PIN or fingerprint also counts as a second factor. diff --git a/plugins/webauthn/CONTRIBUTING.md b/plugins/webauthn/CONTRIBUTING.md new file mode 100644 index 000000000..079dd4cc7 --- /dev/null +++ b/plugins/webauthn/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to Passkeys + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` diff --git a/plugins/webauthn/README.md b/plugins/webauthn/README.md index 4625d344a..409026bdd 100644 --- a/plugins/webauthn/README.md +++ b/plugins/webauthn/README.md @@ -1,17 +1,37 @@ -# Passkeys +
-Sign in with a passkey or security key instead of a password. A passkey that checks your PIN or fingerprint also counts as a second factor. +Termix Logo + +

Passkeys

+ +

Sign in with a passkey instead of a password

+ +
+ +
+ +## Overview + +Passkeys lets you sign in with a passkey or security key instead of a password. + +
## Features -- Sign in with a passkey or security key instead of a password. -- A passkey that checks your PIN or fingerprint also counts as a second factor. -- Add more than one passkey, including synced ones. +- Passkeys and security keys +- Counts as a second factor when it checks your PIN or fingerprint +- More than one passkey, including synced ones -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/webauthn/manifest.json b/plugins/webauthn/manifest.json index 50c8ce46e..88aaa51db 100644 --- a/plugins/webauthn/manifest.json +++ b/plugins/webauthn/manifest.json @@ -2,16 +2,16 @@ "id": "webauthn", "name": "Passkeys", "version": "1.0.0", - "description": "Sign in with a passkey or security key instead of a password. A passkey that checks your PIN or fingerprint also counts as a second factor.", + "description": "Sign in with a passkey or security key instead of a password.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Access & Security", "icon": "Fingerprint", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": [ diff --git a/plugins/webauthn/package.json b/plugins/webauthn/package.json index b00f937d0..7444de796 100644 --- a/plugins/webauthn/package.json +++ b/plugins/webauthn/package.json @@ -7,7 +7,10 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "@simplewebauthn/browser": "^13.3.0", @@ -15,6 +18,8 @@ "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -22,7 +27,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -31,5 +39,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/plugins/workspaces/.commitlintrc.json b/plugins/workspaces/.commitlintrc.json new file mode 100644 index 000000000..cba65ea51 --- /dev/null +++ b/plugins/workspaces/.commitlintrc.json @@ -0,0 +1,21 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "chore", + "revert" + ] + ], + "subject-case": [0] + } +} diff --git a/plugins/workspaces/.github/funding.yml b/plugins/workspaces/.github/funding.yml new file mode 100644 index 000000000..c14d56027 --- /dev/null +++ b/plugins/workspaces/.github/funding.yml @@ -0,0 +1 @@ +custom: https://donate.termix.site/ diff --git a/plugins/workspaces/.github/pull_request_template.md b/plugins/workspaces/.github/pull_request_template.md new file mode 100644 index 000000000..9482e0908 --- /dev/null +++ b/plugins/workspaces/.github/pull_request_template.md @@ -0,0 +1,34 @@ +# Overview + +_Short summary of what this PR does_ + +- [ ] Added: ... +- [ ] Updated: ... +- [ ] Removed: ... +- [ ] Fixed: ... + +# Changes Made + +_Detailed explanation of changes (if needed)_ + +- ... + +# Related Issues + +_Link any issues this PR addresses_ + +- Closes #ISSUE_NUMBER +- Related to #ISSUE_NUMBER + +# Screenshots / Demos + +_(Optional: add before/after screenshots, GIFs, or console output)_ + +# Checklist + +- [ ] Code follows project style guidelines +- [ ] Supports mobile and desktop UI/app (if applicable) +- [ ] Added the change to `CHANGELOG.json` +- [ ] `npm run test`, `npm run typecheck` and `npm run validate` pass +- [ ] I have read `CONTRIBUTING.md` +- [ ] This is not a translation request. See [docs](https://docs.termix.site/translations) diff --git a/plugins/workspaces/.gitignore b/plugins/workspaces/.gitignore new file mode 100644 index 000000000..e78aa8134 --- /dev/null +++ b/plugins/workspaces/.gitignore @@ -0,0 +1,9 @@ +node_modules +dist +coverage +*.log +.env +*.tmxplug +*.tmxplug.sig +termix-plugin-signing.key +.termix-tables-* diff --git a/plugins/workspaces/.husky/commit-msg b/plugins/workspaces/.husky/commit-msg new file mode 100644 index 000000000..da9948310 --- /dev/null +++ b/plugins/workspaces/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" diff --git a/plugins/workspaces/.husky/pre-commit b/plugins/workspaces/.husky/pre-commit new file mode 100644 index 000000000..2312dc587 --- /dev/null +++ b/plugins/workspaces/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/plugins/workspaces/.prettierignore b/plugins/workspaces/.prettierignore new file mode 100644 index 000000000..012fbaa45 --- /dev/null +++ b/plugins/workspaces/.prettierignore @@ -0,0 +1,4 @@ +dist +coverage +node_modules +package-lock.json diff --git a/plugins/workspaces/.prettierrc b/plugins/workspaces/.prettierrc new file mode 100644 index 000000000..fd873cbb3 --- /dev/null +++ b/plugins/workspaces/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/plugins/workspaces/CHANGELOG.json b/plugins/workspaces/CHANGELOG.json new file mode 100644 index 000000000..4f18ff9e8 --- /dev/null +++ b/plugins/workspaces/CHANGELOG.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/Termix-SSH/Termix/main/packages/plugin-sdk/schema/changelog.schema.json", + "releases": [ + { + "version": "1.0.0", + "changes": [ + { + "type": "added", + "text": "Save your tabs and split layout as a named workspace" + }, + { + "type": "added", + "text": "Reopen it in one click" + }, + { + "type": "added", + "text": "Recover your last session" + }, + { + "type": "added", + "text": "Syncs between the desktop app and a Termix server" + } + ] + } + ] +} diff --git a/plugins/workspaces/CHANGELOG.md b/plugins/workspaces/CHANGELOG.md deleted file mode 100644 index 8dd8eb59b..000000000 --- a/plugins/workspaces/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -## 1.0.0 - -First release, bundled with Termix 2.9.0. - -Save your open tabs and split layouts as named workspaces and bring them back later. Workspaces sync between the desktop app and a server. diff --git a/plugins/workspaces/CONTRIBUTING.md b/plugins/workspaces/CONTRIBUTING.md new file mode 100644 index 000000000..d4240816b --- /dev/null +++ b/plugins/workspaces/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing to Workspaces + +## Development + +```bash +npm run build # build into dist/ +npm run test # run this plugin's tests +npm run typecheck # type-check this plugin +npm run validate # check manifest.json +npm run format # format the code with Prettier +``` + +## Permissions + +- `workspaces.use`: save, apply and manage workspaces. Admins and users have it by default. diff --git a/plugins/workspaces/README.md b/plugins/workspaces/README.md index 10b326444..e9d667ab8 100644 --- a/plugins/workspaces/README.md +++ b/plugins/workspaces/README.md @@ -1,28 +1,46 @@ -# Workspaces +
-Save and restore named tab and split layouts. +Termix Logo + +

Workspaces

+ +

Save your tabs and reopen them in one click

+ +
+ +
+ +## Overview + +Workspaces saves a set of open tabs with their split layout so you can bring them all back later. + +
## Features -- Save your open tabs and split layouts as a named workspace. -- Open a workspace later to bring every tab back. -- Tabs from a feature that is turned off are kept as placeholders. -- Saved workspaces sync between the desktop app and a server. +- Save your tabs and split layout as a named workspace +- Reopen it in one click +- Recover your last session +- Syncs between the desktop app and a Termix server -## Permissions - -- `workspaces.use`: Use workspaces. Admins and users have it by default. +
## Services Provides to other plugins: -- `workspaces.saved`: list a user's saved workspaces. +- `workspaces.saved`: list a user's saved workspaces -## Development +
-```bash -npm run build # build into dist/ -npm run test # run this plugin's tests -npm run typecheck # type-check this plugin -``` +## Support + +To report a bug or request a feature, open a [support ticket](https://github.com/Termix-SSH/Support/issues/new/choose). You need to be logged in to GitHub. Please be as detailed as possible, preferably in English. + +For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server. + +
+ +## License + +Distributed under the Apache License Version 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE) for more information. diff --git a/plugins/workspaces/manifest.json b/plugins/workspaces/manifest.json index 3c4987522..24002ff86 100644 --- a/plugins/workspaces/manifest.json +++ b/plugins/workspaces/manifest.json @@ -2,16 +2,16 @@ "id": "workspaces", "name": "Workspaces", "version": "1.0.0", - "description": "Save and restore named tab and split layouts.", + "description": "Save your open tabs and split layouts and reopen them in one click.", "author": { "name": "Termix" }, - "license": "MIT", + "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Termix", "category": "Productivity", "icon": "LayoutTemplate", "engine": { - "termix": ">=2.9.0", + "termix": ">=26.10.0", "api": "1" }, "capabilities": ["db:own", "network:serve", "ui:surface"], diff --git a/plugins/workspaces/package.json b/plugins/workspaces/package.json index eea2df669..5f753b718 100644 --- a/plugins/workspaces/package.json +++ b/plugins/workspaces/package.json @@ -7,12 +7,17 @@ "build": "termix-plugin build", "test": "termix-plugin test", "typecheck": "tsc -p .", - "validate": "termix-plugin validate" + "validate": "termix-plugin validate", + "format": "prettier --write .", + "format:check": "prettier --check .", + "prepare": "husky || true" }, "dependencies": { "lucide-react": "^1.33.0" }, "devDependencies": { + "@commitlint/cli": "^21.2.2", + "@commitlint/config-conventional": "^21.2.0", "@termix/plugin-sdk": "^1.0.0", "@testing-library/dom": "^10.4.2", "@testing-library/react": "^16.3.3", @@ -20,7 +25,10 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "better-sqlite3": "^13.0.3", + "husky": "^9.1.7", "jsdom": "^30.0.1", + "lint-staged": "^17.2.0", + "prettier": "3.9.9", "vitest": "^4.1.11" }, "peerDependencies": { @@ -29,5 +37,10 @@ "express": "^5.2.1", "react": "^19.2.8", "sonner": "^2.0.8" + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,mjs,cjs,json,css,md}": [ + "prettier --write" + ] } } diff --git a/scripts/build-plugins.cjs b/scripts/build-plugins.cjs index 32a18111e..58b84ecfa 100644 --- a/scripts/build-plugins.cjs +++ b/scripts/build-plugins.cjs @@ -29,7 +29,7 @@ const SHIPPED = [ "locales", "migrations", "README.md", - "CHANGELOG.md", + "CHANGELOG.json", "icon.svg", ]; diff --git a/scripts/plugin-changelog.test.ts b/scripts/plugin-changelog.test.ts new file mode 100644 index 000000000..99e24f9ce --- /dev/null +++ b/scripts/plugin-changelog.test.ts @@ -0,0 +1,113 @@ +import { describe, expect, it } from "vitest"; +import { validateChangelog } from "../packages/plugin-sdk/cli/lib/changelog.mjs"; + +function release(version: string, extra: Record = {}) { + return { + version, + date: "2026-10-01", + changes: [{ type: "added", text: "Something new" }], + ...extra, + }; +} + +describe("validateChangelog", () => { + it("accepts a changelog whose newest release matches the manifest", () => { + const changelog = { + $schema: "https://example.com/changelog.schema.json", + unreleased: [{ type: "fixed", text: "A bug" }], + releases: [ + release("1.1.0", { notes: "Second release." }), + release("1.0.0"), + ], + }; + expect(validateChangelog(changelog, "1.1.0")).toEqual([]); + }); + + it("accepts a release that has no date yet", () => { + const { date: _date, ...undated } = release("1.0.0"); + expect(validateChangelog({ releases: [undated] }, "1.0.0")).toEqual([]); + }); + + it("flags a manifest version with no release notes", () => { + const problems = validateChangelog( + { releases: [release("1.0.0")] }, + "1.1.0", + ); + expect(problems).toContain( + "the newest release is 1.0.0, but manifest version is 1.1.0", + ); + }); + + it("requires releases newest first and without duplicates", () => { + expect( + validateChangelog( + { releases: [release("1.0.0"), release("1.2.0")] }, + "1.0.0", + ), + ).toContain("releases must be listed newest first"); + expect( + validateChangelog( + { releases: [release("1.0.0"), release("1.0.0")] }, + "1.0.0", + ), + ).toContain("releases[1].version 1.0.0 is listed twice"); + }); + + it("orders a prerelease below its release", () => { + expect( + validateChangelog( + { releases: [release("2.0.0"), release("2.0.0-beta.1")] }, + "2.0.0", + ), + ).toEqual([]); + expect( + validateChangelog( + { releases: [release("2.0.0-beta.1"), release("2.0.0")] }, + "2.0.0-beta.1", + ), + ).toContain("releases must be listed newest first"); + }); + + it("rejects bad versions, dates, change types and empty text", () => { + const problems = validateChangelog( + { + releases: [ + { + version: "v1", + date: "October 1", + changes: [{ type: "improved", text: " " }], + }, + ], + }, + undefined, + ); + expect(problems).toEqual( + expect.arrayContaining([ + "releases[0].version must be a version like 1.2.3", + "releases[0].date must be a date like 2026-10-01", + expect.stringContaining("releases[0].changes[0].type must be one of"), + "releases[0].changes[0].text must be a non-empty string", + ]), + ); + }); + + it("rejects unknown keys, empty change lists and missing releases", () => { + expect(validateChangelog({ releases: [] }, "1.0.0")).toEqual([ + "releases must be a non-empty array", + ]); + expect( + validateChangelog( + { extra: true, releases: [release("1.0.0", { changes: [] })] }, + "1.0.0", + ), + ).toEqual( + expect.arrayContaining([ + 'CHANGELOG.json has unknown key "extra"', + "releases[0].changes must list at least one change", + ]), + ); + expect(validateChangelog([], "1.0.0")).toEqual([ + "CHANGELOG.json must be an object", + ]); + }); +}); diff --git a/src/ui/locales/README.md b/src/ui/locales/README.md index fd9bb60f4..19fe8f3f4 100644 --- a/src/ui/locales/README.md +++ b/src/ui/locales/README.md @@ -1,3 +1,3 @@ -# DO NOT MODIFY TRANSLATED FILES DIRECTLY +# Do Not Edit Translated Files -Instead, use Crowdsin. See [docs](https://docs.termix.site/translations). +Only `en.json` is edited by hand. Every other file here is translated through Crowdin and will be overwritten. See the [docs](https://docs.termix.site/translations) to help translate.