Compare commits

..

37 Commits

Author SHA1 Message Date
64efcef3ea feat: init improvements 2025-07-29 17:42:26 +08:00
ski
f8840810ce chore: add licenses to json stringify related files (#250) 2025-07-29 17:31:38 +08:00
Ryo
9b68bd5387 chore(ci): add default reviewer (#220) 2025-07-29 06:54:35 +00:00
a6f97f61f8 feat: add --es-address parameter to setup_es_index with .env support (#177) 2025-07-29 06:23:54 +00:00
ski
0965d69acc feat: add json-stringify node (#215)
Co-authored-by: zengxiaohui <zengxiaohui@bytedance.com>
2025-07-29 06:11:49 +00:00
183d0324bb feat(user): add ENV to control DISABLE_USER_REGISTRATION and ALLOW_REGISTRATION_EMAIL (#208) 2025-07-29 04:36:44 +00:00
04f0491454 docs: Add an explanation of how the frontend code is used (#182) 2025-07-29 00:53:39 +08:00
9ed2f8be67 feat: add s3 service (#188) 2025-07-28 15:19:52 +00:00
403128b5d3 fix: Optimize knowledge domain error codes to expose previous errors during retries (#185) 2025-07-28 14:53:53 +00:00
db7c95885d fix: Optimize the GetDraftIntelligenceList function and reduce the use of goroutine (#171) 2025-07-28 12:45:10 +00:00
2ee3fa68ab fix: user name (#180) 2025-07-28 12:28:02 +00:00
Ryo
a0d3bcf998 feat(ci): update helm config (#157) 2025-07-28 11:17:56 +00:00
cc593fc270 chore: backend owners (#170) 2025-07-28 11:13:33 +00:00
6e961bb60d fix: remove setup_es_index in makefile (#166) 2025-07-28 10:03:28 +00:00
f93b60512f feat: disable image_ocr by default in text processing stores (#149) 2025-07-28 10:03:03 +00:00
9dcdb70508 chore: setup increment ci env (#109) 2025-07-28 09:51:31 +00:00
4a44c0ddbd fix(memory): Use text as the underlying type of string (#129) 2025-07-28 09:40:33 +00:00
b299adacf3 fix(search): Fix logical issues with search domain code (#151) 2025-07-28 09:11:00 +00:00
0ce6a4da4c chore: add author (#113)
Co-authored-by: wenming.2020 <wenming.2020@bytedance.com>
2025-07-28 08:01:44 +00:00
be5178d57b docs: openapi token description (#130) 2025-07-28 06:40:39 +00:00
2d925ca241 fix: CODEOWNERS (#117) 2025-07-28 06:20:52 +00:00
Ryo
60a9c7a281 docs: update readme (#126) 2025-07-28 06:08:01 +00:00
376e563e4f fix: add plugin id conflict checker (#78) 2025-07-28 06:07:03 +00:00
Ryo
f0c339d231 chore(ci): Optimize Elasticsearch index init script, remove Docker im… (#106) 2025-07-28 04:26:58 +00:00
81b5867a62 chore: add author (#123)
Co-authored-by: tanjizhen <tanjizhen@bytedance.com>
2025-07-28 04:25:18 +00:00
5ac7b8d26e chore: allow all type email (#115) 2025-07-28 03:55:58 +00:00
48b52c3592 docs: add FAQ link (#94) 2025-07-28 01:29:04 +08:00
033df3f8ee fix: field about time type (#92) 2025-07-28 00:36:14 +08:00
Ryo
f294e19af5 docs: update readme (#85) 2025-07-27 21:25:34 +08:00
23a1f1cab0 docs: recommend use issues first, add discord and telegram (#57) 2025-07-27 11:41:11 +08:00
c3d8def0e6 docs: add acknowledgments for eino, hertz (#40) 2025-07-26 19:24:48 +08:00
32d9bf9a39 docs: add new acknowledgment (#25) 2025-07-26 15:04:45 +08:00
Ryo
be4aa3f2ca chore(ci): remove unused tool (#26) 2025-07-26 15:02:57 +08:00
bc68869493 fix: [app] api message event name (#20) 2025-07-26 14:37:12 +08:00
ccee6dcde8 docs: update the step after service the starting (#18) 2025-07-26 14:34:37 +08:00
d9ec4f60e0 docs(frontend): use new doc styles (#17)
* docs: use new doc styles

* docs: use new doc styles

* docs: use new doc styles
2025-07-26 13:51:05 +08:00
9ca1ae506f docs(frontend): use new doc styles (#11)
* docs: use new doc styles

* docs: remove comment

* docs: remove comment

* docs: remove comment

---------

Co-authored-by: tecvan <tecvan.fe@gmail.com>
2025-07-26 12:36:38 +08:00
173 changed files with 2583 additions and 1698 deletions

View File

@ -1,73 +0,0 @@
name: "ci@backend pipeline"
trigger:
change:
paths:
- "backend/**"
jobs:
unit_test:
image: hub.byted.org/codebase/ci_go_1_24:latest
name: Unit Test
steps:
- id: mysql_scripts
name: mysql scripts
uses: actions/mysql-scripts@v1
inputs:
db_name: opencoze
host: mysql
path: "docker/atlas/migrations/*.sql"
user: root
password: root
- name: Go Test
uses: actions/codecov
inputs:
driver: go
commands:
- modules=`find . -name "go.mod" -exec dirname {} \;`
- echo $modules
- list=""
- coverpkg=""
- if [[ ! -f "go.work" ]];then go work init;fi
- for module in $modules; do go work use $module; list=$module"/... "$list; coverpkg=$module"/...,"$coverpkg; done
- go work sync
- go test -coverprofile=coverage.out -gcflags="all=-l -N" -coverpkg=$coverpkg $list
config:
status:
project:
opencoze:
minimum_coverage: 0%
paths:
- "!tests"
- "!examples/**"
- "!*/examples/**"
- "!*/mock/**"
- "!*/model/**"
diff:
eino:
line_limit: 10 # 增量行数少于多少行时,默认置成功
minimum_coverage: 0%
paths:
- "!tests"
- "!examples/**"
- "!*/examples/**"
- "!*/mock/**"
- "!*/model/**"
- name: Sonar
uses: actions/sonar@v1
inputs:
coverage_path: /tmp/coverage.out
coverage_type: go
disable_quality_gates: true
exclusions_list:
- "!tests"
- "examples/**"
- "*/mock/**"
- "*/model/**"
language: go
services:
- id: mysql
image: hub.byted.org/ee/mysql:8.0
envs:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: opencoze

View File

@ -1,180 +0,0 @@
name: CI@fe-master
trigger:
cron:
push:
branches: []
paths:
- "frontend/**"
types: [branch]
notification:
when: failure
# 搜索群名Bot Studio Monorepo CI 报警群
to: ['7350862409475031044']
manual:
notification:
when: failure
jobs:
lint: &base_job
runs-on:
env: online
name: Lint
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
# 从最近的 CI 执行记录看install 步骤有概率会等待超时
# 目前已 oncall这里先设置一个超时时间避免阻塞
timeout: 30
envs:
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
CI: 'true'
RUN_BYTEST_COV: 'false' # disable Jupiter default behavior of invoke bytestcov
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
CYPRESS_INSTALL_BINARY: '0'
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
RE2_DOWNLOAD_SKIP_PATH: '1'
RE2_DOWNLOAD_MIRROR: https://bnpm.bytedance.net/mirrors
# https://typescript-eslint.io/packages/parser/#allowautomaticsingleruninference
TSESTREE_SINGLE_RUN: 'true'
# 使用云盘缓存https://bytedance.larkoffice.com/wiki/A60lwgolSinteMkOz71cFPvFneg
# TODO:不同job的缓存key暂时使用同一个后续可以考虑区分
caches:
- backend: ebs
key: bot-studio-monorepo-master-v2-lint
size: 256
steps:
- &checkout_step
id: Checkout
uses: actions/checkout
inputs:
depth: 1
- &proxy_step
name: SetupProxy
commands:
- bash .codebase/scripts/env.sh
- &init_env_step
name: Initialization
commands:
- printenv
- git config user.name ci_flow
- git config user.email ci_flow@bytedance.com
- &install_deps_step
name: Install dependencies
commands:
- node common/scripts/install-run-rush.js install
# 暂时不启用因为eslintignore文件移除会导致解析报错后期接入可考虑动态读取eslint ignore配置
# - name: PreLint
# parallel-with-next-step: true
# commands:
# - npx oxlint@latest -A all .
- name: Lint
commands:
- NODE_OPTIONS="--max-old-space-size=4096" node common/scripts/install-run-rush.js lint
ts_check:
<<: *base_job
name: Check TS Type
timeout: 30
caches:
- backend: ebs
key: bot-studio-monorepo-master-v2-ts-check
size: 256
steps:
- *checkout_step
- *proxy_step
- *init_env_step
- *install_deps_step
- name: Check TS Type
commands:
- node common/scripts/install-run-rush.js ts-check -v
build:
<<: *base_job
name: Build
caches:
- backend: ebs
key: bot-studio-monorepo-master-v2-build
size: 256
steps:
- *checkout_step
- *proxy_step
- *init_env_step
- *install_deps_step
- name: Build
commands:
- CUSTOM_VERSION=release REGION=sg BUILD_BRANCH=test node common/scripts/install-run-rush.js build -v
test:
<<: *base_job
caches:
- backend: ebs
key: bot-studio-monorepo-master-v2-test
size: 256
name: Test
services:
# 下面启动一个mysql和mongo服务主要用于coze.hub.core相关服务的集成测试
# id需要保持跟代码中连接的host一致
- id: hub_mysql
image: hub.byted.org/ee/mysql:5.7
envs:
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: coze_hub
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_TCP_PORT: 3306
- id: hub_mongo
image: hub.byted.org/ee/mongo:4.0.24
commands:
- mongod --replSet rs0
- id: mongo-init
image: hub.byted.org/ee/mongo:4.0.24
commands:
- sleep 10s
- mongo mongodb://127.0.0.1:27017 --eval 'rs.initiate()'
steps:
- *checkout_step
- *proxy_step
- *init_env_step
- *install_deps_step
- name: wait mongo ready
uses: actions/mongodb-scripts
inputs:
host: 127.0.0.1
port: 27017
- name: wait mysql ready
uses: actions/mysql-scripts
inputs:
host: hub_mysql
user: test
password: test
commands:
- mysql -u test -ptest -h hub_mysql -P 3306 -e 'show databases;'
# 服务发现
- id: consul
uses: actions/setup-consul
- name: Test Coverage
id: test
commands:
- node common/scripts/install-run-rush.js test:cov -v
# https://bytedance.feishu.cn/wiki/wikcn9Z4azEdfJalVPKcOs9vxsR
security_scan:
<<: *base_job
name: Security Scan
caches:
- backend: ebs
key: bot-studio-monorepo-master-v2-scan
size: 256
steps:
- *checkout_step
- *proxy_step
- *init_env_step
- *install_deps_step
- name: build
commands:
- CUSTOM_VERSION=release REGION=sg node common/scripts/install-run-rush.js build -o app-botstudio-main -v
- id: Argus
commands:
- npm i @ies/argus-scan@0.30.37 -g
- bash .codebase/scripts/argus-scan.sh

View File

@ -1,89 +0,0 @@
name: CI@fe-tsc
trigger:
manual:
change:
# 临时支持 project-ide 项目需求,临时修改为如下格式
# 后续需调整回 integration/**
types: [create, push, restore]
paths:
- "frontend/**"
notification:
when: failure
jobs:
ts_check: &base_job
runs-on:
env: online
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
# 从最近的 CI 执行记录看install 步骤有概率会等待超时
# 目前已 oncall这里先设置一个超时时间避免阻塞
timeout: 30
if: ${{ !Event.Change.IsPreSubmit }}
envs:
targetBranch: ${{Event.Change.Target.Branch}}
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
CI: 'true'
RUN_BYTEST_COV: 'false'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
CYPRESS_INSTALL_BINARY: '0'
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
RE2_DOWNLOAD_SKIP_PATH: '1'
RE2_DOWNLOAD_MIRROR: https://bnpm.bytedance.net/mirrors
MERGE_REQUEST_TITLE: ${{Event.Change.Title}}
TSESTREE_SINGLE_RUN: 'true'
steps:
- &checkout_step
name: Checkout
uses: actions/checkout
inputs:
submodules: true
depth: 1
- &proxy_step
name: SetupProxy
commands:
- bash .codebase/scripts/env.sh
- &remote_info_step
id: RemoteInfo
uses: 'actions/mr-remote-info'
inputs:
info_list: ['behind_commits', 'changed_files', 'changed_files_path']
- &cache_step
id: Cache
uses: actions/cache
inputs:
key: flow-monorepo-${{Event.Change.Source.Branch}}
paths:
- common/temp/pnpm-store
restore_keys:
- flow-monorepo-${{Event.Change.Source.Branch}}
- flow-monorepo-store-master
- &init_env_step
id: InitEnv
name: Initialization
commands:
- printenv
- git config user.name ci_flow
- git config user.email ci_flow@bytedance.com
- npm config set registry=https://registry.npmjs.org
- pnpm config set network-concurrency 32
- echo "$(<${{Steps.RemoteInfo.Outputs.changed_files_path}})"
- echo "::set-output name=ShouldRunBuild::${{ Event.Change.IsPreSubmit || int(Steps.RemoteInfo.Outputs.behind_commits) <= 6 }}"
- &install_deps_step
name: Install dependencies
commands:
- npx why-is-node-running@v2.x common/scripts/install-run-rush.js increment --action install -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
- name: Prepare basic packages
commands:
- node common/scripts/install-run-rush.js pre-build -v
- name: Check TS Type
commands:
- node common/scripts/install-run-rush.js increment --action ts-check -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}

View File

@ -1,184 +0,0 @@
name: CI@fe
trigger:
manual:
change:
source-branches: ['!release/**', '!task/**']
types: [create, push, restore]
paths:
- "frontend/**"
notification:
when: failure
jobs:
lint: &base_job
runs-on:
env: online
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
# 从最近的 CI 执行记录看install 步骤有概率会等待超时
# 目前已 oncall这里先设置一个超时时间避免阻塞
timeout: 30
if: ${{ !Event.Change.IsPreSubmit }}
envs:
targetBranch: ${{Event.Change.Target.Branch}}
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
CI: 'true'
RUN_BYTEST_COV: 'false'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
CYPRESS_INSTALL_BINARY: '0'
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
BUILD_BRANCH: ${{Event.Change.Source.Branch}}
RE2_DOWNLOAD_SKIP_PATH: '1'
MERGE_REQUEST_TITLE: ${{Event.Change.Title}}
TSESTREE_SINGLE_RUN: 'true'
caches:
- backend: ebs
key: bot-studio-monorepo-ci-v2-lint
size: 256
steps:
- &checkout_step
name: Checkout
uses: actions/checkout
inputs:
submodules: true
depth: 1
- &proxy_step
name: SetupProxy
commands:
- bash .codebase/scripts/env.sh
- &remote_info_step
id: RemoteInfo
uses: 'actions/mr-remote-info'
inputs:
info_list: ['behind_commits', 'changed_files', 'changed_files_path']
- &cache_step
id: Cache
uses: actions/cache
inputs:
key: flow-monorepo-${{Event.Change.Source.Branch}}
paths:
- common/temp/pnpm-store
- packages/arch/idl/src/auto-generated
restore_keys:
- flow-monorepo-${{Event.Change.Source.Branch}}
- flow-monorepo-store-master
- &init_env_step
id: InitEnv
name: Initialization
commands:
- printenv
- git config user.name ci_flow
- git config user.email ci_flow@bytedance.com
- npm config set registry=https://registry.npmjs.org
- pnpm config set network-concurrency 32
- echo "$(<${{Steps.RemoteInfo.Outputs.changed_files_path}})"
- echo "::set-output name=ShouldRunBuild::${{ Event.Change.IsPreSubmit || int(Steps.RemoteInfo.Outputs.behind_commits) <= 6 }}"
- &install_deps_step
name: Install dependencies
commands:
- npx why-is-node-running@v2.x common/scripts/install-run-rush.js increment --action install -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
- name: Check Lint
commands:
- node common/scripts/install-run-rush.js increment --action lint -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
style_check:
<<: *base_job
caches:
- backend: ebs
key: bot-studio-monorepo-ci-v2-style-check
size: 256
name: Check Stylelint
steps:
- *checkout_step
- *proxy_step
- *remote_info_step
- *cache_step
- *init_env_step
- *install_deps_step
- name: Check Stylelint
commands:
- node common/scripts/install-run-rush.js increment --action style -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
build:
<<: *base_job
caches:
- backend: ebs
key: bot-studio-monorepo-ci-v2-build
size: 256
name: Build
timeout: 20
steps:
- *checkout_step
- *proxy_step
- *remote_info_step
- *cache_step
- *init_env_step
- *install_deps_step
- name: Build
id: build
if: ${{ Steps.InitEnv.Outputs.ShouldRunBuild }}
commands:
- node common/scripts/install-run-rush.js increment --action build -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
test:
<<: *base_job
caches:
- backend: ebs
key: bot-studio-monorepo-ci-v2-test
size: 256
name: Test Coverage
services:
# 下面启动一个mysql和mongo服务主要用于coze.hub.core相关服务的集成测试
# id需要保持跟代码中连接的host一致
- id: hub_mysql
image: hub.byted.org/ee/mysql:5.7
envs:
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: coze_hub
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_TCP_PORT: 3306
- id: hub_mongo
image: hub.byted.org/ee/mongo:4.0.24
commands:
- mongod --replSet rs0
- id: mongo-init
image: hub.byted.org/ee/mongo:4.0.24
commands:
- sleep 10s
- mongo mongodb://127.0.0.1:27017 --eval 'rs.initiate()'
steps:
- *checkout_step
- *proxy_step
- *remote_info_step
- *cache_step
- *init_env_step
- *install_deps_step
- name: wait mongo ready
uses: actions/mongodb-scripts
inputs:
host: 127.0.0.1
port: 27017
- name: wait mysql ready
uses: actions/mysql-scripts
inputs:
host: hub_mysql
user: test
password: test
commands:
- mysql -u test -ptest -h hub_mysql -P 3306 -e 'show databases;'
# 服务发现
- id: consul
uses: actions/setup-consul
- name: Test Coverage
commands:
- git fetch --filter=blob:none --unshallow -q
- node common/scripts/install-run-rush.js increment --action test:cov -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -ex
# 暂时只扫描 app-botstudio-main 项目的产物
result=$(argus scm -c apps/bot/dist_sg/static -n obric/cloud/bot_studio_oversea -l)
if echo "$result" | grep -q '::add-message level=error:::'; then
if [ "$CI" ]; then
echo '::add-message level=info::本地验证命令:`npm install -g @ies/argus-scan@0.30.37 && REGION=sg CUSTOM_VERSION=release rush build -o app-botstudio-main && argus scm -c apps/bot/dist_sg/static -n obric/cloud/bot_studio_oversea -l`'
fi
exit 1
else
exit 0
fi

View File

@ -1,16 +0,0 @@
#!/bin/bash
set -ex
SOURCE_BRANCH=${SOURCE_BRANCH}
TARGET_BRANCH=${targetBranch}
if [[ $TARGET_BRANCH == "master" && !($SOURCE_BRANCH =~ ^release/ || $SOURCE_BRANCH =~ ^hotfix/ || $SOURCE_BRANCH =~ ^task/ || $SOURCE_BRANCH =~ ^fix/) ]]; then
# 检查$SOURCE_BRANCH是否以'release/'或'hotfix/'或'task/'或'fix/'开头
LATEST_BRANCH="release/$(date -d '+8 hour' +%Y%m%d)"
CONCLUSION="{\"name\": \"Target Branch\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"Error: Please don't merge to master directly, use [$LATEST_BRANCH](https://code.byted.org/obric/bot-studio-monorepo/commits/$LATEST_BRANCH) instead.\n You can contact [@fanwenjie.fe](https://code.byted.org/fanwenjie.fe) to skip this error.\" }}"
else
CONCLUSION="{\"name\": \"Target Branch\", \"conclusion\": \"success\", \"output\":{\"summary\":\"Good Pratice\" }}"
fi
echo $CONCLUSION >>check-merge-target.log
echo "::update-check-run::check-merge-target.log"

View File

@ -1,55 +0,0 @@
#!/bin/bash
set -ex
# Your target branch
TARGET_BRANCH=$targetBranch
if [[ ${SOURCE_BRANCH} =~ ^integration/ || ${SOURCE_BRANCH} =~ ^release/ ]]; then
# integration -> xxx or release/xxx -> master SKIP check-mr-size.
echo "::add-message level=info::SKIP check-mr-size"
exit 0
fi
# Specify the pattern you want to exclude, using *space* as the separator
EXCLUDE_PATTERNS=(
'**/pnpm-lock.yaml'
'packages/arch/bot-api/src/auto-generate/**'
'apps/bot-op/src/services/bam-auto-generate/**'
'apps/prompt-platform/src/services/auto-generate/**'
"**/lib/**"
"**/.*/**"
'**/__tests__/**'
'**/__test__/**'
"**/__mocks__/**"
"**/__mock__/**"
"**/*.test.*/**"
"**/*.spec.*/**"
"**/__snapshots__/**"
"**/*.snap"
'**/*.svg'
'ee/e2e/bot-studio/**'
'common/changes/**'
'apps/fornax/**'
"apps/api-builder/**"
"packages/api-builder/**"
)
for pattern in "${EXCLUDE_PATTERNS[@]}"; do
EXCLUDE_STRING+=":(exclude)$pattern "
done
# Count the number of files changed but exclude certain files and folders
file_changes=$(git diff --name-only "origin/$TARGET_BRANCH..." $EXCLUDE_STRING | wc -l)
# Count the number of line changes but exclude certain files and folders
line_changes=$(git diff --shortstat "origin/$TARGET_BRANCH..." $EXCLUDE_STRING | awk '{print ($4>$6)?$4:$6}')
# Check if number of changed files is greater than 100 or if number of line changes is greater than 2000
if [ "$file_changes" -gt 100 ] || [ "$line_changes" -gt 2000 ]; then
CONCLUSION="{\"name\": \"MR Size\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"Error: Too many changes. Number of changed files is **""$file_changes""**, number of changed lines is **""$line_changes""**.\n You can contact [@fanwenjie.fe](https://code.byted.org/fanwenjie.fe) to skip this error.\" }}"
else
CONCLUSION="{\"name\": \"MR Size\", \"conclusion\": \"success\", \"output\":{\"summary\":\"Good\" }}"
fi
echo $CONCLUSION >>check-mr-size.log
echo "::update-check-run::check-mr-size.log"

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -ex
PRE_COMMITS=$1
# 按 codebase 给出的口径pre commits 超过 5 时容易导致 rebase 失败,因此主动给出警告,避免进入 CQ 后被弹出
if [ $PRE_COMMITS -gt 5 ]; then
CONCLUSION="{\"name\": \"Pre Commits Check\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"分支已落后目标分支较多,非常容易导致进入 CQ 后被弹出,请执行 rebase/merge 同步代码后重试。\" }}"
else
CONCLUSION="{\"name\": \"Pre Commits Check\", \"conclusion\": \"success\", \"output\":{\"summary\":\"good\" }}"
fi
echo $CONCLUSION >> check-pre-commits.log
echo "::update-check-run::check-pre-commits.log"

View File

@ -1,54 +0,0 @@
#!/bin/bash
set -ex
basename=$(basename "$CHANGE_URL")
lastParam=$(echo "$basename" | cut -d'/' -f1)
targetBranch="${targetBranch}"
sourceBranch="${SOURCE_BRANCH}"
mrTitle="${MR_TITLE}"
mrDescription="${MR_DESCRIPTION}"
echo "::set-output name=mrId::$lastParam" # 输出 lastParam 的值
result=$(curl --location "https://code.byted.org/api/v4/projects/548801/merge_requests/$lastParam" \
--header "Private-Token: $GITLAB_TOKEN")
commits=$(curl --location "https://code.byted.org/api/v4/projects/548801/merge_requests/$lastParam/commits" \
--header "Private-Token: $GITLAB_TOKEN")
isSquash=$(echo "$result" | jq -r '.squash') # 使用jq提取isSquash的值
commitsCount=$(echo "$commits" | jq length)
echo "::set-output name=squash::$isSquash" # 输出 isSquash 的值
echo "::set-output name=commitsCount::$commitsCount" # 输出 commitsCount 的值
if [[ $isSquash == true ]]; then
# 勾选squash
if [[ $sourceBranch == release/* && $targetBranch == master ]]; then
echo "::add-message level=error::**release 分支合入 master 时,不可开启 squash **"
exit 1
fi
if [[ $mrDescription == \[no-squash\]* ]]; then
echo "::add-message level=error::**当前 MR 勾选了 Squash 选项,但是描述中包含[no-squash]**"
exit 1
fi
else
# 没有勾选squash
if [[ $mrDescription == \[no-squash\]* ||
$commitsCount -le 1 ||
$mrTitle == WIP:* ||
$mrTitle == wip:* ||
$sourceBranch == release/* ]]; then
exit 0
fi
echo "::add-message level=error::**当前 MR 应该勾选 Squash 选项**"
exit 1
fi

View File

@ -1,53 +0,0 @@
const fs = require('fs/promises');
const path = require('path');
const crypto = require('crypto');
// node scripts/checksum-by-change.js /usr/changed-path.json
// change-path 文件来自 ci
const changedPath = process.argv[2];
const readJson = async jsonFile => {
const content = await fs.readFile(jsonFile, 'utf-8');
let _val = null;
try {
eval(`_val = ${content}`);
return _val;
} catch (e) {
console.error(`json parse failure: `, e);
}
};
const readChangedPackages = async changedPath => {
const [changedFiles, { projects }] = await Promise.all([
readJson(changedPath),
readJson(path.resolve(__dirname, '../../rush.json')),
]);
const changedProjects = projects
.filter(project => {
const { projectFolder } = project;
const endsWithSlash = projectFolder.endsWith('/');
const compareFolder = `${projectFolder}${endsWithSlash ? '' : '/'}`;
if (!changedFiles) {
// changed-path.json 内容可能为null
return true;
}
const matched = changedFiles.find(file => file.startsWith(compareFolder));
return !!matched;
})
.map(({ packageName }) => packageName)
.sort((r1, r2) => r1.localeCompare(r2));
return changedProjects;
};
async function main() {
if (!changedPath || changedPath.length <= 0) {
throw new Error(`Please pass the correct "changedPath" path`);
}
const changedPackages = await readChangedPackages(changedPath);
const hash = crypto.createHash('md5');
changedPackages.forEach(r => hash.update(r));
const hashValue = hash.digest('hex');
console.log(`::set-output name=hash::${hashValue}`);
}
main();

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
echo ::set-env name=no_proxy::cn.goofy.app,.cn.goofy.app,goofy.app,.goofy.app,localhost,.byted.org,byted.org,.bytedance.net,bytedance.net,127.0.0.1,127.0.0.0/8,169.254.0.0/16,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16,10.0.0.0/8,::1,fe80::/10,fd00::/8
echo ::set-env name=all_proxy::http://sys-proxy-rd-relay.byted.org:3128
echo ::set-env name=http_proxy::http://sys-proxy-rd-relay.byted.org:3128
echo ::set-env name=https_proxy::http://sys-proxy-rd-relay.byted.org:3128
#!/usr/bin/env bash
# Setup common env for CI & SCM
# 1. 忽略不影响构建的 install
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true
export CYPRESS_INSTALL_BINARY=0
export TAIKO_SKIP_CHROMIUM_DOWNLOAD=0
export CUSTOM_VERSION="inhouse"
export RE2_DOWNLOAD_SKIP_PATH=1
export RE2_DOWNLOAD_MIRROR="https://bnpm.bytedance.net/mirrors"
export PUPPETEER_SKIP_DOWNLOAD=true
# 2. 在 CI 环境生效:
echo ::set-env name=PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD::$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
echo ::set-env name=CYPRESS_INSTALL_BINARY::$CYPRESS_INSTALL_BINARY
echo ::set-env name=TAIKO_SKIP_CHROMIUM_DOWNLOAD::$TAIKO_SKIP_CHROMIUM_DOWNLOAD
echo ::set-env name=RE2_DOWNLOAD_SKIP_PATH::$RE2_DOWNLOAD_SKIP_PATH
echo ::set-env name=RE2_DOWNLOAD_MIRROR::$RE2_DOWNLOAD_MIRROR
echo ::set-env name=PUPPETEER_SKIP_DOWNLOAD::$PUPPETEER_SKIP_DOWNLOAD

539
.github/CODEOWNERS vendored
View File

@ -1,268 +1,273 @@
* Tecvan-fe
* @Tecvan-fe @hi-pender @fanlv
/apps/coze-studio/ @Tecvan-fe @evan-crash @duwenhan2byte
/packages/agent-ide/agent-publish/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei @catee
/packages/agent-ide/commons/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/arch/bot-api/ @Tecvan-fe
/packages/arch/bot-http/ @Tecvan-fe
/packages/arch/logger/ @Tecvan-fe
/packages/arch/slardar-interface/ @Tecvan-fe @evan-crash
/config/eslint-config/ @Tecvan-fe @leeight @soonco
/infra/eslint-plugin/ @Tecvan-fe
/config/ts-config/ @leeight @Tecvan-fe
/config/vitest-config/ @Tecvan-fe
/packages/arch/bot-env/ @Tecvan-fe @leeight
/packages/arch/bot-env-adapter/ @dragooncjw @Tecvan-fe @leeight
/packages/arch/bot-typings/ @Tecvan-fe
/packages/arch/web-context/ @Tecvan-fe
/packages/components/bot-semi/ @Tecvan-fe
/packages/components/bot-icons/ @DingGao-Devin
/packages/arch/i18n/ @Tecvan-fe @leeight
/packages/arch/resources/studio-i18n-resource/ @dragooncjw @Tecvan-fe
/config/stylelint-config/ @Tecvan-fe
/packages/arch/idl/ @Tecvan-fe
/infra/utils/fs-enhance/ @Tecvan-fe
/packages/arch/bot-store/ @Tecvan-fe @catee @duwenhan2byte
/packages/arch/bot-error/ @haozhenfei @duwenhan2byte
/packages/foundation/space-store/ @evan-crash @duwenhan2byte
/packages/arch/bot-flags/ @Tecvan-fe
/packages/arch/report-events/ @Tecvan-fe
/packages/foundation/enterprise-store-adapter/ @evan-crash @duwenhan2byte
/packages/foundation/local-storage/ @duwenhan2byte @evan-crash
/packages/foundation/space-store-adapter/ @evan-crash @duwenhan2byte
/packages/arch/bot-tea/ @Tecvan-fe @catee @soonco
/packages/arch/tea/ @Tecvan-fe @evan-crash @soonco
/packages/arch/tea-adapter/ @dragooncjw @Tecvan-fe
/packages/arch/tea-interface/ @dragooncjw @Tecvan-fe
/packages/studio/stores/bot-detail/ @Hezi-crypto @catee @DingGao-Devin @duwenhan2byte @evan-crash
/packages/agent-ide/bot-input-length-limit/ @Hezi-crypto @catee @duwenhan2byte
/packages/agent-ide/tool-config/ @haozhenfei @catee
/packages/arch/bot-space-api/ @Tecvan-fe @duwenhan2byte
/packages/arch/bot-utils/ @Tecvan-fe
/packages/common/uploader-adapter/ @dragooncjw @Tecvan-fe
/packages/common/uploader-interface/ @dragooncjw @Tecvan-fe
/packages/studio/user-store/ @duwenhan2byte @catee @lihuiwen
/packages/arch/foundation-sdk/ @evan-crash @duwenhan2byte
/packages/common/chat-area/chat-core/ @haozhenfei @Hezi-crypto @evan-crash
/packages/common/chat-area/utils/ @Hezi-crypto @haozhenfei
/packages/arch/bot-md-box-adapter/ @Hezi-crypto @iu1340 @dragooncjw @Tecvan-fe
/packages/studio/common/file-kit/ @haozhenfei @evan-crash
/packages/arch/slardar-adapter/ @Tecvan-fe @dragooncjw
/packages/arch/default-slardar/ @Tecvan-fe @evan-crash
/packages/arch/fetch-stream/ @Hezi-crypto @haozhenfei
/packages/common/websocket-manager-adapter/ @haozhenfei @Hezi-crypto @catee
/packages/studio/autosave/ @catee
/packages/studio/bot-utils/ @catee @soonco @Hezi-crypto
/packages/common/flowgram-adapter/common/ @zxhfighter @xiamidaxia @dragooncjw
/packages/common/flowgram-adapter/free-layout-editor/ @zxhfighter @xiamidaxia @dragooncjw
/packages/agent-ide/space-bot/ @soonco @evan-crash @duwenhan2byte @catee @DingGao-Devin
/packages/agent-ide/space-bot/src/store/bot-list-filter/ @duwenhan2byte @lihuiwen
/packages/agent-ide/space-bot/src/store/bot-page/ @DingGao-Devin
/packages/agent-ide/space-bot/src/store/explore/ @Tecvan-fe
/packages/agent-ide/space-bot/src/store/risk-warning/ @lihuiwen @catee
/packages/agent-ide/context/ @evan-crash
/packages/agent-ide/bot-editor-context-store/ @Hezi-crypto @duwenhan2byte @catee
/packages/agent-ide/chat-background/ @catee
/packages/agent-ide/chat-background-config-content-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/chat-background-config-content/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/chat-background-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/common/chat-area/chat-uikit/ @catee @Hezi-crypto @evan-crash @haozhenfei
/packages/common/chat-area/hooks/ @Hezi-crypto @evan-crash
/packages/common/chat-area/chat-uikit-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/bot-audit-adapter/ @evan-crash @duwenhan2byte @Hezi-crypto @haozhenfei
/packages/agent-ide/bot-audit-base/ @evan-crash @duwenhan2byte @Hezi-crypto @haozhenfei
/packages/studio/components/ @soonco @evan-crash @duwenhan2byte @catee
/packages/arch/bot-hooks/ @catee @Tecvan-fe @soonco
/packages/arch/bot-hooks/src/page-jump/ @evan-crash @catee
/packages/arch/bot-hooks-adapter/ @catee @Tecvan-fe @soonco
/packages/arch/bot-hooks-base/ @catee @Tecvan-fe @soonco
/packages/arch/responsive-kit/ @Tecvan-fe @DingGao-Devin
/packages/common/chat-area/chat-area/ @Hezi-crypto @haozhenfei @evan-crash @haozhenfei
/packages/data/memory/llm-plugins/ @haozhenfei @catee @Hezi-crypto
/packages/data/common/reporter/ @soonco @catee @evan-crash
/packages/components/json-viewer/ @duwenhan2byte
/packages/components/scroll-view/ @evan-crash
/packages/common/assets/ @Tecvan-fe @catee
/packages/common/biz-components/ @duwenhan2byte
/packages/data/common/e2e/ @soonco @catee @evan-crash @haozhenfei @duwenhan2byte
/packages/agent-ide/debug-tool-list/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/model-manager/ @Hezi-crypto @catee
/packages/agent-ide/model-manager/src/components/multi-agent/ @catee
/packages/agent-ide/tool/ @catee
/packages/data/knowledge/knowledge-modal-base/ @haozhenfei @catee @Hezi-crypto
/packages/components/biz-tooltip-ui/ @Hezi-crypto @catee @evan-crash
/packages/components/table-view/ @lihuiwen
/packages/components/virtual-list/ @Tecvan-fe
/packages/data/common/utils/ @soonco @catee @evan-crash
/packages/data/knowledge/knowledge-resource-processor-core/ @haozhenfei @catee @Hezi-crypto
/packages/arch/pdfjs-shadow/ @Tecvan-fe
/packages/data/knowledge/common/stores/ @soonco @catee @evan-crash
/packages/foundation/global-store/ @duwenhan2byte @evan-crash
/config/postcss-config/ @Tecvan-fe
/config/tailwind-config/ @Tecvan-fe
/infra/utils/monorepo-kits/ @Tecvan-fe @evan-crash
/packages/studio/premium/premium-components-adapter/ @evan-crash
/packages/studio/premium/premium-store-adapter/ @evan-crash
/packages/agent-ide/onboarding/ @Hezi-crypto @catee
/packages/agent-ide/publish-to-base/ @catee
/packages/arch/report-tti/ @duwenhan2byte
/packages/data/memory/database-creator/ @haozhenfei @catee @Hezi-crypto
/packages/arch/hooks/ @Tecvan-fe @evan-crash
/packages/common/coze-mitt/ @evan-crash @duwenhan2byte
/packages/common/editor-plugins/ @haozhenfei @stream-pipe @Hezi-crypto
/packages/common/md-editor-adapter/ @haozhenfei @Hezi-crypto @catee
/packages/common/prompt-kit/main/ @haozhenfei @Hezi-crypto @catee
/packages/common/chat-area/chat-answer-action/ @Hezi-crypto @haozhenfei @lihuiwen
/packages/common/chat-area/plugin-message-grab/ @Hezi-crypto @haozhenfei
/packages/common/chat-area/text-grab/ @Hezi-crypto @haozhenfei
/packages/common/prompt-kit/adapter/ @haozhenfei @Hezi-crypto @catee
/packages/common/prompt-kit/base/ @haozhenfei @Hezi-crypto @catee
/packages/data/memory/database/ @haozhenfei @catee @Hezi-crypto
/packages/data/knowledge/knowledge-resource-processor-base/ @haozhenfei @catee @Hezi-crypto
/packages/arch/utils/ @Tecvan-fe @evan-crash
/packages/data/knowledge/common/components/ @haozhenfei @catee @Hezi-crypto
/packages/data/common/feature-register/ @haozhenfei @catee @Hezi-crypto
/packages/data/knowledge/common/hooks/ @Hezi-crypto @catee @evan-crash
/packages/data/knowledge/common/services/ @Hezi-crypto @catee @evan-crash
/packages/data/memory/database-v2-main/ @haozhenfei @catee @Hezi-crypto
/packages/data/memory/database-v2-adapter/ @haozhenfei @catee @Hezi-crypto
/packages/data/memory/database-v2-base/ @haozhenfei @catee @Hezi-crypto
/packages/data/knowledge/knowledge-data-set-for-agent/ @Hezi-crypto @catee @evan-crash
/packages/data/knowledge/knowledge-ide-base/ @haozhenfei @catee @Hezi-crypto
/packages/arch/bot-monaco-editor/ @Tecvan-fe
/packages/data/knowledge/knowledge-modal-adapter/ @haozhenfei @catee @Hezi-crypto
/packages/data/knowledge/knowledge-resource-processor-adapter/ @haozhenfei @catee @Hezi-crypto
/packages/devops/debug/debug-panel/ @soonco @evan-crash @catee
/packages/devops/json-link-preview/ @Maidang1 @Zhangchi123456
/packages/devops/common-modules/ @duwenhan2byte @evan-crash @catee
/packages/foundation/account-adapter/ @duwenhan2byte @evan-crash
/packages/foundation/account-base/ @evan-crash @duwenhan2byte
/packages/arch/api-schema/ @Tecvan-fe @evan-crash
/infra/idl/idl2ts-runtime/ @Tecvan-fe @evan-crash
/infra/idl/idl2ts-cli/ @Tecvan-fe @evan-crash
/infra/idl/idl2ts-generator/ @Tecvan-fe @evan-crash
/infra/idl/idl-parser/ @Tecvan-fe @evan-crash
/infra/utils/rush-logger/ @catee @Tecvan-fe
/infra/idl/idl2ts-helper/ @Tecvan-fe @evan-crash
/infra/idl/idl2ts-plugin/ @Tecvan-fe @evan-crash
/packages/studio/open-platform/open-env-adapter/ @soonco @Hezi-crypto @DingGao-Devin
/infra/plugins/pkg-root-webpack-plugin/ @Tecvan-fe
/packages/studio/publish-manage-hooks/ @duwenhan2byte @evan-crash
/packages/foundation/layout/ @evan-crash @duwenhan2byte
/packages/studio/open-platform/open-auth/ @evan-crash @DingGao-Devin
/packages/agent-ide/entry-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/entry/ @soonco @duwenhan2byte @catee @evan-crash
/packages/agent-ide/bot-config-area-adapter/ @haozhenfei @Hezi-crypto @duwenhan2byte @catee @evan-crash
/packages/agent-ide/bot-config-area/ @haozhenfei @Hezi-crypto @duwenhan2byte @catee @evan-crash
/packages/agent-ide/bot-plugin/entry/ @evan-crash @lihuiwen @catee
/packages/agent-ide/bot-plugin/export/ @lihuiwen @catee
/packages/agent-ide/bot-plugin/mock-set/ @lihuiwen @catee @duwenhan2byte
/packages/studio/mockset-edit-modal-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/mockset-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/mockset-editor/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/mockset-editor-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/bot-plugin/tools/ @lihuiwen @catee
/packages/studio/stores/bot-plugin/ @lihuiwen @Hezi-crypto @catee
/packages/studio/plugin-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-modal-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/community/component/ @DingGao-Devin @Hezi-crypto @evan-crash @duwenhan2byte
/packages/studio/plugin-form-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/workflow/base/ @xiamidaxia @zxhfighter
/packages/agent-ide/plugin-content-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-content/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-setting-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-setting/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/bot-plugin/plugin-risk-warning/ @catee @evan-crash
/packages/studio/plugin-publish-ui-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/plugin-tool-columns-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/plugin-tool-columns/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/chat-debug-area/ @soonco @duwenhan2byte @catee @Hezi-crypto @haozhenfei @evan-crash
/packages/agent-ide/chat-answer-action-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/chat-area-plugin-debug-common/ @Hezi-crypto @haozhenfei
/packages/agent-ide/chat-components-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/common/chat-area/plugin-chat-background/ @Tecvan-fe
/packages/common/chat-area/chat-area-plugin-reasoning/ @catee @Hezi-crypto
/packages/common/chat-area/plugin-resume/ @Tecvan-fe
/packages/common/chat-area/plugin-chat-shortcuts/ @haozhenfei @duwenhan2byte @Hezi-crypto
/packages/workflow/sdk/ @zxhfighter @xiamidaxia
/packages/workflow/components/ @LLLLeeJ @zxhfighter
/packages/components/loading-button/ @catee
/packages/components/mouse-pad-selector/ @zxhfighter
/packages/workflow/adapter/resources/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/packages/common/chat-area/chat-workflow-render/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/onboarding-message-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/plugin-area-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/prompt-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/prompt/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/workflow/ @soonco @duwenhan2byte @catee
/packages/agent-ide/navigate/ @soonco @duwenhan2byte @catee
/packages/agent-ide/workflow-as-agent-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/workflow-item/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/workflow-card-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/workflow-modal/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/memory-tool-pane-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/skills-pane-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/layout-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/layout/ @soonco @duwenhan2byte @catee
/packages/agent-ide/chat-area-provider-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/agent-ide/chat-area-provider/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/studio/entity-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/foundation/account-ui-adapter/ @duwenhan2byte @evan-crash
/packages/foundation/account-ui-base/ @evan-crash @duwenhan2byte
/packages/foundation/foundation-sdk/ @evan-crash @duwenhan2byte
/packages/foundation/global/ @evan-crash @duwenhan2byte
/packages/studio/workspace/project-entity-adapter/ @Hezi-crypto @catee @duwenhan2byte
/packages/studio/workspace/project-entity-base/ @Hezi-crypto @catee @duwenhan2byte
/packages/foundation/global-adapter/ @evan-crash @duwenhan2byte
/packages/foundation/browser-upgrade-banner/ @evan-crash @duwenhan2byte
/packages/foundation/space-ui-adapter/ @evan-crash @duwenhan2byte
/packages/foundation/space-ui-base/ @evan-crash @duwenhan2byte
/packages/common/auth/ @evan-crash @duwenhan2byte
/packages/common/auth-adapter/ @evan-crash @duwenhan2byte
/packages/project-ide/main/ @dragooncjw @JxJuly @xiamidaxia @catee @lihuiwen
/packages/components/resource-tree/ @dragooncjw @xiamidaxia @JxJuly
/packages/common/flowgram-adapter/fixed-layout-editor/ @zxhfighter @xiamidaxia @dragooncjw
/packages/project-ide/biz-components/ @zxhfighter @xiamidaxia
/packages/project-ide/framework/ @dragooncjw @JxJuly @xiamidaxia
/packages/project-ide/base-adapter/ @dragooncjw @xiamidaxia
/packages/project-ide/base-interface/ @dragooncjw @xiamidaxia
/packages/project-ide/client/ @dragooncjw @JxJuly @xiamidaxia
/packages/project-ide/core/ @dragooncjw @JxJuly @xiamidaxia
/packages/project-ide/view/ @dragooncjw @JxJuly @xiamidaxia
/packages/project-ide/biz-data/ @haozhenfei @lihuiwen @catee @soonco
/packages/data/knowledge/knowledge-ide-adapter/ @haozhenfei @catee @Hezi-crypto
/packages/data/memory/variables/ @haozhenfei @catee @Hezi-crypto
/packages/project-ide/biz-plugin/ @xiamidaxia @lihuiwen @catee
/packages/project-ide/biz-plugin-registry-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/packages/project-ide/biz-workflow/ @dragooncjw @JxJuly @xiamidaxia
/packages/studio/open-platform/open-chat/ @soonco @Hezi-crypto @DingGao-Devin
/packages/workflow/playground/ @LLLLeeJ @xiamidaxia @luics @zxhfighter
/packages/arch/load-remote-worker/ @Tecvan-fe
/packages/devops/mockset-manage/ @soonco @evan-crash @catee
/packages/devops/testset-manage/ @mocayo @JxJuly
/packages/workflow/adapter/base/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/packages/workflow/adapter/code-editor/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/packages/workflow/fabric-canvas/ @xiamidaxia @zxhfighter
/packages/workflow/feature-encapsulate/ @zxhfighter
/packages/workflow/nodes/ @xiamidaxia @zxhfighter
/packages/workflow/setters/ @Tecvan-fe
/packages/workflow/variable/ @zxhfighter @LLLLeeJ @xiamidaxia
/packages/workflow/render/ @dragooncjw @xiamidaxia
/packages/workflow/history/ @xiamidaxia @zxhfighter
/packages/workflow/adapter/nodes/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/packages/workflow/test-run/ @JxJuly @xiamidaxia @luics @zxhfighter @dragooncjw
/packages/workflow/test-run-next/main/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/packages/workflow/test-run-next/form/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/packages/workflow/test-run-next/shared/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/packages/workflow/test-run-next/trace/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/packages/project-ide/ui-adapter/ @dragooncjw @xiamidaxia
/packages/studio/workspace/project-publish/ @catee @lihuiwen
/packages/studio/workspace/entry-adapter/ @duwenhan2byte @evan-crash
/packages/studio/workspace/entry-base/ @duwenhan2byte @catee @evan-crash
/packages/workflow/adapter/playground/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/infra/plugins/import-watch-loader/ @Tecvan-fe
/config/rsbuild-config/ @Tecvan-fe
/packages/community/explore/ @evan-crash @duwenhan2byte
/common/_templates/node-core/ @Tecvan-fe
/common/_templates/rspack-web/ @Tecvan-fe
/frontend/apps/coze-studio/ @Tecvan-fe @evan-crash @duwenhan2byte
/frontend/packages/agent-ide/agent-publish/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei @catee
/frontend/packages/agent-ide/commons/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/arch/bot-api/ @Tecvan-fe
/frontend/packages/arch/bot-http/ @Tecvan-fe
/frontend/packages/arch/logger/ @Tecvan-fe
/frontend/packages/arch/slardar-interface/ @Tecvan-fe @evan-crash
/frontend/config/eslint-config/ @Tecvan-fe @leeight @soonco
/frontend/infra/eslint-plugin/ @Tecvan-fe
/frontend/config/ts-config/ @leeight @Tecvan-fe
/frontend/config/vitest-config/ @Tecvan-fe
/frontend/packages/arch/bot-env/ @Tecvan-fe @leeight
/frontend/packages/arch/bot-env-adapter/ @dragooncjw @Tecvan-fe @leeight
/frontend/packages/arch/bot-typings/ @Tecvan-fe
/frontend/packages/arch/web-context/ @Tecvan-fe
/frontend/packages/components/bot-semi/ @Tecvan-fe
/frontend/packages/components/bot-icons/ @DingGao-Devin
/frontend/packages/arch/i18n/ @Tecvan-fe @leeight
/frontend/packages/arch/resources/studio-i18n-resource/ @dragooncjw @Tecvan-fe
/frontend/config/stylelint-config/ @Tecvan-fe
/frontend/packages/arch/idl/ @Tecvan-fe
/frontend/infra/utils/fs-enhance/ @Tecvan-fe
/frontend/packages/arch/bot-store/ @Tecvan-fe @catee @duwenhan2byte
/frontend/packages/arch/bot-error/ @haozhenfei @duwenhan2byte
/frontend/packages/foundation/space-store/ @evan-crash @duwenhan2byte
/frontend/packages/arch/bot-flags/ @Tecvan-fe
/frontend/packages/arch/report-events/ @Tecvan-fe
/frontend/packages/foundation/enterprise-store-adapter/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/local-storage/ @duwenhan2byte @evan-crash
/frontend/packages/foundation/space-store-adapter/ @evan-crash @duwenhan2byte
/frontend/packages/arch/bot-tea/ @Tecvan-fe @catee @soonco
/frontend/packages/arch/tea/ @Tecvan-fe @evan-crash @soonco
/frontend/packages/arch/tea-adapter/ @dragooncjw @Tecvan-fe
/frontend/packages/arch/tea-interface/ @dragooncjw @Tecvan-fe
/frontend/packages/studio/stores/bot-detail/ @Hezi-crypto @catee @DingGao-Devin @duwenhan2byte @evan-crash
/frontend/packages/agent-ide/bot-input-length-limit/ @Hezi-crypto @catee @duwenhan2byte
/frontend/packages/agent-ide/tool-config/ @haozhenfei @catee
/frontend/packages/arch/bot-space-api/ @Tecvan-fe @duwenhan2byte
/frontend/packages/arch/bot-utils/ @Tecvan-fe
/frontend/packages/common/uploader-adapter/ @dragooncjw @Tecvan-fe
/frontend/packages/common/uploader-interface/ @dragooncjw @Tecvan-fe
/frontend/packages/studio/user-store/ @duwenhan2byte @catee @lihuiwen
/frontend/packages/arch/foundation-sdk/ @evan-crash @duwenhan2byte
/frontend/packages/common/chat-area/chat-core/ @haozhenfei @Hezi-crypto @evan-crash
/frontend/packages/common/chat-area/utils/ @Hezi-crypto @haozhenfei
/frontend/packages/arch/bot-md-box-adapter/ @Hezi-crypto @iu1340 @dragooncjw @Tecvan-fe
/frontend/packages/studio/common/file-kit/ @haozhenfei @evan-crash
/frontend/packages/arch/slardar-adapter/ @Tecvan-fe @dragooncjw
/frontend/packages/arch/default-slardar/ @Tecvan-fe @evan-crash
/frontend/packages/arch/fetch-stream/ @Hezi-crypto @haozhenfei
/frontend/packages/common/websocket-manager-adapter/ @haozhenfei @Hezi-crypto @catee
/frontend/packages/studio/autosave/ @catee
/frontend/packages/studio/bot-utils/ @catee @soonco @Hezi-crypto
/frontend/packages/common/flowgram-adapter/common/ @zxhfighter @xiamidaxia @dragooncjw
/frontend/packages/common/flowgram-adapter/free-layout-editor/ @zxhfighter @xiamidaxia @dragooncjw
/frontend/packages/agent-ide/space-bot/ @soonco @evan-crash @duwenhan2byte @catee @DingGao-Devin
/frontend/packages/agent-ide/space-bot/src/store/bot-list-filter/ @duwenhan2byte @lihuiwen
/frontend/packages/agent-ide/space-bot/src/store/bot-page/ @DingGao-Devin
/frontend/packages/agent-ide/space-bot/src/store/explore/ @Tecvan-fe
/frontend/packages/agent-ide/space-bot/src/store/risk-warning/ @lihuiwen @catee
/frontend/packages/agent-ide/context/ @evan-crash
/frontend/packages/agent-ide/bot-editor-context-store/ @Hezi-crypto @duwenhan2byte @catee
/frontend/packages/agent-ide/chat-background/ @catee
/frontend/packages/agent-ide/chat-background-config-content-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/chat-background-config-content/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/chat-background-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/common/chat-area/chat-uikit/ @catee @Hezi-crypto @evan-crash @haozhenfei
/frontend/packages/common/chat-area/hooks/ @Hezi-crypto @evan-crash
/frontend/packages/common/chat-area/chat-uikit-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/bot-audit-adapter/ @evan-crash @duwenhan2byte @Hezi-crypto @haozhenfei
/frontend/packages/agent-ide/bot-audit-base/ @evan-crash @duwenhan2byte @Hezi-crypto @haozhenfei
/frontend/packages/studio/components/ @soonco @evan-crash @duwenhan2byte @catee
/frontend/packages/arch/bot-hooks/ @catee @Tecvan-fe @soonco
/frontend/packages/arch/bot-hooks/src/page-jump/ @evan-crash @catee
/frontend/packages/arch/bot-hooks-adapter/ @catee @Tecvan-fe @soonco
/frontend/packages/arch/bot-hooks-base/ @catee @Tecvan-fe @soonco
/frontend/packages/arch/responsive-kit/ @Tecvan-fe @DingGao-Devin
/frontend/packages/common/chat-area/chat-area/ @Hezi-crypto @haozhenfei @evan-crash @haozhenfei
/frontend/packages/data/memory/llm-plugins/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/common/reporter/ @soonco @catee @evan-crash
/frontend/packages/components/json-viewer/ @duwenhan2byte
/frontend/packages/components/scroll-view/ @evan-crash
/frontend/packages/common/assets/ @Tecvan-fe @catee
/frontend/packages/common/biz-components/ @duwenhan2byte
/frontend/packages/data/common/e2e/ @soonco @catee @evan-crash @haozhenfei @duwenhan2byte
/frontend/packages/agent-ide/debug-tool-list/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/model-manager/ @Hezi-crypto @catee
/frontend/packages/agent-ide/model-manager/src/components/multi-agent/ @catee
/frontend/packages/agent-ide/tool/ @catee
/frontend/packages/data/knowledge/knowledge-modal-base/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/components/biz-tooltip-ui/ @Hezi-crypto @catee @evan-crash
/frontend/packages/components/table-view/ @lihuiwen
/frontend/packages/components/virtual-list/ @Tecvan-fe
/frontend/packages/data/common/utils/ @soonco @catee @evan-crash
/frontend/packages/data/knowledge/knowledge-resource-processor-core/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/arch/pdfjs-shadow/ @Tecvan-fe
/frontend/packages/data/knowledge/common/stores/ @soonco @catee @evan-crash
/frontend/packages/foundation/global-store/ @duwenhan2byte @evan-crash
/frontend/config/postcss-config/ @Tecvan-fe
/frontend/config/tailwind-config/ @Tecvan-fe
/frontend/infra/utils/monorepo-kits/ @Tecvan-fe @evan-crash
/frontend/packages/studio/premium/premium-components-adapter/ @evan-crash
/frontend/packages/studio/premium/premium-store-adapter/ @evan-crash
/frontend/packages/agent-ide/onboarding/ @Hezi-crypto @catee
/frontend/packages/agent-ide/publish-to-base/ @catee
/frontend/packages/arch/report-tti/ @duwenhan2byte
/frontend/packages/data/memory/database-creator/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/arch/hooks/ @Tecvan-fe @evan-crash
/frontend/packages/common/coze-mitt/ @evan-crash @duwenhan2byte
/frontend/packages/common/editor-plugins/ @haozhenfei @stream-pipe @Hezi-crypto
/frontend/packages/common/md-editor-adapter/ @haozhenfei @Hezi-crypto @catee
/frontend/packages/common/prompt-kit/main/ @haozhenfei @Hezi-crypto @catee
/frontend/packages/common/chat-area/chat-answer-action/ @Hezi-crypto @haozhenfei @lihuiwen
/frontend/packages/common/chat-area/plugin-message-grab/ @Hezi-crypto @haozhenfei
/frontend/packages/common/chat-area/text-grab/ @Hezi-crypto @haozhenfei
/frontend/packages/common/prompt-kit/adapter/ @haozhenfei @Hezi-crypto @catee
/frontend/packages/common/prompt-kit/base/ @haozhenfei @Hezi-crypto @catee
/frontend/packages/data/memory/database/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/knowledge/knowledge-resource-processor-base/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/arch/utils/ @Tecvan-fe @evan-crash
/frontend/packages/data/knowledge/common/components/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/common/feature-register/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/knowledge/common/hooks/ @Hezi-crypto @catee @evan-crash
/frontend/packages/data/knowledge/common/services/ @Hezi-crypto @catee @evan-crash
/frontend/packages/data/memory/database-v2-main/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/memory/database-v2-adapter/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/memory/database-v2-base/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/knowledge/knowledge-data-set-for-agent/ @Hezi-crypto @catee @evan-crash
/frontend/packages/data/knowledge/knowledge-ide-base/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/arch/bot-monaco-editor/ @Tecvan-fe
/frontend/packages/data/knowledge/knowledge-modal-adapter/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/knowledge/knowledge-resource-processor-adapter/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/devops/debug/debug-panel/ @soonco @evan-crash @catee
/frontend/packages/devops/json-link-preview/ @Maidang1 @Zhangchi123456
/frontend/packages/devops/common-modules/ @duwenhan2byte @evan-crash @catee
/frontend/packages/foundation/account-adapter/ @duwenhan2byte @evan-crash
/frontend/packages/foundation/account-base/ @evan-crash @duwenhan2byte
/frontend/packages/arch/api-schema/ @Tecvan-fe @evan-crash
/frontend/infra/idl/idl2ts-runtime/ @Tecvan-fe @evan-crash
/frontend/infra/idl/idl2ts-cli/ @Tecvan-fe @evan-crash
/frontend/infra/idl/idl2ts-generator/ @Tecvan-fe @evan-crash
/frontend/infra/idl/idl-parser/ @Tecvan-fe @evan-crash
/frontend/infra/utils/rush-logger/ @catee @Tecvan-fe
/frontend/infra/idl/idl2ts-helper/ @Tecvan-fe @evan-crash
/frontend/infra/idl/idl2ts-plugin/ @Tecvan-fe @evan-crash
/frontend/packages/studio/open-platform/open-env-adapter/ @soonco @Hezi-crypto @DingGao-Devin
/frontend/infra/plugins/pkg-root-webpack-plugin/ @Tecvan-fe
/frontend/packages/studio/publish-manage-hooks/ @duwenhan2byte @evan-crash
/frontend/packages/foundation/layout/ @evan-crash @duwenhan2byte
/frontend/packages/studio/open-platform/open-auth/ @evan-crash @DingGao-Devin
/frontend/packages/agent-ide/entry-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/entry/ @soonco @duwenhan2byte @catee @evan-crash
/frontend/packages/agent-ide/bot-config-area-adapter/ @haozhenfei @Hezi-crypto @duwenhan2byte @catee @evan-crash
/frontend/packages/agent-ide/bot-config-area/ @haozhenfei @Hezi-crypto @duwenhan2byte @catee @evan-crash
/frontend/packages/agent-ide/bot-plugin/entry/ @evan-crash @lihuiwen @catee
/frontend/packages/agent-ide/bot-plugin/export/ @lihuiwen @catee
/frontend/packages/agent-ide/bot-plugin/mock-set/ @lihuiwen @catee @duwenhan2byte
/frontend/packages/studio/mockset-edit-modal-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/mockset-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/mockset-editor/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/mockset-editor-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/bot-plugin/tools/ @lihuiwen @catee
/frontend/packages/studio/stores/bot-plugin/ @lihuiwen @Hezi-crypto @catee
/frontend/packages/studio/plugin-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-modal-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-shared/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/community/component/ @DingGao-Devin @Hezi-crypto @evan-crash @duwenhan2byte
/frontend/packages/studio/plugin-form-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/workflow/base/ @xiamidaxia @zxhfighter
/frontend/packages/agent-ide/plugin-content-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-content/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-setting-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-setting/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/bot-plugin/plugin-risk-warning/ @catee @evan-crash
/frontend/packages/studio/plugin-publish-ui-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/plugin-tool-columns-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/plugin-tool-columns/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/chat-debug-area/ @soonco @duwenhan2byte @catee @Hezi-crypto @haozhenfei @evan-crash
/frontend/packages/agent-ide/chat-answer-action-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/chat-area-plugin-debug-common/ @Hezi-crypto @haozhenfei
/frontend/packages/agent-ide/chat-components-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/common/chat-area/plugin-chat-background/ @Tecvan-fe
/frontend/packages/common/chat-area/chat-area-plugin-reasoning/ @catee @Hezi-crypto
/frontend/packages/common/chat-area/plugin-resume/ @Tecvan-fe
/frontend/packages/common/chat-area/plugin-chat-shortcuts/ @haozhenfei @duwenhan2byte @Hezi-crypto
/frontend/packages/workflow/sdk/ @zxhfighter @xiamidaxia
/frontend/packages/workflow/components/ @LLLLeeJ @zxhfighter
/frontend/packages/components/loading-button/ @catee
/frontend/packages/components/mouse-pad-selector/ @zxhfighter
/frontend/packages/workflow/adapter/resources/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/frontend/packages/common/chat-area/chat-workflow-render/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/onboarding-message-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/plugin-area-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/prompt-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/prompt/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/workflow/ @soonco @duwenhan2byte @catee
/frontend/packages/agent-ide/navigate/ @soonco @duwenhan2byte @catee
/frontend/packages/agent-ide/workflow-as-agent-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/workflow-item/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/workflow-card-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/workflow-modal/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/memory-tool-pane-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/skills-pane-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/layout-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/layout/ @soonco @duwenhan2byte @catee
/frontend/packages/agent-ide/chat-area-provider-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/agent-ide/chat-area-provider/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/studio/entity-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/foundation/account-ui-adapter/ @duwenhan2byte @evan-crash
/frontend/packages/foundation/account-ui-base/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/foundation-sdk/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/global/ @evan-crash @duwenhan2byte
/frontend/packages/studio/workspace/project-entity-adapter/ @Hezi-crypto @catee @duwenhan2byte
/frontend/packages/studio/workspace/project-entity-base/ @Hezi-crypto @catee @duwenhan2byte
/frontend/packages/foundation/global-adapter/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/browser-upgrade-banner/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/space-ui-adapter/ @evan-crash @duwenhan2byte
/frontend/packages/foundation/space-ui-base/ @evan-crash @duwenhan2byte
/frontend/packages/common/auth/ @evan-crash @duwenhan2byte
/frontend/packages/common/auth-adapter/ @evan-crash @duwenhan2byte
/frontend/packages/project-ide/main/ @dragooncjw @JxJuly @xiamidaxia @catee @lihuiwen
/frontend/packages/components/resource-tree/ @dragooncjw @xiamidaxia @JxJuly
/frontend/packages/common/flowgram-adapter/fixed-layout-editor/ @zxhfighter @xiamidaxia @dragooncjw
/frontend/packages/project-ide/biz-components/ @zxhfighter @xiamidaxia
/frontend/packages/project-ide/framework/ @dragooncjw @JxJuly @xiamidaxia
/frontend/packages/project-ide/base-adapter/ @dragooncjw @xiamidaxia
/frontend/packages/project-ide/base-interface/ @dragooncjw @xiamidaxia
/frontend/packages/project-ide/client/ @dragooncjw @JxJuly @xiamidaxia
/frontend/packages/project-ide/core/ @dragooncjw @JxJuly @xiamidaxia
/frontend/packages/project-ide/view/ @dragooncjw @JxJuly @xiamidaxia
/frontend/packages/project-ide/biz-data/ @haozhenfei @lihuiwen @catee @soonco
/frontend/packages/data/knowledge/knowledge-ide-adapter/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/data/memory/variables/ @haozhenfei @catee @Hezi-crypto
/frontend/packages/project-ide/biz-plugin/ @xiamidaxia @lihuiwen @catee
/frontend/packages/project-ide/biz-plugin-registry-adapter/ @Hezi-crypto @duwenhan2byte @catee @evan-crash @haozhenfei
/frontend/packages/project-ide/biz-workflow/ @dragooncjw @JxJuly @xiamidaxia
/frontend/packages/studio/open-platform/open-chat/ @soonco @Hezi-crypto @DingGao-Devin
/frontend/packages/workflow/playground/ @LLLLeeJ @xiamidaxia @luics @zxhfighter
/frontend/packages/arch/load-remote-worker/ @Tecvan-fe
/frontend/packages/devops/mockset-manage/ @soonco @evan-crash @catee
/frontend/packages/devops/testset-manage/ @mocayo @JxJuly
/frontend/packages/workflow/adapter/base/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/frontend/packages/workflow/adapter/code-editor/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/frontend/packages/workflow/fabric-canvas/ @xiamidaxia @zxhfighter
/frontend/packages/workflow/feature-encapsulate/ @zxhfighter
/frontend/packages/workflow/nodes/ @xiamidaxia @zxhfighter
/frontend/packages/workflow/setters/ @Tecvan-fe
/frontend/packages/workflow/variable/ @zxhfighter @LLLLeeJ @xiamidaxia
/frontend/packages/workflow/render/ @dragooncjw @xiamidaxia
/frontend/packages/workflow/history/ @xiamidaxia @zxhfighter
/frontend/packages/workflow/adapter/nodes/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/frontend/packages/workflow/test-run/ @JxJuly @xiamidaxia @luics @zxhfighter @dragooncjw
/frontend/packages/workflow/test-run-next/main/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/frontend/packages/workflow/test-run-next/form/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/frontend/packages/workflow/test-run-next/shared/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/frontend/packages/workflow/test-run-next/trace/ @JxJuly @LLLLeeJ @xiamidaxia @zxhfighter
/frontend/packages/project-ide/ui-adapter/ @dragooncjw @xiamidaxia
/frontend/packages/studio/workspace/project-publish/ @catee @lihuiwen
/frontend/packages/studio/workspace/entry-adapter/ @duwenhan2byte @evan-crash
/frontend/packages/studio/workspace/entry-base/ @duwenhan2byte @catee @evan-crash
/frontend/packages/workflow/adapter/playground/ @LLLLeeJ @JxJuly @xiamidaxia @luics @zxhfighter @stream-pipe
/frontend/infra/plugins/import-watch-loader/ @Tecvan-fe
/frontend/config/rsbuild-config/ @Tecvan-fe
/frontend/packages/community/explore/ @evan-crash @duwenhan2byte
/frontend/common/_templates/node-core/ @Tecvan-fe
/frontend/common/_templates/rspack-web/ @Tecvan-fe
/backend/ @fanlv @junwen-lee @liuyunchao-1998 @lvxinyu-1117 @hi-pender @luohq-bytedance @shentongmartin @mrh997 @meguminnnnnnnnn @N3kox @zhuangjie1125
/docker/ @fanlv @junwen-lee @liuyunchao-1998 @lvxinyu-1117 @hi-pender @luohq-bytedance @shentongmartin @mrh997 @meguminnnnnnnnn @N3kox @zhuangjie1125
/helm/ @fanlv @junwen-lee @liuyunchao-1998 @lvxinyu-1117 @hi-pender @luohq-bytedance @shentongmartin @mrh997 @meguminnnnnnnnn @N3kox @zhuangjie1125

View File

@ -10,7 +10,6 @@ EXCLUDE_PATTERNS=(
'packages/arch/bot-api/src/auto-generate/**'
'apps/bot-op/src/services/bam-auto-generate/**'
'apps/prompt-platform/src/services/auto-generate/**'
".cursor/api/**"
"**/lib/**"
"**/.*/**"
'**/__tests__/**'
@ -24,9 +23,7 @@ EXCLUDE_PATTERNS=(
'**/e2e/**'
'common/changes/**'
'apps/fornax/**',
"packages/arch/semi-theme-hand01",
"packages/arch/arco-icon",
"packages/arch/resources/**"
"packages/arch/semi-theme-hand01"
)
for pattern in "${EXCLUDE_PATTERNS[@]}"; do

294
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,294 @@
name: CI
on:
pull_request:
branches: ['main']
paths:
- 'github/**'
- 'idl/**'
- 'frontend/**'
- 'common/**'
- 'rush.json'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
setup:
strategy:
matrix:
include:
- NodeVersion: 22.16.0
NodeVersionDisplayName: 22
OS: ubuntu-latest
name: Setup and Install Dependencies
runs-on: ${{ matrix.OS }}
outputs:
cache_file: ${{ steps.process-files.outputs.cache_file }}
matrix_node_version: ${{ matrix.NodeVersion }}
matrix_os: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Process changed files
id: process-files
run: |
# 获取所有变更文件
all_files="${{ steps.changed-files.outputs.all_changed_files }}"
# 过滤掉 common/changes 目录下的文件
filtered_files=""
for file in $all_files; do
if [[ ! "$file" =~ ^common/changes/.* ]]; then
if [ -z "$filtered_files" ]; then
filtered_files="$file"
else
filtered_files="$filtered_files $file"
fi
fi
done
# 创建 JSON 格式的缓存文件
echo "[$( echo "$filtered_files" | sed 's/ /", "/g' | sed 's/^/"/' | sed 's/$/"/' )]" > changed-files-cache.json
# 输出缓存文件路径供后续步骤使用
echo "cache_file=changed-files-cache.json" >> $GITHUB_OUTPUT
echo "过滤前文件数量: $(echo $all_files | wc -w)"
echo "过滤后文件数量: $(echo $filtered_files | wc -w)"
echo "已生成缓存文件: changed-files-cache.json"
- name: Config Git User
# should be turn to ci user
run: |
git config --local user.name "flow_bot"
git config --local user.email "flow_bot@bytedance.com"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NodeVersion }}
- name: Upload changed files cache
uses: actions/upload-artifact@v4
with:
name: changed-files-cache
path: changed-files-cache.json
retention-days: 1
build:
needs: setup
runs-on: ${{ needs.setup.outputs.matrix_os }}
name: Increment Build
env:
BUILD_BRANCH: ${{ github.head_ref || github.ref_name }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.setup.outputs.matrix_node_version }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Download changed files cache
uses: actions/download-artifact@v4
with:
name: changed-files-cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install --to tag:core
node common/scripts/install-run-rush.js update-autoinstaller --name plugins
node common/scripts/install-run-rush.js increment --action install -p "${{ needs.setup.outputs.cache_file }}"
- name: Increment Build
run: node common/scripts/install-run-rush.js increment --action build -p "${{ needs.setup.outputs.cache_file }}"
test:
needs: setup
runs-on: ${{ needs.setup.outputs.matrix_os }}
name: Increment Test Coverage
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.setup.outputs.matrix_node_version }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Download changed files cache
uses: actions/download-artifact@v4
with:
name: changed-files-cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install --to tag:core
node common/scripts/install-run-rush.js update-autoinstaller --name plugins
node common/scripts/install-run-rush.js increment --action install -p "${{ needs.setup.outputs.cache_file }}"
- name: Increment Test:cov
run: node common/scripts/install-run-rush.js increment --action test:cov -p "${{ needs.setup.outputs.cache_file }}"
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
lint:
needs: setup
runs-on: ${{ needs.setup.outputs.matrix_os }}
name: Increment Lint
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.setup.outputs.matrix_node_version }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Download changed files cache
uses: actions/download-artifact@v4
with:
name: changed-files-cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install --to tag:core
node common/scripts/install-run-rush.js update-autoinstaller --name plugins
node common/scripts/install-run-rush.js increment --action install -p "${{ needs.setup.outputs.cache_file }}"
- name: Increment Lint
run: node common/scripts/install-run-rush.js increment --action lint -p "${{ needs.setup.outputs.cache_file }}"
ts-check:
needs: setup
runs-on: ${{ needs.setup.outputs.matrix_os }}
name: Increment TS Check
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.setup.outputs.matrix_node_version }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Download changed files cache
uses: actions/download-artifact@v4
with:
name: changed-files-cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install --to tag:core
node common/scripts/install-run-rush.js update-autoinstaller --name plugins
node common/scripts/install-run-rush.js increment --action install -p "${{ needs.setup.outputs.cache_file }}"
- name: Increment TS Check
run: node common/scripts/install-run-rush.js increment --action ts-check -p "${{ needs.setup.outputs.cache_file }}"
package-audit:
needs: setup
runs-on: ${{ needs.setup.outputs.matrix_os }}
name: Increment Package Audit
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.setup.outputs.matrix_node_version }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Download changed files cache
uses: actions/download-artifact@v4
with:
name: changed-files-cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install --to tag:core
node common/scripts/install-run-rush.js update-autoinstaller --name plugins
node common/scripts/install-run-rush.js increment --action install -p "${{ needs.setup.outputs.cache_file }}"
- name: Increment Package Audit
run: node common/scripts/install-run-rush.js increment --action package-audit -p "${{ needs.setup.outputs.cache_file }}"

72
.github/workflows/ci@main.yml vendored Normal file
View File

@ -0,0 +1,72 @@
# should be optimize as increment build & test
name: CI@main
on:
push:
# test only
branches: ['main',"chore/setup-ci"]
paths:
- 'github/**'
- 'idl/**'
- 'frontend/**'
- 'common/**'
- 'rush.json'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- NodeVersion: 22.16.0
NodeVersionDisplayName: 22
OS: ubuntu-latest
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Config Git User
# should be turn to ci user
run: |
git config --local user.name "flow_bot"
git config --local user.email "flow_bot@bytedance.com"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NodeVersion }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-main
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install
- name: Build all
run: node common/scripts/install-run-rush.js build --verbose
- name: Test:cov all
run: node common/scripts/install-run-rush.js test:cov --verbose
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
- name: Lint all
run: node common/scripts/install-run-rush.js lint --verbose

45
.github/workflows/common-pr-checks.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: PR Common Checks
on:
pull_request:
paths:
- 'github/**'
- 'idl/**'
- 'frontend/**'
- 'common/**'
- 'rush.json'
types: [opened, edited, synchronize, reopened]
jobs:
common-checks:
name: PR Common Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Config Git User
run: |
git config --local user.name "flow_bot"
git config --local user.email "flow_bot@bytedance.com"
- uses: actions/setup-node@v3
with:
node-version: 22.16.0
- name: Install Dependencies
run: node common/scripts/install-run-rush.js install
# PR Title Format Check
- name: Check PR Title Format
if: ${{ !contains(github.event.pull_request.title, 'WIP') && !contains(github.event.pull_request.title, 'wip') }}
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
node common/scripts/install-run-rush.js update-autoinstaller --name rush-commitlint && \
pushd common/autoinstallers/rush-commitlint && \
echo "$PR_TITLE" | npx commitlint --config commitlint.config.js && \
popd
# Add more common checks here
# For example: file size checks, specific file format validations, etc.

View File

@ -44,3 +44,5 @@ lingyibin.jason <lingyibin.jason@bytedance.com>
chenchen.dabaishu <chenchen.dabaishu@bytedance.com>
jiangxujin <jiangxujin@bytedance.com>
huyongbiao <huyongbiao@bytedance.com>
wenming.2020 <wenming.2020@bytedance.com>
tanjizhen <tanjizhen@bytedance.com>

View File

@ -13,6 +13,8 @@ MYSQL_SCHEMA := ./docker/volumes/mysql/schema.sql
MYSQL_INIT_SQL := ./docker/volumes/mysql/sql_init.sql
ENV_FILE := ./docker/.env
STATIC_DIR := ./bin/resources/static
ES_INDEX_SCHEMA := ./docker/volumes/elasticsearch/es_index_schema
ES_SETUP_SCRIPT := ./docker/volumes/elasticsearch/setup_es.sh
debug: env middleware python server
@ -26,7 +28,7 @@ fe:
@echo "Building frontend..."
@bash $(BUILD_FE_SCRIPT)
server: env
server: env
@if [ ! -d "$(STATIC_DIR)" ]; then \
echo "Static directory '$(STATIC_DIR)' not found, building frontend..."; \
$(MAKE) fe; \
@ -84,6 +86,11 @@ atlas-hash:
@echo "Rehash atlas migration files..."
@(cd ./docker/atlas && atlas migrate hash)
setup_es_index:
@echo "Setting up Elasticsearch index..."
@. $(ENV_FILE); \
bash $(ES_SETUP_SCRIPT) --index-dir $(ES_INDEX_SCHEMA) --docker-host false --es-address "$$ES_ADDR"
help:
@echo "Usage: make [target]"
@echo ""
@ -103,4 +110,5 @@ help:
@echo " clean - Stop the docker containers and clean volumes."
@echo " python - Setup python environment."
@echo " atlas-hash - Rehash atlas migration files."
@echo " setup_es_index - Setup elasticsearch index."
@echo " help - Show this help message."

View File

@ -72,8 +72,9 @@ Deployment steps:
# Start the service
cd docker
cp .env.example .env
docker compose --profile '*' up -d
docker compose --profile "*" up -d
```
After the service starts, it is normal for the `coze-minio-setup` , `coze-mysql-setup-init-sql` , and `coze-mysql-setup-schema` containers to be in an exited state (exit 0). For common startup failure issues, **please refer to the [FAQ](https://github.com/coze-dev/coze-studio/wiki/9.-FAQ)**.
4. After starting the service, you can open Coze Studio by accessing `http://localhost:8888/` through your browser.
@ -83,7 +84,7 @@ Deployment steps:
* [Model Configuration](https://github.com/coze-dev/coze-studio/wiki/3.-Model-configuration): Before deploying the open-source version of Coze Studio, you must configure the model service. Otherwise, you cannot select models when building agents, workflows, and apps.
* [Plugin Configuration](https://github.com/coze-dev/coze-studio/wiki/4.-Plugin-Configuration): To use official plugins from the plugin store, you must first configure the plugins and add the authentication keys for third-party services.
* [Basic Component Configuration](https://github.com/coze-dev/coze-studio/wiki/5.-Basic-component-configuration): Learn how to configure components such as image uploaders to use functions like image uploading in Coze Studio .
* [API Reference](https://github.com/coze-dev/coze-studio/wiki/6.-API-Reference): Unlike the commercial edition, the open-source version of Coze Studio only supports personal access token (PAT) authentication and supports APIs related to chat and workflows.
* [API Reference](https://github.com/coze-dev/coze-studio/wiki/6.-API-Reference): The Coze Studio Community Edition API and Chat SDK are authenticated using Personal Access Token, providing APIs for conversations and workflows.
* [Development Guidelines](https://github.com/coze-dev/coze-studio/wiki/7.-Development-Standards):
* [Project Architecture](https://github.com/coze-dev/coze-studio/wiki/7.-Development-Standards#project-architecture): Learn about the technical architecture and core components of the open-source version of Coze Studio.
* [Code Development and Testing](https://github.com/coze-dev/coze-studio/wiki/7.-Development-Standards#code-development-and-testing): Learn how to perform secondary development and testing based on the open-source version of Coze Studio.
@ -107,14 +108,33 @@ We welcome community contributions. For contribution guidelines, please refer to
## Security and privacy
If you discover potential security issues in the project, or believe you may have found a security issue, please notify the ByteDance security team through our [security center](https://security.bytedance.com/src) or [vulnerability reporting mailbox](https://code.byted.org/flowdevops/cozeloop/blob/feat/release/sec@bytedance.com).
Please **do not** create public GitHub Issues.
## Join the community
Scan the QR code below using the Lark mobile app to join the Coze Studio technical exchange group.
## Join Community
We are committed to building an open and friendly developer community. All developers interested in AI Agent development are welcome to join us!
### 🐛 Issue Reports & Feature Requests
To efficiently track and resolve issues while ensuring transparency and collaboration, we recommend participating through:
- **GitHub Issues**: [Submit bug reports or feature requests](https://github.com/coze-dev/coze-studio/issues)
- **Pull Requests**: [Contribute code or documentation improvements](https://github.com/coze-dev/coze-studio/pulls)
### 💬 Technical Discussion & Communication
Join our technical discussion groups to share experiences with other developers and stay updated with the latest project developments:
**Feishu Group Chat**
Scan the QR code below with Feishu mobile app to join:
![Image](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/0a49081e8f3743e8bf3dcdded4bb571a~tplv-goo7wpa0wc-image.image)
**Discord Server**
Click to join: [Coze Community](https://discord.gg/sTVN9EVS4B)
**Telegram Group**
Click to join: Telegram Group [Coze](https://t.me/+pP9CkPnomDA0Mjgx)
## Acknowledgments
Thank you to all the developers and community members who have contributed to the Coze Studio project. Special thanks:
* LLM integration support provided by the Eino framework team
* High-performance framework developed by the Cloudwego team
* The [Eino](https://github.com/cloudwego/eino) framework team - providing powerful support for Coze Studio's agent and workflow runtime engines, model abstractions and implementations, and knowledge base indexing and retrieval
* The [FlowGram](https://github.com/bytedance/flowgram.ai) team - providing a high-quality workflow building engine for Coze Studio's frontend workflow canvas editor
* The [Hertz](https://github.com/cloudwego/hertz) team - Go HTTP framework with high-performance and strong-extensibility for building micro-services
* All users who participated in testing and feedback

View File

@ -25,6 +25,7 @@
Coze Studio源自服务了上万家企业、数百万开发者的「扣子开发平台」我们将它的核心引擎完全开放。它是一个一站式的 AI Agent 可视化开发工具,让 AI Agent 的创建、调试和部署变得前所未有的简单。通过 Coze Studio 提供的可视化设计与编排工具,开发者可以通过零代码或低代码的方式,快速打造和调试智能体、应用和工作流,实现强大的 AI 应用开发和更多定制化业务逻辑,是构建低代码 AI 产品的理想选择。Coze Studio 致力于降低 AI Agent 开发与应用门槛,鼓励社区共建和分享交流,助你在 AI 领域进行更深层次的探索与实践。
Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript整体基于微服务架构并遵循领域驱动设计DDD原则构建。为开发者提供一个高性能、高扩展性、易于二次开发的底层框架助力开发者应对复杂的业务需求。
## 功能清单
| **功能模块** | **功能点** |
| --- | --- |
@ -71,8 +72,10 @@ Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript
# 启动服务
cd docker
cp .env.example .env
docker compose --profile '*' up -d
docker compose --profile "*" up -d
```
服务启动之后`coze-minio-setup`、`coze-mysql-setup-init-sql`、`coze-mysql-setup-schema` 这几个容器处于退出状态exit 0是正常现象。**启动失败常见问题可参考[常见问题](https://github.com/coze-dev/coze-studio/wiki/9.-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)**。
4. 启动服务后,通过浏览器访问 `http://localhost:8888/` 即可打开 Coze Studio。
## 开发指南
@ -81,7 +84,7 @@ Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript
* [模型配置](https://github.com/coze-dev/coze-studio/wiki/3.-模型配置):部署 Coze Studio 开源版之前,必须配置模型服务,否则无法在搭建智能体、工作流和应用时选择模型。
* [插件配置](https://github.com/coze-dev/coze-studio/wiki/4.-插件配置):如需使用插件商店中的官方插件,必须先配置插件,添加第三方服务的鉴权秘钥。
* [基础组件配置](https://github.com/coze-dev/coze-studio/wiki/5.-基础组件配置):了解如何配置图片上传等组件,以便在 Coze Studio 中使用上传图片等功能。
* [API 参考](https://github.com/coze-dev/coze-studio/wiki/6.-API-参考)和商业版不同,Coze Studio 开源版仅支持个人访问秘钥PAT鉴权并支持对话和工作流相关 API。
* [API 参考](https://github.com/coze-dev/coze-studio/wiki/6.-API-参考)Coze Studio 社区版 API 和 Chat SDK 通过个人访问令牌鉴权,提供对话和工作流相关 API。
* [开发规范](https://github.com/coze-dev/coze-studio/wiki/7.-开发规范)
* [项目架构](https://github.com/coze-dev/coze-studio/wiki/7.-%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83#%E9%A1%B9%E7%9B%AE%E6%9E%B6%E6%9E%84):了解 Coze Studio 开源版的技术架构与核心组件。
* [代码开发与测试](https://github.com/coze-dev/coze-studio/wiki/7.-%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83#%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91%E4%B8%8E%E6%B5%8B%E8%AF%95):了解如何基于 Coze Studio 开源版进行二次开发与测试。
@ -106,13 +109,32 @@ Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript
如果你在该项目中发现潜在的安全问题,或你认为可能发现了安全问题,请通过我们的[安全中心](https://security.bytedance.com/src) 或[漏洞报告邮箱](https://code.byted.org/flowdevops/cozeloop/blob/feat/release/sec@bytedance.com)通知字节跳动安全团队。
请**不要**创建公开的 GitHub Issue。
## 加入社区
飞书移动端扫描以下二维码,加入 Coze Studio 技术交流群。
我们致力于构建一个开放、友好的开发者社区,欢迎所有对 AI Agent 开发感兴趣的开发者加入我们!
### 🐛 问题反馈与功能建议
为了更高效地跟踪和解决问题,保证信息透明和便于协同,我们推荐通过以下方式参与:
- **GitHub Issues**[提交 Bug 报告或功能请求](https://github.com/coze-dev/coze-studio/issues)
- **Pull Requests**[贡献代码或文档改进](https://github.com/coze-dev/coze-studio/pulls)
### 💬 技术交流与讨论
加入我们的技术交流群,与其他开发者分享经验、获取项目最新动态:
**飞书群聊**
使用飞书移动端扫描下方二维码加入:
![Image](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/0a49081e8f3743e8bf3dcdded4bb571a~tplv-goo7wpa0wc-image.image)
**Discord 服务器**
点击加入:[Coze Community](https://discord.gg/sTVN9EVS4B)
**Telegram 群组**
点击加入Telegram Group [Coze](https://t.me/+pP9CkPnomDA0Mjgx)
## 致谢
感谢所有为 Coze Studio 项目做出贡献的开发者和社区成员。特别感谢:
* Eino 框架团队提供的 LLM 集成支持
* Cloudwego 团队开发的高性能框架
* [Eino](https://github.com/cloudwego/eino) 框架团队 - 为 Coze Studio 的智能体和工作流运行时、模型抽象封装、知识库索引构建和检索提供了强大的支持
* [FlowGram](https://github.com/bytedance/flowgram.ai) 团队 - 为 Coze Studio 的工作流画布编辑页提供了高质量的流程搭建引擎
* [Hertz](https://github.com/cloudwego/hertz) 团队 - 高性能、强扩展性的 Go HTTP 框架,用于构建微服务
* 所有参与测试和反馈的用户

View File

@ -31,7 +31,7 @@ WORKDIR /app
# Install runtime dependencies for Go app and base for Python
# pax-utils for scanelf, python3 for running Python, python3-dev for headers/shared libs
# bind-tools for nslookup etc., file for debugging file types
RUN apk add --no-cache pax-utils python3 python3-dev bind-tools file deno
RUN apk add --no-cache pax-utils python3 python3-dev bind-tools file deno curl
# Install Python build dependencies, create venv, install packages, then remove build deps
RUN apk add --no-cache --virtual .python-build-deps build-base py3-pip git && \
@ -81,6 +81,9 @@ EXPOSE 8888
# Use a script to start both applications
COPY backend/script/bootstrap.sh /app/bootstrap.sh
RUN chmod +x /app/bootstrap.sh
COPY docker/volumes/elasticsearch/setup_es.sh /app/setup_es.sh
COPY docker/volumes/elasticsearch/es_index_schema /app/es_index_schemas
RUN chmod +x /app/bootstrap.sh /app/setup_es.sh
CMD ["/app/bootstrap.sh"]

View File

@ -60,6 +60,7 @@ import (
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/coze-dev/coze-studio/backend/pkg/safego"
"github.com/coze-dev/coze-studio/backend/pkg/taskgroup"
"github.com/coze-dev/coze-studio/backend/types/consts"
"github.com/coze-dev/coze-studio/backend/types/errno"
@ -183,18 +184,19 @@ func (a *APPApplicationService) DraftProjectDelete(ctx context.Context, req *pro
logs.CtxErrorf(ctx, "publish project '%d' failed, err=%v", req.ProjectID, err)
}
err = a.deleteAPPResources(ctx, req.ProjectID)
if err != nil {
logs.CtxErrorf(ctx, "delete app '%d' resources failed, err=%v", req.ProjectID, err)
}
safego.Go(ctx, func() {
// When an app is deleted, resource deletion is currently handled as a weak dependency, meaning some resources might not be deleted, but they will be inaccessible to the user.
// TODO:: Application resources need to check the deletion status of the application
a.deleteAPPResources(ctx, req.ProjectID)
})
resp = &projectAPI.DraftProjectDeleteResponse{}
return resp, nil
}
func (a *APPApplicationService) deleteAPPResources(ctx context.Context, appID int64) (err error) {
err = plugin.PluginApplicationSVC.DeleteAPPAllPlugins(ctx, appID)
func (a *APPApplicationService) deleteAPPResources(ctx context.Context, appID int64) {
err := plugin.PluginApplicationSVC.DeleteAPPAllPlugins(ctx, appID)
if err != nil {
logs.CtxErrorf(ctx, "delete app '%d' plugins failed, err=%v", appID, err)
}
@ -218,8 +220,6 @@ func (a *APPApplicationService) deleteAPPResources(ctx context.Context, appID in
if err != nil {
logs.CtxErrorf(ctx, "delete app '%d' workflow failed, err=%v", appID, err)
}
return nil
}
func (a *APPApplicationService) DraftProjectUpdate(ctx context.Context, req *projectAPI.DraftProjectUpdateRequest) (resp *projectAPI.DraftProjectUpdateResponse, err error) {

View File

@ -140,7 +140,7 @@ func (c *ConversationApplicationService) CreateConversation(ctx context.Context,
Id: conversationData.ID,
LastSectionID: &conversationData.SectionID,
ConnectorID: &conversationData.ConnectorID,
CreatedAt: conversationData.CreatedAt,
CreatedAt: conversationData.CreatedAt / 1000,
}
return resp, nil
}
@ -176,7 +176,7 @@ func (c *ConversationApplicationService) ListConversation(ctx context.Context, r
Id: conv.ID,
LastSectionID: &conv.SectionID,
ConnectorID: &conv.ConnectorID,
CreatedAt: conv.CreatedAt,
CreatedAt: conv.CreatedAt / 1000,
}
})

View File

@ -299,6 +299,7 @@ func buildARSM2ApiMessage(chunk *entity.AgentRunResponse) []byte {
MetaData: chunkMessageItem.Ext,
ChatID: strconv.FormatInt(chunkMessageItem.RunID, 10),
ReasoningContent: chunkMessageItem.ReasoningContent,
CreatedAt: ptr.Of(chunkMessageItem.CreatedAt / 1000),
}
mCM, _ := json.Marshal(chunkMessage)

View File

@ -110,8 +110,8 @@ func (m *OpenapiMessageApplication) buildMessageListResponse(ctx context.Context
Content: content,
ContentType: string(dm.ContentType),
SectionID: strconv.FormatInt(dm.SectionID, 10),
CreatedAt: dm.CreatedAt,
UpdatedAt: dm.UpdatedAt,
CreatedAt: dm.CreatedAt / 1000,
UpdatedAt: dm.UpdatedAt / 1000,
ChatID: dm.RunID,
MetaData: dm.Ext,
}

View File

@ -26,6 +26,7 @@ import (
"time"
"github.com/cloudwego/eino-ext/components/embedding/ark"
ollamaEmb "github.com/cloudwego/eino-ext/components/embedding/ollama"
"github.com/cloudwego/eino-ext/components/embedding/openai"
ao "github.com/cloudwego/eino-ext/components/model/ark"
"github.com/cloudwego/eino-ext/components/model/deepseek"
@ -111,6 +112,9 @@ func InitService(c *ServiceComponents) (*KnowledgeApplicationService, error) {
case "ve":
ocrAK := os.Getenv("VE_OCR_AK")
ocrSK := os.Getenv("VE_OCR_SK")
if ocrAK == "" || ocrSK == "" {
logs.Warnf("[ve_ocr] ak / sk not configured, ocr might not work well")
}
inst := visual.NewInstance()
inst.Client.SetAccessKey(ocrAK)
inst.Client.SetSecretKey(ocrSK)
@ -346,6 +350,27 @@ func getEmbedding(ctx context.Context) (embedding.Embedder, error) {
if err != nil {
return nil, fmt.Errorf("init ark embedding client failed, err=%w", err)
}
case "ollama":
var (
ollamaEmbeddingBaseURL = os.Getenv("OLLAMA_EMBEDDING_BASE_URL")
ollamaEmbeddingModel = os.Getenv("OLLAMA_EMBEDDING_MODEL")
ollamaEmbeddingDims = os.Getenv("OLLAMA_EMBEDDING_DIMS")
)
dims, err := strconv.ParseInt(ollamaEmbeddingDims, 10, 64)
if err != nil {
return nil, fmt.Errorf("init ollama embedding dims failed, err=%w", err)
}
emb, err = wrap.NewOllamaEmbedder(ctx, &ollamaEmb.EmbeddingConfig{
BaseURL: ollamaEmbeddingBaseURL,
Model: ollamaEmbeddingModel,
}, dims)
if err != nil {
return nil, fmt.Errorf("init ollama embedding failed, err=%w", err)
}
default:
return nil, fmt.Errorf("init knowledge embedding failed, type not configured")
}

View File

@ -438,7 +438,7 @@ func (k *KnowledgeApplicationService) GetDocumentProgress(ctx context.Context, r
DocumentID: domainResp.ProgressList[i].ID,
Progress: int32(domainResp.ProgressList[i].Progress),
Status: convertDocumentStatus2Model(domainResp.ProgressList[i].Status),
StatusDescript: ptr.Of(convertDocumentStatus2Model(domainResp.ProgressList[i].Status).String()),
StatusDescript: &domainResp.ProgressList[i].StatusMsg,
DocumentName: domainResp.ProgressList[i].Name,
RemainingTime: &domainResp.ProgressList[i].RemainingSec,
Size: &domainResp.ProgressList[i].Size,

View File

@ -18,9 +18,12 @@ package plugin
import (
"context"
"strconv"
"strings"
"gorm.io/gorm"
"github.com/coze-dev/coze-studio/backend/domain/plugin/conf"
pluginConf "github.com/coze-dev/coze-studio/backend/domain/plugin/conf"
"github.com/coze-dev/coze-studio/backend/domain/plugin/repository"
"github.com/coze-dev/coze-studio/backend/domain/plugin/service"
@ -28,6 +31,9 @@ import (
user "github.com/coze-dev/coze-studio/backend/domain/user/service"
"github.com/coze-dev/coze-studio/backend/infra/contract/idgen"
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
"github.com/coze-dev/coze-studio/backend/types/errno"
)
type ServiceComponents struct {
@ -68,6 +74,11 @@ func InitService(ctx context.Context, components *ServiceComponents) (*PluginApp
OAuthRepo: oauthRepo,
})
err = checkIDExist(ctx, pluginSVC)
if err != nil {
return nil, err
}
PluginApplicationSVC.DomainSVC = pluginSVC
PluginApplicationSVC.eventbus = components.EventBus
PluginApplicationSVC.oss = components.OSS
@ -77,3 +88,51 @@ func InitService(ctx context.Context, components *ServiceComponents) (*PluginApp
return PluginApplicationSVC, nil
}
func checkIDExist(ctx context.Context, pluginService service.PluginService) error {
pluginProducts := conf.GetAllPluginProducts()
pluginIDs := make([]int64, 0, len(pluginProducts))
var toolIDs []int64
for _, p := range pluginProducts {
pluginIDs = append(pluginIDs, p.Info.ID)
toolIDs = append(toolIDs, p.ToolIDs...)
}
pluginInfos, err := pluginService.MGetDraftPlugins(ctx, pluginIDs)
if err != nil {
return err
}
if len(pluginInfos) > 0 {
conflictsIDs := make([]int64, 0, len(pluginInfos))
for _, p := range pluginInfos {
conflictsIDs = append(conflictsIDs, p.ID)
}
return errorx.New(errno.ErrPluginIDExist,
errorx.KV("plugin_id", strings.Join(slices.Transform(conflictsIDs, func(id int64) string {
return strconv.FormatInt(id, 10)
}), ",")),
)
}
tools, err := pluginService.MGetDraftTools(ctx, toolIDs)
if err != nil {
return err
}
if len(tools) > 0 {
conflictsIDs := make([]int64, 0, len(tools))
for _, t := range tools {
conflictsIDs = append(conflictsIDs, t.ID)
}
return errorx.New(errno.ErrToolIDExist,
errorx.KV("tool_id", strings.Join(slices.Transform(conflictsIDs, func(id int64) string {
return strconv.FormatInt(id, 10)
}), ",")),
)
}
return nil
}

View File

@ -76,28 +76,38 @@ func (s *SearchApplicationService) GetDraftIntelligenceList(ctx context.Context,
intelligenceDataList := make([]*intelligence.IntelligenceData, len(searchResp.Data))
logs.CtxDebugf(ctx, "[GetDraftIntelligenceList] searchResp.Data: %v", conv.DebugJsonToStr(searchResp.Data))
if len(searchResp.Data) > 1 {
for idx := range searchResp.Data[1:] {
index := idx + 1
data := searchResp.Data[index]
tasks.Go(func() error {
info, err := s.packIntelligenceData(ctx, data)
if err != nil {
logs.CtxErrorf(ctx, "[packIntelligenceData] failed id %v, type %d , name %s, err: %v", data.ID, data.Type, data.GetName(), err)
return err
}
for idx := range searchResp.Data {
data := searchResp.Data[idx]
index := idx
tasks.Go(func() error {
info, err := s.packIntelligenceData(ctx, data)
if err != nil {
logs.CtxErrorf(ctx, "[packIntelligenceData] failed id %v, type %d , name %s, err: %v", data.ID, data.Type, data.GetName(), err)
return err
}
lock.Lock()
defer lock.Unlock()
intelligenceDataList[index] = info
return nil
})
s.packIntelligenceData(ctx, data)
lock.Lock()
defer lock.Unlock()
intelligenceDataList[index] = info
return nil
})
}
}
if len(searchResp.Data) != 0 {
info, err := s.packIntelligenceData(ctx, searchResp.Data[0])
if err != nil {
logs.CtxErrorf(ctx, "[packIntelligenceData] failed id %v, type %d , name %s, err: %v", searchResp.Data[0].ID, searchResp.Data[0].Type, searchResp.Data[0].GetName(), err)
return nil, err
}
lock.Lock()
intelligenceDataList[0] = info
lock.Unlock()
}
err = tasks.Wait()
if err != nil {
return nil, err
}
_ = tasks.Wait()
filterDataList := make([]*intelligence.IntelligenceData, 0)
for _, data := range intelligenceDataList {
if data != nil {

View File

@ -86,25 +86,39 @@ func (s *SearchApplicationService) LibraryResourceList(ctx context.Context, req
lock := sync.Mutex{}
tasks := taskgroup.NewUninterruptibleTaskGroup(ctx, 10)
resources := make([]*common.ResourceInfo, len(searchResp.Data))
for idx := range searchResp.Data {
v := searchResp.Data[idx]
index := idx
tasks.Go(func() error {
ri, err := s.packResource(ctx, v)
if err != nil {
logs.CtxErrorf(ctx, "[LibraryResourceList] packResource failed, will ignore resID: %d, Name : %s, resType: %d, err: %v",
v.ResID, v.GetName(), v.ResType, err)
return err
}
if len(searchResp.Data) > 1 {
for idx := range searchResp.Data[1:] {
index := idx + 1
v := searchResp.Data[index]
tasks.Go(func() error {
ri, err := s.packResource(ctx, v)
if err != nil {
logs.CtxErrorf(ctx, "[LibraryResourceList] packResource failed, will ignore resID: %d, Name : %s, resType: %d, err: %v",
v.ResID, v.GetName(), v.ResType, err)
return err
}
lock.Lock()
defer lock.Unlock()
resources[index] = ri
return nil
})
lock.Lock()
defer lock.Unlock()
resources[index] = ri
return nil
})
}
}
if len(searchResp.Data) != 0 {
ri, err := s.packResource(ctx, searchResp.Data[0])
if err != nil {
return nil, err
}
lock.Lock()
resources[0] = ri
lock.Unlock()
}
err = tasks.Wait()
if err != nil {
return nil, err
}
_ = tasks.Wait()
filterResource := make([]*common.ResourceInfo, 0)
for _, res := range resources {
if res == nil {

View File

@ -19,7 +19,10 @@ package user
import (
"context"
"net/mail"
"os"
"slices"
"strconv"
"strings"
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
@ -30,7 +33,8 @@ import (
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
langSlices "github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
"github.com/coze-dev/coze-studio/backend/types/consts"
"github.com/coze-dev/coze-studio/backend/types/errno"
)
@ -56,6 +60,11 @@ func (u *UserApplicationService) PassportWebEmailRegisterV2(ctx context.Context,
return nil, "", errorx.New(errno.ErrUserInvalidParamCode, errorx.KV("msg", "Invalid email"))
}
// Allow Register Checker
if !u.allowRegisterChecker(req.GetEmail()) {
return nil, "", errorx.New(errno.ErrNotAllowedRegisterCode)
}
userInfo, err := u.DomainSVC.Create(ctx, &user.CreateUserRequest{
Email: req.GetEmail(),
Password: req.GetPassword(),
@ -77,6 +86,20 @@ func (u *UserApplicationService) PassportWebEmailRegisterV2(ctx context.Context,
}, userInfo.SessionKey, nil
}
func (u *UserApplicationService) allowRegisterChecker(email string) bool {
disableUserRegistration := os.Getenv(consts.DisableUserRegistration)
if strings.ToLower(disableUserRegistration) != "true" {
return true
}
allowedEmails := os.Getenv(consts.AllowRegistrationEmail)
if allowedEmails == "" {
return false
}
return slices.Contains(strings.Split(allowedEmails, ","), strings.ToLower(email))
}
// PassportWebLogoutGet 处理用户登出请求
func (u *UserApplicationService) PassportWebLogoutGet(ctx context.Context, req *passport.PassportWebLogoutGetRequest) (
resp *passport.PassportWebLogoutGetResponse, err error,
@ -204,7 +227,7 @@ func (u *UserApplicationService) GetSpaceListV2(ctx context.Context, req *playgr
return nil, err
}
botSpaces := slices.Transform(spaces, func(space *entity.Space) *playground.BotSpaceV2 {
botSpaces := langSlices.Transform(spaces, func(space *entity.Space) *playground.BotSpaceV2 {
return &playground.BotSpaceV2{
ID: space.ID,
Name: space.Name,
@ -230,7 +253,7 @@ func (u *UserApplicationService) GetSpaceListV2(ctx context.Context, req *playgr
func (u *UserApplicationService) MGetUserBasicInfo(ctx context.Context, req *playground.MGetUserBasicInfoRequest) (
resp *playground.MGetUserBasicInfoResponse, err error,
) {
userIDs, err := slices.TransformWithErrorCheck(req.GetUserIds(), func(s string) (int64, error) {
userIDs, err := langSlices.TransformWithErrorCheck(req.GetUserIds(), func(s string) (int64, error) {
return strconv.ParseInt(s, 10, 64)
})
if err != nil {
@ -243,7 +266,7 @@ func (u *UserApplicationService) MGetUserBasicInfo(ctx context.Context, req *pla
}
return &playground.MGetUserBasicInfoResponse{
UserBasicInfoMap: slices.ToMap(userInfos, func(userInfo *entity.User) (string, *playground.UserBasicInfo) {
UserBasicInfoMap: langSlices.ToMap(userInfos, func(userInfo *entity.User) (string, *playground.UserBasicInfo) {
return strconv.FormatInt(userInfo.UserID, 10), userDo2PlaygroundTo(userInfo)
}),
Code: 0,

View File

@ -3497,7 +3497,7 @@ func entityNodeTypeToAPINodeTemplateType(nodeType entity.NodeType) (workflow.Nod
// return workflow.NodeTemplateType_DatabaseInsert, nil
return workflow.NodeTemplateType(46), nil
case entity.NodeTypeJsonSerialization:
return workflow.NodeTemplateType_JsonSerialization, nil
return workflow.NodeTemplateType(58), nil
case entity.NodeTypeJsonDeserialization:
return workflow.NodeTemplateType_JsonDeserialization, nil
case entity.NodeTypeKnowledgeDeleter:

View File

@ -157,7 +157,7 @@ meta:
top_k: 0
stop: []
openai:
by_azure: true
by_azure: false
api_version: ""
response_format:
type: text

View File

@ -34,13 +34,13 @@ const (
type RunEvent string
const (
RunEventCreated RunEvent = "conversation.run.created"
RunEventInProgress RunEvent = "conversation.run.in_progress"
RunEventCompleted RunEvent = "conversation.run.completed"
RunEventFailed RunEvent = "conversation.run.failed"
RunEventExpired RunEvent = "conversation.run.expired"
RunEventCancelled RunEvent = "conversation.run.cancelled"
RunEventRequiredAction RunEvent = "conversation.run.required_action"
RunEventCreated RunEvent = "conversation.chat.created"
RunEventInProgress RunEvent = "conversation.chat.in_progress"
RunEventCompleted RunEvent = "conversation.chat.completed"
RunEventFailed RunEvent = "conversation.chat.failed"
RunEventExpired RunEvent = "conversation.chat.expired"
RunEventCancelled RunEvent = "conversation.chat.cancelled"
RunEventRequiredAction RunEvent = "conversation.chat.required_action"
RunEventMessageDelta RunEvent = "conversation.message.delta"
RunEventMessageCompleted RunEvent = "conversation.message.completed"

View File

@ -58,9 +58,7 @@ func (dao *KnowledgeDocumentSliceDAO) BatchCreate(ctx context.Context, slices []
func (dao *KnowledgeDocumentSliceDAO) BatchSetStatus(ctx context.Context, ids []int64, status int32, reason string) error {
s := dao.Query.KnowledgeDocumentSlice
updates := map[string]any{s.Status.ColumnName().String(): status}
if reason != "" {
updates[s.FailReason.ColumnName().String()] = reason
}
updates[s.FailReason.ColumnName().String()] = reason
updates[s.UpdatedAt.ColumnName().String()] = time.Now().UnixMilli()
_, err := s.WithContext(ctx).Where(s.ID.In(ids...)).Updates(updates)
return err

View File

@ -166,11 +166,22 @@ func (k *knowledgeSVC) indexDocument(ctx context.Context, event *entity.Event) (
return
}
if err != nil {
var errMsg string
var statusError errorx.StatusError
if errors.As(err, &statusError) && statusError.Code() == errno.ErrKnowledgeNonRetryableCode {
if setStatusErr := k.documentRepo.SetStatus(ctx, event.Document.ID, int32(entity.DocumentStatusFailed), err.Error()); setStatusErr != nil {
logs.CtxErrorf(ctx, "[indexDocument] set document status failed, err: %v", setStatusErr)
var status int32
if errors.As(err, &statusError) {
errMsg = errorx.ErrorWithoutStack(statusError)
if statusError.Code() == errno.ErrKnowledgeNonRetryableCode {
status = int32(entity.DocumentStatusFailed)
} else {
status = int32(entity.DocumentStatusChunking)
}
} else {
errMsg = err.Error()
status = int32(entity.DocumentStatusChunking)
}
if setStatusErr := k.documentRepo.SetStatus(ctx, event.Document.ID, status, errMsg); setStatusErr != nil {
logs.CtxErrorf(ctx, "[indexDocument] set document status failed, err: %v", setStatusErr)
}
}
}()

View File

@ -545,6 +545,12 @@ func (k *knowledgeSVC) MGetDocumentProgress(ctx context.Context, request *MGetDo
if documents[i].Status == int32(entity.DocumentStatusEnable) || documents[i].Status == int32(entity.DocumentStatusFailed) {
item.Progress = progressbar.ProcessDone
} else {
if documents[i].FailReason != "" {
item.StatusMsg = documents[i].FailReason
item.Status = entity.DocumentStatusFailed
progresslist = append(progresslist, &item)
continue
}
err = k.getProgressFromCache(ctx, &item)
if err != nil {
logs.CtxErrorf(ctx, "get progress from cache failed, err: %v", err)
@ -564,8 +570,9 @@ func (k *knowledgeSVC) getProgressFromCache(ctx context.Context, documentProgres
documentProgress.Progress = int(percent)
documentProgress.RemainingSec = int64(remainSec)
if len(errMsg) != 0 {
documentProgress.Progress = 0
documentProgress.Status = entity.DocumentStatusChunking
documentProgress.Status = entity.DocumentStatusFailed
documentProgress.StatusMsg = errMsg
return err
}
return err
}
@ -1276,6 +1283,16 @@ func (k *knowledgeSVC) fromModelDocument(ctx context.Context, document *model.Kn
documentEntity.TableInfo.Columns = append(documentEntity.TableInfo.Columns, document.TableInfo.Columns[i])
}
}
switch document.Status {
case int32(entity.DocumentStatusChunking), int32(entity.DocumentStatusInit), int32(entity.DocumentStatusUploading):
if document.FailReason != "" {
documentEntity.Status = entity.DocumentStatusFailed
documentEntity.StatusMsg = document.FailReason
}
case int32(entity.DocumentStatusFailed):
documentEntity.StatusMsg = document.FailReason
default:
}
if len(document.URI) != 0 {
objUrl, err := k.storage.GetObjectUrl(ctx, document.URI)
if err != nil {

View File

@ -33,7 +33,7 @@ const (
func SwitchToDataType(itemType table.FieldItemType) entity.DataType {
switch itemType {
case table.FieldItemType_Text:
return entity.TypeVarchar
return entity.TypeText
case table.FieldItemType_Number:
return entity.TypeBigInt
case table.FieldItemType_Date:

View File

@ -27,6 +27,7 @@ import (
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
"github.com/coze-dev/coze-studio/backend/domain/plugin/conf"
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
"github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/model"
"github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/query"
@ -88,7 +89,7 @@ func (p *PluginDraftDAO) getSelected(opt *PluginSelectedOption) (selected []fiel
}
func (p *PluginDraftDAO) Create(ctx context.Context, plugin *entity.PluginInfo) (pluginID int64, err error) {
id, err := p.idGen.GenID(ctx)
id, err := p.genPluginID(ctx)
if err != nil {
return 0, err
}
@ -117,6 +118,25 @@ func (p *PluginDraftDAO) Create(ctx context.Context, plugin *entity.PluginInfo)
return id, nil
}
func (p *PluginDraftDAO) genPluginID(ctx context.Context) (id int64, err error) {
retryTimes := 5
for i := 0; i < retryTimes; i++ {
id, err = p.idGen.GenID(ctx)
if err != nil {
return 0, err
}
if _, ok := conf.GetPluginProduct(id); !ok {
break
}
if i == retryTimes-1 {
return 0, fmt.Errorf("id %d is confilict with product plugin id.", id)
}
}
return id, nil
}
func (p *PluginDraftDAO) Get(ctx context.Context, pluginID int64, opt *PluginSelectedOption) (plugin *entity.PluginInfo, exist bool, err error) {
table := p.query.PluginDraft
pl, err := table.WithContext(ctx).
@ -262,7 +282,7 @@ func (p *PluginDraftDAO) Update(ctx context.Context, plugin *entity.PluginInfo)
}
func (p *PluginDraftDAO) CreateWithTX(ctx context.Context, tx *query.QueryTx, plugin *entity.PluginInfo) (pluginID int64, err error) {
id, err := p.idGen.GenID(ctx)
id, err := p.genPluginID(ctx)
if err != nil {
return 0, err
}

View File

@ -27,6 +27,7 @@ import (
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
"github.com/coze-dev/coze-studio/backend/domain/plugin/conf"
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
"github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/model"
"github.com/coze-dev/coze-studio/backend/domain/plugin/internal/dal/query"
@ -90,7 +91,8 @@ func (t *ToolDraftDAO) getSelected(opt *ToolSelectedOption) (selected []field.Ex
}
func (t *ToolDraftDAO) Create(ctx context.Context, tool *entity.ToolInfo) (toolID int64, err error) {
id, err := t.idGen.GenID(ctx)
id, err := t.genToolID(ctx)
if err != nil {
return 0, err
}
@ -111,6 +113,27 @@ func (t *ToolDraftDAO) Create(ctx context.Context, tool *entity.ToolInfo) (toolI
return id, nil
}
func (t *ToolDraftDAO) genToolID(ctx context.Context) (id int64, err error) {
retryTimes := 5
for i := 0; i < retryTimes; i++ {
id, err = t.idGen.GenID(ctx)
if err != nil {
return 0, err
}
if _, ok := conf.GetToolProduct(id); !ok {
break
}
if i == retryTimes-1 {
return 0, fmt.Errorf("id %d is confilict with product tool id.", id)
}
}
return id, nil
}
func (t *ToolDraftDAO) Get(ctx context.Context, toolID int64) (tool *entity.ToolInfo, exist bool, err error) {
table := t.query.ToolDraft
tl, err := table.WithContext(ctx).
@ -335,7 +358,7 @@ func (t *ToolDraftDAO) BatchCreateWithTX(ctx context.Context, tx *query.QueryTx,
tls := make([]*model.ToolDraft, 0, len(tools))
for _, tool := range tools {
id, err := t.idGen.GenID(ctx)
id, err := t.genToolID(ctx)
if err != nil {
return nil, err
}

View File

@ -12,7 +12,7 @@ require (
github.com/apache/thrift v0.21.0
github.com/bytedance/mockey v1.2.14
github.com/bytedance/sonic v1.13.2
github.com/cloudwego/eino v0.3.51
github.com/cloudwego/eino v0.3.55
github.com/cloudwego/eino-ext/components/model/ark v0.1.15
github.com/cloudwego/eino-ext/components/model/claude v0.1.1
github.com/cloudwego/eino-ext/components/model/deepseek v0.0.0-20250715055739-0d0e28441a2f
@ -55,6 +55,7 @@ require github.com/alicebob/miniredis/v2 v2.34.0
require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/cloudwego/eino-ext/components/embedding/ark v0.0.0-20250522060253-ddb617598b09
github.com/cloudwego/eino-ext/components/embedding/ollama v0.0.0-20250728060543-79ec300857b8
github.com/cloudwego/eino-ext/components/embedding/openai v0.0.0-20250522060253-ddb617598b09
github.com/cloudwego/eino-ext/components/model/gemini v0.1.2
github.com/cloudwego/eino-ext/components/model/ollama v0.0.0-20250610035057-2c4e7c8488a5
@ -66,7 +67,7 @@ require (
github.com/jinzhu/copier v0.4.0
github.com/mattn/go-shellwords v1.0.12
github.com/nsqio/go-nsq v1.1.0
github.com/ollama/ollama v0.6.5
github.com/ollama/ollama v0.9.6
github.com/rbretecher/go-postman-collection v0.9.0
github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.17
github.com/yuin/goldmark v1.4.13
@ -80,6 +81,10 @@ require (
cloud.google.com/go/auth v0.9.3 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.37 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.18 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.84.1 // indirect
github.com/cloudwego/gopkg v0.1.4 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/extrame/ole2 v0.0.0-20160812065207-d69429661ad7 // indirect
@ -106,20 +111,20 @@ require (
require (
github.com/anthropics/anthropic-sdk-go v1.4.0 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/aws/aws-sdk-go-v2 v1.33.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.6 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.54 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.11 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.9 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aws/smithy-go v1.22.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bytedance/gopkg v0.1.1 // indirect
@ -242,7 +247,7 @@ require (
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/volcengine/volcengine-go-sdk v1.1.20 // indirect
github.com/volcengine/volcengine-go-sdk v1.1.20
github.com/x448/float16 v0.8.4 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect

View File

@ -824,8 +824,12 @@ github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2 v1.33.0 h1:Evgm4DI9imD81V0WwD+TN4DCwjUMdc94TrduMLbgZJs=
github.com/aws/aws-sdk-go-v2 v1.33.0/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U=
github.com/aws/aws-sdk-go-v2 v1.36.6 h1:zJqGjVbRdTPojeCGWn5IR5pbJwSQSBh5RWFTQcEQGdU=
github.com/aws/aws-sdk-go-v2 v1.36.6/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3/go.mod h1:UbnqO+zjqk3uIt9yCACHJ9IVNhyhOCnYk8yA19SAWrM=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11 h1:12SpdwU8Djs+YGklkinSSlcrPyj3H4VifVsKf78KbwA=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.11/go.mod h1:dd+Lkp6YmMryke+qxW/VnKyhMBDTYP41Q2Bb+6gNZgY=
github.com/aws/aws-sdk-go-v2/config v1.29.1 h1:JZhGawAyZ/EuJeBtbQYnaoftczcb2drR2Iq36Wgz4sQ=
github.com/aws/aws-sdk-go-v2/config v1.29.1/go.mod h1:7bR2YD5euaxBhzt2y/oDkt3uNRb6tjFp98GlTFueRwk=
github.com/aws/aws-sdk-go-v2/credentials v1.17.54 h1:4UmqeOqJPvdvASZWrKlhzpRahAulBfyTJQUaYy4+hEI=
@ -834,15 +838,31 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 h1:5grmdTdMsovn9kPZPI23Hh
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24/go.mod h1:zqi7TVKTswH3Ozq28PkmBmgzG1tona7mo9G2IJg4Cis=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 h1:igORFSiH3bfq4lxKFkTSYDhJEUCYo6C8VKiWJjYwQuQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28/go.mod h1:3So8EA/aAYm36L7XIvCVwLa0s5N0P7o2b1oqnx/2R4g=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 h1:osMWfm/sC/L4tvEdQ65Gri5ZZDCUpuYJZbTTDrsn4I0=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37/go.mod h1:ZV2/1fbjOPr4G4v38G3Ww5TBT4+hmsK45s/rxu1fGy0=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 h1:1mOW9zAUMhTSrMDssEHS/ajx8JcAj/IcftzcmNlmVLI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28/go.mod h1:kGlXVIWDfvt2Ox5zEaNglmq0hXPHgQFNMix33Tw22jA=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 h1:v+X21AvTb2wZ+ycg1gx+orkB/9U6L7AOp93R7qYxsxM=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37/go.mod h1:G0uM1kyssELxmJ2VZEfG0q2npObR3BAkF3c1VsfVnfs=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.37 h1:XTZZ0I3SZUHAtBLBU6395ad+VOblE0DwQP6MuaNeics=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.37/go.mod h1:Pi6ksbniAWVwu2S8pEzcYPyhUkAcLaufxN7PfAUQjBk=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.5 h1:M5/B8JUaCI8+9QD+u3S/f4YHpvqE9RpSkV3rf0Iks2w=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.5/go.mod h1:Bktzci1bwdbpuLiu3AOksiNPMl/LLKmX1TWmqp2xbvs=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 h1:TQmKDyETFGiXVhZfQ/I0cCFziqqX58pi4tKJGYGFSz0=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9/go.mod h1:HVLPK2iHQBUx7HfZeOQSEu3v2ubZaAY2YPbAm5/WUyY=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 h1:vvbXsA2TVO80/KT7ZqCbx934dt6PY+vQ8hZpUZ/cpYg=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18/go.mod h1:m2JJHledjBGNMsLOF1g9gbAxprzq3KjC8e4lxtn+eWg=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.18 h1:OS2e0SKqsU2LiJPqL8u9x41tKc6MMEHrWjLVLn3oysg=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.18/go.mod h1:+Yrk+MDGzlNGxCXieljNeWpoZTCQUQVL+Jk9hGGJ8qM=
github.com/aws/aws-sdk-go-v2/service/s3 v1.84.1 h1:RkHXU9jP0DptGy7qKI8CBGsUJruWz0v5IgwBa2DwWcU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.84.1/go.mod h1:3xAOf7tdKF+qbb+XpU+EPhNXAdun3Lu1RcDrj8KC24I=
github.com/aws/aws-sdk-go-v2/service/sso v1.24.11 h1:kuIyu4fTT38Kj7YCC7ouNbVZSSpqkZ+LzIfhCr6Dg+I=
github.com/aws/aws-sdk-go-v2/service/sso v1.24.11/go.mod h1:Ro744S4fKiCCuZECXgOi760TiYylUM8ZBf6OGiZzJtY=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.10 h1:l+dgv/64iVlQ3WsBbnn+JSbkj01jIi+SM0wYsj3y/hY=
@ -852,6 +872,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.33.9/go.mod h1:f6vjfZER1M17Fokn0Izss
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro=
github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw=
github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/bazelbuild/rules_go v0.49.0/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
@ -916,10 +938,12 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4=
github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
github.com/cloudwego/eino v0.3.51 h1:emSaDu49v9EEJYOusL42Li/VL5QBSyBvhxO9ZcKPZvs=
github.com/cloudwego/eino v0.3.51/go.mod h1:wUjz990apdsaOraOXdh6CdhVXq8DJsOvLsVlxNTcNfY=
github.com/cloudwego/eino v0.3.55 h1:lMZrGtEh0k3qykQTLNXSXuAa98OtF2tS43GMHyvN7nA=
github.com/cloudwego/eino v0.3.55/go.mod h1:wUjz990apdsaOraOXdh6CdhVXq8DJsOvLsVlxNTcNfY=
github.com/cloudwego/eino-ext/components/embedding/ark v0.0.0-20250522060253-ddb617598b09 h1:hZScBE/Etiji2RqjlABcAkq6n1uzYPu+jo4GV5TF8Hc=
github.com/cloudwego/eino-ext/components/embedding/ark v0.0.0-20250522060253-ddb617598b09/go.mod h1:pLtH5BZKgb7/bB8+P3W5/f1d46gTl9K77+08j88Gb4k=
github.com/cloudwego/eino-ext/components/embedding/ollama v0.0.0-20250728060543-79ec300857b8 h1:uJrs6SmfYnca8A+k9+3qJ4MYwYHMncUlGac1mYQT+Ak=
github.com/cloudwego/eino-ext/components/embedding/ollama v0.0.0-20250728060543-79ec300857b8/go.mod h1:nav79aUcd+UR24dLA+7l7RcHCMlg26zbDAKvjONdrw0=
github.com/cloudwego/eino-ext/components/embedding/openai v0.0.0-20250522060253-ddb617598b09 h1:C8RjF193iguUuevkuv0q4SC+XGlM/DlJEgic7l8OUAI=
github.com/cloudwego/eino-ext/components/embedding/openai v0.0.0-20250522060253-ddb617598b09/go.mod h1:S09z/CAQNyx+AbgfJRQXLUAYlPpxQWWLVuQxO34F90A=
github.com/cloudwego/eino-ext/components/model/ark v0.1.15 h1:ydOvtEK67VI5DvNgg64eTxbjxMYhGBMOVP2okaZKk18=
@ -1594,8 +1618,8 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+
github.com/nyaruka/phonenumbers v1.0.55 h1:bj0nTO88Y68KeUQ/n3Lo2KgK7lM1hF7L9NFuwcCl3yg=
github.com/nyaruka/phonenumbers v1.0.55/go.mod h1:sDaTZ/KPX5f8qyV9qN+hIm+4ZBARJrupC6LuhshJq1U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/ollama/ollama v0.6.5 h1:vXKkVX57ql/1ZzMw4SVK866Qfd6pjwEcITVyEpF0QXQ=
github.com/ollama/ollama v0.6.5/go.mod h1:pGgtoNyc9DdM6oZI6yMfI6jTk2Eh4c36c2GpfQCH7PY=
github.com/ollama/ollama v0.9.6 h1:HZNJmB52pMt6zLkGkkheBuXBXM5478eiSAj7GR75AMc=
github.com/ollama/ollama v0.9.6/go.mod h1:zLwx3iZ3AI4Rc/egsrx3u1w4RU2MHQ/Ylxse48jvyt4=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

View File

@ -18,12 +18,16 @@ package veocr
import (
"context"
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/types/errno"
"github.com/volcengine/volc-sdk-golang/service/visual"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
"github.com/coze-dev/coze-studio/backend/infra/contract/document/ocr"
)
@ -52,10 +56,14 @@ func (o *ocrImpl) FromBase64(ctx context.Context, b64 string) ([]string, error)
resp, statusCode, err := o.config.Client.OCRNormal(form)
if err != nil {
return nil, err
return nil, o.handleError(fmt.Errorf("[ve_ocr][FromBase64] OCRNormal err: %w", err))
}
if statusCode != http.StatusOK {
return nil, fmt.Errorf("[FromBase64] failed, status code=%d", statusCode)
err = fmt.Errorf("[ve_ocr][FromBase64] OCRNormal failed, status code=%d", statusCode)
if statusCode == http.StatusBadRequest {
return nil, errorx.WrapByCode(err, errno.ErrKnowledgeNonRetryableCode)
}
return nil, err
}
return resp.Data.LineTexts, nil
@ -67,10 +75,14 @@ func (o *ocrImpl) FromURL(ctx context.Context, url string) ([]string, error) {
resp, statusCode, err := o.config.Client.OCRNormal(form)
if err != nil {
return nil, err
return nil, o.handleError(fmt.Errorf("[ve_ocr][FromURL] OCRNormal error: %w", err))
}
if statusCode != http.StatusOK {
return nil, fmt.Errorf("[FromBase64] failed, status code=%d", statusCode)
err = fmt.Errorf("[ve_ocr][FromURL] OCRNormal failed, status code=%d", statusCode)
if statusCode == http.StatusBadRequest {
return nil, errorx.WrapByCode(err, errno.ErrKnowledgeNonRetryableCode)
}
return nil, err
}
return resp.Data.LineTexts, nil
@ -94,3 +106,21 @@ func (o *ocrImpl) newForm() url.Values {
}
return form
}
func (o *ocrImpl) handleError(err error) error {
var (
apiErr = &model.APIError{}
reqErr = &model.RequestError{}
)
if errors.As(err, &apiErr) {
if apiErr.HTTPStatusCode >= http.StatusInternalServerError ||
apiErr.HTTPStatusCode == http.StatusTooManyRequests {
return err
}
} else if errors.As(err, &reqErr) {
if reqErr.HTTPStatusCode >= http.StatusInternalServerError {
return err
}
}
return errorx.WrapByCode(err, errno.ErrKnowledgeNonRetryableCode)
}

View File

@ -18,11 +18,16 @@ package ark
import (
"context"
"errors"
"fmt"
"math"
"net/http"
"github.com/cloudwego/eino-ext/components/embedding/ark"
"github.com/cloudwego/eino/components/embedding"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/types/errno"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
contract "github.com/coze-dev/coze-studio/backend/infra/contract/embedding"
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
@ -51,7 +56,21 @@ func (d embWrap) EmbedStrings(ctx context.Context, texts []string, opts ...embed
}
normed, err := d.slicedNormL2(partResult)
if err != nil {
return nil, err
var (
apiErr = &model.APIError{}
reqErr = &model.RequestError{}
)
if errors.As(err, &apiErr) {
if apiErr.HTTPStatusCode >= http.StatusInternalServerError ||
apiErr.HTTPStatusCode == http.StatusTooManyRequests {
return nil, err
}
} else if errors.As(err, &reqErr) {
if reqErr.HTTPStatusCode >= http.StatusInternalServerError {
return nil, err
}
}
return nil, errorx.WrapByCode(err, errno.ErrKnowledgeNonRetryableCode)
}
resp = append(resp, normed...)
}

View File

@ -0,0 +1,32 @@
/*
* Copyright 2024 CloudWeGo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package wrap
import (
"context"
"github.com/cloudwego/eino-ext/components/embedding/ollama"
contract "github.com/coze-dev/coze-studio/backend/infra/contract/embedding"
)
func NewOllamaEmbedder(ctx context.Context, config *ollama.EmbeddingConfig, dimensions int64) (contract.Embedder, error) {
emb, err := ollama.NewEmbedder(ctx, config)
if err != nil {
return nil, err
}
return &denseOnlyWrap{dims: dimensions, Embedder: emb}, nil
}

View File

@ -24,9 +24,14 @@ import (
"github.com/coze-dev/coze-studio/backend/infra/contract/modelmgr"
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
"github.com/coze-dev/coze-studio/backend/pkg/lang/sets"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
)
func NewModelMgr(staticModels []*modelmgr.Model) (modelmgr.Manager, error) {
if len(staticModels) == 0 {
logs.Warnf("[NewModelMgr] no static models found, please check if the config has been loaded correctly")
}
mapping := make(map[int64]*modelmgr.Model, len(staticModels))
for i := range staticModels {
mapping[staticModels[i].ID] = staticModels[i]

View File

@ -64,6 +64,8 @@ func (m *mysqlService) CreateTable(ctx context.Context, req *rdb.CreateTableRequ
if col.DefaultValue != nil {
if col.DataType == entity2.TypeTimestamp {
colDef += fmt.Sprintf(" DEFAULT %s", *col.DefaultValue)
} else if col.DataType == entity2.TypeText {
// do nothing
} else {
colDef += fmt.Sprintf(" DEFAULT '%s'", *col.DefaultValue)
}

View File

@ -0,0 +1,299 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package s3
import (
"bytes"
"context"
"fmt"
"io"
"net"
"net/url"
"os"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/coze-dev/coze-studio/backend/infra/contract/imagex"
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
"github.com/coze-dev/coze-studio/backend/pkg/ctxcache"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/coze-dev/coze-studio/backend/types/consts"
"github.com/coze-dev/coze-studio/backend/types/errno"
)
type s3Client struct {
client *s3.Client
bucketName string
}
func NewStorageImagex(ctx context.Context, ak, sk, bucketName, endpoint, region string) (imagex.ImageX, error) {
t, err := getS3Client(ctx, ak, sk, bucketName, endpoint, region)
if err != nil {
return nil, err
}
return t, nil
}
func getS3Client(ctx context.Context, ak, sk, bucketName, endpoint, region string) (*s3Client, error) {
creds := credentials.NewStaticCredentialsProvider(ak, sk, "")
customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
return aws.Endpoint{
PartitionID: "aws",
URL: endpoint,
SigningRegion: region,
HostnameImmutable: true,
Source: aws.EndpointSourceCustom,
}, nil
})
cfg, err := config.LoadDefaultConfig(
context.TODO(),
config.WithCredentialsProvider(creds),
config.WithEndpointResolverWithOptions(customResolver),
config.WithRegion("auto"),
)
if err != nil {
return nil, fmt.Errorf("init config failed, bucketName: %s, endpoint: %s, region: %s, err: %v", bucketName, endpoint, region, err)
}
c := s3.NewFromConfig(cfg, func(o *s3.Options) {
o.UsePathStyle = false // virtual-host mode
o.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired
})
t := &s3Client{
client: c,
bucketName: bucketName,
}
err = t.CheckAndCreateBucket(ctx)
if err != nil {
return nil, err
}
return t, nil
}
func New(ctx context.Context, ak, sk, bucketName, endpoint, region string) (storage.Storage, error) {
t, err := getS3Client(ctx, ak, sk, bucketName, endpoint, region)
if err != nil {
return nil, err
}
return t, nil
}
func (t *s3Client) test() {
// test upload
objectKey := fmt.Sprintf("test-%s.txt", time.Now().Format("20060102150405"))
err := t.PutObject(context.Background(), objectKey, []byte("hello world"))
if err != nil {
logs.CtxErrorf(context.Background(), "PutObject failed, objectKey: %s, err: %v", objectKey, err)
}
// test download
content, err := t.GetObject(context.Background(), objectKey)
if err != nil {
logs.CtxErrorf(context.Background(), "GetObject failed, objectKey: %s, err: %v", objectKey, err)
}
logs.CtxInfof(context.Background(), "GetObject content: %s", string(content))
// test get presigned url
url, err := t.GetObjectUrl(context.Background(), objectKey)
if err != nil {
logs.CtxErrorf(context.Background(), "GetObjectUrl failed, objectKey: %s, err: %v", objectKey, err)
}
logs.CtxInfof(context.Background(), "GetObjectUrl url: %s", url)
// test delete
err = t.DeleteObject(context.Background(), objectKey)
if err != nil {
logs.CtxErrorf(context.Background(), "DeleteObject failed, objectKey: %s, err: %v", objectKey, err)
}
}
func (t *s3Client) CheckAndCreateBucket(ctx context.Context) error {
client := t.client
bucket := t.bucketName
_, err := client.HeadBucket(ctx, &s3.HeadBucketInput{Bucket: aws.String(bucket)})
if err == nil {
return nil // already exist
}
if err != nil {
// bucket not exist
if awsErr, ok := err.(interface{ ErrorCode() string }); ok && awsErr.ErrorCode() == "404" {
input := &s3.CreateBucketInput{
Bucket: aws.String(bucket),
}
// create bucket
_, err := client.CreateBucket(ctx, input)
return err
}
// other case
return err
}
return nil
}
func (t *s3Client) PutObject(ctx context.Context, objectKey string, content []byte, opts ...storage.PutOptFn) error {
client := t.client
body := bytes.NewReader(content)
bucket := t.bucketName
// upload object
_, err := client.PutObject(ctx, &s3.PutObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(objectKey),
Body: body,
})
return err
}
func (t *s3Client) GetObject(ctx context.Context, objectKey string) ([]byte, error) {
client := t.client
bucket := t.bucketName
result, err := client.GetObject(ctx, &s3.GetObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(objectKey),
})
if err != nil {
return nil, fmt.Errorf("get object failed : %v", err)
}
defer result.Body.Close()
body, err := io.ReadAll(result.Body)
if err != nil {
return nil, err
}
return body, nil
}
func (t *s3Client) DeleteObject(ctx context.Context, objectKey string) error {
client := t.client
bucket := t.bucketName
_, err := client.DeleteObject(ctx, &s3.DeleteObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(objectKey),
})
return err
}
func (t *s3Client) GetObjectUrl(ctx context.Context, objectKey string, opts ...storage.GetOptFn) (string, error) {
client := t.client
bucket := t.bucketName
presignClient := s3.NewPresignClient(client)
req, err := presignClient.PresignGetObject(ctx, &s3.GetObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(objectKey),
}, func(options *s3.PresignOptions) {
options.Expires = time.Duration(60*60*24) * time.Second
})
if err != nil {
return "", fmt.Errorf("get object presigned url failed: %v", err)
}
// url parse
url, err := url.Parse(req.URL)
if err != nil {
logs.CtxWarnf(ctx, "[GetObjectUrl] url parse failed, err: %v", err)
return req.URL, nil
}
proxyPort := os.Getenv(consts.MinIOProxyEndpoint) // :8889
if len(proxyPort) > 0 {
currentHost, ok := ctxcache.Get[string](ctx, consts.HostKeyInCtx)
if !ok {
return req.URL, nil
}
currentScheme, ok := ctxcache.Get[string](ctx, consts.RequestSchemeKeyInCtx)
if !ok {
return req.URL, nil
}
host, _, err := net.SplitHostPort(currentHost)
if err != nil {
host = currentHost
}
minioProxyHost := host + proxyPort
url.Host = minioProxyHost
url.Scheme = currentScheme
logs.CtxInfof(ctx, "[GetObjectUrl] reset ORG.URL = %s TOS.URL = %s", req.URL, url.String())
return url.String(), nil
}
return req.URL, nil
}
func (i *s3Client) GetUploadHost(ctx context.Context) string {
currentHost, ok := ctxcache.Get[string](ctx, consts.HostKeyInCtx)
if !ok {
return ""
}
return currentHost + consts.ApplyUploadActionURI
}
func (t *s3Client) GetServerID() string {
return ""
}
func (t *s3Client) GetUploadAuth(ctx context.Context, opt ...imagex.UploadAuthOpt) (*imagex.SecurityToken, error) {
scheme, ok := ctxcache.Get[string](ctx, consts.RequestSchemeKeyInCtx)
if !ok {
return nil, errorx.New(errno.ErrUploadHostSchemaNotExistCode)
}
return &imagex.SecurityToken{
AccessKeyID: "",
SecretAccessKey: "",
SessionToken: "",
ExpiredTime: time.Now().Add(time.Hour).Format("2006-01-02 15:04:05"),
CurrentTime: time.Now().Format("2006-01-02 15:04:05"),
HostScheme: scheme,
}, nil
}
func (t *s3Client) GetResourceURL(ctx context.Context, uri string, opts ...imagex.GetResourceOpt) (*imagex.ResourceURL, error) {
url, err := t.GetObjectUrl(ctx, uri)
if err != nil {
return nil, err
}
return &imagex.ResourceURL{
URL: url,
}, nil
}
func (t *s3Client) Upload(ctx context.Context, data []byte, opts ...imagex.UploadAuthOpt) (*imagex.UploadResult, error) {
return nil, nil
}
func (t *s3Client) GetUploadAuthWithExpire(ctx context.Context, expire time.Duration, opt ...imagex.UploadAuthOpt) (*imagex.SecurityToken, error) {
return nil, nil
}

View File

@ -24,6 +24,7 @@ import (
"github.com/coze-dev/coze-studio/backend/infra/contract/imagex"
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
"github.com/coze-dev/coze-studio/backend/infra/impl/storage/minio"
"github.com/coze-dev/coze-studio/backend/infra/impl/storage/s3"
"github.com/coze-dev/coze-studio/backend/infra/impl/storage/tos"
"github.com/coze-dev/coze-studio/backend/types/consts"
)
@ -51,6 +52,15 @@ func New(ctx context.Context) (Storage, error) {
os.Getenv(consts.TOSEndpoint),
os.Getenv(consts.TOSRegion),
)
case "s3":
return s3.New(
ctx,
os.Getenv(consts.S3AccessKey),
os.Getenv(consts.S3SecretKey),
os.Getenv(consts.StorageBucket),
os.Getenv(consts.S3Endpoint),
os.Getenv(consts.S3Region),
)
}
return nil, fmt.Errorf("unknown storage type: %s", storageType)
@ -77,6 +87,15 @@ func NewImagex(ctx context.Context) (imagex.ImageX, error) {
os.Getenv(consts.TOSEndpoint),
os.Getenv(consts.TOSRegion),
)
case "s3":
return s3.NewStorageImagex(
ctx,
os.Getenv(consts.S3AccessKey),
os.Getenv(consts.S3SecretKey),
os.Getenv(consts.StorageBucket),
os.Getenv(consts.S3Endpoint),
os.Getenv(consts.S3Region),
)
}
return nil, fmt.Errorf("unknown storage type: %s", storageType)
}

View File

@ -168,6 +168,10 @@ func asyncStartMinioProxyServer(ctx context.Context) {
proxyURL = getEnv(consts.TOSBucketEndpoint, "https://opencoze.tos-cn-beijing.volces.com")
}
if storageType == "s3" {
proxyURL = getEnv(consts.S3BucketEndpoint, "")
}
minioProxyEndpoint := getEnv(consts.MinIOProxyEndpoint, "")
if len(minioProxyEndpoint) == 0 {
return

View File

@ -1,5 +1,9 @@
#!/bin/sh
# Set up Elasticsearch
echo "Setting up Elasticsearch..."
/app/setup_es.sh --index-dir /app/es_index_schemas
# Start the proxy application in the background
echo "Starting proxy application..."
/app/proxy >/tmp/proxy.log 2>&1 &

View File

@ -44,6 +44,11 @@ const (
TOSRegion = "TOS_REGION"
TOSEndpoint = "TOS_ENDPOINT"
TOSBucketEndpoint = "TOS_BUCKET_ENDPOINT"
S3AccessKey = "S3_ACCESS_KEY"
S3SecretKey = "S3_SECRET_KEY"
S3Region = "S3_REGION"
S3Endpoint = "S3_ENDPOINT"
S3BucketEndpoint = "S3_BUCKET_ENDPOINT"
HostKeyInCtx = "HOST_KEY_IN_CTX"
RequestSchemeKeyInCtx = "REQUEST_SCHEME_IN_CTX"
@ -107,3 +112,8 @@ const (
ApplyUploadActionURI = "/api/common/upload/apply_upload_action"
UploadURI = "/api/common/upload"
)
const (
DisableUserRegistration = "DISABLE_USER_REGISTRATION"
AllowRegistrationEmail = "ALLOW_REGISTRATION_EMAIL"
)

View File

@ -38,6 +38,8 @@ const (
ErrPluginToolsCheckFailed = 109000011
ErrPluginParseToolRespFailed = 109000012
ErrPluginOAuthFailed = 109000013
ErrPluginIDExist = 109000014
ErrToolIDExist = 109000015
)
const (
@ -45,6 +47,17 @@ const (
)
func init() {
code.Register(
ErrPluginIDExist,
"Plugin ID already exists : {plugin_id}",
code.WithAffectStability(false),
)
code.Register(
ErrToolIDExist,
"Tool ID already exists : {tool_id}",
code.WithAffectStability(false),
)
code.Register(
ErrPluginPermissionCode,
fmt.Sprintf("unauthorized access : {%s}", PluginMsgKey),

View File

@ -31,9 +31,17 @@ const (
ErrUserResourceNotFound = 700000005
ErrUserInvalidParamCode = 700000006
ErrUserPermissionCode = 700000007
ErrNotAllowedRegisterCode = 700000008
)
func init() {
code.Register(
ErrNotAllowedRegisterCode,
"The user registration has been disabled by the administrator. Please contact the administrator!",
code.WithAffectStability(false),
)
code.Register(
ErrUserPermissionCode,
"unauthorized access : {msg}",

View File

@ -15,7 +15,7 @@
"ignoreMissingScript": true,
"enableParallelism": true,
"incremental": true,
"shellCommand": "eslint ./ --cache",
"shellCommand": "eslint ./ --cache --quiet",
"allowWarningsInSuccessfulBuild": true,
"summary": "⭐️️ Run lint command for each package",
"safeForSimultaneousRushProcesses": true

View File

@ -23,5 +23,5 @@ if [ "$PRE_LINT" != "1" ]; then
node common/scripts/install-run-rush.js fix-ts-refers --use-cached-files --shallow --submit-changes
# node infra/commanders/fix-peer-deps/bin/main.js fix --use-cached-files -s
node common/scripts/install-run-rush.js -q lint-staged || exit $?
bash .codebase/scripts/check-file-size.sh || exit $?
bash .github/scripts/check-file-size.sh || exit $?
fi

View File

@ -35,7 +35,7 @@ export VE_IMAGEX_TEMPLATE=""
export VE_IMAGEX_UPLOAD_HOST="https://imagex.volcengineapi.com"
# Storage component
export STORAGE_TYPE="minio" # minio / tos
export STORAGE_TYPE="minio" # minio / tos / s3
export STORAGE_BUCKET="opencoze"
# MiniIO
export MINIO_ROOT_USER=minioadmin
@ -53,6 +53,13 @@ export TOS_ENDPOINT=https://tos-cn-beijing.volces.com
export TOS_BUCKET_ENDPOINT=https://opencoze.tos-cn-beijing.volces.com
export TOS_REGION=cn-beijing
# S3
export S3_ACCESS_KEY=
export S3_SECRET_KEY=
export S3_ENDPOINT=
export S3_BUCKET_ENDPOINT=
export S3_REGION=
# Elasticsearch
export ES_ADDR="http://localhost:9200"
export ES_VERSION="v8"
@ -83,8 +90,8 @@ export VIKING_DB_MODEL_NAME="" # if vikingdb model name is not set, you need to
# Settings for Embedding
# The Embedding model relied on by knowledge base vectorization does not need to be configured
# if the vector database comes with built-in Embedding functionality (such as VikingDB). Currently,
# Coze Studio supports three access methods: openai, ark, and custom http. Users can simply choose one of them when using
# embedding type: openai / ark / http
# Coze Studio supports three access methods: openai, ark, ollama, and custom http. Users can simply choose one of them when using
# embedding type: openai / ark / ollama / http
export EMBEDDING_TYPE="ark"
# openai embedding
export OPENAI_EMBEDDING_BASE_URL="" # (string) OpenAI base_url
@ -101,6 +108,10 @@ export ARK_EMBEDDING_AK=""
export ARK_EMBEDDING_DIMS="2048"
export ARK_EMBEDDING_BASE_URL=""
# ollama embedding
export OLLAMA_EMBEDDING_BASE_URL=""
export OLLAMA_EMBEDDING_MODEL=""
export OLLAMA_EMBEDDING_DIMS=""
# http embedding
export HTTP_EMBEDDING_ADDR="http://127.0.0.1:6543"
@ -190,4 +201,10 @@ export CODE_RUNNER_NODE_MODULES_DIR=""
# Code execution timeout, default 60 seconds. e.g. "2.56"
export CODE_RUNNER_TIMEOUT_SECONDS=""
# Code execution memory limit, default 100MB. e.g. "256"
export CODE_RUNNER_MEMORY_LIMIT_MB=""
export CODE_RUNNER_MEMORY_LIMIT_MB=""
# The function of registration controller
# If you want to disable the registration feature, set DISABLE_USER_REGISTRATION to true. You can then control allowed registrations via a whitelist with ALLOW_REGISTRATION_EMAIL.
export DISABLE_USER_REGISTRATION="" # default "", if you want to disable, set to true
export ALLOW_REGISTRATION_EMAIL="" # is a list of email addresses, separated by ",". Example: "11@example.com,22@example.com"

View File

@ -65,8 +65,6 @@ services:
depends_on:
minio-setup:
condition: service_completed_successfully
elasticsearch-setup:
condition: service_completed_successfully
mysql-setup-schema:
condition: service_completed_successfully
mysql-setup-init-sql:
@ -409,27 +407,6 @@ services:
networks:
- coze-network
elasticsearch-setup:
image: alpine/curl:8.12.1
container_name: coze-elasticsearch-setup
profiles: ['middleware', 'volcano-setup']
env_file: *env_file
depends_on:
elasticsearch:
condition: service_healthy
volumes:
- ./volumes/elasticsearch/setup_es.sh:/setup_es.sh
- ./volumes/elasticsearch/es_index_schema:/es_index_schema
command:
- /bin/sh
- -c
- |
set -ex
/setup_es.sh
echo 'Elasticsearch setup complete.'
networks:
- coze-network
restart: 'no'
minio-setup:
image: minio/mc:RELEASE.2025-05-21T01-59-54Z-cpuv1
container_name: coze-minio-setup
@ -562,8 +539,6 @@ services:
condition: service_healthy
minio-setup:
condition: service_completed_successfully
elasticsearch-setup:
condition: service_completed_successfully
mysql-setup-init-sql:
condition: service_completed_successfully
command: ['/app/bootstrap.sh']

View File

@ -1,14 +1,61 @@
#!/bin/sh
set -e
if [[ "$ES_ADDR" == *"localhost"* || "$ES_ADDR" == *"127.0.0.1"* ]]; then
echo "ES_ADDR is localhost, using docker address: http://elasticsearch:9200"
ES_ADDR="http://elasticsearch:9200"
# Parse command-line arguments
while [ $# -gt 0 ]; do
case "$1" in
--es-address)
case "$2" in
"" | -*) echo "Error: Missing value for $1" >&2; exit 1;;
esac
ES_ADDR_ARG="$2"
shift 2
;;
--index-dir)
case "$2" in
"" | -*) echo "Error: Missing value for $1" >&2; exit 1;;
esac
INDEX_DIR_ARG="$2"
shift 2
;;
--docker-host)
case "$2" in
"true" | "false") REPLACE_ES_ADDR_WITH_DOCKER_HOST_ARG="$2" ;;
*) echo "Error: Invalid value for $1. Must be 'true' or 'false'" >&2; exit 1;;
esac
shift 2
;;
*)
# unknown option
shift
;;
esac
done
# If ES_ADDR_ARG argument is provided, use it. Otherwise, use environment variable or default logic.
if [ -n "$ES_ADDR_ARG" ]; then
ES_ADDR=$ES_ADDR_ARG
fi
REPLACE_ES_ADDR=${REPLACE_ES_ADDR_WITH_DOCKER_HOST_ARG:-true}
if [ "$REPLACE_ES_ADDR" = "true" ]; then
case "$ES_ADDR" in
*localhost*|*"127.0.0.1"*)
echo "ES_ADDR is localhost, using docker address: http://elasticsearch:9200"
ES_ADDR="http://elasticsearch:9200"
;;
esac
fi
# If INDEX_DIR_ARG argument is provided, use it. Otherwise, use the default.
if [ -n "$INDEX_DIR_ARG" ]; then
INDEX_DIR=$INDEX_DIR_ARG
else
INDEX_DIR=/es_index_schema
fi
# ES_ADDR=http://localhost:31160
INDEX_DIR=/es_index_schema
echo "ES_ADDR: $ES_ADDR"
echo "INDEX_DIR: $INDEX_DIR"
AUTH_PARAM=""
if [ -n "$ES_USERNAME" ]; then
@ -38,30 +85,32 @@ if [ -z "$ES_TEMPLATES" ]; then
exit 1
else
# Add index creation logic
echo -e "🔄 Creating Elasticsearch indexes..."
for template_file in $ES_TEMPLATES; do
template_name=$(basename "$template_file" | sed 's/\.index-template\.json$//')
echo -e "➡️ Registering template: $template_name"
# Attempt to register index template
response=$(curl -s $AUTH_PARAM -X PUT "${ES_ADDR}/_index_template/$template_name" \
-H "Content-Type: application/json" \
-d @"$template_file" 2>&1)
# Check if successful
if echo "$response" | grep -q '"acknowledged":true'; then
echo -e "✅ Template $template_name registered successfully"
# Check if index template exists
if curl -s -f $AUTH_PARAM -I "${ES_ADDR}/_index_template/$template_name" >/dev/null; then
echo -e " Index template $template_name already exists"
else
echo -e "❌ Failed to register template $template_name. Response: $response"
exit 1
echo -e "➡️ Registering template: $template_name"
# Attempt to register index template
response=$(curl -s $AUTH_PARAM -X PUT "${ES_ADDR}/_index_template/$template_name" \
-H "Content-Type: application/json" \
-d @"$template_file" 2>&1)
# Check if successful
if echo "$response" | grep -q '"acknowledged":true'; then
echo -e "✅ Template $template_name registered successfully"
else
echo -e "❌ Failed to register template $template_name. Response: $response"
exit 1
fi
fi
index_name=$(basename "$template_file" | sed 's/\.index-template\.json$//')
echo -e "➡️ Creating index: $index_name"
# Check if index exists
if ! curl -s -f $AUTH_PARAM "${ES_ADDR}/_cat/indices/$index_name" >/dev/null; then
echo -e "➡️ Creating index: $index_name"
# Create index (matching template's index_patterns)
curl $AUTH_PARAM -X PUT "${ES_ADDR}/$index_name" -H "Content-Type: application/json"
echo ""
@ -90,4 +139,4 @@ else
fi
echo "Elasticsearch setup completed."
exit 0
exit 0

Binary file not shown.

View File

@ -1 +1,122 @@
TODO: something here
# Coze Studio Frontend
This is the frontend project of Coze Studio, an AI Agent development platform built with monorepo architecture, based on React 18 and modern frontend technology stack.
## 🏗️ Project Architecture
### Core Technology Stack
- **Framework**: React 18 + TypeScript
- **Build Tool**: Rsbuild
- **Package Manager**: Rush + PNPM
- **Routing**: React Router v6
- **State Management**: Zustand
- **UI Components**: @coze-arch/coze-design
- **Internationalization**: @coze-arch/i18n
### Directory Structure
```
frontend/
├── apps/ # Application layer
│ └── coze-studio/ # Main application
├── packages/ # Core packages
│ ├── agent-ide/ # AI Agent development environment
│ ├── arch/ # Architecture infrastructure
│ ├── common/ # Common components and utilities
│ ├── components/ # UI component library
│ ├── data/ # Data layer
│ ├── devops/ # DevOps tools
│ ├── foundation/ # Foundation infrastructure
│ ├── project-ide/ # Project development environment
│ ├── studio/ # Studio core features
│ └── workflow/ # Workflow engine
├── config/ # Configuration files
│ ├── eslint-config/ # ESLint configuration
│ ├── rsbuild-config/ # Rsbuild build configuration
│ ├── ts-config/ # TypeScript configuration
│ ├── postcss-config/ # PostCSS configuration
│ ├── stylelint-config/ # Stylelint configuration
│ ├── tailwind-config/ # Tailwind CSS configuration
│ └── vitest-config/ # Vitest testing configuration
└── infra/ # Infrastructure tools
├── idl/ # Interface Definition Language tools
├── plugins/ # Build plugins
└── utils/ # Utility libraries
```
## 🚀 Quick Start
### Prerequisites
- Node.js >= 21
- PNPM 8.15.8
- Rush 5.147.1
### Install Dependencies
```bash
# Run in project root directory
rush install
# update
rush update
```
### Development Mode
```bash
# Start development server
cd apps/coze-studio
npm run dev
# or use rushx
rushx dev
```
### Production Build
```bash
# Build application
cd apps/coze-studio
npm run build
# or use rushx
rushx build
```
## 📦 Core Modules
### Agent IDE
- **agent-ide**: AI Agent integrated development environment
- **prompt**: Prompt editor
- **tool**: Tool configuration management
- **workflow**: Workflow integration
### Architecture Layer (arch)
- **bot-api**: API interface layer
- **bot-hooks**: React Hooks library
- **foundation-sdk**: Foundation SDK
- **i18n**: Internationalization support
- **bot-flags**: Feature flags management
- **web-context**: Web context utilities
### Workflow Engine (workflow)
- **fabric-canvas**: Canvas rendering engine
- **nodes**: Node component library
- **sdk**: Workflow SDK
- **playground**: Debug runtime environment
### Data Layer (data)
- **knowledge**: Knowledge base management
- **memory**: Memory system
- **common**: Common data processing
## 🔧 Development Standards
### Code Quality
- Code formatting with ESLint + Prettier
- TypeScript strict mode
- Unit test coverage requirements
- Team-based tier management (level-1 to level-4)
### Team Collaboration
- Rush-based monorepo management
- Workspace dependency management
- Unified build and release process
## 📄 License
Apache License 2.0

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from 'path';
import { defineConfig } from '@coze-arch/rsbuild-config';
@ -103,8 +103,6 @@ const mergedConfig = defineConfig({
/\/node_modules\/(marked|@dagrejs|@tanstack)\//,
],
alias: {
// TODO: fixme late开源之前需要干掉这个
'@slardar/web/client': '@slardar/web/cn',
'@coze-arch/foundation-sdk': require.resolve(
'@coze-foundation/foundation-sdk',
),

View File

@ -42,6 +42,7 @@ module.exports = [
'**/es/**',
'**/lib/**',
'**/.codebase/**',
'**/.github/**',
'**/.changeset/**',
'**/config/**',
'**/common/scripts/**',

View File

@ -1,19 +1,3 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import OriginPkgRootWebpackPlugin from '@coze-arch/pkg-root-webpack-plugin-origin';
type PkgRootWebpackPluginOptions = Record<string, unknown>;
declare class PkgRootWebpackPlugin extends OriginPkgRootWebpackPlugin {

View File

@ -1,4 +1,19 @@
"use strict";
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @coze-arch/max-line-per-function */
import { NavLink, useParams } from 'react-router-dom';
import ReactMarkdown from 'react-markdown';
@ -47,8 +47,8 @@ import {
type ConnectResultInfo,
} from '@coze-agent-ide/space-bot';
import styles from '../index.module.less';
import { PublishResultArea } from './component/publish-result-area';
import styles from '../index.module.less';
interface PublishResultProps {
// 隐藏Banner
@ -190,7 +190,6 @@ export const PublishResult = ({
type: IntelligenceType.Bot,
spaceId: String(spaceId),
intelligenceId: String(botId),
// 开源版暂不支持该功能
enable: FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE,
});

View File

@ -119,7 +119,7 @@ const ToolHeader: FC<ToolHeaderProps> = ({
/>
<span className={s.title}>{I18n.t('plugin_edit_tool_title')}</span>
<OauthButtonAction />
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.devops.plugin_mockset'] ? (
<Tooltip
style={{ display: mocksetDisabled ? 'block' : 'none' }}

View File

@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContext, useContext } from 'react';
export enum BotCreatorScene {
Bot = 'bot',
/** 开源版暂不支持该功能 */
DouyinBot = 'douyin-bot',
}

View File

@ -144,7 +144,7 @@ export const MoreMenuButton: FC = () => {
spaceId,
enable:
showPublishManageMenu &&
// 开源版暂不支持该功能
// 即将支持,敬请期待
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE,
});
@ -172,7 +172,7 @@ export const MoreMenuButton: FC = () => {
<Dropdown
render={
<Dropdown.Menu mode="menu">
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE
@ -196,7 +196,7 @@ export const MoreMenuButton: FC = () => {
: null}
{hideOpenIn ? null : (
<>
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE ? (

View File

@ -13,25 +13,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useState, type FC } from 'react';
import { groupBy } from 'lodash-es';
import { ToolGroupKey, ToolKey } from '@coze-agent-ide/tool-config';
import {
type useRegisteredToolKeyConfigList,
abilityKey2ModelFunctionConfigType,
} from '@coze-agent-ide/tool';
import { useBotSkillStore } from '@coze-studio/bot-detail-store/bot-skill';
import { I18n } from '@coze-arch/i18n';
import { IconCozCross } from '@coze-arch/coze-design/icons';
import {
Button,
Checkbox,
Modal,
IconButton,
Space,
} from '@coze-arch/coze-design';
import {
type Model,
ModelFuncConfigStatus,
ModelFuncConfigType,
} from '@coze-arch/bot-api/developer_api';
import { useBotSkillStore } from '@coze-studio/bot-detail-store/bot-skill';
import { ToolGroupKey, ToolKey } from '@coze-agent-ide/tool-config';
import {
type useRegisteredToolKeyConfigList,
abilityKey2ModelFunctionConfigType,
} from '@coze-agent-ide/tool';
import { mergeModelFuncConfigStatus } from '@coze-agent-ide/bot-editor-context-store';
import { IconCozCross } from '@coze-arch/coze-design/icons';
import { Button, Checkbox, Modal, IconButton, Space } from '@coze-arch/coze-design';
type IRegisteredToolKeyConfig = ReturnType<
typeof useRegisteredToolKeyConfigList
@ -196,6 +202,7 @@ export const checkModelAbility = (
: ModelFuncConfigType.KnowledgeOnDemandCall
];
modelFunctionConfigStatus = mergeModelFuncConfigStatus(
// @ts-expect-error fix me late
autoConfigStatus,
modelFunctionConfigStatus,
);
@ -263,6 +270,7 @@ export const confirm = ({
};
const getGroupTittleByConfigType = (type: ModelFuncConfigType): string =>
// @ts-expect-error fix me late
({
[ModelFuncConfigType.Plugin]: I18n.t('bot_edit_type_skills'),
[ModelFuncConfigType.Workflow]: I18n.t('bot_edit_type_skills'),
@ -291,6 +299,7 @@ const getGroupTittleByConfigType = (type: ModelFuncConfigType): string =>
})[type];
const getTitleByConfigType = (type: ModelFuncConfigType): string =>
// @ts-expect-error fix me late
({
[ModelFuncConfigType.Plugin]: I18n.t('Plugins'),
[ModelFuncConfigType.Workflow]: I18n.t('Workflows'),

View File

@ -154,7 +154,6 @@ export function ModelOption({
{model.name}
</Typography.Title>
<div className="shrink-0 flex gap-[6px]">
{/* 抖音分身场景下不展示改 tag开源版暂不支持该功能 */}
{model.model_status_details?.is_free_model &&
scene !== BotCreatorScene.DouyinBot ? (
<Tag size="mini" color="primary" className="!coz-mg-plus">

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { uniq } from 'lodash-es';
import { useRequest } from 'ahooks';
import { useMultiAgentStore } from '@coze-studio/bot-detail-store/multi-agent';
@ -60,7 +60,6 @@ export const useGetModelList = () => {
const res = await SpaceApi.GetTypeList({
cur_model_ids: expectedIdList,
model: true,
// 开源版暂不支持该功能
...(scene === BotCreatorScene.DouyinBot && {
model_scene: ModelScene.Douyin,
}),

View File

@ -70,7 +70,7 @@ const useAgentSkillPluginSettingModalController = (
},
{
refreshDeps: [commonParams],
// 开源版暂不支持该功能
// 即将支持,敬请期待
ready: visible && FLAGS['bot.devops.plugin_mockset'],
},
);

View File

@ -73,7 +73,7 @@ const usePartMainController = (pluginInfo: PluginInfoForPlayground) => {
value: PARA.toLowerCase(),
},
];
// 开源版暂不支持该功能
// 即将支持,敬请期待
if (FLAGS['bot.devops.plugin_mockset']) {
keyOptions.unshift({
label: I18n.t('bot_ide_plugin_setting_modal_mockset_tab'),

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useShallow } from 'zustand/react/shallow';
import cls from 'classnames';
import { useBotInfoStore } from '@coze-studio/bot-detail-store/bot-info';
@ -99,7 +99,7 @@ const AgentIdePrompt = (props: AgentIdePromptProps) => {
librarys={libraryList}
onAddLibrary={addLibrary}
spaceId={space_id}
// Agent IDE 在抖音分身场景下需要传入分身id进行判断当前资源是否存在 开源版暂不支持该功能
// Agent IDE 在抖音分身场景下需要传入分身id进行判断当前资源是否存在
avatarBotId={
businessType === BusinessType.DouyinAvatar ? botId : undefined
}

View File

@ -39,7 +39,7 @@ export function ChangeButton({
}: ChangeButtonProps) {
const [FLAGS] = useFlags();
// 开源版暂不支持该功能
// 即将支持,敬请期待
const showText = modeInfo?.showText || FLAGS['bot.studio.prompt_diff'];
const ToolTipFragment = tooltip ? Tooltip : React.Fragment;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, {
useEffect,
useMemo,
@ -133,7 +133,6 @@ export const OnboardingMessage = forwardRef<
initValues={onboardingContent}
isReadonly={isReadonly}
isGenerating={isLoading}
// 开源版暂不支持该功能
plainText={scene === BotCreatorScene.DouyinBot}
onChange={submitEditor}
onBlur={() => {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SetStateAction } from 'react';
import { type PluginPricingRule } from '@coze-arch/bot-api/plugin_develop';
@ -98,6 +98,6 @@ export interface PublisherBotInfo {
hasPublished?: boolean;
// 收费插件列表
pluginPricingRules?: Array<PluginPricingRule>;
// 业务类型 DouyinAvatar=1 抖音分身 开源版暂不支持该功能
// 业务类型 DouyinAvatar=1 抖音分身
businessType?: BusinessType;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from 'path';
import {
@ -65,7 +65,22 @@ const updateDTS = ({
// 创建一个新的文件,用来保存生成的类型定义
const typeDefs = project.createSourceFile(
outputFileName,
`/* eslint-disable */
`/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable */
/* prettier-ignore */
// 基于${path.relative(baseDir, inputFileName)}自动生成,请勿手动修改`,
{

View File

@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable */
/* prettier-ignore */
// 基于src/index.ts自动生成请勿手动修改

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dayjs from 'dayjs';
import { I18n } from '@coze-arch/i18n';
@ -56,8 +56,16 @@ describe('Date', () => {
expect(getCurrentTZ().utcOffset()).toBe(60 * 8);
});
it('#formatDate', () => {
const date = formatDate(1718782764);
expect(date).toBe('2024/06/19 15:39:24');
// 使用固定的时间戳,但验证格式而不是具体的时区值
const timestamp = 1718782764;
const date = formatDate(timestamp);
// 验证格式是否正确YYYY/MM/DD HH:mm:ss
expect(date).toMatch(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/);
// 验证时间戳转换的一致性格式化后再解析应该得到相同的dayjs对象的日期部分
const formattedDayjs = dayjs(date, 'YYYY/MM/DD HH:mm:ss');
const originalDayjs = dayjs.unix(timestamp);
expect(formattedDayjs.unix()).toBe(originalDayjs.unix());
});
it('#getRemainTime', () => {
vi.useFakeTimers();
@ -80,7 +88,7 @@ describe('Date', () => {
describe('format timestamp', () => {
beforeEach(() => {
const MOCK_NOW = dayjs('2024-09-24 20:00:00');
vi.setSystemTime(MOCK_NOW);
vi.setSystemTime(MOCK_NOW.toDate());
});
it('just now', () => {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import eventEmitter from 'eventemitter3';
vi.stubGlobal('IS_OVERSEA', false);
@ -54,9 +54,6 @@ export const testSetup = () => {
}),
})),
}));
vi.mock('@slardar/web/client', () => ({
createMinimalBrowserClient: vi.fn(),
}));
// mock上传插件实现
vi.mock('../src/plugins/upload-plugin', () => ({
ChatCoreUploadPlugin: class {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import { merge } from 'lodash-es';
@ -49,7 +49,7 @@ const getDefaultTextLocalAddUpdateState: () => UploadTextLocalAddUpdateState =
parsing_type: ParsingType.AccurateParsing,
image_extraction: true,
table_extraction: true,
image_ocr: true,
image_ocr: false,
},
indexStrategy: {},
filterStrategy: [],

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import { merge } from 'lodash-es';
@ -48,7 +48,7 @@ const getDefaultTextLocalResegmentState: () => UploadTextLocalResegmentState =
parsing_type: ParsingType.AccurateParsing,
image_extraction: true,
table_extraction: true,
image_ocr: true,
image_ocr: false,
},
indexStrategy: {},
filterStrategy: [],

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import { merge } from 'lodash-es';
@ -36,7 +36,7 @@ const getDefaultTextResegmentState: () => UploadTextResegmentState = () => ({
parsingStrategy: {
parsing_type: ParsingType.AccurateParsing,
image_extraction: true,
image_ocr: true,
image_ocr: false,
table_extraction: true,
},
filterStrategy: [],

View File

@ -18,4 +18,12 @@ module.exports = defineConfig({
},
],
},
overrides: [
{
files: ['src/**/namespaces/*.ts'],
rules: {
'unicorn/filename-case': 'off',
},
},
],
});

View File

@ -1,3 +1,4 @@
// eslint-disable unicorn/filename-case
/*
* Copyright 2025 coze-dev Authors
*
@ -13,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import classNames from 'classnames';
import { type TableMemoryItem } from '@coze-studio/bot-detail-store';
import {
@ -22,7 +22,6 @@ import {
} from '@coze-data/database-v2-base/constants';
import { DatabaseFieldTitle } from '@coze-data/database-v2-base/components/database-field-title';
import { I18n } from '@coze-arch/i18n';
import { FieldItemType } from '@coze-arch/bot-api/memory';
import { IconCozEdit, IconCozTrashCan } from '@coze-arch/coze-design/icons';
import {
type ColumnProps,
@ -31,12 +30,14 @@ import {
Space,
Typography,
} from '@coze-arch/coze-design';
import { FieldItemType } from '@coze-arch/bot-api/memory';
import { type TableRow, type TableField, type TableFieldData } from './type';
export function formatTableStructList(
structList: TableMemoryItem[],
): TableFieldData[] {
// @ts-expect-error fix me late
return structList.map(item => ({
fieldName: item.name ?? '',
fieldDescription: item.desc ?? '',
@ -173,6 +174,7 @@ export const getTableColumns = ({
title: () => (
<DatabaseFieldTitle
field={item.name}
// @ts-expect-error fix me late
type={item.type}
tip={item.desc}
required

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect, useRef, useState } from 'react';
import dayjs from 'dayjs';
@ -25,7 +25,6 @@ import {
} from '@coze-data/database-v2-base/constants';
import { DatabaseFieldTitle } from '@coze-data/database-v2-base/components/database-field-title';
import { I18n } from '@coze-arch/i18n';
import { FieldItemType, TableType } from '@coze-arch/bot-api/memory';
import {
CozInputNumber,
type DatePickerProps,
@ -37,6 +36,7 @@ import {
withField,
type CommonFieldProps,
} from '@coze-arch/coze-design';
import { FieldItemType, TableType } from '@coze-arch/bot-api/memory';
import {
type TableRow,
@ -250,6 +250,7 @@ function getSystemFieldCommonProps(field: TableMemoryItem): FieldCommonProps {
<DatabaseFieldTitle
field={field.name}
textType="primary"
// @ts-expect-error fix me late
type={field.type}
tip={field.desc}
required

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import {
@ -79,6 +79,7 @@ export const SpanInfoArea = (props: SpanInfoAreaProps) => {
const { rootSpan, spans } = useSpanTransform({
orgSpans: orgDetailSpans ?? [],
traceAdvanceInfo,
// @ts-expect-error fix me late
spanCategoryMeta: spanCategory,
});

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import {
@ -28,7 +28,6 @@ interface ICommonConfig {
homeBannerTask?: Array<HomeBannerDisplay>;
quickStart?: Array<QuickStartConfig>;
oceanProjectSpaces?: Array<string>;
/** 开源版暂不支持该功能 */
douyinAvatarSpaces?: Array<string>;
}
export interface ICommonConfigStoreState {

View File

@ -5,7 +5,8 @@
"stories",
"./src/**/*.test.ts",
"vitest.config.ts",
"setup-vitest.ts"
"setup-vitest.ts",
"__mocks__/*.ts"
],
"exclude": ["./dist"],
"references": [

View File

@ -134,7 +134,7 @@ export const DynamicChatList = ({
!!canEdit &&
!!list?.length &&
!inBatch &&
// 开源版暂不支持该功能
// 即将支持,敬请期待
FLAGS['bot.automation.conversation_batch_delete'];
const exitBatch = () => {
setInBatch(false);

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useState, useCallback } from 'react';
import classnames from 'classnames';
@ -90,7 +90,7 @@ export const Configuration = () => {
onClick={handleSwitchExpand}
/>
</div>
{/* The community version does not currently support conversation management in project, for future expansion */}
{/* will support soon */}
{IS_OPEN_SOURCE ? null : (
<div
className={classnames(

View File

@ -99,7 +99,7 @@ export const GlobalHandler = ({
useWsListener((props: WsMessageProps) => {
if (
// 开源版暂不支持该功能
// 即将支持,敬请期待
!FLAGS['bot.automation.project_multi_tab'] ||
!leftPanelResourceType.includes(props.bizType)
) {

View File

@ -65,7 +65,7 @@ const PrimarySidebarCore = ({
>
<div className={styles.title}>
{I18n.t('project_resource_sidebar_title')}
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.automation.dependency_tree'] ? (
<>
<Button

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import 'reflect-metadata';
import { useNavigate } from 'react-router-dom';
import React, { useMemo, memo } from 'react';
@ -73,7 +73,7 @@ const ProjectIDE: React.FC<ProjectIDEProps> = memo(
() => ({
view: {
widgetRegistries: [
// The community version does not currently support conversation management in project, for future expansion
// will support soon
...(IS_OPEN_SOURCE ? [] : [ConversationRegistry]),
WorkflowWidgetRegistry,
DatabaseWidgetRegistry,

View File

@ -77,12 +77,12 @@ export const ModelOptionItem: React.FC<OptionItemProps> = ({
const tags: OptionItemTag[] = [];
const shouldShowEndPoint = showEndPointName && endPointName;
// 开源版暂不支持该功能
// 即将支持,敬请期待
const displayName = FLAGS['bot.studio.model_select_switch_end_point_name_pos']
? endPointName || name
: name;
// 开源版暂不支持该功能
// 即将支持,敬请期待
const displayEndPointName = FLAGS[
'bot.studio.model_select_switch_end_point_name_pos'
]

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-lines */
/* eslint-disable max-lines-per-function */
@ -37,15 +37,6 @@ import { useCurrentEnterpriseInfo } from '@coze-foundation/enterprise-store-adap
import { PictureUpload } from '@coze-common/biz-components/picture-upload';
import { logger } from '@coze-arch/logger';
import { I18n } from '@coze-arch/i18n';
import { safeJSONParse } from '@coze-arch/bot-utils';
import { useFlags } from '@coze-arch/bot-flags';
import {
type PrivateLink,
type commonParamSchema,
} from '@coze-arch/bot-api/plugin_develop';
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
import { IconCozPlus, IconCozTrashCan } from '@coze-arch/coze-design/icons';
import {
Cascader,
@ -60,6 +51,15 @@ import {
Typography,
withField,
} from '@coze-arch/coze-design';
import { safeJSONParse } from '@coze-arch/bot-utils';
import { useFlags } from '@coze-arch/bot-flags';
import {
type PrivateLink,
type commonParamSchema,
} from '@coze-arch/bot-api/plugin_develop';
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
import {
findAuthTypeItemV2,
@ -142,7 +142,6 @@ export const PluginForm: FC<{
{
ready:
compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc'] &&
!IS_OPEN_SOURCE,
},
@ -225,7 +224,6 @@ export const PluginForm: FC<{
if (
editInfo?.meta_info?.private_link_id &&
compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc']
) {
setDisableEditUrl(true);
@ -292,7 +290,6 @@ export const PluginForm: FC<{
return (
<>
{compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc'] ? (
<FormSelect
label={{

View File

@ -443,7 +443,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
visible={record.api_id === showDropdownItem?.api_id}
render={
<Dropdown.Menu className="px-[4px]">
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS2['bot.devops.plugin_import_export'] ? (
<Dropdown.Item
disabled={
@ -459,7 +459,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
{I18n.t('code_snippet')}
</Dropdown.Item>
) : null}
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS2['bot.devops.plugin_mockset'] ? (
<Dropdown.Item
className="rounded-[4px]"

Some files were not shown because too many files have changed in this diff Show More