Skip to content

Commit a499d05

Browse files
c121914yuxqvvufishwww-wwnewfish-cmykFinleyGe
authored
V4.14.0 features (#5850)
* feat: migrate chat files to s3 (#5802) * feat: migrate chat files to s3 * feat: add delete jobs for deleting s3 files * chore: improvements * fix: lockfile * fix: imports * feat: add ttl for those uploaded files but not send yet * feat: init bullmq worker * fix: s3 key * perf: s3 internal url * remove env * fix: re-sign a new url * fix: re-sign a new url * perf: s3 code --------- Co-authored-by: archer <[email protected]> * update pacakge * feat: add more file type for uploading (#5807) * fix: re-sign a new url * wip: file selector * feat: add more file type for uploading * feat: migrate chat files to s3 (#5802) * feat: migrate chat files to s3 * feat: add delete jobs for deleting s3 files * chore: improvements * fix: lockfile * fix: imports * feat: add ttl for those uploaded files but not send yet * feat: init bullmq worker * fix: s3 key * perf: s3 internal url * remove env * fix: re-sign a new url * fix: re-sign a new url * perf: s3 code --------- Co-authored-by: archer <[email protected]> * fix: limit minmax available file upload number * perf: file select modal code * fix: fileselect refresh * fix: ts --------- Co-authored-by: archer <[email protected]> * bugfix: chat page (#5809) * fix: upload avatar * fix: chat page username display issue and setting button visibility * doc * Markdown match base64 performance * feat: improve global variables(time, file, dataset) (#5804) * feat: improve global variables(time, file, dataset) * feat: optimize code * perf: time variables code * fix: model, file * fix: hide file upload * fix: ts * hide dataset select --------- Co-authored-by: archer <[email protected]> * perf: insert training queue * perf: s3 upload error i18n * fix: share page s3 * fix: timeselector ui error * var update node * Timepicker ui * feat: plugin support password * fix: password disabled UX * fix: button size * fix: no model cache for chat page (#5820) * rename function * fix: workflow bug * fix: interactive loop * fix test * perf: common textare no richtext * move system plugin config (#5803) (#5813) * move system plugin config (#5803) * move system plugin config * extract tag bar * filter * tool detail temp * marketplace * params * fix * type * search * tags render * status * ui * code * connect to backend (#5815) * feat: marketplace apis & type definitions (#5817) * chore: marketplace init * chore: marketplace list api type * chore: detail api * marketplace & import * feat: marketplace ui (#5826) * temp * marketplace * import * feat: detail return readme * chore: cache data expire 10 mins * chore: update docs * feat: marketplace ui --------- Co-authored-by: heheer <[email protected]> * feat: marketplace (#5830) * temp * marketplace * chore: tool list tag filter * chore: adjust --------- Co-authored-by: heheer <[email protected]> * tool detail drawer * remove tag filter * fix * fix * fix build * update pnpm-lock * fix type * perf code * marketplace router * fix build * navbar icon * fix ui * fix init * docs: marketplace/plugin (#5832) * temp * marketplace * docs(plugin): system tool docs --------- Co-authored-by: heheer <[email protected]> * default url * feat: i18n/ docker build (#5833) * chore: docker build * feat: i18n selector * fix * fix * fix: i18n parse * fix: i18n parse --------- Co-authored-by: heheer <[email protected]> Co-authored-by: Finley Ge <[email protected]> Co-authored-by: heheer <[email protected]> * marketplace url * update action * market place code * market place code * title * fix: nextconfig * fix: copilot review * Remove bypassable regex-based XSS sanitization from marketplace search (#5835) * Initial plan * Remove problematic regex-based XSS sanitization from search inputs Co-authored-by: c121914yu <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: c121914yu <[email protected]> * feat: tool tag openapi * api check * fix: tsc * fix: ts * fix: lock * sdk version * ts * sdk version * remove invalid tip * perf: export data add timezone * perf: admin plugin api move * perf: tool code * move tag code * perf: marketplace and team plugin code * remove workflow invalid request * rename global tool code * rename global tool code * rename api * fix some bugs (#5841) * fix some bugs * fix * perf: Tag filter * fix: ts * fix: ts --------- Co-authored-by: archer <[email protected]> * perf: Concat function * fix: workflow snapshot push * fix: ts type * fix: login to config/* * fix: ts * fix: model avatar (#5848) * fix: model avatar * fix: ts * fix: avatar migration to s3 * update lock * fix: avatar redirect --------- Co-authored-by: archer <[email protected]> * fix tool detail (#5847) * fix tool detail * init script * fix build * perf: plugin detail modal * change tooltags to tags * fix icon --------- Co-authored-by: archer <[email protected]> * fix tag filter scroll (#5852) * fix create app plugin & import info (#5853) * tag size * rename toolkit * download url * import plugin status (#5854) * init doc * fix: init shell --------- Co-authored-by: 伍闲犬 <[email protected]> Co-authored-by: Zeng Qingwen <[email protected]> Co-authored-by: heheer <[email protected]> Co-authored-by: Finley Ge <[email protected]> Co-authored-by: heheer <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent fac1703 commit a499d05

File tree

364 files changed

+15054
-3517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

364 files changed

+15054
-3517
lines changed

CLAUDE.md renamed to .claude/CLAUDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,9 @@ FastGPT 是一个 AI Agent 构建平台,通过 Flow 提供开箱即用的数据
118118

119119
## 代码规范
120120

121-
- 尽可能使用 type 进行类型声明,而不是 interface。
121+
- 尽可能使用 type 进行类型声明,而不是 interface。
122+
123+
## Agent 设计规范
124+
125+
1. 对于功能的实习和复杂问题修复,优先进行文档设计,并于让用户确认后,再进行执行修复。
126+
2. 采用"设计文档-测试示例-代码编写-测试运行-修正代码/文档"的工作模式,以测试为核心来确保设计的正确性。

.claude/design/projects_app_performance_stability_analysis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ addActiveNode(nodeId: string) {
8080

8181
---
8282

83-
### 🔴 H2. MongoDB 连接池配置缺失
83+
### 🔴 H2. MongoDB 连接池配置缺失(已解决)
8484

8585
**位置**:
8686
- `packages/service/common/mongo/index.ts:12-24`
@@ -147,7 +147,7 @@ connectionMongo.connection.on('connectionPoolClosed', () => {
147147

148148
---
149149

150-
### 🔴 H3. SSE 流式响应未处理客户端断开
150+
### 🔴 H3. SSE 流式响应未处理客户端断开(已解决)
151151

152152
**位置**: `packages/service/core/workflow/dispatch/index.ts:105-129`
153153

.eslintignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ vitest.config.mts
2323
bin/
2424
scripts/
2525
deploy/
26-
document/
26+
document/
27+
28+
projects/marketplace
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Build Marketplace images
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-marketplace-images:
8+
permissions:
9+
packages: write
10+
contents: read
11+
attestations: write
12+
id-token: write
13+
strategy:
14+
matrix:
15+
archs:
16+
- arch: amd64
17+
- arch: arm64
18+
runs-on: ubuntu-24.04-arm
19+
runs-on: ${{ matrix.archs.runs-on || 'ubuntu-24.04' }}
20+
steps:
21+
# install env
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
with:
30+
driver-opts: network=host
31+
32+
- name: Cache Docker layers
33+
uses: actions/cache@v4
34+
with:
35+
path: /tmp/.buildx-cache
36+
key: ${{ runner.os }}-${{ matrix.archs.arch }}-marketplace-buildx-${{ github.sha }}
37+
restore-keys: |
38+
${{ runner.os }}-${{ matrix.archs.arch }}-marketplace-buildx-
39+
40+
# login docker
41+
- name: Login to GitHub Container Registry
42+
uses: docker/login-action@v3
43+
with:
44+
registry: ghcr.io
45+
username: ${{ github.repository_owner }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Login to Ali Hub
48+
uses: docker/login-action@v3
49+
with:
50+
registry: registry.cn-hangzhou.aliyuncs.com
51+
username: ${{ secrets.ALI_HUB_USERNAME }}
52+
password: ${{ secrets.ALI_HUB_PASSWORD }}
53+
54+
- name: Build for ${{ matrix.archs.arch }}
55+
id: build
56+
uses: docker/build-push-action@v6
57+
with:
58+
context: .
59+
file: projects/marketplace/Dockerfile
60+
platforms: linux/${{ matrix.archs.arch }}
61+
labels: |
62+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
63+
org.opencontainers.image.description=marketplace image
64+
outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/marketplace,${{ secrets.ALI_IMAGE_NAME }}/marketplace",push-by-digest=true,push=true
65+
cache-from: type=local,src=/tmp/.buildx-cache
66+
cache-to: type=local,dest=/tmp/.buildx-cache
67+
68+
- name: Export digest
69+
run: |
70+
mkdir -p ${{ runner.temp }}/digests/marketplace
71+
digest="${{ steps.build.outputs.digest }}"
72+
touch "${{ runner.temp }}/digests/marketplace/${digest#sha256:}"
73+
74+
- name: Upload digest
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: digests-marketplace-${{ github.sha }}-${{ matrix.archs.arch }}
78+
path: ${{ runner.temp }}/digests/marketplace/*
79+
if-no-files-found: error
80+
retention-days: 1
81+
82+
release-marketplace-images:
83+
permissions:
84+
packages: write
85+
contents: read
86+
attestations: write
87+
id-token: write
88+
needs: build-marketplace-images
89+
runs-on: ubuntu-24.04
90+
steps:
91+
- name: Login to GitHub Container Registry
92+
uses: docker/login-action@v3
93+
with:
94+
registry: ghcr.io
95+
username: ${{ github.repository_owner }}
96+
password: ${{ secrets.GITHUB_TOKEN }}
97+
- name: Login to Ali Hub
98+
uses: docker/login-action@v3
99+
with:
100+
registry: registry.cn-hangzhou.aliyuncs.com
101+
username: ${{ secrets.ALI_HUB_USERNAME }}
102+
password: ${{ secrets.ALI_HUB_PASSWORD }}
103+
104+
- name: Download digests
105+
uses: actions/download-artifact@v4
106+
with:
107+
path: ${{ runner.temp }}/digests
108+
pattern: digests-marketplace-${{ github.sha }}-*
109+
merge-multiple: true
110+
111+
- name: Set up Docker Buildx
112+
uses: docker/setup-buildx-action@v3
113+
114+
- name: Generate random tag
115+
id: tag
116+
run: |
117+
# Generate random hash tag (8 characters)
118+
TAG=$(echo $RANDOM | md5sum | head -c 8)
119+
echo "RANDOM_TAG=$TAG" >> $GITHUB_ENV
120+
echo "Generated tag: $TAG"
121+
122+
- name: Set image name and tag
123+
run: |
124+
echo "Git_IMAGE=ghcr.io/${{ github.repository_owner }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
125+
echo "Ali_IMAGE=${{ secrets.ALI_IMAGE_NAME }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
126+
127+
- name: Create manifest list and push
128+
working-directory: ${{ runner.temp }}/digests
129+
run: |
130+
echo "Pushing image with tag: ${{ env.RANDOM_TAG }}"
131+
TAGS="$(echo -e "${Git_Tag}\n${Ali_Tag}")"
132+
for TAG in $TAGS; do
133+
docker buildx imagetools create -t $TAG \
134+
$(printf 'ghcr.io/${{ github.repository_owner }}/marketplace@sha256:%s ' *)
135+
sleep 5
136+
done
137+
echo "✅ Successfully pushed images:"
138+
echo " - ${{ env.Git_IMAGE }}"
139+
echo " - ${{ env.Ali_IMAGE }}"

document/content/docs/introduction/development/design/design_plugin.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ description: FastGPT 系统插件设计方案
3232

3333
1. 使用 ts-rest 作为 RPC 框架进行交互,提供 sdk 供 FastGPT 主项目调用
3434
2. 使用 zod 进行类型验证
35-
3. 用 bun 进行编译,每个工具编译为单一的 `.js` 文件,支持热插拔。
35+
3. 用 bun 进行编译,每个工具编译为单一的 `.pkg` 文件,支持热插拔。
3636

3737
## 项目结构
3838

@@ -48,7 +48,8 @@ description: FastGPT 系统插件设计方案
4848
- **model** 模型预设
4949
- **scripts** 脚本(编译、创建新工具)
5050
- **sdk**: SDK 定义,供外部调用,发布到了 npm
51-
- **src**: 运行时,express 服务
51+
- **runtime**: 运行时,express 服务
52+
- **lib**: 库文件,提供工具函数和类库
5253
- **test**: 测试相关
5354

5455
系统工具的结构可以参考 [如何开发系统工具](/docs/introduction/guide/plugins/dev_system_tool)
@@ -78,7 +79,7 @@ zod 可以实现在运行时的类型校验,也可以提供更高级的功能
7879

7980
### 使用 bun 进行打包
8081

81-
将插件 bundle 为一个单一的 `.js` 文件是一个重要的设计。这样可以将插件发布出来直接通过网络挂载等的形式使用。
82+
将插件 bundle 为一个单一的 `.pkg` 文件是一个重要的设计。这样可以将插件发布出来直接通过网络挂载等的形式使用。
8283

8384
## 未来规划
8485

0 commit comments

Comments
 (0)