@oomol-lab/open-connector 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/open-connector/catalog/apps/agentearth.json +441 -0
- package/assets/open-connector/catalog/apps/appgrowing_mcp.json +863 -0
- package/assets/open-connector/catalog/apps/arcmira.json +610 -0
- package/assets/open-connector/catalog/apps/bainiu.json +654 -0
- package/assets/open-connector/catalog/apps/chaport.json +331 -0
- package/assets/open-connector/catalog/apps/cnb.json +1408 -0
- package/assets/open-connector/catalog/apps/crtsh.json +123 -0
- package/assets/open-connector/catalog/apps/eastmoney_miaoxiang.json +406 -0
- package/assets/open-connector/catalog/apps/fastmoss_mcp.json +876 -876
- package/assets/open-connector/catalog/apps/ftshare.json +1162 -0
- package/assets/open-connector/catalog/apps/fusion-api.json +143 -0
- package/assets/open-connector/catalog/apps/fxbaogao.json +308 -0
- package/assets/open-connector/catalog/apps/github.json +38 -3
- package/assets/open-connector/catalog/apps/hrmos_kintai.json +7519 -0
- package/assets/open-connector/catalog/apps/humor_api.json +351 -0
- package/assets/open-connector/catalog/apps/kaonavi.json +1723 -0
- package/assets/open-connector/catalog/apps/linear_mcp.json +882 -22
- package/assets/open-connector/catalog/apps/listinggood.json +362 -0
- package/assets/open-connector/catalog/apps/notion_mcp.json +338 -1
- package/assets/open-connector/catalog/apps/outlook.json +414 -0
- package/assets/open-connector/catalog/apps/porteden.json +1258 -0
- package/assets/open-connector/catalog/apps/qiuxiaoce.json +915 -0
- package/assets/open-connector/catalog/apps/qqmusic.json +1834 -0
- package/assets/open-connector/catalog/apps/rakuraku_seisan.json +217 -0
- package/assets/open-connector/catalog/apps/redfox.json +9661 -897
- package/assets/open-connector/catalog/apps/salesforce.json +4907 -0
- package/assets/open-connector/catalog/apps/sansan.json +4594 -0
- package/assets/open-connector/catalog/apps/smarthr.json +8071 -0
- package/assets/open-connector/catalog/apps/smooth.json +914 -0
- package/assets/open-connector/catalog/apps/tapd.json +727 -0
- package/assets/open-connector/catalog/apps/tencent_meeting_mcp.json +1301 -0
- package/assets/open-connector/catalog/apps/threatfox.json +203 -0
- package/assets/open-connector/catalog/apps/tradebee.json +915 -0
- package/assets/open-connector/catalog/apps/twittrapi.json +4914 -0
- package/assets/open-connector/catalog/apps/urlhaus.json +246 -0
- package/assets/open-connector/catalog/apps/weread.json +1514 -0
- package/assets/open-connector/catalog/apps/whatsapp.json +12 -0
- package/assets/open-connector/catalog/apps/zhiliaobiaoxun.json +812 -0
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +2 -1
- package/src/connection-service.js +55 -11
- package/src/core/provider-error-codes.d.ts +9 -0
- package/src/core/provider-error-codes.js +13 -0
- package/src/core/request.d.ts +2 -0
- package/src/core/request.js +11 -2
- package/src/mail/imap-smtp/protocol.js +4 -3
- package/src/oauth/oauth-flow-service.js +1 -0
- package/src/oauth/oauth-token.d.ts +2 -0
- package/src/providers/17track/runtime.js +17 -20
- package/src/providers/action-contracts.generated.d.ts +36 -6
- package/src/providers/agentearth/actions.d.ts +2 -0
- package/src/providers/agentearth/actions.js +100 -0
- package/src/providers/agentearth/executors.d.ts +4 -0
- package/src/providers/agentearth/executors.js +109 -0
- package/src/providers/appgrowing_mcp/actions.d.ts +2 -0
- package/src/providers/appgrowing_mcp/actions.js +175 -0
- package/src/providers/appgrowing_mcp/executors.d.ts +4 -0
- package/src/providers/appgrowing_mcp/executors.js +66 -0
- package/src/providers/arcmira/executors.d.ts +3 -0
- package/src/providers/arcmira/executors.js +8 -0
- package/src/providers/arcmira/runtime.d.ts +6 -0
- package/src/providers/arcmira/runtime.js +41 -0
- package/src/providers/bainiu/actions.d.ts +2 -0
- package/src/providers/bainiu/actions.js +108 -0
- package/src/providers/bainiu/executors.d.ts +4 -0
- package/src/providers/bainiu/executors.js +113 -0
- package/src/providers/baixiao/executors.js +1 -1
- package/src/providers/bing_webmaster/executors.js +1 -1
- package/src/providers/chaport/actions.d.ts +2 -0
- package/src/providers/chaport/actions.js +70 -0
- package/src/providers/chaport/executors.d.ts +4 -0
- package/src/providers/chaport/executors.js +128 -0
- package/src/providers/clickup/runtime.js +49 -52
- package/src/providers/cnb/actions.d.ts +2 -0
- package/src/providers/cnb/actions.js +341 -0
- package/src/providers/cnb/executors.d.ts +4 -0
- package/src/providers/cnb/executors.js +135 -0
- package/src/providers/coupontools/runtime.js +11 -14
- package/src/providers/crtsh/executors.d.ts +3 -0
- package/src/providers/crtsh/executors.js +19 -0
- package/src/providers/crtsh/runtime.d.ts +17 -0
- package/src/providers/crtsh/runtime.js +84 -0
- package/src/providers/eastmoney_miaoxiang/actions.d.ts +2 -0
- package/src/providers/eastmoney_miaoxiang/actions.js +95 -0
- package/src/providers/eastmoney_miaoxiang/executors.d.ts +4 -0
- package/src/providers/eastmoney_miaoxiang/executors.js +81 -0
- package/src/providers/fastmoss_mcp/actions-content.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-content.js +140 -0
- package/src/providers/fastmoss_mcp/actions-creator.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-creator.js +154 -0
- package/src/providers/fastmoss_mcp/actions-product.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-product.js +167 -0
- package/src/providers/fastmoss_mcp/actions-research.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-research.js +174 -0
- package/src/providers/fastmoss_mcp/actions-shop.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-shop.js +142 -0
- package/src/providers/fastmoss_mcp/actions.js +11 -12
- package/src/providers/fastmoss_mcp/schemas.d.ts +51 -0
- package/src/providers/fastmoss_mcp/schemas.js +52 -0
- package/src/providers/ftshare/actions.d.ts +2 -0
- package/src/providers/ftshare/actions.js +124 -0
- package/src/providers/ftshare/executors.d.ts +4 -0
- package/src/providers/ftshare/executors.js +102 -0
- package/src/providers/fusion-api/operations.js +37 -0
- package/src/providers/fxbaogao/actions.d.ts +2 -0
- package/src/providers/fxbaogao/actions.js +74 -0
- package/src/providers/fxbaogao/executors.d.ts +4 -0
- package/src/providers/fxbaogao/executors.js +155 -0
- package/src/providers/github/app-installation.d.ts +37 -0
- package/src/providers/github/app-installation.js +233 -0
- package/src/providers/github/executors.js +93 -15
- package/src/providers/github/runtime-repository.js +21 -1
- package/src/providers/github/runtime-shared.d.ts +2 -0
- package/src/providers/github/runtime-shared.js +1 -0
- package/src/providers/googledrive/runtime-request.js +3 -3
- package/src/providers/hrmos_kintai/actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/actions.js +139 -0
- package/src/providers/hrmos_kintai/attendance-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/attendance-actions.js +276 -0
- package/src/providers/hrmos_kintai/business-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/business-actions.js +143 -0
- package/src/providers/hrmos_kintai/business-schemas.d.ts +4 -0
- package/src/providers/hrmos_kintai/business-schemas.js +320 -0
- package/src/providers/hrmos_kintai/executors.d.ts +4 -0
- package/src/providers/hrmos_kintai/executors.js +61 -0
- package/src/providers/hrmos_kintai/export-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/export-actions.js +58 -0
- package/src/providers/hrmos_kintai/operations.d.ts +9 -0
- package/src/providers/hrmos_kintai/operations.js +278 -0
- package/src/providers/hrmos_kintai/runtime.d.ts +10 -0
- package/src/providers/hrmos_kintai/runtime.js +217 -0
- package/src/providers/hrmos_kintai/schemas.d.ts +10 -0
- package/src/providers/hrmos_kintai/schemas.js +70 -0
- package/src/providers/humor_api/actions.d.ts +2 -0
- package/src/providers/humor_api/actions.js +96 -0
- package/src/providers/humor_api/executors.d.ts +4 -0
- package/src/providers/humor_api/executors.js +76 -0
- package/src/providers/kaonavi/actions.d.ts +4 -0
- package/src/providers/kaonavi/actions.js +144 -0
- package/src/providers/kaonavi/additional-actions.d.ts +10 -0
- package/src/providers/kaonavi/additional-actions.js +203 -0
- package/src/providers/kaonavi/executors.d.ts +4 -0
- package/src/providers/kaonavi/executors.js +69 -0
- package/src/providers/kaonavi/runtime.d.ts +4 -0
- package/src/providers/kaonavi/runtime.js +69 -0
- package/src/providers/linear_mcp/actions.d.ts +14 -0
- package/src/providers/linear_mcp/actions.js +134 -0
- package/src/providers/linear_mcp/runtime-mcp.d.ts +7 -1
- package/src/providers/linear_mcp/runtime-mcp.js +140 -28
- package/src/providers/linkfox/runtime.js +48 -51
- package/src/providers/listinggood/actions.d.ts +2 -0
- package/src/providers/listinggood/actions.js +95 -0
- package/src/providers/listinggood/executors.d.ts +4 -0
- package/src/providers/listinggood/executors.js +99 -0
- package/src/providers/mcp-tools.d.ts +3 -0
- package/src/providers/mcp-tools.js +5 -4
- package/src/providers/notion_mcp/executors.js +53 -24
- package/src/providers/notion_mcp/mcp-response.d.ts +26 -0
- package/src/providers/notion_mcp/mcp-response.js +95 -0
- package/src/providers/omise/executors.js +1 -1
- package/src/providers/outlook/executors.js +35 -2
- package/src/providers/porteden/actions.d.ts +2 -0
- package/src/providers/porteden/actions.js +162 -0
- package/src/providers/porteden/executors.d.ts +4 -0
- package/src/providers/porteden/executors.js +140 -0
- package/src/providers/provider-runtime.d.ts +3 -2
- package/src/providers/pushover/runtime.js +28 -31
- package/src/providers/qianfan/runtime.js +16 -19
- package/src/providers/qiuxiaoce/actions.d.ts +2 -0
- package/src/providers/qiuxiaoce/actions.js +248 -0
- package/src/providers/qiuxiaoce/executors.d.ts +4 -0
- package/src/providers/qiuxiaoce/executors.js +76 -0
- package/src/providers/qiuxiaoce/routes.d.ts +1 -0
- package/src/providers/qiuxiaoce/routes.js +20 -0
- package/src/providers/qqmusic/actions.d.ts +2 -0
- package/src/providers/qqmusic/actions.js +229 -0
- package/src/providers/qqmusic/executors.d.ts +4 -0
- package/src/providers/qqmusic/executors.js +92 -0
- package/src/providers/qqmusic/report-schema.d.ts +4 -0
- package/src/providers/qqmusic/report-schema.js +119 -0
- package/src/providers/rakuraku_seisan/actions.d.ts +2 -0
- package/src/providers/rakuraku_seisan/actions.js +50 -0
- package/src/providers/rakuraku_seisan/executors.d.ts +4 -0
- package/src/providers/rakuraku_seisan/executors.js +40 -0
- package/src/providers/rakuraku_seisan/runtime.d.ts +8 -0
- package/src/providers/rakuraku_seisan/runtime.js +251 -0
- package/src/providers/redfox/actions-account.d.ts +2 -0
- package/src/providers/redfox/actions-account.js +24 -0
- package/src/providers/redfox/actions-autohome.d.ts +2 -0
- package/src/providers/redfox/actions-autohome.js +51 -0
- package/src/providers/redfox/actions-baijiahao.d.ts +2 -0
- package/src/providers/redfox/actions-baijiahao.js +58 -0
- package/src/providers/redfox/actions-bilibili.d.ts +2 -0
- package/src/providers/redfox/actions-bilibili.js +67 -0
- package/src/providers/redfox/actions-dongchedi.d.ts +2 -0
- package/src/providers/redfox/actions-dongchedi.js +49 -0
- package/src/providers/redfox/actions-douyin.d.ts +2 -0
- package/src/providers/redfox/actions-douyin.js +297 -0
- package/src/providers/redfox/actions-generation.d.ts +2 -0
- package/src/providers/redfox/actions-generation.js +293 -0
- package/src/providers/redfox/actions-instagram.d.ts +2 -0
- package/src/providers/redfox/actions-instagram.js +49 -0
- package/src/providers/redfox/actions-kuaishou.d.ts +2 -0
- package/src/providers/redfox/actions-kuaishou.js +53 -0
- package/src/providers/redfox/actions-search.d.ts +2 -0
- package/src/providers/redfox/actions-search.js +125 -0
- package/src/providers/redfox/actions-tiktok.d.ts +2 -0
- package/src/providers/redfox/actions-tiktok.js +136 -0
- package/src/providers/redfox/actions-tools.d.ts +2 -0
- package/src/providers/redfox/actions-tools.js +151 -0
- package/src/providers/redfox/actions-toutiao.d.ts +2 -0
- package/src/providers/redfox/actions-toutiao.js +68 -0
- package/src/providers/redfox/actions-transcription.d.ts +2 -0
- package/src/providers/redfox/actions-transcription.js +165 -0
- package/src/providers/redfox/actions-wechat-channel.d.ts +2 -0
- package/src/providers/redfox/actions-wechat-channel.js +63 -0
- package/src/providers/redfox/actions-wechat.d.ts +2 -0
- package/src/providers/redfox/actions-wechat.js +302 -0
- package/src/providers/redfox/actions-weibo.d.ts +2 -0
- package/src/providers/redfox/actions-weibo.js +61 -0
- package/src/providers/redfox/actions-x.d.ts +2 -0
- package/src/providers/redfox/actions-x.js +126 -0
- package/src/providers/redfox/actions-xiaohongshu.d.ts +2 -0
- package/src/providers/redfox/actions-xiaohongshu.js +244 -0
- package/src/providers/redfox/actions-yiche.d.ts +2 -0
- package/src/providers/redfox/actions-yiche.js +59 -0
- package/src/providers/redfox/actions-youtube.d.ts +2 -0
- package/src/providers/redfox/actions-youtube.js +64 -0
- package/src/providers/redfox/actions-zhihu.d.ts +2 -0
- package/src/providers/redfox/actions-zhihu.js +26 -0
- package/src/providers/redfox/actions.d.ts +2 -0
- package/src/providers/redfox/actions.js +49 -0
- package/src/providers/redfox/executors.d.ts +2 -14
- package/src/providers/redfox/executors.js +28 -551
- package/src/providers/redfox/routes.d.ts +11 -0
- package/src/providers/redfox/routes.js +329 -0
- package/src/providers/redfox/runtime.d.ts +6 -0
- package/src/providers/redfox/runtime.js +151 -0
- package/src/providers/redfox/schemas.d.ts +9 -0
- package/src/providers/redfox/schemas.js +40 -0
- package/src/providers/registry.generated.js +30 -0
- package/src/providers/salesforce/context.d.ts +16 -0
- package/src/providers/salesforce/context.js +58 -0
- package/src/providers/salesforce/executors.d.ts +5 -0
- package/src/providers/salesforce/executors.js +54 -0
- package/src/providers/salesforce/media.d.ts +9 -0
- package/src/providers/salesforce/media.js +66 -0
- package/src/providers/salesforce/oauth.d.ts +2 -0
- package/src/providers/salesforce/oauth.js +89 -0
- package/src/providers/salesforce/runtime-analytics.d.ts +2 -0
- package/src/providers/salesforce/runtime-analytics.js +60 -0
- package/src/providers/salesforce/runtime-automation.d.ts +2 -0
- package/src/providers/salesforce/runtime-automation.js +64 -0
- package/src/providers/salesforce/runtime-base.d.ts +2 -0
- package/src/providers/salesforce/runtime-base.js +51 -0
- package/src/providers/salesforce/runtime-bulk.d.ts +2 -0
- package/src/providers/salesforce/runtime-bulk.js +98 -0
- package/src/providers/salesforce/runtime-data.d.ts +2 -0
- package/src/providers/salesforce/runtime-data.js +207 -0
- package/src/providers/salesforce/runtime-files.d.ts +2 -0
- package/src/providers/salesforce/runtime-files.js +108 -0
- package/src/providers/salesforce/transport.d.ts +9 -0
- package/src/providers/salesforce/transport.js +65 -0
- package/src/providers/sansan/actions.d.ts +2 -0
- package/src/providers/sansan/actions.js +165 -0
- package/src/providers/sansan/admin-actions.d.ts +2 -0
- package/src/providers/sansan/admin-actions.js +181 -0
- package/src/providers/sansan/admin.d.ts +2 -0
- package/src/providers/sansan/admin.js +42 -0
- package/src/providers/sansan/business-actions.d.ts +2 -0
- package/src/providers/sansan/business-actions.js +160 -0
- package/src/providers/sansan/business.d.ts +2 -0
- package/src/providers/sansan/business.js +51 -0
- package/src/providers/sansan/executors.d.ts +4 -0
- package/src/providers/sansan/executors.js +59 -0
- package/src/providers/sansan/file-schema.d.ts +2 -0
- package/src/providers/sansan/file-schema.js +8 -0
- package/src/providers/sansan/files.d.ts +11 -0
- package/src/providers/sansan/files.js +49 -0
- package/src/providers/sansan/organization-actions.d.ts +2 -0
- package/src/providers/sansan/organization-actions.js +198 -0
- package/src/providers/sansan/organization-columns.d.ts +2 -0
- package/src/providers/sansan/organization-columns.js +33 -0
- package/src/providers/sansan/organization.d.ts +2 -0
- package/src/providers/sansan/organization.js +88 -0
- package/src/providers/sansan/read.d.ts +2 -0
- package/src/providers/sansan/read.js +25 -0
- package/src/providers/sansan/request.d.ts +22 -0
- package/src/providers/sansan/request.js +94 -0
- package/src/providers/sansan/schemas.d.ts +7 -0
- package/src/providers/sansan/schemas.js +72 -0
- package/src/providers/shopee/runtime.d.ts +33 -29
- package/src/providers/shopee/runtime.js +166 -169
- package/src/providers/smarthr/actions.d.ts +2 -0
- package/src/providers/smarthr/actions.js +286 -0
- package/src/providers/smarthr/employee-runtime.d.ts +1 -0
- package/src/providers/smarthr/employee-runtime.js +63 -0
- package/src/providers/smarthr/employee-schema.d.ts +3 -0
- package/src/providers/smarthr/employee-schema.js +222 -0
- package/src/providers/smarthr/executors.d.ts +4 -0
- package/src/providers/smarthr/executors.js +35 -0
- package/src/providers/smarthr/pagination.d.ts +1 -0
- package/src/providers/smarthr/pagination.js +84 -0
- package/src/providers/smarthr/resource-routes.d.ts +16 -0
- package/src/providers/smarthr/resource-routes.js +163 -0
- package/src/providers/smarthr/runtime.d.ts +13 -0
- package/src/providers/smarthr/runtime.js +242 -0
- package/src/providers/smarthr/supplemental-actions.d.ts +2 -0
- package/src/providers/smarthr/supplemental-actions.js +541 -0
- package/src/providers/smooth/actions.d.ts +2 -0
- package/src/providers/smooth/actions.js +138 -0
- package/src/providers/smooth/executors.d.ts +4 -0
- package/src/providers/smooth/executors.js +102 -0
- package/src/providers/tapd/actions.d.ts +8 -0
- package/src/providers/tapd/actions.js +89 -0
- package/src/providers/tapd/executors.d.ts +4 -0
- package/src/providers/tapd/executors.js +137 -0
- package/src/providers/teable/runtime.js +12 -15
- package/src/providers/tencent_meeting_mcp/actions.d.ts +2 -0
- package/src/providers/tencent_meeting_mcp/actions.js +420 -0
- package/src/providers/tencent_meeting_mcp/executors.d.ts +4 -0
- package/src/providers/tencent_meeting_mcp/executors.js +117 -0
- package/src/providers/threatfox/executors.d.ts +4 -0
- package/src/providers/threatfox/executors.js +40 -0
- package/src/providers/threatfox/runtime.d.ts +15 -0
- package/src/providers/threatfox/runtime.js +128 -0
- package/src/providers/ticket_tailor/runtime.js +1 -1
- package/src/providers/ticketmaster/runtime.js +3 -6
- package/src/providers/timelinesai/runtime.js +13 -16
- package/src/providers/tradebee/actions.d.ts +2 -0
- package/src/providers/tradebee/actions.js +176 -0
- package/src/providers/tradebee/executors.d.ts +4 -0
- package/src/providers/tradebee/executors.js +83 -0
- package/src/providers/twittrapi/executors.d.ts +4 -0
- package/src/providers/twittrapi/executors.js +17 -0
- package/src/providers/twittrapi/runtime.d.ts +12 -0
- package/src/providers/twittrapi/runtime.js +203 -0
- package/src/providers/urlhaus/executors.d.ts +4 -0
- package/src/providers/urlhaus/executors.js +40 -0
- package/src/providers/urlhaus/runtime.d.ts +15 -0
- package/src/providers/urlhaus/runtime.js +142 -0
- package/src/providers/wangdian/runtime.js +16 -19
- package/src/providers/weread/actions.d.ts +2 -0
- package/src/providers/weread/actions.js +424 -0
- package/src/providers/weread/executors.d.ts +4 -0
- package/src/providers/weread/executors.js +98 -0
- package/src/providers/whatsapp/runtime.js +6 -1
- package/src/providers/workast/runtime.js +12 -17
- package/src/providers/youzan/runtime.js +21 -24
- package/src/providers/zenkit/runtime.js +13 -19
- package/src/providers/zhiliaobiaoxun/actions.d.ts +2 -0
- package/src/providers/zhiliaobiaoxun/actions.js +138 -0
- package/src/providers/zhiliaobiaoxun/executors.d.ts +4 -0
- package/src/providers/zhiliaobiaoxun/executors.js +78 -0
- package/src/server/api/auth.d.ts +2 -0
- package/src/server/api/auth.js +2 -1
- package/src/server/api/console-catalog-routes.d.ts +17 -0
- package/src/server/api/console-catalog-routes.js +88 -0
- package/src/server/api/console-oauth-routes.d.ts +18 -0
- package/src/server/api/console-oauth-routes.js +298 -0
- package/src/server/api/docs-routes.d.ts +12 -0
- package/src/server/api/docs-routes.js +38 -0
- package/src/server/api/http-utils.d.ts +1 -0
- package/src/server/api/http-utils.js +8 -0
- package/src/server/api/marketplace-routes.d.ts +7 -0
- package/src/server/api/marketplace-routes.js +62 -0
- package/src/server/api/mcp-routes.d.ts +18 -0
- package/src/server/api/mcp-routes.js +37 -0
- package/src/server/api/policy-routes.d.ts +13 -0
- package/src/server/api/policy-routes.js +50 -0
- package/src/server/api/policy-snapshot.d.ts +14 -0
- package/src/server/api/policy-snapshot.js +30 -0
- package/src/server/api/run-log-routes.d.ts +7 -0
- package/src/server/api/run-log-routes.js +70 -0
- package/src/server/api/runtime-api.d.ts +0 -7
- package/src/server/api/runtime-api.js +0 -13
- package/src/server/api/runtime-app-routes.d.ts +10 -0
- package/src/server/api/runtime-app-routes.js +72 -0
- package/src/server/api/runtime-catalog-routes.d.ts +37 -0
- package/src/server/api/runtime-catalog-routes.js +133 -0
- package/src/server/api/runtime-execution-routes.d.ts +16 -0
- package/src/server/api/runtime-execution-routes.js +198 -0
- package/src/server/api/saas-oauth-routes.d.ts +9 -0
- package/src/server/api/saas-oauth-routes.js +27 -0
- package/src/server/api/saas-project-routes.d.ts +7 -0
- package/src/server/api/saas-project-routes.js +16 -0
- package/src/server/api/transit-file-routes.d.ts +9 -0
- package/src/server/api/transit-file-routes.js +49 -0
- package/src/server/api/trigger-routes.d.ts +15 -0
- package/src/server/api/trigger-routes.js +48 -0
- package/src/server/connect-app.d.ts +1 -0
- package/src/server/connect-app.js +3 -1
- package/src/server/connect-server.d.ts +3 -54
- package/src/server/connect-server.js +95 -1148
- package/src/providers/fastmoss_mcp/official-tools.json +0 -2922
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oomol-lab/open-connector",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Embeddable Open Connector runtime for Node.js and Bun.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@aws-sdk/client-s3": "^3.1151.0",
|
|
19
19
|
"@cfworker/json-schema": "^4.1.1",
|
|
20
|
+
"@cloudflare/workers-oauth-provider": "^1.2.3",
|
|
20
21
|
"@hono/node-server": "^2.1.5",
|
|
21
22
|
"@modelcontextprotocol/client": "^2.3.1",
|
|
22
23
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
@@ -3,6 +3,30 @@ import { apiKeyCredentialFields } from "./core/provider-setup.js";
|
|
|
3
3
|
import { providerFetch, ProviderDispatchRequestError, withProviderHttpDispatchResult, } from "./providers/provider-runtime.js";
|
|
4
4
|
export const defaultConnectionName = "default";
|
|
5
5
|
const connectionNamePattern = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;
|
|
6
|
+
const OAUTH_REFRESH_PERSIST_ATTEMPTS = 3;
|
|
7
|
+
/**
|
|
8
|
+
* Lays a refresh result onto the connection's current credential. A refresh owns the token
|
|
9
|
+
* fields and the metadata keys it changed; everything else on `current` belongs to whoever
|
|
10
|
+
* bumped the revision and is kept.
|
|
11
|
+
*/
|
|
12
|
+
function mergeRefreshedOAuthCredential(current, spent, refreshed) {
|
|
13
|
+
const metadata = { ...current.metadata };
|
|
14
|
+
for (const [key, value] of Object.entries(refreshed.metadata)) {
|
|
15
|
+
if (JSON.stringify(value) !== JSON.stringify(spent.metadata[key]))
|
|
16
|
+
metadata[key] = value;
|
|
17
|
+
}
|
|
18
|
+
// A successful refresh proves the authorization is live, so a concurrent refusal's mark is stale.
|
|
19
|
+
delete metadata.oauthReauthRequired;
|
|
20
|
+
return {
|
|
21
|
+
...current,
|
|
22
|
+
accessToken: refreshed.accessToken,
|
|
23
|
+
tokenType: refreshed.tokenType,
|
|
24
|
+
expiresAt: refreshed.expiresAt,
|
|
25
|
+
refreshToken: refreshed.refreshToken,
|
|
26
|
+
providerSecret: refreshed.providerSecret,
|
|
27
|
+
metadata,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* Coordinates local provider connection state.
|
|
8
32
|
*
|
|
@@ -504,7 +528,15 @@ export class ConnectionService {
|
|
|
504
528
|
if (!this.oauthCredentials) {
|
|
505
529
|
throw new ConnectionError("oauth_refresh_unavailable", `${service} OAuth access token expired and this runtime cannot refresh it.`);
|
|
506
530
|
}
|
|
507
|
-
|
|
531
|
+
// Single-flight on the refresh token being spent, not the row revision: a single-use
|
|
532
|
+
// (rotating) refresh token must reach the provider once even when an unrelated write
|
|
533
|
+
// bumps the revision mid-refresh. A new authorization must refresh independently,
|
|
534
|
+
// even when the provider reuses the same refresh token across reconnects.
|
|
535
|
+
const refreshKey = JSON.stringify([
|
|
536
|
+
connection.id,
|
|
537
|
+
credential.refreshToken,
|
|
538
|
+
credential.metadata.oauthAuthorizationId,
|
|
539
|
+
]);
|
|
508
540
|
const currentRefresh = this.oauthCredentialRefreshes.get(refreshKey);
|
|
509
541
|
if (currentRefresh) {
|
|
510
542
|
return currentRefresh;
|
|
@@ -539,17 +571,29 @@ export class ConnectionService {
|
|
|
539
571
|
}
|
|
540
572
|
throw error;
|
|
541
573
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
574
|
+
// The provider has now spent the old refresh token. With rotating single-use refresh
|
|
575
|
+
// tokens, discarding `nextCredential` loses the connection for good, so a lost
|
|
576
|
+
// revision race re-reads the row and lands the refreshed token fields on the latest
|
|
577
|
+
// revision, as long as that row still holds the credential this refresh spent.
|
|
578
|
+
let target = { ...connection, source: "local", credential: nextCredential };
|
|
579
|
+
for (let attempt = 0; attempt < OAUTH_REFRESH_PERSIST_ATTEMPTS; attempt++) {
|
|
580
|
+
if (await this.store.updateCredential(target, true))
|
|
581
|
+
return target.credential;
|
|
582
|
+
const current = await this.store.get(service, connectionName);
|
|
583
|
+
if (current?.source === "saas" ||
|
|
584
|
+
current?.id !== id ||
|
|
585
|
+
current.credential.authType !== "oauth2" ||
|
|
586
|
+
current.credential.refreshToken !== credential.refreshToken ||
|
|
587
|
+
current.credential.metadata.oauthAuthorizationId !== credential.metadata.oauthAuthorizationId) {
|
|
588
|
+
// Deleted, converted, reconnected, or already rotated elsewhere: never overwrite it.
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
target = {
|
|
592
|
+
...current,
|
|
593
|
+
credential: mergeRefreshedOAuthCredential(current.credential, credential, nextCredential),
|
|
594
|
+
};
|
|
551
595
|
}
|
|
552
|
-
|
|
596
|
+
throw new ConnectionError("connection_not_found", `${service} connection changed while its OAuth credential was refreshing. Retry the action.`);
|
|
553
597
|
}
|
|
554
598
|
async runCredentialValidator(service, validate, signal) {
|
|
555
599
|
this.assertNotCancelled(signal);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The error codes a provider may put in `ProviderRequestError`'s `code`
|
|
3
|
+
* argument. Every other code `mapExecutionErrorStatus` knows is raised by the
|
|
4
|
+
* connection, policy or dispatch layer, and a provider that borrowed one would
|
|
5
|
+
* answer with a status that has nothing to do with what its upstream said.
|
|
6
|
+
*/
|
|
7
|
+
export declare const providerErrorCodes: readonly ["authorization_failed", "insufficient_credit", "invalid_input", "provider_error", "rate_limited"];
|
|
8
|
+
/** Error codes owned by provider execution. */
|
|
9
|
+
export type ProviderErrorCode = (typeof providerErrorCodes)[number];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The error codes a provider may put in `ProviderRequestError`'s `code`
|
|
3
|
+
* argument. Every other code `mapExecutionErrorStatus` knows is raised by the
|
|
4
|
+
* connection, policy or dispatch layer, and a provider that borrowed one would
|
|
5
|
+
* answer with a status that has nothing to do with what its upstream said.
|
|
6
|
+
*/
|
|
7
|
+
export const providerErrorCodes = [
|
|
8
|
+
"authorization_failed",
|
|
9
|
+
"insufficient_credit",
|
|
10
|
+
"invalid_input",
|
|
11
|
+
"provider_error",
|
|
12
|
+
"rate_limited",
|
|
13
|
+
];
|
package/src/core/request.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export interface BoundedResponseBytesOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function readBoundedResponseBytes(response: Response, options: BoundedResponseBytesOptions): Promise<Uint8Array>;
|
|
41
41
|
export interface TransitResponseOptions {
|
|
42
|
+
/** Optional provider limit, further bounded by the storage limit. */
|
|
43
|
+
maxBytes?: number;
|
|
42
44
|
/** Name the stored transit file carries. */
|
|
43
45
|
name: string;
|
|
44
46
|
mimeType: string;
|
package/src/core/request.js
CHANGED
|
@@ -116,7 +116,7 @@ export async function readBoundedResponseBytes(response, options) {
|
|
|
116
116
|
*/
|
|
117
117
|
export async function storeResponseInTransit(response, transitFiles, options) {
|
|
118
118
|
const limits = {
|
|
119
|
-
maxBytes: transitFiles.maxBytes,
|
|
119
|
+
maxBytes: Math.min(transitFiles.maxBytes, options.maxBytes ?? transitFiles.maxBytes),
|
|
120
120
|
fieldName: options.fieldName,
|
|
121
121
|
createError: options.createError,
|
|
122
122
|
signal: options.signal,
|
|
@@ -135,9 +135,18 @@ export async function storeResponseInTransit(response, transitFiles, options) {
|
|
|
135
135
|
void response.body.cancel().catch(() => undefined);
|
|
136
136
|
assertMaxBytes(contentLength, limits);
|
|
137
137
|
}
|
|
138
|
+
let size = 0;
|
|
139
|
+
const body = response.body.pipeThrough(new TransformStream({
|
|
140
|
+
transform(chunk, controller) {
|
|
141
|
+
options.signal?.throwIfAborted();
|
|
142
|
+
size += chunk.byteLength;
|
|
143
|
+
assertMaxBytes(size, limits);
|
|
144
|
+
controller.enqueue(chunk);
|
|
145
|
+
},
|
|
146
|
+
}), { signal: options.signal });
|
|
138
147
|
try {
|
|
139
148
|
return await transitFiles.createFromStream({
|
|
140
|
-
body
|
|
149
|
+
body,
|
|
141
150
|
name: options.name.toWellFormed(),
|
|
142
151
|
mimeType,
|
|
143
152
|
signal: options.signal,
|
|
@@ -495,15 +495,16 @@ function normalizeAddress(value) {
|
|
|
495
495
|
email: readString(record?.address) ?? readString(record?.email),
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
-
function collectBodyParts(bodyStructure) {
|
|
498
|
+
function collectBodyParts(bodyStructure, isRoot = true) {
|
|
499
499
|
const record = toRecord(bodyStructure);
|
|
500
500
|
if (!record) {
|
|
501
501
|
return [];
|
|
502
502
|
}
|
|
503
503
|
const childNodes = record.childNodes;
|
|
504
|
-
const childParts = Array.isArray(childNodes) ? childNodes.flatMap(collectBodyParts) : [];
|
|
504
|
+
const childParts = Array.isArray(childNodes) ? childNodes.flatMap((child) => collectBodyParts(child, false)) : [];
|
|
505
505
|
const type = readString(record.type)?.toLowerCase();
|
|
506
|
-
|
|
506
|
+
// IMAP addresses a single-part root as section 1; ImapFlow leaves its part unset.
|
|
507
|
+
const part = readString(record.part) ?? (isRoot ? "1" : null);
|
|
507
508
|
if (!type || !part || !type.startsWith("text/") || isAttachment(record)) {
|
|
508
509
|
return childParts;
|
|
509
510
|
}
|
|
@@ -178,6 +178,7 @@ export class OAuthFlowService {
|
|
|
178
178
|
if (providerOAuth?.exchangeCode) {
|
|
179
179
|
return providerOAuth.exchangeCode({
|
|
180
180
|
code: input.code,
|
|
181
|
+
codeVerifier: pending.pkceCodeVerifier,
|
|
181
182
|
state: pending.state,
|
|
182
183
|
callbackQuery: input.callbackQuery,
|
|
183
184
|
callbackParameters: input.callbackParameters,
|
|
@@ -12,6 +12,8 @@ export interface OAuthTokenResult {
|
|
|
12
12
|
}
|
|
13
13
|
export interface OAuthCodeExchangeInput {
|
|
14
14
|
code: string;
|
|
15
|
+
/** Verifier belonging to the claimed authorization state. */
|
|
16
|
+
codeVerifier?: string;
|
|
15
17
|
/** State already claimed by the shared OAuth lifecycle. */
|
|
16
18
|
state?: string;
|
|
17
19
|
/** Original query string, preserving duplicate parameters for signature verification. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalNumber, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
export const seventeenTrackApiBaseUrl = "https://api.17track.net/track/v2.4";
|
|
4
4
|
const seventeenTrackMaxResponseBytes = 1_048_576;
|
|
5
5
|
export const seventeenTrackActionHandlers = {
|
|
@@ -55,29 +55,26 @@ async function requestSeventeenTrack(path, body, apiKey, context, phase) {
|
|
|
55
55
|
throw error;
|
|
56
56
|
}
|
|
57
57
|
const timedOut = timeout.didTimeout() || isAbortLikeError(error);
|
|
58
|
-
throw
|
|
58
|
+
throw new ProviderRequestError(timedOut ? 504 : 502, timedOut ? "17TRACK request timed out" : error instanceof Error ? error.message : "17TRACK request failed");
|
|
59
59
|
}
|
|
60
60
|
finally {
|
|
61
61
|
timeout.cleanup();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function providerError(_code, message, status) {
|
|
65
|
-
return new ProviderRequestError(status, message);
|
|
66
|
-
}
|
|
67
64
|
async function readPayload(response) {
|
|
68
65
|
const text = await readResponseText(response);
|
|
69
66
|
if (!text.trim()) {
|
|
70
67
|
if (!response.ok) {
|
|
71
68
|
return undefined;
|
|
72
69
|
}
|
|
73
|
-
throw
|
|
70
|
+
throw providerResponseError("17TRACK returned an empty response");
|
|
74
71
|
}
|
|
75
72
|
try {
|
|
76
73
|
return JSON.parse(text);
|
|
77
74
|
}
|
|
78
75
|
catch {
|
|
79
76
|
if (response.ok) {
|
|
80
|
-
throw
|
|
77
|
+
throw providerResponseError(`17TRACK returned non-JSON response (${response.status})`);
|
|
81
78
|
}
|
|
82
79
|
return text;
|
|
83
80
|
}
|
|
@@ -113,13 +110,13 @@ async function readResponseText(response) {
|
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
112
|
function responseTooLargeError() {
|
|
116
|
-
return
|
|
113
|
+
return providerResponseError(`17TRACK response exceeds ${seventeenTrackMaxResponseBytes} bytes`);
|
|
117
114
|
}
|
|
118
115
|
function assertSuccessfulEnvelope(payload, phase) {
|
|
119
116
|
const raw = readObject(payload, "body");
|
|
120
117
|
const code = optionalNumber(raw.code);
|
|
121
118
|
if (code === undefined) {
|
|
122
|
-
throw
|
|
119
|
+
throw providerResponseError("17TRACK response is missing code");
|
|
123
120
|
}
|
|
124
121
|
const data = optionalRecord(raw.data);
|
|
125
122
|
const errors = Array.isArray(data?.errors) ? data.errors : [];
|
|
@@ -131,28 +128,28 @@ function assertSuccessfulEnvelope(payload, phase) {
|
|
|
131
128
|
function createHttpError(response, payload, phase) {
|
|
132
129
|
const message = readErrorMessage(payload) ?? `17TRACK API request failed with status ${response.status}`;
|
|
133
130
|
if (response.status === 429) {
|
|
134
|
-
return
|
|
131
|
+
return new ProviderRequestError(429, message);
|
|
135
132
|
}
|
|
136
133
|
if (response.status === 401 || response.status === 403) {
|
|
137
|
-
return
|
|
134
|
+
return new ProviderRequestError(phase === "validate" ? 400 : response.status, message);
|
|
138
135
|
}
|
|
139
136
|
if (response.status === 400 || response.status === 422) {
|
|
140
|
-
return
|
|
137
|
+
return new ProviderRequestError(response.status, message);
|
|
141
138
|
}
|
|
142
|
-
return
|
|
139
|
+
return new ProviderRequestError(response.status || 502, message);
|
|
143
140
|
}
|
|
144
141
|
function createEmbeddedError(code, message, phase) {
|
|
145
142
|
const detail = message ?? `17TRACK API returned error ${code}`;
|
|
146
143
|
if ([-18010001, -18010002, -18010004, -18010005].includes(code)) {
|
|
147
|
-
return
|
|
144
|
+
return new ProviderRequestError(phase === "validate" ? 400 : 401, detail);
|
|
148
145
|
}
|
|
149
146
|
if (code === -18019907 || code === -18019908) {
|
|
150
|
-
return
|
|
147
|
+
return new ProviderRequestError(429, detail);
|
|
151
148
|
}
|
|
152
149
|
if (code === -18010003 || [-18019815, -18019816, -18019817].includes(code)) {
|
|
153
|
-
return
|
|
150
|
+
return providerResponseError(detail);
|
|
154
151
|
}
|
|
155
|
-
return
|
|
152
|
+
return providerInputError(detail);
|
|
156
153
|
}
|
|
157
154
|
function readErrorMessage(payload) {
|
|
158
155
|
if (typeof payload === "string" && payload.trim()) {
|
|
@@ -201,21 +198,21 @@ function normalizeQuotaResponse(payload) {
|
|
|
201
198
|
}
|
|
202
199
|
function readObjectArray(value, fieldName) {
|
|
203
200
|
if (!Array.isArray(value)) {
|
|
204
|
-
throw
|
|
201
|
+
throw providerResponseError(`17TRACK response field ${fieldName} is not an array`);
|
|
205
202
|
}
|
|
206
203
|
return value.map((item) => readObject(item, `${fieldName} item`));
|
|
207
204
|
}
|
|
208
205
|
function readObject(value, fieldName) {
|
|
209
206
|
const object = optionalRecord(value);
|
|
210
207
|
if (!object) {
|
|
211
|
-
throw
|
|
208
|
+
throw providerResponseError(`17TRACK response field ${fieldName} is not an object`);
|
|
212
209
|
}
|
|
213
210
|
return object;
|
|
214
211
|
}
|
|
215
212
|
function readNumber(value, fieldName) {
|
|
216
213
|
const number = optionalNumber(value);
|
|
217
214
|
if (number === undefined) {
|
|
218
|
-
throw
|
|
215
|
+
throw providerResponseError(`17TRACK response field ${fieldName} is not a number`);
|
|
219
216
|
}
|
|
220
217
|
return number;
|
|
221
218
|
}
|