Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a01499a
fix(knowledge): adapt template detail api for iframe
hongzeMu Apr 10, 2026
e98f6ef
fix(knowledge): align iframe template detail request behavior
hongzeMu Apr 10, 2026
7f912b5
chore(lockfile): sync pnpm lockfiles
hongzeMu Apr 10, 2026
302c821
feat(auth): push iframe frontend and backend auth updates
hongzeMu Apr 10, 2026
d1bd35a
chore: sync repository-wide updates
hongzeMu Apr 10, 2026
aeae3ca
feat(knowledge): 支持 iframe 嵌套知识库并显示隐藏元素
hongzeMu Apr 14, 2026
461855b
feat(knowledge): 支持 iframe 嵌套知识库并显示隐藏元素
hongzeMu Apr 14, 2026
01653f8
feat(auth): support session_key from header and query for iframe access
hongzeMu Apr 14, 2026
ec0a90b
chore(docker): update Dockerfile and docker-compose for Go module pro…
XinyuLiu233 Apr 16, 2026
9bec0a8
Merge pull request #1 from verteklab/fix/intelligent-integration-1
XinyuLiu233 Apr 16, 2026
3bfae39
feat(i18n): set default locale to zh-CN and update user profile accor…
hongzeMu Apr 16, 2026
d9070c4
Merge pull request #2 from verteklab/featrue/changeLanguage_zh-CN
hongzeMu Apr 16, 2026
0bb0e1c
chore(scripts): remove copyright comments from generated script files
hongzeMu Apr 16, 2026
c1e1112
chore(scripts): 更新rush
hongzeMu Apr 16, 2026
2738a10
chore(docker): update Go version in Dockerfile to 1.24.13-alpine3.23
XinyuLiu233 Apr 16, 2026
a1a3679
feat(knowledge): add new OpenAPI endpoints for dataset and photo deta…
lotusknight Apr 16, 2026
0e6ff32
feat(openapi): complete admin-key knowledge/workflow integration
lotusknight Apr 17, 2026
4eec67b
chore(docker): update Dockerfile and docker-compose to use Tsinghua m…
XinyuLiu233 Apr 17, 2026
cd97671
feat(knowledge): render docx preview client-side instead of routing t…
lotusknight Apr 20, 2026
c1a368d
fix(docker): unblock coze-web image build
lotusknight Apr 20, 2026
39f8b16
feat(model): add support for Custom HTTP model integration
XinyuLiu233 Apr 20, 2026
defa0fc
refactor(model): rename CustomHTTP model class to Other
XinyuLiu233 Apr 20, 2026
6e7014b
fix(model): update TopP parameter handling in custom HTTP model
XinyuLiu233 Apr 20, 2026
0eeba47
feat(model): refine custom HTTP model config
XinyuLiu233 Apr 21, 2026
0353d93
feat(ctxutil): add IsAdminFromCtx function to check admin user status…
lotusknight Apr 22, 2026
4391ee3
feat(workflow): enforce admin checks for user space access in SaveWor…
lotusknight Apr 23, 2026
1c72a53
feat(workflow): improve iframe navigation and embedded page layout
hongzeMu Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Empty file modified .claude/agents/frontend-infrastructure-expert.md
100644 → 100755
Empty file.
Empty file modified .dockerignore
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .github/.licenserc.yaml
100644 → 100755
Empty file.
Empty file modified .github/CODEOWNERS
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100644 → 100755
Empty file.
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .github/scripts/check-file-size.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ EXCLUDE_PATTERNS=(
'packages/arch/bot-api/src/auto-generate/**'
'apps/bot-op/src/services/bam-auto-generate/**'
'apps/prompt-platform/src/services/auto-generate/**'
'backend/api/model/app/developer_api/**'
"**/lib/**"
"**/.*/**"
'**/__tests__/**'
Expand Down
Empty file modified .github/workflows/ci.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/ci@backend.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/ci@main.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/claude.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/common-pr-checks.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/idl.yaml
100644 → 100755
Empty file.
Empty file modified .github/workflows/license-check.yaml
100644 → 100755
Empty file.
Empty file modified .github/workflows/semantic-pull-request.yaml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .mcp.json
100644 → 100755
Empty file.
Empty file modified .nvmrc
100644 → 100755
Empty file.
16 changes: 16 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* 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.
*/

// Do not modify this file
module.exports = {
...require('./frontend/config/eslint-config/.prettierrc.js'),
Expand Down
Empty file modified .vscode/extensions.json
100644 → 100755
Empty file.
Empty file modified .vscode/settings.template.json
100644 → 100755
Empty file.
Empty file modified AUTHORS
100644 → 100755
Empty file.
Empty file modified CLAUDE.md
100644 → 100755
Empty file.
Empty file modified CODE_OF_CONDUCT.md
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified LICENSE-APACHE
100644 → 100755
Empty file.
Empty file modified Makefile
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified README.zh_CN.md
100644 → 100755
Empty file.
Empty file modified backend/.gitignore
100644 → 100755
Empty file.
Empty file modified backend/.hz
100644 → 100755
Empty file.
20 changes: 16 additions & 4 deletions backend/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# Stage 1: Builder for Go application
FROM golang:1.24-alpine AS builder
FROM golang:1.24.13-alpine3.23 AS builder

RUN sed -i 's|https://dl-cdn.alpinelinux.org/alpine|https://mirrors.tuna.tsinghua.edu.cn/alpine|g' /etc/apk/repositories

WORKDIR /app

# Install build dependencies for Go
RUN apk add --no-cache git gcc libc-dev

# Use a configurable Go module proxy to avoid timeouts
# when the builder cannot reach proxy.golang.org reliably.
ARG GOPROXY=https://goproxy.cn,direct
ARG GOSUMDB=sum.golang.google.cn
ENV GOPROXY=${GOPROXY}
ENV GOSUMDB=${GOSUMDB}

# Copy go.mod and go.sum first to leverage Docker cache
COPY backend/go.mod backend/go.sum ./
RUN go mod download
RUN go env -w GOPROXY="${GOPROXY}" GOSUMDB="${GOSUMDB}" && go mod download

# Copy the entire backend source code
COPY backend/ ./
Expand All @@ -18,7 +27,9 @@ RUN go build -ldflags="-s -w" -o /app/opencoze main.go


# Stage 2: Final image
FROM alpine:3.22.0
FROM alpine:3.22

RUN sed -i 's|https://dl-cdn.alpinelinux.org/alpine|https://mirrors.tuna.tsinghua.edu.cn/alpine|g' /etc/apk/repositories

WORKDIR /app

Expand All @@ -36,7 +47,8 @@ RUN apk add --no-cache --virtual .python-build-deps build-base py3-pip git && \
. /app/.venv/bin/activate && \
# If you want to use other third-party libraries, you can install them here.
pip install urllib3==1.26.16 && \
pip install --no-cache-dir h11==0.16.0 httpx==0.28.1 pillow==11.2.1 pdfplumber==0.11.7 python-docx==1.2.0 numpy==2.3.1 && \
# pip install --no-cache-dir h11==0.16.0 httpx==0.28.1 pillow==11.2.1 pdfplumber==0.11.7 python-docx==1.2.0 numpy==2.3.1 && \
pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn h11==0.16.0 httpx==0.28.1 pillow==11.2.1 pdfplumber==0.11.7 python-docx==1.2.0 numpy==2.3.1 && \
# Deactivate (optional, as RUN is a new shell)
# deactivate && \
# Remove build dependencies
Expand Down
Empty file modified backend/README.md
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/agent_run_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/base.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/bot_open_api_service.go
100644 → 100755
Empty file.
78 changes: 58 additions & 20 deletions backend/api/handler/coze/config_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified backend/api/handler/coze/conversation_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/database_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/developer_api_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/intelligence_service.go
100644 → 100755
Empty file.
80 changes: 80 additions & 0 deletions backend/api/handler/coze/knowledge_service.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified backend/api/handler/coze/memory_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/message_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/message_service_test.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/open_apiauth_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/passport_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/playground_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/plugin_develop_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/public_product_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/resource_service.go
100644 → 100755
Empty file.
Empty file modified backend/api/handler/coze/upload_service.go
100644 → 100755
Empty file.
20 changes: 20 additions & 0 deletions backend/api/handler/coze/workflow_service.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified backend/api/handler/coze/workflow_service_test.go
100644 → 100755
Empty file.
Empty file modified backend/api/internal/httputil/error_resp.go
100644 → 100755
Empty file.
Empty file modified backend/api/middleware/ctx_cache.go
100644 → 100755
Empty file.
Empty file modified backend/api/middleware/host.go
100644 → 100755
Empty file.
Empty file modified backend/api/middleware/i18n.go
100644 → 100755
Empty file.
Empty file modified backend/api/middleware/log.go
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions backend/api/middleware/openapi_auth.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ var needAuthPath = map[string]bool{
"/v1/conversation/retrieve": true,
"/v3/chat/retrieve": true,
"/v3/chat/message/list": true,
"/open_api/knowledge/detail": true,
"/open_api/knowledge/document/delete": true,
"/open_api/knowledge/document/create": true,
"/open_api/knowledge/document/update": true,
"/open_api/knowledge/document/list": true,
"/open_api/knowledge/slice/list": true,
"/open_api/knowledge/photo/list": true,
"/open_api/knowledge/photo/detail": true,
"/open_api/workflow/sign_image_url": true,
"/v1/datasets": true,
}

Expand Down
61 changes: 61 additions & 0 deletions backend/api/middleware/openapi_auth_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package middleware

import (
"testing"

"github.com/cloudwego/hertz/pkg/app"
"github.com/stretchr/testify/assert"
)

func TestIsNeedOpenapiAuthForKnowledgeRoutes(t *testing.T) {
t.Parallel()

testCases := []struct {
name string
path string
want bool
}{
{
name: "existing document list openapi route",
path: "/open_api/knowledge/document/list",
want: true,
},
{
name: "dataset detail openapi route",
path: "/open_api/knowledge/detail",
want: true,
},
{
name: "slice list openapi route",
path: "/open_api/knowledge/slice/list",
want: true,
},
{
name: "photo list openapi route",
path: "/open_api/knowledge/photo/list",
want: true,
},
{
name: "photo detail openapi route",
path: "/open_api/knowledge/photo/detail",
want: true,
},
{
name: "web knowledge route still uses session auth",
path: "/api/knowledge/detail",
want: false,
},
}

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

var c app.RequestContext
c.Request.SetRequestURI(tc.path)

assert.Equal(t, tc.want, isNeedOpenapiAuth(&c))
})
}
}
Empty file modified backend/api/middleware/request_inspector.go
100644 → 100755
Empty file.
Loading