Skip to content

feature: System plugin #5131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Jul 2, 2025
Merged

feature: System plugin #5131

merged 42 commits into from
Jul 2, 2025

Conversation

c121914yu
Copy link
Collaborator

No description provided.

FinleyGe and others added 30 commits June 30, 2025 18:50
* feat: independent system tool

* chore: use ToolNode instead of PluginModule

* chore: tools

* chore: tools templateDir

* refactor: templates

* feat: flush code

* chore: update template

* refactor: migrate delay

* feat: worker pool

* chore: Dockerfile

* docs:  add tools.template.json

* feat: auto flush system tools

* fix: ts error

* chore: create new pool temporarily

* chore: system tool migration

* chore: migration

* fix: fix pnpm-workspace.yaml

* chore: update pnpm-lock.yaml to integrate tool

* chore(systemTool): chore

* chore: add system plugin

* chore(deps): update @fastgpt-sdk/plugin

* fix: type error

* chore: remove plugin package

* chore: move pro plugins code to open source

* feat: support system tool config input

* fix: type error

* perf: i18n

* fix: cr

* chore: update sdk

* feat: system plugin cache
* update mcp server

* fix: action

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile

* fix: dockerfile
* feat: independent system tool

* chore: use ToolNode instead of PluginModule

* chore: tools

* chore: tools templateDir

* refactor: templates

* feat: flush code

* chore: update template

* refactor: migrate delay

* feat: worker pool

* chore: Dockerfile

* docs:  add tools.template.json

* feat: auto flush system tools

* fix: ts error

* chore: create new pool temporarily

* chore: system tool migration

* chore: migration

* fix: fix pnpm-workspace.yaml

* chore: update pnpm-lock.yaml to integrate tool

* chore(systemTool): chore

* chore: add system plugin

* chore(deps): update @fastgpt-sdk/plugin

* fix: type error

* chore: remove plugin package

* chore: move pro plugins code to open source

* feat: support system tool config input

* fix: type error

* perf: i18n

* fix: cr

* chore: update sdk

* feat: system plugin cache
* feat: support inputConfig switch

* deps: update @fastgpt-sdk/plugin

* chore: update workflows

* fix: inputType
* Proxies image requests to plugin service

Adds a rewrite rule and API endpoint to proxy image requests
to the plugin service. This allows the app to fetch images from
the plugin's tools directory.

It also adds the plugin base URL to the service's constants, so that
it can use the plugin URL when proxying requests.

* fix: update FastGPTPluginUrl to remove unnecessary API path

* feat: update image proxy destination and add plugin image handler
c121914yu and others added 11 commits July 1, 2025 17:02
* update docker-compose configuration: bump fastgpt and fastgpt-plugin images, change minio host to service name, and adjust service dependencies

* refactor: comment out port exposure in docker-compose configuration

* update: uncomment port exposure in docker-compose configuration

* update: change MINIO_HOST to use specific IP address in docker configuration

* update: modify fastgpt-plugin image version in docker configuration
Copy link
Contributor

gru-agent bot commented Jul 2, 2025

There is too much information in the pull request to test.

Copy link

github-actions bot commented Jul 2, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 21.98% 11958 / 54401
🔵 Statements 21.98% 11958 / 54401
🔵 Functions 28.67% 310 / 1081
🔵 Branches 66.96% 835 / 1247
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/global/common/error/utils.ts 13.33% 100% 0% 13.33% 4-17
packages/global/common/i18n/utils.ts 25% 100% 0% 25% 4-6
packages/global/core/app/utils.ts 6.17% 100% 0% 6.17% 14-38, 42-173, 176-190, 193-198
packages/global/core/app/httpPlugin/utils.ts 0% 0% 0% 0% 1-390
packages/global/core/app/mcpTools/utils.ts 9.09% 100% 0% 9.09% 19-53, 56-99
packages/global/core/app/plugin/constants.ts 100% 100% 100% 100%
packages/global/core/app/systemTool/constants.ts 100% 100% 100% 100%
packages/global/core/chat/utils.ts 7.1% 100% 0% 7.1% 16-23, 27-34, 38-84, 88-120, 124-154, 157-168, 171-174, 177-193, 201-248
packages/global/core/workflow/constants.ts 100% 100% 100% 100%
packages/global/core/workflow/utils.ts 8.88% 100% 0% 8.88% 56-57, 60-64, 68-73, 75-124, 128-170, 173-183, 191-192, 195-234, 237-309, 312-325, 328-341, 344-350, 354-355, 362-369, 377-383, 386-387, 391-422, 426-445
packages/global/core/workflow/node/constant.ts 100% 100% 100% 100%
packages/global/core/workflow/runtime/utils.ts 23.62% 91.93% 13.33% 23.62% 24-33, 35-49, 131-132, 141-146, 165-202, 205-216, 219-242, 245-266, 269-274, 281-369, 377-424, 427-448, 451-494, 497-527, 531-553
packages/global/core/workflow/template/constants.ts 100% 100% 100% 100%
packages/global/core/workflow/template/tip.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/assignedAnswer.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/comment.ts 0% 0% 0% 0% 1-39
packages/global/core/workflow/template/system/customFeedback.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/datasetConcat.ts 78.84% 100% 0% 78.84% 19-31
packages/global/core/workflow/template/system/datasetSearch.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/emptyNode.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/http468.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/laf.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/pluginConfig.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/pluginInput.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/pluginOutput.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/queryExtension.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/runApp.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/runPlugin.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/runTool.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/runToolSet.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/stopTool.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/systemConfig.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/textEditor.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/toolParams.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/workflowStart.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/abandoned/runApp/index.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/aiChat/index.ts 97.14% 100% 0% 97.14% 157-160
packages/global/core/workflow/template/system/classifyQuestion/index.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/contextExtract/index.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/ifElse/index.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/interactive/formInput.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/interactive/userSelect.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/loop/loop.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/loop/loopEnd.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/loop/loopStart.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/sandbox/index.ts 100% 100% 100% 100%
packages/service/common/middle/i18n.ts 0% 0% 0% 0% 1-15
packages/service/common/secret/utils.ts 12.82% 100% 0% 12.82% 7-15, 18-23, 26-50
packages/service/common/system/constants.ts 100% 0% 0% 100%
packages/service/core/app/controller.ts 0% 100% 100% 0% 2-112
packages/service/core/app/utils.ts 0% 0% 0% 0% 1-174
packages/service/core/app/plugin/controller.ts 5.33% 100% 0% 5.33% 45-66, 77-332, 335-372, 375-376, 379-386, 389-466, 469-482
packages/service/core/app/plugin/systemPluginSchema.ts 100% 100% 100% 100%
packages/service/core/app/plugin/utils.ts 17.64% 100% 0% 17.64% 15-36
packages/service/core/app/tool/api.ts 14.28% 100% 0% 14.28% 9-51
packages/service/core/workflow/dispatch/index.ts 12.82% 100% 0% 12.82% 128-794, 798-821, 825-849
packages/service/core/workflow/dispatch/dataset/search.ts 4.62% 100% 0% 4.62% 49-278
packages/service/core/workflow/dispatch/plugin/run.ts 11.11% 100% 0% 11.11% 30-175
packages/service/core/workflow/dispatch/plugin/runTool.ts 9.32% 100% 0% 9.32% 37-153
packages/service/core/workflow/dispatch/tools/http468.ts 7.3% 100% 0% 7.3% 67-411
packages/service/support/permission/app/auth.ts 82.35% 88% 66.66% 82.35% 19-37, 58-59, 69-70, 146-147
packages/service/worker/utils.ts 9.21% 50% 0% 9.21% 14-22, 25-29, 32-58, 84-206, 211-224
packages/templates/register.ts 0% 0% 0% 0% 1-88
packages/web/core/workflow/constants.ts 100% 100% 100% 100%
packages/web/hooks/useI18n.ts 0% 0% 0% 0% 1-67
projects/app/src/instrumentation.ts 0% 0% 0% 0% 1-67
projects/app/src/components/Markdown/utils.ts 97.05% 87.5% 100% 97.05% 27
projects/app/src/global/core/chat/utils.ts 100% 95.65% 100% 100%
projects/app/src/pages/api/core/app/detail.ts 0% 100% 100% 0% 2-41
projects/app/src/pages/api/core/app/httpPlugin/create.ts 0% 0% 0% 0% 1-85
projects/app/src/pages/api/core/app/plugin/getPreviewNode.ts 0% 100% 100% 0% 4-34
projects/app/src/pages/api/core/app/plugin/getSystemPluginTemplates.ts 0% 100% 100% 0% 2-50
projects/app/src/pages/api/core/app/plugin/getVersionList.ts 0% 100% 100% 0% 2-102
projects/app/src/pages/api/core/app/plugin/path.ts 0% 100% 100% 0% 2-39
projects/app/src/pages/api/system/pluginImgs/[...path].ts 0% 0% 0% 0% 1-56
projects/app/src/service/common/system/cronTask.ts 0% 0% 0% 0% 1-215
projects/app/src/service/common/system/index.ts 26.82% 100% 16.66% 26.82% 26-46, 52-54, 57-58, 61-63, 66-68, 71-73, 83-103, 125-206
projects/app/src/service/common/system/volumnMongoWatch.ts 0% 0% 0% 0% 1-51
projects/app/src/service/core/app/utils.ts 0% 0% 0% 0% 1-130
projects/app/src/web/core/app/utils.ts 9.44% 100% 0% 9.44% 48-574, 576-581, 624-629
projects/app/src/web/core/chat/utils.ts 0% 0% 0% 0% 1-47
projects/app/src/web/core/workflow/adapt.ts 16.29% 100% 0% 16.29% 27-66, 235-496
projects/app/src/web/core/workflow/utils.ts 42.33% 66% 36.36% 42.33% 87, 127-132, 174-189, 193-203, 207-220, 224-260, 330-375, 395-396, 405-406, 409-429, 431-441, 452-516, 523-538, 542-654
Generated in workflow #1300 for commit 39feb25 by the Vitest Coverage Report Action

Copy link

github-actions bot commented Jul 2, 2025

Preview mcp_server Image: ghcr.io/labring/fastgpt-pr:fatsgpt_mcp_server_9964178a8078f32f3204d29abc1476e3268f8025

Copy link

cloudflare-workers-and-pages bot commented Jul 2, 2025

Deploying fastgpt-doc with  Cloudflare Pages  Cloudflare Pages

Latest commit: 39feb25
Status: ✅  Deploy successful!
Preview URL: https://14d70afd.fastgpt-8gr.pages.dev
Branch Preview URL: https://test-tool.fastgpt-8gr.pages.dev

View logs

Copy link

github-actions bot commented Jul 2, 2025

Deployment Status: ✅ Success
🔗 Preview URL: https://a6846e40.fastgpt-8gr.pages.dev

Copy link

github-actions bot commented Jul 2, 2025

Preview sandbox Image: ghcr.io/labring/fastgpt-pr:fatsgpt_sandbox_9964178a8078f32f3204d29abc1476e3268f8025

Copy link

github-actions bot commented Jul 2, 2025

Preview fastgpt Image: ghcr.io/labring/fastgpt-pr:fatsgpt_9964178a8078f32f3204d29abc1476e3268f8025

Copy link

github-actions bot commented Jul 2, 2025

Preview fastgpt Image: ghcr.io/labring/fastgpt-pr:fatsgpt_39feb25551e63f4639ca051550d08cbea43db47a

Copy link

github-actions bot commented Jul 2, 2025

Preview sandbox Image: ghcr.io/labring/fastgpt-pr:fatsgpt_sandbox_39feb25551e63f4639ca051550d08cbea43db47a

Copy link

github-actions bot commented Jul 2, 2025

Preview mcp_server Image: ghcr.io/labring/fastgpt-pr:fatsgpt_mcp_server_39feb25551e63f4639ca051550d08cbea43db47a

Copy link

github-actions bot commented Jul 2, 2025

Deployment Status: ✅ Success
🔗 Preview URL: https://14d70afd.fastgpt-8gr.pages.dev

@c121914yu c121914yu merged commit 33d40fd into main Jul 2, 2025
11 checks passed
@c121914yu c121914yu deleted the test-tool branch July 10, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants