@lobehub/lobehub 2.0.0-next.160 → 2.0.0-next.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.env.example +10 -0
  2. package/CHANGELOG.md +42 -0
  3. package/changelog/v1.json +14 -0
  4. package/e2e/src/steps/hooks.ts +1 -0
  5. package/locales/ar/authError.json +40 -0
  6. package/locales/ar/setting.json +25 -0
  7. package/locales/bg-BG/authError.json +40 -0
  8. package/locales/bg-BG/setting.json +25 -0
  9. package/locales/de-DE/authError.json +40 -0
  10. package/locales/de-DE/setting.json +25 -0
  11. package/locales/en-US/authError.json +40 -0
  12. package/locales/en-US/setting.json +25 -0
  13. package/locales/es-ES/authError.json +40 -0
  14. package/locales/es-ES/setting.json +25 -0
  15. package/locales/fa-IR/authError.json +40 -0
  16. package/locales/fa-IR/setting.json +25 -0
  17. package/locales/fr-FR/authError.json +40 -0
  18. package/locales/fr-FR/setting.json +25 -0
  19. package/locales/it-IT/authError.json +40 -0
  20. package/locales/it-IT/setting.json +25 -0
  21. package/locales/ja-JP/authError.json +40 -0
  22. package/locales/ja-JP/setting.json +25 -0
  23. package/locales/ko-KR/authError.json +40 -0
  24. package/locales/ko-KR/setting.json +25 -0
  25. package/locales/nl-NL/authError.json +40 -0
  26. package/locales/nl-NL/setting.json +25 -0
  27. package/locales/pl-PL/authError.json +40 -0
  28. package/locales/pl-PL/setting.json +25 -0
  29. package/locales/pt-BR/authError.json +40 -0
  30. package/locales/pt-BR/setting.json +25 -0
  31. package/locales/ru-RU/authError.json +40 -0
  32. package/locales/ru-RU/setting.json +25 -0
  33. package/locales/tr-TR/authError.json +40 -0
  34. package/locales/tr-TR/setting.json +25 -0
  35. package/locales/vi-VN/authError.json +40 -0
  36. package/locales/vi-VN/setting.json +25 -0
  37. package/locales/zh-CN/authError.json +40 -0
  38. package/locales/zh-CN/setting.json +25 -0
  39. package/locales/zh-TW/authError.json +40 -0
  40. package/locales/zh-TW/setting.json +25 -0
  41. package/next.config.ts +13 -1
  42. package/package.json +3 -1
  43. package/packages/const/src/index.ts +1 -0
  44. package/packages/const/src/klavis.ts +163 -0
  45. package/packages/database/migrations/meta/_journal.json +1 -1
  46. package/packages/database/src/core/migrations.json +1 -1
  47. package/packages/database/src/models/plugin.ts +1 -1
  48. package/packages/types/src/message/common/tools.ts +9 -0
  49. package/packages/types/src/serverConfig.ts +1 -0
  50. package/packages/types/src/tool/plugin.ts +10 -0
  51. package/src/app/[variants]/(auth)/auth-error/page.tsx +59 -0
  52. package/src/auth.ts +13 -48
  53. package/src/config/klavis.ts +41 -0
  54. package/src/envs/redis.ts +1 -1
  55. package/src/features/ChatInput/ActionBar/Tools/KlavisServerItem.tsx +351 -0
  56. package/src/features/ChatInput/ActionBar/Tools/index.tsx +56 -4
  57. package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +174 -6
  58. package/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx +3 -1
  59. package/src/helpers/toolEngineering/index.test.ts +3 -0
  60. package/src/helpers/toolEngineering/index.ts +13 -2
  61. package/src/libs/better-auth/utils/config.ts +91 -0
  62. package/src/libs/klavis/index.ts +36 -0
  63. package/src/libs/redis/manager.ts +5 -1
  64. package/src/libs/redis/redis.test.ts +1 -1
  65. package/src/libs/redis/upstash.test.ts +9 -5
  66. package/src/libs/redis/upstash.ts +44 -20
  67. package/src/locales/default/authError.ts +40 -0
  68. package/src/locales/default/index.ts +2 -0
  69. package/src/locales/default/setting.ts +25 -0
  70. package/src/proxy.ts +1 -0
  71. package/src/server/globalConfig/index.ts +2 -0
  72. package/src/server/routers/lambda/index.ts +2 -0
  73. package/src/server/routers/lambda/klavis.ts +249 -0
  74. package/src/server/routers/tools/index.ts +2 -0
  75. package/src/server/routers/tools/klavis.ts +80 -0
  76. package/src/server/services/mcp/index.ts +61 -15
  77. package/src/services/import/index.test.ts +658 -0
  78. package/src/services/mcp.test.ts +1 -1
  79. package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +2 -3
  80. package/src/store/chat/slices/plugin/action.test.ts +0 -1
  81. package/src/store/chat/slices/plugin/actions/internals.ts +22 -2
  82. package/src/store/chat/slices/plugin/actions/pluginTypes.ts +108 -0
  83. package/src/store/serverConfig/index.ts +1 -1
  84. package/src/store/serverConfig/selectors.ts +1 -0
  85. package/src/store/tool/initialState.ts +4 -1
  86. package/src/store/tool/selectors/index.ts +1 -0
  87. package/src/store/tool/slices/builtin/selectors.ts +25 -3
  88. package/src/store/tool/slices/klavisStore/action.test.ts +512 -0
  89. package/src/store/tool/slices/klavisStore/action.ts +375 -0
  90. package/src/store/tool/slices/klavisStore/index.ts +4 -0
  91. package/src/store/tool/slices/klavisStore/initialState.ts +25 -0
  92. package/src/store/tool/slices/klavisStore/selectors.test.ts +371 -0
  93. package/src/store/tool/slices/klavisStore/selectors.ts +123 -0
  94. package/src/store/tool/slices/klavisStore/types.ts +100 -0
  95. package/src/store/tool/slices/plugin/selectors.ts +16 -13
  96. package/src/store/tool/store.ts +4 -1
@@ -0,0 +1,40 @@
1
+ {
2
+ "actions": {
3
+ "discord": "Geri bildirim için Discord'a git",
4
+ "home": "Ana sayfaya dön",
5
+ "retry": "Yeniden giriş yap"
6
+ },
7
+ "codes": {
8
+ "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_USER": "Bu hesap başka bir kullanıcıya zaten bağlı",
9
+ "ACCOUNT_NOT_FOUND": "İlgili hesap bulunamadı",
10
+ "CREDENTIAL_ACCOUNT_NOT_FOUND": "Kimlik bilgisi hesabı mevcut değil",
11
+ "EMAIL_CAN_NOT_BE_UPDATED": "Bu hesabın e-posta adresi değiştirilemez",
12
+ "EMAIL_NOT_VERIFIED": "Lütfen önce e-posta doğrulamasını tamamlayın",
13
+ "FAILED_TO_CREATE_SESSION": "Oturum oluşturulamadı",
14
+ "FAILED_TO_CREATE_USER": "Kullanıcı oluşturulamadı",
15
+ "FAILED_TO_GET_SESSION": "Oturum alınamadı",
16
+ "FAILED_TO_GET_USER_INFO": "Kullanıcı bilgileri alınamadı",
17
+ "FAILED_TO_UNLINK_LAST_ACCOUNT": "Son bağlı hesabın bağlantısı kaldırılamaz",
18
+ "FAILED_TO_UPDATE_USER": "Kullanıcı bilgileri güncellenemedi",
19
+ "ID_TOKEN_NOT_SUPPORTED": "Bu kimlik belirteci desteklenmiyor",
20
+ "INVALID_EMAIL": "Geçersiz e-posta formatı",
21
+ "INVALID_EMAIL_OR_PASSWORD": "E-posta veya şifre hatalı",
22
+ "INVALID_PASSWORD": "Geçersiz şifre formatı",
23
+ "INVALID_TOKEN": "Belirteç geçersiz veya süresi dolmuş",
24
+ "PASSWORD_TOO_LONG": "Şifre çok uzun",
25
+ "PASSWORD_TOO_SHORT": "Şifre çok kısa",
26
+ "PROVIDER_NOT_FOUND": "İlgili kimlik sağlayıcısı bulunamadı",
27
+ "RATE_LIMIT_EXCEEDED": "Çok fazla istek gönderildi, lütfen daha sonra tekrar deneyin",
28
+ "SESSION_EXPIRED": "Oturum süresi doldu, lütfen yeniden giriş yapın",
29
+ "SOCIAL_ACCOUNT_ALREADY_LINKED": "Bu sosyal medya hesabı başka bir kullanıcıya bağlı",
30
+ "UNEXPECTED_ERROR": "Bilinmeyen bir hata oluştu, lütfen tekrar deneyin",
31
+ "UNKNOWN": "Bilinmeyen bir hata oluştu, lütfen tekrar deneyin veya destekle iletişime geçin",
32
+ "USER_ALREADY_EXISTS": "Kullanıcı zaten mevcut",
33
+ "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": "Bu e-posta zaten kullanılıyor, lütfen başka bir e-posta deneyin",
34
+ "USER_ALREADY_HAS_PASSWORD": "Bu hesap zaten bir şifreye sahip",
35
+ "USER_BANNED": "Bu kullanıcı engellenmiş",
36
+ "USER_EMAIL_NOT_FOUND": "İlgili e-posta bulunamadı",
37
+ "USER_NOT_FOUND": "Kullanıcı bulunamadı"
38
+ },
39
+ "title": "Kimlik doğrulama hatası"
40
+ }
@@ -775,12 +775,37 @@
775
775
  "groupName": "Dahili Araçlar"
776
776
  },
777
777
  "disabled": "Mevcut model fonksiyon çağrılarını desteklemez, eklenti kullanılamaz",
778
+ "klavis": {
779
+ "addServer": "Sunucu Ekle",
780
+ "authCompleted": "Kimlik Doğrulama Tamamlandı",
781
+ "authFailed": "Kimlik Doğrulama Başarısız",
782
+ "authRequired": "Kimlik Doğrulama Gerekli",
783
+ "connected": "Bağlandı",
784
+ "error": "Hata",
785
+ "groupName": "Klavis Araçları",
786
+ "manage": "Klavis'i Yönet",
787
+ "manageTitle": "Klavis Entegrasyonunu Yönet",
788
+ "noServers": "Bağlı sunucu yok",
789
+ "notEnabled": "Klavis hizmeti etkin değil",
790
+ "oauthRequired": "Lütfen yeni pencerede OAuth kimlik doğrulamasını tamamlayın",
791
+ "pendingAuth": "Kimlik Doğrulama Bekleniyor",
792
+ "serverCreated": "Sunucu başarıyla oluşturuldu",
793
+ "serverCreatedFailed": "Sunucu oluşturulamadı",
794
+ "serverRemoved": "Sunucu silindi",
795
+ "servers": "sunucu",
796
+ "tools": "araç",
797
+ "verifyAuth": "Kimlik doğrulamayı tamamladım"
798
+ },
778
799
  "plugins": {
779
800
  "enabled": "Etkin: {{num}}",
780
801
  "groupName": "Eklentiler",
781
802
  "noEnabled": "Etkin eklenti yok",
782
803
  "store": "Eklenti Mağazası"
783
804
  },
805
+ "tabs": {
806
+ "all": "Tümü",
807
+ "installed": "Etkinleştirildi"
808
+ },
784
809
  "title": "Uzantı Araçları"
785
810
  }
786
811
  }
@@ -0,0 +1,40 @@
1
+ {
2
+ "actions": {
3
+ "discord": "Gửi phản hồi qua Discord",
4
+ "home": "Quay về trang chủ",
5
+ "retry": "Đăng nhập lại"
6
+ },
7
+ "codes": {
8
+ "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_USER": "Tài khoản này đã được liên kết với người dùng khác",
9
+ "ACCOUNT_NOT_FOUND": "Không tìm thấy tài khoản tương ứng",
10
+ "CREDENTIAL_ACCOUNT_NOT_FOUND": "Tài khoản xác thực không tồn tại",
11
+ "EMAIL_CAN_NOT_BE_UPDATED": "Không thể thay đổi email của tài khoản hiện tại",
12
+ "EMAIL_NOT_VERIFIED": "Vui lòng xác minh email trước",
13
+ "FAILED_TO_CREATE_SESSION": "Tạo phiên làm việc thất bại",
14
+ "FAILED_TO_CREATE_USER": "Tạo người dùng thất bại",
15
+ "FAILED_TO_GET_SESSION": "Lấy thông tin phiên làm việc thất bại",
16
+ "FAILED_TO_GET_USER_INFO": "Lấy thông tin người dùng thất bại",
17
+ "FAILED_TO_UNLINK_LAST_ACCOUNT": "Không thể hủy liên kết tài khoản cuối cùng",
18
+ "FAILED_TO_UPDATE_USER": "Cập nhật thông tin người dùng thất bại",
19
+ "ID_TOKEN_NOT_SUPPORTED": "Mã định danh không được hỗ trợ",
20
+ "INVALID_EMAIL": "Định dạng email không hợp lệ",
21
+ "INVALID_EMAIL_OR_PASSWORD": "Email hoặc mật khẩu không đúng",
22
+ "INVALID_PASSWORD": "Định dạng mật khẩu không hợp lệ",
23
+ "INVALID_TOKEN": "Mã xác thực không hợp lệ hoặc đã hết hạn",
24
+ "PASSWORD_TOO_LONG": "Mật khẩu quá dài",
25
+ "PASSWORD_TOO_SHORT": "Mật khẩu quá ngắn",
26
+ "PROVIDER_NOT_FOUND": "Không tìm thấy cấu hình nhà cung cấp xác thực",
27
+ "RATE_LIMIT_EXCEEDED": "Yêu cầu quá nhiều, vui lòng thử lại sau",
28
+ "SESSION_EXPIRED": "Phiên làm việc đã hết hạn, vui lòng đăng nhập lại",
29
+ "SOCIAL_ACCOUNT_ALREADY_LINKED": "Tài khoản mạng xã hội này đã được liên kết với người dùng khác",
30
+ "UNEXPECTED_ERROR": "Đã xảy ra lỗi không xác định, vui lòng thử lại",
31
+ "UNKNOWN": "Đã xảy ra lỗi không xác định, vui lòng thử lại hoặc liên hệ hỗ trợ",
32
+ "USER_ALREADY_EXISTS": "Người dùng đã tồn tại",
33
+ "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": "Email đã được sử dụng, vui lòng thử email khác",
34
+ "USER_ALREADY_HAS_PASSWORD": "Tài khoản này đã có mật khẩu",
35
+ "USER_BANNED": "Người dùng này đã bị cấm",
36
+ "USER_EMAIL_NOT_FOUND": "Không tìm thấy email tương ứng",
37
+ "USER_NOT_FOUND": "Không tìm thấy người dùng"
38
+ },
39
+ "title": "Lỗi xác thực"
40
+ }
@@ -775,12 +775,37 @@
775
775
  "groupName": "Mở rộng tích hợp sẵn"
776
776
  },
777
777
  "disabled": "Mô hình hiện tại không hỗ trợ gọi hàm, không thể sử dụng plugin",
778
+ "klavis": {
779
+ "addServer": "Thêm máy chủ",
780
+ "authCompleted": "Xác thực hoàn tất",
781
+ "authFailed": "Xác thực thất bại",
782
+ "authRequired": "Yêu cầu xác thực",
783
+ "connected": "Đã kết nối",
784
+ "error": "Lỗi",
785
+ "groupName": "Công cụ Klavis",
786
+ "manage": "Quản lý Klavis",
787
+ "manageTitle": "Quản lý tích hợp Klavis",
788
+ "noServers": "Chưa có máy chủ nào được kết nối",
789
+ "notEnabled": "Dịch vụ Klavis chưa được kích hoạt",
790
+ "oauthRequired": "Vui lòng hoàn tất xác thực OAuth trong cửa sổ mới",
791
+ "pendingAuth": "Đang chờ xác thực",
792
+ "serverCreated": "Tạo máy chủ thành công",
793
+ "serverCreatedFailed": "Tạo máy chủ thất bại",
794
+ "serverRemoved": "Máy chủ đã bị xóa",
795
+ "servers": "máy chủ",
796
+ "tools": "công cụ",
797
+ "verifyAuth": "Tôi đã hoàn tất xác thực"
798
+ },
778
799
  "plugins": {
779
800
  "enabled": "Đã kích hoạt {{num}}",
780
801
  "groupName": "Tiện ích",
781
802
  "noEnabled": "Chưa có tiện ích nào được kích hoạt",
782
803
  "store": "Cửa hàng tiện ích"
783
804
  },
805
+ "tabs": {
806
+ "all": "Tất cả",
807
+ "installed": "Đã bật"
808
+ },
784
809
  "title": "Công cụ mở rộng"
785
810
  }
786
811
  }
@@ -0,0 +1,40 @@
1
+ {
2
+ "actions": {
3
+ "discord": "前往 Discord 反馈",
4
+ "home": "返回首页",
5
+ "retry": "重新登录"
6
+ },
7
+ "codes": {
8
+ "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_USER": "该账号已关联至其他用户",
9
+ "ACCOUNT_NOT_FOUND": "未找到对应账号",
10
+ "CREDENTIAL_ACCOUNT_NOT_FOUND": "凭证账号不存在",
11
+ "EMAIL_CAN_NOT_BE_UPDATED": "当前账号邮箱不可修改",
12
+ "EMAIL_NOT_VERIFIED": "请先完成邮箱验证",
13
+ "FAILED_TO_CREATE_SESSION": "创建会话失败",
14
+ "FAILED_TO_CREATE_USER": "创建用户失败",
15
+ "FAILED_TO_GET_SESSION": "获取会话失败",
16
+ "FAILED_TO_GET_USER_INFO": "获取用户信息失败",
17
+ "FAILED_TO_UNLINK_LAST_ACCOUNT": "无法解绑最后一个关联账号",
18
+ "FAILED_TO_UPDATE_USER": "更新用户信息失败",
19
+ "ID_TOKEN_NOT_SUPPORTED": "当前身份令牌不被支持",
20
+ "INVALID_EMAIL": "邮箱格式不正确",
21
+ "INVALID_EMAIL_OR_PASSWORD": "邮箱或密码错误",
22
+ "INVALID_PASSWORD": "密码格式无效",
23
+ "INVALID_TOKEN": "令牌无效或已过期",
24
+ "PASSWORD_TOO_LONG": "密码长度过长",
25
+ "PASSWORD_TOO_SHORT": "密码长度过短",
26
+ "PROVIDER_NOT_FOUND": "未找到对应的身份提供方配置",
27
+ "RATE_LIMIT_EXCEEDED": "请求过于频繁,请稍后再试",
28
+ "SESSION_EXPIRED": "会话已过期,请重新登录",
29
+ "SOCIAL_ACCOUNT_ALREADY_LINKED": "该社交账号已被其他用户绑定",
30
+ "UNEXPECTED_ERROR": "发生未知错误,请重试",
31
+ "UNKNOWN": "发生未知错误,请重试或联系支持",
32
+ "USER_ALREADY_EXISTS": "用户已存在",
33
+ "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": "邮箱已被使用,请尝试其他邮箱",
34
+ "USER_ALREADY_HAS_PASSWORD": "该账号已设置密码",
35
+ "USER_BANNED": "该用户已被封禁",
36
+ "USER_EMAIL_NOT_FOUND": "未找到对应邮箱",
37
+ "USER_NOT_FOUND": "未找到用户"
38
+ },
39
+ "title": "身份验证出错"
40
+ }
@@ -775,12 +775,37 @@
775
775
  "groupName": "内置插件"
776
776
  },
777
777
  "disabled": "当前模型不支持函数调用,无法使用插件",
778
+ "klavis": {
779
+ "addServer": "添加服务器",
780
+ "authCompleted": "认证完成",
781
+ "authFailed": "认证失败",
782
+ "authRequired": "需要认证",
783
+ "connected": "已连接",
784
+ "error": "错误",
785
+ "groupName": "Klavis 工具",
786
+ "manage": "管理 Klavis",
787
+ "manageTitle": "管理 Klavis 集成",
788
+ "noServers": "暂无连接的服务器",
789
+ "notEnabled": "Klavis 服务未启用",
790
+ "oauthRequired": "请在新窗口中完成 OAuth 认证",
791
+ "pendingAuth": "待认证",
792
+ "serverCreated": "服务器创建成功",
793
+ "serverCreatedFailed": "服务器创建失败",
794
+ "serverRemoved": "服务器已删除",
795
+ "servers": "个服务器",
796
+ "tools": "个工具",
797
+ "verifyAuth": "我已完成认证"
798
+ },
778
799
  "plugins": {
779
800
  "enabled": "已启用 {{num}}",
780
801
  "groupName": "三方插件",
781
802
  "noEnabled": "暂无启用插件",
782
803
  "store": "插件商店"
783
804
  },
805
+ "tabs": {
806
+ "all": "全部",
807
+ "installed": "已启用"
808
+ },
784
809
  "title": "扩展插件"
785
810
  }
786
811
  }
@@ -0,0 +1,40 @@
1
+ {
2
+ "actions": {
3
+ "discord": "前往 Discord 回饋",
4
+ "home": "返回首頁",
5
+ "retry": "重新登入"
6
+ },
7
+ "codes": {
8
+ "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_USER": "該帳號已綁定至其他使用者",
9
+ "ACCOUNT_NOT_FOUND": "找不到對應帳號",
10
+ "CREDENTIAL_ACCOUNT_NOT_FOUND": "憑證帳號不存在",
11
+ "EMAIL_CAN_NOT_BE_UPDATED": "目前帳號的電子郵件無法修改",
12
+ "EMAIL_NOT_VERIFIED": "請先完成電子郵件驗證",
13
+ "FAILED_TO_CREATE_SESSION": "建立會話失敗",
14
+ "FAILED_TO_CREATE_USER": "建立使用者失敗",
15
+ "FAILED_TO_GET_SESSION": "取得會話失敗",
16
+ "FAILED_TO_GET_USER_INFO": "取得使用者資訊失敗",
17
+ "FAILED_TO_UNLINK_LAST_ACCOUNT": "無法解除綁定最後一個關聯帳號",
18
+ "FAILED_TO_UPDATE_USER": "更新使用者資訊失敗",
19
+ "ID_TOKEN_NOT_SUPPORTED": "目前的身份令牌不被支援",
20
+ "INVALID_EMAIL": "電子郵件格式不正確",
21
+ "INVALID_EMAIL_OR_PASSWORD": "電子郵件或密碼錯誤",
22
+ "INVALID_PASSWORD": "密碼格式無效",
23
+ "INVALID_TOKEN": "令牌無效或已過期",
24
+ "PASSWORD_TOO_LONG": "密碼長度過長",
25
+ "PASSWORD_TOO_SHORT": "密碼長度過短",
26
+ "PROVIDER_NOT_FOUND": "找不到對應的身份提供者設定",
27
+ "RATE_LIMIT_EXCEEDED": "請求過於頻繁,請稍後再試",
28
+ "SESSION_EXPIRED": "會話已過期,請重新登入",
29
+ "SOCIAL_ACCOUNT_ALREADY_LINKED": "該社群帳號已被其他使用者綁定",
30
+ "UNEXPECTED_ERROR": "發生未知錯誤,請重試",
31
+ "UNKNOWN": "發生未知錯誤,請重試或聯絡支援",
32
+ "USER_ALREADY_EXISTS": "使用者已存在",
33
+ "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": "電子郵件已被使用,請嘗試其他電子郵件",
34
+ "USER_ALREADY_HAS_PASSWORD": "該帳號已設定密碼",
35
+ "USER_BANNED": "該使用者已被封鎖",
36
+ "USER_EMAIL_NOT_FOUND": "找不到對應的電子郵件",
37
+ "USER_NOT_FOUND": "找不到使用者"
38
+ },
39
+ "title": "身份驗證錯誤"
40
+ }
@@ -775,12 +775,37 @@
775
775
  "groupName": "內置"
776
776
  },
777
777
  "disabled": "當前模型不支持函數調用,無法使用插件",
778
+ "klavis": {
779
+ "addServer": "新增伺服器",
780
+ "authCompleted": "驗證完成",
781
+ "authFailed": "驗證失敗",
782
+ "authRequired": "需要驗證",
783
+ "connected": "已連線",
784
+ "error": "錯誤",
785
+ "groupName": "Klavis 工具",
786
+ "manage": "管理 Klavis",
787
+ "manageTitle": "管理 Klavis 整合",
788
+ "noServers": "尚未連線任何伺服器",
789
+ "notEnabled": "Klavis 服務未啟用",
790
+ "oauthRequired": "請在新視窗中完成 OAuth 驗證",
791
+ "pendingAuth": "待驗證",
792
+ "serverCreated": "伺服器建立成功",
793
+ "serverCreatedFailed": "伺服器建立失敗",
794
+ "serverRemoved": "伺服器已刪除",
795
+ "servers": "個伺服器",
796
+ "tools": "個工具",
797
+ "verifyAuth": "我已完成驗證"
798
+ },
778
799
  "plugins": {
779
800
  "enabled": "已啟用 {{num}}",
780
801
  "groupName": "插件",
781
802
  "noEnabled": "暫無啟用插件",
782
803
  "store": "插件商店"
783
804
  },
805
+ "tabs": {
806
+ "all": "全部",
807
+ "installed": "已啟用"
808
+ },
784
809
  "title": "擴展工具"
785
810
  }
786
811
  }
package/next.config.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import analyzer from '@next/bundle-analyzer';
2
2
  import withSerwistInit from '@serwist/next';
3
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
3
4
  import type { NextConfig } from 'next';
4
5
  import ReactComponentName from 'react-scan/react-component-name/webpack';
5
6
 
@@ -10,6 +11,9 @@ const enableReactScan = !!process.env.REACT_SCAN_MONITOR_API_KEY;
10
11
  const isUsePglite = process.env.NEXT_PUBLIC_CLIENT_DB === 'pglite';
11
12
  const shouldUseCSP = process.env.ENABLED_CSP === '1';
12
13
 
14
+ const isTest =
15
+ process.env.NODE_ENV === 'test' || process.env.TEST === '1' || process.env.E2E === '1';
16
+
13
17
  // if you need to proxy the api endpoint to remote server
14
18
 
15
19
  const isStandaloneMode = buildWithDocker || isDesktop;
@@ -268,8 +272,16 @@ const nextConfig: NextConfig = {
268
272
 
269
273
  // when external packages in dev mode with turbopack, this config will lead to bundle error
270
274
  serverExternalPackages: isProd ? ['@electric-sql/pglite', 'pdfkit'] : ['pdfkit'],
275
+
271
276
  transpilePackages: ['pdfjs-dist', 'mermaid', 'better-auth-harmony'],
272
- turbopack: {},
277
+ turbopack: {
278
+ rules: isTest
279
+ ? void 0
280
+ : codeInspectorPlugin({
281
+ bundler: 'turbopack',
282
+ hotKeys: ['altKey'],
283
+ }),
284
+ },
273
285
 
274
286
  typescript: {
275
287
  ignoreBuildErrors: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.160",
3
+ "version": "2.0.0-next.162",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -229,6 +229,7 @@
229
229
  "jose": "^5.10.0",
230
230
  "js-sha256": "^0.11.1",
231
231
  "jsonl-parse-stringify": "^1.0.3",
232
+ "klavis": "^2.13.2",
232
233
  "langchain": "^0.3.36",
233
234
  "langfuse": "^3.38.6",
234
235
  "langfuse-core": "^3.38.6",
@@ -359,6 +360,7 @@
359
360
  "@typescript/native-preview": "7.0.0-dev.20251102.1",
360
361
  "@vitest/coverage-v8": "^3.2.4",
361
362
  "ajv-keywords": "^5.1.0",
363
+ "code-inspector-plugin": "1.3.0",
362
364
  "commitlint": "^19.8.1",
363
365
  "consola": "^3.4.2",
364
366
  "cross-env": "^10.1.0",
@@ -3,6 +3,7 @@ export * from './branding';
3
3
  export * from './currency';
4
4
  export * from './desktop';
5
5
  export * from './discover';
6
+ export * from './klavis';
6
7
  export * from './layoutTokens';
7
8
  export * from './message';
8
9
  export * from './meta';
@@ -0,0 +1,163 @@
1
+ import { IconType, SiCaldotcom, SiGithub, SiLinear } from '@icons-pack/react-simple-icons';
2
+ import { Klavis } from 'klavis';
3
+
4
+ export interface KlavisServerType {
5
+ icon: string | IconType;
6
+ /**
7
+ * Identifier used for storage in database (e.g., 'google-calendar')
8
+ * Format: lowercase, spaces replaced with hyphens
9
+ */
10
+ identifier: string;
11
+ label: string;
12
+ /**
13
+ * Server name used to call Klavis API (e.g., 'Google Calendar')
14
+ */
15
+ serverName: Klavis.McpServerName;
16
+ }
17
+
18
+ export const KLAVIS_SERVER_TYPES: KlavisServerType[] = [
19
+ {
20
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/gmail.svg',
21
+ identifier: 'gmail',
22
+ label: 'Gmail',
23
+ serverName: Klavis.McpServerName.Gmail,
24
+ },
25
+ {
26
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/googlecalendar.svg',
27
+ identifier: 'google-calendar',
28
+ label: 'Google Calendar',
29
+ serverName: Klavis.McpServerName.GoogleCalendar,
30
+ },
31
+ {
32
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/notion.svg',
33
+ identifier: 'notion',
34
+ label: 'Notion',
35
+ serverName: Klavis.McpServerName.Notion,
36
+ },
37
+ {
38
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/airtable.svg',
39
+ identifier: 'airtable',
40
+ label: 'Airtable',
41
+ serverName: Klavis.McpServerName.Airtable,
42
+ },
43
+ {
44
+ icon: SiLinear,
45
+ identifier: 'linear',
46
+ label: 'Linear',
47
+ serverName: Klavis.McpServerName.Linear,
48
+ },
49
+ {
50
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/googlesheets.svg',
51
+ identifier: 'google-sheets',
52
+ label: 'Google Sheets',
53
+ serverName: Klavis.McpServerName.GoogleSheets,
54
+ },
55
+ {
56
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/googledocs.svg',
57
+ identifier: 'google-docs',
58
+ label: 'Google Docs',
59
+ serverName: Klavis.McpServerName.GoogleDocs,
60
+ },
61
+ {
62
+ icon: SiGithub,
63
+ identifier: 'github',
64
+ label: 'GitHub',
65
+ serverName: Klavis.McpServerName.Github,
66
+ },
67
+ {
68
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/supabase.svg',
69
+ identifier: 'supabase',
70
+ label: 'Supabase',
71
+ serverName: Klavis.McpServerName.Supabase,
72
+ },
73
+ {
74
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/googledrive.svg',
75
+ identifier: 'google-drive',
76
+ label: 'Google Drive',
77
+ serverName: Klavis.McpServerName.GoogleDrive,
78
+ },
79
+ {
80
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/slack.svg',
81
+ identifier: 'slack',
82
+ label: 'Slack',
83
+ serverName: Klavis.McpServerName.Slack,
84
+ },
85
+ {
86
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/confluence.svg',
87
+ identifier: 'confluence',
88
+ label: 'Confluence',
89
+ serverName: Klavis.McpServerName.Confluence,
90
+ },
91
+ {
92
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/jira.svg',
93
+ identifier: 'jira',
94
+ label: 'Jira',
95
+ serverName: Klavis.McpServerName.Jira,
96
+ },
97
+ {
98
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/clickup.svg',
99
+ identifier: 'clickup',
100
+ label: 'ClickUp',
101
+ serverName: Klavis.McpServerName.Clickup,
102
+ },
103
+ {
104
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/dropbox.svg',
105
+ identifier: 'dropbox',
106
+ label: 'Dropbox',
107
+ serverName: Klavis.McpServerName.Dropbox,
108
+ },
109
+ {
110
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/figma.svg',
111
+ identifier: 'figma',
112
+ label: 'Figma',
113
+ serverName: Klavis.McpServerName.Figma,
114
+ },
115
+ {
116
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/hubspot.svg',
117
+ identifier: 'hubspot',
118
+ label: 'HubSpot',
119
+ serverName: Klavis.McpServerName.Hubspot,
120
+ },
121
+ {
122
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/onedrive.svg',
123
+ identifier: 'onedrive',
124
+ label: 'OneDrive',
125
+ serverName: Klavis.McpServerName.Onedrive,
126
+ },
127
+ {
128
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/outlook.svg',
129
+ identifier: 'outlook-mail',
130
+ label: 'Outlook Mail',
131
+ serverName: Klavis.McpServerName.OutlookMail,
132
+ },
133
+ {
134
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/salesforce.svg',
135
+ identifier: 'salesforce',
136
+ label: 'Salesforce',
137
+ serverName: Klavis.McpServerName.Salesforce,
138
+ },
139
+ {
140
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/whatsapp.svg',
141
+ identifier: 'whatsapp',
142
+ label: 'WhatsApp',
143
+ serverName: Klavis.McpServerName.Whatsapp,
144
+ },
145
+ {
146
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/youtube.svg',
147
+ identifier: 'youtube',
148
+ label: 'YouTube',
149
+ serverName: Klavis.McpServerName.Youtube,
150
+ },
151
+ {
152
+ icon: 'https://hub-apac-1.lobeobjects.space/assets/logos/zendesk.svg',
153
+ identifier: 'zendesk',
154
+ label: 'Zendesk',
155
+ serverName: Klavis.McpServerName.Zendesk,
156
+ },
157
+ {
158
+ icon: SiCaldotcom,
159
+ identifier: 'cal-com',
160
+ label: 'Cal.com',
161
+ serverName: Klavis.McpServerName.CalCom,
162
+ },
163
+ ];
@@ -423,4 +423,4 @@
423
423
  }
424
424
  ],
425
425
  "version": "6"
426
- }
426
+ }
@@ -939,4 +939,4 @@
939
939
  "folderMillis": 1764858574403,
940
940
  "hash": "7838f9938b370867470e5e11807855253d23b11c2ac6aa9e90687844a356c949"
941
941
  }
942
- ]
942
+ ]
@@ -16,7 +16,7 @@ export class PluginModel {
16
16
  create = async (
17
17
  params: Pick<
18
18
  NewInstalledPlugin,
19
- 'type' | 'identifier' | 'manifest' | 'customParams' | 'settings'
19
+ 'type' | 'identifier' | 'manifest' | 'customParams' | 'settings' | 'source'
20
20
  >,
21
21
  ) => {
22
22
  const [result] = await this.db
@@ -23,6 +23,11 @@ export interface ChatPluginPayload {
23
23
  type: LobeToolRenderType;
24
24
  }
25
25
 
26
+ /**
27
+ * Tool source indicates where the tool comes from
28
+ */
29
+ export type ToolSource = 'builtin' | 'plugin' | 'mcp' | 'klavis';
30
+
26
31
  export interface ChatToolPayload {
27
32
  apiName: string;
28
33
  arguments: string;
@@ -30,6 +35,10 @@ export interface ChatToolPayload {
30
35
  identifier: string;
31
36
  intervention?: ToolIntervention;
32
37
  result_msg_id?: string;
38
+ /**
39
+ * Tool source indicates where the tool comes from
40
+ */
41
+ source?: ToolSource;
33
42
  thoughtSignature?: string;
34
43
  type: LobeToolRenderType;
35
44
  }
@@ -25,6 +25,7 @@ export type ServerLanguageModel = Partial<Record<GlobalLLMProviderKey, ServerMod
25
25
  export interface GlobalServerConfig {
26
26
  aiProvider: ServerLanguageModel;
27
27
  defaultAgent?: PartialDeep<UserDefaultAgent>;
28
+ enableKlavis?: boolean;
28
29
  enableUploadFileToServer?: boolean;
29
30
  enabledAccessCode?: boolean;
30
31
  /**
@@ -37,6 +37,16 @@ export interface CustomPluginParams {
37
37
  // Added headers configuration support
38
38
  headers?: Record<string, string>;
39
39
  };
40
+ /**
41
+ * Klavis integration parameters
42
+ */
43
+ klavis?: {
44
+ instanceId: string;
45
+ isAuthenticated: boolean;
46
+ oauthUrl?: string;
47
+ serverName: string;
48
+ serverUrl: string;
49
+ };
40
50
  avatar?: string;
41
51
  description?: string;
42
52
  /* eslint-enable */